requirejs-esm 2.2.1 → 2.3.1
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/dist/api.js +622 -460
- package/dist/api.js.map +1 -1
- package/dist/plugin.js +619 -458
- package/dist/plugin.js.map +1 -1
- package/package.json +14 -14
- package/src/api.d.ts +2 -1
- package/src/transformer/amd.js +76 -6
package/dist/plugin.js
CHANGED
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
[8]: 'Octal literals are not allowed in strict mode',
|
|
181
181
|
[7]: 'Decimal integer literals with a leading zero are forbidden in strict mode',
|
|
182
182
|
[9]: 'Expected number in radix %0',
|
|
183
|
-
[
|
|
183
|
+
[146]: 'Invalid left-hand side assignment to a destructible right-hand side',
|
|
184
184
|
[10]: 'Non-number found after exponent indicator',
|
|
185
185
|
[11]: 'Invalid BigIntLiteral',
|
|
186
186
|
[12]: 'No identifiers allowed directly after numeric literal',
|
|
@@ -201,9 +201,9 @@
|
|
|
201
201
|
[27]: 'Member access on super must be in a method',
|
|
202
202
|
[29]: 'Await expression not allowed in formal parameter',
|
|
203
203
|
[30]: 'Yield expression not allowed in formal parameter',
|
|
204
|
-
[
|
|
204
|
+
[93]: "Unexpected token: 'escaped keyword'",
|
|
205
205
|
[31]: 'Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses',
|
|
206
|
-
[
|
|
206
|
+
[120]: 'Async functions can only be declared at the top level or inside a block',
|
|
207
207
|
[32]: 'Unterminated regular expression',
|
|
208
208
|
[33]: 'Unexpected regular expression flag',
|
|
209
209
|
[34]: "Duplicate regular expression flag '%0'",
|
|
@@ -213,125 +213,126 @@
|
|
|
213
213
|
[38]: 'Function name may not contain any reserved words or be eval or arguments in strict mode',
|
|
214
214
|
[39]: 'The rest operator is missing an argument',
|
|
215
215
|
[40]: 'A getter cannot be a generator',
|
|
216
|
-
[41]: 'A
|
|
217
|
-
[
|
|
218
|
-
[
|
|
219
|
-
[
|
|
220
|
-
[
|
|
221
|
-
[45]: "
|
|
222
|
-
[46]:
|
|
223
|
-
[47]: 'The
|
|
224
|
-
[48]: '
|
|
225
|
-
[49]:
|
|
226
|
-
[50]:
|
|
227
|
-
[51]: '
|
|
228
|
-
[52]: '
|
|
229
|
-
[53]: 'Invalid
|
|
230
|
-
[54]: '
|
|
231
|
-
[55]: '
|
|
232
|
-
[56]: '
|
|
233
|
-
[57]:
|
|
234
|
-
[58]: '
|
|
235
|
-
[59]: 'Invalid
|
|
236
|
-
[60]: '
|
|
237
|
-
[61]: '
|
|
238
|
-
[62]:
|
|
239
|
-
[63]: "
|
|
240
|
-
[64]: '
|
|
241
|
-
[65]: '
|
|
242
|
-
[66]: 'Illegal
|
|
243
|
-
[67]: '
|
|
244
|
-
[68]: '
|
|
245
|
-
[69]: '
|
|
246
|
-
[70]: '
|
|
247
|
-
[71]: '
|
|
248
|
-
[
|
|
249
|
-
[74]: 'In
|
|
250
|
-
[75]: '
|
|
251
|
-
[76]:
|
|
252
|
-
[77]: '
|
|
253
|
-
[78]: 'Invalid
|
|
254
|
-
[79]: '
|
|
255
|
-
[80]: '
|
|
256
|
-
[
|
|
257
|
-
[
|
|
258
|
-
[
|
|
259
|
-
[84]: 'Catch clause parameter
|
|
260
|
-
[85]: '
|
|
261
|
-
[86]: '
|
|
262
|
-
[87]: '
|
|
263
|
-
[88]: '
|
|
264
|
-
[89]: '
|
|
265
|
-
[90]: '
|
|
266
|
-
[91]: '
|
|
267
|
-
[
|
|
268
|
-
[
|
|
269
|
-
[
|
|
270
|
-
[
|
|
271
|
-
[
|
|
272
|
-
[
|
|
273
|
-
[95]: '
|
|
274
|
-
[
|
|
275
|
-
[101]: '
|
|
276
|
-
[102]: '
|
|
277
|
-
[103]: '
|
|
278
|
-
[104]:
|
|
279
|
-
[105]: '
|
|
280
|
-
[106]:
|
|
281
|
-
[
|
|
282
|
-
[109]:
|
|
283
|
-
[110]: '
|
|
284
|
-
[111]:
|
|
285
|
-
[112]:
|
|
286
|
-
[113]: 'Block body arrows can not be immediately
|
|
287
|
-
[114]: '
|
|
288
|
-
[115]: 'Unexpected
|
|
289
|
-
[116]: '
|
|
290
|
-
[117]: '
|
|
291
|
-
[118]: '
|
|
292
|
-
[
|
|
293
|
-
[121]: '
|
|
294
|
-
[122]: '
|
|
295
|
-
[123]: '
|
|
296
|
-
[
|
|
297
|
-
[
|
|
298
|
-
[
|
|
299
|
-
[127]: '
|
|
300
|
-
[128]: '
|
|
301
|
-
[129]: '
|
|
302
|
-
[
|
|
303
|
-
[132]:
|
|
304
|
-
[133]: '
|
|
305
|
-
[134]:
|
|
306
|
-
[135]:
|
|
307
|
-
[136]: 'import()
|
|
308
|
-
[137]: '
|
|
309
|
-
[138]: '
|
|
310
|
-
[139]:
|
|
311
|
-
[140]: "
|
|
312
|
-
[141]: "
|
|
313
|
-
[
|
|
314
|
-
[
|
|
315
|
-
[143]: '
|
|
316
|
-
[
|
|
317
|
-
[
|
|
318
|
-
[
|
|
319
|
-
[149]: '
|
|
320
|
-
[150]: '
|
|
321
|
-
[151]:
|
|
322
|
-
[152]: "
|
|
323
|
-
[153]: "'%0'
|
|
324
|
-
[154]: '
|
|
325
|
-
[155]: '
|
|
326
|
-
[156]: '
|
|
327
|
-
[157]: '
|
|
328
|
-
[158]: '
|
|
329
|
-
[159]: '
|
|
330
|
-
[160]: '
|
|
331
|
-
[161]: 'Invalid
|
|
332
|
-
[162]: 'Invalid optional chain from
|
|
333
|
-
[163]: '
|
|
334
|
-
[164]: '
|
|
216
|
+
[41]: 'A setter cannot be a generator',
|
|
217
|
+
[42]: 'A computed property name must be followed by a colon or paren',
|
|
218
|
+
[131]: 'Object literal keys that are strings or numbers must be a method or have a colon',
|
|
219
|
+
[44]: 'Found `* async x(){}` but this should be `async * x(){}`',
|
|
220
|
+
[43]: 'Getters and setters can not be generators',
|
|
221
|
+
[45]: "'%0' can not be generator method",
|
|
222
|
+
[46]: "No line break is allowed after '=>'",
|
|
223
|
+
[47]: 'The left-hand side of the arrow can only be destructed through assignment',
|
|
224
|
+
[48]: 'The binding declaration is not destructible',
|
|
225
|
+
[49]: 'Async arrow can not be followed by new expression',
|
|
226
|
+
[50]: "Classes may not have a static property named 'prototype'",
|
|
227
|
+
[51]: 'Class constructor may not be a %0',
|
|
228
|
+
[52]: 'Duplicate constructor method in class',
|
|
229
|
+
[53]: 'Invalid increment/decrement operand',
|
|
230
|
+
[54]: 'Invalid use of `new` keyword on an increment/decrement expression',
|
|
231
|
+
[55]: '`=>` is an invalid assignment target',
|
|
232
|
+
[56]: 'Rest element may not have a trailing comma',
|
|
233
|
+
[57]: 'Missing initializer in %0 declaration',
|
|
234
|
+
[58]: "'for-%0' loop head declarations can not have an initializer",
|
|
235
|
+
[59]: 'Invalid left-hand side in for-%0 loop: Must have a single binding',
|
|
236
|
+
[60]: 'Invalid shorthand property initializer',
|
|
237
|
+
[61]: 'Property name __proto__ appears more than once in object literal',
|
|
238
|
+
[62]: 'Let is disallowed as a lexically bound name',
|
|
239
|
+
[63]: "Invalid use of '%0' inside new expression",
|
|
240
|
+
[64]: "Illegal 'use strict' directive in function with non-simple parameter list",
|
|
241
|
+
[65]: 'Identifier "let" disallowed as left-hand side expression in strict mode',
|
|
242
|
+
[66]: 'Illegal continue statement',
|
|
243
|
+
[67]: 'Illegal break statement',
|
|
244
|
+
[68]: 'Cannot have `let[...]` as a var name in strict mode',
|
|
245
|
+
[69]: 'Invalid destructuring assignment target',
|
|
246
|
+
[70]: 'Rest parameter may not have a default initializer',
|
|
247
|
+
[71]: 'The rest argument must the be last parameter',
|
|
248
|
+
[72]: 'Invalid rest argument',
|
|
249
|
+
[74]: 'In strict mode code, functions can only be declared at top level or inside a block',
|
|
250
|
+
[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',
|
|
251
|
+
[76]: 'Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement',
|
|
252
|
+
[77]: "Class declaration can't appear in single-statement context",
|
|
253
|
+
[78]: 'Invalid left-hand side in for-%0',
|
|
254
|
+
[79]: 'Invalid assignment in for-%0',
|
|
255
|
+
[80]: 'for await (... of ...) is only valid in async functions and async generators',
|
|
256
|
+
[81]: 'The first token after the template expression should be a continuation of the template',
|
|
257
|
+
[83]: '`let` declaration not allowed here and `let` cannot be a regular var name in strict mode',
|
|
258
|
+
[82]: '`let \n [` is a restricted production at the start of a statement',
|
|
259
|
+
[84]: 'Catch clause requires exactly one parameter, not more (and no trailing comma)',
|
|
260
|
+
[85]: 'Catch clause parameter does not support default values',
|
|
261
|
+
[86]: 'Missing catch or finally after try',
|
|
262
|
+
[87]: 'More than one default clause in switch statement',
|
|
263
|
+
[88]: 'Illegal newline after throw',
|
|
264
|
+
[89]: 'Strict mode code may not include a with statement',
|
|
265
|
+
[90]: 'Illegal return statement',
|
|
266
|
+
[91]: 'The left hand side of the for-header binding declaration is not destructible',
|
|
267
|
+
[92]: 'new.target only allowed within functions',
|
|
268
|
+
[94]: "'#' not followed by identifier",
|
|
269
|
+
[100]: 'Invalid keyword',
|
|
270
|
+
[99]: "Can not use 'let' as a class name",
|
|
271
|
+
[98]: "'A lexical declaration can't define a 'let' binding",
|
|
272
|
+
[97]: 'Can not use `let` as variable name in strict mode',
|
|
273
|
+
[95]: "'%0' may not be used as an identifier in this context",
|
|
274
|
+
[96]: 'Await is only valid in async functions',
|
|
275
|
+
[101]: 'The %0 keyword can only be used with the module goal',
|
|
276
|
+
[102]: 'Unicode codepoint must not be greater than 0x10FFFF',
|
|
277
|
+
[103]: '%0 source must be string',
|
|
278
|
+
[104]: 'Only a identifier can be used to indicate alias',
|
|
279
|
+
[105]: "Only '*' or '{...}' can be imported after default",
|
|
280
|
+
[106]: 'Trailing decorator may be followed by method',
|
|
281
|
+
[107]: "Decorators can't be used with a constructor",
|
|
282
|
+
[109]: 'HTML comments are only allowed with web compatibility (Annex B)',
|
|
283
|
+
[110]: "The identifier 'let' must not be in expression position in strict mode",
|
|
284
|
+
[111]: 'Cannot assign to `eval` and `arguments` in strict mode',
|
|
285
|
+
[112]: "The left-hand side of a for-of loop may not start with 'let'",
|
|
286
|
+
[113]: 'Block body arrows can not be immediately invoked without a group',
|
|
287
|
+
[114]: 'Block body arrows can not be immediately accessed without a group',
|
|
288
|
+
[115]: 'Unexpected strict mode reserved word',
|
|
289
|
+
[116]: 'Unexpected eval or arguments in strict mode',
|
|
290
|
+
[117]: 'Decorators must not be followed by a semicolon',
|
|
291
|
+
[118]: 'Calling delete on expression not allowed in strict mode',
|
|
292
|
+
[119]: 'Pattern can not have a tail',
|
|
293
|
+
[121]: 'Can not have a `yield` expression on the left side of a ternary',
|
|
294
|
+
[122]: 'An arrow function can not have a postfix update operator',
|
|
295
|
+
[123]: 'Invalid object literal key character after generator star',
|
|
296
|
+
[124]: 'Private fields can not be deleted',
|
|
297
|
+
[126]: 'Classes may not have a field called constructor',
|
|
298
|
+
[125]: 'Classes may not have a private element named constructor',
|
|
299
|
+
[127]: 'A class field initializer may not contain arguments',
|
|
300
|
+
[128]: 'Generators can only be declared at the top level or inside a block',
|
|
301
|
+
[129]: 'Async methods are a restricted production and cannot have a newline following it',
|
|
302
|
+
[130]: 'Unexpected character after object literal property name',
|
|
303
|
+
[132]: 'Invalid key token',
|
|
304
|
+
[133]: "Label '%0' has already been declared",
|
|
305
|
+
[134]: 'continue statement must be nested within an iteration statement',
|
|
306
|
+
[135]: "Undefined label '%0'",
|
|
307
|
+
[136]: 'Trailing comma is disallowed inside import(...) arguments',
|
|
308
|
+
[137]: 'import() requires exactly one argument',
|
|
309
|
+
[138]: 'Cannot use new with import(...)',
|
|
310
|
+
[139]: '... is not allowed in import()',
|
|
311
|
+
[140]: "Expected '=>'",
|
|
312
|
+
[141]: "Duplicate binding '%0'",
|
|
313
|
+
[142]: "Cannot export a duplicate name '%0'",
|
|
314
|
+
[145]: 'Duplicate %0 for-binding',
|
|
315
|
+
[143]: "Exported binding '%0' needs to refer to a top-level declared variable",
|
|
316
|
+
[144]: 'Unexpected private field',
|
|
317
|
+
[148]: 'Numeric separators are not allowed at the end of numeric literals',
|
|
318
|
+
[147]: 'Only one underscore is allowed as numeric separator',
|
|
319
|
+
[149]: 'JSX value should be either an expression or a quoted JSX text',
|
|
320
|
+
[150]: 'Expected corresponding JSX closing tag for %0',
|
|
321
|
+
[151]: 'Adjacent JSX elements must be wrapped in an enclosing tag',
|
|
322
|
+
[152]: "JSX attributes must only be assigned a non-empty 'expression'",
|
|
323
|
+
[153]: "'%0' has already been declared",
|
|
324
|
+
[154]: "'%0' shadowed a catch clause binding",
|
|
325
|
+
[155]: 'Dot property must be an identifier',
|
|
326
|
+
[156]: 'Encountered invalid input after spread/rest argument',
|
|
327
|
+
[157]: 'Catch without try',
|
|
328
|
+
[158]: 'Finally without try',
|
|
329
|
+
[159]: 'Expected corresponding closing tag for JSX fragment',
|
|
330
|
+
[160]: 'Coalescing and logical operators used together in the same expression must be disambiguated with parentheses',
|
|
331
|
+
[161]: 'Invalid tagged template on optional chain',
|
|
332
|
+
[162]: 'Invalid optional chain from super property',
|
|
333
|
+
[163]: 'Invalid optional chain from new expression',
|
|
334
|
+
[164]: 'Cannot use "import.meta" outside a module',
|
|
335
|
+
[165]: 'Leading decorators must be attached to a class declaration'
|
|
335
336
|
};
|
|
336
337
|
class ParseError extends SyntaxError {
|
|
337
338
|
constructor(startindex, line, column, type, ...params) {
|
|
@@ -1033,7 +1034,7 @@
|
|
|
1033
1034
|
break;
|
|
1034
1035
|
case 117:
|
|
1035
1036
|
if (mask & 16)
|
|
1036
|
-
report(parser, 34, '
|
|
1037
|
+
report(parser, 34, 'u');
|
|
1037
1038
|
mask |= 16;
|
|
1038
1039
|
break;
|
|
1039
1040
|
case 121:
|
|
@@ -1046,6 +1047,11 @@
|
|
|
1046
1047
|
report(parser, 34, 's');
|
|
1047
1048
|
mask |= 32;
|
|
1048
1049
|
break;
|
|
1050
|
+
case 100:
|
|
1051
|
+
if (mask & 64)
|
|
1052
|
+
report(parser, 34, 'd');
|
|
1053
|
+
mask |= 64;
|
|
1054
|
+
break;
|
|
1049
1055
|
default:
|
|
1050
1056
|
report(parser, 33);
|
|
1051
1057
|
}
|
|
@@ -1064,7 +1070,13 @@
|
|
|
1064
1070
|
return new RegExp(pattern, flags);
|
|
1065
1071
|
}
|
|
1066
1072
|
catch (e) {
|
|
1067
|
-
|
|
1073
|
+
try {
|
|
1074
|
+
new RegExp(pattern, flags.replace('d', ''));
|
|
1075
|
+
return null;
|
|
1076
|
+
}
|
|
1077
|
+
catch (e) {
|
|
1078
|
+
report(parser, 32);
|
|
1079
|
+
}
|
|
1068
1080
|
}
|
|
1069
1081
|
}
|
|
1070
1082
|
|
|
@@ -1252,7 +1264,7 @@
|
|
|
1252
1264
|
case -4:
|
|
1253
1265
|
report(state, 6);
|
|
1254
1266
|
case -5:
|
|
1255
|
-
report(state,
|
|
1267
|
+
report(state, 102);
|
|
1256
1268
|
}
|
|
1257
1269
|
}
|
|
1258
1270
|
|
|
@@ -1365,7 +1377,7 @@
|
|
|
1365
1377
|
while (CharTypes[char] & (64 | 4096)) {
|
|
1366
1378
|
if (char === 95) {
|
|
1367
1379
|
if (!allowSeparator)
|
|
1368
|
-
report(parser,
|
|
1380
|
+
report(parser, 147);
|
|
1369
1381
|
allowSeparator = 0;
|
|
1370
1382
|
char = advanceChar(parser);
|
|
1371
1383
|
continue;
|
|
@@ -1375,8 +1387,8 @@
|
|
|
1375
1387
|
digits++;
|
|
1376
1388
|
char = advanceChar(parser);
|
|
1377
1389
|
}
|
|
1378
|
-
if (digits
|
|
1379
|
-
report(parser, digits
|
|
1390
|
+
if (digits === 0 || !allowSeparator) {
|
|
1391
|
+
report(parser, digits === 0 ? 19 : 148);
|
|
1380
1392
|
}
|
|
1381
1393
|
}
|
|
1382
1394
|
else if ((char | 32) === 111) {
|
|
@@ -1385,7 +1397,7 @@
|
|
|
1385
1397
|
while (CharTypes[char] & (32 | 4096)) {
|
|
1386
1398
|
if (char === 95) {
|
|
1387
1399
|
if (!allowSeparator) {
|
|
1388
|
-
report(parser,
|
|
1400
|
+
report(parser, 147);
|
|
1389
1401
|
}
|
|
1390
1402
|
allowSeparator = 0;
|
|
1391
1403
|
char = advanceChar(parser);
|
|
@@ -1396,8 +1408,8 @@
|
|
|
1396
1408
|
digits++;
|
|
1397
1409
|
char = advanceChar(parser);
|
|
1398
1410
|
}
|
|
1399
|
-
if (digits
|
|
1400
|
-
report(parser, digits
|
|
1411
|
+
if (digits === 0 || !allowSeparator) {
|
|
1412
|
+
report(parser, digits === 0 ? 0 : 148);
|
|
1401
1413
|
}
|
|
1402
1414
|
}
|
|
1403
1415
|
else if ((char | 32) === 98) {
|
|
@@ -1406,7 +1418,7 @@
|
|
|
1406
1418
|
while (CharTypes[char] & (128 | 4096)) {
|
|
1407
1419
|
if (char === 95) {
|
|
1408
1420
|
if (!allowSeparator) {
|
|
1409
|
-
report(parser,
|
|
1421
|
+
report(parser, 147);
|
|
1410
1422
|
}
|
|
1411
1423
|
allowSeparator = 0;
|
|
1412
1424
|
char = advanceChar(parser);
|
|
@@ -1417,8 +1429,8 @@
|
|
|
1417
1429
|
digits++;
|
|
1418
1430
|
char = advanceChar(parser);
|
|
1419
1431
|
}
|
|
1420
|
-
if (digits
|
|
1421
|
-
report(parser, digits
|
|
1432
|
+
if (digits === 0 || !allowSeparator) {
|
|
1433
|
+
report(parser, digits === 0 ? 0 : 148);
|
|
1422
1434
|
}
|
|
1423
1435
|
}
|
|
1424
1436
|
else if (CharTypes[char] & 32) {
|
|
@@ -1451,7 +1463,7 @@
|
|
|
1451
1463
|
if (char === 95) {
|
|
1452
1464
|
char = advanceChar(parser);
|
|
1453
1465
|
if (char === 95 || kind & 32) {
|
|
1454
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1466
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 147);
|
|
1455
1467
|
}
|
|
1456
1468
|
allowSeparator = 1;
|
|
1457
1469
|
continue;
|
|
@@ -1462,7 +1474,7 @@
|
|
|
1462
1474
|
--digit;
|
|
1463
1475
|
}
|
|
1464
1476
|
if (allowSeparator) {
|
|
1465
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1477
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 148);
|
|
1466
1478
|
}
|
|
1467
1479
|
if (digit >= 0 && !isIdentifierStart$1(char) && char !== 46) {
|
|
1468
1480
|
parser.tokenValue = value;
|
|
@@ -1494,7 +1506,7 @@
|
|
|
1494
1506
|
if (CharTypes[char] & 256)
|
|
1495
1507
|
char = advanceChar(parser);
|
|
1496
1508
|
const { index } = parser;
|
|
1497
|
-
if ((CharTypes[char] & 16)
|
|
1509
|
+
if ((CharTypes[char] & 16) === 0)
|
|
1498
1510
|
report(parser, 10);
|
|
1499
1511
|
value += parser.source.substring(end, index) + scanDecimalDigitsOrSeparator(parser, char);
|
|
1500
1512
|
char = parser.currentChar;
|
|
@@ -1527,7 +1539,7 @@
|
|
|
1527
1539
|
const { index } = parser;
|
|
1528
1540
|
char = advanceChar(parser);
|
|
1529
1541
|
if (char === 95) {
|
|
1530
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1542
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 147);
|
|
1531
1543
|
}
|
|
1532
1544
|
allowSeparator = 1;
|
|
1533
1545
|
ret += parser.source.substring(start, index);
|
|
@@ -1538,7 +1550,7 @@
|
|
|
1538
1550
|
char = advanceChar(parser);
|
|
1539
1551
|
}
|
|
1540
1552
|
if (allowSeparator) {
|
|
1541
|
-
reportScannerError(parser.index, parser.line, parser.index + 1,
|
|
1553
|
+
reportScannerError(parser.index, parser.line, parser.index + 1, 148);
|
|
1542
1554
|
}
|
|
1543
1555
|
return ret + parser.source.substring(start, parser.index);
|
|
1544
1556
|
}
|
|
@@ -1627,7 +1639,7 @@
|
|
|
1627
1639
|
function scanIdentifier(parser, context, isValidAsKeyword) {
|
|
1628
1640
|
while (isIdPart[advanceChar(parser)]) { }
|
|
1629
1641
|
parser.tokenValue = parser.source.slice(parser.tokenPos, parser.index);
|
|
1630
|
-
return parser.currentChar !== 92 && parser.currentChar
|
|
1642
|
+
return parser.currentChar !== 92 && parser.currentChar <= 0x7e
|
|
1631
1643
|
? descKeywordTable[parser.tokenValue] || 208897
|
|
1632
1644
|
: scanIdentifierSlowCase(parser, context, 0, isValidAsKeyword);
|
|
1633
1645
|
}
|
|
@@ -1668,14 +1680,28 @@
|
|
|
1668
1680
|
return 208897;
|
|
1669
1681
|
if (!hasEscape)
|
|
1670
1682
|
return token;
|
|
1683
|
+
if (token === 209008) {
|
|
1684
|
+
if ((context & (2048 | 4194304)) === 0) {
|
|
1685
|
+
return token;
|
|
1686
|
+
}
|
|
1687
|
+
return 121;
|
|
1688
|
+
}
|
|
1671
1689
|
if (context & 1024) {
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1690
|
+
if (token === 36972) {
|
|
1691
|
+
return 122;
|
|
1692
|
+
}
|
|
1693
|
+
if ((token & 36864) === 36864) {
|
|
1694
|
+
return 122;
|
|
1695
|
+
}
|
|
1696
|
+
if ((token & 20480) === 20480) {
|
|
1697
|
+
if (context & 1073741824 && (context & 8192) === 0) {
|
|
1698
|
+
return token;
|
|
1699
|
+
}
|
|
1700
|
+
else {
|
|
1701
|
+
return 121;
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
return 143483;
|
|
1679
1705
|
}
|
|
1680
1706
|
if (context & 1073741824 &&
|
|
1681
1707
|
(context & 8192) === 0 &&
|
|
@@ -1688,19 +1714,19 @@
|
|
|
1688
1714
|
? 121
|
|
1689
1715
|
: token;
|
|
1690
1716
|
}
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1717
|
+
if (token === 209007) {
|
|
1718
|
+
return 143483;
|
|
1719
|
+
}
|
|
1720
|
+
if ((token & 36864) === 36864) {
|
|
1721
|
+
return token;
|
|
1722
|
+
}
|
|
1723
|
+
return 121;
|
|
1698
1724
|
}
|
|
1699
1725
|
return 208897;
|
|
1700
1726
|
}
|
|
1701
1727
|
function scanPrivateIdentifier(parser) {
|
|
1702
1728
|
if (!isIdentifierStart$1(advanceChar(parser)))
|
|
1703
|
-
report(parser,
|
|
1729
|
+
report(parser, 94);
|
|
1704
1730
|
return 131;
|
|
1705
1731
|
}
|
|
1706
1732
|
function scanIdentifierUnicodeEscape(parser) {
|
|
@@ -1718,7 +1744,7 @@
|
|
|
1718
1744
|
while (CharTypes[advanceChar(parser)] & 64) {
|
|
1719
1745
|
codePoint = (codePoint << 4) | toHex(parser.currentChar);
|
|
1720
1746
|
if (codePoint > 1114111)
|
|
1721
|
-
reportScannerError(begin, parser.line, parser.index + 1,
|
|
1747
|
+
reportScannerError(begin, parser.line, parser.index + 1, 102);
|
|
1722
1748
|
}
|
|
1723
1749
|
if (parser.currentChar !== 125) {
|
|
1724
1750
|
reportScannerError(begin, parser.line, parser.index - 1, 6);
|
|
@@ -1975,7 +2001,7 @@
|
|
|
1975
2001
|
return 8456258;
|
|
1976
2002
|
}
|
|
1977
2003
|
if (ch === 47) {
|
|
1978
|
-
if ((context & 16)
|
|
2004
|
+
if ((context & 16) === 0)
|
|
1979
2005
|
return 8456258;
|
|
1980
2006
|
const index = parser.index + 1;
|
|
1981
2007
|
if (index < parser.end) {
|
|
@@ -2059,7 +2085,7 @@
|
|
|
2059
2085
|
advanceChar(parser);
|
|
2060
2086
|
if ((state & 1 || isStartOfLine) && parser.currentChar === 62) {
|
|
2061
2087
|
if ((context & 256) === 0)
|
|
2062
|
-
report(parser,
|
|
2088
|
+
report(parser, 109);
|
|
2063
2089
|
advanceChar(parser);
|
|
2064
2090
|
state = skipSingleHTMLComment(parser, source, state, context, 3, startPos, startLine, startColumn);
|
|
2065
2091
|
startPos = parser.tokenPos;
|
|
@@ -4555,7 +4581,7 @@
|
|
|
4555
4581
|
case 'AssignmentExpression':
|
|
4556
4582
|
node.type = 'AssignmentPattern';
|
|
4557
4583
|
if (node.operator !== '=')
|
|
4558
|
-
report(state,
|
|
4584
|
+
report(state, 69);
|
|
4559
4585
|
delete node.operator;
|
|
4560
4586
|
reinterpretToPattern(state, node.left);
|
|
4561
4587
|
return;
|
|
@@ -4570,58 +4596,58 @@
|
|
|
4570
4596
|
function validateBindingIdentifier(parser, context, kind, t, skipEvalArgCheck) {
|
|
4571
4597
|
if (context & 1024) {
|
|
4572
4598
|
if ((t & 36864) === 36864) {
|
|
4573
|
-
report(parser,
|
|
4599
|
+
report(parser, 115);
|
|
4574
4600
|
}
|
|
4575
4601
|
if (!skipEvalArgCheck && (t & 537079808) === 537079808) {
|
|
4576
|
-
report(parser,
|
|
4602
|
+
report(parser, 116);
|
|
4577
4603
|
}
|
|
4578
4604
|
}
|
|
4579
4605
|
if ((t & 20480) === 20480) {
|
|
4580
|
-
report(parser,
|
|
4606
|
+
report(parser, 100);
|
|
4581
4607
|
}
|
|
4582
4608
|
if (kind & (8 | 16) && t === 241739) {
|
|
4583
|
-
report(parser,
|
|
4609
|
+
report(parser, 98);
|
|
4584
4610
|
}
|
|
4585
4611
|
if (context & (4194304 | 2048) && t === 209008) {
|
|
4586
|
-
report(parser,
|
|
4612
|
+
report(parser, 96);
|
|
4587
4613
|
}
|
|
4588
4614
|
if (context & (2097152 | 1024) && t === 241773) {
|
|
4589
|
-
report(parser,
|
|
4615
|
+
report(parser, 95, 'yield');
|
|
4590
4616
|
}
|
|
4591
4617
|
}
|
|
4592
4618
|
function validateFunctionName(parser, context, t) {
|
|
4593
4619
|
if (context & 1024) {
|
|
4594
4620
|
if ((t & 36864) === 36864) {
|
|
4595
|
-
report(parser,
|
|
4621
|
+
report(parser, 115);
|
|
4596
4622
|
}
|
|
4597
4623
|
if ((t & 537079808) === 537079808) {
|
|
4598
|
-
report(parser,
|
|
4624
|
+
report(parser, 116);
|
|
4599
4625
|
}
|
|
4600
4626
|
if (t === 122) {
|
|
4601
|
-
report(parser,
|
|
4627
|
+
report(parser, 93);
|
|
4602
4628
|
}
|
|
4603
4629
|
if (t === 121) {
|
|
4604
|
-
report(parser,
|
|
4630
|
+
report(parser, 93);
|
|
4605
4631
|
}
|
|
4606
4632
|
}
|
|
4607
4633
|
if ((t & 20480) === 20480) {
|
|
4608
|
-
report(parser,
|
|
4634
|
+
report(parser, 100);
|
|
4609
4635
|
}
|
|
4610
4636
|
if (context & (4194304 | 2048) && t === 209008) {
|
|
4611
|
-
report(parser,
|
|
4637
|
+
report(parser, 96);
|
|
4612
4638
|
}
|
|
4613
4639
|
if (context & (2097152 | 1024) && t === 241773) {
|
|
4614
|
-
report(parser,
|
|
4640
|
+
report(parser, 95, 'yield');
|
|
4615
4641
|
}
|
|
4616
4642
|
}
|
|
4617
4643
|
function isStrictReservedWord$1(parser, context, t) {
|
|
4618
4644
|
if (t === 209008) {
|
|
4619
4645
|
if (context & (4194304 | 2048))
|
|
4620
|
-
report(parser,
|
|
4646
|
+
report(parser, 96);
|
|
4621
4647
|
parser.destructible |= 128;
|
|
4622
4648
|
}
|
|
4623
4649
|
if (t === 241773 && context & 2097152)
|
|
4624
|
-
report(parser,
|
|
4650
|
+
report(parser, 95, 'yield');
|
|
4625
4651
|
return ((t & 20480) === 20480 ||
|
|
4626
4652
|
(t & 36864) === 36864 ||
|
|
4627
4653
|
t == 122);
|
|
@@ -4633,7 +4659,7 @@
|
|
|
4633
4659
|
while (labels) {
|
|
4634
4660
|
if (labels['$' + name]) {
|
|
4635
4661
|
if (isIterationStatement)
|
|
4636
|
-
report(parser,
|
|
4662
|
+
report(parser, 134);
|
|
4637
4663
|
return 1;
|
|
4638
4664
|
}
|
|
4639
4665
|
if (isIterationStatement && labels.loop)
|
|
@@ -4646,7 +4672,7 @@
|
|
|
4646
4672
|
let set = labels;
|
|
4647
4673
|
while (set) {
|
|
4648
4674
|
if (set['$' + name])
|
|
4649
|
-
report(parser,
|
|
4675
|
+
report(parser, 133, name);
|
|
4650
4676
|
set = set['$'];
|
|
4651
4677
|
}
|
|
4652
4678
|
labels['$' + name] = 1;
|
|
@@ -4727,27 +4753,27 @@
|
|
|
4727
4753
|
const value = scope['#' + name];
|
|
4728
4754
|
if (value && (value & 2) === 0) {
|
|
4729
4755
|
if (kind & 1) {
|
|
4730
|
-
scope.scopeError = recordScopeError(parser,
|
|
4756
|
+
scope.scopeError = recordScopeError(parser, 141, name);
|
|
4731
4757
|
}
|
|
4732
4758
|
else if (context & 256 &&
|
|
4733
4759
|
value & 64 &&
|
|
4734
4760
|
origin & 2) ;
|
|
4735
4761
|
else {
|
|
4736
|
-
report(parser,
|
|
4762
|
+
report(parser, 141, name);
|
|
4737
4763
|
}
|
|
4738
4764
|
}
|
|
4739
4765
|
if (scope.type & 128 &&
|
|
4740
4766
|
(scope.parent['#' + name] && (scope.parent['#' + name] & 2) === 0)) {
|
|
4741
|
-
report(parser,
|
|
4767
|
+
report(parser, 141, name);
|
|
4742
4768
|
}
|
|
4743
4769
|
if (scope.type & 1024 && value && (value & 2) === 0) {
|
|
4744
4770
|
if (kind & 1) {
|
|
4745
|
-
scope.scopeError = recordScopeError(parser,
|
|
4771
|
+
scope.scopeError = recordScopeError(parser, 141, name);
|
|
4746
4772
|
}
|
|
4747
4773
|
}
|
|
4748
4774
|
if (scope.type & 64) {
|
|
4749
4775
|
if (scope.parent['#' + name] & 768)
|
|
4750
|
-
report(parser,
|
|
4776
|
+
report(parser, 154, name);
|
|
4751
4777
|
}
|
|
4752
4778
|
scope['#' + name] = kind;
|
|
4753
4779
|
}
|
|
@@ -4761,19 +4787,19 @@
|
|
|
4761
4787
|
((kind & 128 && value & 68) ||
|
|
4762
4788
|
(value & 128 && kind & 68))) ;
|
|
4763
4789
|
else {
|
|
4764
|
-
report(parser,
|
|
4790
|
+
report(parser, 141, name);
|
|
4765
4791
|
}
|
|
4766
4792
|
}
|
|
4767
4793
|
if (currentScope === scope) {
|
|
4768
4794
|
if (value & 1 && kind & 1) {
|
|
4769
|
-
currentScope.scopeError = recordScopeError(parser,
|
|
4795
|
+
currentScope.scopeError = recordScopeError(parser, 141, name);
|
|
4770
4796
|
}
|
|
4771
4797
|
}
|
|
4772
4798
|
if (value & (512 | 256)) {
|
|
4773
4799
|
if ((value & 512) === 0 ||
|
|
4774
4800
|
(context & 256) === 0 ||
|
|
4775
4801
|
context & 1024) {
|
|
4776
|
-
report(parser,
|
|
4802
|
+
report(parser, 141, name);
|
|
4777
4803
|
}
|
|
4778
4804
|
}
|
|
4779
4805
|
currentScope['#' + name] = kind;
|
|
@@ -4783,7 +4809,7 @@
|
|
|
4783
4809
|
function declareUnboundVariable(parser, name) {
|
|
4784
4810
|
if (parser.exportedNames !== void 0 && name !== '') {
|
|
4785
4811
|
if (parser.exportedNames['#' + name]) {
|
|
4786
|
-
report(parser,
|
|
4812
|
+
report(parser, 142, name);
|
|
4787
4813
|
}
|
|
4788
4814
|
parser.exportedNames['#' + name] = 1;
|
|
4789
4815
|
}
|
|
@@ -4841,7 +4867,7 @@
|
|
|
4841
4867
|
function classifyIdentifier(parser, context, t, isArrow) {
|
|
4842
4868
|
if ((t & 537079808) === 537079808) {
|
|
4843
4869
|
if (context & 1024)
|
|
4844
|
-
report(parser,
|
|
4870
|
+
report(parser, 116);
|
|
4845
4871
|
if (isArrow)
|
|
4846
4872
|
parser.flags |= 512;
|
|
4847
4873
|
}
|
|
@@ -4934,7 +4960,7 @@
|
|
|
4934
4960
|
if (scope) {
|
|
4935
4961
|
for (const key in parser.exportedBindings) {
|
|
4936
4962
|
if (key[0] === '#' && !scope[key])
|
|
4937
|
-
report(parser,
|
|
4963
|
+
report(parser, 143, key.slice(1));
|
|
4938
4964
|
}
|
|
4939
4965
|
}
|
|
4940
4966
|
}
|
|
@@ -5004,7 +5030,7 @@
|
|
|
5004
5030
|
moduleItem = parseStatementListItem(parser, context, scope, 4, {});
|
|
5005
5031
|
}
|
|
5006
5032
|
if (parser.leadingDecorators.length) {
|
|
5007
|
-
report(parser,
|
|
5033
|
+
report(parser, 165);
|
|
5008
5034
|
}
|
|
5009
5035
|
return moduleItem;
|
|
5010
5036
|
}
|
|
@@ -5023,7 +5049,7 @@
|
|
|
5023
5049
|
case 241739:
|
|
5024
5050
|
return parseLetIdentOrVarDeclarationStatement(parser, context, scope, origin, start, line, column);
|
|
5025
5051
|
case 20566:
|
|
5026
|
-
report(parser,
|
|
5052
|
+
report(parser, 101, 'export');
|
|
5027
5053
|
case 86108:
|
|
5028
5054
|
nextToken(parser, context);
|
|
5029
5055
|
switch (parser.token) {
|
|
@@ -5032,7 +5058,7 @@
|
|
|
5032
5058
|
case 67108877:
|
|
5033
5059
|
return parseImportMetaDeclaration(parser, context, start, line, column);
|
|
5034
5060
|
default:
|
|
5035
|
-
report(parser,
|
|
5061
|
+
report(parser, 101, 'import');
|
|
5036
5062
|
}
|
|
5037
5063
|
case 209007:
|
|
5038
5064
|
return parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, 1, start, line, column);
|
|
@@ -5075,17 +5101,17 @@
|
|
|
5075
5101
|
case 209007:
|
|
5076
5102
|
return parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, 0, start, line, column);
|
|
5077
5103
|
case 20559:
|
|
5078
|
-
report(parser, 156);
|
|
5079
|
-
case 20568:
|
|
5080
5104
|
report(parser, 157);
|
|
5105
|
+
case 20568:
|
|
5106
|
+
report(parser, 158);
|
|
5081
5107
|
case 86106:
|
|
5082
5108
|
report(parser, context & 1024
|
|
5083
|
-
?
|
|
5084
|
-
: (context & 256)
|
|
5085
|
-
?
|
|
5086
|
-
:
|
|
5109
|
+
? 74
|
|
5110
|
+
: (context & 256) === 0
|
|
5111
|
+
? 76
|
|
5112
|
+
: 75);
|
|
5087
5113
|
case 86096:
|
|
5088
|
-
report(parser,
|
|
5114
|
+
report(parser, 77);
|
|
5089
5115
|
default:
|
|
5090
5116
|
return parseExpressionOrLabelledStatement(parser, context, scope, origin, labels, allowFuncDecl, start, line, column);
|
|
5091
5117
|
}
|
|
@@ -5097,9 +5123,9 @@
|
|
|
5097
5123
|
case 241739:
|
|
5098
5124
|
expr = parseIdentifier(parser, context, 0);
|
|
5099
5125
|
if (context & 1024)
|
|
5100
|
-
report(parser,
|
|
5126
|
+
report(parser, 83);
|
|
5101
5127
|
if (parser.token === 69271571)
|
|
5102
|
-
report(parser,
|
|
5128
|
+
report(parser, 82);
|
|
5103
5129
|
break;
|
|
5104
5130
|
default:
|
|
5105
5131
|
expr = parsePrimaryExpression(parser, context, 2, 0, 1, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
@@ -5127,8 +5153,8 @@
|
|
|
5127
5153
|
});
|
|
5128
5154
|
}
|
|
5129
5155
|
function parseReturnStatement(parser, context, start, line, column) {
|
|
5130
|
-
if ((context & 32)
|
|
5131
|
-
report(parser,
|
|
5156
|
+
if ((context & 32) === 0 && context & 8192)
|
|
5157
|
+
report(parser, 90);
|
|
5132
5158
|
nextToken(parser, context | 32768);
|
|
5133
5159
|
const argument = parser.flags & 1 || parser.token & 1048576
|
|
5134
5160
|
? null
|
|
@@ -5151,7 +5177,7 @@
|
|
|
5151
5177
|
validateAndDeclareLabel(parser, labels, value);
|
|
5152
5178
|
nextToken(parser, context | 32768);
|
|
5153
5179
|
const body = allowFuncDecl &&
|
|
5154
|
-
(context & 1024)
|
|
5180
|
+
(context & 1024) === 0 &&
|
|
5155
5181
|
context & 256 &&
|
|
5156
5182
|
parser.token === 86106
|
|
5157
5183
|
? parseFunctionDeclaration(parser, context, addChildScope(scope, 2), origin, 0, 0, 0, parser.tokenPos, parser.linePos, parser.colPos)
|
|
@@ -5172,7 +5198,7 @@
|
|
|
5172
5198
|
if (!asyncNewLine) {
|
|
5173
5199
|
if (parser.token === 86106) {
|
|
5174
5200
|
if (!allowFuncDecl)
|
|
5175
|
-
report(parser,
|
|
5201
|
+
report(parser, 120);
|
|
5176
5202
|
return parseFunctionDeclaration(parser, context, scope, origin, 1, 0, 1, start, line, column);
|
|
5177
5203
|
}
|
|
5178
5204
|
if ((parser.token & 143360) === 143360) {
|
|
@@ -5231,7 +5257,7 @@
|
|
|
5231
5257
|
function parseThrowStatement(parser, context, start, line, column) {
|
|
5232
5258
|
nextToken(parser, context | 32768);
|
|
5233
5259
|
if (parser.flags & 1)
|
|
5234
|
-
report(parser,
|
|
5260
|
+
report(parser, 88);
|
|
5235
5261
|
const argument = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5236
5262
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5237
5263
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5260,7 +5286,7 @@
|
|
|
5260
5286
|
}
|
|
5261
5287
|
function parseConsequentOrAlternative(parser, context, scope, labels, start, line, column) {
|
|
5262
5288
|
return context & 1024 ||
|
|
5263
|
-
(context & 256)
|
|
5289
|
+
(context & 256) === 0 ||
|
|
5264
5290
|
parser.token !== 86106
|
|
5265
5291
|
? parseStatement(parser, context, scope, 0, { $: labels }, 0, parser.tokenPos, parser.linePos, parser.colPos)
|
|
5266
5292
|
: parseFunctionDeclaration(parser, context, addChildScope(scope, 2), 0, 0, 0, 0, start, line, column);
|
|
@@ -5285,7 +5311,7 @@
|
|
|
5285
5311
|
else {
|
|
5286
5312
|
consume(parser, context | 32768, 20563);
|
|
5287
5313
|
if (seenDefault)
|
|
5288
|
-
report(parser,
|
|
5314
|
+
report(parser, 87);
|
|
5289
5315
|
seenDefault = 1;
|
|
5290
5316
|
}
|
|
5291
5317
|
consume(parser, context | 32768, 21);
|
|
@@ -5325,15 +5351,15 @@
|
|
|
5325
5351
|
return parseStatement(parser, ((context | 134217728) ^ 134217728) | 131072, scope, 0, { loop: 1, $: labels }, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5326
5352
|
}
|
|
5327
5353
|
function parseContinueStatement(parser, context, labels, start, line, column) {
|
|
5328
|
-
if ((context & 131072)
|
|
5329
|
-
report(parser,
|
|
5354
|
+
if ((context & 131072) === 0)
|
|
5355
|
+
report(parser, 66);
|
|
5330
5356
|
nextToken(parser, context);
|
|
5331
5357
|
let label = null;
|
|
5332
|
-
if ((parser.flags & 1)
|
|
5358
|
+
if ((parser.flags & 1) === 0 && parser.token & 143360) {
|
|
5333
5359
|
const { tokenValue } = parser;
|
|
5334
5360
|
label = parseIdentifier(parser, context | 32768, 0);
|
|
5335
5361
|
if (!isValidLabel(parser, labels, tokenValue, 1))
|
|
5336
|
-
report(parser,
|
|
5362
|
+
report(parser, 135, tokenValue);
|
|
5337
5363
|
}
|
|
5338
5364
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5339
5365
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5344,14 +5370,14 @@
|
|
|
5344
5370
|
function parseBreakStatement(parser, context, labels, start, line, column) {
|
|
5345
5371
|
nextToken(parser, context | 32768);
|
|
5346
5372
|
let label = null;
|
|
5347
|
-
if ((parser.flags & 1)
|
|
5373
|
+
if ((parser.flags & 1) === 0 && parser.token & 143360) {
|
|
5348
5374
|
const { tokenValue } = parser;
|
|
5349
5375
|
label = parseIdentifier(parser, context | 32768, 0);
|
|
5350
5376
|
if (!isValidLabel(parser, labels, tokenValue, 0))
|
|
5351
|
-
report(parser,
|
|
5377
|
+
report(parser, 135, tokenValue);
|
|
5352
5378
|
}
|
|
5353
|
-
else if ((context & (4096 | 131072))
|
|
5354
|
-
report(parser,
|
|
5379
|
+
else if ((context & (4096 | 131072)) === 0) {
|
|
5380
|
+
report(parser, 67);
|
|
5355
5381
|
}
|
|
5356
5382
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5357
5383
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5362,7 +5388,7 @@
|
|
|
5362
5388
|
function parseWithStatement(parser, context, scope, labels, start, line, column) {
|
|
5363
5389
|
nextToken(parser, context);
|
|
5364
5390
|
if (context & 1024)
|
|
5365
|
-
report(parser,
|
|
5391
|
+
report(parser, 89);
|
|
5366
5392
|
consume(parser, context | 32768, 67174411);
|
|
5367
5393
|
const object = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5368
5394
|
consume(parser, context | 32768, 16);
|
|
@@ -5395,7 +5421,7 @@
|
|
|
5395
5421
|
finalizer = parseBlock(parser, context, finalizerScope, { $: labels }, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5396
5422
|
}
|
|
5397
5423
|
if (!handler && !finalizer) {
|
|
5398
|
-
report(parser,
|
|
5424
|
+
report(parser, 86);
|
|
5399
5425
|
}
|
|
5400
5426
|
return finishNode(parser, context, start, line, column, {
|
|
5401
5427
|
type: 'TryStatement',
|
|
@@ -5414,10 +5440,10 @@
|
|
|
5414
5440
|
? 256
|
|
5415
5441
|
: 512, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5416
5442
|
if (parser.token === 18) {
|
|
5417
|
-
report(parser,
|
|
5443
|
+
report(parser, 84);
|
|
5418
5444
|
}
|
|
5419
5445
|
else if (parser.token === 1077936157) {
|
|
5420
|
-
report(parser,
|
|
5446
|
+
report(parser, 85);
|
|
5421
5447
|
}
|
|
5422
5448
|
consume(parser, context | 32768, 16);
|
|
5423
5449
|
if (scope)
|
|
@@ -5430,6 +5456,17 @@
|
|
|
5430
5456
|
body
|
|
5431
5457
|
});
|
|
5432
5458
|
}
|
|
5459
|
+
function parseStaticBlock(parser, context, scope, start, line, column) {
|
|
5460
|
+
if (scope)
|
|
5461
|
+
scope = addChildScope(scope, 2);
|
|
5462
|
+
const ctorContext = 16384 | 524288;
|
|
5463
|
+
context = ((context | ctorContext) ^ ctorContext) | 262144;
|
|
5464
|
+
const { body } = parseBlock(parser, context, scope, {}, start, line, column);
|
|
5465
|
+
return finishNode(parser, context, start, line, column, {
|
|
5466
|
+
type: 'StaticBlock',
|
|
5467
|
+
body
|
|
5468
|
+
});
|
|
5469
|
+
}
|
|
5433
5470
|
function parseDoWhileStatement(parser, context, scope, labels, start, line, column) {
|
|
5434
5471
|
nextToken(parser, context | 32768);
|
|
5435
5472
|
const body = parseIterationStatementBody(parser, context, scope, labels);
|
|
@@ -5458,7 +5495,7 @@
|
|
|
5458
5495
|
}
|
|
5459
5496
|
parser.assignable = 1;
|
|
5460
5497
|
if (context & 1024)
|
|
5461
|
-
report(parser,
|
|
5498
|
+
report(parser, 83);
|
|
5462
5499
|
if (parser.token === 21) {
|
|
5463
5500
|
return parseLabelledStatement(parser, context, scope, origin, {}, tokenValue, expr, token, 0, start, line, column);
|
|
5464
5501
|
}
|
|
@@ -5506,7 +5543,7 @@
|
|
|
5506
5543
|
list.push(parseVariableDeclaration(parser, context, scope, kind, origin));
|
|
5507
5544
|
}
|
|
5508
5545
|
if (bindingCount > 1 && origin & 32 && parser.token & 262144) {
|
|
5509
|
-
report(parser,
|
|
5546
|
+
report(parser, 59, KeywordDescTable[parser.token & 255]);
|
|
5510
5547
|
}
|
|
5511
5548
|
return list;
|
|
5512
5549
|
}
|
|
@@ -5517,17 +5554,17 @@
|
|
|
5517
5554
|
if (parser.token === 1077936157) {
|
|
5518
5555
|
nextToken(parser, context | 32768);
|
|
5519
5556
|
init = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5520
|
-
if (origin & 32 || (token & 2097152)
|
|
5557
|
+
if (origin & 32 || (token & 2097152) === 0) {
|
|
5521
5558
|
if (parser.token === 274549 ||
|
|
5522
5559
|
(parser.token === 8738868 &&
|
|
5523
|
-
(token & 2097152 || (kind & 4)
|
|
5524
|
-
reportMessageAt(tokenPos, parser.line, parser.index - 3,
|
|
5560
|
+
(token & 2097152 || (kind & 4) === 0 || context & 1024))) {
|
|
5561
|
+
reportMessageAt(tokenPos, parser.line, parser.index - 3, 58, parser.token === 274549 ? 'of' : 'in');
|
|
5525
5562
|
}
|
|
5526
5563
|
}
|
|
5527
5564
|
}
|
|
5528
5565
|
else if ((kind & 16 || (token & 2097152) > 0) &&
|
|
5529
5566
|
(parser.token & 262144) !== 262144) {
|
|
5530
|
-
report(parser,
|
|
5567
|
+
report(parser, 57, kind & 16 ? 'const' : 'destructuring');
|
|
5531
5568
|
}
|
|
5532
5569
|
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
5533
5570
|
type: 'VariableDeclarator',
|
|
@@ -5537,7 +5574,8 @@
|
|
|
5537
5574
|
}
|
|
5538
5575
|
function parseForStatement(parser, context, scope, labels, start, line, column) {
|
|
5539
5576
|
nextToken(parser, context);
|
|
5540
|
-
const forAwait = (context & 4194304) > 0 &&
|
|
5577
|
+
const forAwait = ((context & 4194304) > 0 || ((context & 2048) > 0 && (context & 8192) > 0)) &&
|
|
5578
|
+
consumeOpt(parser, context, 209008);
|
|
5541
5579
|
consume(parser, context | 32768, 67174411);
|
|
5542
5580
|
if (scope)
|
|
5543
5581
|
scope = addChildScope(scope, 1);
|
|
@@ -5554,7 +5592,7 @@
|
|
|
5554
5592
|
if (parser.token & (143360 | 2097152)) {
|
|
5555
5593
|
if (parser.token === 8738868) {
|
|
5556
5594
|
if (context & 1024)
|
|
5557
|
-
report(parser,
|
|
5595
|
+
report(parser, 65);
|
|
5558
5596
|
}
|
|
5559
5597
|
else {
|
|
5560
5598
|
init = finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
@@ -5566,14 +5604,14 @@
|
|
|
5566
5604
|
parser.assignable = 1;
|
|
5567
5605
|
}
|
|
5568
5606
|
else if (context & 1024) {
|
|
5569
|
-
report(parser,
|
|
5607
|
+
report(parser, 65);
|
|
5570
5608
|
}
|
|
5571
5609
|
else {
|
|
5572
5610
|
isVarDecl = false;
|
|
5573
5611
|
parser.assignable = 1;
|
|
5574
5612
|
init = parseMemberOrUpdateExpression(parser, context, init, 0, 0, tokenPos, linePos, colPos);
|
|
5575
5613
|
if (parser.token === 274549)
|
|
5576
|
-
report(parser,
|
|
5614
|
+
report(parser, 112);
|
|
5577
5615
|
}
|
|
5578
5616
|
}
|
|
5579
5617
|
else {
|
|
@@ -5594,7 +5632,7 @@
|
|
|
5594
5632
|
}
|
|
5595
5633
|
else if (token === 1074790417) {
|
|
5596
5634
|
if (forAwait)
|
|
5597
|
-
report(parser,
|
|
5635
|
+
report(parser, 80);
|
|
5598
5636
|
}
|
|
5599
5637
|
else if ((token & 2097152) === 2097152) {
|
|
5600
5638
|
init =
|
|
@@ -5603,7 +5641,7 @@
|
|
|
5603
5641
|
: parseArrayExpressionOrPattern(parser, context, void 0, 1, 0, 0, 2, 32, tokenPos, linePos, colPos);
|
|
5604
5642
|
destructible = parser.destructible;
|
|
5605
5643
|
if (context & 256 && destructible & 64) {
|
|
5606
|
-
report(parser,
|
|
5644
|
+
report(parser, 61);
|
|
5607
5645
|
}
|
|
5608
5646
|
parser.assignable =
|
|
5609
5647
|
destructible & 16 ? 2 : 1;
|
|
@@ -5615,7 +5653,7 @@
|
|
|
5615
5653
|
if ((parser.token & 262144) === 262144) {
|
|
5616
5654
|
if (parser.token === 274549) {
|
|
5617
5655
|
if (parser.assignable & 2)
|
|
5618
|
-
report(parser,
|
|
5656
|
+
report(parser, 78, forAwait ? 'await' : 'of');
|
|
5619
5657
|
reinterpretToPattern(parser, init);
|
|
5620
5658
|
nextToken(parser, context | 32768);
|
|
5621
5659
|
right = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
@@ -5630,11 +5668,11 @@
|
|
|
5630
5668
|
});
|
|
5631
5669
|
}
|
|
5632
5670
|
if (parser.assignable & 2)
|
|
5633
|
-
report(parser,
|
|
5671
|
+
report(parser, 78, 'in');
|
|
5634
5672
|
reinterpretToPattern(parser, init);
|
|
5635
5673
|
nextToken(parser, context | 32768);
|
|
5636
5674
|
if (forAwait)
|
|
5637
|
-
report(parser,
|
|
5675
|
+
report(parser, 80);
|
|
5638
5676
|
right = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5639
5677
|
consume(parser, context | 32768, 16);
|
|
5640
5678
|
const body = parseIterationStatementBody(parser, context, scope, labels);
|
|
@@ -5646,10 +5684,10 @@
|
|
|
5646
5684
|
});
|
|
5647
5685
|
}
|
|
5648
5686
|
if (forAwait)
|
|
5649
|
-
report(parser,
|
|
5687
|
+
report(parser, 80);
|
|
5650
5688
|
if (!isVarDecl) {
|
|
5651
5689
|
if (destructible & 8 && parser.token !== 1077936157) {
|
|
5652
|
-
report(parser,
|
|
5690
|
+
report(parser, 78, 'loop');
|
|
5653
5691
|
}
|
|
5654
5692
|
init = parseAssignmentExpression(parser, context | 134217728, 0, 0, tokenPos, linePos, colPos, init);
|
|
5655
5693
|
}
|
|
@@ -5673,9 +5711,9 @@
|
|
|
5673
5711
|
}
|
|
5674
5712
|
function parseRestrictedIdentifier(parser, context, scope) {
|
|
5675
5713
|
if (!isValidIdentifier$1(context, parser.token))
|
|
5676
|
-
report(parser, 114);
|
|
5677
|
-
if ((parser.token & 537079808) === 537079808)
|
|
5678
5714
|
report(parser, 115);
|
|
5715
|
+
if ((parser.token & 537079808) === 537079808)
|
|
5716
|
+
report(parser, 116);
|
|
5679
5717
|
if (scope)
|
|
5680
5718
|
addBlockName(parser, context, scope, parser.tokenValue, 8, 0);
|
|
5681
5719
|
return parseIdentifier(parser, context, 0);
|
|
@@ -5709,7 +5747,7 @@
|
|
|
5709
5747
|
parseImportSpecifierOrNamedImports(parser, context, scope, specifiers);
|
|
5710
5748
|
break;
|
|
5711
5749
|
default:
|
|
5712
|
-
report(parser,
|
|
5750
|
+
report(parser, 105);
|
|
5713
5751
|
}
|
|
5714
5752
|
}
|
|
5715
5753
|
}
|
|
@@ -5753,7 +5791,7 @@
|
|
|
5753
5791
|
function parseModuleSpecifier(parser, context) {
|
|
5754
5792
|
consumeOpt(parser, context, 12404);
|
|
5755
5793
|
if (parser.token !== 134283267)
|
|
5756
|
-
report(parser,
|
|
5794
|
+
report(parser, 103, 'Import');
|
|
5757
5795
|
return parseLiteral(parser, context);
|
|
5758
5796
|
}
|
|
5759
5797
|
function parseImportSpecifierOrNamedImports(parser, context, scope, specifiers) {
|
|
@@ -5764,7 +5802,7 @@
|
|
|
5764
5802
|
let local;
|
|
5765
5803
|
if (consumeOpt(parser, context, 77934)) {
|
|
5766
5804
|
if ((parser.token & 134217728) === 134217728 || parser.token === 18) {
|
|
5767
|
-
report(parser,
|
|
5805
|
+
report(parser, 104);
|
|
5768
5806
|
}
|
|
5769
5807
|
else {
|
|
5770
5808
|
validateBindingIdentifier(parser, context, 16, parser.token, 0);
|
|
@@ -5801,6 +5839,9 @@
|
|
|
5801
5839
|
function parseImportCallDeclaration(parser, context, start, line, column) {
|
|
5802
5840
|
let expr = parseImportExpression(parser, context, 0, start, line, column);
|
|
5803
5841
|
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
|
|
5842
|
+
if (parser.token === 18) {
|
|
5843
|
+
expr = parseSequenceExpression(parser, context, 0, start, line, column, expr);
|
|
5844
|
+
}
|
|
5804
5845
|
return parseExpressionStatement(parser, context, expr, start, line, column);
|
|
5805
5846
|
}
|
|
5806
5847
|
function parseExportDeclaration(parser, context, scope) {
|
|
@@ -5826,7 +5867,7 @@
|
|
|
5826
5867
|
const { tokenPos, linePos, colPos } = parser;
|
|
5827
5868
|
declaration = parseIdentifier(parser, context, 0);
|
|
5828
5869
|
const { flags } = parser;
|
|
5829
|
-
if ((flags & 1)
|
|
5870
|
+
if ((flags & 1) === 0) {
|
|
5830
5871
|
if (parser.token === 86106) {
|
|
5831
5872
|
declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 1, 1, tokenPos, linePos, colPos);
|
|
5832
5873
|
}
|
|
@@ -5868,7 +5909,7 @@
|
|
|
5868
5909
|
}
|
|
5869
5910
|
consume(parser, context, 12404);
|
|
5870
5911
|
if (parser.token !== 134283267)
|
|
5871
|
-
report(parser,
|
|
5912
|
+
report(parser, 103, 'Export');
|
|
5872
5913
|
source = parseLiteral(parser, context);
|
|
5873
5914
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5874
5915
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5888,7 +5929,7 @@
|
|
|
5888
5929
|
if (parser.token === 77934) {
|
|
5889
5930
|
nextToken(parser, context);
|
|
5890
5931
|
if ((parser.token & 134217728) === 134217728) {
|
|
5891
|
-
report(parser,
|
|
5932
|
+
report(parser, 104);
|
|
5892
5933
|
}
|
|
5893
5934
|
if (scope) {
|
|
5894
5935
|
tmpExportedNames.push(parser.tokenValue);
|
|
@@ -5914,7 +5955,7 @@
|
|
|
5914
5955
|
consume(parser, context, 1074790415);
|
|
5915
5956
|
if (consumeOpt(parser, context, 12404)) {
|
|
5916
5957
|
if (parser.token !== 134283267)
|
|
5917
|
-
report(parser,
|
|
5958
|
+
report(parser, 103, 'Export');
|
|
5918
5959
|
source = parseLiteral(parser, context);
|
|
5919
5960
|
}
|
|
5920
5961
|
else if (scope) {
|
|
@@ -5950,7 +5991,7 @@
|
|
|
5950
5991
|
case 209007:
|
|
5951
5992
|
const { tokenPos, linePos, colPos } = parser;
|
|
5952
5993
|
nextToken(parser, context);
|
|
5953
|
-
if ((parser.flags & 1)
|
|
5994
|
+
if ((parser.flags & 1) === 0 && parser.token === 86106) {
|
|
5954
5995
|
declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 2, 1, tokenPos, linePos, colPos);
|
|
5955
5996
|
if (scope) {
|
|
5956
5997
|
key = declaration.id ? declaration.id.name : '';
|
|
@@ -6063,7 +6104,7 @@
|
|
|
6063
6104
|
t = parser.token;
|
|
6064
6105
|
prec = t & 3840;
|
|
6065
6106
|
if ((t & 524288 && operator & 268435456) || (operator & 524288 && t & 268435456)) {
|
|
6066
|
-
report(parser,
|
|
6107
|
+
report(parser, 160);
|
|
6067
6108
|
}
|
|
6068
6109
|
if (prec + ((t === 8457273) << 8) - ((bit === t) << 12) <= minPrec)
|
|
6069
6110
|
break;
|
|
@@ -6089,10 +6130,10 @@
|
|
|
6089
6130
|
report(parser, 31);
|
|
6090
6131
|
if (context & 1024 && unaryOperator === 16863278) {
|
|
6091
6132
|
if (arg.type === 'Identifier') {
|
|
6092
|
-
report(parser,
|
|
6133
|
+
report(parser, 118);
|
|
6093
6134
|
}
|
|
6094
6135
|
else if (isPropertyWithPrivateFieldKey(arg)) {
|
|
6095
|
-
report(parser,
|
|
6136
|
+
report(parser, 124);
|
|
6096
6137
|
}
|
|
6097
6138
|
}
|
|
6098
6139
|
parser.assignable = 2;
|
|
@@ -6107,7 +6148,7 @@
|
|
|
6107
6148
|
const { token } = parser;
|
|
6108
6149
|
const expr = parseIdentifier(parser, context, isPattern);
|
|
6109
6150
|
const { flags } = parser;
|
|
6110
|
-
if ((flags & 1)
|
|
6151
|
+
if ((flags & 1) === 0) {
|
|
6111
6152
|
if (parser.token === 86106) {
|
|
6112
6153
|
return parseFunctionExpression(parser, context, 1, inGroup, start, line, column);
|
|
6113
6154
|
}
|
|
@@ -6123,7 +6164,7 @@
|
|
|
6123
6164
|
if (parser.token === 10) {
|
|
6124
6165
|
classifyIdentifier(parser, context, token, 1);
|
|
6125
6166
|
if (inNew)
|
|
6126
|
-
report(parser,
|
|
6167
|
+
report(parser, 49);
|
|
6127
6168
|
return parseArrowFromIdentifier(parser, context, parser.tokenValue, expr, inNew, canAssign, 0, start, line, column);
|
|
6128
6169
|
}
|
|
6129
6170
|
return expr;
|
|
@@ -6138,10 +6179,10 @@
|
|
|
6138
6179
|
if (!canAssign)
|
|
6139
6180
|
report(parser, 24);
|
|
6140
6181
|
if (parser.token === 22)
|
|
6141
|
-
report(parser,
|
|
6182
|
+
report(parser, 121);
|
|
6142
6183
|
let argument = null;
|
|
6143
6184
|
let delegate = false;
|
|
6144
|
-
if ((parser.flags & 1)
|
|
6185
|
+
if ((parser.flags & 1) === 0) {
|
|
6145
6186
|
delegate = consumeOpt(parser, context | 32768, 8457014);
|
|
6146
6187
|
if (parser.token & (12288 | 65536) || delegate) {
|
|
6147
6188
|
argument = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
@@ -6155,7 +6196,7 @@
|
|
|
6155
6196
|
});
|
|
6156
6197
|
}
|
|
6157
6198
|
if (context & 1024)
|
|
6158
|
-
report(parser,
|
|
6199
|
+
report(parser, 95, 'yield');
|
|
6159
6200
|
return parseIdentifierOrArrow(parser, context, start, line, column);
|
|
6160
6201
|
}
|
|
6161
6202
|
function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
|
|
@@ -6178,7 +6219,7 @@
|
|
|
6178
6219
|
});
|
|
6179
6220
|
}
|
|
6180
6221
|
if (context & 2048)
|
|
6181
|
-
report(parser,
|
|
6222
|
+
report(parser, 96);
|
|
6182
6223
|
return parseIdentifierOrArrow(parser, context, start, line, column);
|
|
6183
6224
|
}
|
|
6184
6225
|
function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
|
|
@@ -6193,7 +6234,7 @@
|
|
|
6193
6234
|
if (isValidStrictMode(parser, index, tokenPos, tokenValue)) {
|
|
6194
6235
|
context |= 1024;
|
|
6195
6236
|
if (parser.flags & 128) {
|
|
6196
|
-
reportMessageAt(parser.index, parser.line, parser.tokenPos,
|
|
6237
|
+
reportMessageAt(parser.index, parser.line, parser.tokenPos, 64);
|
|
6197
6238
|
}
|
|
6198
6239
|
if (parser.flags & 64) {
|
|
6199
6240
|
reportMessageAt(parser.index, parser.line, parser.tokenPos, 8);
|
|
@@ -6204,22 +6245,22 @@
|
|
|
6204
6245
|
if (context & 1024) {
|
|
6205
6246
|
if (firstRestricted) {
|
|
6206
6247
|
if ((firstRestricted & 537079808) === 537079808) {
|
|
6207
|
-
report(parser,
|
|
6248
|
+
report(parser, 116);
|
|
6208
6249
|
}
|
|
6209
6250
|
if ((firstRestricted & 36864) === 36864) {
|
|
6210
6251
|
report(parser, 38);
|
|
6211
6252
|
}
|
|
6212
6253
|
}
|
|
6213
6254
|
if (parser.flags & 512)
|
|
6214
|
-
report(parser,
|
|
6255
|
+
report(parser, 116);
|
|
6215
6256
|
if (parser.flags & 256)
|
|
6216
|
-
report(parser,
|
|
6257
|
+
report(parser, 115);
|
|
6217
6258
|
}
|
|
6218
6259
|
if (context & 64 &&
|
|
6219
6260
|
scope &&
|
|
6220
6261
|
scopeError !== void 0 &&
|
|
6221
|
-
(prevContext & 1024)
|
|
6222
|
-
(context & 8192)
|
|
6262
|
+
(prevContext & 1024) === 0 &&
|
|
6263
|
+
(context & 8192) === 0) {
|
|
6223
6264
|
reportScopeError(scopeError);
|
|
6224
6265
|
}
|
|
6225
6266
|
}
|
|
@@ -6243,9 +6284,9 @@
|
|
|
6243
6284
|
nextToken(parser, context);
|
|
6244
6285
|
switch (parser.token) {
|
|
6245
6286
|
case 67108991:
|
|
6246
|
-
report(parser,
|
|
6287
|
+
report(parser, 162);
|
|
6247
6288
|
case 67174411: {
|
|
6248
|
-
if ((context & 524288)
|
|
6289
|
+
if ((context & 524288) === 0)
|
|
6249
6290
|
report(parser, 26);
|
|
6250
6291
|
if (context & 16384)
|
|
6251
6292
|
report(parser, 27);
|
|
@@ -6254,7 +6295,7 @@
|
|
|
6254
6295
|
}
|
|
6255
6296
|
case 69271571:
|
|
6256
6297
|
case 67108877: {
|
|
6257
|
-
if ((context & 262144)
|
|
6298
|
+
if ((context & 262144) === 0)
|
|
6258
6299
|
report(parser, 27);
|
|
6259
6300
|
if (context & 16384)
|
|
6260
6301
|
report(parser, 27);
|
|
@@ -6272,7 +6313,7 @@
|
|
|
6272
6313
|
}
|
|
6273
6314
|
function parseUpdateExpression(parser, context, expr, start, line, column) {
|
|
6274
6315
|
if (parser.assignable & 2)
|
|
6275
|
-
report(parser,
|
|
6316
|
+
report(parser, 53);
|
|
6276
6317
|
const { token } = parser;
|
|
6277
6318
|
nextToken(parser, context);
|
|
6278
6319
|
parser.assignable = 2;
|
|
@@ -6284,7 +6325,7 @@
|
|
|
6284
6325
|
});
|
|
6285
6326
|
}
|
|
6286
6327
|
function parseMemberOrUpdateExpression(parser, context, expr, inGroup, inChain, start, line, column) {
|
|
6287
|
-
if ((parser.token & 33619968) === 33619968 && (parser.flags & 1)
|
|
6328
|
+
if ((parser.token & 33619968) === 33619968 && (parser.flags & 1) === 0) {
|
|
6288
6329
|
expr = parseUpdateExpression(parser, context, expr, start, line, column);
|
|
6289
6330
|
}
|
|
6290
6331
|
else if ((parser.token & 67108864) === 67108864) {
|
|
@@ -6355,7 +6396,7 @@
|
|
|
6355
6396
|
}
|
|
6356
6397
|
default:
|
|
6357
6398
|
if ((parser.flags & 2048) === 2048) {
|
|
6358
|
-
report(parser,
|
|
6399
|
+
report(parser, 161);
|
|
6359
6400
|
}
|
|
6360
6401
|
parser.assignable = 2;
|
|
6361
6402
|
expr = finishNode(parser, context, start, line, column, {
|
|
@@ -6411,8 +6452,8 @@
|
|
|
6411
6452
|
});
|
|
6412
6453
|
}
|
|
6413
6454
|
else {
|
|
6414
|
-
if ((parser.token & (143360 | 4096))
|
|
6415
|
-
report(parser,
|
|
6455
|
+
if ((parser.token & (143360 | 4096)) === 0)
|
|
6456
|
+
report(parser, 155);
|
|
6416
6457
|
const property = parseIdentifier(parser, context, 0);
|
|
6417
6458
|
parser.assignable = 2;
|
|
6418
6459
|
node = finishNode(parser, context, start, line, column, {
|
|
@@ -6429,8 +6470,8 @@
|
|
|
6429
6470
|
return node;
|
|
6430
6471
|
}
|
|
6431
6472
|
function parsePropertyOrPrivatePropertyName(parser, context) {
|
|
6432
|
-
if ((parser.token & (143360 | 4096))
|
|
6433
|
-
report(parser,
|
|
6473
|
+
if ((parser.token & (143360 | 4096)) === 0 && parser.token !== 131) {
|
|
6474
|
+
report(parser, 155);
|
|
6434
6475
|
}
|
|
6435
6476
|
return context & 1 && parser.token === 131
|
|
6436
6477
|
? parsePrivateIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos)
|
|
@@ -6438,14 +6479,14 @@
|
|
|
6438
6479
|
}
|
|
6439
6480
|
function parseUpdateExpressionPrefixed(parser, context, inNew, isLHS, start, line, column) {
|
|
6440
6481
|
if (inNew)
|
|
6441
|
-
report(parser,
|
|
6482
|
+
report(parser, 54);
|
|
6442
6483
|
if (!isLHS)
|
|
6443
6484
|
report(parser, 0);
|
|
6444
6485
|
const { token } = parser;
|
|
6445
6486
|
nextToken(parser, context | 32768);
|
|
6446
6487
|
const arg = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6447
6488
|
if (parser.assignable & 2) {
|
|
6448
|
-
report(parser,
|
|
6489
|
+
report(parser, 53);
|
|
6449
6490
|
}
|
|
6450
6491
|
parser.assignable = 2;
|
|
6451
6492
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -6474,12 +6515,12 @@
|
|
|
6474
6515
|
return parseArrowFromIdentifier(parser, context, tokenValue, expr, inNew, canAssign, 0, start, line, column);
|
|
6475
6516
|
}
|
|
6476
6517
|
if (context & 16384 && token === 537079928)
|
|
6477
|
-
report(parser,
|
|
6518
|
+
report(parser, 127);
|
|
6478
6519
|
if (token === 241739) {
|
|
6479
6520
|
if (context & 1024)
|
|
6480
|
-
report(parser,
|
|
6521
|
+
report(parser, 110);
|
|
6481
6522
|
if (kind & (8 | 16))
|
|
6482
|
-
report(parser,
|
|
6523
|
+
report(parser, 98);
|
|
6483
6524
|
}
|
|
6484
6525
|
parser.assignable =
|
|
6485
6526
|
context & 1024 && (token & 537079808) === 537079808
|
|
@@ -6550,14 +6591,14 @@
|
|
|
6550
6591
|
return parseImportMetaExpression(parser, context, expr, start, line, column);
|
|
6551
6592
|
}
|
|
6552
6593
|
if (inNew)
|
|
6553
|
-
report(parser,
|
|
6594
|
+
report(parser, 138);
|
|
6554
6595
|
expr = parseImportExpression(parser, context, inGroup, start, line, column);
|
|
6555
6596
|
parser.assignable = 2;
|
|
6556
6597
|
return parseMemberOrUpdateExpression(parser, context, expr, inGroup, 0, start, line, column);
|
|
6557
6598
|
}
|
|
6558
6599
|
function parseImportMetaExpression(parser, context, meta, start, line, column) {
|
|
6559
6600
|
if ((context & 2048) === 0)
|
|
6560
|
-
report(parser,
|
|
6601
|
+
report(parser, 164);
|
|
6561
6602
|
nextToken(parser, context);
|
|
6562
6603
|
if (parser.token !== 143495 && parser.tokenValue !== 'meta')
|
|
6563
6604
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
@@ -6571,7 +6612,7 @@
|
|
|
6571
6612
|
function parseImportExpression(parser, context, inGroup, start, line, column) {
|
|
6572
6613
|
consume(parser, context | 32768, 67174411);
|
|
6573
6614
|
if (parser.token === 14)
|
|
6574
|
-
report(parser,
|
|
6615
|
+
report(parser, 139);
|
|
6575
6616
|
const source = parseExpression(parser, context, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6576
6617
|
consume(parser, context, 16);
|
|
6577
6618
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -6616,14 +6657,14 @@
|
|
|
6616
6657
|
];
|
|
6617
6658
|
const expressions = [parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos)];
|
|
6618
6659
|
if (parser.token !== 1074790415)
|
|
6619
|
-
report(parser,
|
|
6660
|
+
report(parser, 81);
|
|
6620
6661
|
while ((parser.token = scanTemplateTail(parser, context)) !== 67174409) {
|
|
6621
6662
|
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
|
6622
6663
|
consume(parser, context | 32768, 67174408);
|
|
6623
6664
|
quasis.push(parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenPos, linePos, colPos, false));
|
|
6624
6665
|
expressions.push(parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos));
|
|
6625
6666
|
if (parser.token !== 1074790415)
|
|
6626
|
-
report(parser,
|
|
6667
|
+
report(parser, 81);
|
|
6627
6668
|
}
|
|
6628
6669
|
{
|
|
6629
6670
|
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
|
@@ -6754,11 +6795,11 @@
|
|
|
6754
6795
|
let firstRestricted;
|
|
6755
6796
|
let functionScope = scope ? createScope() : void 0;
|
|
6756
6797
|
if (parser.token === 67174411) {
|
|
6757
|
-
if ((flags & 1)
|
|
6798
|
+
if ((flags & 1) === 0)
|
|
6758
6799
|
report(parser, 37, 'Function');
|
|
6759
6800
|
}
|
|
6760
6801
|
else {
|
|
6761
|
-
const kind = origin & 4 && ((context & 8192)
|
|
6802
|
+
const kind = origin & 4 && ((context & 8192) === 0 || (context & 2048) === 0)
|
|
6762
6803
|
? 4
|
|
6763
6804
|
: 64;
|
|
6764
6805
|
validateFunctionName(parser, context | ((context & 3072) << 11), parser.token);
|
|
@@ -6839,10 +6880,10 @@
|
|
|
6839
6880
|
function parseArrayLiteral(parser, context, skipInitializer, inGroup, start, line, column) {
|
|
6840
6881
|
const expr = parseArrayExpressionOrPattern(parser, context, void 0, skipInitializer, inGroup, 0, 2, 0, start, line, column);
|
|
6841
6882
|
if (context & 256 && parser.destructible & 64) {
|
|
6842
|
-
report(parser,
|
|
6883
|
+
report(parser, 61);
|
|
6843
6884
|
}
|
|
6844
6885
|
if (parser.destructible & 8) {
|
|
6845
|
-
report(parser,
|
|
6886
|
+
report(parser, 60);
|
|
6846
6887
|
}
|
|
6847
6888
|
return expr;
|
|
6848
6889
|
}
|
|
@@ -6904,7 +6945,7 @@
|
|
|
6904
6945
|
destructible |=
|
|
6905
6946
|
kind & 1
|
|
6906
6947
|
? 32
|
|
6907
|
-
: (kind & 2)
|
|
6948
|
+
: (kind & 2) === 0
|
|
6908
6949
|
? 16
|
|
6909
6950
|
: 0;
|
|
6910
6951
|
left = parseMemberOrUpdateExpression(parser, context, left, inGroup, 0, tokenPos, linePos, colPos);
|
|
@@ -6937,7 +6978,7 @@
|
|
|
6937
6978
|
}
|
|
6938
6979
|
}
|
|
6939
6980
|
else if (parser.destructible & 8) {
|
|
6940
|
-
report(parser,
|
|
6981
|
+
report(parser, 69);
|
|
6941
6982
|
}
|
|
6942
6983
|
else {
|
|
6943
6984
|
left = parseMemberOrUpdateExpression(parser, context, left, inGroup, 0, tokenPos, linePos, colPos);
|
|
@@ -6963,7 +7004,7 @@
|
|
|
6963
7004
|
left = parseLeftHandSideExpression(parser, context, 1, 0, 1, tokenPos, linePos, colPos);
|
|
6964
7005
|
if (parser.token !== 18 && parser.token !== 20) {
|
|
6965
7006
|
left = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, left);
|
|
6966
|
-
if ((kind & (2 | 1))
|
|
7007
|
+
if ((kind & (2 | 1)) === 0 && token === 67174411)
|
|
6967
7008
|
destructible |= 16;
|
|
6968
7009
|
}
|
|
6969
7010
|
else if (parser.assignable & 2) {
|
|
@@ -7036,7 +7077,7 @@
|
|
|
7036
7077
|
argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
|
|
7037
7078
|
if (parser.token !== 18 && parser.token !== closingToken) {
|
|
7038
7079
|
if (parser.assignable & 2 && parser.token === 1077936157)
|
|
7039
|
-
report(parser,
|
|
7080
|
+
report(parser, 69);
|
|
7040
7081
|
destructible |= 16;
|
|
7041
7082
|
argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, argument);
|
|
7042
7083
|
}
|
|
@@ -7063,7 +7104,7 @@
|
|
|
7063
7104
|
token = parser.token;
|
|
7064
7105
|
if (token !== 1077936157 && token !== closingToken && token !== 18) {
|
|
7065
7106
|
if (parser.destructible & 8)
|
|
7066
|
-
report(parser,
|
|
7107
|
+
report(parser, 69);
|
|
7067
7108
|
argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
|
|
7068
7109
|
destructible |= parser.assignable & 2 ? 16 : 0;
|
|
7069
7110
|
if ((parser.token & 4194304) === 4194304) {
|
|
@@ -7113,7 +7154,7 @@
|
|
|
7113
7154
|
}
|
|
7114
7155
|
parser.destructible = destructible;
|
|
7115
7156
|
if (parser.token !== closingToken && parser.token !== 18)
|
|
7116
|
-
report(parser,
|
|
7157
|
+
report(parser, 156);
|
|
7117
7158
|
return finishNode(parser, context, start, line, column, {
|
|
7118
7159
|
type: isPattern ? 'RestElement' : 'SpreadElement',
|
|
7119
7160
|
argument: argument
|
|
@@ -7152,7 +7193,7 @@
|
|
|
7152
7193
|
});
|
|
7153
7194
|
}
|
|
7154
7195
|
function parseMethodDefinition(parser, context, kind, inGroup, start, line, column) {
|
|
7155
|
-
const modifierFlags = (kind & 64)
|
|
7196
|
+
const modifierFlags = (kind & 64) === 0 ? 31981568 : 14680064;
|
|
7156
7197
|
context =
|
|
7157
7198
|
((context | modifierFlags) ^ modifierFlags) |
|
|
7158
7199
|
((kind & 88) << 18) |
|
|
@@ -7174,10 +7215,10 @@
|
|
|
7174
7215
|
function parseObjectLiteral(parser, context, skipInitializer, inGroup, start, line, column) {
|
|
7175
7216
|
const expr = parseObjectLiteralOrPattern(parser, context, void 0, skipInitializer, inGroup, 0, 2, 0, start, line, column);
|
|
7176
7217
|
if (context & 256 && parser.destructible & 64) {
|
|
7177
|
-
report(parser,
|
|
7218
|
+
report(parser, 61);
|
|
7178
7219
|
}
|
|
7179
7220
|
if (parser.destructible & 8) {
|
|
7180
|
-
report(parser,
|
|
7221
|
+
report(parser, 60);
|
|
7181
7222
|
}
|
|
7182
7223
|
return expr;
|
|
7183
7224
|
}
|
|
@@ -7294,7 +7335,7 @@
|
|
|
7294
7335
|
destructible |= 16;
|
|
7295
7336
|
}
|
|
7296
7337
|
else if (parser.destructible & 8) {
|
|
7297
|
-
report(parser,
|
|
7338
|
+
report(parser, 69);
|
|
7298
7339
|
}
|
|
7299
7340
|
else {
|
|
7300
7341
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
@@ -7354,10 +7395,10 @@
|
|
|
7354
7395
|
else if (parser.token & (143360 | 4096)) {
|
|
7355
7396
|
destructible |= 16;
|
|
7356
7397
|
if (token === 121)
|
|
7357
|
-
report(parser,
|
|
7398
|
+
report(parser, 93);
|
|
7358
7399
|
if (token === 209007) {
|
|
7359
7400
|
if (parser.flags & 1)
|
|
7360
|
-
report(parser,
|
|
7401
|
+
report(parser, 129);
|
|
7361
7402
|
state |= 16;
|
|
7362
7403
|
}
|
|
7363
7404
|
key = parseIdentifier(parser, context, 0);
|
|
@@ -7376,11 +7417,14 @@
|
|
|
7376
7417
|
}
|
|
7377
7418
|
else if (parser.token === 8457014) {
|
|
7378
7419
|
destructible |= 16;
|
|
7379
|
-
if (token === 12402
|
|
7420
|
+
if (token === 12402) {
|
|
7380
7421
|
report(parser, 40);
|
|
7381
7422
|
}
|
|
7423
|
+
else if (token === 12403) {
|
|
7424
|
+
report(parser, 41);
|
|
7425
|
+
}
|
|
7382
7426
|
else if (token === 143483) {
|
|
7383
|
-
report(parser,
|
|
7427
|
+
report(parser, 93);
|
|
7384
7428
|
}
|
|
7385
7429
|
nextToken(parser, context);
|
|
7386
7430
|
state |=
|
|
@@ -7415,7 +7459,7 @@
|
|
|
7415
7459
|
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7416
7460
|
}
|
|
7417
7461
|
else {
|
|
7418
|
-
report(parser,
|
|
7462
|
+
report(parser, 130);
|
|
7419
7463
|
}
|
|
7420
7464
|
}
|
|
7421
7465
|
else if ((parser.token & 134217728) === 134217728) {
|
|
@@ -7516,7 +7560,7 @@
|
|
|
7516
7560
|
destructible = parser.assignable | 16;
|
|
7517
7561
|
}
|
|
7518
7562
|
else {
|
|
7519
|
-
report(parser,
|
|
7563
|
+
report(parser, 131);
|
|
7520
7564
|
}
|
|
7521
7565
|
}
|
|
7522
7566
|
else if (parser.token === 69271571) {
|
|
@@ -7573,7 +7617,7 @@
|
|
|
7573
7617
|
destructible |= 16;
|
|
7574
7618
|
}
|
|
7575
7619
|
else if (destructible & 8) {
|
|
7576
|
-
report(parser,
|
|
7620
|
+
report(parser, 60);
|
|
7577
7621
|
}
|
|
7578
7622
|
else {
|
|
7579
7623
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
@@ -7625,7 +7669,7 @@
|
|
|
7625
7669
|
destructible = 16;
|
|
7626
7670
|
}
|
|
7627
7671
|
else {
|
|
7628
|
-
report(parser,
|
|
7672
|
+
report(parser, 42);
|
|
7629
7673
|
}
|
|
7630
7674
|
}
|
|
7631
7675
|
else if (token === 8457014) {
|
|
@@ -7641,10 +7685,10 @@
|
|
|
7641
7685
|
}
|
|
7642
7686
|
else {
|
|
7643
7687
|
reportMessageAt(index, line, index, token === 209007
|
|
7644
|
-
?
|
|
7688
|
+
? 44
|
|
7645
7689
|
: token === 12402 || parser.token === 12403
|
|
7646
|
-
?
|
|
7647
|
-
:
|
|
7690
|
+
? 43
|
|
7691
|
+
: 45, KeywordDescTable[token & 255]);
|
|
7648
7692
|
}
|
|
7649
7693
|
}
|
|
7650
7694
|
else if ((parser.token & 134217728) === 134217728) {
|
|
@@ -7660,7 +7704,7 @@
|
|
|
7660
7704
|
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7661
7705
|
}
|
|
7662
7706
|
else {
|
|
7663
|
-
report(parser,
|
|
7707
|
+
report(parser, 123);
|
|
7664
7708
|
}
|
|
7665
7709
|
}
|
|
7666
7710
|
else {
|
|
@@ -7720,7 +7764,7 @@
|
|
|
7720
7764
|
let left = null;
|
|
7721
7765
|
const { tokenPos, linePos, colPos } = parser;
|
|
7722
7766
|
if (parser.token & 143360) {
|
|
7723
|
-
if ((context & 1024)
|
|
7767
|
+
if ((context & 1024) === 0) {
|
|
7724
7768
|
if ((parser.token & 36864) === 36864) {
|
|
7725
7769
|
parser.flags |= 256;
|
|
7726
7770
|
}
|
|
@@ -7742,7 +7786,7 @@
|
|
|
7742
7786
|
}
|
|
7743
7787
|
isSimpleParameterList = 1;
|
|
7744
7788
|
if (parser.destructible & (32 | 16))
|
|
7745
|
-
report(parser,
|
|
7789
|
+
report(parser, 48);
|
|
7746
7790
|
}
|
|
7747
7791
|
if (parser.token === 1077936157) {
|
|
7748
7792
|
nextToken(parser, context | 32768);
|
|
@@ -7834,7 +7878,7 @@
|
|
|
7834
7878
|
parser.assignable = 2;
|
|
7835
7879
|
if (parser.token !== 16 && parser.token !== 18) {
|
|
7836
7880
|
if (destructible & 8)
|
|
7837
|
-
report(parser,
|
|
7881
|
+
report(parser, 119);
|
|
7838
7882
|
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, tokenPos, linePos, colPos);
|
|
7839
7883
|
destructible |= 16;
|
|
7840
7884
|
if (parser.token !== 16 && parser.token !== 18) {
|
|
@@ -7845,7 +7889,7 @@
|
|
|
7845
7889
|
else if (token === 14) {
|
|
7846
7890
|
expr = parseSpreadOrRestElement(parser, context, scope, 16, kind, origin, 0, 1, 0, tokenPos, linePos, colPos);
|
|
7847
7891
|
if (parser.destructible & 16)
|
|
7848
|
-
report(parser,
|
|
7892
|
+
report(parser, 72);
|
|
7849
7893
|
isSimpleParameterList = 1;
|
|
7850
7894
|
if (isSequence && (parser.token === 16 || parser.token === 18)) {
|
|
7851
7895
|
expressions.push(expr);
|
|
@@ -7902,7 +7946,7 @@
|
|
|
7902
7946
|
}
|
|
7903
7947
|
consume(parser, context, 16);
|
|
7904
7948
|
if (destructible & 16 && destructible & 8)
|
|
7905
|
-
report(parser,
|
|
7949
|
+
report(parser, 146);
|
|
7906
7950
|
destructible |=
|
|
7907
7951
|
parser.destructible & 256
|
|
7908
7952
|
? 256
|
|
@@ -7911,7 +7955,7 @@
|
|
|
7911
7955
|
: 0;
|
|
7912
7956
|
if (parser.token === 10) {
|
|
7913
7957
|
if (destructible & (32 | 16))
|
|
7914
|
-
report(parser,
|
|
7958
|
+
report(parser, 47);
|
|
7915
7959
|
if (context & (4194304 | 2048) && destructible & 128)
|
|
7916
7960
|
report(parser, 29);
|
|
7917
7961
|
if (context & (1024 | 2097152) && destructible & 256) {
|
|
@@ -7922,7 +7966,7 @@
|
|
|
7922
7966
|
return parseParenthesizedArrow(parser, context, scope, isSequence ? expressions : [expr], canAssign, 0, start, line, column);
|
|
7923
7967
|
}
|
|
7924
7968
|
else if (destructible & 8) {
|
|
7925
|
-
report(parser,
|
|
7969
|
+
report(parser, 140);
|
|
7926
7970
|
}
|
|
7927
7971
|
parser.destructible = ((parser.destructible | 256) ^ 256) | destructible;
|
|
7928
7972
|
return context & 128
|
|
@@ -7947,23 +7991,23 @@
|
|
|
7947
7991
|
}
|
|
7948
7992
|
function parseArrowFromIdentifier(parser, context, value, expr, inNew, canAssign, isAsync, start, line, column) {
|
|
7949
7993
|
if (!canAssign)
|
|
7950
|
-
report(parser,
|
|
7994
|
+
report(parser, 55);
|
|
7951
7995
|
if (inNew)
|
|
7952
|
-
report(parser,
|
|
7996
|
+
report(parser, 49);
|
|
7953
7997
|
parser.flags &= ~128;
|
|
7954
7998
|
const scope = context & 64 ? createArrowHeadParsingScope(parser, context, value) : void 0;
|
|
7955
7999
|
return parseArrowFunctionExpression(parser, context, scope, [expr], isAsync, start, line, column);
|
|
7956
8000
|
}
|
|
7957
8001
|
function parseParenthesizedArrow(parser, context, scope, params, canAssign, isAsync, start, line, column) {
|
|
7958
8002
|
if (!canAssign)
|
|
7959
|
-
report(parser,
|
|
8003
|
+
report(parser, 55);
|
|
7960
8004
|
for (let i = 0; i < params.length; ++i)
|
|
7961
8005
|
reinterpretToPattern(parser, params[i]);
|
|
7962
8006
|
return parseArrowFunctionExpression(parser, context, scope, params, isAsync, start, line, column);
|
|
7963
8007
|
}
|
|
7964
8008
|
function parseArrowFunctionExpression(parser, context, scope, params, isAsync, start, line, column) {
|
|
7965
8009
|
if (parser.flags & 1)
|
|
7966
|
-
report(parser,
|
|
8010
|
+
report(parser, 46);
|
|
7967
8011
|
consume(parser, context | 32768, 10);
|
|
7968
8012
|
context = ((context | 15728640) ^ 15728640) | (isAsync << 22);
|
|
7969
8013
|
const expression = parser.token !== 2162700;
|
|
@@ -7981,25 +8025,25 @@
|
|
|
7981
8025
|
(134221824 | 8192 | 16384), scope, 16, void 0, void 0);
|
|
7982
8026
|
switch (parser.token) {
|
|
7983
8027
|
case 69271571:
|
|
7984
|
-
if ((parser.flags & 1)
|
|
7985
|
-
report(parser,
|
|
8028
|
+
if ((parser.flags & 1) === 0) {
|
|
8029
|
+
report(parser, 113);
|
|
7986
8030
|
}
|
|
7987
8031
|
break;
|
|
7988
8032
|
case 67108877:
|
|
7989
8033
|
case 67174409:
|
|
7990
8034
|
case 22:
|
|
7991
|
-
report(parser,
|
|
8035
|
+
report(parser, 114);
|
|
7992
8036
|
case 67174411:
|
|
7993
|
-
if ((parser.flags & 1)
|
|
7994
|
-
report(parser,
|
|
8037
|
+
if ((parser.flags & 1) === 0) {
|
|
8038
|
+
report(parser, 113);
|
|
7995
8039
|
}
|
|
7996
8040
|
parser.flags |= 1024;
|
|
7997
8041
|
break;
|
|
7998
8042
|
}
|
|
7999
|
-
if ((parser.token & 8454144) === 8454144 && (parser.flags & 1)
|
|
8043
|
+
if ((parser.token & 8454144) === 8454144 && (parser.flags & 1) === 0)
|
|
8000
8044
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
8001
8045
|
if ((parser.token & 33619968) === 33619968)
|
|
8002
|
-
report(parser,
|
|
8046
|
+
report(parser, 122);
|
|
8003
8047
|
}
|
|
8004
8048
|
parser.assignable = 2;
|
|
8005
8049
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8022,7 +8066,7 @@
|
|
|
8022
8066
|
let left;
|
|
8023
8067
|
const { tokenPos, linePos, colPos } = parser;
|
|
8024
8068
|
if (parser.token & 143360) {
|
|
8025
|
-
if ((context & 1024)
|
|
8069
|
+
if ((context & 1024) === 0) {
|
|
8026
8070
|
if ((parser.token & 36864) === 36864) {
|
|
8027
8071
|
parser.flags |= 256;
|
|
8028
8072
|
}
|
|
@@ -8047,7 +8091,7 @@
|
|
|
8047
8091
|
}
|
|
8048
8092
|
isSimpleParameterList = 1;
|
|
8049
8093
|
if (parser.destructible & (32 | 16)) {
|
|
8050
|
-
report(parser,
|
|
8094
|
+
report(parser, 48);
|
|
8051
8095
|
}
|
|
8052
8096
|
}
|
|
8053
8097
|
if (parser.token === 1077936157) {
|
|
@@ -8123,16 +8167,16 @@
|
|
|
8123
8167
|
parser.assignable = 2;
|
|
8124
8168
|
return parseMetaProperty(parser, context, id, start, line, column);
|
|
8125
8169
|
}
|
|
8126
|
-
report(parser,
|
|
8170
|
+
report(parser, 92);
|
|
8127
8171
|
}
|
|
8128
8172
|
parser.assignable = 2;
|
|
8129
8173
|
if ((parser.token & 16842752) === 16842752) {
|
|
8130
|
-
report(parser,
|
|
8174
|
+
report(parser, 63, KeywordDescTable[parser.token & 255]);
|
|
8131
8175
|
}
|
|
8132
8176
|
const expr = parsePrimaryExpression(parser, context, 2, 1, 0, 0, inGroup, 1, tokenPos, linePos, colPos);
|
|
8133
8177
|
context = (context | 134217728) ^ 134217728;
|
|
8134
8178
|
if (parser.token === 67108991)
|
|
8135
|
-
report(parser,
|
|
8179
|
+
report(parser, 163);
|
|
8136
8180
|
const callee = parseMembeExpressionNoCall(parser, context, expr, inGroup, tokenPos, linePos, colPos);
|
|
8137
8181
|
parser.assignable = 2;
|
|
8138
8182
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8167,7 +8211,7 @@
|
|
|
8167
8211
|
if (consumeOpt(parser, context, 16)) {
|
|
8168
8212
|
if (parser.token === 10) {
|
|
8169
8213
|
if (flags & 1)
|
|
8170
|
-
report(parser,
|
|
8214
|
+
report(parser, 46);
|
|
8171
8215
|
return parseParenthesizedArrow(parser, context, scope, [], canAssign, 1, start, line, column);
|
|
8172
8216
|
}
|
|
8173
8217
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8223,7 +8267,7 @@
|
|
|
8223
8267
|
isSimpleParameterList = 1;
|
|
8224
8268
|
if (parser.token !== 16 && parser.token !== 18) {
|
|
8225
8269
|
if (destructible & 8)
|
|
8226
|
-
report(parser,
|
|
8270
|
+
report(parser, 119);
|
|
8227
8271
|
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, tokenPos, linePos, colPos);
|
|
8228
8272
|
destructible |= 16;
|
|
8229
8273
|
if ((parser.token & 8454144) === 8454144) {
|
|
@@ -8271,7 +8315,7 @@
|
|
|
8271
8315
|
if (destructible & (32 | 16))
|
|
8272
8316
|
report(parser, 25);
|
|
8273
8317
|
if (parser.flags & 1 || flags & 1)
|
|
8274
|
-
report(parser,
|
|
8318
|
+
report(parser, 46);
|
|
8275
8319
|
if (destructible & 128)
|
|
8276
8320
|
report(parser, 29);
|
|
8277
8321
|
if (context & (1024 | 2097152) && destructible & 256)
|
|
@@ -8281,7 +8325,7 @@
|
|
|
8281
8325
|
return parseParenthesizedArrow(parser, context, scope, params, canAssign, 1, start, line, column);
|
|
8282
8326
|
}
|
|
8283
8327
|
else if (destructible & 8) {
|
|
8284
|
-
report(parser,
|
|
8328
|
+
report(parser, 60);
|
|
8285
8329
|
}
|
|
8286
8330
|
parser.assignable = 2;
|
|
8287
8331
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8326,10 +8370,10 @@
|
|
|
8326
8370
|
const { tokenValue } = parser;
|
|
8327
8371
|
if (parser.token & 4096 && parser.token !== 20567) {
|
|
8328
8372
|
if (isStrictReservedWord$1(parser, context, parser.token)) {
|
|
8329
|
-
report(parser,
|
|
8373
|
+
report(parser, 115);
|
|
8330
8374
|
}
|
|
8331
8375
|
if ((parser.token & 537079808) === 537079808) {
|
|
8332
|
-
report(parser,
|
|
8376
|
+
report(parser, 116);
|
|
8333
8377
|
}
|
|
8334
8378
|
if (scope) {
|
|
8335
8379
|
addBlockName(parser, context, scope, tokenValue, 32, 0);
|
|
@@ -8342,7 +8386,7 @@
|
|
|
8342
8386
|
id = parseIdentifier(parser, context, 0);
|
|
8343
8387
|
}
|
|
8344
8388
|
else {
|
|
8345
|
-
if ((flags & 1)
|
|
8389
|
+
if ((flags & 1) === 0)
|
|
8346
8390
|
report(parser, 37, 'Class');
|
|
8347
8391
|
}
|
|
8348
8392
|
let inheritedContext = context;
|
|
@@ -8382,9 +8426,9 @@
|
|
|
8382
8426
|
nextToken(parser, context);
|
|
8383
8427
|
if (parser.token & 4096 && parser.token !== 20567) {
|
|
8384
8428
|
if (isStrictReservedWord$1(parser, context, parser.token))
|
|
8385
|
-
report(parser, 114);
|
|
8386
|
-
if ((parser.token & 537079808) === 537079808) {
|
|
8387
8429
|
report(parser, 115);
|
|
8430
|
+
if ((parser.token & 537079808) === 537079808) {
|
|
8431
|
+
report(parser, 116);
|
|
8388
8432
|
}
|
|
8389
8433
|
id = parseIdentifier(parser, context, 0);
|
|
8390
8434
|
}
|
|
@@ -8443,13 +8487,13 @@
|
|
|
8443
8487
|
decorators = parseDecorators(parser, context);
|
|
8444
8488
|
length = decorators.length;
|
|
8445
8489
|
if (length > 0 && parser.tokenValue === 'constructor') {
|
|
8446
|
-
report(parser,
|
|
8490
|
+
report(parser, 107);
|
|
8447
8491
|
}
|
|
8448
8492
|
if (parser.token === 1074790415)
|
|
8449
|
-
report(parser,
|
|
8493
|
+
report(parser, 106);
|
|
8450
8494
|
if (consumeOpt(parser, context, 1074790417)) {
|
|
8451
8495
|
if (length > 0)
|
|
8452
|
-
report(parser,
|
|
8496
|
+
report(parser, 117);
|
|
8453
8497
|
continue;
|
|
8454
8498
|
}
|
|
8455
8499
|
body.push(parseClassElementList(parser, context, scope, inheritedContext, kind, decorators, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
|
|
@@ -8468,12 +8512,15 @@
|
|
|
8468
8512
|
key = parseIdentifier(parser, context, 0);
|
|
8469
8513
|
switch (token) {
|
|
8470
8514
|
case 36972:
|
|
8471
|
-
if (!isStatic &&
|
|
8515
|
+
if (!isStatic &&
|
|
8516
|
+
parser.token !== 67174411 &&
|
|
8517
|
+
(parser.token & 1048576) !== 1048576 &&
|
|
8518
|
+
parser.token !== 1077936157) {
|
|
8472
8519
|
return parseClassElementList(parser, context, scope, inheritedContext, type, decorators, 1, inGroup, start, line, column);
|
|
8473
8520
|
}
|
|
8474
8521
|
break;
|
|
8475
8522
|
case 209007:
|
|
8476
|
-
if (parser.token !== 67174411 && (parser.flags & 1)
|
|
8523
|
+
if (parser.token !== 67174411 && (parser.flags & 1) === 0) {
|
|
8477
8524
|
if (context & 1 && (parser.token & 1073741824) === 1073741824) {
|
|
8478
8525
|
return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
|
|
8479
8526
|
}
|
|
@@ -8516,6 +8563,9 @@
|
|
|
8516
8563
|
else if (context & 1 && (parser.token & 1073741824) === 1073741824) {
|
|
8517
8564
|
kind |= 128;
|
|
8518
8565
|
}
|
|
8566
|
+
else if (isStatic && token === 2162700) {
|
|
8567
|
+
return parseStaticBlock(parser, context, scope, tokenPos, linePos, colPos);
|
|
8568
|
+
}
|
|
8519
8569
|
else if (token === 122) {
|
|
8520
8570
|
key = parseIdentifier(parser, context, 0);
|
|
8521
8571
|
if (parser.token !== 67174411)
|
|
@@ -8543,30 +8593,30 @@
|
|
|
8543
8593
|
key = parsePrivateIdentifier(parser, context, tokenPos, linePos, colPos);
|
|
8544
8594
|
}
|
|
8545
8595
|
else
|
|
8546
|
-
report(parser,
|
|
8596
|
+
report(parser, 132);
|
|
8547
8597
|
}
|
|
8548
|
-
if ((kind & 2)
|
|
8598
|
+
if ((kind & 2) === 0) {
|
|
8549
8599
|
if (parser.tokenValue === 'constructor') {
|
|
8550
8600
|
if ((parser.token & 1073741824) === 1073741824) {
|
|
8551
|
-
report(parser,
|
|
8601
|
+
report(parser, 126);
|
|
8552
8602
|
}
|
|
8553
|
-
else if ((kind & 32)
|
|
8603
|
+
else if ((kind & 32) === 0 && parser.token === 67174411) {
|
|
8554
8604
|
if (kind & (768 | 16 | 128 | 8)) {
|
|
8555
|
-
report(parser,
|
|
8605
|
+
report(parser, 51, 'accessor');
|
|
8556
8606
|
}
|
|
8557
|
-
else if ((context & 524288)
|
|
8607
|
+
else if ((context & 524288) === 0) {
|
|
8558
8608
|
if (parser.flags & 32)
|
|
8559
|
-
report(parser,
|
|
8609
|
+
report(parser, 52);
|
|
8560
8610
|
else
|
|
8561
8611
|
parser.flags |= 32;
|
|
8562
8612
|
}
|
|
8563
8613
|
}
|
|
8564
8614
|
kind |= 64;
|
|
8565
8615
|
}
|
|
8566
|
-
else if ((kind & 4096)
|
|
8616
|
+
else if ((kind & 4096) === 0 &&
|
|
8567
8617
|
kind & (32 | 768 | 8 | 16) &&
|
|
8568
8618
|
parser.tokenValue === 'prototype') {
|
|
8569
|
-
report(parser,
|
|
8619
|
+
report(parser, 50);
|
|
8570
8620
|
}
|
|
8571
8621
|
}
|
|
8572
8622
|
if (context & 1 && parser.token !== 67174411) {
|
|
@@ -8576,7 +8626,7 @@
|
|
|
8576
8626
|
return finishNode(parser, context, start, line, column, context & 1
|
|
8577
8627
|
? {
|
|
8578
8628
|
type: 'MethodDefinition',
|
|
8579
|
-
kind: (kind & 32)
|
|
8629
|
+
kind: (kind & 32) === 0 && kind & 64
|
|
8580
8630
|
? 'constructor'
|
|
8581
8631
|
: kind & 256
|
|
8582
8632
|
? 'get'
|
|
@@ -8591,7 +8641,7 @@
|
|
|
8591
8641
|
}
|
|
8592
8642
|
: {
|
|
8593
8643
|
type: 'MethodDefinition',
|
|
8594
|
-
kind: (kind & 32)
|
|
8644
|
+
kind: (kind & 32) === 0 && kind & 64
|
|
8595
8645
|
? 'constructor'
|
|
8596
8646
|
: kind & 256
|
|
8597
8647
|
? 'get'
|
|
@@ -8608,7 +8658,7 @@
|
|
|
8608
8658
|
nextToken(parser, context);
|
|
8609
8659
|
const { tokenValue } = parser;
|
|
8610
8660
|
if (tokenValue === 'constructor')
|
|
8611
|
-
report(parser,
|
|
8661
|
+
report(parser, 125);
|
|
8612
8662
|
nextToken(parser, context);
|
|
8613
8663
|
return finishNode(parser, context, start, line, column, {
|
|
8614
8664
|
type: 'PrivateIdentifier',
|
|
@@ -8623,7 +8673,7 @@
|
|
|
8623
8673
|
nextToken(parser, context | 32768);
|
|
8624
8674
|
const { tokenPos, linePos, colPos } = parser;
|
|
8625
8675
|
if (parser.token === 537079928)
|
|
8626
|
-
report(parser,
|
|
8676
|
+
report(parser, 116);
|
|
8627
8677
|
value = parsePrimaryExpression(parser, context | 16384, 2, 0, 1, 0, 0, 1, tokenPos, linePos, colPos);
|
|
8628
8678
|
if ((parser.token & 1073741824) !== 1073741824) {
|
|
8629
8679
|
value = parseMemberOrUpdateExpression(parser, context | 16384, value, 0, 0, tokenPos, linePos, colPos);
|
|
@@ -8651,33 +8701,33 @@
|
|
|
8651
8701
|
? parseArrayExpressionOrPattern(parser, context, scope, 1, 0, 1, type, origin, start, line, column)
|
|
8652
8702
|
: parseObjectLiteralOrPattern(parser, context, scope, 1, 0, 1, type, origin, start, line, column);
|
|
8653
8703
|
if (parser.destructible & 16)
|
|
8654
|
-
report(parser,
|
|
8704
|
+
report(parser, 48);
|
|
8655
8705
|
if (parser.destructible & 32)
|
|
8656
|
-
report(parser,
|
|
8706
|
+
report(parser, 48);
|
|
8657
8707
|
return left;
|
|
8658
8708
|
}
|
|
8659
8709
|
function parseAndClassifyIdentifier(parser, context, scope, kind, origin, start, line, column) {
|
|
8660
8710
|
const { tokenValue, token } = parser;
|
|
8661
8711
|
if (context & 1024) {
|
|
8662
8712
|
if ((token & 537079808) === 537079808) {
|
|
8663
|
-
report(parser,
|
|
8713
|
+
report(parser, 116);
|
|
8664
8714
|
}
|
|
8665
8715
|
else if ((token & 36864) === 36864) {
|
|
8666
|
-
report(parser,
|
|
8716
|
+
report(parser, 115);
|
|
8667
8717
|
}
|
|
8668
8718
|
}
|
|
8669
8719
|
if ((token & 20480) === 20480) {
|
|
8670
|
-
report(parser,
|
|
8720
|
+
report(parser, 100);
|
|
8671
8721
|
}
|
|
8672
8722
|
if (context & (2048 | 2097152) && token === 241773) {
|
|
8673
8723
|
report(parser, 30);
|
|
8674
8724
|
}
|
|
8675
8725
|
if (token === 241739) {
|
|
8676
8726
|
if (kind & (8 | 16))
|
|
8677
|
-
report(parser,
|
|
8727
|
+
report(parser, 98);
|
|
8678
8728
|
}
|
|
8679
8729
|
if (context & (4194304 | 2048) && token === 209008) {
|
|
8680
|
-
report(parser,
|
|
8730
|
+
report(parser, 96);
|
|
8681
8731
|
}
|
|
8682
8732
|
nextToken(parser, context);
|
|
8683
8733
|
if (scope)
|
|
@@ -8705,7 +8755,7 @@
|
|
|
8705
8755
|
closingElement = parseJSXClosingElement(parser, context, inJSXChild, parser.tokenPos, parser.linePos, parser.colPos);
|
|
8706
8756
|
const close = isEqualTagName(closingElement.name);
|
|
8707
8757
|
if (isEqualTagName(openingElement.name) !== close)
|
|
8708
|
-
report(parser,
|
|
8758
|
+
report(parser, 150, close);
|
|
8709
8759
|
}
|
|
8710
8760
|
return finishNode(parser, context, start, line, column, {
|
|
8711
8761
|
type: 'JSXElement',
|
|
@@ -8861,7 +8911,7 @@
|
|
|
8861
8911
|
value = parseJSXExpressionContainer(parser, context, 1, 1, tokenPos, linePos, colPos);
|
|
8862
8912
|
break;
|
|
8863
8913
|
default:
|
|
8864
|
-
report(parser,
|
|
8914
|
+
report(parser, 149);
|
|
8865
8915
|
}
|
|
8866
8916
|
}
|
|
8867
8917
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -8883,11 +8933,11 @@
|
|
|
8883
8933
|
nextToken(parser, context | 32768);
|
|
8884
8934
|
const { tokenPos, linePos, colPos } = parser;
|
|
8885
8935
|
if (parser.token === 14)
|
|
8886
|
-
return parseJSXSpreadChild(parser, context,
|
|
8936
|
+
return parseJSXSpreadChild(parser, context, start, line, column);
|
|
8887
8937
|
let expression = null;
|
|
8888
8938
|
if (parser.token === 1074790415) {
|
|
8889
8939
|
if (isAttr)
|
|
8890
|
-
report(parser,
|
|
8940
|
+
report(parser, 152);
|
|
8891
8941
|
expression = parseJSXEmptyExpression(parser, context, parser.startPos, parser.startLine, parser.startColumn);
|
|
8892
8942
|
}
|
|
8893
8943
|
else {
|
|
@@ -9760,12 +9810,22 @@
|
|
|
9760
9810
|
if (node.static) {
|
|
9761
9811
|
state.write('static ');
|
|
9762
9812
|
}
|
|
9813
|
+
if (node.computed) {
|
|
9814
|
+
state.write('[');
|
|
9815
|
+
}
|
|
9763
9816
|
this[node.key.type](node.key, state);
|
|
9817
|
+
if (node.computed) {
|
|
9818
|
+
state.write(']');
|
|
9819
|
+
}
|
|
9764
9820
|
if (node.value == null) {
|
|
9821
|
+
if (node.key.type[0] !== 'F') {
|
|
9822
|
+
state.write(';');
|
|
9823
|
+
}
|
|
9765
9824
|
return
|
|
9766
9825
|
}
|
|
9767
9826
|
state.write(' = ');
|
|
9768
9827
|
this[node.value.type](node.value, state);
|
|
9828
|
+
state.write(';');
|
|
9769
9829
|
},
|
|
9770
9830
|
ObjectPattern(node, state) {
|
|
9771
9831
|
state.write('{');
|
|
@@ -10101,10 +10161,21 @@
|
|
|
10101
10161
|
|
|
10102
10162
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
10103
10163
|
|
|
10164
|
+
function getDefaultExportFromCjs (x) {
|
|
10165
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
10166
|
+
}
|
|
10167
|
+
|
|
10104
10168
|
function getAugmentedNamespace(n) {
|
|
10169
|
+
if (n.__esModule) return n;
|
|
10105
10170
|
var f = n.default;
|
|
10106
10171
|
if (typeof f == "function") {
|
|
10107
|
-
var a = function () {
|
|
10172
|
+
var a = function a () {
|
|
10173
|
+
if (this instanceof a) {
|
|
10174
|
+
var args = [null];
|
|
10175
|
+
args.push.apply(args, arguments);
|
|
10176
|
+
var Ctor = Function.bind.apply(f, args);
|
|
10177
|
+
return new Ctor();
|
|
10178
|
+
}
|
|
10108
10179
|
return f.apply(this, arguments);
|
|
10109
10180
|
};
|
|
10110
10181
|
a.prototype = f.prototype;
|
|
@@ -10585,7 +10656,7 @@
|
|
|
10585
10656
|
|
|
10586
10657
|
exports.Function = convertCallbackFunction;
|
|
10587
10658
|
|
|
10588
|
-
exports.VoidFunction = convertCallbackFunction;
|
|
10659
|
+
exports.VoidFunction = convertCallbackFunction;
|
|
10589
10660
|
} (lib));
|
|
10590
10661
|
|
|
10591
10662
|
var utils = {exports: {}};
|
|
@@ -10716,9 +10787,11 @@
|
|
|
10716
10787
|
namedSetNew,
|
|
10717
10788
|
namedSetExisting,
|
|
10718
10789
|
namedDelete
|
|
10719
|
-
};
|
|
10790
|
+
};
|
|
10720
10791
|
} (utils));
|
|
10721
10792
|
|
|
10793
|
+
var utilsExports = utils.exports;
|
|
10794
|
+
|
|
10722
10795
|
var URLImpl = {};
|
|
10723
10796
|
|
|
10724
10797
|
var urlStateMachine = {exports: {}};
|
|
@@ -10738,7 +10811,7 @@
|
|
|
10738
10811
|
|
|
10739
10812
|
/** Regular expressions */
|
|
10740
10813
|
const regexPunycode = /^xn--/;
|
|
10741
|
-
const regexNonASCII = /[^\0-\
|
|
10814
|
+
const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too.
|
|
10742
10815
|
const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
|
|
10743
10816
|
|
|
10744
10817
|
/** Error messages */
|
|
@@ -10773,11 +10846,11 @@
|
|
|
10773
10846
|
* item.
|
|
10774
10847
|
* @returns {Array} A new array of values returned by the callback function.
|
|
10775
10848
|
*/
|
|
10776
|
-
function map(array,
|
|
10849
|
+
function map(array, callback) {
|
|
10777
10850
|
const result = [];
|
|
10778
10851
|
let length = array.length;
|
|
10779
10852
|
while (length--) {
|
|
10780
|
-
result[length] =
|
|
10853
|
+
result[length] = callback(array[length]);
|
|
10781
10854
|
}
|
|
10782
10855
|
return result;
|
|
10783
10856
|
}
|
|
@@ -10789,22 +10862,22 @@
|
|
|
10789
10862
|
* @param {String} domain The domain name or email address.
|
|
10790
10863
|
* @param {Function} callback The function that gets called for every
|
|
10791
10864
|
* character.
|
|
10792
|
-
* @returns {
|
|
10865
|
+
* @returns {String} A new string of characters returned by the callback
|
|
10793
10866
|
* function.
|
|
10794
10867
|
*/
|
|
10795
|
-
function mapDomain(
|
|
10796
|
-
const parts =
|
|
10868
|
+
function mapDomain(domain, callback) {
|
|
10869
|
+
const parts = domain.split('@');
|
|
10797
10870
|
let result = '';
|
|
10798
10871
|
if (parts.length > 1) {
|
|
10799
10872
|
// In email addresses, only the domain name should be punycoded. Leave
|
|
10800
10873
|
// the local part (i.e. everything up to `@`) intact.
|
|
10801
10874
|
result = parts[0] + '@';
|
|
10802
|
-
|
|
10875
|
+
domain = parts[1];
|
|
10803
10876
|
}
|
|
10804
10877
|
// Avoid `split(regex)` for IE8 compatibility. See #17.
|
|
10805
|
-
|
|
10806
|
-
const labels =
|
|
10807
|
-
const encoded = map(labels,
|
|
10878
|
+
domain = domain.replace(regexSeparators, '\x2E');
|
|
10879
|
+
const labels = domain.split('.');
|
|
10880
|
+
const encoded = map(labels, callback).join('.');
|
|
10808
10881
|
return result + encoded;
|
|
10809
10882
|
}
|
|
10810
10883
|
|
|
@@ -10853,7 +10926,7 @@
|
|
|
10853
10926
|
* @param {Array} codePoints The array of numeric code points.
|
|
10854
10927
|
* @returns {String} The new Unicode string (UCS-2).
|
|
10855
10928
|
*/
|
|
10856
|
-
const ucs2encode =
|
|
10929
|
+
const ucs2encode = codePoints => String.fromCodePoint(...codePoints);
|
|
10857
10930
|
|
|
10858
10931
|
/**
|
|
10859
10932
|
* Converts a basic code point into a digit/integer.
|
|
@@ -10865,13 +10938,13 @@
|
|
|
10865
10938
|
* the code point does not represent a value.
|
|
10866
10939
|
*/
|
|
10867
10940
|
const basicToDigit = function(codePoint) {
|
|
10868
|
-
if (codePoint
|
|
10869
|
-
return codePoint -
|
|
10941
|
+
if (codePoint >= 0x30 && codePoint < 0x3A) {
|
|
10942
|
+
return 26 + (codePoint - 0x30);
|
|
10870
10943
|
}
|
|
10871
|
-
if (codePoint
|
|
10944
|
+
if (codePoint >= 0x41 && codePoint < 0x5B) {
|
|
10872
10945
|
return codePoint - 0x41;
|
|
10873
10946
|
}
|
|
10874
|
-
if (codePoint
|
|
10947
|
+
if (codePoint >= 0x61 && codePoint < 0x7B) {
|
|
10875
10948
|
return codePoint - 0x61;
|
|
10876
10949
|
}
|
|
10877
10950
|
return base;
|
|
@@ -10951,7 +11024,7 @@
|
|
|
10951
11024
|
// which gets added to `i`. The overflow checking is easier
|
|
10952
11025
|
// if we increase `i` as we go, then subtract off its starting
|
|
10953
11026
|
// value at the end to obtain `delta`.
|
|
10954
|
-
|
|
11027
|
+
const oldi = i;
|
|
10955
11028
|
for (let w = 1, k = base; /* no condition */; k += base) {
|
|
10956
11029
|
|
|
10957
11030
|
if (index >= inputLength) {
|
|
@@ -10960,7 +11033,10 @@
|
|
|
10960
11033
|
|
|
10961
11034
|
const digit = basicToDigit(input.charCodeAt(index++));
|
|
10962
11035
|
|
|
10963
|
-
if (digit >= base
|
|
11036
|
+
if (digit >= base) {
|
|
11037
|
+
error('invalid-input');
|
|
11038
|
+
}
|
|
11039
|
+
if (digit > floor((maxInt - i) / w)) {
|
|
10964
11040
|
error('overflow');
|
|
10965
11041
|
}
|
|
10966
11042
|
|
|
@@ -11014,7 +11090,7 @@
|
|
|
11014
11090
|
input = ucs2decode(input);
|
|
11015
11091
|
|
|
11016
11092
|
// Cache the length.
|
|
11017
|
-
|
|
11093
|
+
const inputLength = input.length;
|
|
11018
11094
|
|
|
11019
11095
|
// Initialize the state.
|
|
11020
11096
|
let n = initialN;
|
|
@@ -11028,7 +11104,7 @@
|
|
|
11028
11104
|
}
|
|
11029
11105
|
}
|
|
11030
11106
|
|
|
11031
|
-
|
|
11107
|
+
const basicLength = output.length;
|
|
11032
11108
|
let handledCPCount = basicLength;
|
|
11033
11109
|
|
|
11034
11110
|
// `handledCPCount` is the number of code points that have been handled;
|
|
@@ -11065,7 +11141,7 @@
|
|
|
11065
11141
|
if (currentValue < n && ++delta > maxInt) {
|
|
11066
11142
|
error('overflow');
|
|
11067
11143
|
}
|
|
11068
|
-
if (currentValue
|
|
11144
|
+
if (currentValue === n) {
|
|
11069
11145
|
// Represent delta as a generalized variable-length integer.
|
|
11070
11146
|
let q = delta;
|
|
11071
11147
|
for (let k = base; /* no condition */; k += base) {
|
|
@@ -11082,7 +11158,7 @@
|
|
|
11082
11158
|
}
|
|
11083
11159
|
|
|
11084
11160
|
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
|
11085
|
-
bias = adapt(delta, handledCPCountPlusOne, handledCPCount
|
|
11161
|
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
|
|
11086
11162
|
delta = 0;
|
|
11087
11163
|
++handledCPCount;
|
|
11088
11164
|
}
|
|
@@ -11162,13 +11238,13 @@
|
|
|
11162
11238
|
|
|
11163
11239
|
var punycode_es6 = /*#__PURE__*/Object.freeze({
|
|
11164
11240
|
__proto__: null,
|
|
11165
|
-
ucs2decode: ucs2decode,
|
|
11166
|
-
ucs2encode: ucs2encode,
|
|
11167
11241
|
decode: decode,
|
|
11242
|
+
default: punycode$1,
|
|
11168
11243
|
encode: encode,
|
|
11169
11244
|
toASCII: toASCII$1,
|
|
11170
11245
|
toUnicode: toUnicode$1,
|
|
11171
|
-
|
|
11246
|
+
ucs2decode: ucs2decode,
|
|
11247
|
+
ucs2encode: ucs2encode
|
|
11172
11248
|
});
|
|
11173
11249
|
|
|
11174
11250
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(punycode_es6);
|
|
@@ -78609,9 +78685,11 @@
|
|
|
78609
78685
|
|
|
78610
78686
|
// We don't handle blobs, so this just delegates:
|
|
78611
78687
|
return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });
|
|
78612
|
-
};
|
|
78688
|
+
};
|
|
78613
78689
|
} (urlStateMachine));
|
|
78614
78690
|
|
|
78691
|
+
var urlStateMachineExports = urlStateMachine.exports;
|
|
78692
|
+
|
|
78615
78693
|
var URLSearchParams = {exports: {}};
|
|
78616
78694
|
|
|
78617
78695
|
var URLSearchParamsImpl = {};
|
|
@@ -78626,6 +78704,7 @@
|
|
|
78626
78704
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
78627
78705
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
78628
78706
|
*/
|
|
78707
|
+
lodash_sortby.exports;
|
|
78629
78708
|
|
|
78630
78709
|
var hasRequiredLodash_sortby;
|
|
78631
78710
|
|
|
@@ -81253,8 +81332,8 @@
|
|
|
81253
81332
|
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
81254
81333
|
}
|
|
81255
81334
|
|
|
81256
|
-
module.exports = sortBy;
|
|
81257
|
-
|
|
81335
|
+
module.exports = sortBy;
|
|
81336
|
+
} (lodash_sortby, lodash_sortby.exports));
|
|
81258
81337
|
return lodash_sortby.exports;
|
|
81259
81338
|
}
|
|
81260
81339
|
|
|
@@ -81390,14 +81469,14 @@
|
|
|
81390
81469
|
(function (module) {
|
|
81391
81470
|
|
|
81392
81471
|
const conversions = lib;
|
|
81393
|
-
const utils
|
|
81472
|
+
const utils = utilsExports;
|
|
81394
81473
|
|
|
81395
|
-
const impl = utils
|
|
81474
|
+
const impl = utils.implSymbol;
|
|
81396
81475
|
|
|
81397
|
-
const IteratorPrototype = Object.create(utils
|
|
81476
|
+
const IteratorPrototype = Object.create(utils.IteratorPrototype, {
|
|
81398
81477
|
next: {
|
|
81399
81478
|
value: function next() {
|
|
81400
|
-
const internal = this[utils
|
|
81479
|
+
const internal = this[utils.iterInternalSymbol];
|
|
81401
81480
|
const { target, kind, index } = internal;
|
|
81402
81481
|
const values = Array.from(target[impl]);
|
|
81403
81482
|
const len = values.length;
|
|
@@ -81407,7 +81486,7 @@
|
|
|
81407
81486
|
|
|
81408
81487
|
const pair = values[index];
|
|
81409
81488
|
internal.index = index + 1;
|
|
81410
|
-
const [key, value] = pair.map(utils
|
|
81489
|
+
const [key, value] = pair.map(utils.tryWrapperForImpl);
|
|
81411
81490
|
|
|
81412
81491
|
let result;
|
|
81413
81492
|
switch (kind) {
|
|
@@ -81438,9 +81517,9 @@
|
|
|
81438
81517
|
{
|
|
81439
81518
|
let curArg = arguments[0];
|
|
81440
81519
|
if (curArg !== undefined) {
|
|
81441
|
-
if (utils
|
|
81520
|
+
if (utils.isObject(curArg)) {
|
|
81442
81521
|
if (curArg[Symbol.iterator] !== undefined) {
|
|
81443
|
-
if (!utils
|
|
81522
|
+
if (!utils.isObject(curArg)) {
|
|
81444
81523
|
throw new TypeError(
|
|
81445
81524
|
"Failed to construct 'URLSearchParams': parameter 1" + " sequence" + " is not an iterable object."
|
|
81446
81525
|
);
|
|
@@ -81448,7 +81527,7 @@
|
|
|
81448
81527
|
const V = [];
|
|
81449
81528
|
const tmp = curArg;
|
|
81450
81529
|
for (let nextItem of tmp) {
|
|
81451
|
-
if (!utils
|
|
81530
|
+
if (!utils.isObject(nextItem)) {
|
|
81452
81531
|
throw new TypeError(
|
|
81453
81532
|
"Failed to construct 'URLSearchParams': parameter 1" +
|
|
81454
81533
|
" sequence" +
|
|
@@ -81474,7 +81553,7 @@
|
|
|
81474
81553
|
curArg = V;
|
|
81475
81554
|
}
|
|
81476
81555
|
} else {
|
|
81477
|
-
if (!utils
|
|
81556
|
+
if (!utils.isObject(curArg)) {
|
|
81478
81557
|
throw new TypeError(
|
|
81479
81558
|
"Failed to construct 'URLSearchParams': parameter 1" + " record" + " is not an object."
|
|
81480
81559
|
);
|
|
@@ -81605,7 +81684,7 @@
|
|
|
81605
81684
|
});
|
|
81606
81685
|
args.push(curArg);
|
|
81607
81686
|
}
|
|
81608
|
-
return utils
|
|
81687
|
+
return utils.tryWrapperForImpl(this[impl].getAll(...args));
|
|
81609
81688
|
}
|
|
81610
81689
|
|
|
81611
81690
|
has(name) {
|
|
@@ -81710,7 +81789,7 @@
|
|
|
81710
81789
|
let pairs = Array.from(this[impl]);
|
|
81711
81790
|
let i = 0;
|
|
81712
81791
|
while (i < pairs.length) {
|
|
81713
|
-
const [key, value] = pairs[i].map(utils
|
|
81792
|
+
const [key, value] = pairs[i].map(utils.tryWrapperForImpl);
|
|
81714
81793
|
callback.call(thisArg, value, key, this);
|
|
81715
81794
|
pairs = Array.from(this[impl]);
|
|
81716
81795
|
i++;
|
|
@@ -81740,7 +81819,7 @@
|
|
|
81740
81819
|
_mixedIntoPredicates: [],
|
|
81741
81820
|
is(obj) {
|
|
81742
81821
|
if (obj) {
|
|
81743
|
-
if (utils
|
|
81822
|
+
if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) {
|
|
81744
81823
|
return true;
|
|
81745
81824
|
}
|
|
81746
81825
|
for (const isMixedInto of module.exports._mixedIntoPredicates) {
|
|
@@ -81757,7 +81836,7 @@
|
|
|
81757
81836
|
return true;
|
|
81758
81837
|
}
|
|
81759
81838
|
|
|
81760
|
-
const wrapper = utils
|
|
81839
|
+
const wrapper = utils.wrapperForImpl(obj);
|
|
81761
81840
|
for (const isMixedInto of module.exports._mixedIntoPredicates) {
|
|
81762
81841
|
if (isMixedInto(wrapper)) {
|
|
81763
81842
|
return true;
|
|
@@ -81768,14 +81847,14 @@
|
|
|
81768
81847
|
},
|
|
81769
81848
|
convert(obj, { context = "The provided value" } = {}) {
|
|
81770
81849
|
if (module.exports.is(obj)) {
|
|
81771
|
-
return utils
|
|
81850
|
+
return utils.implForWrapper(obj);
|
|
81772
81851
|
}
|
|
81773
81852
|
throw new TypeError(`${context} is not of type 'URLSearchParams'.`);
|
|
81774
81853
|
},
|
|
81775
81854
|
|
|
81776
81855
|
createDefaultIterator(target, kind) {
|
|
81777
81856
|
const iterator = Object.create(IteratorPrototype);
|
|
81778
|
-
Object.defineProperty(iterator, utils
|
|
81857
|
+
Object.defineProperty(iterator, utils.iterInternalSymbol, {
|
|
81779
81858
|
value: { target, kind, index: 0 },
|
|
81780
81859
|
configurable: true
|
|
81781
81860
|
});
|
|
@@ -81790,7 +81869,7 @@
|
|
|
81790
81869
|
createImpl(constructorArgs, privateData) {
|
|
81791
81870
|
let obj = Object.create(URLSearchParams.prototype);
|
|
81792
81871
|
obj = this.setup(obj, constructorArgs, privateData);
|
|
81793
|
-
return utils
|
|
81872
|
+
return utils.implForWrapper(obj);
|
|
81794
81873
|
},
|
|
81795
81874
|
_internalSetup(obj) {},
|
|
81796
81875
|
setup(obj, constructorArgs, privateData) {
|
|
@@ -81804,7 +81883,7 @@
|
|
|
81804
81883
|
configurable: true
|
|
81805
81884
|
});
|
|
81806
81885
|
|
|
81807
|
-
obj[impl][utils
|
|
81886
|
+
obj[impl][utils.wrapperSymbol] = obj;
|
|
81808
81887
|
if (Impl.init) {
|
|
81809
81888
|
Impl.init(obj[impl], privateData);
|
|
81810
81889
|
}
|
|
@@ -81818,17 +81897,19 @@
|
|
|
81818
81897
|
}; // iface
|
|
81819
81898
|
module.exports = iface;
|
|
81820
81899
|
|
|
81821
|
-
const Impl = requireURLSearchParamsImpl();
|
|
81900
|
+
const Impl = requireURLSearchParamsImpl();
|
|
81822
81901
|
} (URLSearchParams));
|
|
81823
81902
|
|
|
81903
|
+
var URLSearchParamsExports = URLSearchParams.exports;
|
|
81904
|
+
|
|
81824
81905
|
var hasRequiredURLImpl;
|
|
81825
81906
|
|
|
81826
81907
|
function requireURLImpl () {
|
|
81827
81908
|
if (hasRequiredURLImpl) return URLImpl;
|
|
81828
81909
|
hasRequiredURLImpl = 1;
|
|
81829
|
-
const usm =
|
|
81910
|
+
const usm = urlStateMachineExports;
|
|
81830
81911
|
const urlencoded$1 = urlencoded;
|
|
81831
|
-
const URLSearchParams
|
|
81912
|
+
const URLSearchParams = URLSearchParamsExports;
|
|
81832
81913
|
|
|
81833
81914
|
URLImpl.implementation = class URLImpl {
|
|
81834
81915
|
constructor(constructorArgs) {
|
|
@@ -81854,7 +81935,7 @@
|
|
|
81854
81935
|
|
|
81855
81936
|
// We cannot invoke the "new URLSearchParams object" algorithm without going through the constructor, which strips
|
|
81856
81937
|
// question mark by default. Therefore the doNotStripQMark hack is used.
|
|
81857
|
-
this._query = URLSearchParams
|
|
81938
|
+
this._query = URLSearchParams.createImpl([query], { doNotStripQMark: true });
|
|
81858
81939
|
this._query._url = this;
|
|
81859
81940
|
}
|
|
81860
81941
|
|
|
@@ -82045,12 +82126,14 @@
|
|
|
82045
82126
|
return URLImpl;
|
|
82046
82127
|
}
|
|
82047
82128
|
|
|
82129
|
+
URL$1.exports;
|
|
82130
|
+
|
|
82048
82131
|
(function (module) {
|
|
82049
82132
|
|
|
82050
82133
|
const conversions = lib;
|
|
82051
|
-
const utils
|
|
82134
|
+
const utils = utilsExports;
|
|
82052
82135
|
|
|
82053
|
-
const impl = utils
|
|
82136
|
+
const impl = utils.implSymbol;
|
|
82054
82137
|
|
|
82055
82138
|
class URL {
|
|
82056
82139
|
constructor(url) {
|
|
@@ -82263,8 +82346,8 @@
|
|
|
82263
82346
|
throw new TypeError("Illegal invocation");
|
|
82264
82347
|
}
|
|
82265
82348
|
|
|
82266
|
-
return utils
|
|
82267
|
-
return utils
|
|
82349
|
+
return utils.getSameObject(this, "searchParams", () => {
|
|
82350
|
+
return utils.tryWrapperForImpl(this[impl]["searchParams"]);
|
|
82268
82351
|
});
|
|
82269
82352
|
}
|
|
82270
82353
|
|
|
@@ -82310,7 +82393,7 @@
|
|
|
82310
82393
|
_mixedIntoPredicates: [],
|
|
82311
82394
|
is(obj) {
|
|
82312
82395
|
if (obj) {
|
|
82313
|
-
if (utils
|
|
82396
|
+
if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) {
|
|
82314
82397
|
return true;
|
|
82315
82398
|
}
|
|
82316
82399
|
for (const isMixedInto of module.exports._mixedIntoPredicates) {
|
|
@@ -82327,7 +82410,7 @@
|
|
|
82327
82410
|
return true;
|
|
82328
82411
|
}
|
|
82329
82412
|
|
|
82330
|
-
const wrapper = utils
|
|
82413
|
+
const wrapper = utils.wrapperForImpl(obj);
|
|
82331
82414
|
for (const isMixedInto of module.exports._mixedIntoPredicates) {
|
|
82332
82415
|
if (isMixedInto(wrapper)) {
|
|
82333
82416
|
return true;
|
|
@@ -82338,7 +82421,7 @@
|
|
|
82338
82421
|
},
|
|
82339
82422
|
convert(obj, { context = "The provided value" } = {}) {
|
|
82340
82423
|
if (module.exports.is(obj)) {
|
|
82341
|
-
return utils
|
|
82424
|
+
return utils.implForWrapper(obj);
|
|
82342
82425
|
}
|
|
82343
82426
|
throw new TypeError(`${context} is not of type 'URL'.`);
|
|
82344
82427
|
},
|
|
@@ -82351,7 +82434,7 @@
|
|
|
82351
82434
|
createImpl(constructorArgs, privateData) {
|
|
82352
82435
|
let obj = Object.create(URL.prototype);
|
|
82353
82436
|
obj = this.setup(obj, constructorArgs, privateData);
|
|
82354
|
-
return utils
|
|
82437
|
+
return utils.implForWrapper(obj);
|
|
82355
82438
|
},
|
|
82356
82439
|
_internalSetup(obj) {},
|
|
82357
82440
|
setup(obj, constructorArgs, privateData) {
|
|
@@ -82365,7 +82448,7 @@
|
|
|
82365
82448
|
configurable: true
|
|
82366
82449
|
});
|
|
82367
82450
|
|
|
82368
|
-
obj[impl][utils
|
|
82451
|
+
obj[impl][utils.wrapperSymbol] = obj;
|
|
82369
82452
|
if (Impl.init) {
|
|
82370
82453
|
Impl.init(obj[impl], privateData);
|
|
82371
82454
|
}
|
|
@@ -82379,21 +82462,23 @@
|
|
|
82379
82462
|
}; // iface
|
|
82380
82463
|
module.exports = iface;
|
|
82381
82464
|
|
|
82382
|
-
const Impl = requireURLImpl();
|
|
82465
|
+
const Impl = requireURLImpl();
|
|
82383
82466
|
} (URL$1));
|
|
82384
82467
|
|
|
82385
|
-
|
|
82386
|
-
publicApi.URLSearchParams = URLSearchParams.exports.interface;
|
|
82468
|
+
var URLExports = URL$1.exports;
|
|
82387
82469
|
|
|
82388
|
-
publicApi.
|
|
82389
|
-
publicApi.
|
|
82390
|
-
|
|
82391
|
-
publicApi.
|
|
82392
|
-
publicApi.
|
|
82393
|
-
publicApi.
|
|
82394
|
-
publicApi.
|
|
82395
|
-
publicApi.
|
|
82396
|
-
publicApi.
|
|
82470
|
+
publicApi.URL = URLExports.interface;
|
|
82471
|
+
publicApi.URLSearchParams = URLSearchParamsExports.interface;
|
|
82472
|
+
|
|
82473
|
+
publicApi.parseURL = urlStateMachineExports.parseURL;
|
|
82474
|
+
publicApi.basicURLParse = urlStateMachineExports.basicURLParse;
|
|
82475
|
+
publicApi.serializeURL = urlStateMachineExports.serializeURL;
|
|
82476
|
+
publicApi.serializeHost = urlStateMachineExports.serializeHost;
|
|
82477
|
+
publicApi.serializeInteger = urlStateMachineExports.serializeInteger;
|
|
82478
|
+
publicApi.serializeURLOrigin = urlStateMachineExports.serializeURLOrigin;
|
|
82479
|
+
publicApi.setTheUsername = urlStateMachineExports.setTheUsername;
|
|
82480
|
+
publicApi.setThePassword = urlStateMachineExports.setThePassword;
|
|
82481
|
+
publicApi.cannotHaveAUsernamePasswordPort = urlStateMachineExports.cannotHaveAUsernamePasswordPort;
|
|
82397
82482
|
|
|
82398
82483
|
publicApi.percentDecode = urlencoded.percentDecode;
|
|
82399
82484
|
|
|
@@ -82869,7 +82954,7 @@
|
|
|
82869
82954
|
* element is O(1). Removing elements from the set is not supported. Only
|
|
82870
82955
|
* strings are supported for membership.
|
|
82871
82956
|
*/
|
|
82872
|
-
|
|
82957
|
+
let ArraySet$2 = class ArraySet {
|
|
82873
82958
|
constructor() {
|
|
82874
82959
|
this._array = [];
|
|
82875
82960
|
this._set = new Map();
|
|
@@ -82879,7 +82964,7 @@
|
|
|
82879
82964
|
* Static method for creating ArraySet instances from an existing array.
|
|
82880
82965
|
*/
|
|
82881
82966
|
static fromArray(aArray, aAllowDuplicates) {
|
|
82882
|
-
const set = new ArraySet
|
|
82967
|
+
const set = new ArraySet();
|
|
82883
82968
|
for (let i = 0, len = aArray.length; i < len; i++) {
|
|
82884
82969
|
set.add(aArray[i], aAllowDuplicates);
|
|
82885
82970
|
}
|
|
@@ -82954,7 +83039,7 @@
|
|
|
82954
83039
|
toArray() {
|
|
82955
83040
|
return this._array.slice();
|
|
82956
83041
|
}
|
|
82957
|
-
}
|
|
83042
|
+
};
|
|
82958
83043
|
arraySet.ArraySet = ArraySet$2;
|
|
82959
83044
|
|
|
82960
83045
|
var mappingList = {};
|
|
@@ -82988,7 +83073,7 @@
|
|
|
82988
83073
|
* performance conscious manner. It trades a negligible overhead in general
|
|
82989
83074
|
* case for a large speedup in case of mappings being added in order.
|
|
82990
83075
|
*/
|
|
82991
|
-
|
|
83076
|
+
let MappingList$1 = class MappingList {
|
|
82992
83077
|
constructor() {
|
|
82993
83078
|
this._array = [];
|
|
82994
83079
|
this._sorted = true;
|
|
@@ -83037,7 +83122,7 @@
|
|
|
83037
83122
|
}
|
|
83038
83123
|
return this._array;
|
|
83039
83124
|
}
|
|
83040
|
-
}
|
|
83125
|
+
};
|
|
83041
83126
|
|
|
83042
83127
|
mappingList.MappingList = MappingList$1;
|
|
83043
83128
|
|
|
@@ -83062,7 +83147,7 @@
|
|
|
83062
83147
|
* - file: The filename of the generated source.
|
|
83063
83148
|
* - sourceRoot: A root for all relative URLs in this source map.
|
|
83064
83149
|
*/
|
|
83065
|
-
|
|
83150
|
+
let SourceMapGenerator$1 = class SourceMapGenerator {
|
|
83066
83151
|
constructor(aArgs) {
|
|
83067
83152
|
if (!aArgs) {
|
|
83068
83153
|
aArgs = {};
|
|
@@ -83083,7 +83168,7 @@
|
|
|
83083
83168
|
*/
|
|
83084
83169
|
static fromSourceMap(aSourceMapConsumer) {
|
|
83085
83170
|
const sourceRoot = aSourceMapConsumer.sourceRoot;
|
|
83086
|
-
const generator = new SourceMapGenerator
|
|
83171
|
+
const generator = new SourceMapGenerator({
|
|
83087
83172
|
file: aSourceMapConsumer.file,
|
|
83088
83173
|
sourceRoot
|
|
83089
83174
|
});
|
|
@@ -83445,7 +83530,7 @@
|
|
|
83445
83530
|
toString() {
|
|
83446
83531
|
return JSON.stringify(this.toJSON());
|
|
83447
83532
|
}
|
|
83448
|
-
}
|
|
83533
|
+
};
|
|
83449
83534
|
|
|
83450
83535
|
SourceMapGenerator$1.prototype._version = 3;
|
|
83451
83536
|
sourceMapGenerator.SourceMapGenerator = SourceMapGenerator$1;
|
|
@@ -83560,7 +83645,7 @@
|
|
|
83560
83645
|
}
|
|
83561
83646
|
|
|
83562
83647
|
return index;
|
|
83563
|
-
};
|
|
83648
|
+
};
|
|
83564
83649
|
} (binarySearch$1));
|
|
83565
83650
|
|
|
83566
83651
|
var readWasmBrowser = {exports: {}};
|
|
@@ -83586,7 +83671,9 @@
|
|
|
83586
83671
|
mappingsWasm = input;
|
|
83587
83672
|
};
|
|
83588
83673
|
|
|
83589
|
-
|
|
83674
|
+
var readWasmBrowserExports = readWasmBrowser.exports;
|
|
83675
|
+
|
|
83676
|
+
const readWasm$1 = readWasmBrowserExports;
|
|
83590
83677
|
|
|
83591
83678
|
/**
|
|
83592
83679
|
* Provide the JIT with a nice shape / hidden class.
|
|
@@ -83705,7 +83792,7 @@
|
|
|
83705
83792
|
const util = util$3;
|
|
83706
83793
|
const binarySearch = binarySearch$1;
|
|
83707
83794
|
const ArraySet = arraySet.ArraySet;
|
|
83708
|
-
const readWasm =
|
|
83795
|
+
const readWasm = readWasmBrowserExports;
|
|
83709
83796
|
const wasm = wasm$1;
|
|
83710
83797
|
|
|
83711
83798
|
const INTERNAL = Symbol("smcInternal");
|
|
@@ -84911,9 +84998,11 @@
|
|
|
84911
84998
|
exports.generateMapFileComment = function (file, options) {
|
|
84912
84999
|
var data = 'sourceMappingURL=' + file;
|
|
84913
85000
|
return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
|
|
84914
|
-
};
|
|
85001
|
+
};
|
|
84915
85002
|
} (convertSourceMap));
|
|
84916
85003
|
|
|
85004
|
+
var convert = /*@__PURE__*/getDefaultExportFromCjs(convertSourceMap);
|
|
85005
|
+
|
|
84917
85006
|
function identifier(name) {
|
|
84918
85007
|
return { type: 'Identifier', name }
|
|
84919
85008
|
}
|
|
@@ -85102,6 +85191,7 @@
|
|
|
85102
85191
|
};
|
|
85103
85192
|
const keywords = new Set(reservedWords.keyword);
|
|
85104
85193
|
const reservedWordsStrictSet = new Set(reservedWords.strict);
|
|
85194
|
+
new Set(reservedWords.strictBind);
|
|
85105
85195
|
|
|
85106
85196
|
function isReservedWord(word, inModule) {
|
|
85107
85197
|
return inModule && word === 'await' || word === 'enum'
|
|
@@ -85265,7 +85355,7 @@
|
|
|
85265
85355
|
if (func.name === 'define') {
|
|
85266
85356
|
let index = 0;
|
|
85267
85357
|
let arg = args[index];
|
|
85268
|
-
let name, deps;
|
|
85358
|
+
let name, deps, params;
|
|
85269
85359
|
if (arg.type === 'Literal') {
|
|
85270
85360
|
if (length <= ++index || typeof arg.value !== 'string') return false
|
|
85271
85361
|
name = arg;
|
|
@@ -85277,21 +85367,91 @@
|
|
|
85277
85367
|
arg = args[index];
|
|
85278
85368
|
}
|
|
85279
85369
|
if (arg.type === 'FunctionExpression' || arg.type === 'ArrowFunctionExpression') {
|
|
85280
|
-
|
|
85370
|
+
if (!deps) {
|
|
85371
|
+
({ params, deps } = detectCjsDeps(arg) || {});
|
|
85372
|
+
} else {
|
|
85373
|
+
params = arg.params;
|
|
85374
|
+
}
|
|
85375
|
+
return { namespace, func, name, deps, params, factory: arg }
|
|
85281
85376
|
}
|
|
85282
85377
|
return arg.type === 'ObjectExpression' && { namespace, func, name, deps, output: arg }
|
|
85283
85378
|
}
|
|
85284
85379
|
|
|
85285
|
-
// require([deps], success, error)
|
|
85380
|
+
// require([deps], success, [error])
|
|
85286
85381
|
if (func.name === 'require') {
|
|
85287
|
-
const
|
|
85288
|
-
if (
|
|
85382
|
+
const arg = args[0];
|
|
85383
|
+
if (arg.type === 'ArrayExpression') {
|
|
85384
|
+
if (length < 2) return false
|
|
85289
85385
|
const body = args[1];
|
|
85290
85386
|
if (body.type === 'FunctionExpression' || body.type === 'ArrowFunctionExpression') {
|
|
85291
|
-
return { func, deps, body }
|
|
85387
|
+
return { func, deps: arg, params: body.params, body }
|
|
85388
|
+
}
|
|
85389
|
+
} else if (arg.type === 'FunctionExpression' || arg.type === 'ArrowFunctionExpression') {
|
|
85390
|
+
const { params, deps } = detectCjsDeps(arg) || {};
|
|
85391
|
+
return { func, params, deps, body: arg }
|
|
85392
|
+
}
|
|
85393
|
+
}
|
|
85394
|
+
}
|
|
85395
|
+
|
|
85396
|
+
// Checks if the expression parameters can support CJS-like require calls
|
|
85397
|
+
// in the expression body.
|
|
85398
|
+
function isCjsExpression(expr) {
|
|
85399
|
+
const { params } = expr;
|
|
85400
|
+
if (!params.length) return false
|
|
85401
|
+
const param = params[0];
|
|
85402
|
+
return param.type === 'Identifier' && param.name === 'require'
|
|
85403
|
+
}
|
|
85404
|
+
|
|
85405
|
+
// Detects variable declarations with CJS-like require calls and such require
|
|
85406
|
+
// calls on the first level of the expression body.
|
|
85407
|
+
function detectCjsDeps(expr) {
|
|
85408
|
+
if (!isCjsExpression(expr)) return
|
|
85409
|
+
const params = [];
|
|
85410
|
+
const namedDeps = [];
|
|
85411
|
+
const unnamedDeps = [];
|
|
85412
|
+
for (const statement of expr.body.body || []) {
|
|
85413
|
+
const { type } = statement;
|
|
85414
|
+
if (type === 'VariableDeclaration') {
|
|
85415
|
+
for (const declarator of statement.declarations) {
|
|
85416
|
+
const { id } = declarator;
|
|
85417
|
+
if (id && id.type === 'Identifier') {
|
|
85418
|
+
const { init } = declarator;
|
|
85419
|
+
if (init && init.type === 'CallExpression') {
|
|
85420
|
+
const { callee } = init;
|
|
85421
|
+
if (callee.type === 'Identifier' && callee.name === 'require') {
|
|
85422
|
+
const { arguments: args } = init;
|
|
85423
|
+
if (args.length === 1) {
|
|
85424
|
+
const arg = args[0];
|
|
85425
|
+
if (arg.type === 'Literal') {
|
|
85426
|
+
params.push(id);
|
|
85427
|
+
namedDeps.push(arg);
|
|
85428
|
+
}
|
|
85429
|
+
}
|
|
85430
|
+
}
|
|
85431
|
+
}
|
|
85432
|
+
}
|
|
85433
|
+
}
|
|
85434
|
+
} else if (type === 'ExpressionStatement') {
|
|
85435
|
+
const { expression } = statement;
|
|
85436
|
+
if (expression.type === 'CallExpression') {
|
|
85437
|
+
const { callee } = expression;
|
|
85438
|
+
if (callee.type === 'Identifier' && callee.name === 'require') {
|
|
85439
|
+
const { arguments: args } = expression;
|
|
85440
|
+
if (args.length === 1) {
|
|
85441
|
+
const arg = args[0];
|
|
85442
|
+
if (arg.type === 'Literal') {
|
|
85443
|
+
unnamedDeps.push(arg);
|
|
85444
|
+
}
|
|
85445
|
+
}
|
|
85446
|
+
}
|
|
85292
85447
|
}
|
|
85293
85448
|
}
|
|
85294
85449
|
}
|
|
85450
|
+
let deps = [...namedDeps, ...unnamedDeps];
|
|
85451
|
+
if (deps.length) {
|
|
85452
|
+
deps = { type: 'ArrayExpression', elements: deps };
|
|
85453
|
+
return { params, deps }
|
|
85454
|
+
}
|
|
85295
85455
|
}
|
|
85296
85456
|
|
|
85297
85457
|
// Detects if a program contains statements calling define or require function.
|
|
@@ -85768,7 +85928,7 @@
|
|
|
85768
85928
|
mapGenerator.setSourceContent(file, text);
|
|
85769
85929
|
}
|
|
85770
85930
|
if (sourceMap.inline) {
|
|
85771
|
-
code +=
|
|
85931
|
+
code += convert.fromObject(mapGenerator.toJSON()).toComment();
|
|
85772
85932
|
} else {
|
|
85773
85933
|
map = mapGenerator.toJSON();
|
|
85774
85934
|
}
|
|
@@ -85782,6 +85942,7 @@
|
|
|
85782
85942
|
|
|
85783
85943
|
/* global module */
|
|
85784
85944
|
|
|
85945
|
+
|
|
85785
85946
|
const {
|
|
85786
85947
|
// Allow using a different plugin alias than `esm` in the source code.
|
|
85787
85948
|
pluginName,
|