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.cjs
CHANGED
|
@@ -14,7 +14,7 @@ const errorMessages = {
|
|
|
14
14
|
[8]: 'Octal literals are not allowed in strict mode',
|
|
15
15
|
[7]: 'Decimal integer literals with a leading zero are forbidden in strict mode',
|
|
16
16
|
[9]: 'Expected number in radix %0',
|
|
17
|
-
[
|
|
17
|
+
[146]: 'Invalid left-hand side assignment to a destructible right-hand side',
|
|
18
18
|
[10]: 'Non-number found after exponent indicator',
|
|
19
19
|
[11]: 'Invalid BigIntLiteral',
|
|
20
20
|
[12]: 'No identifiers allowed directly after numeric literal',
|
|
@@ -35,9 +35,9 @@ const errorMessages = {
|
|
|
35
35
|
[27]: 'Member access on super must be in a method',
|
|
36
36
|
[29]: 'Await expression not allowed in formal parameter',
|
|
37
37
|
[30]: 'Yield expression not allowed in formal parameter',
|
|
38
|
-
[
|
|
38
|
+
[93]: "Unexpected token: 'escaped keyword'",
|
|
39
39
|
[31]: 'Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses',
|
|
40
|
-
[
|
|
40
|
+
[120]: 'Async functions can only be declared at the top level or inside a block',
|
|
41
41
|
[32]: 'Unterminated regular expression',
|
|
42
42
|
[33]: 'Unexpected regular expression flag',
|
|
43
43
|
[34]: "Duplicate regular expression flag '%0'",
|
|
@@ -47,125 +47,126 @@ const errorMessages = {
|
|
|
47
47
|
[38]: 'Function name may not contain any reserved words or be eval or arguments in strict mode',
|
|
48
48
|
[39]: 'The rest operator is missing an argument',
|
|
49
49
|
[40]: 'A getter cannot be a generator',
|
|
50
|
-
[41]: 'A
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[45]: "
|
|
56
|
-
[46]:
|
|
57
|
-
[47]: 'The
|
|
58
|
-
[48]: '
|
|
59
|
-
[49]:
|
|
60
|
-
[50]:
|
|
61
|
-
[51]: '
|
|
62
|
-
[52]: '
|
|
63
|
-
[53]: 'Invalid
|
|
64
|
-
[54]: '
|
|
65
|
-
[55]: '
|
|
66
|
-
[56]: '
|
|
67
|
-
[57]:
|
|
68
|
-
[58]: '
|
|
69
|
-
[59]: 'Invalid
|
|
70
|
-
[60]: '
|
|
71
|
-
[61]: '
|
|
72
|
-
[62]:
|
|
73
|
-
[63]: "
|
|
74
|
-
[64]: '
|
|
75
|
-
[65]: '
|
|
76
|
-
[66]: 'Illegal
|
|
77
|
-
[67]: '
|
|
78
|
-
[68]: '
|
|
79
|
-
[69]: '
|
|
80
|
-
[70]: '
|
|
81
|
-
[71]: '
|
|
82
|
-
[
|
|
83
|
-
[74]: 'In
|
|
84
|
-
[75]: '
|
|
85
|
-
[76]:
|
|
86
|
-
[77]: '
|
|
87
|
-
[78]: 'Invalid
|
|
88
|
-
[79]: '
|
|
89
|
-
[80]: '
|
|
90
|
-
[
|
|
91
|
-
[
|
|
92
|
-
[
|
|
93
|
-
[84]: 'Catch clause parameter
|
|
94
|
-
[85]: '
|
|
95
|
-
[86]: '
|
|
96
|
-
[87]: '
|
|
97
|
-
[88]: '
|
|
98
|
-
[89]: '
|
|
99
|
-
[90]: '
|
|
100
|
-
[91]: '
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[95]: '
|
|
108
|
-
[
|
|
109
|
-
[101]: '
|
|
110
|
-
[102]: '
|
|
111
|
-
[103]: '
|
|
112
|
-
[104]:
|
|
113
|
-
[105]: '
|
|
114
|
-
[106]:
|
|
115
|
-
[
|
|
116
|
-
[109]:
|
|
117
|
-
[110]: '
|
|
118
|
-
[111]:
|
|
119
|
-
[112]:
|
|
120
|
-
[113]: 'Block body arrows can not be immediately
|
|
121
|
-
[114]: '
|
|
122
|
-
[115]: 'Unexpected
|
|
123
|
-
[116]: '
|
|
124
|
-
[117]: '
|
|
125
|
-
[118]: '
|
|
126
|
-
[
|
|
127
|
-
[121]: '
|
|
128
|
-
[122]: '
|
|
129
|
-
[123]: '
|
|
130
|
-
[
|
|
131
|
-
[
|
|
132
|
-
[
|
|
133
|
-
[127]: '
|
|
134
|
-
[128]: '
|
|
135
|
-
[129]: '
|
|
136
|
-
[
|
|
137
|
-
[132]:
|
|
138
|
-
[133]: '
|
|
139
|
-
[134]:
|
|
140
|
-
[135]:
|
|
141
|
-
[136]: 'import()
|
|
142
|
-
[137]: '
|
|
143
|
-
[138]: '
|
|
144
|
-
[139]:
|
|
145
|
-
[140]: "
|
|
146
|
-
[141]: "
|
|
147
|
-
[
|
|
148
|
-
[
|
|
149
|
-
[143]: '
|
|
150
|
-
[
|
|
151
|
-
[
|
|
152
|
-
[
|
|
153
|
-
[149]: '
|
|
154
|
-
[150]: '
|
|
155
|
-
[151]:
|
|
156
|
-
[152]: "
|
|
157
|
-
[153]: "'%0'
|
|
158
|
-
[154]: '
|
|
159
|
-
[155]: '
|
|
160
|
-
[156]: '
|
|
161
|
-
[157]: '
|
|
162
|
-
[158]: '
|
|
163
|
-
[159]: '
|
|
164
|
-
[160]: '
|
|
165
|
-
[161]: 'Invalid
|
|
166
|
-
[162]: 'Invalid optional chain from
|
|
167
|
-
[163]: '
|
|
168
|
-
[164]: '
|
|
50
|
+
[41]: 'A setter cannot be a generator',
|
|
51
|
+
[42]: 'A computed property name must be followed by a colon or paren',
|
|
52
|
+
[131]: 'Object literal keys that are strings or numbers must be a method or have a colon',
|
|
53
|
+
[44]: 'Found `* async x(){}` but this should be `async * x(){}`',
|
|
54
|
+
[43]: 'Getters and setters can not be generators',
|
|
55
|
+
[45]: "'%0' can not be generator method",
|
|
56
|
+
[46]: "No line break is allowed after '=>'",
|
|
57
|
+
[47]: 'The left-hand side of the arrow can only be destructed through assignment',
|
|
58
|
+
[48]: 'The binding declaration is not destructible',
|
|
59
|
+
[49]: 'Async arrow can not be followed by new expression',
|
|
60
|
+
[50]: "Classes may not have a static property named 'prototype'",
|
|
61
|
+
[51]: 'Class constructor may not be a %0',
|
|
62
|
+
[52]: 'Duplicate constructor method in class',
|
|
63
|
+
[53]: 'Invalid increment/decrement operand',
|
|
64
|
+
[54]: 'Invalid use of `new` keyword on an increment/decrement expression',
|
|
65
|
+
[55]: '`=>` is an invalid assignment target',
|
|
66
|
+
[56]: 'Rest element may not have a trailing comma',
|
|
67
|
+
[57]: 'Missing initializer in %0 declaration',
|
|
68
|
+
[58]: "'for-%0' loop head declarations can not have an initializer",
|
|
69
|
+
[59]: 'Invalid left-hand side in for-%0 loop: Must have a single binding',
|
|
70
|
+
[60]: 'Invalid shorthand property initializer',
|
|
71
|
+
[61]: 'Property name __proto__ appears more than once in object literal',
|
|
72
|
+
[62]: 'Let is disallowed as a lexically bound name',
|
|
73
|
+
[63]: "Invalid use of '%0' inside new expression",
|
|
74
|
+
[64]: "Illegal 'use strict' directive in function with non-simple parameter list",
|
|
75
|
+
[65]: 'Identifier "let" disallowed as left-hand side expression in strict mode',
|
|
76
|
+
[66]: 'Illegal continue statement',
|
|
77
|
+
[67]: 'Illegal break statement',
|
|
78
|
+
[68]: 'Cannot have `let[...]` as a var name in strict mode',
|
|
79
|
+
[69]: 'Invalid destructuring assignment target',
|
|
80
|
+
[70]: 'Rest parameter may not have a default initializer',
|
|
81
|
+
[71]: 'The rest argument must the be last parameter',
|
|
82
|
+
[72]: 'Invalid rest argument',
|
|
83
|
+
[74]: 'In strict mode code, functions can only be declared at top level or inside a block',
|
|
84
|
+
[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',
|
|
85
|
+
[76]: 'Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement',
|
|
86
|
+
[77]: "Class declaration can't appear in single-statement context",
|
|
87
|
+
[78]: 'Invalid left-hand side in for-%0',
|
|
88
|
+
[79]: 'Invalid assignment in for-%0',
|
|
89
|
+
[80]: 'for await (... of ...) is only valid in async functions and async generators',
|
|
90
|
+
[81]: 'The first token after the template expression should be a continuation of the template',
|
|
91
|
+
[83]: '`let` declaration not allowed here and `let` cannot be a regular var name in strict mode',
|
|
92
|
+
[82]: '`let \n [` is a restricted production at the start of a statement',
|
|
93
|
+
[84]: 'Catch clause requires exactly one parameter, not more (and no trailing comma)',
|
|
94
|
+
[85]: 'Catch clause parameter does not support default values',
|
|
95
|
+
[86]: 'Missing catch or finally after try',
|
|
96
|
+
[87]: 'More than one default clause in switch statement',
|
|
97
|
+
[88]: 'Illegal newline after throw',
|
|
98
|
+
[89]: 'Strict mode code may not include a with statement',
|
|
99
|
+
[90]: 'Illegal return statement',
|
|
100
|
+
[91]: 'The left hand side of the for-header binding declaration is not destructible',
|
|
101
|
+
[92]: 'new.target only allowed within functions',
|
|
102
|
+
[94]: "'#' not followed by identifier",
|
|
103
|
+
[100]: 'Invalid keyword',
|
|
104
|
+
[99]: "Can not use 'let' as a class name",
|
|
105
|
+
[98]: "'A lexical declaration can't define a 'let' binding",
|
|
106
|
+
[97]: 'Can not use `let` as variable name in strict mode',
|
|
107
|
+
[95]: "'%0' may not be used as an identifier in this context",
|
|
108
|
+
[96]: 'Await is only valid in async functions',
|
|
109
|
+
[101]: 'The %0 keyword can only be used with the module goal',
|
|
110
|
+
[102]: 'Unicode codepoint must not be greater than 0x10FFFF',
|
|
111
|
+
[103]: '%0 source must be string',
|
|
112
|
+
[104]: 'Only a identifier can be used to indicate alias',
|
|
113
|
+
[105]: "Only '*' or '{...}' can be imported after default",
|
|
114
|
+
[106]: 'Trailing decorator may be followed by method',
|
|
115
|
+
[107]: "Decorators can't be used with a constructor",
|
|
116
|
+
[109]: 'HTML comments are only allowed with web compatibility (Annex B)',
|
|
117
|
+
[110]: "The identifier 'let' must not be in expression position in strict mode",
|
|
118
|
+
[111]: 'Cannot assign to `eval` and `arguments` in strict mode',
|
|
119
|
+
[112]: "The left-hand side of a for-of loop may not start with 'let'",
|
|
120
|
+
[113]: 'Block body arrows can not be immediately invoked without a group',
|
|
121
|
+
[114]: 'Block body arrows can not be immediately accessed without a group',
|
|
122
|
+
[115]: 'Unexpected strict mode reserved word',
|
|
123
|
+
[116]: 'Unexpected eval or arguments in strict mode',
|
|
124
|
+
[117]: 'Decorators must not be followed by a semicolon',
|
|
125
|
+
[118]: 'Calling delete on expression not allowed in strict mode',
|
|
126
|
+
[119]: 'Pattern can not have a tail',
|
|
127
|
+
[121]: 'Can not have a `yield` expression on the left side of a ternary',
|
|
128
|
+
[122]: 'An arrow function can not have a postfix update operator',
|
|
129
|
+
[123]: 'Invalid object literal key character after generator star',
|
|
130
|
+
[124]: 'Private fields can not be deleted',
|
|
131
|
+
[126]: 'Classes may not have a field called constructor',
|
|
132
|
+
[125]: 'Classes may not have a private element named constructor',
|
|
133
|
+
[127]: 'A class field initializer may not contain arguments',
|
|
134
|
+
[128]: 'Generators can only be declared at the top level or inside a block',
|
|
135
|
+
[129]: 'Async methods are a restricted production and cannot have a newline following it',
|
|
136
|
+
[130]: 'Unexpected character after object literal property name',
|
|
137
|
+
[132]: 'Invalid key token',
|
|
138
|
+
[133]: "Label '%0' has already been declared",
|
|
139
|
+
[134]: 'continue statement must be nested within an iteration statement',
|
|
140
|
+
[135]: "Undefined label '%0'",
|
|
141
|
+
[136]: 'Trailing comma is disallowed inside import(...) arguments',
|
|
142
|
+
[137]: 'import() requires exactly one argument',
|
|
143
|
+
[138]: 'Cannot use new with import(...)',
|
|
144
|
+
[139]: '... is not allowed in import()',
|
|
145
|
+
[140]: "Expected '=>'",
|
|
146
|
+
[141]: "Duplicate binding '%0'",
|
|
147
|
+
[142]: "Cannot export a duplicate name '%0'",
|
|
148
|
+
[145]: 'Duplicate %0 for-binding',
|
|
149
|
+
[143]: "Exported binding '%0' needs to refer to a top-level declared variable",
|
|
150
|
+
[144]: 'Unexpected private field',
|
|
151
|
+
[148]: 'Numeric separators are not allowed at the end of numeric literals',
|
|
152
|
+
[147]: 'Only one underscore is allowed as numeric separator',
|
|
153
|
+
[149]: 'JSX value should be either an expression or a quoted JSX text',
|
|
154
|
+
[150]: 'Expected corresponding JSX closing tag for %0',
|
|
155
|
+
[151]: 'Adjacent JSX elements must be wrapped in an enclosing tag',
|
|
156
|
+
[152]: "JSX attributes must only be assigned a non-empty 'expression'",
|
|
157
|
+
[153]: "'%0' has already been declared",
|
|
158
|
+
[154]: "'%0' shadowed a catch clause binding",
|
|
159
|
+
[155]: 'Dot property must be an identifier',
|
|
160
|
+
[156]: 'Encountered invalid input after spread/rest argument',
|
|
161
|
+
[157]: 'Catch without try',
|
|
162
|
+
[158]: 'Finally without try',
|
|
163
|
+
[159]: 'Expected corresponding closing tag for JSX fragment',
|
|
164
|
+
[160]: 'Coalescing and logical operators used together in the same expression must be disambiguated with parentheses',
|
|
165
|
+
[161]: 'Invalid tagged template on optional chain',
|
|
166
|
+
[162]: 'Invalid optional chain from super property',
|
|
167
|
+
[163]: 'Invalid optional chain from new expression',
|
|
168
|
+
[164]: 'Cannot use "import.meta" outside a module',
|
|
169
|
+
[165]: 'Leading decorators must be attached to a class declaration'
|
|
169
170
|
};
|
|
170
171
|
class ParseError extends SyntaxError {
|
|
171
172
|
constructor(startindex, line, column, type, ...params) {
|
|
@@ -1097,7 +1098,7 @@ function handleStringError(state, code, isTemplate) {
|
|
|
1097
1098
|
case -4:
|
|
1098
1099
|
report(state, 6);
|
|
1099
1100
|
case -5:
|
|
1100
|
-
report(state,
|
|
1101
|
+
report(state, 102);
|
|
1101
1102
|
}
|
|
1102
1103
|
}
|
|
1103
1104
|
|
|
@@ -1210,7 +1211,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1210
1211
|
while (CharTypes[char] & (64 | 4096)) {
|
|
1211
1212
|
if (char === 95) {
|
|
1212
1213
|
if (!allowSeparator)
|
|
1213
|
-
report(parser,
|
|
1214
|
+
report(parser, 147);
|
|
1214
1215
|
allowSeparator = 0;
|
|
1215
1216
|
char = advanceChar(parser);
|
|
1216
1217
|
continue;
|
|
@@ -1221,7 +1222,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1221
1222
|
char = advanceChar(parser);
|
|
1222
1223
|
}
|
|
1223
1224
|
if (digits === 0 || !allowSeparator) {
|
|
1224
|
-
report(parser, digits === 0 ? 19 :
|
|
1225
|
+
report(parser, digits === 0 ? 19 : 148);
|
|
1225
1226
|
}
|
|
1226
1227
|
}
|
|
1227
1228
|
else if ((char | 32) === 111) {
|
|
@@ -1230,7 +1231,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1230
1231
|
while (CharTypes[char] & (32 | 4096)) {
|
|
1231
1232
|
if (char === 95) {
|
|
1232
1233
|
if (!allowSeparator) {
|
|
1233
|
-
report(parser,
|
|
1234
|
+
report(parser, 147);
|
|
1234
1235
|
}
|
|
1235
1236
|
allowSeparator = 0;
|
|
1236
1237
|
char = advanceChar(parser);
|
|
@@ -1242,7 +1243,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1242
1243
|
char = advanceChar(parser);
|
|
1243
1244
|
}
|
|
1244
1245
|
if (digits === 0 || !allowSeparator) {
|
|
1245
|
-
report(parser, digits === 0 ? 0 :
|
|
1246
|
+
report(parser, digits === 0 ? 0 : 148);
|
|
1246
1247
|
}
|
|
1247
1248
|
}
|
|
1248
1249
|
else if ((char | 32) === 98) {
|
|
@@ -1251,7 +1252,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1251
1252
|
while (CharTypes[char] & (128 | 4096)) {
|
|
1252
1253
|
if (char === 95) {
|
|
1253
1254
|
if (!allowSeparator) {
|
|
1254
|
-
report(parser,
|
|
1255
|
+
report(parser, 147);
|
|
1255
1256
|
}
|
|
1256
1257
|
allowSeparator = 0;
|
|
1257
1258
|
char = advanceChar(parser);
|
|
@@ -1263,7 +1264,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1263
1264
|
char = advanceChar(parser);
|
|
1264
1265
|
}
|
|
1265
1266
|
if (digits === 0 || !allowSeparator) {
|
|
1266
|
-
report(parser, digits === 0 ? 0 :
|
|
1267
|
+
report(parser, digits === 0 ? 0 : 148);
|
|
1267
1268
|
}
|
|
1268
1269
|
}
|
|
1269
1270
|
else if (CharTypes[char] & 32) {
|
|
@@ -1296,7 +1297,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1296
1297
|
if (char === 95) {
|
|
1297
1298
|
char = advanceChar(parser);
|
|
1298
1299
|
if (char === 95 || kind & 32) {
|
|
1299
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1300
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 147);
|
|
1300
1301
|
}
|
|
1301
1302
|
allowSeparator = 1;
|
|
1302
1303
|
continue;
|
|
@@ -1307,7 +1308,7 @@ function scanNumber(parser, context, kind) {
|
|
|
1307
1308
|
--digit;
|
|
1308
1309
|
}
|
|
1309
1310
|
if (allowSeparator) {
|
|
1310
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1311
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 148);
|
|
1311
1312
|
}
|
|
1312
1313
|
if (digit >= 0 && !isIdentifierStart(char) && char !== 46) {
|
|
1313
1314
|
parser.tokenValue = value;
|
|
@@ -1372,7 +1373,7 @@ function scanDecimalDigitsOrSeparator(parser, char) {
|
|
|
1372
1373
|
const { index } = parser;
|
|
1373
1374
|
char = advanceChar(parser);
|
|
1374
1375
|
if (char === 95) {
|
|
1375
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1376
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 147);
|
|
1376
1377
|
}
|
|
1377
1378
|
allowSeparator = 1;
|
|
1378
1379
|
ret += parser.source.substring(start, index);
|
|
@@ -1383,7 +1384,7 @@ function scanDecimalDigitsOrSeparator(parser, char) {
|
|
|
1383
1384
|
char = advanceChar(parser);
|
|
1384
1385
|
}
|
|
1385
1386
|
if (allowSeparator) {
|
|
1386
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1387
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 148);
|
|
1387
1388
|
}
|
|
1388
1389
|
return ret + parser.source.substring(start, parser.index);
|
|
1389
1390
|
}
|
|
@@ -1472,7 +1473,7 @@ const descKeywordTable = Object.create(null, {
|
|
|
1472
1473
|
function scanIdentifier(parser, context, isValidAsKeyword) {
|
|
1473
1474
|
while (isIdPart[advanceChar(parser)]) { }
|
|
1474
1475
|
parser.tokenValue = parser.source.slice(parser.tokenPos, parser.index);
|
|
1475
|
-
return parser.currentChar !== 92 && parser.currentChar
|
|
1476
|
+
return parser.currentChar !== 92 && parser.currentChar <= 0x7e
|
|
1476
1477
|
? descKeywordTable[parser.tokenValue] || 208897
|
|
1477
1478
|
: scanIdentifierSlowCase(parser, context, 0, isValidAsKeyword);
|
|
1478
1479
|
}
|
|
@@ -1559,7 +1560,7 @@ function scanIdentifierSlowCase(parser, context, hasEscape, isValidAsKeyword) {
|
|
|
1559
1560
|
}
|
|
1560
1561
|
function scanPrivateIdentifier(parser) {
|
|
1561
1562
|
if (!isIdentifierStart(advanceChar(parser)))
|
|
1562
|
-
report(parser,
|
|
1563
|
+
report(parser, 94);
|
|
1563
1564
|
return 131;
|
|
1564
1565
|
}
|
|
1565
1566
|
function scanIdentifierUnicodeEscape(parser) {
|
|
@@ -1577,7 +1578,7 @@ function scanUnicodeEscape(parser) {
|
|
|
1577
1578
|
while (CharTypes[advanceChar(parser)] & 64) {
|
|
1578
1579
|
codePoint = (codePoint << 4) | toHex(parser.currentChar);
|
|
1579
1580
|
if (codePoint > 1114111)
|
|
1580
|
-
reportScannerError(begin, parser.line, parser.index + 1,
|
|
1581
|
+
reportScannerError(begin, parser.line, parser.index + 1, 102);
|
|
1581
1582
|
}
|
|
1582
1583
|
if (parser.currentChar !== 125) {
|
|
1583
1584
|
reportScannerError(begin, parser.line, parser.index - 1, 6);
|
|
@@ -1918,7 +1919,7 @@ function scanSingleToken(parser, context, state) {
|
|
|
1918
1919
|
advanceChar(parser);
|
|
1919
1920
|
if ((state & 1 || isStartOfLine) && parser.currentChar === 62) {
|
|
1920
1921
|
if ((context & 256) === 0)
|
|
1921
|
-
report(parser,
|
|
1922
|
+
report(parser, 109);
|
|
1922
1923
|
advanceChar(parser);
|
|
1923
1924
|
state = skipSingleHTMLComment(parser, source, state, context, 3, startPos, startLine, startColumn);
|
|
1924
1925
|
startPos = parser.tokenPos;
|
|
@@ -4414,7 +4415,7 @@ function reinterpretToPattern(state, node) {
|
|
|
4414
4415
|
case 'AssignmentExpression':
|
|
4415
4416
|
node.type = 'AssignmentPattern';
|
|
4416
4417
|
if (node.operator !== '=')
|
|
4417
|
-
report(state,
|
|
4418
|
+
report(state, 69);
|
|
4418
4419
|
delete node.operator;
|
|
4419
4420
|
reinterpretToPattern(state, node.left);
|
|
4420
4421
|
return;
|
|
@@ -4429,58 +4430,58 @@ function reinterpretToPattern(state, node) {
|
|
|
4429
4430
|
function validateBindingIdentifier(parser, context, kind, t, skipEvalArgCheck) {
|
|
4430
4431
|
if (context & 1024) {
|
|
4431
4432
|
if ((t & 36864) === 36864) {
|
|
4432
|
-
report(parser,
|
|
4433
|
+
report(parser, 115);
|
|
4433
4434
|
}
|
|
4434
4435
|
if (!skipEvalArgCheck && (t & 537079808) === 537079808) {
|
|
4435
|
-
report(parser,
|
|
4436
|
+
report(parser, 116);
|
|
4436
4437
|
}
|
|
4437
4438
|
}
|
|
4438
4439
|
if ((t & 20480) === 20480) {
|
|
4439
|
-
report(parser,
|
|
4440
|
+
report(parser, 100);
|
|
4440
4441
|
}
|
|
4441
4442
|
if (kind & (8 | 16) && t === 241739) {
|
|
4442
|
-
report(parser,
|
|
4443
|
+
report(parser, 98);
|
|
4443
4444
|
}
|
|
4444
4445
|
if (context & (4194304 | 2048) && t === 209008) {
|
|
4445
|
-
report(parser,
|
|
4446
|
+
report(parser, 96);
|
|
4446
4447
|
}
|
|
4447
4448
|
if (context & (2097152 | 1024) && t === 241773) {
|
|
4448
|
-
report(parser,
|
|
4449
|
+
report(parser, 95, 'yield');
|
|
4449
4450
|
}
|
|
4450
4451
|
}
|
|
4451
4452
|
function validateFunctionName(parser, context, t) {
|
|
4452
4453
|
if (context & 1024) {
|
|
4453
4454
|
if ((t & 36864) === 36864) {
|
|
4454
|
-
report(parser,
|
|
4455
|
+
report(parser, 115);
|
|
4455
4456
|
}
|
|
4456
4457
|
if ((t & 537079808) === 537079808) {
|
|
4457
|
-
report(parser,
|
|
4458
|
+
report(parser, 116);
|
|
4458
4459
|
}
|
|
4459
4460
|
if (t === 122) {
|
|
4460
|
-
report(parser,
|
|
4461
|
+
report(parser, 93);
|
|
4461
4462
|
}
|
|
4462
4463
|
if (t === 121) {
|
|
4463
|
-
report(parser,
|
|
4464
|
+
report(parser, 93);
|
|
4464
4465
|
}
|
|
4465
4466
|
}
|
|
4466
4467
|
if ((t & 20480) === 20480) {
|
|
4467
|
-
report(parser,
|
|
4468
|
+
report(parser, 100);
|
|
4468
4469
|
}
|
|
4469
4470
|
if (context & (4194304 | 2048) && t === 209008) {
|
|
4470
|
-
report(parser,
|
|
4471
|
+
report(parser, 96);
|
|
4471
4472
|
}
|
|
4472
4473
|
if (context & (2097152 | 1024) && t === 241773) {
|
|
4473
|
-
report(parser,
|
|
4474
|
+
report(parser, 95, 'yield');
|
|
4474
4475
|
}
|
|
4475
4476
|
}
|
|
4476
4477
|
function isStrictReservedWord(parser, context, t) {
|
|
4477
4478
|
if (t === 209008) {
|
|
4478
4479
|
if (context & (4194304 | 2048))
|
|
4479
|
-
report(parser,
|
|
4480
|
+
report(parser, 96);
|
|
4480
4481
|
parser.destructible |= 128;
|
|
4481
4482
|
}
|
|
4482
4483
|
if (t === 241773 && context & 2097152)
|
|
4483
|
-
report(parser,
|
|
4484
|
+
report(parser, 95, 'yield');
|
|
4484
4485
|
return ((t & 20480) === 20480 ||
|
|
4485
4486
|
(t & 36864) === 36864 ||
|
|
4486
4487
|
t == 122);
|
|
@@ -4492,7 +4493,7 @@ function isValidLabel(parser, labels, name, isIterationStatement) {
|
|
|
4492
4493
|
while (labels) {
|
|
4493
4494
|
if (labels['$' + name]) {
|
|
4494
4495
|
if (isIterationStatement)
|
|
4495
|
-
report(parser,
|
|
4496
|
+
report(parser, 134);
|
|
4496
4497
|
return 1;
|
|
4497
4498
|
}
|
|
4498
4499
|
if (isIterationStatement && labels.loop)
|
|
@@ -4505,7 +4506,7 @@ function validateAndDeclareLabel(parser, labels, name) {
|
|
|
4505
4506
|
let set = labels;
|
|
4506
4507
|
while (set) {
|
|
4507
4508
|
if (set['$' + name])
|
|
4508
|
-
report(parser,
|
|
4509
|
+
report(parser, 133, name);
|
|
4509
4510
|
set = set['$'];
|
|
4510
4511
|
}
|
|
4511
4512
|
labels['$' + name] = 1;
|
|
@@ -4586,27 +4587,27 @@ function addBlockName(parser, context, scope, name, kind, origin) {
|
|
|
4586
4587
|
const value = scope['#' + name];
|
|
4587
4588
|
if (value && (value & 2) === 0) {
|
|
4588
4589
|
if (kind & 1) {
|
|
4589
|
-
scope.scopeError = recordScopeError(parser,
|
|
4590
|
+
scope.scopeError = recordScopeError(parser, 141, name);
|
|
4590
4591
|
}
|
|
4591
4592
|
else if (context & 256 &&
|
|
4592
4593
|
value & 64 &&
|
|
4593
4594
|
origin & 2) ;
|
|
4594
4595
|
else {
|
|
4595
|
-
report(parser,
|
|
4596
|
+
report(parser, 141, name);
|
|
4596
4597
|
}
|
|
4597
4598
|
}
|
|
4598
4599
|
if (scope.type & 128 &&
|
|
4599
4600
|
(scope.parent['#' + name] && (scope.parent['#' + name] & 2) === 0)) {
|
|
4600
|
-
report(parser,
|
|
4601
|
+
report(parser, 141, name);
|
|
4601
4602
|
}
|
|
4602
4603
|
if (scope.type & 1024 && value && (value & 2) === 0) {
|
|
4603
4604
|
if (kind & 1) {
|
|
4604
|
-
scope.scopeError = recordScopeError(parser,
|
|
4605
|
+
scope.scopeError = recordScopeError(parser, 141, name);
|
|
4605
4606
|
}
|
|
4606
4607
|
}
|
|
4607
4608
|
if (scope.type & 64) {
|
|
4608
4609
|
if (scope.parent['#' + name] & 768)
|
|
4609
|
-
report(parser,
|
|
4610
|
+
report(parser, 154, name);
|
|
4610
4611
|
}
|
|
4611
4612
|
scope['#' + name] = kind;
|
|
4612
4613
|
}
|
|
@@ -4620,19 +4621,19 @@ function addVarName(parser, context, scope, name, kind) {
|
|
|
4620
4621
|
((kind & 128 && value & 68) ||
|
|
4621
4622
|
(value & 128 && kind & 68))) ;
|
|
4622
4623
|
else {
|
|
4623
|
-
report(parser,
|
|
4624
|
+
report(parser, 141, name);
|
|
4624
4625
|
}
|
|
4625
4626
|
}
|
|
4626
4627
|
if (currentScope === scope) {
|
|
4627
4628
|
if (value & 1 && kind & 1) {
|
|
4628
|
-
currentScope.scopeError = recordScopeError(parser,
|
|
4629
|
+
currentScope.scopeError = recordScopeError(parser, 141, name);
|
|
4629
4630
|
}
|
|
4630
4631
|
}
|
|
4631
4632
|
if (value & (512 | 256)) {
|
|
4632
4633
|
if ((value & 512) === 0 ||
|
|
4633
4634
|
(context & 256) === 0 ||
|
|
4634
4635
|
context & 1024) {
|
|
4635
|
-
report(parser,
|
|
4636
|
+
report(parser, 141, name);
|
|
4636
4637
|
}
|
|
4637
4638
|
}
|
|
4638
4639
|
currentScope['#' + name] = kind;
|
|
@@ -4642,7 +4643,7 @@ function addVarName(parser, context, scope, name, kind) {
|
|
|
4642
4643
|
function declareUnboundVariable(parser, name) {
|
|
4643
4644
|
if (parser.exportedNames !== void 0 && name !== '') {
|
|
4644
4645
|
if (parser.exportedNames['#' + name]) {
|
|
4645
|
-
report(parser,
|
|
4646
|
+
report(parser, 142, name);
|
|
4646
4647
|
}
|
|
4647
4648
|
parser.exportedNames['#' + name] = 1;
|
|
4648
4649
|
}
|
|
@@ -4700,7 +4701,7 @@ function isValidIdentifier(context, t) {
|
|
|
4700
4701
|
function classifyIdentifier(parser, context, t, isArrow) {
|
|
4701
4702
|
if ((t & 537079808) === 537079808) {
|
|
4702
4703
|
if (context & 1024)
|
|
4703
|
-
report(parser,
|
|
4704
|
+
report(parser, 116);
|
|
4704
4705
|
if (isArrow)
|
|
4705
4706
|
parser.flags |= 512;
|
|
4706
4707
|
}
|
|
@@ -4793,7 +4794,7 @@ function parseSource(source, options, context) {
|
|
|
4793
4794
|
if (scope) {
|
|
4794
4795
|
for (const key in parser.exportedBindings) {
|
|
4795
4796
|
if (key[0] === '#' && !scope[key])
|
|
4796
|
-
report(parser,
|
|
4797
|
+
report(parser, 143, key.slice(1));
|
|
4797
4798
|
}
|
|
4798
4799
|
}
|
|
4799
4800
|
}
|
|
@@ -4863,7 +4864,7 @@ function parseModuleItem(parser, context, scope) {
|
|
|
4863
4864
|
moduleItem = parseStatementListItem(parser, context, scope, 4, {});
|
|
4864
4865
|
}
|
|
4865
4866
|
if (parser.leadingDecorators.length) {
|
|
4866
|
-
report(parser,
|
|
4867
|
+
report(parser, 165);
|
|
4867
4868
|
}
|
|
4868
4869
|
return moduleItem;
|
|
4869
4870
|
}
|
|
@@ -4882,7 +4883,7 @@ function parseStatementListItem(parser, context, scope, origin, labels) {
|
|
|
4882
4883
|
case 241739:
|
|
4883
4884
|
return parseLetIdentOrVarDeclarationStatement(parser, context, scope, origin, start, line, column);
|
|
4884
4885
|
case 20566:
|
|
4885
|
-
report(parser,
|
|
4886
|
+
report(parser, 101, 'export');
|
|
4886
4887
|
case 86108:
|
|
4887
4888
|
nextToken(parser, context);
|
|
4888
4889
|
switch (parser.token) {
|
|
@@ -4891,7 +4892,7 @@ function parseStatementListItem(parser, context, scope, origin, labels) {
|
|
|
4891
4892
|
case 67108877:
|
|
4892
4893
|
return parseImportMetaDeclaration(parser, context, start, line, column);
|
|
4893
4894
|
default:
|
|
4894
|
-
report(parser,
|
|
4895
|
+
report(parser, 101, 'import');
|
|
4895
4896
|
}
|
|
4896
4897
|
case 209007:
|
|
4897
4898
|
return parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, 1, start, line, column);
|
|
@@ -4934,17 +4935,17 @@ function parseStatement(parser, context, scope, origin, labels, allowFuncDecl, s
|
|
|
4934
4935
|
case 209007:
|
|
4935
4936
|
return parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, 0, start, line, column);
|
|
4936
4937
|
case 20559:
|
|
4937
|
-
report(parser, 156);
|
|
4938
|
-
case 20568:
|
|
4939
4938
|
report(parser, 157);
|
|
4939
|
+
case 20568:
|
|
4940
|
+
report(parser, 158);
|
|
4940
4941
|
case 86106:
|
|
4941
4942
|
report(parser, context & 1024
|
|
4942
|
-
?
|
|
4943
|
+
? 74
|
|
4943
4944
|
: (context & 256) === 0
|
|
4944
|
-
?
|
|
4945
|
-
:
|
|
4945
|
+
? 76
|
|
4946
|
+
: 75);
|
|
4946
4947
|
case 86096:
|
|
4947
|
-
report(parser,
|
|
4948
|
+
report(parser, 77);
|
|
4948
4949
|
default:
|
|
4949
4950
|
return parseExpressionOrLabelledStatement(parser, context, scope, origin, labels, allowFuncDecl, start, line, column);
|
|
4950
4951
|
}
|
|
@@ -4956,9 +4957,9 @@ function parseExpressionOrLabelledStatement(parser, context, scope, origin, labe
|
|
|
4956
4957
|
case 241739:
|
|
4957
4958
|
expr = parseIdentifier(parser, context, 0);
|
|
4958
4959
|
if (context & 1024)
|
|
4959
|
-
report(parser,
|
|
4960
|
+
report(parser, 83);
|
|
4960
4961
|
if (parser.token === 69271571)
|
|
4961
|
-
report(parser,
|
|
4962
|
+
report(parser, 82);
|
|
4962
4963
|
break;
|
|
4963
4964
|
default:
|
|
4964
4965
|
expr = parsePrimaryExpression(parser, context, 2, 0, 1, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
@@ -4987,7 +4988,7 @@ function parseBlock(parser, context, scope, labels, start, line, column) {
|
|
|
4987
4988
|
}
|
|
4988
4989
|
function parseReturnStatement(parser, context, start, line, column) {
|
|
4989
4990
|
if ((context & 32) === 0 && context & 8192)
|
|
4990
|
-
report(parser,
|
|
4991
|
+
report(parser, 90);
|
|
4991
4992
|
nextToken(parser, context | 32768);
|
|
4992
4993
|
const argument = parser.flags & 1 || parser.token & 1048576
|
|
4993
4994
|
? null
|
|
@@ -5031,7 +5032,7 @@ function parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origi
|
|
|
5031
5032
|
if (!asyncNewLine) {
|
|
5032
5033
|
if (parser.token === 86106) {
|
|
5033
5034
|
if (!allowFuncDecl)
|
|
5034
|
-
report(parser,
|
|
5035
|
+
report(parser, 120);
|
|
5035
5036
|
return parseFunctionDeclaration(parser, context, scope, origin, 1, 0, 1, start, line, column);
|
|
5036
5037
|
}
|
|
5037
5038
|
if ((parser.token & 143360) === 143360) {
|
|
@@ -5090,7 +5091,7 @@ function parseEmptyStatement(parser, context, start, line, column) {
|
|
|
5090
5091
|
function parseThrowStatement(parser, context, start, line, column) {
|
|
5091
5092
|
nextToken(parser, context | 32768);
|
|
5092
5093
|
if (parser.flags & 1)
|
|
5093
|
-
report(parser,
|
|
5094
|
+
report(parser, 88);
|
|
5094
5095
|
const argument = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5095
5096
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5096
5097
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5144,7 +5145,7 @@ function parseSwitchStatement(parser, context, scope, labels, start, line, colum
|
|
|
5144
5145
|
else {
|
|
5145
5146
|
consume(parser, context | 32768, 20563);
|
|
5146
5147
|
if (seenDefault)
|
|
5147
|
-
report(parser,
|
|
5148
|
+
report(parser, 87);
|
|
5148
5149
|
seenDefault = 1;
|
|
5149
5150
|
}
|
|
5150
5151
|
consume(parser, context | 32768, 21);
|
|
@@ -5185,14 +5186,14 @@ function parseIterationStatementBody(parser, context, scope, labels) {
|
|
|
5185
5186
|
}
|
|
5186
5187
|
function parseContinueStatement(parser, context, labels, start, line, column) {
|
|
5187
5188
|
if ((context & 131072) === 0)
|
|
5188
|
-
report(parser,
|
|
5189
|
+
report(parser, 66);
|
|
5189
5190
|
nextToken(parser, context);
|
|
5190
5191
|
let label = null;
|
|
5191
5192
|
if ((parser.flags & 1) === 0 && parser.token & 143360) {
|
|
5192
5193
|
const { tokenValue } = parser;
|
|
5193
5194
|
label = parseIdentifier(parser, context | 32768, 0);
|
|
5194
5195
|
if (!isValidLabel(parser, labels, tokenValue, 1))
|
|
5195
|
-
report(parser,
|
|
5196
|
+
report(parser, 135, tokenValue);
|
|
5196
5197
|
}
|
|
5197
5198
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5198
5199
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5207,10 +5208,10 @@ function parseBreakStatement(parser, context, labels, start, line, column) {
|
|
|
5207
5208
|
const { tokenValue } = parser;
|
|
5208
5209
|
label = parseIdentifier(parser, context | 32768, 0);
|
|
5209
5210
|
if (!isValidLabel(parser, labels, tokenValue, 0))
|
|
5210
|
-
report(parser,
|
|
5211
|
+
report(parser, 135, tokenValue);
|
|
5211
5212
|
}
|
|
5212
5213
|
else if ((context & (4096 | 131072)) === 0) {
|
|
5213
|
-
report(parser,
|
|
5214
|
+
report(parser, 67);
|
|
5214
5215
|
}
|
|
5215
5216
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5216
5217
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5221,7 +5222,7 @@ function parseBreakStatement(parser, context, labels, start, line, column) {
|
|
|
5221
5222
|
function parseWithStatement(parser, context, scope, labels, start, line, column) {
|
|
5222
5223
|
nextToken(parser, context);
|
|
5223
5224
|
if (context & 1024)
|
|
5224
|
-
report(parser,
|
|
5225
|
+
report(parser, 89);
|
|
5225
5226
|
consume(parser, context | 32768, 67174411);
|
|
5226
5227
|
const object = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5227
5228
|
consume(parser, context | 32768, 16);
|
|
@@ -5254,7 +5255,7 @@ function parseTryStatement(parser, context, scope, labels, start, line, column)
|
|
|
5254
5255
|
finalizer = parseBlock(parser, context, finalizerScope, { $: labels }, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5255
5256
|
}
|
|
5256
5257
|
if (!handler && !finalizer) {
|
|
5257
|
-
report(parser,
|
|
5258
|
+
report(parser, 86);
|
|
5258
5259
|
}
|
|
5259
5260
|
return finishNode(parser, context, start, line, column, {
|
|
5260
5261
|
type: 'TryStatement',
|
|
@@ -5273,10 +5274,10 @@ function parseCatchBlock(parser, context, scope, labels, start, line, column) {
|
|
|
5273
5274
|
? 256
|
|
5274
5275
|
: 512, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5275
5276
|
if (parser.token === 18) {
|
|
5276
|
-
report(parser,
|
|
5277
|
+
report(parser, 84);
|
|
5277
5278
|
}
|
|
5278
5279
|
else if (parser.token === 1077936157) {
|
|
5279
|
-
report(parser,
|
|
5280
|
+
report(parser, 85);
|
|
5280
5281
|
}
|
|
5281
5282
|
consume(parser, context | 32768, 16);
|
|
5282
5283
|
if (scope)
|
|
@@ -5328,7 +5329,7 @@ function parseLetIdentOrVarDeclarationStatement(parser, context, scope, origin,
|
|
|
5328
5329
|
}
|
|
5329
5330
|
parser.assignable = 1;
|
|
5330
5331
|
if (context & 1024)
|
|
5331
|
-
report(parser,
|
|
5332
|
+
report(parser, 83);
|
|
5332
5333
|
if (parser.token === 21) {
|
|
5333
5334
|
return parseLabelledStatement(parser, context, scope, origin, {}, tokenValue, expr, token, 0, start, line, column);
|
|
5334
5335
|
}
|
|
@@ -5376,7 +5377,7 @@ function parseVariableDeclarationList(parser, context, scope, kind, origin) {
|
|
|
5376
5377
|
list.push(parseVariableDeclaration(parser, context, scope, kind, origin));
|
|
5377
5378
|
}
|
|
5378
5379
|
if (bindingCount > 1 && origin & 32 && parser.token & 262144) {
|
|
5379
|
-
report(parser,
|
|
5380
|
+
report(parser, 59, KeywordDescTable[parser.token & 255]);
|
|
5380
5381
|
}
|
|
5381
5382
|
return list;
|
|
5382
5383
|
}
|
|
@@ -5391,13 +5392,13 @@ function parseVariableDeclaration(parser, context, scope, kind, origin) {
|
|
|
5391
5392
|
if (parser.token === 274549 ||
|
|
5392
5393
|
(parser.token === 8738868 &&
|
|
5393
5394
|
(token & 2097152 || (kind & 4) === 0 || context & 1024))) {
|
|
5394
|
-
reportMessageAt(tokenPos, parser.line, parser.index - 3,
|
|
5395
|
+
reportMessageAt(tokenPos, parser.line, parser.index - 3, 58, parser.token === 274549 ? 'of' : 'in');
|
|
5395
5396
|
}
|
|
5396
5397
|
}
|
|
5397
5398
|
}
|
|
5398
5399
|
else if ((kind & 16 || (token & 2097152) > 0) &&
|
|
5399
5400
|
(parser.token & 262144) !== 262144) {
|
|
5400
|
-
report(parser,
|
|
5401
|
+
report(parser, 57, kind & 16 ? 'const' : 'destructuring');
|
|
5401
5402
|
}
|
|
5402
5403
|
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
5403
5404
|
type: 'VariableDeclarator',
|
|
@@ -5425,7 +5426,7 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5425
5426
|
if (parser.token & (143360 | 2097152)) {
|
|
5426
5427
|
if (parser.token === 8738868) {
|
|
5427
5428
|
if (context & 1024)
|
|
5428
|
-
report(parser,
|
|
5429
|
+
report(parser, 65);
|
|
5429
5430
|
}
|
|
5430
5431
|
else {
|
|
5431
5432
|
init = finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
@@ -5437,14 +5438,14 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5437
5438
|
parser.assignable = 1;
|
|
5438
5439
|
}
|
|
5439
5440
|
else if (context & 1024) {
|
|
5440
|
-
report(parser,
|
|
5441
|
+
report(parser, 65);
|
|
5441
5442
|
}
|
|
5442
5443
|
else {
|
|
5443
5444
|
isVarDecl = false;
|
|
5444
5445
|
parser.assignable = 1;
|
|
5445
5446
|
init = parseMemberOrUpdateExpression(parser, context, init, 0, 0, tokenPos, linePos, colPos);
|
|
5446
5447
|
if (parser.token === 274549)
|
|
5447
|
-
report(parser,
|
|
5448
|
+
report(parser, 112);
|
|
5448
5449
|
}
|
|
5449
5450
|
}
|
|
5450
5451
|
else {
|
|
@@ -5465,7 +5466,7 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5465
5466
|
}
|
|
5466
5467
|
else if (token === 1074790417) {
|
|
5467
5468
|
if (forAwait)
|
|
5468
|
-
report(parser,
|
|
5469
|
+
report(parser, 80);
|
|
5469
5470
|
}
|
|
5470
5471
|
else if ((token & 2097152) === 2097152) {
|
|
5471
5472
|
init =
|
|
@@ -5474,7 +5475,7 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5474
5475
|
: parseArrayExpressionOrPattern(parser, context, void 0, 1, 0, 0, 2, 32, tokenPos, linePos, colPos);
|
|
5475
5476
|
destructible = parser.destructible;
|
|
5476
5477
|
if (context & 256 && destructible & 64) {
|
|
5477
|
-
report(parser,
|
|
5478
|
+
report(parser, 61);
|
|
5478
5479
|
}
|
|
5479
5480
|
parser.assignable =
|
|
5480
5481
|
destructible & 16 ? 2 : 1;
|
|
@@ -5486,7 +5487,7 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5486
5487
|
if ((parser.token & 262144) === 262144) {
|
|
5487
5488
|
if (parser.token === 274549) {
|
|
5488
5489
|
if (parser.assignable & 2)
|
|
5489
|
-
report(parser,
|
|
5490
|
+
report(parser, 78, forAwait ? 'await' : 'of');
|
|
5490
5491
|
reinterpretToPattern(parser, init);
|
|
5491
5492
|
nextToken(parser, context | 32768);
|
|
5492
5493
|
right = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
@@ -5501,11 +5502,11 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5501
5502
|
});
|
|
5502
5503
|
}
|
|
5503
5504
|
if (parser.assignable & 2)
|
|
5504
|
-
report(parser,
|
|
5505
|
+
report(parser, 78, 'in');
|
|
5505
5506
|
reinterpretToPattern(parser, init);
|
|
5506
5507
|
nextToken(parser, context | 32768);
|
|
5507
5508
|
if (forAwait)
|
|
5508
|
-
report(parser,
|
|
5509
|
+
report(parser, 80);
|
|
5509
5510
|
right = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5510
5511
|
consume(parser, context | 32768, 16);
|
|
5511
5512
|
const body = parseIterationStatementBody(parser, context, scope, labels);
|
|
@@ -5517,10 +5518,10 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5517
5518
|
});
|
|
5518
5519
|
}
|
|
5519
5520
|
if (forAwait)
|
|
5520
|
-
report(parser,
|
|
5521
|
+
report(parser, 80);
|
|
5521
5522
|
if (!isVarDecl) {
|
|
5522
5523
|
if (destructible & 8 && parser.token !== 1077936157) {
|
|
5523
|
-
report(parser,
|
|
5524
|
+
report(parser, 78, 'loop');
|
|
5524
5525
|
}
|
|
5525
5526
|
init = parseAssignmentExpression(parser, context | 134217728, 0, 0, tokenPos, linePos, colPos, init);
|
|
5526
5527
|
}
|
|
@@ -5544,9 +5545,9 @@ function parseForStatement(parser, context, scope, labels, start, line, column)
|
|
|
5544
5545
|
}
|
|
5545
5546
|
function parseRestrictedIdentifier(parser, context, scope) {
|
|
5546
5547
|
if (!isValidIdentifier(context, parser.token))
|
|
5547
|
-
report(parser, 114);
|
|
5548
|
-
if ((parser.token & 537079808) === 537079808)
|
|
5549
5548
|
report(parser, 115);
|
|
5549
|
+
if ((parser.token & 537079808) === 537079808)
|
|
5550
|
+
report(parser, 116);
|
|
5550
5551
|
if (scope)
|
|
5551
5552
|
addBlockName(parser, context, scope, parser.tokenValue, 8, 0);
|
|
5552
5553
|
return parseIdentifier(parser, context, 0);
|
|
@@ -5580,7 +5581,7 @@ function parseImportDeclaration(parser, context, scope) {
|
|
|
5580
5581
|
parseImportSpecifierOrNamedImports(parser, context, scope, specifiers);
|
|
5581
5582
|
break;
|
|
5582
5583
|
default:
|
|
5583
|
-
report(parser,
|
|
5584
|
+
report(parser, 105);
|
|
5584
5585
|
}
|
|
5585
5586
|
}
|
|
5586
5587
|
}
|
|
@@ -5624,7 +5625,7 @@ function parseImportNamespaceSpecifier(parser, context, scope) {
|
|
|
5624
5625
|
function parseModuleSpecifier(parser, context) {
|
|
5625
5626
|
consumeOpt(parser, context, 12404);
|
|
5626
5627
|
if (parser.token !== 134283267)
|
|
5627
|
-
report(parser,
|
|
5628
|
+
report(parser, 103, 'Import');
|
|
5628
5629
|
return parseLiteral(parser, context);
|
|
5629
5630
|
}
|
|
5630
5631
|
function parseImportSpecifierOrNamedImports(parser, context, scope, specifiers) {
|
|
@@ -5635,7 +5636,7 @@ function parseImportSpecifierOrNamedImports(parser, context, scope, specifiers)
|
|
|
5635
5636
|
let local;
|
|
5636
5637
|
if (consumeOpt(parser, context, 77934)) {
|
|
5637
5638
|
if ((parser.token & 134217728) === 134217728 || parser.token === 18) {
|
|
5638
|
-
report(parser,
|
|
5639
|
+
report(parser, 104);
|
|
5639
5640
|
}
|
|
5640
5641
|
else {
|
|
5641
5642
|
validateBindingIdentifier(parser, context, 16, parser.token, 0);
|
|
@@ -5739,7 +5740,7 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5739
5740
|
}
|
|
5740
5741
|
consume(parser, context, 12404);
|
|
5741
5742
|
if (parser.token !== 134283267)
|
|
5742
|
-
report(parser,
|
|
5743
|
+
report(parser, 103, 'Export');
|
|
5743
5744
|
source = parseLiteral(parser, context);
|
|
5744
5745
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5745
5746
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5759,7 +5760,7 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5759
5760
|
if (parser.token === 77934) {
|
|
5760
5761
|
nextToken(parser, context);
|
|
5761
5762
|
if ((parser.token & 134217728) === 134217728) {
|
|
5762
|
-
report(parser,
|
|
5763
|
+
report(parser, 104);
|
|
5763
5764
|
}
|
|
5764
5765
|
if (scope) {
|
|
5765
5766
|
tmpExportedNames.push(parser.tokenValue);
|
|
@@ -5785,7 +5786,7 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5785
5786
|
consume(parser, context, 1074790415);
|
|
5786
5787
|
if (consumeOpt(parser, context, 12404)) {
|
|
5787
5788
|
if (parser.token !== 134283267)
|
|
5788
|
-
report(parser,
|
|
5789
|
+
report(parser, 103, 'Export');
|
|
5789
5790
|
source = parseLiteral(parser, context);
|
|
5790
5791
|
}
|
|
5791
5792
|
else if (scope) {
|
|
@@ -5934,7 +5935,7 @@ function parseBinaryExpression(parser, context, inGroup, start, line, column, mi
|
|
|
5934
5935
|
t = parser.token;
|
|
5935
5936
|
prec = t & 3840;
|
|
5936
5937
|
if ((t & 524288 && operator & 268435456) || (operator & 524288 && t & 268435456)) {
|
|
5937
|
-
report(parser,
|
|
5938
|
+
report(parser, 160);
|
|
5938
5939
|
}
|
|
5939
5940
|
if (prec + ((t === 8457273) << 8) - ((bit === t) << 12) <= minPrec)
|
|
5940
5941
|
break;
|
|
@@ -5960,10 +5961,10 @@ function parseUnaryExpression(parser, context, isLHS, start, line, column, inGro
|
|
|
5960
5961
|
report(parser, 31);
|
|
5961
5962
|
if (context & 1024 && unaryOperator === 16863278) {
|
|
5962
5963
|
if (arg.type === 'Identifier') {
|
|
5963
|
-
report(parser,
|
|
5964
|
+
report(parser, 118);
|
|
5964
5965
|
}
|
|
5965
5966
|
else if (isPropertyWithPrivateFieldKey(arg)) {
|
|
5966
|
-
report(parser,
|
|
5967
|
+
report(parser, 124);
|
|
5967
5968
|
}
|
|
5968
5969
|
}
|
|
5969
5970
|
parser.assignable = 2;
|
|
@@ -5994,7 +5995,7 @@ function parseAsyncExpression(parser, context, inGroup, isLHS, canAssign, isPatt
|
|
|
5994
5995
|
if (parser.token === 10) {
|
|
5995
5996
|
classifyIdentifier(parser, context, token, 1);
|
|
5996
5997
|
if (inNew)
|
|
5997
|
-
report(parser,
|
|
5998
|
+
report(parser, 49);
|
|
5998
5999
|
return parseArrowFromIdentifier(parser, context, parser.tokenValue, expr, inNew, canAssign, 0, start, line, column);
|
|
5999
6000
|
}
|
|
6000
6001
|
return expr;
|
|
@@ -6009,7 +6010,7 @@ function parseYieldExpression(parser, context, inGroup, canAssign, start, line,
|
|
|
6009
6010
|
if (!canAssign)
|
|
6010
6011
|
report(parser, 24);
|
|
6011
6012
|
if (parser.token === 22)
|
|
6012
|
-
report(parser,
|
|
6013
|
+
report(parser, 121);
|
|
6013
6014
|
let argument = null;
|
|
6014
6015
|
let delegate = false;
|
|
6015
6016
|
if ((parser.flags & 1) === 0) {
|
|
@@ -6026,7 +6027,7 @@ function parseYieldExpression(parser, context, inGroup, canAssign, start, line,
|
|
|
6026
6027
|
});
|
|
6027
6028
|
}
|
|
6028
6029
|
if (context & 1024)
|
|
6029
|
-
report(parser,
|
|
6030
|
+
report(parser, 95, 'yield');
|
|
6030
6031
|
return parseIdentifierOrArrow(parser, context, start, line, column);
|
|
6031
6032
|
}
|
|
6032
6033
|
function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
|
|
@@ -6049,7 +6050,7 @@ function parseAwaitExpression(parser, context, inNew, inGroup, start, line, colu
|
|
|
6049
6050
|
});
|
|
6050
6051
|
}
|
|
6051
6052
|
if (context & 2048)
|
|
6052
|
-
report(parser,
|
|
6053
|
+
report(parser, 96);
|
|
6053
6054
|
return parseIdentifierOrArrow(parser, context, start, line, column);
|
|
6054
6055
|
}
|
|
6055
6056
|
function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
|
|
@@ -6064,7 +6065,7 @@ function parseFunctionBody(parser, context, scope, origin, firstRestricted, scop
|
|
|
6064
6065
|
if (isValidStrictMode(parser, index, tokenPos, tokenValue)) {
|
|
6065
6066
|
context |= 1024;
|
|
6066
6067
|
if (parser.flags & 128) {
|
|
6067
|
-
reportMessageAt(parser.index, parser.line, parser.tokenPos,
|
|
6068
|
+
reportMessageAt(parser.index, parser.line, parser.tokenPos, 64);
|
|
6068
6069
|
}
|
|
6069
6070
|
if (parser.flags & 64) {
|
|
6070
6071
|
reportMessageAt(parser.index, parser.line, parser.tokenPos, 8);
|
|
@@ -6075,16 +6076,16 @@ function parseFunctionBody(parser, context, scope, origin, firstRestricted, scop
|
|
|
6075
6076
|
if (context & 1024) {
|
|
6076
6077
|
if (firstRestricted) {
|
|
6077
6078
|
if ((firstRestricted & 537079808) === 537079808) {
|
|
6078
|
-
report(parser,
|
|
6079
|
+
report(parser, 116);
|
|
6079
6080
|
}
|
|
6080
6081
|
if ((firstRestricted & 36864) === 36864) {
|
|
6081
6082
|
report(parser, 38);
|
|
6082
6083
|
}
|
|
6083
6084
|
}
|
|
6084
6085
|
if (parser.flags & 512)
|
|
6085
|
-
report(parser,
|
|
6086
|
+
report(parser, 116);
|
|
6086
6087
|
if (parser.flags & 256)
|
|
6087
|
-
report(parser,
|
|
6088
|
+
report(parser, 115);
|
|
6088
6089
|
}
|
|
6089
6090
|
if (context & 64 &&
|
|
6090
6091
|
scope &&
|
|
@@ -6114,7 +6115,7 @@ function parseSuperExpression(parser, context, start, line, column) {
|
|
|
6114
6115
|
nextToken(parser, context);
|
|
6115
6116
|
switch (parser.token) {
|
|
6116
6117
|
case 67108991:
|
|
6117
|
-
report(parser,
|
|
6118
|
+
report(parser, 162);
|
|
6118
6119
|
case 67174411: {
|
|
6119
6120
|
if ((context & 524288) === 0)
|
|
6120
6121
|
report(parser, 26);
|
|
@@ -6143,7 +6144,7 @@ function parseLeftHandSideExpression(parser, context, canAssign, inGroup, isLHS,
|
|
|
6143
6144
|
}
|
|
6144
6145
|
function parseUpdateExpression(parser, context, expr, start, line, column) {
|
|
6145
6146
|
if (parser.assignable & 2)
|
|
6146
|
-
report(parser,
|
|
6147
|
+
report(parser, 53);
|
|
6147
6148
|
const { token } = parser;
|
|
6148
6149
|
nextToken(parser, context);
|
|
6149
6150
|
parser.assignable = 2;
|
|
@@ -6226,7 +6227,7 @@ function parseMemberOrUpdateExpression(parser, context, expr, inGroup, inChain,
|
|
|
6226
6227
|
}
|
|
6227
6228
|
default:
|
|
6228
6229
|
if ((parser.flags & 2048) === 2048) {
|
|
6229
|
-
report(parser,
|
|
6230
|
+
report(parser, 161);
|
|
6230
6231
|
}
|
|
6231
6232
|
parser.assignable = 2;
|
|
6232
6233
|
expr = finishNode(parser, context, start, line, column, {
|
|
@@ -6283,7 +6284,7 @@ function parseOptionalChain(parser, context, expr, start, line, column) {
|
|
|
6283
6284
|
}
|
|
6284
6285
|
else {
|
|
6285
6286
|
if ((parser.token & (143360 | 4096)) === 0)
|
|
6286
|
-
report(parser,
|
|
6287
|
+
report(parser, 155);
|
|
6287
6288
|
const property = parseIdentifier(parser, context, 0);
|
|
6288
6289
|
parser.assignable = 2;
|
|
6289
6290
|
node = finishNode(parser, context, start, line, column, {
|
|
@@ -6301,7 +6302,7 @@ function parseOptionalChain(parser, context, expr, start, line, column) {
|
|
|
6301
6302
|
}
|
|
6302
6303
|
function parsePropertyOrPrivatePropertyName(parser, context) {
|
|
6303
6304
|
if ((parser.token & (143360 | 4096)) === 0 && parser.token !== 131) {
|
|
6304
|
-
report(parser,
|
|
6305
|
+
report(parser, 155);
|
|
6305
6306
|
}
|
|
6306
6307
|
return context & 1 && parser.token === 131
|
|
6307
6308
|
? parsePrivateIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos)
|
|
@@ -6309,14 +6310,14 @@ function parsePropertyOrPrivatePropertyName(parser, context) {
|
|
|
6309
6310
|
}
|
|
6310
6311
|
function parseUpdateExpressionPrefixed(parser, context, inNew, isLHS, start, line, column) {
|
|
6311
6312
|
if (inNew)
|
|
6312
|
-
report(parser,
|
|
6313
|
+
report(parser, 54);
|
|
6313
6314
|
if (!isLHS)
|
|
6314
6315
|
report(parser, 0);
|
|
6315
6316
|
const { token } = parser;
|
|
6316
6317
|
nextToken(parser, context | 32768);
|
|
6317
6318
|
const arg = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6318
6319
|
if (parser.assignable & 2) {
|
|
6319
|
-
report(parser,
|
|
6320
|
+
report(parser, 53);
|
|
6320
6321
|
}
|
|
6321
6322
|
parser.assignable = 2;
|
|
6322
6323
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -6345,12 +6346,12 @@ function parsePrimaryExpression(parser, context, kind, inNew, canAssign, isPatte
|
|
|
6345
6346
|
return parseArrowFromIdentifier(parser, context, tokenValue, expr, inNew, canAssign, 0, start, line, column);
|
|
6346
6347
|
}
|
|
6347
6348
|
if (context & 16384 && token === 537079928)
|
|
6348
|
-
report(parser,
|
|
6349
|
+
report(parser, 127);
|
|
6349
6350
|
if (token === 241739) {
|
|
6350
6351
|
if (context & 1024)
|
|
6351
|
-
report(parser,
|
|
6352
|
+
report(parser, 110);
|
|
6352
6353
|
if (kind & (8 | 16))
|
|
6353
|
-
report(parser,
|
|
6354
|
+
report(parser, 98);
|
|
6354
6355
|
}
|
|
6355
6356
|
parser.assignable =
|
|
6356
6357
|
context & 1024 && (token & 537079808) === 537079808
|
|
@@ -6421,14 +6422,14 @@ function parseImportCallOrMetaExpression(parser, context, inNew, inGroup, start,
|
|
|
6421
6422
|
return parseImportMetaExpression(parser, context, expr, start, line, column);
|
|
6422
6423
|
}
|
|
6423
6424
|
if (inNew)
|
|
6424
|
-
report(parser,
|
|
6425
|
+
report(parser, 138);
|
|
6425
6426
|
expr = parseImportExpression(parser, context, inGroup, start, line, column);
|
|
6426
6427
|
parser.assignable = 2;
|
|
6427
6428
|
return parseMemberOrUpdateExpression(parser, context, expr, inGroup, 0, start, line, column);
|
|
6428
6429
|
}
|
|
6429
6430
|
function parseImportMetaExpression(parser, context, meta, start, line, column) {
|
|
6430
6431
|
if ((context & 2048) === 0)
|
|
6431
|
-
report(parser,
|
|
6432
|
+
report(parser, 164);
|
|
6432
6433
|
nextToken(parser, context);
|
|
6433
6434
|
if (parser.token !== 143495 && parser.tokenValue !== 'meta')
|
|
6434
6435
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
@@ -6442,7 +6443,7 @@ function parseImportMetaExpression(parser, context, meta, start, line, column) {
|
|
|
6442
6443
|
function parseImportExpression(parser, context, inGroup, start, line, column) {
|
|
6443
6444
|
consume(parser, context | 32768, 67174411);
|
|
6444
6445
|
if (parser.token === 14)
|
|
6445
|
-
report(parser,
|
|
6446
|
+
report(parser, 139);
|
|
6446
6447
|
const source = parseExpression(parser, context, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6447
6448
|
consume(parser, context, 16);
|
|
6448
6449
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -6487,14 +6488,14 @@ function parseTemplate(parser, context) {
|
|
|
6487
6488
|
];
|
|
6488
6489
|
const expressions = [parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos)];
|
|
6489
6490
|
if (parser.token !== 1074790415)
|
|
6490
|
-
report(parser,
|
|
6491
|
+
report(parser, 81);
|
|
6491
6492
|
while ((parser.token = scanTemplateTail(parser, context)) !== 67174409) {
|
|
6492
6493
|
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
|
6493
6494
|
consume(parser, context | 32768, 67174408);
|
|
6494
6495
|
quasis.push(parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenPos, linePos, colPos, false));
|
|
6495
6496
|
expressions.push(parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos));
|
|
6496
6497
|
if (parser.token !== 1074790415)
|
|
6497
|
-
report(parser,
|
|
6498
|
+
report(parser, 81);
|
|
6498
6499
|
}
|
|
6499
6500
|
{
|
|
6500
6501
|
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
|
@@ -6710,10 +6711,10 @@ function parseFunctionExpression(parser, context, isAsync, inGroup, start, line,
|
|
|
6710
6711
|
function parseArrayLiteral(parser, context, skipInitializer, inGroup, start, line, column) {
|
|
6711
6712
|
const expr = parseArrayExpressionOrPattern(parser, context, void 0, skipInitializer, inGroup, 0, 2, 0, start, line, column);
|
|
6712
6713
|
if (context & 256 && parser.destructible & 64) {
|
|
6713
|
-
report(parser,
|
|
6714
|
+
report(parser, 61);
|
|
6714
6715
|
}
|
|
6715
6716
|
if (parser.destructible & 8) {
|
|
6716
|
-
report(parser,
|
|
6717
|
+
report(parser, 60);
|
|
6717
6718
|
}
|
|
6718
6719
|
return expr;
|
|
6719
6720
|
}
|
|
@@ -6808,7 +6809,7 @@ function parseArrayExpressionOrPattern(parser, context, scope, skipInitializer,
|
|
|
6808
6809
|
}
|
|
6809
6810
|
}
|
|
6810
6811
|
else if (parser.destructible & 8) {
|
|
6811
|
-
report(parser,
|
|
6812
|
+
report(parser, 69);
|
|
6812
6813
|
}
|
|
6813
6814
|
else {
|
|
6814
6815
|
left = parseMemberOrUpdateExpression(parser, context, left, inGroup, 0, tokenPos, linePos, colPos);
|
|
@@ -6907,7 +6908,7 @@ function parseSpreadOrRestElement(parser, context, scope, closingToken, kind, or
|
|
|
6907
6908
|
argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
|
|
6908
6909
|
if (parser.token !== 18 && parser.token !== closingToken) {
|
|
6909
6910
|
if (parser.assignable & 2 && parser.token === 1077936157)
|
|
6910
|
-
report(parser,
|
|
6911
|
+
report(parser, 69);
|
|
6911
6912
|
destructible |= 16;
|
|
6912
6913
|
argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, argument);
|
|
6913
6914
|
}
|
|
@@ -6934,7 +6935,7 @@ function parseSpreadOrRestElement(parser, context, scope, closingToken, kind, or
|
|
|
6934
6935
|
token = parser.token;
|
|
6935
6936
|
if (token !== 1077936157 && token !== closingToken && token !== 18) {
|
|
6936
6937
|
if (parser.destructible & 8)
|
|
6937
|
-
report(parser,
|
|
6938
|
+
report(parser, 69);
|
|
6938
6939
|
argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
|
|
6939
6940
|
destructible |= parser.assignable & 2 ? 16 : 0;
|
|
6940
6941
|
if ((parser.token & 4194304) === 4194304) {
|
|
@@ -6984,7 +6985,7 @@ function parseSpreadOrRestElement(parser, context, scope, closingToken, kind, or
|
|
|
6984
6985
|
}
|
|
6985
6986
|
parser.destructible = destructible;
|
|
6986
6987
|
if (parser.token !== closingToken && parser.token !== 18)
|
|
6987
|
-
report(parser,
|
|
6988
|
+
report(parser, 156);
|
|
6988
6989
|
return finishNode(parser, context, start, line, column, {
|
|
6989
6990
|
type: isPattern ? 'RestElement' : 'SpreadElement',
|
|
6990
6991
|
argument: argument
|
|
@@ -7045,10 +7046,10 @@ function parseMethodDefinition(parser, context, kind, inGroup, start, line, colu
|
|
|
7045
7046
|
function parseObjectLiteral(parser, context, skipInitializer, inGroup, start, line, column) {
|
|
7046
7047
|
const expr = parseObjectLiteralOrPattern(parser, context, void 0, skipInitializer, inGroup, 0, 2, 0, start, line, column);
|
|
7047
7048
|
if (context & 256 && parser.destructible & 64) {
|
|
7048
|
-
report(parser,
|
|
7049
|
+
report(parser, 61);
|
|
7049
7050
|
}
|
|
7050
7051
|
if (parser.destructible & 8) {
|
|
7051
|
-
report(parser,
|
|
7052
|
+
report(parser, 60);
|
|
7052
7053
|
}
|
|
7053
7054
|
return expr;
|
|
7054
7055
|
}
|
|
@@ -7165,7 +7166,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7165
7166
|
destructible |= 16;
|
|
7166
7167
|
}
|
|
7167
7168
|
else if (parser.destructible & 8) {
|
|
7168
|
-
report(parser,
|
|
7169
|
+
report(parser, 69);
|
|
7169
7170
|
}
|
|
7170
7171
|
else {
|
|
7171
7172
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
@@ -7225,10 +7226,10 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7225
7226
|
else if (parser.token & (143360 | 4096)) {
|
|
7226
7227
|
destructible |= 16;
|
|
7227
7228
|
if (token === 121)
|
|
7228
|
-
report(parser,
|
|
7229
|
+
report(parser, 93);
|
|
7229
7230
|
if (token === 209007) {
|
|
7230
7231
|
if (parser.flags & 1)
|
|
7231
|
-
report(parser,
|
|
7232
|
+
report(parser, 129);
|
|
7232
7233
|
state |= 16;
|
|
7233
7234
|
}
|
|
7234
7235
|
key = parseIdentifier(parser, context, 0);
|
|
@@ -7247,11 +7248,14 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7247
7248
|
}
|
|
7248
7249
|
else if (parser.token === 8457014) {
|
|
7249
7250
|
destructible |= 16;
|
|
7250
|
-
if (token === 12402
|
|
7251
|
+
if (token === 12402) {
|
|
7251
7252
|
report(parser, 40);
|
|
7252
7253
|
}
|
|
7254
|
+
else if (token === 12403) {
|
|
7255
|
+
report(parser, 41);
|
|
7256
|
+
}
|
|
7253
7257
|
else if (token === 143483) {
|
|
7254
|
-
report(parser,
|
|
7258
|
+
report(parser, 93);
|
|
7255
7259
|
}
|
|
7256
7260
|
nextToken(parser, context);
|
|
7257
7261
|
state |=
|
|
@@ -7286,7 +7290,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7286
7290
|
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7287
7291
|
}
|
|
7288
7292
|
else {
|
|
7289
|
-
report(parser,
|
|
7293
|
+
report(parser, 130);
|
|
7290
7294
|
}
|
|
7291
7295
|
}
|
|
7292
7296
|
else if ((parser.token & 134217728) === 134217728) {
|
|
@@ -7387,7 +7391,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7387
7391
|
destructible = parser.assignable | 16;
|
|
7388
7392
|
}
|
|
7389
7393
|
else {
|
|
7390
|
-
report(parser,
|
|
7394
|
+
report(parser, 131);
|
|
7391
7395
|
}
|
|
7392
7396
|
}
|
|
7393
7397
|
else if (parser.token === 69271571) {
|
|
@@ -7444,7 +7448,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7444
7448
|
destructible |= 16;
|
|
7445
7449
|
}
|
|
7446
7450
|
else if (destructible & 8) {
|
|
7447
|
-
report(parser,
|
|
7451
|
+
report(parser, 60);
|
|
7448
7452
|
}
|
|
7449
7453
|
else {
|
|
7450
7454
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
@@ -7496,7 +7500,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7496
7500
|
destructible = 16;
|
|
7497
7501
|
}
|
|
7498
7502
|
else {
|
|
7499
|
-
report(parser,
|
|
7503
|
+
report(parser, 42);
|
|
7500
7504
|
}
|
|
7501
7505
|
}
|
|
7502
7506
|
else if (token === 8457014) {
|
|
@@ -7512,10 +7516,10 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7512
7516
|
}
|
|
7513
7517
|
else {
|
|
7514
7518
|
reportMessageAt(index, line, index, token === 209007
|
|
7515
|
-
?
|
|
7519
|
+
? 44
|
|
7516
7520
|
: token === 12402 || parser.token === 12403
|
|
7517
|
-
?
|
|
7518
|
-
:
|
|
7521
|
+
? 43
|
|
7522
|
+
: 45, KeywordDescTable[token & 255]);
|
|
7519
7523
|
}
|
|
7520
7524
|
}
|
|
7521
7525
|
else if ((parser.token & 134217728) === 134217728) {
|
|
@@ -7531,7 +7535,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, in
|
|
|
7531
7535
|
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7532
7536
|
}
|
|
7533
7537
|
else {
|
|
7534
|
-
report(parser,
|
|
7538
|
+
report(parser, 123);
|
|
7535
7539
|
}
|
|
7536
7540
|
}
|
|
7537
7541
|
else {
|
|
@@ -7613,7 +7617,7 @@ function parseMethodFormals(parser, context, scope, kind, type, inGroup) {
|
|
|
7613
7617
|
}
|
|
7614
7618
|
isSimpleParameterList = 1;
|
|
7615
7619
|
if (parser.destructible & (32 | 16))
|
|
7616
|
-
report(parser,
|
|
7620
|
+
report(parser, 48);
|
|
7617
7621
|
}
|
|
7618
7622
|
if (parser.token === 1077936157) {
|
|
7619
7623
|
nextToken(parser, context | 32768);
|
|
@@ -7705,7 +7709,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7705
7709
|
parser.assignable = 2;
|
|
7706
7710
|
if (parser.token !== 16 && parser.token !== 18) {
|
|
7707
7711
|
if (destructible & 8)
|
|
7708
|
-
report(parser,
|
|
7712
|
+
report(parser, 119);
|
|
7709
7713
|
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, tokenPos, linePos, colPos);
|
|
7710
7714
|
destructible |= 16;
|
|
7711
7715
|
if (parser.token !== 16 && parser.token !== 18) {
|
|
@@ -7716,7 +7720,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7716
7720
|
else if (token === 14) {
|
|
7717
7721
|
expr = parseSpreadOrRestElement(parser, context, scope, 16, kind, origin, 0, 1, 0, tokenPos, linePos, colPos);
|
|
7718
7722
|
if (parser.destructible & 16)
|
|
7719
|
-
report(parser,
|
|
7723
|
+
report(parser, 72);
|
|
7720
7724
|
isSimpleParameterList = 1;
|
|
7721
7725
|
if (isSequence && (parser.token === 16 || parser.token === 18)) {
|
|
7722
7726
|
expressions.push(expr);
|
|
@@ -7773,7 +7777,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7773
7777
|
}
|
|
7774
7778
|
consume(parser, context, 16);
|
|
7775
7779
|
if (destructible & 16 && destructible & 8)
|
|
7776
|
-
report(parser,
|
|
7780
|
+
report(parser, 146);
|
|
7777
7781
|
destructible |=
|
|
7778
7782
|
parser.destructible & 256
|
|
7779
7783
|
? 256
|
|
@@ -7782,7 +7786,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7782
7786
|
: 0;
|
|
7783
7787
|
if (parser.token === 10) {
|
|
7784
7788
|
if (destructible & (32 | 16))
|
|
7785
|
-
report(parser,
|
|
7789
|
+
report(parser, 47);
|
|
7786
7790
|
if (context & (4194304 | 2048) && destructible & 128)
|
|
7787
7791
|
report(parser, 29);
|
|
7788
7792
|
if (context & (1024 | 2097152) && destructible & 256) {
|
|
@@ -7793,7 +7797,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7793
7797
|
return parseParenthesizedArrow(parser, context, scope, isSequence ? expressions : [expr], canAssign, 0, start, line, column);
|
|
7794
7798
|
}
|
|
7795
7799
|
else if (destructible & 8) {
|
|
7796
|
-
report(parser,
|
|
7800
|
+
report(parser, 140);
|
|
7797
7801
|
}
|
|
7798
7802
|
parser.destructible = ((parser.destructible | 256) ^ 256) | destructible;
|
|
7799
7803
|
return context & 128
|
|
@@ -7818,23 +7822,23 @@ function parseIdentifierOrArrow(parser, context, start, line, column) {
|
|
|
7818
7822
|
}
|
|
7819
7823
|
function parseArrowFromIdentifier(parser, context, value, expr, inNew, canAssign, isAsync, start, line, column) {
|
|
7820
7824
|
if (!canAssign)
|
|
7821
|
-
report(parser,
|
|
7825
|
+
report(parser, 55);
|
|
7822
7826
|
if (inNew)
|
|
7823
|
-
report(parser,
|
|
7827
|
+
report(parser, 49);
|
|
7824
7828
|
parser.flags &= ~128;
|
|
7825
7829
|
const scope = context & 64 ? createArrowHeadParsingScope(parser, context, value) : void 0;
|
|
7826
7830
|
return parseArrowFunctionExpression(parser, context, scope, [expr], isAsync, start, line, column);
|
|
7827
7831
|
}
|
|
7828
7832
|
function parseParenthesizedArrow(parser, context, scope, params, canAssign, isAsync, start, line, column) {
|
|
7829
7833
|
if (!canAssign)
|
|
7830
|
-
report(parser,
|
|
7834
|
+
report(parser, 55);
|
|
7831
7835
|
for (let i = 0; i < params.length; ++i)
|
|
7832
7836
|
reinterpretToPattern(parser, params[i]);
|
|
7833
7837
|
return parseArrowFunctionExpression(parser, context, scope, params, isAsync, start, line, column);
|
|
7834
7838
|
}
|
|
7835
7839
|
function parseArrowFunctionExpression(parser, context, scope, params, isAsync, start, line, column) {
|
|
7836
7840
|
if (parser.flags & 1)
|
|
7837
|
-
report(parser,
|
|
7841
|
+
report(parser, 46);
|
|
7838
7842
|
consume(parser, context | 32768, 10);
|
|
7839
7843
|
context = ((context | 15728640) ^ 15728640) | (isAsync << 22);
|
|
7840
7844
|
const expression = parser.token !== 2162700;
|
|
@@ -7853,16 +7857,16 @@ function parseArrowFunctionExpression(parser, context, scope, params, isAsync, s
|
|
|
7853
7857
|
switch (parser.token) {
|
|
7854
7858
|
case 69271571:
|
|
7855
7859
|
if ((parser.flags & 1) === 0) {
|
|
7856
|
-
report(parser,
|
|
7860
|
+
report(parser, 113);
|
|
7857
7861
|
}
|
|
7858
7862
|
break;
|
|
7859
7863
|
case 67108877:
|
|
7860
7864
|
case 67174409:
|
|
7861
7865
|
case 22:
|
|
7862
|
-
report(parser,
|
|
7866
|
+
report(parser, 114);
|
|
7863
7867
|
case 67174411:
|
|
7864
7868
|
if ((parser.flags & 1) === 0) {
|
|
7865
|
-
report(parser,
|
|
7869
|
+
report(parser, 113);
|
|
7866
7870
|
}
|
|
7867
7871
|
parser.flags |= 1024;
|
|
7868
7872
|
break;
|
|
@@ -7870,7 +7874,7 @@ function parseArrowFunctionExpression(parser, context, scope, params, isAsync, s
|
|
|
7870
7874
|
if ((parser.token & 8454144) === 8454144 && (parser.flags & 1) === 0)
|
|
7871
7875
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
7872
7876
|
if ((parser.token & 33619968) === 33619968)
|
|
7873
|
-
report(parser,
|
|
7877
|
+
report(parser, 122);
|
|
7874
7878
|
}
|
|
7875
7879
|
parser.assignable = 2;
|
|
7876
7880
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -7918,7 +7922,7 @@ function parseFormalParametersOrFormalList(parser, context, scope, inGroup, kind
|
|
|
7918
7922
|
}
|
|
7919
7923
|
isSimpleParameterList = 1;
|
|
7920
7924
|
if (parser.destructible & (32 | 16)) {
|
|
7921
|
-
report(parser,
|
|
7925
|
+
report(parser, 48);
|
|
7922
7926
|
}
|
|
7923
7927
|
}
|
|
7924
7928
|
if (parser.token === 1077936157) {
|
|
@@ -7994,16 +7998,16 @@ function parseNewExpression(parser, context, inGroup, start, line, column) {
|
|
|
7994
7998
|
parser.assignable = 2;
|
|
7995
7999
|
return parseMetaProperty(parser, context, id, start, line, column);
|
|
7996
8000
|
}
|
|
7997
|
-
report(parser,
|
|
8001
|
+
report(parser, 92);
|
|
7998
8002
|
}
|
|
7999
8003
|
parser.assignable = 2;
|
|
8000
8004
|
if ((parser.token & 16842752) === 16842752) {
|
|
8001
|
-
report(parser,
|
|
8005
|
+
report(parser, 63, KeywordDescTable[parser.token & 255]);
|
|
8002
8006
|
}
|
|
8003
8007
|
const expr = parsePrimaryExpression(parser, context, 2, 1, 0, 0, inGroup, 1, tokenPos, linePos, colPos);
|
|
8004
8008
|
context = (context | 134217728) ^ 134217728;
|
|
8005
8009
|
if (parser.token === 67108991)
|
|
8006
|
-
report(parser,
|
|
8010
|
+
report(parser, 163);
|
|
8007
8011
|
const callee = parseMembeExpressionNoCall(parser, context, expr, inGroup, tokenPos, linePos, colPos);
|
|
8008
8012
|
parser.assignable = 2;
|
|
8009
8013
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8038,7 +8042,7 @@ function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kin
|
|
|
8038
8042
|
if (consumeOpt(parser, context, 16)) {
|
|
8039
8043
|
if (parser.token === 10) {
|
|
8040
8044
|
if (flags & 1)
|
|
8041
|
-
report(parser,
|
|
8045
|
+
report(parser, 46);
|
|
8042
8046
|
return parseParenthesizedArrow(parser, context, scope, [], canAssign, 1, start, line, column);
|
|
8043
8047
|
}
|
|
8044
8048
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8094,7 +8098,7 @@ function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kin
|
|
|
8094
8098
|
isSimpleParameterList = 1;
|
|
8095
8099
|
if (parser.token !== 16 && parser.token !== 18) {
|
|
8096
8100
|
if (destructible & 8)
|
|
8097
|
-
report(parser,
|
|
8101
|
+
report(parser, 119);
|
|
8098
8102
|
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, tokenPos, linePos, colPos);
|
|
8099
8103
|
destructible |= 16;
|
|
8100
8104
|
if ((parser.token & 8454144) === 8454144) {
|
|
@@ -8142,7 +8146,7 @@ function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kin
|
|
|
8142
8146
|
if (destructible & (32 | 16))
|
|
8143
8147
|
report(parser, 25);
|
|
8144
8148
|
if (parser.flags & 1 || flags & 1)
|
|
8145
|
-
report(parser,
|
|
8149
|
+
report(parser, 46);
|
|
8146
8150
|
if (destructible & 128)
|
|
8147
8151
|
report(parser, 29);
|
|
8148
8152
|
if (context & (1024 | 2097152) && destructible & 256)
|
|
@@ -8152,7 +8156,7 @@ function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kin
|
|
|
8152
8156
|
return parseParenthesizedArrow(parser, context, scope, params, canAssign, 1, start, line, column);
|
|
8153
8157
|
}
|
|
8154
8158
|
else if (destructible & 8) {
|
|
8155
|
-
report(parser,
|
|
8159
|
+
report(parser, 60);
|
|
8156
8160
|
}
|
|
8157
8161
|
parser.assignable = 2;
|
|
8158
8162
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8197,10 +8201,10 @@ function parseClassDeclaration(parser, context, scope, flags, start, line, colum
|
|
|
8197
8201
|
const { tokenValue } = parser;
|
|
8198
8202
|
if (parser.token & 4096 && parser.token !== 20567) {
|
|
8199
8203
|
if (isStrictReservedWord(parser, context, parser.token)) {
|
|
8200
|
-
report(parser,
|
|
8204
|
+
report(parser, 115);
|
|
8201
8205
|
}
|
|
8202
8206
|
if ((parser.token & 537079808) === 537079808) {
|
|
8203
|
-
report(parser,
|
|
8207
|
+
report(parser, 116);
|
|
8204
8208
|
}
|
|
8205
8209
|
if (scope) {
|
|
8206
8210
|
addBlockName(parser, context, scope, tokenValue, 32, 0);
|
|
@@ -8253,9 +8257,9 @@ function parseClassExpression(parser, context, inGroup, start, line, column) {
|
|
|
8253
8257
|
nextToken(parser, context);
|
|
8254
8258
|
if (parser.token & 4096 && parser.token !== 20567) {
|
|
8255
8259
|
if (isStrictReservedWord(parser, context, parser.token))
|
|
8256
|
-
report(parser, 114);
|
|
8257
|
-
if ((parser.token & 537079808) === 537079808) {
|
|
8258
8260
|
report(parser, 115);
|
|
8261
|
+
if ((parser.token & 537079808) === 537079808) {
|
|
8262
|
+
report(parser, 116);
|
|
8259
8263
|
}
|
|
8260
8264
|
id = parseIdentifier(parser, context, 0);
|
|
8261
8265
|
}
|
|
@@ -8314,13 +8318,13 @@ function parseClassBody(parser, context, inheritedContext, scope, kind, origin,
|
|
|
8314
8318
|
decorators = parseDecorators(parser, context);
|
|
8315
8319
|
length = decorators.length;
|
|
8316
8320
|
if (length > 0 && parser.tokenValue === 'constructor') {
|
|
8317
|
-
report(parser,
|
|
8321
|
+
report(parser, 107);
|
|
8318
8322
|
}
|
|
8319
8323
|
if (parser.token === 1074790415)
|
|
8320
|
-
report(parser,
|
|
8324
|
+
report(parser, 106);
|
|
8321
8325
|
if (consumeOpt(parser, context, 1074790417)) {
|
|
8322
8326
|
if (length > 0)
|
|
8323
|
-
report(parser,
|
|
8327
|
+
report(parser, 117);
|
|
8324
8328
|
continue;
|
|
8325
8329
|
}
|
|
8326
8330
|
body.push(parseClassElementList(parser, context, scope, inheritedContext, kind, decorators, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
|
|
@@ -8417,20 +8421,20 @@ function parseClassElementList(parser, context, scope, inheritedContext, type, d
|
|
|
8417
8421
|
key = parsePrivateIdentifier(parser, context, tokenPos, linePos, colPos);
|
|
8418
8422
|
}
|
|
8419
8423
|
else
|
|
8420
|
-
report(parser,
|
|
8424
|
+
report(parser, 132);
|
|
8421
8425
|
}
|
|
8422
8426
|
if ((kind & 2) === 0) {
|
|
8423
8427
|
if (parser.tokenValue === 'constructor') {
|
|
8424
8428
|
if ((parser.token & 1073741824) === 1073741824) {
|
|
8425
|
-
report(parser,
|
|
8429
|
+
report(parser, 126);
|
|
8426
8430
|
}
|
|
8427
8431
|
else if ((kind & 32) === 0 && parser.token === 67174411) {
|
|
8428
8432
|
if (kind & (768 | 16 | 128 | 8)) {
|
|
8429
|
-
report(parser,
|
|
8433
|
+
report(parser, 51, 'accessor');
|
|
8430
8434
|
}
|
|
8431
8435
|
else if ((context & 524288) === 0) {
|
|
8432
8436
|
if (parser.flags & 32)
|
|
8433
|
-
report(parser,
|
|
8437
|
+
report(parser, 52);
|
|
8434
8438
|
else
|
|
8435
8439
|
parser.flags |= 32;
|
|
8436
8440
|
}
|
|
@@ -8440,7 +8444,7 @@ function parseClassElementList(parser, context, scope, inheritedContext, type, d
|
|
|
8440
8444
|
else if ((kind & 4096) === 0 &&
|
|
8441
8445
|
kind & (32 | 768 | 8 | 16) &&
|
|
8442
8446
|
parser.tokenValue === 'prototype') {
|
|
8443
|
-
report(parser,
|
|
8447
|
+
report(parser, 50);
|
|
8444
8448
|
}
|
|
8445
8449
|
}
|
|
8446
8450
|
if (context & 1 && parser.token !== 67174411) {
|
|
@@ -8482,7 +8486,7 @@ function parsePrivateIdentifier(parser, context, start, line, column) {
|
|
|
8482
8486
|
nextToken(parser, context);
|
|
8483
8487
|
const { tokenValue } = parser;
|
|
8484
8488
|
if (tokenValue === 'constructor')
|
|
8485
|
-
report(parser,
|
|
8489
|
+
report(parser, 125);
|
|
8486
8490
|
nextToken(parser, context);
|
|
8487
8491
|
return finishNode(parser, context, start, line, column, {
|
|
8488
8492
|
type: 'PrivateIdentifier',
|
|
@@ -8497,7 +8501,7 @@ function parsePropertyDefinition(parser, context, key, state, decorators, start,
|
|
|
8497
8501
|
nextToken(parser, context | 32768);
|
|
8498
8502
|
const { tokenPos, linePos, colPos } = parser;
|
|
8499
8503
|
if (parser.token === 537079928)
|
|
8500
|
-
report(parser,
|
|
8504
|
+
report(parser, 116);
|
|
8501
8505
|
value = parsePrimaryExpression(parser, context | 16384, 2, 0, 1, 0, 0, 1, tokenPos, linePos, colPos);
|
|
8502
8506
|
if ((parser.token & 1073741824) !== 1073741824) {
|
|
8503
8507
|
value = parseMemberOrUpdateExpression(parser, context | 16384, value, 0, 0, tokenPos, linePos, colPos);
|
|
@@ -8525,33 +8529,33 @@ function parseBindingPattern(parser, context, scope, type, origin, start, line,
|
|
|
8525
8529
|
? parseArrayExpressionOrPattern(parser, context, scope, 1, 0, 1, type, origin, start, line, column)
|
|
8526
8530
|
: parseObjectLiteralOrPattern(parser, context, scope, 1, 0, 1, type, origin, start, line, column);
|
|
8527
8531
|
if (parser.destructible & 16)
|
|
8528
|
-
report(parser,
|
|
8532
|
+
report(parser, 48);
|
|
8529
8533
|
if (parser.destructible & 32)
|
|
8530
|
-
report(parser,
|
|
8534
|
+
report(parser, 48);
|
|
8531
8535
|
return left;
|
|
8532
8536
|
}
|
|
8533
8537
|
function parseAndClassifyIdentifier(parser, context, scope, kind, origin, start, line, column) {
|
|
8534
8538
|
const { tokenValue, token } = parser;
|
|
8535
8539
|
if (context & 1024) {
|
|
8536
8540
|
if ((token & 537079808) === 537079808) {
|
|
8537
|
-
report(parser,
|
|
8541
|
+
report(parser, 116);
|
|
8538
8542
|
}
|
|
8539
8543
|
else if ((token & 36864) === 36864) {
|
|
8540
|
-
report(parser,
|
|
8544
|
+
report(parser, 115);
|
|
8541
8545
|
}
|
|
8542
8546
|
}
|
|
8543
8547
|
if ((token & 20480) === 20480) {
|
|
8544
|
-
report(parser,
|
|
8548
|
+
report(parser, 100);
|
|
8545
8549
|
}
|
|
8546
8550
|
if (context & (2048 | 2097152) && token === 241773) {
|
|
8547
8551
|
report(parser, 30);
|
|
8548
8552
|
}
|
|
8549
8553
|
if (token === 241739) {
|
|
8550
8554
|
if (kind & (8 | 16))
|
|
8551
|
-
report(parser,
|
|
8555
|
+
report(parser, 98);
|
|
8552
8556
|
}
|
|
8553
8557
|
if (context & (4194304 | 2048) && token === 209008) {
|
|
8554
|
-
report(parser,
|
|
8558
|
+
report(parser, 96);
|
|
8555
8559
|
}
|
|
8556
8560
|
nextToken(parser, context);
|
|
8557
8561
|
if (scope)
|
|
@@ -8579,7 +8583,7 @@ function parseJSXRootElementOrFragment(parser, context, inJSXChild, start, line,
|
|
|
8579
8583
|
closingElement = parseJSXClosingElement(parser, context, inJSXChild, parser.tokenPos, parser.linePos, parser.colPos);
|
|
8580
8584
|
const close = isEqualTagName(closingElement.name);
|
|
8581
8585
|
if (isEqualTagName(openingElement.name) !== close)
|
|
8582
|
-
report(parser,
|
|
8586
|
+
report(parser, 150, close);
|
|
8583
8587
|
}
|
|
8584
8588
|
return finishNode(parser, context, start, line, column, {
|
|
8585
8589
|
type: 'JSXElement',
|
|
@@ -8735,7 +8739,7 @@ function parseJsxAttribute(parser, context, start, line, column) {
|
|
|
8735
8739
|
value = parseJSXExpressionContainer(parser, context, 1, 1, tokenPos, linePos, colPos);
|
|
8736
8740
|
break;
|
|
8737
8741
|
default:
|
|
8738
|
-
report(parser,
|
|
8742
|
+
report(parser, 149);
|
|
8739
8743
|
}
|
|
8740
8744
|
}
|
|
8741
8745
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8761,7 +8765,7 @@ function parseJSXExpressionContainer(parser, context, inJSXChild, isAttr, start,
|
|
|
8761
8765
|
let expression = null;
|
|
8762
8766
|
if (parser.token === 1074790415) {
|
|
8763
8767
|
if (isAttr)
|
|
8764
|
-
report(parser,
|
|
8768
|
+
report(parser, 152);
|
|
8765
8769
|
expression = parseJSXEmptyExpression(parser, context, parser.startPos, parser.startLine, parser.startColumn);
|
|
8766
8770
|
}
|
|
8767
8771
|
else {
|
|
@@ -8808,7 +8812,7 @@ var estree = /*#__PURE__*/Object.freeze({
|
|
|
8808
8812
|
__proto__: null
|
|
8809
8813
|
});
|
|
8810
8814
|
|
|
8811
|
-
var version$1 = "4.3.
|
|
8815
|
+
var version$1 = "4.3.3";
|
|
8812
8816
|
|
|
8813
8817
|
const version = version$1;
|
|
8814
8818
|
function parseScript(source, options) {
|