Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/literals/regexp/u-invalid-non-empty-class-ranges.js

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