Skip to content

B.3.2.1 - Which FunctionDeclaration parse nodes list does it iterate? #2663

@nicolo-ribaudo

Description

@nicolo-ribaudo

Description:

We are trying to fix the handling of function declarations in blocks in Babel (babel/babel#14203), and I don't understand what the spec does.

At step 29.a of B.3.2.1, it says:

a. For each FunctionDeclaration f that is directly contained in the StatementList of a Block, CaseClause, or DefaultClause, do

However, usually "For each" iterates the elements of a list. Is it iterating over the functions (deeply) contained within the function that is currently being instantiated? Or is it something like "If the current FunctionDeclarationInstantiation call has been caused by evaluating a FunctionDeclaration parse node, let f be that parse node"?

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