tor-browser

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

rest-params-trailing-comma-early-error.js (1395B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/function-forms/rest-params-trailing-comma-early-error.case
      4 // - src/function-forms/syntax/async-arrow-function.template
      5 /*---
      6 description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async arrow function expression)
      7 esid: sec-async-arrow-function-definitions
      8 flags: [generated]
      9 negative:
     10  phase: parse
     11  type: SyntaxError
     12 info: |
     13    14.7 Async Arrow Function Definitions
     14 
     15    AsyncArrowFunction :
     16      ...
     17      CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
     18 
     19    AsyncConciseBody :
     20      { AsyncFunctionBody }
     21 
     22    ...
     23 
     24    Supplemental Syntax
     25 
     26    When processing an instance of the production AsyncArrowFunction :
     27    CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
     28    CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
     29 
     30    AsyncArrowHead :
     31      async ArrowFormalParameters
     32 
     33    Trailing comma in the parameters list
     34 
     35    14.1 Function Definitions
     36 
     37    FormalParameters[Yield, Await] :
     38        [empty]
     39        FunctionRestParameter[?Yield, ?Await]
     40        FormalParameterList[?Yield, ?Await]
     41        FormalParameterList[?Yield, ?Await] ,
     42        FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
     43 ---*/
     44 $DONOTEVALUATE();
     45 
     46 
     47 (async (...a,) => {
     48  
     49 });