Skip to content

async multiline arrow function is treated as a function call in expression #705

@mjbvz

Description

@mjbvz

TS and JS Grammar Extension version: latest

Code

async (arg: string) => { }

async (
    asg: string
) => { }

In the second case, it looks like we are parsing it as a function call instead of a function declaration.

Not sure if this is fixable or not given the complexities of multiline matches. Would it be somewhat safe to assume that async + space + paren indicates the start of an arrow function? (I know that you could define a function called async and invoke it like async (myArgs))

Metadata

Metadata

Assignees

No one assigned

    Labels

    limitationIssue is result of tmLanguage limitation where in the lookup does not go beyond current line

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions