tree-sitter / tree-sitter-scala

Scala grammar for tree-sitter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Braceless if-then, function call, return expression

eed3si9n opened this issue · comments

Commit of tree-sitter-scala you tested this on

d50b6ca

A code sample showing the error

class C:
  def foo =
    if (aaa) || bbb(ccc) then return true

Show the error node

    (compilation_unit
      (class_definition
        (identifier))
      (ERROR
        (identifier)
        (parenthesized_expression
          (identifier))
        (infix_expression
          (operator_identifier)
          (identifier)
          (parenthesized_expression
            (identifier)))
        (identifier)
        (return_expression
          (boolean_literal))))

What do you expect the tree to look like

No response

Where are you experiencing this error?

No response