Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 34e7730

Browse files
Add fuzzy tests
1 parent 7402e40 commit 34e7730

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎doc/grammars/type.abnf‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
; ---------------------------------------------------------------------------- ;
44

55
Type
6-
= Atomic [Union / Intersection]
6+
= Atomic [Union / Intersection/Conditional]
77
/ Nullable
88

99
Union
@@ -12,6 +12,9 @@ Union
1212
Intersection
1313
= 1*(TokenIntersection Atomic)
1414

15+
Conditional
16+
= 1*ByteHorizontalWs "is" [1*ByteHorizontalWs "not"] 1*ByteHorizontalWs Atomic TokenNullable Atomic TokenColon Atomic
17+
1518
Nullable
1619
= TokenNullable TokenIdentifier [Generic]
1720

‎src/Parser/TokenIterator.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function currentTokenOffset(): int
5959

6060
public function isCurrentTokenValue(string $tokenValue): bool
6161
{
62-
return $this->tokens[$this->index][Lexer::VALUE_OFFSET]=== $tokenValue;
62+
return strcasecmp($this->tokens[$this->index][Lexer::VALUE_OFFSET], $tokenValue) === 0;
6363
}
6464

6565

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /