Skip to content
New issue

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 fails to recognize for mut is clauses #75

Closed
ttytm opened this issue Mar 30, 2024 · 0 comments · Fixed by #77
Closed

tree_sitter fails to recognize for mut is clauses #75

ttytm opened this issue Mar 30, 2024 · 0 comments · Fixed by #77
Labels
bug Something isn't working tree-sitter
Milestone

Comments

@ttytm
Copy link
Member

ttytm commented Mar 30, 2024

Describe the bug

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?

Environment details (v doctor output)

Editor name

nvim

v-analyzer Version

VS Code Extension Version

No response

@ttytm ttytm added bug Something isn't working tree-sitter labels Mar 30, 2024
@ttytm ttytm added this to the 0.x milestone Mar 30, 2024
@ttytm ttytm closed this as completed in #77 Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tree-sitter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant