| 1 |
// |reftest| module |
| 2 |
// This file was procedurally generated from the following sources: |
| 3 |
// - src/top-level-await/await-expr-identifier.case |
| 4 |
// - src/top-level-await/syntax/export-var-init.template |
| 5 |
/*--- |
| 6 |
description: AwaitExpression IdentifierReference (Valid syntax for top level await in export var BindingIdentifier Await_initializer) |
| 7 |
esid: prod-AwaitExpression |
| 8 |
features: [top-level-await] |
| 9 |
flags: [generated, module] |
| 10 |
info: | |
| 11 |
ModuleItem: |
| 12 |
StatementListItem[~Yield, +Await, ~Return] |
| 13 |
|
| 14 |
... |
| 15 |
|
| 16 |
UnaryExpression[Yield, Await] |
| 17 |
[+Await]AwaitExpression[?Yield] |
| 18 |
|
| 19 |
AwaitExpression[Yield]: |
| 20 |
await UnaryExpression[?Yield, +Await] |
| 21 |
|
| 22 |
... |
| 23 |
|
| 24 |
ExportDeclaration: |
| 25 |
export * FromClause ; |
| 26 |
export ExportClause FromClause ; |
| 27 |
export ExportClause ; |
| 28 |
export VariableStatement[~Yield, +Await] |
| 29 |
export Declaration[~Yield, +Await] |
| 30 |
export defaultHoistableDeclaration[~Yield, +Await, +Default] |
| 31 |
export defaultClassDeclaration[~Yield, +Await, +Default] |
| 32 |
export default[lookahead ∉ { function, async [no LineTerminator here] function, class }]AssignmentExpression[+In, ~Yield, ~Await]; |
| 33 |
|
| 34 |
VariableStatement[Yield, Await]: |
| 35 |
var VariableDeclarationList[+In, ?Yield, ?Await]; |
| 36 |
|
| 37 |
VariableDeclarationList[In, Yield, Await]: |
| 38 |
VariableDeclaration[?In, ?Yield, ?Await] |
| 39 |
VariableDeclarationList[?In, ?Yield, ?Await] , VariableDeclaration[?In, ?Yield, ?Await] |
| 40 |
|
| 41 |
VariableDeclaration[In, Yield, Await]: |
| 42 |
BindingIdentifier[?Yield, ?Await] Initializer[?In, ?Yield, ?Await]opt |
| 43 |
BindingPattern[?Yield, ?Await] Initializer[?In, ?Yield, ?Await] |
| 44 |
|
| 45 |
|
| 46 |
PrimaryExpression[Yield, Await]: |
| 47 |
this |
| 48 |
IdentifierReference[?Yield, ?Await] |
| 49 |
Literal |
| 50 |
ArrayLiteral[?Yield, ?Await] |
| 51 |
ObjectLiteral[?Yield, ?Await] |
| 52 |
FunctionExpression |
| 53 |
ClassExpression[?Yield, ?Await] |
| 54 |
GeneratorExpression |
| 55 |
AsyncFunctionExpression |
| 56 |
AsyncGeneratorExpression |
| 57 |
RegularExpressionLiteral |
| 58 |
TemplateLiteral[?Yield, ?Await, ~Tagged] |
| 59 |
CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await] |
| 60 |
|
| 61 |
---*/ |
| 62 |
var foo = 1; |
| 63 |
|
| 64 |
|
| 65 |
export var name1 = await foo; |
| 66 |
export var { x = await foo } = {}; |
| 67 |
|
| 68 |
reportCompare(0, 0); |