tor-browser

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

unicode-escape-no-hex-err.js (1059B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2020 Alexey Shvayka. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: prod-Template
      7 description: >
      8  \u is at the end of string, Hex4Digits is required.
      9 info: |
     10  Template ::
     11    NoSubstitutionTemplate
     12    TemplateHead
     13 
     14  NoSubstitutionTemplate ::
     15    ` TemplateCharacters_opt `
     16 
     17  TemplateCharacters ::
     18    TemplateCharacter TemplateCharacters_opt
     19 
     20  TemplateCharacter ::
     21    $ [lookahead ≠ {]
     22    \ EscapeSequence
     23    \ NotEscapeSequence
     24    LineContinuation
     25    LineTerminatorSequence
     26    SourceCharacter but not one of ` or \ or $ or LineTerminator
     27 
     28  EscapeSequence ::
     29    CharacterEscapeSequence
     30    0 [lookahead ∉ DecimalDigit]
     31    HexEscapeSequence
     32    UnicodeEscapeSequence
     33 
     34  UnicodeEscapeSequence ::
     35    u Hex4Digits
     36    u{ CodePoint }
     37 
     38  Hex4Digits ::
     39    HexDigit HexDigit HexDigit HexDigit
     40 
     41  HexDigit :: one of
     42    0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
     43 
     44 negative:
     45  phase: parse
     46  type: SyntaxError
     47 ---*/
     48 
     49 $DONOTEVALUATE();
     50 
     51 `\u`