Skip to content

ERROR on indented expressions that aren't really indented #433

Closed as not planned
@KaranAhlawat

Description

@KaranAhlawat

Commit of tree-sitter-scala you tested this on

v0.23.2

A code sample showing the error

def hi =
    e match
    case 1 => "Ok"
    case _ => "Also Ok"

Show the error node

(function_definition name: def (identifier) body: =
 (indented_cases
  (ERROR (identifier) match)
  (case_clause case pattern: (integer_literal) body: => (string))
  (case_clause case
   pattern: (wildcard _)
   body: => (string))))

What do you expect the tree to look like

(function_definition name: def (identifier) body: =
 (indented_block
  (match_expression value: (identifier) match
   body: 
    (indented_cases
     (case_clause case pattern: (integer_literal) body: => (string))
     (case_clause case
      pattern: (wildcard _)
      body: => (string))))))

Where are you experiencing this error?

Emacs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions