File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,6 @@ public function parsePostfixExpression(Node\Node $node)
365
365
366
366
if (
367
367
Token::NAME_TYPE !== $ token ->type
368
- &&
369
368
// Operators like "not" and "matches" are valid method or property names,
370
369
//
371
370
// In other words, besides NAME_TYPE, OPERATOR_TYPE could also be parsed as a property or method.
@@ -377,7 +376,7 @@ public function parsePostfixExpression(Node\Node $node)
377
376
// Other types, such as STRING_TYPE and NUMBER_TYPE, can't be parsed as property nor method names.
378
377
//
379
378
// As a result, if $token is NOT an operator OR $token->value is NOT a valid property or method name, an exception shall be thrown.
380
- (Token::OPERATOR_TYPE !== $ token ->type || !preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A ' , $ token ->value ))
379
+ && (Token::OPERATOR_TYPE !== $ token ->type || !preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A ' , $ token ->value ))
381
380
) {
382
381
throw new SyntaxError ('Expected name. ' , $ token ->cursor , $ this ->stream ->getExpression ());
383
382
}
You can’t perform that action at this time.
0 commit comments