meriyah 4.3.1 → 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/meriyah.amd.js +309 -305
- package/dist/meriyah.amd.min.js +1 -1
- package/dist/meriyah.cjs +309 -305
- package/dist/meriyah.cjs.js +309 -305
- package/dist/meriyah.cjs.min.js +1 -1
- package/dist/meriyah.esm.js +309 -305
- package/dist/meriyah.esm.min.js +1 -1
- package/dist/meriyah.esm.min.mjs +1 -1
- package/dist/meriyah.esm.mjs +309 -305
- package/dist/meriyah.iife.js +309 -305
- package/dist/meriyah.iife.min.js +1 -1
- package/dist/meriyah.min.cjs +1 -1
- package/dist/meriyah.system.js +309 -305
- package/dist/meriyah.system.min.js +1 -1
- package/dist/meriyah.umd.cjs +309 -305
- package/dist/meriyah.umd.es5.js +309 -305
- package/dist/meriyah.umd.es5.min.js +1 -1
- package/dist/meriyah.umd.js +309 -305
- package/dist/meriyah.umd.min.cjs +1 -1
- package/dist/meriyah.umd.min.js +1 -1
- package/dist/src/errors.d.ts +125 -124
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/parser.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/errors.ts +2 -0
- package/src/lexer/identifier.ts +1 -1
- package/src/parser.ts +3 -1
package/dist/meriyah.esm.js
CHANGED
|
@@ -10,7 +10,7 @@ const errorMessages = {
|
|
|
10
10
|
[8]: 'Octal literals are not allowed in strict mode',
|
|
11
11
|
[7]: 'Decimal integer literals with a leading zero are forbidden in strict mode',
|
|
12
12
|
[9]: 'Expected number in radix %0',
|
|
13
|
-
[
|
|
13
|
+
[146]: 'Invalid left-hand side assignment to a destructible right-hand side',
|
|
14
14
|
[10]: 'Non-number found after exponent indicator',
|
|
15
15
|
[11]: 'Invalid BigIntLiteral',
|
|
16
16
|
[12]: 'No identifiers allowed directly after numeric literal',
|
|
@@ -31,9 +31,9 @@ const errorMessages = {
|
|
|
31
31
|
[27]: 'Member access on super must be in a method',
|
|
32
32
|
[29]: 'Await expression not allowed in formal parameter',
|
|
33
33
|
[30]: 'Yield expression not allowed in formal parameter',
|
|
34
|
-
[
|
|
34
|
+
[93]: "Unexpected token: 'escaped keyword'",
|
|
35
35
|
[31]: 'Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses',
|
|
36
|
-
[
|
|
36
|
+
[120]: 'Async functions can only be declared at the top level or inside a block',
|
|
37
37
|
[32]: 'Unterminated regular expression',
|
|
38
38
|
[33]: 'Unexpected regular expression flag',
|
|
39
39
|
[34]: "Duplicate regular expression flag '%0'",
|
|
@@ -43,125 +43,126 @@ const errorMessages = {
|
|
|
43
43
|
[38]: 'Function name may not contain any reserved words or be eval or arguments in strict mode',
|
|
44
44
|
[39]: 'The rest operator is missing an argument',
|
|
45
45
|
[40]: 'A getter cannot be a generator',
|
|
46
|
-
[41]: 'A
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[45]: "
|
|
52
|
-
[46]:
|
|
53
|
-
[47]: 'The
|
|
54
|
-
[48]: '
|
|
55
|
-
[49]:
|
|
56
|
-
[50]:
|
|
57
|
-
[51]: '
|
|
58
|
-
[52]: '
|
|
59
|
-
[53]: 'Invalid
|
|
60
|
-
[54]: '
|
|
61
|
-
[55]: '
|
|
62
|
-
[56]: '
|
|
63
|
-
[57]:
|
|
64
|
-
[58]: '
|
|
65
|
-
[59]: 'Invalid
|
|
66
|
-
[60]: '
|
|
67
|
-
[61]: '
|
|
68
|
-
[62]:
|
|
69
|
-
[63]: "
|
|
70
|
-
[64]: '
|
|
71
|
-
[65]: '
|
|
72
|
-
[66]: 'Illegal
|
|
73
|
-
[67]: '
|
|
74
|
-
[68]: '
|
|
75
|
-
[69]: '
|
|
76
|
-
[70]: '
|
|
77
|
-
[71]: '
|
|
78
|
-
[
|
|
79
|
-
[74]: 'In
|
|
80
|
-
[75]: '
|
|
81
|
-
[76]:
|
|
82
|
-
[77]: '
|
|
83
|
-
[78]: 'Invalid
|
|
84
|
-
[79]: '
|
|
85
|
-
[80]: '
|
|
86
|
-
[
|
|
87
|
-
[
|
|
88
|
-
[
|
|
89
|
-
[84]: 'Catch clause parameter
|
|
90
|
-
[85]: '
|
|
91
|
-
[86]: '
|
|
92
|
-
[87]: '
|
|
93
|
-
[88]: '
|
|
94
|
-
[89]: '
|
|
95
|
-
[90]: '
|
|
96
|
-
[91]: '
|
|
97
|
-
[
|
|
98
|
-
[
|
|
99
|
-
[
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[95]: '
|
|
104
|
-
[
|
|
105
|
-
[101]: '
|
|
106
|
-
[102]: '
|
|
107
|
-
[103]: '
|
|
108
|
-
[104]:
|
|
109
|
-
[105]: '
|
|
110
|
-
[106]:
|
|
111
|
-
[
|
|
112
|
-
[109]:
|
|
113
|
-
[110]: '
|
|
114
|
-
[111]:
|
|
115
|
-
[112]:
|
|
116
|
-
[113]: 'Block body arrows can not be immediately
|
|
117
|
-
[114]: '
|
|
118
|
-
[115]: 'Unexpected
|
|
119
|
-
[116]: '
|
|
120
|
-
[117]: '
|
|
121
|
-
[118]: '
|
|
122
|
-
[
|
|
123
|
-
[121]: '
|
|
124
|
-
[122]: '
|
|
125
|
-
[123]: '
|
|
126
|
-
[
|
|
127
|
-
[
|
|
128
|
-
[
|
|
129
|
-
[127]: '
|
|
130
|
-
[128]: '
|
|
131
|
-
[129]: '
|
|
132
|
-
[
|
|
133
|
-
[132]:
|
|
134
|
-
[133]: '
|
|
135
|
-
[134]:
|
|
136
|
-
[135]:
|
|
137
|
-
[136]: 'import()
|
|
138
|
-
[137]: '
|
|
139
|
-
[138]: '
|
|
140
|
-
[139]:
|
|
141
|
-
[140]: "
|
|
142
|
-
[141]: "
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[143]: '
|
|
146
|
-
[
|
|
147
|
-
[
|
|
148
|
-
[
|
|
149
|
-
[149]: '
|
|
150
|
-
[150]: '
|
|
151
|
-
[151]:
|
|
152
|
-
[152]: "
|
|
153
|
-
[153]: "'%0'
|
|
154
|
-
[154]: '
|
|
155
|
-
[155]: '
|
|
156
|
-
[156]: '
|
|
157
|
-
[157]: '
|
|
158
|
-
[158]: '
|
|
159
|
-
[159]: '
|
|
160
|
-
[160]: '
|
|
161
|
-
[161]: 'Invalid
|
|
162
|
-
[162]: 'Invalid optional chain from
|
|
163
|
-
[163]: '
|
|
164
|
-
[164]: '
|
|
46
|
+
[41]: 'A setter cannot be a generator',
|
|
47
|
+
[42]: 'A computed property name must be followed by a colon or paren',
|
|
48
|
+
[131]: 'Object literal keys that are strings or numbers must be a method or have a colon',
|
|
49
|
+
[44]: 'Found `* async x(){}` but this should be `async * x(){}`',
|
|
50
|
+
[43]: 'Getters and setters can not be generators',
|
|
51
|
+
[45]: "'%0' can not be generator method",
|
|
52
|
+
[46]: "No line break is allowed after '=>'",
|
|
53
|
+
[47]: 'The left-hand side of the arrow can only be destructed through assignment',
|
|
54
|
+
[48]: 'The binding declaration is not destructible',
|
|
55
|
+
[49]: 'Async arrow can not be followed by new expression',
|
|
56
|
+
[50]: "Classes may not have a static property named 'prototype'",
|
|
57
|
+
[51]: 'Class constructor may not be a %0',
|
|
58
|
+
[52]: 'Duplicate constructor method in class',
|
|
59
|
+
[53]: 'Invalid increment/decrement operand',
|
|
60
|
+
[54]: 'Invalid use of `new` keyword on an increment/decrement expression',
|
|
61
|
+
[55]: '`=>` is an invalid assignment target',
|
|
62
|
+
[56]: 'Rest element may not have a trailing comma',
|
|
63
|
+
[57]: 'Missing initializer in %0 declaration',
|
|
64
|
+
[58]: "'for-%0' loop head declarations can not have an initializer",
|
|
65
|
+
[59]: 'Invalid left-hand side in for-%0 loop: Must have a single binding',
|
|
66
|
+
[60]: 'Invalid shorthand property initializer',
|
|
67
|
+
[61]: 'Property name __proto__ appears more than once in object literal',
|
|
68
|
+
[62]: 'Let is disallowed as a lexically bound name',
|
|
69
|
+
[63]: "Invalid use of '%0' inside new expression",
|
|
70
|
+
[64]: "Illegal 'use strict' directive in function with non-simple parameter list",
|
|
71
|
+
[65]: 'Identifier "let" disallowed as left-hand side expression in strict mode',
|
|
72
|
+
[66]: 'Illegal continue statement',
|
|
73
|
+
[67]: 'Illegal break statement',
|
|
74
|
+
[68]: 'Cannot have `let[...]` as a var name in strict mode',
|
|
75
|
+
[69]: 'Invalid destructuring assignment target',
|
|
76
|
+
[70]: 'Rest parameter may not have a default initializer',
|
|
77
|
+
[71]: 'The rest argument must the be last parameter',
|
|
78
|
+
[72]: 'Invalid rest argument',
|
|
79
|
+
[74]: 'In strict mode code, functions can only be declared at top level or inside a block',
|
|
80
|
+
[75]: 'In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement',
|
|
81
|
+
[76]: 'Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement',
|
|
82
|
+
[77]: "Class declaration can't appear in single-statement context",
|
|
83
|
+
[78]: 'Invalid left-hand side in for-%0',
|
|
84
|
+
[79]: 'Invalid assignment in for-%0',
|
|
85
|
+
[80]: 'for await (... of ...) is only valid in async functions and async generators',
|
|
86
|
+
[81]: 'The first token after the template expression should be a continuation of the template',
|
|
87
|
+
[83]: '`let` declaration not allowed here and `let` cannot be a regular var name in strict mode',
|
|
88
|
+
[82]: '`let \n [` is a restricted production at the start of a statement',
|
|
89
|
+
[84]: 'Catch clause requires exactly one parameter, not more (and no trailing comma)',
|
|
90
|
+
[85]: 'Catch clause parameter does not support default values',
|
|
91
|
+
[86]: 'Missing catch or finally after try',
|
|
92
|
+
[87]: 'More than one default clause in switch statement',
|
|
93
|
+
[88]: 'Illegal newline after throw',
|
|
94
|
+
[89]: 'Strict mode code may not include a with statement',
|
|
95
|
+
[90]: 'Illegal return statement',
|
|
96
|
+
[91]: 'The left hand side of the for-header binding declaration is not destructible',
|
|
97
|
+
[92]: 'new.target only allowed within functions',
|
|
98
|
+
[94]: "'#' not followed by identifier",
|
|
99
|
+
[100]: 'Invalid keyword',
|
|
100
|
+
[99]: "Can not use 'let' as a class name",
|
|
101
|
+
[98]: "'A lexical declaration can't define a 'let' binding",
|
|
102
|
+
[97]: 'Can not use `let` as variable name in strict mode',
|
|
103
|
+
[95]: "'%0' may not be used as an identifier in this context",
|
|
104
|
+
[96]: 'Await is only valid in async functions',
|
|
105
|
+
[101]: 'The %0 keyword can only be used with the module goal',
|
|
106
|
+
[102]: 'Unicode codepoint must not be greater than 0x10FFFF',
|
|
107
|
+
[103]: '%0 source must be string',
|
|
108
|
+
[104]: 'Only a identifier can be used to indicate alias',
|
|
109
|
+
[105]: "Only '*' or '{...}' can be imported after default",
|
|
110
|
+
[106]: 'Trailing decorator may be followed by method',
|
|
111
|
+
[107]: "Decorators can't be used with a constructor",
|
|
112
|
+
[109]: 'HTML comments are only allowed with web compatibility (Annex B)',
|
|
113
|
+
[110]: "The identifier 'let' must not be in expression position in strict mode",
|
|
114
|
+
[111]: 'Cannot assign to `eval` and `arguments` in strict mode',
|
|
115
|
+
[112]: "The left-hand side of a for-of loop may not start with 'let'",
|
|
116
|
+
[113]: 'Block body arrows can not be immediately invoked without a group',
|
|
117
|
+
[114]: 'Block body arrows can not be immediately accessed without a group',
|
|
118
|
+
[115]: 'Unexpected strict mode reserved word',
|
|
119
|
+
[116]: 'Unexpected eval or arguments in strict mode',
|
|
120
|
+
[117]: 'Decorators must not be followed by a semicolon',
|
|
121
|
+
[118]: 'Calling delete on expression not allowed in strict mode',
|
|
122
|
+
[119]: 'Pattern can not have a tail',
|
|
123
|
+
[121]: 'Can not have a `yield` expression on the left side of a ternary',
|
|
124
|
+
[122]: 'An arrow function can not have a postfix update operator',
|
|
125
|
+
[123]: 'Invalid object literal key character after generator star',
|
|
126
|
+
[124]: 'Private fields can not be deleted',
|
|
127
|
+
[126]: 'Classes may not have a field called constructor',
|
|
128
|
+
[125]: 'Classes may not have a private element named constructor',
|
|
129
|
+
[127]: 'A class field initializer may not contain arguments',
|
|
130
|
+
[128]: 'Generators can only be declared at the top level or inside a block',
|
|
131
|
+
[129]: 'Async methods are a restricted production and cannot have a newline following it',
|
|
132
|
+
[130]: 'Unexpected character after object literal property name',
|
|
133
|
+
[132]: 'Invalid key token',
|
|
134
|
+
[133]: "Label '%0' has already been declared",
|
|
135
|
+
[134]: 'continue statement must be nested within an iteration statement',
|
|
136
|
+
[135]: "Undefined label '%0'",
|
|
137
|
+
[136]: 'Trailing comma is disallowed inside import(...) arguments',
|
|
138
|
+
[137]: 'import() requires exactly one argument',
|
|
139
|
+
[138]: 'Cannot use new with import(...)',
|
|
140
|
+
[139]: '... is not allowed in import()',
|
|
141
|
+
[140]: "Expected '=>'",
|
|
142
|
+
[141]: "Duplicate binding '%0'",
|
|
143
|
+
[142]: "Cannot export a duplicate name '%0'",
|
|
144
|
+
[145]: 'Duplicate %0 for-binding',
|
|
145
|
+
[143]: "Exported binding '%0' needs to refer to a top-level declared variable",
|
|
146
|
+
[144]: 'Unexpected private field',
|
|
147
|
+
[148]: 'Numeric separators are not allowed at the end of numeric literals',
|
|
148
|
+
[147]: 'Only one underscore is allowed as numeric separator',
|
|
149
|
+
[149]: 'JSX value should be either an expression or a quoted JSX text',
|
|
150
|
+
[150]: 'Expected corresponding JSX closing tag for %0',
|
|
151
|
+
[151]: 'Adjacent JSX elements must be wrapped in an enclosing tag',
|
|
152
|
+
[152]: "JSX attributes must only be assigned a non-empty 'expression'",
|
|
153
|
+
[153]: "'%0' has already been declared",
|
|
154
|
+
[154]: "'%0' shadowed a catch clause binding",
|
|
155
|
+
[155]: 'Dot property must be an identifier',
|
|
156
|
+
[156]: 'Encountered invalid input after spread/rest argument',
|
|
157
|
+
[157]: 'Catch without try',
|
|
158
|
+
[158]: 'Finally without try',
|
|
159
|
+
[159]: 'Expected corresponding closing tag for JSX fragment',
|
|
160
|
+
[160]: 'Coalescing and logical operators used together in the same expression must be disambiguated with parentheses',
|
|
161
|
+
[161]: 'Invalid tagged template on optional chain',
|
|
162
|
+
[162]: 'Invalid optional chain from super property',
|
|
163
|
+
[163]: 'Invalid optional chain from new expression',
|
|
164
|
+
[164]: 'Cannot use "import.meta" outside a module',
|
|
165
|
+
[165]: 'Leading decorators must be attached to a class declaration'
|
|
165
166
|
};
|
|
166
167
|
class ParseError extends SyntaxError {
|
|
167
168
|
constructor(startindex, line, column, type, ...params) {
|
|
@@ -1093,7 +1094,7 @@ function handleStringError(state, code, isTemplate) {
|
|
|
1093
1094
|
case -4:
|
|
1094
1095
|
report(state, 6);
|
|
1095
1096
|
case -5:
|
|
1096
|
-
report(state,
|
|
1097
|
+
report(state, 102);
|
|
1097
1098
|
}
|
|
1098
1099
|
}
|
|
1099
1100
|
|
|
@@ -1206,7 +1207,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1206
1207
|
while (CharTypes[char] & (64 | 4096)) {
|
|
1207
1208
|
if (char === 95) {
|
|
1208
1209
|
if (!allowSeparator)
|
|
1209
|
-
report(parser,
|
|
1210
|
+
report(parser, 147);
|
|
1210
1211
|
allowSeparator = 0;
|
|
1211
1212
|
char = advanceChar(parser);
|
|
1212
1213
|
continue;
|
|
@@ -1217,7 +1218,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1217
1218
|
char = advanceChar(parser);
|
|
1218
1219
|
}
|
|
1219
1220
|
if (digits === 0 || !allowSeparator) {
|
|
1220
|
-
report(parser, digits === 0 ? 19 :
|
|
1221
|
+
report(parser, digits === 0 ? 19 : 148);
|
|
1221
1222
|
}
|
|
1222
1223
|
}
|
|
1223
1224
|
else if ((char | 32) === 111) {
|
|
@@ -1226,7 +1227,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1226
1227
|
while (CharTypes[char] & (32 | 4096)) {
|
|
1227
1228
|
if (char === 95) {
|
|
1228
1229
|
if (!allowSeparator) {
|
|
1229
|
-
report(parser,
|
|
1230
|
+
report(parser, 147);
|
|
1230
1231
|
}
|
|
1231
1232
|
allowSeparator = 0;
|
|
1232
1233
|
char = advanceChar(parser);
|
|
@@ -1238,7 +1239,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1238
1239
|
char = advanceChar(parser);
|
|
1239
1240
|
}
|
|
1240
1241
|
if (digits === 0 || !allowSeparator) {
|
|
1241
|
-
report(parser, digits === 0 ? 0 :
|
|
1242
|
+
report(parser, digits === 0 ? 0 : 148);
|
|
1242
1243
|
}
|
|
1243
1244
|
}
|
|
1244
1245
|
else if ((char | 32) === 98) {
|
|
@@ -1247,7 +1248,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1247
1248
|
while (CharTypes[char] & (128 | 4096)) {
|
|
1248
1249
|
if (char === 95) {
|
|
1249
1250
|
if (!allowSeparator) {
|
|
1250
|
-
report(parser,
|
|
1251
|
+
report(parser, 147);
|
|
1251
1252
|
}
|
|
1252
1253
|
allowSeparator = 0;
|
|
1253
1254
|
char = advanceChar(parser);
|
|
@@ -1259,7 +1260,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1259
1260
|
char = advanceChar(parser);
|
|
1260
1261
|
}
|
|
1261
1262
|
if (digits === 0 || !allowSeparator) {
|
|
1262
|
-
report(parser, digits === 0 ? 0 :
|
|
1263
|
+
report(parser, digits === 0 ? 0 : 148);
|
|
1263
1264
|
}
|
|
1264
1265
|
}
|
|
1265
1266
|
else if (CharTypes[char] & 32) {
|
|
@@ -1292,7 +1293,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1292
1293
|
if (char === 95) {
|
|
1293
1294
|
char = advanceChar(parser);
|
|
1294
1295
|
if (char === 95 || kind & 32) {
|
|
1295
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1296
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 147);
|
|
1296
1297
|
}
|
|
1297
1298
|
allowSeparator = 1;
|
|
1298
1299
|
continue;
|
|
@@ -1303,7 +1304,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1303
1304
|
--digit;
|
|
1304
1305
|
}
|
|
1305
1306
|
if (allowSeparator) {
|
|
1306
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1307
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 148);
|
|
1307
1308
|
}
|
|
1308
1309
|
if (digit >= 0 && !isIdentifierStart(char) && char !== 46) {
|
|
1309
1310
|
parser.tokenValue = value;
|
|
@@ -1368,7 +1369,7 @@ function scanDecimalDigitsOrSeparator(parser, char) {
|
|
|
1368
1369
|
const { index } = parser;
|
|
1369
1370
|
char = advanceChar(parser);
|
|
1370
1371
|
if (char === 95) {
|
|
1371
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1372
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 147);
|
|
1372
1373
|
}
|
|
1373
1374
|
allowSeparator = 1;
|
|
1374
1375
|
ret += parser.source.substring(start, index);
|
|
@@ -1379,7 +1380,7 @@ function scanDecimalDigitsOrSeparator(parser, char) {
|
|
|
1379
1380
|
char = advanceChar(parser);
|
|
1380
1381
|
}
|
|
1381
1382
|
if (allowSeparator) {
|
|
1382
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1383
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 148);
|
|
1383
1384
|
}
|
|
1384
1385
|
return ret + parser.source.substring(start, parser.index);
|
|
1385
1386
|
}
|
|
@@ -1468,7 +1469,7 @@ const descKeywordTable = Object.create(null, {
|
|
|
1468
1469
|
function scanIdentifier(parser, context, isValidAsKeyword) {
|
|
1469
1470
|
while (isIdPart[advanceChar(parser)]) { }
|
|
1470
1471
|
parser.tokenValue = parser.source.slice(parser.tokenPos, parser.index);
|
|
1471
|
-
return parser.currentChar !== 92 && parser.currentChar
|
|
1472
|
+
return parser.currentChar !== 92 && parser.currentChar <= 0x7e
|
|
1472
1473
|
? descKeywordTable[parser.tokenValue] || 208897
|
|
1473
1474
|
: scanIdentifierSlowCase(parser, context, 0, isValidAsKeyword);
|
|
1474
1475
|
}
|
|
@@ -1555,7 +1556,7 @@ function scanIdentifierSlowCase(parser, context, hasEscape, isValidAsKeyword) {
|
|
|
1555
1556
|
}
|
|
1556
1557
|
function scanPrivateIdentifier(parser) {
|
|
1557
1558
|
if (!isIdentifierStart(advanceChar(parser)))
|
|
1558
|
-
report(parser,
|
|
1559
|
+
report(parser, 94);
|
|
1559
1560
|
return 131;
|
|
1560
1561
|
}
|
|
1561
1562
|
function scanIdentifierUnicodeEscape(parser) {
|
|
@@ -1573,7 +1574,7 @@ function scanUnicodeEscape(parser) {
|
|
|
1573
1574
|
while (CharTypes[advanceChar(parser)] & 64) {
|
|
1574
1575
|
codePoint = (codePoint << 4) | toHex(parser.currentChar);
|
|
1575
1576
|
if (codePoint > 1114111)
|
|
1576
|
-
reportScannerError(begin, parser.line, parser.index + 1,
|
|
1577
|
+
reportScannerError(begin, parser.line, parser.index + 1, 102);
|
|
1577
1578
|
}
|
|
1578
1579
|
if (parser.currentChar !== 125) {
|
|
1579
1580
|
reportScannerError(begin, parser.line, parser.index - 1, 6);
|
|
@@ -1914,7 +1915,7 @@ function scanSingleToken(parser, context, state) {
|
|
|
1914
1915
|
advanceChar(parser);
|
|
1915
1916
|
if ((state & 1 || isStartOfLine) && parser.currentChar === 62) {
|
|
1916
1917
|
if ((context & 256) === 0)
|
|
1917
|
-
report(parser,
|
|
1918
|
+
report(parser, 109);
|
|
1918
1919
|
advanceChar(parser);
|
|
1919
1920
|
state = skipSingleHTMLComment(parser, source, state, context, 3, startPos, startLine, startColumn);
|
|
1920
1921
|
startPos = parser.tokenPos;
|
|
@@ -4410,7 +4411,7 @@ function reinterpretToPattern(state, node) {
|
|
|
4410
4411
|
case 'AssignmentExpression':
|
|
4411
4412
|
node.type = 'AssignmentPattern';
|
|
4412
4413
|
if (node.operator !== '=')
|
|
4413
|
-
report(state,
|
|
4414
|
+
report(state, 69);
|
|
4414
4415
|
delete node.operator;
|
|
4415
4416
|
reinterpretToPattern(state, node.left);
|
|
4416
4417
|
return;
|
|
@@ -4425,58 +4426,58 @@ function reinterpretToPattern(state, node) {
|
|
|
4425
4426
|
function validateBindingIdentifier(parser, context, kind, t, skipEvalArgCheck) {
|
|
4426
4427
|
if (context & 1024) {
|
|
4427
4428
|
if ((t & 36864) === 36864) {
|
|
4428
|
-
report(parser,
|
|
4429
|
+
report(parser, 115);
|
|
4429
4430
|
}
|
|
4430
4431
|
if (!skipEvalArgCheck && (t & 537079808) === 537079808) {
|
|
4431
|
-
report(parser,
|
|
4432
|
+
report(parser, 116);
|
|
4432
4433
|
}
|
|
4433
4434
|
}
|
|
4434
4435
|
if ((t & 20480) === 20480) {
|
|
4435
|
-
report(parser,
|
|
4436
|
+
report(parser, 100);
|
|
4436
4437
|
}
|
|
4437
4438
|
if (kind & (8 | 16) && t === 241739) {
|
|
4438
|
-
report(parser,
|
|
4439
|
+
report(parser, 98);
|
|
4439
4440
|
}
|
|
4440
4441
|
if (context & (4194304 | 2048) && t === 209008) {
|
|
4441
|
-
report(parser,
|
|
4442
|
+
report(parser, 96);
|
|
4442
4443
|
}
|
|
4443
4444
|
if (context & (2097152 | 1024) && t === 241773) {
|
|
4444
|
-
report(parser,
|
|
4445
|
+
report(parser, 95, 'yield');
|
|
4445
4446
|
}
|
|
4446
4447
|
}
|
|
4447
4448
|
function validateFunctionName(parser, context, t) {
|
|
4448
4449
|
if (context & 1024) {
|
|
4449
4450
|
if ((t & 36864) === 36864) {
|
|
4450
|
-
report(parser,
|
|
4451
|
+
report(parser, 115);
|
|
4451
4452
|
}
|
|
4452
4453
|
if ((t & 537079808) === 537079808) {
|
|
4453
|
-
report(parser,
|
|
4454
|
+
report(parser, 116);
|
|
4454
4455
|
}
|
|
4455
4456
|
if (t === 122) {
|
|
4456
|
-
report(parser,
|
|
4457
|
+
report(parser, 93);
|
|
4457
4458
|
}
|
|
4458
4459
|
if (t === 121) {
|
|
4459
|
-
report(parser,
|
|
4460
|
+
report(parser, 93);
|
|
4460
4461
|
}
|
|
4461
4462
|
}
|
|
4462
4463
|
if ((t & 20480) === 20480) {
|
|
4463
|
-
report(parser,
|
|
4464
|
+
report(parser, 100);
|
|
4464
4465
|
}
|
|
4465
4466
|
if (context & (4194304 | 2048) && t === 209008) {
|
|
4466
|
-
report(parser,
|
|
4467
|
+
report(parser, 96);
|
|
4467
4468
|
}
|
|
4468
4469
|
if (context & (2097152 | 1024) && t === 241773) {
|
|
4469
|
-
report(parser,
|
|
4470
|
+
report(parser, 95, 'yield');
|
|
4470
4471
|
}
|
|
4471
4472
|
}
|
|
4472
4473
|
function isStrictReservedWord(parser, context, t) {
|
|
4473
4474
|
if (t === 209008) {
|
|
4474
4475
|
if (context & (4194304 | 2048))
|
|
4475
|
-
report(parser,
|
|
4476
|
+
report(parser, 96);
|
|
4476
4477
|
parser.destructible |= 128;
|
|
4477
4478
|
}
|
|
4478
4479
|
if (t === 241773 && context & 2097152)
|
|
4479
|
-
report(parser,
|
|
4480
|
+
report(parser, 95, 'yield');
|
|
4480
4481
|
return ((t & 20480) === 20480 ||
|
|
4481
4482
|
(t & 36864) === 36864 ||
|
|
4482
4483
|
t == 122);
|
|
@@ -4488,7 +4489,7 @@ function isValidLabel(parser, labels, name, isIterationStatement) {
|
|
|
4488
4489
|
while (labels) {
|
|
4489
4490
|
if (labels['$' + name]) {
|
|
4490
4491
|
if (isIterationStatement)
|
|
4491
|
-
report(parser,
|
|
4492
|
+
report(parser, 134);
|
|
4492
4493
|
return 1;
|
|
4493
4494
|
}
|
|
4494
4495
|
if (isIterationStatement && labels.loop)
|
|
@@ -4501,7 +4502,7 @@ function validateAndDeclareLabel(parser, labels, name) {
|
|
|
4501
4502
|
let set = labels;
|
|
4502
4503
|
while (set) {
|
|
4503
4504
|
if (set['$' + name])
|
|
4504
|
-
report(parser,
|
|
4505
|
+
report(parser, 133, name);
|
|
4505
4506
|
set = set['$'];
|
|
4506
4507
|
}
|
|
4507
4508
|
labels['$' + name] = 1;
|
|
@@ -4582,27 +4583,27 @@ function addBlockName(parser, context, scope, name, kind, origin) {
|
|
|
4582
4583
|
const value = scope['#' + name];
|
|
4583
4584
|
if (value && (value & 2) === 0) {
|
|
4584
4585
|
if (kind & 1) {
|
|
4585
|
-
scope.scopeError = recordScopeError(parser,
|
|
4586
|
+
scope.scopeError = recordScopeError(parser, 141, name);
|
|
4586
4587
|
}
|
|
4587
4588
|
else if (context & 256 &&
|
|
4588
4589
|
value & 64 &&
|
|
4589
4590
|
origin & 2) ;
|
|
4590
4591
|
else {
|
|
4591
|
-
report(parser,
|
|
4592
|
+
report(parser, 141, name);
|
|
4592
4593
|
}
|
|
4593
4594
|
}
|
|
4594
4595
|
if (scope.type & 128 &&
|
|
4595
4596
|
(scope.parent['#' + name] && (scope.parent['#' + name] & 2) === 0)) {
|
|
4596
|
-
report(parser,
|
|
4597
|
+
report(parser, 141, name);
|
|
4597
4598
|
}
|
|
4598
4599
|
if (scope.type & 1024 && value && (value & 2) === 0) {
|
|
4599
4600
|
if (kind & 1) {
|
|
4600
|
-
scope.scopeError = recordScopeError(parser,
|
|
4601
|
+
scope.scopeError = recordScopeError(parser, 141, name);
|
|
4601
4602
|
}
|
|
4602
4603
|
}
|
|
4603
4604
|
if (scope.type & 64) {
|
|
4604
4605
|
if (scope.parent['#' + name] & 768)
|
|
4605
|
-
report(parser,
|
|
4606
|
+
report(parser, 154, name);
|
|
4606
4607
|
}
|
|
4607
4608
|
scope['#' + name] = kind;
|
|
4608
4609
|
}
|
|
@@ -4616,19 +4617,19 @@ function addVarName(parser, context, scope, name, kind) {
|
|
|
4616
4617
|
((kind & 128 && value & 68) ||
|
|
4617
4618
|
(value & 128 && kind & 68))) ;
|
|
4618
4619
|
else {
|
|
4619
|
-
report(parser,
|
|
4620
|
+
report(parser, 141, name);
|
|
4620
4621
|
}
|
|
4621
4622
|
}
|
|
4622
4623
|
if (currentScope === scope) {
|
|
4623
4624
|
if (value & 1 && kind & 1) {
|
|
4624
|
-
currentScope.scopeError = recordScopeError(parser,
|
|
4625
|
+
currentScope.scopeError = recordScopeError(parser, 141, name);
|
|
4625
4626
|
}
|
|
4626
4627
|
}
|
|
4627
4628
|
if (value & (512 | 256)) {
|
|
4628
4629
|
if ((value & 512) === 0 ||
|
|
4629
4630
|
(context & 256) === 0 ||
|
|
4630
4631
|
context & 1024) {
|
|
4631
|
-
report(parser,
|
|
4632
|
+
report(parser, 141, name);
|
|
4632
4633
|
}
|
|
4633
4634
|
}
|
|
4634
4635
|
currentScope['#' + name] = kind;
|
|
@@ -4638,7 +4639,7 @@ function addVarName(parser, context, scope, name, kind) {
|
|
|
4638
4639
|
function declareUnboundVariable(parser, name) {
|
|
4639
4640
|
if (parser.exportedNames !== void 0 && name !== '') {
|
|
4640
4641
|
if (parser.exportedNames['#' + name]) {
|
|
4641
|
-
report(parser,
|
|
4642
|
+
report(parser, 142, name);
|
|
4642
4643
|
}
|
|
4643
4644
|
parser.exportedNames['#' + name] = 1;
|
|
4644
4645
|
}
|
|
@@ -4696,7 +4697,7 @@ function isValidIdentifier(context, t) {
|
|
|
4696
4697
|
function classifyIdentifier(parser, context, t, isArrow) {
|
|
4697
4698
|
if ((t & 537079808) === 537079808) {
|
|
4698
4699
|
if (context & 1024)
|
|
4699
|
-
report(parser,
|
|
4700
|
+
report(parser, 116);
|
|
4700
4701
|
if (isArrow)
|
|
4701
4702
|
parser.flags |= 512;
|
|
4702
4703
|
}
|
|
@@ -4789,7 +4790,7 @@ function parseSource(source, options, context) {
|
|
|
4789
4790
|
if (scope) {
|
|
4790
4791
|
for (const key in parser.exportedBindings) {
|
|
4791
4792
|
if (key[0] === '#' && !scope[key])
|
|
4792
|
-
report(parser,
|
|
4793
|
+
report(parser, 143, key.slice(1));
|
|
4793
4794
|
}
|
|
4794
4795
|
}
|
|
4795
4796
|
}
|
|
@@ -4859,7 +4860,7 @@ function parseModuleItem(parser, context, scope) {
|
|
|
4859
4860
|
moduleItem = parseStatementListItem(parser, context, scope, 4, {});
|
|
4860
4861
|
}
|
|
4861
4862
|
if (parser.leadingDecorators.length) {
|
|
4862
|
-
report(parser,
|
|
4863
|
+
report(parser, 165);
|
|
4863
4864
|
}
|
|
4864
4865
|
return moduleItem;
|
|
4865
4866
|
}
|
|
@@ -4878,7 +4879,7 @@ function parseStatementListItem(parser, context, scope, origin, labels) {
|
|
|
4878
4879
|
case 241739:
|
|
4879
4880
|
return parseLetIdentOrVarDeclarationStatement(parser, context, scope, origin, start, line, column);
|
|
4880
4881
|
case 20566:
|
|
4881
|
-
report(parser,
|
|
4882
|
+
report(parser, 101, 'export');
|
|
4882
4883
|
case 86108:
|
|
4883
4884
|
nextToken(parser, context);
|
|
4884
4885
|
switch (parser.token) {
|
|
@@ -4887,7 +4888,7 @@ function parseStatementListItem(parser, context, scope, origin, labels) {
|
|
|
4887
4888
|
case 67108877:
|
|
4888
4889
|
return parseImportMetaDeclaration(parser, context, start, line, column);
|
|
4889
4890
|
default:
|
|
4890
|
-
report(parser,
|
|
4891
|
+
report(parser, 101, 'import');
|
|
4891
4892
|
}
|
|
4892
4893
|
case 209007:
|
|
4893
4894
|
return parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, 1, start, line, column);
|
|
@@ -4930,17 +4931,17 @@ function parseStatement(parser, context, scope, origin, labels, allowFuncDecl, s
|
|
|
4930
4931
|
case 209007:
|
|
4931
4932
|
return parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, 0, start, line, column);
|
|
4932
4933
|
case 20559:
|
|
4933
|
-
report(parser, 156);
|
|
4934
|
-
case 20568:
|
|
4935
4934
|
report(parser, 157);
|
|
4935
|
+
case 20568:
|
|
4936
|
+
report(parser, 158);
|
|
4936
4937
|
case 86106:
|
|
4937
4938
|
report(parser, context & 1024
|
|
4938
|
-
?
|
|
4939
|
+
? 74
|
|
4939
4940
|
: (context & 256) === 0
|
|
4940
|
-
?
|
|
4941
|
-
:
|
|
4941
|
+
? 76
|
|
4942
|
+
: 75);
|
|
4942
4943
|
case 86096:
|
|
4943
|
-
report(parser,
|
|
4944
|
+
report(parser, 77);
|
|
4944
4945
|
default:
|
|
4945
4946
|
return parseExpressionOrLabelledStatement(parser, context, scope, origin, labels, allowFuncDecl, start, line, column);
|
|
4946
4947
|
}
|
|
@@ -4952,9 +4953,9 @@ function parseExpressionOrLabelledStatement(parser, context, scope, origin, labe
|
|
|
4952
4953
|
case 241739:
|
|
4953
4954
|
expr = parseIdentifier(parser, context, 0);
|
|
4954
4955
|
if (context & 1024)
|
|
4955
|
-
report(parser,
|
|
4956
|
+
report(parser, 83);
|
|
4956
4957
|
if (parser.token === 69271571)
|
|
4957
|
-
report(parser,
|
|
4958
|
+
report(parser, 82);
|
|
4958
4959
|
break;
|
|
4959
4960
|
default:
|
|
4960
4961
|
expr = parsePrimaryExpression(parser, context, 2, 0, 1, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
@@ -4983,7 +4984,7 @@ function parseBlock(parser, context, scope, labels, start, line, column) {
|
|
|
4983
4984
|
}
|
|
4984
4985
|
function parseReturnStatement(parser, context, start, line, column) {
|
|
4985
4986
|
if ((context & 32) === 0 && context & 8192)
|
|
4986
|
-
report(parser,
|
|
4987
|
+
report(parser, 90);
|
|
4987
4988
|
nextToken(parser, context | 32768);
|
|
4988
4989
|
const argument = parser.flags & 1 || parser.token & 1048576
|
|
4989
4990
|
? null
|
|
@@ -5027,7 +5028,7 @@ function parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origi
|
|
|
5027
5028
|
if (!asyncNewLine) {
|
|
5028
5029
|
if (parser.token === 86106) {
|
|
5029
5030
|
if (!allowFuncDecl)
|
|
5030
|
-
report(parser,
|
|
5031
|
+
report(parser, 120);
|
|
5031
5032
|
return parseFunctionDeclaration(parser, context, scope, origin, 1, 0, 1, start, line, column);
|
|
5032
5033
|
}
|
|
5033
5034
|
if ((parser.token & 143360) === 143360) {
|
|
@@ -5086,7 +5087,7 @@ function parseEmptyStatement(parser, context, start, line, column) {
|
|
|
5086
5087
|
function parseThrowStatement(parser, context, start, line, column) {
|
|
5087
5088
|
nextToken(parser, context | 32768);
|
|
5088
5089
|
if (parser.flags & 1)
|
|
5089
|
-
report(parser,
|
|
5090
|
+
report(parser, 88);
|
|
5090
5091
|
const argument = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5091
5092
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5092
5093
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5140,7 +5141,7 @@ function parseSwitchStatement(parser, context, scope, labels, start, line, colum
|
|
|
5140
5141
|
else {
|
|
5141
5142
|
consume(parser, context | 32768, 20563);
|
|
5142
5143
|
if (seenDefault)
|
|
5143
|
-
report(parser,
|
|
5144
|
+
report(parser, 87);
|
|
5144
5145
|
seenDefault = 1;
|
|
5145
5146
|
}
|
|
5146
5147
|
consume(parser, context | 32768, 21);
|
|
@@ -5181,14 +5182,14 @@ function parseIterationStatementBody(parser, context, scope, labels) {
|
|
|
5181
5182
|
}
|
|
5182
5183
|
function parseContinueStatement(parser, context, labels, start, line, column) {
|
|
5183
5184
|
if ((context & 131072) === 0)
|
|
5184
|
-
report(parser,
|
|
5185
|
+
report(parser, 66);
|
|
5185
5186
|
nextToken(parser, context);
|
|
5186
5187
|
let label = null;
|
|
5187
5188
|
if ((parser.flags & 1) === 0 && parser.token & 143360) {
|
|
5188
5189
|
const { tokenValue } = parser;
|
|
5189
5190
|
label = parseIdentifier(parser, context | 32768, 0);
|
|
5190
5191
|
if (!isValidLabel(parser, labels, tokenValue, 1))
|
|
5191
|
-
report(parser,
|
|
5192
|
+
report(parser, 135, tokenValue);
|
|
5192
5193
|
}
|
|
5193
5194
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5194
5195
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5203,10 +5204,10 @@ function parseBreakStatement(parser, context, labels, start, line, column) {
|
|
|
5203
5204
|
const { tokenValue } = parser;
|
|
5204
5205
|
label = parseIdentifier(parser, context | 32768, 0);
|
|
5205
5206
|
if (!isValidLabel(parser, labels, tokenValue, 0))
|
|
5206
|
-
report(parser,
|
|
5207
|
+
report(parser, 135, tokenValue);
|
|
5207
5208
|
}
|
|
5208
5209
|
else if ((context & (4096 | 131072)) === 0) {
|
|
5209
|
-
report(parser,
|
|
5210
|
+
report(parser, 67);
|
|
5210
5211
|
}
|
|
5211
5212
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5212
5213
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5217,7 +5218,7 @@ function parseBreakStatement(parser, context, labels, start, line, column) {
|
|
|
5217
5218
|
function parseWithStatement(parser, context, scope, labels, start, line, column) {
|
|
5218
5219
|
nextToken(parser, context);
|
|
5219
5220
|
if (context & 1024)
|
|
5220
|
-
report(parser,
|
|
5221
|
+
report(parser, 89);
|
|
5221
5222
|
consume(parser, context | 32768, 67174411);
|
|
5222
5223
|
const object = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5223
5224
|
consume(parser, context | 32768, 16);
|
|
@@ -5250,7 +5251,7 @@ function parseTryStatement(parser, context, scope, labels, start, line, column)
|
|
|
5250
5251
|
finalizer = parseBlock(parser, context, finalizerScope, { $: labels }, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5251
5252
|
}
|
|
5252
5253
|
if (!handler && !finalizer) {
|
|
5253
|
-
report(parser,
|
|
5254
|
+
report(parser, 86);
|
|
5254
5255
|
}
|
|
5255
5256
|
return finishNode(parser, context, start, line, column, {
|
|
5256
5257
|
type: 'TryStatement',
|
|
@@ -5269,10 +5270,10 @@ function parseCatchBlock(parser, context, scope, labels, start, line, column) {
|
|
|
5269
5270
|
? 256
|
|
5270
5271
|
: 512, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5271
5272
|
if (parser.token === 18) {
|
|
5272
|
-
report(parser,
|
|
5273
|
+
report(parser, 84);
|
|
5273
5274
|
}
|
|
5274
5275
|
else if (parser.token === 1077936157) {
|
|
5275
|
-
report(parser,
|
|
5276
|
+
report(parser, 85);
|
|
5276
5277
|
}
|
|
5277
5278
|
consume(parser, context | 32768, 16);
|
|
5278
5279
|
if (scope)
|
|
@@ -5324,7 +5325,7 @@ function parseLetIdentOrVarDeclarationStatement(parser, context, scope, origin,
|
|
|
5324
5325
|
}
|
|
5325
5326
|
parser.assignable = 1;
|
|
5326
5327
|
if (context & 1024)
|
|
5327
|
-
report(parser,
|
|
5328
|
+
report(parser, 83);
|
|
5328
5329
|
if (parser.token === 21) {
|
|
5329
5330
|
return parseLabelledStatement(parser, context, scope, origin, {}, tokenValue, expr, token, 0, start, line, column);
|
|
5330
5331
|
}
|
|
@@ -5372,7 +5373,7 @@ function parseVariableDeclarationList(parser, context, scope, kind, origin) {
|
|
|
5372
5373
|
list.push(parseVariableDeclaration(parser, context, scope, kind, origin));
|
|
5373
5374
|
}
|
|
5374
5375
|
if (bindingCount > 1 && origin & 32 && parser.token & 262144) {
|
|
5375
|
-
report(parser,
|
|
5376
|
+
report(parser, 59, KeywordDescTable[parser.token & 255]);
|
|
5376
5377
|
}
|
|
5377
5378
|
return list;
|
|
5378
5379
|
}
|
|
@@ -5387,13 +5388,13 @@ function parseVariableDeclaration(parser, context, scope, kind, origin) {
|
|
|
5387
5388
|
if (parser.token === 274549 ||
|
|
5388
5389
|
(parser.token === 8738868 &&
|
|
5389
5390
|
(token & 2097152 || (kind & 4) === 0 || context & 1024))) {
|
|
5390
|
-
reportMessageAt(tokenPos, parser.line, parser.index - 3,
|
|
5391
|
+
reportMessageAt(tokenPos, parser.line, parser.index - 3, 58, parser.token === 274549 ? 'of' : 'in');
|
|
5391
5392
|
}
|
|
5392
5393
|
}
|
|
5393
5394
|
}
|
|
5394
5395
|
else if ((kind & 16 || (token & 2097152) > 0) &&
|
|
5395
5396
|
(parser.token & 262144) !== 262144) {
|
|
5396
|
-
report(parser,
|
|
5397
|
+
report(parser, 57, kind & 16 ? 'const' : 'destructuring');
|
|
5397
5398
|
}
|
|
5398
5399
|
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
5399
5400
|
type: 'VariableDeclarator',
|
|
@@ -5421,7 +5422,7 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5421
5422
|
if (parser.token & (143360 | 2097152)) {
|
|
5422
5423
|
if (parser.token === 8738868) {
|
|
5423
5424
|
if (context & 1024)
|
|
5424
|
-
report(parser,
|
|
5425
|
+
report(parser, 65);
|
|
5425
5426
|
}
|
|
5426
5427
|
else {
|
|
5427
5428
|
init = finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
@@ -5433,14 +5434,14 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5433
5434
|
parser.assignable = 1;
|
|
5434
5435
|
}
|
|
5435
5436
|
else if (context & 1024) {
|
|
5436
|
-
report(parser,
|
|
5437
|
+
report(parser, 65);
|
|
5437
5438
|
}
|
|
5438
5439
|
else {
|
|
5439
5440
|
isVarDecl = false;
|
|
5440
5441
|
parser.assignable = 1;
|
|
5441
5442
|
init = parseMemberOrUpdateExpression(parser, context, init, 0, 0, tokenPos, linePos, colPos);
|
|
5442
5443
|
if (parser.token === 274549)
|
|
5443
|
-
report(parser,
|
|
5444
|
+
report(parser, 112);
|
|
5444
5445
|
}
|
|
5445
5446
|
}
|
|
5446
5447
|
else {
|
|
@@ -5461,7 +5462,7 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5461
5462
|
}
|
|
5462
5463
|
else if (token === 1074790417) {
|
|
5463
5464
|
if (forAwait)
|
|
5464
|
-
report(parser,
|
|
5465
|
+
report(parser, 80);
|
|
5465
5466
|
}
|
|
5466
5467
|
else if ((token & 2097152) === 2097152) {
|
|
5467
5468
|
init =
|
|
@@ -5470,7 +5471,7 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5470
5471
|
: parseArrayExpressionOrPattern(parser, context, void 0, 1, 0, 0, 2, 32, tokenPos, linePos, colPos);
|
|
5471
5472
|
destructible = parser.destructible;
|
|
5472
5473
|
if (context & 256 && destructible & 64) {
|
|
5473
|
-
report(parser,
|
|
5474
|
+
report(parser, 61);
|
|
5474
5475
|
}
|
|
5475
5476
|
parser.assignable =
|
|
5476
5477
|
destructible & 16 ? 2 : 1;
|
|
@@ -5482,7 +5483,7 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5482
5483
|
if ((parser.token & 262144) === 262144) {
|
|
5483
5484
|
if (parser.token === 274549) {
|
|
5484
5485
|
if (parser.assignable & 2)
|
|
5485
|
-
report(parser,
|
|
5486
|
+
report(parser, 78, forAwait ? 'await' : 'of');
|
|
5486
5487
|
reinterpretToPattern(parser, init);
|
|
5487
5488
|
nextToken(parser, context | 32768);
|
|
5488
5489
|
right = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
@@ -5497,11 +5498,11 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5497
5498
|
});
|
|
5498
5499
|
}
|
|
5499
5500
|
if (parser.assignable & 2)
|
|
5500
|
-
report(parser,
|
|
5501
|
+
report(parser, 78, 'in');
|
|
5501
5502
|
reinterpretToPattern(parser, init);
|
|
5502
5503
|
nextToken(parser, context | 32768);
|
|
5503
5504
|
if (forAwait)
|
|
5504
|
-
report(parser,
|
|
5505
|
+
report(parser, 80);
|
|
5505
5506
|
right = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5506
5507
|
consume(parser, context | 32768, 16);
|
|
5507
5508
|
const body = parseIterationStatementBody(parser, context, scope, labels);
|
|
@@ -5513,10 +5514,10 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5513
5514
|
});
|
|
5514
5515
|
}
|
|
5515
5516
|
if (forAwait)
|
|
5516
|
-
report(parser,
|
|
5517
|
+
report(parser, 80);
|
|
5517
5518
|
if (!isVarDecl) {
|
|
5518
5519
|
if (destructible & 8 && parser.token !== 1077936157) {
|
|
5519
|
-
report(parser,
|
|
5520
|
+
report(parser, 78, 'loop');
|
|
5520
5521
|
}
|
|
5521
5522
|
init = parseAssignmentExpression(parser, context | 134217728, 0, 0, tokenPos, linePos, colPos, init);
|
|
5522
5523
|
}
|
|
@@ -5540,9 +5541,9 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5540
5541
|
}
|
|
5541
5542
|
function parseRestrictedIdentifier(parser, context, scope) {
|
|
5542
5543
|
if (!isValidIdentifier(context, parser.token))
|
|
5543
|
-
report(parser, 114);
|
|
5544
|
-
if ((parser.token & 537079808) === 537079808)
|
|
5545
5544
|
report(parser, 115);
|
|
5545
|
+
if ((parser.token & 537079808) === 537079808)
|
|
5546
|
+
report(parser, 116);
|
|
5546
5547
|
if (scope)
|
|
5547
5548
|
addBlockName(parser, context, scope, parser.tokenValue, 8, 0);
|
|
5548
5549
|
return parseIdentifier(parser, context, 0);
|
|
@@ -5576,7 +5577,7 @@ function parseImportDeclaration(parser, context, scope) {
|
|
|
5576
5577
|
parseImportSpecifierOrNamedImports(parser, context, scope, specifiers);
|
|
5577
5578
|
break;
|
|
5578
5579
|
default:
|
|
5579
|
-
report(parser,
|
|
5580
|
+
report(parser, 105);
|
|
5580
5581
|
}
|
|
5581
5582
|
}
|
|
5582
5583
|
}
|
|
@@ -5620,7 +5621,7 @@ function parseImportNamespaceSpecifier(parser, context, scope) {
|
|
|
5620
5621
|
function parseModuleSpecifier(parser, context) {
|
|
5621
5622
|
consumeOpt(parser, context, 12404);
|
|
5622
5623
|
if (parser.token !== 134283267)
|
|
5623
|
-
report(parser,
|
|
5624
|
+
report(parser, 103, 'Import');
|
|
5624
5625
|
return parseLiteral(parser, context);
|
|
5625
5626
|
}
|
|
5626
5627
|
function parseImportSpecifierOrNamedImports(parser, context, scope, specifiers) {
|
|
@@ -5631,7 +5632,7 @@ function parseImportSpecifierOrNamedImports(parser, context, scope, specifiers)
|
|
|
5631
5632
|
let local;
|
|
5632
5633
|
if (consumeOpt(parser, context, 77934)) {
|
|
5633
5634
|
if ((parser.token & 134217728) === 134217728 || parser.token === 18) {
|
|
5634
|
-
report(parser,
|
|
5635
|
+
report(parser, 104);
|
|
5635
5636
|
}
|
|
5636
5637
|
else {
|
|
5637
5638
|
validateBindingIdentifier(parser, context, 16, parser.token, 0);
|
|
@@ -5735,7 +5736,7 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5735
5736
|
}
|
|
5736
5737
|
consume(parser, context, 12404);
|
|
5737
5738
|
if (parser.token !== 134283267)
|
|
5738
|
-
report(parser,
|
|
5739
|
+
report(parser, 103, 'Export');
|
|
5739
5740
|
source = parseLiteral(parser, context);
|
|
5740
5741
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5741
5742
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5755,7 +5756,7 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5755
5756
|
if (parser.token === 77934) {
|
|
5756
5757
|
nextToken(parser, context);
|
|
5757
5758
|
if ((parser.token & 134217728) === 134217728) {
|
|
5758
|
-
report(parser,
|
|
5759
|
+
report(parser, 104);
|
|
5759
5760
|
}
|
|
5760
5761
|
if (scope) {
|
|
5761
5762
|
tmpExportedNames.push(parser.tokenValue);
|
|
@@ -5781,7 +5782,7 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5781
5782
|
consume(parser, context, 1074790415);
|
|
5782
5783
|
if (consumeOpt(parser, context, 12404)) {
|
|
5783
5784
|
if (parser.token !== 134283267)
|
|
5784
|
-
report(parser,
|
|
5785
|
+
report(parser, 103, 'Export');
|
|
5785
5786
|
source = parseLiteral(parser, context);
|
|
5786
5787
|
}
|
|
5787
5788
|
else if (scope) {
|
|
@@ -5930,7 +5931,7 @@ function parseBinaryExpression(parser, context, inGroup, start, line, column, mi
|
|
|
5930
5931
|
t = parser.token;
|
|
5931
5932
|
prec = t & 3840;
|
|
5932
5933
|
if ((t & 524288 && operator & 268435456) || (operator & 524288 && t & 268435456)) {
|
|
5933
|
-
report(parser,
|
|
5934
|
+
report(parser, 160);
|
|
5934
5935
|
}
|
|
5935
5936
|
if (prec + ((t === 8457273) << 8) - ((bit === t) << 12) <= minPrec)
|
|
5936
5937
|
break;
|
|
@@ -5956,10 +5957,10 @@ function parseUnaryExpression(parser, context, isLHS, start, line, column, inGro
|
|
|
5956
5957
|
report(parser, 31);
|
|
5957
5958
|
if (context & 1024 && unaryOperator === 16863278) {
|
|
5958
5959
|
if (arg.type === 'Identifier') {
|
|
5959
|
-
report(parser,
|
|
5960
|
+
report(parser, 118);
|
|
5960
5961
|
}
|
|
5961
5962
|
else if (isPropertyWithPrivateFieldKey(arg)) {
|
|
5962
|
-
report(parser,
|
|
5963
|
+
report(parser, 124);
|
|
5963
5964
|
}
|
|
5964
5965
|
}
|
|
5965
5966
|
parser.assignable = 2;
|
|
@@ -5990,7 +5991,7 @@ function parseAsyncExpression(parser, context, inGroup, isLHS, canAssign, isPatt
|
|
|
5990
5991
|
if (parser.token === 10) {
|
|
5991
5992
|
classifyIdentifier(parser, context, token, 1);
|
|
5992
5993
|
if (inNew)
|
|
5993
|
-
report(parser,
|
|
5994
|
+
report(parser, 49);
|
|
5994
5995
|
return parseArrowFromIdentifier(parser, context, parser.tokenValue, expr, inNew, canAssign, 0, start, line, column);
|
|
5995
5996
|
}
|
|
5996
5997
|
return expr;
|
|
@@ -6005,7 +6006,7 @@ function parseYieldExpression(parser, context, inGroup, canAssign, start, line,
|
|
|
6005
6006
|
if (!canAssign)
|
|
6006
6007
|
report(parser, 24);
|
|
6007
6008
|
if (parser.token === 22)
|
|
6008
|
-
report(parser,
|
|
6009
|
+
report(parser, 121);
|
|
6009
6010
|
let argument = null;
|
|
6010
6011
|
let delegate = false;
|
|
6011
6012
|
if ((parser.flags & 1) === 0) {
|
|
@@ -6022,7 +6023,7 @@ function parseYieldExpression(parser, context, inGroup, canAssign, start, line,
|
|
|
6022
6023
|
});
|
|
6023
6024
|
}
|
|
6024
6025
|
if (context & 1024)
|
|
6025
|
-
report(parser,
|
|
6026
|
+
report(parser, 95, 'yield');
|
|
6026
6027
|
return parseIdentifierOrArrow(parser, context, start, line, column);
|
|
6027
6028
|
}
|
|
6028
6029
|
function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
|
|
@@ -6045,7 +6046,7 @@ function parseAwaitExpression(parser, context, inNew, inGroup, start, line, colu
|
|
|
6045
6046
|
});
|
|
6046
6047
|
}
|
|
6047
6048
|
if (context & 2048)
|
|
6048
|
-
report(parser,
|
|
6049
|
+
report(parser, 96);
|
|
6049
6050
|
return parseIdentifierOrArrow(parser, context, start, line, column);
|
|
6050
6051
|
}
|
|
6051
6052
|
function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
|
|
@@ -6060,7 +6061,7 @@ function parseFunctionBody(parser, context, scope, origin, firstRestricted, scop
|
|
|
6060
6061
|
if (isValidStrictMode(parser, index, tokenPos, tokenValue)) {
|
|
6061
6062
|
context |= 1024;
|
|
6062
6063
|
if (parser.flags & 128) {
|
|
6063
|
-
reportMessageAt(parser.index, parser.line, parser.tokenPos,
|
|
6064
|
+
reportMessageAt(parser.index, parser.line, parser.tokenPos, 64);
|
|
6064
6065
|
}
|
|
6065
6066
|
if (parser.flags & 64) {
|
|
6066
6067
|
reportMessageAt(parser.index, parser.line, parser.tokenPos, 8);
|
|
@@ -6071,16 +6072,16 @@ function parseFunctionBody(parser, context, scope, origin, firstRestricted, scop
|
|
|
6071
6072
|
if (context & 1024) {
|
|
6072
6073
|
if (firstRestricted) {
|
|
6073
6074
|
if ((firstRestricted & 537079808) === 537079808) {
|
|
6074
|
-
report(parser,
|
|
6075
|
+
report(parser, 116);
|
|
6075
6076
|
}
|
|
6076
6077
|
if ((firstRestricted & 36864) === 36864) {
|
|
6077
6078
|
report(parser, 38);
|
|
6078
6079
|
}
|
|
6079
6080
|
}
|
|
6080
6081
|
if (parser.flags & 512)
|
|
6081
|
-
report(parser,
|
|
6082
|
+
report(parser, 116);
|
|
6082
6083
|
if (parser.flags & 256)
|
|
6083
|
-
report(parser,
|
|
6084
|
+
report(parser, 115);
|
|
6084
6085
|
}
|
|
6085
6086
|
if (context & 64 &&
|
|
6086
6087
|
scope &&
|
|
@@ -6110,7 +6111,7 @@ function parseSuperExpression(parser, context, start, line, column) {
|
|
|
6110
6111
|
nextToken(parser, context);
|
|
6111
6112
|
switch (parser.token) {
|
|
6112
6113
|
case 67108991:
|
|
6113
|
-
report(parser,
|
|
6114
|
+
report(parser, 162);
|
|
6114
6115
|
case 67174411: {
|
|
6115
6116
|
if ((context & 524288) === 0)
|
|
6116
6117
|
report(parser, 26);
|
|
@@ -6139,7 +6140,7 @@ function parseLeftHandSideExpression(parser, context, canAssign, inGroup, isLHS,
|
|
|
6139
6140
|
}
|
|
6140
6141
|
function parseUpdateExpression(parser, context, expr, start, line, column) {
|
|
6141
6142
|
if (parser.assignable & 2)
|
|
6142
|
-
report(parser,
|
|
6143
|
+
report(parser, 53);
|
|
6143
6144
|
const { token } = parser;
|
|
6144
6145
|
nextToken(parser, context);
|
|
6145
6146
|
parser.assignable = 2;
|
|
@@ -6222,7 +6223,7 @@ function parseMemberOrUpdateExpression(parser, context, expr, inGroup, inChain,
|
|
|
6222
6223
|
}
|
|
6223
6224
|
default:
|
|
6224
6225
|
if ((parser.flags & 2048) === 2048) {
|
|
6225
|
-
report(parser,
|
|
6226
|
+
report(parser, 161);
|
|
6226
6227
|
}
|
|
6227
6228
|
parser.assignable = 2;
|
|
6228
6229
|
expr = finishNode(parser, context, start, line, column, {
|
|
@@ -6279,7 +6280,7 @@ function parseOptionalChain(parser, context, expr, start, line, column) {
|
|
|
6279
6280
|
}
|
|
6280
6281
|
else {
|
|
6281
6282
|
if ((parser.token & (143360 | 4096)) === 0)
|
|
6282
|
-
report(parser,
|
|
6283
|
+
report(parser, 155);
|
|
6283
6284
|
const property = parseIdentifier(parser, context, 0);
|
|
6284
6285
|
parser.assignable = 2;
|
|
6285
6286
|
node = finishNode(parser, context, start, line, column, {
|
|
@@ -6297,7 +6298,7 @@ function parseOptionalChain(parser, context, expr, start, line, column) {
|
|
|
6297
6298
|
}
|
|
6298
6299
|
function parsePropertyOrPrivatePropertyName(parser, context) {
|
|
6299
6300
|
if ((parser.token & (143360 | 4096)) === 0 && parser.token !== 131) {
|
|
6300
|
-
report(parser,
|
|
6301
|
+
report(parser, 155);
|
|
6301
6302
|
}
|
|
6302
6303
|
return context & 1 && parser.token === 131
|
|
6303
6304
|
? parsePrivateIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos)
|
|
@@ -6305,14 +6306,14 @@ function parsePropertyOrPrivatePropertyName(parser, context) {
|
|
|
6305
6306
|
}
|
|
6306
6307
|
function parseUpdateExpressionPrefixed(parser, context, inNew, isLHS, start, line, column) {
|
|
6307
6308
|
if (inNew)
|
|
6308
|
-
report(parser,
|
|
6309
|
+
report(parser, 54);
|
|
6309
6310
|
if (!isLHS)
|
|
6310
6311
|
report(parser, 0);
|
|
6311
6312
|
const { token } = parser;
|
|
6312
6313
|
nextToken(parser, context | 32768);
|
|
6313
6314
|
const arg = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6314
6315
|
if (parser.assignable & 2) {
|
|
6315
|
-
report(parser,
|
|
6316
|
+
report(parser, 53);
|
|
6316
6317
|
}
|
|
6317
6318
|
parser.assignable = 2;
|
|
6318
6319
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -6341,12 +6342,12 @@ function parsePrimaryExpression(parser, context, kind, inNew, canAssign, isPatte
|
|
|
6341
6342
|
return parseArrowFromIdentifier(parser, context, tokenValue, expr, inNew, canAssign, 0, start, line, column);
|
|
6342
6343
|
}
|
|
6343
6344
|
if (context & 16384 && token === 537079928)
|
|
6344
|
-
report(parser,
|
|
6345
|
+
report(parser, 127);
|
|
6345
6346
|
if (token === 241739) {
|
|
6346
6347
|
if (context & 1024)
|
|
6347
|
-
report(parser,
|
|
6348
|
+
report(parser, 110);
|
|
6348
6349
|
if (kind & (8 | 16))
|
|
6349
|
-
report(parser,
|
|
6350
|
+
report(parser, 98);
|
|
6350
6351
|
}
|
|
6351
6352
|
parser.assignable =
|
|
6352
6353
|
context & 1024 && (token & 537079808) === 537079808
|
|
@@ -6417,14 +6418,14 @@ function parseImportCallOrMetaExpression(parser, context, inNew, inGroup, start,
|
|
|
6417
6418
|
return parseImportMetaExpression(parser, context, expr, start, line, column);
|
|
6418
6419
|
}
|
|
6419
6420
|
if (inNew)
|
|
6420
|
-
report(parser,
|
|
6421
|
+
report(parser, 138);
|
|
6421
6422
|
expr = parseImportExpression(parser, context, inGroup, start, line, column);
|
|
6422
6423
|
parser.assignable = 2;
|
|
6423
6424
|
return parseMemberOrUpdateExpression(parser, context, expr, inGroup, 0, start, line, column);
|
|
6424
6425
|
}
|
|
6425
6426
|
function parseImportMetaExpression(parser, context, meta, start, line, column) {
|
|
6426
6427
|
if ((context & 2048) === 0)
|
|
6427
|
-
report(parser,
|
|
6428
|
+
report(parser, 164);
|
|
6428
6429
|
nextToken(parser, context);
|
|
6429
6430
|
if (parser.token !== 143495 && parser.tokenValue !== 'meta')
|
|
6430
6431
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
@@ -6438,7 +6439,7 @@ function parseImportMetaExpression(parser, context, meta, start, line, column) {
|
|
|
6438
6439
|
function parseImportExpression(parser, context, inGroup, start, line, column) {
|
|
6439
6440
|
consume(parser, context | 32768, 67174411);
|
|
6440
6441
|
if (parser.token === 14)
|
|
6441
|
-
report(parser,
|
|
6442
|
+
report(parser, 139);
|
|
6442
6443
|
const source = parseExpression(parser, context, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6443
6444
|
consume(parser, context, 16);
|
|
6444
6445
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -6483,14 +6484,14 @@ function parseTemplate(parser, context) {
|
|
|
6483
6484
|
];
|
|
6484
6485
|
const expressions = [parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos)];
|
|
6485
6486
|
if (parser.token !== 1074790415)
|
|
6486
|
-
report(parser,
|
|
6487
|
+
report(parser, 81);
|
|
6487
6488
|
while ((parser.token = scanTemplateTail(parser, context)) !== 67174409) {
|
|
6488
6489
|
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
|
6489
6490
|
consume(parser, context | 32768, 67174408);
|
|
6490
6491
|
quasis.push(parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenPos, linePos, colPos, false));
|
|
6491
6492
|
expressions.push(parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos));
|
|
6492
6493
|
if (parser.token !== 1074790415)
|
|
6493
|
-
report(parser,
|
|
6494
|
+
report(parser, 81);
|
|
6494
6495
|
}
|
|
6495
6496
|
{
|
|
6496
6497
|
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
|
@@ -6706,10 +6707,10 @@ function parseFunctionExpression(parser, context, isAsync, inGroup, start, line,
|
|
|
6706
6707
|
function parseArrayLiteral(parser, context, skipInitializer, inGroup, start, line, column) {
|
|
6707
6708
|
const expr = parseArrayExpressionOrPattern(parser, context, void 0, skipInitializer, inGroup, 0, 2, 0, start, line, column);
|
|
6708
6709
|
if (context & 256 && parser.destructible & 64) {
|
|
6709
|
-
report(parser,
|
|
6710
|
+
report(parser, 61);
|
|
6710
6711
|
}
|
|
6711
6712
|
if (parser.destructible & 8) {
|
|
6712
|
-
report(parser,
|
|
6713
|
+
report(parser, 60);
|
|
6713
6714
|
}
|
|
6714
6715
|
return expr;
|
|
6715
6716
|
}
|
|
@@ -6804,7 +6805,7 @@ function parseArrayExpressionOrPattern(parser, context, scope, skipInitializer,
|
|
|
6804
6805
|
}
|
|
6805
6806
|
}
|
|
6806
6807
|
else if (parser.destructible & 8) {
|
|
6807
|
-
report(parser,
|
|
6808
|
+
report(parser, 69);
|
|
6808
6809
|
}
|
|
6809
6810
|
else {
|
|
6810
6811
|
left = parseMemberOrUpdateExpression(parser, context, left, inGroup, 0, tokenPos, linePos, colPos);
|
|
@@ -6903,7 +6904,7 @@ function parseSpreadOrRestElement(parser, context, scope, closingToken, kind, or
|
|
|
6903
6904
|
argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
|
|
6904
6905
|
if (parser.token !== 18 && parser.token !== closingToken) {
|
|
6905
6906
|
if (parser.assignable & 2 && parser.token === 1077936157)
|
|
6906
|
-
report(parser,
|
|
6907
|
+
report(parser, 69);
|
|
6907
6908
|
destructible |= 16;
|
|
6908
6909
|
argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, argument);
|
|
6909
6910
|
}
|
|
@@ -6930,7 +6931,7 @@ function parseSpreadOrRestElement(parser, context, scope, closingToken, kind, or
|
|
|
6930
6931
|
token = parser.token;
|
|
6931
6932
|
if (token !== 1077936157 && token !== closingToken && token !== 18) {
|
|
6932
6933
|
if (parser.destructible & 8)
|
|
6933
|
-
report(parser,
|
|
6934
|
+
report(parser, 69);
|
|
6934
6935
|
argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
|
|
6935
6936
|
destructible |= parser.assignable & 2 ? 16 : 0;
|
|
6936
6937
|
if ((parser.token & 4194304) === 4194304) {
|
|
@@ -6980,7 +6981,7 @@ function parseSpreadOrRestElement(parser, context, scope, closingToken, kind, or
|
|
|
6980
6981
|
}
|
|
6981
6982
|
parser.destructible = destructible;
|
|
6982
6983
|
if (parser.token !== closingToken && parser.token !== 18)
|
|
6983
|
-
report(parser,
|
|
6984
|
+
report(parser, 156);
|
|
6984
6985
|
return finishNode(parser, context, start, line, column, {
|
|
6985
6986
|
type: isPattern ? 'RestElement' : 'SpreadElement',
|
|
6986
6987
|
argument: argument
|
|
@@ -7041,10 +7042,10 @@ function parseMethodDefinition(parser, context, kind, inGroup, start, line, colu
|
|
|
7041
7042
|
function parseObjectLiteral(parser, context, skipInitializer, inGroup, start, line, column) {
|
|
7042
7043
|
const expr = parseObjectLiteralOrPattern(parser, context, void 0, skipInitializer, inGroup, 0, 2, 0, start, line, column);
|
|
7043
7044
|
if (context & 256 && parser.destructible & 64) {
|
|
7044
|
-
report(parser,
|
|
7045
|
+
report(parser, 61);
|
|
7045
7046
|
}
|
|
7046
7047
|
if (parser.destructible & 8) {
|
|
7047
|
-
report(parser,
|
|
7048
|
+
report(parser, 60);
|
|
7048
7049
|
}
|
|
7049
7050
|
return expr;
|
|
7050
7051
|
}
|
|
@@ -7161,7 +7162,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7161
7162
|
destructible |= 16;
|
|
7162
7163
|
}
|
|
7163
7164
|
else if (parser.destructible & 8) {
|
|
7164
|
-
report(parser,
|
|
7165
|
+
report(parser, 69);
|
|
7165
7166
|
}
|
|
7166
7167
|
else {
|
|
7167
7168
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
@@ -7221,10 +7222,10 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7221
7222
|
else if (parser.token & (143360 | 4096)) {
|
|
7222
7223
|
destructible |= 16;
|
|
7223
7224
|
if (token === 121)
|
|
7224
|
-
report(parser,
|
|
7225
|
+
report(parser, 93);
|
|
7225
7226
|
if (token === 209007) {
|
|
7226
7227
|
if (parser.flags & 1)
|
|
7227
|
-
report(parser,
|
|
7228
|
+
report(parser, 129);
|
|
7228
7229
|
state |= 16;
|
|
7229
7230
|
}
|
|
7230
7231
|
key = parseIdentifier(parser, context, 0);
|
|
@@ -7243,11 +7244,14 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7243
7244
|
}
|
|
7244
7245
|
else if (parser.token === 8457014) {
|
|
7245
7246
|
destructible |= 16;
|
|
7246
|
-
if (token === 12402
|
|
7247
|
+
if (token === 12402) {
|
|
7247
7248
|
report(parser, 40);
|
|
7248
7249
|
}
|
|
7250
|
+
else if (token === 12403) {
|
|
7251
|
+
report(parser, 41);
|
|
7252
|
+
}
|
|
7249
7253
|
else if (token === 143483) {
|
|
7250
|
-
report(parser,
|
|
7254
|
+
report(parser, 93);
|
|
7251
7255
|
}
|
|
7252
7256
|
nextToken(parser, context);
|
|
7253
7257
|
state |=
|
|
@@ -7282,7 +7286,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7282
7286
|
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7283
7287
|
}
|
|
7284
7288
|
else {
|
|
7285
|
-
report(parser,
|
|
7289
|
+
report(parser, 130);
|
|
7286
7290
|
}
|
|
7287
7291
|
}
|
|
7288
7292
|
else if ((parser.token & 134217728) === 134217728) {
|
|
@@ -7383,7 +7387,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7383
7387
|
destructible = parser.assignable | 16;
|
|
7384
7388
|
}
|
|
7385
7389
|
else {
|
|
7386
|
-
report(parser,
|
|
7390
|
+
report(parser, 131);
|
|
7387
7391
|
}
|
|
7388
7392
|
}
|
|
7389
7393
|
else if (parser.token === 69271571) {
|
|
@@ -7440,7 +7444,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7440
7444
|
destructible |= 16;
|
|
7441
7445
|
}
|
|
7442
7446
|
else if (destructible & 8) {
|
|
7443
|
-
report(parser,
|
|
7447
|
+
report(parser, 60);
|
|
7444
7448
|
}
|
|
7445
7449
|
else {
|
|
7446
7450
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
@@ -7492,7 +7496,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7492
7496
|
destructible = 16;
|
|
7493
7497
|
}
|
|
7494
7498
|
else {
|
|
7495
|
-
report(parser,
|
|
7499
|
+
report(parser, 42);
|
|
7496
7500
|
}
|
|
7497
7501
|
}
|
|
7498
7502
|
else if (token === 8457014) {
|
|
@@ -7508,10 +7512,10 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7508
7512
|
}
|
|
7509
7513
|
else {
|
|
7510
7514
|
reportMessageAt(index, line, index, token === 209007
|
|
7511
|
-
?
|
|
7515
|
+
? 44
|
|
7512
7516
|
: token === 12402 || parser.token === 12403
|
|
7513
|
-
?
|
|
7514
|
-
:
|
|
7517
|
+
? 43
|
|
7518
|
+
: 45, KeywordDescTable[token & 255]);
|
|
7515
7519
|
}
|
|
7516
7520
|
}
|
|
7517
7521
|
else if ((parser.token & 134217728) === 134217728) {
|
|
@@ -7527,7 +7531,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7527
7531
|
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7528
7532
|
}
|
|
7529
7533
|
else {
|
|
7530
|
-
report(parser,
|
|
7534
|
+
report(parser, 123);
|
|
7531
7535
|
}
|
|
7532
7536
|
}
|
|
7533
7537
|
else {
|
|
@@ -7609,7 +7613,7 @@ function parseMethodFormals(parser, context, scope, kind, type, inGroup) {
|
|
|
7609
7613
|
}
|
|
7610
7614
|
isSimpleParameterList = 1;
|
|
7611
7615
|
if (parser.destructible & (32 | 16))
|
|
7612
|
-
report(parser,
|
|
7616
|
+
report(parser, 48);
|
|
7613
7617
|
}
|
|
7614
7618
|
if (parser.token === 1077936157) {
|
|
7615
7619
|
nextToken(parser, context | 32768);
|
|
@@ -7701,7 +7705,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7701
7705
|
parser.assignable = 2;
|
|
7702
7706
|
if (parser.token !== 16 && parser.token !== 18) {
|
|
7703
7707
|
if (destructible & 8)
|
|
7704
|
-
report(parser,
|
|
7708
|
+
report(parser, 119);
|
|
7705
7709
|
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, tokenPos, linePos, colPos);
|
|
7706
7710
|
destructible |= 16;
|
|
7707
7711
|
if (parser.token !== 16 && parser.token !== 18) {
|
|
@@ -7712,7 +7716,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7712
7716
|
else if (token === 14) {
|
|
7713
7717
|
expr = parseSpreadOrRestElement(parser, context, scope, 16, kind, origin, 0, 1, 0, tokenPos, linePos, colPos);
|
|
7714
7718
|
if (parser.destructible & 16)
|
|
7715
|
-
report(parser,
|
|
7719
|
+
report(parser, 72);
|
|
7716
7720
|
isSimpleParameterList = 1;
|
|
7717
7721
|
if (isSequence && (parser.token === 16 || parser.token === 18)) {
|
|
7718
7722
|
expressions.push(expr);
|
|
@@ -7769,7 +7773,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7769
7773
|
}
|
|
7770
7774
|
consume(parser, context, 16);
|
|
7771
7775
|
if (destructible & 16 && destructible & 8)
|
|
7772
|
-
report(parser,
|
|
7776
|
+
report(parser, 146);
|
|
7773
7777
|
destructible |=
|
|
7774
7778
|
parser.destructible & 256
|
|
7775
7779
|
? 256
|
|
@@ -7778,7 +7782,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7778
7782
|
: 0;
|
|
7779
7783
|
if (parser.token === 10) {
|
|
7780
7784
|
if (destructible & (32 | 16))
|
|
7781
|
-
report(parser,
|
|
7785
|
+
report(parser, 47);
|
|
7782
7786
|
if (context & (4194304 | 2048) && destructible & 128)
|
|
7783
7787
|
report(parser, 29);
|
|
7784
7788
|
if (context & (1024 | 2097152) && destructible & 256) {
|
|
@@ -7789,7 +7793,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7789
7793
|
return parseParenthesizedArrow(parser, context, scope, isSequence ? expressions : [expr], canAssign, 0, start, line, column);
|
|
7790
7794
|
}
|
|
7791
7795
|
else if (destructible & 8) {
|
|
7792
|
-
report(parser,
|
|
7796
|
+
report(parser, 140);
|
|
7793
7797
|
}
|
|
7794
7798
|
parser.destructible = ((parser.destructible | 256) ^ 256) | destructible;
|
|
7795
7799
|
return context & 128
|
|
@@ -7814,23 +7818,23 @@ function parseIdentifierOrArrow(parser, context, start, line, column) {
|
|
|
7814
7818
|
}
|
|
7815
7819
|
function parseArrowFromIdentifier(parser, context, value, expr, inNew, canAssign, isAsync, start, line, column) {
|
|
7816
7820
|
if (!canAssign)
|
|
7817
|
-
report(parser,
|
|
7821
|
+
report(parser, 55);
|
|
7818
7822
|
if (inNew)
|
|
7819
|
-
report(parser,
|
|
7823
|
+
report(parser, 49);
|
|
7820
7824
|
parser.flags &= ~128;
|
|
7821
7825
|
const scope = context & 64 ? createArrowHeadParsingScope(parser, context, value) : void 0;
|
|
7822
7826
|
return parseArrowFunctionExpression(parser, context, scope, [expr], isAsync, start, line, column);
|
|
7823
7827
|
}
|
|
7824
7828
|
function parseParenthesizedArrow(parser, context, scope, params, canAssign, isAsync, start, line, column) {
|
|
7825
7829
|
if (!canAssign)
|
|
7826
|
-
report(parser,
|
|
7830
|
+
report(parser, 55);
|
|
7827
7831
|
for (let i = 0; i < params.length; ++i)
|
|
7828
7832
|
reinterpretToPattern(parser, params[i]);
|
|
7829
7833
|
return parseArrowFunctionExpression(parser, context, scope, params, isAsync, start, line, column);
|
|
7830
7834
|
}
|
|
7831
7835
|
function parseArrowFunctionExpression(parser, context, scope, params, isAsync, start, line, column) {
|
|
7832
7836
|
if (parser.flags & 1)
|
|
7833
|
-
report(parser,
|
|
7837
|
+
report(parser, 46);
|
|
7834
7838
|
consume(parser, context | 32768, 10);
|
|
7835
7839
|
context = ((context | 15728640) ^ 15728640) | (isAsync << 22);
|
|
7836
7840
|
const expression = parser.token !== 2162700;
|
|
@@ -7849,16 +7853,16 @@ function parseArrowFunctionExpression(parser, context, scope, params, isAsync, s
|
|
|
7849
7853
|
switch (parser.token) {
|
|
7850
7854
|
case 69271571:
|
|
7851
7855
|
if ((parser.flags & 1) === 0) {
|
|
7852
|
-
report(parser,
|
|
7856
|
+
report(parser, 113);
|
|
7853
7857
|
}
|
|
7854
7858
|
break;
|
|
7855
7859
|
case 67108877:
|
|
7856
7860
|
case 67174409:
|
|
7857
7861
|
case 22:
|
|
7858
|
-
report(parser,
|
|
7862
|
+
report(parser, 114);
|
|
7859
7863
|
case 67174411:
|
|
7860
7864
|
if ((parser.flags & 1) === 0) {
|
|
7861
|
-
report(parser,
|
|
7865
|
+
report(parser, 113);
|
|
7862
7866
|
}
|
|
7863
7867
|
parser.flags |= 1024;
|
|
7864
7868
|
break;
|
|
@@ -7866,7 +7870,7 @@ function parseArrowFunctionExpression(parser, context, scope, params, isAsync, s
|
|
|
7866
7870
|
if ((parser.token & 8454144) === 8454144 && (parser.flags & 1) === 0)
|
|
7867
7871
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
7868
7872
|
if ((parser.token & 33619968) === 33619968)
|
|
7869
|
-
report(parser,
|
|
7873
|
+
report(parser, 122);
|
|
7870
7874
|
}
|
|
7871
7875
|
parser.assignable = 2;
|
|
7872
7876
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -7914,7 +7918,7 @@ function parseFormalParametersOrFormalList(parser, context, scope, inGroup, kind
|
|
|
7914
7918
|
}
|
|
7915
7919
|
isSimpleParameterList = 1;
|
|
7916
7920
|
if (parser.destructible & (32 | 16)) {
|
|
7917
|
-
report(parser,
|
|
7921
|
+
report(parser, 48);
|
|
7918
7922
|
}
|
|
7919
7923
|
}
|
|
7920
7924
|
if (parser.token === 1077936157) {
|
|
@@ -7990,16 +7994,16 @@ function parseNewExpression(parser, context, inGroup, start, line, column) {
|
|
|
7990
7994
|
parser.assignable = 2;
|
|
7991
7995
|
return parseMetaProperty(parser, context, id, start, line, column);
|
|
7992
7996
|
}
|
|
7993
|
-
report(parser,
|
|
7997
|
+
report(parser, 92);
|
|
7994
7998
|
}
|
|
7995
7999
|
parser.assignable = 2;
|
|
7996
8000
|
if ((parser.token & 16842752) === 16842752) {
|
|
7997
|
-
report(parser,
|
|
8001
|
+
report(parser, 63, KeywordDescTable[parser.token & 255]);
|
|
7998
8002
|
}
|
|
7999
8003
|
const expr = parsePrimaryExpression(parser, context, 2, 1, 0, 0, inGroup, 1, tokenPos, linePos, colPos);
|
|
8000
8004
|
context = (context | 134217728) ^ 134217728;
|
|
8001
8005
|
if (parser.token === 67108991)
|
|
8002
|
-
report(parser,
|
|
8006
|
+
report(parser, 163);
|
|
8003
8007
|
const callee = parseMembeExpressionNoCall(parser, context, expr, inGroup, tokenPos, linePos, colPos);
|
|
8004
8008
|
parser.assignable = 2;
|
|
8005
8009
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8034,7 +8038,7 @@ function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kin
|
|
|
8034
8038
|
if (consumeOpt(parser, context, 16)) {
|
|
8035
8039
|
if (parser.token === 10) {
|
|
8036
8040
|
if (flags & 1)
|
|
8037
|
-
report(parser,
|
|
8041
|
+
report(parser, 46);
|
|
8038
8042
|
return parseParenthesizedArrow(parser, context, scope, [], canAssign, 1, start, line, column);
|
|
8039
8043
|
}
|
|
8040
8044
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8090,7 +8094,7 @@ function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kin
|
|
|
8090
8094
|
isSimpleParameterList = 1;
|
|
8091
8095
|
if (parser.token !== 16 && parser.token !== 18) {
|
|
8092
8096
|
if (destructible & 8)
|
|
8093
|
-
report(parser,
|
|
8097
|
+
report(parser, 119);
|
|
8094
8098
|
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, tokenPos, linePos, colPos);
|
|
8095
8099
|
destructible |= 16;
|
|
8096
8100
|
if ((parser.token & 8454144) === 8454144) {
|
|
@@ -8138,7 +8142,7 @@ function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kin
|
|
|
8138
8142
|
if (destructible & (32 | 16))
|
|
8139
8143
|
report(parser, 25);
|
|
8140
8144
|
if (parser.flags & 1 || flags & 1)
|
|
8141
|
-
report(parser,
|
|
8145
|
+
report(parser, 46);
|
|
8142
8146
|
if (destructible & 128)
|
|
8143
8147
|
report(parser, 29);
|
|
8144
8148
|
if (context & (1024 | 2097152) && destructible & 256)
|
|
@@ -8148,7 +8152,7 @@ function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kin
|
|
|
8148
8152
|
return parseParenthesizedArrow(parser, context, scope, params, canAssign, 1, start, line, column);
|
|
8149
8153
|
}
|
|
8150
8154
|
else if (destructible & 8) {
|
|
8151
|
-
report(parser,
|
|
8155
|
+
report(parser, 60);
|
|
8152
8156
|
}
|
|
8153
8157
|
parser.assignable = 2;
|
|
8154
8158
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8193,10 +8197,10 @@ function parseClassDeclaration(parser, context, scope, flags, start, line, colum
|
|
|
8193
8197
|
const { tokenValue } = parser;
|
|
8194
8198
|
if (parser.token & 4096 && parser.token !== 20567) {
|
|
8195
8199
|
if (isStrictReservedWord(parser, context, parser.token)) {
|
|
8196
|
-
report(parser,
|
|
8200
|
+
report(parser, 115);
|
|
8197
8201
|
}
|
|
8198
8202
|
if ((parser.token & 537079808) === 537079808) {
|
|
8199
|
-
report(parser,
|
|
8203
|
+
report(parser, 116);
|
|
8200
8204
|
}
|
|
8201
8205
|
if (scope) {
|
|
8202
8206
|
addBlockName(parser, context, scope, tokenValue, 32, 0);
|
|
@@ -8249,9 +8253,9 @@ function parseClassExpression(parser, context, inGroup, start, line, column) {
|
|
|
8249
8253
|
nextToken(parser, context);
|
|
8250
8254
|
if (parser.token & 4096 && parser.token !== 20567) {
|
|
8251
8255
|
if (isStrictReservedWord(parser, context, parser.token))
|
|
8252
|
-
report(parser, 114);
|
|
8253
|
-
if ((parser.token & 537079808) === 537079808) {
|
|
8254
8256
|
report(parser, 115);
|
|
8257
|
+
if ((parser.token & 537079808) === 537079808) {
|
|
8258
|
+
report(parser, 116);
|
|
8255
8259
|
}
|
|
8256
8260
|
id = parseIdentifier(parser, context, 0);
|
|
8257
8261
|
}
|
|
@@ -8310,13 +8314,13 @@ function parseClassBody(parser, context, inheritedContext, scope, kind, origin,
|
|
|
8310
8314
|
decorators = parseDecorators(parser, context);
|
|
8311
8315
|
length = decorators.length;
|
|
8312
8316
|
if (length > 0 && parser.tokenValue === 'constructor') {
|
|
8313
|
-
report(parser,
|
|
8317
|
+
report(parser, 107);
|
|
8314
8318
|
}
|
|
8315
8319
|
if (parser.token === 1074790415)
|
|
8316
|
-
report(parser,
|
|
8320
|
+
report(parser, 106);
|
|
8317
8321
|
if (consumeOpt(parser, context, 1074790417)) {
|
|
8318
8322
|
if (length > 0)
|
|
8319
|
-
report(parser,
|
|
8323
|
+
report(parser, 117);
|
|
8320
8324
|
continue;
|
|
8321
8325
|
}
|
|
8322
8326
|
body.push(parseClassElementList(parser, context, scope, inheritedContext, kind, decorators, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
|
|
@@ -8413,20 +8417,20 @@ function parseClassElementList(parser, context, scope, inheritedContext, type, d
|
|
|
8413
8417
|
key = parsePrivateIdentifier(parser, context, tokenPos, linePos, colPos);
|
|
8414
8418
|
}
|
|
8415
8419
|
else
|
|
8416
|
-
report(parser,
|
|
8420
|
+
report(parser, 132);
|
|
8417
8421
|
}
|
|
8418
8422
|
if ((kind & 2) === 0) {
|
|
8419
8423
|
if (parser.tokenValue === 'constructor') {
|
|
8420
8424
|
if ((parser.token & 1073741824) === 1073741824) {
|
|
8421
|
-
report(parser,
|
|
8425
|
+
report(parser, 126);
|
|
8422
8426
|
}
|
|
8423
8427
|
else if ((kind & 32) === 0 && parser.token === 67174411) {
|
|
8424
8428
|
if (kind & (768 | 16 | 128 | 8)) {
|
|
8425
|
-
report(parser,
|
|
8429
|
+
report(parser, 51, 'accessor');
|
|
8426
8430
|
}
|
|
8427
8431
|
else if ((context & 524288) === 0) {
|
|
8428
8432
|
if (parser.flags & 32)
|
|
8429
|
-
report(parser,
|
|
8433
|
+
report(parser, 52);
|
|
8430
8434
|
else
|
|
8431
8435
|
parser.flags |= 32;
|
|
8432
8436
|
}
|
|
@@ -8436,7 +8440,7 @@ function parseClassElementList(parser, context, scope, inheritedContext, type, d
|
|
|
8436
8440
|
else if ((kind & 4096) === 0 &&
|
|
8437
8441
|
kind & (32 | 768 | 8 | 16) &&
|
|
8438
8442
|
parser.tokenValue === 'prototype') {
|
|
8439
|
-
report(parser,
|
|
8443
|
+
report(parser, 50);
|
|
8440
8444
|
}
|
|
8441
8445
|
}
|
|
8442
8446
|
if (context & 1 && parser.token !== 67174411) {
|
|
@@ -8478,7 +8482,7 @@ function parsePrivateIdentifier(parser, context, start, line, column) {
|
|
|
8478
8482
|
nextToken(parser, context);
|
|
8479
8483
|
const { tokenValue } = parser;
|
|
8480
8484
|
if (tokenValue === 'constructor')
|
|
8481
|
-
report(parser,
|
|
8485
|
+
report(parser, 125);
|
|
8482
8486
|
nextToken(parser, context);
|
|
8483
8487
|
return finishNode(parser, context, start, line, column, {
|
|
8484
8488
|
type: 'PrivateIdentifier',
|
|
@@ -8493,7 +8497,7 @@ function parsePropertyDefinition(parser, context, key, state, decorators, start,
|
|
|
8493
8497
|
nextToken(parser, context | 32768);
|
|
8494
8498
|
const { tokenPos, linePos, colPos } = parser;
|
|
8495
8499
|
if (parser.token === 537079928)
|
|
8496
|
-
report(parser,
|
|
8500
|
+
report(parser, 116);
|
|
8497
8501
|
value = parsePrimaryExpression(parser, context | 16384, 2, 0, 1, 0, 0, 1, tokenPos, linePos, colPos);
|
|
8498
8502
|
if ((parser.token & 1073741824) !== 1073741824) {
|
|
8499
8503
|
value = parseMemberOrUpdateExpression(parser, context | 16384, value, 0, 0, tokenPos, linePos, colPos);
|
|
@@ -8521,33 +8525,33 @@ function parseBindingPattern(parser, context, scope, type, origin, start, line,
|
|
|
8521
8525
|
? parseArrayExpressionOrPattern(parser, context, scope, 1, 0, 1, type, origin, start, line, column)
|
|
8522
8526
|
: parseObjectLiteralOrPattern(parser, context, scope, 1, 0, 1, type, origin, start, line, column);
|
|
8523
8527
|
if (parser.destructible & 16)
|
|
8524
|
-
report(parser,
|
|
8528
|
+
report(parser, 48);
|
|
8525
8529
|
if (parser.destructible & 32)
|
|
8526
|
-
report(parser,
|
|
8530
|
+
report(parser, 48);
|
|
8527
8531
|
return left;
|
|
8528
8532
|
}
|
|
8529
8533
|
function parseAndClassifyIdentifier(parser, context, scope, kind, origin, start, line, column) {
|
|
8530
8534
|
const { tokenValue, token } = parser;
|
|
8531
8535
|
if (context & 1024) {
|
|
8532
8536
|
if ((token & 537079808) === 537079808) {
|
|
8533
|
-
report(parser,
|
|
8537
|
+
report(parser, 116);
|
|
8534
8538
|
}
|
|
8535
8539
|
else if ((token & 36864) === 36864) {
|
|
8536
|
-
report(parser,
|
|
8540
|
+
report(parser, 115);
|
|
8537
8541
|
}
|
|
8538
8542
|
}
|
|
8539
8543
|
if ((token & 20480) === 20480) {
|
|
8540
|
-
report(parser,
|
|
8544
|
+
report(parser, 100);
|
|
8541
8545
|
}
|
|
8542
8546
|
if (context & (2048 | 2097152) && token === 241773) {
|
|
8543
8547
|
report(parser, 30);
|
|
8544
8548
|
}
|
|
8545
8549
|
if (token === 241739) {
|
|
8546
8550
|
if (kind & (8 | 16))
|
|
8547
|
-
report(parser,
|
|
8551
|
+
report(parser, 98);
|
|
8548
8552
|
}
|
|
8549
8553
|
if (context & (4194304 | 2048) && token === 209008) {
|
|
8550
|
-
report(parser,
|
|
8554
|
+
report(parser, 96);
|
|
8551
8555
|
}
|
|
8552
8556
|
nextToken(parser, context);
|
|
8553
8557
|
if (scope)
|
|
@@ -8575,7 +8579,7 @@ function parseJSXRootElementOrFragment(parser, context, inJSXChild, start, line,
|
|
|
8575
8579
|
closingElement = parseJSXClosingElement(parser, context, inJSXChild, parser.tokenPos, parser.linePos, parser.colPos);
|
|
8576
8580
|
const close = isEqualTagName(closingElement.name);
|
|
8577
8581
|
if (isEqualTagName(openingElement.name) !== close)
|
|
8578
|
-
report(parser,
|
|
8582
|
+
report(parser, 150, close);
|
|
8579
8583
|
}
|
|
8580
8584
|
return finishNode(parser, context, start, line, column, {
|
|
8581
8585
|
type: 'JSXElement',
|
|
@@ -8731,7 +8735,7 @@ function parseJsxAttribute(parser, context, start, line, column) {
|
|
|
8731
8735
|
value = parseJSXExpressionContainer(parser, context, 1, 1, tokenPos, linePos, colPos);
|
|
8732
8736
|
break;
|
|
8733
8737
|
default:
|
|
8734
|
-
report(parser,
|
|
8738
|
+
report(parser, 149);
|
|
8735
8739
|
}
|
|
8736
8740
|
}
|
|
8737
8741
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8757,7 +8761,7 @@ function parseJSXExpressionContainer(parser, context, inJSXChild, isAttr, start,
|
|
|
8757
8761
|
let expression = null;
|
|
8758
8762
|
if (parser.token === 1074790415) {
|
|
8759
8763
|
if (isAttr)
|
|
8760
|
-
report(parser,
|
|
8764
|
+
report(parser, 152);
|
|
8761
8765
|
expression = parseJSXEmptyExpression(parser, context, parser.startPos, parser.startLine, parser.startColumn);
|
|
8762
8766
|
}
|
|
8763
8767
|
else {
|
|
@@ -8804,7 +8808,7 @@ var estree = /*#__PURE__*/Object.freeze({
|
|
|
8804
8808
|
__proto__: null
|
|
8805
8809
|
});
|
|
8806
8810
|
|
|
8807
|
-
var version$1 = "4.3.
|
|
8811
|
+
var version$1 = "4.3.3";
|
|
8808
8812
|
|
|
8809
8813
|
const version = version$1;
|
|
8810
8814
|
function parseScript(source, options) {
|