-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namespace support #1
Comments
My original reasoning was that normally people use semicolon style namespaces instead of the braced onces and thus it should be put as a seperate statement. But you are probably right that it makes more sense to regard the statements as subnodes of the namespace. I changed the behavior towards that in fb45e8a. |
Fantastic, thanks! |
TysonAndre
pushed a commit
to TysonAndre/PHP-Parser
that referenced
this issue
Mar 21, 2017
Saw the below error in php 7.1 ``` Fatal error: Uncaught Error: Declaration of PhpParser\ErrorHandler\Throwing::handleError() must be compatible with that of PhpParser\ErrorHandler::handleError() in .../vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/ Throwing.php:13 Stack trace: \#0 .../vendor/nikic/php-parser/lib/PhpParser/Autoloader.php(36): include() \nikic#1 ..../vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php(144): PhpParser\Autoloader::autoload() ... ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the code uses namespaces, the namespace node should be the root node for all the code within the namespace:
Current output:
The text was updated successfully, but these errors were encountered: