@danielx/civet 0.9.6 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/browser.js +161 -111
- package/dist/main.js +204 -138
- package/dist/main.mjs +204 -138
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -495,12 +495,14 @@ __export(lib_civet_exports, {
|
|
|
495
495
|
attachPostfixStatementAsExpression: () => attachPostfixStatementAsExpression,
|
|
496
496
|
blockWithPrefix: () => blockWithPrefix,
|
|
497
497
|
braceBlock: () => braceBlock,
|
|
498
|
+
bracedBlock: () => bracedBlock,
|
|
498
499
|
convertNamedImportsToObject: () => convertNamedImportsToObject,
|
|
499
500
|
convertObjectToJSXAttributes: () => convertObjectToJSXAttributes,
|
|
500
501
|
convertWithClause: () => convertWithClause,
|
|
501
502
|
dedentBlockString: () => dedentBlockString,
|
|
502
503
|
dedentBlockSubstitutions: () => dedentBlockSubstitutions,
|
|
503
504
|
deepCopy: () => deepCopy,
|
|
505
|
+
duplicateBlock: () => duplicateBlock,
|
|
504
506
|
dynamizeImportDeclaration: () => dynamizeImportDeclaration,
|
|
505
507
|
dynamizeImportDeclarationExpression: () => dynamizeImportDeclarationExpression,
|
|
506
508
|
expressionizeTypeIf: () => expressionizeTypeIf,
|
|
@@ -757,9 +759,49 @@ function isExit(node) {
|
|
|
757
759
|
}
|
|
758
760
|
case "SwitchStatement": {
|
|
759
761
|
return (
|
|
760
|
-
//
|
|
761
|
-
|
|
762
|
-
|
|
762
|
+
// Every clause should exit, or continue to next clause
|
|
763
|
+
(() => {
|
|
764
|
+
let results = true;
|
|
765
|
+
for (const clause of node.caseBlock.clauses) {
|
|
766
|
+
let m1;
|
|
767
|
+
if (m1 = clause.type, m1 === "CaseClause" || m1 === "WhenClause" || m1 === "DefaultClause") {
|
|
768
|
+
if (!(!(clause.type === "WhenClause" && clause.break) && !gatherRecursiveWithinFunction(clause.block, ($) => $.type === "BreakStatement").length)) {
|
|
769
|
+
results = false;
|
|
770
|
+
break;
|
|
771
|
+
}
|
|
772
|
+
} else {
|
|
773
|
+
if (!isExit(clause.block)) {
|
|
774
|
+
results = false;
|
|
775
|
+
break;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
return results;
|
|
780
|
+
})() && // Ensure exhaustive by requiring an else/default clause
|
|
781
|
+
(() => {
|
|
782
|
+
let results1 = false;
|
|
783
|
+
let i3 = 0;
|
|
784
|
+
for (const clause of node.caseBlock.clauses) {
|
|
785
|
+
const i = i3++;
|
|
786
|
+
if (clause.type === "DefaultClause" && // Require default clause to exit or continue to next clause
|
|
787
|
+
// (checked above) and eventually reach an exiting clause
|
|
788
|
+
(() => {
|
|
789
|
+
let results2 = false;
|
|
790
|
+
for (const later of node.caseBlock.clauses.slice(i)) {
|
|
791
|
+
let m2;
|
|
792
|
+
if ((m2 = later.type, m2 === "CaseClause" || m2 === "WhenClause" || m2 === "DefaultClause") && isExit(later.block)) {
|
|
793
|
+
results2 = true;
|
|
794
|
+
break;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
return results2;
|
|
798
|
+
})()) {
|
|
799
|
+
results1 = true;
|
|
800
|
+
break;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
return results1;
|
|
804
|
+
})()
|
|
763
805
|
);
|
|
764
806
|
}
|
|
765
807
|
case "TryStatement": {
|
|
@@ -822,18 +864,18 @@ function insertTrimmingSpace(target, c) {
|
|
|
822
864
|
if (target.length === 0) {
|
|
823
865
|
return c;
|
|
824
866
|
}
|
|
825
|
-
const
|
|
826
|
-
for (let
|
|
827
|
-
const i =
|
|
828
|
-
const e = target[
|
|
867
|
+
const results3 = [];
|
|
868
|
+
for (let i4 = 0, len3 = target.length; i4 < len3; i4++) {
|
|
869
|
+
const i = i4;
|
|
870
|
+
const e = target[i4];
|
|
829
871
|
if (i === 0) {
|
|
830
|
-
|
|
872
|
+
results3.push(insertTrimmingSpace(e, c));
|
|
831
873
|
} else {
|
|
832
|
-
|
|
874
|
+
results3.push(e);
|
|
833
875
|
}
|
|
834
876
|
}
|
|
835
877
|
;
|
|
836
|
-
return
|
|
878
|
+
return results3;
|
|
837
879
|
} else if (isParent(target)) {
|
|
838
880
|
const oldChildren = target.children;
|
|
839
881
|
target = {
|
|
@@ -1068,8 +1110,8 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
|
|
|
1068
1110
|
return void 0;
|
|
1069
1111
|
}
|
|
1070
1112
|
if (Array.isArray(node)) {
|
|
1071
|
-
for (let
|
|
1072
|
-
const child = node[
|
|
1113
|
+
for (let i5 = 0, len4 = node.length; i5 < len4; i5++) {
|
|
1114
|
+
const child = node[i5];
|
|
1073
1115
|
if (skip(child)) {
|
|
1074
1116
|
continue;
|
|
1075
1117
|
}
|
|
@@ -1108,9 +1150,9 @@ function deepCopy(root) {
|
|
|
1108
1150
|
if (Array.isArray(node)) {
|
|
1109
1151
|
const array = new Array(node.length);
|
|
1110
1152
|
copied.set(node, array);
|
|
1111
|
-
for (let
|
|
1112
|
-
const i =
|
|
1113
|
-
const item = node[
|
|
1153
|
+
for (let i6 = 0, len5 = node.length; i6 < len5; i6++) {
|
|
1154
|
+
const i = i6;
|
|
1155
|
+
const item = node[i6];
|
|
1114
1156
|
array[i] = recurse(item);
|
|
1115
1157
|
}
|
|
1116
1158
|
} else if (node?.type === "Ref") {
|
|
@@ -1137,9 +1179,9 @@ function replaceNode(node, newNode, parent) {
|
|
|
1137
1179
|
throw new Error("replaceNode failed: node has no parent");
|
|
1138
1180
|
}
|
|
1139
1181
|
function recurse(children) {
|
|
1140
|
-
for (let
|
|
1141
|
-
const i =
|
|
1142
|
-
const child = children[
|
|
1182
|
+
for (let i7 = 0, len6 = children.length; i7 < len6; i7++) {
|
|
1183
|
+
const i = i7;
|
|
1184
|
+
const child = children[i7];
|
|
1143
1185
|
if (child === node) {
|
|
1144
1186
|
children[i] = newNode;
|
|
1145
1187
|
return true;
|
|
@@ -1176,9 +1218,9 @@ function replaceNodes(root, predicate, replacer) {
|
|
|
1176
1218
|
return root;
|
|
1177
1219
|
}
|
|
1178
1220
|
}
|
|
1179
|
-
for (let
|
|
1180
|
-
const i =
|
|
1181
|
-
const node = array[
|
|
1221
|
+
for (let i8 = 0, len7 = array.length; i8 < len7; i8++) {
|
|
1222
|
+
const i = i8;
|
|
1223
|
+
const node = array[i8];
|
|
1182
1224
|
if (!(node != null)) {
|
|
1183
1225
|
return;
|
|
1184
1226
|
}
|
|
@@ -1302,8 +1344,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1302
1344
|
return;
|
|
1303
1345
|
}
|
|
1304
1346
|
if (Array.isArray(node)) {
|
|
1305
|
-
for (let
|
|
1306
|
-
const child = node[
|
|
1347
|
+
for (let i9 = 0, len8 = node.length; i9 < len8; i9++) {
|
|
1348
|
+
const child = node[i9];
|
|
1307
1349
|
updateParentPointers(child, parent, depth);
|
|
1308
1350
|
}
|
|
1309
1351
|
return;
|
|
@@ -1313,8 +1355,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1313
1355
|
node.parent = parent;
|
|
1314
1356
|
}
|
|
1315
1357
|
if (depth && isParent(node)) {
|
|
1316
|
-
for (let ref8 = node.children,
|
|
1317
|
-
const child = ref8[
|
|
1358
|
+
for (let ref8 = node.children, i10 = 0, len9 = ref8.length; i10 < len9; i10++) {
|
|
1359
|
+
const child = ref8[i10];
|
|
1318
1360
|
updateParentPointers(child, node, depth - 1);
|
|
1319
1361
|
}
|
|
1320
1362
|
}
|
|
@@ -1511,9 +1553,9 @@ function wrapWithReturn(expression, parent = expression?.parent, semi = false) {
|
|
|
1511
1553
|
}
|
|
1512
1554
|
function flatJoin(array, separator) {
|
|
1513
1555
|
const result = [];
|
|
1514
|
-
for (let
|
|
1515
|
-
const i =
|
|
1516
|
-
const items = array[
|
|
1556
|
+
for (let i11 = 0, len10 = array.length; i11 < len10; i11++) {
|
|
1557
|
+
const i = i11;
|
|
1558
|
+
const items = array[i11];
|
|
1517
1559
|
if (i) {
|
|
1518
1560
|
result.push(separator);
|
|
1519
1561
|
}
|
|
@@ -1951,6 +1993,9 @@ function gatherBindingPatternTypeSuffix(pattern) {
|
|
|
1951
1993
|
ts: true,
|
|
1952
1994
|
children: [": unknown"]
|
|
1953
1995
|
};
|
|
1996
|
+
if (prop.initializer && !typeSuffix.optional) {
|
|
1997
|
+
typeSuffix.children.unshift(typeSuffix.optional = "?");
|
|
1998
|
+
}
|
|
1954
1999
|
switch (prop.type) {
|
|
1955
2000
|
case "BindingProperty": {
|
|
1956
2001
|
const ws = prop.children.slice(0, prop.children.indexOf(prop.name));
|
|
@@ -3133,12 +3178,10 @@ function assignResults(node, collect) {
|
|
|
3133
3178
|
}
|
|
3134
3179
|
case "IfStatement": {
|
|
3135
3180
|
assignResults(exp.then, collect);
|
|
3136
|
-
if (exp.then.bare && !exp.then.semicolon) {
|
|
3137
|
-
exp.then.children.push(exp.then.semicolon = ";");
|
|
3138
|
-
}
|
|
3139
3181
|
if (exp.else) {
|
|
3140
3182
|
assignResults(exp.else.block, collect);
|
|
3141
3183
|
} else {
|
|
3184
|
+
braceBlock(exp.then);
|
|
3142
3185
|
exp.children.push([" else {", collect("void 0"), "}"]);
|
|
3143
3186
|
}
|
|
3144
3187
|
return;
|
|
@@ -4222,6 +4265,11 @@ function duplicateBlock(block) {
|
|
|
4222
4265
|
children
|
|
4223
4266
|
};
|
|
4224
4267
|
}
|
|
4268
|
+
function bracedBlock(block) {
|
|
4269
|
+
block = duplicateBlock(block);
|
|
4270
|
+
braceBlock(block);
|
|
4271
|
+
return block;
|
|
4272
|
+
}
|
|
4225
4273
|
function makeEmptyBlock() {
|
|
4226
4274
|
const expressions = [];
|
|
4227
4275
|
return {
|
|
@@ -5343,7 +5391,7 @@ function processDeclarations(statements) {
|
|
|
5343
5391
|
});
|
|
5344
5392
|
}
|
|
5345
5393
|
}
|
|
5346
|
-
if (initializer) {
|
|
5394
|
+
if (initializer && blockContainingStatement(declaration)) {
|
|
5347
5395
|
prependStatementExpressionBlock(initializer, declaration);
|
|
5348
5396
|
}
|
|
5349
5397
|
}
|
|
@@ -8967,6 +9015,7 @@ var grammar = {
|
|
|
8967
9015
|
ExplicitPropertyGlob,
|
|
8968
9016
|
PropertyGlob,
|
|
8969
9017
|
PropertyBind,
|
|
9018
|
+
PropertyBindExplicitArguments,
|
|
8970
9019
|
SuperProperty,
|
|
8971
9020
|
MetaProperty,
|
|
8972
9021
|
ReturnValue,
|
|
@@ -9245,8 +9294,6 @@ var grammar = {
|
|
|
9245
9294
|
NamedImports,
|
|
9246
9295
|
OperatorNamedImports,
|
|
9247
9296
|
FromClause,
|
|
9248
|
-
ImpliedFromClause,
|
|
9249
|
-
ImpliedFrom,
|
|
9250
9297
|
ImportAssertion,
|
|
9251
9298
|
TypeAndImportSpecifier,
|
|
9252
9299
|
ImportSpecifier,
|
|
@@ -9682,16 +9729,16 @@ var $L13 = (0, import_lib2.$L)("=>");
|
|
|
9682
9729
|
var $L14 = (0, import_lib2.$L)("\u21D2");
|
|
9683
9730
|
var $L15 = (0, import_lib2.$L)("import");
|
|
9684
9731
|
var $L16 = (0, import_lib2.$L)(":");
|
|
9685
|
-
var $L17 = (0, import_lib2.$L)("
|
|
9686
|
-
var $L18 = (0, import_lib2.$L)("
|
|
9687
|
-
var $L19 = (0, import_lib2.$L)("
|
|
9688
|
-
var $L20 = (0, import_lib2.$L)("
|
|
9689
|
-
var $L21 = (0, import_lib2.$L)("
|
|
9690
|
-
var $L22 = (0, import_lib2.$L)("
|
|
9691
|
-
var $L23 = (0, import_lib2.$L)("
|
|
9692
|
-
var $L24 = (0, import_lib2.$L)("
|
|
9693
|
-
var $L25 = (0, import_lib2.$L)("
|
|
9694
|
-
var $L26 = (0, import_lib2.$L)("
|
|
9732
|
+
var $L17 = (0, import_lib2.$L)(" ");
|
|
9733
|
+
var $L18 = (0, import_lib2.$L)("<");
|
|
9734
|
+
var $L19 = (0, import_lib2.$L)("implements");
|
|
9735
|
+
var $L20 = (0, import_lib2.$L)("<:");
|
|
9736
|
+
var $L21 = (0, import_lib2.$L)("^");
|
|
9737
|
+
var $L22 = (0, import_lib2.$L)("<?");
|
|
9738
|
+
var $L23 = (0, import_lib2.$L)("-");
|
|
9739
|
+
var $L24 = (0, import_lib2.$L)("import.meta");
|
|
9740
|
+
var $L25 = (0, import_lib2.$L)("return.value");
|
|
9741
|
+
var $L26 = (0, import_lib2.$L)(",");
|
|
9695
9742
|
var $L27 = (0, import_lib2.$L)("tighter");
|
|
9696
9743
|
var $L28 = (0, import_lib2.$L)("looser");
|
|
9697
9744
|
var $L29 = (0, import_lib2.$L)("same");
|
|
@@ -9934,7 +9981,7 @@ var $R16 = (0, import_lib2.$R)(new RegExp(`(?=[0-9.'"tfyno])`, "suy"));
|
|
|
9934
9981
|
var $R17 = (0, import_lib2.$R)(new RegExp("(?=true|false|yes|no|on|off)", "suy"));
|
|
9935
9982
|
var $R18 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$])", "suy"));
|
|
9936
9983
|
var $R19 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
|
|
9937
|
-
var $R20 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022])", "suy"));
|
|
9984
|
+
var $R20 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022\\/])", "suy"));
|
|
9938
9985
|
var $R21 = (0, import_lib2.$R)(new RegExp("([<>])(=?)|([\u2264\u2265])", "suy"));
|
|
9939
9986
|
var $R22 = (0, import_lib2.$R)(new RegExp("[ \\t]*", "suy"));
|
|
9940
9987
|
var $R23 = (0, import_lib2.$R)(new RegExp("[ \\t]+", "suy"));
|
|
@@ -10500,13 +10547,19 @@ var IsLike$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Is, (0, import_lib2.$E)(
|
|
|
10500
10547
|
function IsLike(ctx, state2) {
|
|
10501
10548
|
return (0, import_lib2.$EVENT)(ctx, state2, "IsLike", IsLike$0);
|
|
10502
10549
|
}
|
|
10503
|
-
var WRHS$0 = (0, import_lib2.$
|
|
10550
|
+
var WRHS$0 = (0, import_lib2.$T)((0, import_lib2.$S)(NestedBulletedArray), function(value) {
|
|
10551
|
+
return [void 0, value[0]];
|
|
10552
|
+
});
|
|
10553
|
+
var WRHS$1 = (0, import_lib2.$T)((0, import_lib2.$S)(NestedImplicitObjectLiteral), function(value) {
|
|
10554
|
+
return [void 0, value[0]];
|
|
10555
|
+
});
|
|
10556
|
+
var WRHS$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$S)(Nested, (0, import_lib2.$E)(_)), RHS)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
10504
10557
|
var wrhs = $2;
|
|
10505
10558
|
if (!wrhs) return $skip;
|
|
10506
10559
|
return wrhs;
|
|
10507
10560
|
});
|
|
10508
|
-
var WRHS$
|
|
10509
|
-
var WRHS$$ = [WRHS$0, WRHS$1];
|
|
10561
|
+
var WRHS$3 = (0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$S)(EOS, __), _), RHS);
|
|
10562
|
+
var WRHS$$ = [WRHS$0, WRHS$1, WRHS$2, WRHS$3];
|
|
10510
10563
|
function WRHS(ctx, state2) {
|
|
10511
10564
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "WRHS", WRHS$$);
|
|
10512
10565
|
}
|
|
@@ -10645,11 +10698,13 @@ var NWTypePostfix$$ = [NWTypePostfix$0, NWTypePostfix$1, NWTypePostfix$2];
|
|
|
10645
10698
|
function NWTypePostfix(ctx, state2) {
|
|
10646
10699
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "NWTypePostfix", NWTypePostfix$$);
|
|
10647
10700
|
}
|
|
10648
|
-
var UpdateExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(UpdateExpressionSymbol, UnaryWithoutParenthesizedAssignment), function($skip, $loc, $0, $1, $2) {
|
|
10701
|
+
var UpdateExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(UpdateExpressionSymbol, (0, import_lib2.$N)(Whitespace), UnaryWithoutParenthesizedAssignment), function($skip, $loc, $0, $1, $2, $3) {
|
|
10702
|
+
var symbol = $1;
|
|
10703
|
+
var assigned = $3;
|
|
10649
10704
|
return {
|
|
10650
10705
|
type: "UpdateExpression",
|
|
10651
|
-
assigned
|
|
10652
|
-
children:
|
|
10706
|
+
assigned,
|
|
10707
|
+
children: [symbol, assigned]
|
|
10653
10708
|
};
|
|
10654
10709
|
});
|
|
10655
10710
|
var UpdateExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(LeftHandSideExpression, (0, import_lib2.$E)((0, import_lib2.$S)(UpdateExpressionSymbol, (0, import_lib2.$EXPECT)($R4, "UpdateExpression /(?!\\p{ID_Start}|[_$0-9(\\[{])/")))), function($skip, $loc, $0, $1, $2) {
|
|
@@ -11108,32 +11163,43 @@ var ExtendsClause$0 = (0, import_lib2.$S)(ExtendsToken, __, ExtendsTarget);
|
|
|
11108
11163
|
function ExtendsClause(ctx, state2) {
|
|
11109
11164
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExtendsClause", ExtendsClause$0);
|
|
11110
11165
|
}
|
|
11111
|
-
var WithClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
11166
|
+
var WithClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(NotDedented, With, PushIndent, (0, import_lib2.$Q)((0, import_lib2.$S)(Nested, ExtendsTarget, (0, import_lib2.$E)(_), (0, import_lib2.$E)(Comma))), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
11167
|
+
var targets = $4;
|
|
11168
|
+
if (!targets.length) return $skip;
|
|
11169
|
+
targets = targets.map(($) => $.slice(0, -1));
|
|
11170
|
+
return {
|
|
11171
|
+
type: "WithClause",
|
|
11172
|
+
children: $0,
|
|
11173
|
+
targets
|
|
11174
|
+
};
|
|
11175
|
+
});
|
|
11176
|
+
var WithClause$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(NotDedented, With, NotDedented, ExtendsTarget, (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$E)(_), Comma, NotDedented, ExtendsTarget))), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
11112
11177
|
var ws = $3;
|
|
11113
11178
|
var t = $4;
|
|
11114
11179
|
var rest = $5;
|
|
11115
11180
|
return {
|
|
11116
11181
|
type: "WithClause",
|
|
11117
11182
|
children: $0,
|
|
11118
|
-
targets: [[ws, t], ...rest.map(([_comma, ws2, target]) => [ws2, target])]
|
|
11183
|
+
targets: [[ws, t], ...rest.map(([ws1, _comma, ws2, target]) => [prepend(ws1, ws2), target])]
|
|
11119
11184
|
};
|
|
11120
11185
|
});
|
|
11186
|
+
var WithClause$$ = [WithClause$0, WithClause$1];
|
|
11121
11187
|
function WithClause(ctx, state2) {
|
|
11122
|
-
return (0, import_lib2.$
|
|
11188
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "WithClause", WithClause$$);
|
|
11123
11189
|
}
|
|
11124
|
-
var ExtendsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
11125
|
-
var
|
|
11126
|
-
var
|
|
11190
|
+
var ExtendsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(NotDedented, InsertSpace, ExtendsShorthand, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'ExtendsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
11191
|
+
var ws = $1;
|
|
11192
|
+
var s = $2;
|
|
11127
11193
|
var t = $3;
|
|
11128
11194
|
return {
|
|
11129
11195
|
type: "Extends",
|
|
11130
11196
|
children: [
|
|
11131
|
-
ws
|
|
11197
|
+
ws.length ? ws : s,
|
|
11132
11198
|
t
|
|
11133
11199
|
]
|
|
11134
11200
|
};
|
|
11135
11201
|
});
|
|
11136
|
-
var ExtendsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
11202
|
+
var ExtendsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(NotDedented, Extends), function($skip, $loc, $0, $1, $2) {
|
|
11137
11203
|
return {
|
|
11138
11204
|
type: "Extends",
|
|
11139
11205
|
children: $0
|
|
@@ -11143,13 +11209,13 @@ var ExtendsToken$$ = [ExtendsToken$0, ExtendsToken$1];
|
|
|
11143
11209
|
function ExtendsToken(ctx, state2) {
|
|
11144
11210
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ExtendsToken", ExtendsToken$$);
|
|
11145
11211
|
}
|
|
11146
|
-
var ExtendsShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
11212
|
+
var ExtendsShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L18, 'ExtendsShorthand "<"'), function($skip, $loc, $0, $1) {
|
|
11147
11213
|
return { $loc, token: "extends " };
|
|
11148
11214
|
});
|
|
11149
11215
|
function ExtendsShorthand(ctx, state2) {
|
|
11150
11216
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExtendsShorthand", ExtendsShorthand$0);
|
|
11151
11217
|
}
|
|
11152
|
-
var NotExtendsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, (0, import_lib2.$E)(_), OmittedNegation, ExtendsShorthand, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
11218
|
+
var NotExtendsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, (0, import_lib2.$E)(_), OmittedNegation, ExtendsShorthand, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'NotExtendsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
11153
11219
|
var l = $1;
|
|
11154
11220
|
var ws1 = $2;
|
|
11155
11221
|
var ws2 = $3;
|
|
@@ -11175,7 +11241,7 @@ function NotExtendsToken(ctx, state2) {
|
|
|
11175
11241
|
var OmittedNegation$0 = (0, import_lib2.$T)((0, import_lib2.$S)(ExclamationPoint), function(value) {
|
|
11176
11242
|
return "";
|
|
11177
11243
|
});
|
|
11178
|
-
var OmittedNegation$1 = (0, import_lib2.$T)((0, import_lib2.$S)(Not, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
11244
|
+
var OmittedNegation$1 = (0, import_lib2.$T)((0, import_lib2.$S)(Not, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'OmittedNegation " "')), (0, import_lib2.$E)(_)), function(value) {
|
|
11179
11245
|
return value[2];
|
|
11180
11246
|
});
|
|
11181
11247
|
var OmittedNegation$$ = [OmittedNegation$0, OmittedNegation$1];
|
|
@@ -11189,16 +11255,28 @@ var ExtendsTarget$0 = (0, import_lib2.$TV)(LeftHandSideExpressionWithObjectAppli
|
|
|
11189
11255
|
function ExtendsTarget(ctx, state2) {
|
|
11190
11256
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExtendsTarget", ExtendsTarget$0);
|
|
11191
11257
|
}
|
|
11192
|
-
var ImplementsClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImplementsToken,
|
|
11258
|
+
var ImplementsClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImplementsToken, PushIndent, (0, import_lib2.$Q)((0, import_lib2.$S)(Nested, ImplementsTarget, ArrayBulletDelimiter)), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
11259
|
+
var i = $1;
|
|
11260
|
+
var targets = $3;
|
|
11261
|
+
if (!targets.length) return $skip;
|
|
11262
|
+
const last = targets.at(-1).slice(0, -1);
|
|
11263
|
+
targets = targets.slice(0, -1).concat(last);
|
|
11264
|
+
return {
|
|
11265
|
+
ts: true,
|
|
11266
|
+
children: [i, targets]
|
|
11267
|
+
};
|
|
11268
|
+
});
|
|
11269
|
+
var ImplementsClause$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImplementsToken, ImplementsTarget, (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$E)(_), Comma, ImplementsTarget))), function($skip, $loc, $0, $1, $2, $3) {
|
|
11193
11270
|
return {
|
|
11194
11271
|
ts: true,
|
|
11195
11272
|
children: $0
|
|
11196
11273
|
};
|
|
11197
11274
|
});
|
|
11275
|
+
var ImplementsClause$$ = [ImplementsClause$0, ImplementsClause$1];
|
|
11198
11276
|
function ImplementsClause(ctx, state2) {
|
|
11199
|
-
return (0, import_lib2.$
|
|
11277
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "ImplementsClause", ImplementsClause$$);
|
|
11200
11278
|
}
|
|
11201
|
-
var ImplementsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc,
|
|
11279
|
+
var ImplementsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, NotDedented, ImplementsShorthand, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'ImplementsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
11202
11280
|
var l = $1;
|
|
11203
11281
|
var ws = $2;
|
|
11204
11282
|
var token = $3;
|
|
@@ -11208,7 +11286,7 @@ var ImplementsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, __, Implem
|
|
|
11208
11286
|
}
|
|
11209
11287
|
return { children };
|
|
11210
11288
|
});
|
|
11211
|
-
var ImplementsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
11289
|
+
var ImplementsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(NotDedented, (0, import_lib2.$EXPECT)($L19, 'ImplementsToken "implements"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
11212
11290
|
$2 = { $loc, token: $2 };
|
|
11213
11291
|
return [$1, $2];
|
|
11214
11292
|
});
|
|
@@ -11216,7 +11294,7 @@ var ImplementsToken$$ = [ImplementsToken$0, ImplementsToken$1];
|
|
|
11216
11294
|
function ImplementsToken(ctx, state2) {
|
|
11217
11295
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ImplementsToken", ImplementsToken$$);
|
|
11218
11296
|
}
|
|
11219
|
-
var ImplementsShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
11297
|
+
var ImplementsShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L20, 'ImplementsShorthand "<:"'), function($skip, $loc, $0, $1) {
|
|
11220
11298
|
return { $loc, token: "implements " };
|
|
11221
11299
|
});
|
|
11222
11300
|
function ImplementsShorthand(ctx, state2) {
|
|
@@ -11656,7 +11734,7 @@ var OptionalDot$$ = [OptionalDot$0, OptionalDot$1];
|
|
|
11656
11734
|
function OptionalDot(ctx, state2) {
|
|
11657
11735
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "OptionalDot", OptionalDot$$);
|
|
11658
11736
|
}
|
|
11659
|
-
var NonNullAssertion$0 = (0, import_lib2.$T)((0, import_lib2.$S)(ExclamationPoint, (0, import_lib2.$N)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
11737
|
+
var NonNullAssertion$0 = (0, import_lib2.$T)((0, import_lib2.$S)(ExclamationPoint, (0, import_lib2.$N)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L21, 'NonNullAssertion "^"'), (0, import_lib2.$EXPECT)($L22, 'NonNullAssertion "<?"'), (0, import_lib2.$EXPECT)($L3, 'NonNullAssertion "="')))), function(value) {
|
|
11660
11738
|
return { "type": "NonNullAssertion", "ts": true, "children": [value[0]] };
|
|
11661
11739
|
});
|
|
11662
11740
|
function NonNullAssertion(ctx, state2) {
|
|
@@ -11916,7 +11994,7 @@ var PropertyAccess$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(AccessStart, (0,
|
|
|
11916
11994
|
]
|
|
11917
11995
|
};
|
|
11918
11996
|
});
|
|
11919
|
-
var PropertyAccess$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(AccessStart, (0, import_lib2.$EXPECT)($
|
|
11997
|
+
var PropertyAccess$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(AccessStart, (0, import_lib2.$EXPECT)($L23, 'PropertyAccess "-"'), IntegerLiteral), function($skip, $loc, $0, $1, $2, $3) {
|
|
11920
11998
|
var dot = $1;
|
|
11921
11999
|
var neg = $2;
|
|
11922
12000
|
var num = $3;
|
|
@@ -12022,6 +12100,23 @@ var PropertyBind$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E
|
|
|
12022
12100
|
function PropertyBind(ctx, state2) {
|
|
12023
12101
|
return (0, import_lib2.$EVENT)(ctx, state2, "PropertyBind", PropertyBind$0);
|
|
12024
12102
|
}
|
|
12103
|
+
var PropertyBindExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(PropertyAccessModifier), At, OptionalDot, (0, import_lib2.$C)(IdentifierName, PrivateIdentifier), (0, import_lib2.$E)(ExplicitArguments)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
12104
|
+
var modifier = $1;
|
|
12105
|
+
var dot = $3;
|
|
12106
|
+
var id = $4;
|
|
12107
|
+
var args = $5;
|
|
12108
|
+
return {
|
|
12109
|
+
type: "PropertyBind",
|
|
12110
|
+
name: id.name,
|
|
12111
|
+
children: [modifier, dot, id],
|
|
12112
|
+
// omit `@` from children
|
|
12113
|
+
args: args?.children.slice(1, -1) ?? []
|
|
12114
|
+
// remove the parens from the arg list, or give an empty list
|
|
12115
|
+
};
|
|
12116
|
+
});
|
|
12117
|
+
function PropertyBindExplicitArguments(ctx, state2) {
|
|
12118
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "PropertyBindExplicitArguments", PropertyBindExplicitArguments$0);
|
|
12119
|
+
}
|
|
12025
12120
|
var SuperProperty$0 = (0, import_lib2.$S)(Super, MemberBracketContent);
|
|
12026
12121
|
var SuperProperty$1 = (0, import_lib2.$S)(Super, (0, import_lib2.$N)(PropertyAccessModifier), PropertyAccess);
|
|
12027
12122
|
var SuperProperty$$ = [SuperProperty$0, SuperProperty$1];
|
|
@@ -12029,7 +12124,7 @@ function SuperProperty(ctx, state2) {
|
|
|
12029
12124
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "SuperProperty", SuperProperty$$);
|
|
12030
12125
|
}
|
|
12031
12126
|
var MetaProperty$0 = (0, import_lib2.$S)(New, Dot, Target);
|
|
12032
|
-
var MetaProperty$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
12127
|
+
var MetaProperty$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L24, 'MetaProperty "import.meta"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12033
12128
|
return { $loc, token: $1 };
|
|
12034
12129
|
});
|
|
12035
12130
|
var MetaProperty$2 = ReturnValue;
|
|
@@ -12037,7 +12132,7 @@ var MetaProperty$$ = [MetaProperty$0, MetaProperty$1, MetaProperty$2];
|
|
|
12037
12132
|
function MetaProperty(ctx, state2) {
|
|
12038
12133
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MetaProperty", MetaProperty$$);
|
|
12039
12134
|
}
|
|
12040
|
-
var ReturnValue$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
12135
|
+
var ReturnValue$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L25, 'ReturnValue "return.value"'), NonIdContinue), (0, import_lib2.$S)(Return, (0, import_lib2.$Y)(AfterReturnShorthand))), function($skip, $loc, $0, $1) {
|
|
12041
12136
|
return { type: "ReturnValue", children: [$1[0]] };
|
|
12042
12137
|
});
|
|
12043
12138
|
function ReturnValue(ctx, state2) {
|
|
@@ -12593,7 +12688,7 @@ var BindingElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.
|
|
|
12593
12688
|
initializer
|
|
12594
12689
|
};
|
|
12595
12690
|
});
|
|
12596
|
-
var BindingElement$2 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($
|
|
12691
|
+
var BindingElement$2 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($L26, 'BindingElement ","'))), function($skip, $loc, $0, $1) {
|
|
12597
12692
|
return {
|
|
12598
12693
|
type: "ElisionElement",
|
|
12599
12694
|
children: [""],
|
|
@@ -13520,7 +13615,7 @@ var UpcomingAssignment$0 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, impor
|
|
|
13520
13615
|
function UpcomingAssignment(ctx, state2) {
|
|
13521
13616
|
return (0, import_lib2.$EVENT)(ctx, state2, "UpcomingAssignment", UpcomingAssignment$0);
|
|
13522
13617
|
}
|
|
13523
|
-
var ArrayLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R20, "ArrayLiteral /(?=\\[|\\s*[.\u2022])/"), _ArrayLiteral), function(value) {
|
|
13618
|
+
var ArrayLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R20, "ArrayLiteral /(?=\\[|\\s*[.\u2022\\/])/"), _ArrayLiteral), function(value) {
|
|
13524
13619
|
return value[1];
|
|
13525
13620
|
});
|
|
13526
13621
|
function ArrayLiteral(ctx, state2) {
|
|
@@ -14304,7 +14399,7 @@ function SnugNamedProperty(ctx, state2) {
|
|
|
14304
14399
|
var PropertyName$0 = NumericLiteral;
|
|
14305
14400
|
var PropertyName$1 = ComputedPropertyName;
|
|
14306
14401
|
var PropertyName$2 = StringLiteral;
|
|
14307
|
-
var PropertyName$3 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$E)(IdentifierName), (0, import_lib2.$EXPECT)($
|
|
14402
|
+
var PropertyName$3 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$E)(IdentifierName), (0, import_lib2.$EXPECT)($L23, 'PropertyName "-"'), (0, import_lib2.$EXPECT)($R25, "PropertyName /(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"))), function($skip, $loc, $0, $1) {
|
|
14308
14403
|
return {
|
|
14309
14404
|
token: `"${$1}"`,
|
|
14310
14405
|
$loc
|
|
@@ -14781,7 +14876,7 @@ var BinaryOpSymbol$6 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.
|
|
|
14781
14876
|
};
|
|
14782
14877
|
});
|
|
14783
14878
|
var BinaryOpSymbol$7 = (0, import_lib2.$EXPECT)($L79, 'BinaryOpSymbol "+"');
|
|
14784
|
-
var BinaryOpSymbol$8 = (0, import_lib2.$EXPECT)($
|
|
14879
|
+
var BinaryOpSymbol$8 = (0, import_lib2.$EXPECT)($L23, 'BinaryOpSymbol "-"');
|
|
14785
14880
|
var BinaryOpSymbol$9 = (0, import_lib2.$EXPECT)($L80, 'BinaryOpSymbol "<="');
|
|
14786
14881
|
var BinaryOpSymbol$10 = (0, import_lib2.$T)((0, import_lib2.$EXPECT)($L81, 'BinaryOpSymbol "\u2264"'), function(value) {
|
|
14787
14882
|
return "<=";
|
|
@@ -14790,7 +14885,7 @@ var BinaryOpSymbol$11 = (0, import_lib2.$EXPECT)($L82, 'BinaryOpSymbol ">="');
|
|
|
14790
14885
|
var BinaryOpSymbol$12 = (0, import_lib2.$T)((0, import_lib2.$EXPECT)($L83, 'BinaryOpSymbol "\u2265"'), function(value) {
|
|
14791
14886
|
return ">=";
|
|
14792
14887
|
});
|
|
14793
|
-
var BinaryOpSymbol$13 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
14888
|
+
var BinaryOpSymbol$13 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L22, 'BinaryOpSymbol "<?"'), function($skip, $loc, $0, $1) {
|
|
14794
14889
|
return {
|
|
14795
14890
|
$loc,
|
|
14796
14891
|
token: "instanceof",
|
|
@@ -14813,7 +14908,7 @@ var BinaryOpSymbol$15 = (0, import_lib2.$EXPECT)($L85, 'BinaryOpSymbol "<<"');
|
|
|
14813
14908
|
var BinaryOpSymbol$16 = (0, import_lib2.$T)((0, import_lib2.$EXPECT)($L86, 'BinaryOpSymbol "\u226A"'), function(value) {
|
|
14814
14909
|
return "<<";
|
|
14815
14910
|
});
|
|
14816
|
-
var BinaryOpSymbol$17 = (0, import_lib2.$EXPECT)($
|
|
14911
|
+
var BinaryOpSymbol$17 = (0, import_lib2.$EXPECT)($L18, 'BinaryOpSymbol "<"');
|
|
14817
14912
|
var BinaryOpSymbol$18 = (0, import_lib2.$EXPECT)($L87, 'BinaryOpSymbol ">>>"');
|
|
14818
14913
|
var BinaryOpSymbol$19 = (0, import_lib2.$T)((0, import_lib2.$EXPECT)($L88, 'BinaryOpSymbol "\u22D9"'), function(value) {
|
|
14819
14914
|
return ">>>";
|
|
@@ -14950,7 +15045,7 @@ var BinaryOpSymbol$48 = (0, import_lib2.$TS)((0, import_lib2.$S)(Is), function($
|
|
|
14950
15045
|
});
|
|
14951
15046
|
var BinaryOpSymbol$49 = In;
|
|
14952
15047
|
var BinaryOpSymbol$50 = (0, import_lib2.$EXPECT)($L117, 'BinaryOpSymbol "&"');
|
|
14953
|
-
var BinaryOpSymbol$51 = (0, import_lib2.$EXPECT)($
|
|
15048
|
+
var BinaryOpSymbol$51 = (0, import_lib2.$EXPECT)($L21, 'BinaryOpSymbol "^"');
|
|
14954
15049
|
var BinaryOpSymbol$52 = (0, import_lib2.$EXPECT)($L118, 'BinaryOpSymbol "|"');
|
|
14955
15050
|
var BinaryOpSymbol$$ = [BinaryOpSymbol$0, BinaryOpSymbol$1, BinaryOpSymbol$2, BinaryOpSymbol$3, BinaryOpSymbol$4, BinaryOpSymbol$5, BinaryOpSymbol$6, BinaryOpSymbol$7, BinaryOpSymbol$8, BinaryOpSymbol$9, BinaryOpSymbol$10, BinaryOpSymbol$11, BinaryOpSymbol$12, BinaryOpSymbol$13, BinaryOpSymbol$14, BinaryOpSymbol$15, BinaryOpSymbol$16, BinaryOpSymbol$17, BinaryOpSymbol$18, BinaryOpSymbol$19, BinaryOpSymbol$20, BinaryOpSymbol$21, BinaryOpSymbol$22, BinaryOpSymbol$23, BinaryOpSymbol$24, BinaryOpSymbol$25, BinaryOpSymbol$26, BinaryOpSymbol$27, BinaryOpSymbol$28, BinaryOpSymbol$29, BinaryOpSymbol$30, BinaryOpSymbol$31, BinaryOpSymbol$32, BinaryOpSymbol$33, BinaryOpSymbol$34, BinaryOpSymbol$35, BinaryOpSymbol$36, BinaryOpSymbol$37, BinaryOpSymbol$38, BinaryOpSymbol$39, BinaryOpSymbol$40, BinaryOpSymbol$41, BinaryOpSymbol$42, BinaryOpSymbol$43, BinaryOpSymbol$44, BinaryOpSymbol$45, BinaryOpSymbol$46, BinaryOpSymbol$47, BinaryOpSymbol$48, BinaryOpSymbol$49, BinaryOpSymbol$50, BinaryOpSymbol$51, BinaryOpSymbol$52];
|
|
14956
15051
|
function BinaryOpSymbol(ctx, state2) {
|
|
@@ -15045,7 +15140,7 @@ var UnaryOp$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)(Del
|
|
|
15045
15140
|
if (!ws) return [op, [" "]];
|
|
15046
15141
|
return [op, ws];
|
|
15047
15142
|
});
|
|
15048
|
-
var UnaryOp$3 = (0, import_lib2.$T)((0, import_lib2.$S)(Not, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R30, "UnaryOp /[:.]/")), (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
15143
|
+
var UnaryOp$3 = (0, import_lib2.$T)((0, import_lib2.$S)(Not, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R30, "UnaryOp /[:.]/")), (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'UnaryOp " "')), (0, import_lib2.$E)(_)), function(value) {
|
|
15049
15144
|
return [value[0], value[3]];
|
|
15050
15145
|
});
|
|
15051
15146
|
var UnaryOp$$ = [UnaryOp$0, UnaryOp$1, UnaryOp$2, UnaryOp$3];
|
|
@@ -15284,12 +15379,7 @@ var IfStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)
|
|
|
15284
15379
|
condition = negateCondition(condition);
|
|
15285
15380
|
}
|
|
15286
15381
|
if (block.bare && e) {
|
|
15287
|
-
|
|
15288
|
-
block = {
|
|
15289
|
-
...block,
|
|
15290
|
-
semicolon,
|
|
15291
|
-
children: [...block.children, semicolon]
|
|
15292
|
-
};
|
|
15382
|
+
block = bracedBlock(block);
|
|
15293
15383
|
}
|
|
15294
15384
|
return {
|
|
15295
15385
|
type: "IfStatement",
|
|
@@ -15305,11 +15395,7 @@ var IfStatement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(IfClause, BlockOrEm
|
|
|
15305
15395
|
var block = $2;
|
|
15306
15396
|
var e = $3;
|
|
15307
15397
|
if (block.bare && e) {
|
|
15308
|
-
block =
|
|
15309
|
-
...block,
|
|
15310
|
-
semicolon: ";",
|
|
15311
|
-
children: [...block.children, ";"]
|
|
15312
|
-
};
|
|
15398
|
+
block = bracedBlock(block);
|
|
15313
15399
|
}
|
|
15314
15400
|
return {
|
|
15315
15401
|
type: "IfStatement",
|
|
@@ -16528,31 +16614,27 @@ var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPEC
|
|
|
16528
16614
|
function Debugger(ctx, state2) {
|
|
16529
16615
|
return (0, import_lib2.$EVENT)(ctx, state2, "Debugger", Debugger$0);
|
|
16530
16616
|
}
|
|
16531
|
-
var MaybeNestedNonPipelineExpression$0 = NestedBulletedArray
|
|
16532
|
-
var
|
|
16533
|
-
var
|
|
16534
|
-
var expression = $2;
|
|
16535
|
-
var trailing = $4;
|
|
16617
|
+
var MaybeNestedNonPipelineExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedBulletedArray), (0, import_lib2.$N)(NestedImplicitObjectLiteral), PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, NonPipelineExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
16618
|
+
var expression = $4;
|
|
16619
|
+
var trailing = $6;
|
|
16536
16620
|
if (!expression) return $skip;
|
|
16537
16621
|
if (!trailing) return expression;
|
|
16538
16622
|
return [expression, trailing];
|
|
16539
16623
|
});
|
|
16540
|
-
var MaybeNestedNonPipelineExpression$
|
|
16541
|
-
var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1
|
|
16624
|
+
var MaybeNestedNonPipelineExpression$1 = NonPipelineExpression;
|
|
16625
|
+
var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1];
|
|
16542
16626
|
function MaybeNestedNonPipelineExpression(ctx, state2) {
|
|
16543
16627
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedNonPipelineExpression", MaybeNestedNonPipelineExpression$$);
|
|
16544
16628
|
}
|
|
16545
|
-
var MaybeNestedPostfixedExpression$0 = NestedBulletedArray
|
|
16546
|
-
var
|
|
16547
|
-
var
|
|
16548
|
-
var expression = $2;
|
|
16549
|
-
var trailing = $4;
|
|
16629
|
+
var MaybeNestedPostfixedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedBulletedArray), (0, import_lib2.$N)(NestedImplicitObjectLiteral), PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
16630
|
+
var expression = $4;
|
|
16631
|
+
var trailing = $6;
|
|
16550
16632
|
if (!expression) return $skip;
|
|
16551
16633
|
if (!trailing) return expression;
|
|
16552
16634
|
return [expression, trailing];
|
|
16553
16635
|
});
|
|
16554
|
-
var MaybeNestedPostfixedExpression$
|
|
16555
|
-
var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1
|
|
16636
|
+
var MaybeNestedPostfixedExpression$1 = PostfixedExpression;
|
|
16637
|
+
var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1];
|
|
16556
16638
|
function MaybeNestedPostfixedExpression(ctx, state2) {
|
|
16557
16639
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedPostfixedExpression", MaybeNestedPostfixedExpression$$);
|
|
16558
16640
|
}
|
|
@@ -16567,17 +16649,15 @@ var NestedPostfixedExpressionNoTrailing$$ = [NestedPostfixedExpressionNoTrailing
|
|
|
16567
16649
|
function NestedPostfixedExpressionNoTrailing(ctx, state2) {
|
|
16568
16650
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedPostfixedExpressionNoTrailing", NestedPostfixedExpressionNoTrailing$$);
|
|
16569
16651
|
}
|
|
16570
|
-
var MaybeNestedExpression$0 = NestedBulletedArray
|
|
16571
|
-
var
|
|
16572
|
-
var
|
|
16573
|
-
var expression = $2;
|
|
16574
|
-
var trailing = $4;
|
|
16652
|
+
var MaybeNestedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedBulletedArray), (0, import_lib2.$N)(NestedImplicitObjectLiteral), PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
16653
|
+
var expression = $4;
|
|
16654
|
+
var trailing = $6;
|
|
16575
16655
|
if (!expression) return $skip;
|
|
16576
16656
|
if (!trailing) return expression;
|
|
16577
16657
|
return [expression, trailing];
|
|
16578
16658
|
});
|
|
16579
|
-
var MaybeNestedExpression$
|
|
16580
|
-
var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1
|
|
16659
|
+
var MaybeNestedExpression$1 = Expression;
|
|
16660
|
+
var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1];
|
|
16581
16661
|
function MaybeNestedExpression(ctx, state2) {
|
|
16582
16662
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedExpression", MaybeNestedExpression$$);
|
|
16583
16663
|
}
|
|
@@ -16659,7 +16739,7 @@ var ImportDeclaration$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImpliedImport
|
|
|
16659
16739
|
const children = [i, t, imports, w, from];
|
|
16660
16740
|
return { type: "ImportDeclaration", ts: !!t, children, imports, from };
|
|
16661
16741
|
});
|
|
16662
|
-
var ImportDeclaration$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
16742
|
+
var ImportDeclaration$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __, Import, __, Operator, (0, import_lib2.$E)(OperatorBehavior), __, OperatorNamedImports), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
|
|
16663
16743
|
var from = $1;
|
|
16664
16744
|
var fws = $2;
|
|
16665
16745
|
var i = $3;
|
|
@@ -16681,7 +16761,7 @@ var ImportDeclaration$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImpliedFromCl
|
|
|
16681
16761
|
from
|
|
16682
16762
|
};
|
|
16683
16763
|
});
|
|
16684
|
-
var ImportDeclaration$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
16764
|
+
var ImportDeclaration$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __, Import, __, (0, import_lib2.$E)((0, import_lib2.$S)(TypeKeyword, __)), ImportClause), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
16685
16765
|
var from = $1;
|
|
16686
16766
|
var fws = $2;
|
|
16687
16767
|
var i = $3;
|
|
@@ -16779,20 +16859,6 @@ var FromClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(From, __, ModuleSpec
|
|
|
16779
16859
|
function FromClause(ctx, state2) {
|
|
16780
16860
|
return (0, import_lib2.$EVENT)(ctx, state2, "FromClause", FromClause$0);
|
|
16781
16861
|
}
|
|
16782
|
-
var ImpliedFromClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$S)(From, __), ImpliedFrom), ModuleSpecifier), function($skip, $loc, $0, $1, $2) {
|
|
16783
|
-
var module = $2;
|
|
16784
|
-
if (!Array.isArray(module)) return $0;
|
|
16785
|
-
return [$1, ...module];
|
|
16786
|
-
});
|
|
16787
|
-
function ImpliedFromClause(ctx, state2) {
|
|
16788
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFromClause", ImpliedFromClause$0);
|
|
16789
|
-
}
|
|
16790
|
-
var ImpliedFrom$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImpliedFrom ""'), function($skip, $loc, $0, $1) {
|
|
16791
|
-
return { $loc, token: "from " };
|
|
16792
|
-
});
|
|
16793
|
-
function ImpliedFrom(ctx, state2) {
|
|
16794
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
|
|
16795
|
-
}
|
|
16796
16862
|
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L134, 'ImportAssertion "with"'), (0, import_lib2.$EXPECT)($L135, 'ImportAssertion "assert"')), NonIdContinue, (0, import_lib2.$E)(_), ObjectLiteral), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
16797
16863
|
var keyword = $2;
|
|
16798
16864
|
var object = $5;
|
|
@@ -16874,7 +16940,7 @@ function OperatorImportSpecifier(ctx, state2) {
|
|
|
16874
16940
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "OperatorImportSpecifier", OperatorImportSpecifier$$);
|
|
16875
16941
|
}
|
|
16876
16942
|
var ImportAsToken$0 = (0, import_lib2.$S)(__, As);
|
|
16877
|
-
var ImportAsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, __, Colon, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
16943
|
+
var ImportAsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, __, Colon, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'ImportAsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
16878
16944
|
var l = $1;
|
|
16879
16945
|
var ws = $2;
|
|
16880
16946
|
var c = $3;
|
|
@@ -16987,7 +17053,7 @@ var ExportDeclaration$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(Export, __, E
|
|
|
16987
17053
|
var exports = $3;
|
|
16988
17054
|
return { type: "ExportDeclaration", ts: exports.ts, children: $0 };
|
|
16989
17055
|
});
|
|
16990
|
-
var ExportDeclaration$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
17056
|
+
var ExportDeclaration$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __, Export, __, ExportFromClause), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
16991
17057
|
var from = $1;
|
|
16992
17058
|
var fws = $2;
|
|
16993
17059
|
var e = $3;
|
|
@@ -17690,7 +17756,7 @@ var Loc$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Loc ""'), functi
|
|
|
17690
17756
|
function Loc(ctx, state2) {
|
|
17691
17757
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
|
|
17692
17758
|
}
|
|
17693
|
-
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L144, 'Abstract "abstract"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
17759
|
+
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L144, 'Abstract "abstract"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'Abstract " "')))), function($skip, $loc, $0, $1) {
|
|
17694
17760
|
return { $loc, token: $1, ts: true };
|
|
17695
17761
|
});
|
|
17696
17762
|
function Abstract(ctx, state2) {
|
|
@@ -17744,7 +17810,7 @@ var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L1
|
|
|
17744
17810
|
function By(ctx, state2) {
|
|
17745
17811
|
return (0, import_lib2.$EVENT)(ctx, state2, "By", By$0);
|
|
17746
17812
|
}
|
|
17747
|
-
var Caret$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17813
|
+
var Caret$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L21, 'Caret "^"'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L21, 'Caret "^"'))), function($skip, $loc, $0, $1, $2) {
|
|
17748
17814
|
return { $loc, token: $1 };
|
|
17749
17815
|
});
|
|
17750
17816
|
function Caret(ctx, state2) {
|
|
@@ -17804,7 +17870,7 @@ var Colon$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)(
|
|
|
17804
17870
|
function Colon(ctx, state2) {
|
|
17805
17871
|
return (0, import_lib2.$EVENT)(ctx, state2, "Colon", Colon$0);
|
|
17806
17872
|
}
|
|
17807
|
-
var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17873
|
+
var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L26, 'Comma ","'), function($skip, $loc, $0, $1) {
|
|
17808
17874
|
return { $loc, token: $1 };
|
|
17809
17875
|
});
|
|
17810
17876
|
function Comma(ctx, state2) {
|
|
@@ -17976,7 +18042,7 @@ var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L178, 'Hash "#"'), f
|
|
|
17976
18042
|
function Hash(ctx, state2) {
|
|
17977
18043
|
return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
|
|
17978
18044
|
}
|
|
17979
|
-
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L179, 'If "if"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
18045
|
+
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L179, 'If "if"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'If " "')))), function($skip, $loc, $0, $1) {
|
|
17980
18046
|
return { $loc, token: $1 };
|
|
17981
18047
|
});
|
|
17982
18048
|
function If(ctx, state2) {
|
|
@@ -18054,7 +18120,7 @@ var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L1
|
|
|
18054
18120
|
function Of(ctx, state2) {
|
|
18055
18121
|
return (0, import_lib2.$EVENT)(ctx, state2, "Of", Of$0);
|
|
18056
18122
|
}
|
|
18057
|
-
var OpenAngleBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
18123
|
+
var OpenAngleBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L18, 'OpenAngleBracket "<"'), function($skip, $loc, $0, $1) {
|
|
18058
18124
|
return { $loc, token: $1 };
|
|
18059
18125
|
});
|
|
18060
18126
|
function OpenAngleBracket(ctx, state2) {
|
|
@@ -18388,7 +18454,7 @@ var JSXElement$$ = [JSXElement$0, JSXElement$1, JSXElement$2];
|
|
|
18388
18454
|
function JSXElement(ctx, state2) {
|
|
18389
18455
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
|
|
18390
18456
|
}
|
|
18391
|
-
var JSXSelfClosingElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18457
|
+
var JSXSelfClosingElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L18, 'JSXSelfClosingElement "<"'), JSXElementName, (0, import_lib2.$E)(TypeArguments), (0, import_lib2.$E)(JSXAttributes), (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L230, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
18392
18458
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
18393
18459
|
});
|
|
18394
18460
|
function JSXSelfClosingElement(ctx, state2) {
|
|
@@ -18407,7 +18473,7 @@ var PopJSXStack$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'PopJSXSt
|
|
|
18407
18473
|
function PopJSXStack(ctx, state2) {
|
|
18408
18474
|
return (0, import_lib2.$EVENT)(ctx, state2, "PopJSXStack", PopJSXStack$0);
|
|
18409
18475
|
}
|
|
18410
|
-
var JSXOpeningElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18476
|
+
var JSXOpeningElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L18, 'JSXOpeningElement "<"'), JSXElementName, (0, import_lib2.$E)(TypeArguments), (0, import_lib2.$E)(JSXAttributes), (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L45, 'JSXOpeningElement ">"'));
|
|
18411
18477
|
function JSXOpeningElement(ctx, state2) {
|
|
18412
18478
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXOpeningElement", JSXOpeningElement$0);
|
|
18413
18479
|
}
|
|
@@ -18849,7 +18915,7 @@ var InlineJSXMemberExpressionRest$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((
|
|
|
18849
18915
|
});
|
|
18850
18916
|
var InlineJSXMemberExpressionRest$1 = PropertyAccess;
|
|
18851
18917
|
var InlineJSXMemberExpressionRest$2 = PropertyGlob;
|
|
18852
|
-
var InlineJSXMemberExpressionRest$3 =
|
|
18918
|
+
var InlineJSXMemberExpressionRest$3 = PropertyBindExplicitArguments;
|
|
18853
18919
|
var InlineJSXMemberExpressionRest$4 = NonNullAssertion;
|
|
18854
18920
|
var InlineJSXMemberExpressionRest$$ = [InlineJSXMemberExpressionRest$0, InlineJSXMemberExpressionRest$1, InlineJSXMemberExpressionRest$2, InlineJSXMemberExpressionRest$3, InlineJSXMemberExpressionRest$4];
|
|
18855
18921
|
function InlineJSXMemberExpressionRest(ctx, state2) {
|
|
@@ -19788,7 +19854,7 @@ var TypePrimary$9 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)
|
|
|
19788
19854
|
args
|
|
19789
19855
|
};
|
|
19790
19856
|
});
|
|
19791
|
-
var TypePrimary$10 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), OpenParen, AllowAll, (0, import_lib2.$E)((0, import_lib2.$C)(
|
|
19857
|
+
var TypePrimary$10 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), OpenParen, AllowAll, (0, import_lib2.$E)((0, import_lib2.$C)(MaybeNestedType, (0, import_lib2.$S)(EOS, Type))), RestoreAll, __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
|
|
19792
19858
|
if (!$4) return $skip;
|
|
19793
19859
|
return {
|
|
19794
19860
|
type: "TypeParenthesized",
|