-
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
Is there a way to modify or remove comments? #990
Comments
The comments are stored as attributes on the node. There are some APIs for manipulating them: PHP-Parser/lib/PhpParser/Node.php Lines 90 to 113 in 46be456
There is no direct API to drop comments, but you can use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the AST, there is no comment node, but after generating code again from AST, there are the original comments. Can I at least remove them when generating code from AST?
The text was updated successfully, but these errors were encountered: