-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comment missing in AST when in the middle of fluent call #742
Comments
(Sorry for the doublepost, I got HTTP 404 from GitHub originally.) |
This is hard to address with the current comment mechanism, which always assigns comments to the directly following node, which doesn't exist here ( I think for phpstans purposes it might be more useful to handle this not at the AST level, but to do one iteration over the tokens ($lexer->getTokens()) upfront and handle the T_COMMENT/T_DOC_COMMENT tokens. You don't care about the node it is associated with after all. I think this shouldn't be more complicated that your current code. |
Thank you, I'll give it a shot :) |
Given this code:
There's no
@phpstan-ignore-line
comment in the AST.Original issue: phpstan/phpstan#4250
The text was updated successfully, but these errors were encountered: