tor-browser

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

early-errors-arrow-formals-lineterminator.js (903B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2017 Mozilla Corporation. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: prod-AsyncArrowHead
      7 description: async arrows cannot have a line terminator between "async" and the formals
      8 info: |
      9  14.7 Async Arrow Function Definitions
     10 
     11  AsyncArrowFunction:
     12    [...]
     13    CoverCallExpressionAndAsyncArrowHead [no LineTerminator here] => AsyncConciseBody
     14 
     15  Supplemental Syntax
     16 
     17  When processing an instance of the production
     18 
     19  AsyncArrowFunction:
     20    CoverCallExpressionAndAsyncArrowHead [no LineTerminator here] => AsyncConciseBody
     21 
     22  the interpretation of CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
     23 
     24  AsyncArrowHead:
     25    async [no LineTerminator here] ArrowFormalParameters
     26 negative:
     27  phase: parse
     28  type: SyntaxError
     29 ---*/
     30 
     31 $DONOTEVALUATE();
     32 
     33 async
     34 (foo) => { }