@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.mjs
CHANGED
|
@@ -56,7 +56,7 @@ var require_machine = __commonJS({
|
|
|
56
56
|
$EVENT: () => $EVENT2,
|
|
57
57
|
$EVENT_C: () => $EVENT_C2,
|
|
58
58
|
$EXPECT: () => $EXPECT2,
|
|
59
|
-
$L: () => $
|
|
59
|
+
$L: () => $L247,
|
|
60
60
|
$N: () => $N2,
|
|
61
61
|
$P: () => $P2,
|
|
62
62
|
$Q: () => $Q2,
|
|
@@ -81,7 +81,7 @@ var require_machine = __commonJS({
|
|
|
81
81
|
return result;
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
function $
|
|
84
|
+
function $L247(str) {
|
|
85
85
|
return function(_ctx, state2) {
|
|
86
86
|
const { input, pos } = state2, { length } = str, end = pos + length;
|
|
87
87
|
if (input.substring(pos, end) === str) {
|
|
@@ -516,6 +516,7 @@ __export(lib_exports, {
|
|
|
516
516
|
hasAwait: () => hasAwait,
|
|
517
517
|
hasExportDeclaration: () => hasExportDeclaration,
|
|
518
518
|
hasImportDeclaration: () => hasImportDeclaration,
|
|
519
|
+
hasTrailingComment: () => hasTrailingComment,
|
|
519
520
|
hasYield: () => hasYield,
|
|
520
521
|
insertTrimmingSpace: () => insertTrimmingSpace,
|
|
521
522
|
isComma: () => isComma,
|
|
@@ -741,6 +742,8 @@ function isExit(node) {
|
|
|
741
742
|
if (!(node != null)) {
|
|
742
743
|
return false;
|
|
743
744
|
}
|
|
745
|
+
let ref3;
|
|
746
|
+
let ref4;
|
|
744
747
|
switch (node.type) {
|
|
745
748
|
case "ReturnStatement":
|
|
746
749
|
case "ThrowStatement":
|
|
@@ -749,13 +752,30 @@ function isExit(node) {
|
|
|
749
752
|
return true;
|
|
750
753
|
}
|
|
751
754
|
case "IfStatement": {
|
|
752
|
-
return
|
|
755
|
+
return (
|
|
756
|
+
// `insertReturn` for IfStatement adds a return to children
|
|
757
|
+
// when there's no else block
|
|
758
|
+
(ref3 = node.children)[ref3.length - 1]?.type === "ReturnStatement" || (ref4 = node.children)[ref4.length - 1]?.[1]?.type === "ReturnStatement" || isExit(node.then) && isExit(node.else?.block)
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
case "PatternMatchingStatement": {
|
|
762
|
+
return isExit(node.children[0][1]);
|
|
763
|
+
}
|
|
764
|
+
case "SwitchStatement": {
|
|
765
|
+
return (
|
|
766
|
+
// Ensure exhaustive by requiring an else/default clause
|
|
767
|
+
node.caseBlock.clauses.some(($) => $.type === "DefaultClause") && // Every clause should exit
|
|
768
|
+
node.caseBlock.clauses.every(isExit)
|
|
769
|
+
);
|
|
770
|
+
}
|
|
771
|
+
case "TryStatement": {
|
|
772
|
+
return node.blocks.every(isExit);
|
|
753
773
|
}
|
|
754
774
|
case "BlockStatement": {
|
|
755
775
|
return node.expressions.some((s) => isExit(s[1]));
|
|
756
776
|
}
|
|
757
777
|
case "IterationStatement": {
|
|
758
|
-
return isLoopStatement(node) && gatherRecursiveWithinFunction(node.block, ($) =>
|
|
778
|
+
return isLoopStatement(node) && gatherRecursiveWithinFunction(node.block, ($1) => $1.type === "BreakStatement").length === 0;
|
|
759
779
|
}
|
|
760
780
|
default: {
|
|
761
781
|
return false;
|
|
@@ -782,6 +802,22 @@ function stripTrailingImplicitComma(children) {
|
|
|
782
802
|
return children;
|
|
783
803
|
}
|
|
784
804
|
}
|
|
805
|
+
function hasTrailingComment(node) {
|
|
806
|
+
if (!(node != null)) {
|
|
807
|
+
return false;
|
|
808
|
+
}
|
|
809
|
+
if (node.type === "Comment") {
|
|
810
|
+
return true;
|
|
811
|
+
}
|
|
812
|
+
if (Array.isArray(node)) {
|
|
813
|
+
return hasTrailingComment(node[node.length - 1]);
|
|
814
|
+
}
|
|
815
|
+
if ("children" in node) {
|
|
816
|
+
let ref5;
|
|
817
|
+
return hasTrailingComment((ref5 = node.children)[ref5.length - 1]);
|
|
818
|
+
}
|
|
819
|
+
return false;
|
|
820
|
+
}
|
|
785
821
|
function insertTrimmingSpace(target, c) {
|
|
786
822
|
if (!(target != null)) {
|
|
787
823
|
return target;
|
|
@@ -910,7 +946,7 @@ function literalValue(literal) {
|
|
|
910
946
|
case "false":
|
|
911
947
|
return false;
|
|
912
948
|
}
|
|
913
|
-
let
|
|
949
|
+
let ref6;
|
|
914
950
|
switch (literal.subtype) {
|
|
915
951
|
case "StringLiteral": {
|
|
916
952
|
assert.equal(
|
|
@@ -926,8 +962,8 @@ function literalValue(literal) {
|
|
|
926
962
|
return BigInt(raw.slice(0, -1));
|
|
927
963
|
} else if (raw.match(/[\.eE]/)) {
|
|
928
964
|
return parseFloat(raw);
|
|
929
|
-
} else if ((
|
|
930
|
-
const [, base] =
|
|
965
|
+
} else if ((ref6 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref6) && len(ref6, 2)) {
|
|
966
|
+
const [, base] = ref6;
|
|
931
967
|
switch (base.toLowerCase()) {
|
|
932
968
|
case "x":
|
|
933
969
|
return parseInt(raw.replace(/0[xX]/, ""), 16);
|
|
@@ -1007,16 +1043,16 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
|
|
|
1007
1043
|
return startsWithPredicate(node.children, predicate);
|
|
1008
1044
|
}
|
|
1009
1045
|
function hasAwait(exp) {
|
|
1010
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1046
|
+
return gatherRecursiveWithinFunction(exp, ($2) => $2.type === "Await").length > 0;
|
|
1011
1047
|
}
|
|
1012
1048
|
function hasYield(exp) {
|
|
1013
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1049
|
+
return gatherRecursiveWithinFunction(exp, ($3) => $3.type === "Yield").length > 0;
|
|
1014
1050
|
}
|
|
1015
1051
|
function hasImportDeclaration(exp) {
|
|
1016
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1052
|
+
return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ImportDeclaration").length > 0;
|
|
1017
1053
|
}
|
|
1018
1054
|
function hasExportDeclaration(exp) {
|
|
1019
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1055
|
+
return gatherRecursiveWithinFunction(exp, ($5) => $5.type === "ExportDeclaration").length > 0;
|
|
1020
1056
|
}
|
|
1021
1057
|
function deepCopy(root) {
|
|
1022
1058
|
const copied = /* @__PURE__ */ new Map();
|
|
@@ -1161,7 +1197,7 @@ function makeLeftHandSideExpression(expression) {
|
|
|
1161
1197
|
if (skipParens.has(expression.type)) {
|
|
1162
1198
|
return expression;
|
|
1163
1199
|
}
|
|
1164
|
-
if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($
|
|
1200
|
+
if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($6) => $6.type === "ObjectExpression")) {
|
|
1165
1201
|
return expression;
|
|
1166
1202
|
}
|
|
1167
1203
|
}
|
|
@@ -1176,7 +1212,7 @@ function parenthesizeExpression(expression) {
|
|
|
1176
1212
|
});
|
|
1177
1213
|
}
|
|
1178
1214
|
function checkValidLHS(node) {
|
|
1179
|
-
let
|
|
1215
|
+
let ref7;
|
|
1180
1216
|
switch (node?.type) {
|
|
1181
1217
|
case "UnaryExpression": {
|
|
1182
1218
|
node.children.unshift({
|
|
@@ -1186,7 +1222,7 @@ function checkValidLHS(node) {
|
|
|
1186
1222
|
return true;
|
|
1187
1223
|
}
|
|
1188
1224
|
case "CallExpression": {
|
|
1189
|
-
const lastType = (
|
|
1225
|
+
const lastType = (ref7 = node.children)[ref7.length - 1]?.type;
|
|
1190
1226
|
switch (lastType) {
|
|
1191
1227
|
case "PropertyAccess":
|
|
1192
1228
|
case "SliceExpression":
|
|
@@ -1234,8 +1270,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1234
1270
|
node.parent = parent;
|
|
1235
1271
|
}
|
|
1236
1272
|
if (depth && isParent(node)) {
|
|
1237
|
-
for (let
|
|
1238
|
-
const child =
|
|
1273
|
+
for (let ref8 = node.children, i9 = 0, len9 = ref8.length; i9 < len9; i9++) {
|
|
1274
|
+
const child = ref8[i9];
|
|
1239
1275
|
updateParentPointers(child, node, depth - 1);
|
|
1240
1276
|
}
|
|
1241
1277
|
}
|
|
@@ -1283,11 +1319,11 @@ function convertOptionalType(suffix) {
|
|
|
1283
1319
|
const wrap = suffix.type === "ReturnTypeAnnotation";
|
|
1284
1320
|
spliceChild(suffix, suffix.t, 1, suffix.t = [
|
|
1285
1321
|
getTrimmingSpace(suffix.t),
|
|
1286
|
-
wrap
|
|
1322
|
+
wrap ? "(" : void 0,
|
|
1287
1323
|
// TODO: avoid parens if unnecessary
|
|
1288
1324
|
"undefined | ",
|
|
1289
|
-
parenthesizeType(
|
|
1290
|
-
wrap
|
|
1325
|
+
parenthesizeType(trimFirstSpace(suffix.t)),
|
|
1326
|
+
wrap ? ")" : void 0
|
|
1291
1327
|
]);
|
|
1292
1328
|
}
|
|
1293
1329
|
var typeNeedsNoParens = /* @__PURE__ */ new Set([
|
|
@@ -1301,7 +1337,11 @@ function parenthesizeType(type) {
|
|
|
1301
1337
|
if (typeNeedsNoParens.has(type.type)) {
|
|
1302
1338
|
return type;
|
|
1303
1339
|
}
|
|
1304
|
-
return
|
|
1340
|
+
return makeNode({
|
|
1341
|
+
type: "TypeParenthesized",
|
|
1342
|
+
ts: true,
|
|
1343
|
+
children: ["(", type, ")"]
|
|
1344
|
+
});
|
|
1305
1345
|
}
|
|
1306
1346
|
function wrapIIFE(expressions, asyncFlag, generator) {
|
|
1307
1347
|
let awaitPrefix;
|
|
@@ -1372,8 +1412,8 @@ function wrapIIFE(expressions, asyncFlag, generator) {
|
|
|
1372
1412
|
children.splice(1, 0, ".bind(this)");
|
|
1373
1413
|
}
|
|
1374
1414
|
if (gatherRecursiveWithinFunction(block, (a2) => typeof a2 === "object" && a2 != null && "token" in a2 && a2.token === "arguments").length) {
|
|
1375
|
-
let
|
|
1376
|
-
children[children.length - 1] = (
|
|
1415
|
+
let ref9;
|
|
1416
|
+
children[children.length - 1] = (ref9 = parameters.children)[ref9.length - 1] = "(arguments)";
|
|
1377
1417
|
}
|
|
1378
1418
|
}
|
|
1379
1419
|
let exp = makeNode({
|
|
@@ -1400,13 +1440,16 @@ function wrapIIFE(expressions, asyncFlag, generator) {
|
|
|
1400
1440
|
}
|
|
1401
1441
|
return exp;
|
|
1402
1442
|
}
|
|
1403
|
-
function wrapWithReturn(expression) {
|
|
1443
|
+
function wrapWithReturn(expression, parent = expression?.parent, semi = false) {
|
|
1404
1444
|
const children = expression ? ["return ", expression] : ["return"];
|
|
1445
|
+
if (semi) {
|
|
1446
|
+
children.unshift(";");
|
|
1447
|
+
}
|
|
1405
1448
|
return makeNode({
|
|
1406
1449
|
type: "ReturnStatement",
|
|
1407
1450
|
children,
|
|
1408
1451
|
expression,
|
|
1409
|
-
parent
|
|
1452
|
+
parent
|
|
1410
1453
|
});
|
|
1411
1454
|
}
|
|
1412
1455
|
function flatJoin(array, separator) {
|
|
@@ -1648,9 +1691,11 @@ function adjustBindingElements(elements) {
|
|
|
1648
1691
|
if (l) {
|
|
1649
1692
|
if (arrayElementHasTrailingComma(after[l - 1]))
|
|
1650
1693
|
l++;
|
|
1694
|
+
const elements2 = trimFirstSpace(after);
|
|
1651
1695
|
blockPrefix = {
|
|
1652
1696
|
type: "PostRestBindingElements",
|
|
1653
|
-
|
|
1697
|
+
elements: elements2,
|
|
1698
|
+
children: ["[", elements2, "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
|
|
1654
1699
|
names: after.flatMap((p) => p.names)
|
|
1655
1700
|
};
|
|
1656
1701
|
}
|
|
@@ -1985,7 +2030,7 @@ var declareHelper = {
|
|
|
1985
2030
|
AutoPromise(ref) {
|
|
1986
2031
|
state.prelude.push([
|
|
1987
2032
|
"",
|
|
1988
|
-
ts(["type ", ref, "<T> =
|
|
2033
|
+
ts(["type ", ref, "<T> = Promise<Awaited<T>>"]),
|
|
1989
2034
|
";\n"
|
|
1990
2035
|
]);
|
|
1991
2036
|
},
|
|
@@ -2654,14 +2699,10 @@ function processReturnValue(func) {
|
|
|
2654
2699
|
let ref1;
|
|
2655
2700
|
if (!((ref1 = block.children)[ref1.length - 2]?.type === "ReturnStatement")) {
|
|
2656
2701
|
let ref2;
|
|
2657
|
-
const indent = getIndent((ref2 = block.expressions)[ref2.length - 1])
|
|
2702
|
+
const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]);
|
|
2658
2703
|
block.expressions.push([
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
type: "ReturnStatement",
|
|
2662
|
-
expression: ref,
|
|
2663
|
-
children: ["return ", ref]
|
|
2664
|
-
}
|
|
2704
|
+
indent,
|
|
2705
|
+
wrapWithReturn(ref, block, !indent)
|
|
2665
2706
|
]);
|
|
2666
2707
|
}
|
|
2667
2708
|
return true;
|
|
@@ -2673,34 +2714,103 @@ function patternAsValue(pattern) {
|
|
|
2673
2714
|
const index = children.indexOf(pattern.elements);
|
|
2674
2715
|
if (index < 0)
|
|
2675
2716
|
throw new Error("failed to find elements in ArrayBindingPattern");
|
|
2676
|
-
children[index] = pattern.elements.map(
|
|
2677
|
-
|
|
2678
|
-
return { ...el, children: [ws, patternAsValue(e), delim] };
|
|
2679
|
-
});
|
|
2680
|
-
return { ...pattern, children };
|
|
2717
|
+
const elements = children[index] = pattern.elements.map(patternAsValue);
|
|
2718
|
+
return { ...pattern, elements, children };
|
|
2681
2719
|
}
|
|
2682
2720
|
case "ObjectBindingPattern": {
|
|
2683
2721
|
const children = [...pattern.children];
|
|
2684
2722
|
const index = children.indexOf(pattern.properties);
|
|
2685
2723
|
if (index < 0)
|
|
2686
2724
|
throw new Error("failed to find properties in ArrayBindingPattern");
|
|
2687
|
-
children[index] = pattern.properties.map(patternAsValue);
|
|
2688
|
-
return { ...pattern, children };
|
|
2725
|
+
const properties = children[index] = pattern.properties.map(patternAsValue);
|
|
2726
|
+
return { ...pattern, properties, children };
|
|
2689
2727
|
}
|
|
2690
|
-
case "Identifier":
|
|
2691
2728
|
case "BindingProperty": {
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
pattern.value
|
|
2695
|
-
pattern.
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2729
|
+
let children;
|
|
2730
|
+
if (pattern.value?.type === "Identifier") {
|
|
2731
|
+
children = [pattern.value, pattern.delim];
|
|
2732
|
+
if (isWhitespaceOrEmpty(pattern.children[0])) {
|
|
2733
|
+
children.unshift(pattern.children[0]);
|
|
2734
|
+
}
|
|
2735
|
+
} else {
|
|
2736
|
+
children = [...pattern.children];
|
|
2737
|
+
if (pattern.initializer != null) {
|
|
2738
|
+
const index = children.indexOf(pattern.initializer);
|
|
2739
|
+
assert.notEqual(index, -1, "failed to find initializer in BindingElement");
|
|
2740
|
+
children.splice(index, 1);
|
|
2741
|
+
}
|
|
2742
|
+
if (pattern.value != null) {
|
|
2743
|
+
children = children.map(($2) => $2 === pattern.value ? patternAsValue(pattern.value) : $2);
|
|
2744
|
+
}
|
|
2699
2745
|
}
|
|
2700
2746
|
return { ...pattern, children };
|
|
2701
2747
|
}
|
|
2702
|
-
|
|
2748
|
+
case "AtBindingProperty": {
|
|
2749
|
+
const children = [...pattern.children];
|
|
2750
|
+
if (pattern.initializer != null) {
|
|
2751
|
+
const index = children.indexOf(pattern.initializer);
|
|
2752
|
+
assert.notEqual(index, -1, "failed to find initializer in AtBindingProperty");
|
|
2753
|
+
children.splice(index, 1);
|
|
2754
|
+
}
|
|
2755
|
+
return { ...pattern, children };
|
|
2756
|
+
}
|
|
2757
|
+
case "BindingElement": {
|
|
2758
|
+
const children = [...pattern.children];
|
|
2759
|
+
if (pattern.initializer != null) {
|
|
2760
|
+
const index2 = children.indexOf(pattern.initializer);
|
|
2761
|
+
assert.notEqual(index2, -1, "failed to find initializer in BindingElement");
|
|
2762
|
+
children.splice(index2, 1);
|
|
2763
|
+
}
|
|
2764
|
+
const index = children.indexOf(pattern.binding);
|
|
2765
|
+
assert.notEqual(index, -1, "failed to find binding in BindingElement");
|
|
2766
|
+
children[index] = patternAsValue(pattern.binding);
|
|
2767
|
+
return { ...pattern, children };
|
|
2768
|
+
}
|
|
2769
|
+
default: {
|
|
2703
2770
|
return pattern;
|
|
2771
|
+
}
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
function patternBindings(pattern) {
|
|
2775
|
+
const bindings = [];
|
|
2776
|
+
recurse(pattern);
|
|
2777
|
+
return bindings;
|
|
2778
|
+
function recurse(pattern2) {
|
|
2779
|
+
switch (pattern2.type) {
|
|
2780
|
+
case "ArrayBindingPattern": {
|
|
2781
|
+
for (let ref3 = pattern2.elements, i2 = 0, len1 = ref3.length; i2 < len1; i2++) {
|
|
2782
|
+
const element = ref3[i2];
|
|
2783
|
+
recurse(element);
|
|
2784
|
+
}
|
|
2785
|
+
;
|
|
2786
|
+
break;
|
|
2787
|
+
}
|
|
2788
|
+
case "ObjectBindingPattern": {
|
|
2789
|
+
for (let ref4 = pattern2.properties, i3 = 0, len22 = ref4.length; i3 < len22; i3++) {
|
|
2790
|
+
const property = ref4[i3];
|
|
2791
|
+
recurse(property);
|
|
2792
|
+
}
|
|
2793
|
+
;
|
|
2794
|
+
break;
|
|
2795
|
+
}
|
|
2796
|
+
case "BindingElement": {
|
|
2797
|
+
recurse(pattern2.binding);
|
|
2798
|
+
break;
|
|
2799
|
+
}
|
|
2800
|
+
case "BindingProperty": {
|
|
2801
|
+
recurse(pattern2.value ?? pattern2.name);
|
|
2802
|
+
break;
|
|
2803
|
+
}
|
|
2804
|
+
case "Binding": {
|
|
2805
|
+
recurse(pattern2.pattern);
|
|
2806
|
+
break;
|
|
2807
|
+
}
|
|
2808
|
+
case "Identifier":
|
|
2809
|
+
case "AtBinding": {
|
|
2810
|
+
bindings.push(pattern2);
|
|
2811
|
+
break;
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2704
2814
|
}
|
|
2705
2815
|
}
|
|
2706
2816
|
function assignResults(node, collect) {
|
|
@@ -2709,8 +2819,8 @@ function assignResults(node, collect) {
|
|
|
2709
2819
|
switch (node.type) {
|
|
2710
2820
|
case "BlockStatement":
|
|
2711
2821
|
if (node.expressions.length) {
|
|
2712
|
-
let
|
|
2713
|
-
assignResults((
|
|
2822
|
+
let ref5;
|
|
2823
|
+
assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
|
|
2714
2824
|
} else {
|
|
2715
2825
|
node.expressions.push(["", collect("void 0"), ";"]);
|
|
2716
2826
|
}
|
|
@@ -2745,7 +2855,7 @@ function assignResults(node, collect) {
|
|
|
2745
2855
|
if (exp.type === "LabelledStatement") {
|
|
2746
2856
|
exp = exp.statement;
|
|
2747
2857
|
}
|
|
2748
|
-
let
|
|
2858
|
+
let ref6;
|
|
2749
2859
|
switch (exp.type) {
|
|
2750
2860
|
case "BreakStatement":
|
|
2751
2861
|
case "ContinueStatement":
|
|
@@ -2756,14 +2866,14 @@ function assignResults(node, collect) {
|
|
|
2756
2866
|
return;
|
|
2757
2867
|
}
|
|
2758
2868
|
case "Declaration": {
|
|
2759
|
-
let
|
|
2869
|
+
let ref7;
|
|
2760
2870
|
if (exp.bindings?.length) {
|
|
2761
|
-
|
|
2871
|
+
ref7 = patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern);
|
|
2762
2872
|
} else {
|
|
2763
|
-
|
|
2873
|
+
ref7 = "void 0";
|
|
2764
2874
|
}
|
|
2765
2875
|
;
|
|
2766
|
-
const value =
|
|
2876
|
+
const value = ref7;
|
|
2767
2877
|
exp.children.push([
|
|
2768
2878
|
"",
|
|
2769
2879
|
[";", collect(value)]
|
|
@@ -2811,11 +2921,17 @@ function assignResults(node, collect) {
|
|
|
2811
2921
|
return;
|
|
2812
2922
|
}
|
|
2813
2923
|
case "SwitchStatement": {
|
|
2814
|
-
|
|
2924
|
+
for (let ref8 = exp.caseBlock.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
|
|
2925
|
+
const clause = ref8[i4];
|
|
2926
|
+
assignResults(clause, collect);
|
|
2927
|
+
}
|
|
2815
2928
|
return;
|
|
2816
2929
|
}
|
|
2817
2930
|
case "TryStatement": {
|
|
2818
|
-
exp.blocks
|
|
2931
|
+
for (let ref9 = exp.blocks, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
|
|
2932
|
+
const block = ref9[i5];
|
|
2933
|
+
assignResults(block, collect);
|
|
2934
|
+
}
|
|
2819
2935
|
return;
|
|
2820
2936
|
}
|
|
2821
2937
|
}
|
|
@@ -2836,20 +2952,28 @@ function insertReturn(node) {
|
|
|
2836
2952
|
const last = node.expressions[node.expressions.length - 1];
|
|
2837
2953
|
insertReturn(last);
|
|
2838
2954
|
} else {
|
|
2839
|
-
|
|
2840
|
-
|
|
2955
|
+
let m1;
|
|
2956
|
+
if (m1 = node.parent?.type, m1 === "CatchClause" || m1 === "WhenClause") {
|
|
2957
|
+
node.expressions.push(["", wrapWithReturn(void 0, node)]);
|
|
2841
2958
|
}
|
|
2842
2959
|
}
|
|
2843
2960
|
return;
|
|
2844
2961
|
}
|
|
2845
2962
|
case "WhenClause": {
|
|
2846
2963
|
if (node.break) {
|
|
2847
|
-
node.children.
|
|
2964
|
+
const breakIndex = node.children.indexOf(node.break);
|
|
2965
|
+
assert.notEqual(breakIndex, -1, "Could not find break in when clause");
|
|
2966
|
+
node.children.splice(breakIndex, 1);
|
|
2967
|
+
node.break = void 0;
|
|
2848
2968
|
}
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2969
|
+
insertReturn(node.block);
|
|
2970
|
+
if (!isExit(node.block)) {
|
|
2971
|
+
const comment = hasTrailingComment(node.block.expressions);
|
|
2972
|
+
let ref10;
|
|
2973
|
+
node.block.expressions.push([
|
|
2974
|
+
comment ? (ref10 = node.block.expressions)[ref10.length - 1][0] || "\n" : "",
|
|
2975
|
+
wrapWithReturn(void 0, node, !comment)
|
|
2976
|
+
]);
|
|
2853
2977
|
}
|
|
2854
2978
|
return;
|
|
2855
2979
|
}
|
|
@@ -2874,7 +2998,7 @@ function insertReturn(node) {
|
|
|
2874
2998
|
if (exp.type === "LabelledStatement") {
|
|
2875
2999
|
exp = exp.statement;
|
|
2876
3000
|
}
|
|
2877
|
-
let
|
|
3001
|
+
let ref11;
|
|
2878
3002
|
switch (exp.type) {
|
|
2879
3003
|
case "BreakStatement":
|
|
2880
3004
|
case "ContinueStatement":
|
|
@@ -2885,27 +3009,30 @@ function insertReturn(node) {
|
|
|
2885
3009
|
return;
|
|
2886
3010
|
}
|
|
2887
3011
|
case "Declaration": {
|
|
2888
|
-
let
|
|
3012
|
+
let ref12;
|
|
2889
3013
|
if (exp.bindings?.length) {
|
|
2890
|
-
|
|
3014
|
+
ref12 = [" ", patternAsValue((ref11 = exp.bindings)[ref11.length - 1].pattern)];
|
|
2891
3015
|
} else {
|
|
2892
|
-
|
|
3016
|
+
ref12 = [];
|
|
2893
3017
|
}
|
|
2894
3018
|
;
|
|
2895
|
-
const value =
|
|
3019
|
+
const value = ref12;
|
|
2896
3020
|
const parent = outer.parent;
|
|
2897
3021
|
const index = findChildIndex(parent?.expressions, outer);
|
|
2898
3022
|
assert.notEqual(index, -1, "Could not find declaration in parent");
|
|
2899
|
-
parent.expressions.splice(index + 1, 0, [
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
3023
|
+
parent.expressions.splice(index + 1, 0, [
|
|
3024
|
+
"",
|
|
3025
|
+
{
|
|
3026
|
+
type: "ReturnStatement",
|
|
3027
|
+
expression: value,
|
|
3028
|
+
children: [
|
|
3029
|
+
!(parent.expressions[index][2] === ";") ? ";" : void 0,
|
|
3030
|
+
"return",
|
|
3031
|
+
value
|
|
3032
|
+
],
|
|
3033
|
+
parent: exp
|
|
3034
|
+
}
|
|
3035
|
+
]);
|
|
2909
3036
|
braceBlock(parent);
|
|
2910
3037
|
return;
|
|
2911
3038
|
}
|
|
@@ -2916,12 +3043,7 @@ function insertReturn(node) {
|
|
|
2916
3043
|
assert.notEqual(index, -1, "Could not find function declaration in parent");
|
|
2917
3044
|
parent.expressions.splice(index + 1, 0, [
|
|
2918
3045
|
"",
|
|
2919
|
-
|
|
2920
|
-
type: "ReturnStatement",
|
|
2921
|
-
expression: exp.id,
|
|
2922
|
-
children: [";return ", exp.id],
|
|
2923
|
-
parent: exp
|
|
2924
|
-
}
|
|
3046
|
+
wrapWithReturn(exp.id, exp, true)
|
|
2925
3047
|
]);
|
|
2926
3048
|
braceBlock(parent);
|
|
2927
3049
|
return;
|
|
@@ -2944,12 +3066,11 @@ function insertReturn(node) {
|
|
|
2944
3066
|
if (exp.else)
|
|
2945
3067
|
insertReturn(exp.else.block);
|
|
2946
3068
|
else
|
|
2947
|
-
exp.children.push([
|
|
2948
|
-
|
|
2949
|
-
// NOTE: add a prefixed
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
}]);
|
|
3069
|
+
exp.children.push([
|
|
3070
|
+
"",
|
|
3071
|
+
// NOTE: add a prefixed semicolon because the if block may not be braced
|
|
3072
|
+
wrapWithReturn(void 0, exp, true)
|
|
3073
|
+
]);
|
|
2953
3074
|
return;
|
|
2954
3075
|
}
|
|
2955
3076
|
case "PatternMatchingStatement": {
|
|
@@ -2957,30 +3078,30 @@ function insertReturn(node) {
|
|
|
2957
3078
|
return;
|
|
2958
3079
|
}
|
|
2959
3080
|
case "SwitchStatement": {
|
|
2960
|
-
|
|
3081
|
+
for (let ref13 = exp.caseBlock.clauses, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
|
|
3082
|
+
const clause = ref13[i6];
|
|
3083
|
+
insertReturn(clause);
|
|
3084
|
+
}
|
|
2961
3085
|
return;
|
|
2962
3086
|
}
|
|
2963
3087
|
case "TryStatement": {
|
|
2964
|
-
exp.blocks.
|
|
3088
|
+
for (let ref14 = exp.blocks, i7 = 0, len6 = ref14.length; i7 < len6; i7++) {
|
|
3089
|
+
const block = ref14[i7];
|
|
3090
|
+
insertReturn(block);
|
|
3091
|
+
}
|
|
2965
3092
|
return;
|
|
2966
3093
|
}
|
|
2967
3094
|
}
|
|
2968
3095
|
if (node[node.length - 1]?.type === "SemicolonDelimiter") {
|
|
2969
3096
|
return;
|
|
2970
3097
|
}
|
|
2971
|
-
|
|
2972
|
-
node.splice(1, 1, returnStatement);
|
|
2973
|
-
}
|
|
2974
|
-
function insertSwitchReturns(exp) {
|
|
2975
|
-
exp.caseBlock.clauses.forEach((clause) => {
|
|
2976
|
-
return insertReturn(clause);
|
|
2977
|
-
});
|
|
3098
|
+
node[1] = wrapWithReturn(node[1]);
|
|
2978
3099
|
}
|
|
2979
3100
|
function processBreakContinueWith(statement) {
|
|
2980
3101
|
let changed = false;
|
|
2981
3102
|
for (const control of gatherRecursiveWithinFunction(
|
|
2982
3103
|
statement.block,
|
|
2983
|
-
($
|
|
3104
|
+
($3) => $3.type === "BreakStatement" || $3.type === "ContinueStatement"
|
|
2984
3105
|
)) {
|
|
2985
3106
|
let controlName2 = function() {
|
|
2986
3107
|
switch (control.type) {
|
|
@@ -2995,8 +3116,8 @@ function processBreakContinueWith(statement) {
|
|
|
2995
3116
|
var controlName = controlName2;
|
|
2996
3117
|
if (control.with) {
|
|
2997
3118
|
if (control.label) {
|
|
2998
|
-
let
|
|
2999
|
-
if (!(
|
|
3119
|
+
let m2;
|
|
3120
|
+
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)) {
|
|
3000
3121
|
continue;
|
|
3001
3122
|
}
|
|
3002
3123
|
} else {
|
|
@@ -3015,7 +3136,7 @@ function processBreakContinueWith(statement) {
|
|
|
3015
3136
|
)
|
|
3016
3137
|
);
|
|
3017
3138
|
updateParentPointers(control.with, control);
|
|
3018
|
-
const i = control.children.findIndex(($
|
|
3139
|
+
const i = control.children.findIndex(($4) => $4?.type === "Error");
|
|
3019
3140
|
if (i >= 0) {
|
|
3020
3141
|
control.children.splice(i, 1);
|
|
3021
3142
|
}
|
|
@@ -3057,7 +3178,7 @@ function wrapIterationReturningResults(statement, collect) {
|
|
|
3057
3178
|
}
|
|
3058
3179
|
const resultsRef = statement.resultsRef = makeRef("results");
|
|
3059
3180
|
const declaration = iterationDeclaration(statement);
|
|
3060
|
-
const { ancestor, child } = findAncestor(statement, ($
|
|
3181
|
+
const { ancestor, child } = findAncestor(statement, ($5) => $5.type === "BlockStatement");
|
|
3061
3182
|
assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
|
|
3062
3183
|
const index = findChildIndex(ancestor.expressions, child);
|
|
3063
3184
|
assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
|
|
@@ -3110,6 +3231,9 @@ function iterationDeclaration(statement) {
|
|
|
3110
3231
|
case "product": {
|
|
3111
3232
|
return "1";
|
|
3112
3233
|
}
|
|
3234
|
+
case "join": {
|
|
3235
|
+
return '""';
|
|
3236
|
+
}
|
|
3113
3237
|
default: {
|
|
3114
3238
|
return "0";
|
|
3115
3239
|
}
|
|
@@ -3154,7 +3278,8 @@ function iterationDeclaration(statement) {
|
|
|
3154
3278
|
case "count": {
|
|
3155
3279
|
return ["if (", node, ") ++", resultsRef];
|
|
3156
3280
|
}
|
|
3157
|
-
case "sum":
|
|
3281
|
+
case "sum":
|
|
3282
|
+
case "join": {
|
|
3158
3283
|
return [resultsRef, " += ", node];
|
|
3159
3284
|
}
|
|
3160
3285
|
case "product": {
|
|
@@ -3179,9 +3304,9 @@ function iterationDefaultBody(statement) {
|
|
|
3179
3304
|
}
|
|
3180
3305
|
const reduction = statement.type === "ForStatement" && statement.reduction;
|
|
3181
3306
|
function fillBlock(expression) {
|
|
3182
|
-
let
|
|
3183
|
-
let
|
|
3184
|
-
if (
|
|
3307
|
+
let ref15;
|
|
3308
|
+
let m3;
|
|
3309
|
+
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) {
|
|
3185
3310
|
block.expressions.pop();
|
|
3186
3311
|
}
|
|
3187
3312
|
block.expressions.push(expression);
|
|
@@ -3211,7 +3336,29 @@ function iterationDefaultBody(statement) {
|
|
|
3211
3336
|
}
|
|
3212
3337
|
}
|
|
3213
3338
|
if (statement.type === "ForStatement" && statement.declaration?.type === "ForDeclaration") {
|
|
3214
|
-
|
|
3339
|
+
if (reduction) {
|
|
3340
|
+
const bindings = patternBindings(statement.declaration.binding.pattern);
|
|
3341
|
+
if (bindings.length) {
|
|
3342
|
+
fillBlock(["", bindings[0]]);
|
|
3343
|
+
for (const binding of bindings.slice(1)) {
|
|
3344
|
+
binding.children.unshift({
|
|
3345
|
+
type: "Error",
|
|
3346
|
+
subtype: "Warning",
|
|
3347
|
+
message: "Ignored binding in reduction loop with implicit body"
|
|
3348
|
+
});
|
|
3349
|
+
}
|
|
3350
|
+
} else {
|
|
3351
|
+
fillBlock([
|
|
3352
|
+
"",
|
|
3353
|
+
{
|
|
3354
|
+
type: "Error",
|
|
3355
|
+
message: "Empty binding pattern in reduction loop with implicit body"
|
|
3356
|
+
}
|
|
3357
|
+
]);
|
|
3358
|
+
}
|
|
3359
|
+
} else {
|
|
3360
|
+
fillBlock(["", patternAsValue(statement.declaration.binding.pattern)]);
|
|
3361
|
+
}
|
|
3215
3362
|
block.empty = false;
|
|
3216
3363
|
}
|
|
3217
3364
|
return false;
|
|
@@ -3239,24 +3386,24 @@ function processParams(f) {
|
|
|
3239
3386
|
injectParamProps: isConstructor
|
|
3240
3387
|
});
|
|
3241
3388
|
if (isConstructor) {
|
|
3242
|
-
const { ancestor } = findAncestor(f, ($
|
|
3389
|
+
const { ancestor } = findAncestor(f, ($6) => $6.type === "ClassExpression");
|
|
3243
3390
|
if (ancestor != null) {
|
|
3244
|
-
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($
|
|
3391
|
+
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));
|
|
3245
3392
|
const classExpressions = ancestor.body.expressions;
|
|
3246
3393
|
let index = findChildIndex(classExpressions, f);
|
|
3247
3394
|
assert.notEqual(index, -1, "Could not find constructor in class");
|
|
3248
|
-
let
|
|
3249
|
-
while (
|
|
3395
|
+
let m4;
|
|
3396
|
+
while (m4 = classExpressions[index - 1]?.[1], typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "MethodDefinition" && "name" in m4 && m4.name === "constructor") {
|
|
3250
3397
|
index--;
|
|
3251
3398
|
}
|
|
3252
3399
|
const fStatement = classExpressions[index];
|
|
3253
|
-
for (let
|
|
3254
|
-
const parameter =
|
|
3400
|
+
for (let ref16 = gatherRecursive(parameters, ($10) => $10.type === "Parameter"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
|
|
3401
|
+
const parameter = ref16[i8];
|
|
3255
3402
|
if (!parameter.typeSuffix) {
|
|
3256
3403
|
continue;
|
|
3257
3404
|
}
|
|
3258
|
-
for (let
|
|
3259
|
-
const binding =
|
|
3405
|
+
for (let ref17 = gatherRecursive(parameter, ($11) => $11.type === "AtBinding"), i9 = 0, len8 = ref17.length; i9 < len8; i9++) {
|
|
3406
|
+
const binding = ref17[i9];
|
|
3260
3407
|
const typeSuffix = binding.parent?.typeSuffix;
|
|
3261
3408
|
if (!typeSuffix) {
|
|
3262
3409
|
continue;
|
|
@@ -3316,8 +3463,8 @@ function processSignature(f) {
|
|
|
3316
3463
|
}
|
|
3317
3464
|
if (!f.generator?.length && hasYield(block)) {
|
|
3318
3465
|
if (f.type === "ArrowFunction") {
|
|
3319
|
-
gatherRecursiveWithinFunction(block, ($
|
|
3320
|
-
const i = y.children.findIndex(($
|
|
3466
|
+
gatherRecursiveWithinFunction(block, ($12) => $12.type === "YieldExpression").forEach((y) => {
|
|
3467
|
+
const i = y.children.findIndex(($13) => $13.type === "Yield");
|
|
3321
3468
|
return y.children.splice(i + 1, 0, {
|
|
3322
3469
|
type: "Error",
|
|
3323
3470
|
message: "Can't use yield inside of => arrow function"
|
|
@@ -3333,8 +3480,8 @@ function processSignature(f) {
|
|
|
3333
3480
|
}
|
|
3334
3481
|
}
|
|
3335
3482
|
function processFunctions(statements, config2) {
|
|
3336
|
-
for (let
|
|
3337
|
-
const f =
|
|
3483
|
+
for (let ref18 = gatherRecursiveAll(statements, ($14) => $14.type === "FunctionExpression" || $14.type === "ArrowFunction"), i10 = 0, len9 = ref18.length; i10 < len9; i10++) {
|
|
3484
|
+
const f = ref18[i10];
|
|
3338
3485
|
if (f.type === "FunctionExpression") {
|
|
3339
3486
|
implicitFunctionBlock(f);
|
|
3340
3487
|
}
|
|
@@ -3342,8 +3489,8 @@ function processFunctions(statements, config2) {
|
|
|
3342
3489
|
processParams(f);
|
|
3343
3490
|
processReturn(f, config2.implicitReturns);
|
|
3344
3491
|
}
|
|
3345
|
-
for (let
|
|
3346
|
-
const f =
|
|
3492
|
+
for (let ref19 = gatherRecursiveAll(statements, ($15) => $15.type === "MethodDefinition"), i11 = 0, len10 = ref19.length; i11 < len10; i11++) {
|
|
3493
|
+
const f = ref19[i11];
|
|
3347
3494
|
implicitFunctionBlock(f);
|
|
3348
3495
|
processParams(f);
|
|
3349
3496
|
processReturn(f, config2.implicitReturns);
|
|
@@ -3396,9 +3543,9 @@ function expressionizeIteration(exp) {
|
|
|
3396
3543
|
}
|
|
3397
3544
|
let done;
|
|
3398
3545
|
if (!async) {
|
|
3399
|
-
let
|
|
3400
|
-
if ((
|
|
3401
|
-
const { block: parentBlock, index } =
|
|
3546
|
+
let ref20;
|
|
3547
|
+
if ((ref20 = blockContainingStatement(exp)) && typeof ref20 === "object" && "block" in ref20 && "index" in ref20) {
|
|
3548
|
+
const { block: parentBlock, index } = ref20;
|
|
3402
3549
|
statements[0][0] = parentBlock.expressions[index][0];
|
|
3403
3550
|
parentBlock.expressions.splice(index, index + 1 - index, ...statements);
|
|
3404
3551
|
updateParentPointers(parentBlock);
|
|
@@ -3415,8 +3562,8 @@ function expressionizeIteration(exp) {
|
|
|
3415
3562
|
}
|
|
3416
3563
|
}
|
|
3417
3564
|
function processIterationExpressions(statements) {
|
|
3418
|
-
for (let
|
|
3419
|
-
const s =
|
|
3565
|
+
for (let ref21 = gatherRecursiveAll(statements, ($16) => $16.type === "IterationExpression"), i12 = 0, len11 = ref21.length; i12 < len11; i12++) {
|
|
3566
|
+
const s = ref21[i12];
|
|
3420
3567
|
expressionizeIteration(s);
|
|
3421
3568
|
}
|
|
3422
3569
|
}
|
|
@@ -3442,12 +3589,12 @@ function processCoffeeDo(ws, expression) {
|
|
|
3442
3589
|
...parameters,
|
|
3443
3590
|
children: (() => {
|
|
3444
3591
|
const results1 = [];
|
|
3445
|
-
for (let
|
|
3446
|
-
let parameter =
|
|
3592
|
+
for (let ref22 = parameters.children, i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
|
|
3593
|
+
let parameter = ref22[i13];
|
|
3447
3594
|
if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
|
|
3448
|
-
let
|
|
3449
|
-
if (
|
|
3450
|
-
const initializer =
|
|
3595
|
+
let ref23;
|
|
3596
|
+
if (ref23 = parameter.initializer) {
|
|
3597
|
+
const initializer = ref23;
|
|
3451
3598
|
args.push(initializer.expression, parameter.delim);
|
|
3452
3599
|
parameter = {
|
|
3453
3600
|
...parameter,
|
|
@@ -3468,7 +3615,7 @@ function processCoffeeDo(ws, expression) {
|
|
|
3468
3615
|
expression = {
|
|
3469
3616
|
...expression,
|
|
3470
3617
|
parameters: newParameters,
|
|
3471
|
-
children: expression.children.map(($
|
|
3618
|
+
children: expression.children.map(($17) => $17 === parameters ? newParameters : $17)
|
|
3472
3619
|
};
|
|
3473
3620
|
}
|
|
3474
3621
|
return {
|
|
@@ -3490,7 +3637,7 @@ function makeAmpersandFunction(rhs) {
|
|
|
3490
3637
|
ref = makeRef("$");
|
|
3491
3638
|
inplacePrepend(ref, body);
|
|
3492
3639
|
}
|
|
3493
|
-
if (startsWithPredicate(body, ($
|
|
3640
|
+
if (startsWithPredicate(body, ($18) => $18.type === "ObjectExpression")) {
|
|
3494
3641
|
body = makeLeftHandSideExpression(body);
|
|
3495
3642
|
}
|
|
3496
3643
|
const parameters = makeNode({
|
|
@@ -4096,7 +4243,7 @@ function expandChainedComparisons([first, binops]) {
|
|
|
4096
4243
|
// source/parser/pattern-matching.civet
|
|
4097
4244
|
function processPatternTest(lhs, patterns) {
|
|
4098
4245
|
const { ref, refAssignmentComma } = maybeRefAssignment(lhs, "m");
|
|
4099
|
-
const conditionExpression = flatJoin(patterns.map(($) => getPatternConditions(
|
|
4246
|
+
const conditionExpression = flatJoin(patterns.map(($1) => getPatternConditions($1, ref)).map(($2) => flatJoin($2, " && ")), " || ");
|
|
4100
4247
|
return makeLeftHandSideExpression(makeNode({
|
|
4101
4248
|
type: "PatternTest",
|
|
4102
4249
|
children: [
|
|
@@ -4106,7 +4253,7 @@ function processPatternTest(lhs, patterns) {
|
|
|
4106
4253
|
}));
|
|
4107
4254
|
}
|
|
4108
4255
|
function processPatternMatching(statements) {
|
|
4109
|
-
gatherRecursiveAll(statements, ($
|
|
4256
|
+
gatherRecursiveAll(statements, ($3) => $3.type === "SwitchStatement").forEach((s) => {
|
|
4110
4257
|
const { caseBlock } = s;
|
|
4111
4258
|
const { clauses } = caseBlock;
|
|
4112
4259
|
for (let i1 = 0, len3 = clauses.length; i1 < len3; i1++) {
|
|
@@ -4120,7 +4267,7 @@ function processPatternMatching(statements) {
|
|
|
4120
4267
|
}
|
|
4121
4268
|
let errors = false;
|
|
4122
4269
|
let isPattern = false;
|
|
4123
|
-
if (clauses.some(($
|
|
4270
|
+
if (clauses.some(($4) => $4.type === "PatternClause")) {
|
|
4124
4271
|
isPattern = true;
|
|
4125
4272
|
for (let i2 = 0, len1 = clauses.length; i2 < len1; i2++) {
|
|
4126
4273
|
const c = clauses[i2];
|
|
@@ -4158,7 +4305,7 @@ function processPatternMatching(statements) {
|
|
|
4158
4305
|
}
|
|
4159
4306
|
let { patterns, block } = c;
|
|
4160
4307
|
let pattern = patterns[0];
|
|
4161
|
-
const conditionExpression = flatJoin(patterns.map(($
|
|
4308
|
+
const conditionExpression = flatJoin(patterns.map(($5) => getPatternConditions($5, ref)).map(($6) => flatJoin($6, " && ")), " || ");
|
|
4162
4309
|
const condition2 = makeNode({
|
|
4163
4310
|
type: "ParenthesizedExpression",
|
|
4164
4311
|
children: ["(", ...refAssignmentComma, conditionExpression, ")"],
|
|
@@ -4351,38 +4498,59 @@ function getPatternBlockPrefix(pattern, ref, decl = "const ", suffix) {
|
|
|
4351
4498
|
}
|
|
4352
4499
|
}
|
|
4353
4500
|
let [splices, thisAssignments] = gatherBindingCode(pattern);
|
|
4354
|
-
const
|
|
4501
|
+
const patternBindings2 = nonMatcherBindings(pattern);
|
|
4355
4502
|
splices = splices.map((s) => [", ", nonMatcherBindings(s)]);
|
|
4356
|
-
thisAssignments = thisAssignments.map(($
|
|
4357
|
-
const duplicateDeclarations = aggregateDuplicateBindings([
|
|
4503
|
+
thisAssignments = thisAssignments.map(($7) => ["", $7, ";"]);
|
|
4504
|
+
const duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices]);
|
|
4358
4505
|
return [
|
|
4359
4506
|
["", {
|
|
4360
4507
|
type: "Declaration",
|
|
4361
|
-
children: [decl,
|
|
4508
|
+
children: [decl, patternBindings2, suffix, " = ", ref, ...splices],
|
|
4362
4509
|
names: [],
|
|
4363
4510
|
bindings: []
|
|
4364
4511
|
// avoid implicit return of any bindings
|
|
4365
4512
|
}, ";"],
|
|
4366
4513
|
...thisAssignments,
|
|
4367
|
-
...duplicateDeclarations.map(($
|
|
4514
|
+
...duplicateDeclarations.map(($8) => ["", $8, ";"])
|
|
4368
4515
|
];
|
|
4369
4516
|
}
|
|
4370
4517
|
function elideMatchersFromArrayBindings(elements) {
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
case "
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4518
|
+
const results = [];
|
|
4519
|
+
for (let i5 = 0, len4 = elements.length; i5 < len4; i5++) {
|
|
4520
|
+
const element = elements[i5];
|
|
4521
|
+
switch (element.type) {
|
|
4522
|
+
case "BindingRestElement":
|
|
4523
|
+
case "ElisionElement": {
|
|
4524
|
+
results.push(element);
|
|
4525
|
+
break;
|
|
4526
|
+
}
|
|
4527
|
+
case "BindingElement": {
|
|
4528
|
+
switch (element.binding.type) {
|
|
4529
|
+
case "Literal":
|
|
4530
|
+
case "RegularExpressionLiteral":
|
|
4531
|
+
case "StringLiteral":
|
|
4532
|
+
case "PinPattern": {
|
|
4533
|
+
results.push(element.delim);
|
|
4534
|
+
break;
|
|
4535
|
+
}
|
|
4536
|
+
default: {
|
|
4537
|
+
const binding = nonMatcherBindings(element.binding);
|
|
4538
|
+
results.push(makeNode({
|
|
4539
|
+
...element,
|
|
4540
|
+
binding,
|
|
4541
|
+
children: element.children.map((c) => {
|
|
4542
|
+
return c === element.binding ? binding : c;
|
|
4543
|
+
})
|
|
4544
|
+
}));
|
|
4545
|
+
}
|
|
4546
|
+
}
|
|
4547
|
+
;
|
|
4548
|
+
break;
|
|
4549
|
+
}
|
|
4384
4550
|
}
|
|
4385
|
-
}
|
|
4551
|
+
}
|
|
4552
|
+
;
|
|
4553
|
+
return results;
|
|
4386
4554
|
}
|
|
4387
4555
|
function elideMatchersFromPropertyBindings(properties) {
|
|
4388
4556
|
return properties.map((p) => {
|
|
@@ -4390,6 +4558,10 @@ function elideMatchersFromPropertyBindings(properties) {
|
|
|
4390
4558
|
case "BindingProperty": {
|
|
4391
4559
|
const { children, name, value } = p;
|
|
4392
4560
|
const [ws] = children;
|
|
4561
|
+
const shouldElide = name.type === "NumericLiteral" && !value?.name || name.type === "ComputedPropertyName" && value?.subtype === "NumericLiteral";
|
|
4562
|
+
if (shouldElide) {
|
|
4563
|
+
return;
|
|
4564
|
+
}
|
|
4393
4565
|
switch (value && value.type) {
|
|
4394
4566
|
case "ArrayBindingPattern":
|
|
4395
4567
|
case "ObjectBindingPattern": {
|
|
@@ -4421,32 +4593,22 @@ function elideMatchersFromPropertyBindings(properties) {
|
|
|
4421
4593
|
}
|
|
4422
4594
|
function nonMatcherBindings(pattern) {
|
|
4423
4595
|
switch (pattern.type) {
|
|
4424
|
-
case "ArrayBindingPattern":
|
|
4596
|
+
case "ArrayBindingPattern":
|
|
4597
|
+
case "PostRestBindingElements": {
|
|
4425
4598
|
const elements = elideMatchersFromArrayBindings(pattern.elements);
|
|
4426
|
-
return {
|
|
4599
|
+
return makeNode({
|
|
4427
4600
|
...pattern,
|
|
4428
4601
|
elements,
|
|
4429
|
-
children: pattern.children.map(($
|
|
4430
|
-
};
|
|
4431
|
-
}
|
|
4432
|
-
case "PostRestBindingElements": {
|
|
4433
|
-
const els = elideMatchersFromArrayBindings(pattern.children[1]);
|
|
4434
|
-
return {
|
|
4435
|
-
...pattern,
|
|
4436
|
-
children: [
|
|
4437
|
-
pattern.children[0],
|
|
4438
|
-
els,
|
|
4439
|
-
...pattern.children.slice(2)
|
|
4440
|
-
]
|
|
4441
|
-
};
|
|
4602
|
+
children: pattern.children.map(($9) => $9 === pattern.elements ? elements : $9)
|
|
4603
|
+
});
|
|
4442
4604
|
}
|
|
4443
4605
|
case "ObjectBindingPattern": {
|
|
4444
4606
|
const properties = elideMatchersFromPropertyBindings(pattern.properties);
|
|
4445
|
-
return {
|
|
4607
|
+
return makeNode({
|
|
4446
4608
|
...pattern,
|
|
4447
4609
|
properties,
|
|
4448
|
-
children: pattern.children.map(($
|
|
4449
|
-
};
|
|
4610
|
+
children: pattern.children.map(($10) => $10 === pattern.properties ? properties : $10)
|
|
4611
|
+
});
|
|
4450
4612
|
}
|
|
4451
4613
|
default: {
|
|
4452
4614
|
return pattern;
|
|
@@ -4454,32 +4616,26 @@ function nonMatcherBindings(pattern) {
|
|
|
4454
4616
|
}
|
|
4455
4617
|
}
|
|
4456
4618
|
function aggregateDuplicateBindings(bindings) {
|
|
4457
|
-
const props = gatherRecursiveAll(
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
const [, e] = element;
|
|
4465
|
-
if (e.type === "Identifier") {
|
|
4466
|
-
props.push(e);
|
|
4467
|
-
} else if (e.type === "BindingRestElement") {
|
|
4468
|
-
props.push(e);
|
|
4469
|
-
}
|
|
4470
|
-
}
|
|
4471
|
-
}
|
|
4472
|
-
}
|
|
4619
|
+
const props = gatherRecursiveAll(
|
|
4620
|
+
bindings,
|
|
4621
|
+
($) => $.type === "BindingProperty" || // Don't deduplicate ...rest properties; user should do so manually
|
|
4622
|
+
// because ...rest can be named arbitrarily
|
|
4623
|
+
//$.type is "BindingRestProperty"
|
|
4624
|
+
$.type === "Identifier" && $.parent?.type === "BindingElement" || $.type === "BindingRestElement"
|
|
4625
|
+
);
|
|
4473
4626
|
const declarations = [];
|
|
4474
4627
|
const propsGroupedByName = /* @__PURE__ */ new Map();
|
|
4475
|
-
for (let
|
|
4476
|
-
const p = props[
|
|
4628
|
+
for (let i6 = 0, len5 = props.length; i6 < len5; i6++) {
|
|
4629
|
+
const p = props[i6];
|
|
4477
4630
|
const { name, value } = p;
|
|
4478
4631
|
let m1;
|
|
4479
4632
|
if (m1 = value?.type, m1 === "ArrayBindingPattern" || m1 === "ObjectBindingPattern") {
|
|
4480
4633
|
continue;
|
|
4481
4634
|
}
|
|
4482
4635
|
const key = value?.name || name?.name || name;
|
|
4636
|
+
if (key?.type === "NumericLiteral" || key?.type === "ComputedPropertyName") {
|
|
4637
|
+
continue;
|
|
4638
|
+
}
|
|
4483
4639
|
if (propsGroupedByName.has(key)) {
|
|
4484
4640
|
propsGroupedByName.get(key).push(p);
|
|
4485
4641
|
} else {
|
|
@@ -4495,8 +4651,8 @@ function aggregateDuplicateBindings(bindings) {
|
|
|
4495
4651
|
pos: 0,
|
|
4496
4652
|
input: key
|
|
4497
4653
|
})) {
|
|
4498
|
-
for (let
|
|
4499
|
-
const p = shared[
|
|
4654
|
+
for (let i7 = 0, len6 = shared.length; i7 < len6; i7++) {
|
|
4655
|
+
const p = shared[i7];
|
|
4500
4656
|
aliasBinding(p, makeRef(`_${key}`, key));
|
|
4501
4657
|
}
|
|
4502
4658
|
return;
|
|
@@ -6522,11 +6678,11 @@ function processCallMemberExpression(node) {
|
|
|
6522
6678
|
if (glob?.type === "PropertyGlob") {
|
|
6523
6679
|
let prefix = children.slice(0, i);
|
|
6524
6680
|
const parts = [];
|
|
6525
|
-
let
|
|
6526
|
-
if (prefix.length > 1) {
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
prefix = [
|
|
6681
|
+
let ref;
|
|
6682
|
+
if (prefix.length > 1 && glob.object.properties.length > 1) {
|
|
6683
|
+
ref = makeRef();
|
|
6684
|
+
const { refAssignment } = makeRefAssignment(ref, prefix);
|
|
6685
|
+
prefix = [makeLeftHandSideExpression(refAssignment)];
|
|
6530
6686
|
}
|
|
6531
6687
|
prefix = prefix.concat(glob.dot);
|
|
6532
6688
|
for (const part of glob.object.properties) {
|
|
@@ -6558,6 +6714,9 @@ function processCallMemberExpression(node) {
|
|
|
6558
6714
|
}
|
|
6559
6715
|
if (!suppressPrefix) {
|
|
6560
6716
|
value = prefix.concat(trimFirstSpace(value));
|
|
6717
|
+
if (ref != null) {
|
|
6718
|
+
prefix = [ref].concat(glob.dot);
|
|
6719
|
+
}
|
|
6561
6720
|
}
|
|
6562
6721
|
if (wValue)
|
|
6563
6722
|
value.unshift(wValue);
|
|
@@ -6568,7 +6727,8 @@ function processCallMemberExpression(node) {
|
|
|
6568
6727
|
dots: part.dots,
|
|
6569
6728
|
delim: part.delim,
|
|
6570
6729
|
names: part.names,
|
|
6571
|
-
children: part.children.slice(0, 2).concat(value, part.delim)
|
|
6730
|
+
children: part.children.slice(0, 2).concat(value, part.delim),
|
|
6731
|
+
usesRef: Boolean(ref)
|
|
6572
6732
|
});
|
|
6573
6733
|
} else {
|
|
6574
6734
|
parts.push({
|
|
@@ -6585,12 +6745,13 @@ function processCallMemberExpression(node) {
|
|
|
6585
6745
|
value,
|
|
6586
6746
|
part.delim
|
|
6587
6747
|
// comma delimiter
|
|
6588
|
-
]
|
|
6748
|
+
],
|
|
6749
|
+
usesRef: Boolean(ref)
|
|
6589
6750
|
});
|
|
6590
6751
|
}
|
|
6591
6752
|
}
|
|
6592
6753
|
let ref2;
|
|
6593
|
-
|
|
6754
|
+
const object = {
|
|
6594
6755
|
type: "ObjectExpression",
|
|
6595
6756
|
children: [
|
|
6596
6757
|
glob.object.children[0],
|
|
@@ -6601,13 +6762,6 @@ function processCallMemberExpression(node) {
|
|
|
6601
6762
|
],
|
|
6602
6763
|
properties: parts
|
|
6603
6764
|
};
|
|
6604
|
-
if (refAssignmentComma) {
|
|
6605
|
-
object = makeNode({
|
|
6606
|
-
type: "ParenthesizedExpression",
|
|
6607
|
-
children: ["(", ...refAssignmentComma, object, ")"],
|
|
6608
|
-
expression: object
|
|
6609
|
-
});
|
|
6610
|
-
}
|
|
6611
6765
|
if (i === children.length - 1)
|
|
6612
6766
|
return object;
|
|
6613
6767
|
return processCallMemberExpression({
|
|
@@ -6817,40 +6971,54 @@ function convertNamedImportsToObject(node, pattern) {
|
|
|
6817
6971
|
};
|
|
6818
6972
|
}
|
|
6819
6973
|
function convertObjectToJSXAttributes(obj) {
|
|
6820
|
-
const { properties } = obj;
|
|
6821
6974
|
const parts = [];
|
|
6822
6975
|
const rest = [];
|
|
6823
|
-
|
|
6976
|
+
let i4 = 0;
|
|
6977
|
+
for (const part of obj.properties) {
|
|
6978
|
+
const i = i4++;
|
|
6979
|
+
if (part.usesRef) {
|
|
6980
|
+
rest.push(part);
|
|
6981
|
+
continue;
|
|
6982
|
+
}
|
|
6824
6983
|
if (i > 0)
|
|
6825
6984
|
parts.push(" ");
|
|
6826
|
-
const part = properties[i];
|
|
6827
6985
|
switch (part.type) {
|
|
6828
|
-
case "Identifier":
|
|
6986
|
+
case "Identifier": {
|
|
6829
6987
|
parts.push([part.name, "={", part.name, "}"]);
|
|
6830
6988
|
break;
|
|
6831
|
-
|
|
6989
|
+
}
|
|
6990
|
+
case "Property": {
|
|
6832
6991
|
if (part.name.type === "ComputedPropertyName") {
|
|
6833
6992
|
rest.push(part);
|
|
6834
6993
|
} else {
|
|
6835
6994
|
parts.push([part.name, "={", trimFirstSpace(part.value), "}"]);
|
|
6836
6995
|
}
|
|
6996
|
+
;
|
|
6837
6997
|
break;
|
|
6838
|
-
|
|
6998
|
+
}
|
|
6999
|
+
case "SpreadProperty": {
|
|
6839
7000
|
parts.push(["{", part.dots, part.value, "}"]);
|
|
6840
7001
|
break;
|
|
6841
|
-
|
|
7002
|
+
}
|
|
7003
|
+
case "MethodDefinition": {
|
|
6842
7004
|
const func = convertMethodToFunction(part);
|
|
6843
7005
|
if (func) {
|
|
6844
7006
|
parts.push([part.name, "={", convertMethodToFunction(part), "}"]);
|
|
6845
7007
|
} else {
|
|
6846
7008
|
rest.push(part);
|
|
6847
7009
|
}
|
|
7010
|
+
;
|
|
6848
7011
|
break;
|
|
6849
|
-
|
|
7012
|
+
}
|
|
7013
|
+
default: {
|
|
6850
7014
|
throw new Error(`invalid object literal type in JSX attribute: ${part.type}`);
|
|
7015
|
+
}
|
|
6851
7016
|
}
|
|
6852
7017
|
}
|
|
6853
7018
|
if (rest.length) {
|
|
7019
|
+
if (parts.length && parts[parts.length - 1] !== " ") {
|
|
7020
|
+
parts.push(" ");
|
|
7021
|
+
}
|
|
6854
7022
|
parts.push(["{...{", ...rest, "}}"]);
|
|
6855
7023
|
}
|
|
6856
7024
|
return parts;
|
|
@@ -6911,7 +7079,7 @@ function processBindingPatternLHS(lhs, tail) {
|
|
|
6911
7079
|
tail.push(...splices.map((s) => [", ", s]), ...thisAssignments.map((a) => [", ", a]));
|
|
6912
7080
|
}
|
|
6913
7081
|
function processAssignments(statements) {
|
|
6914
|
-
for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"),
|
|
7082
|
+
for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len3 = ref7.length; i5 < len3; i5++) {
|
|
6915
7083
|
let extractAssignment2 = function(lhs) {
|
|
6916
7084
|
let expr = lhs;
|
|
6917
7085
|
while (expr.type === "ParenthesizedExpression") {
|
|
@@ -6932,7 +7100,7 @@ function processAssignments(statements) {
|
|
|
6932
7100
|
return;
|
|
6933
7101
|
};
|
|
6934
7102
|
var extractAssignment = extractAssignment2;
|
|
6935
|
-
const exp = ref7[
|
|
7103
|
+
const exp = ref7[i5];
|
|
6936
7104
|
checkValidLHS(exp.assigned);
|
|
6937
7105
|
const pre = [], post = [];
|
|
6938
7106
|
let ref8;
|
|
@@ -6941,8 +7109,8 @@ function processAssignments(statements) {
|
|
|
6941
7109
|
if (!exp.lhs) {
|
|
6942
7110
|
continue;
|
|
6943
7111
|
}
|
|
6944
|
-
for (let ref9 = exp.lhs,
|
|
6945
|
-
const lhsPart = ref9[
|
|
7112
|
+
for (let ref9 = exp.lhs, i6 = 0, len4 = ref9.length; i6 < len4; i6++) {
|
|
7113
|
+
const lhsPart = ref9[i6];
|
|
6946
7114
|
let ref10;
|
|
6947
7115
|
if (ref10 = extractAssignment2(lhsPart[1])) {
|
|
6948
7116
|
const newLhs = ref10;
|
|
@@ -6986,8 +7154,8 @@ function processAssignments(statements) {
|
|
|
6986
7154
|
}
|
|
6987
7155
|
}
|
|
6988
7156
|
}
|
|
6989
|
-
for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"),
|
|
6990
|
-
const exp = ref11[
|
|
7157
|
+
for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len5 = ref11.length; i7 < len5; i7++) {
|
|
7158
|
+
const exp = ref11[i7];
|
|
6991
7159
|
if (!(exp.names === null)) {
|
|
6992
7160
|
continue;
|
|
6993
7161
|
}
|
|
@@ -7224,101 +7392,149 @@ function attachPostfixStatementAsExpression(exp, post) {
|
|
|
7224
7392
|
}
|
|
7225
7393
|
}
|
|
7226
7394
|
function processTypes(node) {
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
}
|
|
7242
|
-
let ref18;
|
|
7243
|
-
while (unary.suffix.length && (ref18 = unary.suffix)[ref18.length - 1]?.type === "NonNullAssertion") {
|
|
7244
|
-
unary.suffix.pop();
|
|
7245
|
-
}
|
|
7246
|
-
let ref19;
|
|
7247
|
-
if (unary.suffix.length || unary.prefix.length)
|
|
7248
|
-
ref19 = unary;
|
|
7249
|
-
else
|
|
7250
|
-
ref19 = unary.t;
|
|
7251
|
-
const t = ref19;
|
|
7252
|
-
if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
|
|
7253
|
-
if (count === 1) {
|
|
7254
|
-
unary.suffix.push(last);
|
|
7255
|
-
return;
|
|
7395
|
+
const results1 = [];
|
|
7396
|
+
for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len6 = ref16.length; i8 < len6; i8++) {
|
|
7397
|
+
const unary = ref16[i8];
|
|
7398
|
+
let suffixIndex = unary.suffix.length - 1;
|
|
7399
|
+
const results2 = [];
|
|
7400
|
+
while (suffixIndex >= 0) {
|
|
7401
|
+
const suffix = unary.suffix[suffixIndex];
|
|
7402
|
+
if (typeof suffix === "object" && suffix != null && "token" in suffix && suffix.token === "?") {
|
|
7403
|
+
const { token } = suffix;
|
|
7404
|
+
let count = 0;
|
|
7405
|
+
let m4;
|
|
7406
|
+
while (m4 = unary.suffix[suffixIndex], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
|
|
7407
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7408
|
+
count++;
|
|
7256
7409
|
}
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7410
|
+
let m5;
|
|
7411
|
+
while (m5 = unary.suffix[suffixIndex], typeof m5 === "object" && m5 != null && "type" in m5 && m5.type === "NonNullAssertion") {
|
|
7412
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7413
|
+
}
|
|
7414
|
+
const { parent, prefix } = unary;
|
|
7415
|
+
unary.prefix = [];
|
|
7416
|
+
unary.children = unary.children.filter((a1) => a1 !== prefix);
|
|
7417
|
+
const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
|
|
7418
|
+
const space = getTrimmingSpace(unary);
|
|
7419
|
+
let replace;
|
|
7420
|
+
if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
|
|
7421
|
+
if (count === 1) {
|
|
7422
|
+
unary.suffix.splice(suffixIndex + 1, 0, suffix);
|
|
7423
|
+
continue;
|
|
7424
|
+
}
|
|
7425
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7426
|
+
const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
|
|
7427
|
+
replace = [
|
|
7428
|
+
space,
|
|
7429
|
+
"(",
|
|
7430
|
+
t,
|
|
7431
|
+
" | null)",
|
|
7432
|
+
suffix
|
|
7433
|
+
];
|
|
7434
|
+
} else {
|
|
7435
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7436
|
+
const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
|
|
7437
|
+
replace = makeNode({
|
|
7438
|
+
type: "TypeParenthesized",
|
|
7439
|
+
ts: true,
|
|
7440
|
+
children: [
|
|
7441
|
+
space,
|
|
7442
|
+
"(",
|
|
7443
|
+
t,
|
|
7444
|
+
count === 1 ? " | undefined" : " | undefined | null",
|
|
7445
|
+
")"
|
|
7446
|
+
]
|
|
7447
|
+
});
|
|
7448
|
+
}
|
|
7449
|
+
if (prefix.length || outer.length) {
|
|
7450
|
+
replace = makeNode({
|
|
7451
|
+
type: "TypeUnary",
|
|
7452
|
+
ts: true,
|
|
7453
|
+
t: replace,
|
|
7454
|
+
prefix,
|
|
7455
|
+
suffix: outer,
|
|
7456
|
+
children: [prefix, replace, outer]
|
|
7457
|
+
});
|
|
7458
|
+
}
|
|
7459
|
+
results2.push(replaceNode(unary, replace, parent));
|
|
7460
|
+
} else if (typeof suffix === "object" && suffix != null && "type" in suffix && suffix.type === "NonNullAssertion") {
|
|
7461
|
+
const { type } = suffix;
|
|
7462
|
+
let m6;
|
|
7463
|
+
while (m6 = unary.suffix[suffixIndex], typeof m6 === "object" && m6 != null && "type" in m6 && m6.type === "NonNullAssertion") {
|
|
7464
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7465
|
+
}
|
|
7466
|
+
let m7;
|
|
7467
|
+
while (m7 = unary.suffix[suffixIndex], typeof m7 === "object" && m7 != null && "token" in m7 && m7.token === "?") {
|
|
7468
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7469
|
+
}
|
|
7470
|
+
const { parent, prefix } = unary;
|
|
7471
|
+
unary.prefix = [];
|
|
7472
|
+
unary.children = unary.children.filter((a2) => a2 !== prefix);
|
|
7473
|
+
const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
|
|
7474
|
+
const space = getTrimmingSpace(unary);
|
|
7475
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7476
|
+
let ref17;
|
|
7477
|
+
if (unary.suffix.length)
|
|
7478
|
+
ref17 = unary;
|
|
7479
|
+
else
|
|
7480
|
+
ref17 = unary.t;
|
|
7481
|
+
const t = ref17;
|
|
7482
|
+
const arg = makeNode({
|
|
7483
|
+
type: "TypeArgument",
|
|
7484
|
+
ts: true,
|
|
7485
|
+
t,
|
|
7486
|
+
children: [t]
|
|
7487
|
+
});
|
|
7488
|
+
const argArray = [arg];
|
|
7489
|
+
const args = makeNode({
|
|
7490
|
+
type: "TypeArguments",
|
|
7267
7491
|
ts: true,
|
|
7492
|
+
args: argArray,
|
|
7493
|
+
children: ["<", argArray, ">"]
|
|
7494
|
+
});
|
|
7495
|
+
let replace = makeNode({
|
|
7496
|
+
type: "TypeIdentifier",
|
|
7497
|
+
raw: "NonNullable",
|
|
7498
|
+
args,
|
|
7268
7499
|
children: [
|
|
7269
|
-
|
|
7270
|
-
"
|
|
7271
|
-
|
|
7272
|
-
count === 1 ? " | undefined" : " | undefined | null",
|
|
7273
|
-
")"
|
|
7500
|
+
space,
|
|
7501
|
+
"NonNullable",
|
|
7502
|
+
args
|
|
7274
7503
|
]
|
|
7275
7504
|
});
|
|
7505
|
+
if (prefix.length || outer.length) {
|
|
7506
|
+
replace = makeNode({
|
|
7507
|
+
type: "TypeUnary",
|
|
7508
|
+
ts: true,
|
|
7509
|
+
t: replace,
|
|
7510
|
+
prefix,
|
|
7511
|
+
suffix: outer,
|
|
7512
|
+
children: [prefix, replace, outer]
|
|
7513
|
+
});
|
|
7514
|
+
}
|
|
7515
|
+
results2.push(replaceNode(unary, replace, parent));
|
|
7516
|
+
} else {
|
|
7517
|
+
results2.push(suffixIndex--);
|
|
7276
7518
|
}
|
|
7277
|
-
} else if (typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "NonNullAssertion") {
|
|
7278
|
-
const { type } = m4;
|
|
7279
|
-
let ref20;
|
|
7280
|
-
while (unary.suffix.length && (ref20 = unary.suffix)[ref20.length - 1]?.type === "NonNullAssertion") {
|
|
7281
|
-
unary.suffix.pop();
|
|
7282
|
-
}
|
|
7283
|
-
let ref21;
|
|
7284
|
-
while (unary.suffix.length && (ref21 = unary.suffix)[ref21.length - 1]?.token === "?") {
|
|
7285
|
-
unary.suffix.pop();
|
|
7286
|
-
}
|
|
7287
|
-
const t = trimFirstSpace(
|
|
7288
|
-
unary.suffix.length || unary.prefix.length ? unary : unary.t
|
|
7289
|
-
);
|
|
7290
|
-
const args = {
|
|
7291
|
-
type: "TypeArguments",
|
|
7292
|
-
ts: true,
|
|
7293
|
-
types: [t],
|
|
7294
|
-
children: ["<", t, ">"]
|
|
7295
|
-
};
|
|
7296
|
-
replaceNode(unary, {
|
|
7297
|
-
type: "TypeIdentifier",
|
|
7298
|
-
raw: "NonNullable",
|
|
7299
|
-
args,
|
|
7300
|
-
children: [
|
|
7301
|
-
getTrimmingSpace(unary),
|
|
7302
|
-
"NonNullable",
|
|
7303
|
-
args
|
|
7304
|
-
]
|
|
7305
|
-
});
|
|
7306
7519
|
}
|
|
7307
|
-
|
|
7520
|
+
results1.push(results2);
|
|
7521
|
+
}
|
|
7522
|
+
;
|
|
7523
|
+
return results1;
|
|
7308
7524
|
}
|
|
7309
7525
|
function processStatementExpressions(statements) {
|
|
7310
|
-
for (let
|
|
7311
|
-
const exp =
|
|
7526
|
+
for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len7 = ref18.length; i9 < len7; i9++) {
|
|
7527
|
+
const exp = ref18[i9];
|
|
7312
7528
|
const { maybe, statement } = exp;
|
|
7313
7529
|
if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
|
|
7314
7530
|
replaceNode(exp, statement);
|
|
7315
7531
|
continue;
|
|
7316
7532
|
}
|
|
7317
|
-
let
|
|
7533
|
+
let ref19;
|
|
7318
7534
|
switch (statement.type) {
|
|
7319
7535
|
case "IfStatement": {
|
|
7320
|
-
if (
|
|
7321
|
-
const expression =
|
|
7536
|
+
if (ref19 = expressionizeIfStatement(statement)) {
|
|
7537
|
+
const expression = ref19;
|
|
7322
7538
|
replaceNode(statement, expression, exp);
|
|
7323
7539
|
} else {
|
|
7324
7540
|
replaceNode(statement, wrapIIFE([["", statement]]), exp);
|
|
@@ -7376,13 +7592,13 @@ function processNegativeIndexAccess(statements) {
|
|
|
7376
7592
|
});
|
|
7377
7593
|
}
|
|
7378
7594
|
function processFinallyClauses(statements) {
|
|
7379
|
-
for (let
|
|
7380
|
-
let f =
|
|
7381
|
-
let
|
|
7382
|
-
if (!((
|
|
7595
|
+
for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len8 = ref20.length; i10 < len8; i10++) {
|
|
7596
|
+
let f = ref20[i10];
|
|
7597
|
+
let ref21;
|
|
7598
|
+
if (!((ref21 = blockContainingStatement(f)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21)) {
|
|
7383
7599
|
throw new Error("finally clause must be inside try statement or block");
|
|
7384
7600
|
}
|
|
7385
|
-
const { block, index } =
|
|
7601
|
+
const { block, index } = ref21;
|
|
7386
7602
|
const indent = block.expressions[index][0];
|
|
7387
7603
|
const expressions = block.expressions.slice(index + 1);
|
|
7388
7604
|
const t = makeNode({
|
|
@@ -7419,7 +7635,7 @@ function processProgram(root) {
|
|
|
7419
7635
|
if (config2.iife || config2.repl) {
|
|
7420
7636
|
rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
|
|
7421
7637
|
const newExpressions = [["", rootIIFE]];
|
|
7422
|
-
root.children = root.children.map(($
|
|
7638
|
+
root.children = root.children.map(($13) => $13 === root.expressions ? newExpressions : $13);
|
|
7423
7639
|
root.expressions = newExpressions;
|
|
7424
7640
|
}
|
|
7425
7641
|
addParentPointers(root);
|
|
@@ -7460,10 +7676,10 @@ async function processProgramAsync(root) {
|
|
|
7460
7676
|
await processComptime(statements);
|
|
7461
7677
|
}
|
|
7462
7678
|
function processRepl(root, rootIIFE) {
|
|
7463
|
-
const topBlock = gatherRecursive(rootIIFE, ($
|
|
7679
|
+
const topBlock = gatherRecursive(rootIIFE, ($14) => $14.type === "BlockStatement")[0];
|
|
7464
7680
|
let i = 0;
|
|
7465
|
-
for (let
|
|
7466
|
-
const decl =
|
|
7681
|
+
for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($15) => $15.type === "Declaration"), i11 = 0, len9 = ref22.length; i11 < len9; i11++) {
|
|
7682
|
+
const decl = ref22[i11];
|
|
7467
7683
|
if (!decl.names?.length) {
|
|
7468
7684
|
continue;
|
|
7469
7685
|
}
|
|
@@ -7476,8 +7692,8 @@ function processRepl(root, rootIIFE) {
|
|
|
7476
7692
|
root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]);
|
|
7477
7693
|
}
|
|
7478
7694
|
}
|
|
7479
|
-
for (let
|
|
7480
|
-
const func =
|
|
7695
|
+
for (let ref23 = gatherRecursive(topBlock, ($16) => $16.type === "FunctionExpression"), i12 = 0, len10 = ref23.length; i12 < len10; i12++) {
|
|
7696
|
+
const func = ref23[i12];
|
|
7481
7697
|
if (func.name && func.parent?.type === "BlockStatement") {
|
|
7482
7698
|
if (func.parent === topBlock) {
|
|
7483
7699
|
replaceNode(func, void 0);
|
|
@@ -7489,17 +7705,17 @@ function processRepl(root, rootIIFE) {
|
|
|
7489
7705
|
}
|
|
7490
7706
|
}
|
|
7491
7707
|
}
|
|
7492
|
-
for (let
|
|
7493
|
-
const classExp =
|
|
7494
|
-
let
|
|
7495
|
-
if (classExp.name && classExp.parent === topBlock || (
|
|
7708
|
+
for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($17) => $17.type === "ClassExpression"), i13 = 0, len11 = ref24.length; i13 < len11; i13++) {
|
|
7709
|
+
const classExp = ref24[i13];
|
|
7710
|
+
let m8;
|
|
7711
|
+
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)) {
|
|
7496
7712
|
classExp.children.unshift(classExp.name, "=");
|
|
7497
7713
|
root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]);
|
|
7498
7714
|
}
|
|
7499
7715
|
}
|
|
7500
7716
|
}
|
|
7501
7717
|
function populateRefs(statements) {
|
|
7502
|
-
const refNodes = gatherRecursive(statements, ($
|
|
7718
|
+
const refNodes = gatherRecursive(statements, ($18) => $18.type === "Ref");
|
|
7503
7719
|
if (refNodes.length) {
|
|
7504
7720
|
const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
|
|
7505
7721
|
const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
|
|
@@ -7522,8 +7738,8 @@ function populateRefs(statements) {
|
|
|
7522
7738
|
function processPlaceholders(statements) {
|
|
7523
7739
|
const placeholderMap = /* @__PURE__ */ new Map();
|
|
7524
7740
|
const liftedIfs = /* @__PURE__ */ new Set();
|
|
7525
|
-
for (let
|
|
7526
|
-
const exp =
|
|
7741
|
+
for (let ref25 = gatherRecursiveAll(statements, ($19) => $19.type === "Placeholder"), i14 = 0, len12 = ref25.length; i14 < len12; i14++) {
|
|
7742
|
+
const exp = ref25[i14];
|
|
7527
7743
|
let ancestor;
|
|
7528
7744
|
if (exp.subtype === ".") {
|
|
7529
7745
|
({ ancestor } = findAncestor(
|
|
@@ -7531,8 +7747,8 @@ function processPlaceholders(statements) {
|
|
|
7531
7747
|
($) => $.type === "Call" && !$.parent?.implicit
|
|
7532
7748
|
));
|
|
7533
7749
|
ancestor = ancestor?.parent;
|
|
7534
|
-
let
|
|
7535
|
-
while (ancestor?.parent != null && (
|
|
7750
|
+
let m9;
|
|
7751
|
+
while (ancestor?.parent != null && (m9 = ancestor.parent.type, m9 === "UnaryExpression" || m9 === "NewExpression" || m9 === "AwaitExpression" || m9 === "ThrowStatement" || m9 === "StatementExpression")) {
|
|
7536
7752
|
ancestor = ancestor.parent;
|
|
7537
7753
|
}
|
|
7538
7754
|
if (!ancestor) {
|
|
@@ -7549,10 +7765,10 @@ function processPlaceholders(statements) {
|
|
|
7549
7765
|
if (type === "IfStatement") {
|
|
7550
7766
|
liftedIfs.add(ancestor2);
|
|
7551
7767
|
}
|
|
7552
|
-
let
|
|
7553
|
-
let
|
|
7768
|
+
let m10;
|
|
7769
|
+
let m11;
|
|
7554
7770
|
return type === "Call" && !ancestor2.parent?.implicit || // Block, except for if/else blocks when condition already lifted
|
|
7555
|
-
type === "BlockStatement" && !((
|
|
7771
|
+
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
|
|
7556
7772
|
type === "Initializer" || // Right-hand side of assignment
|
|
7557
7773
|
type === "AssignmentExpression" && findChildIndex(ancestor2, child2) === ancestor2.children.indexOf(ancestor2.expression) || type === "ReturnStatement" || type === "YieldExpression";
|
|
7558
7774
|
}));
|
|
@@ -7626,11 +7842,11 @@ function processPlaceholders(statements) {
|
|
|
7626
7842
|
for (const [ancestor, placeholders] of placeholderMap) {
|
|
7627
7843
|
let ref = makeRef("$");
|
|
7628
7844
|
let typeSuffix;
|
|
7629
|
-
for (let
|
|
7630
|
-
const placeholder = placeholders[
|
|
7845
|
+
for (let i15 = 0, len13 = placeholders.length; i15 < len13; i15++) {
|
|
7846
|
+
const placeholder = placeholders[i15];
|
|
7631
7847
|
typeSuffix ??= placeholder.typeSuffix;
|
|
7632
|
-
let
|
|
7633
|
-
replaceNode((
|
|
7848
|
+
let ref26;
|
|
7849
|
+
replaceNode((ref26 = placeholder.children)[ref26.length - 1], ref);
|
|
7634
7850
|
}
|
|
7635
7851
|
const { parent } = ancestor;
|
|
7636
7852
|
const body = maybeUnwrap(ancestor);
|
|
@@ -7651,16 +7867,16 @@ function processPlaceholders(statements) {
|
|
|
7651
7867
|
}
|
|
7652
7868
|
case "PipelineExpression": {
|
|
7653
7869
|
const i = findChildIndex(parent, ancestor);
|
|
7654
|
-
let
|
|
7870
|
+
let ref27;
|
|
7655
7871
|
if (i === 1) {
|
|
7656
|
-
|
|
7872
|
+
ref27 = ancestor === parent.children[i];
|
|
7657
7873
|
} else if (i === 2) {
|
|
7658
|
-
|
|
7874
|
+
ref27 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
|
|
7659
7875
|
} else {
|
|
7660
|
-
|
|
7876
|
+
ref27 = void 0;
|
|
7661
7877
|
}
|
|
7662
7878
|
;
|
|
7663
|
-
outer =
|
|
7879
|
+
outer = ref27;
|
|
7664
7880
|
break;
|
|
7665
7881
|
}
|
|
7666
7882
|
case "AssignmentExpression":
|
|
@@ -7675,9 +7891,9 @@ function processPlaceholders(statements) {
|
|
|
7675
7891
|
fnExp = makeLeftHandSideExpression(fnExp);
|
|
7676
7892
|
}
|
|
7677
7893
|
replaceNode(ancestor, fnExp, parent);
|
|
7678
|
-
let
|
|
7679
|
-
if (
|
|
7680
|
-
const ws =
|
|
7894
|
+
let ref28;
|
|
7895
|
+
if (ref28 = getTrimmingSpace(body)) {
|
|
7896
|
+
const ws = ref28;
|
|
7681
7897
|
inplaceInsertTrimmingSpace(body, "");
|
|
7682
7898
|
inplacePrepend(ws, fnExp);
|
|
7683
7899
|
}
|
|
@@ -7722,8 +7938,8 @@ function reorderBindingRestProperty(props) {
|
|
|
7722
7938
|
}
|
|
7723
7939
|
];
|
|
7724
7940
|
}
|
|
7725
|
-
let
|
|
7726
|
-
if (Array.isArray(rest.delim) && (
|
|
7941
|
+
let ref29;
|
|
7942
|
+
if (Array.isArray(rest.delim) && (ref29 = rest.delim)[ref29.length - 1]?.token === ",") {
|
|
7727
7943
|
rest.delim = rest.delim.slice(0, -1);
|
|
7728
7944
|
rest.children = [...rest.children.slice(0, -1), rest.delim];
|
|
7729
7945
|
}
|
|
@@ -7820,11 +8036,7 @@ var grammar = {
|
|
|
7820
8036
|
ApplicationStart,
|
|
7821
8037
|
ForbiddenImplicitCalls,
|
|
7822
8038
|
ReservedBinary,
|
|
7823
|
-
|
|
7824
|
-
TrailingMemberExpressions,
|
|
7825
|
-
IndentedTrailingMemberExpressions,
|
|
7826
|
-
NestedTrailingMemberExpression,
|
|
7827
|
-
AllowedTrailingMemberExpressions,
|
|
8039
|
+
ArgumentsWithTrailingCallExpressions,
|
|
7828
8040
|
TrailingCallExpressions,
|
|
7829
8041
|
IndentedTrailingCallExpressions,
|
|
7830
8042
|
NestedTrailingCallExpression,
|
|
@@ -7939,6 +8151,7 @@ var grammar = {
|
|
|
7939
8151
|
ImplicitAccessStart,
|
|
7940
8152
|
PropertyAccessModifier,
|
|
7941
8153
|
PropertyAccess,
|
|
8154
|
+
ExplicitPropertyGlob,
|
|
7942
8155
|
PropertyGlob,
|
|
7943
8156
|
PropertyBind,
|
|
7944
8157
|
SuperProperty,
|
|
@@ -8761,125 +8974,126 @@ var $L123 = (0, import_lib2.$L)("sum");
|
|
|
8761
8974
|
var $L124 = (0, import_lib2.$L)("product");
|
|
8762
8975
|
var $L125 = (0, import_lib2.$L)("min");
|
|
8763
8976
|
var $L126 = (0, import_lib2.$L)("max");
|
|
8764
|
-
var $L127 = (0, import_lib2.$L)("
|
|
8765
|
-
var $L128 = (0, import_lib2.$L)("
|
|
8766
|
-
var $L129 = (0, import_lib2.$L)("
|
|
8767
|
-
var $L130 = (0, import_lib2.$L)("
|
|
8768
|
-
var $L131 = (0, import_lib2.$L)("
|
|
8769
|
-
var $L132 = (0, import_lib2.$L)("
|
|
8770
|
-
var $L133 = (0, import_lib2.$L)("
|
|
8771
|
-
var $L134 = (0, import_lib2.$L)("
|
|
8772
|
-
var $L135 = (0, import_lib2.$L)("
|
|
8773
|
-
var $L136 = (0, import_lib2.$L)("
|
|
8774
|
-
var $L137 = (0, import_lib2.$L)("
|
|
8775
|
-
var $L138 = (0, import_lib2.$L)("
|
|
8776
|
-
var $L139 = (0, import_lib2.$L)("
|
|
8777
|
-
var $L140 = (0, import_lib2.$L)("
|
|
8778
|
-
var $L141 = (0, import_lib2.$L)("
|
|
8779
|
-
var $L142 = (0, import_lib2.$L)("
|
|
8780
|
-
var $L143 = (0, import_lib2.$L)("
|
|
8781
|
-
var $L144 = (0, import_lib2.$L)("
|
|
8782
|
-
var $L145 = (0, import_lib2.$L)("
|
|
8783
|
-
var $L146 = (0, import_lib2.$L)("
|
|
8784
|
-
var $L147 = (0, import_lib2.$L)("
|
|
8785
|
-
var $L148 = (0, import_lib2.$L)("
|
|
8786
|
-
var $L149 = (0, import_lib2.$L)("
|
|
8787
|
-
var $L150 = (0, import_lib2.$L)("
|
|
8788
|
-
var $L151 = (0, import_lib2.$L)("
|
|
8789
|
-
var $L152 = (0, import_lib2.$L)("
|
|
8790
|
-
var $L153 = (0, import_lib2.$L)("
|
|
8791
|
-
var $L154 = (0, import_lib2.$L)("
|
|
8792
|
-
var $L155 = (0, import_lib2.$L)("
|
|
8793
|
-
var $L156 = (0, import_lib2.$L)("
|
|
8794
|
-
var $L157 = (0, import_lib2.$L)("
|
|
8795
|
-
var $L158 = (0, import_lib2.$L)("
|
|
8796
|
-
var $L159 = (0, import_lib2.$L)("
|
|
8797
|
-
var $L160 = (0, import_lib2.$L)("
|
|
8798
|
-
var $L161 = (0, import_lib2.$L)("
|
|
8799
|
-
var $L162 = (0, import_lib2.$L)("
|
|
8800
|
-
var $L163 = (0, import_lib2.$L)(
|
|
8801
|
-
var $L164 = (0, import_lib2.$L)("
|
|
8802
|
-
var $L165 = (0, import_lib2.$L)("
|
|
8803
|
-
var $L166 = (0, import_lib2.$L)("
|
|
8804
|
-
var $L167 = (0, import_lib2.$L)("
|
|
8805
|
-
var $L168 = (0, import_lib2.$L)("
|
|
8806
|
-
var $L169 = (0, import_lib2.$L)("
|
|
8807
|
-
var $L170 = (0, import_lib2.$L)("
|
|
8808
|
-
var $L171 = (0, import_lib2.$L)("
|
|
8809
|
-
var $L172 = (0, import_lib2.$L)("
|
|
8810
|
-
var $L173 = (0, import_lib2.$L)("
|
|
8811
|
-
var $L174 = (0, import_lib2.$L)("
|
|
8812
|
-
var $L175 = (0, import_lib2.$L)("
|
|
8813
|
-
var $L176 = (0, import_lib2.$L)("
|
|
8814
|
-
var $L177 = (0, import_lib2.$L)("
|
|
8815
|
-
var $L178 = (0, import_lib2.$L)("
|
|
8816
|
-
var $L179 = (0, import_lib2.$L)("
|
|
8817
|
-
var $L180 = (0, import_lib2.$L)("
|
|
8818
|
-
var $L181 = (0, import_lib2.$L)("
|
|
8819
|
-
var $L182 = (0, import_lib2.$L)("
|
|
8820
|
-
var $L183 = (0, import_lib2.$L)("
|
|
8821
|
-
var $L184 = (0, import_lib2.$L)("
|
|
8822
|
-
var $L185 = (0, import_lib2.$L)("
|
|
8823
|
-
var $L186 = (0, import_lib2.$L)("
|
|
8824
|
-
var $L187 = (0, import_lib2.$L)("
|
|
8825
|
-
var $L188 = (0, import_lib2.$L)("
|
|
8826
|
-
var $L189 = (0, import_lib2.$L)("
|
|
8827
|
-
var $L190 = (0, import_lib2.$L)("
|
|
8828
|
-
var $L191 = (0, import_lib2.$L)("
|
|
8829
|
-
var $L192 = (0, import_lib2.$L)("
|
|
8830
|
-
var $L193 = (0, import_lib2.$L)("
|
|
8831
|
-
var $L194 = (0, import_lib2.$L)("
|
|
8832
|
-
var $L195 = (0, import_lib2.$L)("
|
|
8833
|
-
var $L196 = (0, import_lib2.$L)("
|
|
8834
|
-
var $L197 = (0, import_lib2.$L)("
|
|
8835
|
-
var $L198 = (0, import_lib2.$L)("
|
|
8836
|
-
var $L199 = (0, import_lib2.$L)("
|
|
8837
|
-
var $L200 = (0, import_lib2.$L)("
|
|
8838
|
-
var $L201 = (0, import_lib2.$L)("
|
|
8839
|
-
var $L202 = (0, import_lib2.$L)("
|
|
8840
|
-
var $L203 = (0, import_lib2.$L)("
|
|
8841
|
-
var $L204 = (0, import_lib2.$L)("
|
|
8842
|
-
var $L205 = (0, import_lib2.$L)("
|
|
8843
|
-
var $L206 = (0, import_lib2.$L)("
|
|
8844
|
-
var $L207 = (0, import_lib2.$L)("
|
|
8845
|
-
var $L208 = (0, import_lib2.$L)("
|
|
8846
|
-
var $L209 = (0, import_lib2.$L)("
|
|
8847
|
-
var $L210 = (0, import_lib2.$L)("
|
|
8848
|
-
var $L211 = (0, import_lib2.$L)("
|
|
8849
|
-
var $L212 = (0, import_lib2.$L)("
|
|
8850
|
-
var $L213 = (0, import_lib2.$L)(
|
|
8851
|
-
var $L214 = (0, import_lib2.$L)("'
|
|
8852
|
-
var $L215 = (0, import_lib2.$L)("
|
|
8853
|
-
var $L216 = (0, import_lib2.$L)("
|
|
8854
|
-
var $L217 = (0, import_lib2.$L)("
|
|
8855
|
-
var $L218 = (0, import_lib2.$L)("
|
|
8856
|
-
var $L219 = (0, import_lib2.$L)("
|
|
8857
|
-
var $L220 = (0, import_lib2.$L)("
|
|
8858
|
-
var $L221 = (0, import_lib2.$L)("
|
|
8859
|
-
var $L222 = (0, import_lib2.$L)("
|
|
8860
|
-
var $L223 = (0, import_lib2.$L)("
|
|
8861
|
-
var $L224 = (0, import_lib2.$L)("
|
|
8862
|
-
var $L225 = (0, import_lib2.$L)("
|
|
8863
|
-
var $L226 = (0, import_lib2.$L)("
|
|
8864
|
-
var $L227 = (0, import_lib2.$L)("
|
|
8865
|
-
var $L228 = (0, import_lib2.$L)("
|
|
8866
|
-
var $L229 = (0, import_lib2.$L)("
|
|
8867
|
-
var $L230 = (0, import_lib2.$L)("
|
|
8868
|
-
var $L231 = (0, import_lib2.$L)("
|
|
8869
|
-
var $L232 = (0, import_lib2.$L)("
|
|
8870
|
-
var $L233 = (0, import_lib2.$L)("
|
|
8871
|
-
var $L234 = (0, import_lib2.$L)("
|
|
8872
|
-
var $L235 = (0, import_lib2.$L)("
|
|
8873
|
-
var $L236 = (0, import_lib2.$L)("
|
|
8874
|
-
var $L237 = (0, import_lib2.$L)("
|
|
8875
|
-
var $L238 = (0, import_lib2.$L)("
|
|
8876
|
-
var $L239 = (0, import_lib2.$L)("
|
|
8877
|
-
var $L240 = (0, import_lib2.$L)("
|
|
8878
|
-
var $L241 = (0, import_lib2.$L)("
|
|
8879
|
-
var $L242 = (0, import_lib2.$L)("
|
|
8880
|
-
var $L243 = (0, import_lib2.$L)("
|
|
8881
|
-
var $L244 = (0, import_lib2.$L)("
|
|
8882
|
-
var $L245 = (0, import_lib2.$L)("
|
|
8977
|
+
var $L127 = (0, import_lib2.$L)("join");
|
|
8978
|
+
var $L128 = (0, import_lib2.$L)("break");
|
|
8979
|
+
var $L129 = (0, import_lib2.$L)("continue");
|
|
8980
|
+
var $L130 = (0, import_lib2.$L)("debugger");
|
|
8981
|
+
var $L131 = (0, import_lib2.$L)("require");
|
|
8982
|
+
var $L132 = (0, import_lib2.$L)("with");
|
|
8983
|
+
var $L133 = (0, import_lib2.$L)("assert");
|
|
8984
|
+
var $L134 = (0, import_lib2.$L)(":=");
|
|
8985
|
+
var $L135 = (0, import_lib2.$L)("\u2254");
|
|
8986
|
+
var $L136 = (0, import_lib2.$L)(".=");
|
|
8987
|
+
var $L137 = (0, import_lib2.$L)("::=");
|
|
8988
|
+
var $L138 = (0, import_lib2.$L)("/*");
|
|
8989
|
+
var $L139 = (0, import_lib2.$L)("*/");
|
|
8990
|
+
var $L140 = (0, import_lib2.$L)("\\");
|
|
8991
|
+
var $L141 = (0, import_lib2.$L)(")");
|
|
8992
|
+
var $L142 = (0, import_lib2.$L)("abstract");
|
|
8993
|
+
var $L143 = (0, import_lib2.$L)("as");
|
|
8994
|
+
var $L144 = (0, import_lib2.$L)("@");
|
|
8995
|
+
var $L145 = (0, import_lib2.$L)("@@");
|
|
8996
|
+
var $L146 = (0, import_lib2.$L)("async");
|
|
8997
|
+
var $L147 = (0, import_lib2.$L)("await");
|
|
8998
|
+
var $L148 = (0, import_lib2.$L)("`");
|
|
8999
|
+
var $L149 = (0, import_lib2.$L)("by");
|
|
9000
|
+
var $L150 = (0, import_lib2.$L)("case");
|
|
9001
|
+
var $L151 = (0, import_lib2.$L)("catch");
|
|
9002
|
+
var $L152 = (0, import_lib2.$L)("class");
|
|
9003
|
+
var $L153 = (0, import_lib2.$L)("#{");
|
|
9004
|
+
var $L154 = (0, import_lib2.$L)("comptime");
|
|
9005
|
+
var $L155 = (0, import_lib2.$L)("declare");
|
|
9006
|
+
var $L156 = (0, import_lib2.$L)("default");
|
|
9007
|
+
var $L157 = (0, import_lib2.$L)("delete");
|
|
9008
|
+
var $L158 = (0, import_lib2.$L)("do");
|
|
9009
|
+
var $L159 = (0, import_lib2.$L)("..");
|
|
9010
|
+
var $L160 = (0, import_lib2.$L)("\u2025");
|
|
9011
|
+
var $L161 = (0, import_lib2.$L)("...");
|
|
9012
|
+
var $L162 = (0, import_lib2.$L)("\u2026");
|
|
9013
|
+
var $L163 = (0, import_lib2.$L)("::");
|
|
9014
|
+
var $L164 = (0, import_lib2.$L)('"');
|
|
9015
|
+
var $L165 = (0, import_lib2.$L)("each");
|
|
9016
|
+
var $L166 = (0, import_lib2.$L)("else");
|
|
9017
|
+
var $L167 = (0, import_lib2.$L)("!");
|
|
9018
|
+
var $L168 = (0, import_lib2.$L)("export");
|
|
9019
|
+
var $L169 = (0, import_lib2.$L)("extends");
|
|
9020
|
+
var $L170 = (0, import_lib2.$L)("finally");
|
|
9021
|
+
var $L171 = (0, import_lib2.$L)("for");
|
|
9022
|
+
var $L172 = (0, import_lib2.$L)("from");
|
|
9023
|
+
var $L173 = (0, import_lib2.$L)("function");
|
|
9024
|
+
var $L174 = (0, import_lib2.$L)("get");
|
|
9025
|
+
var $L175 = (0, import_lib2.$L)("set");
|
|
9026
|
+
var $L176 = (0, import_lib2.$L)("#");
|
|
9027
|
+
var $L177 = (0, import_lib2.$L)("if");
|
|
9028
|
+
var $L178 = (0, import_lib2.$L)("in");
|
|
9029
|
+
var $L179 = (0, import_lib2.$L)("infer");
|
|
9030
|
+
var $L180 = (0, import_lib2.$L)("let");
|
|
9031
|
+
var $L181 = (0, import_lib2.$L)("const");
|
|
9032
|
+
var $L182 = (0, import_lib2.$L)("is");
|
|
9033
|
+
var $L183 = (0, import_lib2.$L)("var");
|
|
9034
|
+
var $L184 = (0, import_lib2.$L)("like");
|
|
9035
|
+
var $L185 = (0, import_lib2.$L)("loop");
|
|
9036
|
+
var $L186 = (0, import_lib2.$L)("new");
|
|
9037
|
+
var $L187 = (0, import_lib2.$L)("not");
|
|
9038
|
+
var $L188 = (0, import_lib2.$L)("of");
|
|
9039
|
+
var $L189 = (0, import_lib2.$L)("[");
|
|
9040
|
+
var $L190 = (0, import_lib2.$L)("operator");
|
|
9041
|
+
var $L191 = (0, import_lib2.$L)("override");
|
|
9042
|
+
var $L192 = (0, import_lib2.$L)("own");
|
|
9043
|
+
var $L193 = (0, import_lib2.$L)("public");
|
|
9044
|
+
var $L194 = (0, import_lib2.$L)("private");
|
|
9045
|
+
var $L195 = (0, import_lib2.$L)("protected");
|
|
9046
|
+
var $L196 = (0, import_lib2.$L)("||>");
|
|
9047
|
+
var $L197 = (0, import_lib2.$L)("|\u25B7");
|
|
9048
|
+
var $L198 = (0, import_lib2.$L)("|>=");
|
|
9049
|
+
var $L199 = (0, import_lib2.$L)("\u25B7=");
|
|
9050
|
+
var $L200 = (0, import_lib2.$L)("|>");
|
|
9051
|
+
var $L201 = (0, import_lib2.$L)("\u25B7");
|
|
9052
|
+
var $L202 = (0, import_lib2.$L)("readonly");
|
|
9053
|
+
var $L203 = (0, import_lib2.$L)("return");
|
|
9054
|
+
var $L204 = (0, import_lib2.$L)("satisfies");
|
|
9055
|
+
var $L205 = (0, import_lib2.$L)("'");
|
|
9056
|
+
var $L206 = (0, import_lib2.$L)("static");
|
|
9057
|
+
var $L207 = (0, import_lib2.$L)("${");
|
|
9058
|
+
var $L208 = (0, import_lib2.$L)("super");
|
|
9059
|
+
var $L209 = (0, import_lib2.$L)("switch");
|
|
9060
|
+
var $L210 = (0, import_lib2.$L)("target");
|
|
9061
|
+
var $L211 = (0, import_lib2.$L)("then");
|
|
9062
|
+
var $L212 = (0, import_lib2.$L)("this");
|
|
9063
|
+
var $L213 = (0, import_lib2.$L)("throw");
|
|
9064
|
+
var $L214 = (0, import_lib2.$L)('"""');
|
|
9065
|
+
var $L215 = (0, import_lib2.$L)("'''");
|
|
9066
|
+
var $L216 = (0, import_lib2.$L)("///");
|
|
9067
|
+
var $L217 = (0, import_lib2.$L)("```");
|
|
9068
|
+
var $L218 = (0, import_lib2.$L)("try");
|
|
9069
|
+
var $L219 = (0, import_lib2.$L)("typeof");
|
|
9070
|
+
var $L220 = (0, import_lib2.$L)("undefined");
|
|
9071
|
+
var $L221 = (0, import_lib2.$L)("unless");
|
|
9072
|
+
var $L222 = (0, import_lib2.$L)("until");
|
|
9073
|
+
var $L223 = (0, import_lib2.$L)("using");
|
|
9074
|
+
var $L224 = (0, import_lib2.$L)("void");
|
|
9075
|
+
var $L225 = (0, import_lib2.$L)("when");
|
|
9076
|
+
var $L226 = (0, import_lib2.$L)("while");
|
|
9077
|
+
var $L227 = (0, import_lib2.$L)("yield");
|
|
9078
|
+
var $L228 = (0, import_lib2.$L)("/>");
|
|
9079
|
+
var $L229 = (0, import_lib2.$L)("</");
|
|
9080
|
+
var $L230 = (0, import_lib2.$L)("<>");
|
|
9081
|
+
var $L231 = (0, import_lib2.$L)("</>");
|
|
9082
|
+
var $L232 = (0, import_lib2.$L)("<!--");
|
|
9083
|
+
var $L233 = (0, import_lib2.$L)("-->");
|
|
9084
|
+
var $L234 = (0, import_lib2.$L)("type");
|
|
9085
|
+
var $L235 = (0, import_lib2.$L)("enum");
|
|
9086
|
+
var $L236 = (0, import_lib2.$L)("interface");
|
|
9087
|
+
var $L237 = (0, import_lib2.$L)("global");
|
|
9088
|
+
var $L238 = (0, import_lib2.$L)("module");
|
|
9089
|
+
var $L239 = (0, import_lib2.$L)("namespace");
|
|
9090
|
+
var $L240 = (0, import_lib2.$L)("asserts");
|
|
9091
|
+
var $L241 = (0, import_lib2.$L)("keyof");
|
|
9092
|
+
var $L242 = (0, import_lib2.$L)("???");
|
|
9093
|
+
var $L243 = (0, import_lib2.$L)("unique");
|
|
9094
|
+
var $L244 = (0, import_lib2.$L)("symbol");
|
|
9095
|
+
var $L245 = (0, import_lib2.$L)("[]");
|
|
9096
|
+
var $L246 = (0, import_lib2.$L)("civet");
|
|
8883
9097
|
var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
|
|
8884
9098
|
var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
|
|
8885
9099
|
var $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
@@ -9178,7 +9392,7 @@ var ExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, Al
|
|
|
9178
9392
|
function ExplicitArguments(ctx, state2) {
|
|
9179
9393
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitArguments", ExplicitArguments$0);
|
|
9180
9394
|
}
|
|
9181
|
-
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)(
|
|
9395
|
+
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));
|
|
9182
9396
|
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))));
|
|
9183
9397
|
var ApplicationStart$$ = [ApplicationStart$0, ApplicationStart$1];
|
|
9184
9398
|
function ApplicationStart(ctx, state2) {
|
|
@@ -9211,52 +9425,16 @@ var ReservedBinary$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R2, "Rese
|
|
|
9211
9425
|
function ReservedBinary(ctx, state2) {
|
|
9212
9426
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReservedBinary", ReservedBinary$0);
|
|
9213
9427
|
}
|
|
9214
|
-
var
|
|
9428
|
+
var ArgumentsWithTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9215
9429
|
var args = $1;
|
|
9216
9430
|
var trailing = $2;
|
|
9217
|
-
return [args, ...trailing];
|
|
9431
|
+
return [args, ...trailing ?? []];
|
|
9218
9432
|
});
|
|
9219
|
-
function
|
|
9220
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "
|
|
9221
|
-
}
|
|
9222
|
-
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) {
|
|
9223
|
-
if (!$2)
|
|
9224
|
-
return $1;
|
|
9225
|
-
return [...$1, ...$2];
|
|
9226
|
-
});
|
|
9227
|
-
function TrailingMemberExpressions(ctx, state2) {
|
|
9228
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "TrailingMemberExpressions", TrailingMemberExpressions$0);
|
|
9229
|
-
}
|
|
9230
|
-
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) {
|
|
9231
|
-
if (!$2.length)
|
|
9232
|
-
return $skip;
|
|
9233
|
-
return $2.flat();
|
|
9234
|
-
});
|
|
9235
|
-
var IndentedTrailingMemberExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingMemberExpression), function($skip, $loc, $0, $1) {
|
|
9236
|
-
return $1.flat();
|
|
9237
|
-
});
|
|
9238
|
-
var IndentedTrailingMemberExpressions$$ = [IndentedTrailingMemberExpressions$0, IndentedTrailingMemberExpressions$1];
|
|
9239
|
-
function IndentedTrailingMemberExpressions(ctx, state2) {
|
|
9240
|
-
return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingMemberExpressions", IndentedTrailingMemberExpressions$$);
|
|
9241
|
-
}
|
|
9242
|
-
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) {
|
|
9243
|
-
var ws = $1;
|
|
9244
|
-
var rests = $3;
|
|
9245
|
-
const [first, ...rest] = rests;
|
|
9246
|
-
return [prepend(ws, first), ...rest];
|
|
9247
|
-
});
|
|
9248
|
-
function NestedTrailingMemberExpression(ctx, state2) {
|
|
9249
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingMemberExpression", NestedTrailingMemberExpression$0);
|
|
9250
|
-
}
|
|
9251
|
-
var AllowedTrailingMemberExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingMemberExpressions), function(value) {
|
|
9252
|
-
return value[1];
|
|
9253
|
-
});
|
|
9254
|
-
var AllowedTrailingMemberExpressions$1 = (0, import_lib2.$Q)(MemberExpressionRest);
|
|
9255
|
-
var AllowedTrailingMemberExpressions$$ = [AllowedTrailingMemberExpressions$0, AllowedTrailingMemberExpressions$1];
|
|
9256
|
-
function AllowedTrailingMemberExpressions(ctx, state2) {
|
|
9257
|
-
return (0, import_lib2.$EVENT_C)(ctx, state2, "AllowedTrailingMemberExpressions", AllowedTrailingMemberExpressions$$);
|
|
9433
|
+
function ArgumentsWithTrailingCallExpressions(ctx, state2) {
|
|
9434
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingCallExpressions", ArgumentsWithTrailingCallExpressions$0);
|
|
9258
9435
|
}
|
|
9259
9436
|
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) {
|
|
9437
|
+
$1 = $1.flat();
|
|
9260
9438
|
if (!$1.length && !$2)
|
|
9261
9439
|
return $skip;
|
|
9262
9440
|
if (!$2)
|
|
@@ -10475,7 +10653,7 @@ var LeftHandSideExpression$$ = [LeftHandSideExpression$0, LeftHandSideExpression
|
|
|
10475
10653
|
function LeftHandSideExpression(ctx, state2) {
|
|
10476
10654
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LeftHandSideExpression", LeftHandSideExpression$$);
|
|
10477
10655
|
}
|
|
10478
|
-
var CallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Super,
|
|
10656
|
+
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) {
|
|
10479
10657
|
var rest = $3;
|
|
10480
10658
|
return processCallMemberExpression({
|
|
10481
10659
|
type: "CallExpression",
|
|
@@ -10493,7 +10671,7 @@ var CallExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __,
|
|
|
10493
10671
|
var imports = $5;
|
|
10494
10672
|
return dynamizeImportDeclarationExpression([i, iws, imports, fws, from]);
|
|
10495
10673
|
});
|
|
10496
|
-
var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'),
|
|
10674
|
+
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) {
|
|
10497
10675
|
var rest = $3;
|
|
10498
10676
|
return processCallMemberExpression({
|
|
10499
10677
|
type: "CallExpression",
|
|
@@ -10528,7 +10706,7 @@ var CallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_l
|
|
|
10528
10706
|
}
|
|
10529
10707
|
return literal;
|
|
10530
10708
|
});
|
|
10531
|
-
var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand),
|
|
10709
|
+
var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingCallExpressions), function($skip, $loc, $0, $1, $2) {
|
|
10532
10710
|
var optional = $1;
|
|
10533
10711
|
var argsWithTrailing = $2;
|
|
10534
10712
|
if (!optional)
|
|
@@ -10895,6 +11073,12 @@ var PropertyAccess$$ = [PropertyAccess$0, PropertyAccess$1, PropertyAccess$2, Pr
|
|
|
10895
11073
|
function PropertyAccess(ctx, state2) {
|
|
10896
11074
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PropertyAccess", PropertyAccess$$);
|
|
10897
11075
|
}
|
|
11076
|
+
var ExplicitPropertyGlob$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(ExplicitAccessStart), PropertyGlob), function(value) {
|
|
11077
|
+
return value[1];
|
|
11078
|
+
});
|
|
11079
|
+
function ExplicitPropertyGlob(ctx, state2) {
|
|
11080
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitPropertyGlob", ExplicitPropertyGlob$0);
|
|
11081
|
+
}
|
|
10898
11082
|
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) {
|
|
10899
11083
|
var dot = $1;
|
|
10900
11084
|
var object = $3;
|
|
@@ -11507,19 +11691,13 @@ var BindingElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.
|
|
|
11507
11691
|
var binding = $2;
|
|
11508
11692
|
var typeSuffix = $3;
|
|
11509
11693
|
var initializer = $4;
|
|
11510
|
-
if (binding.children) {
|
|
11511
|
-
binding = {
|
|
11512
|
-
...binding,
|
|
11513
|
-
initializer,
|
|
11514
|
-
children: [...binding.children, initializer]
|
|
11515
|
-
};
|
|
11516
|
-
}
|
|
11517
11694
|
return {
|
|
11518
11695
|
type: "BindingElement",
|
|
11519
11696
|
names: binding.names,
|
|
11520
11697
|
typeSuffix,
|
|
11521
11698
|
binding,
|
|
11522
|
-
children: [ws, binding]
|
|
11699
|
+
children: [ws, binding, initializer],
|
|
11700
|
+
initializer
|
|
11523
11701
|
};
|
|
11524
11702
|
});
|
|
11525
11703
|
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) {
|
|
@@ -12223,11 +12401,9 @@ var SingleLineStatements$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidNewl
|
|
|
12223
12401
|
const expressions = [...stmts];
|
|
12224
12402
|
if (last)
|
|
12225
12403
|
expressions.push(last);
|
|
12226
|
-
const maybeComment = expressions.at(-1)?.[2]?.children?.[2]?.at(-1);
|
|
12227
|
-
const hasTrailingComment = maybeComment?.type === "Comment" && maybeComment.token.startsWith("//");
|
|
12228
12404
|
const children = [expressions];
|
|
12229
|
-
if (hasTrailingComment)
|
|
12230
|
-
children.push("\n");
|
|
12405
|
+
if (hasTrailingComment(expressions))
|
|
12406
|
+
children.push(["\n"]);
|
|
12231
12407
|
return {
|
|
12232
12408
|
type: "BlockStatement",
|
|
12233
12409
|
expressions,
|
|
@@ -13311,7 +13487,7 @@ var MethodDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Abstract, __,
|
|
|
13311
13487
|
ts: true
|
|
13312
13488
|
};
|
|
13313
13489
|
});
|
|
13314
|
-
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) {
|
|
13490
|
+
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) {
|
|
13315
13491
|
var signature = $1;
|
|
13316
13492
|
var block = $3;
|
|
13317
13493
|
let children = $0;
|
|
@@ -14531,7 +14707,7 @@ var ForStatementControlWithReduction$$ = [ForStatementControlWithReduction$0, Fo
|
|
|
14531
14707
|
function ForStatementControlWithReduction(ctx, state2) {
|
|
14532
14708
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ForStatementControlWithReduction", ForStatementControlWithReduction$$);
|
|
14533
14709
|
}
|
|
14534
|
-
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) {
|
|
14710
|
+
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) {
|
|
14535
14711
|
var subtype = $1;
|
|
14536
14712
|
var ws = $3;
|
|
14537
14713
|
return {
|
|
@@ -15105,7 +15281,7 @@ var Condition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, Decl
|
|
|
15105
15281
|
expression
|
|
15106
15282
|
};
|
|
15107
15283
|
});
|
|
15108
|
-
var Condition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, InsertOpenParen, (0, import_lib2.$E)((0, import_lib2.$S)(Nested,
|
|
15284
|
+
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) {
|
|
15109
15285
|
var open = $2;
|
|
15110
15286
|
var expression = $3;
|
|
15111
15287
|
var close = $4;
|
|
@@ -15134,7 +15310,7 @@ var Condition$$ = [Condition$0, Condition$1, Condition$2, Condition$3, Condition
|
|
|
15134
15310
|
function Condition(ctx, state2) {
|
|
15135
15311
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Condition", Condition$$);
|
|
15136
15312
|
}
|
|
15137
|
-
var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen,
|
|
15313
|
+
var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, PostfixedExpression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
|
|
15138
15314
|
var open = $1;
|
|
15139
15315
|
var expression = $2;
|
|
15140
15316
|
var close = $3;
|
|
@@ -15481,19 +15657,19 @@ var ThrowStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Throw, MaybeParen
|
|
|
15481
15657
|
function ThrowStatement(ctx, state2) {
|
|
15482
15658
|
return (0, import_lib2.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
|
|
15483
15659
|
}
|
|
15484
|
-
var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15660
|
+
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) {
|
|
15485
15661
|
return { $loc, token: $1 };
|
|
15486
15662
|
});
|
|
15487
15663
|
function Break(ctx, state2) {
|
|
15488
15664
|
return (0, import_lib2.$EVENT)(ctx, state2, "Break", Break$0);
|
|
15489
15665
|
}
|
|
15490
|
-
var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15666
|
+
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) {
|
|
15491
15667
|
return { $loc, token: $1 };
|
|
15492
15668
|
});
|
|
15493
15669
|
function Continue(ctx, state2) {
|
|
15494
15670
|
return (0, import_lib2.$EVENT)(ctx, state2, "Continue", Continue$0);
|
|
15495
15671
|
}
|
|
15496
|
-
var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15672
|
+
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) {
|
|
15497
15673
|
return { $loc, token: $1 };
|
|
15498
15674
|
});
|
|
15499
15675
|
function Debugger(ctx, state2) {
|
|
@@ -15561,7 +15737,7 @@ var MaybeParenNestedExpression$$ = [MaybeParenNestedExpression$0, MaybeParenNest
|
|
|
15561
15737
|
function MaybeParenNestedExpression(ctx, state2) {
|
|
15562
15738
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
|
|
15563
15739
|
}
|
|
15564
|
-
var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($
|
|
15740
|
+
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) {
|
|
15565
15741
|
const imp = [
|
|
15566
15742
|
{ ...$1, ts: true },
|
|
15567
15743
|
{ ...$1, token: "const", js: true }
|
|
@@ -15751,7 +15927,7 @@ var ImpliedFrom$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImpliedF
|
|
|
15751
15927
|
function ImpliedFrom(ctx, state2) {
|
|
15752
15928
|
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
|
|
15753
15929
|
}
|
|
15754
|
-
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
15930
|
+
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) {
|
|
15755
15931
|
var keyword = $2;
|
|
15756
15932
|
var object = $5;
|
|
15757
15933
|
return {
|
|
@@ -16077,19 +16253,19 @@ var LexicalDeclaration$$ = [LexicalDeclaration$0, LexicalDeclaration$1];
|
|
|
16077
16253
|
function LexicalDeclaration(ctx, state2) {
|
|
16078
16254
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
|
|
16079
16255
|
}
|
|
16080
|
-
var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
16256
|
+
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) {
|
|
16081
16257
|
return { $loc, token: "=", decl: "const " };
|
|
16082
16258
|
});
|
|
16083
16259
|
function ConstAssignment(ctx, state2) {
|
|
16084
16260
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
|
|
16085
16261
|
}
|
|
16086
|
-
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16262
|
+
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
|
|
16087
16263
|
return { $loc, token: "=", decl: "let " };
|
|
16088
16264
|
});
|
|
16089
16265
|
function LetAssignment(ctx, state2) {
|
|
16090
16266
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
|
|
16091
16267
|
}
|
|
16092
|
-
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16268
|
+
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L137, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
|
|
16093
16269
|
return { $loc, token: "=" };
|
|
16094
16270
|
});
|
|
16095
16271
|
function TypeAssignment(ctx, state2) {
|
|
@@ -16512,7 +16688,7 @@ var MultiLineComment$$ = [MultiLineComment$0, MultiLineComment$1];
|
|
|
16512
16688
|
function MultiLineComment(ctx, state2) {
|
|
16513
16689
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
|
|
16514
16690
|
}
|
|
16515
|
-
var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16691
|
+
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) {
|
|
16516
16692
|
return { type: "Comment", $loc, token: $1 };
|
|
16517
16693
|
});
|
|
16518
16694
|
function JSMultiLineComment(ctx, state2) {
|
|
@@ -16558,7 +16734,7 @@ function _(ctx, state2) {
|
|
|
16558
16734
|
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) {
|
|
16559
16735
|
return { $loc, token: $0 };
|
|
16560
16736
|
});
|
|
16561
|
-
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16737
|
+
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
|
|
16562
16738
|
return " ";
|
|
16563
16739
|
});
|
|
16564
16740
|
var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
|
|
@@ -16609,7 +16785,7 @@ var StatementDelimiter$$ = [StatementDelimiter$0, StatementDelimiter$1, Statemen
|
|
|
16609
16785
|
function StatementDelimiter(ctx, state2) {
|
|
16610
16786
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
|
|
16611
16787
|
}
|
|
16612
|
-
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)($
|
|
16788
|
+
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 "]"'))));
|
|
16613
16789
|
function ClosingDelimiter(ctx, state2) {
|
|
16614
16790
|
return (0, import_lib2.$EVENT)(ctx, state2, "ClosingDelimiter", ClosingDelimiter$0);
|
|
16615
16791
|
}
|
|
@@ -16632,7 +16808,7 @@ var Loc$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Loc ""'), functi
|
|
|
16632
16808
|
function Loc(ctx, state2) {
|
|
16633
16809
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
|
|
16634
16810
|
}
|
|
16635
|
-
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16811
|
+
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) {
|
|
16636
16812
|
return { $loc, token: $1, ts: true };
|
|
16637
16813
|
});
|
|
16638
16814
|
function Abstract(ctx, state2) {
|
|
@@ -16644,43 +16820,43 @@ var Ampersand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L117, 'Ampersan
|
|
|
16644
16820
|
function Ampersand(ctx, state2) {
|
|
16645
16821
|
return (0, import_lib2.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
|
|
16646
16822
|
}
|
|
16647
|
-
var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16823
|
+
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) {
|
|
16648
16824
|
return { $loc, token: $1 };
|
|
16649
16825
|
});
|
|
16650
16826
|
function As(ctx, state2) {
|
|
16651
16827
|
return (0, import_lib2.$EVENT)(ctx, state2, "As", As$0);
|
|
16652
16828
|
}
|
|
16653
|
-
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16829
|
+
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'At "@"'), function($skip, $loc, $0, $1) {
|
|
16654
16830
|
return { $loc, token: $1 };
|
|
16655
16831
|
});
|
|
16656
16832
|
function At(ctx, state2) {
|
|
16657
16833
|
return (0, import_lib2.$EVENT)(ctx, state2, "At", At$0);
|
|
16658
16834
|
}
|
|
16659
|
-
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16835
|
+
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L145, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
|
|
16660
16836
|
return { $loc, token: "@" };
|
|
16661
16837
|
});
|
|
16662
16838
|
function AtAt(ctx, state2) {
|
|
16663
16839
|
return (0, import_lib2.$EVENT)(ctx, state2, "AtAt", AtAt$0);
|
|
16664
16840
|
}
|
|
16665
|
-
var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16841
|
+
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) {
|
|
16666
16842
|
return { $loc, token: $1, type: "Async" };
|
|
16667
16843
|
});
|
|
16668
16844
|
function Async(ctx, state2) {
|
|
16669
16845
|
return (0, import_lib2.$EVENT)(ctx, state2, "Async", Async$0);
|
|
16670
16846
|
}
|
|
16671
|
-
var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16847
|
+
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) {
|
|
16672
16848
|
return { $loc, token: $1, type: "Await" };
|
|
16673
16849
|
});
|
|
16674
16850
|
function Await(ctx, state2) {
|
|
16675
16851
|
return (0, import_lib2.$EVENT)(ctx, state2, "Await", Await$0);
|
|
16676
16852
|
}
|
|
16677
|
-
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16853
|
+
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L148, 'Backtick "`"'), function($skip, $loc, $0, $1) {
|
|
16678
16854
|
return { $loc, token: $1 };
|
|
16679
16855
|
});
|
|
16680
16856
|
function Backtick(ctx, state2) {
|
|
16681
16857
|
return (0, import_lib2.$EVENT)(ctx, state2, "Backtick", Backtick$0);
|
|
16682
16858
|
}
|
|
16683
|
-
var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16859
|
+
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) {
|
|
16684
16860
|
return { $loc, token: $1 };
|
|
16685
16861
|
});
|
|
16686
16862
|
function By(ctx, state2) {
|
|
@@ -16692,19 +16868,19 @@ var Caret$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L22, 'Caret "^"'),
|
|
|
16692
16868
|
function Caret(ctx, state2) {
|
|
16693
16869
|
return (0, import_lib2.$EVENT)(ctx, state2, "Caret", Caret$0);
|
|
16694
16870
|
}
|
|
16695
|
-
var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16871
|
+
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) {
|
|
16696
16872
|
return { $loc, token: $1 };
|
|
16697
16873
|
});
|
|
16698
16874
|
function Case(ctx, state2) {
|
|
16699
16875
|
return (0, import_lib2.$EVENT)(ctx, state2, "Case", Case$0);
|
|
16700
16876
|
}
|
|
16701
|
-
var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16877
|
+
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) {
|
|
16702
16878
|
return { $loc, token: $1 };
|
|
16703
16879
|
});
|
|
16704
16880
|
function Catch(ctx, state2) {
|
|
16705
16881
|
return (0, import_lib2.$EVENT)(ctx, state2, "Catch", Catch$0);
|
|
16706
16882
|
}
|
|
16707
|
-
var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16883
|
+
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) {
|
|
16708
16884
|
return { $loc, token: $1 };
|
|
16709
16885
|
});
|
|
16710
16886
|
function Class(ctx, state2) {
|
|
@@ -16728,13 +16904,13 @@ var CloseBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L46, 'CloseB
|
|
|
16728
16904
|
function CloseBracket(ctx, state2) {
|
|
16729
16905
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
|
|
16730
16906
|
}
|
|
16731
|
-
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16907
|
+
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L141, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
|
|
16732
16908
|
return { $loc, token: $1 };
|
|
16733
16909
|
});
|
|
16734
16910
|
function CloseParen(ctx, state2) {
|
|
16735
16911
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
|
|
16736
16912
|
}
|
|
16737
|
-
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16913
|
+
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L153, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
|
|
16738
16914
|
return { $loc, token: "${" };
|
|
16739
16915
|
});
|
|
16740
16916
|
function CoffeeSubstitutionStart(ctx, state2) {
|
|
@@ -16752,37 +16928,37 @@ var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L17, 'Comma ","'),
|
|
|
16752
16928
|
function Comma(ctx, state2) {
|
|
16753
16929
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comma", Comma$0);
|
|
16754
16930
|
}
|
|
16755
|
-
var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16931
|
+
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) {
|
|
16756
16932
|
return { $loc, token: $1 };
|
|
16757
16933
|
});
|
|
16758
16934
|
function Comptime(ctx, state2) {
|
|
16759
16935
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comptime", Comptime$0);
|
|
16760
16936
|
}
|
|
16761
|
-
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16937
|
+
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
|
|
16762
16938
|
return { $loc, token: "constructor" };
|
|
16763
16939
|
});
|
|
16764
16940
|
function ConstructorShorthand(ctx, state2) {
|
|
16765
16941
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
|
|
16766
16942
|
}
|
|
16767
|
-
var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16943
|
+
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) {
|
|
16768
16944
|
return { $loc, token: $1 };
|
|
16769
16945
|
});
|
|
16770
16946
|
function Declare(ctx, state2) {
|
|
16771
16947
|
return (0, import_lib2.$EVENT)(ctx, state2, "Declare", Declare$0);
|
|
16772
16948
|
}
|
|
16773
|
-
var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16949
|
+
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) {
|
|
16774
16950
|
return { $loc, token: $1 };
|
|
16775
16951
|
});
|
|
16776
16952
|
function Default(ctx, state2) {
|
|
16777
16953
|
return (0, import_lib2.$EVENT)(ctx, state2, "Default", Default$0);
|
|
16778
16954
|
}
|
|
16779
|
-
var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16955
|
+
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) {
|
|
16780
16956
|
return { $loc, token: $1 };
|
|
16781
16957
|
});
|
|
16782
16958
|
function Delete(ctx, state2) {
|
|
16783
16959
|
return (0, import_lib2.$EVENT)(ctx, state2, "Delete", Delete$0);
|
|
16784
16960
|
}
|
|
16785
|
-
var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16961
|
+
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) {
|
|
16786
16962
|
return { $loc, token: $1 };
|
|
16787
16963
|
});
|
|
16788
16964
|
function Do(ctx, state2) {
|
|
@@ -16802,20 +16978,20 @@ var Dot$$ = [Dot$0, Dot$1];
|
|
|
16802
16978
|
function Dot(ctx, state2) {
|
|
16803
16979
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Dot", Dot$$);
|
|
16804
16980
|
}
|
|
16805
|
-
var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16981
|
+
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) {
|
|
16806
16982
|
return { $loc, token: $1 };
|
|
16807
16983
|
});
|
|
16808
|
-
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16984
|
+
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
|
|
16809
16985
|
return { $loc, token: ".." };
|
|
16810
16986
|
});
|
|
16811
16987
|
var DotDot$$ = [DotDot$0, DotDot$1];
|
|
16812
16988
|
function DotDot(ctx, state2) {
|
|
16813
16989
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
|
|
16814
16990
|
}
|
|
16815
|
-
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16991
|
+
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
|
|
16816
16992
|
return { $loc, token: $1 };
|
|
16817
16993
|
});
|
|
16818
|
-
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16994
|
+
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
|
|
16819
16995
|
return { $loc, token: "..." };
|
|
16820
16996
|
});
|
|
16821
16997
|
var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
|
|
@@ -16828,31 +17004,31 @@ var InsertDotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Inse
|
|
|
16828
17004
|
function InsertDotDotDot(ctx, state2) {
|
|
16829
17005
|
return (0, import_lib2.$EVENT)(ctx, state2, "InsertDotDotDot", InsertDotDotDot$0);
|
|
16830
17006
|
}
|
|
16831
|
-
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17007
|
+
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
|
|
16832
17008
|
return { $loc, token: $1 };
|
|
16833
17009
|
});
|
|
16834
17010
|
function DoubleColon(ctx, state2) {
|
|
16835
17011
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
|
|
16836
17012
|
}
|
|
16837
|
-
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17013
|
+
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
|
|
16838
17014
|
return { $loc, token: ":" };
|
|
16839
17015
|
});
|
|
16840
17016
|
function DoubleColonAsColon(ctx, state2) {
|
|
16841
17017
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
|
|
16842
17018
|
}
|
|
16843
|
-
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17019
|
+
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L164, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
16844
17020
|
return { $loc, token: $1 };
|
|
16845
17021
|
});
|
|
16846
17022
|
function DoubleQuote(ctx, state2) {
|
|
16847
17023
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
|
|
16848
17024
|
}
|
|
16849
|
-
var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17025
|
+
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) {
|
|
16850
17026
|
return { $loc, token: $1 };
|
|
16851
17027
|
});
|
|
16852
17028
|
function Each(ctx, state2) {
|
|
16853
17029
|
return (0, import_lib2.$EVENT)(ctx, state2, "Each", Each$0);
|
|
16854
17030
|
}
|
|
16855
|
-
var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17031
|
+
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) {
|
|
16856
17032
|
return { $loc, token: $1 };
|
|
16857
17033
|
});
|
|
16858
17034
|
function Else(ctx, state2) {
|
|
@@ -16864,61 +17040,61 @@ var Equals$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L3, 'Equals "="'),
|
|
|
16864
17040
|
function Equals(ctx, state2) {
|
|
16865
17041
|
return (0, import_lib2.$EVENT)(ctx, state2, "Equals", Equals$0);
|
|
16866
17042
|
}
|
|
16867
|
-
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17043
|
+
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L167, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
|
|
16868
17044
|
return { $loc, token: $1 };
|
|
16869
17045
|
});
|
|
16870
17046
|
function ExclamationPoint(ctx, state2) {
|
|
16871
17047
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
|
|
16872
17048
|
}
|
|
16873
|
-
var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17049
|
+
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) {
|
|
16874
17050
|
return { $loc, token: $1 };
|
|
16875
17051
|
});
|
|
16876
17052
|
function Export(ctx, state2) {
|
|
16877
17053
|
return (0, import_lib2.$EVENT)(ctx, state2, "Export", Export$0);
|
|
16878
17054
|
}
|
|
16879
|
-
var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17055
|
+
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) {
|
|
16880
17056
|
return { $loc, token: $1 };
|
|
16881
17057
|
});
|
|
16882
17058
|
function Extends(ctx, state2) {
|
|
16883
17059
|
return (0, import_lib2.$EVENT)(ctx, state2, "Extends", Extends$0);
|
|
16884
17060
|
}
|
|
16885
|
-
var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17061
|
+
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) {
|
|
16886
17062
|
return { $loc, token: $1 };
|
|
16887
17063
|
});
|
|
16888
17064
|
function Finally(ctx, state2) {
|
|
16889
17065
|
return (0, import_lib2.$EVENT)(ctx, state2, "Finally", Finally$0);
|
|
16890
17066
|
}
|
|
16891
|
-
var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17067
|
+
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) {
|
|
16892
17068
|
return { $loc, token: $1 };
|
|
16893
17069
|
});
|
|
16894
17070
|
function For(ctx, state2) {
|
|
16895
17071
|
return (0, import_lib2.$EVENT)(ctx, state2, "For", For$0);
|
|
16896
17072
|
}
|
|
16897
|
-
var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17073
|
+
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) {
|
|
16898
17074
|
return { $loc, token: $1 };
|
|
16899
17075
|
});
|
|
16900
17076
|
function From(ctx, state2) {
|
|
16901
17077
|
return (0, import_lib2.$EVENT)(ctx, state2, "From", From$0);
|
|
16902
17078
|
}
|
|
16903
|
-
var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17079
|
+
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) {
|
|
16904
17080
|
return { $loc, token: $1 };
|
|
16905
17081
|
});
|
|
16906
17082
|
function Function2(ctx, state2) {
|
|
16907
17083
|
return (0, import_lib2.$EVENT)(ctx, state2, "Function", Function$0);
|
|
16908
17084
|
}
|
|
16909
|
-
var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17085
|
+
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) {
|
|
16910
17086
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
16911
17087
|
});
|
|
16912
17088
|
function GetOrSet(ctx, state2) {
|
|
16913
17089
|
return (0, import_lib2.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
|
|
16914
17090
|
}
|
|
16915
|
-
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17091
|
+
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L176, 'Hash "#"'), function($skip, $loc, $0, $1) {
|
|
16916
17092
|
return { $loc, token: $1 };
|
|
16917
17093
|
});
|
|
16918
17094
|
function Hash(ctx, state2) {
|
|
16919
17095
|
return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
|
|
16920
17096
|
}
|
|
16921
|
-
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17097
|
+
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) {
|
|
16922
17098
|
return { $loc, token: $1 };
|
|
16923
17099
|
});
|
|
16924
17100
|
function If(ctx, state2) {
|
|
@@ -16930,67 +17106,67 @@ var Import$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)
|
|
|
16930
17106
|
function Import(ctx, state2) {
|
|
16931
17107
|
return (0, import_lib2.$EVENT)(ctx, state2, "Import", Import$0);
|
|
16932
17108
|
}
|
|
16933
|
-
var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17109
|
+
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) {
|
|
16934
17110
|
return { $loc, token: $1 };
|
|
16935
17111
|
});
|
|
16936
17112
|
function In(ctx, state2) {
|
|
16937
17113
|
return (0, import_lib2.$EVENT)(ctx, state2, "In", In$0);
|
|
16938
17114
|
}
|
|
16939
|
-
var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17115
|
+
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) {
|
|
16940
17116
|
return { $loc, token: $1 };
|
|
16941
17117
|
});
|
|
16942
17118
|
function Infer(ctx, state2) {
|
|
16943
17119
|
return (0, import_lib2.$EVENT)(ctx, state2, "Infer", Infer$0);
|
|
16944
17120
|
}
|
|
16945
|
-
var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17121
|
+
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) {
|
|
16946
17122
|
return { $loc, token: $1 };
|
|
16947
17123
|
});
|
|
16948
17124
|
function LetOrConst(ctx, state2) {
|
|
16949
17125
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
|
|
16950
17126
|
}
|
|
16951
|
-
var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17127
|
+
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) {
|
|
16952
17128
|
return { $loc, token: $1 };
|
|
16953
17129
|
});
|
|
16954
17130
|
function Const(ctx, state2) {
|
|
16955
17131
|
return (0, import_lib2.$EVENT)(ctx, state2, "Const", Const$0);
|
|
16956
17132
|
}
|
|
16957
|
-
var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17133
|
+
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) {
|
|
16958
17134
|
return { $loc, token: $1 };
|
|
16959
17135
|
});
|
|
16960
17136
|
function Is(ctx, state2) {
|
|
16961
17137
|
return (0, import_lib2.$EVENT)(ctx, state2, "Is", Is$0);
|
|
16962
17138
|
}
|
|
16963
|
-
var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17139
|
+
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) {
|
|
16964
17140
|
return { $loc, token: $1 };
|
|
16965
17141
|
});
|
|
16966
17142
|
function LetOrConstOrVar(ctx, state2) {
|
|
16967
17143
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
|
|
16968
17144
|
}
|
|
16969
|
-
var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17145
|
+
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) {
|
|
16970
17146
|
return { $loc, token: $1 };
|
|
16971
17147
|
});
|
|
16972
17148
|
function Like(ctx, state2) {
|
|
16973
17149
|
return (0, import_lib2.$EVENT)(ctx, state2, "Like", Like$0);
|
|
16974
17150
|
}
|
|
16975
|
-
var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17151
|
+
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) {
|
|
16976
17152
|
return { $loc, token: "while" };
|
|
16977
17153
|
});
|
|
16978
17154
|
function Loop(ctx, state2) {
|
|
16979
17155
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loop", Loop$0);
|
|
16980
17156
|
}
|
|
16981
|
-
var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17157
|
+
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) {
|
|
16982
17158
|
return { $loc, token: $1 };
|
|
16983
17159
|
});
|
|
16984
17160
|
function New(ctx, state2) {
|
|
16985
17161
|
return (0, import_lib2.$EVENT)(ctx, state2, "New", New$0);
|
|
16986
17162
|
}
|
|
16987
|
-
var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17163
|
+
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) {
|
|
16988
17164
|
return { $loc, token: "!" };
|
|
16989
17165
|
});
|
|
16990
17166
|
function Not(ctx, state2) {
|
|
16991
17167
|
return (0, import_lib2.$EVENT)(ctx, state2, "Not", Not$0);
|
|
16992
17168
|
}
|
|
16993
|
-
var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17169
|
+
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) {
|
|
16994
17170
|
return { $loc, token: $1 };
|
|
16995
17171
|
});
|
|
16996
17172
|
function Of(ctx, state2) {
|
|
@@ -17008,7 +17184,7 @@ var OpenBrace$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L1, 'OpenBrace
|
|
|
17008
17184
|
function OpenBrace(ctx, state2) {
|
|
17009
17185
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
|
|
17010
17186
|
}
|
|
17011
|
-
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17187
|
+
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L189, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
17012
17188
|
return { $loc, token: $1 };
|
|
17013
17189
|
});
|
|
17014
17190
|
function OpenBracket(ctx, state2) {
|
|
@@ -17020,49 +17196,49 @@ var OpenParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L4, 'OpenParen
|
|
|
17020
17196
|
function OpenParen(ctx, state2) {
|
|
17021
17197
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
|
|
17022
17198
|
}
|
|
17023
|
-
var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17199
|
+
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) {
|
|
17024
17200
|
return { $loc, token: $1 };
|
|
17025
17201
|
});
|
|
17026
17202
|
function Operator(ctx, state2) {
|
|
17027
17203
|
return (0, import_lib2.$EVENT)(ctx, state2, "Operator", Operator$0);
|
|
17028
17204
|
}
|
|
17029
|
-
var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17205
|
+
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) {
|
|
17030
17206
|
return { $loc, token: $1, ts: true };
|
|
17031
17207
|
});
|
|
17032
17208
|
function Override(ctx, state2) {
|
|
17033
17209
|
return (0, import_lib2.$EVENT)(ctx, state2, "Override", Override$0);
|
|
17034
17210
|
}
|
|
17035
|
-
var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17211
|
+
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) {
|
|
17036
17212
|
return { $loc, token: $1 };
|
|
17037
17213
|
});
|
|
17038
17214
|
function Own(ctx, state2) {
|
|
17039
17215
|
return (0, import_lib2.$EVENT)(ctx, state2, "Own", Own$0);
|
|
17040
17216
|
}
|
|
17041
|
-
var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17217
|
+
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) {
|
|
17042
17218
|
return { $loc, token: $1 };
|
|
17043
17219
|
});
|
|
17044
17220
|
function Public(ctx, state2) {
|
|
17045
17221
|
return (0, import_lib2.$EVENT)(ctx, state2, "Public", Public$0);
|
|
17046
17222
|
}
|
|
17047
|
-
var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17223
|
+
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) {
|
|
17048
17224
|
return { $loc, token: $1 };
|
|
17049
17225
|
});
|
|
17050
17226
|
function Private(ctx, state2) {
|
|
17051
17227
|
return (0, import_lib2.$EVENT)(ctx, state2, "Private", Private$0);
|
|
17052
17228
|
}
|
|
17053
|
-
var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17229
|
+
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) {
|
|
17054
17230
|
return { $loc, token: $1 };
|
|
17055
17231
|
});
|
|
17056
17232
|
function Protected(ctx, state2) {
|
|
17057
17233
|
return (0, import_lib2.$EVENT)(ctx, state2, "Protected", Protected$0);
|
|
17058
17234
|
}
|
|
17059
|
-
var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17235
|
+
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) {
|
|
17060
17236
|
return { $loc, token: "||>" };
|
|
17061
17237
|
});
|
|
17062
|
-
var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17238
|
+
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) {
|
|
17063
17239
|
return { $loc, token: "|>=" };
|
|
17064
17240
|
});
|
|
17065
|
-
var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17241
|
+
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) {
|
|
17066
17242
|
return { $loc, token: "|>" };
|
|
17067
17243
|
});
|
|
17068
17244
|
var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
|
|
@@ -17075,19 +17251,19 @@ var QuestionMark$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L6, 'Questio
|
|
|
17075
17251
|
function QuestionMark(ctx, state2) {
|
|
17076
17252
|
return (0, import_lib2.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
|
|
17077
17253
|
}
|
|
17078
|
-
var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17254
|
+
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) {
|
|
17079
17255
|
return { $loc, token: $1, ts: true };
|
|
17080
17256
|
});
|
|
17081
17257
|
function Readonly(ctx, state2) {
|
|
17082
17258
|
return (0, import_lib2.$EVENT)(ctx, state2, "Readonly", Readonly$0);
|
|
17083
17259
|
}
|
|
17084
|
-
var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17260
|
+
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) {
|
|
17085
17261
|
return { $loc, token: $1 };
|
|
17086
17262
|
});
|
|
17087
17263
|
function Return(ctx, state2) {
|
|
17088
17264
|
return (0, import_lib2.$EVENT)(ctx, state2, "Return", Return$0);
|
|
17089
17265
|
}
|
|
17090
|
-
var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17266
|
+
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) {
|
|
17091
17267
|
return { $loc, token: $1 };
|
|
17092
17268
|
});
|
|
17093
17269
|
function Satisfies(ctx, state2) {
|
|
@@ -17099,7 +17275,7 @@ var Semicolon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L119, 'Semicolo
|
|
|
17099
17275
|
function Semicolon(ctx, state2) {
|
|
17100
17276
|
return (0, import_lib2.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
|
|
17101
17277
|
}
|
|
17102
|
-
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17278
|
+
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L205, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
17103
17279
|
return { $loc, token: $1 };
|
|
17104
17280
|
});
|
|
17105
17281
|
function SingleQuote(ctx, state2) {
|
|
@@ -17111,149 +17287,149 @@ var Star$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L75, 'Star "*"'), fu
|
|
|
17111
17287
|
function Star(ctx, state2) {
|
|
17112
17288
|
return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
|
|
17113
17289
|
}
|
|
17114
|
-
var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17290
|
+
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) {
|
|
17115
17291
|
return { $loc, token: $1 };
|
|
17116
17292
|
});
|
|
17117
|
-
var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17293
|
+
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) {
|
|
17118
17294
|
return { $loc, token: "static " };
|
|
17119
17295
|
});
|
|
17120
17296
|
var Static$$ = [Static$0, Static$1];
|
|
17121
17297
|
function Static(ctx, state2) {
|
|
17122
17298
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Static", Static$$);
|
|
17123
17299
|
}
|
|
17124
|
-
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17300
|
+
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L207, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
17125
17301
|
return { $loc, token: $1 };
|
|
17126
17302
|
});
|
|
17127
17303
|
function SubstitutionStart(ctx, state2) {
|
|
17128
17304
|
return (0, import_lib2.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
|
|
17129
17305
|
}
|
|
17130
|
-
var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17306
|
+
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) {
|
|
17131
17307
|
return { $loc, token: $1 };
|
|
17132
17308
|
});
|
|
17133
17309
|
function Super(ctx, state2) {
|
|
17134
17310
|
return (0, import_lib2.$EVENT)(ctx, state2, "Super", Super$0);
|
|
17135
17311
|
}
|
|
17136
|
-
var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17312
|
+
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) {
|
|
17137
17313
|
return { $loc, token: $1 };
|
|
17138
17314
|
});
|
|
17139
17315
|
function Switch(ctx, state2) {
|
|
17140
17316
|
return (0, import_lib2.$EVENT)(ctx, state2, "Switch", Switch$0);
|
|
17141
17317
|
}
|
|
17142
|
-
var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17318
|
+
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) {
|
|
17143
17319
|
return { $loc, token: $1 };
|
|
17144
17320
|
});
|
|
17145
17321
|
function Target(ctx, state2) {
|
|
17146
17322
|
return (0, import_lib2.$EVENT)(ctx, state2, "Target", Target$0);
|
|
17147
17323
|
}
|
|
17148
|
-
var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
17324
|
+
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) {
|
|
17149
17325
|
return { $loc, token: "" };
|
|
17150
17326
|
});
|
|
17151
17327
|
function Then(ctx, state2) {
|
|
17152
17328
|
return (0, import_lib2.$EVENT)(ctx, state2, "Then", Then$0);
|
|
17153
17329
|
}
|
|
17154
|
-
var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17330
|
+
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) {
|
|
17155
17331
|
return { $loc, token: $1 };
|
|
17156
17332
|
});
|
|
17157
17333
|
function This(ctx, state2) {
|
|
17158
17334
|
return (0, import_lib2.$EVENT)(ctx, state2, "This", This$0);
|
|
17159
17335
|
}
|
|
17160
|
-
var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17336
|
+
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) {
|
|
17161
17337
|
return { $loc, token: $1 };
|
|
17162
17338
|
});
|
|
17163
17339
|
function Throw(ctx, state2) {
|
|
17164
17340
|
return (0, import_lib2.$EVENT)(ctx, state2, "Throw", Throw$0);
|
|
17165
17341
|
}
|
|
17166
|
-
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17342
|
+
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
17167
17343
|
return { $loc, token: "`" };
|
|
17168
17344
|
});
|
|
17169
17345
|
function TripleDoubleQuote(ctx, state2) {
|
|
17170
17346
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
|
|
17171
17347
|
}
|
|
17172
|
-
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17348
|
+
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
17173
17349
|
return { $loc, token: "`" };
|
|
17174
17350
|
});
|
|
17175
17351
|
function TripleSingleQuote(ctx, state2) {
|
|
17176
17352
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
|
|
17177
17353
|
}
|
|
17178
|
-
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17354
|
+
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
17179
17355
|
return { $loc, token: "/" };
|
|
17180
17356
|
});
|
|
17181
17357
|
function TripleSlash(ctx, state2) {
|
|
17182
17358
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
|
|
17183
17359
|
}
|
|
17184
|
-
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17360
|
+
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L217, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
17185
17361
|
return { $loc, token: "`" };
|
|
17186
17362
|
});
|
|
17187
17363
|
function TripleTick(ctx, state2) {
|
|
17188
17364
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
|
|
17189
17365
|
}
|
|
17190
|
-
var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17366
|
+
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) {
|
|
17191
17367
|
return { $loc, token: $1 };
|
|
17192
17368
|
});
|
|
17193
17369
|
function Try(ctx, state2) {
|
|
17194
17370
|
return (0, import_lib2.$EVENT)(ctx, state2, "Try", Try$0);
|
|
17195
17371
|
}
|
|
17196
|
-
var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17372
|
+
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) {
|
|
17197
17373
|
return { $loc, token: $1 };
|
|
17198
17374
|
});
|
|
17199
17375
|
function Typeof(ctx, state2) {
|
|
17200
17376
|
return (0, import_lib2.$EVENT)(ctx, state2, "Typeof", Typeof$0);
|
|
17201
17377
|
}
|
|
17202
|
-
var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17378
|
+
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) {
|
|
17203
17379
|
return { $loc, token: $1 };
|
|
17204
17380
|
});
|
|
17205
17381
|
function Undefined(ctx, state2) {
|
|
17206
17382
|
return (0, import_lib2.$EVENT)(ctx, state2, "Undefined", Undefined$0);
|
|
17207
17383
|
}
|
|
17208
|
-
var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17384
|
+
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) {
|
|
17209
17385
|
return { $loc, token: $1, negated: true };
|
|
17210
17386
|
});
|
|
17211
17387
|
function Unless(ctx, state2) {
|
|
17212
17388
|
return (0, import_lib2.$EVENT)(ctx, state2, "Unless", Unless$0);
|
|
17213
17389
|
}
|
|
17214
|
-
var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17390
|
+
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) {
|
|
17215
17391
|
return { $loc, token: $1, negated: true };
|
|
17216
17392
|
});
|
|
17217
17393
|
function Until(ctx, state2) {
|
|
17218
17394
|
return (0, import_lib2.$EVENT)(ctx, state2, "Until", Until$0);
|
|
17219
17395
|
}
|
|
17220
|
-
var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17396
|
+
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) {
|
|
17221
17397
|
return { $loc, token: $1 };
|
|
17222
17398
|
});
|
|
17223
17399
|
function Using(ctx, state2) {
|
|
17224
17400
|
return (0, import_lib2.$EVENT)(ctx, state2, "Using", Using$0);
|
|
17225
17401
|
}
|
|
17226
|
-
var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17402
|
+
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) {
|
|
17227
17403
|
return { $loc, token: $1 };
|
|
17228
17404
|
});
|
|
17229
17405
|
function Var(ctx, state2) {
|
|
17230
17406
|
return (0, import_lib2.$EVENT)(ctx, state2, "Var", Var$0);
|
|
17231
17407
|
}
|
|
17232
|
-
var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17408
|
+
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) {
|
|
17233
17409
|
return { $loc, token: $1 };
|
|
17234
17410
|
});
|
|
17235
17411
|
function Void(ctx, state2) {
|
|
17236
17412
|
return (0, import_lib2.$EVENT)(ctx, state2, "Void", Void$0);
|
|
17237
17413
|
}
|
|
17238
|
-
var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17414
|
+
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) {
|
|
17239
17415
|
return { $loc, token: "case" };
|
|
17240
17416
|
});
|
|
17241
17417
|
function When(ctx, state2) {
|
|
17242
17418
|
return (0, import_lib2.$EVENT)(ctx, state2, "When", When$0);
|
|
17243
17419
|
}
|
|
17244
|
-
var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17420
|
+
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) {
|
|
17245
17421
|
return { $loc, token: $1 };
|
|
17246
17422
|
});
|
|
17247
17423
|
function While(ctx, state2) {
|
|
17248
17424
|
return (0, import_lib2.$EVENT)(ctx, state2, "While", While$0);
|
|
17249
17425
|
}
|
|
17250
|
-
var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17426
|
+
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) {
|
|
17251
17427
|
return { $loc, token: $1 };
|
|
17252
17428
|
});
|
|
17253
17429
|
function With(ctx, state2) {
|
|
17254
17430
|
return (0, import_lib2.$EVENT)(ctx, state2, "With", With$0);
|
|
17255
17431
|
}
|
|
17256
|
-
var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17432
|
+
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) {
|
|
17257
17433
|
return { $loc, token: $1, type: "Yield" };
|
|
17258
17434
|
});
|
|
17259
17435
|
function Yield(ctx, state2) {
|
|
@@ -17332,7 +17508,7 @@ var JSXElement$$ = [JSXElement$0, JSXElement$1, JSXElement$2];
|
|
|
17332
17508
|
function JSXElement(ctx, state2) {
|
|
17333
17509
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
|
|
17334
17510
|
}
|
|
17335
|
-
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)($
|
|
17511
|
+
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) {
|
|
17336
17512
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
17337
17513
|
});
|
|
17338
17514
|
function JSXSelfClosingElement(ctx, state2) {
|
|
@@ -17366,7 +17542,7 @@ var JSXOptionalClosingElement$$ = [JSXOptionalClosingElement$0, JSXOptionalClosi
|
|
|
17366
17542
|
function JSXOptionalClosingElement(ctx, state2) {
|
|
17367
17543
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
|
|
17368
17544
|
}
|
|
17369
|
-
var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17545
|
+
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 ">"'));
|
|
17370
17546
|
function JSXClosingElement(ctx, state2) {
|
|
17371
17547
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
|
|
17372
17548
|
}
|
|
@@ -17387,7 +17563,7 @@ var JSXFragment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)
|
|
|
17387
17563
|
];
|
|
17388
17564
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
17389
17565
|
});
|
|
17390
|
-
var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($
|
|
17566
|
+
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) {
|
|
17391
17567
|
var children = $3;
|
|
17392
17568
|
$0 = $0.slice(1);
|
|
17393
17569
|
return {
|
|
@@ -17400,7 +17576,7 @@ var JSXFragment$$ = [JSXFragment$0, JSXFragment$1];
|
|
|
17400
17576
|
function JSXFragment(ctx, state2) {
|
|
17401
17577
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
|
|
17402
17578
|
}
|
|
17403
|
-
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17579
|
+
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L230, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
17404
17580
|
state.JSXTagStack.push("");
|
|
17405
17581
|
return $1;
|
|
17406
17582
|
});
|
|
@@ -17417,11 +17593,11 @@ var JSXOptionalClosingFragment$$ = [JSXOptionalClosingFragment$0, JSXOptionalClo
|
|
|
17417
17593
|
function JSXOptionalClosingFragment(ctx, state2) {
|
|
17418
17594
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
|
|
17419
17595
|
}
|
|
17420
|
-
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($
|
|
17596
|
+
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L231, 'JSXClosingFragment "</>"');
|
|
17421
17597
|
function JSXClosingFragment(ctx, state2) {
|
|
17422
17598
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
|
|
17423
17599
|
}
|
|
17424
|
-
var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17600
|
+
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) {
|
|
17425
17601
|
return config.defaultElement;
|
|
17426
17602
|
});
|
|
17427
17603
|
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)))));
|
|
@@ -17602,7 +17778,7 @@ var JSXAttribute$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(Identifier, (0, im
|
|
|
17602
17778
|
}
|
|
17603
17779
|
return $skip;
|
|
17604
17780
|
});
|
|
17605
|
-
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17781
|
+
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L176, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
17606
17782
|
return [" ", "id=", $2];
|
|
17607
17783
|
});
|
|
17608
17784
|
var JSXAttribute$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
@@ -17947,7 +18123,7 @@ var JSXChildGeneral$$ = [JSXChildGeneral$0, JSXChildGeneral$1, JSXChildGeneral$2
|
|
|
17947
18123
|
function JSXChildGeneral(ctx, state2) {
|
|
17948
18124
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
|
|
17949
18125
|
}
|
|
17950
|
-
var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18126
|
+
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) {
|
|
17951
18127
|
return ["{/*", $2, "*/}"];
|
|
17952
18128
|
});
|
|
17953
18129
|
function JSXComment(ctx, state2) {
|
|
@@ -18235,37 +18411,37 @@ var InterfaceExtendsTarget$0 = ImplementsTarget;
|
|
|
18235
18411
|
function InterfaceExtendsTarget(ctx, state2) {
|
|
18236
18412
|
return (0, import_lib2.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
|
|
18237
18413
|
}
|
|
18238
|
-
var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18414
|
+
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) {
|
|
18239
18415
|
return { $loc, token: $1 };
|
|
18240
18416
|
});
|
|
18241
18417
|
function TypeKeyword(ctx, state2) {
|
|
18242
18418
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
|
|
18243
18419
|
}
|
|
18244
|
-
var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18420
|
+
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) {
|
|
18245
18421
|
return { $loc, token: $1 };
|
|
18246
18422
|
});
|
|
18247
18423
|
function Enum(ctx, state2) {
|
|
18248
18424
|
return (0, import_lib2.$EVENT)(ctx, state2, "Enum", Enum$0);
|
|
18249
18425
|
}
|
|
18250
|
-
var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18426
|
+
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) {
|
|
18251
18427
|
return { $loc, token: $1 };
|
|
18252
18428
|
});
|
|
18253
18429
|
function Interface(ctx, state2) {
|
|
18254
18430
|
return (0, import_lib2.$EVENT)(ctx, state2, "Interface", Interface$0);
|
|
18255
18431
|
}
|
|
18256
|
-
var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18432
|
+
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) {
|
|
18257
18433
|
return { $loc, token: $1 };
|
|
18258
18434
|
});
|
|
18259
18435
|
function Global(ctx, state2) {
|
|
18260
18436
|
return (0, import_lib2.$EVENT)(ctx, state2, "Global", Global$0);
|
|
18261
18437
|
}
|
|
18262
|
-
var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18438
|
+
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) {
|
|
18263
18439
|
return { $loc, token: $1 };
|
|
18264
18440
|
});
|
|
18265
18441
|
function Module(ctx, state2) {
|
|
18266
18442
|
return (0, import_lib2.$EVENT)(ctx, state2, "Module", Module$0);
|
|
18267
18443
|
}
|
|
18268
|
-
var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18444
|
+
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) {
|
|
18269
18445
|
return { $loc, token: $1 };
|
|
18270
18446
|
});
|
|
18271
18447
|
function Namespace(ctx, state2) {
|
|
@@ -18579,7 +18755,7 @@ var ReturnTypeSuffix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib
|
|
|
18579
18755
|
function ReturnTypeSuffix(ctx, state2) {
|
|
18580
18756
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
|
|
18581
18757
|
}
|
|
18582
|
-
var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
18758
|
+
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) {
|
|
18583
18759
|
var asserts = $1;
|
|
18584
18760
|
var t = $3;
|
|
18585
18761
|
if (!t)
|
|
@@ -18680,8 +18856,8 @@ var TypeUnarySuffix$$ = [TypeUnarySuffix$0, TypeUnarySuffix$1, TypeUnarySuffix$2
|
|
|
18680
18856
|
function TypeUnarySuffix(ctx, state2) {
|
|
18681
18857
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
|
|
18682
18858
|
}
|
|
18683
|
-
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18684
|
-
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18859
|
+
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L241, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
18860
|
+
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
18685
18861
|
var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
|
|
18686
18862
|
function TypeUnaryOp(ctx, state2) {
|
|
18687
18863
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
|
|
@@ -18711,7 +18887,7 @@ var TypeIndexedAccess$$ = [TypeIndexedAccess$0, TypeIndexedAccess$1, TypeIndexed
|
|
|
18711
18887
|
function TypeIndexedAccess(ctx, state2) {
|
|
18712
18888
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
|
|
18713
18889
|
}
|
|
18714
|
-
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
18890
|
+
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L242, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
|
|
18715
18891
|
return { $loc, token: "unknown" };
|
|
18716
18892
|
});
|
|
18717
18893
|
function UnknownAlias(ctx, state2) {
|
|
@@ -19104,13 +19280,13 @@ var TypeLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EX
|
|
|
19104
19280
|
return num;
|
|
19105
19281
|
return $0;
|
|
19106
19282
|
});
|
|
19107
|
-
var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19283
|
+
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) {
|
|
19108
19284
|
return { type: "VoidType", $loc, token: $1 };
|
|
19109
19285
|
});
|
|
19110
|
-
var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19286
|
+
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) {
|
|
19111
19287
|
return { type: "UniqueSymbolType", children: $0 };
|
|
19112
19288
|
});
|
|
19113
|
-
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
19289
|
+
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L245, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
19114
19290
|
return { $loc, token: "[]" };
|
|
19115
19291
|
});
|
|
19116
19292
|
var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
|
|
@@ -19129,7 +19305,7 @@ var InlineInterfacePropertyDelimiter$0 = (0, import_lib2.$C)((0, import_lib2.$S)
|
|
|
19129
19305
|
var InlineInterfacePropertyDelimiter$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)(SameLineOrIndentedFurther, InlineBasicInterfaceProperty)), InsertComma), function(value) {
|
|
19130
19306
|
return value[1];
|
|
19131
19307
|
});
|
|
19132
|
-
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)($
|
|
19308
|
+
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 "}"'))));
|
|
19133
19309
|
var InlineInterfacePropertyDelimiter$3 = (0, import_lib2.$Y)(EOS);
|
|
19134
19310
|
var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
|
|
19135
19311
|
function InlineInterfacePropertyDelimiter(ctx, state2) {
|
|
@@ -19195,14 +19371,17 @@ function TypeFunctionArrow(ctx, state2) {
|
|
|
19195
19371
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeFunctionArrow", TypeFunctionArrow$0);
|
|
19196
19372
|
}
|
|
19197
19373
|
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) {
|
|
19374
|
+
var open = $1;
|
|
19198
19375
|
var args = $2;
|
|
19199
|
-
|
|
19376
|
+
var ws = $3;
|
|
19377
|
+
var close = $4;
|
|
19378
|
+
args = args.flatMap(([ws2, [arg, delim]]) => [prepend(ws2, arg), delim]);
|
|
19200
19379
|
args.pop();
|
|
19201
19380
|
return {
|
|
19202
19381
|
type: "TypeArguments",
|
|
19203
19382
|
ts: true,
|
|
19204
19383
|
args,
|
|
19205
|
-
children:
|
|
19384
|
+
children: [open, args, ws, close]
|
|
19206
19385
|
};
|
|
19207
19386
|
});
|
|
19208
19387
|
function TypeArguments(ctx, state2) {
|
|
@@ -19368,7 +19547,7 @@ var CivetPrologue$$ = [CivetPrologue$0, CivetPrologue$1];
|
|
|
19368
19547
|
function CivetPrologue(ctx, state2) {
|
|
19369
19548
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
|
|
19370
19549
|
}
|
|
19371
|
-
var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19550
|
+
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) {
|
|
19372
19551
|
var options = $3;
|
|
19373
19552
|
return {
|
|
19374
19553
|
type: "CivetPrologue",
|