eval-block-arrow-function-functionbody.js (1274B)
1 // This file was procedurally generated from the following sources: 2 // - src/statementList/arrow-function-functionbody.case 3 // - src/statementList/default/eval-block.template 4 /*--- 5 description: Arrow Function with a Function Body (Eval production of StatementList starting with a BlockStatement) 6 esid: prod-StatementList 7 features: [arrow-function] 8 flags: [generated] 9 info: | 10 StatementList: 11 StatementListItem 12 StatementList StatementListItem 13 14 StatementListItem: 15 Statement 16 Declaration 17 18 Statement: 19 BlockStatement 20 21 BlockStatement: 22 Block 23 24 Block: 25 { StatementList_opt } 26 27 Statement: 28 BlockStatement 29 VariableStatement 30 EmptyStatement 31 ExpressionStatement 32 ... 33 34 ExpressionStatement: 35 [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] 36 Expression ; 37 38 ... 39 40 AssignmentExpression: 41 ConditionalExpression 42 [+Yield]YieldExpression 43 ArrowFunction 44 45 ArrowFunction: 46 ArrowParameters [no LineTerminator here] => ConciseBody 47 48 ConciseBody: 49 [lookahead ≠ {] AssignmentExpression 50 { FunctionBody } 51 52 ---*/ 53 54 55 var result = eval('{}() => { return 42; };'); 56 57 assert.sameValue(result(), 42); 58 59 reportCompare(0, 0);