Debian Codegraph @

js/src/tests/test262/language/module-code/top-level-await/syntax/for-await-await-expr-identifier.js

raw
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/for-await-expr.template
5 /*---
6 description: AwaitExpression IdentifierReference (Valid syntax for top level await in for await statements.)
7 esid: prod-AwaitExpression
8 features: [top-level-await, async-iteration]
9 flags: [generated, module]
10 info: |
11 ModuleItem:
12 StatementListItem[~Yield, +Await, ~Return]
13
14 ...
15
16 IterationStatement[Yield, Await, Return]:
17 [+Await]for await ( [lookahead ≠ let] LeftHandSideExpression[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return]
18 [+Await]for await ( var ForBinding[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return]
19 [+Await]for await ( ForDeclaration[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?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 PrimaryExpression[Yield, Await]:
33 this
34 IdentifierReference[?Yield, ?Await]
35 Literal
36 ArrayLiteral[?Yield, ?Await]
37 ObjectLiteral[?Yield, ?Await]
38 FunctionExpression
39 ClassExpression[?Yield, ?Await]
40 GeneratorExpression
41 AsyncFunctionExpression
42 AsyncGeneratorExpression
43 RegularExpressionLiteral
44 TemplateLiteral[?Yield, ?Await, ~Tagged]
45 CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await]
46
47 ---*/
48 var foo = 1;
49
50
51 var binding;
52
53 // [+Await]for await ( [lookahead ≠ let] LeftHandSideExpression[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return]
54 for await (binding of [await foo]) {
55 await foo;
56 break;
57 }
58
59 // [+Await]for await ( var ForBinding[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return]
60 for await (var binding of [await foo]) {
61 await foo;
62 break;
63 }
64
65 // [+Await]for await ( ForDeclaration[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return]
66 for await (let binding of [await foo]) {
67 await foo;
68 break;
69 }
70
71 reportCompare(0, 0);