Skip to content

val declaration parsed as postfix expression at start of anonymous lambdaΒ #47

@stumash

Description

@stumash

notice the val is not highlighted
image

Here's what tree-sitter thinks the code is
image

notice that it thinks that the left-hand side of the assignment_expression is a postfix_expression instead of that the entire assignment_expression is actually just a val_definition.

This issue appears to go away if I simply precede the val_definition with any line of code
image

However, even though the highlighting is correct, tree-sitter no longer thinks the now-correctly-identified val_definition is even within the lambda_expression at all!
image

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