tor-browser

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

eval-class-expr-arrow-function-boolean-literal.js (1323B)


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