if-expr-await-expr-func-expression.js (1585B)
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/if-expr.template 5 /*--- 6 description: AwaitExpression StringLiteral (Valid syntax for top level await in an if expression position.) 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 IfStatement[Yield, Await, Return]: 17 if(Expression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]elseStatement[?Yield, ?Await, ?Return] 18 if(Expression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return] 19 20 ... 21 22 UnaryExpression[Yield, Await] 23 [+Await]AwaitExpression[?Yield] 24 25 AwaitExpression[Yield]: 26 await UnaryExpression[?Yield, +Await] 27 28 ... 29 30 31 ExpressionStatement[Yield, Await]: 32 [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] 33 Expression[+In, ?Yield, ?Await]; 34 35 ... 36 37 PrimaryExpression[Yield, Await]: 38 this 39 IdentifierReference[?Yield, ?Await] 40 Literal 41 ArrayLiteral[?Yield, ?Await] 42 ObjectLiteral[?Yield, ?Await] 43 FunctionExpression 44 ClassExpression[?Yield, ?Await] 45 GeneratorExpression 46 AsyncFunctionExpression 47 AsyncGeneratorExpression 48 RegularExpressionLiteral 49 TemplateLiteral[?Yield, ?Await, ~Tagged] 50 CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await] 51 52 ---*/ 53 54 55 if (await function() {}) {} 56 57 reportCompare(0, 0);