tolerant-php-parser
tolerant-php-parser copied to clipboard
Incorrectly identified need for closing brace
Attached below is the code that was identified as needing a closing brace. The plug-in marked the end of the file as the point needing the brace
This has a parse error in php 7.0 and 7.3
Marking the syntax error to be the end of the file seems like the reasonable behavior (this typically emits errors where the MissingToken is). What do you expect the behavior to be?
It might be user friendly to have additional information about the start as well, if that's what you meant.
php -l index.txt
Parse error: syntax error, unexpected end of file in index.txt on line 67
Errors parsing index.txt
There is a short PHP Tag at the closing UL. I don't think tolerant PHP parser recognizes this as PHP code. Short tags are deprecated anyway.