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

inline + infix modifier on methods causes errors #366

Closed
keynmol opened this issue Oct 18, 2023 · 0 comments · Fixed by #369
Closed

inline + infix modifier on methods causes errors #366

keynmol opened this issue Oct 18, 2023 · 0 comments · Fixed by #369

Comments

@keynmol
Copy link
Collaborator

keynmol commented Oct 18, 2023

Commit of tree-sitter-scala you tested this on

1b4c2fa

A code sample showing the error

inline infix def hello = true

Seems to cause this beautiful highlighting
CleanShot 2023-10-18 at 16 03 40

Show the error node

(compilation_unit [0, 0] - [1, 0]
  (ERROR [0, 0] - [0, 29]
    (inline_modifier [0, 0] - [0, 6])
    (identifier [0, 7] - [0, 12])
    (identifier [0, 13] - [0, 16])
    (assignment_expression [0, 17] - [0, 29]
      left: (identifier [0, 17] - [0, 22])
      right: (boolean_literal [0, 25] - [0, 29]))))

What do you expect the tree to look like

single function declaration with 2 modifiers

Where are you experiencing this error?

everywhere, reproducible from this repo alone

susliko added a commit to susliko/tree-sitter-scala-1 that referenced this issue Dec 24, 2023
Fixes tree-sitter#366

Rebalance precedences of `match_expression` (which can contain "inline") and `modifiers`
susliko added a commit to susliko/tree-sitter-scala-1 that referenced this issue Dec 26, 2023
Fixes tree-sitter#366

Rebalance precedences of `match_expression` (which can contain "inline") and `modifiers`
susliko added a commit to susliko/tree-sitter-scala-1 that referenced this issue Dec 26, 2023
Fixes tree-sitter#366

Rebalance precedences of `match_expression` (which can contain "inline") and `modifiers`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant