tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

eval-block-expr-arrow-function-boolean-literal.js (1364B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/statementList/expr-arrow-function-boolean-literal.case
      3 // - src/statementList/default/eval-block.template
      4 /*---
      5 description: Expression with an Arrow Function and Boolean literal (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    Expression:
     39      AssignmentExpression
     40      Expression , AssignmentExpression
     41 
     42    AssignmentExpression:
     43      ConditionalExpression
     44      [+Yield]YieldExpression
     45      ArrowFunction
     46 
     47    ArrowFunction:
     48      ArrowParameters [no LineTerminator here] => ConciseBody
     49 
     50    ConciseBody:
     51      [lookahead ≠ {] AssignmentExpression
     52      { FunctionBody }
     53 
     54 ---*/
     55 
     56 
     57 var result = eval('{}() => 1, 42;');
     58 
     59 assert.sameValue(result, 42);
     60 
     61 reportCompare(0, 0);