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

Multi-line infix expressions #229

Closed
susliko opened this issue May 24, 2023 · 1 comment
Closed

Multi-line infix expressions #229

susliko opened this issue May 24, 2023 · 1 comment

Comments

@susliko
Copy link
Collaborator

susliko commented May 24, 2023

Commit of tree-sitter-scala you tested this on

9cb4266

A code sample showing the error

def x =
  a
   || b
   || c

Show the error node

(compilation_unit [0, 0] - [5, 0]
  (function_definition [0, 0] - [5, 0]
    name: (identifier [0, 4] - [0, 5])
    body: (indented_block [1, 2] - [5, 0]
      (identifier [1, 2] - [1, 3])
      (postfix_expression [2, 3] - [2, 7]
        (operator_identifier [2, 3] - [2, 5])
        (identifier [2, 6] - [2, 7]))
      (postfix_expression [3, 3] - [3, 7]
        (operator_identifier [3, 3] - [3, 5])
        (identifier [3, 6] - [3, 7])))))

What do you expect the tree to look like

It might be hard to recognize all infix operators in such multi-line entries, but default operators ('||', '&&') should be recognized

Where are you experiencing this error?

No response

@susliko
Copy link
Collaborator Author

susliko commented May 25, 2023

Duplicate of #141

@susliko susliko closed this as completed May 25, 2023
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

No branches or pull requests

1 participant