Last active
October 7, 2023 23:09
-
-
Save jorendorff/6e144a1649c555310d2f9a2c21a23ce7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Script : | |
StatementList? | |
Module : | |
StatementList? | |
StatementList : | |
Statement | |
StatementList Statement | |
Statement : | |
Block | |
ExpressionStatement | |
EmptyStatement | |
CompoundStatementKeyword Arguments | |
`else` | |
`do` | |
`for` AwaitKeyword? `(` ForHead `)` | |
`case` Expression[+In] `:` | |
`default` `:` | |
`continue` `;` | |
`continue` Identifier `;` | |
`break` `;` | |
`break` Identifier `;` | |
`return` `;` | |
`return` Expression[+In] `;` | |
Identifier `:` Statement | |
`throw` Expression[+In] `;` | |
`try` | |
`catch` Arguments | |
`catch` Block | |
`finally` | |
`debugger` `;` | |
Declaration | |
`import` ImportClause FromClause? `;` | |
`export` `*` FromClause `;` | |
`export` ExportClause FromClause? `;` | |
`export` Declaration | |
`export` `default` Statement | |
CompoundStatementKeyword :: | |
`if` | |
`while` | |
`switch` | |
`with` | |
ForHead : | |
[lookahead <! {`let`, `async`}] Expression[~In]? `;` Expression[+In]? `;` Expression[+In]? | |
LocalDeclaration[~In] `;` Expression[+In]? `;` Expression[+In]? | |
[lookahead <! {`let`, `async`} ] PostfixExpression InOrOf Expression[+In] | |
VarLetOrConst PrimaryExpression InOrOf Expression[+In] | |
InOrOf :: | |
`in` | |
`of` | |
Declaration : | |
LocalDeclaration[+In] `;` | |
FunctionDeclaration | |
ClassDeclaration | |
AwaitKeyword : | |
`await` | |
AsyncKeyword : | |
`async` | |
Sparkle : | |
`*` | |
Block : | |
`{` StatementList? `}` | |
EmptyStatement : | |
`;` | |
ExpressionStatement : | |
[lookahead <! {`{`, `function`, `async`, `class`, `let`}] Expression[+In] `;` | |
LocalDeclaration[In] : | |
VarLetOrConst BindingList[?In] | |
VarLetOrConst : | |
`var` | |
`let` | |
`const` | |
BindingList[In] : | |
Binding[?In] | |
BindingList[?In] `,` Binding[?In] | |
Binding[In] : | |
PrimaryExpression | |
PrimaryExpression `=` AssignmentExpression[?In] | |
FunctionDeclaration : | |
`function` Sparkle? Identifier Arguments Block | |
`async` `function` Sparkle? Identifier Arguments Block | |
FunctionExpression : | |
`function` Sparkle? Identifier? Arguments Block | |
`async` `function` Sparkle? Identifier? Arguments Block | |
ClassDeclaration : | |
`class` Identifier ClassHeritage? `{` ClassElementList? `}` | |
ClassExpression : | |
`class` Identifier? ClassHeritage? `{` ClassElementList? `}` | |
ClassHeritage : | |
`extends` PostfixExpression | |
Expression[In] : | |
AssignmentExpression[?In] | |
Expression[?In] `,` AssignmentExpression[?In] | |
AssignmentExpression[In] : | |
ConditionalExpression[?In] | |
`yield` | |
`yield` AssignmentExpression[?In] | |
`yield` `*` AssignmentExpression[?In] | |
PostfixExpression `=>` ConciseBody[?In] | |
`async` Identifier `=>` ConciseBody[?In] | |
PostfixExpression AssignmentOperator AssignmentExpression[?In] | |
ConciseBody[In] : | |
[lookahead != `{`] AssignmentExpression[?In] | |
Block | |
AssignmentOperator : | |
`=` | |
CompoundAssignmentOperator | |
CompoundAssignmentOperator :: | |
`*=` | |
`/=` | |
`%=` | |
`+=` | |
`-=` | |
`<<=` | |
`>>=` | |
`>>>=` | |
`&=` | |
`^=` | |
`|=` | |
`**=` | |
ConditionalExpression[In] : | |
BinaryExpression[?In] | |
BinaryExpression[?In] `?` AssignmentExpression[+In] `:` AssignmentExpression[?In] | |
BinaryExpression[In] : | |
UnaryExpression | |
BinaryExpression[?In] BinaryOperator[?In] UnaryExpression | |
BinaryOperator[In] : | |
DedicatedBinaryOperator | |
[+In] `in` | |
`+` | |
`-` | |
`*` | |
DedicatedBinaryOperator :: | |
`||` | |
`&&` | |
`|` | |
`^` | |
`&` | |
`==` | |
`!=` | |
`===` | |
`!==` | |
`<` | |
`>` | |
`<=` | |
`>=` | |
`instanceof` | |
`<<` | |
`>>` | |
`>>>` | |
`/` | |
`%` | |
`**` | |
UnaryExpression : | |
PostfixExpression | |
UnaryOperator UnaryExpression | |
UnaryOperator : | |
DedicatedUnaryOperator | |
`+` | |
`-` | |
`await` | |
`++` | |
`--` | |
`new` | |
`...` | |
DedicatedUnaryOperator :: | |
`delete` | |
`void` | |
`typeof` | |
`~` | |
`!` | |
Arguments : | |
`(` Expression[+In] `)` | |
PostfixExpression : | |
PrimaryExpression | |
PostfixExpression `++` | |
PostfixExpression `--` | |
PostfixExpression Arguments | |
PostfixExpression `[` Expression[+In] `]` | |
PostfixExpression `.` IdentifierName | |
PostfixExpression TemplateLiteral | |
`new` `.` `target` | |
PrimaryExpression : | |
DedicatedPrimaryExpressionToken | |
Identifier | |
Arguments | |
`[` Expression[+In] `]` | |
`{` `}` | |
`{` PropertyDefinitionList `}` | |
`{` PropertyDefinitionList `,` `}` | |
FunctionExpression | |
ClassExpression | |
DedicatedPrimaryExpressionToken :: | |
`null` | |
`true` | |
`false` | |
NumericLiteral | |
StringLiteral | |
RegularExpressionLiteral | |
TemplateLiteral | |
`this` | |
`super` | |
TemplateLiteral : | |
NoSubstitutionTemplate | |
TemplateHead Expression[+In] TemplateMiddleList? TemplateTail | |
TemplateMiddleList : | |
TemplateMiddle Expression[+In] | |
TemplateMiddleList TemplateMiddle Expression[+In] | |
PropertyDefinitionList : | |
PropertyDefinition | |
PropertyDefinitionList `,` PropertyDefinition | |
PropertyDefinition : | |
PropertyName | |
PropertyName `=` AssignmentExpression[+In] | |
PropertyName `:` AssignmentExpression[+In] | |
MethodDefinition | |
`...` AssignmentExpression[+In] | |
PropertyName : | |
`[` AssignmentExpression[+In] `]` | |
IdentifierName | |
StringLiteral | |
NumericLiteral | |
MethodDefinition : | |
MethodPrefix? PropertyName Arguments Block | |
MethodPrefix : | |
`get` | |
`set` | |
`async` | |
`async` `*` | |
`*` | |
ClassElementList : | |
ClassElement | |
ClassElementList ClassElement | |
ClassElement : | |
MethodDefinition | |
`static` MethodDefinition | |
`;` | |
ImportClause : | |
Identifier | |
ImportExportSet | |
`*` `as` Identifier | |
Identifier `,` ImportExportSet | |
ImportExportSet : | |
`{` `}` | |
`{` ImportExportList `}` | |
`{` ImportExportList `,` `}` | |
ImportExportList : | |
IdentifierName | |
ImportExportList `,` IdentifierName | |
ImportExportList `as` IdentifierName | |
ExportClause : | |
ImportExportSet | |
FromClause : | |
`from` StringLiteral | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment