While below would work, adding the mut keyword would result in an error and throwing off things like highlighting:
================================================================================
Simple for is statement
================================================================================
for v is Node {
}
--------------------------------------------------------------------------------
(source_file
(for_statement
(is_expression
(reference_expression
(identifier))
(plain_type
(type_reference_expression
(identifier))))
(block)))
================================================================================
Simple for is statement
================================================================================
for mut v is Node {
}
--------------------------------------------------------------------------------
(source_file
(ERROR
(mutable_expression
(mutability_modifiers)
(ERROR
(identifier)
(identifier))
(map_init_expression))))
Expected Behavior
correctly recognized by parser
Current Behavior
Error
Reproduction Steps
above
Possible Solution
No response
Additional Information/Context
Atm it's hard to tell for me if this isn't an error with tree-sitter itself.
@Lycs-D what do you think?
Describe the bug
While below would work, adding the mut keyword would result in an error and throwing off things like highlighting:
Expected Behavior
correctly recognized by parser
Current Behavior
Error
Reproduction Steps
above
Possible Solution
No response
Additional Information/Context
Atm it's hard to tell for me if this isn't an error with tree-sitter itself. @Lycs-D what do you think?
Environment details (
v doctor
output)-
Editor name
nvim
v-analyzer Version
-
VS Code Extension Version
No response