| 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/try.template |
| 5 |
/*--- |
| 6 |
description: AwaitExpression StringLiteral (Valid syntax for top level await in try-catch-finally blocks.) |
| 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 |
TryStatement[Yield, Await, Return]: |
| 17 |
try Block[?Yield, ?Await, ?Return] Catch[?Yield, ?Await, ?Return] |
| 18 |
try Block[?Yield, ?Await, ?Return] Finally[?Yield, ?Await, ?Return] |
| 19 |
try Block[?Yield, ?Await, ?Return] Catch[?Yield, ?Await, ?Return] Finally[?Yield, ?Await, ?Return] |
| 20 |
|
| 21 |
... |
| 22 |
|
| 23 |
UnaryExpression[Yield, Await] |
| 24 |
[+Await]AwaitExpression[?Yield] |
| 25 |
|
| 26 |
AwaitExpression[Yield]: |
| 27 |
await UnaryExpression[?Yield, +Await] |
| 28 |
|
| 29 |
... |
| 30 |
|
| 31 |
|
| 32 |
ExpressionStatement[Yield, Await]: |
| 33 |
[lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] |
| 34 |
Expression[+In, ?Yield, ?Await]; |
| 35 |
|
| 36 |
... |
| 37 |
|
| 38 |
PrimaryExpression[Yield, Await]: |
| 39 |
this |
| 40 |
IdentifierReference[?Yield, ?Await] |
| 41 |
Literal |
| 42 |
ArrayLiteral[?Yield, ?Await] |
| 43 |
ObjectLiteral[?Yield, ?Await] |
| 44 |
FunctionExpression |
| 45 |
ClassExpression[?Yield, ?Await] |
| 46 |
GeneratorExpression |
| 47 |
AsyncFunctionExpression |
| 48 |
AsyncGeneratorExpression |
| 49 |
RegularExpressionLiteral |
| 50 |
TemplateLiteral[?Yield, ?Await, ~Tagged] |
| 51 |
CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await] |
| 52 |
|
| 53 |
---*/ |
| 54 |
|
| 55 |
|
| 56 |
try { |
| 57 |
await function() {}; |
| 58 |
} catch(e) { |
| 59 |
await function() {}; |
| 60 |
} |
| 61 |
|
| 62 |
try { |
| 63 |
await function() {}; |
| 64 |
} finally { |
| 65 |
await function() {}; |
| 66 |
} |
| 67 |
|
| 68 |
try { |
| 69 |
await function() {}; |
| 70 |
} catch(e) { |
| 71 |
await function() {}; |
| 72 |
} finally { |
| 73 |
await function() {}; |
| 74 |
} |
| 75 |
|
| 76 |
reportCompare(0, 0); |