Debian Codegraph @

js/src/tests/test262/language/literals/string/unicode-escape-no-hex-err-double.js

raw
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-StringLiteral
7 description: >
8 \u is at the end of string, Hex4Digits is required.
9 info: |
10 StringLiteral ::
11 " DoubleStringCharacters_opt "
12 ' SingleStringCharacters_opt '
13
14 DoubleStringCharacters ::
15 DoubleStringCharacter DoubleStringCharacters_opt
16
17 DoubleStringCharacter ::
18 SourceCharacter but not one of " or \ or LineTerminator
19 <LS>
20 <PS>
21 \ EscapeSequence
22 LineContinuation
23
24 EscapeSequence ::
25 CharacterEscapeSequence
26 0 [lookahead ∉ DecimalDigit]
27 HexEscapeSequence
28 UnicodeEscapeSequence
29
30 UnicodeEscapeSequence ::
31 u Hex4Digits
32 u{ CodePoint }
33
34 Hex4Digits ::
35 HexDigit HexDigit HexDigit HexDigit
36
37 HexDigit :: one of
38 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
39
40 negative:
41 phase: parse
42 type: SyntaxError
43 ---*/
44
45 $DONOTEVALUATE();
46
47 "\u"