File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -176,11 +176,16 @@ private static function processTokens(array $tokens): array
176
176
}
177
177
178
178
// complementation - only parse BANG if it is at the start of a character group
179
- if ($ type === self ::T_BANG && isset ($ resolved [array_key_last ($ resolved ) - 1 ]) && $ resolved [array_key_last ($ resolved ) - 1 ][0 ] === self ::T_BRACKET_OPEN ) {
179
+ if ($ type === self ::T_BANG && isset ($ resolved [array_key_last ($ resolved )]) && $ resolved [array_key_last ($ resolved )][0 ] === self ::T_BRACKET_OPEN ) {
180
180
$ resolved [] = [self ::T_BANG , '! ' ];
181
181
continue ;
182
182
}
183
183
184
+ if ($ type === self ::T_BANG ) {
185
+ $ resolved [] = [self ::T_CHAR , $ char ];
186
+ continue ;
187
+ }
188
+
184
189
if ($ type === self ::T_BRACKET_OPEN ) {
185
190
$ brackets [] = $ offset ;
186
191
$ resolved [] = [$ type , $ char ];
You can’t perform that action at this time.
0 commit comments