-
Notifications
You must be signed in to change notification settings - Fork 71
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
Leading comments are treated as trailing comments to the previous function body #250
Comments
What happens if you move the "summary" text onto a line below the eg instead of:
have
|
That comes from the parser, the way it was implemented. In some cases the documentation block may be attached as Here another bug, on the same idea -
I'll try another approach - the first implementation was way too simplistic 😄 |
Hi @aameen951, The bug should be fixed from my latest commit - it will be released soon. |
@ichiriac Thank you! I'll find a way to tell npm to install php-parser with this fix or I might just wait until prerelease.9 |
I hope to release it this month but meanwhile use the commit id it will be safer as the current version may be introduce breaking changes |
@ichiriac Any update on this? You can reproduce the bug as well with this (using v3.0.0-prerelease.8): https://astexplorer.net/#/gist/d493a13a7b2ed670ccab73f6aea0c872/latest |
@danilopolani, it's normal, actually not yet released - will be done this week-end |
Hello,
I'm trying to parse the following file:
The output of the library is as follows:
The problem is that the documentation of the FunctionName2 is treated as a trailing comment on the body of FunctionName1 instead of a leading comment on FunctionName2.
The text was updated successfully, but these errors were encountered: