You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just had this issue too - also appears to happen with the reserved words NEW, EMPTY, and DEFAULT that are explicitly allowed as method names or in my case constants: http://php.net/manual/en/reserved.keywords.php.
Sadly pdepend/pdepend#383 will not be enough, I tested with dev-php-7.1-compatibility and the unexpected token is still there. It should be handled afterward.
In fact, the token_get_all itself produces this misleading result: https://3v4l.org/rk6uH
After function, the tokenizer should give us a T_STRING, but it actually gives a T_EMPTY. That means the PHP parser handle it while it should be the responsibility of the tokenizer (lexer) if well enclosed.
This code
Results in:
Unexpected token: empty, line: 6, col: 28, file: Test.php.
The text was updated successfully, but these errors were encountered: