@diagonal-hq/cli 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +358 -298
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -237492,9 +237492,9 @@ var require_trace_mapping_umd = __commonJS({
|
|
|
237492
237492
|
}
|
|
237493
237493
|
});
|
|
237494
237494
|
|
|
237495
|
-
// node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js
|
|
237495
|
+
// node_modules/sucrase/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js
|
|
237496
237496
|
var require_gen_mapping_umd = __commonJS({
|
|
237497
|
-
"node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(exports, module) {
|
|
237497
|
+
"node_modules/sucrase/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(exports, module) {
|
|
237498
237498
|
init_define_globalThis_DIAGONAL_SDK_RUNTIME();
|
|
237499
237499
|
(function(global2, factory) {
|
|
237500
237500
|
if (typeof exports === "object" && typeof module !== "undefined") {
|
|
@@ -250707,6 +250707,9 @@ var tt = {
|
|
|
250707
250707
|
_while: createKeyword("while", {
|
|
250708
250708
|
isLoop
|
|
250709
250709
|
}),
|
|
250710
|
+
_arguments: createKeywordLike("arguments", {
|
|
250711
|
+
startsExpr
|
|
250712
|
+
}),
|
|
250710
250713
|
_as: createKeywordLike("as", {
|
|
250711
250714
|
startsExpr
|
|
250712
250715
|
}),
|
|
@@ -250856,16 +250859,16 @@ var tt = {
|
|
|
250856
250859
|
jsxTagEnd: createToken("jsxTagEnd")
|
|
250857
250860
|
};
|
|
250858
250861
|
function tokenIsIdentifier(token) {
|
|
250859
|
-
return token >= 89 && token <=
|
|
250862
|
+
return token >= 89 && token <= 130;
|
|
250860
250863
|
}
|
|
250861
250864
|
function tokenKeywordOrIdentifierIsKeyword(token) {
|
|
250862
250865
|
return token <= 88;
|
|
250863
250866
|
}
|
|
250864
250867
|
function tokenIsKeywordOrIdentifier(token) {
|
|
250865
|
-
return token >= 54 && token <=
|
|
250868
|
+
return token >= 54 && token <= 130;
|
|
250866
250869
|
}
|
|
250867
250870
|
function tokenIsLiteralPropertyName(token) {
|
|
250868
|
-
return token >= 54 && token <=
|
|
250871
|
+
return token >= 54 && token <= 133;
|
|
250869
250872
|
}
|
|
250870
250873
|
function tokenComesBeforeExpression(token) {
|
|
250871
250874
|
return tokenBeforeExprs[token];
|
|
@@ -250877,7 +250880,7 @@ function tokenIsAssignment(token) {
|
|
|
250877
250880
|
return token >= 25 && token <= 29;
|
|
250878
250881
|
}
|
|
250879
250882
|
function tokenIsFlowInterfaceOrTypeOrOpaque(token) {
|
|
250880
|
-
return token >=
|
|
250883
|
+
return token >= 126 && token <= 128;
|
|
250881
250884
|
}
|
|
250882
250885
|
function tokenIsLoop(token) {
|
|
250883
250886
|
return token >= 86 && token <= 88;
|
|
@@ -250895,10 +250898,10 @@ function tokenIsPrefix(token) {
|
|
|
250895
250898
|
return tokenPrefixes[token];
|
|
250896
250899
|
}
|
|
250897
250900
|
function tokenIsTSTypeOperator(token) {
|
|
250898
|
-
return token >=
|
|
250901
|
+
return token >= 118 && token <= 120;
|
|
250899
250902
|
}
|
|
250900
250903
|
function tokenIsTSDeclarationStart(token) {
|
|
250901
|
-
return token >=
|
|
250904
|
+
return token >= 121 && token <= 127;
|
|
250902
250905
|
}
|
|
250903
250906
|
function tokenLabelName(token) {
|
|
250904
250907
|
return tokenLabels[token];
|
|
@@ -251308,7 +251311,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251308
251311
|
return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
|
|
251309
251312
|
}
|
|
251310
251313
|
finishToken(type, val) {
|
|
251311
|
-
if (type !==
|
|
251314
|
+
if (type !== 131 && type !== 9 && type !== 24) {
|
|
251312
251315
|
if (this.flowPragma === void 0) {
|
|
251313
251316
|
this.flowPragma = null;
|
|
251314
251317
|
}
|
|
@@ -251341,7 +251344,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251341
251344
|
const node = this.startNode();
|
|
251342
251345
|
const moduloLoc = this.state.startLoc;
|
|
251343
251346
|
this.next();
|
|
251344
|
-
this.expectContextual(
|
|
251347
|
+
this.expectContextual(107);
|
|
251345
251348
|
if (this.state.lastTokStartLoc.index > moduloLoc.index + 1) {
|
|
251346
251349
|
this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, moduloLoc);
|
|
251347
251350
|
}
|
|
@@ -251407,7 +251410,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251407
251410
|
return this.flowParseDeclareFunction(node);
|
|
251408
251411
|
} else if (this.match(70)) {
|
|
251409
251412
|
return this.flowParseDeclareVariable(node);
|
|
251410
|
-
} else if (this.eatContextual(
|
|
251413
|
+
} else if (this.eatContextual(124)) {
|
|
251411
251414
|
if (this.match(12)) {
|
|
251412
251415
|
return this.flowParseDeclareModuleExports(node);
|
|
251413
251416
|
} else {
|
|
@@ -251416,11 +251419,11 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251416
251419
|
}
|
|
251417
251420
|
return this.flowParseDeclareModule(node);
|
|
251418
251421
|
}
|
|
251419
|
-
} else if (this.isContextual(126)) {
|
|
251420
|
-
return this.flowParseDeclareTypeAlias(node);
|
|
251421
251422
|
} else if (this.isContextual(127)) {
|
|
251423
|
+
return this.flowParseDeclareTypeAlias(node);
|
|
251424
|
+
} else if (this.isContextual(128)) {
|
|
251422
251425
|
return this.flowParseDeclareOpaqueType(node);
|
|
251423
|
-
} else if (this.isContextual(
|
|
251426
|
+
} else if (this.isContextual(126)) {
|
|
251424
251427
|
return this.flowParseDeclareInterface(node);
|
|
251425
251428
|
} else if (this.match(78)) {
|
|
251426
251429
|
return this.flowParseDeclareExportDeclaration(node, insideModule);
|
|
@@ -251436,7 +251439,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251436
251439
|
}
|
|
251437
251440
|
flowParseDeclareModule(node) {
|
|
251438
251441
|
this.scope.enter(0);
|
|
251439
|
-
if (this.match(
|
|
251442
|
+
if (this.match(131)) {
|
|
251440
251443
|
node.id = super.parseExprAtom();
|
|
251441
251444
|
} else {
|
|
251442
251445
|
node.id = this.parseIdentifier();
|
|
@@ -251448,12 +251451,12 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251448
251451
|
const bodyNode2 = this.startNode();
|
|
251449
251452
|
if (this.match(79)) {
|
|
251450
251453
|
this.next();
|
|
251451
|
-
if (!this.isContextual(
|
|
251454
|
+
if (!this.isContextual(127) && !this.match(83)) {
|
|
251452
251455
|
this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc);
|
|
251453
251456
|
}
|
|
251454
251457
|
body.push(super.parseImport(bodyNode2));
|
|
251455
251458
|
} else {
|
|
251456
|
-
this.expectContextual(
|
|
251459
|
+
this.expectContextual(122, FlowErrors.UnsupportedStatementInDeclareModule);
|
|
251457
251460
|
body.push(this.flowParseDeclare(bodyNode2, true));
|
|
251458
251461
|
}
|
|
251459
251462
|
}
|
|
@@ -251494,18 +251497,18 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251494
251497
|
node.default = true;
|
|
251495
251498
|
return this.finishNode(node, "DeclareExportDeclaration");
|
|
251496
251499
|
} else {
|
|
251497
|
-
if (this.match(71) || this.isLet() || (this.isContextual(
|
|
251500
|
+
if (this.match(71) || this.isLet() || (this.isContextual(127) || this.isContextual(126)) && !insideModule) {
|
|
251498
251501
|
const label = this.state.value;
|
|
251499
251502
|
throw this.raise(FlowErrors.UnsupportedDeclareExportKind, this.state.startLoc, {
|
|
251500
251503
|
unsupportedExportKind: label,
|
|
251501
251504
|
suggestion: exportSuggestions[label]
|
|
251502
251505
|
});
|
|
251503
251506
|
}
|
|
251504
|
-
if (this.match(70) || this.match(64) || this.match(76) || this.isContextual(
|
|
251507
|
+
if (this.match(70) || this.match(64) || this.match(76) || this.isContextual(128)) {
|
|
251505
251508
|
node.declaration = this.flowParseDeclare(this.startNode());
|
|
251506
251509
|
node.default = false;
|
|
251507
251510
|
return this.finishNode(node, "DeclareExportDeclaration");
|
|
251508
|
-
} else if (this.match(51) || this.match(2) || this.isContextual(
|
|
251511
|
+
} else if (this.match(51) || this.match(2) || this.isContextual(126) || this.isContextual(127) || this.isContextual(128)) {
|
|
251509
251512
|
const result = this.parseExport(node, null);
|
|
251510
251513
|
if (result.type === "ExportNamedDeclaration") {
|
|
251511
251514
|
result.default = false;
|
|
@@ -251520,7 +251523,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251520
251523
|
}
|
|
251521
251524
|
flowParseDeclareModuleExports(node) {
|
|
251522
251525
|
this.next();
|
|
251523
|
-
this.expectContextual(
|
|
251526
|
+
this.expectContextual(108);
|
|
251524
251527
|
node.typeAnnotation = this.flowParseTypeAnnotation();
|
|
251525
251528
|
this.semicolon();
|
|
251526
251529
|
return this.finishNode(node, "DeclareModuleExports");
|
|
@@ -251557,12 +251560,12 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251557
251560
|
if (isClass3) {
|
|
251558
251561
|
const implemented = [];
|
|
251559
251562
|
const mixins = [];
|
|
251560
|
-
if (this.eatContextual(
|
|
251563
|
+
if (this.eatContextual(114)) {
|
|
251561
251564
|
do {
|
|
251562
251565
|
mixins.push(this.flowParseInterfaceExtends());
|
|
251563
251566
|
} while (this.eat(8));
|
|
251564
251567
|
}
|
|
251565
|
-
if (this.eatContextual(
|
|
251568
|
+
if (this.eatContextual(110)) {
|
|
251566
251569
|
do {
|
|
251567
251570
|
implemented.push(this.flowParseClassImplements());
|
|
251568
251571
|
} while (this.eat(8));
|
|
@@ -251625,7 +251628,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251625
251628
|
return this.finishNode(node, "TypeAlias");
|
|
251626
251629
|
}
|
|
251627
251630
|
flowParseOpaqueType(node, declare) {
|
|
251628
|
-
this.expectContextual(
|
|
251631
|
+
this.expectContextual(127);
|
|
251629
251632
|
node.id = this.flowParseRestrictedIdentifier(true, true);
|
|
251630
251633
|
this.scope.declareName(node.id.name, 8201, node.id.start);
|
|
251631
251634
|
if (this.match(43)) {
|
|
@@ -251674,7 +251677,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251674
251677
|
const node = this.startNode();
|
|
251675
251678
|
node.params = [];
|
|
251676
251679
|
this.state.inType = true;
|
|
251677
|
-
if (this.match(43) || this.match(
|
|
251680
|
+
if (this.match(43) || this.match(139)) {
|
|
251678
251681
|
this.next();
|
|
251679
251682
|
} else {
|
|
251680
251683
|
this.unexpected();
|
|
@@ -251754,7 +251757,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251754
251757
|
}
|
|
251755
251758
|
flowParseInterfaceType() {
|
|
251756
251759
|
const node = this.startNode();
|
|
251757
|
-
this.expectContextual(
|
|
251760
|
+
this.expectContextual(126);
|
|
251758
251761
|
node.extends = [];
|
|
251759
251762
|
if (this.eat(77)) {
|
|
251760
251763
|
do {
|
|
@@ -251771,7 +251774,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251771
251774
|
return this.finishNode(node, "InterfaceTypeAnnotation");
|
|
251772
251775
|
}
|
|
251773
251776
|
flowParseObjectPropertyKey() {
|
|
251774
|
-
return this.match(
|
|
251777
|
+
return this.match(132) || this.match(131) ? super.parseExprAtom() : this.parseIdentifier(true);
|
|
251775
251778
|
}
|
|
251776
251779
|
flowParseObjectTypeIndexer(node, isStatic2, variance2) {
|
|
251777
251780
|
node.static = isStatic2;
|
|
@@ -251872,7 +251875,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251872
251875
|
let protoStartLoc = null;
|
|
251873
251876
|
let inexactStartLoc = null;
|
|
251874
251877
|
const node = this.startNode();
|
|
251875
|
-
if (allowProto && this.isContextual(
|
|
251878
|
+
if (allowProto && this.isContextual(115)) {
|
|
251876
251879
|
const lookahead = this.lookahead();
|
|
251877
251880
|
if (lookahead.type !== 10 && lookahead.type !== 13) {
|
|
251878
251881
|
this.next();
|
|
@@ -251880,7 +251883,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251880
251883
|
allowStatic = false;
|
|
251881
251884
|
}
|
|
251882
251885
|
}
|
|
251883
|
-
if (allowStatic && this.isContextual(
|
|
251886
|
+
if (allowStatic && this.isContextual(103)) {
|
|
251884
251887
|
const lookahead = this.lookahead();
|
|
251885
251888
|
if (lookahead.type !== 10 && lookahead.type !== 13) {
|
|
251886
251889
|
this.next();
|
|
@@ -251910,7 +251913,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
251910
251913
|
nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic2));
|
|
251911
251914
|
} else {
|
|
251912
251915
|
let kind = "init";
|
|
251913
|
-
if (this.isContextual(
|
|
251916
|
+
if (this.isContextual(96) || this.isContextual(101)) {
|
|
251914
251917
|
const lookahead = this.lookahead();
|
|
251915
251918
|
if (tokenIsLiteralPropertyName(lookahead.type)) {
|
|
251916
251919
|
kind = this.state.value;
|
|
@@ -252212,7 +252215,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252212
252215
|
node2.typeParameters = null;
|
|
252213
252216
|
return this.finishNode(node2, "FunctionTypeAnnotation");
|
|
252214
252217
|
}
|
|
252215
|
-
case
|
|
252218
|
+
case 131:
|
|
252216
252219
|
return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
|
|
252217
252220
|
case 81:
|
|
252218
252221
|
case 82:
|
|
@@ -252222,18 +252225,18 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252222
252225
|
case 49:
|
|
252223
252226
|
if (this.state.value === "-") {
|
|
252224
252227
|
this.next();
|
|
252225
|
-
if (this.match(
|
|
252228
|
+
if (this.match(132)) {
|
|
252226
252229
|
return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
|
|
252227
252230
|
}
|
|
252228
|
-
if (this.match(
|
|
252231
|
+
if (this.match(133)) {
|
|
252229
252232
|
return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
|
|
252230
252233
|
}
|
|
252231
252234
|
throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc);
|
|
252232
252235
|
}
|
|
252233
252236
|
throw this.unexpected();
|
|
252234
|
-
case 131:
|
|
252235
|
-
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
252236
252237
|
case 132:
|
|
252238
|
+
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
252239
|
+
case 133:
|
|
252237
252240
|
return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
|
|
252238
252241
|
case 84:
|
|
252239
252242
|
this.next();
|
|
@@ -252255,7 +252258,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252255
252258
|
this.next();
|
|
252256
252259
|
return super.createIdentifier(node, label);
|
|
252257
252260
|
} else if (tokenIsIdentifier(this.state.type)) {
|
|
252258
|
-
if (this.isContextual(
|
|
252261
|
+
if (this.isContextual(126)) {
|
|
252259
252262
|
return this.flowParseInterfaceType();
|
|
252260
252263
|
}
|
|
252261
252264
|
return this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier());
|
|
@@ -252340,7 +252343,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252340
252343
|
return type;
|
|
252341
252344
|
}
|
|
252342
252345
|
flowParseTypeOrImplicitInstantiation() {
|
|
252343
|
-
if (this.state.type ===
|
|
252346
|
+
if (this.state.type === 129 && this.state.value === "_") {
|
|
252344
252347
|
const startLoc = this.state.startLoc;
|
|
252345
252348
|
const node = this.parseIdentifier();
|
|
252346
252349
|
return this.flowParseGenericType(startLoc, node);
|
|
@@ -252400,14 +252403,14 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252400
252403
|
return super.parseFunctionBodyAndFinish(node, type, isMethod3);
|
|
252401
252404
|
}
|
|
252402
252405
|
parseStatementLike(flags) {
|
|
252403
|
-
if (this.state.strict && this.isContextual(
|
|
252406
|
+
if (this.state.strict && this.isContextual(126)) {
|
|
252404
252407
|
const lookahead = this.lookahead();
|
|
252405
252408
|
if (tokenIsKeywordOrIdentifier(lookahead.type)) {
|
|
252406
252409
|
const node = this.startNode();
|
|
252407
252410
|
this.next();
|
|
252408
252411
|
return this.flowParseInterface(node);
|
|
252409
252412
|
}
|
|
252410
|
-
} else if (this.isContextual(
|
|
252413
|
+
} else if (this.isContextual(123)) {
|
|
252411
252414
|
const node = this.startNode();
|
|
252412
252415
|
this.next();
|
|
252413
252416
|
return this.flowParseEnumDeclaration(node);
|
|
@@ -252418,7 +252421,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252418
252421
|
}
|
|
252419
252422
|
return stmt;
|
|
252420
252423
|
}
|
|
252421
|
-
parseExpressionStatement(node, expr) {
|
|
252424
|
+
parseExpressionStatement(node, expr, flags) {
|
|
252422
252425
|
if (expr.type === "Identifier") {
|
|
252423
252426
|
if (expr.name === "declare") {
|
|
252424
252427
|
if (this.match(76) || tokenIsIdentifier(this.state.type) || this.match(64) || this.match(70) || this.match(78)) {
|
|
@@ -252434,13 +252437,13 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252434
252437
|
}
|
|
252435
252438
|
}
|
|
252436
252439
|
}
|
|
252437
|
-
return super.parseExpressionStatement(node, expr);
|
|
252440
|
+
return super.parseExpressionStatement(node, expr, flags);
|
|
252438
252441
|
}
|
|
252439
252442
|
shouldParseExportDeclaration() {
|
|
252440
252443
|
const {
|
|
252441
252444
|
type
|
|
252442
252445
|
} = this.state;
|
|
252443
|
-
if (type ===
|
|
252446
|
+
if (type === 123 || tokenIsFlowInterfaceOrTypeOrOpaque(type)) {
|
|
252444
252447
|
return !this.state.containsEsc;
|
|
252445
252448
|
}
|
|
252446
252449
|
return super.shouldParseExportDeclaration();
|
|
@@ -252449,13 +252452,13 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252449
252452
|
const {
|
|
252450
252453
|
type
|
|
252451
252454
|
} = this.state;
|
|
252452
|
-
if (type ===
|
|
252455
|
+
if (type === 123 || tokenIsFlowInterfaceOrTypeOrOpaque(type)) {
|
|
252453
252456
|
return this.state.containsEsc;
|
|
252454
252457
|
}
|
|
252455
252458
|
return super.isExportDefaultSpecifier();
|
|
252456
252459
|
}
|
|
252457
252460
|
parseExportDefaultExpression() {
|
|
252458
|
-
if (this.isContextual(
|
|
252461
|
+
if (this.isContextual(123)) {
|
|
252459
252462
|
const node = this.startNode();
|
|
252460
252463
|
this.next();
|
|
252461
252464
|
return this.flowParseEnumDeclaration(node);
|
|
@@ -252589,7 +252592,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252589
252592
|
super.assertModuleNodeAllowed(node);
|
|
252590
252593
|
}
|
|
252591
252594
|
parseExportDeclaration(node) {
|
|
252592
|
-
if (this.isContextual(
|
|
252595
|
+
if (this.isContextual(127)) {
|
|
252593
252596
|
node.exportKind = "type";
|
|
252594
252597
|
const declarationNode = this.startNode();
|
|
252595
252598
|
this.next();
|
|
@@ -252600,17 +252603,17 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252600
252603
|
} else {
|
|
252601
252604
|
return this.flowParseTypeAlias(declarationNode);
|
|
252602
252605
|
}
|
|
252603
|
-
} else if (this.isContextual(
|
|
252606
|
+
} else if (this.isContextual(128)) {
|
|
252604
252607
|
node.exportKind = "type";
|
|
252605
252608
|
const declarationNode = this.startNode();
|
|
252606
252609
|
this.next();
|
|
252607
252610
|
return this.flowParseOpaqueType(declarationNode, false);
|
|
252608
|
-
} else if (this.isContextual(
|
|
252611
|
+
} else if (this.isContextual(126)) {
|
|
252609
252612
|
node.exportKind = "type";
|
|
252610
252613
|
const declarationNode = this.startNode();
|
|
252611
252614
|
this.next();
|
|
252612
252615
|
return this.flowParseInterface(declarationNode);
|
|
252613
|
-
} else if (this.isContextual(
|
|
252616
|
+
} else if (this.isContextual(123)) {
|
|
252614
252617
|
node.exportKind = "value";
|
|
252615
252618
|
const declarationNode = this.startNode();
|
|
252616
252619
|
this.next();
|
|
@@ -252621,7 +252624,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252621
252624
|
}
|
|
252622
252625
|
eatExportStar(node) {
|
|
252623
252626
|
if (super.eatExportStar(node)) return true;
|
|
252624
|
-
if (this.isContextual(
|
|
252627
|
+
if (this.isContextual(127) && this.lookahead().type === 51) {
|
|
252625
252628
|
node.exportKind = "type";
|
|
252626
252629
|
this.next();
|
|
252627
252630
|
this.next();
|
|
@@ -252640,7 +252643,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252640
252643
|
return hasNamespace;
|
|
252641
252644
|
}
|
|
252642
252645
|
parseClassId(node, isStatement5, optionalId) {
|
|
252643
|
-
if ((!isStatement5 || optionalId) && this.isContextual(
|
|
252646
|
+
if ((!isStatement5 || optionalId) && this.isContextual(110)) {
|
|
252644
252647
|
node.id = null;
|
|
252645
252648
|
return;
|
|
252646
252649
|
}
|
|
@@ -252653,7 +252656,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252653
252656
|
const {
|
|
252654
252657
|
startLoc
|
|
252655
252658
|
} = this.state;
|
|
252656
|
-
if (this.isContextual(
|
|
252659
|
+
if (this.isContextual(122)) {
|
|
252657
252660
|
if (super.parseClassMemberFromModifier(classBody2, member)) {
|
|
252658
252661
|
return;
|
|
252659
252662
|
}
|
|
@@ -252679,7 +252682,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252679
252682
|
identifierName: fullWord
|
|
252680
252683
|
});
|
|
252681
252684
|
}
|
|
252682
|
-
this.finishToken(
|
|
252685
|
+
this.finishToken(129, fullWord);
|
|
252683
252686
|
}
|
|
252684
252687
|
getTokenFromCode(code2) {
|
|
252685
252688
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
|
@@ -252806,7 +252809,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252806
252809
|
if (node.superClass && (this.match(43) || this.match(47))) {
|
|
252807
252810
|
node.superTypeArguments = this.flowParseTypeParameterInstantiationInExpression();
|
|
252808
252811
|
}
|
|
252809
|
-
if (this.eatContextual(
|
|
252812
|
+
if (this.eatContextual(110)) {
|
|
252810
252813
|
const implemented = node.implements = [];
|
|
252811
252814
|
do {
|
|
252812
252815
|
implemented.push(this.flowParseClassImplements());
|
|
@@ -252878,7 +252881,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252878
252881
|
}
|
|
252879
252882
|
isPotentialImportPhase(isExport) {
|
|
252880
252883
|
if (super.isPotentialImportPhase(isExport)) return true;
|
|
252881
|
-
if (this.isContextual(
|
|
252884
|
+
if (this.isContextual(127)) {
|
|
252882
252885
|
if (!isExport) return true;
|
|
252883
252886
|
const ch = this.lookaheadCharCode();
|
|
252884
252887
|
return ch === 123 || ch === 42;
|
|
@@ -252908,7 +252911,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252908
252911
|
}
|
|
252909
252912
|
}
|
|
252910
252913
|
let isBinding3 = false;
|
|
252911
|
-
if (this.isContextual(
|
|
252914
|
+
if (this.isContextual(90) && !this.isLookaheadContextual("as")) {
|
|
252912
252915
|
const as_ident = this.parseIdentifier(true);
|
|
252913
252916
|
if (specifierTypeKind !== null && !tokenIsKeywordOrIdentifier(this.state.type)) {
|
|
252914
252917
|
specifier.imported = as_ident;
|
|
@@ -252932,7 +252935,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252932
252935
|
specifier.imported = firstIdent;
|
|
252933
252936
|
specifier.importKind = null;
|
|
252934
252937
|
}
|
|
252935
|
-
if (this.eatContextual(
|
|
252938
|
+
if (this.eatContextual(90)) {
|
|
252936
252939
|
specifier.local = this.parseIdentifier();
|
|
252937
252940
|
} else {
|
|
252938
252941
|
isBinding3 = true;
|
|
@@ -252988,7 +252991,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
252988
252991
|
parseMaybeAssign(refExpressionErrors, isParenItem) {
|
|
252989
252992
|
let state = null;
|
|
252990
252993
|
let jsx2;
|
|
252991
|
-
if (this.hasPlugin("jsx") && (this.match(
|
|
252994
|
+
if (this.hasPlugin("jsx") && (this.match(139) || this.match(43))) {
|
|
252992
252995
|
state = this.state.clone();
|
|
252993
252996
|
jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, isParenItem), state);
|
|
252994
252997
|
if (!jsx2.error) return jsx2.node;
|
|
@@ -253239,7 +253242,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
253239
253242
|
const startLoc = this.state.startLoc;
|
|
253240
253243
|
const endOfInit = () => this.match(8) || this.match(4);
|
|
253241
253244
|
switch (this.state.type) {
|
|
253242
|
-
case
|
|
253245
|
+
case 132: {
|
|
253243
253246
|
const literal2 = this.parseNumericLiteral(this.state.value);
|
|
253244
253247
|
if (endOfInit()) {
|
|
253245
253248
|
return {
|
|
@@ -253250,7 +253253,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
253250
253253
|
}
|
|
253251
253254
|
break;
|
|
253252
253255
|
}
|
|
253253
|
-
case
|
|
253256
|
+
case 131: {
|
|
253254
253257
|
const literal2 = this.parseStringLiteral(this.state.value);
|
|
253255
253258
|
if (endOfInit()) {
|
|
253256
253259
|
return {
|
|
@@ -253417,7 +253420,7 @@ var flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
253417
253420
|
flowEnumParseExplicitType({
|
|
253418
253421
|
enumName
|
|
253419
253422
|
}) {
|
|
253420
|
-
if (!this.eatContextual(
|
|
253423
|
+
if (!this.eatContextual(99)) return null;
|
|
253421
253424
|
if (!tokenIsIdentifier(this.state.type)) {
|
|
253422
253425
|
throw this.raise(FlowErrors.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, {
|
|
253423
253426
|
enumName
|
|
@@ -253846,6 +253849,7 @@ function hasNewLine(input, start, end) {
|
|
|
253846
253849
|
return false;
|
|
253847
253850
|
}
|
|
253848
253851
|
var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
253852
|
+
var skipWhiteSpaceAnnexB = /(?:[^\S\n\r\u2028\u2029]|\/\*.*?\*\/)*(?:(?!-->)(?:\s|\/\/.*|\/\*[^]*?\*\/|<!--.*|-->.*)*)?/g;
|
|
253849
253853
|
var skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;
|
|
253850
253854
|
function isWhitespace(code2) {
|
|
253851
253855
|
switch (code2) {
|
|
@@ -253921,14 +253925,14 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
253921
253925
|
if (this.state.pos === this.state.start) {
|
|
253922
253926
|
if (ch === 60 && this.state.canStartJSXElement) {
|
|
253923
253927
|
++this.state.pos;
|
|
253924
|
-
this.finishToken(
|
|
253928
|
+
this.finishToken(139);
|
|
253925
253929
|
} else {
|
|
253926
253930
|
super.getTokenFromCode(ch);
|
|
253927
253931
|
}
|
|
253928
253932
|
return;
|
|
253929
253933
|
}
|
|
253930
253934
|
out += this.input.slice(chunkStart, this.state.pos);
|
|
253931
|
-
this.finishToken(
|
|
253935
|
+
this.finishToken(138, out);
|
|
253932
253936
|
return;
|
|
253933
253937
|
case 38:
|
|
253934
253938
|
out += this.input.slice(chunkStart, this.state.pos);
|
|
@@ -253988,7 +253992,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
253988
253992
|
}
|
|
253989
253993
|
}
|
|
253990
253994
|
out += this.input.slice(chunkStart, this.state.pos++);
|
|
253991
|
-
this.finishToken(
|
|
253995
|
+
this.finishToken(131, out);
|
|
253992
253996
|
}
|
|
253993
253997
|
jsxReadEntity() {
|
|
253994
253998
|
const startPos = ++this.state.pos;
|
|
@@ -254028,11 +254032,11 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
254028
254032
|
do {
|
|
254029
254033
|
ch = this.input.charCodeAt(++this.state.pos);
|
|
254030
254034
|
} while (isIdentifierChar(ch) || ch === 45);
|
|
254031
|
-
this.finishToken(
|
|
254035
|
+
this.finishToken(137, this.input.slice(start, this.state.pos));
|
|
254032
254036
|
}
|
|
254033
254037
|
jsxParseIdentifier() {
|
|
254034
254038
|
const node = this.startNode();
|
|
254035
|
-
if (this.match(
|
|
254039
|
+
if (this.match(137)) {
|
|
254036
254040
|
node.name = this.state.value;
|
|
254037
254041
|
} else if (tokenIsKeyword(this.state.type)) {
|
|
254038
254042
|
node.name = tokenLabelName(this.state.type);
|
|
@@ -254077,8 +254081,8 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
254077
254081
|
this.raise(JsxErrors.AttributeIsEmpty, node);
|
|
254078
254082
|
}
|
|
254079
254083
|
return node;
|
|
254080
|
-
case
|
|
254081
|
-
case
|
|
254084
|
+
case 139:
|
|
254085
|
+
case 131:
|
|
254082
254086
|
return this.parseExprAtom();
|
|
254083
254087
|
default:
|
|
254084
254088
|
throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc);
|
|
@@ -254129,7 +254133,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
254129
254133
|
return this.finishNode(node, "JSXAttribute");
|
|
254130
254134
|
}
|
|
254131
254135
|
jsxParseOpeningElementAt(startLoc) {
|
|
254132
|
-
if (this.eat(
|
|
254136
|
+
if (this.eat(140)) {
|
|
254133
254137
|
const node2 = this.startNodeAt(startLoc);
|
|
254134
254138
|
return this.finishNode(node2, "JSXOpeningFragment");
|
|
254135
254139
|
}
|
|
@@ -254139,22 +254143,22 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
254139
254143
|
}
|
|
254140
254144
|
jsxParseOpeningElementAfterName(node) {
|
|
254141
254145
|
const attributes = [];
|
|
254142
|
-
while (!this.match(52) && !this.match(
|
|
254146
|
+
while (!this.match(52) && !this.match(140)) {
|
|
254143
254147
|
attributes.push(this.jsxParseAttribute());
|
|
254144
254148
|
}
|
|
254145
254149
|
node.attributes = attributes;
|
|
254146
254150
|
node.selfClosing = this.eat(52);
|
|
254147
|
-
this.expect(
|
|
254151
|
+
this.expect(140);
|
|
254148
254152
|
return this.finishNode(node, "JSXOpeningElement");
|
|
254149
254153
|
}
|
|
254150
254154
|
jsxParseClosingElementAt(startLoc) {
|
|
254151
|
-
if (this.eat(
|
|
254155
|
+
if (this.eat(140)) {
|
|
254152
254156
|
const node2 = this.startNodeAt(startLoc);
|
|
254153
254157
|
return this.finishNode(node2, "JSXClosingFragment");
|
|
254154
254158
|
}
|
|
254155
254159
|
const node = this.startNodeAt(startLoc);
|
|
254156
254160
|
node.name = this.jsxParseElementName();
|
|
254157
|
-
this.expect(
|
|
254161
|
+
this.expect(140);
|
|
254158
254162
|
return this.finishNode(node, "JSXClosingElement");
|
|
254159
254163
|
}
|
|
254160
254164
|
jsxParseElementAt(startLoc) {
|
|
@@ -254165,7 +254169,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
254165
254169
|
if (!openingElement.selfClosing) {
|
|
254166
254170
|
contents: for (; ; ) {
|
|
254167
254171
|
switch (this.state.type) {
|
|
254168
|
-
case
|
|
254172
|
+
case 139:
|
|
254169
254173
|
startLoc = this.state.startLoc;
|
|
254170
254174
|
this.next();
|
|
254171
254175
|
if (this.eat(52)) {
|
|
@@ -254175,7 +254179,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
254175
254179
|
}
|
|
254176
254180
|
children.push(this.jsxParseElementAt(startLoc));
|
|
254177
254181
|
break;
|
|
254178
|
-
case
|
|
254182
|
+
case 138:
|
|
254179
254183
|
children.push(this.parseLiteral(this.state.value, "JSXText"));
|
|
254180
254184
|
break;
|
|
254181
254185
|
case 2: {
|
|
@@ -254232,10 +254236,10 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
254232
254236
|
context[context.length - 1] = newContext;
|
|
254233
254237
|
}
|
|
254234
254238
|
parseExprAtom(refExpressionErrors) {
|
|
254235
|
-
if (this.match(
|
|
254239
|
+
if (this.match(139)) {
|
|
254236
254240
|
return this.jsxParseElement();
|
|
254237
254241
|
} else if (this.match(43) && this.input.charCodeAt(this.state.pos) !== 33) {
|
|
254238
|
-
this.replaceToken(
|
|
254242
|
+
this.replaceToken(139);
|
|
254239
254243
|
return this.jsxParseElement();
|
|
254240
254244
|
} else {
|
|
254241
254245
|
return super.parseExprAtom(refExpressionErrors);
|
|
@@ -254258,7 +254262,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
254258
254262
|
}
|
|
254259
254263
|
if (code2 === 62) {
|
|
254260
254264
|
++this.state.pos;
|
|
254261
|
-
this.finishToken(
|
|
254265
|
+
this.finishToken(140);
|
|
254262
254266
|
return;
|
|
254263
254267
|
}
|
|
254264
254268
|
if ((code2 === 34 || code2 === 39) && context === types.j_oTag) {
|
|
@@ -254268,7 +254272,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
254268
254272
|
}
|
|
254269
254273
|
if (code2 === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) {
|
|
254270
254274
|
++this.state.pos;
|
|
254271
|
-
this.finishToken(
|
|
254275
|
+
this.finishToken(139);
|
|
254272
254276
|
return;
|
|
254273
254277
|
}
|
|
254274
254278
|
super.getTokenFromCode(code2);
|
|
@@ -254278,12 +254282,12 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
254278
254282
|
context,
|
|
254279
254283
|
type
|
|
254280
254284
|
} = this.state;
|
|
254281
|
-
if (type === 52 && prevType ===
|
|
254285
|
+
if (type === 52 && prevType === 139) {
|
|
254282
254286
|
context.splice(-2, 2, types.j_cTag);
|
|
254283
254287
|
this.state.canStartJSXElement = false;
|
|
254284
|
-
} else if (type === 138) {
|
|
254285
|
-
context.push(types.j_oTag);
|
|
254286
254288
|
} else if (type === 139) {
|
|
254289
|
+
context.push(types.j_oTag);
|
|
254290
|
+
} else if (type === 140) {
|
|
254287
254291
|
const out = context[context.length - 1];
|
|
254288
254292
|
if (out === types.j_oTag && prevType === 52 || out === types.j_cTag) {
|
|
254289
254293
|
context.pop();
|
|
@@ -254645,6 +254649,7 @@ var State = class _State {
|
|
|
254645
254649
|
errors = [];
|
|
254646
254650
|
noArrowAt = [];
|
|
254647
254651
|
noArrowParamsConversionAt = [];
|
|
254652
|
+
regExpAllowedAt = -1;
|
|
254648
254653
|
get canStartArrow() {
|
|
254649
254654
|
return (this.flags & 2) > 0;
|
|
254650
254655
|
}
|
|
@@ -254719,7 +254724,7 @@ var State = class _State {
|
|
|
254719
254724
|
commentsLen = 0;
|
|
254720
254725
|
commentStack = [];
|
|
254721
254726
|
pos = 0;
|
|
254722
|
-
type =
|
|
254727
|
+
type = 136;
|
|
254723
254728
|
value = null;
|
|
254724
254729
|
start = 0;
|
|
254725
254730
|
end = 0;
|
|
@@ -254764,6 +254769,7 @@ var State = class _State {
|
|
|
254764
254769
|
state.errors = this.errors.slice();
|
|
254765
254770
|
state.noArrowAt = this.noArrowAt.slice();
|
|
254766
254771
|
state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice();
|
|
254772
|
+
state.regExpAllowedAt = this.regExpAllowedAt;
|
|
254767
254773
|
state.labels = this.labels.slice();
|
|
254768
254774
|
state.commentsLen = this.commentsLen;
|
|
254769
254775
|
state.commentStack = this.commentStack.slice();
|
|
@@ -254785,7 +254791,7 @@ var _isDigit = function isDigit(code2) {
|
|
|
254785
254791
|
return code2 >= 48 && code2 <= 57;
|
|
254786
254792
|
};
|
|
254787
254793
|
var forbiddenNumericSeparatorSiblings = {
|
|
254788
|
-
decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
|
|
254794
|
+
decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111, 43, 45]),
|
|
254789
254795
|
hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
|
|
254790
254796
|
};
|
|
254791
254797
|
var isAllowedNumericSeparatorSibling = {
|
|
@@ -254984,7 +254990,7 @@ function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumS
|
|
|
254984
254990
|
pos
|
|
254985
254991
|
};
|
|
254986
254992
|
errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
|
|
254987
|
-
} else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev)
|
|
254993
|
+
} else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev)) {
|
|
254988
254994
|
if (bailOnError) return {
|
|
254989
254995
|
n: null,
|
|
254990
254996
|
pos
|
|
@@ -255159,8 +255165,9 @@ var Tokenizer = class extends CommentsParser {
|
|
|
255159
255165
|
return this.nextTokenStartSince(this.state.pos);
|
|
255160
255166
|
}
|
|
255161
255167
|
nextTokenStartSince(pos) {
|
|
255162
|
-
|
|
255163
|
-
|
|
255168
|
+
const skipWhiteSpaceRe = this.inModule || !(this.optionFlags & 16384) ? skipWhiteSpace : skipWhiteSpaceAnnexB;
|
|
255169
|
+
skipWhiteSpaceRe.lastIndex = pos;
|
|
255170
|
+
return skipWhiteSpaceRe.test(this.input) ? skipWhiteSpaceRe.lastIndex : pos;
|
|
255164
255171
|
}
|
|
255165
255172
|
lookaheadCharCode() {
|
|
255166
255173
|
return this.lookaheadCharCodeSince(this.state.pos);
|
|
@@ -255203,7 +255210,7 @@ var Tokenizer = class extends CommentsParser {
|
|
|
255203
255210
|
this.state.start = this.state.pos;
|
|
255204
255211
|
if (!this.isLookahead) this.state.startLoc = this.state.curPosition();
|
|
255205
255212
|
if (this.state.pos >= this.length) {
|
|
255206
|
-
this.finishToken(
|
|
255213
|
+
this.finishToken(136);
|
|
255207
255214
|
return;
|
|
255208
255215
|
}
|
|
255209
255216
|
this.getTokenFromCode(this.codePointAtPos(this.state.pos));
|
|
@@ -255377,10 +255384,10 @@ var Tokenizer = class extends CommentsParser {
|
|
|
255377
255384
|
}
|
|
255378
255385
|
if (isIdentifierStart(next)) {
|
|
255379
255386
|
++this.state.pos;
|
|
255380
|
-
this.finishToken(
|
|
255387
|
+
this.finishToken(135, this.readWord1(next));
|
|
255381
255388
|
} else if (next === 92) {
|
|
255382
255389
|
++this.state.pos;
|
|
255383
|
-
this.finishToken(
|
|
255390
|
+
this.finishToken(135, this.readWord1());
|
|
255384
255391
|
} else {
|
|
255385
255392
|
this.finishOp(23, 1);
|
|
255386
255393
|
}
|
|
@@ -255759,7 +255766,7 @@ var Tokenizer = class extends CommentsParser {
|
|
|
255759
255766
|
mods += char;
|
|
255760
255767
|
}
|
|
255761
255768
|
this.state.pos = pos;
|
|
255762
|
-
this.finishToken(
|
|
255769
|
+
this.finishToken(134, {
|
|
255763
255770
|
pattern: content,
|
|
255764
255771
|
flags: mods
|
|
255765
255772
|
});
|
|
@@ -255793,10 +255800,10 @@ var Tokenizer = class extends CommentsParser {
|
|
|
255793
255800
|
}
|
|
255794
255801
|
if (isBigInt) {
|
|
255795
255802
|
const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
|
|
255796
|
-
this.finishToken(
|
|
255803
|
+
this.finishToken(133, str);
|
|
255797
255804
|
return;
|
|
255798
255805
|
}
|
|
255799
|
-
this.finishToken(
|
|
255806
|
+
this.finishToken(132, val);
|
|
255800
255807
|
}
|
|
255801
255808
|
readNumber(startsWithDot) {
|
|
255802
255809
|
const start = this.state.pos;
|
|
@@ -255849,11 +255856,11 @@ var Tokenizer = class extends CommentsParser {
|
|
|
255849
255856
|
throw this.raise(Errors.NumberIdentifier, this.state.curPosition());
|
|
255850
255857
|
}
|
|
255851
255858
|
if (isBigInt) {
|
|
255852
|
-
this.finishToken(
|
|
255859
|
+
this.finishToken(133, str);
|
|
255853
255860
|
return;
|
|
255854
255861
|
}
|
|
255855
255862
|
const val = isOctal ? parseInt(str, 8) : parseFloat(str);
|
|
255856
|
-
this.finishToken(
|
|
255863
|
+
this.finishToken(132, val);
|
|
255857
255864
|
}
|
|
255858
255865
|
readCodePoint(throwOnInvalid) {
|
|
255859
255866
|
const {
|
|
@@ -255873,7 +255880,7 @@ var Tokenizer = class extends CommentsParser {
|
|
|
255873
255880
|
this.state.pos = pos + 1;
|
|
255874
255881
|
this.state.lineStart = lineStart;
|
|
255875
255882
|
this.state.curLine = curLine;
|
|
255876
|
-
this.finishToken(
|
|
255883
|
+
this.finishToken(131, str);
|
|
255877
255884
|
}
|
|
255878
255885
|
readTemplateContinuation() {
|
|
255879
255886
|
if (!this.match(4)) {
|
|
@@ -255955,7 +255962,7 @@ var Tokenizer = class extends CommentsParser {
|
|
|
255955
255962
|
if (type !== void 0) {
|
|
255956
255963
|
this.finishToken(type, tokenLabelName(type));
|
|
255957
255964
|
} else {
|
|
255958
|
-
this.finishToken(
|
|
255965
|
+
this.finishToken(129, word);
|
|
255959
255966
|
}
|
|
255960
255967
|
}
|
|
255961
255968
|
checkKeywordEscapes() {
|
|
@@ -256310,7 +256317,7 @@ var UtilParser = class extends Tokenizer {
|
|
|
256310
256317
|
}
|
|
256311
256318
|
}
|
|
256312
256319
|
canInsertSemicolon() {
|
|
256313
|
-
return this.match(
|
|
256320
|
+
return this.match(136) || this.match(4) || this.hasPrecedingLineBreak();
|
|
256314
256321
|
}
|
|
256315
256322
|
hasPrecedingLineBreak() {
|
|
256316
256323
|
return hasNewLine(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start);
|
|
@@ -256886,7 +256893,7 @@ var LValParser = class extends NodeUtils {
|
|
|
256886
256893
|
return this.parseBindingRestProperty(this.startNode());
|
|
256887
256894
|
}
|
|
256888
256895
|
const prop = this.startNode();
|
|
256889
|
-
if (type ===
|
|
256896
|
+
if (type === 135) {
|
|
256890
256897
|
this.expectPlugin("destructuringPrivate", startLoc);
|
|
256891
256898
|
this.classScope.usePrivateName(this.state.value, startLoc);
|
|
256892
256899
|
prop.key = this.parsePrivateName();
|
|
@@ -256987,7 +256994,7 @@ var LValParser = class extends NodeUtils {
|
|
|
256987
256994
|
this.raise(Errors.VoidPatternCatchClauseParam, expression2);
|
|
256988
256995
|
}
|
|
256989
256996
|
const unwrappedExpression = unwrapParenthesizedExpression(expression2);
|
|
256990
|
-
disallowCallExpression ||= unwrappedExpression.type === "CallExpression" && (unwrappedExpression.callee.type === "Import" || unwrappedExpression.callee.type === "Super");
|
|
256997
|
+
disallowCallExpression ||= binding !== 64 || unwrappedExpression.type === "CallExpression" && (unwrappedExpression.callee.type === "Import" || unwrappedExpression.callee.type === "Super");
|
|
256991
256998
|
const validity = this.isValidLVal(type, disallowCallExpression, !(hasParenthesizedAncestor || expression2.extra?.parenthesized) && ancestor.type === "AssignmentExpression", binding);
|
|
256992
256999
|
if (validity === true) return;
|
|
256993
257000
|
if (validity === false) {
|
|
@@ -257019,6 +257026,15 @@ var LValParser = class extends NodeUtils {
|
|
|
257019
257026
|
}
|
|
257020
257027
|
}
|
|
257021
257028
|
checkIdentifier(at, bindingType, strictModeChanged = false) {
|
|
257029
|
+
this.checkStrictBindReservedWord(at, bindingType, strictModeChanged);
|
|
257030
|
+
if (bindingType & 8192 && at.name === "let") {
|
|
257031
|
+
this.raise(Errors.LetInLexicalBinding, at);
|
|
257032
|
+
}
|
|
257033
|
+
if (!(bindingType & 64)) {
|
|
257034
|
+
this.declareNameFromIdentifier(at, bindingType);
|
|
257035
|
+
}
|
|
257036
|
+
}
|
|
257037
|
+
checkStrictBindReservedWord(at, bindingType, strictModeChanged = false) {
|
|
257022
257038
|
if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) {
|
|
257023
257039
|
if (bindingType === 64) {
|
|
257024
257040
|
this.raise(Errors.StrictEvalArguments, at, {
|
|
@@ -257030,12 +257046,6 @@ var LValParser = class extends NodeUtils {
|
|
|
257030
257046
|
});
|
|
257031
257047
|
}
|
|
257032
257048
|
}
|
|
257033
|
-
if (bindingType & 8192 && at.name === "let") {
|
|
257034
|
-
this.raise(Errors.LetInLexicalBinding, at);
|
|
257035
|
-
}
|
|
257036
|
-
if (!(bindingType & 64)) {
|
|
257037
|
-
this.declareNameFromIdentifier(at, bindingType);
|
|
257038
|
-
}
|
|
257039
257049
|
}
|
|
257040
257050
|
declareNameFromIdentifier(identifier4, binding) {
|
|
257041
257051
|
this.scope.declareName(identifier4.name, binding, identifier4.start);
|
|
@@ -257090,11 +257100,11 @@ var ExpressionParser = class extends LValParser {
|
|
|
257090
257100
|
getExpression() {
|
|
257091
257101
|
this.enterInitialScopes();
|
|
257092
257102
|
this.nextToken();
|
|
257093
|
-
if (this.match(
|
|
257103
|
+
if (this.match(136)) {
|
|
257094
257104
|
throw this.raise(Errors.ParseExpressionEmptyInput, this.state.startLoc);
|
|
257095
257105
|
}
|
|
257096
257106
|
const expr = this.parseExpression();
|
|
257097
|
-
if (!this.match(
|
|
257107
|
+
if (!this.match(136)) {
|
|
257098
257108
|
throw this.raise(Errors.ParseExpressionExpectsEOF, this.state.startLoc, {
|
|
257099
257109
|
unexpected: this.input.codePointAt(this.state.start)
|
|
257100
257110
|
});
|
|
@@ -257138,7 +257148,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
257138
257148
|
}
|
|
257139
257149
|
parseMaybeAssign(refExpressionErrors, isParenItem) {
|
|
257140
257150
|
const startLoc = this.state.startLoc;
|
|
257141
|
-
const isYield = this.isContextual(
|
|
257151
|
+
const isYield = this.isContextual(105);
|
|
257142
257152
|
if (isYield) {
|
|
257143
257153
|
if (this.prodParam.hasYield) {
|
|
257144
257154
|
this.next();
|
|
@@ -257161,7 +257171,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
257161
257171
|
if (isParenItem) {
|
|
257162
257172
|
left = this.parseParenItem(left, startLoc);
|
|
257163
257173
|
}
|
|
257164
|
-
if (tokenIsAssignment(this.state.type)) {
|
|
257174
|
+
if (tokenIsAssignment(this.state.type) && !(this.match(27) && this.state.lastTokEndLoc.index === this.state.regExpAllowedAt)) {
|
|
257165
257175
|
const node = this.startNodeAt(startLoc);
|
|
257166
257176
|
const operator = this.state.value;
|
|
257167
257177
|
node.operator = operator;
|
|
@@ -257224,7 +257234,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
257224
257234
|
return expr;
|
|
257225
257235
|
}
|
|
257226
257236
|
parseMaybeUnaryOrPrivate(refExpressionErrors) {
|
|
257227
|
-
return this.match(
|
|
257237
|
+
return this.match(135) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors);
|
|
257228
257238
|
}
|
|
257229
257239
|
parseExprOps(refExpressionErrors) {
|
|
257230
257240
|
const startLoc = this.state.startLoc;
|
|
@@ -257235,18 +257245,25 @@ var ExpressionParser = class extends LValParser {
|
|
|
257235
257245
|
this.state.canStartArrow = false;
|
|
257236
257246
|
return this.parseExprOp(expr, startLoc, -1);
|
|
257237
257247
|
}
|
|
257248
|
+
isEscapedKeywordOperatorAfterLineBreak() {
|
|
257249
|
+
return tokenIsKeyword(this.state.type) && this.state.containsEsc && this.hasPrecedingLineBreak();
|
|
257250
|
+
}
|
|
257251
|
+
isBinaryOperator(op) {
|
|
257252
|
+
return tokenIsOperator(op) && (this.prodParam.hasIn || op !== 54) && !this.isEscapedKeywordOperatorAfterLineBreak();
|
|
257253
|
+
}
|
|
257238
257254
|
parseExprOp(left, leftStartLoc, minPrec) {
|
|
257255
|
+
const op = this.state.type;
|
|
257256
|
+
const isOperator = this.isBinaryOperator(op);
|
|
257239
257257
|
if (this.isPrivateName(left)) {
|
|
257240
257258
|
const value = this.getPrivateNameSV(left);
|
|
257241
|
-
if (minPrec >= tokenOperatorPrecedence(54) ||
|
|
257259
|
+
if (minPrec >= tokenOperatorPrecedence(54) || op !== 54 || !isOperator) {
|
|
257242
257260
|
this.raise(Errors.PrivateInExpectedIn, leftStartLoc, {
|
|
257243
257261
|
identifierName: value
|
|
257244
257262
|
});
|
|
257245
257263
|
}
|
|
257246
257264
|
this.classScope.usePrivateName(value, leftStartLoc);
|
|
257247
257265
|
}
|
|
257248
|
-
|
|
257249
|
-
if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(54))) {
|
|
257266
|
+
if (isOperator) {
|
|
257250
257267
|
let prec = tokenOperatorPrecedence(op);
|
|
257251
257268
|
if (prec > minPrec) {
|
|
257252
257269
|
if (op === 35) {
|
|
@@ -257317,7 +257334,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
257317
257334
|
}
|
|
257318
257335
|
parseMaybeUnary(refExpressionErrors, sawUnary) {
|
|
257319
257336
|
const startLoc = this.state.startLoc;
|
|
257320
|
-
const isAwait = this.isContextual(
|
|
257337
|
+
const isAwait = this.isContextual(93);
|
|
257321
257338
|
if (isAwait && this.recordAwaitIfAllowed()) {
|
|
257322
257339
|
this.next();
|
|
257323
257340
|
const expr2 = this.parseAwait(startLoc);
|
|
@@ -257338,7 +257355,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
257338
257355
|
node.argument = this.parseMaybeUnary(null, true);
|
|
257339
257356
|
this.checkExpressionErrors(refExpressionErrors, true);
|
|
257340
257357
|
if (this.state.strict && isDelete) {
|
|
257341
|
-
const arg = node.argument;
|
|
257358
|
+
const arg = unwrapParenthesizedExpression(node.argument);
|
|
257342
257359
|
if (arg.type === "Identifier") {
|
|
257343
257360
|
this.raise(Errors.StrictDelete, node);
|
|
257344
257361
|
} else if (this.hasPropertyAsPrivateName(arg)) {
|
|
@@ -257387,6 +257404,21 @@ var ExpressionParser = class extends LValParser {
|
|
|
257387
257404
|
parseExprSubscripts(refExpressionErrors) {
|
|
257388
257405
|
const startLoc = this.state.startLoc;
|
|
257389
257406
|
this.setLoc(startLoc);
|
|
257407
|
+
if (refExpressionErrors != null && (this.match(2) || this.match(0))) {
|
|
257408
|
+
const atomExpressionErrors = new ExpressionErrors();
|
|
257409
|
+
const expr2 = this.parseExprAtom(atomExpressionErrors);
|
|
257410
|
+
const result = this.parseSubscripts(expr2, startLoc);
|
|
257411
|
+
if (result !== expr2) {
|
|
257412
|
+
this.checkExpressionErrors(atomExpressionErrors, true);
|
|
257413
|
+
} else {
|
|
257414
|
+
refExpressionErrors.shorthandAssignLoc ??= atomExpressionErrors.shorthandAssignLoc;
|
|
257415
|
+
refExpressionErrors.doubleProtoLoc ??= atomExpressionErrors.doubleProtoLoc;
|
|
257416
|
+
refExpressionErrors.privateKeyLoc ??= atomExpressionErrors.privateKeyLoc;
|
|
257417
|
+
refExpressionErrors.optionalParametersLoc ??= atomExpressionErrors.optionalParametersLoc;
|
|
257418
|
+
refExpressionErrors.voidPatternLoc ??= atomExpressionErrors.voidPatternLoc;
|
|
257419
|
+
}
|
|
257420
|
+
return result;
|
|
257421
|
+
}
|
|
257390
257422
|
const expr = this.parseExprAtom(refExpressionErrors);
|
|
257391
257423
|
if (this.shouldExitDescending(expr)) {
|
|
257392
257424
|
return expr;
|
|
@@ -257447,7 +257479,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
257447
257479
|
if (computed) {
|
|
257448
257480
|
node.property = this.parseExpression();
|
|
257449
257481
|
this.expect(1);
|
|
257450
|
-
} else if (this.match(
|
|
257482
|
+
} else if (this.match(135)) {
|
|
257451
257483
|
if (base2.type === "Super") {
|
|
257452
257484
|
this.raise(Errors.SuperPrivateField, startLoc);
|
|
257453
257485
|
}
|
|
@@ -257578,6 +257610,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
257578
257610
|
parseNoCallExpr(onUnparenthesizedImportExpression) {
|
|
257579
257611
|
const startLoc = this.state.startLoc;
|
|
257580
257612
|
const isImport2 = this.match(79);
|
|
257613
|
+
this.state.canStartArrow = false;
|
|
257581
257614
|
const base2 = this.parseExprAtom();
|
|
257582
257615
|
if (isImport2 && base2.type === "ImportExpression") {
|
|
257583
257616
|
onUnparenthesizedImportExpression(base2);
|
|
@@ -257621,11 +257654,11 @@ var ExpressionParser = class extends LValParser {
|
|
|
257621
257654
|
this.readRegexp();
|
|
257622
257655
|
return this.parseRegExpLiteral(this.state.value);
|
|
257623
257656
|
}
|
|
257624
|
-
case 131:
|
|
257625
|
-
return this.parseNumericLiteral(this.state.value);
|
|
257626
257657
|
case 132:
|
|
257658
|
+
return this.parseNumericLiteral(this.state.value);
|
|
257659
|
+
case 133:
|
|
257627
257660
|
return this.parseBigIntLiteral(this.state.value);
|
|
257628
|
-
case
|
|
257661
|
+
case 131:
|
|
257629
257662
|
return this.parseStringLiteral(this.state.value);
|
|
257630
257663
|
case 80:
|
|
257631
257664
|
return this.parseNullLiteral();
|
|
@@ -257666,7 +257699,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
257666
257699
|
throw this.raise(Errors.UnsupportedBind, callee);
|
|
257667
257700
|
}
|
|
257668
257701
|
}
|
|
257669
|
-
case
|
|
257702
|
+
case 135: {
|
|
257670
257703
|
this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, {
|
|
257671
257704
|
identifierName: this.state.value
|
|
257672
257705
|
});
|
|
@@ -257700,7 +257733,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
257700
257733
|
}
|
|
257701
257734
|
default:
|
|
257702
257735
|
if (tokenIsIdentifier(type)) {
|
|
257703
|
-
if (this.isContextual(
|
|
257736
|
+
if (this.isContextual(124) && this.lookaheadInLineCharCode() === 123) {
|
|
257704
257737
|
return this.parseModuleExpression();
|
|
257705
257738
|
}
|
|
257706
257739
|
const {
|
|
@@ -257836,7 +257869,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
257836
257869
|
if (this.prodParam.hasYield && this.match(12)) {
|
|
257837
257870
|
const meta = this.createIdentifier(this.startNodeAtNode(node), "function");
|
|
257838
257871
|
this.next();
|
|
257839
|
-
if (this.match(
|
|
257872
|
+
if (this.match(100)) {
|
|
257840
257873
|
this.expectPlugin("functionSent");
|
|
257841
257874
|
} else if (!this.hasPlugin("functionSent")) {
|
|
257842
257875
|
this.unexpected();
|
|
@@ -257859,15 +257892,15 @@ var ExpressionParser = class extends LValParser {
|
|
|
257859
257892
|
}
|
|
257860
257893
|
parseImportMetaPropertyOrPhaseCall(node) {
|
|
257861
257894
|
this.next();
|
|
257862
|
-
if (this.isContextual(
|
|
257863
|
-
const isSource = this.isContextual(
|
|
257895
|
+
if (this.isContextual(102) || this.isContextual(94)) {
|
|
257896
|
+
const isSource = this.isContextual(102);
|
|
257864
257897
|
this.expectPlugin(isSource ? "sourcePhaseImports" : "deferredImportEvaluation");
|
|
257865
257898
|
this.next();
|
|
257866
257899
|
node.phase = isSource ? "source" : "defer";
|
|
257867
257900
|
return this.parseImportCall(node);
|
|
257868
257901
|
} else {
|
|
257869
257902
|
const id = this.createIdentifierAt(this.startNodeAtNode(node), "import", this.state.lastTokStartLoc);
|
|
257870
|
-
if (this.isContextual(
|
|
257903
|
+
if (this.isContextual(98)) {
|
|
257871
257904
|
if (!this.inModule) {
|
|
257872
257905
|
this.raise(Errors.ImportMetaOutsideModule, id);
|
|
257873
257906
|
}
|
|
@@ -258256,16 +258289,16 @@ var ExpressionParser = class extends LValParser {
|
|
|
258256
258289
|
key = this.parseIdentifier(true);
|
|
258257
258290
|
} else {
|
|
258258
258291
|
switch (type) {
|
|
258259
|
-
case
|
|
258292
|
+
case 132:
|
|
258260
258293
|
key = this.parseNumericLiteral(value);
|
|
258261
258294
|
break;
|
|
258262
|
-
case
|
|
258295
|
+
case 131:
|
|
258263
258296
|
key = this.parseStringLiteral(value);
|
|
258264
258297
|
break;
|
|
258265
|
-
case
|
|
258298
|
+
case 133:
|
|
258266
258299
|
key = this.parseBigIntLiteral(value);
|
|
258267
258300
|
break;
|
|
258268
|
-
case
|
|
258301
|
+
case 135: {
|
|
258269
258302
|
const privateKeyLoc = this.state.startLoc;
|
|
258270
258303
|
if (refExpressionErrors != null) {
|
|
258271
258304
|
if (refExpressionErrors.privateKeyLoc === null) {
|
|
@@ -258282,7 +258315,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
258282
258315
|
}
|
|
258283
258316
|
}
|
|
258284
258317
|
prop.key = key;
|
|
258285
|
-
if (type !==
|
|
258318
|
+
if (type !== 135) {
|
|
258286
258319
|
prop.computed = false;
|
|
258287
258320
|
}
|
|
258288
258321
|
}
|
|
@@ -258312,7 +258345,8 @@ var ExpressionParser = class extends LValParser {
|
|
|
258312
258345
|
parseArrowExpression(node, params, isAsync, trailingCommaLoc) {
|
|
258313
258346
|
this.scope.enter(514 | 4);
|
|
258314
258347
|
let flags = functionFlags(isAsync, false);
|
|
258315
|
-
|
|
258348
|
+
const hasBlockBody = this.match(2);
|
|
258349
|
+
if (!hasBlockBody) {
|
|
258316
258350
|
flags |= this.prodParam.currentFlags() & (8 | 16);
|
|
258317
258351
|
}
|
|
258318
258352
|
this.prodParam.enter(flags);
|
|
@@ -258321,6 +258355,9 @@ var ExpressionParser = class extends LValParser {
|
|
|
258321
258355
|
this.setArrowFunctionParameters(node, params, trailingCommaLoc);
|
|
258322
258356
|
}
|
|
258323
258357
|
this.parseFunctionBody(node, true);
|
|
258358
|
+
if (hasBlockBody) {
|
|
258359
|
+
this.state.regExpAllowedAt = this.state.lastTokEndLoc.index;
|
|
258360
|
+
}
|
|
258324
258361
|
this.prodParam.exit();
|
|
258325
258362
|
this.scope.exit();
|
|
258326
258363
|
return this.finishNode(node, "ArrowFunctionExpression");
|
|
@@ -258351,8 +258388,8 @@ var ExpressionParser = class extends LValParser {
|
|
|
258351
258388
|
}
|
|
258352
258389
|
const strictModeChanged = !oldStrict && this.state.strict;
|
|
258353
258390
|
this.checkParams(node, !this.state.strict && !allowExpression && !isMethod3 && !nonSimple, allowExpression, strictModeChanged);
|
|
258354
|
-
if (
|
|
258355
|
-
this.
|
|
258391
|
+
if (node.id) {
|
|
258392
|
+
this.checkStrictBindReservedWord(node.id, 65, strictModeChanged);
|
|
258356
258393
|
}
|
|
258357
258394
|
});
|
|
258358
258395
|
this.prodParam.exit();
|
|
@@ -258456,7 +258493,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
258456
258493
|
const tokenIsKeyword2 = tokenKeywordOrIdentifierIsKeyword(type);
|
|
258457
258494
|
if (liberal) {
|
|
258458
258495
|
if (tokenIsKeyword2) {
|
|
258459
|
-
this.replaceToken(
|
|
258496
|
+
this.replaceToken(129);
|
|
258460
258497
|
}
|
|
258461
258498
|
} else {
|
|
258462
258499
|
this.checkReservedWord(name, this.sourceToOffsetPos(start), tokenIsKeyword2, false);
|
|
@@ -258528,6 +258565,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
258528
258565
|
}
|
|
258529
258566
|
}
|
|
258530
258567
|
if (!soloAwait) {
|
|
258568
|
+
this.state.canStartArrow = false;
|
|
258531
258569
|
node.argument = this.parseMaybeUnary(null, true);
|
|
258532
258570
|
}
|
|
258533
258571
|
return this.finishNode(node, "AwaitExpression");
|
|
@@ -258537,7 +258575,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
258537
258575
|
const {
|
|
258538
258576
|
type
|
|
258539
258577
|
} = this.state;
|
|
258540
|
-
return type === 49 || type === 6 || type === 0 || tokenIsTemplate(type) || type ===
|
|
258578
|
+
return type === 49 || type === 6 || type === 0 || tokenIsTemplate(type) || type === 99 && !this.state.containsEsc || type === 134 || type === 52 || this.hasPlugin("v8intrinsic") && type === 50;
|
|
258541
258579
|
}
|
|
258542
258580
|
parseYield(startLoc) {
|
|
258543
258581
|
this.setLoc(startLoc);
|
|
@@ -258549,7 +258587,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
258549
258587
|
delegating = this.eat(51);
|
|
258550
258588
|
switch (this.state.type) {
|
|
258551
258589
|
case 9:
|
|
258552
|
-
case
|
|
258590
|
+
case 136:
|
|
258553
258591
|
case 4:
|
|
258554
258592
|
case 7:
|
|
258555
258593
|
case 1:
|
|
@@ -258561,6 +258599,9 @@ var ExpressionParser = class extends LValParser {
|
|
|
258561
258599
|
argument = this.parseMaybeAssign();
|
|
258562
258600
|
}
|
|
258563
258601
|
}
|
|
258602
|
+
if (!argument) {
|
|
258603
|
+
this.state.regExpAllowedAt = this.state.lastTokEndLoc.index;
|
|
258604
|
+
}
|
|
258564
258605
|
node.delegate = delegating;
|
|
258565
258606
|
node.argument = argument;
|
|
258566
258607
|
return this.finishNode(node, "YieldExpression");
|
|
@@ -258633,11 +258674,11 @@ var ExpressionParser = class extends LValParser {
|
|
|
258633
258674
|
const startLoc = this.state.startLoc;
|
|
258634
258675
|
this.prodParam.enter(this.prodParam.currentFlags() & -17);
|
|
258635
258676
|
let ret;
|
|
258636
|
-
if (this.isContextual(
|
|
258677
|
+
if (this.isContextual(93) && this.recordAwaitIfAllowed()) {
|
|
258637
258678
|
this.next();
|
|
258638
258679
|
ret = this.parseAwait(startLoc, true);
|
|
258639
258680
|
const nextOp = this.state.type;
|
|
258640
|
-
if (
|
|
258681
|
+
if (nextOp !== 35 && this.isBinaryOperator(nextOp)) {
|
|
258641
258682
|
this.raise(Errors.PipelineUnparenthesized, startLoc);
|
|
258642
258683
|
}
|
|
258643
258684
|
} else {
|
|
@@ -258708,7 +258749,7 @@ function createExportedTokens(tokens) {
|
|
|
258708
258749
|
}
|
|
258709
258750
|
var StatementParser = class extends ExpressionParser {
|
|
258710
258751
|
parseTopLevel(file2, program3) {
|
|
258711
|
-
file2.program = this.parseProgram(program3,
|
|
258752
|
+
file2.program = this.parseProgram(program3, 136, this.options.sourceType === "module" ? "module" : "script");
|
|
258712
258753
|
file2.comments = this.comments;
|
|
258713
258754
|
if (this.optionFlags & 512) {
|
|
258714
258755
|
file2.tokens = createExportedTokens(this.tokens);
|
|
@@ -258730,7 +258771,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
258730
258771
|
this.addExtra(program3, "topLevelAwait", this.state.hasTopLevelAwait);
|
|
258731
258772
|
}
|
|
258732
258773
|
let finishedProgram;
|
|
258733
|
-
if (end ===
|
|
258774
|
+
if (end === 136) {
|
|
258734
258775
|
finishedProgram = this.finishNode(program3, "Program");
|
|
258735
258776
|
} else {
|
|
258736
258777
|
finishedProgram = this.finishNodeAt(program3, "Program", createPositionWithColumnOffset(this.state.startLoc, -1));
|
|
@@ -258760,19 +258801,19 @@ var StatementParser = class extends ExpressionParser {
|
|
|
258760
258801
|
return this.finishNode(node, "InterpreterDirective");
|
|
258761
258802
|
}
|
|
258762
258803
|
isLet() {
|
|
258763
|
-
if (!this.isContextual(
|
|
258804
|
+
if (!this.isContextual(97)) {
|
|
258764
258805
|
return false;
|
|
258765
258806
|
}
|
|
258766
258807
|
return this.hasFollowingBindingAtom();
|
|
258767
258808
|
}
|
|
258768
258809
|
isUsing() {
|
|
258769
|
-
if (!this.isContextual(
|
|
258810
|
+
if (!this.isContextual(104)) {
|
|
258770
258811
|
return false;
|
|
258771
258812
|
}
|
|
258772
258813
|
return this.nextTokenIsIdentifierOnSameLine();
|
|
258773
258814
|
}
|
|
258774
258815
|
isForUsing() {
|
|
258775
|
-
if (!this.isContextual(
|
|
258816
|
+
if (!this.isContextual(104)) {
|
|
258776
258817
|
return false;
|
|
258777
258818
|
}
|
|
258778
258819
|
const next = this.nextTokenInLineStart();
|
|
@@ -258794,7 +258835,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
258794
258835
|
return this.chStartsBindingIdentifier(nextCh, next);
|
|
258795
258836
|
}
|
|
258796
258837
|
isAwaitUsing() {
|
|
258797
|
-
if (!this.isContextual(
|
|
258838
|
+
if (!this.isContextual(93)) {
|
|
258798
258839
|
return false;
|
|
258799
258840
|
}
|
|
258800
258841
|
let next = this.nextTokenInLineStart();
|
|
@@ -258887,7 +258928,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
258887
258928
|
if (!allowFunctionDeclaration) {
|
|
258888
258929
|
this.raise(this.state.strict ? Errors.StrictFunction : this.options.annexB ? Errors.SloppyFunctionAnnexB : Errors.SloppyFunction, this.state.startLoc);
|
|
258889
258930
|
}
|
|
258890
|
-
return this.parseFunctionStatement(node, false,
|
|
258931
|
+
return this.parseFunctionStatement(node, false, flags);
|
|
258891
258932
|
case 76:
|
|
258892
258933
|
if (!allowDeclaration) this.unexpected();
|
|
258893
258934
|
return this.parseClass(this.maybeTakeDecorators(decorators, node), true);
|
|
@@ -258901,7 +258942,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
258901
258942
|
return this.parseThrowStatement(node);
|
|
258902
258943
|
case 69:
|
|
258903
258944
|
return this.parseTryStatement(node);
|
|
258904
|
-
case
|
|
258945
|
+
case 93:
|
|
258905
258946
|
if (this.isAwaitUsing()) {
|
|
258906
258947
|
if (!this.allowsUsing()) {
|
|
258907
258948
|
this.raise(Errors.UnexpectedUsingDeclaration, node);
|
|
@@ -258914,7 +258955,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
258914
258955
|
return this.parseVarStatement(node, "await using");
|
|
258915
258956
|
}
|
|
258916
258957
|
break;
|
|
258917
|
-
case
|
|
258958
|
+
case 104:
|
|
258918
258959
|
if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifierOrBrace()) {
|
|
258919
258960
|
break;
|
|
258920
258961
|
}
|
|
@@ -258924,7 +258965,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
258924
258965
|
this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc);
|
|
258925
258966
|
}
|
|
258926
258967
|
return this.parseVarStatement(node, "using");
|
|
258927
|
-
case
|
|
258968
|
+
case 97: {
|
|
258928
258969
|
if (this.state.containsEsc) {
|
|
258929
258970
|
break;
|
|
258930
258971
|
}
|
|
@@ -258980,16 +259021,21 @@ var StatementParser = class extends ExpressionParser {
|
|
|
258980
259021
|
this.raise(Errors.AsyncFunctionInSingleStatementContext, this.state.startLoc);
|
|
258981
259022
|
}
|
|
258982
259023
|
this.next();
|
|
258983
|
-
return this.parseFunctionStatement(node, true,
|
|
259024
|
+
return this.parseFunctionStatement(node, true, flags);
|
|
258984
259025
|
}
|
|
258985
259026
|
}
|
|
258986
259027
|
}
|
|
258987
259028
|
const maybeName = this.state.value;
|
|
259029
|
+
if (startType === 89 && this.lookahead().type === 10) {
|
|
259030
|
+
const label = this.parseIdentifier(true);
|
|
259031
|
+
this.next();
|
|
259032
|
+
return this.parseLabeledStatement(node, maybeName, label, flags);
|
|
259033
|
+
}
|
|
258988
259034
|
const expr = this.parseExpression();
|
|
258989
259035
|
if (tokenIsIdentifier(startType) && expr.type === "Identifier" && this.eat(10)) {
|
|
258990
259036
|
return this.parseLabeledStatement(node, maybeName, expr, flags);
|
|
258991
259037
|
} else {
|
|
258992
|
-
return this.parseExpressionStatement(node, expr);
|
|
259038
|
+
return this.parseExpressionStatement(node, expr, flags);
|
|
258993
259039
|
}
|
|
258994
259040
|
}
|
|
258995
259041
|
assertModuleNodeAllowed(node) {
|
|
@@ -259050,7 +259096,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259050
259096
|
while (this.eat(12)) {
|
|
259051
259097
|
const node2 = this.startNodeAt(startLoc);
|
|
259052
259098
|
node2.object = expr;
|
|
259053
|
-
if (this.match(
|
|
259099
|
+
if (this.match(135)) {
|
|
259054
259100
|
this.classScope.usePrivateName(this.state.value, this.state.startLoc);
|
|
259055
259101
|
node2.property = this.parsePrivateName();
|
|
259056
259102
|
} else {
|
|
@@ -259082,7 +259128,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259082
259128
|
if (this.isLineTerminator()) {
|
|
259083
259129
|
node.label = null;
|
|
259084
259130
|
} else {
|
|
259085
|
-
node.label = this.parseIdentifier();
|
|
259131
|
+
node.label = this.parseIdentifier(this.match(89));
|
|
259086
259132
|
this.semicolon();
|
|
259087
259133
|
}
|
|
259088
259134
|
this.verifyBreakContinue(node, isBreak);
|
|
@@ -259131,7 +259177,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259131
259177
|
this.next();
|
|
259132
259178
|
this.state.labels.push(loopLabel);
|
|
259133
259179
|
let awaitAt = null;
|
|
259134
|
-
if (this.isContextual(
|
|
259180
|
+
if (this.isContextual(93) && this.recordAwaitIfAllowed()) {
|
|
259135
259181
|
awaitAt = this.state.startLoc;
|
|
259136
259182
|
this.next();
|
|
259137
259183
|
}
|
|
@@ -259143,7 +259189,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259143
259189
|
}
|
|
259144
259190
|
return this.parseFor(node, null);
|
|
259145
259191
|
}
|
|
259146
|
-
const startsWithLet = this.isContextual(
|
|
259192
|
+
const startsWithLet = this.isContextual(97);
|
|
259147
259193
|
{
|
|
259148
259194
|
const startsWithAwaitUsing = this.isAwaitUsing();
|
|
259149
259195
|
const starsWithUsingDeclaration = startsWithAwaitUsing || this.isForUsing();
|
|
@@ -259167,7 +259213,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259167
259213
|
if (isForIn && starsWithUsingDeclaration) {
|
|
259168
259214
|
this.raise(Errors.ForInUsing, init2);
|
|
259169
259215
|
}
|
|
259170
|
-
if ((isForIn || this.isContextual(
|
|
259216
|
+
if ((isForIn || this.isContextual(99)) && init2.declarations.length === 1) {
|
|
259171
259217
|
return this.parseForX(node, init2, awaitAt);
|
|
259172
259218
|
}
|
|
259173
259219
|
if (awaitAt !== null) {
|
|
@@ -259176,10 +259222,10 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259176
259222
|
return this.parseFor(node, init2);
|
|
259177
259223
|
}
|
|
259178
259224
|
}
|
|
259179
|
-
const startsWithAsync = this.isContextual(
|
|
259225
|
+
const startsWithAsync = this.isContextual(92);
|
|
259180
259226
|
const refExpressionErrors = new ExpressionErrors();
|
|
259181
259227
|
const init = this.parseExpression(true, refExpressionErrors);
|
|
259182
|
-
const isForOf = this.isContextual(
|
|
259228
|
+
const isForOf = this.isContextual(99);
|
|
259183
259229
|
if (isForOf) {
|
|
259184
259230
|
if (startsWithLet) {
|
|
259185
259231
|
this.raise(Errors.ForOfLet, init);
|
|
@@ -259204,9 +259250,16 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259204
259250
|
}
|
|
259205
259251
|
return this.parseFor(node, init);
|
|
259206
259252
|
}
|
|
259207
|
-
parseFunctionStatement(node, isAsync,
|
|
259253
|
+
parseFunctionStatement(node, isAsync, statementFlags) {
|
|
259208
259254
|
this.next();
|
|
259209
|
-
|
|
259255
|
+
let flags = 1 | (isAsync ? 8 : 0);
|
|
259256
|
+
if (!(statementFlags & 2) && statementFlags & 4) {
|
|
259257
|
+
flags |= 16;
|
|
259258
|
+
if (!(statementFlags & 8)) {
|
|
259259
|
+
flags |= 2;
|
|
259260
|
+
}
|
|
259261
|
+
}
|
|
259262
|
+
return this.parseFunction(node, flags);
|
|
259210
259263
|
}
|
|
259211
259264
|
parseIfStatement(node) {
|
|
259212
259265
|
this.next();
|
|
@@ -259364,7 +259417,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259364
259417
|
node.label = expr;
|
|
259365
259418
|
return this.finishNode(node, "LabeledStatement");
|
|
259366
259419
|
}
|
|
259367
|
-
parseExpressionStatement(node, expr) {
|
|
259420
|
+
parseExpressionStatement(node, expr, _flags) {
|
|
259368
259421
|
node.expression = expr;
|
|
259369
259422
|
this.semicolon();
|
|
259370
259423
|
return this.finishNode(node, "ExpressionStatement");
|
|
@@ -259466,12 +259519,12 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259466
259519
|
const decl = this.startNode();
|
|
259467
259520
|
this.parseVarId(decl, kind);
|
|
259468
259521
|
decl.init = !this.eat(25) ? null : isFor3 ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
|
|
259469
|
-
if (decl.init === null && !allowMissingInitializer) {
|
|
259470
|
-
if (decl.id.type !== "Identifier"
|
|
259522
|
+
if (decl.init === null && !allowMissingInitializer && !(isFor3 && declarations.length === 0 && (this.match(54) || this.isContextual(99)))) {
|
|
259523
|
+
if (decl.id.type !== "Identifier") {
|
|
259471
259524
|
this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, {
|
|
259472
259525
|
kind: "destructuring"
|
|
259473
259526
|
});
|
|
259474
|
-
} else if (
|
|
259527
|
+
} else if (kind === "const" || kind === "using" || kind === "await using") {
|
|
259475
259528
|
this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, {
|
|
259476
259529
|
kind
|
|
259477
259530
|
});
|
|
@@ -259502,13 +259555,12 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259502
259555
|
return this.parseFunction(node, 8);
|
|
259503
259556
|
}
|
|
259504
259557
|
parseFunction(node, flags = 0) {
|
|
259505
|
-
const hangingDeclaration = flags & 2;
|
|
259506
259558
|
const isDeclaration2 = !!(flags & 1);
|
|
259507
259559
|
const requireId = isDeclaration2 && !(flags & 4);
|
|
259508
259560
|
const isAsync = !!(flags & 8);
|
|
259509
259561
|
this.initFunction(node, isAsync);
|
|
259510
259562
|
if (this.match(51)) {
|
|
259511
|
-
if (
|
|
259563
|
+
if (flags & 16) {
|
|
259512
259564
|
this.raise(Errors.GeneratorInSingleStatementContext, this.state.startLoc);
|
|
259513
259565
|
}
|
|
259514
259566
|
this.next();
|
|
@@ -259528,7 +259580,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259528
259580
|
this.parseFunctionBodyAndFinish(node, isDeclaration2 ? "FunctionDeclaration" : "FunctionExpression");
|
|
259529
259581
|
this.prodParam.exit();
|
|
259530
259582
|
this.scope.exit();
|
|
259531
|
-
if (isDeclaration2 && !
|
|
259583
|
+
if (isDeclaration2 && !(flags & 2)) {
|
|
259532
259584
|
this.registerFunctionStatementId(node);
|
|
259533
259585
|
}
|
|
259534
259586
|
return node;
|
|
@@ -259626,7 +259678,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259626
259678
|
return false;
|
|
259627
259679
|
}
|
|
259628
259680
|
parseClassMember(classBody2, member, state) {
|
|
259629
|
-
const isStatic2 = this.isContextual(
|
|
259681
|
+
const isStatic2 = this.isContextual(103);
|
|
259630
259682
|
if (isStatic2) {
|
|
259631
259683
|
if (this.parseClassMemberFromModifier(classBody2, member)) {
|
|
259632
259684
|
return;
|
|
@@ -259650,7 +259702,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259650
259702
|
this.parsePropertyNamePrefixOperator(member);
|
|
259651
259703
|
if (this.eat(51)) {
|
|
259652
259704
|
method.kind = "method";
|
|
259653
|
-
const isPrivateName3 = this.match(
|
|
259705
|
+
const isPrivateName3 = this.match(135);
|
|
259654
259706
|
this.parseClassElementName(method);
|
|
259655
259707
|
this.parsePostMemberNameModifiers(method);
|
|
259656
259708
|
if (isPrivateName3) {
|
|
@@ -259705,7 +259757,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259705
259757
|
this.unexpected(maybeQuestionTokenStartLoc);
|
|
259706
259758
|
}
|
|
259707
259759
|
method.kind = "method";
|
|
259708
|
-
const isPrivate3 = this.match(
|
|
259760
|
+
const isPrivate3 = this.match(135);
|
|
259709
259761
|
this.parseClassElementName(method);
|
|
259710
259762
|
this.parsePostMemberNameModifiers(publicMember);
|
|
259711
259763
|
if (isPrivate3) {
|
|
@@ -259719,7 +259771,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259719
259771
|
} else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(51) && this.isLineTerminator())) {
|
|
259720
259772
|
this.resetPreviousNodeTrailingComments(key);
|
|
259721
259773
|
method.kind = maybeContextualKw;
|
|
259722
|
-
const isPrivate3 = this.match(
|
|
259774
|
+
const isPrivate3 = this.match(135);
|
|
259723
259775
|
this.parseClassElementName(publicMethod);
|
|
259724
259776
|
if (isPrivate3) {
|
|
259725
259777
|
this.pushClassPrivateMethod(classBody2, privateMethod, false, false);
|
|
@@ -259733,7 +259785,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259733
259785
|
} else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) {
|
|
259734
259786
|
this.expectPlugin("decoratorAutoAccessors");
|
|
259735
259787
|
this.resetPreviousNodeTrailingComments(key);
|
|
259736
|
-
const isPrivate3 = this.match(
|
|
259788
|
+
const isPrivate3 = this.match(135);
|
|
259737
259789
|
this.parseClassElementName(publicProp);
|
|
259738
259790
|
this.pushClassAccessorProperty(classBody2, accessorProp, isPrivate3);
|
|
259739
259791
|
} else if (this.isLineTerminator()) {
|
|
@@ -259751,10 +259803,10 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259751
259803
|
type,
|
|
259752
259804
|
value
|
|
259753
259805
|
} = this.state;
|
|
259754
|
-
if ((type ===
|
|
259806
|
+
if ((type === 129 || type === 131) && member.static && value === "prototype") {
|
|
259755
259807
|
this.raise(Errors.StaticPrototype, this.state.startLoc);
|
|
259756
259808
|
}
|
|
259757
|
-
if (type ===
|
|
259809
|
+
if (type === 135) {
|
|
259758
259810
|
if (value === "constructor") {
|
|
259759
259811
|
this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc);
|
|
259760
259812
|
}
|
|
@@ -259842,6 +259894,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259842
259894
|
parseClassId(node, isStatement5, optionalId, bindingType = 8331) {
|
|
259843
259895
|
if (tokenIsIdentifier(this.state.type)) {
|
|
259844
259896
|
node.id = this.parseIdentifier();
|
|
259897
|
+
this.checkStrictBindReservedWord(node.id, bindingType);
|
|
259845
259898
|
if (isStatement5) {
|
|
259846
259899
|
this.declareNameFromIdentifier(node.id, bindingType);
|
|
259847
259900
|
}
|
|
@@ -259867,7 +259920,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259867
259920
|
const parseAfterDefault = !hasDefault || this.eat(8);
|
|
259868
259921
|
const hasStar = parseAfterDefault && this.eatExportStar(node);
|
|
259869
259922
|
const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
|
|
259870
|
-
const parseAfterNamespace = parseAfterDefault &&
|
|
259923
|
+
const parseAfterNamespace = parseAfterDefault && !hasNamespace;
|
|
259871
259924
|
const isFromRequired = hasDefault || hasStar;
|
|
259872
259925
|
if (hasStar && !hasNamespace) {
|
|
259873
259926
|
if (hasDefault) this.unexpected();
|
|
@@ -259878,13 +259931,10 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259878
259931
|
this.sawUnambiguousESM = true;
|
|
259879
259932
|
return this.finishNode(node, "ExportAllDeclaration");
|
|
259880
259933
|
}
|
|
259881
|
-
const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
|
|
259934
|
+
const hasSpecifiers = parseAfterNamespace && this.maybeParseExportNamedSpecifiers(node);
|
|
259882
259935
|
if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) {
|
|
259883
259936
|
this.unexpected(null, 2);
|
|
259884
259937
|
}
|
|
259885
|
-
if (hasNamespace && parseAfterNamespace) {
|
|
259886
|
-
this.unexpected(null, 94);
|
|
259887
|
-
}
|
|
259888
259938
|
let hasDeclaration;
|
|
259889
259939
|
if (isFromRequired || hasSpecifiers) {
|
|
259890
259940
|
hasDeclaration = false;
|
|
@@ -259941,7 +259991,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259941
259991
|
return false;
|
|
259942
259992
|
}
|
|
259943
259993
|
maybeParseExportNamespaceSpecifier(node) {
|
|
259944
|
-
if (this.isContextual(
|
|
259994
|
+
if (this.isContextual(90)) {
|
|
259945
259995
|
node.specifiers ??= [];
|
|
259946
259996
|
const specifier = this.startNodeAt(this.state.lastTokStartLoc);
|
|
259947
259997
|
this.next();
|
|
@@ -259975,7 +260025,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
259975
260025
|
return false;
|
|
259976
260026
|
}
|
|
259977
260027
|
isAsyncFunction() {
|
|
259978
|
-
if (!this.isContextual(
|
|
260028
|
+
if (!this.isContextual(92)) return false;
|
|
259979
260029
|
const next = this.nextTokenInLineStart();
|
|
259980
260030
|
return this.isUnparsedContextual(next, "function");
|
|
259981
260031
|
}
|
|
@@ -260014,10 +260064,10 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260014
260064
|
type
|
|
260015
260065
|
} = this.state;
|
|
260016
260066
|
if (tokenIsIdentifier(type)) {
|
|
260017
|
-
if (type ===
|
|
260067
|
+
if (type === 92 && !this.state.containsEsc || type === 97) {
|
|
260018
260068
|
return false;
|
|
260019
260069
|
}
|
|
260020
|
-
if ((type ===
|
|
260070
|
+
if ((type === 127 || type === 126) && !this.state.containsEsc) {
|
|
260021
260071
|
const next2 = this.nextTokenStart();
|
|
260022
260072
|
const nextChar = this.input.charCodeAt(next2);
|
|
260023
260073
|
if (nextChar === 123 || this.chStartsBindingIdentifier(nextChar, next2) && !this.input.startsWith("from", next2)) {
|
|
@@ -260034,17 +260084,17 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260034
260084
|
return true;
|
|
260035
260085
|
}
|
|
260036
260086
|
if (this.match(61) && hasFrom) {
|
|
260037
|
-
const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
|
|
260087
|
+
const nextAfterFrom = this.input.charCodeAt(this.hasPlugin("exportDefaultFrom") ? this.nextTokenStartSince(next + 4) : this.nextTokenInLineStartSince(next + 4));
|
|
260038
260088
|
return nextAfterFrom === 34 || nextAfterFrom === 39;
|
|
260039
260089
|
}
|
|
260040
260090
|
return false;
|
|
260041
260091
|
}
|
|
260042
260092
|
parseExportFrom(node, expect) {
|
|
260043
|
-
if (this.eatContextual(
|
|
260093
|
+
if (this.eatContextual(95)) {
|
|
260044
260094
|
node.source = this.parseImportSource();
|
|
260045
260095
|
this.maybeParseImportAttributes(node);
|
|
260046
260096
|
} else if (expect) {
|
|
260047
|
-
this.unexpected();
|
|
260097
|
+
this.unexpected(null, 95);
|
|
260048
260098
|
}
|
|
260049
260099
|
this.semicolon();
|
|
260050
260100
|
}
|
|
@@ -260150,8 +260200,8 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260150
260200
|
this.expect(8);
|
|
260151
260201
|
if (this.eat(4)) break;
|
|
260152
260202
|
}
|
|
260153
|
-
const isMaybeTypeOnly = this.isContextual(
|
|
260154
|
-
const isString = this.match(
|
|
260203
|
+
const isMaybeTypeOnly = this.isContextual(127);
|
|
260204
|
+
const isString = this.match(131);
|
|
260155
260205
|
const node = this.startNode();
|
|
260156
260206
|
node.local = this.parseModuleExportName();
|
|
260157
260207
|
nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly));
|
|
@@ -260159,7 +260209,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260159
260209
|
return nodes;
|
|
260160
260210
|
}
|
|
260161
260211
|
parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) {
|
|
260162
|
-
if (this.eatContextual(
|
|
260212
|
+
if (this.eatContextual(90)) {
|
|
260163
260213
|
node.exported = this.parseModuleExportName();
|
|
260164
260214
|
} else if (isString) {
|
|
260165
260215
|
node.exported = this.cloneStringLiteral(node.local);
|
|
@@ -260169,7 +260219,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260169
260219
|
return this.finishNode(node, "ExportSpecifier");
|
|
260170
260220
|
}
|
|
260171
260221
|
parseModuleExportName() {
|
|
260172
|
-
if (this.match(
|
|
260222
|
+
if (this.match(131)) {
|
|
260173
260223
|
const result = this.parseStringLiteral(this.state.value);
|
|
260174
260224
|
const surrogate = loneSurrogate.exec(result.value);
|
|
260175
260225
|
if (surrogate) {
|
|
@@ -260198,7 +260248,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260198
260248
|
}
|
|
260199
260249
|
isPotentialImportPhase(isExport) {
|
|
260200
260250
|
if (isExport) return false;
|
|
260201
|
-
return this.isContextual(
|
|
260251
|
+
return this.isContextual(102) || this.isContextual(94);
|
|
260202
260252
|
}
|
|
260203
260253
|
applyImportPhase(node, isExport, phase, loc) {
|
|
260204
260254
|
if (isExport) {
|
|
@@ -260210,7 +260260,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260210
260260
|
} else if (phase === "defer") {
|
|
260211
260261
|
this.expectPlugin("deferredImportEvaluation", loc);
|
|
260212
260262
|
node.phase = "defer";
|
|
260213
|
-
} else if (this.hasPlugin("sourcePhaseImports")) {
|
|
260263
|
+
} else if (this.hasPlugin("sourcePhaseImports") || this.hasPlugin("deferredImportEvaluation")) {
|
|
260214
260264
|
node.phase = null;
|
|
260215
260265
|
}
|
|
260216
260266
|
}
|
|
@@ -260224,7 +260274,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260224
260274
|
const {
|
|
260225
260275
|
type
|
|
260226
260276
|
} = this.state;
|
|
260227
|
-
const isImportPhase = tokenIsKeywordOrIdentifier(type) ? type !==
|
|
260277
|
+
const isImportPhase = tokenIsKeywordOrIdentifier(type) ? type !== 95 || this.lookaheadCharCode() === 102 : type !== 8;
|
|
260228
260278
|
if (isImportPhase) {
|
|
260229
260279
|
this.applyImportPhase(node, isExport, phaseIdentifierName, phaseIdentifier.start);
|
|
260230
260280
|
return null;
|
|
@@ -260237,10 +260287,10 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260237
260287
|
const {
|
|
260238
260288
|
type
|
|
260239
260289
|
} = this.state;
|
|
260240
|
-
return tokenIsIdentifier(type) ? type !==
|
|
260290
|
+
return tokenIsIdentifier(type) ? type !== 95 || this.lookaheadCharCode() === 102 : type !== 8;
|
|
260241
260291
|
}
|
|
260242
260292
|
parseImport(node) {
|
|
260243
|
-
if (this.match(
|
|
260293
|
+
if (this.match(131)) {
|
|
260244
260294
|
return this.parseImportSourceAndAttributes(node);
|
|
260245
260295
|
}
|
|
260246
260296
|
return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false));
|
|
@@ -260251,7 +260301,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260251
260301
|
const parseNext = !hasDefault || this.eat(8);
|
|
260252
260302
|
const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
|
|
260253
260303
|
if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node);
|
|
260254
|
-
this.expectContextual(
|
|
260304
|
+
this.expectContextual(95);
|
|
260255
260305
|
return this.parseImportSourceAndAttributes(node);
|
|
260256
260306
|
}
|
|
260257
260307
|
parseImportSourceAndAttributes(node) {
|
|
@@ -260264,7 +260314,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260264
260314
|
return this.finishNode(node, "ImportDeclaration");
|
|
260265
260315
|
}
|
|
260266
260316
|
parseImportSource() {
|
|
260267
|
-
if (!this.match(
|
|
260317
|
+
if (!this.match(131)) this.unexpected();
|
|
260268
260318
|
return this.parseExprAtom();
|
|
260269
260319
|
}
|
|
260270
260320
|
parseImportSpecifierLocal(node, specifier, type) {
|
|
@@ -260293,13 +260343,13 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260293
260343
|
});
|
|
260294
260344
|
}
|
|
260295
260345
|
attrNames.add(keyName);
|
|
260296
|
-
if (this.match(
|
|
260346
|
+
if (this.match(131)) {
|
|
260297
260347
|
node.key = this.parseStringLiteral(keyName);
|
|
260298
260348
|
} else {
|
|
260299
260349
|
node.key = this.parseIdentifier(true);
|
|
260300
260350
|
}
|
|
260301
260351
|
this.expect(10);
|
|
260302
|
-
if (!this.match(
|
|
260352
|
+
if (!this.match(131)) {
|
|
260303
260353
|
throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc);
|
|
260304
260354
|
}
|
|
260305
260355
|
node.value = this.parseStringLiteral(this.state.value);
|
|
@@ -260337,7 +260387,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260337
260387
|
if (this.match(51)) {
|
|
260338
260388
|
const specifier = this.startNode();
|
|
260339
260389
|
this.next();
|
|
260340
|
-
this.expectContextual(
|
|
260390
|
+
this.expectContextual(90);
|
|
260341
260391
|
this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier");
|
|
260342
260392
|
return true;
|
|
260343
260393
|
}
|
|
@@ -260357,15 +260407,15 @@ var StatementParser = class extends ExpressionParser {
|
|
|
260357
260407
|
if (this.eat(4)) break;
|
|
260358
260408
|
}
|
|
260359
260409
|
const specifier = this.startNode();
|
|
260360
|
-
const importedIsString = this.match(
|
|
260361
|
-
const isMaybeTypeOnly = this.isContextual(
|
|
260410
|
+
const importedIsString = this.match(131);
|
|
260411
|
+
const isMaybeTypeOnly = this.isContextual(127);
|
|
260362
260412
|
specifier.imported = this.parseModuleExportName();
|
|
260363
260413
|
const importSpecifier2 = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, void 0);
|
|
260364
260414
|
node.specifiers.push(importSpecifier2);
|
|
260365
260415
|
}
|
|
260366
260416
|
}
|
|
260367
260417
|
parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) {
|
|
260368
|
-
if (this.eatContextual(
|
|
260418
|
+
if (this.eatContextual(90)) {
|
|
260369
260419
|
specifier.local = this.parseIdentifier();
|
|
260370
260420
|
} else {
|
|
260371
260421
|
const {
|
|
@@ -260571,7 +260621,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
260571
260621
|
return tokenIsIdentifier(this.state.type);
|
|
260572
260622
|
}
|
|
260573
260623
|
tsTokenCanFollowModifier() {
|
|
260574
|
-
return this.match(0) || this.match(2) || this.match(51) || this.match(17) || this.match(
|
|
260624
|
+
return this.match(0) || this.match(2) || this.match(51) || this.match(17) || this.match(135) || this.isLiteralPropertyName();
|
|
260575
260625
|
}
|
|
260576
260626
|
tsNextTokenOnSameLineAndCanFollowModifier() {
|
|
260577
260627
|
this.next();
|
|
@@ -260581,7 +260631,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
260581
260631
|
return this.tsTokenCanFollowModifier();
|
|
260582
260632
|
}
|
|
260583
260633
|
tsNextTokenCanFollowModifier() {
|
|
260584
|
-
if (this.match(
|
|
260634
|
+
if (this.match(103)) {
|
|
260585
260635
|
this.next();
|
|
260586
260636
|
return this.tsTokenCanFollowModifier();
|
|
260587
260637
|
}
|
|
@@ -260593,15 +260643,23 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
260593
260643
|
}
|
|
260594
260644
|
const modifier2 = this.state.value;
|
|
260595
260645
|
if (modifiers.has(modifier2)) {
|
|
260596
|
-
if (hasSeenStaticModifier && this.match(
|
|
260646
|
+
if (hasSeenStaticModifier && this.match(103)) {
|
|
260597
260647
|
return void 0;
|
|
260598
260648
|
}
|
|
260599
260649
|
if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) {
|
|
260600
260650
|
return void 0;
|
|
260601
260651
|
}
|
|
260652
|
+
const escapedKeywordLoc = this.state.containsEsc && !tokenIsIdentifier(this.state.type) ? this.state.startLoc : null;
|
|
260653
|
+
if (escapedKeywordLoc) this.state.containsEsc = false;
|
|
260602
260654
|
if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
|
|
260655
|
+
if (escapedKeywordLoc) {
|
|
260656
|
+
this.raise(Errors.InvalidEscapedReservedWord, escapedKeywordLoc, {
|
|
260657
|
+
reservedWord: modifier2
|
|
260658
|
+
});
|
|
260659
|
+
}
|
|
260603
260660
|
return modifier2;
|
|
260604
260661
|
}
|
|
260662
|
+
if (escapedKeywordLoc) this.state.containsEsc = true;
|
|
260605
260663
|
}
|
|
260606
260664
|
return void 0;
|
|
260607
260665
|
}
|
|
@@ -260740,7 +260798,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
260740
260798
|
const node = this.startNode();
|
|
260741
260799
|
this.expect(79);
|
|
260742
260800
|
this.expect(6);
|
|
260743
|
-
if (!this.match(
|
|
260801
|
+
if (!this.match(131)) {
|
|
260744
260802
|
this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc);
|
|
260745
260803
|
node.source = this.tsParseNonConditionalType();
|
|
260746
260804
|
} else {
|
|
@@ -260785,7 +260843,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
260785
260843
|
this.expect(2);
|
|
260786
260844
|
while (!this.match(4)) {
|
|
260787
260845
|
const type = this.state.type;
|
|
260788
|
-
if (tokenIsIdentifier(type) || type ===
|
|
260846
|
+
if (tokenIsIdentifier(type) || type === 131) {
|
|
260789
260847
|
properties.push(super.parsePropertyDefinition(null));
|
|
260790
260848
|
} else {
|
|
260791
260849
|
this.unexpected();
|
|
@@ -260869,7 +260927,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
260869
260927
|
}
|
|
260870
260928
|
tsParseTypeParameters(parseModifiers) {
|
|
260871
260929
|
const node = this.startNode();
|
|
260872
|
-
if (this.match(43) || this.match(
|
|
260930
|
+
if (this.match(43) || this.match(139)) {
|
|
260873
260931
|
this.next();
|
|
260874
260932
|
} else {
|
|
260875
260933
|
this.unexpected();
|
|
@@ -261040,9 +261098,9 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261040
261098
|
tsIsStartOfMappedType() {
|
|
261041
261099
|
this.next();
|
|
261042
261100
|
if (this.eat(49)) {
|
|
261043
|
-
return this.isContextual(
|
|
261101
|
+
return this.isContextual(119);
|
|
261044
261102
|
}
|
|
261045
|
-
if (this.isContextual(
|
|
261103
|
+
if (this.isContextual(119)) {
|
|
261046
261104
|
this.next();
|
|
261047
261105
|
}
|
|
261048
261106
|
if (!this.match(0)) {
|
|
@@ -261061,14 +261119,14 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261061
261119
|
if (this.match(49)) {
|
|
261062
261120
|
node.readonly = this.state.value;
|
|
261063
261121
|
this.next();
|
|
261064
|
-
this.expectContextual(
|
|
261065
|
-
} else if (this.eatContextual(
|
|
261122
|
+
this.expectContextual(119);
|
|
261123
|
+
} else if (this.eatContextual(119)) {
|
|
261066
261124
|
node.readonly = true;
|
|
261067
261125
|
}
|
|
261068
261126
|
this.expect(0);
|
|
261069
261127
|
node.key = this.tsParseTypeParameterName();
|
|
261070
261128
|
node.constraint = this.tsExpectThenParseType(54);
|
|
261071
|
-
node.nameType = this.eatContextual(
|
|
261129
|
+
node.nameType = this.eatContextual(90) ? this.tsParseType() : null;
|
|
261072
261130
|
this.expect(1);
|
|
261073
261131
|
if (this.match(49)) {
|
|
261074
261132
|
node.optional = this.state.value;
|
|
@@ -261186,9 +261244,9 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261186
261244
|
tsParseLiteralTypeNode() {
|
|
261187
261245
|
const node = this.startNode();
|
|
261188
261246
|
switch (this.state.type) {
|
|
261189
|
-
case 131:
|
|
261190
261247
|
case 132:
|
|
261191
|
-
case
|
|
261248
|
+
case 133:
|
|
261249
|
+
case 131:
|
|
261192
261250
|
case 81:
|
|
261193
261251
|
case 82:
|
|
261194
261252
|
node.literal = super.parseExprAtom();
|
|
@@ -261228,7 +261286,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261228
261286
|
}
|
|
261229
261287
|
tsParseThisTypeOrThisTypePredicate() {
|
|
261230
261288
|
const thisKeyword = this.tsParseThisTypeNode();
|
|
261231
|
-
if (this.isContextual(
|
|
261289
|
+
if (this.isContextual(113) && !this.hasPrecedingLineBreak()) {
|
|
261232
261290
|
return this.tsParseThisTypePredicate(thisKeyword);
|
|
261233
261291
|
} else {
|
|
261234
261292
|
return thisKeyword;
|
|
@@ -261236,9 +261294,9 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261236
261294
|
}
|
|
261237
261295
|
tsParseNonArrayType() {
|
|
261238
261296
|
switch (this.state.type) {
|
|
261239
|
-
case 130:
|
|
261240
261297
|
case 131:
|
|
261241
261298
|
case 132:
|
|
261299
|
+
case 133:
|
|
261242
261300
|
case 81:
|
|
261243
261301
|
case 82:
|
|
261244
261302
|
return this.tsParseLiteralTypeNode();
|
|
@@ -261246,7 +261304,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261246
261304
|
if (this.state.value === "-") {
|
|
261247
261305
|
const node = this.startNode();
|
|
261248
261306
|
const nextToken = this.lookahead();
|
|
261249
|
-
if (nextToken.type !==
|
|
261307
|
+
if (nextToken.type !== 132 && nextToken.type !== 133) {
|
|
261250
261308
|
this.unexpected();
|
|
261251
261309
|
}
|
|
261252
261310
|
node.literal = this.parseMaybeUnary();
|
|
@@ -261337,7 +261395,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261337
261395
|
}
|
|
261338
261396
|
tsParseInferType() {
|
|
261339
261397
|
const node = this.startNode();
|
|
261340
|
-
this.expectContextual(
|
|
261398
|
+
this.expectContextual(112);
|
|
261341
261399
|
const typeParameter2 = this.startNode();
|
|
261342
261400
|
typeParameter2.name = this.tsParseTypeParameterName();
|
|
261343
261401
|
typeParameter2.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType());
|
|
@@ -261354,7 +261412,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261354
261412
|
}
|
|
261355
261413
|
tsParseTypeOperatorOrHigher() {
|
|
261356
261414
|
const isTypeOperator = tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc;
|
|
261357
|
-
return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(
|
|
261415
|
+
return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(112) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher());
|
|
261358
261416
|
}
|
|
261359
261417
|
tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
|
|
261360
261418
|
const node = this.startNode();
|
|
@@ -261485,13 +261543,13 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261485
261543
|
}
|
|
261486
261544
|
tsParseTypePredicatePrefix() {
|
|
261487
261545
|
const id = this.parseIdentifier();
|
|
261488
|
-
if (this.isContextual(
|
|
261546
|
+
if (this.isContextual(113) && !this.hasPrecedingLineBreak()) {
|
|
261489
261547
|
this.next();
|
|
261490
261548
|
return id;
|
|
261491
261549
|
}
|
|
261492
261550
|
}
|
|
261493
261551
|
tsParseTypePredicateAsserts() {
|
|
261494
|
-
if (this.state.type !==
|
|
261552
|
+
if (this.state.type !== 106) {
|
|
261495
261553
|
return false;
|
|
261496
261554
|
}
|
|
261497
261555
|
const containsEsc = this.state.containsEsc;
|
|
@@ -261529,7 +261587,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261529
261587
|
return this.finishNode(node, "TSConditionalType");
|
|
261530
261588
|
}
|
|
261531
261589
|
isAbstractConstructorSignature() {
|
|
261532
|
-
return this.isContextual(
|
|
261590
|
+
return this.isContextual(121) && this.isLookaheadContextual("new");
|
|
261533
261591
|
}
|
|
261534
261592
|
tsParseNonConditionalType() {
|
|
261535
261593
|
if (this.tsIsStartOfFunctionType()) {
|
|
@@ -261552,6 +261610,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261552
261610
|
return this.match(71) ? this.tsParseTypeReference() : this.tsParseType();
|
|
261553
261611
|
});
|
|
261554
261612
|
this.expect(44);
|
|
261613
|
+
this.state.canStartArrow = false;
|
|
261555
261614
|
node.expression = this.parseMaybeUnary();
|
|
261556
261615
|
return this.finishNode(node, "TSTypeAssertion");
|
|
261557
261616
|
}
|
|
@@ -261585,7 +261644,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261585
261644
|
}
|
|
261586
261645
|
tsParseInterfaceDeclaration(node, properties = {}) {
|
|
261587
261646
|
if (this.hasFollowingLineBreak()) return null;
|
|
261588
|
-
this.expectContextual(
|
|
261647
|
+
this.expectContextual(126);
|
|
261589
261648
|
if (properties.declare) node.declare = true;
|
|
261590
261649
|
if (tokenIsIdentifier(this.state.type)) {
|
|
261591
261650
|
node.id = this.parseIdentifier();
|
|
@@ -261609,7 +261668,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261609
261668
|
node.typeAnnotation = this.tsInType(() => {
|
|
261610
261669
|
node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers);
|
|
261611
261670
|
this.expect(25);
|
|
261612
|
-
if (this.isContextual(
|
|
261671
|
+
if (this.isContextual(111) && this.lookaheadCharCode() !== 46) {
|
|
261613
261672
|
const node2 = this.startNode();
|
|
261614
261673
|
this.next();
|
|
261615
261674
|
return this.finishNode(node2, "TSIntrinsicKeyword");
|
|
@@ -261678,7 +261737,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261678
261737
|
}
|
|
261679
261738
|
tsParseEnumMember() {
|
|
261680
261739
|
const node = this.startNode();
|
|
261681
|
-
node.id = this.match(
|
|
261740
|
+
node.id = this.match(131) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true);
|
|
261682
261741
|
if (this.eat(25)) {
|
|
261683
261742
|
node.initializer = super.parseMaybeAssignAllowIn();
|
|
261684
261743
|
}
|
|
@@ -261687,7 +261746,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261687
261746
|
tsParseEnumDeclaration(node, properties = {}) {
|
|
261688
261747
|
if (properties.const) node.const = true;
|
|
261689
261748
|
if (properties.declare) node.declare = true;
|
|
261690
|
-
this.expectContextual(
|
|
261749
|
+
this.expectContextual(123);
|
|
261691
261750
|
node.id = this.parseIdentifier();
|
|
261692
261751
|
this.checkIdentifier(node.id, node.const ? 8971 : 8459);
|
|
261693
261752
|
node.body = this.tsParseEnumBody();
|
|
@@ -261725,7 +261784,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261725
261784
|
return this.finishNode(node, "TSModuleDeclaration");
|
|
261726
261785
|
}
|
|
261727
261786
|
tsParseAmbientExternalModuleDeclaration(node) {
|
|
261728
|
-
const isGlobal = this.isContextual(
|
|
261787
|
+
const isGlobal = this.isContextual(109);
|
|
261729
261788
|
if (isGlobal) {
|
|
261730
261789
|
node.kind = "global";
|
|
261731
261790
|
node.id = this.parseIdentifier();
|
|
@@ -261735,7 +261794,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261735
261794
|
type,
|
|
261736
261795
|
value
|
|
261737
261796
|
} = this.state;
|
|
261738
|
-
if (type ===
|
|
261797
|
+
if (type === 131) {
|
|
261739
261798
|
node.id = super.parseStringLiteral(value);
|
|
261740
261799
|
} else if (tokenIsIdentifier(type)) {
|
|
261741
261800
|
this.raise(TSErrors.InlineModuleDeclarationMustUseString, this.state.startLoc);
|
|
@@ -261775,16 +261834,16 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261775
261834
|
return this.finishNode(node, "TSImportEqualsDeclaration");
|
|
261776
261835
|
}
|
|
261777
261836
|
tsIsExternalModuleReference() {
|
|
261778
|
-
return this.isContextual(
|
|
261837
|
+
return this.isContextual(116) && this.lookaheadCharCode() === 40;
|
|
261779
261838
|
}
|
|
261780
261839
|
tsParseModuleReference() {
|
|
261781
261840
|
return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(0);
|
|
261782
261841
|
}
|
|
261783
261842
|
tsParseExternalModuleReference() {
|
|
261784
261843
|
const node = this.startNode();
|
|
261785
|
-
this.expectContextual(
|
|
261844
|
+
this.expectContextual(116);
|
|
261786
261845
|
this.expect(6);
|
|
261787
|
-
if (!this.match(
|
|
261846
|
+
if (!this.match(131)) {
|
|
261788
261847
|
this.unexpected();
|
|
261789
261848
|
}
|
|
261790
261849
|
node.expression = super.parseExprAtom();
|
|
@@ -261821,17 +261880,17 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261821
261880
|
switch (startType) {
|
|
261822
261881
|
case 64:
|
|
261823
261882
|
node.declare = true;
|
|
261824
|
-
return super.parseFunctionStatement(node, false,
|
|
261883
|
+
return super.parseFunctionStatement(node, false, 2);
|
|
261825
261884
|
case 76:
|
|
261826
261885
|
node.declare = true;
|
|
261827
261886
|
return this.parseClass(node, true, false);
|
|
261828
|
-
case
|
|
261887
|
+
case 123:
|
|
261829
261888
|
return this.tsParseEnumDeclaration(node, {
|
|
261830
261889
|
declare: true
|
|
261831
261890
|
});
|
|
261832
|
-
case
|
|
261891
|
+
case 109:
|
|
261833
261892
|
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
261834
|
-
case
|
|
261893
|
+
case 97:
|
|
261835
261894
|
if (this.state.containsEsc) {
|
|
261836
261895
|
return;
|
|
261837
261896
|
}
|
|
@@ -261846,14 +261905,14 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261846
261905
|
const: true,
|
|
261847
261906
|
declare: true
|
|
261848
261907
|
});
|
|
261849
|
-
case
|
|
261908
|
+
case 104:
|
|
261850
261909
|
if (this.isUsing()) {
|
|
261851
261910
|
this.raise(TSErrors.InvalidModifierOnUsingDeclaration, this.state.startLoc, "declare");
|
|
261852
261911
|
node.declare = true;
|
|
261853
261912
|
return this.parseVarStatement(node, "using", true);
|
|
261854
261913
|
}
|
|
261855
261914
|
break;
|
|
261856
|
-
case
|
|
261915
|
+
case 93:
|
|
261857
261916
|
if (this.isAwaitUsing()) {
|
|
261858
261917
|
this.raise(TSErrors.InvalidModifierOnAwaitUsingDeclaration, this.state.startLoc, "declare");
|
|
261859
261918
|
node.declare = true;
|
|
@@ -261861,7 +261920,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261861
261920
|
return this.parseVarStatement(node, "await using", true);
|
|
261862
261921
|
}
|
|
261863
261922
|
break;
|
|
261864
|
-
case
|
|
261923
|
+
case 126: {
|
|
261865
261924
|
const result = this.tsParseInterfaceDeclaration(node, {
|
|
261866
261925
|
declare: true
|
|
261867
261926
|
});
|
|
@@ -261879,23 +261938,23 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
261879
261938
|
}
|
|
261880
261939
|
tsParseDeclaration(node, type, next, decorators) {
|
|
261881
261940
|
switch (type) {
|
|
261882
|
-
case
|
|
261941
|
+
case 121:
|
|
261883
261942
|
if (this.tsCheckLineTerminator(next) && (this.match(76) || tokenIsIdentifier(this.state.type))) {
|
|
261884
261943
|
return this.tsParseAbstractDeclaration(node, decorators);
|
|
261885
261944
|
}
|
|
261886
261945
|
break;
|
|
261887
|
-
case
|
|
261946
|
+
case 124:
|
|
261888
261947
|
if (this.tsCheckLineTerminator(next)) {
|
|
261889
261948
|
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
261890
261949
|
}
|
|
261891
261950
|
break;
|
|
261892
|
-
case
|
|
261951
|
+
case 125:
|
|
261893
261952
|
if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
|
|
261894
261953
|
node.kind = "namespace";
|
|
261895
261954
|
return this.tsParseNamespaceDeclaration(node);
|
|
261896
261955
|
}
|
|
261897
261956
|
break;
|
|
261898
|
-
case
|
|
261957
|
+
case 127:
|
|
261899
261958
|
if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
|
|
261900
261959
|
return this.tsParseTypeAliasDeclaration(node);
|
|
261901
261960
|
}
|
|
@@ -262106,7 +262165,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262106
262165
|
return this.finishCallExpression(node2, state.optionalChainMember);
|
|
262107
262166
|
}
|
|
262108
262167
|
const tokenType = this.state.type;
|
|
262109
|
-
if (tokenType === 44 || tokenType === 48 || tokenType !== 6 && tokenType !==
|
|
262168
|
+
if (tokenType === 44 || tokenType === 48 || tokenType !== 6 && tokenType !== 90 && tokenType !== 117 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) {
|
|
262110
262169
|
return;
|
|
262111
262170
|
}
|
|
262112
262171
|
const node = this.startNodeAt(startLoc);
|
|
@@ -262143,7 +262202,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262143
262202
|
}
|
|
262144
262203
|
parseExprOp(left, leftStartLoc, minPrec) {
|
|
262145
262204
|
let isSatisfies;
|
|
262146
|
-
if (tokenOperatorPrecedence(54) > minPrec && !this.hasPrecedingLineBreak() && (this.isContextual(
|
|
262205
|
+
if (tokenOperatorPrecedence(54) > minPrec && !this.hasPrecedingLineBreak() && (this.isContextual(90) || (isSatisfies = this.isContextual(117)))) {
|
|
262147
262206
|
const node = this.startNodeAt(leftStartLoc);
|
|
262148
262207
|
node.expression = left;
|
|
262149
262208
|
node.typeAnnotation = this.tsInType(() => {
|
|
@@ -262173,7 +262232,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262173
262232
|
}
|
|
262174
262233
|
isPotentialImportPhase(isExport) {
|
|
262175
262234
|
if (super.isPotentialImportPhase(isExport)) return true;
|
|
262176
|
-
if (this.isContextual(
|
|
262235
|
+
if (this.isContextual(127)) {
|
|
262177
262236
|
const ch = this.lookaheadCharCode();
|
|
262178
262237
|
return isExport ? ch === 123 || ch === 42 : ch !== 61;
|
|
262179
262238
|
}
|
|
@@ -262188,7 +262247,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262188
262247
|
}
|
|
262189
262248
|
}
|
|
262190
262249
|
parseImport(node) {
|
|
262191
|
-
if (this.match(
|
|
262250
|
+
if (this.match(131)) {
|
|
262192
262251
|
node.importKind = "value";
|
|
262193
262252
|
if (this.scope.inTSNamespace) {
|
|
262194
262253
|
this.raise(TSErrors.ImportInTSNamespace, node);
|
|
@@ -262203,7 +262262,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262203
262262
|
this.raise(TSErrors.ImportInTSNamespace, node);
|
|
262204
262263
|
}
|
|
262205
262264
|
return result;
|
|
262206
|
-
} else if (this.isContextual(
|
|
262265
|
+
} else if (this.isContextual(127)) {
|
|
262207
262266
|
const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, false);
|
|
262208
262267
|
if (this.lookaheadCharCode() === 61) {
|
|
262209
262268
|
if (this.scope.inTSNamespace) {
|
|
@@ -262228,7 +262287,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262228
262287
|
const nodeImportEquals = this.startNode();
|
|
262229
262288
|
this.next();
|
|
262230
262289
|
let maybeDefaultIdentifier = null;
|
|
262231
|
-
if (this.isContextual(
|
|
262290
|
+
if (this.isContextual(127) && this.isPotentialImportPhase(false)) {
|
|
262232
262291
|
maybeDefaultIdentifier = this.parseMaybeImportPhase(nodeImportEquals, false);
|
|
262233
262292
|
} else {
|
|
262234
262293
|
nodeImportEquals.importKind = "value";
|
|
@@ -262249,9 +262308,9 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262249
262308
|
this.raise(TSErrors.ExportAssignmentInTSNamespace, assign);
|
|
262250
262309
|
}
|
|
262251
262310
|
return this.finishNode(assign, "TSExportAssignment");
|
|
262252
|
-
} else if (this.eatContextual(
|
|
262311
|
+
} else if (this.eatContextual(90)) {
|
|
262253
262312
|
const decl = node;
|
|
262254
|
-
this.expectContextual(
|
|
262313
|
+
this.expectContextual(125);
|
|
262255
262314
|
decl.id = this.parseIdentifier();
|
|
262256
262315
|
this.checkIdentifier(decl.id, 8201);
|
|
262257
262316
|
this.semicolon();
|
|
@@ -262268,7 +262327,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262268
262327
|
}
|
|
262269
262328
|
}
|
|
262270
262329
|
isAbstractClass() {
|
|
262271
|
-
return this.isContextual(
|
|
262330
|
+
return this.isContextual(121) && this.isLookaheadContextual("class");
|
|
262272
262331
|
}
|
|
262273
262332
|
parseExportDefaultExpression() {
|
|
262274
262333
|
if (this.isAbstractClass()) {
|
|
@@ -262277,7 +262336,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262277
262336
|
cls.abstract = true;
|
|
262278
262337
|
return this.parseClass(cls, true, true);
|
|
262279
262338
|
}
|
|
262280
|
-
if (this.match(
|
|
262339
|
+
if (this.match(126)) {
|
|
262281
262340
|
const result = this.tsParseInterfaceDeclaration(this.startNode());
|
|
262282
262341
|
if (result) return result;
|
|
262283
262342
|
}
|
|
@@ -262329,29 +262388,29 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262329
262388
|
}
|
|
262330
262389
|
break;
|
|
262331
262390
|
}
|
|
262332
|
-
case
|
|
262333
|
-
case
|
|
262391
|
+
case 121:
|
|
262392
|
+
case 122: {
|
|
262334
262393
|
if (this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()) {
|
|
262335
262394
|
const token = this.state.type;
|
|
262336
262395
|
const node = this.startNode();
|
|
262337
262396
|
this.next();
|
|
262338
|
-
const declaration = token ===
|
|
262397
|
+
const declaration = token === 122 ? this.tsTryParseDeclare(node) : this.tsParseAbstractDeclaration(node, decorators);
|
|
262339
262398
|
if (declaration) {
|
|
262340
|
-
if (token ===
|
|
262399
|
+
if (token === 122) {
|
|
262341
262400
|
declaration.declare = true;
|
|
262342
262401
|
}
|
|
262343
262402
|
return declaration;
|
|
262344
262403
|
} else {
|
|
262345
|
-
node.expression = this.createIdentifier(this.startNodeAtNode(node), token ===
|
|
262404
|
+
node.expression = this.createIdentifier(this.startNodeAtNode(node), token === 122 ? "declare" : "abstract");
|
|
262346
262405
|
this.semicolon(false);
|
|
262347
262406
|
return this.finishNode(node, "ExpressionStatement");
|
|
262348
262407
|
}
|
|
262349
262408
|
}
|
|
262350
262409
|
break;
|
|
262351
262410
|
}
|
|
262352
|
-
case
|
|
262411
|
+
case 123:
|
|
262353
262412
|
return this.tsParseEnumDeclaration(this.startNode());
|
|
262354
|
-
case
|
|
262413
|
+
case 109: {
|
|
262355
262414
|
const nextCh = this.lookaheadCharCode();
|
|
262356
262415
|
if (nextCh === 123) {
|
|
262357
262416
|
const node = this.startNode();
|
|
@@ -262359,7 +262418,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262359
262418
|
}
|
|
262360
262419
|
break;
|
|
262361
262420
|
}
|
|
262362
|
-
case
|
|
262421
|
+
case 126: {
|
|
262363
262422
|
const result = this.tsParseInterfaceDeclaration(this.startNode());
|
|
262364
262423
|
if (result) {
|
|
262365
262424
|
if (!allowDeclaration) {
|
|
@@ -262369,28 +262428,28 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262369
262428
|
}
|
|
262370
262429
|
break;
|
|
262371
262430
|
}
|
|
262372
|
-
case
|
|
262431
|
+
case 124: {
|
|
262373
262432
|
if (this.nextTokenIsStringLiteralOnSameLine()) {
|
|
262374
262433
|
const node = this.startNode();
|
|
262375
262434
|
this.next();
|
|
262376
|
-
return this.tsParseDeclaration(node,
|
|
262435
|
+
return this.tsParseDeclaration(node, 124, false, decorators);
|
|
262377
262436
|
} else if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
262378
262437
|
this.raise(TSErrors.InlineModuleDeclarationMustUseString, this.state.startLoc);
|
|
262379
262438
|
const node = this.startNode();
|
|
262380
262439
|
this.next();
|
|
262381
|
-
return this.tsParseDeclaration(node,
|
|
262440
|
+
return this.tsParseDeclaration(node, 125, false, decorators);
|
|
262382
262441
|
}
|
|
262383
262442
|
break;
|
|
262384
262443
|
}
|
|
262385
|
-
case
|
|
262444
|
+
case 125: {
|
|
262386
262445
|
if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
262387
262446
|
const node = this.startNode();
|
|
262388
262447
|
this.next();
|
|
262389
|
-
return this.tsParseDeclaration(node,
|
|
262448
|
+
return this.tsParseDeclaration(node, 125, false, decorators);
|
|
262390
262449
|
}
|
|
262391
262450
|
break;
|
|
262392
262451
|
}
|
|
262393
|
-
case
|
|
262452
|
+
case 127: {
|
|
262394
262453
|
if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
262395
262454
|
const node = this.startNode();
|
|
262396
262455
|
if (!allowDeclaration) {
|
|
@@ -262417,7 +262476,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262417
262476
|
});
|
|
262418
262477
|
}
|
|
262419
262478
|
tsIsStartOfStaticBlocks() {
|
|
262420
|
-
return this.isContextual(
|
|
262479
|
+
return this.isContextual(103) && this.lookaheadCharCode() === 123;
|
|
262421
262480
|
}
|
|
262422
262481
|
parseClassMember(classBody2, member, state) {
|
|
262423
262482
|
this.tsParseModifiers(ClassMemberModifiers, TSErrors.InvalidModifierOnTypeParameterPositions, member, true);
|
|
@@ -262529,12 +262588,12 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262529
262588
|
return node;
|
|
262530
262589
|
}
|
|
262531
262590
|
parseExportDeclaration(node) {
|
|
262532
|
-
if (!this.state.isAmbientContext && this.isContextual(
|
|
262591
|
+
if (!this.state.isAmbientContext && this.isContextual(122)) {
|
|
262533
262592
|
return this.tsInAmbientContext(() => this.parseExportDeclaration(node));
|
|
262534
262593
|
}
|
|
262535
262594
|
const startLoc = this.state.startLoc;
|
|
262536
|
-
const isDeclare = this.eatContextual(
|
|
262537
|
-
if (isDeclare && (this.isContextual(
|
|
262595
|
+
const isDeclare = this.eatContextual(122);
|
|
262596
|
+
if (isDeclare && (this.isContextual(122) || !this.shouldParseExportDeclaration())) {
|
|
262538
262597
|
throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
|
|
262539
262598
|
}
|
|
262540
262599
|
const isIdentifier5 = tokenIsIdentifier(this.state.type);
|
|
@@ -262550,7 +262609,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262550
262609
|
return declaration;
|
|
262551
262610
|
}
|
|
262552
262611
|
parseClassId(node, isStatement5, optionalId, bindingType) {
|
|
262553
|
-
if ((!isStatement5 || optionalId) && this.isContextual(
|
|
262612
|
+
if ((!isStatement5 || optionalId) && this.isContextual(110)) {
|
|
262554
262613
|
node.id = null;
|
|
262555
262614
|
return;
|
|
262556
262615
|
}
|
|
@@ -262654,7 +262713,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262654
262713
|
node.superTypeArguments = this.tsParseTypeArgumentsInExpression();
|
|
262655
262714
|
}
|
|
262656
262715
|
}
|
|
262657
|
-
if (this.eatContextual(
|
|
262716
|
+
if (this.eatContextual(110)) {
|
|
262658
262717
|
node.implements = this.tsParseHeritageClause("implements");
|
|
262659
262718
|
}
|
|
262660
262719
|
}
|
|
@@ -262689,7 +262748,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
262689
262748
|
let state;
|
|
262690
262749
|
let jsx2;
|
|
262691
262750
|
let typeCast;
|
|
262692
|
-
if (this.hasPlugin("jsx") && (this.match(
|
|
262751
|
+
if (this.hasPlugin("jsx") && (this.match(139) || this.match(43))) {
|
|
262693
262752
|
state = this.state.clone();
|
|
262694
262753
|
jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, isParenItem), state);
|
|
262695
262754
|
if (!jsx2.error) return jsx2.node;
|
|
@@ -263021,7 +263080,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
263021
263080
|
if (this.match(76)) {
|
|
263022
263081
|
node.abstract = true;
|
|
263023
263082
|
return this.maybeTakeDecorators(decorators, this.parseClass(node, true, false));
|
|
263024
|
-
} else if (this.isContextual(
|
|
263083
|
+
} else if (this.isContextual(126)) {
|
|
263025
263084
|
if (!this.hasFollowingLineBreak()) {
|
|
263026
263085
|
node.abstract = true;
|
|
263027
263086
|
this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier, node);
|
|
@@ -263085,9 +263144,9 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
263085
263144
|
parseTypeOnlyImportSpecifier(node, isInTypeOnly) {
|
|
263086
263145
|
let leftOfAs = node.imported;
|
|
263087
263146
|
let hasTypeSpecifier = false;
|
|
263088
|
-
if (this.isContextual(
|
|
263147
|
+
if (this.isContextual(90)) {
|
|
263089
263148
|
const firstAs = this.parseIdentifier();
|
|
263090
|
-
if (this.isContextual(
|
|
263149
|
+
if (this.isContextual(90)) {
|
|
263091
263150
|
const secondAs = this.parseIdentifier();
|
|
263092
263151
|
if (tokenIsKeywordOrIdentifier(this.state.type)) {
|
|
263093
263152
|
hasTypeSpecifier = true;
|
|
@@ -263105,7 +263164,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
263105
263164
|
} else if (tokenIsKeywordOrIdentifier(this.state.type)) {
|
|
263106
263165
|
hasTypeSpecifier = true;
|
|
263107
263166
|
leftOfAs = this.parseIdentifier(true);
|
|
263108
|
-
if (!this.isContextual(
|
|
263167
|
+
if (!this.isContextual(90)) {
|
|
263109
263168
|
this.checkReservedWord(leftOfAs.name, leftOfAs.start, true, true);
|
|
263110
263169
|
}
|
|
263111
263170
|
}
|
|
@@ -263114,14 +263173,14 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
263114
263173
|
}
|
|
263115
263174
|
node.imported = leftOfAs;
|
|
263116
263175
|
node.importKind = hasTypeSpecifier ? "type" : "value";
|
|
263117
|
-
this.checkIdentifier(node.local ??= this.eatContextual(
|
|
263176
|
+
this.checkIdentifier(node.local ??= this.eatContextual(90) ? this.parseIdentifier() : this.cloneIdentifier(node.imported), hasTypeSpecifier ? 4098 : 4096);
|
|
263118
263177
|
}
|
|
263119
263178
|
parseTypeOnlyExportSpecifier(node, isInTypeOnly) {
|
|
263120
263179
|
const local = node.local;
|
|
263121
263180
|
let hasTypeSpecifier = false;
|
|
263122
|
-
if (this.isContextual(
|
|
263181
|
+
if (this.isContextual(90)) {
|
|
263123
263182
|
const firstAs = this.parseIdentifier();
|
|
263124
|
-
if (this.isContextual(
|
|
263183
|
+
if (this.isContextual(90)) {
|
|
263125
263184
|
const secondAs = this.parseIdentifier();
|
|
263126
263185
|
if (tokenIsKeywordOrIdentifier(this.state.type)) {
|
|
263127
263186
|
hasTypeSpecifier = true;
|
|
@@ -263144,7 +263203,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
263144
263203
|
this.raise(TSErrors.TypeModifierIsUsedInTypeExports, local);
|
|
263145
263204
|
}
|
|
263146
263205
|
node.exportKind = hasTypeSpecifier ? "type" : "value";
|
|
263147
|
-
node.exported ??= this.eatContextual(
|
|
263206
|
+
node.exported ??= this.eatContextual(90) ? this.parseModuleExportName() : this.cloneIdentifier(node.local);
|
|
263148
263207
|
}
|
|
263149
263208
|
fillOptionalPropertiesForTSESLint(node) {
|
|
263150
263209
|
switch (node.type) {
|
|
@@ -263368,13 +263427,13 @@ var PlaceholderErrorTemplates = {
|
|
|
263368
263427
|
var PlaceholderErrors = ParseErrorEnum`placeholders`(PlaceholderErrorTemplates);
|
|
263369
263428
|
var placeholders = (superClass) => class PlaceholdersParserMixin extends superClass {
|
|
263370
263429
|
parsePlaceholder(expectedNode) {
|
|
263371
|
-
if (this.match(
|
|
263430
|
+
if (this.match(130)) {
|
|
263372
263431
|
const node = this.startNode();
|
|
263373
263432
|
this.next();
|
|
263374
263433
|
this.assertNoSpace();
|
|
263375
263434
|
node.name = super.parseIdentifier(true);
|
|
263376
263435
|
this.assertNoSpace();
|
|
263377
|
-
this.expect(
|
|
263436
|
+
this.expect(130);
|
|
263378
263437
|
return this.finishPlaceholder(node, expectedNode);
|
|
263379
263438
|
}
|
|
263380
263439
|
}
|
|
@@ -263388,7 +263447,7 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
263388
263447
|
}
|
|
263389
263448
|
getTokenFromCode(code2) {
|
|
263390
263449
|
if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
|
|
263391
|
-
this.finishOp(
|
|
263450
|
+
this.finishOp(130, 2);
|
|
263392
263451
|
} else {
|
|
263393
263452
|
super.getTokenFromCode(code2);
|
|
263394
263453
|
}
|
|
@@ -263444,15 +263503,15 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
263444
263503
|
if (node.label?.type === "Placeholder") return;
|
|
263445
263504
|
super.verifyBreakContinue(node, isBreak);
|
|
263446
263505
|
}
|
|
263447
|
-
parseExpressionStatement(node, expr) {
|
|
263506
|
+
parseExpressionStatement(node, expr, flags) {
|
|
263448
263507
|
if (expr.type !== "Placeholder" || expr.extra?.parenthesized) {
|
|
263449
|
-
return super.parseExpressionStatement(node, expr);
|
|
263508
|
+
return super.parseExpressionStatement(node, expr, flags);
|
|
263450
263509
|
}
|
|
263451
263510
|
if (this.match(10)) {
|
|
263452
263511
|
const stmt = node;
|
|
263453
263512
|
stmt.label = this.finishPlaceholder(expr, "Identifier");
|
|
263454
263513
|
this.next();
|
|
263455
|
-
stmt.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration();
|
|
263514
|
+
stmt.body = flags & 8 ? super.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : super.parseStatement();
|
|
263456
263515
|
return this.finishNode(stmt, "LabeledStatement");
|
|
263457
263516
|
}
|
|
263458
263517
|
this.semicolon();
|
|
@@ -263472,7 +263531,7 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
263472
263531
|
const oldStrict = this.state.strict;
|
|
263473
263532
|
const placeholder2 = this.parsePlaceholder("Identifier");
|
|
263474
263533
|
if (placeholder2) {
|
|
263475
|
-
if (this.match(77) || this.match(
|
|
263534
|
+
if (this.match(77) || this.match(130) || this.match(2)) {
|
|
263476
263535
|
node.id = placeholder2;
|
|
263477
263536
|
} else if (optionalId || !isStatement5) {
|
|
263478
263537
|
node.id = null;
|
|
@@ -263492,7 +263551,7 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
263492
263551
|
const placeholder2 = this.parsePlaceholder("Identifier");
|
|
263493
263552
|
if (!placeholder2) return super.parseExport(node, decorators);
|
|
263494
263553
|
const node2 = node;
|
|
263495
|
-
if (!this.isContextual(
|
|
263554
|
+
if (!this.isContextual(95) && !this.match(8)) {
|
|
263496
263555
|
node2.specifiers = [];
|
|
263497
263556
|
node2.source = null;
|
|
263498
263557
|
node2.declaration = this.finishPlaceholder(placeholder2, "Declaration");
|
|
@@ -263508,7 +263567,7 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
263508
263567
|
if (this.match(61)) {
|
|
263509
263568
|
const next = this.nextTokenStart();
|
|
263510
263569
|
if (this.isUnparsedContextual(next, "from")) {
|
|
263511
|
-
if (this.input.startsWith(tokenLabelName(
|
|
263570
|
+
if (this.input.startsWith(tokenLabelName(130), this.hasPlugin("exportDefaultFrom") ? this.nextTokenStartSince(next + 4) : this.nextTokenInLineStartSince(next + 4))) {
|
|
263512
263571
|
return true;
|
|
263513
263572
|
}
|
|
263514
263573
|
}
|
|
@@ -263527,7 +263586,7 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
263527
263586
|
const placeholder2 = this.parsePlaceholder("Identifier");
|
|
263528
263587
|
if (!placeholder2) return super.parseImport(node);
|
|
263529
263588
|
node.specifiers = [];
|
|
263530
|
-
if (!this.isContextual(
|
|
263589
|
+
if (!this.isContextual(95) && !this.match(8)) {
|
|
263531
263590
|
node.source = this.finishPlaceholder(placeholder2, "StringLiteral");
|
|
263532
263591
|
this.semicolon();
|
|
263533
263592
|
return this.finishNode(node, "ImportDeclaration");
|
|
@@ -263539,7 +263598,7 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
263539
263598
|
const hasStarImport = this.maybeParseStarImportSpecifier(node);
|
|
263540
263599
|
if (!hasStarImport) this.parseNamedImportSpecifiers(node);
|
|
263541
263600
|
}
|
|
263542
|
-
this.expectContextual(
|
|
263601
|
+
this.expectContextual(95);
|
|
263543
263602
|
node.source = this.parseImportSource();
|
|
263544
263603
|
this.semicolon();
|
|
263545
263604
|
return this.finishNode(node, "ImportDeclaration");
|
|
@@ -270004,7 +270063,7 @@ var _isDigit2 = function isDigit2(code2) {
|
|
|
270004
270063
|
return code2 >= 48 && code2 <= 57;
|
|
270005
270064
|
};
|
|
270006
270065
|
var forbiddenNumericSeparatorSiblings2 = {
|
|
270007
|
-
decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
|
|
270066
|
+
decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111, 43, 45]),
|
|
270008
270067
|
hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
|
|
270009
270068
|
};
|
|
270010
270069
|
var isAllowedNumericSeparatorSibling2 = {
|
|
@@ -270203,7 +270262,7 @@ function readInt2(input, pos, lineStart, curLine, radix, len, forceLen, allowNum
|
|
|
270203
270262
|
pos
|
|
270204
270263
|
};
|
|
270205
270264
|
errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
|
|
270206
|
-
} else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev)
|
|
270265
|
+
} else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev)) {
|
|
270207
270266
|
if (bailOnError) return {
|
|
270208
270267
|
n: null,
|
|
270209
270268
|
pos
|
|
@@ -275140,7 +275199,8 @@ var tSFunctionTypeAnnotationCommon = () => ({
|
|
|
275140
275199
|
});
|
|
275141
275200
|
defineType("TSParameterProperty", {
|
|
275142
275201
|
aliases: [],
|
|
275143
|
-
|
|
275202
|
+
builder: ["parameter"],
|
|
275203
|
+
visitor: ["decorators", "parameter"],
|
|
275144
275204
|
fields: {
|
|
275145
275205
|
accessibility: {
|
|
275146
275206
|
validate: assertOneOf("public", "private", "protected"),
|
|
@@ -280949,7 +281009,7 @@ var builtin_upper_default = [
|
|
|
280949
281009
|
// node_modules/@babel/generator/lib/index.js
|
|
280950
281010
|
init_define_globalThis_DIAGONAL_SDK_RUNTIME();
|
|
280951
281011
|
|
|
280952
|
-
// node_modules/@
|
|
281012
|
+
// node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
|
|
280953
281013
|
init_define_globalThis_DIAGONAL_SDK_RUNTIME();
|
|
280954
281014
|
|
|
280955
281015
|
// node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
@@ -281525,7 +281585,7 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
281525
281585
|
return index3;
|
|
281526
281586
|
}
|
|
281527
281587
|
|
|
281528
|
-
// node_modules/@
|
|
281588
|
+
// node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
|
|
281529
281589
|
var SetArray = class {
|
|
281530
281590
|
constructor() {
|
|
281531
281591
|
this._indexes = { __proto__: null };
|