페이지 표시 설정

8 구문 지향 연산

이 절에 정의된 것 외에도 특수한 구문 지향 연산이 이 명세 전반에 걸쳐 정의되어 있습니다.

8.1 Runtime Semantics: Evaluation

구문 지향 연산 Evaluation. 인수 없음. 반환값: 완료 레코드.

참고
이 연산의 정의는 이 명세의 “ECMAScript 언어” 절 전반에 분산되어 있습니다. 각 정의는 관련 생성 규칙을 정의하는 부분 다음에 나타납니다.

8.2 스코프 분석

8.2.1 Static Semantics: BoundNames

구문 지향 연산 BoundNames. 인수 없음. 반환값: 리스트 (요소: String).

참고

"*default*"는 다른 이름이 없는 모듈의 기본 내보내기에 대한 합성 이름으로 이 명세에서 사용됩니다. 해당 이름으로 모듈의 [[Environment]]에 항목이 생성되어 대응하는 값을 보유하며, 모듈에 대해 ResolveExport ( exportName [ , resolveSet ] )를 호출하여 "default"라는 이름의 내보내기를 해석하면 [[BindingName]]이 "*default*"인 ResolvedBinding Record가 반환되고, 이는 다시 모듈의 [[Environment]]에서 위에서 언급한 값으로 해석됩니다. 이는 익명 기본 내보내기를 다른 내보내기와 동일하게 해석할 수 있도록 명세를 쉽게 작성하기 위한 것일 뿐입니다. 이 "*default*" String은 ECMAScript 코드나 모듈 연결 알고리즘에서 절대로 접근할 수 없습니다.

다음 생성 규칙별로 정의된다.

BindingIdentifier : Identifier
  1. 유일한 요소가 Identifier의 StringValue인 List를 반환합니다.
BindingIdentifier : yield
  1. « "yield" »를 반환합니다.
BindingIdentifier : await
  1. « "await" »를 반환합니다.
LexicalDeclaration : LetOrConst BindingList ;
  1. BindingList의 BoundNames를 반환합니다.
UsingDeclaration : using BindingList ; AwaitUsingDeclaration : CoverAwaitExpressionAndAwaitUsingDeclarationHead BindingList ;
  1. BindingList의 BoundNames를 반환합니다.
BindingList : BindingList , LexicalBinding
  1. names1을 BindingList의 BoundNames로 둡니다.
  2. names2를 LexicalBinding의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
LexicalBinding : BindingIdentifier Initializeropt
  1. BindingIdentifier의 BoundNames를 반환합니다.
LexicalBinding : BindingPattern Initializer
  1. BindingPattern의 BoundNames를 반환합니다.
VariableDeclarationList : VariableDeclarationList , VariableDeclaration
  1. names1을 VariableDeclarationList의 BoundNames로 둡니다.
  2. names2를 VariableDeclaration의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
VariableDeclaration : BindingIdentifier Initializeropt
  1. BindingIdentifier의 BoundNames를 반환합니다.
VariableDeclaration : BindingPattern Initializer
  1. BindingPattern의 BoundNames를 반환합니다.
ObjectBindingPattern : { }
  1. 새로운 빈 List를 반환합니다.
ObjectBindingPattern : { BindingPropertyList , BindingRestProperty }
  1. names1을 BindingPropertyList의 BoundNames로 둡니다.
  2. names2를 BindingRestProperty의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
ArrayBindingPattern : [ Elisionopt ]
  1. 새로운 빈 List를 반환합니다.
ArrayBindingPattern : [ Elisionopt BindingRestElement ]
  1. BindingRestElement의 BoundNames를 반환합니다.
ArrayBindingPattern : [ BindingElementList , Elisionopt ]
  1. BindingElementList의 BoundNames를 반환합니다.
ArrayBindingPattern : [ BindingElementList , Elisionopt BindingRestElement ]
  1. names1을 BindingElementList의 BoundNames로 둡니다.
  2. names2를 BindingRestElement의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
BindingPropertyList : BindingPropertyList , BindingProperty
  1. names1을 BindingPropertyList의 BoundNames로 둡니다.
  2. names2를 BindingProperty의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
BindingElementList : BindingElementList , BindingElisionElement
  1. names1을 BindingElementList의 BoundNames로 둡니다.
  2. names2를 BindingElisionElement의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
BindingElisionElement : Elisionopt BindingElement
  1. BindingElement의 BoundNames를 반환합니다.
BindingProperty : PropertyName : BindingElement
  1. BindingElement의 BoundNames를 반환합니다.
SingleNameBinding : BindingIdentifier Initializeropt
  1. BindingIdentifier의 BoundNames를 반환합니다.
BindingElement : BindingPattern Initializeropt
  1. BindingPattern의 BoundNames를 반환합니다.
ForDeclaration : LetOrConst ForBinding
  1. ForBinding의 BoundNames를 반환합니다.
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
  1. BindingIdentifier의 BoundNames를 반환합니다.
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
  1. « "*default*" »를 반환합니다.
FormalParameters : [empty]
  1. 새로운 빈 List를 반환합니다.
FormalParameters : FormalParameterList , FunctionRestParameter
  1. names1을 FormalParameterList의 BoundNames로 둡니다.
  2. names2를 FunctionRestParameter의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
FormalParameterList : FormalParameterList , FormalParameter
  1. names1을 FormalParameterList의 BoundNames로 둡니다.
  2. names2를 FormalParameter의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
ArrowParameters : CoverParenthesizedExpressionAndArrowParameterList
  1. formals를 CoverParenthesizedExpressionAndArrowParameterList가 포괄하는 ArrowFormalParameters로 둡니다.
  2. formals의 BoundNames를 반환합니다.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
  1. BindingIdentifier의 BoundNames를 반환합니다.
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
  1. « "*default*" »를 반환합니다.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
  1. BindingIdentifier의 BoundNames를 반환합니다.
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
  1. « "*default*" »를 반환합니다.
ClassDeclaration : class BindingIdentifier ClassTail
  1. BindingIdentifier의 BoundNames를 반환합니다.
ClassDeclaration : class ClassTail
  1. « "*default*" »를 반환합니다.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
  1. BindingIdentifier의 BoundNames를 반환합니다.
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
  1. « "*default*" »를 반환합니다.
CoverCallExpressionAndAsyncArrowHead : MemberExpression Arguments
  1. head를 CoverCallExpressionAndAsyncArrowHead가 포괄하는 AsyncArrowHead로 둡니다.
  2. head의 BoundNames를 반환합니다.
ImportDeclaration : import ImportClause FromClause WithClauseopt ;
  1. ImportClause의 BoundNames를 반환합니다.
ImportDeclaration : import ModuleSpecifier WithClauseopt ;
  1. 새로운 빈 List를 반환합니다.
ImportClause : ImportedDefaultBinding , NameSpaceImport
  1. names1을 ImportedDefaultBinding의 BoundNames로 둡니다.
  2. names2를 NameSpaceImport의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
ImportClause : ImportedDefaultBinding , NamedImports
  1. names1을 ImportedDefaultBinding의 BoundNames로 둡니다.
  2. names2를 NamedImports의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
NamedImports : { }
  1. 새로운 빈 List를 반환합니다.
ImportsList : ImportsList , ImportSpecifier
  1. names1을 ImportsList의 BoundNames로 둡니다.
  2. names2를 ImportSpecifier의 BoundNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
ImportSpecifier : ModuleExportName as ImportedBinding
  1. ImportedBinding의 BoundNames를 반환합니다.
ExportDeclaration : export ExportFromClause FromClause WithClauseopt ; export NamedExports ;
  1. 새로운 빈 List를 반환합니다.
ExportDeclaration : export VariableStatement
  1. VariableStatement의 BoundNames를 반환합니다.
ExportDeclaration : export Declaration
  1. Declaration의 BoundNames를 반환합니다.
ExportDeclaration : export default HoistableDeclaration
  1. declNames를 HoistableDeclaration의 BoundNames로 둡니다.
  2. declNames에 "*default*" 요소가 포함되어 있지 않으면, "*default*"를 declNames에 추가합니다.
  3. declNames를 반환합니다.
ExportDeclaration : export default ClassDeclaration
  1. declNames를 ClassDeclaration의 BoundNames로 둡니다.
  2. declNames에 "*default*" 요소가 포함되어 있지 않으면, "*default*"를 declNames에 추가합니다.
  3. declNames를 반환합니다.
ExportDeclaration : export default AssignmentExpression ;
  1. « "*default*" »를 반환합니다.

8.2.2 Static Semantics: DeclarationPart

구문 지향 연산 DeclarationPart. 인수 없음. 반환값: 구문 분석 노드. 다음 생성 규칙별로 정의된다.

HoistableDeclaration : FunctionDeclaration
  1. FunctionDeclaration을 반환합니다.
HoistableDeclaration : GeneratorDeclaration
  1. GeneratorDeclaration을 반환합니다.
HoistableDeclaration : AsyncFunctionDeclaration
  1. AsyncFunctionDeclaration을 반환합니다.
HoistableDeclaration : AsyncGeneratorDeclaration
  1. AsyncGeneratorDeclaration을 반환합니다.
Declaration : ClassDeclaration
  1. ClassDeclaration을 반환합니다.
Declaration : LexicalDeclaration
  1. LexicalDeclaration을 반환합니다.

8.2.3 Static Semantics: IsConstantDeclaration

구문 지향 연산 IsConstantDeclaration. 인수 없음. 반환값: Boolean. 다음 생성 규칙별로 정의된다.

LexicalDeclaration : LetOrConst BindingList ;
  1. LetOrConst의 IsConstantDeclaration을 반환합니다.
LetOrConst : let
  1. false를 반환합니다.
LetOrConst : const
  1. true를 반환합니다.
UsingDeclaration : using BindingList ; AwaitUsingDeclaration : CoverAwaitExpressionAndAwaitUsingDeclarationHead BindingList ;
  1. true를 반환합니다.
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody } function ( FormalParameters ) { FunctionBody } GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody } function * ( FormalParameters ) { GeneratorBody } AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } async function * ( FormalParameters ) { AsyncGeneratorBody } AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody } async function ( FormalParameters ) { AsyncFunctionBody }
  1. false를 반환합니다.
ClassDeclaration : class BindingIdentifier ClassTail class ClassTail
  1. false를 반환합니다.
ExportDeclaration : export ExportFromClause FromClause ; export NamedExports ; export default AssignmentExpression ;
  1. false를 반환합니다.
참고

모듈의 기본 객체를 참조하는 데 사용하는 내부 바인딩 이름에 할당할 수 있는 구문이 없으므로 export default AssignmentExpression을 상수 선언으로 취급할 필요는 없습니다.

8.2.4 Static Semantics: IsUsingDeclaration

구문 지향 연산 IsUsingDeclaration. 인수 없음. 반환값: Boolean. 다음 생성 규칙별로 정의된다.

LexicalDeclaration : LetOrConst BindingList ;
  1. false를 반환합니다.
UsingDeclaration : using BindingList ;
  1. true를 반환합니다.
AwaitUsingDeclaration : CoverAwaitExpressionAndAwaitUsingDeclarationHead BindingList ;
  1. false를 반환합니다.
ForDeclaration : LetOrConst ForBinding
  1. false를 반환합니다.
ForDeclaration : using ForBinding
  1. true를 반환합니다.
ForDeclaration : await using ForBinding
  1. false를 반환합니다.
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody } function ( FormalParameters ) { FunctionBody } GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody } function * ( FormalParameters ) { GeneratorBody } AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } async function * ( FormalParameters ) { AsyncGeneratorBody } AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody } async function ( FormalParameters ) { AsyncFunctionBody }
  1. false를 반환합니다.
ClassDeclaration : class BindingIdentifier ClassTail class ClassTail
  1. false를 반환합니다.

8.2.5 Static Semantics: IsAwaitUsingDeclaration

구문 지향 연산 IsAwaitUsingDeclaration. 인수 없음. 반환값: Boolean. 다음 생성 규칙별로 정의된다.

LexicalDeclaration : LetOrConst BindingList ;
  1. false를 반환합니다.
UsingDeclaration : using BindingList ;
  1. false를 반환합니다.
AwaitUsingDeclaration : CoverAwaitExpressionAndAwaitUsingDeclarationHead BindingList ;
  1. true를 반환합니다.
ForDeclaration : LetOrConst ForBinding
  1. false를 반환합니다.
ForDeclaration : using ForBinding
  1. false를 반환합니다.
ForDeclaration : await using ForBinding
  1. true를 반환합니다.
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody } function ( FormalParameters ) { FunctionBody } GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody } function * ( FormalParameters ) { GeneratorBody } AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } async function * ( FormalParameters ) { AsyncGeneratorBody } AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody } async function ( FormalParameters ) { AsyncFunctionBody }
  1. false를 반환합니다.
ClassDeclaration : class BindingIdentifier ClassTail class ClassTail
  1. false를 반환합니다.

8.2.6 Static Semantics: LexicallyDeclaredNames

구문 지향 연산 LexicallyDeclaredNames. 인수 없음. 반환값: 리스트 (요소: String). 다음 생성 규칙별로 정의된다.

Block : { }
  1. 새로운 빈 List를 반환합니다.
StatementList : StatementList StatementListItem
  1. names1을 StatementList의 LexicallyDeclaredNames로 둡니다.
  2. names2를 StatementListItem의 LexicallyDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
StatementListItem : Statement
  1. Statement가 Statement : LabelledStatement 이면, LabelledStatement의 LexicallyDeclaredNames를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
StatementListItem : Declaration
  1. Declaration의 BoundNames를 반환합니다.
CaseBlock : { }
  1. 새로운 빈 List를 반환합니다.
CaseBlock : { CaseClausesopt DefaultClause CaseClausesopt }
  1. 첫 번째 CaseClauses가 존재하면, names1을 첫 번째 CaseClauses의 LexicallyDeclaredNames로 둡니다.
  2. 그렇지 않으면 names1을 새로운 빈 List로 둡니다.
  3. names2를 DefaultClause의 LexicallyDeclaredNames로 둡니다.
  4. 두 번째 CaseClauses가 존재하면, names3을 두 번째 CaseClauses의 LexicallyDeclaredNames로 둡니다.
  5. 그렇지 않으면 names3을 새로운 빈 List로 둡니다.
  6. names1, names2 및 names3의 목록 연결을 반환합니다.
CaseClauses : CaseClauses CaseClause
  1. names1을 CaseClauses의 LexicallyDeclaredNames로 둡니다.
  2. names2를 CaseClause의 LexicallyDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
CaseClause : case Expression : StatementListopt
  1. StatementList가 존재하면, StatementList의 LexicallyDeclaredNames를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
DefaultClause : default : StatementListopt
  1. StatementList가 존재하면, StatementList의 LexicallyDeclaredNames를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
LabelledStatement : LabelIdentifier : LabelledItem
  1. LabelledItem의 LexicallyDeclaredNames를 반환합니다.
LabelledItem : Statement
  1. 새로운 빈 List를 반환합니다.
LabelledItem : FunctionDeclaration
  1. FunctionDeclaration의 BoundNames를 반환합니다.
FunctionStatementList : [empty]
  1. 새로운 빈 List를 반환합니다.
FunctionStatementList : StatementList
  1. StatementList의 TopLevelLexicallyDeclaredNames를 반환합니다.
ClassStaticBlockStatementList : [empty]
  1. 새로운 빈 List를 반환합니다.
ClassStaticBlockStatementList : StatementList
  1. StatementList의 TopLevelLexicallyDeclaredNames를 반환합니다.
ConciseBody : ExpressionBody
  1. 새로운 빈 List를 반환합니다.
AsyncConciseBody : ExpressionBody
  1. 새로운 빈 List를 반환합니다.
Script : [empty]
  1. 새로운 빈 List를 반환합니다.
ScriptBody : StatementList
  1. StatementList의 TopLevelLexicallyDeclaredNames를 반환합니다.
참고 1

Script의 최상위 수준에서 함수 선언은 렉시컬 선언이 아니라 var 선언처럼 취급됩니다.

참고 2

Module의 LexicallyDeclaredNames에는 가져온 모든 바인딩의 이름이 포함됩니다.

ModuleItemList : ModuleItemList ModuleItem
  1. names1을 ModuleItemList의 LexicallyDeclaredNames로 둡니다.
  2. names2를 ModuleItem의 LexicallyDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
ModuleItem : ImportDeclaration
  1. ImportDeclaration의 BoundNames를 반환합니다.
ModuleItem : ExportDeclaration
  1. ExportDeclaration이 export VariableStatement이면, 새로운 빈 List를 반환합니다.
  2. ExportDeclaration의 BoundNames를 반환합니다.
ModuleItem : StatementListItem
  1. StatementListItem의 LexicallyDeclaredNames를 반환합니다.
참고 3

Module의 최상위 수준에서 함수 선언은 var 선언이 아니라 렉시컬 선언처럼 취급됩니다.

8.2.7 Static Semantics: LexicallyScopedDeclarations

구문 지향 연산 LexicallyScopedDeclarations. 인수 없음. 반환값: 리스트 (요소: 구문 분석 노드). 다음 생성 규칙별로 정의된다.

StatementList : StatementList StatementListItem
  1. decls1을 StatementList의 LexicallyScopedDeclarations로 둡니다.
  2. decls2를 StatementListItem의 LexicallyScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
StatementListItem : Statement
  1. Statement가 Statement : LabelledStatement 이면, LabelledStatement의 LexicallyScopedDeclarations를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
StatementListItem : Declaration
  1. 유일한 요소가 Declaration의 DeclarationPart인 List를 반환합니다.
CaseBlock : { }
  1. 새로운 빈 List를 반환합니다.
CaseBlock : { CaseClausesopt DefaultClause CaseClausesopt }
  1. 첫 번째 CaseClauses가 존재하면, decls1을 첫 번째 CaseClauses의 LexicallyScopedDeclarations로 둡니다.
  2. 그렇지 않으면 decls1을 새로운 빈 List로 둡니다.
  3. decls2를 DefaultClause의 LexicallyScopedDeclarations로 둡니다.
  4. 두 번째 CaseClauses가 존재하면, decls3을 두 번째 CaseClauses의 LexicallyScopedDeclarations로 둡니다.
  5. 그렇지 않으면 decls3을 새로운 빈 List로 둡니다.
  6. decls1, decls2 및 decls3의 목록 연결을 반환합니다.
CaseClauses : CaseClauses CaseClause
  1. decls1을 CaseClauses의 LexicallyScopedDeclarations로 둡니다.
  2. decls2를 CaseClause의 LexicallyScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
CaseClause : case Expression : StatementListopt
  1. StatementList가 존재하면, StatementList의 LexicallyScopedDeclarations를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
DefaultClause : default : StatementListopt
  1. StatementList가 존재하면, StatementList의 LexicallyScopedDeclarations를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
LabelledStatement : LabelIdentifier : LabelledItem
  1. LabelledItem의 LexicallyScopedDeclarations를 반환합니다.
LabelledItem : Statement
  1. 새로운 빈 List를 반환합니다.
LabelledItem : FunctionDeclaration
  1. « FunctionDeclaration »을 반환합니다.
FunctionStatementList : [empty]
  1. 새로운 빈 List를 반환합니다.
FunctionStatementList : StatementList
  1. StatementList의 TopLevelLexicallyScopedDeclarations를 반환합니다.
ClassStaticBlockStatementList : [empty]
  1. 새로운 빈 List를 반환합니다.
ClassStaticBlockStatementList : StatementList
  1. StatementList의 TopLevelLexicallyScopedDeclarations를 반환합니다.
ConciseBody : ExpressionBody
  1. 새로운 빈 List를 반환합니다.
AsyncConciseBody : ExpressionBody
  1. 새로운 빈 List를 반환합니다.
Script : [empty]
  1. 새로운 빈 List를 반환합니다.
ScriptBody : StatementList
  1. StatementList의 TopLevelLexicallyScopedDeclarations를 반환합니다.
Module : [empty]
  1. 새로운 빈 List를 반환합니다.
ModuleItemList : ModuleItemList ModuleItem
  1. decls1을 ModuleItemList의 LexicallyScopedDeclarations로 둡니다.
  2. decls2를 ModuleItem의 LexicallyScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
ModuleItem : ImportDeclaration
  1. 새로운 빈 List를 반환합니다.
ExportDeclaration : export ExportFromClause FromClause WithClauseopt ; export NamedExports ; export VariableStatement
  1. 새로운 빈 List를 반환합니다.
ExportDeclaration : export Declaration
  1. 유일한 요소가 Declaration의 DeclarationPart인 List를 반환합니다.
ExportDeclaration : export default HoistableDeclaration
  1. 유일한 요소가 HoistableDeclaration의 DeclarationPart인 List를 반환합니다.
ExportDeclaration : export default ClassDeclaration
  1. 유일한 요소가 ClassDeclaration인 List를 반환합니다.
ExportDeclaration : export default AssignmentExpression ;
  1. 유일한 요소가 이 ExportDeclaration인 List를 반환합니다.

8.2.8 Static Semantics: VarDeclaredNames

구문 지향 연산 VarDeclaredNames. 인수 없음. 반환값: 리스트 (요소: String). 다음 생성 규칙별로 정의된다.

Statement : EmptyStatement ExpressionStatement ContinueStatement BreakStatement ReturnStatement ThrowStatement DebuggerStatement
  1. 새로운 빈 List를 반환합니다.
Block : { }
  1. 새로운 빈 List를 반환합니다.
StatementList : StatementList StatementListItem
  1. names1을 StatementList의 VarDeclaredNames로 둡니다.
  2. names2를 StatementListItem의 VarDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
StatementListItem : Declaration
  1. 새로운 빈 List를 반환합니다.
VariableStatement : var VariableDeclarationList ;
  1. VariableDeclarationList의 BoundNames를 반환합니다.
IfStatement : if ( Expression ) Statement else Statement
  1. names1을 첫 번째 Statement의 VarDeclaredNames로 둡니다.
  2. names2를 두 번째 Statement의 VarDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
IfStatement : if ( Expression ) Statement
  1. Statement의 VarDeclaredNames를 반환합니다.
DoWhileStatement : do Statement while ( Expression ) ;
  1. Statement의 VarDeclaredNames를 반환합니다.
WhileStatement : while ( Expression ) Statement
  1. Statement의 VarDeclaredNames를 반환합니다.
ForStatement : for ( Expressionopt ; Expressionopt ; Expressionopt ) Statement
  1. Statement의 VarDeclaredNames를 반환합니다.
ForStatement : for ( var VariableDeclarationList ; Expressionopt ; Expressionopt ) Statement
  1. names1을 VariableDeclarationList의 BoundNames로 둡니다.
  2. names2를 Statement의 VarDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
ForStatement : for ( LexicalDeclaration Expressionopt ; Expressionopt ) Statement
  1. Statement의 VarDeclaredNames를 반환합니다.
ForInOfStatement : for ( LeftHandSideExpression in Expression ) Statement for ( ForDeclaration in Expression ) Statement for ( LeftHandSideExpression of AssignmentExpression ) Statement for ( ForDeclaration of AssignmentExpression ) Statement for await ( LeftHandSideExpression of AssignmentExpression ) Statement for await ( ForDeclaration of AssignmentExpression ) Statement
  1. Statement의 VarDeclaredNames를 반환합니다.
ForInOfStatement : for ( var ForBinding in Expression ) Statement for ( var ForBinding of AssignmentExpression ) Statement for await ( var ForBinding of AssignmentExpression ) Statement
  1. names1을 ForBinding의 BoundNames로 둡니다.
  2. names2를 Statement의 VarDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
참고

이 절은 부속서 B.3.5에 의해 확장됩니다.

WithStatement : with ( Expression ) Statement
  1. Statement의 VarDeclaredNames를 반환합니다.
SwitchStatement : switch ( Expression ) CaseBlock
  1. CaseBlock의 VarDeclaredNames를 반환합니다.
CaseBlock : { }
  1. 새로운 빈 List를 반환합니다.
CaseBlock : { CaseClausesopt DefaultClause CaseClausesopt }
  1. 첫 번째 CaseClauses가 존재하면, names1을 첫 번째 CaseClauses의 VarDeclaredNames로 둡니다.
  2. 그렇지 않으면 names1을 새로운 빈 List로 둡니다.
  3. names2를 DefaultClause의 VarDeclaredNames로 둡니다.
  4. 두 번째 CaseClauses가 존재하면, names3을 두 번째 CaseClauses의 VarDeclaredNames로 둡니다.
  5. 그렇지 않으면 names3을 새로운 빈 List로 둡니다.
  6. names1, names2 및 names3의 목록 연결을 반환합니다.
CaseClauses : CaseClauses CaseClause
  1. names1을 CaseClauses의 VarDeclaredNames로 둡니다.
  2. names2를 CaseClause의 VarDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
CaseClause : case Expression : StatementListopt
  1. StatementList가 존재하면, StatementList의 VarDeclaredNames를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
DefaultClause : default : StatementListopt
  1. StatementList가 존재하면, StatementList의 VarDeclaredNames를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
LabelledStatement : LabelIdentifier : LabelledItem
  1. LabelledItem의 VarDeclaredNames를 반환합니다.
LabelledItem : FunctionDeclaration
  1. 새로운 빈 List를 반환합니다.
TryStatement : try Block Catch
  1. names1을 Block의 VarDeclaredNames로 둡니다.
  2. names2를 Catch의 VarDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
TryStatement : try Block Finally
  1. names1을 Block의 VarDeclaredNames로 둡니다.
  2. names2를 Finally의 VarDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
TryStatement : try Block Catch Finally
  1. names1을 Block의 VarDeclaredNames로 둡니다.
  2. names2를 Catch의 VarDeclaredNames로 둡니다.
  3. names3을 Finally의 VarDeclaredNames로 둡니다.
  4. names1, names2 및 names3의 목록 연결을 반환합니다.
Catch : catch ( CatchParameter ) Block
  1. Block의 VarDeclaredNames를 반환합니다.
FunctionStatementList : [empty]
  1. 새로운 빈 List를 반환합니다.
FunctionStatementList : StatementList
  1. StatementList의 TopLevelVarDeclaredNames를 반환합니다.
ClassStaticBlockStatementList : [empty]
  1. 새로운 빈 List를 반환합니다.
ClassStaticBlockStatementList : StatementList
  1. StatementList의 TopLevelVarDeclaredNames를 반환합니다.
ConciseBody : ExpressionBody
  1. 새로운 빈 List를 반환합니다.
AsyncConciseBody : ExpressionBody
  1. 새로운 빈 List를 반환합니다.
Script : [empty]
  1. 새로운 빈 List를 반환합니다.
ScriptBody : StatementList
  1. StatementList의 TopLevelVarDeclaredNames를 반환합니다.
ModuleItemList : ModuleItemList ModuleItem
  1. names1을 ModuleItemList의 VarDeclaredNames로 둡니다.
  2. names2를 ModuleItem의 VarDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
ModuleItem : ImportDeclaration
  1. 새로운 빈 List를 반환합니다.
ModuleItem : ExportDeclaration
  1. ExportDeclaration이 export VariableStatement이면, ExportDeclaration의 BoundNames를 반환합니다.
  2. 새로운 빈 List를 반환합니다.

8.2.9 Static Semantics: VarScopedDeclarations

구문 지향 연산 VarScopedDeclarations. 인수 없음. 반환값: 리스트 (요소: 구문 분석 노드). 다음 생성 규칙별로 정의된다.

Statement : EmptyStatement ExpressionStatement ContinueStatement BreakStatement ReturnStatement ThrowStatement DebuggerStatement
  1. 새로운 빈 List를 반환합니다.
Block : { }
  1. 새로운 빈 List를 반환합니다.
StatementList : StatementList StatementListItem
  1. decls1을 StatementList의 VarScopedDeclarations로 둡니다.
  2. decls2를 StatementListItem의 VarScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
StatementListItem : Declaration
  1. 새로운 빈 List를 반환합니다.
VariableDeclarationList : VariableDeclaration
  1. « VariableDeclaration »을 반환합니다.
VariableDeclarationList : VariableDeclarationList , VariableDeclaration
  1. decls1을 VariableDeclarationList의 VarScopedDeclarations로 둡니다.
  2. decls1과 « VariableDeclaration »의 목록 연결을 반환합니다.
IfStatement : if ( Expression ) Statement else Statement
  1. decls1을 첫 번째 Statement의 VarScopedDeclarations로 둡니다.
  2. decls2를 두 번째 Statement의 VarScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
IfStatement : if ( Expression ) Statement
  1. Statement의 VarScopedDeclarations를 반환합니다.
DoWhileStatement : do Statement while ( Expression ) ;
  1. Statement의 VarScopedDeclarations를 반환합니다.
WhileStatement : while ( Expression ) Statement
  1. Statement의 VarScopedDeclarations를 반환합니다.
ForStatement : for ( Expressionopt ; Expressionopt ; Expressionopt ) Statement
  1. Statement의 VarScopedDeclarations를 반환합니다.
ForStatement : for ( var VariableDeclarationList ; Expressionopt ; Expressionopt ) Statement
  1. decls1을 VariableDeclarationList의 VarScopedDeclarations로 둡니다.
  2. decls2를 Statement의 VarScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
ForStatement : for ( LexicalDeclaration Expressionopt ; Expressionopt ) Statement
  1. Statement의 VarScopedDeclarations를 반환합니다.
ForInOfStatement : for ( LeftHandSideExpression in Expression ) Statement for ( ForDeclaration in Expression ) Statement for ( LeftHandSideExpression of AssignmentExpression ) Statement for ( ForDeclaration of AssignmentExpression ) Statement for await ( LeftHandSideExpression of AssignmentExpression ) Statement for await ( ForDeclaration of AssignmentExpression ) Statement
  1. Statement의 VarScopedDeclarations를 반환합니다.
ForInOfStatement : for ( var ForBinding in Expression ) Statement for ( var ForBinding of AssignmentExpression ) Statement for await ( var ForBinding of AssignmentExpression ) Statement
  1. decls1을 « ForBinding »로 둡니다.
  2. decls2를 Statement의 VarScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
참고

이 절은 부속서 B.3.5에 의해 확장됩니다.

WithStatement : with ( Expression ) Statement
  1. Statement의 VarScopedDeclarations를 반환합니다.
SwitchStatement : switch ( Expression ) CaseBlock
  1. CaseBlock의 VarScopedDeclarations를 반환합니다.
CaseBlock : { }
  1. 새로운 빈 List를 반환합니다.
CaseBlock : { CaseClausesopt DefaultClause CaseClausesopt }
  1. 첫 번째 CaseClauses가 존재하면, decls1을 첫 번째 CaseClauses의 VarScopedDeclarations로 둡니다.
  2. 그렇지 않으면 decls1을 새로운 빈 List로 둡니다.
  3. decls2를 DefaultClause의 VarScopedDeclarations로 둡니다.
  4. 두 번째 CaseClauses가 존재하면, decls3을 두 번째 CaseClauses의 VarScopedDeclarations로 둡니다.
  5. 그렇지 않으면 decls3을 새로운 빈 List로 둡니다.
  6. decls1, decls2 및 decls3의 목록 연결을 반환합니다.
CaseClauses : CaseClauses CaseClause
  1. decls1을 CaseClauses의 VarScopedDeclarations로 둡니다.
  2. decls2를 CaseClause의 VarScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
CaseClause : case Expression : StatementListopt
  1. StatementList가 존재하면, StatementList의 VarScopedDeclarations를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
DefaultClause : default : StatementListopt
  1. StatementList가 존재하면, StatementList의 VarScopedDeclarations를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
LabelledStatement : LabelIdentifier : LabelledItem
  1. LabelledItem의 VarScopedDeclarations를 반환합니다.
LabelledItem : FunctionDeclaration
  1. 새로운 빈 List를 반환합니다.
TryStatement : try Block Catch
  1. decls1을 Block의 VarScopedDeclarations로 둡니다.
  2. decls2를 Catch의 VarScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
TryStatement : try Block Finally
  1. decls1을 Block의 VarScopedDeclarations로 둡니다.
  2. decls2를 Finally의 VarScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
TryStatement : try Block Catch Finally
  1. decls1을 Block의 VarScopedDeclarations로 둡니다.
  2. decls2를 Catch의 VarScopedDeclarations로 둡니다.
  3. decls3을 Finally의 VarScopedDeclarations로 둡니다.
  4. decls1, decls2 및 decls3의 목록 연결을 반환합니다.
Catch : catch ( CatchParameter ) Block
  1. Block의 VarScopedDeclarations를 반환합니다.
FunctionStatementList : [empty]
  1. 새로운 빈 List를 반환합니다.
FunctionStatementList : StatementList
  1. StatementList의 TopLevelVarScopedDeclarations를 반환합니다.
ClassStaticBlockStatementList : [empty]
  1. 새로운 빈 List를 반환합니다.
ClassStaticBlockStatementList : StatementList
  1. StatementList의 TopLevelVarScopedDeclarations를 반환합니다.
ConciseBody : ExpressionBody
  1. 새로운 빈 List를 반환합니다.
AsyncConciseBody : ExpressionBody
  1. 새로운 빈 List를 반환합니다.
Script : [empty]
  1. 새로운 빈 List를 반환합니다.
ScriptBody : StatementList
  1. StatementList의 TopLevelVarScopedDeclarations를 반환합니다.
Module : [empty]
  1. 새로운 빈 List를 반환합니다.
ModuleItemList : ModuleItemList ModuleItem
  1. decls1을 ModuleItemList의 VarScopedDeclarations로 둡니다.
  2. decls2를 ModuleItem의 VarScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
ModuleItem : ImportDeclaration
  1. 새로운 빈 List를 반환합니다.
ModuleItem : ExportDeclaration
  1. ExportDeclaration이 export VariableStatement이면, VariableStatement의 VarScopedDeclarations를 반환합니다.
  2. 새로운 빈 List를 반환합니다.

8.2.10 Static Semantics: TopLevelLexicallyDeclaredNames

구문 지향 연산 TopLevelLexicallyDeclaredNames. 인수 없음. 반환값: 리스트 (요소: String). 다음 생성 규칙별로 정의된다.

StatementList : StatementList StatementListItem
  1. names1을 StatementList의 TopLevelLexicallyDeclaredNames로 둡니다.
  2. names2를 StatementListItem의 TopLevelLexicallyDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
StatementListItem : Statement
  1. 새로운 빈 List를 반환합니다.
StatementListItem : Declaration
  1. Declaration이 Declaration : HoistableDeclaration 이면, 다음을 수행합니다.
    1. 새로운 빈 List를 반환합니다.
  2. Declaration의 BoundNames를 반환합니다.
참고

함수 또는 스크립트의 최상위 수준에서 함수 선언은 렉시컬 선언이 아니라 var 선언처럼 취급됩니다.

8.2.11 Static Semantics: TopLevelLexicallyScopedDeclarations

구문 지향 연산 TopLevelLexicallyScopedDeclarations. 인수 없음. 반환값: 리스트 (요소: 구문 분석 노드). 다음 생성 규칙별로 정의된다.

StatementList : StatementList StatementListItem
  1. decls1을 StatementList의 TopLevelLexicallyScopedDeclarations로 둡니다.
  2. decls2를 StatementListItem의 TopLevelLexicallyScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
StatementListItem : Statement
  1. 새로운 빈 List를 반환합니다.
StatementListItem : Declaration
  1. Declaration이 Declaration : HoistableDeclaration 이면, 다음을 수행합니다.
    1. 새로운 빈 List를 반환합니다.
  2. « Declaration »을 반환합니다.

8.2.12 Static Semantics: TopLevelVarDeclaredNames

구문 지향 연산 TopLevelVarDeclaredNames. 인수 없음. 반환값: 리스트 (요소: String). 다음 생성 규칙별로 정의된다.

StatementList : StatementList StatementListItem
  1. names1을 StatementList의 TopLevelVarDeclaredNames로 둡니다.
  2. names2를 StatementListItem의 TopLevelVarDeclaredNames로 둡니다.
  3. names1과 names2의 목록 연결을 반환합니다.
StatementListItem : Declaration
  1. Declaration이 Declaration : HoistableDeclaration 이면, 다음을 수행합니다.
    1. HoistableDeclaration의 BoundNames를 반환합니다.
  2. 새로운 빈 List를 반환합니다.
StatementListItem : Statement
  1. Statement가 Statement : LabelledStatement 이면, Statement의 TopLevelVarDeclaredNames를 반환합니다.
  2. Statement의 VarDeclaredNames를 반환합니다.
참고

함수 또는 스크립트의 최상위 수준에서 내부 함수 선언은 var 선언처럼 취급됩니다.

LabelledStatement : LabelIdentifier : LabelledItem
  1. LabelledItem의 TopLevelVarDeclaredNames를 반환합니다.
LabelledItem : Statement
  1. Statement가 Statement : LabelledStatement 이면, Statement의 TopLevelVarDeclaredNames를 반환합니다.
  2. Statement의 VarDeclaredNames를 반환합니다.
LabelledItem : FunctionDeclaration
  1. FunctionDeclaration의 BoundNames를 반환합니다.

8.2.13 Static Semantics: TopLevelVarScopedDeclarations

구문 지향 연산 TopLevelVarScopedDeclarations. 인수 없음. 반환값: 리스트 (요소: 구문 분석 노드). 다음 생성 규칙별로 정의된다.

StatementList : StatementList StatementListItem
  1. decls1을 StatementList의 TopLevelVarScopedDeclarations로 둡니다.
  2. decls2를 StatementListItem의 TopLevelVarScopedDeclarations로 둡니다.
  3. decls1과 decls2의 목록 연결을 반환합니다.
StatementListItem : Statement
  1. Statement가 Statement : LabelledStatement 이면, Statement의 TopLevelVarScopedDeclarations를 반환합니다.
  2. Statement의 VarScopedDeclarations를 반환합니다.
StatementListItem : Declaration
  1. Declaration이 Declaration : HoistableDeclaration 이면, 다음을 수행합니다.
    1. decl을 HoistableDeclaration의 DeclarationPart로 둡니다.
    2. « decl »을 반환합니다.
  2. 새로운 빈 List를 반환합니다.
LabelledStatement : LabelIdentifier : LabelledItem
  1. LabelledItem의 TopLevelVarScopedDeclarations를 반환합니다.
LabelledItem : Statement
  1. Statement가 Statement : LabelledStatement 이면, Statement의 TopLevelVarScopedDeclarations를 반환합니다.
  2. Statement의 VarScopedDeclarations를 반환합니다.
LabelledItem : FunctionDeclaration
  1. « FunctionDeclaration »을 반환합니다.

8.3 레이블

8.3.1 Static Semantics: ContainsDuplicateLabels

구문 지향 연산 ContainsDuplicateLabels. 인수 labelSet (리스트 (요소: String)). 반환값: Boolean. 다음 생성 규칙별로 정의된다.

Statement : VariableStatement EmptyStatement ExpressionStatement ContinueStatement BreakStatement ReturnStatement ThrowStatement DebuggerStatement Block : { } StatementListItem : Declaration
  1. false를 반환합니다.
StatementList : StatementList StatementListItem
  1. hasDuplicates를 인수 labelSet을 사용한 StatementList의 ContainsDuplicateLabels로 둡니다.
  2. hasDuplicates가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 StatementListItem의 ContainsDuplicateLabels를 반환합니다.
IfStatement : if ( Expression ) Statement else Statement
  1. hasDuplicate를 인수 labelSet을 사용한 첫 번째 Statement의 ContainsDuplicateLabels로 둡니다.
  2. hasDuplicate가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 두 번째 Statement의 ContainsDuplicateLabels를 반환합니다.
IfStatement : if ( Expression ) Statement
  1. 인수 labelSet을 사용한 Statement의 ContainsDuplicateLabels를 반환합니다.
DoWhileStatement : do Statement while ( Expression ) ;
  1. 인수 labelSet을 사용한 Statement의 ContainsDuplicateLabels를 반환합니다.
WhileStatement : while ( Expression ) Statement
  1. 인수 labelSet을 사용한 Statement의 ContainsDuplicateLabels를 반환합니다.
ForStatement : for ( Expressionopt ; Expressionopt ; Expressionopt ) Statement for ( var VariableDeclarationList ; Expressionopt ; Expressionopt ) Statement for ( LexicalDeclaration Expressionopt ; Expressionopt ) Statement
  1. 인수 labelSet을 사용한 Statement의 ContainsDuplicateLabels를 반환합니다.
ForInOfStatement : for ( LeftHandSideExpression in Expression ) Statement for ( var ForBinding in Expression ) Statement for ( ForDeclaration in Expression ) Statement for ( LeftHandSideExpression of AssignmentExpression ) Statement for ( var ForBinding of AssignmentExpression ) Statement for ( ForDeclaration of AssignmentExpression ) Statement for await ( LeftHandSideExpression of AssignmentExpression ) Statement for await ( var ForBinding of AssignmentExpression ) Statement for await ( ForDeclaration of AssignmentExpression ) Statement
  1. 인수 labelSet을 사용한 Statement의 ContainsDuplicateLabels를 반환합니다.
참고

이 절은 부속서 B.3.5에 의해 확장됩니다.

WithStatement : with ( Expression ) Statement
  1. 인수 labelSet을 사용한 Statement의 ContainsDuplicateLabels를 반환합니다.
SwitchStatement : switch ( Expression ) CaseBlock
  1. 인수 labelSet을 사용한 CaseBlock의 ContainsDuplicateLabels를 반환합니다.
CaseBlock : { }
  1. false를 반환합니다.
CaseBlock : { CaseClausesopt DefaultClause CaseClausesopt }
  1. 첫 번째 CaseClauses가 존재하면, 다음을 수행합니다.
    1. 인수 labelSet을 사용한 첫 번째 CaseClauses의 ContainsDuplicateLabels가 true이면, true를 반환합니다.
  2. 인수 labelSet을 사용한 DefaultClause의 ContainsDuplicateLabels가 true이면, true를 반환합니다.
  3. 두 번째 CaseClauses가 존재하지 않으면, false를 반환합니다.
  4. 인수 labelSet을 사용한 두 번째 CaseClauses의 ContainsDuplicateLabels를 반환합니다.
CaseClauses : CaseClauses CaseClause
  1. hasDuplicates를 인수 labelSet을 사용한 CaseClauses의 ContainsDuplicateLabels로 둡니다.
  2. hasDuplicates가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 CaseClause의 ContainsDuplicateLabels를 반환합니다.
CaseClause : case Expression : StatementListopt
  1. StatementList가 존재하면, 인수 labelSet을 사용한 StatementList의 ContainsDuplicateLabels를 반환합니다.
  2. false를 반환합니다.
DefaultClause : default : StatementListopt
  1. StatementList가 존재하면, 인수 labelSet을 사용한 StatementList의 ContainsDuplicateLabels를 반환합니다.
  2. false를 반환합니다.
LabelledStatement : LabelIdentifier : LabelledItem
  1. label을 LabelIdentifier의 StringValue로 둡니다.
  2. labelSet에 label이 포함되어 있으면, true를 반환합니다.
  3. newLabelSet을 labelSet과 « label »의 목록 연결로 둡니다.
  4. 인수 newLabelSet을 사용한 LabelledItem의 ContainsDuplicateLabels를 반환합니다.
LabelledItem : FunctionDeclaration
  1. false를 반환합니다.
TryStatement : try Block Catch
  1. hasDuplicates를 인수 labelSet을 사용한 Block의 ContainsDuplicateLabels로 둡니다.
  2. hasDuplicates가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 Catch의 ContainsDuplicateLabels를 반환합니다.
TryStatement : try Block Finally
  1. hasDuplicates를 인수 labelSet을 사용한 Block의 ContainsDuplicateLabels로 둡니다.
  2. hasDuplicates가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 Finally의 ContainsDuplicateLabels를 반환합니다.
TryStatement : try Block Catch Finally
  1. 인수 labelSet을 사용한 Block의 ContainsDuplicateLabels가 true이면, true를 반환합니다.
  2. 인수 labelSet을 사용한 Catch의 ContainsDuplicateLabels가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 Finally의 ContainsDuplicateLabels를 반환합니다.
Catch : catch ( CatchParameter ) Block
  1. 인수 labelSet을 사용한 Block의 ContainsDuplicateLabels를 반환합니다.
FunctionStatementList : [empty]
  1. false를 반환합니다.
ClassStaticBlockStatementList : [empty]
  1. false를 반환합니다.
ModuleItemList : ModuleItemList ModuleItem
  1. hasDuplicates를 인수 labelSet을 사용한 ModuleItemList의 ContainsDuplicateLabels로 둡니다.
  2. hasDuplicates가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 ModuleItem의 ContainsDuplicateLabels를 반환합니다.
ModuleItem : ImportDeclaration ExportDeclaration
  1. false를 반환합니다.

8.3.2 Static Semantics: ContainsUndefinedBreakTarget

구문 지향 연산 ContainsUndefinedBreakTarget. 인수 labelSet (리스트 (요소: String)). 반환값: Boolean. 다음 생성 규칙별로 정의된다.

Statement : VariableStatement EmptyStatement ExpressionStatement ContinueStatement ReturnStatement ThrowStatement DebuggerStatement Block : { } StatementListItem : Declaration
  1. false를 반환합니다.
StatementList : StatementList StatementListItem
  1. hasUndefinedLabels를 인수 labelSet을 사용한 StatementList의 ContainsUndefinedBreakTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 StatementListItem의 ContainsUndefinedBreakTarget을 반환합니다.
IfStatement : if ( Expression ) Statement else Statement
  1. hasUndefinedLabels를 인수 labelSet을 사용한 첫 번째 Statement의 ContainsUndefinedBreakTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 두 번째 Statement의 ContainsUndefinedBreakTarget을 반환합니다.
IfStatement : if ( Expression ) Statement
  1. 인수 labelSet을 사용한 Statement의 ContainsUndefinedBreakTarget을 반환합니다.
DoWhileStatement : do Statement while ( Expression ) ;
  1. 인수 labelSet을 사용한 Statement의 ContainsUndefinedBreakTarget을 반환합니다.
WhileStatement : while ( Expression ) Statement
  1. 인수 labelSet을 사용한 Statement의 ContainsUndefinedBreakTarget을 반환합니다.
ForStatement : for ( Expressionopt ; Expressionopt ; Expressionopt ) Statement for ( var VariableDeclarationList ; Expressionopt ; Expressionopt ) Statement for ( LexicalDeclaration Expressionopt ; Expressionopt ) Statement
  1. 인수 labelSet을 사용한 Statement의 ContainsUndefinedBreakTarget을 반환합니다.
ForInOfStatement : for ( LeftHandSideExpression in Expression ) Statement for ( var ForBinding in Expression ) Statement for ( ForDeclaration in Expression ) Statement for ( LeftHandSideExpression of AssignmentExpression ) Statement for ( var ForBinding of AssignmentExpression ) Statement for ( ForDeclaration of AssignmentExpression ) Statement for await ( LeftHandSideExpression of AssignmentExpression ) Statement for await ( var ForBinding of AssignmentExpression ) Statement for await ( ForDeclaration of AssignmentExpression ) Statement
  1. 인수 labelSet을 사용한 Statement의 ContainsUndefinedBreakTarget을 반환합니다.
참고

이 절은 부속서 B.3.5에 의해 확장됩니다.

BreakStatement : break ;
  1. false를 반환합니다.
BreakStatement : break LabelIdentifier ;
  1. labelSet에 LabelIdentifier의 StringValue가 포함되어 있으면, false를 반환합니다.
  2. true를 반환합니다.
WithStatement : with ( Expression ) Statement
  1. 인수 labelSet을 사용한 Statement의 ContainsUndefinedBreakTarget을 반환합니다.
SwitchStatement : switch ( Expression ) CaseBlock
  1. 인수 labelSet을 사용한 CaseBlock의 ContainsUndefinedBreakTarget을 반환합니다.
CaseBlock : { }
  1. false를 반환합니다.
CaseBlock : { CaseClausesopt DefaultClause CaseClausesopt }
  1. 첫 번째 CaseClauses가 존재하면, 다음을 수행합니다.
    1. 인수 labelSet을 사용한 첫 번째 CaseClauses의 ContainsUndefinedBreakTarget이 true이면, true를 반환합니다.
  2. 인수 labelSet을 사용한 DefaultClause의 ContainsUndefinedBreakTarget이 true이면, true를 반환합니다.
  3. 두 번째 CaseClauses가 존재하지 않으면, false를 반환합니다.
  4. 인수 labelSet을 사용한 두 번째 CaseClauses의 ContainsUndefinedBreakTarget을 반환합니다.
CaseClauses : CaseClauses CaseClause
  1. hasUndefinedLabels를 인수 labelSet을 사용한 CaseClauses의 ContainsUndefinedBreakTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 CaseClause의 ContainsUndefinedBreakTarget을 반환합니다.
CaseClause : case Expression : StatementListopt
  1. StatementList가 존재하면, 인수 labelSet을 사용한 StatementList의 ContainsUndefinedBreakTarget을 반환합니다.
  2. false를 반환합니다.
DefaultClause : default : StatementListopt
  1. StatementList가 존재하면, 인수 labelSet을 사용한 StatementList의 ContainsUndefinedBreakTarget을 반환합니다.
  2. false를 반환합니다.
LabelledStatement : LabelIdentifier : LabelledItem
  1. label을 LabelIdentifier의 StringValue로 둡니다.
  2. newLabelSet을 labelSet과 « label »의 목록 연결로 둡니다.
  3. 인수 newLabelSet을 사용한 LabelledItem의 ContainsUndefinedBreakTarget을 반환합니다.
LabelledItem : FunctionDeclaration
  1. false를 반환합니다.
TryStatement : try Block Catch
  1. hasUndefinedLabels를 인수 labelSet을 사용한 Block의 ContainsUndefinedBreakTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 Catch의 ContainsUndefinedBreakTarget을 반환합니다.
TryStatement : try Block Finally
  1. hasUndefinedLabels를 인수 labelSet을 사용한 Block의 ContainsUndefinedBreakTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 Finally의 ContainsUndefinedBreakTarget을 반환합니다.
TryStatement : try Block Catch Finally
  1. 인수 labelSet을 사용한 Block의 ContainsUndefinedBreakTarget이 true이면, true를 반환합니다.
  2. 인수 labelSet을 사용한 Catch의 ContainsUndefinedBreakTarget이 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 Finally의 ContainsUndefinedBreakTarget을 반환합니다.
Catch : catch ( CatchParameter ) Block
  1. 인수 labelSet을 사용한 Block의 ContainsUndefinedBreakTarget을 반환합니다.
FunctionStatementList : [empty]
  1. false를 반환합니다.
ClassStaticBlockStatementList : [empty]
  1. false를 반환합니다.
ModuleItemList : ModuleItemList ModuleItem
  1. hasUndefinedLabels를 인수 labelSet을 사용한 ModuleItemList의 ContainsUndefinedBreakTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 labelSet을 사용한 ModuleItem의 ContainsUndefinedBreakTarget을 반환합니다.
ModuleItem : ImportDeclaration ExportDeclaration
  1. false를 반환합니다.

8.3.3 Static Semantics: ContainsUndefinedContinueTarget

구문 지향 연산 ContainsUndefinedContinueTarget. 인수 iterationSet (리스트 (요소: String)) 및 labelSet (리스트 (요소: String)). 반환값: Boolean. 다음 생성 규칙별로 정의된다.

Statement : VariableStatement EmptyStatement ExpressionStatement BreakStatement ReturnStatement ThrowStatement DebuggerStatement Block : { } StatementListItem : Declaration
  1. false를 반환합니다.
Statement : BlockStatement
  1. 인수 iterationSet 및 « »를 사용한 BlockStatement의 ContainsUndefinedContinueTarget을 반환합니다.
BreakableStatement : IterationStatement
  1. newIterationSet을 iterationSet과 labelSet의 목록 연결로 둡니다.
  2. 인수 newIterationSet 및 « »를 사용한 IterationStatement의 ContainsUndefinedContinueTarget을 반환합니다.
StatementList : StatementList StatementListItem
  1. hasUndefinedLabels를 인수 iterationSet 및 « »를 사용한 StatementList의 ContainsUndefinedContinueTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 iterationSet 및 « »를 사용한 StatementListItem의 ContainsUndefinedContinueTarget을 반환합니다.
IfStatement : if ( Expression ) Statement else Statement
  1. hasUndefinedLabels를 인수 iterationSet 및 « »를 사용한 첫 번째 Statement의 ContainsUndefinedContinueTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 iterationSet 및 « »를 사용한 두 번째 Statement의 ContainsUndefinedContinueTarget을 반환합니다.
IfStatement : if ( Expression ) Statement
  1. 인수 iterationSet 및 « »를 사용한 Statement의 ContainsUndefinedContinueTarget을 반환합니다.
DoWhileStatement : do Statement while ( Expression ) ;
  1. 인수 iterationSet 및 « »를 사용한 Statement의 ContainsUndefinedContinueTarget을 반환합니다.
WhileStatement : while ( Expression ) Statement
  1. 인수 iterationSet 및 « »를 사용한 Statement의 ContainsUndefinedContinueTarget을 반환합니다.
ForStatement : for ( Expressionopt ; Expressionopt ; Expressionopt ) Statement for ( var VariableDeclarationList ; Expressionopt ; Expressionopt ) Statement for ( LexicalDeclaration Expressionopt ; Expressionopt ) Statement
  1. 인수 iterationSet 및 « »를 사용한 Statement의 ContainsUndefinedContinueTarget을 반환합니다.
ForInOfStatement : for ( LeftHandSideExpression in Expression ) Statement for ( var ForBinding in Expression ) Statement for ( ForDeclaration in Expression ) Statement for ( LeftHandSideExpression of AssignmentExpression ) Statement for ( var ForBinding of AssignmentExpression ) Statement for ( ForDeclaration of AssignmentExpression ) Statement for await ( LeftHandSideExpression of AssignmentExpression ) Statement for await ( var ForBinding of AssignmentExpression ) Statement for await ( ForDeclaration of AssignmentExpression ) Statement
  1. 인수 iterationSet 및 « »를 사용한 Statement의 ContainsUndefinedContinueTarget을 반환합니다.
참고

이 절은 부속서 B.3.5에 의해 확장됩니다.

ContinueStatement : continue ;
  1. false를 반환합니다.
ContinueStatement : continue LabelIdentifier ;
  1. iterationSet에 LabelIdentifier의 StringValue가 포함되어 있으면, false를 반환합니다.
  2. true를 반환합니다.
WithStatement : with ( Expression ) Statement
  1. 인수 iterationSet 및 « »를 사용한 Statement의 ContainsUndefinedContinueTarget을 반환합니다.
SwitchStatement : switch ( Expression ) CaseBlock
  1. 인수 iterationSet 및 « »를 사용한 CaseBlock의 ContainsUndefinedContinueTarget을 반환합니다.
CaseBlock : { }
  1. false를 반환합니다.
CaseBlock : { CaseClausesopt DefaultClause CaseClausesopt }
  1. 첫 번째 CaseClauses가 존재하면, 다음을 수행합니다.
    1. 인수 iterationSet 및 « »를 사용한 첫 번째 CaseClauses의 ContainsUndefinedContinueTarget이 true이면, true를 반환합니다.
  2. 인수 iterationSet 및 « »를 사용한 DefaultClause의 ContainsUndefinedContinueTarget이 true이면, true를 반환합니다.
  3. 두 번째 CaseClauses가 존재하지 않으면, false를 반환합니다.
  4. 인수 iterationSet 및 « »를 사용한 두 번째 CaseClauses의 ContainsUndefinedContinueTarget을 반환합니다.
CaseClauses : CaseClauses CaseClause
  1. hasUndefinedLabels를 인수 iterationSet 및 « »를 사용한 CaseClauses의 ContainsUndefinedContinueTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 iterationSet 및 « »를 사용한 CaseClause의 ContainsUndefinedContinueTarget을 반환합니다.
CaseClause : case Expression : StatementListopt
  1. StatementList가 존재하면, 인수 iterationSet 및 « »를 사용한 StatementList의 ContainsUndefinedContinueTarget을 반환합니다.
  2. false를 반환합니다.
DefaultClause : default : StatementListopt
  1. StatementList가 존재하면, 인수 iterationSet 및 « »를 사용한 StatementList의 ContainsUndefinedContinueTarget을 반환합니다.
  2. false를 반환합니다.
LabelledStatement : LabelIdentifier : LabelledItem
  1. label을 LabelIdentifier의 StringValue로 둡니다.
  2. newLabelSet을 labelSet과 « label »의 목록 연결로 둡니다.
  3. 인수 iterationSet 및 newLabelSet을 사용한 LabelledItem의 ContainsUndefinedContinueTarget을 반환합니다.
LabelledItem : FunctionDeclaration
  1. false를 반환합니다.
TryStatement : try Block Catch
  1. hasUndefinedLabels를 인수 iterationSet 및 « »를 사용한 Block의 ContainsUndefinedContinueTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 iterationSet 및 « »를 사용한 Catch의 ContainsUndefinedContinueTarget을 반환합니다.
TryStatement : try Block Finally
  1. hasUndefinedLabels를 인수 iterationSet 및 « »를 사용한 Block의 ContainsUndefinedContinueTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 iterationSet 및 « »를 사용한 Finally의 ContainsUndefinedContinueTarget을 반환합니다.
TryStatement : try Block Catch Finally
  1. 인수 iterationSet 및 « »를 사용한 Block의 ContainsUndefinedContinueTarget이 true이면, true를 반환합니다.
  2. 인수 iterationSet 및 « »를 사용한 Catch의 ContainsUndefinedContinueTarget이 true이면, true를 반환합니다.
  3. 인수 iterationSet 및 « »를 사용한 Finally의 ContainsUndefinedContinueTarget을 반환합니다.
Catch : catch ( CatchParameter ) Block
  1. 인수 iterationSet 및 « »를 사용한 Block의 ContainsUndefinedContinueTarget을 반환합니다.
FunctionStatementList : [empty]
  1. false를 반환합니다.
ClassStaticBlockStatementList : [empty]
  1. false를 반환합니다.
ModuleItemList : ModuleItemList ModuleItem
  1. hasUndefinedLabels를 인수 iterationSet 및 « »를 사용한 ModuleItemList의 ContainsUndefinedContinueTarget으로 둡니다.
  2. hasUndefinedLabels가 true이면, true를 반환합니다.
  3. 인수 iterationSet 및 « »를 사용한 ModuleItem의 ContainsUndefinedContinueTarget을 반환합니다.
ModuleItem : ImportDeclaration ExportDeclaration
  1. false를 반환합니다.

8.4 함수 이름 추론

8.4.1 Static Semantics: HasName

구문 지향 연산 HasName. 인수 없음. 반환값: Boolean. 다음 생성 규칙별로 정의된다.

PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList
  1. expr을 CoverParenthesizedExpressionAndArrowParameterList가 포괄하는 ParenthesizedExpression로 둡니다.
  2. expr의 IsFunctionDefinition이 false이면, false를 반환합니다.
  3. expr의 HasName을 반환합니다.
FunctionExpression : function ( FormalParameters ) { FunctionBody } GeneratorExpression : function * ( FormalParameters ) { GeneratorBody } AsyncGeneratorExpression : async function * ( FormalParameters ) { AsyncGeneratorBody } AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody } ArrowFunction : ArrowParameters => ConciseBody AsyncArrowFunction : async AsyncArrowBindingIdentifier => AsyncConciseBody CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody ClassExpression : class ClassTail
  1. false를 반환합니다.
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody } GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody } AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody } ClassExpression : class BindingIdentifier ClassTail
  1. true를 반환합니다.

8.4.2 Static Semantics: IsFunctionDefinition

구문 지향 연산 IsFunctionDefinition. 인수 없음. 반환값: Boolean. 다음 생성 규칙별로 정의된다.

PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList
  1. expr을 CoverParenthesizedExpressionAndArrowParameterList가 포괄하는 ParenthesizedExpression로 둡니다.
  2. expr의 IsFunctionDefinition을 반환합니다.
PrimaryExpression : this IdentifierReference Literal ArrayLiteral ObjectLiteral RegularExpressionLiteral TemplateLiteral MemberExpression : MemberExpression [ Expression ] MemberExpression . IdentifierName MemberExpression TemplateLiteral SuperProperty MetaProperty new MemberExpression Arguments MemberExpression . PrivateIdentifier NewExpression : new NewExpression LeftHandSideExpression : CallExpression OptionalExpression UpdateExpression : LeftHandSideExpression ++ LeftHandSideExpression -- ++ UnaryExpression -- UnaryExpression UnaryExpression : delete UnaryExpression void UnaryExpression typeof UnaryExpression + UnaryExpression - UnaryExpression ~ UnaryExpression ! UnaryExpression CoverAwaitExpressionAndAwaitUsingDeclarationHead ExponentiationExpression : UpdateExpression ** ExponentiationExpression MultiplicativeExpression : MultiplicativeExpression MultiplicativeOperator ExponentiationExpression AdditiveExpression : AdditiveExpression + MultiplicativeExpression AdditiveExpression - MultiplicativeExpression ShiftExpression : ShiftExpression << AdditiveExpression ShiftExpression >> AdditiveExpression ShiftExpression >>> AdditiveExpression RelationalExpression : RelationalExpression < ShiftExpression RelationalExpression > ShiftExpression RelationalExpression <= ShiftExpression RelationalExpression >= ShiftExpression RelationalExpression instanceof ShiftExpression RelationalExpression in ShiftExpression PrivateIdentifier in ShiftExpression EqualityExpression : EqualityExpression == RelationalExpression EqualityExpression != RelationalExpression EqualityExpression === RelationalExpression EqualityExpression !== RelationalExpression BitwiseANDExpression : BitwiseANDExpression & EqualityExpression BitwiseXORExpression : BitwiseXORExpression ^ BitwiseANDExpression BitwiseORExpression : BitwiseORExpression | BitwiseXORExpression LogicalANDExpression : LogicalANDExpression && BitwiseORExpression LogicalORExpression : LogicalORExpression || LogicalANDExpression CoalesceExpression : CoalesceExpressionHead ?? BitwiseORExpression ConditionalExpression : ShortCircuitExpression ? AssignmentExpression : AssignmentExpression AssignmentExpression : YieldExpression LeftHandSideExpression = AssignmentExpression LeftHandSideExpression AssignmentOperator AssignmentExpression LeftHandSideExpression &&= AssignmentExpression LeftHandSideExpression ||= AssignmentExpression LeftHandSideExpression ??= AssignmentExpression Expression : Expression , AssignmentExpression
  1. false를 반환합니다.
AssignmentExpression : ArrowFunction AsyncArrowFunction FunctionExpression : function BindingIdentifieropt ( FormalParameters ) { FunctionBody } GeneratorExpression : function * BindingIdentifieropt ( FormalParameters ) { GeneratorBody } AsyncGeneratorExpression : async function * BindingIdentifieropt ( FormalParameters ) { AsyncGeneratorBody } AsyncFunctionExpression : async function BindingIdentifieropt ( FormalParameters ) { AsyncFunctionBody } ClassExpression : class BindingIdentifieropt ClassTail
  1. true를 반환합니다.

8.4.3 Static Semantics: IsAnonymousFunctionDefinition ( expr )

추상 연산 IsAnonymousFunctionDefinition. 인수 expr ((an AssignmentExpression Parse Node, an Initializer Parse Node 또는 an Expression Parse Node)). 반환값: Boolean. 인수가 이름을 바인딩하지 않는 함수 정의인지 결정합니다. 호출되면 다음 단계를 수행한다.

  1. expr의 IsFunctionDefinition이 false이면, false를 반환합니다.
  2. hasName을 expr의 HasName으로 둡니다.
  3. hasName이 true이면, false를 반환합니다.
  4. true를 반환합니다.

8.4.4 Static Semantics: IsIdentifierRef

구문 지향 연산 IsIdentifierRef. 인수 없음. 반환값: Boolean. 다음 생성 규칙별로 정의된다.

PrimaryExpression : IdentifierReference
  1. true를 반환합니다.
PrimaryExpression : this Literal ArrayLiteral ObjectLiteral FunctionExpression ClassExpression GeneratorExpression AsyncFunctionExpression AsyncGeneratorExpression RegularExpressionLiteral TemplateLiteral CoverParenthesizedExpressionAndArrowParameterList MemberExpression : MemberExpression [ Expression ] MemberExpression . IdentifierName MemberExpression TemplateLiteral SuperProperty MetaProperty new MemberExpression Arguments MemberExpression . PrivateIdentifier NewExpression : new NewExpression LeftHandSideExpression : CallExpression OptionalExpression
  1. false를 반환합니다.

8.4.5 Runtime Semantics: NamedEvaluation

구문 지향 연산 NamedEvaluation. 인수 name ((프로퍼티 키 또는 비공개 이름)). 반환값: (정상 완료 (값: 함수 객체) 또는 중도 완료). 다음 생성 규칙별로 정의된다.

PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList
  1. expr을 CoverParenthesizedExpressionAndArrowParameterList가 포괄하는 ParenthesizedExpression로 둡니다.
  2. 인수 name을 사용한 expr의 ? NamedEvaluation을 반환합니다.
ParenthesizedExpression : ( Expression )
  1. 단언: IsAnonymousFunctionDefinition(Expression)은 true입니다.
  2. 인수 name을 사용한 Expression의 ? NamedEvaluation을 반환합니다.
FunctionExpression : function ( FormalParameters ) { FunctionBody }
  1. 인수 name을 사용한 FunctionExpression의 InstantiateOrdinaryFunctionExpression을 반환합니다.
GeneratorExpression : function * ( FormalParameters ) { GeneratorBody }
  1. 인수 name을 사용한 GeneratorExpression의 InstantiateGeneratorFunctionExpression을 반환합니다.
AsyncGeneratorExpression : async function * ( FormalParameters ) { AsyncGeneratorBody }
  1. 인수 name을 사용한 AsyncGeneratorExpression의 InstantiateAsyncGeneratorFunctionExpression을 반환합니다.
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
  1. 인수 name을 사용한 AsyncFunctionExpression의 InstantiateAsyncFunctionExpression을 반환합니다.
ArrowFunction : ArrowParameters => ConciseBody
  1. 인수 name을 사용한 ArrowFunction의 InstantiateArrowFunctionExpression을 반환합니다.
AsyncArrowFunction : async AsyncArrowBindingIdentifier => AsyncConciseBody CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
  1. 인수 name을 사용한 AsyncArrowFunction의 InstantiateAsyncArrowFunctionExpression을 반환합니다.
ClassExpression : class ClassTail
  1. sourceText를 ClassExpression에 일치하는 소스 텍스트로 둡니다.
  2. 인수 undefined, name 및 sourceText를 사용한 ClassTail의 ? ClassDefinitionEvaluation을 반환합니다.

8.5 포함 여부

8.5.1 Static Semantics: Contains

구문 지향 연산 Contains. 인수 symbol (문법 기호). 반환값: Boolean.

아래에 나열되지 않은 이 명세의 모든 문법 생성 규칙 대안에는 암묵적으로 다음과 같은 Contains의 기본 정의가 있습니다:

  1. 이 Parse Node의 각 자식 노드 child에 대해 다음을 수행합니다.
    1. child가 symbol의 인스턴스이면, true를 반환합니다.
    2. child가 비단말 기호의 인스턴스이면, 다음을 수행합니다.
      1. contained를 child Contains symbol의 결과로 둡니다.
      2. contained가 true이면, true를 반환합니다.
  2. false를 반환합니다.
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody } function ( FormalParameters ) { FunctionBody } FunctionExpression : function BindingIdentifieropt ( FormalParameters ) { FunctionBody } GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody } function * ( FormalParameters ) { GeneratorBody } GeneratorExpression : function * BindingIdentifieropt ( FormalParameters ) { GeneratorBody } AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } async function * ( FormalParameters ) { AsyncGeneratorBody } AsyncGeneratorExpression : async function * BindingIdentifieropt ( FormalParameters ) { AsyncGeneratorBody } AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody } async function ( FormalParameters ) { AsyncFunctionBody } AsyncFunctionExpression : async function BindingIdentifieropt ( FormalParameters ) { AsyncFunctionBody }
  1. false를 반환합니다.
참고 1

하위 구조에 의존하는 정적 의미 규칙은 일반적으로 함수 정의 내부를 살펴보지 않습니다.

ClassTail : ClassHeritageopt { ClassBody }
  1. symbol이 ClassBody이면, true를 반환합니다.
  2. symbol이 ClassHeritage이면, 다음을 수행합니다.
    1. ClassHeritage가 존재하면, true를 반환합니다.
    2. false를 반환합니다.
  3. ClassHeritage가 존재하면, 다음을 수행합니다.
    1. ClassHeritage Contains symbol이 true이면, true를 반환합니다.
  4. 인수 symbol을 사용한 ClassBody의 ComputedPropertyContains 결과를 반환합니다.
참고 2

하위 구조에 의존하는 정적 의미 규칙은 일반적으로 PropertyName을 제외하고 클래스 본문 내부를 살펴보지 않습니다.

ClassStaticBlock : static { ClassStaticBlockBody }
  1. false를 반환합니다.
참고 3

하위 구조에 의존하는 정적 의미 규칙은 일반적으로 static 초기화 블록 내부를 살펴보지 않습니다.

ArrowFunction : ArrowParameters => ConciseBody
  1. symbol이 NewTarget, SuperProperty, SuperCall, super 또는 this 중 하나가 아니면, false를 반환합니다.
  2. ArrowParameters Contains symbol이 true이면, true를 반환합니다.
  3. ConciseBody Contains symbol을 반환합니다.
ArrowParameters : CoverParenthesizedExpressionAndArrowParameterList
  1. formals를 CoverParenthesizedExpressionAndArrowParameterList가 포괄하는 ArrowFormalParameters로 둡니다.
  2. formals Contains symbol을 반환합니다.
