Thursday, December 22, 2022

VarScopedDeclarations

VarScopedDeclarations

Block

  1. Block : { }
        Return a new empty List.
    
  2. StatementList : StatementList StatementListItem //StatementListItem can be Statement or Declaration
        Let declarations be VarScopedDeclarations of StatementList.
        Append to declarations the elements of the VarScopedDeclarations of StatementListItem.
        Return declarations.
    
  3. StatementListItem : Declaration
        Return a new empty List// `let ` or `const ` Declaration is Lex, funct decl is top Var
    

Variable Statement

Return a new List contains all VariableDeclaration

FunctionStatementList : StatementList or Script

    Return the TopLevelVarScopedDeclarations of StatementList.

Statements contains subs

if/while/for/with/switch/label/try Statement, return a new List contains all VariableDeclaration of the sub(s)

for the case of `for(var `, the new List is pre-feed.

note in `catch ( CatchParameter ) Block`, CatchParameter is not included.

note in label Statement, `LabelledItem : FunctionDeclaration` Return a new empty List.

Others

not documented in ecma documents

No comments:

Post a Comment