meriyah 4.4.3 → 4.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +1 -7
- package/dist/meriyah.amd.js +107 -116
- package/dist/meriyah.amd.min.js +1 -1
- package/dist/meriyah.cjs +107 -116
- package/dist/meriyah.cjs.js +107 -116
- package/dist/meriyah.cjs.min.js +1 -1
- package/dist/meriyah.esm.js +107 -116
- package/dist/meriyah.esm.min.js +1 -1
- package/dist/meriyah.esm.min.mjs +1 -1
- package/dist/meriyah.esm.mjs +107 -116
- package/dist/meriyah.iife.js +107 -116
- package/dist/meriyah.iife.min.js +1 -1
- package/dist/meriyah.min.cjs +1 -1
- package/dist/meriyah.system.js +107 -116
- package/dist/meriyah.system.min.js +1 -1
- package/dist/meriyah.umd.cjs +107 -116
- package/dist/meriyah.umd.es5.js +107 -116
- package/dist/meriyah.umd.es5.min.js +1 -1
- package/dist/meriyah.umd.js +107 -116
- package/dist/meriyah.umd.min.cjs +1 -1
- package/dist/meriyah.umd.min.js +1 -1
- package/dist/src/common.d.ts +3 -5
- package/dist/src/common.d.ts.map +1 -1
- package/dist/src/parser.d.ts +4 -6
- package/dist/src/parser.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common.ts +4 -7
- package/src/parser.ts +86 -142
package/dist/meriyah.amd.js
CHANGED
|
@@ -1526,7 +1526,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1526
1526
|
return 122;
|
|
1527
1527
|
}
|
|
1528
1528
|
if ((token & 20480) === 20480) {
|
|
1529
|
-
if (context &
|
|
1529
|
+
if (context & 268435456 && (context & 8192) === 0) {
|
|
1530
1530
|
return token;
|
|
1531
1531
|
}
|
|
1532
1532
|
else {
|
|
@@ -1535,12 +1535,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1535
1535
|
}
|
|
1536
1536
|
return 143483;
|
|
1537
1537
|
}
|
|
1538
|
-
if (context &
|
|
1538
|
+
if (context & 268435456 &&
|
|
1539
1539
|
(context & 8192) === 0 &&
|
|
1540
1540
|
(token & 20480) === 20480)
|
|
1541
1541
|
return token;
|
|
1542
1542
|
if (token === 241773) {
|
|
1543
|
-
return context &
|
|
1543
|
+
return context & 268435456
|
|
1544
1544
|
? 143483
|
|
1545
1545
|
: context & 2097152
|
|
1546
1546
|
? 121
|
|
@@ -4359,10 +4359,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4359
4359
|
return parser.token;
|
|
4360
4360
|
}
|
|
4361
4361
|
|
|
4362
|
-
function matchOrInsertSemicolon(parser, context
|
|
4362
|
+
function matchOrInsertSemicolon(parser, context) {
|
|
4363
4363
|
if ((parser.flags & 1) === 0 &&
|
|
4364
|
-
(parser.token & 1048576) !== 1048576
|
|
4365
|
-
!specDeviation) {
|
|
4364
|
+
(parser.token & 1048576) !== 1048576) {
|
|
4366
4365
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
4367
4366
|
}
|
|
4368
4367
|
if (!consumeOpt(parser, context, 1074790417)) {
|
|
@@ -4754,7 +4753,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4754
4753
|
if (options.ranges)
|
|
4755
4754
|
context |= 2;
|
|
4756
4755
|
if (options.uniqueKeyInPattern)
|
|
4757
|
-
context |=
|
|
4756
|
+
context |= 536870912;
|
|
4758
4757
|
if (options.lexical)
|
|
4759
4758
|
context |= 64;
|
|
4760
4759
|
if (options.webcompat)
|
|
@@ -4771,10 +4770,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4771
4770
|
context |= 1024;
|
|
4772
4771
|
if (options.jsx)
|
|
4773
4772
|
context |= 16;
|
|
4774
|
-
if (options.identifierPattern)
|
|
4775
|
-
context |= 268435456;
|
|
4776
|
-
if (options.specDeviation)
|
|
4777
|
-
context |= 536870912;
|
|
4778
4773
|
if (options.source)
|
|
4779
4774
|
sourceFile = options.source;
|
|
4780
4775
|
if (options.onComment != null) {
|
|
@@ -4826,7 +4821,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4826
4821
|
return node;
|
|
4827
4822
|
}
|
|
4828
4823
|
function parseStatementList(parser, context, scope) {
|
|
4829
|
-
nextToken(parser, context | 32768 |
|
|
4824
|
+
nextToken(parser, context | 32768 | 268435456);
|
|
4830
4825
|
const statements = [];
|
|
4831
4826
|
while (parser.token === 134283267) {
|
|
4832
4827
|
const { index, tokenPos, tokenValue, linePos, colPos, token } = parser;
|
|
@@ -4959,14 +4954,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4959
4954
|
let expr;
|
|
4960
4955
|
switch (token) {
|
|
4961
4956
|
case 241739:
|
|
4962
|
-
expr = parseIdentifier(parser, context
|
|
4957
|
+
expr = parseIdentifier(parser, context);
|
|
4963
4958
|
if (context & 1024)
|
|
4964
4959
|
report(parser, 83);
|
|
4965
4960
|
if (parser.token === 69271571)
|
|
4966
4961
|
report(parser, 82);
|
|
4967
4962
|
break;
|
|
4968
4963
|
default:
|
|
4969
|
-
expr = parsePrimaryExpression(parser, context, 2, 0, 1, 0,
|
|
4964
|
+
expr = parsePrimaryExpression(parser, context, 2, 0, 1, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
4970
4965
|
}
|
|
4971
4966
|
if (token & 143360 && parser.token === 21) {
|
|
4972
4967
|
return parseLabelledStatement(parser, context, scope, origin, labels, tokenValue, expr, token, allowFuncDecl, start, line, column);
|
|
@@ -5028,7 +5023,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5028
5023
|
}
|
|
5029
5024
|
function parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, allowFuncDecl, start, line, column) {
|
|
5030
5025
|
const { token, tokenValue } = parser;
|
|
5031
|
-
let expr = parseIdentifier(parser, context
|
|
5026
|
+
let expr = parseIdentifier(parser, context);
|
|
5032
5027
|
if (parser.token === 21) {
|
|
5033
5028
|
return parseLabelledStatement(parser, context, scope, origin, labels, tokenValue, expr, token, 1, start, line, column);
|
|
5034
5029
|
}
|
|
@@ -5196,7 +5191,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5196
5191
|
let label = null;
|
|
5197
5192
|
if ((parser.flags & 1) === 0 && parser.token & 143360) {
|
|
5198
5193
|
const { tokenValue } = parser;
|
|
5199
|
-
label = parseIdentifier(parser, context | 32768
|
|
5194
|
+
label = parseIdentifier(parser, context | 32768);
|
|
5200
5195
|
if (!isValidLabel(parser, labels, tokenValue, 1))
|
|
5201
5196
|
report(parser, 135, tokenValue);
|
|
5202
5197
|
}
|
|
@@ -5211,7 +5206,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5211
5206
|
let label = null;
|
|
5212
5207
|
if ((parser.flags & 1) === 0 && parser.token & 143360) {
|
|
5213
5208
|
const { tokenValue } = parser;
|
|
5214
|
-
label = parseIdentifier(parser, context | 32768
|
|
5209
|
+
label = parseIdentifier(parser, context | 32768);
|
|
5215
5210
|
if (!isValidLabel(parser, labels, tokenValue, 0))
|
|
5216
5211
|
report(parser, 135, tokenValue);
|
|
5217
5212
|
}
|
|
@@ -5322,7 +5317,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5322
5317
|
}
|
|
5323
5318
|
function parseLetIdentOrVarDeclarationStatement(parser, context, scope, origin, start, line, column) {
|
|
5324
5319
|
const { token, tokenValue } = parser;
|
|
5325
|
-
let expr = parseIdentifier(parser, context
|
|
5320
|
+
let expr = parseIdentifier(parser, context);
|
|
5326
5321
|
if (parser.token & (143360 | 2097152)) {
|
|
5327
5322
|
const declarations = parseVariableDeclarationList(parser, context, scope, 8, 0);
|
|
5328
5323
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
@@ -5392,7 +5387,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5392
5387
|
const id = parseBindingPattern(parser, context, scope, kind, origin, tokenPos, linePos, colPos);
|
|
5393
5388
|
if (parser.token === 1077936157) {
|
|
5394
5389
|
nextToken(parser, context | 32768);
|
|
5395
|
-
init = parseExpression(parser, context, 1, 0,
|
|
5390
|
+
init = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5396
5391
|
if (origin & 32 || (token & 2097152) === 0) {
|
|
5397
5392
|
if (parser.token === 274549 ||
|
|
5398
5393
|
(parser.token === 8738868 &&
|
|
@@ -5427,7 +5422,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5427
5422
|
const { token, tokenPos, linePos, colPos } = parser;
|
|
5428
5423
|
if (isVarDecl) {
|
|
5429
5424
|
if (token === 241739) {
|
|
5430
|
-
init = parseIdentifier(parser, context
|
|
5425
|
+
init = parseIdentifier(parser, context);
|
|
5431
5426
|
if (parser.token & (143360 | 2097152)) {
|
|
5432
5427
|
if (parser.token === 8738868) {
|
|
5433
5428
|
if (context & 1024)
|
|
@@ -5495,7 +5490,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5495
5490
|
report(parser, 78, forAwait ? 'await' : 'of');
|
|
5496
5491
|
reinterpretToPattern(parser, init);
|
|
5497
5492
|
nextToken(parser, context | 32768);
|
|
5498
|
-
right = parseExpression(parser, context, 1, 0,
|
|
5493
|
+
right = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5499
5494
|
consume(parser, context | 32768, 16);
|
|
5500
5495
|
const body = parseIterationStatementBody(parser, context, scope, labels);
|
|
5501
5496
|
return finishNode(parser, context, start, line, column, {
|
|
@@ -5555,7 +5550,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5555
5550
|
report(parser, 116);
|
|
5556
5551
|
if (scope)
|
|
5557
5552
|
addBlockName(parser, context, scope, parser.tokenValue, 8, 0);
|
|
5558
|
-
return parseIdentifier(parser, context
|
|
5553
|
+
return parseIdentifier(parser, context);
|
|
5559
5554
|
}
|
|
5560
5555
|
function parseImportDeclaration(parser, context, scope) {
|
|
5561
5556
|
const start = parser.tokenPos;
|
|
@@ -5628,7 +5623,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5628
5623
|
});
|
|
5629
5624
|
}
|
|
5630
5625
|
function parseModuleSpecifier(parser, context) {
|
|
5631
|
-
consumeOpt(parser, context, 12404)
|
|
5626
|
+
if (!consumeOpt(parser, context, 12404)) {
|
|
5627
|
+
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
5628
|
+
}
|
|
5632
5629
|
if (parser.token !== 134283267)
|
|
5633
5630
|
report(parser, 103, 'Import');
|
|
5634
5631
|
return parseLiteral(parser, context);
|
|
@@ -5637,7 +5634,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5637
5634
|
nextToken(parser, context);
|
|
5638
5635
|
while (parser.token & 143360) {
|
|
5639
5636
|
let { token, tokenValue, tokenPos, linePos, colPos } = parser;
|
|
5640
|
-
const imported = parseIdentifier(parser, context
|
|
5637
|
+
const imported = parseIdentifier(parser, context);
|
|
5641
5638
|
let local;
|
|
5642
5639
|
if (consumeOpt(parser, context, 77934)) {
|
|
5643
5640
|
if ((parser.token & 134217728) === 134217728 || parser.token === 18) {
|
|
@@ -5647,7 +5644,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5647
5644
|
validateBindingIdentifier(parser, context, 16, parser.token, 0);
|
|
5648
5645
|
}
|
|
5649
5646
|
tokenValue = parser.tokenValue;
|
|
5650
|
-
local = parseIdentifier(parser, context
|
|
5647
|
+
local = parseIdentifier(parser, context);
|
|
5651
5648
|
}
|
|
5652
5649
|
else {
|
|
5653
5650
|
validateBindingIdentifier(parser, context, 16, token, 0);
|
|
@@ -5707,7 +5704,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5707
5704
|
break;
|
|
5708
5705
|
case 209007:
|
|
5709
5706
|
const { tokenPos, linePos, colPos } = parser;
|
|
5710
|
-
declaration = parseIdentifier(parser, context
|
|
5707
|
+
declaration = parseIdentifier(parser, context);
|
|
5711
5708
|
const { flags } = parser;
|
|
5712
5709
|
if ((flags & 1) === 0) {
|
|
5713
5710
|
if (parser.token === 86106) {
|
|
@@ -5722,14 +5719,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5722
5719
|
else if (parser.token & 143360) {
|
|
5723
5720
|
if (scope)
|
|
5724
5721
|
scope = createArrowHeadParsingScope(parser, context, parser.tokenValue);
|
|
5725
|
-
declaration = parseIdentifier(parser, context
|
|
5722
|
+
declaration = parseIdentifier(parser, context);
|
|
5726
5723
|
declaration = parseArrowFunctionExpression(parser, context, scope, [declaration], 1, tokenPos, linePos, colPos);
|
|
5727
5724
|
}
|
|
5728
5725
|
}
|
|
5729
5726
|
}
|
|
5730
5727
|
break;
|
|
5731
5728
|
default:
|
|
5732
|
-
declaration = parseExpression(parser, context, 1, 0,
|
|
5729
|
+
declaration = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5733
5730
|
matchOrInsertSemicolon(parser, context | 32768);
|
|
5734
5731
|
}
|
|
5735
5732
|
if (scope)
|
|
@@ -5747,7 +5744,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5747
5744
|
if (isNamedDeclaration) {
|
|
5748
5745
|
if (scope)
|
|
5749
5746
|
declareUnboundVariable(parser, parser.tokenValue);
|
|
5750
|
-
exported = parseIdentifier(parser, context
|
|
5747
|
+
exported = parseIdentifier(parser, context);
|
|
5751
5748
|
}
|
|
5752
5749
|
consume(parser, context, 12404);
|
|
5753
5750
|
if (parser.token !== 134283267)
|
|
@@ -5766,7 +5763,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5766
5763
|
const tmpExportedBindings = [];
|
|
5767
5764
|
while (parser.token & 143360) {
|
|
5768
5765
|
const { tokenPos, tokenValue, linePos, colPos } = parser;
|
|
5769
|
-
const local = parseIdentifier(parser, context
|
|
5766
|
+
const local = parseIdentifier(parser, context);
|
|
5770
5767
|
let exported;
|
|
5771
5768
|
if (parser.token === 77934) {
|
|
5772
5769
|
nextToken(parser, context);
|
|
@@ -5777,7 +5774,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5777
5774
|
tmpExportedNames.push(parser.tokenValue);
|
|
5778
5775
|
tmpExportedBindings.push(tokenValue);
|
|
5779
5776
|
}
|
|
5780
|
-
exported = parseIdentifier(parser, context
|
|
5777
|
+
exported = parseIdentifier(parser, context);
|
|
5781
5778
|
}
|
|
5782
5779
|
else {
|
|
5783
5780
|
if (scope) {
|
|
@@ -5851,15 +5848,15 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5851
5848
|
source
|
|
5852
5849
|
});
|
|
5853
5850
|
}
|
|
5854
|
-
function parseExpression(parser, context, canAssign,
|
|
5855
|
-
let expr = parsePrimaryExpression(parser, context, 2, 0, canAssign,
|
|
5851
|
+
function parseExpression(parser, context, canAssign, inGroup, start, line, column) {
|
|
5852
|
+
let expr = parsePrimaryExpression(parser, context, 2, 0, canAssign, inGroup, 1, start, line, column);
|
|
5856
5853
|
expr = parseMemberOrUpdateExpression(parser, context, expr, inGroup, 0, start, line, column);
|
|
5857
5854
|
return parseAssignmentExpression(parser, context, inGroup, 0, start, line, column, expr);
|
|
5858
5855
|
}
|
|
5859
5856
|
function parseSequenceExpression(parser, context, inGroup, start, line, column, expr) {
|
|
5860
5857
|
const expressions = [expr];
|
|
5861
5858
|
while (consumeOpt(parser, context | 32768, 18)) {
|
|
5862
|
-
expressions.push(parseExpression(parser, context, 1,
|
|
5859
|
+
expressions.push(parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
|
|
5863
5860
|
}
|
|
5864
5861
|
return finishNode(parser, context, start, line, column, {
|
|
5865
5862
|
type: 'SequenceExpression',
|
|
@@ -5867,7 +5864,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5867
5864
|
});
|
|
5868
5865
|
}
|
|
5869
5866
|
function parseExpressions(parser, context, inGroup, canAssign, start, line, column) {
|
|
5870
|
-
const expr = parseExpression(parser, context, canAssign,
|
|
5867
|
+
const expr = parseExpression(parser, context, canAssign, inGroup, start, line, column);
|
|
5871
5868
|
return parser.token === 18
|
|
5872
5869
|
? parseSequenceExpression(parser, context, inGroup, start, line, column, expr)
|
|
5873
5870
|
: expr;
|
|
@@ -5882,7 +5879,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5882
5879
|
reinterpretToPattern(parser, left);
|
|
5883
5880
|
}
|
|
5884
5881
|
nextToken(parser, context | 32768);
|
|
5885
|
-
const right = parseExpression(parser, context, 1,
|
|
5882
|
+
const right = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5886
5883
|
parser.assignable = 2;
|
|
5887
5884
|
return finishNode(parser, context, start, line, column, isPattern
|
|
5888
5885
|
? {
|
|
@@ -5908,7 +5905,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5908
5905
|
function parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, start, line, column, left) {
|
|
5909
5906
|
const { token } = parser;
|
|
5910
5907
|
nextToken(parser, context | 32768);
|
|
5911
|
-
const right = parseExpression(parser, context, 1,
|
|
5908
|
+
const right = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5912
5909
|
left = finishNode(parser, context, start, line, column, isPattern
|
|
5913
5910
|
? {
|
|
5914
5911
|
type: 'AssignmentPattern',
|
|
@@ -5925,10 +5922,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5925
5922
|
return left;
|
|
5926
5923
|
}
|
|
5927
5924
|
function parseConditionalExpression(parser, context, test, start, line, column) {
|
|
5928
|
-
const consequent = parseExpression(parser, (context | 134217728) ^ 134217728, 1, 0,
|
|
5925
|
+
const consequent = parseExpression(parser, (context | 134217728) ^ 134217728, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5929
5926
|
consume(parser, context | 32768, 21);
|
|
5930
5927
|
parser.assignable = 1;
|
|
5931
|
-
const alternate = parseExpression(parser, context, 1, 0,
|
|
5928
|
+
const alternate = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
5932
5929
|
parser.assignable = 2;
|
|
5933
5930
|
return finishNode(parser, context, start, line, column, {
|
|
5934
5931
|
type: 'ConditionalExpression',
|
|
@@ -5986,9 +5983,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5986
5983
|
prefix: true
|
|
5987
5984
|
});
|
|
5988
5985
|
}
|
|
5989
|
-
function parseAsyncExpression(parser, context, inGroup, isLHS, canAssign,
|
|
5986
|
+
function parseAsyncExpression(parser, context, inGroup, isLHS, canAssign, inNew, start, line, column) {
|
|
5990
5987
|
const { token } = parser;
|
|
5991
|
-
const expr = parseIdentifier(parser, context
|
|
5988
|
+
const expr = parseIdentifier(parser, context);
|
|
5992
5989
|
const { flags } = parser;
|
|
5993
5990
|
if ((flags & 1) === 0) {
|
|
5994
5991
|
if (parser.token === 86106) {
|
|
@@ -6028,7 +6025,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6028
6025
|
if ((parser.flags & 1) === 0) {
|
|
6029
6026
|
delegate = consumeOpt(parser, context | 32768, 8457014);
|
|
6030
6027
|
if (parser.token & (12288 | 65536) || delegate) {
|
|
6031
|
-
argument = parseExpression(parser, context, 1, 0,
|
|
6028
|
+
argument = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6032
6029
|
}
|
|
6033
6030
|
}
|
|
6034
6031
|
parser.assignable = 2;
|
|
@@ -6153,7 +6150,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6153
6150
|
return finishNode(parser, context, start, line, column, { type: 'Super' });
|
|
6154
6151
|
}
|
|
6155
6152
|
function parseLeftHandSideExpression(parser, context, canAssign, inGroup, isLHS, start, line, column) {
|
|
6156
|
-
const expression = parsePrimaryExpression(parser, context, 2, 0, canAssign,
|
|
6153
|
+
const expression = parsePrimaryExpression(parser, context, 2, 0, canAssign, inGroup, isLHS, start, line, column);
|
|
6157
6154
|
return parseMemberOrUpdateExpression(parser, context, expression, inGroup, 0, start, line, column);
|
|
6158
6155
|
}
|
|
6159
6156
|
function parseUpdateExpression(parser, context, expr, start, line, column) {
|
|
@@ -6177,7 +6174,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6177
6174
|
context = (context | 134217728) ^ 134217728;
|
|
6178
6175
|
switch (parser.token) {
|
|
6179
6176
|
case 67108877: {
|
|
6180
|
-
nextToken(parser, (context |
|
|
6177
|
+
nextToken(parser, (context | 268435456 | 8192) ^ 8192);
|
|
6181
6178
|
if (context & 16384 && parser.token === 131 && parser.tokenValue === 'super') {
|
|
6182
6179
|
report(parser, 27);
|
|
6183
6180
|
}
|
|
@@ -6236,7 +6233,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6236
6233
|
break;
|
|
6237
6234
|
}
|
|
6238
6235
|
case 67108991: {
|
|
6239
|
-
nextToken(parser, (context |
|
|
6236
|
+
nextToken(parser, (context | 268435456 | 8192) ^ 8192);
|
|
6240
6237
|
parser.flags |= 2048;
|
|
6241
6238
|
parser.assignable = 2;
|
|
6242
6239
|
expr = parseOptionalChain(parser, context, expr, start, line, column);
|
|
@@ -6302,7 +6299,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6302
6299
|
else {
|
|
6303
6300
|
if ((parser.token & (143360 | 4096)) === 0)
|
|
6304
6301
|
report(parser, 155);
|
|
6305
|
-
const property = parseIdentifier(parser, context
|
|
6302
|
+
const property = parseIdentifier(parser, context);
|
|
6306
6303
|
parser.assignable = 2;
|
|
6307
6304
|
node = finishNode(parser, context, start, line, column, {
|
|
6308
6305
|
type: 'MemberExpression',
|
|
@@ -6323,7 +6320,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6323
6320
|
}
|
|
6324
6321
|
return context & 1 && parser.token === 131
|
|
6325
6322
|
? parsePrivateIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos)
|
|
6326
|
-
: parseIdentifier(parser, context
|
|
6323
|
+
: parseIdentifier(parser, context);
|
|
6327
6324
|
}
|
|
6328
6325
|
function parseUpdateExpressionPrefixed(parser, context, inNew, isLHS, start, line, column) {
|
|
6329
6326
|
if (inNew)
|
|
@@ -6344,7 +6341,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6344
6341
|
prefix: true
|
|
6345
6342
|
});
|
|
6346
6343
|
}
|
|
6347
|
-
function parsePrimaryExpression(parser, context, kind, inNew, canAssign,
|
|
6344
|
+
function parsePrimaryExpression(parser, context, kind, inNew, canAssign, inGroup, isLHS, start, line, column) {
|
|
6348
6345
|
if ((parser.token & 143360) === 143360) {
|
|
6349
6346
|
switch (parser.token) {
|
|
6350
6347
|
case 209008:
|
|
@@ -6352,10 +6349,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6352
6349
|
case 241773:
|
|
6353
6350
|
return parseYieldExpression(parser, context, inGroup, canAssign, start, line, column);
|
|
6354
6351
|
case 209007:
|
|
6355
|
-
return parseAsyncExpression(parser, context, inGroup, isLHS, canAssign,
|
|
6352
|
+
return parseAsyncExpression(parser, context, inGroup, isLHS, canAssign, inNew, start, line, column);
|
|
6356
6353
|
}
|
|
6357
6354
|
const { token, tokenValue } = parser;
|
|
6358
|
-
const expr = parseIdentifier(parser, context | 65536
|
|
6355
|
+
const expr = parseIdentifier(parser, context | 65536);
|
|
6359
6356
|
if (parser.token === 10) {
|
|
6360
6357
|
if (!isLHS)
|
|
6361
6358
|
report(parser, 0);
|
|
@@ -6434,7 +6431,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6434
6431
|
}
|
|
6435
6432
|
}
|
|
6436
6433
|
function parseImportCallOrMetaExpression(parser, context, inNew, inGroup, start, line, column) {
|
|
6437
|
-
let expr = parseIdentifier(parser, context
|
|
6434
|
+
let expr = parseIdentifier(parser, context);
|
|
6438
6435
|
if (parser.token === 67108877) {
|
|
6439
6436
|
return parseImportMetaExpression(parser, context, expr, start, line, column);
|
|
6440
6437
|
}
|
|
@@ -6454,14 +6451,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6454
6451
|
return finishNode(parser, context, start, line, column, {
|
|
6455
6452
|
type: 'MetaProperty',
|
|
6456
6453
|
meta,
|
|
6457
|
-
property: parseIdentifier(parser, context
|
|
6454
|
+
property: parseIdentifier(parser, context)
|
|
6458
6455
|
});
|
|
6459
6456
|
}
|
|
6460
6457
|
function parseImportExpression(parser, context, inGroup, start, line, column) {
|
|
6461
6458
|
consume(parser, context | 32768, 67174411);
|
|
6462
6459
|
if (parser.token === 14)
|
|
6463
6460
|
report(parser, 139);
|
|
6464
|
-
const source = parseExpression(parser, context, 1,
|
|
6461
|
+
const source = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6465
6462
|
consume(parser, context, 16);
|
|
6466
6463
|
return finishNode(parser, context, start, line, column, {
|
|
6467
6464
|
type: 'ImportExpression',
|
|
@@ -6550,7 +6547,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6550
6547
|
function parseSpreadElement(parser, context, start, line, column) {
|
|
6551
6548
|
context = (context | 134217728) ^ 134217728;
|
|
6552
6549
|
consume(parser, context | 32768, 14);
|
|
6553
|
-
const argument = parseExpression(parser, context, 1, 0,
|
|
6550
|
+
const argument = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6554
6551
|
parser.assignable = 1;
|
|
6555
6552
|
return finishNode(parser, context, start, line, column, {
|
|
6556
6553
|
type: 'SpreadElement',
|
|
@@ -6569,7 +6566,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6569
6566
|
args.push(parseSpreadElement(parser, context, parser.tokenPos, parser.linePos, parser.colPos));
|
|
6570
6567
|
}
|
|
6571
6568
|
else {
|
|
6572
|
-
args.push(parseExpression(parser, context, 1,
|
|
6569
|
+
args.push(parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
|
|
6573
6570
|
}
|
|
6574
6571
|
if (parser.token !== 18)
|
|
6575
6572
|
break;
|
|
@@ -6580,19 +6577,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6580
6577
|
consume(parser, context, 16);
|
|
6581
6578
|
return args;
|
|
6582
6579
|
}
|
|
6583
|
-
function parseIdentifier(parser, context
|
|
6580
|
+
function parseIdentifier(parser, context) {
|
|
6584
6581
|
const { tokenValue, tokenPos, linePos, colPos } = parser;
|
|
6585
6582
|
nextToken(parser, context);
|
|
6586
|
-
return finishNode(parser, context, tokenPos, linePos, colPos,
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
pattern: isPattern === 1
|
|
6591
|
-
}
|
|
6592
|
-
: {
|
|
6593
|
-
type: 'Identifier',
|
|
6594
|
-
name: tokenValue
|
|
6595
|
-
});
|
|
6583
|
+
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
6584
|
+
type: 'Identifier',
|
|
6585
|
+
name: tokenValue
|
|
6586
|
+
});
|
|
6596
6587
|
}
|
|
6597
6588
|
function parseLiteral(parser, context) {
|
|
6598
6589
|
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
|
@@ -6667,7 +6658,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6667
6658
|
}
|
|
6668
6659
|
firstRestricted = parser.token;
|
|
6669
6660
|
if (parser.token & 143360) {
|
|
6670
|
-
id = parseIdentifier(parser, context
|
|
6661
|
+
id = parseIdentifier(parser, context);
|
|
6671
6662
|
}
|
|
6672
6663
|
else {
|
|
6673
6664
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
@@ -6677,7 +6668,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6677
6668
|
((context | 32243712) ^ 32243712) |
|
|
6678
6669
|
67108864 |
|
|
6679
6670
|
((isAsync * 2 + isGenerator) << 21) |
|
|
6680
|
-
(isGenerator ? 0 :
|
|
6671
|
+
(isGenerator ? 0 : 268435456);
|
|
6681
6672
|
if (scope)
|
|
6682
6673
|
functionScope = addChildScope(functionScope, 512);
|
|
6683
6674
|
const params = parseFormalParametersOrFormalList(parser, context | 8388608, functionScope, 0, 1);
|
|
@@ -6704,13 +6695,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6704
6695
|
if (scope)
|
|
6705
6696
|
scope = addChildScope(scope, 256);
|
|
6706
6697
|
firstRestricted = parser.token;
|
|
6707
|
-
id = parseIdentifier(parser, context
|
|
6698
|
+
id = parseIdentifier(parser, context);
|
|
6708
6699
|
}
|
|
6709
6700
|
context =
|
|
6710
6701
|
((context | 32243712) ^ 32243712) |
|
|
6711
6702
|
67108864 |
|
|
6712
6703
|
generatorAndAsyncFlags |
|
|
6713
|
-
(isGenerator ? 0 :
|
|
6704
|
+
(isGenerator ? 0 : 268435456);
|
|
6714
6705
|
if (scope)
|
|
6715
6706
|
scope = addChildScope(scope, 512);
|
|
6716
6707
|
const params = parseFormalParametersOrFormalList(parser, context | 8388608, scope, inGroup, 1);
|
|
@@ -6748,14 +6739,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6748
6739
|
let left;
|
|
6749
6740
|
const { token, tokenPos, linePos, colPos, tokenValue } = parser;
|
|
6750
6741
|
if (token & 143360) {
|
|
6751
|
-
left = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
6742
|
+
left = parsePrimaryExpression(parser, context, kind, 0, 1, inGroup, 1, tokenPos, linePos, colPos);
|
|
6752
6743
|
if (parser.token === 1077936157) {
|
|
6753
6744
|
if (parser.assignable & 2)
|
|
6754
6745
|
report(parser, 24);
|
|
6755
6746
|
nextToken(parser, context | 32768);
|
|
6756
6747
|
if (scope)
|
|
6757
6748
|
addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
|
|
6758
|
-
const right = parseExpression(parser, context, 1,
|
|
6749
|
+
const right = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6759
6750
|
left = finishNode(parser, context, tokenPos, linePos, colPos, isPattern
|
|
6760
6751
|
? {
|
|
6761
6752
|
type: 'AssignmentPattern',
|
|
@@ -6894,7 +6885,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6894
6885
|
if (!isPattern)
|
|
6895
6886
|
reinterpretToPattern(parser, node);
|
|
6896
6887
|
const { tokenPos, linePos, colPos } = parser;
|
|
6897
|
-
const right = parseExpression(parser, context, 1,
|
|
6888
|
+
const right = parseExpression(parser, context, 1, inGroup, tokenPos, linePos, colPos);
|
|
6898
6889
|
parser.destructible =
|
|
6899
6890
|
((destructible | 64 | 8) ^
|
|
6900
6891
|
(8 | 64)) |
|
|
@@ -6920,7 +6911,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6920
6911
|
let { token, tokenValue, tokenPos, linePos, colPos } = parser;
|
|
6921
6912
|
if (token & (4096 | 143360)) {
|
|
6922
6913
|
parser.assignable = 1;
|
|
6923
|
-
argument = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
6914
|
+
argument = parsePrimaryExpression(parser, context, kind, 0, 1, inGroup, 1, tokenPos, linePos, colPos);
|
|
6924
6915
|
token = parser.token;
|
|
6925
6916
|
argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
|
|
6926
6917
|
if (parser.token !== 18 && parser.token !== closingToken) {
|
|
@@ -7015,7 +7006,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7015
7006
|
if (destructible & 16)
|
|
7016
7007
|
report(parser, 24);
|
|
7017
7008
|
reinterpretToPattern(parser, argument);
|
|
7018
|
-
const right = parseExpression(parser, context, 1,
|
|
7009
|
+
const right = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7019
7010
|
argument = finishNode(parser, context, tokenPos, linePos, colPos, isPattern
|
|
7020
7011
|
? {
|
|
7021
7012
|
type: 'AssignmentPattern',
|
|
@@ -7087,7 +7078,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7087
7078
|
let value;
|
|
7088
7079
|
const t = parser.token;
|
|
7089
7080
|
if (parser.token & (143360 | 4096) || parser.token === 121) {
|
|
7090
|
-
key = parseIdentifier(parser, context
|
|
7081
|
+
key = parseIdentifier(parser, context);
|
|
7091
7082
|
if (parser.token === 18 || parser.token === 1074790415 || parser.token === 1077936157) {
|
|
7092
7083
|
state |= 4;
|
|
7093
7084
|
if (context & 1024 && (token & 537079808) === 537079808) {
|
|
@@ -7100,7 +7091,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7100
7091
|
addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
|
|
7101
7092
|
if (consumeOpt(parser, context | 32768, 1077936157)) {
|
|
7102
7093
|
destructible |= 8;
|
|
7103
|
-
const right = parseExpression(parser, context, 1,
|
|
7094
|
+
const right = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7104
7095
|
destructible |=
|
|
7105
7096
|
parser.destructible & 256
|
|
7106
7097
|
? 256
|
|
@@ -7109,7 +7100,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7109
7100
|
: 0;
|
|
7110
7101
|
value = finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
7111
7102
|
type: 'AssignmentPattern',
|
|
7112
|
-
left: context &
|
|
7103
|
+
left: context & 536870912 ? Object.assign({}, key) : key,
|
|
7113
7104
|
right
|
|
7114
7105
|
});
|
|
7115
7106
|
}
|
|
@@ -7117,7 +7108,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7117
7108
|
destructible |=
|
|
7118
7109
|
(token === 209008 ? 128 : 0) |
|
|
7119
7110
|
(token === 121 ? 16 : 0);
|
|
7120
|
-
value = context &
|
|
7111
|
+
value = context & 536870912 ? Object.assign({}, key) : key;
|
|
7121
7112
|
}
|
|
7122
7113
|
}
|
|
7123
7114
|
else if (consumeOpt(parser, context | 32768, 21)) {
|
|
@@ -7128,7 +7119,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7128
7119
|
const tokenAfterColon = parser.token;
|
|
7129
7120
|
const valueAfterColon = parser.tokenValue;
|
|
7130
7121
|
destructible |= t === 121 ? 16 : 0;
|
|
7131
|
-
value = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
7122
|
+
value = parsePrimaryExpression(parser, context, kind, 0, 1, inGroup, 1, tokenPos, linePos, colPos);
|
|
7132
7123
|
const { token } = parser;
|
|
7133
7124
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
7134
7125
|
if (parser.token === 18 || parser.token === 1074790415) {
|
|
@@ -7249,7 +7240,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7249
7240
|
report(parser, 129);
|
|
7250
7241
|
state |= 16;
|
|
7251
7242
|
}
|
|
7252
|
-
key = parseIdentifier(parser, context
|
|
7243
|
+
key = parseIdentifier(parser, context);
|
|
7253
7244
|
state |=
|
|
7254
7245
|
token === 12402
|
|
7255
7246
|
? 256
|
|
@@ -7278,7 +7269,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7278
7269
|
state |=
|
|
7279
7270
|
8 | 1 | (token === 209007 ? 16 : 0);
|
|
7280
7271
|
if (parser.token & 143360) {
|
|
7281
|
-
key = parseIdentifier(parser, context
|
|
7272
|
+
key = parseIdentifier(parser, context);
|
|
7282
7273
|
}
|
|
7283
7274
|
else if ((parser.token & 134217728) === 134217728) {
|
|
7284
7275
|
key = parseLiteral(parser, context);
|
|
@@ -7318,7 +7309,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7318
7309
|
if (tokenValue === '__proto__')
|
|
7319
7310
|
prototypeCount++;
|
|
7320
7311
|
if (parser.token & 143360) {
|
|
7321
|
-
value = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
7312
|
+
value = parsePrimaryExpression(parser, context, kind, 0, 1, inGroup, 1, tokenPos, linePos, colPos);
|
|
7322
7313
|
const { token, tokenValue: valueAfterColon } = parser;
|
|
7323
7314
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
7324
7315
|
if (parser.token === 18 || parser.token === 1074790415) {
|
|
@@ -7419,7 +7410,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7419
7410
|
nextToken(parser, context | 32768);
|
|
7420
7411
|
const { tokenPos, linePos, colPos, tokenValue, token: tokenAfterColon } = parser;
|
|
7421
7412
|
if (parser.token & 143360) {
|
|
7422
|
-
value = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
7413
|
+
value = parsePrimaryExpression(parser, context, kind, 0, 1, inGroup, 1, tokenPos, linePos, colPos);
|
|
7423
7414
|
const { token } = parser;
|
|
7424
7415
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
7425
7416
|
if ((parser.token & 4194304) === 4194304) {
|
|
@@ -7525,7 +7516,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7525
7516
|
state |= 8;
|
|
7526
7517
|
if (parser.token & 143360) {
|
|
7527
7518
|
const { token, line, index } = parser;
|
|
7528
|
-
key = parseIdentifier(parser, context
|
|
7519
|
+
key = parseIdentifier(parser, context);
|
|
7529
7520
|
state |= 1;
|
|
7530
7521
|
if (parser.token === 67174411) {
|
|
7531
7522
|
destructible |= 16;
|
|
@@ -7639,7 +7630,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7639
7630
|
if (parser.token === 1077936157) {
|
|
7640
7631
|
nextToken(parser, context | 32768);
|
|
7641
7632
|
isSimpleParameterList = 1;
|
|
7642
|
-
const right = parseExpression(parser, context, 1,
|
|
7633
|
+
const right = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7643
7634
|
left = finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
7644
7635
|
type: 'AssignmentPattern',
|
|
7645
7636
|
left: left,
|
|
@@ -7666,14 +7657,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7666
7657
|
}
|
|
7667
7658
|
function parseComputedPropertyName(parser, context, inGroup) {
|
|
7668
7659
|
nextToken(parser, context | 32768);
|
|
7669
|
-
const key = parseExpression(parser, (context | 134217728) ^ 134217728, 1,
|
|
7660
|
+
const key = parseExpression(parser, (context | 134217728) ^ 134217728, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7670
7661
|
consume(parser, context, 20);
|
|
7671
7662
|
return key;
|
|
7672
7663
|
}
|
|
7673
7664
|
function parseParenthesizedExpression(parser, context, canAssign, kind, origin, start, line, column) {
|
|
7674
7665
|
parser.flags = (parser.flags | 128) ^ 128;
|
|
7675
7666
|
const { tokenPos: piStart, linePos: plStart, colPos: pcStart } = parser;
|
|
7676
|
-
nextToken(parser, context | 32768 |
|
|
7667
|
+
nextToken(parser, context | 32768 | 268435456);
|
|
7677
7668
|
const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
|
|
7678
7669
|
context = (context | 134217728) ^ 134217728;
|
|
7679
7670
|
if (consumeOpt(parser, context, 16)) {
|
|
@@ -7692,7 +7683,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7692
7683
|
if (token & (143360 | 4096)) {
|
|
7693
7684
|
if (scope)
|
|
7694
7685
|
addBlockName(parser, context, scope, parser.tokenValue, 1, 0);
|
|
7695
|
-
expr = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
7686
|
+
expr = parsePrimaryExpression(parser, context, kind, 0, 1, 1, 1, tokenPos, linePos, colPos);
|
|
7696
7687
|
if (parser.token === 16 || parser.token === 18) {
|
|
7697
7688
|
if (parser.assignable & 2) {
|
|
7698
7689
|
destructible |= 16;
|
|
@@ -7719,8 +7710,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7719
7710
|
else if ((token & 2097152) === 2097152) {
|
|
7720
7711
|
expr =
|
|
7721
7712
|
token === 2162700
|
|
7722
|
-
? parseObjectLiteralOrPattern(parser, context |
|
|
7723
|
-
: parseArrayExpressionOrPattern(parser, context |
|
|
7713
|
+
? parseObjectLiteralOrPattern(parser, context | 268435456, scope, 0, 1, 0, kind, origin, tokenPos, linePos, colPos)
|
|
7714
|
+
: parseArrayExpressionOrPattern(parser, context | 268435456, scope, 0, 1, 0, kind, origin, tokenPos, linePos, colPos);
|
|
7724
7715
|
destructible |= parser.destructible;
|
|
7725
7716
|
isSimpleParameterList = 1;
|
|
7726
7717
|
parser.assignable = 2;
|
|
@@ -7747,7 +7738,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7747
7738
|
}
|
|
7748
7739
|
else {
|
|
7749
7740
|
destructible |= 16;
|
|
7750
|
-
expr = parseExpression(parser, context, 1,
|
|
7741
|
+
expr = parseExpression(parser, context, 1, 1, tokenPos, linePos, colPos);
|
|
7751
7742
|
if (isSequence && (parser.token === 16 || parser.token === 18)) {
|
|
7752
7743
|
expressions.push(expr);
|
|
7753
7744
|
}
|
|
@@ -7759,7 +7750,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7759
7750
|
}
|
|
7760
7751
|
if (isSequence) {
|
|
7761
7752
|
while (consumeOpt(parser, context | 32768, 18)) {
|
|
7762
|
-
expressions.push(parseExpression(parser, context, 1,
|
|
7753
|
+
expressions.push(parseExpression(parser, context, 1, 1, parser.tokenPos, parser.linePos, parser.colPos));
|
|
7763
7754
|
}
|
|
7764
7755
|
parser.assignable = 2;
|
|
7765
7756
|
expr = finishNode(parser, context, iStart, lStart, cStart, {
|
|
@@ -7826,7 +7817,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7826
7817
|
}
|
|
7827
7818
|
function parseIdentifierOrArrow(parser, context, start, line, column) {
|
|
7828
7819
|
const { tokenValue } = parser;
|
|
7829
|
-
const expr = parseIdentifier(parser, context
|
|
7820
|
+
const expr = parseIdentifier(parser, context);
|
|
7830
7821
|
parser.assignable = 1;
|
|
7831
7822
|
if (parser.token === 10) {
|
|
7832
7823
|
let scope = void 0;
|
|
@@ -7864,7 +7855,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7864
7855
|
reportScopeError(scope.scopeError);
|
|
7865
7856
|
}
|
|
7866
7857
|
if (expression) {
|
|
7867
|
-
body = parseExpression(parser, context & 16384 ? context | 33554432 : context, 1, 0,
|
|
7858
|
+
body = parseExpression(parser, context & 16384 ? context | 33554432 : context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7868
7859
|
}
|
|
7869
7860
|
else {
|
|
7870
7861
|
if (scope)
|
|
@@ -7945,7 +7936,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7945
7936
|
if (parser.token === 1077936157) {
|
|
7946
7937
|
nextToken(parser, context | 32768);
|
|
7947
7938
|
isSimpleParameterList = 1;
|
|
7948
|
-
const right = parseExpression(parser, context, 1,
|
|
7939
|
+
const right = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7949
7940
|
left = finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
7950
7941
|
type: 'AssignmentPattern',
|
|
7951
7942
|
left,
|
|
@@ -7971,7 +7962,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7971
7962
|
const { token } = parser;
|
|
7972
7963
|
if (token & 67108864) {
|
|
7973
7964
|
if (token === 67108877) {
|
|
7974
|
-
nextToken(parser, context |
|
|
7965
|
+
nextToken(parser, context | 268435456);
|
|
7975
7966
|
parser.assignable = 1;
|
|
7976
7967
|
const property = parsePropertyOrPrivatePropertyName(parser, context);
|
|
7977
7968
|
return parseMembeExpressionNoCall(parser, context, finishNode(parser, context, start, line, column, {
|
|
@@ -8008,7 +7999,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8008
7999
|
return expr;
|
|
8009
8000
|
}
|
|
8010
8001
|
function parseNewExpression(parser, context, inGroup, start, line, column) {
|
|
8011
|
-
const id = parseIdentifier(parser, context | 32768
|
|
8002
|
+
const id = parseIdentifier(parser, context | 32768);
|
|
8012
8003
|
const { tokenPos, linePos, colPos } = parser;
|
|
8013
8004
|
if (consumeOpt(parser, context, 67108877)) {
|
|
8014
8005
|
if (context & 67108864 && parser.token === 143494) {
|
|
@@ -8021,7 +8012,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8021
8012
|
if ((parser.token & 16842752) === 16842752) {
|
|
8022
8013
|
report(parser, 63, KeywordDescTable[parser.token & 255]);
|
|
8023
8014
|
}
|
|
8024
|
-
const expr = parsePrimaryExpression(parser, context, 2, 1, 0,
|
|
8015
|
+
const expr = parsePrimaryExpression(parser, context, 2, 1, 0, inGroup, 1, tokenPos, linePos, colPos);
|
|
8025
8016
|
context = (context | 134217728) ^ 134217728;
|
|
8026
8017
|
if (parser.token === 67108991)
|
|
8027
8018
|
report(parser, 163);
|
|
@@ -8034,7 +8025,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8034
8025
|
});
|
|
8035
8026
|
}
|
|
8036
8027
|
function parseMetaProperty(parser, context, meta, start, line, column) {
|
|
8037
|
-
const property = parseIdentifier(parser, context
|
|
8028
|
+
const property = parseIdentifier(parser, context);
|
|
8038
8029
|
return finishNode(parser, context, start, line, column, {
|
|
8039
8030
|
type: 'MetaProperty',
|
|
8040
8031
|
meta,
|
|
@@ -8050,7 +8041,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8050
8041
|
if ((parser.token & 537079808) === 537079808) {
|
|
8051
8042
|
parser.flags |= 512;
|
|
8052
8043
|
}
|
|
8053
|
-
return parseArrowFromIdentifier(parser, context, parser.tokenValue, parseIdentifier(parser, context
|
|
8044
|
+
return parseArrowFromIdentifier(parser, context, parser.tokenValue, parseIdentifier(parser, context), 0, canAssign, 1, start, line, column);
|
|
8054
8045
|
}
|
|
8055
8046
|
function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kind, origin, flags, start, line, column) {
|
|
8056
8047
|
nextToken(parser, context | 32768);
|
|
@@ -8080,7 +8071,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8080
8071
|
if (token & (143360 | 4096)) {
|
|
8081
8072
|
if (scope)
|
|
8082
8073
|
addBlockName(parser, context, scope, parser.tokenValue, kind, 0);
|
|
8083
|
-
expr = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
8074
|
+
expr = parsePrimaryExpression(parser, context, kind, 0, 1, 1, 1, tokenPos, linePos, colPos);
|
|
8084
8075
|
if (parser.token === 16 || parser.token === 18) {
|
|
8085
8076
|
if (parser.assignable & 2) {
|
|
8086
8077
|
destructible |= 16;
|
|
@@ -8132,11 +8123,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8132
8123
|
isSimpleParameterList = 1;
|
|
8133
8124
|
}
|
|
8134
8125
|
else {
|
|
8135
|
-
expr = parseExpression(parser, context, 1, 0,
|
|
8126
|
+
expr = parseExpression(parser, context, 1, 0, tokenPos, linePos, colPos);
|
|
8136
8127
|
destructible = parser.assignable;
|
|
8137
8128
|
params.push(expr);
|
|
8138
8129
|
while (consumeOpt(parser, context | 32768, 18)) {
|
|
8139
|
-
params.push(parseExpression(parser, context, 1, 0,
|
|
8130
|
+
params.push(parseExpression(parser, context, 1, 0, tokenPos, linePos, colPos));
|
|
8140
8131
|
}
|
|
8141
8132
|
destructible |= parser.assignable;
|
|
8142
8133
|
consume(parser, context, 16);
|
|
@@ -8231,7 +8222,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8231
8222
|
}
|
|
8232
8223
|
}
|
|
8233
8224
|
}
|
|
8234
|
-
id = parseIdentifier(parser, context
|
|
8225
|
+
id = parseIdentifier(parser, context);
|
|
8235
8226
|
}
|
|
8236
8227
|
else {
|
|
8237
8228
|
if ((flags & 1) === 0)
|
|
@@ -8278,7 +8269,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8278
8269
|
if ((parser.token & 537079808) === 537079808) {
|
|
8279
8270
|
report(parser, 116);
|
|
8280
8271
|
}
|
|
8281
|
-
id = parseIdentifier(parser, context
|
|
8272
|
+
id = parseIdentifier(parser, context);
|
|
8282
8273
|
}
|
|
8283
8274
|
let inheritedContext = context;
|
|
8284
8275
|
if (consumeOpt(parser, context | 32768, 20567)) {
|
|
@@ -8316,7 +8307,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8316
8307
|
}
|
|
8317
8308
|
function parseDecoratorList(parser, context, start, line, column) {
|
|
8318
8309
|
nextToken(parser, context | 32768);
|
|
8319
|
-
let expression = parsePrimaryExpression(parser, context, 2, 0, 1, 0,
|
|
8310
|
+
let expression = parsePrimaryExpression(parser, context, 2, 0, 1, 0, 1, start, line, column);
|
|
8320
8311
|
expression = parseMemberOrUpdateExpression(parser, context, expression, 0, 0, start, line, column);
|
|
8321
8312
|
return finishNode(parser, context, start, line, column, {
|
|
8322
8313
|
type: 'Decorator',
|
|
@@ -8359,7 +8350,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8359
8350
|
let key = null;
|
|
8360
8351
|
const { token, tokenPos, linePos, colPos } = parser;
|
|
8361
8352
|
if (token & (143360 | 36864)) {
|
|
8362
|
-
key = parseIdentifier(parser, context
|
|
8353
|
+
key = parseIdentifier(parser, context);
|
|
8363
8354
|
switch (token) {
|
|
8364
8355
|
case 36972:
|
|
8365
8356
|
if (!isStatic &&
|
|
@@ -8417,7 +8408,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8417
8408
|
return parseStaticBlock(parser, context, scope, tokenPos, linePos, colPos);
|
|
8418
8409
|
}
|
|
8419
8410
|
else if (token === 122) {
|
|
8420
|
-
key = parseIdentifier(parser, context
|
|
8411
|
+
key = parseIdentifier(parser, context);
|
|
8421
8412
|
if (parser.token !== 67174411)
|
|
8422
8413
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
8423
8414
|
}
|
|
@@ -8426,7 +8417,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8426
8417
|
}
|
|
8427
8418
|
if (kind & (8 | 16 | 768)) {
|
|
8428
8419
|
if (parser.token & 143360) {
|
|
8429
|
-
key = parseIdentifier(parser, context
|
|
8420
|
+
key = parseIdentifier(parser, context);
|
|
8430
8421
|
}
|
|
8431
8422
|
else if ((parser.token & 134217728) === 134217728) {
|
|
8432
8423
|
key = parseLiteral(parser, context);
|
|
@@ -8436,7 +8427,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8436
8427
|
key = parseComputedPropertyName(parser, context, 0);
|
|
8437
8428
|
}
|
|
8438
8429
|
else if (parser.token === 122) {
|
|
8439
|
-
key = parseIdentifier(parser, context
|
|
8430
|
+
key = parseIdentifier(parser, context);
|
|
8440
8431
|
}
|
|
8441
8432
|
else if (context & 1 && parser.token === 131) {
|
|
8442
8433
|
kind |= 4096;
|
|
@@ -8531,7 +8522,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8531
8522
|
((context | modifierFlags) ^ modifierFlags) |
|
|
8532
8523
|
((state & 88) << 18) |
|
|
8533
8524
|
100925440;
|
|
8534
|
-
value = parsePrimaryExpression(parser, context | 16384, 2, 0, 1, 0,
|
|
8525
|
+
value = parsePrimaryExpression(parser, context | 16384, 2, 0, 1, 0, 1, tokenPos, linePos, colPos);
|
|
8535
8526
|
if ((parser.token & 1073741824) !== 1073741824 ||
|
|
8536
8527
|
(parser.token & 4194304) === 4194304) {
|
|
8537
8528
|
value = parseMemberOrUpdateExpression(parser, context | 16384, value, 0, 0, tokenPos, linePos, colPos);
|
|
@@ -8739,7 +8730,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8739
8730
|
function parseJSXSpreadAttribute(parser, context, start, line, column) {
|
|
8740
8731
|
nextToken(parser, context);
|
|
8741
8732
|
consume(parser, context, 14);
|
|
8742
|
-
const expression = parseExpression(parser, context, 1, 0,
|
|
8733
|
+
const expression = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
8743
8734
|
consume(parser, context, 1074790415);
|
|
8744
8735
|
return finishNode(parser, context, start, line, column, {
|
|
8745
8736
|
type: 'JSXSpreadAttribute',
|
|
@@ -8799,7 +8790,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8799
8790
|
expression = parseJSXEmptyExpression(parser, context, parser.startPos, parser.startLine, parser.startColumn);
|
|
8800
8791
|
}
|
|
8801
8792
|
else {
|
|
8802
|
-
expression = parseExpression(parser, context, 1, 0,
|
|
8793
|
+
expression = parseExpression(parser, context, 1, 0, tokenPos, linePos, colPos);
|
|
8803
8794
|
}
|
|
8804
8795
|
if (inJSXChild) {
|
|
8805
8796
|
consume(parser, context, 1074790415);
|
|
@@ -8814,7 +8805,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8814
8805
|
}
|
|
8815
8806
|
function parseJSXSpreadChild(parser, context, start, line, column) {
|
|
8816
8807
|
consume(parser, context, 14);
|
|
8817
|
-
const expression = parseExpression(parser, context, 1, 0,
|
|
8808
|
+
const expression = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
8818
8809
|
consume(parser, context, 1074790415);
|
|
8819
8810
|
return finishNode(parser, context, start, line, column, {
|
|
8820
8811
|
type: 'JSXSpreadChild',
|
|
@@ -8842,7 +8833,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8842
8833
|
__proto__: null
|
|
8843
8834
|
});
|
|
8844
8835
|
|
|
8845
|
-
var version$1 = "4.4.
|
|
8836
|
+
var version$1 = "4.4.4";
|
|
8846
8837
|
|
|
8847
8838
|
const version = version$1;
|
|
8848
8839
|
function parseScript(source, options) {
|