• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024-2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16const s1 = "tes
17t"
18
19'\xA0\x66\x21\xY0'
20
21const badBin = 0bF0011101
22
230x0D00__0000
24
250o251042_
26
27const �n1 = 0
28
29undef\u0xFF00\ned
30
31const c1 = c''
32const c3 = c'
33const c2 = c'��'
34
35const f1 = 1.00000000f1
36
37const f2 = 1.444444d444n
38
39'\u{43G}'
40
414.34e-1b0
42
43199__444440000
44
450x291n
46
47-1000000b
48
49`\251`
50
51const o1 = 0o0008
52
53\U4444
54
55const n2 = 0134
56const n2 = 0999
57const n3 = 0_01
58
59const n4 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
60const n5 = 02n
61
62#
63
64/* @@? 16:16 Error SyntaxError: Newline is not allowed in strings  */
65/* @@? 16:16 Error SyntaxError: Unexpected token 'identification literal'.  */
66/* @@? 16:16 Error SyntaxError: Unexpected token 'string literal'.  */
67/* @@? 17:3 Error SyntaxError: Invalid unicode escape sequence  */
68/* @@? 19:19 Error SyntaxError: Invalid digit  */
69/* @@? 19:19 Error SyntaxError: Invalid numeric literal  */
70/* @@? 19:19 Error SyntaxError: Unexpected token 'identification literal'.  */
71/* @@? 21:26 Error SyntaxError: Invalid numeric separator  */
72/* @@? 23:13 Error SyntaxError: Numeric separators are not allowed at the end of numeric literals  */
73/* @@? 23:13 Error SyntaxError: Invalid numeric literal  */
74/* @@? 23:13 Error SyntaxError: Unexpected token 'identification literal'.  */
75/* @@? 25:10 Error SyntaxError: Expected an identifier  */
76/* @@? 27:14 Error SyntaxError: Invalid unicode escape sequence  */
77/* @@? 27:14 Error SyntaxError: Invalid identifier part  */
78/* @@? 29:18 Error SyntaxError: Invalid character literal  */
79/* @@? 30:1 Error SyntaxError: Unterminated character literal  */
80/* @@? 30:1 Error SyntaxError: Unexpected token 'identification literal'.  */
81/* @@? 30:1 Error SyntaxError: Unsupported character literal  */
82/* @@? 32:14 Error SyntaxError: Invalid numeric literal  */
83/* @@? 34:1 Error SyntaxError: Invalid numeric literal  */
84/* @@? 34:1 Error SyntaxError: Unexpected token 'identification literal'.  */
85/* @@? 36:1 Error SyntaxError: Invalid unicode escape sequence  */
86/* @@? 38:1 Error SyntaxError: Invalid numeric literal  */
87/* @@? 38:1 Error SyntaxError: Unexpected token 'identification literal'.  */
88/* @@? 40:1 Error SyntaxError: Invalid numeric separator  */
89/* @@? 42:1 Error SyntaxError: Invalid BigInt number  */
90/* @@? 44:1 Error SyntaxError: Invalid numeric literal  */
91/* @@? 44:1 Error SyntaxError: Unexpected token 'identification literal'.  */
92/* @@? 46:1 Error SyntaxError: Invalid character escape sequence  */
93/* @@? 46:1 Error SyntaxError: Octal escape sequences are not allowed in template strings  */
94/* @@? 48:1 Error SyntaxError: Invalid octal digit  */
95/* @@? 48:1 Error SyntaxError: Invalid numeric literal  */
96/* @@? 48:1 Error SyntaxError: Unexpected token 'number literal'.  */
97/* @@? 50:1 Error SyntaxError: Invalid character  */
98/* @@? 50:1 Error SyntaxError: Unexpected token 'identification literal'.  */
99/* @@? 52:1 Error SyntaxError: Implicit octal literal not allowed  */
100/* @@? 53:7 Error SyntaxError: NonOctalDecimalIntegerLiteral is not enabled in strict mode code  */
101/* @@? 54:1 Error SyntaxError: Numeric separator '_' is not allowed in numbers that start with '0'.  */
102/* @@? 56:16 Error SyntaxError: Number is too large  */
103/* @@? 56:16 Error SyntaxError: Unexpected token 'identification literal'.  */
104/* @@? 57:16 Error SyntaxError: Implicit octal literal not allowed  */
105/* @@? 57:16 Error SyntaxError: Invalid BigInt number  */
106/* @@? 59:60 Error SyntaxError: Unexpected token '#'.  */
107
108/* @@? 29:18 Error TypeError: Unresolved reference c'' */
109/* @@? 30:1 Error TypeError: Unresolved reference c'
110const */
111/* @@? 16:16 Error TypeError: Unresolved reference t */
112/* @@? 19:19 Error TypeError: Unresolved reference F0011101 */
113/* @@? 23:13 Error TypeError: Unresolved reference _ */
114/* @@? 27:14 Error TypeError: Unresolved reference undef����FF00����ned */
115/* @@? 30:1 Error TypeError: Unresolved reference c2 */
116/* @@? 34:1 Error TypeError: Unresolved reference d444n */
117/* @@? 38:1 Error TypeError: Unresolved reference b0 */
118/* @@? 42:1 Error TypeError: Bad operand type, the types of the operands must be numeric type, enum or String. */
119/* @@? 44:1 Error TypeError: Unresolved reference b */
120/* @@? 46:1 Error TypeError: Invalid string template expression */
121/* @@? 50:1 Error TypeError: Unresolved reference U4444 */
122/* @@? 56:16 Error TypeError: Unresolved reference FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF */
123