for-await-await-expr-new-expr.js (2407B)
1 // |reftest| module 2 // This file was procedurally generated from the following sources: 3 // - src/top-level-await/await-expr-new-expr.case 4 // - src/top-level-await/syntax/for-await-expr.template 5 /*--- 6 description: AwaitExpression new MemberExpression (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 LeftHandSideExpression[Yield, Await]: 33 NewExpression[?Yield, ?Await] 34 CallExpression[?Yield, ?Await] 35 36 NewExpression[Yield, Await]: 37 MemberExpression[?Yield, ?Await] 38 new NewExpression[?Yield, ?Await] 39 40 MemberExpression[Yield, Await]: 41 ... 42 new MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await] 43 44 ---*/ 45 46 47 var binding; 48 49 // [+Await]for await ( [lookahead ≠ let] LeftHandSideExpression[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] 50 for await (binding of [await new Promise(function(res, rej) { res(1); })]) { 51 await new Promise(function(res, rej) { res(1); }); 52 break; 53 } 54 55 // [+Await]for await ( var ForBinding[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] 56 for await (var binding of [await new Promise(function(res, rej) { res(1); })]) { 57 await new Promise(function(res, rej) { res(1); }); 58 break; 59 } 60 61 // [+Await]for await ( ForDeclaration[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] 62 for await (let binding of [await new Promise(function(res, rej) { res(1); })]) { 63 await new Promise(function(res, rej) { res(1); }); 64 break; 65 } 66 67 reportCompare(0, 0);