Closed obonyojimmy closed 3 months ago
tree-sitter --version
No response
Multi-line string literal comments parsed as expression_statement instead of comment
expression_statement
comment
Parse a python class definition like below:
class Hello: """ A test hello class """ def __init__(self): pass
The parsed Tree for Hello class body , child 0 which is expected to be a comment is parsed as an expression_statement
Would have expected a 'comment' Node , getting expression_statement
# Example code that causes the issue class Hello: """ A test hello class """ def __init__(self): pass
Those are strings, not comments. This is expected.
Thanks for the clarification
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)No response
Describe the bug
Multi-line string literal comments parsed as
expression_statement
instead ofcomment
Steps To Reproduce/Bad Parse Tree
Parse a python class definition like below:
The parsed Tree for Hello class body , child 0 which is expected to be a
comment
is parsed as anexpression_statement
Expected Behavior/Parse Tree
Would have expected a 'comment' Node , getting
expression_statement
Repro