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
I am encountering an issue when querying method_declaration nodes using Tree-sitter. Specifically, using the field returns in my query causes an Invalid Node Type error, while replacing it with type resolves the issue.
The grammar for method_declaration nodes in the provided file references returns for the return type of the method. However, when querying with returns, Tree-sitter raises an error about an invalid node type. Replacing it with type works, but it seems inconsistent with the provided grammar definition.
The text was updated successfully, but these errors were encountered:
Invalid Node Type Error with
returns
in QueryIssue Description
I am encountering an issue when querying
method_declaration
nodes using Tree-sitter. Specifically, using the fieldreturns
in my query causes anInvalid Node Type
error, while replacing it withtype
resolves the issue.Query Example Causing the Error
Expected Behavior
The query should retrieve all method_declaration nodes with their attributes, including the returns field for the return type.
File Context
I am using the example provided in the test/corpus/type-methods.txt with the following structure:
Problem
The grammar for method_declaration nodes in the provided file references returns for the return type of the method. However, when querying with returns, Tree-sitter raises an error about an invalid node type. Replacing it with type works, but it seems inconsistent with the provided grammar definition.
The text was updated successfully, but these errors were encountered: