ECMA-262 6th Edition Grammar

1 Grammar

SourceCharacter::any Unicode code point InputElementDiv::WhiteSpace LineTerminator Comment CommonToken DivPunctuator RightBracePunctuator InputElementRegExp::WhiteSpace LineTerminator Comment CommonToken RightBracePunctuator RegularExpressionLiteral InputElementRegExpOrTemplateTail::WhiteSpace LineTerminator Comment CommonToken RegularExpressionLiteral TemplateSubstitutionTail InputElementTemplateTail::WhiteSpace LineTerminator Comment CommonToken DivPunctuator TemplateSubstitutionTail WhiteSpace::<TAB> <VT> <FF> <SP> <NBSP> <ZWNBSP> <USP> LineTerminator::<LF> <CR> <LS> <PS> LineTerminatorSequence::<LF> <CR>[lookahead ≠ <LF>] <LS> <PS> <CR><LF> Comment::MultiLineComment SingleLineComment MultiLineComment::/*MultiLineCommentCharsopt*/ MultiLineCommentChars::MultiLineNotAsteriskCharMultiLineCommentCharsopt *PostAsteriskCommentCharsopt PostAsteriskCommentChars::MultiLineNotForwardSlashOrAsteriskCharMultiLineCommentCharsopt *PostAsteriskCommentCharsopt MultiLineNotAsteriskChar::SourceCharacterbut not * MultiLineNotForwardSlashOrAsteriskChar::SourceCharacterbut not one of / or * SingleLineComment:://SingleLineCommentCharsopt SingleLineCommentChars::SingleLineCommentCharSingleLineCommentCharsopt SingleLineCommentChar::SourceCharacterbut not LineTerminator CommonToken::IdentifierName Punctuator NumericLiteral StringLiteral Template IdentifierName::IdentifierStart IdentifierNameIdentifierPart IdentifierStart::UnicodeIDStart $ _ \UnicodeEscapeSequence IdentifierPart::UnicodeIDContinue $ _ \UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart::any Unicode code point with the Unicode property "ID_Start" or "Other_ID_Start" UnicodeIDContinue::any Unicode code point with the Unicode property "ID_Continue" or "Other_ID_Continue", or "Other_ID_Start" ReservedWord::Keyword FutureReservedWord NullLiteral BooleanLiteral Keyword::one ofbreakdointypeofcaseelseinstanceofvarcatchexportnewvoidclassextendsreturnwhileconstfinallysuperwithcontinueforswitchyielddebuggerfunctionthisdefaultifthrowdeleteimporttry FutureReservedWord::one ofenumawaitimplementspackageprotectedinterfaceprivatepublic Punctuator::one of{}()[].;,<><=>===!====!==+-*%++--<<>>>>>&|^!~&&||?::=+=-=*=%=<<=>>=>>>=&=|=^==> DivPunctuator::one of//= RightBracePunctuator::one of) NullLiteral::null BooleanLiteral::true false NumericLiteral::DecimalLiteral BinaryIntegerLiteral OctalIntegerLiteral HexIntegerLiteral DecimalLiteral::DecimalIntegerLiteral.DecimalDigitsoptExponentPartopt .DecimalDigitsExponentPartopt DecimalIntegerLiteralExponentPartopt DecimalIntegerLiteral::0 NonZeroDigitDecimalDigitsopt DecimalDigits::DecimalDigit DecimalDigitsDecimalDigit DecimalDigit::one of0123456789 NonZeroDigit::one of123456789 ExponentPart::ExponentIndicatorSignedInteger ExponentIndicator::one ofeE SignedInteger::DecimalDigits +DecimalDigits -DecimalDigits BinaryIntegerLiteral::0bBinaryDigits 0BBinaryDigits BinaryDigits::BinaryDigit BinaryDigitsBinaryDigit BinaryDigit::one of01 OctalIntegerLiteral::0oOctalDigits 0OOctalDigits OctalDigits::OctalDigit OctalDigitsOctalDigit OctalDigit::one of01234567 HexIntegerLiteral::0xHexDigits 0XHexDigits HexDigits::HexDigit HexDigitsHexDigit HexDigit::one of0123456789abcdefABCDEF StringLiteral::"DoubleStringCharactersopt" 'SingleStringCharactersopt' DoubleStringCharacters::DoubleStringCharacterDoubleStringCharactersopt SingleStringCharacters::SingleStringCharacterSingleStringCharactersopt DoubleStringCharacter::SourceCharacterbut not one of " or \ or LineTerminator \EscapeSequence LineContinuation SingleStringCharacter::SourceCharacterbut not one of ' or \ or LineTerminator \EscapeSequence LineContinuation LineContinuation::\LineTerminatorSequence EscapeSequence::CharacterEscapeSequence 0[lookahead ∉ DecimalDigit] HexEscapeSequence UnicodeEscapeSequence CharacterEscapeSequence::SingleEscapeCharacter NonEscapeCharacter SingleEscapeCharacter::one of'"\bfnrtv NonEscapeCharacter::SourceCharacterbut not one of EscapeCharacter or LineTerminator EscapeCharacter::SingleEscapeCharacter DecimalDigit x u HexEscapeSequence::xHexDigitHexDigit UnicodeEscapeSequence::uHex4Digits u{HexDigits} Hex4Digits::HexDigitHexDigitHexDigitHexDigit RegularExpressionLiteral::/RegularExpressionBody/RegularExpressionFlags RegularExpressionBody::RegularExpressionFirstCharRegularExpressionChars RegularExpressionChars::[empty] RegularExpressionCharsRegularExpressionChar RegularExpressionFirstChar::RegularExpressionNonTerminatorbut not one of * or \ or / or [ RegularExpressionBackslashSequence RegularExpressionClass RegularExpressionChar::RegularExpressionNonTerminatorbut not one of \ or / or [ RegularExpressionBackslashSequence RegularExpressionClass RegularExpressionBackslashSequence::\RegularExpressionNonTerminator RegularExpressionNonTerminator::SourceCharacterbut not LineTerminator RegularExpressionClass::[RegularExpressionClassChars] RegularExpressionClassChars::[empty] RegularExpressionClassCharsRegularExpressionClassChar RegularExpressionClassChar::RegularExpressionNonTerminatorbut not one of ] or \ RegularExpressionBackslashSequence RegularExpressionFlags::[empty] RegularExpressionFlagsIdentifierPart Template::NoSubstitutionTemplate TemplateHead NoSubstitutionTemplate::`TemplateCharactersopt` TemplateHead::`TemplateCharactersopt${ TemplateSubstitutionTail::TemplateMiddle TemplateTail TemplateMiddle::}TemplateCharactersopt${ TemplateTail::}TemplateCharactersopt` TemplateCharacters::TemplateCharacterTemplateCharactersopt TemplateCharacter::$[lookahead ≠ {] \EscapeSequence LineContinuation LineTerminatorSequence SourceCharacterbut not one of ` or \ or $ or LineTerminator IdentifierReference[Yield]:Identifier [~Yield]yield BindingIdentifier[Yield]:Identifier [~Yield]yield LabelIdentifier[Yield]:Identifier [~Yield]yield Identifier:IdentifierNamebut not ReservedWord PrimaryExpression[Yield]:this IdentifierReference[?Yield] Literal ArrayLiteral[?Yield] ObjectLiteral[?Yield] FunctionExpression ClassExpression[?Yield] GeneratorExpression RegularExpressionLiteral TemplateLiteral[?Yield] CoverParenthesizedExpressionAndArrowParameterList[?Yield] CoverParenthesizedExpressionAndArrowParameterList[Yield]:(Expression[+In, ?Yield]) () (...BindingIdentifier[?Yield]) (Expression[+In, ?Yield],...BindingIdentifier[?Yield]) Literal:NullLiteral BooleanLiteral NumericLiteral StringLiteral ArrayLiteral[Yield]:[Elisionopt] [ElementList[?Yield]] [ElementList[?Yield],Elisionopt] ElementList[Yield]:ElisionoptAssignmentExpression[+In, ?Yield] ElisionoptSpreadElement[?Yield] ElementList[?Yield],ElisionoptAssignmentExpression[+In, ?Yield] ElementList[?Yield],ElisionoptSpreadElement[?Yield] Elision:, Elision, SpreadElement[Yield]:...AssignmentExpression[+In, ?Yield] ObjectLiteral[Yield]:{} {PropertyDefinitionList[?Yield]} {PropertyDefinitionList[?Yield],} PropertyDefinitionList[Yield]:PropertyDefinition[?Yield] PropertyDefinitionList[?Yield],PropertyDefinition[?Yield] PropertyDefinition[Yield]:IdentifierReference[?Yield] CoverInitializedName[?Yield] PropertyName[?Yield]:AssignmentExpression[+In, ?Yield] MethodDefinition[?Yield] PropertyName[Yield]:LiteralPropertyName ComputedPropertyName[?Yield] LiteralPropertyName:IdentifierName StringLiteral NumericLiteral ComputedPropertyName[Yield]:[AssignmentExpression[+In, ?Yield]] CoverInitializedName[Yield]:IdentifierReference[?Yield]Initializer[+In, ?Yield] Initializer[In, Yield]:=AssignmentExpression[?In, ?Yield] TemplateLiteral[Yield]:NoSubstitutionTemplate TemplateHeadExpression[+In, ?Yield]TemplateSpans[?Yield] TemplateSpans[Yield]:TemplateTail TemplateMiddleList[?Yield]TemplateTail TemplateMiddleList[Yield]:TemplateMiddleExpression[+In, ?Yield] TemplateMiddleList[?Yield]TemplateMiddleExpression[+In, ?Yield] MemberExpression[Yield]:PrimaryExpression[?Yield] MemberExpression[?Yield][Expression[+In, ?Yield]] MemberExpression[?Yield].IdentifierName MemberExpression[?Yield]TemplateLiteral[?Yield] SuperProperty[?Yield] MetaProperty newMemberExpression[?Yield]Arguments[?Yield] SuperProperty[Yield]:super[Expression[+In, ?Yield]] super.IdentifierName MetaProperty:NewTarget NewTarget:new.target NewExpression[Yield]:MemberExpression[?Yield] newNewExpression[?Yield] CallExpression[Yield]:MemberExpression[?Yield]Arguments[?Yield] SuperCall[?Yield] CallExpression[?Yield]Arguments[?Yield] CallExpression[?Yield][Expression[+In, ?Yield]] CallExpression[?Yield].IdentifierName CallExpression[?Yield]TemplateLiteral[?Yield] SuperCall[Yield]:superArguments[?Yield] Arguments[Yield]:() (ArgumentList[?Yield]) ArgumentList[Yield]:AssignmentExpression[+In, ?Yield] ...AssignmentExpression[+In, ?Yield] ArgumentList[?Yield],AssignmentExpression[+In, ?Yield] ArgumentList[?Yield],...AssignmentExpression[+In, ?Yield] LeftHandSideExpression[Yield]:NewExpression[?Yield] CallExpression[?Yield] PostfixExpression[Yield]:LeftHandSideExpression[?Yield] LeftHandSideExpression[?Yield][no LineTerminator here]++ LeftHandSideExpression[?Yield][no LineTerminator here]-- UnaryExpression[Yield]:PostfixExpression[?Yield] deleteUnaryExpression[?Yield] voidUnaryExpression[?Yield] typeofUnaryExpression[?Yield] ++UnaryExpression[?Yield] --UnaryExpression[?Yield] +UnaryExpression[?Yield] -UnaryExpression[?Yield] ~UnaryExpression[?Yield] !UnaryExpression[?Yield] MultiplicativeExpression[Yield]:UnaryExpression[?Yield] MultiplicativeExpression[?Yield]MultiplicativeOperatorUnaryExpression[?Yield] MultiplicativeOperator:one of*/% AdditiveExpression[Yield]:MultiplicativeExpression[?Yield] AdditiveExpression[?Yield]+MultiplicativeExpression[?Yield] AdditiveExpression[?Yield]-MultiplicativeExpression[?Yield] ShiftExpression[Yield]:AdditiveExpression[?Yield] ShiftExpression[?Yield]<<AdditiveExpression[?Yield] ShiftExpression[?Yield]>>AdditiveExpression[?Yield] ShiftExpression[?Yield]>>>AdditiveExpression[?Yield] RelationalExpression[In, Yield]:ShiftExpression[?Yield] RelationalExpression[?In, ?Yield]<ShiftExpression[?Yield] RelationalExpression[?In, ?Yield]>ShiftExpression[?Yield] RelationalExpression[?In, ?Yield]<=ShiftExpression[?Yield] RelationalExpression[?In, ?Yield]>=ShiftExpression[?Yield] RelationalExpression[?In, ?Yield]instanceofShiftExpression[?Yield] [+In]RelationalExpression[+In, ?Yield]inShiftExpression[?Yield] EqualityExpression[In, Yield]:RelationalExpression[?In, ?Yield] EqualityExpression[?In, ?Yield]==RelationalExpression[?In, ?Yield] EqualityExpression[?In, ?Yield]!=RelationalExpression[?In, ?Yield] EqualityExpression[?In, ?Yield]===RelationalExpression[?In, ?Yield] EqualityExpression[?In, ?Yield]!==RelationalExpression[?In, ?Yield] BitwiseANDExpression[In, Yield]:EqualityExpression[?In, ?Yield] BitwiseANDExpression[?In, ?Yield]&EqualityExpression[?In, ?Yield] BitwiseXORExpression[In, Yield]:BitwiseANDExpression[?In, ?Yield] BitwiseXORExpression[?In, ?Yield]^BitwiseANDExpression[?In, ?Yield] BitwiseORExpression[In, Yield]:BitwiseXORExpression[?In, ?Yield] BitwiseORExpression[?In, ?Yield]|BitwiseXORExpression[?In, ?Yield] LogicalANDExpression[In, Yield]:BitwiseORExpression[?In, ?Yield] LogicalANDExpression[?In, ?Yield]&&BitwiseORExpression[?In, ?Yield] LogicalORExpression[In, Yield]:LogicalANDExpression[?In, ?Yield] LogicalORExpression[?In, ?Yield]||LogicalANDExpression[?In, ?Yield] ConditionalExpression[In, Yield]:LogicalORExpression[?In, ?Yield] LogicalORExpression[?In, ?Yield]?AssignmentExpression[+In, ?Yield]:AssignmentExpression[?In, ?Yield] AssignmentExpression[In, Yield]:ConditionalExpression[?In, ?Yield] [+Yield]YieldExpression[?In] ArrowFunction[?In, ?Yield] LeftHandSideExpression[?Yield]=AssignmentExpression[?In, ?Yield] LeftHandSideExpression[?Yield]AssignmentOperatorAssignmentExpression[?In, ?Yield] AssignmentOperator:one of*=/=%=+=-=<<=>>=>>>=&=^=|= Expression[In, Yield]:AssignmentExpression[?In, ?Yield] Expression[?In, ?Yield],AssignmentExpression[?In, ?Yield] Statement[Yield, Return]:BlockStatement[?Yield, ?Return] VariableStatement[?Yield] EmptyStatement ExpressionStatement[?Yield] IfStatement[?Yield, ?Return] BreakableStatement[?Yield, ?Return] ContinueStatement[?Yield] BreakStatement[?Yield] [+Return]ReturnStatement[?Yield] WithStatement[?Yield, ?Return] LabelledStatement[?Yield, ?Return] ThrowStatement[?Yield] TryStatement[?Yield, ?Return] DebuggerStatement Declaration[Yield]:HoistableDeclaration[?Yield] ClassDeclaration[?Yield] LexicalDeclaration[+In, ?Yield] HoistableDeclaration[Yield, Default]:FunctionDeclaration[?Yield, ?Default] GeneratorDeclaration[?Yield, ?Default] BreakableStatement[Yield, Return]:IterationStatement[?Yield, ?Return] SwitchStatement[?Yield, ?Return] BlockStatement[Yield, Return]:Block[?Yield, ?Return] Block[Yield, Return]:{StatementList[?Yield, ?Return]opt} StatementList[Yield, Return]:StatementListItem[?Yield, ?Return] StatementList[?Yield, ?Return]StatementListItem[?Yield, ?Return] StatementListItem[Yield, Return]:Statement[?Yield, ?Return] Declaration[?Yield] LexicalDeclaration[In, Yield]:LetOrConstBindingList[?In, ?Yield]; LetOrConst:let const BindingList[In, Yield]:LexicalBinding[?In, ?Yield] BindingList[?In, ?Yield],LexicalBinding[?In, ?Yield] LexicalBinding[In, Yield]:BindingIdentifier[?Yield]Initializer[?In, ?Yield]opt BindingPattern[?Yield]Initializer[?In, ?Yield] VariableStatement[Yield]:varVariableDeclarationList[+In, ?Yield]; VariableDeclarationList[In, Yield]:VariableDeclaration[?In, ?Yield] VariableDeclarationList[?In, ?Yield],VariableDeclaration[?In, ?Yield] VariableDeclaration[In, Yield]:BindingIdentifier[?Yield]Initializer[?In, ?Yield]opt BindingPattern[?Yield]Initializer[?In, ?Yield] BindingPattern[Yield]:ObjectBindingPattern[?Yield] ArrayBindingPattern[?Yield] ObjectBindingPattern[Yield]:{} {BindingPropertyList[?Yield]} {BindingPropertyList[?Yield],} ArrayBindingPattern[Yield]:[ElisionoptBindingRestElement[?Yield]opt] [BindingElementList[?Yield]] [BindingElementList[?Yield],ElisionoptBindingRestElement[?Yield]opt] BindingPropertyList[Yield]:BindingProperty[?Yield] BindingPropertyList[?Yield],BindingProperty[?Yield] BindingElementList[Yield]:BindingElisionElement[?Yield] BindingElementList[?Yield],BindingElisionElement[?Yield] BindingElisionElement[Yield]:ElisionoptBindingElement[?Yield] BindingProperty[Yield]:SingleNameBinding[?Yield] PropertyName[?Yield]:BindingElement[?Yield] BindingElement[Yield]:SingleNameBinding[?Yield] BindingPattern[?Yield]Initializer[+In, ?Yield]opt SingleNameBinding[Yield]:BindingIdentifier[?Yield]Initializer[+In, ?Yield]opt BindingRestElement[Yield]:...BindingIdentifier[?Yield] EmptyStatement:; ExpressionStatement[Yield]:[lookahead ∉ { {, function, class, let [ }]Expression[+In, ?Yield]; IfStatement[Yield, Return]:if(Expression[+In, ?Yield])Statement[?Yield, ?Return]elseStatement[?Yield, ?Return] if(Expression[+In, ?Yield])Statement[?Yield, ?Return] IterationStatement[Yield, Return]:doStatement[?Yield, ?Return]while(Expression[+In, ?Yield]); while(Expression[+In, ?Yield])Statement[?Yield, ?Return] for([lookahead ∉ { let [ }]Expression[?Yield]opt;Expression[+In, ?Yield]opt;Expression[+In, ?Yield]opt)Statement[?Yield, ?Return] for(varVariableDeclarationList[?Yield];Expression[+In, ?Yield]opt;Expression[+In, ?Yield]opt)Statement[?Yield, ?Return] for(LexicalDeclaration[?Yield]Expression[+In, ?Yield]opt;Expression[+In, ?Yield]opt)Statement[?Yield, ?Return] for([lookahead ∉ { let [ }]LeftHandSideExpression[?Yield]inExpression[+In, ?Yield])Statement[?Yield, ?Return] for(varForBinding[?Yield]inExpression[+In, ?Yield])Statement[?Yield, ?Return] for(ForDeclaration[?Yield]inExpression[+In, ?Yield])Statement[?Yield, ?Return] for([lookahead ≠ let]LeftHandSideExpression[?Yield]ofAssignmentExpression[+In, ?Yield])Statement[?Yield, ?Return] for(varForBinding[?Yield]ofAssignmentExpression[+In, ?Yield])Statement[?Yield, ?Return] for(ForDeclaration[?Yield]ofAssignmentExpression[+In, ?Yield])Statement[?Yield, ?Return] ForDeclaration[Yield]:LetOrConstForBinding[?Yield] ForBinding[Yield]:BindingIdentifier[?Yield] BindingPattern[?Yield] ContinueStatement[Yield]:continue; continue[no LineTerminator here]LabelIdentifier[?Yield]; BreakStatement[Yield]:break; break[no LineTerminator here]LabelIdentifier[?Yield]; ReturnStatement[Yield]:return; return[no LineTerminator here]Expression[+In, ?Yield]; WithStatement[Yield, Return]:with(Expression[+In, ?Yield])Statement[?Yield, ?Return] SwitchStatement[Yield, Return]:switch(Expression[+In, ?Yield])CaseBlock[?Yield, ?Return] CaseBlock[Yield, Return]:{CaseClauses[?Yield, ?Return]opt} {CaseClauses[?Yield, ?Return]optDefaultClause[?Yield, ?Return]CaseClauses[?Yield, ?Return]opt} CaseClauses[Yield, Return]:CaseClause[?Yield, ?Return] CaseClauses[?Yield, ?Return]CaseClause[?Yield, ?Return] CaseClause[Yield, Return]:caseExpression[+In, ?Yield]:StatementList[?Yield, ?Return]opt DefaultClause[Yield, Return]:default:StatementList[?Yield, ?Return]opt LabelledStatement[Yield, Return]:LabelIdentifier[?Yield]:LabelledItem[?Yield, ?Return] LabelledItem[Yield, Return]:Statement[?Yield, ?Return] FunctionDeclaration[?Yield] ThrowStatement[Yield]:throw[no LineTerminator here]Expression[+In, ?Yield]; TryStatement[Yield, Return]:tryBlock[?Yield, ?Return]Catch[?Yield, ?Return] tryBlock[?Yield, ?Return]Finally[?Yield, ?Return] tryBlock[?Yield, ?Return]Catch[?Yield, ?Return]Finally[?Yield, ?Return] Catch[Yield, Return]:catch(CatchParameter[?Yield])Block[?Yield, ?Return] Finally[Yield, Return]:finallyBlock[?Yield, ?Return] CatchParameter[Yield]:BindingIdentifier[?Yield] BindingPattern[?Yield] DebuggerStatement:debugger; FunctionDeclaration[Yield, Default]:functionBindingIdentifier[?Yield](FormalParameters){FunctionBody} [+Default]function(FormalParameters){FunctionBody} FunctionExpression:functionBindingIdentifieropt(FormalParameters){FunctionBody} StrictFormalParameters[Yield]:FormalParameters[?Yield] FormalParameters[Yield]:[empty] FormalParameterList[?Yield] FormalParameterList[Yield]:FunctionRestParameter[?Yield] FormalsList[?Yield] FormalsList[?Yield],FunctionRestParameter[?Yield] FormalsList[Yield]:FormalParameter[?Yield] FormalsList[?Yield],FormalParameter[?Yield] FunctionRestParameter[Yield]:BindingRestElement[?Yield] FormalParameter[Yield]:BindingElement[?Yield] FunctionBody[Yield]:FunctionStatementList[?Yield] FunctionStatementList[Yield]:StatementList[?Yield, +Return]opt ArrowFunction[In, Yield]:ArrowParameters[?Yield][no LineTerminator here]=>ConciseBody[?In] ArrowParameters[Yield]:BindingIdentifier[?Yield] CoverParenthesizedExpressionAndArrowParameterList[?Yield] ConciseBody[In]:[lookahead ≠ {]AssignmentExpression[?In] {FunctionBody} MethodDefinition[Yield]:PropertyName[?Yield](StrictFormalParameters){FunctionBody} GeneratorMethod[?Yield] getPropertyName[?Yield](){FunctionBody} setPropertyName[?Yield](PropertySetParameterList){FunctionBody} PropertySetParameterList:FormalParameter GeneratorMethod[Yield]:*PropertyName[?Yield](StrictFormalParameters[+Yield]){GeneratorBody} GeneratorDeclaration[Yield, Default]:function*BindingIdentifier[?Yield](FormalParameters[+Yield]){GeneratorBody} [+Default]function*(FormalParameters[+Yield]){GeneratorBody} GeneratorExpression:function*BindingIdentifier[+Yield]opt(FormalParameters[+Yield]){GeneratorBody} GeneratorBody:FunctionBody[+Yield] YieldExpression[In]:yield yield[no LineTerminator here]AssignmentExpression[?In, +Yield] yield[no LineTerminator here]*AssignmentExpression[?In, +Yield] ClassDeclaration[Yield, Default]:classBindingIdentifier[?Yield]ClassTail[?Yield] [+Default]classClassTail[?Yield] ClassExpression[Yield]:classBindingIdentifier[?Yield]optClassTail[?Yield] ClassTail[Yield]:ClassHeritage[?Yield]opt{ClassBody[?Yield]opt} ClassHeritage[Yield]:extendsLeftHandSideExpression[?Yield] ClassBody[Yield]:ClassElementList[?Yield] ClassElementList[Yield]:ClassElement[?Yield] ClassElementList[?Yield]ClassElement[?Yield] ClassElement[Yield]:MethodDefinition[?Yield] staticMethodDefinition[?Yield] ; Script:ScriptBodyopt ScriptBody:StatementList Module:ModuleBodyopt ModuleBody:ModuleItemList ModuleItemList:ModuleItem ModuleItemListModuleItem ModuleItem:ImportDeclaration ExportDeclaration StatementListItem ImportDeclaration:importImportClauseFromClause; importModuleSpecifier; ImportClause:ImportedDefaultBinding NameSpaceImport NamedImports ImportedDefaultBinding,NameSpaceImport ImportedDefaultBinding,NamedImports ImportedDefaultBinding:ImportedBinding NameSpaceImport:*asImportedBinding NamedImports:{} {ImportsList} {ImportsList,} FromClause:fromModuleSpecifier ImportsList:ImportSpecifier ImportsList,ImportSpecifier ImportSpecifier:ImportedBinding IdentifierNameasImportedBinding ModuleSpecifier:StringLiteral ImportedBinding:BindingIdentifier ExportDeclaration:export*FromClause; exportExportClauseFromClause; exportExportClause; exportVariableStatement exportDeclaration exportdefaultHoistableDeclaration[+Default] exportdefaultClassDeclaration[+Default] exportdefault[lookahead ∉ { function, class }]AssignmentExpression[+In]; ExportClause:{} {ExportsList} {ExportsList,} ExportsList:ExportSpecifier ExportsList,ExportSpecifier ExportSpecifier:IdentifierName IdentifierNameasIdentifierName

A Copyright & Software License

Copyright Notice

© 2023 Ecma International

Software License

All Software contained in this document ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the authors nor Ecma International may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.