You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsing code where a decorator is attached to a method definition puts the (decorator) inside the class nearby to the (method_definition) instead of being inside the (method_definition) like I'd expect it to be. Other similar situations (e.g., (class_declaration), (_parameter_name), (public_field_definition)) have the decorator inside the decorated node.
The typescript AST also has the decorator inside of the method definition
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)tree-sitter 0.22.6 (b40f342067a89cd6331bf4c27407588320f3c263)
Describe the bug
Parsing code where a decorator is attached to a method definition puts the
(decorator)
inside the class nearby to the(method_definition)
instead of being inside the(method_definition)
like I'd expect it to be. Other similar situations (e.g.,(class_declaration)
,(_parameter_name)
,(public_field_definition)
) have the decorator inside the decorated node.The typescript AST also has the decorator inside of the method definition
https://ts-ast-viewer.com/#code/MYGwhgzhAEBiD29oG8BQ1oAEBOBTMAJvAHYgCe0AZogEJjYAUAlCgL6rtA
Steps To Reproduce/Bad Parse Tree
Trying to parse:
Will produce:
Expected Behavior/Parse Tree
I'd expect the parse tree to look like this
Repro
No response
The text was updated successfully, but these errors were encountered: