@danielx/civet 0.8.15 → 0.8.16
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 +12 -0
- package/README.md +1 -1
- package/dist/browser.js +831 -652
- package/dist/main.js +831 -652
- package/dist/main.mjs +831 -652
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -58,7 +58,7 @@ var require_machine = __commonJS({
|
|
|
58
58
|
$EVENT: () => $EVENT2,
|
|
59
59
|
$EVENT_C: () => $EVENT_C2,
|
|
60
60
|
$EXPECT: () => $EXPECT2,
|
|
61
|
-
$L: () => $
|
|
61
|
+
$L: () => $L247,
|
|
62
62
|
$N: () => $N2,
|
|
63
63
|
$P: () => $P2,
|
|
64
64
|
$Q: () => $Q2,
|
|
@@ -83,7 +83,7 @@ var require_machine = __commonJS({
|
|
|
83
83
|
return result;
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function $
|
|
86
|
+
function $L247(str) {
|
|
87
87
|
return function(_ctx, state2) {
|
|
88
88
|
const { input, pos } = state2, { length } = str, end = pos + length;
|
|
89
89
|
if (input.substring(pos, end) === str) {
|
|
@@ -536,6 +536,7 @@ __export(lib_exports, {
|
|
|
536
536
|
hasAwait: () => hasAwait,
|
|
537
537
|
hasExportDeclaration: () => hasExportDeclaration,
|
|
538
538
|
hasImportDeclaration: () => hasImportDeclaration,
|
|
539
|
+
hasTrailingComment: () => hasTrailingComment,
|
|
539
540
|
hasYield: () => hasYield,
|
|
540
541
|
insertTrimmingSpace: () => insertTrimmingSpace,
|
|
541
542
|
isComma: () => isComma,
|
|
@@ -761,6 +762,8 @@ function isExit(node) {
|
|
|
761
762
|
if (!(node != null)) {
|
|
762
763
|
return false;
|
|
763
764
|
}
|
|
765
|
+
let ref3;
|
|
766
|
+
let ref4;
|
|
764
767
|
switch (node.type) {
|
|
765
768
|
case "ReturnStatement":
|
|
766
769
|
case "ThrowStatement":
|
|
@@ -769,13 +772,30 @@ function isExit(node) {
|
|
|
769
772
|
return true;
|
|
770
773
|
}
|
|
771
774
|
case "IfStatement": {
|
|
772
|
-
return
|
|
775
|
+
return (
|
|
776
|
+
// `insertReturn` for IfStatement adds a return to children
|
|
777
|
+
// when there's no else block
|
|
778
|
+
(ref3 = node.children)[ref3.length - 1]?.type === "ReturnStatement" || (ref4 = node.children)[ref4.length - 1]?.[1]?.type === "ReturnStatement" || isExit(node.then) && isExit(node.else?.block)
|
|
779
|
+
);
|
|
780
|
+
}
|
|
781
|
+
case "PatternMatchingStatement": {
|
|
782
|
+
return isExit(node.children[0][1]);
|
|
783
|
+
}
|
|
784
|
+
case "SwitchStatement": {
|
|
785
|
+
return (
|
|
786
|
+
// Ensure exhaustive by requiring an else/default clause
|
|
787
|
+
node.caseBlock.clauses.some(($) => $.type === "DefaultClause") && // Every clause should exit
|
|
788
|
+
node.caseBlock.clauses.every(isExit)
|
|
789
|
+
);
|
|
790
|
+
}
|
|
791
|
+
case "TryStatement": {
|
|
792
|
+
return node.blocks.every(isExit);
|
|
773
793
|
}
|
|
774
794
|
case "BlockStatement": {
|
|
775
795
|
return node.expressions.some((s) => isExit(s[1]));
|
|
776
796
|
}
|
|
777
797
|
case "IterationStatement": {
|
|
778
|
-
return isLoopStatement(node) && gatherRecursiveWithinFunction(node.block, ($) =>
|
|
798
|
+
return isLoopStatement(node) && gatherRecursiveWithinFunction(node.block, ($1) => $1.type === "BreakStatement").length === 0;
|
|
779
799
|
}
|
|
780
800
|
default: {
|
|
781
801
|
return false;
|
|
@@ -802,6 +822,22 @@ function stripTrailingImplicitComma(children) {
|
|
|
802
822
|
return children;
|
|
803
823
|
}
|
|
804
824
|
}
|
|
825
|
+
function hasTrailingComment(node) {
|
|
826
|
+
if (!(node != null)) {
|
|
827
|
+
return false;
|
|
828
|
+
}
|
|
829
|
+
if (node.type === "Comment") {
|
|
830
|
+
return true;
|
|
831
|
+
}
|
|
832
|
+
if (Array.isArray(node)) {
|
|
833
|
+
return hasTrailingComment(node[node.length - 1]);
|
|
834
|
+
}
|
|
835
|
+
if ("children" in node) {
|
|
836
|
+
let ref5;
|
|
837
|
+
return hasTrailingComment((ref5 = node.children)[ref5.length - 1]);
|
|
838
|
+
}
|
|
839
|
+
return false;
|
|
840
|
+
}
|
|
805
841
|
function insertTrimmingSpace(target, c) {
|
|
806
842
|
if (!(target != null)) {
|
|
807
843
|
return target;
|
|
@@ -930,7 +966,7 @@ function literalValue(literal) {
|
|
|
930
966
|
case "false":
|
|
931
967
|
return false;
|
|
932
968
|
}
|
|
933
|
-
let
|
|
969
|
+
let ref6;
|
|
934
970
|
switch (literal.subtype) {
|
|
935
971
|
case "StringLiteral": {
|
|
936
972
|
assert.equal(
|
|
@@ -946,8 +982,8 @@ function literalValue(literal) {
|
|
|
946
982
|
return BigInt(raw.slice(0, -1));
|
|
947
983
|
} else if (raw.match(/[\.eE]/)) {
|
|
948
984
|
return parseFloat(raw);
|
|
949
|
-
} else if ((
|
|
950
|
-
const [, base] =
|
|
985
|
+
} else if ((ref6 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref6) && len(ref6, 2)) {
|
|
986
|
+
const [, base] = ref6;
|
|
951
987
|
switch (base.toLowerCase()) {
|
|
952
988
|
case "x":
|
|
953
989
|
return parseInt(raw.replace(/0[xX]/, ""), 16);
|
|
@@ -1027,16 +1063,16 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
|
|
|
1027
1063
|
return startsWithPredicate(node.children, predicate);
|
|
1028
1064
|
}
|
|
1029
1065
|
function hasAwait(exp) {
|
|
1030
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1066
|
+
return gatherRecursiveWithinFunction(exp, ($2) => $2.type === "Await").length > 0;
|
|
1031
1067
|
}
|
|
1032
1068
|
function hasYield(exp) {
|
|
1033
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1069
|
+
return gatherRecursiveWithinFunction(exp, ($3) => $3.type === "Yield").length > 0;
|
|
1034
1070
|
}
|
|
1035
1071
|
function hasImportDeclaration(exp) {
|
|
1036
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1072
|
+
return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ImportDeclaration").length > 0;
|
|
1037
1073
|
}
|
|
1038
1074
|
function hasExportDeclaration(exp) {
|
|
1039
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1075
|
+
return gatherRecursiveWithinFunction(exp, ($5) => $5.type === "ExportDeclaration").length > 0;
|
|
1040
1076
|
}
|
|
1041
1077
|
function deepCopy(root) {
|
|
1042
1078
|
const copied = /* @__PURE__ */ new Map();
|
|
@@ -1181,7 +1217,7 @@ function makeLeftHandSideExpression(expression) {
|
|
|
1181
1217
|
if (skipParens.has(expression.type)) {
|
|
1182
1218
|
return expression;
|
|
1183
1219
|
}
|
|
1184
|
-
if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($
|
|
1220
|
+
if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($6) => $6.type === "ObjectExpression")) {
|
|
1185
1221
|
return expression;
|
|
1186
1222
|
}
|
|
1187
1223
|
}
|
|
@@ -1196,7 +1232,7 @@ function parenthesizeExpression(expression) {
|
|
|
1196
1232
|
});
|
|
1197
1233
|
}
|
|
1198
1234
|
function checkValidLHS(node) {
|
|
1199
|
-
let
|
|
1235
|
+
let ref7;
|
|
1200
1236
|
switch (node?.type) {
|
|
1201
1237
|
case "UnaryExpression": {
|
|
1202
1238
|
node.children.unshift({
|
|
@@ -1206,7 +1242,7 @@ function checkValidLHS(node) {
|
|
|
1206
1242
|
return true;
|
|
1207
1243
|
}
|
|
1208
1244
|
case "CallExpression": {
|
|
1209
|
-
const lastType = (
|
|
1245
|
+
const lastType = (ref7 = node.children)[ref7.length - 1]?.type;
|
|
1210
1246
|
switch (lastType) {
|
|
1211
1247
|
case "PropertyAccess":
|
|
1212
1248
|
case "SliceExpression":
|
|
@@ -1254,8 +1290,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1254
1290
|
node.parent = parent;
|
|
1255
1291
|
}
|
|
1256
1292
|
if (depth && isParent(node)) {
|
|
1257
|
-
for (let
|
|
1258
|
-
const child =
|
|
1293
|
+
for (let ref8 = node.children, i9 = 0, len9 = ref8.length; i9 < len9; i9++) {
|
|
1294
|
+
const child = ref8[i9];
|
|
1259
1295
|
updateParentPointers(child, node, depth - 1);
|
|
1260
1296
|
}
|
|
1261
1297
|
}
|
|
@@ -1303,11 +1339,11 @@ function convertOptionalType(suffix) {
|
|
|
1303
1339
|
const wrap = suffix.type === "ReturnTypeAnnotation";
|
|
1304
1340
|
spliceChild(suffix, suffix.t, 1, suffix.t = [
|
|
1305
1341
|
getTrimmingSpace(suffix.t),
|
|
1306
|
-
wrap
|
|
1342
|
+
wrap ? "(" : void 0,
|
|
1307
1343
|
// TODO: avoid parens if unnecessary
|
|
1308
1344
|
"undefined | ",
|
|
1309
|
-
parenthesizeType(
|
|
1310
|
-
wrap
|
|
1345
|
+
parenthesizeType(trimFirstSpace(suffix.t)),
|
|
1346
|
+
wrap ? ")" : void 0
|
|
1311
1347
|
]);
|
|
1312
1348
|
}
|
|
1313
1349
|
var typeNeedsNoParens = /* @__PURE__ */ new Set([
|
|
@@ -1321,7 +1357,11 @@ function parenthesizeType(type) {
|
|
|
1321
1357
|
if (typeNeedsNoParens.has(type.type)) {
|
|
1322
1358
|
return type;
|
|
1323
1359
|
}
|
|
1324
|
-
return
|
|
1360
|
+
return makeNode({
|
|
1361
|
+
type: "TypeParenthesized",
|
|
1362
|
+
ts: true,
|
|
1363
|
+
children: ["(", type, ")"]
|
|
1364
|
+
});
|
|
1325
1365
|
}
|
|
1326
1366
|
function wrapIIFE(expressions, asyncFlag, generator) {
|
|
1327
1367
|
let awaitPrefix;
|
|
@@ -1392,8 +1432,8 @@ function wrapIIFE(expressions, asyncFlag, generator) {
|
|
|
1392
1432
|
children.splice(1, 0, ".bind(this)");
|
|
1393
1433
|
}
|
|
1394
1434
|
if (gatherRecursiveWithinFunction(block, (a2) => typeof a2 === "object" && a2 != null && "token" in a2 && a2.token === "arguments").length) {
|
|
1395
|
-
let
|
|
1396
|
-
children[children.length - 1] = (
|
|
1435
|
+
let ref9;
|
|
1436
|
+
children[children.length - 1] = (ref9 = parameters.children)[ref9.length - 1] = "(arguments)";
|
|
1397
1437
|
}
|
|
1398
1438
|
}
|
|
1399
1439
|
let exp = makeNode({
|
|
@@ -1420,13 +1460,16 @@ function wrapIIFE(expressions, asyncFlag, generator) {
|
|
|
1420
1460
|
}
|
|
1421
1461
|
return exp;
|
|
1422
1462
|
}
|
|
1423
|
-
function wrapWithReturn(expression) {
|
|
1463
|
+
function wrapWithReturn(expression, parent = expression?.parent, semi = false) {
|
|
1424
1464
|
const children = expression ? ["return ", expression] : ["return"];
|
|
1465
|
+
if (semi) {
|
|
1466
|
+
children.unshift(";");
|
|
1467
|
+
}
|
|
1425
1468
|
return makeNode({
|
|
1426
1469
|
type: "ReturnStatement",
|
|
1427
1470
|
children,
|
|
1428
1471
|
expression,
|
|
1429
|
-
parent
|
|
1472
|
+
parent
|
|
1430
1473
|
});
|
|
1431
1474
|
}
|
|
1432
1475
|
function flatJoin(array, separator) {
|
|
@@ -1668,9 +1711,11 @@ function adjustBindingElements(elements) {
|
|
|
1668
1711
|
if (l) {
|
|
1669
1712
|
if (arrayElementHasTrailingComma(after[l - 1]))
|
|
1670
1713
|
l++;
|
|
1714
|
+
const elements2 = trimFirstSpace(after);
|
|
1671
1715
|
blockPrefix = {
|
|
1672
1716
|
type: "PostRestBindingElements",
|
|
1673
|
-
|
|
1717
|
+
elements: elements2,
|
|
1718
|
+
children: ["[", elements2, "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
|
|
1674
1719
|
names: after.flatMap((p) => p.names)
|
|
1675
1720
|
};
|
|
1676
1721
|
}
|
|
@@ -2005,7 +2050,7 @@ var declareHelper = {
|
|
|
2005
2050
|
AutoPromise(ref) {
|
|
2006
2051
|
state.prelude.push([
|
|
2007
2052
|
"",
|
|
2008
|
-
ts(["type ", ref, "<T> =
|
|
2053
|
+
ts(["type ", ref, "<T> = Promise<Awaited<T>>"]),
|
|
2009
2054
|
";\n"
|
|
2010
2055
|
]);
|
|
2011
2056
|
},
|
|
@@ -2674,14 +2719,10 @@ function processReturnValue(func) {
|
|
|
2674
2719
|
let ref1;
|
|
2675
2720
|
if (!((ref1 = block.children)[ref1.length - 2]?.type === "ReturnStatement")) {
|
|
2676
2721
|
let ref2;
|
|
2677
|
-
const indent = getIndent((ref2 = block.expressions)[ref2.length - 1])
|
|
2722
|
+
const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]);
|
|
2678
2723
|
block.expressions.push([
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
type: "ReturnStatement",
|
|
2682
|
-
expression: ref,
|
|
2683
|
-
children: ["return ", ref]
|
|
2684
|
-
}
|
|
2724
|
+
indent,
|
|
2725
|
+
wrapWithReturn(ref, block, !indent)
|
|
2685
2726
|
]);
|
|
2686
2727
|
}
|
|
2687
2728
|
return true;
|
|
@@ -2693,34 +2734,103 @@ function patternAsValue(pattern) {
|
|
|
2693
2734
|
const index = children.indexOf(pattern.elements);
|
|
2694
2735
|
if (index < 0)
|
|
2695
2736
|
throw new Error("failed to find elements in ArrayBindingPattern");
|
|
2696
|
-
children[index] = pattern.elements.map(
|
|
2697
|
-
|
|
2698
|
-
return { ...el, children: [ws, patternAsValue(e), delim] };
|
|
2699
|
-
});
|
|
2700
|
-
return { ...pattern, children };
|
|
2737
|
+
const elements = children[index] = pattern.elements.map(patternAsValue);
|
|
2738
|
+
return { ...pattern, elements, children };
|
|
2701
2739
|
}
|
|
2702
2740
|
case "ObjectBindingPattern": {
|
|
2703
2741
|
const children = [...pattern.children];
|
|
2704
2742
|
const index = children.indexOf(pattern.properties);
|
|
2705
2743
|
if (index < 0)
|
|
2706
2744
|
throw new Error("failed to find properties in ArrayBindingPattern");
|
|
2707
|
-
children[index] = pattern.properties.map(patternAsValue);
|
|
2708
|
-
return { ...pattern, children };
|
|
2745
|
+
const properties = children[index] = pattern.properties.map(patternAsValue);
|
|
2746
|
+
return { ...pattern, properties, children };
|
|
2709
2747
|
}
|
|
2710
|
-
case "Identifier":
|
|
2711
2748
|
case "BindingProperty": {
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
pattern.value
|
|
2715
|
-
pattern.
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2749
|
+
let children;
|
|
2750
|
+
if (pattern.value?.type === "Identifier") {
|
|
2751
|
+
children = [pattern.value, pattern.delim];
|
|
2752
|
+
if (isWhitespaceOrEmpty(pattern.children[0])) {
|
|
2753
|
+
children.unshift(pattern.children[0]);
|
|
2754
|
+
}
|
|
2755
|
+
} else {
|
|
2756
|
+
children = [...pattern.children];
|
|
2757
|
+
if (pattern.initializer != null) {
|
|
2758
|
+
const index = children.indexOf(pattern.initializer);
|
|
2759
|
+
assert.notEqual(index, -1, "failed to find initializer in BindingElement");
|
|
2760
|
+
children.splice(index, 1);
|
|
2761
|
+
}
|
|
2762
|
+
if (pattern.value != null) {
|
|
2763
|
+
children = children.map(($2) => $2 === pattern.value ? patternAsValue(pattern.value) : $2);
|
|
2764
|
+
}
|
|
2719
2765
|
}
|
|
2720
2766
|
return { ...pattern, children };
|
|
2721
2767
|
}
|
|
2722
|
-
|
|
2768
|
+
case "AtBindingProperty": {
|
|
2769
|
+
const children = [...pattern.children];
|
|
2770
|
+
if (pattern.initializer != null) {
|
|
2771
|
+
const index = children.indexOf(pattern.initializer);
|
|
2772
|
+
assert.notEqual(index, -1, "failed to find initializer in AtBindingProperty");
|
|
2773
|
+
children.splice(index, 1);
|
|
2774
|
+
}
|
|
2775
|
+
return { ...pattern, children };
|
|
2776
|
+
}
|
|
2777
|
+
case "BindingElement": {
|
|
2778
|
+
const children = [...pattern.children];
|
|
2779
|
+
if (pattern.initializer != null) {
|
|
2780
|
+
const index2 = children.indexOf(pattern.initializer);
|
|
2781
|
+
assert.notEqual(index2, -1, "failed to find initializer in BindingElement");
|
|
2782
|
+
children.splice(index2, 1);
|
|
2783
|
+
}
|
|
2784
|
+
const index = children.indexOf(pattern.binding);
|
|
2785
|
+
assert.notEqual(index, -1, "failed to find binding in BindingElement");
|
|
2786
|
+
children[index] = patternAsValue(pattern.binding);
|
|
2787
|
+
return { ...pattern, children };
|
|
2788
|
+
}
|
|
2789
|
+
default: {
|
|
2723
2790
|
return pattern;
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
function patternBindings(pattern) {
|
|
2795
|
+
const bindings = [];
|
|
2796
|
+
recurse(pattern);
|
|
2797
|
+
return bindings;
|
|
2798
|
+
function recurse(pattern2) {
|
|
2799
|
+
switch (pattern2.type) {
|
|
2800
|
+
case "ArrayBindingPattern": {
|
|
2801
|
+
for (let ref3 = pattern2.elements, i2 = 0, len1 = ref3.length; i2 < len1; i2++) {
|
|
2802
|
+
const element = ref3[i2];
|
|
2803
|
+
recurse(element);
|
|
2804
|
+
}
|
|
2805
|
+
;
|
|
2806
|
+
break;
|
|
2807
|
+
}
|
|
2808
|
+
case "ObjectBindingPattern": {
|
|
2809
|
+
for (let ref4 = pattern2.properties, i3 = 0, len22 = ref4.length; i3 < len22; i3++) {
|
|
2810
|
+
const property = ref4[i3];
|
|
2811
|
+
recurse(property);
|
|
2812
|
+
}
|
|
2813
|
+
;
|
|
2814
|
+
break;
|
|
2815
|
+
}
|
|
2816
|
+
case "BindingElement": {
|
|
2817
|
+
recurse(pattern2.binding);
|
|
2818
|
+
break;
|
|
2819
|
+
}
|
|
2820
|
+
case "BindingProperty": {
|
|
2821
|
+
recurse(pattern2.value ?? pattern2.name);
|
|
2822
|
+
break;
|
|
2823
|
+
}
|
|
2824
|
+
case "Binding": {
|
|
2825
|
+
recurse(pattern2.pattern);
|
|
2826
|
+
break;
|
|
2827
|
+
}
|
|
2828
|
+
case "Identifier":
|
|
2829
|
+
case "AtBinding": {
|
|
2830
|
+
bindings.push(pattern2);
|
|
2831
|
+
break;
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2724
2834
|
}
|
|
2725
2835
|
}
|
|
2726
2836
|
function assignResults(node, collect) {
|
|
@@ -2729,8 +2839,8 @@ function assignResults(node, collect) {
|
|
|
2729
2839
|
switch (node.type) {
|
|
2730
2840
|
case "BlockStatement":
|
|
2731
2841
|
if (node.expressions.length) {
|
|
2732
|
-
let
|
|
2733
|
-
assignResults((
|
|
2842
|
+
let ref5;
|
|
2843
|
+
assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
|
|
2734
2844
|
} else {
|
|
2735
2845
|
node.expressions.push(["", collect("void 0"), ";"]);
|
|
2736
2846
|
}
|
|
@@ -2765,7 +2875,7 @@ function assignResults(node, collect) {
|
|
|
2765
2875
|
if (exp.type === "LabelledStatement") {
|
|
2766
2876
|
exp = exp.statement;
|
|
2767
2877
|
}
|
|
2768
|
-
let
|
|
2878
|
+
let ref6;
|
|
2769
2879
|
switch (exp.type) {
|
|
2770
2880
|
case "BreakStatement":
|
|
2771
2881
|
case "ContinueStatement":
|
|
@@ -2776,14 +2886,14 @@ function assignResults(node, collect) {
|
|
|
2776
2886
|
return;
|
|
2777
2887
|
}
|
|
2778
2888
|
case "Declaration": {
|
|
2779
|
-
let
|
|
2889
|
+
let ref7;
|
|
2780
2890
|
if (exp.bindings?.length) {
|
|
2781
|
-
|
|
2891
|
+
ref7 = patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern);
|
|
2782
2892
|
} else {
|
|
2783
|
-
|
|
2893
|
+
ref7 = "void 0";
|
|
2784
2894
|
}
|
|
2785
2895
|
;
|
|
2786
|
-
const value =
|
|
2896
|
+
const value = ref7;
|
|
2787
2897
|
exp.children.push([
|
|
2788
2898
|
"",
|
|
2789
2899
|
[";", collect(value)]
|
|
@@ -2831,11 +2941,17 @@ function assignResults(node, collect) {
|
|
|
2831
2941
|
return;
|
|
2832
2942
|
}
|
|
2833
2943
|
case "SwitchStatement": {
|
|
2834
|
-
|
|
2944
|
+
for (let ref8 = exp.caseBlock.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
|
|
2945
|
+
const clause = ref8[i4];
|
|
2946
|
+
assignResults(clause, collect);
|
|
2947
|
+
}
|
|
2835
2948
|
return;
|
|
2836
2949
|
}
|
|
2837
2950
|
case "TryStatement": {
|
|
2838
|
-
exp.blocks
|
|
2951
|
+
for (let ref9 = exp.blocks, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
|
|
2952
|
+
const block = ref9[i5];
|
|
2953
|
+
assignResults(block, collect);
|
|
2954
|
+
}
|
|
2839
2955
|
return;
|
|
2840
2956
|
}
|
|
2841
2957
|
}
|
|
@@ -2856,20 +2972,28 @@ function insertReturn(node) {
|
|
|
2856
2972
|
const last = node.expressions[node.expressions.length - 1];
|
|
2857
2973
|
insertReturn(last);
|
|
2858
2974
|
} else {
|
|
2859
|
-
|
|
2860
|
-
|
|
2975
|
+
let m1;
|
|
2976
|
+
if (m1 = node.parent?.type, m1 === "CatchClause" || m1 === "WhenClause") {
|
|
2977
|
+
node.expressions.push(["", wrapWithReturn(void 0, node)]);
|
|
2861
2978
|
}
|
|
2862
2979
|
}
|
|
2863
2980
|
return;
|
|
2864
2981
|
}
|
|
2865
2982
|
case "WhenClause": {
|
|
2866
2983
|
if (node.break) {
|
|
2867
|
-
node.children.
|
|
2984
|
+
const breakIndex = node.children.indexOf(node.break);
|
|
2985
|
+
assert.notEqual(breakIndex, -1, "Could not find break in when clause");
|
|
2986
|
+
node.children.splice(breakIndex, 1);
|
|
2987
|
+
node.break = void 0;
|
|
2868
2988
|
}
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2989
|
+
insertReturn(node.block);
|
|
2990
|
+
if (!isExit(node.block)) {
|
|
2991
|
+
const comment = hasTrailingComment(node.block.expressions);
|
|
2992
|
+
let ref10;
|
|
2993
|
+
node.block.expressions.push([
|
|
2994
|
+
comment ? (ref10 = node.block.expressions)[ref10.length - 1][0] || "\n" : "",
|
|
2995
|
+
wrapWithReturn(void 0, node, !comment)
|
|
2996
|
+
]);
|
|
2873
2997
|
}
|
|
2874
2998
|
return;
|
|
2875
2999
|
}
|
|
@@ -2894,7 +3018,7 @@ function insertReturn(node) {
|
|
|
2894
3018
|
if (exp.type === "LabelledStatement") {
|
|
2895
3019
|
exp = exp.statement;
|
|
2896
3020
|
}
|
|
2897
|
-
let
|
|
3021
|
+
let ref11;
|
|
2898
3022
|
switch (exp.type) {
|
|
2899
3023
|
case "BreakStatement":
|
|
2900
3024
|
case "ContinueStatement":
|
|
@@ -2905,27 +3029,30 @@ function insertReturn(node) {
|
|
|
2905
3029
|
return;
|
|
2906
3030
|
}
|
|
2907
3031
|
case "Declaration": {
|
|
2908
|
-
let
|
|
3032
|
+
let ref12;
|
|
2909
3033
|
if (exp.bindings?.length) {
|
|
2910
|
-
|
|
3034
|
+
ref12 = [" ", patternAsValue((ref11 = exp.bindings)[ref11.length - 1].pattern)];
|
|
2911
3035
|
} else {
|
|
2912
|
-
|
|
3036
|
+
ref12 = [];
|
|
2913
3037
|
}
|
|
2914
3038
|
;
|
|
2915
|
-
const value =
|
|
3039
|
+
const value = ref12;
|
|
2916
3040
|
const parent = outer.parent;
|
|
2917
3041
|
const index = findChildIndex(parent?.expressions, outer);
|
|
2918
3042
|
assert.notEqual(index, -1, "Could not find declaration in parent");
|
|
2919
|
-
parent.expressions.splice(index + 1, 0, [
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
3043
|
+
parent.expressions.splice(index + 1, 0, [
|
|
3044
|
+
"",
|
|
3045
|
+
{
|
|
3046
|
+
type: "ReturnStatement",
|
|
3047
|
+
expression: value,
|
|
3048
|
+
children: [
|
|
3049
|
+
!(parent.expressions[index][2] === ";") ? ";" : void 0,
|
|
3050
|
+
"return",
|
|
3051
|
+
value
|
|
3052
|
+
],
|
|
3053
|
+
parent: exp
|
|
3054
|
+
}
|
|
3055
|
+
]);
|
|
2929
3056
|
braceBlock(parent);
|
|
2930
3057
|
return;
|
|
2931
3058
|
}
|
|
@@ -2936,12 +3063,7 @@ function insertReturn(node) {
|
|
|
2936
3063
|
assert.notEqual(index, -1, "Could not find function declaration in parent");
|
|
2937
3064
|
parent.expressions.splice(index + 1, 0, [
|
|
2938
3065
|
"",
|
|
2939
|
-
|
|
2940
|
-
type: "ReturnStatement",
|
|
2941
|
-
expression: exp.id,
|
|
2942
|
-
children: [";return ", exp.id],
|
|
2943
|
-
parent: exp
|
|
2944
|
-
}
|
|
3066
|
+
wrapWithReturn(exp.id, exp, true)
|
|
2945
3067
|
]);
|
|
2946
3068
|
braceBlock(parent);
|
|
2947
3069
|
return;
|
|
@@ -2964,12 +3086,11 @@ function insertReturn(node) {
|
|
|
2964
3086
|
if (exp.else)
|
|
2965
3087
|
insertReturn(exp.else.block);
|
|
2966
3088
|
else
|
|
2967
|
-
exp.children.push([
|
|
2968
|
-
|
|
2969
|
-
// NOTE: add a prefixed
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
}]);
|
|
3089
|
+
exp.children.push([
|
|
3090
|
+
"",
|
|
3091
|
+
// NOTE: add a prefixed semicolon because the if block may not be braced
|
|
3092
|
+
wrapWithReturn(void 0, exp, true)
|
|
3093
|
+
]);
|
|
2973
3094
|
return;
|
|
2974
3095
|
}
|
|
2975
3096
|
case "PatternMatchingStatement": {
|
|
@@ -2977,30 +3098,30 @@ function insertReturn(node) {
|
|
|
2977
3098
|
return;
|
|
2978
3099
|
}
|
|
2979
3100
|
case "SwitchStatement": {
|
|
2980
|
-
|
|
3101
|
+
for (let ref13 = exp.caseBlock.clauses, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
|
|
3102
|
+
const clause = ref13[i6];
|
|
3103
|
+
insertReturn(clause);
|
|
3104
|
+
}
|
|
2981
3105
|
return;
|
|
2982
3106
|
}
|
|
2983
3107
|
case "TryStatement": {
|
|
2984
|
-
exp.blocks.
|
|
3108
|
+
for (let ref14 = exp.blocks, i7 = 0, len6 = ref14.length; i7 < len6; i7++) {
|
|
3109
|
+
const block = ref14[i7];
|
|
3110
|
+
insertReturn(block);
|
|
3111
|
+
}
|
|
2985
3112
|
return;
|
|
2986
3113
|
}
|
|
2987
3114
|
}
|
|
2988
3115
|
if (node[node.length - 1]?.type === "SemicolonDelimiter") {
|
|
2989
3116
|
return;
|
|
2990
3117
|
}
|
|
2991
|
-
|
|
2992
|
-
node.splice(1, 1, returnStatement);
|
|
2993
|
-
}
|
|
2994
|
-
function insertSwitchReturns(exp) {
|
|
2995
|
-
exp.caseBlock.clauses.forEach((clause) => {
|
|
2996
|
-
return insertReturn(clause);
|
|
2997
|
-
});
|
|
3118
|
+
node[1] = wrapWithReturn(node[1]);
|
|
2998
3119
|
}
|
|
2999
3120
|
function processBreakContinueWith(statement) {
|
|
3000
3121
|
let changed = false;
|
|
3001
3122
|
for (const control of gatherRecursiveWithinFunction(
|
|
3002
3123
|
statement.block,
|
|
3003
|
-
($
|
|
3124
|
+
($3) => $3.type === "BreakStatement" || $3.type === "ContinueStatement"
|
|
3004
3125
|
)) {
|
|
3005
3126
|
let controlName2 = function() {
|
|
3006
3127
|
switch (control.type) {
|
|
@@ -3015,8 +3136,8 @@ function processBreakContinueWith(statement) {
|
|
|
3015
3136
|
var controlName = controlName2;
|
|
3016
3137
|
if (control.with) {
|
|
3017
3138
|
if (control.label) {
|
|
3018
|
-
let
|
|
3019
|
-
if (!(
|
|
3139
|
+
let m2;
|
|
3140
|
+
if (!(m2 = statement.parent, typeof m2 === "object" && m2 != null && "type" in m2 && m2.type === "LabelledStatement" && "label" in m2 && typeof m2.label === "object" && m2.label != null && "name" in m2.label && m2.label.name === control.label.name)) {
|
|
3020
3141
|
continue;
|
|
3021
3142
|
}
|
|
3022
3143
|
} else {
|
|
@@ -3035,7 +3156,7 @@ function processBreakContinueWith(statement) {
|
|
|
3035
3156
|
)
|
|
3036
3157
|
);
|
|
3037
3158
|
updateParentPointers(control.with, control);
|
|
3038
|
-
const i = control.children.findIndex(($
|
|
3159
|
+
const i = control.children.findIndex(($4) => $4?.type === "Error");
|
|
3039
3160
|
if (i >= 0) {
|
|
3040
3161
|
control.children.splice(i, 1);
|
|
3041
3162
|
}
|
|
@@ -3077,7 +3198,7 @@ function wrapIterationReturningResults(statement, collect) {
|
|
|
3077
3198
|
}
|
|
3078
3199
|
const resultsRef = statement.resultsRef = makeRef("results");
|
|
3079
3200
|
const declaration = iterationDeclaration(statement);
|
|
3080
|
-
const { ancestor, child } = findAncestor(statement, ($
|
|
3201
|
+
const { ancestor, child } = findAncestor(statement, ($5) => $5.type === "BlockStatement");
|
|
3081
3202
|
assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
|
|
3082
3203
|
const index = findChildIndex(ancestor.expressions, child);
|
|
3083
3204
|
assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
|
|
@@ -3130,6 +3251,9 @@ function iterationDeclaration(statement) {
|
|
|
3130
3251
|
case "product": {
|
|
3131
3252
|
return "1";
|
|
3132
3253
|
}
|
|
3254
|
+
case "join": {
|
|
3255
|
+
return '""';
|
|
3256
|
+
}
|
|
3133
3257
|
default: {
|
|
3134
3258
|
return "0";
|
|
3135
3259
|
}
|
|
@@ -3174,7 +3298,8 @@ function iterationDeclaration(statement) {
|
|
|
3174
3298
|
case "count": {
|
|
3175
3299
|
return ["if (", node, ") ++", resultsRef];
|
|
3176
3300
|
}
|
|
3177
|
-
case "sum":
|
|
3301
|
+
case "sum":
|
|
3302
|
+
case "join": {
|
|
3178
3303
|
return [resultsRef, " += ", node];
|
|
3179
3304
|
}
|
|
3180
3305
|
case "product": {
|
|
@@ -3199,9 +3324,9 @@ function iterationDefaultBody(statement) {
|
|
|
3199
3324
|
}
|
|
3200
3325
|
const reduction = statement.type === "ForStatement" && statement.reduction;
|
|
3201
3326
|
function fillBlock(expression) {
|
|
3202
|
-
let
|
|
3203
|
-
let
|
|
3204
|
-
if (
|
|
3327
|
+
let ref15;
|
|
3328
|
+
let m3;
|
|
3329
|
+
if (m3 = (ref15 = block.expressions)[ref15.length - 1], Array.isArray(m3) && m3.length >= 2 && typeof m3[1] === "object" && m3[1] != null && "type" in m3[1] && m3[1].type === "EmptyStatement" && "implicit" in m3[1] && m3[1].implicit === true) {
|
|
3205
3330
|
block.expressions.pop();
|
|
3206
3331
|
}
|
|
3207
3332
|
block.expressions.push(expression);
|
|
@@ -3231,7 +3356,29 @@ function iterationDefaultBody(statement) {
|
|
|
3231
3356
|
}
|
|
3232
3357
|
}
|
|
3233
3358
|
if (statement.type === "ForStatement" && statement.declaration?.type === "ForDeclaration") {
|
|
3234
|
-
|
|
3359
|
+
if (reduction) {
|
|
3360
|
+
const bindings = patternBindings(statement.declaration.binding.pattern);
|
|
3361
|
+
if (bindings.length) {
|
|
3362
|
+
fillBlock(["", bindings[0]]);
|
|
3363
|
+
for (const binding of bindings.slice(1)) {
|
|
3364
|
+
binding.children.unshift({
|
|
3365
|
+
type: "Error",
|
|
3366
|
+
subtype: "Warning",
|
|
3367
|
+
message: "Ignored binding in reduction loop with implicit body"
|
|
3368
|
+
});
|
|
3369
|
+
}
|
|
3370
|
+
} else {
|
|
3371
|
+
fillBlock([
|
|
3372
|
+
"",
|
|
3373
|
+
{
|
|
3374
|
+
type: "Error",
|
|
3375
|
+
message: "Empty binding pattern in reduction loop with implicit body"
|
|
3376
|
+
}
|
|
3377
|
+
]);
|
|
3378
|
+
}
|
|
3379
|
+
} else {
|
|
3380
|
+
fillBlock(["", patternAsValue(statement.declaration.binding.pattern)]);
|
|
3381
|
+
}
|
|
3235
3382
|
block.empty = false;
|
|
3236
3383
|
}
|
|
3237
3384
|
return false;
|
|
@@ -3259,24 +3406,24 @@ function processParams(f) {
|
|
|
3259
3406
|
injectParamProps: isConstructor
|
|
3260
3407
|
});
|
|
3261
3408
|
if (isConstructor) {
|
|
3262
|
-
const { ancestor } = findAncestor(f, ($
|
|
3409
|
+
const { ancestor } = findAncestor(f, ($6) => $6.type === "ClassExpression");
|
|
3263
3410
|
if (ancestor != null) {
|
|
3264
|
-
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($
|
|
3411
|
+
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($7) => $7.type === "FieldDefinition").map(($8) => $8.id).filter((a1) => typeof a1 === "object" && a1 != null && "type" in a1 && a1.type === "Identifier").map(($9) => $9.name));
|
|
3265
3412
|
const classExpressions = ancestor.body.expressions;
|
|
3266
3413
|
let index = findChildIndex(classExpressions, f);
|
|
3267
3414
|
assert.notEqual(index, -1, "Could not find constructor in class");
|
|
3268
|
-
let
|
|
3269
|
-
while (
|
|
3415
|
+
let m4;
|
|
3416
|
+
while (m4 = classExpressions[index - 1]?.[1], typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "MethodDefinition" && "name" in m4 && m4.name === "constructor") {
|
|
3270
3417
|
index--;
|
|
3271
3418
|
}
|
|
3272
3419
|
const fStatement = classExpressions[index];
|
|
3273
|
-
for (let
|
|
3274
|
-
const parameter =
|
|
3420
|
+
for (let ref16 = gatherRecursive(parameters, ($10) => $10.type === "Parameter"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
|
|
3421
|
+
const parameter = ref16[i8];
|
|
3275
3422
|
if (!parameter.typeSuffix) {
|
|
3276
3423
|
continue;
|
|
3277
3424
|
}
|
|
3278
|
-
for (let
|
|
3279
|
-
const binding =
|
|
3425
|
+
for (let ref17 = gatherRecursive(parameter, ($11) => $11.type === "AtBinding"), i9 = 0, len8 = ref17.length; i9 < len8; i9++) {
|
|
3426
|
+
const binding = ref17[i9];
|
|
3280
3427
|
const typeSuffix = binding.parent?.typeSuffix;
|
|
3281
3428
|
if (!typeSuffix) {
|
|
3282
3429
|
continue;
|
|
@@ -3336,8 +3483,8 @@ function processSignature(f) {
|
|
|
3336
3483
|
}
|
|
3337
3484
|
if (!f.generator?.length && hasYield(block)) {
|
|
3338
3485
|
if (f.type === "ArrowFunction") {
|
|
3339
|
-
gatherRecursiveWithinFunction(block, ($
|
|
3340
|
-
const i = y.children.findIndex(($
|
|
3486
|
+
gatherRecursiveWithinFunction(block, ($12) => $12.type === "YieldExpression").forEach((y) => {
|
|
3487
|
+
const i = y.children.findIndex(($13) => $13.type === "Yield");
|
|
3341
3488
|
return y.children.splice(i + 1, 0, {
|
|
3342
3489
|
type: "Error",
|
|
3343
3490
|
message: "Can't use yield inside of => arrow function"
|
|
@@ -3353,8 +3500,8 @@ function processSignature(f) {
|
|
|
3353
3500
|
}
|
|
3354
3501
|
}
|
|
3355
3502
|
function processFunctions(statements, config2) {
|
|
3356
|
-
for (let
|
|
3357
|
-
const f =
|
|
3503
|
+
for (let ref18 = gatherRecursiveAll(statements, ($14) => $14.type === "FunctionExpression" || $14.type === "ArrowFunction"), i10 = 0, len9 = ref18.length; i10 < len9; i10++) {
|
|
3504
|
+
const f = ref18[i10];
|
|
3358
3505
|
if (f.type === "FunctionExpression") {
|
|
3359
3506
|
implicitFunctionBlock(f);
|
|
3360
3507
|
}
|
|
@@ -3362,8 +3509,8 @@ function processFunctions(statements, config2) {
|
|
|
3362
3509
|
processParams(f);
|
|
3363
3510
|
processReturn(f, config2.implicitReturns);
|
|
3364
3511
|
}
|
|
3365
|
-
for (let
|
|
3366
|
-
const f =
|
|
3512
|
+
for (let ref19 = gatherRecursiveAll(statements, ($15) => $15.type === "MethodDefinition"), i11 = 0, len10 = ref19.length; i11 < len10; i11++) {
|
|
3513
|
+
const f = ref19[i11];
|
|
3367
3514
|
implicitFunctionBlock(f);
|
|
3368
3515
|
processParams(f);
|
|
3369
3516
|
processReturn(f, config2.implicitReturns);
|
|
@@ -3416,9 +3563,9 @@ function expressionizeIteration(exp) {
|
|
|
3416
3563
|
}
|
|
3417
3564
|
let done;
|
|
3418
3565
|
if (!async) {
|
|
3419
|
-
let
|
|
3420
|
-
if ((
|
|
3421
|
-
const { block: parentBlock, index } =
|
|
3566
|
+
let ref20;
|
|
3567
|
+
if ((ref20 = blockContainingStatement(exp)) && typeof ref20 === "object" && "block" in ref20 && "index" in ref20) {
|
|
3568
|
+
const { block: parentBlock, index } = ref20;
|
|
3422
3569
|
statements[0][0] = parentBlock.expressions[index][0];
|
|
3423
3570
|
parentBlock.expressions.splice(index, index + 1 - index, ...statements);
|
|
3424
3571
|
updateParentPointers(parentBlock);
|
|
@@ -3435,8 +3582,8 @@ function expressionizeIteration(exp) {
|
|
|
3435
3582
|
}
|
|
3436
3583
|
}
|
|
3437
3584
|
function processIterationExpressions(statements) {
|
|
3438
|
-
for (let
|
|
3439
|
-
const s =
|
|
3585
|
+
for (let ref21 = gatherRecursiveAll(statements, ($16) => $16.type === "IterationExpression"), i12 = 0, len11 = ref21.length; i12 < len11; i12++) {
|
|
3586
|
+
const s = ref21[i12];
|
|
3440
3587
|
expressionizeIteration(s);
|
|
3441
3588
|
}
|
|
3442
3589
|
}
|
|
@@ -3462,12 +3609,12 @@ function processCoffeeDo(ws, expression) {
|
|
|
3462
3609
|
...parameters,
|
|
3463
3610
|
children: (() => {
|
|
3464
3611
|
const results1 = [];
|
|
3465
|
-
for (let
|
|
3466
|
-
let parameter =
|
|
3612
|
+
for (let ref22 = parameters.children, i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
|
|
3613
|
+
let parameter = ref22[i13];
|
|
3467
3614
|
if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
|
|
3468
|
-
let
|
|
3469
|
-
if (
|
|
3470
|
-
const initializer =
|
|
3615
|
+
let ref23;
|
|
3616
|
+
if (ref23 = parameter.initializer) {
|
|
3617
|
+
const initializer = ref23;
|
|
3471
3618
|
args.push(initializer.expression, parameter.delim);
|
|
3472
3619
|
parameter = {
|
|
3473
3620
|
...parameter,
|
|
@@ -3488,7 +3635,7 @@ function processCoffeeDo(ws, expression) {
|
|
|
3488
3635
|
expression = {
|
|
3489
3636
|
...expression,
|
|
3490
3637
|
parameters: newParameters,
|
|
3491
|
-
children: expression.children.map(($
|
|
3638
|
+
children: expression.children.map(($17) => $17 === parameters ? newParameters : $17)
|
|
3492
3639
|
};
|
|
3493
3640
|
}
|
|
3494
3641
|
return {
|
|
@@ -3510,7 +3657,7 @@ function makeAmpersandFunction(rhs) {
|
|
|
3510
3657
|
ref = makeRef("$");
|
|
3511
3658
|
inplacePrepend(ref, body);
|
|
3512
3659
|
}
|
|
3513
|
-
if (startsWithPredicate(body, ($
|
|
3660
|
+
if (startsWithPredicate(body, ($18) => $18.type === "ObjectExpression")) {
|
|
3514
3661
|
body = makeLeftHandSideExpression(body);
|
|
3515
3662
|
}
|
|
3516
3663
|
const parameters = makeNode({
|
|
@@ -4116,7 +4263,7 @@ function expandChainedComparisons([first, binops]) {
|
|
|
4116
4263
|
// source/parser/pattern-matching.civet
|
|
4117
4264
|
function processPatternTest(lhs, patterns) {
|
|
4118
4265
|
const { ref, refAssignmentComma } = maybeRefAssignment(lhs, "m");
|
|
4119
|
-
const conditionExpression = flatJoin(patterns.map(($) => getPatternConditions(
|
|
4266
|
+
const conditionExpression = flatJoin(patterns.map(($1) => getPatternConditions($1, ref)).map(($2) => flatJoin($2, " && ")), " || ");
|
|
4120
4267
|
return makeLeftHandSideExpression(makeNode({
|
|
4121
4268
|
type: "PatternTest",
|
|
4122
4269
|
children: [
|
|
@@ -4126,7 +4273,7 @@ function processPatternTest(lhs, patterns) {
|
|
|
4126
4273
|
}));
|
|
4127
4274
|
}
|
|
4128
4275
|
function processPatternMatching(statements) {
|
|
4129
|
-
gatherRecursiveAll(statements, ($
|
|
4276
|
+
gatherRecursiveAll(statements, ($3) => $3.type === "SwitchStatement").forEach((s) => {
|
|
4130
4277
|
const { caseBlock } = s;
|
|
4131
4278
|
const { clauses } = caseBlock;
|
|
4132
4279
|
for (let i1 = 0, len3 = clauses.length; i1 < len3; i1++) {
|
|
@@ -4140,7 +4287,7 @@ function processPatternMatching(statements) {
|
|
|
4140
4287
|
}
|
|
4141
4288
|
let errors = false;
|
|
4142
4289
|
let isPattern = false;
|
|
4143
|
-
if (clauses.some(($
|
|
4290
|
+
if (clauses.some(($4) => $4.type === "PatternClause")) {
|
|
4144
4291
|
isPattern = true;
|
|
4145
4292
|
for (let i2 = 0, len1 = clauses.length; i2 < len1; i2++) {
|
|
4146
4293
|
const c = clauses[i2];
|
|
@@ -4178,7 +4325,7 @@ function processPatternMatching(statements) {
|
|
|
4178
4325
|
}
|
|
4179
4326
|
let { patterns, block } = c;
|
|
4180
4327
|
let pattern = patterns[0];
|
|
4181
|
-
const conditionExpression = flatJoin(patterns.map(($
|
|
4328
|
+
const conditionExpression = flatJoin(patterns.map(($5) => getPatternConditions($5, ref)).map(($6) => flatJoin($6, " && ")), " || ");
|
|
4182
4329
|
const condition2 = makeNode({
|
|
4183
4330
|
type: "ParenthesizedExpression",
|
|
4184
4331
|
children: ["(", ...refAssignmentComma, conditionExpression, ")"],
|
|
@@ -4371,38 +4518,59 @@ function getPatternBlockPrefix(pattern, ref, decl = "const ", suffix) {
|
|
|
4371
4518
|
}
|
|
4372
4519
|
}
|
|
4373
4520
|
let [splices, thisAssignments] = gatherBindingCode(pattern);
|
|
4374
|
-
const
|
|
4521
|
+
const patternBindings2 = nonMatcherBindings(pattern);
|
|
4375
4522
|
splices = splices.map((s) => [", ", nonMatcherBindings(s)]);
|
|
4376
|
-
thisAssignments = thisAssignments.map(($
|
|
4377
|
-
const duplicateDeclarations = aggregateDuplicateBindings([
|
|
4523
|
+
thisAssignments = thisAssignments.map(($7) => ["", $7, ";"]);
|
|
4524
|
+
const duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices]);
|
|
4378
4525
|
return [
|
|
4379
4526
|
["", {
|
|
4380
4527
|
type: "Declaration",
|
|
4381
|
-
children: [decl,
|
|
4528
|
+
children: [decl, patternBindings2, suffix, " = ", ref, ...splices],
|
|
4382
4529
|
names: [],
|
|
4383
4530
|
bindings: []
|
|
4384
4531
|
// avoid implicit return of any bindings
|
|
4385
4532
|
}, ";"],
|
|
4386
4533
|
...thisAssignments,
|
|
4387
|
-
...duplicateDeclarations.map(($
|
|
4534
|
+
...duplicateDeclarations.map(($8) => ["", $8, ";"])
|
|
4388
4535
|
];
|
|
4389
4536
|
}
|
|
4390
4537
|
function elideMatchersFromArrayBindings(elements) {
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
case "
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4538
|
+
const results = [];
|
|
4539
|
+
for (let i5 = 0, len4 = elements.length; i5 < len4; i5++) {
|
|
4540
|
+
const element = elements[i5];
|
|
4541
|
+
switch (element.type) {
|
|
4542
|
+
case "BindingRestElement":
|
|
4543
|
+
case "ElisionElement": {
|
|
4544
|
+
results.push(element);
|
|
4545
|
+
break;
|
|
4546
|
+
}
|
|
4547
|
+
case "BindingElement": {
|
|
4548
|
+
switch (element.binding.type) {
|
|
4549
|
+
case "Literal":
|
|
4550
|
+
case "RegularExpressionLiteral":
|
|
4551
|
+
case "StringLiteral":
|
|
4552
|
+
case "PinPattern": {
|
|
4553
|
+
results.push(element.delim);
|
|
4554
|
+
break;
|
|
4555
|
+
}
|
|
4556
|
+
default: {
|
|
4557
|
+
const binding = nonMatcherBindings(element.binding);
|
|
4558
|
+
results.push(makeNode({
|
|
4559
|
+
...element,
|
|
4560
|
+
binding,
|
|
4561
|
+
children: element.children.map((c) => {
|
|
4562
|
+
return c === element.binding ? binding : c;
|
|
4563
|
+
})
|
|
4564
|
+
}));
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
;
|
|
4568
|
+
break;
|
|
4569
|
+
}
|
|
4404
4570
|
}
|
|
4405
|
-
}
|
|
4571
|
+
}
|
|
4572
|
+
;
|
|
4573
|
+
return results;
|
|
4406
4574
|
}
|
|
4407
4575
|
function elideMatchersFromPropertyBindings(properties) {
|
|
4408
4576
|
return properties.map((p) => {
|
|
@@ -4410,6 +4578,10 @@ function elideMatchersFromPropertyBindings(properties) {
|
|
|
4410
4578
|
case "BindingProperty": {
|
|
4411
4579
|
const { children, name, value } = p;
|
|
4412
4580
|
const [ws] = children;
|
|
4581
|
+
const shouldElide = name.type === "NumericLiteral" && !value?.name || name.type === "ComputedPropertyName" && value?.subtype === "NumericLiteral";
|
|
4582
|
+
if (shouldElide) {
|
|
4583
|
+
return;
|
|
4584
|
+
}
|
|
4413
4585
|
switch (value && value.type) {
|
|
4414
4586
|
case "ArrayBindingPattern":
|
|
4415
4587
|
case "ObjectBindingPattern": {
|
|
@@ -4441,32 +4613,22 @@ function elideMatchersFromPropertyBindings(properties) {
|
|
|
4441
4613
|
}
|
|
4442
4614
|
function nonMatcherBindings(pattern) {
|
|
4443
4615
|
switch (pattern.type) {
|
|
4444
|
-
case "ArrayBindingPattern":
|
|
4616
|
+
case "ArrayBindingPattern":
|
|
4617
|
+
case "PostRestBindingElements": {
|
|
4445
4618
|
const elements = elideMatchersFromArrayBindings(pattern.elements);
|
|
4446
|
-
return {
|
|
4619
|
+
return makeNode({
|
|
4447
4620
|
...pattern,
|
|
4448
4621
|
elements,
|
|
4449
|
-
children: pattern.children.map(($
|
|
4450
|
-
};
|
|
4451
|
-
}
|
|
4452
|
-
case "PostRestBindingElements": {
|
|
4453
|
-
const els = elideMatchersFromArrayBindings(pattern.children[1]);
|
|
4454
|
-
return {
|
|
4455
|
-
...pattern,
|
|
4456
|
-
children: [
|
|
4457
|
-
pattern.children[0],
|
|
4458
|
-
els,
|
|
4459
|
-
...pattern.children.slice(2)
|
|
4460
|
-
]
|
|
4461
|
-
};
|
|
4622
|
+
children: pattern.children.map(($9) => $9 === pattern.elements ? elements : $9)
|
|
4623
|
+
});
|
|
4462
4624
|
}
|
|
4463
4625
|
case "ObjectBindingPattern": {
|
|
4464
4626
|
const properties = elideMatchersFromPropertyBindings(pattern.properties);
|
|
4465
|
-
return {
|
|
4627
|
+
return makeNode({
|
|
4466
4628
|
...pattern,
|
|
4467
4629
|
properties,
|
|
4468
|
-
children: pattern.children.map(($
|
|
4469
|
-
};
|
|
4630
|
+
children: pattern.children.map(($10) => $10 === pattern.properties ? properties : $10)
|
|
4631
|
+
});
|
|
4470
4632
|
}
|
|
4471
4633
|
default: {
|
|
4472
4634
|
return pattern;
|
|
@@ -4474,32 +4636,26 @@ function nonMatcherBindings(pattern) {
|
|
|
4474
4636
|
}
|
|
4475
4637
|
}
|
|
4476
4638
|
function aggregateDuplicateBindings(bindings) {
|
|
4477
|
-
const props = gatherRecursiveAll(
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
const [, e] = element;
|
|
4485
|
-
if (e.type === "Identifier") {
|
|
4486
|
-
props.push(e);
|
|
4487
|
-
} else if (e.type === "BindingRestElement") {
|
|
4488
|
-
props.push(e);
|
|
4489
|
-
}
|
|
4490
|
-
}
|
|
4491
|
-
}
|
|
4492
|
-
}
|
|
4639
|
+
const props = gatherRecursiveAll(
|
|
4640
|
+
bindings,
|
|
4641
|
+
($) => $.type === "BindingProperty" || // Don't deduplicate ...rest properties; user should do so manually
|
|
4642
|
+
// because ...rest can be named arbitrarily
|
|
4643
|
+
//$.type is "BindingRestProperty"
|
|
4644
|
+
$.type === "Identifier" && $.parent?.type === "BindingElement" || $.type === "BindingRestElement"
|
|
4645
|
+
);
|
|
4493
4646
|
const declarations = [];
|
|
4494
4647
|
const propsGroupedByName = /* @__PURE__ */ new Map();
|
|
4495
|
-
for (let
|
|
4496
|
-
const p = props[
|
|
4648
|
+
for (let i6 = 0, len5 = props.length; i6 < len5; i6++) {
|
|
4649
|
+
const p = props[i6];
|
|
4497
4650
|
const { name, value } = p;
|
|
4498
4651
|
let m1;
|
|
4499
4652
|
if (m1 = value?.type, m1 === "ArrayBindingPattern" || m1 === "ObjectBindingPattern") {
|
|
4500
4653
|
continue;
|
|
4501
4654
|
}
|
|
4502
4655
|
const key = value?.name || name?.name || name;
|
|
4656
|
+
if (key?.type === "NumericLiteral" || key?.type === "ComputedPropertyName") {
|
|
4657
|
+
continue;
|
|
4658
|
+
}
|
|
4503
4659
|
if (propsGroupedByName.has(key)) {
|
|
4504
4660
|
propsGroupedByName.get(key).push(p);
|
|
4505
4661
|
} else {
|
|
@@ -4515,8 +4671,8 @@ function aggregateDuplicateBindings(bindings) {
|
|
|
4515
4671
|
pos: 0,
|
|
4516
4672
|
input: key
|
|
4517
4673
|
})) {
|
|
4518
|
-
for (let
|
|
4519
|
-
const p = shared[
|
|
4674
|
+
for (let i7 = 0, len6 = shared.length; i7 < len6; i7++) {
|
|
4675
|
+
const p = shared[i7];
|
|
4520
4676
|
aliasBinding(p, makeRef(`_${key}`, key));
|
|
4521
4677
|
}
|
|
4522
4678
|
return;
|
|
@@ -6542,11 +6698,11 @@ function processCallMemberExpression(node) {
|
|
|
6542
6698
|
if (glob?.type === "PropertyGlob") {
|
|
6543
6699
|
let prefix = children.slice(0, i);
|
|
6544
6700
|
const parts = [];
|
|
6545
|
-
let
|
|
6546
|
-
if (prefix.length > 1) {
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
prefix = [
|
|
6701
|
+
let ref;
|
|
6702
|
+
if (prefix.length > 1 && glob.object.properties.length > 1) {
|
|
6703
|
+
ref = makeRef();
|
|
6704
|
+
const { refAssignment } = makeRefAssignment(ref, prefix);
|
|
6705
|
+
prefix = [makeLeftHandSideExpression(refAssignment)];
|
|
6550
6706
|
}
|
|
6551
6707
|
prefix = prefix.concat(glob.dot);
|
|
6552
6708
|
for (const part of glob.object.properties) {
|
|
@@ -6578,6 +6734,9 @@ function processCallMemberExpression(node) {
|
|
|
6578
6734
|
}
|
|
6579
6735
|
if (!suppressPrefix) {
|
|
6580
6736
|
value = prefix.concat(trimFirstSpace(value));
|
|
6737
|
+
if (ref != null) {
|
|
6738
|
+
prefix = [ref].concat(glob.dot);
|
|
6739
|
+
}
|
|
6581
6740
|
}
|
|
6582
6741
|
if (wValue)
|
|
6583
6742
|
value.unshift(wValue);
|
|
@@ -6588,7 +6747,8 @@ function processCallMemberExpression(node) {
|
|
|
6588
6747
|
dots: part.dots,
|
|
6589
6748
|
delim: part.delim,
|
|
6590
6749
|
names: part.names,
|
|
6591
|
-
children: part.children.slice(0, 2).concat(value, part.delim)
|
|
6750
|
+
children: part.children.slice(0, 2).concat(value, part.delim),
|
|
6751
|
+
usesRef: Boolean(ref)
|
|
6592
6752
|
});
|
|
6593
6753
|
} else {
|
|
6594
6754
|
parts.push({
|
|
@@ -6605,12 +6765,13 @@ function processCallMemberExpression(node) {
|
|
|
6605
6765
|
value,
|
|
6606
6766
|
part.delim
|
|
6607
6767
|
// comma delimiter
|
|
6608
|
-
]
|
|
6768
|
+
],
|
|
6769
|
+
usesRef: Boolean(ref)
|
|
6609
6770
|
});
|
|
6610
6771
|
}
|
|
6611
6772
|
}
|
|
6612
6773
|
let ref2;
|
|
6613
|
-
|
|
6774
|
+
const object = {
|
|
6614
6775
|
type: "ObjectExpression",
|
|
6615
6776
|
children: [
|
|
6616
6777
|
glob.object.children[0],
|
|
@@ -6621,13 +6782,6 @@ function processCallMemberExpression(node) {
|
|
|
6621
6782
|
],
|
|
6622
6783
|
properties: parts
|
|
6623
6784
|
};
|
|
6624
|
-
if (refAssignmentComma) {
|
|
6625
|
-
object = makeNode({
|
|
6626
|
-
type: "ParenthesizedExpression",
|
|
6627
|
-
children: ["(", ...refAssignmentComma, object, ")"],
|
|
6628
|
-
expression: object
|
|
6629
|
-
});
|
|
6630
|
-
}
|
|
6631
6785
|
if (i === children.length - 1)
|
|
6632
6786
|
return object;
|
|
6633
6787
|
return processCallMemberExpression({
|
|
@@ -6837,40 +6991,54 @@ function convertNamedImportsToObject(node, pattern) {
|
|
|
6837
6991
|
};
|
|
6838
6992
|
}
|
|
6839
6993
|
function convertObjectToJSXAttributes(obj) {
|
|
6840
|
-
const { properties } = obj;
|
|
6841
6994
|
const parts = [];
|
|
6842
6995
|
const rest = [];
|
|
6843
|
-
|
|
6996
|
+
let i4 = 0;
|
|
6997
|
+
for (const part of obj.properties) {
|
|
6998
|
+
const i = i4++;
|
|
6999
|
+
if (part.usesRef) {
|
|
7000
|
+
rest.push(part);
|
|
7001
|
+
continue;
|
|
7002
|
+
}
|
|
6844
7003
|
if (i > 0)
|
|
6845
7004
|
parts.push(" ");
|
|
6846
|
-
const part = properties[i];
|
|
6847
7005
|
switch (part.type) {
|
|
6848
|
-
case "Identifier":
|
|
7006
|
+
case "Identifier": {
|
|
6849
7007
|
parts.push([part.name, "={", part.name, "}"]);
|
|
6850
7008
|
break;
|
|
6851
|
-
|
|
7009
|
+
}
|
|
7010
|
+
case "Property": {
|
|
6852
7011
|
if (part.name.type === "ComputedPropertyName") {
|
|
6853
7012
|
rest.push(part);
|
|
6854
7013
|
} else {
|
|
6855
7014
|
parts.push([part.name, "={", trimFirstSpace(part.value), "}"]);
|
|
6856
7015
|
}
|
|
7016
|
+
;
|
|
6857
7017
|
break;
|
|
6858
|
-
|
|
7018
|
+
}
|
|
7019
|
+
case "SpreadProperty": {
|
|
6859
7020
|
parts.push(["{", part.dots, part.value, "}"]);
|
|
6860
7021
|
break;
|
|
6861
|
-
|
|
7022
|
+
}
|
|
7023
|
+
case "MethodDefinition": {
|
|
6862
7024
|
const func = convertMethodToFunction(part);
|
|
6863
7025
|
if (func) {
|
|
6864
7026
|
parts.push([part.name, "={", convertMethodToFunction(part), "}"]);
|
|
6865
7027
|
} else {
|
|
6866
7028
|
rest.push(part);
|
|
6867
7029
|
}
|
|
7030
|
+
;
|
|
6868
7031
|
break;
|
|
6869
|
-
|
|
7032
|
+
}
|
|
7033
|
+
default: {
|
|
6870
7034
|
throw new Error(`invalid object literal type in JSX attribute: ${part.type}`);
|
|
7035
|
+
}
|
|
6871
7036
|
}
|
|
6872
7037
|
}
|
|
6873
7038
|
if (rest.length) {
|
|
7039
|
+
if (parts.length && parts[parts.length - 1] !== " ") {
|
|
7040
|
+
parts.push(" ");
|
|
7041
|
+
}
|
|
6874
7042
|
parts.push(["{...{", ...rest, "}}"]);
|
|
6875
7043
|
}
|
|
6876
7044
|
return parts;
|
|
@@ -6931,7 +7099,7 @@ function processBindingPatternLHS(lhs, tail) {
|
|
|
6931
7099
|
tail.push(...splices.map((s) => [", ", s]), ...thisAssignments.map((a) => [", ", a]));
|
|
6932
7100
|
}
|
|
6933
7101
|
function processAssignments(statements) {
|
|
6934
|
-
for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"),
|
|
7102
|
+
for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len3 = ref7.length; i5 < len3; i5++) {
|
|
6935
7103
|
let extractAssignment2 = function(lhs) {
|
|
6936
7104
|
let expr = lhs;
|
|
6937
7105
|
while (expr.type === "ParenthesizedExpression") {
|
|
@@ -6952,7 +7120,7 @@ function processAssignments(statements) {
|
|
|
6952
7120
|
return;
|
|
6953
7121
|
};
|
|
6954
7122
|
var extractAssignment = extractAssignment2;
|
|
6955
|
-
const exp = ref7[
|
|
7123
|
+
const exp = ref7[i5];
|
|
6956
7124
|
checkValidLHS(exp.assigned);
|
|
6957
7125
|
const pre = [], post = [];
|
|
6958
7126
|
let ref8;
|
|
@@ -6961,8 +7129,8 @@ function processAssignments(statements) {
|
|
|
6961
7129
|
if (!exp.lhs) {
|
|
6962
7130
|
continue;
|
|
6963
7131
|
}
|
|
6964
|
-
for (let ref9 = exp.lhs,
|
|
6965
|
-
const lhsPart = ref9[
|
|
7132
|
+
for (let ref9 = exp.lhs, i6 = 0, len4 = ref9.length; i6 < len4; i6++) {
|
|
7133
|
+
const lhsPart = ref9[i6];
|
|
6966
7134
|
let ref10;
|
|
6967
7135
|
if (ref10 = extractAssignment2(lhsPart[1])) {
|
|
6968
7136
|
const newLhs = ref10;
|
|
@@ -7006,8 +7174,8 @@ function processAssignments(statements) {
|
|
|
7006
7174
|
}
|
|
7007
7175
|
}
|
|
7008
7176
|
}
|
|
7009
|
-
for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"),
|
|
7010
|
-
const exp = ref11[
|
|
7177
|
+
for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len5 = ref11.length; i7 < len5; i7++) {
|
|
7178
|
+
const exp = ref11[i7];
|
|
7011
7179
|
if (!(exp.names === null)) {
|
|
7012
7180
|
continue;
|
|
7013
7181
|
}
|
|
@@ -7244,101 +7412,149 @@ function attachPostfixStatementAsExpression(exp, post) {
|
|
|
7244
7412
|
}
|
|
7245
7413
|
}
|
|
7246
7414
|
function processTypes(node) {
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
}
|
|
7262
|
-
let ref18;
|
|
7263
|
-
while (unary.suffix.length && (ref18 = unary.suffix)[ref18.length - 1]?.type === "NonNullAssertion") {
|
|
7264
|
-
unary.suffix.pop();
|
|
7265
|
-
}
|
|
7266
|
-
let ref19;
|
|
7267
|
-
if (unary.suffix.length || unary.prefix.length)
|
|
7268
|
-
ref19 = unary;
|
|
7269
|
-
else
|
|
7270
|
-
ref19 = unary.t;
|
|
7271
|
-
const t = ref19;
|
|
7272
|
-
if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
|
|
7273
|
-
if (count === 1) {
|
|
7274
|
-
unary.suffix.push(last);
|
|
7275
|
-
return;
|
|
7415
|
+
const results1 = [];
|
|
7416
|
+
for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len6 = ref16.length; i8 < len6; i8++) {
|
|
7417
|
+
const unary = ref16[i8];
|
|
7418
|
+
let suffixIndex = unary.suffix.length - 1;
|
|
7419
|
+
const results2 = [];
|
|
7420
|
+
while (suffixIndex >= 0) {
|
|
7421
|
+
const suffix = unary.suffix[suffixIndex];
|
|
7422
|
+
if (typeof suffix === "object" && suffix != null && "token" in suffix && suffix.token === "?") {
|
|
7423
|
+
const { token } = suffix;
|
|
7424
|
+
let count = 0;
|
|
7425
|
+
let m4;
|
|
7426
|
+
while (m4 = unary.suffix[suffixIndex], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
|
|
7427
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7428
|
+
count++;
|
|
7276
7429
|
}
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7430
|
+
let m5;
|
|
7431
|
+
while (m5 = unary.suffix[suffixIndex], typeof m5 === "object" && m5 != null && "type" in m5 && m5.type === "NonNullAssertion") {
|
|
7432
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7433
|
+
}
|
|
7434
|
+
const { parent, prefix } = unary;
|
|
7435
|
+
unary.prefix = [];
|
|
7436
|
+
unary.children = unary.children.filter((a1) => a1 !== prefix);
|
|
7437
|
+
const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
|
|
7438
|
+
const space = getTrimmingSpace(unary);
|
|
7439
|
+
let replace;
|
|
7440
|
+
if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
|
|
7441
|
+
if (count === 1) {
|
|
7442
|
+
unary.suffix.splice(suffixIndex + 1, 0, suffix);
|
|
7443
|
+
continue;
|
|
7444
|
+
}
|
|
7445
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7446
|
+
const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
|
|
7447
|
+
replace = [
|
|
7448
|
+
space,
|
|
7449
|
+
"(",
|
|
7450
|
+
t,
|
|
7451
|
+
" | null)",
|
|
7452
|
+
suffix
|
|
7453
|
+
];
|
|
7454
|
+
} else {
|
|
7455
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7456
|
+
const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
|
|
7457
|
+
replace = makeNode({
|
|
7458
|
+
type: "TypeParenthesized",
|
|
7459
|
+
ts: true,
|
|
7460
|
+
children: [
|
|
7461
|
+
space,
|
|
7462
|
+
"(",
|
|
7463
|
+
t,
|
|
7464
|
+
count === 1 ? " | undefined" : " | undefined | null",
|
|
7465
|
+
")"
|
|
7466
|
+
]
|
|
7467
|
+
});
|
|
7468
|
+
}
|
|
7469
|
+
if (prefix.length || outer.length) {
|
|
7470
|
+
replace = makeNode({
|
|
7471
|
+
type: "TypeUnary",
|
|
7472
|
+
ts: true,
|
|
7473
|
+
t: replace,
|
|
7474
|
+
prefix,
|
|
7475
|
+
suffix: outer,
|
|
7476
|
+
children: [prefix, replace, outer]
|
|
7477
|
+
});
|
|
7478
|
+
}
|
|
7479
|
+
results2.push(replaceNode(unary, replace, parent));
|
|
7480
|
+
} else if (typeof suffix === "object" && suffix != null && "type" in suffix && suffix.type === "NonNullAssertion") {
|
|
7481
|
+
const { type } = suffix;
|
|
7482
|
+
let m6;
|
|
7483
|
+
while (m6 = unary.suffix[suffixIndex], typeof m6 === "object" && m6 != null && "type" in m6 && m6.type === "NonNullAssertion") {
|
|
7484
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7485
|
+
}
|
|
7486
|
+
let m7;
|
|
7487
|
+
while (m7 = unary.suffix[suffixIndex], typeof m7 === "object" && m7 != null && "token" in m7 && m7.token === "?") {
|
|
7488
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7489
|
+
}
|
|
7490
|
+
const { parent, prefix } = unary;
|
|
7491
|
+
unary.prefix = [];
|
|
7492
|
+
unary.children = unary.children.filter((a2) => a2 !== prefix);
|
|
7493
|
+
const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
|
|
7494
|
+
const space = getTrimmingSpace(unary);
|
|
7495
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7496
|
+
let ref17;
|
|
7497
|
+
if (unary.suffix.length)
|
|
7498
|
+
ref17 = unary;
|
|
7499
|
+
else
|
|
7500
|
+
ref17 = unary.t;
|
|
7501
|
+
const t = ref17;
|
|
7502
|
+
const arg = makeNode({
|
|
7503
|
+
type: "TypeArgument",
|
|
7504
|
+
ts: true,
|
|
7505
|
+
t,
|
|
7506
|
+
children: [t]
|
|
7507
|
+
});
|
|
7508
|
+
const argArray = [arg];
|
|
7509
|
+
const args = makeNode({
|
|
7510
|
+
type: "TypeArguments",
|
|
7287
7511
|
ts: true,
|
|
7512
|
+
args: argArray,
|
|
7513
|
+
children: ["<", argArray, ">"]
|
|
7514
|
+
});
|
|
7515
|
+
let replace = makeNode({
|
|
7516
|
+
type: "TypeIdentifier",
|
|
7517
|
+
raw: "NonNullable",
|
|
7518
|
+
args,
|
|
7288
7519
|
children: [
|
|
7289
|
-
|
|
7290
|
-
"
|
|
7291
|
-
|
|
7292
|
-
count === 1 ? " | undefined" : " | undefined | null",
|
|
7293
|
-
")"
|
|
7520
|
+
space,
|
|
7521
|
+
"NonNullable",
|
|
7522
|
+
args
|
|
7294
7523
|
]
|
|
7295
7524
|
});
|
|
7525
|
+
if (prefix.length || outer.length) {
|
|
7526
|
+
replace = makeNode({
|
|
7527
|
+
type: "TypeUnary",
|
|
7528
|
+
ts: true,
|
|
7529
|
+
t: replace,
|
|
7530
|
+
prefix,
|
|
7531
|
+
suffix: outer,
|
|
7532
|
+
children: [prefix, replace, outer]
|
|
7533
|
+
});
|
|
7534
|
+
}
|
|
7535
|
+
results2.push(replaceNode(unary, replace, parent));
|
|
7536
|
+
} else {
|
|
7537
|
+
results2.push(suffixIndex--);
|
|
7296
7538
|
}
|
|
7297
|
-
} else if (typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "NonNullAssertion") {
|
|
7298
|
-
const { type } = m4;
|
|
7299
|
-
let ref20;
|
|
7300
|
-
while (unary.suffix.length && (ref20 = unary.suffix)[ref20.length - 1]?.type === "NonNullAssertion") {
|
|
7301
|
-
unary.suffix.pop();
|
|
7302
|
-
}
|
|
7303
|
-
let ref21;
|
|
7304
|
-
while (unary.suffix.length && (ref21 = unary.suffix)[ref21.length - 1]?.token === "?") {
|
|
7305
|
-
unary.suffix.pop();
|
|
7306
|
-
}
|
|
7307
|
-
const t = trimFirstSpace(
|
|
7308
|
-
unary.suffix.length || unary.prefix.length ? unary : unary.t
|
|
7309
|
-
);
|
|
7310
|
-
const args = {
|
|
7311
|
-
type: "TypeArguments",
|
|
7312
|
-
ts: true,
|
|
7313
|
-
types: [t],
|
|
7314
|
-
children: ["<", t, ">"]
|
|
7315
|
-
};
|
|
7316
|
-
replaceNode(unary, {
|
|
7317
|
-
type: "TypeIdentifier",
|
|
7318
|
-
raw: "NonNullable",
|
|
7319
|
-
args,
|
|
7320
|
-
children: [
|
|
7321
|
-
getTrimmingSpace(unary),
|
|
7322
|
-
"NonNullable",
|
|
7323
|
-
args
|
|
7324
|
-
]
|
|
7325
|
-
});
|
|
7326
7539
|
}
|
|
7327
|
-
|
|
7540
|
+
results1.push(results2);
|
|
7541
|
+
}
|
|
7542
|
+
;
|
|
7543
|
+
return results1;
|
|
7328
7544
|
}
|
|
7329
7545
|
function processStatementExpressions(statements) {
|
|
7330
|
-
for (let
|
|
7331
|
-
const exp =
|
|
7546
|
+
for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len7 = ref18.length; i9 < len7; i9++) {
|
|
7547
|
+
const exp = ref18[i9];
|
|
7332
7548
|
const { maybe, statement } = exp;
|
|
7333
7549
|
if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
|
|
7334
7550
|
replaceNode(exp, statement);
|
|
7335
7551
|
continue;
|
|
7336
7552
|
}
|
|
7337
|
-
let
|
|
7553
|
+
let ref19;
|
|
7338
7554
|
switch (statement.type) {
|
|
7339
7555
|
case "IfStatement": {
|
|
7340
|
-
if (
|
|
7341
|
-
const expression =
|
|
7556
|
+
if (ref19 = expressionizeIfStatement(statement)) {
|
|
7557
|
+
const expression = ref19;
|
|
7342
7558
|
replaceNode(statement, expression, exp);
|
|
7343
7559
|
} else {
|
|
7344
7560
|
replaceNode(statement, wrapIIFE([["", statement]]), exp);
|
|
@@ -7396,13 +7612,13 @@ function processNegativeIndexAccess(statements) {
|
|
|
7396
7612
|
});
|
|
7397
7613
|
}
|
|
7398
7614
|
function processFinallyClauses(statements) {
|
|
7399
|
-
for (let
|
|
7400
|
-
let f =
|
|
7401
|
-
let
|
|
7402
|
-
if (!((
|
|
7615
|
+
for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len8 = ref20.length; i10 < len8; i10++) {
|
|
7616
|
+
let f = ref20[i10];
|
|
7617
|
+
let ref21;
|
|
7618
|
+
if (!((ref21 = blockContainingStatement(f)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21)) {
|
|
7403
7619
|
throw new Error("finally clause must be inside try statement or block");
|
|
7404
7620
|
}
|
|
7405
|
-
const { block, index } =
|
|
7621
|
+
const { block, index } = ref21;
|
|
7406
7622
|
const indent = block.expressions[index][0];
|
|
7407
7623
|
const expressions = block.expressions.slice(index + 1);
|
|
7408
7624
|
const t = makeNode({
|
|
@@ -7439,7 +7655,7 @@ function processProgram(root) {
|
|
|
7439
7655
|
if (config2.iife || config2.repl) {
|
|
7440
7656
|
rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
|
|
7441
7657
|
const newExpressions = [["", rootIIFE]];
|
|
7442
|
-
root.children = root.children.map(($
|
|
7658
|
+
root.children = root.children.map(($13) => $13 === root.expressions ? newExpressions : $13);
|
|
7443
7659
|
root.expressions = newExpressions;
|
|
7444
7660
|
}
|
|
7445
7661
|
addParentPointers(root);
|
|
@@ -7480,10 +7696,10 @@ async function processProgramAsync(root) {
|
|
|
7480
7696
|
await processComptime(statements);
|
|
7481
7697
|
}
|
|
7482
7698
|
function processRepl(root, rootIIFE) {
|
|
7483
|
-
const topBlock = gatherRecursive(rootIIFE, ($
|
|
7699
|
+
const topBlock = gatherRecursive(rootIIFE, ($14) => $14.type === "BlockStatement")[0];
|
|
7484
7700
|
let i = 0;
|
|
7485
|
-
for (let
|
|
7486
|
-
const decl =
|
|
7701
|
+
for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($15) => $15.type === "Declaration"), i11 = 0, len9 = ref22.length; i11 < len9; i11++) {
|
|
7702
|
+
const decl = ref22[i11];
|
|
7487
7703
|
if (!decl.names?.length) {
|
|
7488
7704
|
continue;
|
|
7489
7705
|
}
|
|
@@ -7496,8 +7712,8 @@ function processRepl(root, rootIIFE) {
|
|
|
7496
7712
|
root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]);
|
|
7497
7713
|
}
|
|
7498
7714
|
}
|
|
7499
|
-
for (let
|
|
7500
|
-
const func =
|
|
7715
|
+
for (let ref23 = gatherRecursive(topBlock, ($16) => $16.type === "FunctionExpression"), i12 = 0, len10 = ref23.length; i12 < len10; i12++) {
|
|
7716
|
+
const func = ref23[i12];
|
|
7501
7717
|
if (func.name && func.parent?.type === "BlockStatement") {
|
|
7502
7718
|
if (func.parent === topBlock) {
|
|
7503
7719
|
replaceNode(func, void 0);
|
|
@@ -7509,17 +7725,17 @@ function processRepl(root, rootIIFE) {
|
|
|
7509
7725
|
}
|
|
7510
7726
|
}
|
|
7511
7727
|
}
|
|
7512
|
-
for (let
|
|
7513
|
-
const classExp =
|
|
7514
|
-
let
|
|
7515
|
-
if (classExp.name && classExp.parent === topBlock || (
|
|
7728
|
+
for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($17) => $17.type === "ClassExpression"), i13 = 0, len11 = ref24.length; i13 < len11; i13++) {
|
|
7729
|
+
const classExp = ref24[i13];
|
|
7730
|
+
let m8;
|
|
7731
|
+
if (classExp.name && classExp.parent === topBlock || (m8 = classExp.parent, typeof m8 === "object" && m8 != null && "type" in m8 && m8.type === "ReturnStatement" && "parent" in m8 && m8.parent === topBlock)) {
|
|
7516
7732
|
classExp.children.unshift(classExp.name, "=");
|
|
7517
7733
|
root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]);
|
|
7518
7734
|
}
|
|
7519
7735
|
}
|
|
7520
7736
|
}
|
|
7521
7737
|
function populateRefs(statements) {
|
|
7522
|
-
const refNodes = gatherRecursive(statements, ($
|
|
7738
|
+
const refNodes = gatherRecursive(statements, ($18) => $18.type === "Ref");
|
|
7523
7739
|
if (refNodes.length) {
|
|
7524
7740
|
const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
|
|
7525
7741
|
const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
|
|
@@ -7542,8 +7758,8 @@ function populateRefs(statements) {
|
|
|
7542
7758
|
function processPlaceholders(statements) {
|
|
7543
7759
|
const placeholderMap = /* @__PURE__ */ new Map();
|
|
7544
7760
|
const liftedIfs = /* @__PURE__ */ new Set();
|
|
7545
|
-
for (let
|
|
7546
|
-
const exp =
|
|
7761
|
+
for (let ref25 = gatherRecursiveAll(statements, ($19) => $19.type === "Placeholder"), i14 = 0, len12 = ref25.length; i14 < len12; i14++) {
|
|
7762
|
+
const exp = ref25[i14];
|
|
7547
7763
|
let ancestor;
|
|
7548
7764
|
if (exp.subtype === ".") {
|
|
7549
7765
|
({ ancestor } = findAncestor(
|
|
@@ -7551,8 +7767,8 @@ function processPlaceholders(statements) {
|
|
|
7551
7767
|
($) => $.type === "Call" && !$.parent?.implicit
|
|
7552
7768
|
));
|
|
7553
7769
|
ancestor = ancestor?.parent;
|
|
7554
|
-
let
|
|
7555
|
-
while (ancestor?.parent != null && (
|
|
7770
|
+
let m9;
|
|
7771
|
+
while (ancestor?.parent != null && (m9 = ancestor.parent.type, m9 === "UnaryExpression" || m9 === "NewExpression" || m9 === "AwaitExpression" || m9 === "ThrowStatement" || m9 === "StatementExpression")) {
|
|
7556
7772
|
ancestor = ancestor.parent;
|
|
7557
7773
|
}
|
|
7558
7774
|
if (!ancestor) {
|
|
@@ -7569,10 +7785,10 @@ function processPlaceholders(statements) {
|
|
|
7569
7785
|
if (type === "IfStatement") {
|
|
7570
7786
|
liftedIfs.add(ancestor2);
|
|
7571
7787
|
}
|
|
7572
|
-
let
|
|
7573
|
-
let
|
|
7788
|
+
let m10;
|
|
7789
|
+
let m11;
|
|
7574
7790
|
return type === "Call" && !ancestor2.parent?.implicit || // Block, except for if/else blocks when condition already lifted
|
|
7575
|
-
type === "BlockStatement" && !((
|
|
7791
|
+
type === "BlockStatement" && !((m10 = ancestor2.parent, typeof m10 === "object" && m10 != null && "type" in m10 && m10.type === "IfStatement") && liftedIfs.has(ancestor2.parent)) && !((m11 = ancestor2.parent, typeof m11 === "object" && m11 != null && "type" in m11 && m11.type === "ElseClause" && "parent" in m11 && typeof m11.parent === "object" && m11.parent != null && "type" in m11.parent && m11.parent.type === "IfStatement") && liftedIfs.has(ancestor2.parent.parent)) || type === "PipelineExpression" || // Declaration
|
|
7576
7792
|
type === "Initializer" || // Right-hand side of assignment
|
|
7577
7793
|
type === "AssignmentExpression" && findChildIndex(ancestor2, child2) === ancestor2.children.indexOf(ancestor2.expression) || type === "ReturnStatement" || type === "YieldExpression";
|
|
7578
7794
|
}));
|
|
@@ -7646,11 +7862,11 @@ function processPlaceholders(statements) {
|
|
|
7646
7862
|
for (const [ancestor, placeholders] of placeholderMap) {
|
|
7647
7863
|
let ref = makeRef("$");
|
|
7648
7864
|
let typeSuffix;
|
|
7649
|
-
for (let
|
|
7650
|
-
const placeholder = placeholders[
|
|
7865
|
+
for (let i15 = 0, len13 = placeholders.length; i15 < len13; i15++) {
|
|
7866
|
+
const placeholder = placeholders[i15];
|
|
7651
7867
|
typeSuffix ??= placeholder.typeSuffix;
|
|
7652
|
-
let
|
|
7653
|
-
replaceNode((
|
|
7868
|
+
let ref26;
|
|
7869
|
+
replaceNode((ref26 = placeholder.children)[ref26.length - 1], ref);
|
|
7654
7870
|
}
|
|
7655
7871
|
const { parent } = ancestor;
|
|
7656
7872
|
const body = maybeUnwrap(ancestor);
|
|
@@ -7671,16 +7887,16 @@ function processPlaceholders(statements) {
|
|
|
7671
7887
|
}
|
|
7672
7888
|
case "PipelineExpression": {
|
|
7673
7889
|
const i = findChildIndex(parent, ancestor);
|
|
7674
|
-
let
|
|
7890
|
+
let ref27;
|
|
7675
7891
|
if (i === 1) {
|
|
7676
|
-
|
|
7892
|
+
ref27 = ancestor === parent.children[i];
|
|
7677
7893
|
} else if (i === 2) {
|
|
7678
|
-
|
|
7894
|
+
ref27 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
|
|
7679
7895
|
} else {
|
|
7680
|
-
|
|
7896
|
+
ref27 = void 0;
|
|
7681
7897
|
}
|
|
7682
7898
|
;
|
|
7683
|
-
outer =
|
|
7899
|
+
outer = ref27;
|
|
7684
7900
|
break;
|
|
7685
7901
|
}
|
|
7686
7902
|
case "AssignmentExpression":
|
|
@@ -7695,9 +7911,9 @@ function processPlaceholders(statements) {
|
|
|
7695
7911
|
fnExp = makeLeftHandSideExpression(fnExp);
|
|
7696
7912
|
}
|
|
7697
7913
|
replaceNode(ancestor, fnExp, parent);
|
|
7698
|
-
let
|
|
7699
|
-
if (
|
|
7700
|
-
const ws =
|
|
7914
|
+
let ref28;
|
|
7915
|
+
if (ref28 = getTrimmingSpace(body)) {
|
|
7916
|
+
const ws = ref28;
|
|
7701
7917
|
inplaceInsertTrimmingSpace(body, "");
|
|
7702
7918
|
inplacePrepend(ws, fnExp);
|
|
7703
7919
|
}
|
|
@@ -7742,8 +7958,8 @@ function reorderBindingRestProperty(props) {
|
|
|
7742
7958
|
}
|
|
7743
7959
|
];
|
|
7744
7960
|
}
|
|
7745
|
-
let
|
|
7746
|
-
if (Array.isArray(rest.delim) && (
|
|
7961
|
+
let ref29;
|
|
7962
|
+
if (Array.isArray(rest.delim) && (ref29 = rest.delim)[ref29.length - 1]?.token === ",") {
|
|
7747
7963
|
rest.delim = rest.delim.slice(0, -1);
|
|
7748
7964
|
rest.children = [...rest.children.slice(0, -1), rest.delim];
|
|
7749
7965
|
}
|
|
@@ -7840,11 +8056,7 @@ var grammar = {
|
|
|
7840
8056
|
ApplicationStart,
|
|
7841
8057
|
ForbiddenImplicitCalls,
|
|
7842
8058
|
ReservedBinary,
|
|
7843
|
-
|
|
7844
|
-
TrailingMemberExpressions,
|
|
7845
|
-
IndentedTrailingMemberExpressions,
|
|
7846
|
-
NestedTrailingMemberExpression,
|
|
7847
|
-
AllowedTrailingMemberExpressions,
|
|
8059
|
+
ArgumentsWithTrailingCallExpressions,
|
|
7848
8060
|
TrailingCallExpressions,
|
|
7849
8061
|
IndentedTrailingCallExpressions,
|
|
7850
8062
|
NestedTrailingCallExpression,
|
|
@@ -7959,6 +8171,7 @@ var grammar = {
|
|
|
7959
8171
|
ImplicitAccessStart,
|
|
7960
8172
|
PropertyAccessModifier,
|
|
7961
8173
|
PropertyAccess,
|
|
8174
|
+
ExplicitPropertyGlob,
|
|
7962
8175
|
PropertyGlob,
|
|
7963
8176
|
PropertyBind,
|
|
7964
8177
|
SuperProperty,
|
|
@@ -8781,125 +8994,126 @@ var $L123 = (0, import_lib2.$L)("sum");
|
|
|
8781
8994
|
var $L124 = (0, import_lib2.$L)("product");
|
|
8782
8995
|
var $L125 = (0, import_lib2.$L)("min");
|
|
8783
8996
|
var $L126 = (0, import_lib2.$L)("max");
|
|
8784
|
-
var $L127 = (0, import_lib2.$L)("
|
|
8785
|
-
var $L128 = (0, import_lib2.$L)("
|
|
8786
|
-
var $L129 = (0, import_lib2.$L)("
|
|
8787
|
-
var $L130 = (0, import_lib2.$L)("
|
|
8788
|
-
var $L131 = (0, import_lib2.$L)("
|
|
8789
|
-
var $L132 = (0, import_lib2.$L)("
|
|
8790
|
-
var $L133 = (0, import_lib2.$L)("
|
|
8791
|
-
var $L134 = (0, import_lib2.$L)("
|
|
8792
|
-
var $L135 = (0, import_lib2.$L)("
|
|
8793
|
-
var $L136 = (0, import_lib2.$L)("
|
|
8794
|
-
var $L137 = (0, import_lib2.$L)("
|
|
8795
|
-
var $L138 = (0, import_lib2.$L)("
|
|
8796
|
-
var $L139 = (0, import_lib2.$L)("
|
|
8797
|
-
var $L140 = (0, import_lib2.$L)("
|
|
8798
|
-
var $L141 = (0, import_lib2.$L)("
|
|
8799
|
-
var $L142 = (0, import_lib2.$L)("
|
|
8800
|
-
var $L143 = (0, import_lib2.$L)("
|
|
8801
|
-
var $L144 = (0, import_lib2.$L)("
|
|
8802
|
-
var $L145 = (0, import_lib2.$L)("
|
|
8803
|
-
var $L146 = (0, import_lib2.$L)("
|
|
8804
|
-
var $L147 = (0, import_lib2.$L)("
|
|
8805
|
-
var $L148 = (0, import_lib2.$L)("
|
|
8806
|
-
var $L149 = (0, import_lib2.$L)("
|
|
8807
|
-
var $L150 = (0, import_lib2.$L)("
|
|
8808
|
-
var $L151 = (0, import_lib2.$L)("
|
|
8809
|
-
var $L152 = (0, import_lib2.$L)("
|
|
8810
|
-
var $L153 = (0, import_lib2.$L)("
|
|
8811
|
-
var $L154 = (0, import_lib2.$L)("
|
|
8812
|
-
var $L155 = (0, import_lib2.$L)("
|
|
8813
|
-
var $L156 = (0, import_lib2.$L)("
|
|
8814
|
-
var $L157 = (0, import_lib2.$L)("
|
|
8815
|
-
var $L158 = (0, import_lib2.$L)("
|
|
8816
|
-
var $L159 = (0, import_lib2.$L)("
|
|
8817
|
-
var $L160 = (0, import_lib2.$L)("
|
|
8818
|
-
var $L161 = (0, import_lib2.$L)("
|
|
8819
|
-
var $L162 = (0, import_lib2.$L)("
|
|
8820
|
-
var $L163 = (0, import_lib2.$L)(
|
|
8821
|
-
var $L164 = (0, import_lib2.$L)("
|
|
8822
|
-
var $L165 = (0, import_lib2.$L)("
|
|
8823
|
-
var $L166 = (0, import_lib2.$L)("
|
|
8824
|
-
var $L167 = (0, import_lib2.$L)("
|
|
8825
|
-
var $L168 = (0, import_lib2.$L)("
|
|
8826
|
-
var $L169 = (0, import_lib2.$L)("
|
|
8827
|
-
var $L170 = (0, import_lib2.$L)("
|
|
8828
|
-
var $L171 = (0, import_lib2.$L)("
|
|
8829
|
-
var $L172 = (0, import_lib2.$L)("
|
|
8830
|
-
var $L173 = (0, import_lib2.$L)("
|
|
8831
|
-
var $L174 = (0, import_lib2.$L)("
|
|
8832
|
-
var $L175 = (0, import_lib2.$L)("
|
|
8833
|
-
var $L176 = (0, import_lib2.$L)("
|
|
8834
|
-
var $L177 = (0, import_lib2.$L)("
|
|
8835
|
-
var $L178 = (0, import_lib2.$L)("
|
|
8836
|
-
var $L179 = (0, import_lib2.$L)("
|
|
8837
|
-
var $L180 = (0, import_lib2.$L)("
|
|
8838
|
-
var $L181 = (0, import_lib2.$L)("
|
|
8839
|
-
var $L182 = (0, import_lib2.$L)("
|
|
8840
|
-
var $L183 = (0, import_lib2.$L)("
|
|
8841
|
-
var $L184 = (0, import_lib2.$L)("
|
|
8842
|
-
var $L185 = (0, import_lib2.$L)("
|
|
8843
|
-
var $L186 = (0, import_lib2.$L)("
|
|
8844
|
-
var $L187 = (0, import_lib2.$L)("
|
|
8845
|
-
var $L188 = (0, import_lib2.$L)("
|
|
8846
|
-
var $L189 = (0, import_lib2.$L)("
|
|
8847
|
-
var $L190 = (0, import_lib2.$L)("
|
|
8848
|
-
var $L191 = (0, import_lib2.$L)("
|
|
8849
|
-
var $L192 = (0, import_lib2.$L)("
|
|
8850
|
-
var $L193 = (0, import_lib2.$L)("
|
|
8851
|
-
var $L194 = (0, import_lib2.$L)("
|
|
8852
|
-
var $L195 = (0, import_lib2.$L)("
|
|
8853
|
-
var $L196 = (0, import_lib2.$L)("
|
|
8854
|
-
var $L197 = (0, import_lib2.$L)("
|
|
8855
|
-
var $L198 = (0, import_lib2.$L)("
|
|
8856
|
-
var $L199 = (0, import_lib2.$L)("
|
|
8857
|
-
var $L200 = (0, import_lib2.$L)("
|
|
8858
|
-
var $L201 = (0, import_lib2.$L)("
|
|
8859
|
-
var $L202 = (0, import_lib2.$L)("
|
|
8860
|
-
var $L203 = (0, import_lib2.$L)("
|
|
8861
|
-
var $L204 = (0, import_lib2.$L)("
|
|
8862
|
-
var $L205 = (0, import_lib2.$L)("
|
|
8863
|
-
var $L206 = (0, import_lib2.$L)("
|
|
8864
|
-
var $L207 = (0, import_lib2.$L)("
|
|
8865
|
-
var $L208 = (0, import_lib2.$L)("
|
|
8866
|
-
var $L209 = (0, import_lib2.$L)("
|
|
8867
|
-
var $L210 = (0, import_lib2.$L)("
|
|
8868
|
-
var $L211 = (0, import_lib2.$L)("
|
|
8869
|
-
var $L212 = (0, import_lib2.$L)("
|
|
8870
|
-
var $L213 = (0, import_lib2.$L)(
|
|
8871
|
-
var $L214 = (0, import_lib2.$L)("'
|
|
8872
|
-
var $L215 = (0, import_lib2.$L)("
|
|
8873
|
-
var $L216 = (0, import_lib2.$L)("
|
|
8874
|
-
var $L217 = (0, import_lib2.$L)("
|
|
8875
|
-
var $L218 = (0, import_lib2.$L)("
|
|
8876
|
-
var $L219 = (0, import_lib2.$L)("
|
|
8877
|
-
var $L220 = (0, import_lib2.$L)("
|
|
8878
|
-
var $L221 = (0, import_lib2.$L)("
|
|
8879
|
-
var $L222 = (0, import_lib2.$L)("
|
|
8880
|
-
var $L223 = (0, import_lib2.$L)("
|
|
8881
|
-
var $L224 = (0, import_lib2.$L)("
|
|
8882
|
-
var $L225 = (0, import_lib2.$L)("
|
|
8883
|
-
var $L226 = (0, import_lib2.$L)("
|
|
8884
|
-
var $L227 = (0, import_lib2.$L)("
|
|
8885
|
-
var $L228 = (0, import_lib2.$L)("
|
|
8886
|
-
var $L229 = (0, import_lib2.$L)("
|
|
8887
|
-
var $L230 = (0, import_lib2.$L)("
|
|
8888
|
-
var $L231 = (0, import_lib2.$L)("
|
|
8889
|
-
var $L232 = (0, import_lib2.$L)("
|
|
8890
|
-
var $L233 = (0, import_lib2.$L)("
|
|
8891
|
-
var $L234 = (0, import_lib2.$L)("
|
|
8892
|
-
var $L235 = (0, import_lib2.$L)("
|
|
8893
|
-
var $L236 = (0, import_lib2.$L)("
|
|
8894
|
-
var $L237 = (0, import_lib2.$L)("
|
|
8895
|
-
var $L238 = (0, import_lib2.$L)("
|
|
8896
|
-
var $L239 = (0, import_lib2.$L)("
|
|
8897
|
-
var $L240 = (0, import_lib2.$L)("
|
|
8898
|
-
var $L241 = (0, import_lib2.$L)("
|
|
8899
|
-
var $L242 = (0, import_lib2.$L)("
|
|
8900
|
-
var $L243 = (0, import_lib2.$L)("
|
|
8901
|
-
var $L244 = (0, import_lib2.$L)("
|
|
8902
|
-
var $L245 = (0, import_lib2.$L)("
|
|
8997
|
+
var $L127 = (0, import_lib2.$L)("join");
|
|
8998
|
+
var $L128 = (0, import_lib2.$L)("break");
|
|
8999
|
+
var $L129 = (0, import_lib2.$L)("continue");
|
|
9000
|
+
var $L130 = (0, import_lib2.$L)("debugger");
|
|
9001
|
+
var $L131 = (0, import_lib2.$L)("require");
|
|
9002
|
+
var $L132 = (0, import_lib2.$L)("with");
|
|
9003
|
+
var $L133 = (0, import_lib2.$L)("assert");
|
|
9004
|
+
var $L134 = (0, import_lib2.$L)(":=");
|
|
9005
|
+
var $L135 = (0, import_lib2.$L)("\u2254");
|
|
9006
|
+
var $L136 = (0, import_lib2.$L)(".=");
|
|
9007
|
+
var $L137 = (0, import_lib2.$L)("::=");
|
|
9008
|
+
var $L138 = (0, import_lib2.$L)("/*");
|
|
9009
|
+
var $L139 = (0, import_lib2.$L)("*/");
|
|
9010
|
+
var $L140 = (0, import_lib2.$L)("\\");
|
|
9011
|
+
var $L141 = (0, import_lib2.$L)(")");
|
|
9012
|
+
var $L142 = (0, import_lib2.$L)("abstract");
|
|
9013
|
+
var $L143 = (0, import_lib2.$L)("as");
|
|
9014
|
+
var $L144 = (0, import_lib2.$L)("@");
|
|
9015
|
+
var $L145 = (0, import_lib2.$L)("@@");
|
|
9016
|
+
var $L146 = (0, import_lib2.$L)("async");
|
|
9017
|
+
var $L147 = (0, import_lib2.$L)("await");
|
|
9018
|
+
var $L148 = (0, import_lib2.$L)("`");
|
|
9019
|
+
var $L149 = (0, import_lib2.$L)("by");
|
|
9020
|
+
var $L150 = (0, import_lib2.$L)("case");
|
|
9021
|
+
var $L151 = (0, import_lib2.$L)("catch");
|
|
9022
|
+
var $L152 = (0, import_lib2.$L)("class");
|
|
9023
|
+
var $L153 = (0, import_lib2.$L)("#{");
|
|
9024
|
+
var $L154 = (0, import_lib2.$L)("comptime");
|
|
9025
|
+
var $L155 = (0, import_lib2.$L)("declare");
|
|
9026
|
+
var $L156 = (0, import_lib2.$L)("default");
|
|
9027
|
+
var $L157 = (0, import_lib2.$L)("delete");
|
|
9028
|
+
var $L158 = (0, import_lib2.$L)("do");
|
|
9029
|
+
var $L159 = (0, import_lib2.$L)("..");
|
|
9030
|
+
var $L160 = (0, import_lib2.$L)("\u2025");
|
|
9031
|
+
var $L161 = (0, import_lib2.$L)("...");
|
|
9032
|
+
var $L162 = (0, import_lib2.$L)("\u2026");
|
|
9033
|
+
var $L163 = (0, import_lib2.$L)("::");
|
|
9034
|
+
var $L164 = (0, import_lib2.$L)('"');
|
|
9035
|
+
var $L165 = (0, import_lib2.$L)("each");
|
|
9036
|
+
var $L166 = (0, import_lib2.$L)("else");
|
|
9037
|
+
var $L167 = (0, import_lib2.$L)("!");
|
|
9038
|
+
var $L168 = (0, import_lib2.$L)("export");
|
|
9039
|
+
var $L169 = (0, import_lib2.$L)("extends");
|
|
9040
|
+
var $L170 = (0, import_lib2.$L)("finally");
|
|
9041
|
+
var $L171 = (0, import_lib2.$L)("for");
|
|
9042
|
+
var $L172 = (0, import_lib2.$L)("from");
|
|
9043
|
+
var $L173 = (0, import_lib2.$L)("function");
|
|
9044
|
+
var $L174 = (0, import_lib2.$L)("get");
|
|
9045
|
+
var $L175 = (0, import_lib2.$L)("set");
|
|
9046
|
+
var $L176 = (0, import_lib2.$L)("#");
|
|
9047
|
+
var $L177 = (0, import_lib2.$L)("if");
|
|
9048
|
+
var $L178 = (0, import_lib2.$L)("in");
|
|
9049
|
+
var $L179 = (0, import_lib2.$L)("infer");
|
|
9050
|
+
var $L180 = (0, import_lib2.$L)("let");
|
|
9051
|
+
var $L181 = (0, import_lib2.$L)("const");
|
|
9052
|
+
var $L182 = (0, import_lib2.$L)("is");
|
|
9053
|
+
var $L183 = (0, import_lib2.$L)("var");
|
|
9054
|
+
var $L184 = (0, import_lib2.$L)("like");
|
|
9055
|
+
var $L185 = (0, import_lib2.$L)("loop");
|
|
9056
|
+
var $L186 = (0, import_lib2.$L)("new");
|
|
9057
|
+
var $L187 = (0, import_lib2.$L)("not");
|
|
9058
|
+
var $L188 = (0, import_lib2.$L)("of");
|
|
9059
|
+
var $L189 = (0, import_lib2.$L)("[");
|
|
9060
|
+
var $L190 = (0, import_lib2.$L)("operator");
|
|
9061
|
+
var $L191 = (0, import_lib2.$L)("override");
|
|
9062
|
+
var $L192 = (0, import_lib2.$L)("own");
|
|
9063
|
+
var $L193 = (0, import_lib2.$L)("public");
|
|
9064
|
+
var $L194 = (0, import_lib2.$L)("private");
|
|
9065
|
+
var $L195 = (0, import_lib2.$L)("protected");
|
|
9066
|
+
var $L196 = (0, import_lib2.$L)("||>");
|
|
9067
|
+
var $L197 = (0, import_lib2.$L)("|\u25B7");
|
|
9068
|
+
var $L198 = (0, import_lib2.$L)("|>=");
|
|
9069
|
+
var $L199 = (0, import_lib2.$L)("\u25B7=");
|
|
9070
|
+
var $L200 = (0, import_lib2.$L)("|>");
|
|
9071
|
+
var $L201 = (0, import_lib2.$L)("\u25B7");
|
|
9072
|
+
var $L202 = (0, import_lib2.$L)("readonly");
|
|
9073
|
+
var $L203 = (0, import_lib2.$L)("return");
|
|
9074
|
+
var $L204 = (0, import_lib2.$L)("satisfies");
|
|
9075
|
+
var $L205 = (0, import_lib2.$L)("'");
|
|
9076
|
+
var $L206 = (0, import_lib2.$L)("static");
|
|
9077
|
+
var $L207 = (0, import_lib2.$L)("${");
|
|
9078
|
+
var $L208 = (0, import_lib2.$L)("super");
|
|
9079
|
+
var $L209 = (0, import_lib2.$L)("switch");
|
|
9080
|
+
var $L210 = (0, import_lib2.$L)("target");
|
|
9081
|
+
var $L211 = (0, import_lib2.$L)("then");
|
|
9082
|
+
var $L212 = (0, import_lib2.$L)("this");
|
|
9083
|
+
var $L213 = (0, import_lib2.$L)("throw");
|
|
9084
|
+
var $L214 = (0, import_lib2.$L)('"""');
|
|
9085
|
+
var $L215 = (0, import_lib2.$L)("'''");
|
|
9086
|
+
var $L216 = (0, import_lib2.$L)("///");
|
|
9087
|
+
var $L217 = (0, import_lib2.$L)("```");
|
|
9088
|
+
var $L218 = (0, import_lib2.$L)("try");
|
|
9089
|
+
var $L219 = (0, import_lib2.$L)("typeof");
|
|
9090
|
+
var $L220 = (0, import_lib2.$L)("undefined");
|
|
9091
|
+
var $L221 = (0, import_lib2.$L)("unless");
|
|
9092
|
+
var $L222 = (0, import_lib2.$L)("until");
|
|
9093
|
+
var $L223 = (0, import_lib2.$L)("using");
|
|
9094
|
+
var $L224 = (0, import_lib2.$L)("void");
|
|
9095
|
+
var $L225 = (0, import_lib2.$L)("when");
|
|
9096
|
+
var $L226 = (0, import_lib2.$L)("while");
|
|
9097
|
+
var $L227 = (0, import_lib2.$L)("yield");
|
|
9098
|
+
var $L228 = (0, import_lib2.$L)("/>");
|
|
9099
|
+
var $L229 = (0, import_lib2.$L)("</");
|
|
9100
|
+
var $L230 = (0, import_lib2.$L)("<>");
|
|
9101
|
+
var $L231 = (0, import_lib2.$L)("</>");
|
|
9102
|
+
var $L232 = (0, import_lib2.$L)("<!--");
|
|
9103
|
+
var $L233 = (0, import_lib2.$L)("-->");
|
|
9104
|
+
var $L234 = (0, import_lib2.$L)("type");
|
|
9105
|
+
var $L235 = (0, import_lib2.$L)("enum");
|
|
9106
|
+
var $L236 = (0, import_lib2.$L)("interface");
|
|
9107
|
+
var $L237 = (0, import_lib2.$L)("global");
|
|
9108
|
+
var $L238 = (0, import_lib2.$L)("module");
|
|
9109
|
+
var $L239 = (0, import_lib2.$L)("namespace");
|
|
9110
|
+
var $L240 = (0, import_lib2.$L)("asserts");
|
|
9111
|
+
var $L241 = (0, import_lib2.$L)("keyof");
|
|
9112
|
+
var $L242 = (0, import_lib2.$L)("???");
|
|
9113
|
+
var $L243 = (0, import_lib2.$L)("unique");
|
|
9114
|
+
var $L244 = (0, import_lib2.$L)("symbol");
|
|
9115
|
+
var $L245 = (0, import_lib2.$L)("[]");
|
|
9116
|
+
var $L246 = (0, import_lib2.$L)("civet");
|
|
8903
9117
|
var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
|
|
8904
9118
|
var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
|
|
8905
9119
|
var $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
@@ -9198,7 +9412,7 @@ var ExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, Al
|
|
|
9198
9412
|
function ExplicitArguments(ctx, state2) {
|
|
9199
9413
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitArguments", ExplicitArguments$0);
|
|
9200
9414
|
}
|
|
9201
|
-
var ApplicationStart$0 = (0, import_lib2.$S)(IndentedApplicationAllowed, (0, import_lib2.$Y)((0, import_lib2.$S)(IndentedFurther, (0, import_lib2.$N)(IdentifierBinaryOp), (0, import_lib2.$N)(ReservedBinary))), (0, import_lib2.$N)(
|
|
9415
|
+
var ApplicationStart$0 = (0, import_lib2.$S)(IndentedApplicationAllowed, (0, import_lib2.$Y)((0, import_lib2.$S)(IndentedFurther, (0, import_lib2.$N)(IdentifierBinaryOp), (0, import_lib2.$N)(ReservedBinary))), (0, import_lib2.$N)(IndentedTrailingCallExpressions));
|
|
9202
9416
|
var ApplicationStart$1 = (0, import_lib2.$S)((0, import_lib2.$N)(EOS), (0, import_lib2.$Y)((0, import_lib2.$S)(_, (0, import_lib2.$C)(BracedApplicationAllowed, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L1, 'ApplicationStart "{"'))), (0, import_lib2.$N)(ForbiddenImplicitCalls))));
|
|
9203
9417
|
var ApplicationStart$$ = [ApplicationStart$0, ApplicationStart$1];
|
|
9204
9418
|
function ApplicationStart(ctx, state2) {
|
|
@@ -9231,52 +9445,16 @@ var ReservedBinary$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R2, "Rese
|
|
|
9231
9445
|
function ReservedBinary(ctx, state2) {
|
|
9232
9446
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReservedBinary", ReservedBinary$0);
|
|
9233
9447
|
}
|
|
9234
|
-
var
|
|
9448
|
+
var ArgumentsWithTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9235
9449
|
var args = $1;
|
|
9236
9450
|
var trailing = $2;
|
|
9237
|
-
return [args, ...trailing];
|
|
9451
|
+
return [args, ...trailing ?? []];
|
|
9238
9452
|
});
|
|
9239
|
-
function
|
|
9240
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "
|
|
9241
|
-
}
|
|
9242
|
-
var TrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(MemberExpressionRest), (0, import_lib2.$E)(IndentedTrailingMemberExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9243
|
-
if (!$2)
|
|
9244
|
-
return $1;
|
|
9245
|
-
return [...$1, ...$2];
|
|
9246
|
-
});
|
|
9247
|
-
function TrailingMemberExpressions(ctx, state2) {
|
|
9248
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "TrailingMemberExpressions", TrailingMemberExpressions$0);
|
|
9249
|
-
}
|
|
9250
|
-
var IndentedTrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedTrailingMemberExpression), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
9251
|
-
if (!$2.length)
|
|
9252
|
-
return $skip;
|
|
9253
|
-
return $2.flat();
|
|
9254
|
-
});
|
|
9255
|
-
var IndentedTrailingMemberExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingMemberExpression), function($skip, $loc, $0, $1) {
|
|
9256
|
-
return $1.flat();
|
|
9257
|
-
});
|
|
9258
|
-
var IndentedTrailingMemberExpressions$$ = [IndentedTrailingMemberExpressions$0, IndentedTrailingMemberExpressions$1];
|
|
9259
|
-
function IndentedTrailingMemberExpressions(ctx, state2) {
|
|
9260
|
-
return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingMemberExpressions", IndentedTrailingMemberExpressions$$);
|
|
9261
|
-
}
|
|
9262
|
-
var NestedTrailingMemberExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Nested, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$EXPECT)($L6, 'NestedTrailingMemberExpression "?"')), (0, import_lib2.$EXPECT)($L7, 'NestedTrailingMemberExpression "."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R3, "NestedTrailingMemberExpression /[0-9]/")))), (0, import_lib2.$P)(MemberExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
9263
|
-
var ws = $1;
|
|
9264
|
-
var rests = $3;
|
|
9265
|
-
const [first, ...rest] = rests;
|
|
9266
|
-
return [prepend(ws, first), ...rest];
|
|
9267
|
-
});
|
|
9268
|
-
function NestedTrailingMemberExpression(ctx, state2) {
|
|
9269
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingMemberExpression", NestedTrailingMemberExpression$0);
|
|
9270
|
-
}
|
|
9271
|
-
var AllowedTrailingMemberExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingMemberExpressions), function(value) {
|
|
9272
|
-
return value[1];
|
|
9273
|
-
});
|
|
9274
|
-
var AllowedTrailingMemberExpressions$1 = (0, import_lib2.$Q)(MemberExpressionRest);
|
|
9275
|
-
var AllowedTrailingMemberExpressions$$ = [AllowedTrailingMemberExpressions$0, AllowedTrailingMemberExpressions$1];
|
|
9276
|
-
function AllowedTrailingMemberExpressions(ctx, state2) {
|
|
9277
|
-
return (0, import_lib2.$EVENT_C)(ctx, state2, "AllowedTrailingMemberExpressions", AllowedTrailingMemberExpressions$$);
|
|
9453
|
+
function ArgumentsWithTrailingCallExpressions(ctx, state2) {
|
|
9454
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingCallExpressions", ArgumentsWithTrailingCallExpressions$0);
|
|
9278
9455
|
}
|
|
9279
9456
|
var TrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(IndentedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9457
|
+
$1 = $1.flat();
|
|
9280
9458
|
if (!$1.length && !$2)
|
|
9281
9459
|
return $skip;
|
|
9282
9460
|
if (!$2)
|
|
@@ -10495,7 +10673,7 @@ var LeftHandSideExpression$$ = [LeftHandSideExpression$0, LeftHandSideExpression
|
|
|
10495
10673
|
function LeftHandSideExpression(ctx, state2) {
|
|
10496
10674
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LeftHandSideExpression", LeftHandSideExpression$$);
|
|
10497
10675
|
}
|
|
10498
|
-
var CallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Super,
|
|
10676
|
+
var CallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Super, ArgumentsWithTrailingCallExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
10499
10677
|
var rest = $3;
|
|
10500
10678
|
return processCallMemberExpression({
|
|
10501
10679
|
type: "CallExpression",
|
|
@@ -10513,7 +10691,7 @@ var CallExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __,
|
|
|
10513
10691
|
var imports = $5;
|
|
10514
10692
|
return dynamizeImportDeclarationExpression([i, iws, imports, fws, from]);
|
|
10515
10693
|
});
|
|
10516
|
-
var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'),
|
|
10694
|
+
var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
10517
10695
|
var rest = $3;
|
|
10518
10696
|
return processCallMemberExpression({
|
|
10519
10697
|
type: "CallExpression",
|
|
@@ -10548,7 +10726,7 @@ var CallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_l
|
|
|
10548
10726
|
}
|
|
10549
10727
|
return literal;
|
|
10550
10728
|
});
|
|
10551
|
-
var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand),
|
|
10729
|
+
var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingCallExpressions), function($skip, $loc, $0, $1, $2) {
|
|
10552
10730
|
var optional = $1;
|
|
10553
10731
|
var argsWithTrailing = $2;
|
|
10554
10732
|
if (!optional)
|
|
@@ -10915,6 +11093,12 @@ var PropertyAccess$$ = [PropertyAccess$0, PropertyAccess$1, PropertyAccess$2, Pr
|
|
|
10915
11093
|
function PropertyAccess(ctx, state2) {
|
|
10916
11094
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PropertyAccess", PropertyAccess$$);
|
|
10917
11095
|
}
|
|
11096
|
+
var ExplicitPropertyGlob$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(ExplicitAccessStart), PropertyGlob), function(value) {
|
|
11097
|
+
return value[1];
|
|
11098
|
+
});
|
|
11099
|
+
function ExplicitPropertyGlob(ctx, state2) {
|
|
11100
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitPropertyGlob", ExplicitPropertyGlob$0);
|
|
11101
|
+
}
|
|
10918
11102
|
var PropertyGlob$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$S)((0, import_lib2.$E)(PropertyAccessModifier), OptionalDot), (0, import_lib2.$Q)(InlineComment), BracedObjectLiteral), function($skip, $loc, $0, $1, $2, $3) {
|
|
10919
11103
|
var dot = $1;
|
|
10920
11104
|
var object = $3;
|
|
@@ -11527,19 +11711,13 @@ var BindingElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.
|
|
|
11527
11711
|
var binding = $2;
|
|
11528
11712
|
var typeSuffix = $3;
|
|
11529
11713
|
var initializer = $4;
|
|
11530
|
-
if (binding.children) {
|
|
11531
|
-
binding = {
|
|
11532
|
-
...binding,
|
|
11533
|
-
initializer,
|
|
11534
|
-
children: [...binding.children, initializer]
|
|
11535
|
-
};
|
|
11536
|
-
}
|
|
11537
11714
|
return {
|
|
11538
11715
|
type: "BindingElement",
|
|
11539
11716
|
names: binding.names,
|
|
11540
11717
|
typeSuffix,
|
|
11541
11718
|
binding,
|
|
11542
|
-
children: [ws, binding]
|
|
11719
|
+
children: [ws, binding, initializer],
|
|
11720
|
+
initializer
|
|
11543
11721
|
};
|
|
11544
11722
|
});
|
|
11545
11723
|
var BindingElement$2 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($L17, 'BindingElement ","'))), function($skip, $loc, $0, $1) {
|
|
@@ -12243,11 +12421,9 @@ var SingleLineStatements$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidNewl
|
|
|
12243
12421
|
const expressions = [...stmts];
|
|
12244
12422
|
if (last)
|
|
12245
12423
|
expressions.push(last);
|
|
12246
|
-
const maybeComment = expressions.at(-1)?.[2]?.children?.[2]?.at(-1);
|
|
12247
|
-
const hasTrailingComment = maybeComment?.type === "Comment" && maybeComment.token.startsWith("//");
|
|
12248
12424
|
const children = [expressions];
|
|
12249
|
-
if (hasTrailingComment)
|
|
12250
|
-
children.push("\n");
|
|
12425
|
+
if (hasTrailingComment(expressions))
|
|
12426
|
+
children.push(["\n"]);
|
|
12251
12427
|
return {
|
|
12252
12428
|
type: "BlockStatement",
|
|
12253
12429
|
expressions,
|
|
@@ -13331,7 +13507,7 @@ var MethodDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Abstract, __,
|
|
|
13331
13507
|
ts: true
|
|
13332
13508
|
};
|
|
13333
13509
|
});
|
|
13334
|
-
var MethodDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(MethodSignature, (0, import_lib2.$N)((0, import_lib2.$C)(PropertyAccess, UnaryPostfix, NonNullAssertion)), (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3) {
|
|
13510
|
+
var MethodDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(MethodSignature, (0, import_lib2.$N)((0, import_lib2.$C)(PropertyAccess, ExplicitPropertyGlob, UnaryPostfix, NonNullAssertion)), (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3) {
|
|
13335
13511
|
var signature = $1;
|
|
13336
13512
|
var block = $3;
|
|
13337
13513
|
let children = $0;
|
|
@@ -14551,7 +14727,7 @@ var ForStatementControlWithReduction$$ = [ForStatementControlWithReduction$0, Fo
|
|
|
14551
14727
|
function ForStatementControlWithReduction(ctx, state2) {
|
|
14552
14728
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ForStatementControlWithReduction", ForStatementControlWithReduction$$);
|
|
14553
14729
|
}
|
|
14554
|
-
var ForReduction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L120, 'ForReduction "some"'), (0, import_lib2.$EXPECT)($L121, 'ForReduction "every"'), (0, import_lib2.$EXPECT)($L122, 'ForReduction "count"'), (0, import_lib2.$EXPECT)($L123, 'ForReduction "sum"'), (0, import_lib2.$EXPECT)($L124, 'ForReduction "product"'), (0, import_lib2.$EXPECT)($L125, 'ForReduction "min"'), (0, import_lib2.$EXPECT)($L126, 'ForReduction "max"')), NonIdContinue, __), function($skip, $loc, $0, $1, $2, $3) {
|
|
14730
|
+
var ForReduction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L120, 'ForReduction "some"'), (0, import_lib2.$EXPECT)($L121, 'ForReduction "every"'), (0, import_lib2.$EXPECT)($L122, 'ForReduction "count"'), (0, import_lib2.$EXPECT)($L123, 'ForReduction "sum"'), (0, import_lib2.$EXPECT)($L124, 'ForReduction "product"'), (0, import_lib2.$EXPECT)($L125, 'ForReduction "min"'), (0, import_lib2.$EXPECT)($L126, 'ForReduction "max"'), (0, import_lib2.$EXPECT)($L127, 'ForReduction "join"')), NonIdContinue, __), function($skip, $loc, $0, $1, $2, $3) {
|
|
14555
14731
|
var subtype = $1;
|
|
14556
14732
|
var ws = $3;
|
|
14557
14733
|
return {
|
|
@@ -15125,7 +15301,7 @@ var Condition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, Decl
|
|
|
15125
15301
|
expression
|
|
15126
15302
|
};
|
|
15127
15303
|
});
|
|
15128
|
-
var Condition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, InsertOpenParen, (0, import_lib2.$E)((0, import_lib2.$S)(Nested,
|
|
15304
|
+
var Condition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, InsertOpenParen, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), InsertCloseParen, PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
15129
15305
|
var open = $2;
|
|
15130
15306
|
var expression = $3;
|
|
15131
15307
|
var close = $4;
|
|
@@ -15154,7 +15330,7 @@ var Condition$$ = [Condition$0, Condition$1, Condition$2, Condition$3, Condition
|
|
|
15154
15330
|
function Condition(ctx, state2) {
|
|
15155
15331
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Condition", Condition$$);
|
|
15156
15332
|
}
|
|
15157
|
-
var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen,
|
|
15333
|
+
var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, PostfixedExpression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
|
|
15158
15334
|
var open = $1;
|
|
15159
15335
|
var expression = $2;
|
|
15160
15336
|
var close = $3;
|
|
@@ -15501,19 +15677,19 @@ var ThrowStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Throw, MaybeParen
|
|
|
15501
15677
|
function ThrowStatement(ctx, state2) {
|
|
15502
15678
|
return (0, import_lib2.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
|
|
15503
15679
|
}
|
|
15504
|
-
var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15680
|
+
var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L128, 'Break "break"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15505
15681
|
return { $loc, token: $1 };
|
|
15506
15682
|
});
|
|
15507
15683
|
function Break(ctx, state2) {
|
|
15508
15684
|
return (0, import_lib2.$EVENT)(ctx, state2, "Break", Break$0);
|
|
15509
15685
|
}
|
|
15510
|
-
var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15686
|
+
var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L129, 'Continue "continue"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15511
15687
|
return { $loc, token: $1 };
|
|
15512
15688
|
});
|
|
15513
15689
|
function Continue(ctx, state2) {
|
|
15514
15690
|
return (0, import_lib2.$EVENT)(ctx, state2, "Continue", Continue$0);
|
|
15515
15691
|
}
|
|
15516
|
-
var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15692
|
+
var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L130, 'Debugger "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15517
15693
|
return { $loc, token: $1 };
|
|
15518
15694
|
});
|
|
15519
15695
|
function Debugger(ctx, state2) {
|
|
@@ -15581,7 +15757,7 @@ var MaybeParenNestedExpression$$ = [MaybeParenNestedExpression$0, MaybeParenNest
|
|
|
15581
15757
|
function MaybeParenNestedExpression(ctx, state2) {
|
|
15582
15758
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
|
|
15583
15759
|
}
|
|
15584
|
-
var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($
|
|
15760
|
+
var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($L131, 'ImportDeclaration "require"'), NonIdContinue, Arguments), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
15585
15761
|
const imp = [
|
|
15586
15762
|
{ ...$1, ts: true },
|
|
15587
15763
|
{ ...$1, token: "const", js: true }
|
|
@@ -15771,7 +15947,7 @@ var ImpliedFrom$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImpliedF
|
|
|
15771
15947
|
function ImpliedFrom(ctx, state2) {
|
|
15772
15948
|
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
|
|
15773
15949
|
}
|
|
15774
|
-
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
15950
|
+
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L132, 'ImportAssertion "with"'), (0, import_lib2.$EXPECT)($L133, 'ImportAssertion "assert"')), NonIdContinue, (0, import_lib2.$E)(_), ObjectLiteral), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
15775
15951
|
var keyword = $2;
|
|
15776
15952
|
var object = $5;
|
|
15777
15953
|
return {
|
|
@@ -16097,19 +16273,19 @@ var LexicalDeclaration$$ = [LexicalDeclaration$0, LexicalDeclaration$1];
|
|
|
16097
16273
|
function LexicalDeclaration(ctx, state2) {
|
|
16098
16274
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
|
|
16099
16275
|
}
|
|
16100
|
-
var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
16276
|
+
var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L134, 'ConstAssignment ":="'), (0, import_lib2.$EXPECT)($L135, 'ConstAssignment "\u2254"')), function($skip, $loc, $0, $1) {
|
|
16101
16277
|
return { $loc, token: "=", decl: "const " };
|
|
16102
16278
|
});
|
|
16103
16279
|
function ConstAssignment(ctx, state2) {
|
|
16104
16280
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
|
|
16105
16281
|
}
|
|
16106
|
-
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16282
|
+
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
|
|
16107
16283
|
return { $loc, token: "=", decl: "let " };
|
|
16108
16284
|
});
|
|
16109
16285
|
function LetAssignment(ctx, state2) {
|
|
16110
16286
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
|
|
16111
16287
|
}
|
|
16112
|
-
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16288
|
+
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L137, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
|
|
16113
16289
|
return { $loc, token: "=" };
|
|
16114
16290
|
});
|
|
16115
16291
|
function TypeAssignment(ctx, state2) {
|
|
@@ -16532,7 +16708,7 @@ var MultiLineComment$$ = [MultiLineComment$0, MultiLineComment$1];
|
|
|
16532
16708
|
function MultiLineComment(ctx, state2) {
|
|
16533
16709
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
|
|
16534
16710
|
}
|
|
16535
|
-
var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16711
|
+
var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L138, 'JSMultiLineComment "/*"'), (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L139, 'JSMultiLineComment "*/"')), (0, import_lib2.$EXPECT)($R68, "JSMultiLineComment /./"))), (0, import_lib2.$EXPECT)($L139, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
|
|
16536
16712
|
return { type: "Comment", $loc, token: $1 };
|
|
16537
16713
|
});
|
|
16538
16714
|
function JSMultiLineComment(ctx, state2) {
|
|
@@ -16578,7 +16754,7 @@ function _(ctx, state2) {
|
|
|
16578
16754
|
var NonNewlineWhitespace$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R23, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
16579
16755
|
return { $loc, token: $0 };
|
|
16580
16756
|
});
|
|
16581
|
-
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16757
|
+
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
|
|
16582
16758
|
return " ";
|
|
16583
16759
|
});
|
|
16584
16760
|
var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
|
|
@@ -16629,7 +16805,7 @@ var StatementDelimiter$$ = [StatementDelimiter$0, StatementDelimiter$1, Statemen
|
|
|
16629
16805
|
function StatementDelimiter(ctx, state2) {
|
|
16630
16806
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
|
|
16631
16807
|
}
|
|
16632
|
-
var ClosingDelimiter$0 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L37, 'ClosingDelimiter "}"'), (0, import_lib2.$EXPECT)($
|
|
16808
|
+
var ClosingDelimiter$0 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L37, 'ClosingDelimiter "}"'), (0, import_lib2.$EXPECT)($L141, 'ClosingDelimiter ")"'), (0, import_lib2.$EXPECT)($L46, 'ClosingDelimiter "]"'))));
|
|
16633
16809
|
function ClosingDelimiter(ctx, state2) {
|
|
16634
16810
|
return (0, import_lib2.$EVENT)(ctx, state2, "ClosingDelimiter", ClosingDelimiter$0);
|
|
16635
16811
|
}
|
|
@@ -16652,7 +16828,7 @@ var Loc$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Loc ""'), functi
|
|
|
16652
16828
|
function Loc(ctx, state2) {
|
|
16653
16829
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
|
|
16654
16830
|
}
|
|
16655
|
-
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16831
|
+
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L142, 'Abstract "abstract"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L18, 'Abstract " "')))), function($skip, $loc, $0, $1) {
|
|
16656
16832
|
return { $loc, token: $1, ts: true };
|
|
16657
16833
|
});
|
|
16658
16834
|
function Abstract(ctx, state2) {
|
|
@@ -16664,43 +16840,43 @@ var Ampersand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L117, 'Ampersan
|
|
|
16664
16840
|
function Ampersand(ctx, state2) {
|
|
16665
16841
|
return (0, import_lib2.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
|
|
16666
16842
|
}
|
|
16667
|
-
var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16843
|
+
var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L143, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16668
16844
|
return { $loc, token: $1 };
|
|
16669
16845
|
});
|
|
16670
16846
|
function As(ctx, state2) {
|
|
16671
16847
|
return (0, import_lib2.$EVENT)(ctx, state2, "As", As$0);
|
|
16672
16848
|
}
|
|
16673
|
-
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16849
|
+
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'At "@"'), function($skip, $loc, $0, $1) {
|
|
16674
16850
|
return { $loc, token: $1 };
|
|
16675
16851
|
});
|
|
16676
16852
|
function At(ctx, state2) {
|
|
16677
16853
|
return (0, import_lib2.$EVENT)(ctx, state2, "At", At$0);
|
|
16678
16854
|
}
|
|
16679
|
-
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16855
|
+
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L145, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
|
|
16680
16856
|
return { $loc, token: "@" };
|
|
16681
16857
|
});
|
|
16682
16858
|
function AtAt(ctx, state2) {
|
|
16683
16859
|
return (0, import_lib2.$EVENT)(ctx, state2, "AtAt", AtAt$0);
|
|
16684
16860
|
}
|
|
16685
|
-
var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16861
|
+
var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L146, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16686
16862
|
return { $loc, token: $1, type: "Async" };
|
|
16687
16863
|
});
|
|
16688
16864
|
function Async(ctx, state2) {
|
|
16689
16865
|
return (0, import_lib2.$EVENT)(ctx, state2, "Async", Async$0);
|
|
16690
16866
|
}
|
|
16691
|
-
var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16867
|
+
var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L147, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16692
16868
|
return { $loc, token: $1, type: "Await" };
|
|
16693
16869
|
});
|
|
16694
16870
|
function Await(ctx, state2) {
|
|
16695
16871
|
return (0, import_lib2.$EVENT)(ctx, state2, "Await", Await$0);
|
|
16696
16872
|
}
|
|
16697
|
-
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16873
|
+
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L148, 'Backtick "`"'), function($skip, $loc, $0, $1) {
|
|
16698
16874
|
return { $loc, token: $1 };
|
|
16699
16875
|
});
|
|
16700
16876
|
function Backtick(ctx, state2) {
|
|
16701
16877
|
return (0, import_lib2.$EVENT)(ctx, state2, "Backtick", Backtick$0);
|
|
16702
16878
|
}
|
|
16703
|
-
var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16879
|
+
var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L149, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16704
16880
|
return { $loc, token: $1 };
|
|
16705
16881
|
});
|
|
16706
16882
|
function By(ctx, state2) {
|
|
@@ -16712,19 +16888,19 @@ var Caret$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L22, 'Caret "^"'),
|
|
|
16712
16888
|
function Caret(ctx, state2) {
|
|
16713
16889
|
return (0, import_lib2.$EVENT)(ctx, state2, "Caret", Caret$0);
|
|
16714
16890
|
}
|
|
16715
|
-
var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16891
|
+
var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L150, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16716
16892
|
return { $loc, token: $1 };
|
|
16717
16893
|
});
|
|
16718
16894
|
function Case(ctx, state2) {
|
|
16719
16895
|
return (0, import_lib2.$EVENT)(ctx, state2, "Case", Case$0);
|
|
16720
16896
|
}
|
|
16721
|
-
var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16897
|
+
var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L151, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16722
16898
|
return { $loc, token: $1 };
|
|
16723
16899
|
});
|
|
16724
16900
|
function Catch(ctx, state2) {
|
|
16725
16901
|
return (0, import_lib2.$EVENT)(ctx, state2, "Catch", Catch$0);
|
|
16726
16902
|
}
|
|
16727
|
-
var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16903
|
+
var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L152, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16728
16904
|
return { $loc, token: $1 };
|
|
16729
16905
|
});
|
|
16730
16906
|
function Class(ctx, state2) {
|
|
@@ -16748,13 +16924,13 @@ var CloseBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L46, 'CloseB
|
|
|
16748
16924
|
function CloseBracket(ctx, state2) {
|
|
16749
16925
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
|
|
16750
16926
|
}
|
|
16751
|
-
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16927
|
+
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L141, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
|
|
16752
16928
|
return { $loc, token: $1 };
|
|
16753
16929
|
});
|
|
16754
16930
|
function CloseParen(ctx, state2) {
|
|
16755
16931
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
|
|
16756
16932
|
}
|
|
16757
|
-
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16933
|
+
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L153, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
|
|
16758
16934
|
return { $loc, token: "${" };
|
|
16759
16935
|
});
|
|
16760
16936
|
function CoffeeSubstitutionStart(ctx, state2) {
|
|
@@ -16772,37 +16948,37 @@ var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L17, 'Comma ","'),
|
|
|
16772
16948
|
function Comma(ctx, state2) {
|
|
16773
16949
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comma", Comma$0);
|
|
16774
16950
|
}
|
|
16775
|
-
var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16951
|
+
var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L154, 'Comptime "comptime"'), NonIdContinue, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L16, 'Comptime ":"'))), function($skip, $loc, $0, $1, $2, $3) {
|
|
16776
16952
|
return { $loc, token: $1 };
|
|
16777
16953
|
});
|
|
16778
16954
|
function Comptime(ctx, state2) {
|
|
16779
16955
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comptime", Comptime$0);
|
|
16780
16956
|
}
|
|
16781
|
-
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16957
|
+
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
|
|
16782
16958
|
return { $loc, token: "constructor" };
|
|
16783
16959
|
});
|
|
16784
16960
|
function ConstructorShorthand(ctx, state2) {
|
|
16785
16961
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
|
|
16786
16962
|
}
|
|
16787
|
-
var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16963
|
+
var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L155, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16788
16964
|
return { $loc, token: $1 };
|
|
16789
16965
|
});
|
|
16790
16966
|
function Declare(ctx, state2) {
|
|
16791
16967
|
return (0, import_lib2.$EVENT)(ctx, state2, "Declare", Declare$0);
|
|
16792
16968
|
}
|
|
16793
|
-
var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16969
|
+
var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L156, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16794
16970
|
return { $loc, token: $1 };
|
|
16795
16971
|
});
|
|
16796
16972
|
function Default(ctx, state2) {
|
|
16797
16973
|
return (0, import_lib2.$EVENT)(ctx, state2, "Default", Default$0);
|
|
16798
16974
|
}
|
|
16799
|
-
var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16975
|
+
var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L157, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16800
16976
|
return { $loc, token: $1 };
|
|
16801
16977
|
});
|
|
16802
16978
|
function Delete(ctx, state2) {
|
|
16803
16979
|
return (0, import_lib2.$EVENT)(ctx, state2, "Delete", Delete$0);
|
|
16804
16980
|
}
|
|
16805
|
-
var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16981
|
+
var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L158, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16806
16982
|
return { $loc, token: $1 };
|
|
16807
16983
|
});
|
|
16808
16984
|
function Do(ctx, state2) {
|
|
@@ -16822,20 +16998,20 @@ var Dot$$ = [Dot$0, Dot$1];
|
|
|
16822
16998
|
function Dot(ctx, state2) {
|
|
16823
16999
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Dot", Dot$$);
|
|
16824
17000
|
}
|
|
16825
|
-
var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17001
|
+
var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L159, 'DotDot ".."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L7, 'DotDot "."'))), function($skip, $loc, $0, $1, $2) {
|
|
16826
17002
|
return { $loc, token: $1 };
|
|
16827
17003
|
});
|
|
16828
|
-
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17004
|
+
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
|
|
16829
17005
|
return { $loc, token: ".." };
|
|
16830
17006
|
});
|
|
16831
17007
|
var DotDot$$ = [DotDot$0, DotDot$1];
|
|
16832
17008
|
function DotDot(ctx, state2) {
|
|
16833
17009
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
|
|
16834
17010
|
}
|
|
16835
|
-
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17011
|
+
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
|
|
16836
17012
|
return { $loc, token: $1 };
|
|
16837
17013
|
});
|
|
16838
|
-
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17014
|
+
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
|
|
16839
17015
|
return { $loc, token: "..." };
|
|
16840
17016
|
});
|
|
16841
17017
|
var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
|
|
@@ -16848,31 +17024,31 @@ var InsertDotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Inse
|
|
|
16848
17024
|
function InsertDotDotDot(ctx, state2) {
|
|
16849
17025
|
return (0, import_lib2.$EVENT)(ctx, state2, "InsertDotDotDot", InsertDotDotDot$0);
|
|
16850
17026
|
}
|
|
16851
|
-
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17027
|
+
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
|
|
16852
17028
|
return { $loc, token: $1 };
|
|
16853
17029
|
});
|
|
16854
17030
|
function DoubleColon(ctx, state2) {
|
|
16855
17031
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
|
|
16856
17032
|
}
|
|
16857
|
-
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17033
|
+
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
|
|
16858
17034
|
return { $loc, token: ":" };
|
|
16859
17035
|
});
|
|
16860
17036
|
function DoubleColonAsColon(ctx, state2) {
|
|
16861
17037
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
|
|
16862
17038
|
}
|
|
16863
|
-
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17039
|
+
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L164, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
16864
17040
|
return { $loc, token: $1 };
|
|
16865
17041
|
});
|
|
16866
17042
|
function DoubleQuote(ctx, state2) {
|
|
16867
17043
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
|
|
16868
17044
|
}
|
|
16869
|
-
var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17045
|
+
var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L165, 'Each "each"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16870
17046
|
return { $loc, token: $1 };
|
|
16871
17047
|
});
|
|
16872
17048
|
function Each(ctx, state2) {
|
|
16873
17049
|
return (0, import_lib2.$EVENT)(ctx, state2, "Each", Each$0);
|
|
16874
17050
|
}
|
|
16875
|
-
var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17051
|
+
var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L166, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16876
17052
|
return { $loc, token: $1 };
|
|
16877
17053
|
});
|
|
16878
17054
|
function Else(ctx, state2) {
|
|
@@ -16884,61 +17060,61 @@ var Equals$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L3, 'Equals "="'),
|
|
|
16884
17060
|
function Equals(ctx, state2) {
|
|
16885
17061
|
return (0, import_lib2.$EVENT)(ctx, state2, "Equals", Equals$0);
|
|
16886
17062
|
}
|
|
16887
|
-
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17063
|
+
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L167, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
|
|
16888
17064
|
return { $loc, token: $1 };
|
|
16889
17065
|
});
|
|
16890
17066
|
function ExclamationPoint(ctx, state2) {
|
|
16891
17067
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
|
|
16892
17068
|
}
|
|
16893
|
-
var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17069
|
+
var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L168, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16894
17070
|
return { $loc, token: $1 };
|
|
16895
17071
|
});
|
|
16896
17072
|
function Export(ctx, state2) {
|
|
16897
17073
|
return (0, import_lib2.$EVENT)(ctx, state2, "Export", Export$0);
|
|
16898
17074
|
}
|
|
16899
|
-
var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17075
|
+
var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L169, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16900
17076
|
return { $loc, token: $1 };
|
|
16901
17077
|
});
|
|
16902
17078
|
function Extends(ctx, state2) {
|
|
16903
17079
|
return (0, import_lib2.$EVENT)(ctx, state2, "Extends", Extends$0);
|
|
16904
17080
|
}
|
|
16905
|
-
var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17081
|
+
var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L170, 'Finally "finally"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16906
17082
|
return { $loc, token: $1 };
|
|
16907
17083
|
});
|
|
16908
17084
|
function Finally(ctx, state2) {
|
|
16909
17085
|
return (0, import_lib2.$EVENT)(ctx, state2, "Finally", Finally$0);
|
|
16910
17086
|
}
|
|
16911
|
-
var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17087
|
+
var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L171, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16912
17088
|
return { $loc, token: $1 };
|
|
16913
17089
|
});
|
|
16914
17090
|
function For(ctx, state2) {
|
|
16915
17091
|
return (0, import_lib2.$EVENT)(ctx, state2, "For", For$0);
|
|
16916
17092
|
}
|
|
16917
|
-
var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17093
|
+
var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L172, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16918
17094
|
return { $loc, token: $1 };
|
|
16919
17095
|
});
|
|
16920
17096
|
function From(ctx, state2) {
|
|
16921
17097
|
return (0, import_lib2.$EVENT)(ctx, state2, "From", From$0);
|
|
16922
17098
|
}
|
|
16923
|
-
var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17099
|
+
var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L173, 'Function "function"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16924
17100
|
return { $loc, token: $1 };
|
|
16925
17101
|
});
|
|
16926
17102
|
function Function2(ctx, state2) {
|
|
16927
17103
|
return (0, import_lib2.$EVENT)(ctx, state2, "Function", Function$0);
|
|
16928
17104
|
}
|
|
16929
|
-
var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17105
|
+
var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L174, 'GetOrSet "get"'), (0, import_lib2.$EXPECT)($L175, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16930
17106
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
16931
17107
|
});
|
|
16932
17108
|
function GetOrSet(ctx, state2) {
|
|
16933
17109
|
return (0, import_lib2.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
|
|
16934
17110
|
}
|
|
16935
|
-
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17111
|
+
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L176, 'Hash "#"'), function($skip, $loc, $0, $1) {
|
|
16936
17112
|
return { $loc, token: $1 };
|
|
16937
17113
|
});
|
|
16938
17114
|
function Hash(ctx, state2) {
|
|
16939
17115
|
return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
|
|
16940
17116
|
}
|
|
16941
|
-
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17117
|
+
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L177, 'If "if"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L18, 'If " "')))), function($skip, $loc, $0, $1) {
|
|
16942
17118
|
return { $loc, token: $1 };
|
|
16943
17119
|
});
|
|
16944
17120
|
function If(ctx, state2) {
|
|
@@ -16950,67 +17126,67 @@ var Import$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)
|
|
|
16950
17126
|
function Import(ctx, state2) {
|
|
16951
17127
|
return (0, import_lib2.$EVENT)(ctx, state2, "Import", Import$0);
|
|
16952
17128
|
}
|
|
16953
|
-
var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17129
|
+
var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L178, 'In "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16954
17130
|
return { $loc, token: $1 };
|
|
16955
17131
|
});
|
|
16956
17132
|
function In(ctx, state2) {
|
|
16957
17133
|
return (0, import_lib2.$EVENT)(ctx, state2, "In", In$0);
|
|
16958
17134
|
}
|
|
16959
|
-
var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17135
|
+
var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L179, 'Infer "infer"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16960
17136
|
return { $loc, token: $1 };
|
|
16961
17137
|
});
|
|
16962
17138
|
function Infer(ctx, state2) {
|
|
16963
17139
|
return (0, import_lib2.$EVENT)(ctx, state2, "Infer", Infer$0);
|
|
16964
17140
|
}
|
|
16965
|
-
var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17141
|
+
var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L180, 'LetOrConst "let"'), (0, import_lib2.$EXPECT)($L181, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16966
17142
|
return { $loc, token: $1 };
|
|
16967
17143
|
});
|
|
16968
17144
|
function LetOrConst(ctx, state2) {
|
|
16969
17145
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
|
|
16970
17146
|
}
|
|
16971
|
-
var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17147
|
+
var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L181, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16972
17148
|
return { $loc, token: $1 };
|
|
16973
17149
|
});
|
|
16974
17150
|
function Const(ctx, state2) {
|
|
16975
17151
|
return (0, import_lib2.$EVENT)(ctx, state2, "Const", Const$0);
|
|
16976
17152
|
}
|
|
16977
|
-
var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17153
|
+
var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L182, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16978
17154
|
return { $loc, token: $1 };
|
|
16979
17155
|
});
|
|
16980
17156
|
function Is(ctx, state2) {
|
|
16981
17157
|
return (0, import_lib2.$EVENT)(ctx, state2, "Is", Is$0);
|
|
16982
17158
|
}
|
|
16983
|
-
var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17159
|
+
var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L180, 'LetOrConstOrVar "let"'), (0, import_lib2.$EXPECT)($L181, 'LetOrConstOrVar "const"'), (0, import_lib2.$EXPECT)($L183, 'LetOrConstOrVar "var"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16984
17160
|
return { $loc, token: $1 };
|
|
16985
17161
|
});
|
|
16986
17162
|
function LetOrConstOrVar(ctx, state2) {
|
|
16987
17163
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
|
|
16988
17164
|
}
|
|
16989
|
-
var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17165
|
+
var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L184, 'Like "like"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16990
17166
|
return { $loc, token: $1 };
|
|
16991
17167
|
});
|
|
16992
17168
|
function Like(ctx, state2) {
|
|
16993
17169
|
return (0, import_lib2.$EVENT)(ctx, state2, "Like", Like$0);
|
|
16994
17170
|
}
|
|
16995
|
-
var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17171
|
+
var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L185, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16996
17172
|
return { $loc, token: "while" };
|
|
16997
17173
|
});
|
|
16998
17174
|
function Loop(ctx, state2) {
|
|
16999
17175
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loop", Loop$0);
|
|
17000
17176
|
}
|
|
17001
|
-
var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17177
|
+
var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L186, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17002
17178
|
return { $loc, token: $1 };
|
|
17003
17179
|
});
|
|
17004
17180
|
function New(ctx, state2) {
|
|
17005
17181
|
return (0, import_lib2.$EVENT)(ctx, state2, "New", New$0);
|
|
17006
17182
|
}
|
|
17007
|
-
var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17183
|
+
var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L187, 'Not "not"'), NonIdContinue, (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($L16, 'Not ":"')))), function($skip, $loc, $0, $1, $2, $3) {
|
|
17008
17184
|
return { $loc, token: "!" };
|
|
17009
17185
|
});
|
|
17010
17186
|
function Not(ctx, state2) {
|
|
17011
17187
|
return (0, import_lib2.$EVENT)(ctx, state2, "Not", Not$0);
|
|
17012
17188
|
}
|
|
17013
|
-
var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17189
|
+
var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L188, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17014
17190
|
return { $loc, token: $1 };
|
|
17015
17191
|
});
|
|
17016
17192
|
function Of(ctx, state2) {
|
|
@@ -17028,7 +17204,7 @@ var OpenBrace$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L1, 'OpenBrace
|
|
|
17028
17204
|
function OpenBrace(ctx, state2) {
|
|
17029
17205
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
|
|
17030
17206
|
}
|
|
17031
|
-
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17207
|
+
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L189, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
17032
17208
|
return { $loc, token: $1 };
|
|
17033
17209
|
});
|
|
17034
17210
|
function OpenBracket(ctx, state2) {
|
|
@@ -17040,49 +17216,49 @@ var OpenParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L4, 'OpenParen
|
|
|
17040
17216
|
function OpenParen(ctx, state2) {
|
|
17041
17217
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
|
|
17042
17218
|
}
|
|
17043
|
-
var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17219
|
+
var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L190, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17044
17220
|
return { $loc, token: $1 };
|
|
17045
17221
|
});
|
|
17046
17222
|
function Operator(ctx, state2) {
|
|
17047
17223
|
return (0, import_lib2.$EVENT)(ctx, state2, "Operator", Operator$0);
|
|
17048
17224
|
}
|
|
17049
|
-
var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17225
|
+
var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L191, 'Override "override"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17050
17226
|
return { $loc, token: $1, ts: true };
|
|
17051
17227
|
});
|
|
17052
17228
|
function Override(ctx, state2) {
|
|
17053
17229
|
return (0, import_lib2.$EVENT)(ctx, state2, "Override", Override$0);
|
|
17054
17230
|
}
|
|
17055
|
-
var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17231
|
+
var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L192, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17056
17232
|
return { $loc, token: $1 };
|
|
17057
17233
|
});
|
|
17058
17234
|
function Own(ctx, state2) {
|
|
17059
17235
|
return (0, import_lib2.$EVENT)(ctx, state2, "Own", Own$0);
|
|
17060
17236
|
}
|
|
17061
|
-
var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17237
|
+
var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L193, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17062
17238
|
return { $loc, token: $1 };
|
|
17063
17239
|
});
|
|
17064
17240
|
function Public(ctx, state2) {
|
|
17065
17241
|
return (0, import_lib2.$EVENT)(ctx, state2, "Public", Public$0);
|
|
17066
17242
|
}
|
|
17067
|
-
var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17243
|
+
var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L194, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17068
17244
|
return { $loc, token: $1 };
|
|
17069
17245
|
});
|
|
17070
17246
|
function Private(ctx, state2) {
|
|
17071
17247
|
return (0, import_lib2.$EVENT)(ctx, state2, "Private", Private$0);
|
|
17072
17248
|
}
|
|
17073
|
-
var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17249
|
+
var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L195, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17074
17250
|
return { $loc, token: $1 };
|
|
17075
17251
|
});
|
|
17076
17252
|
function Protected(ctx, state2) {
|
|
17077
17253
|
return (0, import_lib2.$EVENT)(ctx, state2, "Protected", Protected$0);
|
|
17078
17254
|
}
|
|
17079
|
-
var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17255
|
+
var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L196, 'Pipe "||>"'), (0, import_lib2.$EXPECT)($L197, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
|
|
17080
17256
|
return { $loc, token: "||>" };
|
|
17081
17257
|
});
|
|
17082
|
-
var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17258
|
+
var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L198, 'Pipe "|>="'), (0, import_lib2.$EXPECT)($L199, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
|
|
17083
17259
|
return { $loc, token: "|>=" };
|
|
17084
17260
|
});
|
|
17085
|
-
var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17261
|
+
var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L200, 'Pipe "|>"'), (0, import_lib2.$EXPECT)($L201, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
|
|
17086
17262
|
return { $loc, token: "|>" };
|
|
17087
17263
|
});
|
|
17088
17264
|
var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
|
|
@@ -17095,19 +17271,19 @@ var QuestionMark$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L6, 'Questio
|
|
|
17095
17271
|
function QuestionMark(ctx, state2) {
|
|
17096
17272
|
return (0, import_lib2.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
|
|
17097
17273
|
}
|
|
17098
|
-
var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17274
|
+
var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17099
17275
|
return { $loc, token: $1, ts: true };
|
|
17100
17276
|
});
|
|
17101
17277
|
function Readonly(ctx, state2) {
|
|
17102
17278
|
return (0, import_lib2.$EVENT)(ctx, state2, "Readonly", Readonly$0);
|
|
17103
17279
|
}
|
|
17104
|
-
var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17280
|
+
var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L203, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17105
17281
|
return { $loc, token: $1 };
|
|
17106
17282
|
});
|
|
17107
17283
|
function Return(ctx, state2) {
|
|
17108
17284
|
return (0, import_lib2.$EVENT)(ctx, state2, "Return", Return$0);
|
|
17109
17285
|
}
|
|
17110
|
-
var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17286
|
+
var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L204, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17111
17287
|
return { $loc, token: $1 };
|
|
17112
17288
|
});
|
|
17113
17289
|
function Satisfies(ctx, state2) {
|
|
@@ -17119,7 +17295,7 @@ var Semicolon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L119, 'Semicolo
|
|
|
17119
17295
|
function Semicolon(ctx, state2) {
|
|
17120
17296
|
return (0, import_lib2.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
|
|
17121
17297
|
}
|
|
17122
|
-
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17298
|
+
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L205, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
17123
17299
|
return { $loc, token: $1 };
|
|
17124
17300
|
});
|
|
17125
17301
|
function SingleQuote(ctx, state2) {
|
|
@@ -17131,149 +17307,149 @@ var Star$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L75, 'Star "*"'), fu
|
|
|
17131
17307
|
function Star(ctx, state2) {
|
|
17132
17308
|
return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
|
|
17133
17309
|
}
|
|
17134
|
-
var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17310
|
+
var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L206, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17135
17311
|
return { $loc, token: $1 };
|
|
17136
17312
|
});
|
|
17137
|
-
var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17313
|
+
var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L144, 'Static "@"'), (0, import_lib2.$N)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L4, 'Static "("'), (0, import_lib2.$EXPECT)($L144, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
|
|
17138
17314
|
return { $loc, token: "static " };
|
|
17139
17315
|
});
|
|
17140
17316
|
var Static$$ = [Static$0, Static$1];
|
|
17141
17317
|
function Static(ctx, state2) {
|
|
17142
17318
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Static", Static$$);
|
|
17143
17319
|
}
|
|
17144
|
-
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17320
|
+
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L207, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
17145
17321
|
return { $loc, token: $1 };
|
|
17146
17322
|
});
|
|
17147
17323
|
function SubstitutionStart(ctx, state2) {
|
|
17148
17324
|
return (0, import_lib2.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
|
|
17149
17325
|
}
|
|
17150
|
-
var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17326
|
+
var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L208, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17151
17327
|
return { $loc, token: $1 };
|
|
17152
17328
|
});
|
|
17153
17329
|
function Super(ctx, state2) {
|
|
17154
17330
|
return (0, import_lib2.$EVENT)(ctx, state2, "Super", Super$0);
|
|
17155
17331
|
}
|
|
17156
|
-
var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17332
|
+
var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L209, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17157
17333
|
return { $loc, token: $1 };
|
|
17158
17334
|
});
|
|
17159
17335
|
function Switch(ctx, state2) {
|
|
17160
17336
|
return (0, import_lib2.$EVENT)(ctx, state2, "Switch", Switch$0);
|
|
17161
17337
|
}
|
|
17162
|
-
var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17338
|
+
var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L210, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17163
17339
|
return { $loc, token: $1 };
|
|
17164
17340
|
});
|
|
17165
17341
|
function Target(ctx, state2) {
|
|
17166
17342
|
return (0, import_lib2.$EVENT)(ctx, state2, "Target", Target$0);
|
|
17167
17343
|
}
|
|
17168
|
-
var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
17344
|
+
var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L211, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
17169
17345
|
return { $loc, token: "" };
|
|
17170
17346
|
});
|
|
17171
17347
|
function Then(ctx, state2) {
|
|
17172
17348
|
return (0, import_lib2.$EVENT)(ctx, state2, "Then", Then$0);
|
|
17173
17349
|
}
|
|
17174
|
-
var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17350
|
+
var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L212, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17175
17351
|
return { $loc, token: $1 };
|
|
17176
17352
|
});
|
|
17177
17353
|
function This(ctx, state2) {
|
|
17178
17354
|
return (0, import_lib2.$EVENT)(ctx, state2, "This", This$0);
|
|
17179
17355
|
}
|
|
17180
|
-
var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17356
|
+
var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L213, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17181
17357
|
return { $loc, token: $1 };
|
|
17182
17358
|
});
|
|
17183
17359
|
function Throw(ctx, state2) {
|
|
17184
17360
|
return (0, import_lib2.$EVENT)(ctx, state2, "Throw", Throw$0);
|
|
17185
17361
|
}
|
|
17186
|
-
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17362
|
+
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
17187
17363
|
return { $loc, token: "`" };
|
|
17188
17364
|
});
|
|
17189
17365
|
function TripleDoubleQuote(ctx, state2) {
|
|
17190
17366
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
|
|
17191
17367
|
}
|
|
17192
|
-
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17368
|
+
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
17193
17369
|
return { $loc, token: "`" };
|
|
17194
17370
|
});
|
|
17195
17371
|
function TripleSingleQuote(ctx, state2) {
|
|
17196
17372
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
|
|
17197
17373
|
}
|
|
17198
|
-
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17374
|
+
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
17199
17375
|
return { $loc, token: "/" };
|
|
17200
17376
|
});
|
|
17201
17377
|
function TripleSlash(ctx, state2) {
|
|
17202
17378
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
|
|
17203
17379
|
}
|
|
17204
|
-
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17380
|
+
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L217, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
17205
17381
|
return { $loc, token: "`" };
|
|
17206
17382
|
});
|
|
17207
17383
|
function TripleTick(ctx, state2) {
|
|
17208
17384
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
|
|
17209
17385
|
}
|
|
17210
|
-
var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17386
|
+
var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L218, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17211
17387
|
return { $loc, token: $1 };
|
|
17212
17388
|
});
|
|
17213
17389
|
function Try(ctx, state2) {
|
|
17214
17390
|
return (0, import_lib2.$EVENT)(ctx, state2, "Try", Try$0);
|
|
17215
17391
|
}
|
|
17216
|
-
var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17392
|
+
var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L219, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17217
17393
|
return { $loc, token: $1 };
|
|
17218
17394
|
});
|
|
17219
17395
|
function Typeof(ctx, state2) {
|
|
17220
17396
|
return (0, import_lib2.$EVENT)(ctx, state2, "Typeof", Typeof$0);
|
|
17221
17397
|
}
|
|
17222
|
-
var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17398
|
+
var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L220, 'Undefined "undefined"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17223
17399
|
return { $loc, token: $1 };
|
|
17224
17400
|
});
|
|
17225
17401
|
function Undefined(ctx, state2) {
|
|
17226
17402
|
return (0, import_lib2.$EVENT)(ctx, state2, "Undefined", Undefined$0);
|
|
17227
17403
|
}
|
|
17228
|
-
var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17404
|
+
var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L221, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17229
17405
|
return { $loc, token: $1, negated: true };
|
|
17230
17406
|
});
|
|
17231
17407
|
function Unless(ctx, state2) {
|
|
17232
17408
|
return (0, import_lib2.$EVENT)(ctx, state2, "Unless", Unless$0);
|
|
17233
17409
|
}
|
|
17234
|
-
var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17410
|
+
var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L222, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17235
17411
|
return { $loc, token: $1, negated: true };
|
|
17236
17412
|
});
|
|
17237
17413
|
function Until(ctx, state2) {
|
|
17238
17414
|
return (0, import_lib2.$EVENT)(ctx, state2, "Until", Until$0);
|
|
17239
17415
|
}
|
|
17240
|
-
var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17416
|
+
var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L223, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17241
17417
|
return { $loc, token: $1 };
|
|
17242
17418
|
});
|
|
17243
17419
|
function Using(ctx, state2) {
|
|
17244
17420
|
return (0, import_lib2.$EVENT)(ctx, state2, "Using", Using$0);
|
|
17245
17421
|
}
|
|
17246
|
-
var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17422
|
+
var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L183, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17247
17423
|
return { $loc, token: $1 };
|
|
17248
17424
|
});
|
|
17249
17425
|
function Var(ctx, state2) {
|
|
17250
17426
|
return (0, import_lib2.$EVENT)(ctx, state2, "Var", Var$0);
|
|
17251
17427
|
}
|
|
17252
|
-
var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17428
|
+
var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L224, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17253
17429
|
return { $loc, token: $1 };
|
|
17254
17430
|
});
|
|
17255
17431
|
function Void(ctx, state2) {
|
|
17256
17432
|
return (0, import_lib2.$EVENT)(ctx, state2, "Void", Void$0);
|
|
17257
17433
|
}
|
|
17258
|
-
var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17434
|
+
var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L225, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17259
17435
|
return { $loc, token: "case" };
|
|
17260
17436
|
});
|
|
17261
17437
|
function When(ctx, state2) {
|
|
17262
17438
|
return (0, import_lib2.$EVENT)(ctx, state2, "When", When$0);
|
|
17263
17439
|
}
|
|
17264
|
-
var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17440
|
+
var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L226, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17265
17441
|
return { $loc, token: $1 };
|
|
17266
17442
|
});
|
|
17267
17443
|
function While(ctx, state2) {
|
|
17268
17444
|
return (0, import_lib2.$EVENT)(ctx, state2, "While", While$0);
|
|
17269
17445
|
}
|
|
17270
|
-
var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17446
|
+
var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L132, 'With "with"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17271
17447
|
return { $loc, token: $1 };
|
|
17272
17448
|
});
|
|
17273
17449
|
function With(ctx, state2) {
|
|
17274
17450
|
return (0, import_lib2.$EVENT)(ctx, state2, "With", With$0);
|
|
17275
17451
|
}
|
|
17276
|
-
var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17452
|
+
var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L227, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17277
17453
|
return { $loc, token: $1, type: "Yield" };
|
|
17278
17454
|
});
|
|
17279
17455
|
function Yield(ctx, state2) {
|
|
@@ -17352,7 +17528,7 @@ var JSXElement$$ = [JSXElement$0, JSXElement$1, JSXElement$2];
|
|
|
17352
17528
|
function JSXElement(ctx, state2) {
|
|
17353
17529
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
|
|
17354
17530
|
}
|
|
17355
|
-
var JSXSelfClosingElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L19, 'JSXSelfClosingElement "<"'), JSXElementName, (0, import_lib2.$E)(TypeArguments), (0, import_lib2.$E)(JSXAttributes), (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($
|
|
17531
|
+
var JSXSelfClosingElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L19, 'JSXSelfClosingElement "<"'), JSXElementName, (0, import_lib2.$E)(TypeArguments), (0, import_lib2.$E)(JSXAttributes), (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L228, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
17356
17532
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
17357
17533
|
});
|
|
17358
17534
|
function JSXSelfClosingElement(ctx, state2) {
|
|
@@ -17386,7 +17562,7 @@ var JSXOptionalClosingElement$$ = [JSXOptionalClosingElement$0, JSXOptionalClosi
|
|
|
17386
17562
|
function JSXOptionalClosingElement(ctx, state2) {
|
|
17387
17563
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
|
|
17388
17564
|
}
|
|
17389
|
-
var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17565
|
+
var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L229, 'JSXClosingElement "</"'), (0, import_lib2.$E)(Whitespace), JSXElementName, (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L45, 'JSXClosingElement ">"'));
|
|
17390
17566
|
function JSXClosingElement(ctx, state2) {
|
|
17391
17567
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
|
|
17392
17568
|
}
|
|
@@ -17407,7 +17583,7 @@ var JSXFragment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)
|
|
|
17407
17583
|
];
|
|
17408
17584
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
17409
17585
|
});
|
|
17410
|
-
var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($
|
|
17586
|
+
var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($L230, 'JSXFragment "<>"'), (0, import_lib2.$E)(JSXChildren), (0, import_lib2.$E)(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
17411
17587
|
var children = $3;
|
|
17412
17588
|
$0 = $0.slice(1);
|
|
17413
17589
|
return {
|
|
@@ -17420,7 +17596,7 @@ var JSXFragment$$ = [JSXFragment$0, JSXFragment$1];
|
|
|
17420
17596
|
function JSXFragment(ctx, state2) {
|
|
17421
17597
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
|
|
17422
17598
|
}
|
|
17423
|
-
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17599
|
+
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L230, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
17424
17600
|
state.JSXTagStack.push("");
|
|
17425
17601
|
return $1;
|
|
17426
17602
|
});
|
|
@@ -17437,11 +17613,11 @@ var JSXOptionalClosingFragment$$ = [JSXOptionalClosingFragment$0, JSXOptionalClo
|
|
|
17437
17613
|
function JSXOptionalClosingFragment(ctx, state2) {
|
|
17438
17614
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
|
|
17439
17615
|
}
|
|
17440
|
-
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($
|
|
17616
|
+
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L231, 'JSXClosingFragment "</>"');
|
|
17441
17617
|
function JSXClosingFragment(ctx, state2) {
|
|
17442
17618
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
|
|
17443
17619
|
}
|
|
17444
|
-
var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17620
|
+
var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L176, 'JSXElementName "#"'), Dot), JSXShorthandString)), function($skip, $loc, $0, $1) {
|
|
17445
17621
|
return config.defaultElement;
|
|
17446
17622
|
});
|
|
17447
17623
|
var JSXElementName$1 = (0, import_lib2.$TEXT)((0, import_lib2.$S)(JSXIdentifierName, (0, import_lib2.$C)((0, import_lib2.$S)(Colon, JSXIdentifierName), (0, import_lib2.$Q)((0, import_lib2.$S)(Dot, JSXIdentifierName)))));
|
|
@@ -17622,7 +17798,7 @@ var JSXAttribute$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(Identifier, (0, im
|
|
|
17622
17798
|
}
|
|
17623
17799
|
return $skip;
|
|
17624
17800
|
});
|
|
17625
|
-
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17801
|
+
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L176, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
17626
17802
|
return [" ", "id=", $2];
|
|
17627
17803
|
});
|
|
17628
17804
|
var JSXAttribute$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
@@ -17967,7 +18143,7 @@ var JSXChildGeneral$$ = [JSXChildGeneral$0, JSXChildGeneral$1, JSXChildGeneral$2
|
|
|
17967
18143
|
function JSXChildGeneral(ctx, state2) {
|
|
17968
18144
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
|
|
17969
18145
|
}
|
|
17970
|
-
var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18146
|
+
var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L232, 'JSXComment "<!--"'), JSXCommentContent, (0, import_lib2.$EXPECT)($L233, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
|
|
17971
18147
|
return ["{/*", $2, "*/}"];
|
|
17972
18148
|
});
|
|
17973
18149
|
function JSXComment(ctx, state2) {
|
|
@@ -18255,37 +18431,37 @@ var InterfaceExtendsTarget$0 = ImplementsTarget;
|
|
|
18255
18431
|
function InterfaceExtendsTarget(ctx, state2) {
|
|
18256
18432
|
return (0, import_lib2.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
|
|
18257
18433
|
}
|
|
18258
|
-
var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18434
|
+
var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L234, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18259
18435
|
return { $loc, token: $1 };
|
|
18260
18436
|
});
|
|
18261
18437
|
function TypeKeyword(ctx, state2) {
|
|
18262
18438
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
|
|
18263
18439
|
}
|
|
18264
|
-
var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18440
|
+
var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L235, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18265
18441
|
return { $loc, token: $1 };
|
|
18266
18442
|
});
|
|
18267
18443
|
function Enum(ctx, state2) {
|
|
18268
18444
|
return (0, import_lib2.$EVENT)(ctx, state2, "Enum", Enum$0);
|
|
18269
18445
|
}
|
|
18270
|
-
var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18446
|
+
var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L236, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18271
18447
|
return { $loc, token: $1 };
|
|
18272
18448
|
});
|
|
18273
18449
|
function Interface(ctx, state2) {
|
|
18274
18450
|
return (0, import_lib2.$EVENT)(ctx, state2, "Interface", Interface$0);
|
|
18275
18451
|
}
|
|
18276
|
-
var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18452
|
+
var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L237, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18277
18453
|
return { $loc, token: $1 };
|
|
18278
18454
|
});
|
|
18279
18455
|
function Global(ctx, state2) {
|
|
18280
18456
|
return (0, import_lib2.$EVENT)(ctx, state2, "Global", Global$0);
|
|
18281
18457
|
}
|
|
18282
|
-
var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18458
|
+
var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L238, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18283
18459
|
return { $loc, token: $1 };
|
|
18284
18460
|
});
|
|
18285
18461
|
function Module(ctx, state2) {
|
|
18286
18462
|
return (0, import_lib2.$EVENT)(ctx, state2, "Module", Module$0);
|
|
18287
18463
|
}
|
|
18288
|
-
var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18464
|
+
var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L239, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18289
18465
|
return { $loc, token: $1 };
|
|
18290
18466
|
});
|
|
18291
18467
|
function Namespace(ctx, state2) {
|
|
@@ -18599,7 +18775,7 @@ var ReturnTypeSuffix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib
|
|
|
18599
18775
|
function ReturnTypeSuffix(ctx, state2) {
|
|
18600
18776
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
|
|
18601
18777
|
}
|
|
18602
|
-
var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
18778
|
+
var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L240, 'ReturnType "asserts"'), NonIdContinue)), ForbidIndentedApplication, (0, import_lib2.$E)(TypePredicate), RestoreIndentedApplication), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
18603
18779
|
var asserts = $1;
|
|
18604
18780
|
var t = $3;
|
|
18605
18781
|
if (!t)
|
|
@@ -18700,8 +18876,8 @@ var TypeUnarySuffix$$ = [TypeUnarySuffix$0, TypeUnarySuffix$1, TypeUnarySuffix$2
|
|
|
18700
18876
|
function TypeUnarySuffix(ctx, state2) {
|
|
18701
18877
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
|
|
18702
18878
|
}
|
|
18703
|
-
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18704
|
-
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18879
|
+
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L241, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
18880
|
+
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
18705
18881
|
var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
|
|
18706
18882
|
function TypeUnaryOp(ctx, state2) {
|
|
18707
18883
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
|
|
@@ -18731,7 +18907,7 @@ var TypeIndexedAccess$$ = [TypeIndexedAccess$0, TypeIndexedAccess$1, TypeIndexed
|
|
|
18731
18907
|
function TypeIndexedAccess(ctx, state2) {
|
|
18732
18908
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
|
|
18733
18909
|
}
|
|
18734
|
-
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
18910
|
+
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L242, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
|
|
18735
18911
|
return { $loc, token: "unknown" };
|
|
18736
18912
|
});
|
|
18737
18913
|
function UnknownAlias(ctx, state2) {
|
|
@@ -19124,13 +19300,13 @@ var TypeLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EX
|
|
|
19124
19300
|
return num;
|
|
19125
19301
|
return $0;
|
|
19126
19302
|
});
|
|
19127
|
-
var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19303
|
+
var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L224, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
19128
19304
|
return { type: "VoidType", $loc, token: $1 };
|
|
19129
19305
|
});
|
|
19130
|
-
var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19306
|
+
var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L243, 'TypeLiteral "unique"'), _, (0, import_lib2.$EXPECT)($L244, 'TypeLiteral "symbol"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
19131
19307
|
return { type: "UniqueSymbolType", children: $0 };
|
|
19132
19308
|
});
|
|
19133
|
-
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
19309
|
+
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L245, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
19134
19310
|
return { $loc, token: "[]" };
|
|
19135
19311
|
});
|
|
19136
19312
|
var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
|
|
@@ -19149,7 +19325,7 @@ var InlineInterfacePropertyDelimiter$0 = (0, import_lib2.$C)((0, import_lib2.$S)
|
|
|
19149
19325
|
var InlineInterfacePropertyDelimiter$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)(SameLineOrIndentedFurther, InlineBasicInterfaceProperty)), InsertComma), function(value) {
|
|
19150
19326
|
return value[1];
|
|
19151
19327
|
});
|
|
19152
|
-
var InlineInterfacePropertyDelimiter$2 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L16, 'InlineInterfacePropertyDelimiter ":"'), (0, import_lib2.$EXPECT)($
|
|
19328
|
+
var InlineInterfacePropertyDelimiter$2 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L16, 'InlineInterfacePropertyDelimiter ":"'), (0, import_lib2.$EXPECT)($L141, 'InlineInterfacePropertyDelimiter ")"'), (0, import_lib2.$EXPECT)($L46, 'InlineInterfacePropertyDelimiter "]"'), (0, import_lib2.$EXPECT)($L37, 'InlineInterfacePropertyDelimiter "}"'))));
|
|
19153
19329
|
var InlineInterfacePropertyDelimiter$3 = (0, import_lib2.$Y)(EOS);
|
|
19154
19330
|
var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
|
|
19155
19331
|
function InlineInterfacePropertyDelimiter(ctx, state2) {
|
|
@@ -19215,14 +19391,17 @@ function TypeFunctionArrow(ctx, state2) {
|
|
|
19215
19391
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeFunctionArrow", TypeFunctionArrow$0);
|
|
19216
19392
|
}
|
|
19217
19393
|
var TypeArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenAngleBracket, (0, import_lib2.$P)((0, import_lib2.$S)(__, TypeArgumentDelimited)), __, CloseAngleBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
19394
|
+
var open = $1;
|
|
19218
19395
|
var args = $2;
|
|
19219
|
-
|
|
19396
|
+
var ws = $3;
|
|
19397
|
+
var close = $4;
|
|
19398
|
+
args = args.flatMap(([ws2, [arg, delim]]) => [prepend(ws2, arg), delim]);
|
|
19220
19399
|
args.pop();
|
|
19221
19400
|
return {
|
|
19222
19401
|
type: "TypeArguments",
|
|
19223
19402
|
ts: true,
|
|
19224
19403
|
args,
|
|
19225
|
-
children:
|
|
19404
|
+
children: [open, args, ws, close]
|
|
19226
19405
|
};
|
|
19227
19406
|
});
|
|
19228
19407
|
function TypeArguments(ctx, state2) {
|
|
@@ -19388,7 +19567,7 @@ var CivetPrologue$$ = [CivetPrologue$0, CivetPrologue$1];
|
|
|
19388
19567
|
function CivetPrologue(ctx, state2) {
|
|
19389
19568
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
|
|
19390
19569
|
}
|
|
19391
|
-
var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19570
|
+
var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L246, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib2.$Q)(CivetOption), (0, import_lib2.$EXPECT)($R96, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
19392
19571
|
var options = $3;
|
|
19393
19572
|
return {
|
|
19394
19573
|
type: "CivetPrologue",
|