Skip to content

The nonterminals are the same #2752

Open
@xp44mm

Description

@xp44mm

The following corresponding symbols are actually duplicates, one is an alias for the other, should it be unified into one symbol?

AsyncFunctionDeclaration
AsyncFunctionExpression

AsyncGeneratorDeclaration
AsyncGeneratorExpression

ClassDeclaration
ClassExpression

FunctionDeclaration
FunctionExpression

GeneratorDeclaration
GeneratorExpression

for examle:

      FunctionDeclaration[Yield, Await, Default] :
        `function` BindingIdentifier[?Yield, ?Await] `(` FormalParameters[~Yield, ~Await] `)` `{` FunctionBody[~Yield, ~Await] `}`
        [+Default] `function` `(` FormalParameters[~Yield, ~Await] `)` `{` FunctionBody[~Yield, ~Await] `}`

      FunctionExpression :
        `function` BindingIdentifier[~Yield, ~Await]? `(` FormalParameters[~Yield, ~Await] `)` `{` FunctionBody[~Yield, ~Await] `}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions