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
impl trait claused that start with a lifetime are misparsed and produce an error token. The corresponding where clauses are parsed just fine
Try to parse the following code :
fn foo<'a>(x: impl 'a + Clone ) {}
You obtain the following parse-tree :
source_file [0, 0] - [1, 0] function_item [0, 0] - [0, 33] name: identifier [0, 3] - [0, 6] type_parameters: type_parameters [0, 6] - [0, 10] lifetime [0, 7] - [0, 9] identifier [0, 8] - [0, 9] parameters: parameters [0, 10] - [0, 30] parameter [0, 11] - [0, 29] pattern: identifier [0, 11] - [0, 12] type: bounded_type [0, 14] - [0, 29] abstract_type [0, 14] - [0, 21] ERROR [0, 19] - [0, 20] trait: type_identifier [0, 20] - [0, 21] type_identifier [0, 24] - [0, 29] body: block [0, 31] - [0, 33]
Not sure what exact parse tree should be produced. It seems to me that the rule for abstract_type is wrong as it seems to support only one type.
abstract_type
The text was updated successfully, but these errors were encountered:
impl 'lifetime + ...
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
impl trait claused that start with a lifetime are misparsed and produce an error token. The corresponding where clauses are parsed just fine
Steps To Reproduce/Bad Parse Tree
Try to parse the following code :
You obtain the following parse-tree :
Expected Behavior/Parse Tree
Not sure what exact parse tree should be produced. It seems to me that the rule for
abstract_type
is wrong as it seems to support only one type.The text was updated successfully, but these errors were encountered: