| 1 |
// |reftest| module |
| 2 |
// This file was procedurally generated from the following sources: |
| 3 |
// - src/top-level-await/await-expr-func-expression.case |
| 4 |
// - src/top-level-await/syntax/for-expr.template |
| 5 |
/*--- |
| 6 |
description: AwaitExpression StringLiteral (Valid syntax for top level await in for statements.) |
| 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 |
IterationStatement[Yield, Await, Return]: |
| 17 |
... |
| 18 |
for ( [ lookahead ≠ let [] Expression[~In, ?Yield, ?Await]opt ; Expression[+In, ?Yield, ?Await]opt ; Expression[+In, ?Yield, ?Await]opt ) Statement[?Yield, ?Await, ?Return] |
| 19 |
for ( var VariableDeclarationList[~In, ?Yield, ?Await] ; Expression[+In, ?Yield, ?Await]opt ; Expression[+In, ?Yield, ?Await]opt ) Statement[?Yield, ?Await, ?Return] |
| 20 |
for ( LexicalDeclaration[~In, ?Yield, ?Await] Expression[+In, ?Yield, ?Await]opt ; Expression[+In, ?Yield, ?Await]opt ) Statement[?Yield, ?Await, ?Return] |
| 21 |
for ( [lookahead ≠ let [] LeftHandSideExpression[?Yield, ?Await] in Expression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] |
| 22 |
for ( var ForBinding[?Yield, ?Await] in Expression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] |
| 23 |
for ( ForDeclaration[?Yield, ?Await] in Expression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] |
| 24 |
for ( [lookahead ≠ let] LeftHandSideExpression[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] |
| 25 |
for ( var ForBinding[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] |
| 26 |
for ( ForDeclaration[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] |
| 27 |
... |
| 28 |
|
| 29 |
... |
| 30 |
|
| 31 |
UnaryExpression[Yield, Await] |
| 32 |
[+Await]AwaitExpression[?Yield] |
| 33 |
|
| 34 |
AwaitExpression[Yield]: |
| 35 |
await UnaryExpression[?Yield, +Await] |
| 36 |
|
| 37 |
... |
| 38 |
|
| 39 |
|
| 40 |
ExpressionStatement[Yield, Await]: |
| 41 |
[lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] |
| 42 |
Expression[+In, ?Yield, ?Await]; |
| 43 |
|
| 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 |
|
| 63 |
|
| 64 |
// for ( [ lookahead ≠ let [] Expression[~In, ?Yield, ?Await]opt ; Expression[+In, ?Yield, ?Await]opt ; Expression[+In, ?Yield, ?Await]opt ) Statement[?Yield, ?Await, ?Return] |
| 65 |
for ( await function() {} ; await function() {}; await function() {} ) { |
| 66 |
await function() {}; |
| 67 |
break; |
| 68 |
} |
| 69 |
|
| 70 |
// for ( var VariableDeclarationList[~In, ?Yield, ?Await] ; Expression[+In, ?Yield, ?Await]opt ; Expression[+In, ?Yield, ?Await]opt ) Statement[?Yield, ?Await, ?Return] |
| 71 |
for ( var binding; await function() {}; await function() {} ) { |
| 72 |
await function() {}; |
| 73 |
break; |
| 74 |
} |
| 75 |
|
| 76 |
// for ( LexicalDeclaration[~In, ?Yield, ?Await] Expression[+In, ?Yield, ?Await]opt ; Expression[+In, ?Yield, ?Await]opt ) Statement[?Yield, ?Await, ?Return] |
| 77 |
for ( let binding; await function() {}; await function() {} ) { |
| 78 |
await function() {}; |
| 79 |
break; |
| 80 |
} |
| 81 |
|
| 82 |
reportCompare(0, 0); |