tests/auto/qml/ecmascripttests/test262/test/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.js
raw symbols SCIP| 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 | ("A" parameter) |
| 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 | throw "Test262: This statement should not be evaluated."; |
| 31 | |
| 32 | /[\d-a]/u; |