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

bug: error parsing const struct fields #163

Open
1 of 2 tasks
fredrikekre opened this issue Dec 4, 2024 · 0 comments
Open
1 of 2 tasks

bug: error parsing const struct fields #163

fredrikekre opened this issue Dec 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@fredrikekre
Copy link

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-julia

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

Error parsing const fields in a mutable struct

Steps To Reproduce/Bad Parse Tree

Source:

mutable struct Foo
    const x::Int
end

Tree:

(source_file ; [0, 0] - [3, 0]
  (struct_definition ; [0, 0] - [2, 3]
    (type_head ; [0, 15] - [0, 18]
      (identifier)) ; [0, 15] - [0, 18]
    (ERROR ; [1, 4] - [1, 16]
      (typed_expression ; [1, 10] - [1, 16]
        (identifier) ; [1, 10] - [1, 11]
        (identifier))))) ; [1, 13] - [1, 16]

Expected Behavior/Parse Tree

Should probably be parsed as (const_statement (typed_expression))?

Repro

No response

@fredrikekre fredrikekre added the bug Something isn't working label Dec 4, 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
Projects
None yet
Development

No branches or pull requests

1 participant