u-invalid-non-empty-class-ranges-no-dash-b.js (1040B)
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 ("B" parameter) 10 info: | 11 The production 12 NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates 13 as follows: 14 15 1. Evaluate ClassAtomNoDash to obtain a CharSet A. 16 2. Evaluate ClassAtom to obtain a CharSet B. 17 3. Evaluate ClassRanges to obtain a CharSet C. 18 4. Call CharacterRange(A, B) and let D be the resulting CharSet. 19 20 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation 21 22 1. If A does not contain exactly one character or B does not contain 23 exactly one character, throw a SyntaxError exception. 24 25 The `u` flag precludes the Annex B extension that enables this pattern. 26 negative: 27 phase: parse 28 type: SyntaxError 29 ---*/ 30 31 $DONOTEVALUATE(); 32 33 /[%-\d]/u;