File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 3
3
; ---------------------------------------------------------------------------- ;
4
4
5
5
Type
6
- = Atomic [Union / Intersection ]
6
+ = Atomic [Union / Intersection / Conditional ]
7
7
/ Nullable
8
8
9
9
Union
12
12
Intersection
13
13
= 1 * (TokenIntersection Atomic )
14
14
15
+ Conditional
16
+ = 1 * ByteHorizontalWs " is" [1 * ByteHorizontalWs " not" ] 1 * ByteHorizontalWs Atomic TokenNullable Atomic TokenColon Atomic
17
+
15
18
Nullable
16
19
= TokenNullable TokenIdentifier [Generic ]
17
20
Original file line number Diff line number Diff line change 7
7
use function assert ;
8
8
use function count ;
9
9
use function in_array ;
10
+ use function strcasecmp ;
10
11
use function strlen ;
11
12
12
13
class TokenIterator
@@ -59,7 +60,7 @@ public function currentTokenOffset(): int
59
60
60
61
public function isCurrentTokenValue (string $ tokenValue ): bool
61
62
{
62
- return $ this ->tokens [$ this ->index ][Lexer::VALUE_OFFSET ] === $ tokenValue ;
63
+ return strcasecmp ( $ this ->tokens [$ this ->index ][Lexer::VALUE_OFFSET ], $ tokenValue ) === 0 ;
63
64
}
64
65
65
66
You can’t perform that action at this time.
0 commit comments