pdt
pdt copied to clipboard
The PHP-Doc Comment ASTNode should be under the related ASTNode
Describe the bug
When I use the class org.eclipse.php.core.ast.nodes.ASTParser
to parse the PHP source code into an AST Program, and use
org.eclipse.php.core.ast.visitor.AbstractVisitor
to traverse the Program AST, I found all the Comment ASTNode is the direct children of Program AST.
However the class org.eclipse.php.core.ast.nodes.MethodDeclaration
has a field (here) is private Comment comment
. I want to use the comment infomation related to the MethodDeclaration, BUT all the Comment ASTNodes in the php source file is under the Program ASTNode.
Describe the eclipse environment org.eclipse.php.core.parser_7.2.0.202005271851.jar
Describe your system
- Windows
- 10
- PHP version that org.eclipse.php.core.parser_7.2.0.202005271851.jar supported
To Reproduce Nothing
Expected behavior The Comment ASTNode closed to the MethodDeclaration should be under the MethodDeclaration
Screenshots Nothing
Additional context Nothing