Skip to content

Lexer: Chaining: Method chaining wraps enclosing object incorrectly #4533

Closed
@xixixao

Description

@xixixao

Input:

x =
  a: f 3
  b: f 4
    .something()

Output:

x = {
  a: f(3),
  b: f(4)
}.something();

But consider that

x =
  a: 3 # <- no function call here
  b: f 4
    .something()

compiles to

x = {
  a: 3,
  b: f(4).something()
};

I have a fix coming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions