We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
tree-sitter --version
No response
Similarly to #244, the parsing of doc comments (things that start with ///) is also incorrect.
///
Parse the example below, you get:
(source_file [0, 0] - [4, 0] (mod_item [0, 0] - [3, 1] name: (identifier [0, 4] - [0, 9]) body: (declaration_list [0, 10] - [3, 1] (function_item [1, 4] - [1, 23] (visibility_modifier [1, 4] - [1, 7]) name: (identifier [1, 11] - [1, 18]) parameters: (parameters [1, 18] - [1, 20]) body: (block [1, 21] - [1, 23])) (line_comment [2, 4] - [3, 0] outer: (outer_doc_comment_marker [2, 6] - [2, 7]) doc: (doc_comment [2, 7] - [3, 0])))))
This should generate an error instead.
The following example is accepted by the grammar, while it shouldn't
mod tests { pub fn execute() {} /// hello world }
The following example fails to associate the doc comment to the function declaration:
mod tests { /// hello world pub fn execute() {} }
Parse the examples above.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)No response
Describe the bug
Similarly to #244, the parsing of doc comments (things that start with
///
) is also incorrect.Steps To Reproduce/Bad Parse Tree
Parse the example below, you get:
This should generate an error instead.
Expected Behavior/Parse Tree
The following example is accepted by the grammar, while it shouldn't
The following example fails to associate the doc comment to the function declaration:
Repro
The text was updated successfully, but these errors were encountered: