tor-browser

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

u-invalid-non-empty-class-ranges.js (1020B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2016 the V8 project authors. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 esid: sec-pattern-semantics
      6 es6id: 21.2.2
      7 description: >
      8    NonEmptyClassRangesNoDash production cannot specify a multi-character set
      9 info: |
     10    The production
     11    NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates
     12    as follows:
     13 
     14    1. Evaluate ClassAtomNoDash to obtain a CharSet A.
     15    2. Evaluate ClassAtom to obtain a CharSet B.
     16    3. Evaluate ClassRanges to obtain a CharSet C.
     17    4. Call CharacterRange(A, B) and let D be the resulting CharSet.
     18 
     19    21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation
     20 
     21    1. If A does not contain exactly one character or B does not contain
     22       exactly one character, throw a SyntaxError exception.
     23 
     24    The `u` flag precludes the Annex B extension that enables this pattern.
     25 negative:
     26  phase: parse
     27  type: SyntaxError
     28 ---*/
     29 
     30 $DONOTEVALUATE();
     31 
     32 /[--\d]/u;