AsyncArrowFunction : async AsyncArrowBindingIdentifier => AsyncConciseBody
  1. symbol이 NewTarget, SuperProperty, SuperCall, super 또는 this 중 하나가 아니면, false를 반환합니다.
  2. AsyncConciseBody Contains symbol을 반환합니다.
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
  1. symbol이 NewTarget, SuperProperty, SuperCall, super 또는 this 중 하나가 아니면, false를 반환합니다.
  2. head를 CoverCallExpressionAndAsyncArrowHead가 포괄하는 AsyncArrowHead로 둡니다.
  3. head Contains symbol이 true이면, true를 반환합니다.
  4. AsyncConciseBody Contains symbol을 반환합니다.
참고 4

Contains는 ArrowFunction 또는 AsyncArrowFunction 내에서 new.target, this 및 super 사용을 감지하는 데 사용됩니다.

PropertyDefinition : MethodDefinition
  1. symbol이 MethodDefinition이면, true를 반환합니다.
  2. 인수 symbol을 사용한 MethodDefinition의 ComputedPropertyContains 결과를 반환합니다.
LiteralPropertyName : IdentifierName
  1. false를 반환합니다.
MemberExpression : MemberExpression . IdentifierName
  1. MemberExpression Contains symbol이 true이면, true를 반환합니다.
  2. false를 반환합니다.
SuperProperty : super . IdentifierName
  1. symbol이 ReservedWord super이면, true를 반환합니다.
  2. false를 반환합니다.
CallExpression : CallExpression . IdentifierName
  1. CallExpression Contains symbol이 true이면, true를 반환합니다.
  2. false를 반환합니다.
OptionalChain : ?. IdentifierName
  1. false를 반환합니다.
OptionalChain : OptionalChain . IdentifierName
  1. OptionalChain Contains symbol이 true이면, true를 반환합니다.
  2. false를 반환합니다.

8.5.2 Static Semantics: ComputedPropertyContains

구문 지향 연산 ComputedPropertyContains. 인수 symbol (문법 기호). 반환값: Boolean. 다음 생성 규칙별로 정의된다.

ClassElementName : PrivateIdentifier PropertyName : LiteralPropertyName
  1. false를 반환합니다.
PropertyName : ComputedPropertyName
  1. ComputedPropertyName Contains symbol의 결과를 반환합니다.
MethodDefinition : ClassElementName ( UniqueFormalParameters ) { FunctionBody } get ClassElementName ( ) { FunctionBody } set ClassElementName ( PropertySetParameterList ) { FunctionBody }
  1. 인수 symbol을 사용한 ClassElementName의 ComputedPropertyContains 결과를 반환합니다.
GeneratorMethod : * ClassElementName ( UniqueFormalParameters ) { GeneratorBody }
  1. 인수 symbol을 사용한 ClassElementName의 ComputedPropertyContains 결과를 반환합니다.
AsyncGeneratorMethod : async * ClassElementName ( UniqueFormalParameters ) { AsyncGeneratorBody }
  1. 인수 symbol을 사용한 ClassElementName의 ComputedPropertyContains 결과를 반환합니다.
ClassElementList : ClassElementList ClassElement
  1. inList를 인수 symbol을 사용한 ClassElementList의 ComputedPropertyContains로 둡니다.
  2. inList가 true이면, true를 반환합니다.
  3. 인수 symbol을 사용한 ClassElement의 ComputedPropertyContains 결과를 반환합니다.
ClassElement : ClassStaticBlock
  1. false를 반환합니다.
ClassElement : ;
  1. false를 반환합니다.
AsyncMethod : async ClassElementName ( UniqueFormalParameters ) { AsyncFunctionBody }
  1. 인수 symbol을 사용한 ClassElementName의 ComputedPropertyContains 결과를 반환합니다.
FieldDefinition : ClassElementName Initializeropt
  1. 인수 symbol을 사용한 ClassElementName의 ComputedPropertyContains 결과를 반환합니다.

8.6 기타

이러한 연산은 명세 전반의 여러 위치에서 사용됩니다.

8.6.1 Runtime Semantics: InstantiateFunctionObject

구문 지향 연산 InstantiateFunctionObject. 인수 envRecord (Environment 레코드) 및 privateEnv ((PrivateEnvironment 레코드 또는 null)). 반환값: ECMAScript 함수 객체. 다음 생성 규칙별로 정의된다.

FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody } function ( FormalParameters ) { FunctionBody }
  1. 인수 envRecord 및 privateEnv를 사용한 FunctionDeclaration의 InstantiateOrdinaryFunctionObject를 반환합니다.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody } function * ( FormalParameters ) { GeneratorBody }
  1. 인수 envRecord 및 privateEnv를 사용한 GeneratorDeclaration의 InstantiateGeneratorFunctionObject를 반환합니다.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } async function * ( FormalParameters ) { AsyncGeneratorBody }
  1. 인수 envRecord 및 privateEnv를 사용한 AsyncGeneratorDeclaration의 InstantiateAsyncGeneratorFunctionObject를 반환합니다.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody } async function ( FormalParameters ) { AsyncFunctionBody }
  1. 인수 envRecord 및 privateEnv를 사용한 AsyncFunctionDeclaration의 InstantiateAsyncFunctionObject를 반환합니다.

8.6.2 Runtime Semantics: BindingInitialization

구문 지향 연산 BindingInitialization. 인수 value (ECMAScript 언어 값) 및 envRecord ((Environment 레코드 또는 undefined)). 반환값: (정상 완료 (값: unused) 또는 중도 완료).

참고

envRecord에 undefined를 전달하면 초기화 값을 할당하는 데 PutValue 연산을 사용해야 함을 나타냅니다. 이는 var 문과 일부 비엄격 함수의 형식 매개변수 목록에서 발생합니다(10.2.11 참조). 이러한 경우 렉시컬 바인딩은 이니셜라이저를 평가하기 전에 끌어올려지고 미리 초기화됩니다.

다음 생성 규칙별로 정의된다.

BindingIdentifier : Identifier
  1. name을 Identifier의 StringValue로 둡니다.
  2. ? InitializeBoundName(name, value, envRecord)을 반환합니다.
BindingIdentifier : yield
  1. ? InitializeBoundName("yield", value, envRecord)을 반환합니다.
BindingIdentifier : await
  1. ? InitializeBoundName("await", value, envRecord)을 반환합니다.
BindingPattern : ObjectBindingPattern
  1. ? RequireObjectCoercible(value)를 수행합니다.
  2. 인수 value 및 envRecord를 사용한 ObjectBindingPattern의 ? BindingInitialization을 반환합니다.
BindingPattern : ArrayBindingPattern
  1. iteratorRecord를 ? GetIterator(value, sync)로 둡니다.
  2. result를 인수 iteratorRecord 및 envRecord를 사용한 ArrayBindingPattern의 IteratorBindingInitialization의 Completion으로 둡니다.
  3. iteratorRecord.[[Done]]이 false이면, ? IteratorClose(iteratorRecord, result)를 반환합니다.
  4. ? result를 반환합니다.
ObjectBindingPattern : { }
  1. unused를 반환합니다.
ObjectBindingPattern : { BindingPropertyList ,opt }
  1. 인수 value 및 envRecord를 사용한 BindingPropertyList의 ? PropertyBindingInitialization을 수행합니다.
  2. unused를 반환합니다.
ObjectBindingPattern : { BindingRestProperty }
  1. excludedNames를 새로운 빈 List로 둡니다.
  2. 인수 value, envRecord 및 excludedNames를 사용한 BindingRestProperty의 ? RestBindingInitialization을 반환합니다.
ObjectBindingPattern : { BindingPropertyList , BindingRestProperty }
  1. excludedNames를 인수 value 및 envRecord를 사용한 BindingPropertyList의 ? PropertyBindingInitialization으로 둡니다.
  2. 인수 value, envRecord 및 excludedNames를 사용한 BindingRestProperty의 ? RestBindingInitialization을 반환합니다.

8.6.2.1 InitializeBoundName ( name, value, envRecord )

추상 연산 InitializeBoundName. 인수 name (String), value (ECMAScript 언어 값) 및 envRecord ((Environment 레코드 또는 undefined)). 반환값: (정상 완료 (값: unused) 또는 중도 완료). 호출되면 다음 단계를 수행한다.

  1. envRecord가 undefined가 아니면, 다음을 수행합니다.
    1. ! envRecord.InitializeBinding(name, value)을 수행합니다.
    2. unused를 반환합니다.
  2. lhs를 ? ResolveBinding(name)으로 둡니다.
  3. ? PutValue(lhs, value)를 반환합니다.

8.6.3 Runtime Semantics: IteratorBindingInitialization

구문 지향 연산 IteratorBindingInitialization. 인수 iteratorRecord (Iterator 레코드) 및 envRecord ((Environment 레코드 또는 undefined)). 반환값: (정상 완료 (값: unused) 또는 중도 완료).

참고

envRecord에 undefined가 전달되면 초기화 값을 할당하는 데 PutValue 연산을 사용해야 함을 나타냅니다. 이는 비엄격 함수의 형식 매개변수 목록에서 발생합니다. 이 경우 동일한 이름을 갖는 여러 매개변수가 존재할 가능성을 처리하기 위해 형식 매개변수 바인딩을 미리 초기화합니다.

다음 생성 규칙별로 정의된다.

ArrayBindingPattern : [ ]
  1. unused를 반환합니다.
ArrayBindingPattern : [ Elision ]
  1. 인수 iteratorRecord를 사용한 Elision의 ? IteratorDestructuringAssignmentEvaluation을 반환합니다.
ArrayBindingPattern : [ Elisionopt BindingRestElement ]
  1. Elision이 존재하면, 다음을 수행합니다.
    1. 인수 iteratorRecord를 사용한 Elision의 ? IteratorDestructuringAssignmentEvaluation을 수행합니다.
  2. 인수 iteratorRecord 및 envRecord를 사용한 BindingRestElement의 ? IteratorBindingInitialization을 반환합니다.
ArrayBindingPattern : [ BindingElementList , Elision ]
  1. 인수 iteratorRecord 및 envRecord를 사용한 BindingElementList의 ? IteratorBindingInitialization을 수행합니다.
  2. 인수 iteratorRecord를 사용한 Elision의 ? IteratorDestructuringAssignmentEvaluation을 반환합니다.
ArrayBindingPattern : [ BindingElementList , Elisionopt BindingRestElement ]
  1. 인수 iteratorRecord 및 envRecord를 사용한 BindingElementList의 ? IteratorBindingInitialization을 수행합니다.
  2. Elision이 존재하면, 다음을 수행합니다.
    1. 인수 iteratorRecord를 사용한 Elision의 ? IteratorDestructuringAssignmentEvaluation을 수행합니다.
  3. 인수 iteratorRecord 및 envRecord를 사용한 BindingRestElement의 ? IteratorBindingInitialization을 반환합니다.
BindingElementList : BindingElementList , BindingElisionElement
  1. 인수 iteratorRecord 및 envRecord를 사용한 BindingElementList의 ? IteratorBindingInitialization을 수행합니다.
  2. 인수 iteratorRecord 및 envRecord를 사용한 BindingElisionElement의 ? IteratorBindingInitialization을 반환합니다.
BindingElisionElement : Elision BindingElement
  1. 인수 iteratorRecord를 사용한 Elision의 ? IteratorDestructuringAssignmentEvaluation을 수행합니다.
  2. 인수 iteratorRecord 및 envRecord를 사용한 BindingElement의 ? IteratorBindingInitialization을 반환합니다.
SingleNameBinding : BindingIdentifier Initializeropt
  1. name을 BindingIdentifier의 StringValue로 둡니다.
  2. lhs를 ? ResolveBinding(name, envRecord)로 둡니다.
  3. value를 undefined로 둡니다.
  4. iteratorRecord.[[Done]]이 false이면, 다음을 수행합니다.
    1. next를 ? IteratorStepValue(iteratorRecord)로 둡니다.
    2. next가 done이 아니면, 다음을 수행합니다.
      1. value를 next로 설정합니다.
  5. Initializer가 존재하고 value가 undefined이면, 다음을 수행합니다.
    1. IsAnonymousFunctionDefinition(Initializer)이 true이면, 다음을 수행합니다.
      1. value를 인수 name을 사용한 Initializer의 ? NamedEvaluation으로 설정합니다.
    2. 그렇지 않으면,
      1. defaultValue를 Initializer의 ? Evaluation으로 둡니다.
      2. value를 ? GetValue(defaultValue)로 설정합니다.
  6. envRecord가 undefined이면, ? PutValue(lhs, value)를 반환합니다.
  7. ? InitializeReferencedBinding(lhs, value)을 반환합니다.
BindingElement : BindingPattern Initializeropt
  1. value를 undefined로 둡니다.
  2. iteratorRecord.[[Done]]이 false이면, 다음을 수행합니다.
    1. next를 ? IteratorStepValue(iteratorRecord)로 둡니다.
    2. next가 done이 아니면, 다음을 수행합니다.
      1. value를 next로 설정합니다.
  3. Initializer가 존재하고 value가 undefined이면, 다음을 수행합니다.
    1. defaultValue를 Initializer의 ? Evaluation으로 둡니다.
    2. value를 ? GetValue(defaultValue)로 설정합니다.
  4. 인수 value 및 envRecord를 사용한 BindingPattern의 ? BindingInitialization을 반환합니다.
BindingRestElement : ... BindingIdentifier
  1. lhs를 ? ResolveBinding(BindingIdentifier의 StringValue, envRecord)로 둡니다.
  2. array를 ! ArrayCreate(0)으로 둡니다.
  3. n을 0으로 둡니다.
  4. 다음을 반복합니다.
    1. next를 done으로 둡니다.
    2. iteratorRecord.[[Done]]이 false이면, 다음을 수행합니다.
      1. next를 ? IteratorStepValue(iteratorRecord)로 설정합니다.
    3. next가 done이면, 다음을 수행합니다.
      1. envRecord가 undefined이면, ? PutValue(lhs, array)를 반환합니다.
      2. ? InitializeReferencedBinding(lhs, array)을 반환합니다.
    4. ! CreateDataPropertyOrThrow(array, ! ToString(𝔽(n)), next)를 수행합니다.
    5. n을 n + 1로 설정합니다.
BindingRestElement : ... BindingPattern
  1. array를 ! ArrayCreate(0)으로 둡니다.
  2. n을 0으로 둡니다.
  3. 다음을 반복합니다.
    1. next를 done으로 둡니다.
    2. iteratorRecord.[[Done]]이 false이면, 다음을 수행합니다.
      1. next를 ? IteratorStepValue(iteratorRecord)로 설정합니다.
    3. next가 done이면, 다음을 수행합니다.
      1. 인수 array 및 envRecord를 사용한 BindingPattern의 ? BindingInitialization을 반환합니다.
    4. ! CreateDataPropertyOrThrow(array, ! ToString(𝔽(n)), next)를 수행합니다.
    5. n을 n + 1로 설정합니다.
FormalParameters : [empty]
  1. unused를 반환합니다.
FormalParameters : FormalParameterList , FunctionRestParameter
  1. 인수 iteratorRecord 및 envRecord를 사용한 FormalParameterList의 ? IteratorBindingInitialization을 수행합니다.
  2. 인수 iteratorRecord 및 envRecord를 사용한 FunctionRestParameter의 ? IteratorBindingInitialization을 반환합니다.
FormalParameterList : FormalParameterList , FormalParameter
  1. 인수 iteratorRecord 및 envRecord를 사용한 FormalParameterList의 ? IteratorBindingInitialization을 수행합니다.
  2. 인수 iteratorRecord 및 envRecord를 사용한 FormalParameter의 ? IteratorBindingInitialization을 반환합니다.
ArrowParameters : BindingIdentifier
  1. value를 undefined로 둡니다.
  2. 단언: iteratorRecord.[[Done]]은 false입니다.
  3. next를 ? IteratorStepValue(iteratorRecord)로 둡니다.
  4. next가 done이 아니면, 다음을 수행합니다.
    1. value를 next로 설정합니다.
  5. 인수 value 및 envRecord를 사용한 BindingIdentifier의 ? BindingInitialization을 반환합니다.
ArrowParameters : CoverParenthesizedExpressionAndArrowParameterList
  1. formals를 CoverParenthesizedExpressionAndArrowParameterList가 포괄하는 ArrowFormalParameters로 둡니다.
  2. 인수 iteratorRecord 및 envRecord를 사용한 formals의 ? IteratorBindingInitialization을 반환합니다.
AsyncArrowBindingIdentifier : BindingIdentifier
  1. value를 undefined로 둡니다.
  2. 단언: iteratorRecord.[[Done]]은 false입니다.
  3. next를 ? IteratorStepValue(iteratorRecord)로 둡니다.
  4. next가 done이 아니면, 다음을 수행합니다.
    1. value를 next로 설정합니다.
  5. 인수 value 및 envRecord를 사용한 BindingIdentifier의 ? BindingInitialization을 반환합니다.

8.6.4 Static Semantics: AssignmentTargetType

구문 지향 연산 AssignmentTargetType. 인수 없음. 반환값: (simple, web-compat 또는 invalid). 다음 생성 규칙별로 정의된다.

IdentifierReference : Identifier
  1. IsStrict(this IdentifierReference)가 true이고 Identifier의 StringValue가 "eval" 또는 "arguments"이면, invalid를 반환합니다.
  2. simple을 반환합니다.
IdentifierReference : yield await CallExpression : CallExpression [ Expression ] CallExpression . IdentifierName CallExpression . PrivateIdentifier MemberExpression : MemberExpression [ Expression ] MemberExpression . IdentifierName SuperProperty MemberExpression . PrivateIdentifier
  1. simple을 반환합니다.
PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList
  1. expr을 CoverParenthesizedExpressionAndArrowParameterList가 포괄하는 ParenthesizedExpression로 둡니다.
  2. expr의 AssignmentTargetType을 반환합니다.
CallExpression : CoverCallExpressionAndAsyncArrowHead CallExpression Arguments
  1. Normative Optional
    호스트가 웹 브라우저이거나 그 밖의 방식으로 함수 호출 할당 대상의 런타임 오류을 지원하고 IsStrict(this CallExpression)가 false이면, 다음을 수행합니다.
    1. web-compat을 반환합니다.
  2. invalid를 반환합니다.
PrimaryExpression : this Literal ArrayLiteral ObjectLiteral FunctionExpression ClassExpression GeneratorExpression AsyncFunctionExpression AsyncGeneratorExpression RegularExpressionLiteral TemplateLiteral CallExpression : SuperCall ImportCall CallExpression TemplateLiteral NewExpression : new NewExpression MemberExpression : MemberExpression TemplateLiteral new MemberExpression Arguments NewTarget : new . target ImportMeta : import . meta LeftHandSideExpression : OptionalExpression UpdateExpression : LeftHandSideExpression ++ LeftHandSideExpression -- ++ UnaryExpression -- UnaryExpression UnaryExpression : delete UnaryExpression void UnaryExpression typeof UnaryExpression + UnaryExpression - UnaryExpression ~ UnaryExpression ! UnaryExpression CoverAwaitExpressionAndAwaitUsingDeclarationHead ExponentiationExpression : UpdateExpression ** ExponentiationExpression MultiplicativeExpression : MultiplicativeExpression MultiplicativeOperator ExponentiationExpression AdditiveExpression : AdditiveExpression + MultiplicativeExpression AdditiveExpression - MultiplicativeExpression ShiftExpression : ShiftExpression << AdditiveExpression ShiftExpression >> AdditiveExpression ShiftExpression >>> AdditiveExpression RelationalExpression : RelationalExpression < ShiftExpression RelationalExpression > ShiftExpression RelationalExpression <= ShiftExpression RelationalExpression >= ShiftExpression RelationalExpression instanceof ShiftExpression RelationalExpression in ShiftExpression PrivateIdentifier in ShiftExpression EqualityExpression : EqualityExpression == RelationalExpression EqualityExpression != RelationalExpression EqualityExpression === RelationalExpression EqualityExpression !== RelationalExpression BitwiseANDExpression : BitwiseANDExpression & EqualityExpression BitwiseXORExpression : BitwiseXORExpression ^ BitwiseANDExpression BitwiseORExpression : BitwiseORExpression | BitwiseXORExpression LogicalANDExpression : LogicalANDExpression && BitwiseORExpression LogicalORExpression : LogicalORExpression || LogicalANDExpression CoalesceExpression : CoalesceExpressionHead ?? BitwiseORExpression ConditionalExpression : ShortCircuitExpression ? AssignmentExpression : AssignmentExpression AssignmentExpression : YieldExpression ArrowFunction AsyncArrowFunction LeftHandSideExpression = AssignmentExpression LeftHandSideExpression AssignmentOperator AssignmentExpression LeftHandSideExpression &&= AssignmentExpression LeftHandSideExpression ||= AssignmentExpression LeftHandSideExpression ??= AssignmentExpression Expression : Expression , AssignmentExpression
  1. invalid를 반환합니다.

8.6.5 Static Semantics: PropName

구문 지향 연산 PropName. 인수 없음. 반환값: (String 또는 empty). 다음 생성 규칙별로 정의된다.

PropertyDefinition : IdentifierReference
  1. IdentifierReference의 StringValue를 반환합니다.
PropertyDefinition : ... AssignmentExpression
  1. empty를 반환합니다.
PropertyDefinition : PropertyName : AssignmentExpression
  1. PropertyName의 PropName을 반환합니다.
LiteralPropertyName : IdentifierName AttributeKey : IdentifierName
  1. IdentifierName의 StringValue를 반환합니다.
LiteralPropertyName : StringLiteral AttributeKey : StringLiteral
  1. StringLiteral의 SV를 반환합니다.
LiteralPropertyName : NumericLiteral
  1. number를 NumericLiteral의 NumericValue로 둡니다.
  2. ! ToString(number)을 반환합니다.
ComputedPropertyName : [ AssignmentExpression ]
  1. empty를 반환합니다.
MethodDefinition : ClassElementName ( UniqueFormalParameters ) { FunctionBody } get ClassElementName ( ) { FunctionBody } set ClassElementName ( PropertySetParameterList ) { FunctionBody }
  1. ClassElementName의 PropName을 반환합니다.
GeneratorMethod : * ClassElementName ( UniqueFormalParameters ) { GeneratorBody }
  1. ClassElementName의 PropName을 반환합니다.
AsyncGeneratorMethod : async * ClassElementName ( UniqueFormalParameters ) { AsyncGeneratorBody }
  1. ClassElementName의 PropName을 반환합니다.
ClassElement : ClassStaticBlock
  1. empty를 반환합니다.
ClassElement : ;
  1. empty를 반환합니다.
AsyncMethod : async ClassElementName ( UniqueFormalParameters ) { AsyncFunctionBody }
  1. ClassElementName의 PropName을 반환합니다.
FieldDefinition : ClassElementName Initializeropt
  1. ClassElementName의 PropName을 반환합니다.
ClassElementName : PrivateIdentifier
  1. empty를 반환합니다.

8.6.6 Static Semantics: ContainsUsing

구문 지향 연산 ContainsUsing. 인수 없음. 반환값: Boolean. 다음 생성 규칙별로 정의된다.

StatementList : StatementList StatementListItem
  1. 파생된 StatementList의 ContainsUsing이 true이면, true를 반환합니다.
  2. StatementListItem의 ContainsUsing이 true이면, true를 반환합니다.
  3. false를 반환합니다.
StatementListItem : Statement
  1. false를 반환합니다.
StatementListItem : Declaration
  1. Declaration의 IsUsingDeclaration이 true이면, true를 반환합니다.
  2. Declaration의 IsAwaitUsingDeclaration이 true이면, true를 반환합니다.
  3. false를 반환합니다.