meriyah 4.4.2 → 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 +13 -0
- package/README.md +1 -7
- package/dist/meriyah.amd.js +121 -118
- package/dist/meriyah.amd.min.js +1 -1
- package/dist/meriyah.cjs +121 -118
- package/dist/meriyah.cjs.js +121 -118
- package/dist/meriyah.cjs.min.js +1 -1
- package/dist/meriyah.esm.js +121 -118
- package/dist/meriyah.esm.min.js +1 -1
- package/dist/meriyah.esm.min.mjs +1 -1
- package/dist/meriyah.esm.mjs +121 -118
- package/dist/meriyah.iife.js +121 -118
- package/dist/meriyah.iife.min.js +1 -1
- package/dist/meriyah.min.cjs +1 -1
- package/dist/meriyah.system.js +121 -118
- package/dist/meriyah.system.min.js +1 -1
- package/dist/meriyah.umd.cjs +121 -118
- package/dist/meriyah.umd.es5.js +121 -118
- package/dist/meriyah.umd.es5.min.js +1 -1
- package/dist/meriyah.umd.js +121 -118
- 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 +115 -144
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;
|
|
@@ -6131,8 +6128,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6131
6128
|
case 67174411: {
|
|
6132
6129
|
if ((context & 524288) === 0)
|
|
6133
6130
|
report(parser, 26);
|
|
6134
|
-
if (context & 16384)
|
|
6131
|
+
if (context & 16384 && !(context & 33554432)) {
|
|
6135
6132
|
report(parser, 27);
|
|
6133
|
+
}
|
|
6136
6134
|
parser.assignable = 2;
|
|
6137
6135
|
break;
|
|
6138
6136
|
}
|
|
@@ -6140,8 +6138,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6140
6138
|
case 67108877: {
|
|
6141
6139
|
if ((context & 262144) === 0)
|
|
6142
6140
|
report(parser, 27);
|
|
6143
|
-
if (context & 16384)
|
|
6141
|
+
if (context & 16384 && !(context & 33554432)) {
|
|
6144
6142
|
report(parser, 27);
|
|
6143
|
+
}
|
|
6145
6144
|
parser.assignable = 1;
|
|
6146
6145
|
break;
|
|
6147
6146
|
}
|
|
@@ -6151,7 +6150,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6151
6150
|
return finishNode(parser, context, start, line, column, { type: 'Super' });
|
|
6152
6151
|
}
|
|
6153
6152
|
function parseLeftHandSideExpression(parser, context, canAssign, inGroup, isLHS, start, line, column) {
|
|
6154
|
-
const expression = parsePrimaryExpression(parser, context, 2, 0, canAssign,
|
|
6153
|
+
const expression = parsePrimaryExpression(parser, context, 2, 0, canAssign, inGroup, isLHS, start, line, column);
|
|
6155
6154
|
return parseMemberOrUpdateExpression(parser, context, expression, inGroup, 0, start, line, column);
|
|
6156
6155
|
}
|
|
6157
6156
|
function parseUpdateExpression(parser, context, expr, start, line, column) {
|
|
@@ -6175,7 +6174,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6175
6174
|
context = (context | 134217728) ^ 134217728;
|
|
6176
6175
|
switch (parser.token) {
|
|
6177
6176
|
case 67108877: {
|
|
6178
|
-
nextToken(parser, (context |
|
|
6177
|
+
nextToken(parser, (context | 268435456 | 8192) ^ 8192);
|
|
6178
|
+
if (context & 16384 && parser.token === 131 && parser.tokenValue === 'super') {
|
|
6179
|
+
report(parser, 27);
|
|
6180
|
+
}
|
|
6179
6181
|
parser.assignable = 1;
|
|
6180
6182
|
const property = parsePropertyOrPrivatePropertyName(parser, context | 65536);
|
|
6181
6183
|
expr = finishNode(parser, context, start, line, column, {
|
|
@@ -6231,7 +6233,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6231
6233
|
break;
|
|
6232
6234
|
}
|
|
6233
6235
|
case 67108991: {
|
|
6234
|
-
nextToken(parser, (context |
|
|
6236
|
+
nextToken(parser, (context | 268435456 | 8192) ^ 8192);
|
|
6235
6237
|
parser.flags |= 2048;
|
|
6236
6238
|
parser.assignable = 2;
|
|
6237
6239
|
expr = parseOptionalChain(parser, context, expr, start, line, column);
|
|
@@ -6297,7 +6299,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6297
6299
|
else {
|
|
6298
6300
|
if ((parser.token & (143360 | 4096)) === 0)
|
|
6299
6301
|
report(parser, 155);
|
|
6300
|
-
const property = parseIdentifier(parser, context
|
|
6302
|
+
const property = parseIdentifier(parser, context);
|
|
6301
6303
|
parser.assignable = 2;
|
|
6302
6304
|
node = finishNode(parser, context, start, line, column, {
|
|
6303
6305
|
type: 'MemberExpression',
|
|
@@ -6318,7 +6320,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6318
6320
|
}
|
|
6319
6321
|
return context & 1 && parser.token === 131
|
|
6320
6322
|
? parsePrivateIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos)
|
|
6321
|
-
: parseIdentifier(parser, context
|
|
6323
|
+
: parseIdentifier(parser, context);
|
|
6322
6324
|
}
|
|
6323
6325
|
function parseUpdateExpressionPrefixed(parser, context, inNew, isLHS, start, line, column) {
|
|
6324
6326
|
if (inNew)
|
|
@@ -6339,7 +6341,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6339
6341
|
prefix: true
|
|
6340
6342
|
});
|
|
6341
6343
|
}
|
|
6342
|
-
function parsePrimaryExpression(parser, context, kind, inNew, canAssign,
|
|
6344
|
+
function parsePrimaryExpression(parser, context, kind, inNew, canAssign, inGroup, isLHS, start, line, column) {
|
|
6343
6345
|
if ((parser.token & 143360) === 143360) {
|
|
6344
6346
|
switch (parser.token) {
|
|
6345
6347
|
case 209008:
|
|
@@ -6347,10 +6349,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6347
6349
|
case 241773:
|
|
6348
6350
|
return parseYieldExpression(parser, context, inGroup, canAssign, start, line, column);
|
|
6349
6351
|
case 209007:
|
|
6350
|
-
return parseAsyncExpression(parser, context, inGroup, isLHS, canAssign,
|
|
6352
|
+
return parseAsyncExpression(parser, context, inGroup, isLHS, canAssign, inNew, start, line, column);
|
|
6351
6353
|
}
|
|
6352
6354
|
const { token, tokenValue } = parser;
|
|
6353
|
-
const expr = parseIdentifier(parser, context | 65536
|
|
6355
|
+
const expr = parseIdentifier(parser, context | 65536);
|
|
6354
6356
|
if (parser.token === 10) {
|
|
6355
6357
|
if (!isLHS)
|
|
6356
6358
|
report(parser, 0);
|
|
@@ -6429,7 +6431,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6429
6431
|
}
|
|
6430
6432
|
}
|
|
6431
6433
|
function parseImportCallOrMetaExpression(parser, context, inNew, inGroup, start, line, column) {
|
|
6432
|
-
let expr = parseIdentifier(parser, context
|
|
6434
|
+
let expr = parseIdentifier(parser, context);
|
|
6433
6435
|
if (parser.token === 67108877) {
|
|
6434
6436
|
return parseImportMetaExpression(parser, context, expr, start, line, column);
|
|
6435
6437
|
}
|
|
@@ -6449,14 +6451,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6449
6451
|
return finishNode(parser, context, start, line, column, {
|
|
6450
6452
|
type: 'MetaProperty',
|
|
6451
6453
|
meta,
|
|
6452
|
-
property: parseIdentifier(parser, context
|
|
6454
|
+
property: parseIdentifier(parser, context)
|
|
6453
6455
|
});
|
|
6454
6456
|
}
|
|
6455
6457
|
function parseImportExpression(parser, context, inGroup, start, line, column) {
|
|
6456
6458
|
consume(parser, context | 32768, 67174411);
|
|
6457
6459
|
if (parser.token === 14)
|
|
6458
6460
|
report(parser, 139);
|
|
6459
|
-
const source = parseExpression(parser, context, 1,
|
|
6461
|
+
const source = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6460
6462
|
consume(parser, context, 16);
|
|
6461
6463
|
return finishNode(parser, context, start, line, column, {
|
|
6462
6464
|
type: 'ImportExpression',
|
|
@@ -6545,7 +6547,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6545
6547
|
function parseSpreadElement(parser, context, start, line, column) {
|
|
6546
6548
|
context = (context | 134217728) ^ 134217728;
|
|
6547
6549
|
consume(parser, context | 32768, 14);
|
|
6548
|
-
const argument = parseExpression(parser, context, 1, 0,
|
|
6550
|
+
const argument = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6549
6551
|
parser.assignable = 1;
|
|
6550
6552
|
return finishNode(parser, context, start, line, column, {
|
|
6551
6553
|
type: 'SpreadElement',
|
|
@@ -6564,7 +6566,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6564
6566
|
args.push(parseSpreadElement(parser, context, parser.tokenPos, parser.linePos, parser.colPos));
|
|
6565
6567
|
}
|
|
6566
6568
|
else {
|
|
6567
|
-
args.push(parseExpression(parser, context, 1,
|
|
6569
|
+
args.push(parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
|
|
6568
6570
|
}
|
|
6569
6571
|
if (parser.token !== 18)
|
|
6570
6572
|
break;
|
|
@@ -6575,19 +6577,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6575
6577
|
consume(parser, context, 16);
|
|
6576
6578
|
return args;
|
|
6577
6579
|
}
|
|
6578
|
-
function parseIdentifier(parser, context
|
|
6580
|
+
function parseIdentifier(parser, context) {
|
|
6579
6581
|
const { tokenValue, tokenPos, linePos, colPos } = parser;
|
|
6580
6582
|
nextToken(parser, context);
|
|
6581
|
-
return finishNode(parser, context, tokenPos, linePos, colPos,
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
pattern: isPattern === 1
|
|
6586
|
-
}
|
|
6587
|
-
: {
|
|
6588
|
-
type: 'Identifier',
|
|
6589
|
-
name: tokenValue
|
|
6590
|
-
});
|
|
6583
|
+
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
6584
|
+
type: 'Identifier',
|
|
6585
|
+
name: tokenValue
|
|
6586
|
+
});
|
|
6591
6587
|
}
|
|
6592
6588
|
function parseLiteral(parser, context) {
|
|
6593
6589
|
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
|
@@ -6662,7 +6658,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6662
6658
|
}
|
|
6663
6659
|
firstRestricted = parser.token;
|
|
6664
6660
|
if (parser.token & 143360) {
|
|
6665
|
-
id = parseIdentifier(parser, context
|
|
6661
|
+
id = parseIdentifier(parser, context);
|
|
6666
6662
|
}
|
|
6667
6663
|
else {
|
|
6668
6664
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
@@ -6672,7 +6668,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6672
6668
|
((context | 32243712) ^ 32243712) |
|
|
6673
6669
|
67108864 |
|
|
6674
6670
|
((isAsync * 2 + isGenerator) << 21) |
|
|
6675
|
-
(isGenerator ? 0 :
|
|
6671
|
+
(isGenerator ? 0 : 268435456);
|
|
6676
6672
|
if (scope)
|
|
6677
6673
|
functionScope = addChildScope(functionScope, 512);
|
|
6678
6674
|
const params = parseFormalParametersOrFormalList(parser, context | 8388608, functionScope, 0, 1);
|
|
@@ -6699,13 +6695,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6699
6695
|
if (scope)
|
|
6700
6696
|
scope = addChildScope(scope, 256);
|
|
6701
6697
|
firstRestricted = parser.token;
|
|
6702
|
-
id = parseIdentifier(parser, context
|
|
6698
|
+
id = parseIdentifier(parser, context);
|
|
6703
6699
|
}
|
|
6704
6700
|
context =
|
|
6705
6701
|
((context | 32243712) ^ 32243712) |
|
|
6706
6702
|
67108864 |
|
|
6707
6703
|
generatorAndAsyncFlags |
|
|
6708
|
-
(isGenerator ? 0 :
|
|
6704
|
+
(isGenerator ? 0 : 268435456);
|
|
6709
6705
|
if (scope)
|
|
6710
6706
|
scope = addChildScope(scope, 512);
|
|
6711
6707
|
const params = parseFormalParametersOrFormalList(parser, context | 8388608, scope, inGroup, 1);
|
|
@@ -6743,14 +6739,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6743
6739
|
let left;
|
|
6744
6740
|
const { token, tokenPos, linePos, colPos, tokenValue } = parser;
|
|
6745
6741
|
if (token & 143360) {
|
|
6746
|
-
left = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
6742
|
+
left = parsePrimaryExpression(parser, context, kind, 0, 1, inGroup, 1, tokenPos, linePos, colPos);
|
|
6747
6743
|
if (parser.token === 1077936157) {
|
|
6748
6744
|
if (parser.assignable & 2)
|
|
6749
6745
|
report(parser, 24);
|
|
6750
6746
|
nextToken(parser, context | 32768);
|
|
6751
6747
|
if (scope)
|
|
6752
6748
|
addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
|
|
6753
|
-
const right = parseExpression(parser, context, 1,
|
|
6749
|
+
const right = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6754
6750
|
left = finishNode(parser, context, tokenPos, linePos, colPos, isPattern
|
|
6755
6751
|
? {
|
|
6756
6752
|
type: 'AssignmentPattern',
|
|
@@ -6889,7 +6885,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6889
6885
|
if (!isPattern)
|
|
6890
6886
|
reinterpretToPattern(parser, node);
|
|
6891
6887
|
const { tokenPos, linePos, colPos } = parser;
|
|
6892
|
-
const right = parseExpression(parser, context, 1,
|
|
6888
|
+
const right = parseExpression(parser, context, 1, inGroup, tokenPos, linePos, colPos);
|
|
6893
6889
|
parser.destructible =
|
|
6894
6890
|
((destructible | 64 | 8) ^
|
|
6895
6891
|
(8 | 64)) |
|
|
@@ -6915,7 +6911,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6915
6911
|
let { token, tokenValue, tokenPos, linePos, colPos } = parser;
|
|
6916
6912
|
if (token & (4096 | 143360)) {
|
|
6917
6913
|
parser.assignable = 1;
|
|
6918
|
-
argument = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
6914
|
+
argument = parsePrimaryExpression(parser, context, kind, 0, 1, inGroup, 1, tokenPos, linePos, colPos);
|
|
6919
6915
|
token = parser.token;
|
|
6920
6916
|
argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
|
|
6921
6917
|
if (parser.token !== 18 && parser.token !== closingToken) {
|
|
@@ -7010,7 +7006,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7010
7006
|
if (destructible & 16)
|
|
7011
7007
|
report(parser, 24);
|
|
7012
7008
|
reinterpretToPattern(parser, argument);
|
|
7013
|
-
const right = parseExpression(parser, context, 1,
|
|
7009
|
+
const right = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7014
7010
|
argument = finishNode(parser, context, tokenPos, linePos, colPos, isPattern
|
|
7015
7011
|
? {
|
|
7016
7012
|
type: 'AssignmentPattern',
|
|
@@ -7082,7 +7078,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7082
7078
|
let value;
|
|
7083
7079
|
const t = parser.token;
|
|
7084
7080
|
if (parser.token & (143360 | 4096) || parser.token === 121) {
|
|
7085
|
-
key = parseIdentifier(parser, context
|
|
7081
|
+
key = parseIdentifier(parser, context);
|
|
7086
7082
|
if (parser.token === 18 || parser.token === 1074790415 || parser.token === 1077936157) {
|
|
7087
7083
|
state |= 4;
|
|
7088
7084
|
if (context & 1024 && (token & 537079808) === 537079808) {
|
|
@@ -7095,7 +7091,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7095
7091
|
addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
|
|
7096
7092
|
if (consumeOpt(parser, context | 32768, 1077936157)) {
|
|
7097
7093
|
destructible |= 8;
|
|
7098
|
-
const right = parseExpression(parser, context, 1,
|
|
7094
|
+
const right = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7099
7095
|
destructible |=
|
|
7100
7096
|
parser.destructible & 256
|
|
7101
7097
|
? 256
|
|
@@ -7104,7 +7100,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7104
7100
|
: 0;
|
|
7105
7101
|
value = finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
7106
7102
|
type: 'AssignmentPattern',
|
|
7107
|
-
left: context &
|
|
7103
|
+
left: context & 536870912 ? Object.assign({}, key) : key,
|
|
7108
7104
|
right
|
|
7109
7105
|
});
|
|
7110
7106
|
}
|
|
@@ -7112,7 +7108,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7112
7108
|
destructible |=
|
|
7113
7109
|
(token === 209008 ? 128 : 0) |
|
|
7114
7110
|
(token === 121 ? 16 : 0);
|
|
7115
|
-
value = context &
|
|
7111
|
+
value = context & 536870912 ? Object.assign({}, key) : key;
|
|
7116
7112
|
}
|
|
7117
7113
|
}
|
|
7118
7114
|
else if (consumeOpt(parser, context | 32768, 21)) {
|
|
@@ -7123,7 +7119,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7123
7119
|
const tokenAfterColon = parser.token;
|
|
7124
7120
|
const valueAfterColon = parser.tokenValue;
|
|
7125
7121
|
destructible |= t === 121 ? 16 : 0;
|
|
7126
|
-
value = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
7122
|
+
value = parsePrimaryExpression(parser, context, kind, 0, 1, inGroup, 1, tokenPos, linePos, colPos);
|
|
7127
7123
|
const { token } = parser;
|
|
7128
7124
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
7129
7125
|
if (parser.token === 18 || parser.token === 1074790415) {
|
|
@@ -7244,7 +7240,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7244
7240
|
report(parser, 129);
|
|
7245
7241
|
state |= 16;
|
|
7246
7242
|
}
|
|
7247
|
-
key = parseIdentifier(parser, context
|
|
7243
|
+
key = parseIdentifier(parser, context);
|
|
7248
7244
|
state |=
|
|
7249
7245
|
token === 12402
|
|
7250
7246
|
? 256
|
|
@@ -7273,7 +7269,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7273
7269
|
state |=
|
|
7274
7270
|
8 | 1 | (token === 209007 ? 16 : 0);
|
|
7275
7271
|
if (parser.token & 143360) {
|
|
7276
|
-
key = parseIdentifier(parser, context
|
|
7272
|
+
key = parseIdentifier(parser, context);
|
|
7277
7273
|
}
|
|
7278
7274
|
else if ((parser.token & 134217728) === 134217728) {
|
|
7279
7275
|
key = parseLiteral(parser, context);
|
|
@@ -7313,7 +7309,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7313
7309
|
if (tokenValue === '__proto__')
|
|
7314
7310
|
prototypeCount++;
|
|
7315
7311
|
if (parser.token & 143360) {
|
|
7316
|
-
value = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
7312
|
+
value = parsePrimaryExpression(parser, context, kind, 0, 1, inGroup, 1, tokenPos, linePos, colPos);
|
|
7317
7313
|
const { token, tokenValue: valueAfterColon } = parser;
|
|
7318
7314
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
7319
7315
|
if (parser.token === 18 || parser.token === 1074790415) {
|
|
@@ -7414,7 +7410,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7414
7410
|
nextToken(parser, context | 32768);
|
|
7415
7411
|
const { tokenPos, linePos, colPos, tokenValue, token: tokenAfterColon } = parser;
|
|
7416
7412
|
if (parser.token & 143360) {
|
|
7417
|
-
value = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
7413
|
+
value = parsePrimaryExpression(parser, context, kind, 0, 1, inGroup, 1, tokenPos, linePos, colPos);
|
|
7418
7414
|
const { token } = parser;
|
|
7419
7415
|
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
|
|
7420
7416
|
if ((parser.token & 4194304) === 4194304) {
|
|
@@ -7520,7 +7516,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7520
7516
|
state |= 8;
|
|
7521
7517
|
if (parser.token & 143360) {
|
|
7522
7518
|
const { token, line, index } = parser;
|
|
7523
|
-
key = parseIdentifier(parser, context
|
|
7519
|
+
key = parseIdentifier(parser, context);
|
|
7524
7520
|
state |= 1;
|
|
7525
7521
|
if (parser.token === 67174411) {
|
|
7526
7522
|
destructible |= 16;
|
|
@@ -7634,7 +7630,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7634
7630
|
if (parser.token === 1077936157) {
|
|
7635
7631
|
nextToken(parser, context | 32768);
|
|
7636
7632
|
isSimpleParameterList = 1;
|
|
7637
|
-
const right = parseExpression(parser, context, 1,
|
|
7633
|
+
const right = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7638
7634
|
left = finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
7639
7635
|
type: 'AssignmentPattern',
|
|
7640
7636
|
left: left,
|
|
@@ -7661,14 +7657,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7661
7657
|
}
|
|
7662
7658
|
function parseComputedPropertyName(parser, context, inGroup) {
|
|
7663
7659
|
nextToken(parser, context | 32768);
|
|
7664
|
-
const key = parseExpression(parser, (context | 134217728) ^ 134217728, 1,
|
|
7660
|
+
const key = parseExpression(parser, (context | 134217728) ^ 134217728, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7665
7661
|
consume(parser, context, 20);
|
|
7666
7662
|
return key;
|
|
7667
7663
|
}
|
|
7668
7664
|
function parseParenthesizedExpression(parser, context, canAssign, kind, origin, start, line, column) {
|
|
7669
7665
|
parser.flags = (parser.flags | 128) ^ 128;
|
|
7670
7666
|
const { tokenPos: piStart, linePos: plStart, colPos: pcStart } = parser;
|
|
7671
|
-
nextToken(parser, context | 32768 |
|
|
7667
|
+
nextToken(parser, context | 32768 | 268435456);
|
|
7672
7668
|
const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
|
|
7673
7669
|
context = (context | 134217728) ^ 134217728;
|
|
7674
7670
|
if (consumeOpt(parser, context, 16)) {
|
|
@@ -7687,7 +7683,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7687
7683
|
if (token & (143360 | 4096)) {
|
|
7688
7684
|
if (scope)
|
|
7689
7685
|
addBlockName(parser, context, scope, parser.tokenValue, 1, 0);
|
|
7690
|
-
expr = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
7686
|
+
expr = parsePrimaryExpression(parser, context, kind, 0, 1, 1, 1, tokenPos, linePos, colPos);
|
|
7691
7687
|
if (parser.token === 16 || parser.token === 18) {
|
|
7692
7688
|
if (parser.assignable & 2) {
|
|
7693
7689
|
destructible |= 16;
|
|
@@ -7714,8 +7710,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7714
7710
|
else if ((token & 2097152) === 2097152) {
|
|
7715
7711
|
expr =
|
|
7716
7712
|
token === 2162700
|
|
7717
|
-
? parseObjectLiteralOrPattern(parser, context |
|
|
7718
|
-
: 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);
|
|
7719
7715
|
destructible |= parser.destructible;
|
|
7720
7716
|
isSimpleParameterList = 1;
|
|
7721
7717
|
parser.assignable = 2;
|
|
@@ -7742,7 +7738,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7742
7738
|
}
|
|
7743
7739
|
else {
|
|
7744
7740
|
destructible |= 16;
|
|
7745
|
-
expr = parseExpression(parser, context, 1,
|
|
7741
|
+
expr = parseExpression(parser, context, 1, 1, tokenPos, linePos, colPos);
|
|
7746
7742
|
if (isSequence && (parser.token === 16 || parser.token === 18)) {
|
|
7747
7743
|
expressions.push(expr);
|
|
7748
7744
|
}
|
|
@@ -7754,7 +7750,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7754
7750
|
}
|
|
7755
7751
|
if (isSequence) {
|
|
7756
7752
|
while (consumeOpt(parser, context | 32768, 18)) {
|
|
7757
|
-
expressions.push(parseExpression(parser, context, 1,
|
|
7753
|
+
expressions.push(parseExpression(parser, context, 1, 1, parser.tokenPos, parser.linePos, parser.colPos));
|
|
7758
7754
|
}
|
|
7759
7755
|
parser.assignable = 2;
|
|
7760
7756
|
expr = finishNode(parser, context, iStart, lStart, cStart, {
|
|
@@ -7821,7 +7817,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7821
7817
|
}
|
|
7822
7818
|
function parseIdentifierOrArrow(parser, context, start, line, column) {
|
|
7823
7819
|
const { tokenValue } = parser;
|
|
7824
|
-
const expr = parseIdentifier(parser, context
|
|
7820
|
+
const expr = parseIdentifier(parser, context);
|
|
7825
7821
|
parser.assignable = 1;
|
|
7826
7822
|
if (parser.token === 10) {
|
|
7827
7823
|
let scope = void 0;
|
|
@@ -7859,7 +7855,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7859
7855
|
reportScopeError(scope.scopeError);
|
|
7860
7856
|
}
|
|
7861
7857
|
if (expression) {
|
|
7862
|
-
body = parseExpression(parser, context, 1, 0,
|
|
7858
|
+
body = parseExpression(parser, context & 16384 ? context | 33554432 : context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7863
7859
|
}
|
|
7864
7860
|
else {
|
|
7865
7861
|
if (scope)
|
|
@@ -7940,7 +7936,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7940
7936
|
if (parser.token === 1077936157) {
|
|
7941
7937
|
nextToken(parser, context | 32768);
|
|
7942
7938
|
isSimpleParameterList = 1;
|
|
7943
|
-
const right = parseExpression(parser, context, 1,
|
|
7939
|
+
const right = parseExpression(parser, context, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
|
7944
7940
|
left = finishNode(parser, context, tokenPos, linePos, colPos, {
|
|
7945
7941
|
type: 'AssignmentPattern',
|
|
7946
7942
|
left,
|
|
@@ -7966,7 +7962,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7966
7962
|
const { token } = parser;
|
|
7967
7963
|
if (token & 67108864) {
|
|
7968
7964
|
if (token === 67108877) {
|
|
7969
|
-
nextToken(parser, context |
|
|
7965
|
+
nextToken(parser, context | 268435456);
|
|
7970
7966
|
parser.assignable = 1;
|
|
7971
7967
|
const property = parsePropertyOrPrivatePropertyName(parser, context);
|
|
7972
7968
|
return parseMembeExpressionNoCall(parser, context, finishNode(parser, context, start, line, column, {
|
|
@@ -8003,7 +7999,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8003
7999
|
return expr;
|
|
8004
8000
|
}
|
|
8005
8001
|
function parseNewExpression(parser, context, inGroup, start, line, column) {
|
|
8006
|
-
const id = parseIdentifier(parser, context | 32768
|
|
8002
|
+
const id = parseIdentifier(parser, context | 32768);
|
|
8007
8003
|
const { tokenPos, linePos, colPos } = parser;
|
|
8008
8004
|
if (consumeOpt(parser, context, 67108877)) {
|
|
8009
8005
|
if (context & 67108864 && parser.token === 143494) {
|
|
@@ -8016,7 +8012,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8016
8012
|
if ((parser.token & 16842752) === 16842752) {
|
|
8017
8013
|
report(parser, 63, KeywordDescTable[parser.token & 255]);
|
|
8018
8014
|
}
|
|
8019
|
-
const expr = parsePrimaryExpression(parser, context, 2, 1, 0,
|
|
8015
|
+
const expr = parsePrimaryExpression(parser, context, 2, 1, 0, inGroup, 1, tokenPos, linePos, colPos);
|
|
8020
8016
|
context = (context | 134217728) ^ 134217728;
|
|
8021
8017
|
if (parser.token === 67108991)
|
|
8022
8018
|
report(parser, 163);
|
|
@@ -8029,7 +8025,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8029
8025
|
});
|
|
8030
8026
|
}
|
|
8031
8027
|
function parseMetaProperty(parser, context, meta, start, line, column) {
|
|
8032
|
-
const property = parseIdentifier(parser, context
|
|
8028
|
+
const property = parseIdentifier(parser, context);
|
|
8033
8029
|
return finishNode(parser, context, start, line, column, {
|
|
8034
8030
|
type: 'MetaProperty',
|
|
8035
8031
|
meta,
|
|
@@ -8045,7 +8041,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8045
8041
|
if ((parser.token & 537079808) === 537079808) {
|
|
8046
8042
|
parser.flags |= 512;
|
|
8047
8043
|
}
|
|
8048
|
-
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);
|
|
8049
8045
|
}
|
|
8050
8046
|
function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kind, origin, flags, start, line, column) {
|
|
8051
8047
|
nextToken(parser, context | 32768);
|
|
@@ -8075,7 +8071,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8075
8071
|
if (token & (143360 | 4096)) {
|
|
8076
8072
|
if (scope)
|
|
8077
8073
|
addBlockName(parser, context, scope, parser.tokenValue, kind, 0);
|
|
8078
|
-
expr = parsePrimaryExpression(parser, context, kind, 0, 1,
|
|
8074
|
+
expr = parsePrimaryExpression(parser, context, kind, 0, 1, 1, 1, tokenPos, linePos, colPos);
|
|
8079
8075
|
if (parser.token === 16 || parser.token === 18) {
|
|
8080
8076
|
if (parser.assignable & 2) {
|
|
8081
8077
|
destructible |= 16;
|
|
@@ -8127,11 +8123,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8127
8123
|
isSimpleParameterList = 1;
|
|
8128
8124
|
}
|
|
8129
8125
|
else {
|
|
8130
|
-
expr = parseExpression(parser, context, 1, 0,
|
|
8126
|
+
expr = parseExpression(parser, context, 1, 0, tokenPos, linePos, colPos);
|
|
8131
8127
|
destructible = parser.assignable;
|
|
8132
8128
|
params.push(expr);
|
|
8133
8129
|
while (consumeOpt(parser, context | 32768, 18)) {
|
|
8134
|
-
params.push(parseExpression(parser, context, 1, 0,
|
|
8130
|
+
params.push(parseExpression(parser, context, 1, 0, tokenPos, linePos, colPos));
|
|
8135
8131
|
}
|
|
8136
8132
|
destructible |= parser.assignable;
|
|
8137
8133
|
consume(parser, context, 16);
|
|
@@ -8226,7 +8222,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8226
8222
|
}
|
|
8227
8223
|
}
|
|
8228
8224
|
}
|
|
8229
|
-
id = parseIdentifier(parser, context
|
|
8225
|
+
id = parseIdentifier(parser, context);
|
|
8230
8226
|
}
|
|
8231
8227
|
else {
|
|
8232
8228
|
if ((flags & 1) === 0)
|
|
@@ -8273,7 +8269,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8273
8269
|
if ((parser.token & 537079808) === 537079808) {
|
|
8274
8270
|
report(parser, 116);
|
|
8275
8271
|
}
|
|
8276
|
-
id = parseIdentifier(parser, context
|
|
8272
|
+
id = parseIdentifier(parser, context);
|
|
8277
8273
|
}
|
|
8278
8274
|
let inheritedContext = context;
|
|
8279
8275
|
if (consumeOpt(parser, context | 32768, 20567)) {
|
|
@@ -8311,7 +8307,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8311
8307
|
}
|
|
8312
8308
|
function parseDecoratorList(parser, context, start, line, column) {
|
|
8313
8309
|
nextToken(parser, context | 32768);
|
|
8314
|
-
let expression = parsePrimaryExpression(parser, context, 2, 0, 1, 0,
|
|
8310
|
+
let expression = parsePrimaryExpression(parser, context, 2, 0, 1, 0, 1, start, line, column);
|
|
8315
8311
|
expression = parseMemberOrUpdateExpression(parser, context, expression, 0, 0, start, line, column);
|
|
8316
8312
|
return finishNode(parser, context, start, line, column, {
|
|
8317
8313
|
type: 'Decorator',
|
|
@@ -8354,7 +8350,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8354
8350
|
let key = null;
|
|
8355
8351
|
const { token, tokenPos, linePos, colPos } = parser;
|
|
8356
8352
|
if (token & (143360 | 36864)) {
|
|
8357
|
-
key = parseIdentifier(parser, context
|
|
8353
|
+
key = parseIdentifier(parser, context);
|
|
8358
8354
|
switch (token) {
|
|
8359
8355
|
case 36972:
|
|
8360
8356
|
if (!isStatic &&
|
|
@@ -8412,7 +8408,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8412
8408
|
return parseStaticBlock(parser, context, scope, tokenPos, linePos, colPos);
|
|
8413
8409
|
}
|
|
8414
8410
|
else if (token === 122) {
|
|
8415
|
-
key = parseIdentifier(parser, context
|
|
8411
|
+
key = parseIdentifier(parser, context);
|
|
8416
8412
|
if (parser.token !== 67174411)
|
|
8417
8413
|
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
|
8418
8414
|
}
|
|
@@ -8421,7 +8417,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8421
8417
|
}
|
|
8422
8418
|
if (kind & (8 | 16 | 768)) {
|
|
8423
8419
|
if (parser.token & 143360) {
|
|
8424
|
-
key = parseIdentifier(parser, context
|
|
8420
|
+
key = parseIdentifier(parser, context);
|
|
8425
8421
|
}
|
|
8426
8422
|
else if ((parser.token & 134217728) === 134217728) {
|
|
8427
8423
|
key = parseLiteral(parser, context);
|
|
@@ -8431,7 +8427,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8431
8427
|
key = parseComputedPropertyName(parser, context, 0);
|
|
8432
8428
|
}
|
|
8433
8429
|
else if (parser.token === 122) {
|
|
8434
|
-
key = parseIdentifier(parser, context
|
|
8430
|
+
key = parseIdentifier(parser, context);
|
|
8435
8431
|
}
|
|
8436
8432
|
else if (context & 1 && parser.token === 131) {
|
|
8437
8433
|
kind |= 4096;
|
|
@@ -8519,7 +8515,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8519
8515
|
const { tokenPos, linePos, colPos } = parser;
|
|
8520
8516
|
if (parser.token === 537079928)
|
|
8521
8517
|
report(parser, 116);
|
|
8522
|
-
|
|
8518
|
+
const modifierFlags = (state & 64) === 0
|
|
8519
|
+
? 31981568
|
|
8520
|
+
: 14680064;
|
|
8521
|
+
context =
|
|
8522
|
+
((context | modifierFlags) ^ modifierFlags) |
|
|
8523
|
+
((state & 88) << 18) |
|
|
8524
|
+
100925440;
|
|
8525
|
+
value = parsePrimaryExpression(parser, context | 16384, 2, 0, 1, 0, 1, tokenPos, linePos, colPos);
|
|
8523
8526
|
if ((parser.token & 1073741824) !== 1073741824 ||
|
|
8524
8527
|
(parser.token & 4194304) === 4194304) {
|
|
8525
8528
|
value = parseMemberOrUpdateExpression(parser, context | 16384, value, 0, 0, tokenPos, linePos, colPos);
|
|
@@ -8727,7 +8730,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8727
8730
|
function parseJSXSpreadAttribute(parser, context, start, line, column) {
|
|
8728
8731
|
nextToken(parser, context);
|
|
8729
8732
|
consume(parser, context, 14);
|
|
8730
|
-
const expression = parseExpression(parser, context, 1, 0,
|
|
8733
|
+
const expression = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
8731
8734
|
consume(parser, context, 1074790415);
|
|
8732
8735
|
return finishNode(parser, context, start, line, column, {
|
|
8733
8736
|
type: 'JSXSpreadAttribute',
|
|
@@ -8787,7 +8790,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8787
8790
|
expression = parseJSXEmptyExpression(parser, context, parser.startPos, parser.startLine, parser.startColumn);
|
|
8788
8791
|
}
|
|
8789
8792
|
else {
|
|
8790
|
-
expression = parseExpression(parser, context, 1, 0,
|
|
8793
|
+
expression = parseExpression(parser, context, 1, 0, tokenPos, linePos, colPos);
|
|
8791
8794
|
}
|
|
8792
8795
|
if (inJSXChild) {
|
|
8793
8796
|
consume(parser, context, 1074790415);
|
|
@@ -8802,7 +8805,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8802
8805
|
}
|
|
8803
8806
|
function parseJSXSpreadChild(parser, context, start, line, column) {
|
|
8804
8807
|
consume(parser, context, 14);
|
|
8805
|
-
const expression = parseExpression(parser, context, 1, 0,
|
|
8808
|
+
const expression = parseExpression(parser, context, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
|
8806
8809
|
consume(parser, context, 1074790415);
|
|
8807
8810
|
return finishNode(parser, context, start, line, column, {
|
|
8808
8811
|
type: 'JSXSpreadChild',
|
|
@@ -8830,7 +8833,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8830
8833
|
__proto__: null
|
|
8831
8834
|
});
|
|
8832
8835
|
|
|
8833
|
-
var version$1 = "4.4.
|
|
8836
|
+
var version$1 = "4.4.4";
|
|
8834
8837
|
|
|
8835
8838
|
const version = version$1;
|
|
8836
8839
|
function parseScript(source, options) {
|