Skip to content

Commit ccb7100

Browse files
committed
Allow spaces between "not" and "in"
1 parent 481166c commit ccb7100

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Grammar/JavaScript/JavaScript.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function getDefinition(): array
2222
[Token::EQUAL_STRICT, '===', 125],
2323
[Token::EQUAL, '==', 120],
2424
[Token::IN, '\bin\b', 115],
25-
[Token::NOT_IN, '\bnot in\b', 116],
25+
[Token::NOT_IN, '\bnot\s+in\b', 116],
2626
[Token::BOOL, '\b(?:true|false)\b', 110],
2727
[Token::NULL, '\bnull\b', 105],
2828
[Token::METHOD, '\.\s*[a-zA-Z_]\w*\s*\(', 100],

tests/integration/RuleTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ public function basicInRule(): void
8484
/** @test */
8585
public function basicNotInRule(): void
8686
{
87-
$ruleStr = '5 not in [4, 6, 7]';
87+
$ruleStr = '5 not
88+
in [4, 6, 7]';
8889

8990
$rule = new Rule\Rule($ruleStr);
9091

0 commit comments

Comments
 (0)