Skip to content

Proper parsing for immediate applied multi-line lambda functions #281

@NeilKleistGao

Description

@NeilKleistGao

Multi-line lambda functions can be parsed as Jux:

(x =>
  x + 1)(0)
//│ FAILURE: Unexpected type error
//│ ╔══[ERROR] Illegal juxtaposition right-hand side.
//│ ║  l.46: 	  x + 1)(0)
//│ ╙──      	        ^^^

This is because an indent is inserted unexpectedly around the parameter list (0):

:dp
(x =>
  x + 1)(0)
//│ |(|x| |=>|→|x| |+| |1|←|)|→|(|0|)|←|

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions