@danielx/civet 0.8.15 → 0.8.17
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 +21 -0
- package/README.md +1 -1
- package/dist/browser.js +1079 -827
- package/dist/main.js +1079 -827
- package/dist/main.mjs +1079 -827
- 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();
|
|
@@ -1139,7 +1175,6 @@ var skipParens = /* @__PURE__ */ new Set([
|
|
|
1139
1175
|
"JSXElement",
|
|
1140
1176
|
"JSXFragment",
|
|
1141
1177
|
"Literal",
|
|
1142
|
-
"NewExpression",
|
|
1143
1178
|
"ParenthesizedExpression",
|
|
1144
1179
|
"Ref",
|
|
1145
1180
|
"Placeholder",
|
|
@@ -1161,7 +1196,10 @@ function makeLeftHandSideExpression(expression) {
|
|
|
1161
1196
|
if (skipParens.has(expression.type)) {
|
|
1162
1197
|
return expression;
|
|
1163
1198
|
}
|
|
1164
|
-
if (expression.type === "
|
|
1199
|
+
if (expression.type === "NewExpression" && expression.expression.children.some(($6) => $6?.type === "Call")) {
|
|
1200
|
+
return expression;
|
|
1201
|
+
}
|
|
1202
|
+
if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($7) => $7.type === "ObjectExpression")) {
|
|
1165
1203
|
return expression;
|
|
1166
1204
|
}
|
|
1167
1205
|
}
|
|
@@ -1176,7 +1214,7 @@ function parenthesizeExpression(expression) {
|
|
|
1176
1214
|
});
|
|
1177
1215
|
}
|
|
1178
1216
|
function checkValidLHS(node) {
|
|
1179
|
-
let
|
|
1217
|
+
let ref7;
|
|
1180
1218
|
switch (node?.type) {
|
|
1181
1219
|
case "UnaryExpression": {
|
|
1182
1220
|
node.children.unshift({
|
|
@@ -1186,7 +1224,7 @@ function checkValidLHS(node) {
|
|
|
1186
1224
|
return true;
|
|
1187
1225
|
}
|
|
1188
1226
|
case "CallExpression": {
|
|
1189
|
-
const lastType = (
|
|
1227
|
+
const lastType = (ref7 = node.children)[ref7.length - 1]?.type;
|
|
1190
1228
|
switch (lastType) {
|
|
1191
1229
|
case "PropertyAccess":
|
|
1192
1230
|
case "SliceExpression":
|
|
@@ -1234,8 +1272,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1234
1272
|
node.parent = parent;
|
|
1235
1273
|
}
|
|
1236
1274
|
if (depth && isParent(node)) {
|
|
1237
|
-
for (let
|
|
1238
|
-
const child =
|
|
1275
|
+
for (let ref8 = node.children, i9 = 0, len9 = ref8.length; i9 < len9; i9++) {
|
|
1276
|
+
const child = ref8[i9];
|
|
1239
1277
|
updateParentPointers(child, node, depth - 1);
|
|
1240
1278
|
}
|
|
1241
1279
|
}
|
|
@@ -1283,11 +1321,11 @@ function convertOptionalType(suffix) {
|
|
|
1283
1321
|
const wrap = suffix.type === "ReturnTypeAnnotation";
|
|
1284
1322
|
spliceChild(suffix, suffix.t, 1, suffix.t = [
|
|
1285
1323
|
getTrimmingSpace(suffix.t),
|
|
1286
|
-
wrap
|
|
1324
|
+
wrap ? "(" : void 0,
|
|
1287
1325
|
// TODO: avoid parens if unnecessary
|
|
1288
1326
|
"undefined | ",
|
|
1289
|
-
parenthesizeType(
|
|
1290
|
-
wrap
|
|
1327
|
+
parenthesizeType(trimFirstSpace(suffix.t)),
|
|
1328
|
+
wrap ? ")" : void 0
|
|
1291
1329
|
]);
|
|
1292
1330
|
}
|
|
1293
1331
|
var typeNeedsNoParens = /* @__PURE__ */ new Set([
|
|
@@ -1301,7 +1339,11 @@ function parenthesizeType(type) {
|
|
|
1301
1339
|
if (typeNeedsNoParens.has(type.type)) {
|
|
1302
1340
|
return type;
|
|
1303
1341
|
}
|
|
1304
|
-
return
|
|
1342
|
+
return makeNode({
|
|
1343
|
+
type: "TypeParenthesized",
|
|
1344
|
+
ts: true,
|
|
1345
|
+
children: ["(", type, ")"]
|
|
1346
|
+
});
|
|
1305
1347
|
}
|
|
1306
1348
|
function wrapIIFE(expressions, asyncFlag, generator) {
|
|
1307
1349
|
let awaitPrefix;
|
|
@@ -1372,8 +1414,8 @@ function wrapIIFE(expressions, asyncFlag, generator) {
|
|
|
1372
1414
|
children.splice(1, 0, ".bind(this)");
|
|
1373
1415
|
}
|
|
1374
1416
|
if (gatherRecursiveWithinFunction(block, (a2) => typeof a2 === "object" && a2 != null && "token" in a2 && a2.token === "arguments").length) {
|
|
1375
|
-
let
|
|
1376
|
-
children[children.length - 1] = (
|
|
1417
|
+
let ref9;
|
|
1418
|
+
children[children.length - 1] = (ref9 = parameters.children)[ref9.length - 1] = "(arguments)";
|
|
1377
1419
|
}
|
|
1378
1420
|
}
|
|
1379
1421
|
let exp = makeNode({
|
|
@@ -1400,13 +1442,16 @@ function wrapIIFE(expressions, asyncFlag, generator) {
|
|
|
1400
1442
|
}
|
|
1401
1443
|
return exp;
|
|
1402
1444
|
}
|
|
1403
|
-
function wrapWithReturn(expression) {
|
|
1445
|
+
function wrapWithReturn(expression, parent = expression?.parent, semi = false) {
|
|
1404
1446
|
const children = expression ? ["return ", expression] : ["return"];
|
|
1447
|
+
if (semi) {
|
|
1448
|
+
children.unshift(";");
|
|
1449
|
+
}
|
|
1405
1450
|
return makeNode({
|
|
1406
1451
|
type: "ReturnStatement",
|
|
1407
1452
|
children,
|
|
1408
1453
|
expression,
|
|
1409
|
-
parent
|
|
1454
|
+
parent
|
|
1410
1455
|
});
|
|
1411
1456
|
}
|
|
1412
1457
|
function flatJoin(array, separator) {
|
|
@@ -1648,9 +1693,11 @@ function adjustBindingElements(elements) {
|
|
|
1648
1693
|
if (l) {
|
|
1649
1694
|
if (arrayElementHasTrailingComma(after[l - 1]))
|
|
1650
1695
|
l++;
|
|
1696
|
+
const elements2 = trimFirstSpace(after);
|
|
1651
1697
|
blockPrefix = {
|
|
1652
1698
|
type: "PostRestBindingElements",
|
|
1653
|
-
|
|
1699
|
+
elements: elements2,
|
|
1700
|
+
children: ["[", elements2, "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
|
|
1654
1701
|
names: after.flatMap((p) => p.names)
|
|
1655
1702
|
};
|
|
1656
1703
|
}
|
|
@@ -1688,13 +1735,14 @@ function gatherBindingCode(statements, opts) {
|
|
|
1688
1735
|
return;
|
|
1689
1736
|
}
|
|
1690
1737
|
if (opts?.injectParamProps && n.type === "Parameter" && n.accessModifier) {
|
|
1691
|
-
n.names.
|
|
1692
|
-
|
|
1738
|
+
for (let ref1 = n.names, i2 = 0, len1 = ref1.length; i2 < len1; i2++) {
|
|
1739
|
+
const id = ref1[i2];
|
|
1740
|
+
thisAssignments2.push({
|
|
1693
1741
|
type: "AssignmentExpression",
|
|
1694
1742
|
children: [`this.${id} = `, id],
|
|
1695
1743
|
js: true
|
|
1696
|
-
})
|
|
1697
|
-
}
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1698
1746
|
return;
|
|
1699
1747
|
}
|
|
1700
1748
|
const { blockPrefix } = n;
|
|
@@ -1706,8 +1754,8 @@ function gatherBindingCode(statements, opts) {
|
|
|
1706
1754
|
return [splices, thisAssignments];
|
|
1707
1755
|
}
|
|
1708
1756
|
function arrayElementHasTrailingComma(elementNode) {
|
|
1709
|
-
let
|
|
1710
|
-
const lastChild = (
|
|
1757
|
+
let ref2;
|
|
1758
|
+
const lastChild = (ref2 = elementNode.children)[ref2.length - 1];
|
|
1711
1759
|
return lastChild && lastChild[lastChild.length - 1]?.token === ",";
|
|
1712
1760
|
}
|
|
1713
1761
|
function gatherBindingPatternTypeSuffix(pattern) {
|
|
@@ -1719,8 +1767,8 @@ function gatherBindingPatternTypeSuffix(pattern) {
|
|
|
1719
1767
|
case "ArrayBindingPattern": {
|
|
1720
1768
|
{
|
|
1721
1769
|
const results = [];
|
|
1722
|
-
for (let
|
|
1723
|
-
const elem =
|
|
1770
|
+
for (let ref3 = pattern.elements, i3 = 0, len22 = ref3.length; i3 < len22; i3++) {
|
|
1771
|
+
const elem = ref3[i3];
|
|
1724
1772
|
let { typeSuffix } = elem;
|
|
1725
1773
|
typeSuffix ??= elem.binding?.typeSuffix;
|
|
1726
1774
|
if (typeSuffix) {
|
|
@@ -1758,8 +1806,8 @@ function gatherBindingPatternTypeSuffix(pattern) {
|
|
|
1758
1806
|
{
|
|
1759
1807
|
let restType;
|
|
1760
1808
|
const results1 = [];
|
|
1761
|
-
for (let
|
|
1762
|
-
const prop =
|
|
1809
|
+
for (let ref4 = pattern.properties, i4 = 0, len3 = ref4.length; i4 < len3; i4++) {
|
|
1810
|
+
const prop = ref4[i4];
|
|
1763
1811
|
let { typeSuffix } = prop;
|
|
1764
1812
|
typeSuffix ??= prop.value?.typeSuffix;
|
|
1765
1813
|
if (typeSuffix) {
|
|
@@ -1911,8 +1959,14 @@ var declareHelper = {
|
|
|
1911
1959
|
// [indent, statement]
|
|
1912
1960
|
preludeVar,
|
|
1913
1961
|
moduloRef,
|
|
1914
|
-
|
|
1915
|
-
"
|
|
1962
|
+
" = ",
|
|
1963
|
+
ts("("),
|
|
1964
|
+
"(a",
|
|
1965
|
+
ts(": number"),
|
|
1966
|
+
", b",
|
|
1967
|
+
ts(": number"),
|
|
1968
|
+
") => (a % b + b) % b",
|
|
1969
|
+
ts(") as ((a: number, b: number) => number) & ((a: bigint, b: bigint) => bigint)")
|
|
1916
1970
|
], ";\n"]);
|
|
1917
1971
|
},
|
|
1918
1972
|
Falsy(FalsyRef) {
|
|
@@ -1985,7 +2039,7 @@ var declareHelper = {
|
|
|
1985
2039
|
AutoPromise(ref) {
|
|
1986
2040
|
state.prelude.push([
|
|
1987
2041
|
"",
|
|
1988
|
-
ts(["type ", ref, "<T> =
|
|
2042
|
+
ts(["type ", ref, "<T> = Promise<Awaited<T>>"]),
|
|
1989
2043
|
";\n"
|
|
1990
2044
|
]);
|
|
1991
2045
|
},
|
|
@@ -2477,7 +2531,7 @@ function getTypeArguments(args) {
|
|
|
2477
2531
|
if (!Array.isArray(args)) {
|
|
2478
2532
|
throw new Error("getTypeArguments could not find relevant array");
|
|
2479
2533
|
}
|
|
2480
|
-
return args.filter((
|
|
2534
|
+
return args.filter((a1) => typeof a1 === "object" && a1 != null && "type" in a1 && a1.type === "TypeArgument");
|
|
2481
2535
|
}
|
|
2482
2536
|
function isVoidType(t) {
|
|
2483
2537
|
return typeof t === "object" && t != null && "type" in t && t.type === "TypeLiteral" && "t" in t && typeof t.t === "object" && t.t != null && "type" in t.t && t.t.type === "VoidType";
|
|
@@ -2654,14 +2708,10 @@ function processReturnValue(func) {
|
|
|
2654
2708
|
let ref1;
|
|
2655
2709
|
if (!((ref1 = block.children)[ref1.length - 2]?.type === "ReturnStatement")) {
|
|
2656
2710
|
let ref2;
|
|
2657
|
-
const indent = getIndent((ref2 = block.expressions)[ref2.length - 1])
|
|
2711
|
+
const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]);
|
|
2658
2712
|
block.expressions.push([
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
type: "ReturnStatement",
|
|
2662
|
-
expression: ref,
|
|
2663
|
-
children: ["return ", ref]
|
|
2664
|
-
}
|
|
2713
|
+
indent,
|
|
2714
|
+
wrapWithReturn(ref, block, !indent)
|
|
2665
2715
|
]);
|
|
2666
2716
|
}
|
|
2667
2717
|
return true;
|
|
@@ -2673,34 +2723,103 @@ function patternAsValue(pattern) {
|
|
|
2673
2723
|
const index = children.indexOf(pattern.elements);
|
|
2674
2724
|
if (index < 0)
|
|
2675
2725
|
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 };
|
|
2726
|
+
const elements = children[index] = pattern.elements.map(patternAsValue);
|
|
2727
|
+
return { ...pattern, elements, children };
|
|
2681
2728
|
}
|
|
2682
2729
|
case "ObjectBindingPattern": {
|
|
2683
2730
|
const children = [...pattern.children];
|
|
2684
2731
|
const index = children.indexOf(pattern.properties);
|
|
2685
2732
|
if (index < 0)
|
|
2686
2733
|
throw new Error("failed to find properties in ArrayBindingPattern");
|
|
2687
|
-
children[index] = pattern.properties.map(patternAsValue);
|
|
2688
|
-
return { ...pattern, children };
|
|
2734
|
+
const properties = children[index] = pattern.properties.map(patternAsValue);
|
|
2735
|
+
return { ...pattern, properties, children };
|
|
2689
2736
|
}
|
|
2690
|
-
case "Identifier":
|
|
2691
2737
|
case "BindingProperty": {
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
pattern.value
|
|
2695
|
-
pattern.
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2738
|
+
let children;
|
|
2739
|
+
if (pattern.value?.type === "Identifier") {
|
|
2740
|
+
children = [pattern.value, pattern.delim];
|
|
2741
|
+
if (isWhitespaceOrEmpty(pattern.children[0])) {
|
|
2742
|
+
children.unshift(pattern.children[0]);
|
|
2743
|
+
}
|
|
2744
|
+
} else {
|
|
2745
|
+
children = [...pattern.children];
|
|
2746
|
+
if (pattern.initializer != null) {
|
|
2747
|
+
const index = children.indexOf(pattern.initializer);
|
|
2748
|
+
assert.notEqual(index, -1, "failed to find initializer in BindingElement");
|
|
2749
|
+
children.splice(index, 1);
|
|
2750
|
+
}
|
|
2751
|
+
if (pattern.value != null) {
|
|
2752
|
+
children = children.map(($2) => $2 === pattern.value ? patternAsValue(pattern.value) : $2);
|
|
2753
|
+
}
|
|
2699
2754
|
}
|
|
2700
2755
|
return { ...pattern, children };
|
|
2701
2756
|
}
|
|
2702
|
-
|
|
2757
|
+
case "AtBindingProperty": {
|
|
2758
|
+
const children = [...pattern.children];
|
|
2759
|
+
if (pattern.initializer != null) {
|
|
2760
|
+
const index = children.indexOf(pattern.initializer);
|
|
2761
|
+
assert.notEqual(index, -1, "failed to find initializer in AtBindingProperty");
|
|
2762
|
+
children.splice(index, 1);
|
|
2763
|
+
}
|
|
2764
|
+
return { ...pattern, children };
|
|
2765
|
+
}
|
|
2766
|
+
case "BindingElement": {
|
|
2767
|
+
const children = [...pattern.children];
|
|
2768
|
+
if (pattern.initializer != null) {
|
|
2769
|
+
const index2 = children.indexOf(pattern.initializer);
|
|
2770
|
+
assert.notEqual(index2, -1, "failed to find initializer in BindingElement");
|
|
2771
|
+
children.splice(index2, 1);
|
|
2772
|
+
}
|
|
2773
|
+
const index = children.indexOf(pattern.binding);
|
|
2774
|
+
assert.notEqual(index, -1, "failed to find binding in BindingElement");
|
|
2775
|
+
children[index] = patternAsValue(pattern.binding);
|
|
2776
|
+
return { ...pattern, children };
|
|
2777
|
+
}
|
|
2778
|
+
default: {
|
|
2703
2779
|
return pattern;
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
function patternBindings(pattern) {
|
|
2784
|
+
const bindings = [];
|
|
2785
|
+
recurse(pattern);
|
|
2786
|
+
return bindings;
|
|
2787
|
+
function recurse(pattern2) {
|
|
2788
|
+
switch (pattern2.type) {
|
|
2789
|
+
case "ArrayBindingPattern": {
|
|
2790
|
+
for (let ref3 = pattern2.elements, i2 = 0, len1 = ref3.length; i2 < len1; i2++) {
|
|
2791
|
+
const element = ref3[i2];
|
|
2792
|
+
recurse(element);
|
|
2793
|
+
}
|
|
2794
|
+
;
|
|
2795
|
+
break;
|
|
2796
|
+
}
|
|
2797
|
+
case "ObjectBindingPattern": {
|
|
2798
|
+
for (let ref4 = pattern2.properties, i3 = 0, len22 = ref4.length; i3 < len22; i3++) {
|
|
2799
|
+
const property = ref4[i3];
|
|
2800
|
+
recurse(property);
|
|
2801
|
+
}
|
|
2802
|
+
;
|
|
2803
|
+
break;
|
|
2804
|
+
}
|
|
2805
|
+
case "BindingElement": {
|
|
2806
|
+
recurse(pattern2.binding);
|
|
2807
|
+
break;
|
|
2808
|
+
}
|
|
2809
|
+
case "BindingProperty": {
|
|
2810
|
+
recurse(pattern2.value ?? pattern2.name);
|
|
2811
|
+
break;
|
|
2812
|
+
}
|
|
2813
|
+
case "Binding": {
|
|
2814
|
+
recurse(pattern2.pattern);
|
|
2815
|
+
break;
|
|
2816
|
+
}
|
|
2817
|
+
case "Identifier":
|
|
2818
|
+
case "AtBinding": {
|
|
2819
|
+
bindings.push(pattern2);
|
|
2820
|
+
break;
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2704
2823
|
}
|
|
2705
2824
|
}
|
|
2706
2825
|
function assignResults(node, collect) {
|
|
@@ -2709,8 +2828,8 @@ function assignResults(node, collect) {
|
|
|
2709
2828
|
switch (node.type) {
|
|
2710
2829
|
case "BlockStatement":
|
|
2711
2830
|
if (node.expressions.length) {
|
|
2712
|
-
let
|
|
2713
|
-
assignResults((
|
|
2831
|
+
let ref5;
|
|
2832
|
+
assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
|
|
2714
2833
|
} else {
|
|
2715
2834
|
node.expressions.push(["", collect("void 0"), ";"]);
|
|
2716
2835
|
}
|
|
@@ -2745,7 +2864,7 @@ function assignResults(node, collect) {
|
|
|
2745
2864
|
if (exp.type === "LabelledStatement") {
|
|
2746
2865
|
exp = exp.statement;
|
|
2747
2866
|
}
|
|
2748
|
-
let
|
|
2867
|
+
let ref6;
|
|
2749
2868
|
switch (exp.type) {
|
|
2750
2869
|
case "BreakStatement":
|
|
2751
2870
|
case "ContinueStatement":
|
|
@@ -2756,14 +2875,14 @@ function assignResults(node, collect) {
|
|
|
2756
2875
|
return;
|
|
2757
2876
|
}
|
|
2758
2877
|
case "Declaration": {
|
|
2759
|
-
let
|
|
2878
|
+
let ref7;
|
|
2760
2879
|
if (exp.bindings?.length) {
|
|
2761
|
-
|
|
2880
|
+
ref7 = patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern);
|
|
2762
2881
|
} else {
|
|
2763
|
-
|
|
2882
|
+
ref7 = "void 0";
|
|
2764
2883
|
}
|
|
2765
2884
|
;
|
|
2766
|
-
const value =
|
|
2885
|
+
const value = ref7;
|
|
2767
2886
|
exp.children.push([
|
|
2768
2887
|
"",
|
|
2769
2888
|
[";", collect(value)]
|
|
@@ -2811,11 +2930,17 @@ function assignResults(node, collect) {
|
|
|
2811
2930
|
return;
|
|
2812
2931
|
}
|
|
2813
2932
|
case "SwitchStatement": {
|
|
2814
|
-
|
|
2933
|
+
for (let ref8 = exp.caseBlock.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
|
|
2934
|
+
const clause = ref8[i4];
|
|
2935
|
+
assignResults(clause, collect);
|
|
2936
|
+
}
|
|
2815
2937
|
return;
|
|
2816
2938
|
}
|
|
2817
2939
|
case "TryStatement": {
|
|
2818
|
-
exp.blocks
|
|
2940
|
+
for (let ref9 = exp.blocks, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
|
|
2941
|
+
const block = ref9[i5];
|
|
2942
|
+
assignResults(block, collect);
|
|
2943
|
+
}
|
|
2819
2944
|
return;
|
|
2820
2945
|
}
|
|
2821
2946
|
}
|
|
@@ -2836,20 +2961,28 @@ function insertReturn(node) {
|
|
|
2836
2961
|
const last = node.expressions[node.expressions.length - 1];
|
|
2837
2962
|
insertReturn(last);
|
|
2838
2963
|
} else {
|
|
2839
|
-
|
|
2840
|
-
|
|
2964
|
+
let m1;
|
|
2965
|
+
if (m1 = node.parent?.type, m1 === "CatchClause" || m1 === "WhenClause") {
|
|
2966
|
+
node.expressions.push(["", wrapWithReturn(void 0, node)]);
|
|
2841
2967
|
}
|
|
2842
2968
|
}
|
|
2843
2969
|
return;
|
|
2844
2970
|
}
|
|
2845
2971
|
case "WhenClause": {
|
|
2846
2972
|
if (node.break) {
|
|
2847
|
-
node.children.
|
|
2973
|
+
const breakIndex = node.children.indexOf(node.break);
|
|
2974
|
+
assert.notEqual(breakIndex, -1, "Could not find break in when clause");
|
|
2975
|
+
node.children.splice(breakIndex, 1);
|
|
2976
|
+
node.break = void 0;
|
|
2848
2977
|
}
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2978
|
+
insertReturn(node.block);
|
|
2979
|
+
if (!isExit(node.block)) {
|
|
2980
|
+
const comment = hasTrailingComment(node.block.expressions);
|
|
2981
|
+
let ref10;
|
|
2982
|
+
node.block.expressions.push([
|
|
2983
|
+
comment ? (ref10 = node.block.expressions)[ref10.length - 1][0] || "\n" : "",
|
|
2984
|
+
wrapWithReturn(void 0, node, !comment)
|
|
2985
|
+
]);
|
|
2853
2986
|
}
|
|
2854
2987
|
return;
|
|
2855
2988
|
}
|
|
@@ -2874,7 +3007,7 @@ function insertReturn(node) {
|
|
|
2874
3007
|
if (exp.type === "LabelledStatement") {
|
|
2875
3008
|
exp = exp.statement;
|
|
2876
3009
|
}
|
|
2877
|
-
let
|
|
3010
|
+
let ref11;
|
|
2878
3011
|
switch (exp.type) {
|
|
2879
3012
|
case "BreakStatement":
|
|
2880
3013
|
case "ContinueStatement":
|
|
@@ -2885,27 +3018,30 @@ function insertReturn(node) {
|
|
|
2885
3018
|
return;
|
|
2886
3019
|
}
|
|
2887
3020
|
case "Declaration": {
|
|
2888
|
-
let
|
|
3021
|
+
let ref12;
|
|
2889
3022
|
if (exp.bindings?.length) {
|
|
2890
|
-
|
|
3023
|
+
ref12 = [" ", patternAsValue((ref11 = exp.bindings)[ref11.length - 1].pattern)];
|
|
2891
3024
|
} else {
|
|
2892
|
-
|
|
3025
|
+
ref12 = [];
|
|
2893
3026
|
}
|
|
2894
3027
|
;
|
|
2895
|
-
const value =
|
|
3028
|
+
const value = ref12;
|
|
2896
3029
|
const parent = outer.parent;
|
|
2897
3030
|
const index = findChildIndex(parent?.expressions, outer);
|
|
2898
3031
|
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
|
-
|
|
3032
|
+
parent.expressions.splice(index + 1, 0, [
|
|
3033
|
+
"",
|
|
3034
|
+
{
|
|
3035
|
+
type: "ReturnStatement",
|
|
3036
|
+
expression: value,
|
|
3037
|
+
children: [
|
|
3038
|
+
!(parent.expressions[index][2] === ";") ? ";" : void 0,
|
|
3039
|
+
"return",
|
|
3040
|
+
value
|
|
3041
|
+
],
|
|
3042
|
+
parent: exp
|
|
3043
|
+
}
|
|
3044
|
+
]);
|
|
2909
3045
|
braceBlock(parent);
|
|
2910
3046
|
return;
|
|
2911
3047
|
}
|
|
@@ -2916,12 +3052,7 @@ function insertReturn(node) {
|
|
|
2916
3052
|
assert.notEqual(index, -1, "Could not find function declaration in parent");
|
|
2917
3053
|
parent.expressions.splice(index + 1, 0, [
|
|
2918
3054
|
"",
|
|
2919
|
-
|
|
2920
|
-
type: "ReturnStatement",
|
|
2921
|
-
expression: exp.id,
|
|
2922
|
-
children: [";return ", exp.id],
|
|
2923
|
-
parent: exp
|
|
2924
|
-
}
|
|
3055
|
+
wrapWithReturn(exp.id, exp, true)
|
|
2925
3056
|
]);
|
|
2926
3057
|
braceBlock(parent);
|
|
2927
3058
|
return;
|
|
@@ -2944,12 +3075,11 @@ function insertReturn(node) {
|
|
|
2944
3075
|
if (exp.else)
|
|
2945
3076
|
insertReturn(exp.else.block);
|
|
2946
3077
|
else
|
|
2947
|
-
exp.children.push([
|
|
2948
|
-
|
|
2949
|
-
// NOTE: add a prefixed
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
}]);
|
|
3078
|
+
exp.children.push([
|
|
3079
|
+
"",
|
|
3080
|
+
// NOTE: add a prefixed semicolon because the if block may not be braced
|
|
3081
|
+
wrapWithReturn(void 0, exp, true)
|
|
3082
|
+
]);
|
|
2953
3083
|
return;
|
|
2954
3084
|
}
|
|
2955
3085
|
case "PatternMatchingStatement": {
|
|
@@ -2957,30 +3087,30 @@ function insertReturn(node) {
|
|
|
2957
3087
|
return;
|
|
2958
3088
|
}
|
|
2959
3089
|
case "SwitchStatement": {
|
|
2960
|
-
|
|
3090
|
+
for (let ref13 = exp.caseBlock.clauses, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
|
|
3091
|
+
const clause = ref13[i6];
|
|
3092
|
+
insertReturn(clause);
|
|
3093
|
+
}
|
|
2961
3094
|
return;
|
|
2962
3095
|
}
|
|
2963
3096
|
case "TryStatement": {
|
|
2964
|
-
exp.blocks.
|
|
3097
|
+
for (let ref14 = exp.blocks, i7 = 0, len6 = ref14.length; i7 < len6; i7++) {
|
|
3098
|
+
const block = ref14[i7];
|
|
3099
|
+
insertReturn(block);
|
|
3100
|
+
}
|
|
2965
3101
|
return;
|
|
2966
3102
|
}
|
|
2967
3103
|
}
|
|
2968
3104
|
if (node[node.length - 1]?.type === "SemicolonDelimiter") {
|
|
2969
3105
|
return;
|
|
2970
3106
|
}
|
|
2971
|
-
|
|
2972
|
-
node.splice(1, 1, returnStatement);
|
|
2973
|
-
}
|
|
2974
|
-
function insertSwitchReturns(exp) {
|
|
2975
|
-
exp.caseBlock.clauses.forEach((clause) => {
|
|
2976
|
-
return insertReturn(clause);
|
|
2977
|
-
});
|
|
3107
|
+
node[1] = wrapWithReturn(node[1]);
|
|
2978
3108
|
}
|
|
2979
3109
|
function processBreakContinueWith(statement) {
|
|
2980
3110
|
let changed = false;
|
|
2981
3111
|
for (const control of gatherRecursiveWithinFunction(
|
|
2982
3112
|
statement.block,
|
|
2983
|
-
($
|
|
3113
|
+
($3) => $3.type === "BreakStatement" || $3.type === "ContinueStatement"
|
|
2984
3114
|
)) {
|
|
2985
3115
|
let controlName2 = function() {
|
|
2986
3116
|
switch (control.type) {
|
|
@@ -2995,8 +3125,8 @@ function processBreakContinueWith(statement) {
|
|
|
2995
3125
|
var controlName = controlName2;
|
|
2996
3126
|
if (control.with) {
|
|
2997
3127
|
if (control.label) {
|
|
2998
|
-
let
|
|
2999
|
-
if (!(
|
|
3128
|
+
let m2;
|
|
3129
|
+
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
3130
|
continue;
|
|
3001
3131
|
}
|
|
3002
3132
|
} else {
|
|
@@ -3015,7 +3145,7 @@ function processBreakContinueWith(statement) {
|
|
|
3015
3145
|
)
|
|
3016
3146
|
);
|
|
3017
3147
|
updateParentPointers(control.with, control);
|
|
3018
|
-
const i = control.children.findIndex(($
|
|
3148
|
+
const i = control.children.findIndex(($4) => $4?.type === "Error");
|
|
3019
3149
|
if (i >= 0) {
|
|
3020
3150
|
control.children.splice(i, 1);
|
|
3021
3151
|
}
|
|
@@ -3057,7 +3187,7 @@ function wrapIterationReturningResults(statement, collect) {
|
|
|
3057
3187
|
}
|
|
3058
3188
|
const resultsRef = statement.resultsRef = makeRef("results");
|
|
3059
3189
|
const declaration = iterationDeclaration(statement);
|
|
3060
|
-
const { ancestor, child } = findAncestor(statement, ($
|
|
3190
|
+
const { ancestor, child } = findAncestor(statement, ($5) => $5.type === "BlockStatement");
|
|
3061
3191
|
assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
|
|
3062
3192
|
const index = findChildIndex(ancestor.expressions, child);
|
|
3063
3193
|
assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
|
|
@@ -3110,6 +3240,9 @@ function iterationDeclaration(statement) {
|
|
|
3110
3240
|
case "product": {
|
|
3111
3241
|
return "1";
|
|
3112
3242
|
}
|
|
3243
|
+
case "join": {
|
|
3244
|
+
return '""';
|
|
3245
|
+
}
|
|
3113
3246
|
default: {
|
|
3114
3247
|
return "0";
|
|
3115
3248
|
}
|
|
@@ -3154,7 +3287,8 @@ function iterationDeclaration(statement) {
|
|
|
3154
3287
|
case "count": {
|
|
3155
3288
|
return ["if (", node, ") ++", resultsRef];
|
|
3156
3289
|
}
|
|
3157
|
-
case "sum":
|
|
3290
|
+
case "sum":
|
|
3291
|
+
case "join": {
|
|
3158
3292
|
return [resultsRef, " += ", node];
|
|
3159
3293
|
}
|
|
3160
3294
|
case "product": {
|
|
@@ -3179,9 +3313,9 @@ function iterationDefaultBody(statement) {
|
|
|
3179
3313
|
}
|
|
3180
3314
|
const reduction = statement.type === "ForStatement" && statement.reduction;
|
|
3181
3315
|
function fillBlock(expression) {
|
|
3182
|
-
let
|
|
3183
|
-
let
|
|
3184
|
-
if (
|
|
3316
|
+
let ref15;
|
|
3317
|
+
let m3;
|
|
3318
|
+
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
3319
|
block.expressions.pop();
|
|
3186
3320
|
}
|
|
3187
3321
|
block.expressions.push(expression);
|
|
@@ -3211,7 +3345,29 @@ function iterationDefaultBody(statement) {
|
|
|
3211
3345
|
}
|
|
3212
3346
|
}
|
|
3213
3347
|
if (statement.type === "ForStatement" && statement.declaration?.type === "ForDeclaration") {
|
|
3214
|
-
|
|
3348
|
+
if (reduction) {
|
|
3349
|
+
const bindings = patternBindings(statement.declaration.binding.pattern);
|
|
3350
|
+
if (bindings.length) {
|
|
3351
|
+
fillBlock(["", bindings[0]]);
|
|
3352
|
+
for (const binding of bindings.slice(1)) {
|
|
3353
|
+
binding.children.unshift({
|
|
3354
|
+
type: "Error",
|
|
3355
|
+
subtype: "Warning",
|
|
3356
|
+
message: "Ignored binding in reduction loop with implicit body"
|
|
3357
|
+
});
|
|
3358
|
+
}
|
|
3359
|
+
} else {
|
|
3360
|
+
fillBlock([
|
|
3361
|
+
"",
|
|
3362
|
+
{
|
|
3363
|
+
type: "Error",
|
|
3364
|
+
message: "Empty binding pattern in reduction loop with implicit body"
|
|
3365
|
+
}
|
|
3366
|
+
]);
|
|
3367
|
+
}
|
|
3368
|
+
} else {
|
|
3369
|
+
fillBlock(["", patternAsValue(statement.declaration.binding.pattern)]);
|
|
3370
|
+
}
|
|
3215
3371
|
block.empty = false;
|
|
3216
3372
|
}
|
|
3217
3373
|
return false;
|
|
@@ -3239,28 +3395,33 @@ function processParams(f) {
|
|
|
3239
3395
|
injectParamProps: isConstructor
|
|
3240
3396
|
});
|
|
3241
3397
|
if (isConstructor) {
|
|
3242
|
-
const { ancestor } = findAncestor(f, ($
|
|
3398
|
+
const { ancestor } = findAncestor(f, ($6) => $6.type === "ClassExpression");
|
|
3243
3399
|
if (ancestor != null) {
|
|
3244
|
-
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($
|
|
3400
|
+
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($7) => $7.type === "FieldDefinition").map(($8) => $8.id).filter((a2) => typeof a2 === "object" && a2 != null && "type" in a2 && a2.type === "Identifier").map(($9) => $9.name));
|
|
3245
3401
|
const classExpressions = ancestor.body.expressions;
|
|
3246
3402
|
let index = findChildIndex(classExpressions, f);
|
|
3247
3403
|
assert.notEqual(index, -1, "Could not find constructor in class");
|
|
3248
|
-
let
|
|
3249
|
-
while (
|
|
3404
|
+
let m4;
|
|
3405
|
+
while (m4 = classExpressions[index - 1]?.[1], typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "MethodDefinition" && "name" in m4 && m4.name === "constructor") {
|
|
3250
3406
|
index--;
|
|
3251
3407
|
}
|
|
3252
3408
|
const fStatement = classExpressions[index];
|
|
3253
|
-
for (let
|
|
3254
|
-
const parameter =
|
|
3255
|
-
|
|
3409
|
+
for (let ref16 = gatherRecursive(parameters, ($10) => $10.type === "Parameter"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
|
|
3410
|
+
const parameter = ref16[i8];
|
|
3411
|
+
const { accessModifier } = parameter;
|
|
3412
|
+
if (!(accessModifier || parameter.typeSuffix)) {
|
|
3256
3413
|
continue;
|
|
3257
3414
|
}
|
|
3258
|
-
for (let
|
|
3259
|
-
const binding =
|
|
3415
|
+
for (let ref17 = gatherRecursive(parameter, ($11) => $11.type === "AtBinding"), i9 = 0, len8 = ref17.length; i9 < len8; i9++) {
|
|
3416
|
+
const binding = ref17[i9];
|
|
3260
3417
|
const typeSuffix = binding.parent?.typeSuffix;
|
|
3261
|
-
if (!typeSuffix) {
|
|
3418
|
+
if (!(accessModifier || typeSuffix)) {
|
|
3262
3419
|
continue;
|
|
3263
3420
|
}
|
|
3421
|
+
if (parameter.accessModifier) {
|
|
3422
|
+
replaceNode(parameter.accessModifier, void 0);
|
|
3423
|
+
parameter.accessModifier = void 0;
|
|
3424
|
+
}
|
|
3264
3425
|
const id = binding.ref.id;
|
|
3265
3426
|
if (fields.has(id)) {
|
|
3266
3427
|
continue;
|
|
@@ -3269,7 +3430,7 @@ function processParams(f) {
|
|
|
3269
3430
|
type: "FieldDefinition",
|
|
3270
3431
|
id,
|
|
3271
3432
|
typeSuffix,
|
|
3272
|
-
children: [id, typeSuffix]
|
|
3433
|
+
children: [accessModifier, id, typeSuffix]
|
|
3273
3434
|
}, ";"]);
|
|
3274
3435
|
fStatement[0] = "";
|
|
3275
3436
|
}
|
|
@@ -3293,10 +3454,10 @@ function processParams(f) {
|
|
|
3293
3454
|
if (isConstructor) {
|
|
3294
3455
|
const superCalls = gatherNodes(
|
|
3295
3456
|
expressions,
|
|
3296
|
-
(
|
|
3457
|
+
(a3) => typeof a3 === "object" && a3 != null && "type" in a3 && a3.type === "CallExpression" && "children" in a3 && Array.isArray(a3.children) && a3.children.length >= 1 && typeof a3.children[0] === "object" && a3.children[0] != null && "token" in a3.children[0] && a3.children[0].token === "super"
|
|
3297
3458
|
);
|
|
3298
3459
|
if (superCalls.length) {
|
|
3299
|
-
const { child } = findAncestor(superCalls[0], (
|
|
3460
|
+
const { child } = findAncestor(superCalls[0], (a4) => a4 === block);
|
|
3300
3461
|
const index = findChildIndex(expressions, child);
|
|
3301
3462
|
if (index < 0) {
|
|
3302
3463
|
throw new Error("Could not find super call within top-level expressions");
|
|
@@ -3311,21 +3472,33 @@ function processParams(f) {
|
|
|
3311
3472
|
function processSignature(f) {
|
|
3312
3473
|
const { block, signature } = f;
|
|
3313
3474
|
if (!f.async?.length && hasAwait(block)) {
|
|
3314
|
-
f.async
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
const i =
|
|
3321
|
-
|
|
3475
|
+
if (f.async != null) {
|
|
3476
|
+
f.async.push("async ");
|
|
3477
|
+
signature.modifier.async = true;
|
|
3478
|
+
} else {
|
|
3479
|
+
for (let ref18 = gatherRecursiveWithinFunction(block, ($12) => $12.type === "Await"), i10 = 0, len9 = ref18.length; i10 < len9; i10++) {
|
|
3480
|
+
const a = ref18[i10];
|
|
3481
|
+
const i = findChildIndex(a.parent, a);
|
|
3482
|
+
a.parent.children.splice(i + 1, 0, {
|
|
3322
3483
|
type: "Error",
|
|
3323
|
-
message:
|
|
3484
|
+
message: `await invalid in ${signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
|
|
3324
3485
|
});
|
|
3325
|
-
}
|
|
3326
|
-
}
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3489
|
+
if (!f.generator?.length && hasYield(block)) {
|
|
3490
|
+
if (f.generator != null) {
|
|
3327
3491
|
f.generator.push("*");
|
|
3328
3492
|
signature.modifier.generator = true;
|
|
3493
|
+
} else {
|
|
3494
|
+
for (let ref19 = gatherRecursiveWithinFunction(block, ($13) => $13.type === "YieldExpression"), i11 = 0, len10 = ref19.length; i11 < len10; i11++) {
|
|
3495
|
+
const y = ref19[i11];
|
|
3496
|
+
const i = y.children.findIndex(($14) => $14.type === "Yield");
|
|
3497
|
+
y.children.splice(i + 1, 0, {
|
|
3498
|
+
type: "Error",
|
|
3499
|
+
message: `yield invalid in ${f.type === "ArrowFunction" ? "=> arrow function" : signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
|
|
3500
|
+
});
|
|
3501
|
+
}
|
|
3329
3502
|
}
|
|
3330
3503
|
}
|
|
3331
3504
|
if (signature.modifier.async && !signature.modifier.generator && signature.returnType && !isPromiseType(signature.returnType.t)) {
|
|
@@ -3333,21 +3506,15 @@ function processSignature(f) {
|
|
|
3333
3506
|
}
|
|
3334
3507
|
}
|
|
3335
3508
|
function processFunctions(statements, config2) {
|
|
3336
|
-
for (let
|
|
3337
|
-
const f =
|
|
3338
|
-
if (f.type === "FunctionExpression") {
|
|
3509
|
+
for (let ref20 = gatherRecursiveAll(statements, ($15) => $15.type === "FunctionExpression" || $15.type === "ArrowFunction" || $15.type === "MethodDefinition"), i12 = 0, len11 = ref20.length; i12 < len11; i12++) {
|
|
3510
|
+
const f = ref20[i12];
|
|
3511
|
+
if (f.type === "FunctionExpression" || f.type === "MethodDefinition") {
|
|
3339
3512
|
implicitFunctionBlock(f);
|
|
3340
3513
|
}
|
|
3341
3514
|
processSignature(f);
|
|
3342
3515
|
processParams(f);
|
|
3343
3516
|
processReturn(f, config2.implicitReturns);
|
|
3344
3517
|
}
|
|
3345
|
-
for (let ref12 = gatherRecursiveAll(statements, ($14) => $14.type === "MethodDefinition"), i5 = 0, len4 = ref12.length; i5 < len4; i5++) {
|
|
3346
|
-
const f = ref12[i5];
|
|
3347
|
-
implicitFunctionBlock(f);
|
|
3348
|
-
processParams(f);
|
|
3349
|
-
processReturn(f, config2.implicitReturns);
|
|
3350
|
-
}
|
|
3351
3518
|
}
|
|
3352
3519
|
function expressionizeIteration(exp) {
|
|
3353
3520
|
let { async, generator, block, children, statement } = exp;
|
|
@@ -3396,9 +3563,9 @@ function expressionizeIteration(exp) {
|
|
|
3396
3563
|
}
|
|
3397
3564
|
let done;
|
|
3398
3565
|
if (!async) {
|
|
3399
|
-
let
|
|
3400
|
-
if ((
|
|
3401
|
-
const { block: parentBlock, index } =
|
|
3566
|
+
let ref21;
|
|
3567
|
+
if ((ref21 = blockContainingStatement(exp)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21) {
|
|
3568
|
+
const { block: parentBlock, index } = ref21;
|
|
3402
3569
|
statements[0][0] = parentBlock.expressions[index][0];
|
|
3403
3570
|
parentBlock.expressions.splice(index, index + 1 - index, ...statements);
|
|
3404
3571
|
updateParentPointers(parentBlock);
|
|
@@ -3415,8 +3582,8 @@ function expressionizeIteration(exp) {
|
|
|
3415
3582
|
}
|
|
3416
3583
|
}
|
|
3417
3584
|
function processIterationExpressions(statements) {
|
|
3418
|
-
for (let
|
|
3419
|
-
const s =
|
|
3585
|
+
for (let ref22 = gatherRecursiveAll(statements, ($16) => $16.type === "IterationExpression"), i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
|
|
3586
|
+
const s = ref22[i13];
|
|
3420
3587
|
expressionizeIteration(s);
|
|
3421
3588
|
}
|
|
3422
3589
|
}
|
|
@@ -3442,21 +3609,21 @@ function processCoffeeDo(ws, expression) {
|
|
|
3442
3609
|
...parameters,
|
|
3443
3610
|
children: (() => {
|
|
3444
3611
|
const results1 = [];
|
|
3445
|
-
for (let
|
|
3446
|
-
let parameter =
|
|
3612
|
+
for (let ref23 = parameters.children, i14 = 0, len13 = ref23.length; i14 < len13; i14++) {
|
|
3613
|
+
let parameter = ref23[i14];
|
|
3447
3614
|
if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
|
|
3448
|
-
let
|
|
3449
|
-
if (
|
|
3450
|
-
const initializer =
|
|
3615
|
+
let ref24;
|
|
3616
|
+
if (ref24 = parameter.initializer) {
|
|
3617
|
+
const initializer = ref24;
|
|
3451
3618
|
args.push(initializer.expression, parameter.delim);
|
|
3452
3619
|
parameter = {
|
|
3453
3620
|
...parameter,
|
|
3454
3621
|
initializer: void 0,
|
|
3455
|
-
children: parameter.children.filter((
|
|
3622
|
+
children: parameter.children.filter((a5) => a5 !== initializer)
|
|
3456
3623
|
};
|
|
3457
3624
|
} else {
|
|
3458
3625
|
args.push(parameter.children.filter(
|
|
3459
|
-
(
|
|
3626
|
+
(a6) => a6 !== parameter.typeSuffix
|
|
3460
3627
|
));
|
|
3461
3628
|
}
|
|
3462
3629
|
}
|
|
@@ -3468,7 +3635,7 @@ function processCoffeeDo(ws, expression) {
|
|
|
3468
3635
|
expression = {
|
|
3469
3636
|
...expression,
|
|
3470
3637
|
parameters: newParameters,
|
|
3471
|
-
children: expression.children.map(($
|
|
3638
|
+
children: expression.children.map(($17) => $17 === parameters ? newParameters : $17)
|
|
3472
3639
|
};
|
|
3473
3640
|
}
|
|
3474
3641
|
return {
|
|
@@ -3490,7 +3657,7 @@ function makeAmpersandFunction(rhs) {
|
|
|
3490
3657
|
ref = makeRef("$");
|
|
3491
3658
|
inplacePrepend(ref, body);
|
|
3492
3659
|
}
|
|
3493
|
-
if (startsWithPredicate(body, ($
|
|
3660
|
+
if (startsWithPredicate(body, ($18) => $18.type === "ObjectExpression")) {
|
|
3494
3661
|
body = makeLeftHandSideExpression(body);
|
|
3495
3662
|
}
|
|
3496
3663
|
const parameters = makeNode({
|
|
@@ -3529,7 +3696,7 @@ function makeAmpersandFunction(rhs) {
|
|
|
3529
3696
|
}
|
|
3530
3697
|
if (gatherRecursiveWithinFunction(
|
|
3531
3698
|
block,
|
|
3532
|
-
(
|
|
3699
|
+
(a7) => a7 === ref
|
|
3533
3700
|
).length > 1) {
|
|
3534
3701
|
fn.ampersandBlock = false;
|
|
3535
3702
|
}
|
|
@@ -4096,7 +4263,7 @@ function expandChainedComparisons([first, binops]) {
|
|
|
4096
4263
|
// source/parser/pattern-matching.civet
|
|
4097
4264
|
function processPatternTest(lhs, patterns) {
|
|
4098
4265
|
const { ref, refAssignmentComma } = maybeRefAssignment(lhs, "m");
|
|
4099
|
-
const conditionExpression = flatJoin(patterns.map(($) => getPatternConditions(
|
|
4266
|
+
const conditionExpression = flatJoin(patterns.map(($1) => getPatternConditions($1, ref)).map(($2) => flatJoin($2, " && ")), " || ");
|
|
4100
4267
|
return makeLeftHandSideExpression(makeNode({
|
|
4101
4268
|
type: "PatternTest",
|
|
4102
4269
|
children: [
|
|
@@ -4106,7 +4273,7 @@ function processPatternTest(lhs, patterns) {
|
|
|
4106
4273
|
}));
|
|
4107
4274
|
}
|
|
4108
4275
|
function processPatternMatching(statements) {
|
|
4109
|
-
gatherRecursiveAll(statements, ($
|
|
4276
|
+
gatherRecursiveAll(statements, ($3) => $3.type === "SwitchStatement").forEach((s) => {
|
|
4110
4277
|
const { caseBlock } = s;
|
|
4111
4278
|
const { clauses } = caseBlock;
|
|
4112
4279
|
for (let i1 = 0, len3 = clauses.length; i1 < len3; i1++) {
|
|
@@ -4120,7 +4287,7 @@ function processPatternMatching(statements) {
|
|
|
4120
4287
|
}
|
|
4121
4288
|
let errors = false;
|
|
4122
4289
|
let isPattern = false;
|
|
4123
|
-
if (clauses.some(($
|
|
4290
|
+
if (clauses.some(($4) => $4.type === "PatternClause")) {
|
|
4124
4291
|
isPattern = true;
|
|
4125
4292
|
for (let i2 = 0, len1 = clauses.length; i2 < len1; i2++) {
|
|
4126
4293
|
const c = clauses[i2];
|
|
@@ -4158,7 +4325,7 @@ function processPatternMatching(statements) {
|
|
|
4158
4325
|
}
|
|
4159
4326
|
let { patterns, block } = c;
|
|
4160
4327
|
let pattern = patterns[0];
|
|
4161
|
-
const conditionExpression = flatJoin(patterns.map(($
|
|
4328
|
+
const conditionExpression = flatJoin(patterns.map(($5) => getPatternConditions($5, ref)).map(($6) => flatJoin($6, " && ")), " || ");
|
|
4162
4329
|
const condition2 = makeNode({
|
|
4163
4330
|
type: "ParenthesizedExpression",
|
|
4164
4331
|
children: ["(", ...refAssignmentComma, conditionExpression, ")"],
|
|
@@ -4351,38 +4518,59 @@ function getPatternBlockPrefix(pattern, ref, decl = "const ", suffix) {
|
|
|
4351
4518
|
}
|
|
4352
4519
|
}
|
|
4353
4520
|
let [splices, thisAssignments] = gatherBindingCode(pattern);
|
|
4354
|
-
const
|
|
4521
|
+
const patternBindings2 = nonMatcherBindings(pattern);
|
|
4355
4522
|
splices = splices.map((s) => [", ", nonMatcherBindings(s)]);
|
|
4356
|
-
thisAssignments = thisAssignments.map(($
|
|
4357
|
-
const duplicateDeclarations = aggregateDuplicateBindings([
|
|
4523
|
+
thisAssignments = thisAssignments.map(($7) => ["", $7, ";"]);
|
|
4524
|
+
const duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices]);
|
|
4358
4525
|
return [
|
|
4359
4526
|
["", {
|
|
4360
4527
|
type: "Declaration",
|
|
4361
|
-
children: [decl,
|
|
4528
|
+
children: [decl, patternBindings2, suffix, " = ", ref, ...splices],
|
|
4362
4529
|
names: [],
|
|
4363
4530
|
bindings: []
|
|
4364
4531
|
// avoid implicit return of any bindings
|
|
4365
4532
|
}, ";"],
|
|
4366
4533
|
...thisAssignments,
|
|
4367
|
-
...duplicateDeclarations.map(($
|
|
4534
|
+
...duplicateDeclarations.map(($8) => ["", $8, ";"])
|
|
4368
4535
|
];
|
|
4369
4536
|
}
|
|
4370
4537
|
function elideMatchersFromArrayBindings(elements) {
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
case "
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4538
|
+
const results = [];
|
|
4539
|
+
for (let i5 = 0, len4 = elements.length; i5 < len4; i5++) {
|
|
4540
|
+
const element = elements[i5];
|
|
4541
|
+
switch (element.type) {
|
|
4542
|
+
case "BindingRestElement":
|
|
4543
|
+
case "ElisionElement": {
|
|
4544
|
+
results.push(element);
|
|
4545
|
+
break;
|
|
4546
|
+
}
|
|
4547
|
+
case "BindingElement": {
|
|
4548
|
+
switch (element.binding.type) {
|
|
4549
|
+
case "Literal":
|
|
4550
|
+
case "RegularExpressionLiteral":
|
|
4551
|
+
case "StringLiteral":
|
|
4552
|
+
case "PinPattern": {
|
|
4553
|
+
results.push(element.delim);
|
|
4554
|
+
break;
|
|
4555
|
+
}
|
|
4556
|
+
default: {
|
|
4557
|
+
const binding = nonMatcherBindings(element.binding);
|
|
4558
|
+
results.push(makeNode({
|
|
4559
|
+
...element,
|
|
4560
|
+
binding,
|
|
4561
|
+
children: element.children.map((c) => {
|
|
4562
|
+
return c === element.binding ? binding : c;
|
|
4563
|
+
})
|
|
4564
|
+
}));
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
;
|
|
4568
|
+
break;
|
|
4569
|
+
}
|
|
4384
4570
|
}
|
|
4385
|
-
}
|
|
4571
|
+
}
|
|
4572
|
+
;
|
|
4573
|
+
return results;
|
|
4386
4574
|
}
|
|
4387
4575
|
function elideMatchersFromPropertyBindings(properties) {
|
|
4388
4576
|
return properties.map((p) => {
|
|
@@ -4390,6 +4578,10 @@ function elideMatchersFromPropertyBindings(properties) {
|
|
|
4390
4578
|
case "BindingProperty": {
|
|
4391
4579
|
const { children, name, value } = p;
|
|
4392
4580
|
const [ws] = children;
|
|
4581
|
+
const shouldElide = name.type === "NumericLiteral" && !value?.name || name.type === "ComputedPropertyName" && value?.subtype === "NumericLiteral";
|
|
4582
|
+
if (shouldElide) {
|
|
4583
|
+
return;
|
|
4584
|
+
}
|
|
4393
4585
|
switch (value && value.type) {
|
|
4394
4586
|
case "ArrayBindingPattern":
|
|
4395
4587
|
case "ObjectBindingPattern": {
|
|
@@ -4421,32 +4613,22 @@ function elideMatchersFromPropertyBindings(properties) {
|
|
|
4421
4613
|
}
|
|
4422
4614
|
function nonMatcherBindings(pattern) {
|
|
4423
4615
|
switch (pattern.type) {
|
|
4424
|
-
case "ArrayBindingPattern":
|
|
4616
|
+
case "ArrayBindingPattern":
|
|
4617
|
+
case "PostRestBindingElements": {
|
|
4425
4618
|
const elements = elideMatchersFromArrayBindings(pattern.elements);
|
|
4426
|
-
return {
|
|
4619
|
+
return makeNode({
|
|
4427
4620
|
...pattern,
|
|
4428
4621
|
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
|
-
};
|
|
4622
|
+
children: pattern.children.map(($9) => $9 === pattern.elements ? elements : $9)
|
|
4623
|
+
});
|
|
4442
4624
|
}
|
|
4443
4625
|
case "ObjectBindingPattern": {
|
|
4444
4626
|
const properties = elideMatchersFromPropertyBindings(pattern.properties);
|
|
4445
|
-
return {
|
|
4627
|
+
return makeNode({
|
|
4446
4628
|
...pattern,
|
|
4447
4629
|
properties,
|
|
4448
|
-
children: pattern.children.map(($
|
|
4449
|
-
};
|
|
4630
|
+
children: pattern.children.map(($10) => $10 === pattern.properties ? properties : $10)
|
|
4631
|
+
});
|
|
4450
4632
|
}
|
|
4451
4633
|
default: {
|
|
4452
4634
|
return pattern;
|
|
@@ -4454,32 +4636,26 @@ function nonMatcherBindings(pattern) {
|
|
|
4454
4636
|
}
|
|
4455
4637
|
}
|
|
4456
4638
|
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
|
-
}
|
|
4639
|
+
const props = gatherRecursiveAll(
|
|
4640
|
+
bindings,
|
|
4641
|
+
($) => $.type === "BindingProperty" || // Don't deduplicate ...rest properties; user should do so manually
|
|
4642
|
+
// because ...rest can be named arbitrarily
|
|
4643
|
+
//$.type is "BindingRestProperty"
|
|
4644
|
+
$.type === "Identifier" && $.parent?.type === "BindingElement" || $.type === "BindingRestElement"
|
|
4645
|
+
);
|
|
4473
4646
|
const declarations = [];
|
|
4474
4647
|
const propsGroupedByName = /* @__PURE__ */ new Map();
|
|
4475
|
-
for (let
|
|
4476
|
-
const p = props[
|
|
4648
|
+
for (let i6 = 0, len5 = props.length; i6 < len5; i6++) {
|
|
4649
|
+
const p = props[i6];
|
|
4477
4650
|
const { name, value } = p;
|
|
4478
4651
|
let m1;
|
|
4479
4652
|
if (m1 = value?.type, m1 === "ArrayBindingPattern" || m1 === "ObjectBindingPattern") {
|
|
4480
4653
|
continue;
|
|
4481
4654
|
}
|
|
4482
4655
|
const key = value?.name || name?.name || name;
|
|
4656
|
+
if (key?.type === "NumericLiteral" || key?.type === "ComputedPropertyName") {
|
|
4657
|
+
continue;
|
|
4658
|
+
}
|
|
4483
4659
|
if (propsGroupedByName.has(key)) {
|
|
4484
4660
|
propsGroupedByName.get(key).push(p);
|
|
4485
4661
|
} else {
|
|
@@ -4495,8 +4671,8 @@ function aggregateDuplicateBindings(bindings) {
|
|
|
4495
4671
|
pos: 0,
|
|
4496
4672
|
input: key
|
|
4497
4673
|
})) {
|
|
4498
|
-
for (let
|
|
4499
|
-
const p = shared[
|
|
4674
|
+
for (let i7 = 0, len6 = shared.length; i7 < len6; i7++) {
|
|
4675
|
+
const p = shared[i7];
|
|
4500
4676
|
aliasBinding(p, makeRef(`_${key}`, key));
|
|
4501
4677
|
}
|
|
4502
4678
|
return;
|
|
@@ -5197,7 +5373,6 @@ function processUnaryNestedExpression(pre, args, post) {
|
|
|
5197
5373
|
|
|
5198
5374
|
// source/parser/pipe.civet
|
|
5199
5375
|
function constructInvocation(fn, arg) {
|
|
5200
|
-
const fnArr = [fn.leadingComment, fn.expr, fn.trailingComment];
|
|
5201
5376
|
let expr = fn.expr;
|
|
5202
5377
|
while (expr.type === "ParenthesizedExpression") {
|
|
5203
5378
|
expr = expr.expression;
|
|
@@ -5214,22 +5389,46 @@ function constructInvocation(fn, arg) {
|
|
|
5214
5389
|
});
|
|
5215
5390
|
}
|
|
5216
5391
|
expr = fn.expr;
|
|
5217
|
-
|
|
5392
|
+
let lhs = expr;
|
|
5393
|
+
if (!(lhs.type === "NewExpression")) {
|
|
5394
|
+
lhs = makeLeftHandSideExpression(lhs);
|
|
5395
|
+
}
|
|
5218
5396
|
let comment = skipIfOnlyWS(fn.trailingComment);
|
|
5219
5397
|
if (comment)
|
|
5220
|
-
lhs.children.
|
|
5398
|
+
lhs.children.push(comment);
|
|
5221
5399
|
comment = skipIfOnlyWS(fn.leadingComment);
|
|
5222
5400
|
if (comment)
|
|
5223
5401
|
lhs.children.splice(1, 0, comment);
|
|
5224
5402
|
switch (arg.type) {
|
|
5225
|
-
case "CommaExpression":
|
|
5403
|
+
case "CommaExpression": {
|
|
5226
5404
|
arg = makeLeftHandSideExpression(arg);
|
|
5227
5405
|
break;
|
|
5406
|
+
}
|
|
5228
5407
|
}
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5408
|
+
const args = [arg];
|
|
5409
|
+
const call = {
|
|
5410
|
+
type: "Call",
|
|
5411
|
+
args,
|
|
5412
|
+
children: ["(", args, ")"]
|
|
5232
5413
|
};
|
|
5414
|
+
if (lhs.type === "NewExpression") {
|
|
5415
|
+
let { expression } = lhs;
|
|
5416
|
+
expression = {
|
|
5417
|
+
...expression,
|
|
5418
|
+
type: "CallExpression",
|
|
5419
|
+
children: [...expression.children, call]
|
|
5420
|
+
};
|
|
5421
|
+
return {
|
|
5422
|
+
...lhs,
|
|
5423
|
+
expression,
|
|
5424
|
+
children: lhs.children.map(($) => $ === lhs.expression ? expression : $)
|
|
5425
|
+
};
|
|
5426
|
+
} else {
|
|
5427
|
+
return {
|
|
5428
|
+
type: "CallExpression",
|
|
5429
|
+
children: [lhs, call]
|
|
5430
|
+
};
|
|
5431
|
+
}
|
|
5233
5432
|
}
|
|
5234
5433
|
function constructPipeStep(fn, arg, returning) {
|
|
5235
5434
|
if (!returning) {
|
|
@@ -5276,21 +5475,24 @@ function processPipelineExpressions(statements) {
|
|
|
5276
5475
|
let i = 0, l = body.length;
|
|
5277
5476
|
const children = [ws];
|
|
5278
5477
|
let usingRef = null;
|
|
5279
|
-
for (
|
|
5280
|
-
const
|
|
5478
|
+
for (let i1 = 0, len3 = body.length; i1 < len3; i1++) {
|
|
5479
|
+
const i2 = i1;
|
|
5480
|
+
const step = body[i1];
|
|
5281
5481
|
const [leadingComment, pipe, trailingComment, expr] = step;
|
|
5282
5482
|
const returns = pipe.token === "||>";
|
|
5283
5483
|
let ref, result, returning = returns ? arg : null;
|
|
5284
5484
|
if (pipe.token === "|>=") {
|
|
5285
5485
|
let initRef;
|
|
5286
|
-
if (
|
|
5486
|
+
if (i2 === 0) {
|
|
5287
5487
|
checkValidLHS(arg);
|
|
5288
5488
|
outer:
|
|
5289
5489
|
switch (arg.type) {
|
|
5290
|
-
case "MemberExpression":
|
|
5291
|
-
if (arg.children.length <= 2)
|
|
5490
|
+
case "MemberExpression": {
|
|
5491
|
+
if (arg.children.length <= 2) {
|
|
5292
5492
|
break;
|
|
5293
|
-
|
|
5493
|
+
}
|
|
5494
|
+
}
|
|
5495
|
+
case "CallExpression": {
|
|
5294
5496
|
const access = arg.children.pop();
|
|
5295
5497
|
usingRef = makeRef();
|
|
5296
5498
|
initRef = {
|
|
@@ -5302,6 +5504,7 @@ function processPipelineExpressions(statements) {
|
|
|
5302
5504
|
children: [usingRef, access]
|
|
5303
5505
|
};
|
|
5304
5506
|
break;
|
|
5507
|
+
}
|
|
5305
5508
|
}
|
|
5306
5509
|
const lhs = [[
|
|
5307
5510
|
[initRef],
|
|
@@ -5330,7 +5533,7 @@ function processPipelineExpressions(statements) {
|
|
|
5330
5533
|
});
|
|
5331
5534
|
}
|
|
5332
5535
|
} else {
|
|
5333
|
-
if (
|
|
5536
|
+
if (i2 === 0)
|
|
5334
5537
|
s.children = children;
|
|
5335
5538
|
}
|
|
5336
5539
|
if (returns && (ref = needsRef(arg))) {
|
|
@@ -5355,7 +5558,7 @@ function processPipelineExpressions(statements) {
|
|
|
5355
5558
|
returning
|
|
5356
5559
|
);
|
|
5357
5560
|
if (result.type === "ReturnStatement") {
|
|
5358
|
-
if (
|
|
5561
|
+
if (i2 < l - 1) {
|
|
5359
5562
|
result.children.push({
|
|
5360
5563
|
type: "Error",
|
|
5361
5564
|
message: "Can't continue a pipeline after returning"
|
|
@@ -5383,7 +5586,7 @@ function processPipelineExpressions(statements) {
|
|
|
5383
5586
|
};
|
|
5384
5587
|
}
|
|
5385
5588
|
children.push(arg);
|
|
5386
|
-
if (!children.some(($) =>
|
|
5589
|
+
if (!children.some(($1) => $1?.type === "ReturnStatement") && children.some(($2) => $2 === ",")) {
|
|
5387
5590
|
const { parent } = s;
|
|
5388
5591
|
const parenthesizedExpression = makeLeftHandSideExpression({ ...s });
|
|
5389
5592
|
Object.assign(s, parenthesizedExpression, {
|
|
@@ -5669,7 +5872,8 @@ function processForInOf($0) {
|
|
|
5669
5872
|
blockPrefix.push(["", {
|
|
5670
5873
|
type: "Declaration",
|
|
5671
5874
|
children: [declaration, " = ", trimFirstSpace(expRef2), "[", counterRef, "]"],
|
|
5672
|
-
names: assignmentNames
|
|
5875
|
+
names: assignmentNames,
|
|
5876
|
+
implicitLift: true
|
|
5673
5877
|
}, ";"]);
|
|
5674
5878
|
declaration = {
|
|
5675
5879
|
type: "Declaration",
|
|
@@ -6522,11 +6726,11 @@ function processCallMemberExpression(node) {
|
|
|
6522
6726
|
if (glob?.type === "PropertyGlob") {
|
|
6523
6727
|
let prefix = children.slice(0, i);
|
|
6524
6728
|
const parts = [];
|
|
6525
|
-
let
|
|
6526
|
-
if (prefix.length > 1) {
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
prefix = [
|
|
6729
|
+
let ref;
|
|
6730
|
+
if (prefix.length > 1 && glob.object.properties.length > 1) {
|
|
6731
|
+
ref = makeRef();
|
|
6732
|
+
const { refAssignment } = makeRefAssignment(ref, prefix);
|
|
6733
|
+
prefix = [makeLeftHandSideExpression(refAssignment)];
|
|
6530
6734
|
}
|
|
6531
6735
|
prefix = prefix.concat(glob.dot);
|
|
6532
6736
|
for (const part of glob.object.properties) {
|
|
@@ -6558,6 +6762,9 @@ function processCallMemberExpression(node) {
|
|
|
6558
6762
|
}
|
|
6559
6763
|
if (!suppressPrefix) {
|
|
6560
6764
|
value = prefix.concat(trimFirstSpace(value));
|
|
6765
|
+
if (ref != null) {
|
|
6766
|
+
prefix = [ref].concat(glob.dot);
|
|
6767
|
+
}
|
|
6561
6768
|
}
|
|
6562
6769
|
if (wValue)
|
|
6563
6770
|
value.unshift(wValue);
|
|
@@ -6568,7 +6775,8 @@ function processCallMemberExpression(node) {
|
|
|
6568
6775
|
dots: part.dots,
|
|
6569
6776
|
delim: part.delim,
|
|
6570
6777
|
names: part.names,
|
|
6571
|
-
children: part.children.slice(0, 2).concat(value, part.delim)
|
|
6778
|
+
children: part.children.slice(0, 2).concat(value, part.delim),
|
|
6779
|
+
usesRef: Boolean(ref)
|
|
6572
6780
|
});
|
|
6573
6781
|
} else {
|
|
6574
6782
|
parts.push({
|
|
@@ -6585,12 +6793,13 @@ function processCallMemberExpression(node) {
|
|
|
6585
6793
|
value,
|
|
6586
6794
|
part.delim
|
|
6587
6795
|
// comma delimiter
|
|
6588
|
-
]
|
|
6796
|
+
],
|
|
6797
|
+
usesRef: Boolean(ref)
|
|
6589
6798
|
});
|
|
6590
6799
|
}
|
|
6591
6800
|
}
|
|
6592
6801
|
let ref2;
|
|
6593
|
-
|
|
6802
|
+
const object = {
|
|
6594
6803
|
type: "ObjectExpression",
|
|
6595
6804
|
children: [
|
|
6596
6805
|
glob.object.children[0],
|
|
@@ -6601,13 +6810,6 @@ function processCallMemberExpression(node) {
|
|
|
6601
6810
|
],
|
|
6602
6811
|
properties: parts
|
|
6603
6812
|
};
|
|
6604
|
-
if (refAssignmentComma) {
|
|
6605
|
-
object = makeNode({
|
|
6606
|
-
type: "ParenthesizedExpression",
|
|
6607
|
-
children: ["(", ...refAssignmentComma, object, ")"],
|
|
6608
|
-
expression: object
|
|
6609
|
-
});
|
|
6610
|
-
}
|
|
6611
6813
|
if (i === children.length - 1)
|
|
6612
6814
|
return object;
|
|
6613
6815
|
return processCallMemberExpression({
|
|
@@ -6759,19 +6961,19 @@ function lastAccessInCallExpression(exp) {
|
|
|
6759
6961
|
}
|
|
6760
6962
|
function convertMethodToFunction(method) {
|
|
6761
6963
|
const { signature, block } = method;
|
|
6762
|
-
|
|
6763
|
-
if (optional)
|
|
6964
|
+
const { async, modifier, optional } = signature;
|
|
6965
|
+
if (optional) {
|
|
6764
6966
|
return;
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6967
|
+
}
|
|
6968
|
+
if (modifier?.get || modifier?.set) {
|
|
6969
|
+
return;
|
|
6970
|
+
}
|
|
6971
|
+
const func = ["function "];
|
|
6972
|
+
if (async != null) {
|
|
6973
|
+
func.unshift(async);
|
|
6974
|
+
if (async.length && !async[async.length - 1]?.length) {
|
|
6975
|
+
async.push(" ");
|
|
6772
6976
|
}
|
|
6773
|
-
} else {
|
|
6774
|
-
modifier = "function ";
|
|
6775
6977
|
}
|
|
6776
6978
|
return {
|
|
6777
6979
|
...signature,
|
|
@@ -6779,7 +6981,7 @@ function convertMethodToFunction(method) {
|
|
|
6779
6981
|
signature,
|
|
6780
6982
|
type: "FunctionExpression",
|
|
6781
6983
|
children: [
|
|
6782
|
-
[
|
|
6984
|
+
[...func, ...signature.children.slice(1)],
|
|
6783
6985
|
block
|
|
6784
6986
|
],
|
|
6785
6987
|
block
|
|
@@ -6817,40 +7019,54 @@ function convertNamedImportsToObject(node, pattern) {
|
|
|
6817
7019
|
};
|
|
6818
7020
|
}
|
|
6819
7021
|
function convertObjectToJSXAttributes(obj) {
|
|
6820
|
-
const { properties } = obj;
|
|
6821
7022
|
const parts = [];
|
|
6822
7023
|
const rest = [];
|
|
6823
|
-
|
|
7024
|
+
let i4 = 0;
|
|
7025
|
+
for (const part of obj.properties) {
|
|
7026
|
+
const i = i4++;
|
|
7027
|
+
if (part.usesRef) {
|
|
7028
|
+
rest.push(part);
|
|
7029
|
+
continue;
|
|
7030
|
+
}
|
|
6824
7031
|
if (i > 0)
|
|
6825
7032
|
parts.push(" ");
|
|
6826
|
-
const part = properties[i];
|
|
6827
7033
|
switch (part.type) {
|
|
6828
|
-
case "Identifier":
|
|
7034
|
+
case "Identifier": {
|
|
6829
7035
|
parts.push([part.name, "={", part.name, "}"]);
|
|
6830
7036
|
break;
|
|
6831
|
-
|
|
7037
|
+
}
|
|
7038
|
+
case "Property": {
|
|
6832
7039
|
if (part.name.type === "ComputedPropertyName") {
|
|
6833
7040
|
rest.push(part);
|
|
6834
7041
|
} else {
|
|
6835
7042
|
parts.push([part.name, "={", trimFirstSpace(part.value), "}"]);
|
|
6836
7043
|
}
|
|
7044
|
+
;
|
|
6837
7045
|
break;
|
|
6838
|
-
|
|
7046
|
+
}
|
|
7047
|
+
case "SpreadProperty": {
|
|
6839
7048
|
parts.push(["{", part.dots, part.value, "}"]);
|
|
6840
7049
|
break;
|
|
6841
|
-
|
|
7050
|
+
}
|
|
7051
|
+
case "MethodDefinition": {
|
|
6842
7052
|
const func = convertMethodToFunction(part);
|
|
6843
7053
|
if (func) {
|
|
6844
7054
|
parts.push([part.name, "={", convertMethodToFunction(part), "}"]);
|
|
6845
7055
|
} else {
|
|
6846
7056
|
rest.push(part);
|
|
6847
7057
|
}
|
|
7058
|
+
;
|
|
6848
7059
|
break;
|
|
6849
|
-
|
|
7060
|
+
}
|
|
7061
|
+
default: {
|
|
6850
7062
|
throw new Error(`invalid object literal type in JSX attribute: ${part.type}`);
|
|
7063
|
+
}
|
|
6851
7064
|
}
|
|
6852
7065
|
}
|
|
6853
7066
|
if (rest.length) {
|
|
7067
|
+
if (parts.length && parts[parts.length - 1] !== " ") {
|
|
7068
|
+
parts.push(" ");
|
|
7069
|
+
}
|
|
6854
7070
|
parts.push(["{...{", ...rest, "}}"]);
|
|
6855
7071
|
}
|
|
6856
7072
|
return parts;
|
|
@@ -6879,7 +7095,8 @@ function makeGetterMethod(name, ws, value, returnType, block, kind = { token: "g
|
|
|
6879
7095
|
block = {
|
|
6880
7096
|
type: "BlockStatement",
|
|
6881
7097
|
expressions,
|
|
6882
|
-
children: ["{ ", expressions, " }"]
|
|
7098
|
+
children: ["{ ", expressions, " }"],
|
|
7099
|
+
bare: false
|
|
6883
7100
|
};
|
|
6884
7101
|
}
|
|
6885
7102
|
if (autoReturn) {
|
|
@@ -6911,7 +7128,7 @@ function processBindingPatternLHS(lhs, tail) {
|
|
|
6911
7128
|
tail.push(...splices.map((s) => [", ", s]), ...thisAssignments.map((a) => [", ", a]));
|
|
6912
7129
|
}
|
|
6913
7130
|
function processAssignments(statements) {
|
|
6914
|
-
for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"),
|
|
7131
|
+
for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len3 = ref7.length; i5 < len3; i5++) {
|
|
6915
7132
|
let extractAssignment2 = function(lhs) {
|
|
6916
7133
|
let expr = lhs;
|
|
6917
7134
|
while (expr.type === "ParenthesizedExpression") {
|
|
@@ -6932,7 +7149,7 @@ function processAssignments(statements) {
|
|
|
6932
7149
|
return;
|
|
6933
7150
|
};
|
|
6934
7151
|
var extractAssignment = extractAssignment2;
|
|
6935
|
-
const exp = ref7[
|
|
7152
|
+
const exp = ref7[i5];
|
|
6936
7153
|
checkValidLHS(exp.assigned);
|
|
6937
7154
|
const pre = [], post = [];
|
|
6938
7155
|
let ref8;
|
|
@@ -6941,8 +7158,8 @@ function processAssignments(statements) {
|
|
|
6941
7158
|
if (!exp.lhs) {
|
|
6942
7159
|
continue;
|
|
6943
7160
|
}
|
|
6944
|
-
for (let ref9 = exp.lhs,
|
|
6945
|
-
const lhsPart = ref9[
|
|
7161
|
+
for (let ref9 = exp.lhs, i6 = 0, len4 = ref9.length; i6 < len4; i6++) {
|
|
7162
|
+
const lhsPart = ref9[i6];
|
|
6946
7163
|
let ref10;
|
|
6947
7164
|
if (ref10 = extractAssignment2(lhsPart[1])) {
|
|
6948
7165
|
const newLhs = ref10;
|
|
@@ -6986,8 +7203,8 @@ function processAssignments(statements) {
|
|
|
6986
7203
|
}
|
|
6987
7204
|
}
|
|
6988
7205
|
}
|
|
6989
|
-
for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"),
|
|
6990
|
-
const exp = ref11[
|
|
7206
|
+
for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len5 = ref11.length; i7 < len5; i7++) {
|
|
7207
|
+
const exp = ref11[i7];
|
|
6991
7208
|
if (!(exp.names === null)) {
|
|
6992
7209
|
continue;
|
|
6993
7210
|
}
|
|
@@ -7224,101 +7441,149 @@ function attachPostfixStatementAsExpression(exp, post) {
|
|
|
7224
7441
|
}
|
|
7225
7442
|
}
|
|
7226
7443
|
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;
|
|
7444
|
+
const results1 = [];
|
|
7445
|
+
for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len6 = ref16.length; i8 < len6; i8++) {
|
|
7446
|
+
const unary = ref16[i8];
|
|
7447
|
+
let suffixIndex = unary.suffix.length - 1;
|
|
7448
|
+
const results2 = [];
|
|
7449
|
+
while (suffixIndex >= 0) {
|
|
7450
|
+
const suffix = unary.suffix[suffixIndex];
|
|
7451
|
+
if (typeof suffix === "object" && suffix != null && "token" in suffix && suffix.token === "?") {
|
|
7452
|
+
const { token } = suffix;
|
|
7453
|
+
let count = 0;
|
|
7454
|
+
let m4;
|
|
7455
|
+
while (m4 = unary.suffix[suffixIndex], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
|
|
7456
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7457
|
+
count++;
|
|
7256
7458
|
}
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7459
|
+
let m5;
|
|
7460
|
+
while (m5 = unary.suffix[suffixIndex], typeof m5 === "object" && m5 != null && "type" in m5 && m5.type === "NonNullAssertion") {
|
|
7461
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7462
|
+
}
|
|
7463
|
+
const { parent, prefix } = unary;
|
|
7464
|
+
unary.prefix = [];
|
|
7465
|
+
unary.children = unary.children.filter((a1) => a1 !== prefix);
|
|
7466
|
+
const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
|
|
7467
|
+
const space = getTrimmingSpace(unary);
|
|
7468
|
+
let replace;
|
|
7469
|
+
if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
|
|
7470
|
+
if (count === 1) {
|
|
7471
|
+
unary.suffix.splice(suffixIndex + 1, 0, suffix);
|
|
7472
|
+
continue;
|
|
7473
|
+
}
|
|
7474
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7475
|
+
const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
|
|
7476
|
+
replace = [
|
|
7477
|
+
space,
|
|
7478
|
+
"(",
|
|
7479
|
+
t,
|
|
7480
|
+
" | null)",
|
|
7481
|
+
suffix
|
|
7482
|
+
];
|
|
7483
|
+
} else {
|
|
7484
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7485
|
+
const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
|
|
7486
|
+
replace = makeNode({
|
|
7487
|
+
type: "TypeParenthesized",
|
|
7488
|
+
ts: true,
|
|
7489
|
+
children: [
|
|
7490
|
+
space,
|
|
7491
|
+
"(",
|
|
7492
|
+
t,
|
|
7493
|
+
count === 1 ? " | undefined" : " | undefined | null",
|
|
7494
|
+
")"
|
|
7495
|
+
]
|
|
7496
|
+
});
|
|
7497
|
+
}
|
|
7498
|
+
if (prefix.length || outer.length) {
|
|
7499
|
+
replace = makeNode({
|
|
7500
|
+
type: "TypeUnary",
|
|
7501
|
+
ts: true,
|
|
7502
|
+
t: replace,
|
|
7503
|
+
prefix,
|
|
7504
|
+
suffix: outer,
|
|
7505
|
+
children: [prefix, replace, outer]
|
|
7506
|
+
});
|
|
7507
|
+
}
|
|
7508
|
+
results2.push(replaceNode(unary, replace, parent));
|
|
7509
|
+
} else if (typeof suffix === "object" && suffix != null && "type" in suffix && suffix.type === "NonNullAssertion") {
|
|
7510
|
+
const { type } = suffix;
|
|
7511
|
+
let m6;
|
|
7512
|
+
while (m6 = unary.suffix[suffixIndex], typeof m6 === "object" && m6 != null && "type" in m6 && m6.type === "NonNullAssertion") {
|
|
7513
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7514
|
+
}
|
|
7515
|
+
let m7;
|
|
7516
|
+
while (m7 = unary.suffix[suffixIndex], typeof m7 === "object" && m7 != null && "token" in m7 && m7.token === "?") {
|
|
7517
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7518
|
+
}
|
|
7519
|
+
const { parent, prefix } = unary;
|
|
7520
|
+
unary.prefix = [];
|
|
7521
|
+
unary.children = unary.children.filter((a2) => a2 !== prefix);
|
|
7522
|
+
const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
|
|
7523
|
+
const space = getTrimmingSpace(unary);
|
|
7524
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7525
|
+
let ref17;
|
|
7526
|
+
if (unary.suffix.length)
|
|
7527
|
+
ref17 = unary;
|
|
7528
|
+
else
|
|
7529
|
+
ref17 = unary.t;
|
|
7530
|
+
const t = ref17;
|
|
7531
|
+
const arg = makeNode({
|
|
7532
|
+
type: "TypeArgument",
|
|
7533
|
+
ts: true,
|
|
7534
|
+
t,
|
|
7535
|
+
children: [t]
|
|
7536
|
+
});
|
|
7537
|
+
const argArray = [arg];
|
|
7538
|
+
const args = makeNode({
|
|
7539
|
+
type: "TypeArguments",
|
|
7267
7540
|
ts: true,
|
|
7541
|
+
args: argArray,
|
|
7542
|
+
children: ["<", argArray, ">"]
|
|
7543
|
+
});
|
|
7544
|
+
let replace = makeNode({
|
|
7545
|
+
type: "TypeIdentifier",
|
|
7546
|
+
raw: "NonNullable",
|
|
7547
|
+
args,
|
|
7268
7548
|
children: [
|
|
7269
|
-
|
|
7270
|
-
"
|
|
7271
|
-
|
|
7272
|
-
count === 1 ? " | undefined" : " | undefined | null",
|
|
7273
|
-
")"
|
|
7549
|
+
space,
|
|
7550
|
+
"NonNullable",
|
|
7551
|
+
args
|
|
7274
7552
|
]
|
|
7275
7553
|
});
|
|
7554
|
+
if (prefix.length || outer.length) {
|
|
7555
|
+
replace = makeNode({
|
|
7556
|
+
type: "TypeUnary",
|
|
7557
|
+
ts: true,
|
|
7558
|
+
t: replace,
|
|
7559
|
+
prefix,
|
|
7560
|
+
suffix: outer,
|
|
7561
|
+
children: [prefix, replace, outer]
|
|
7562
|
+
});
|
|
7563
|
+
}
|
|
7564
|
+
results2.push(replaceNode(unary, replace, parent));
|
|
7565
|
+
} else {
|
|
7566
|
+
results2.push(suffixIndex--);
|
|
7276
7567
|
}
|
|
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
7568
|
}
|
|
7307
|
-
|
|
7569
|
+
results1.push(results2);
|
|
7570
|
+
}
|
|
7571
|
+
;
|
|
7572
|
+
return results1;
|
|
7308
7573
|
}
|
|
7309
7574
|
function processStatementExpressions(statements) {
|
|
7310
|
-
for (let
|
|
7311
|
-
const exp =
|
|
7575
|
+
for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len7 = ref18.length; i9 < len7; i9++) {
|
|
7576
|
+
const exp = ref18[i9];
|
|
7312
7577
|
const { maybe, statement } = exp;
|
|
7313
7578
|
if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
|
|
7314
7579
|
replaceNode(exp, statement);
|
|
7315
7580
|
continue;
|
|
7316
7581
|
}
|
|
7317
|
-
let
|
|
7582
|
+
let ref19;
|
|
7318
7583
|
switch (statement.type) {
|
|
7319
7584
|
case "IfStatement": {
|
|
7320
|
-
if (
|
|
7321
|
-
const expression =
|
|
7585
|
+
if (ref19 = expressionizeIfStatement(statement)) {
|
|
7586
|
+
const expression = ref19;
|
|
7322
7587
|
replaceNode(statement, expression, exp);
|
|
7323
7588
|
} else {
|
|
7324
7589
|
replaceNode(statement, wrapIIFE([["", statement]]), exp);
|
|
@@ -7376,13 +7641,13 @@ function processNegativeIndexAccess(statements) {
|
|
|
7376
7641
|
});
|
|
7377
7642
|
}
|
|
7378
7643
|
function processFinallyClauses(statements) {
|
|
7379
|
-
for (let
|
|
7380
|
-
let f =
|
|
7381
|
-
let
|
|
7382
|
-
if (!((
|
|
7644
|
+
for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len8 = ref20.length; i10 < len8; i10++) {
|
|
7645
|
+
let f = ref20[i10];
|
|
7646
|
+
let ref21;
|
|
7647
|
+
if (!((ref21 = blockContainingStatement(f)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21)) {
|
|
7383
7648
|
throw new Error("finally clause must be inside try statement or block");
|
|
7384
7649
|
}
|
|
7385
|
-
const { block, index } =
|
|
7650
|
+
const { block, index } = ref21;
|
|
7386
7651
|
const indent = block.expressions[index][0];
|
|
7387
7652
|
const expressions = block.expressions.slice(index + 1);
|
|
7388
7653
|
const t = makeNode({
|
|
@@ -7419,7 +7684,7 @@ function processProgram(root) {
|
|
|
7419
7684
|
if (config2.iife || config2.repl) {
|
|
7420
7685
|
rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
|
|
7421
7686
|
const newExpressions = [["", rootIIFE]];
|
|
7422
|
-
root.children = root.children.map(($
|
|
7687
|
+
root.children = root.children.map(($13) => $13 === root.expressions ? newExpressions : $13);
|
|
7423
7688
|
root.expressions = newExpressions;
|
|
7424
7689
|
}
|
|
7425
7690
|
addParentPointers(root);
|
|
@@ -7460,10 +7725,10 @@ async function processProgramAsync(root) {
|
|
|
7460
7725
|
await processComptime(statements);
|
|
7461
7726
|
}
|
|
7462
7727
|
function processRepl(root, rootIIFE) {
|
|
7463
|
-
const topBlock = gatherRecursive(rootIIFE, ($
|
|
7728
|
+
const topBlock = gatherRecursive(rootIIFE, ($14) => $14.type === "BlockStatement")[0];
|
|
7464
7729
|
let i = 0;
|
|
7465
|
-
for (let
|
|
7466
|
-
const decl =
|
|
7730
|
+
for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($15) => $15.type === "Declaration"), i11 = 0, len9 = ref22.length; i11 < len9; i11++) {
|
|
7731
|
+
const decl = ref22[i11];
|
|
7467
7732
|
if (!decl.names?.length) {
|
|
7468
7733
|
continue;
|
|
7469
7734
|
}
|
|
@@ -7476,8 +7741,8 @@ function processRepl(root, rootIIFE) {
|
|
|
7476
7741
|
root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]);
|
|
7477
7742
|
}
|
|
7478
7743
|
}
|
|
7479
|
-
for (let
|
|
7480
|
-
const func =
|
|
7744
|
+
for (let ref23 = gatherRecursive(topBlock, ($16) => $16.type === "FunctionExpression"), i12 = 0, len10 = ref23.length; i12 < len10; i12++) {
|
|
7745
|
+
const func = ref23[i12];
|
|
7481
7746
|
if (func.name && func.parent?.type === "BlockStatement") {
|
|
7482
7747
|
if (func.parent === topBlock) {
|
|
7483
7748
|
replaceNode(func, void 0);
|
|
@@ -7489,17 +7754,17 @@ function processRepl(root, rootIIFE) {
|
|
|
7489
7754
|
}
|
|
7490
7755
|
}
|
|
7491
7756
|
}
|
|
7492
|
-
for (let
|
|
7493
|
-
const classExp =
|
|
7494
|
-
let
|
|
7495
|
-
if (classExp.name && classExp.parent === topBlock || (
|
|
7757
|
+
for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($17) => $17.type === "ClassExpression"), i13 = 0, len11 = ref24.length; i13 < len11; i13++) {
|
|
7758
|
+
const classExp = ref24[i13];
|
|
7759
|
+
let m8;
|
|
7760
|
+
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
7761
|
classExp.children.unshift(classExp.name, "=");
|
|
7497
7762
|
root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]);
|
|
7498
7763
|
}
|
|
7499
7764
|
}
|
|
7500
7765
|
}
|
|
7501
7766
|
function populateRefs(statements) {
|
|
7502
|
-
const refNodes = gatherRecursive(statements, ($
|
|
7767
|
+
const refNodes = gatherRecursive(statements, ($18) => $18.type === "Ref");
|
|
7503
7768
|
if (refNodes.length) {
|
|
7504
7769
|
const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
|
|
7505
7770
|
const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
|
|
@@ -7522,8 +7787,8 @@ function populateRefs(statements) {
|
|
|
7522
7787
|
function processPlaceholders(statements) {
|
|
7523
7788
|
const placeholderMap = /* @__PURE__ */ new Map();
|
|
7524
7789
|
const liftedIfs = /* @__PURE__ */ new Set();
|
|
7525
|
-
for (let
|
|
7526
|
-
const exp =
|
|
7790
|
+
for (let ref25 = gatherRecursiveAll(statements, ($19) => $19.type === "Placeholder"), i14 = 0, len12 = ref25.length; i14 < len12; i14++) {
|
|
7791
|
+
const exp = ref25[i14];
|
|
7527
7792
|
let ancestor;
|
|
7528
7793
|
if (exp.subtype === ".") {
|
|
7529
7794
|
({ ancestor } = findAncestor(
|
|
@@ -7531,8 +7796,8 @@ function processPlaceholders(statements) {
|
|
|
7531
7796
|
($) => $.type === "Call" && !$.parent?.implicit
|
|
7532
7797
|
));
|
|
7533
7798
|
ancestor = ancestor?.parent;
|
|
7534
|
-
let
|
|
7535
|
-
while (ancestor?.parent != null && (
|
|
7799
|
+
let m9;
|
|
7800
|
+
while (ancestor?.parent != null && (m9 = ancestor.parent.type, m9 === "UnaryExpression" || m9 === "NewExpression" || m9 === "AwaitExpression" || m9 === "ThrowStatement" || m9 === "StatementExpression")) {
|
|
7536
7801
|
ancestor = ancestor.parent;
|
|
7537
7802
|
}
|
|
7538
7803
|
if (!ancestor) {
|
|
@@ -7544,15 +7809,21 @@ function processPlaceholders(statements) {
|
|
|
7544
7809
|
}
|
|
7545
7810
|
} else {
|
|
7546
7811
|
let child;
|
|
7812
|
+
let implicitLift;
|
|
7547
7813
|
({ ancestor, child } = findAncestor(exp, (ancestor2, child2) => {
|
|
7814
|
+
const prevImplicitLift = implicitLift;
|
|
7815
|
+
({ implicitLift } = ancestor2);
|
|
7816
|
+
if (prevImplicitLift) {
|
|
7817
|
+
return;
|
|
7818
|
+
}
|
|
7548
7819
|
const { type } = ancestor2;
|
|
7549
7820
|
if (type === "IfStatement") {
|
|
7550
7821
|
liftedIfs.add(ancestor2);
|
|
7551
7822
|
}
|
|
7552
|
-
let
|
|
7553
|
-
let
|
|
7823
|
+
let m10;
|
|
7824
|
+
let m11;
|
|
7554
7825
|
return type === "Call" && !ancestor2.parent?.implicit || // Block, except for if/else blocks when condition already lifted
|
|
7555
|
-
type === "BlockStatement" && !((
|
|
7826
|
+
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
7827
|
type === "Initializer" || // Right-hand side of assignment
|
|
7557
7828
|
type === "AssignmentExpression" && findChildIndex(ancestor2, child2) === ancestor2.children.indexOf(ancestor2.expression) || type === "ReturnStatement" || type === "YieldExpression";
|
|
7558
7829
|
}));
|
|
@@ -7626,11 +7897,11 @@ function processPlaceholders(statements) {
|
|
|
7626
7897
|
for (const [ancestor, placeholders] of placeholderMap) {
|
|
7627
7898
|
let ref = makeRef("$");
|
|
7628
7899
|
let typeSuffix;
|
|
7629
|
-
for (let
|
|
7630
|
-
const placeholder = placeholders[
|
|
7900
|
+
for (let i15 = 0, len13 = placeholders.length; i15 < len13; i15++) {
|
|
7901
|
+
const placeholder = placeholders[i15];
|
|
7631
7902
|
typeSuffix ??= placeholder.typeSuffix;
|
|
7632
|
-
let
|
|
7633
|
-
|
|
7903
|
+
let ref26;
|
|
7904
|
+
(ref26 = placeholder.children)[ref26.length - 1] = ref;
|
|
7634
7905
|
}
|
|
7635
7906
|
const { parent } = ancestor;
|
|
7636
7907
|
const body = maybeUnwrap(ancestor);
|
|
@@ -7651,16 +7922,16 @@ function processPlaceholders(statements) {
|
|
|
7651
7922
|
}
|
|
7652
7923
|
case "PipelineExpression": {
|
|
7653
7924
|
const i = findChildIndex(parent, ancestor);
|
|
7654
|
-
let
|
|
7925
|
+
let ref27;
|
|
7655
7926
|
if (i === 1) {
|
|
7656
|
-
|
|
7927
|
+
ref27 = ancestor === parent.children[i];
|
|
7657
7928
|
} else if (i === 2) {
|
|
7658
|
-
|
|
7929
|
+
ref27 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
|
|
7659
7930
|
} else {
|
|
7660
|
-
|
|
7931
|
+
ref27 = void 0;
|
|
7661
7932
|
}
|
|
7662
7933
|
;
|
|
7663
|
-
outer =
|
|
7934
|
+
outer = ref27;
|
|
7664
7935
|
break;
|
|
7665
7936
|
}
|
|
7666
7937
|
case "AssignmentExpression":
|
|
@@ -7675,9 +7946,9 @@ function processPlaceholders(statements) {
|
|
|
7675
7946
|
fnExp = makeLeftHandSideExpression(fnExp);
|
|
7676
7947
|
}
|
|
7677
7948
|
replaceNode(ancestor, fnExp, parent);
|
|
7678
|
-
let
|
|
7679
|
-
if (
|
|
7680
|
-
const ws =
|
|
7949
|
+
let ref28;
|
|
7950
|
+
if (ref28 = getTrimmingSpace(body)) {
|
|
7951
|
+
const ws = ref28;
|
|
7681
7952
|
inplaceInsertTrimmingSpace(body, "");
|
|
7682
7953
|
inplacePrepend(ws, fnExp);
|
|
7683
7954
|
}
|
|
@@ -7722,8 +7993,8 @@ function reorderBindingRestProperty(props) {
|
|
|
7722
7993
|
}
|
|
7723
7994
|
];
|
|
7724
7995
|
}
|
|
7725
|
-
let
|
|
7726
|
-
if (Array.isArray(rest.delim) && (
|
|
7996
|
+
let ref29;
|
|
7997
|
+
if (Array.isArray(rest.delim) && (ref29 = rest.delim)[ref29.length - 1]?.token === ",") {
|
|
7727
7998
|
rest.delim = rest.delim.slice(0, -1);
|
|
7728
7999
|
rest.children = [...rest.children.slice(0, -1), rest.delim];
|
|
7729
8000
|
}
|
|
@@ -7820,11 +8091,7 @@ var grammar = {
|
|
|
7820
8091
|
ApplicationStart,
|
|
7821
8092
|
ForbiddenImplicitCalls,
|
|
7822
8093
|
ReservedBinary,
|
|
7823
|
-
|
|
7824
|
-
TrailingMemberExpressions,
|
|
7825
|
-
IndentedTrailingMemberExpressions,
|
|
7826
|
-
NestedTrailingMemberExpression,
|
|
7827
|
-
AllowedTrailingMemberExpressions,
|
|
8094
|
+
ArgumentsWithTrailingCallExpressions,
|
|
7828
8095
|
TrailingCallExpressions,
|
|
7829
8096
|
IndentedTrailingCallExpressions,
|
|
7830
8097
|
NestedTrailingCallExpression,
|
|
@@ -7924,6 +8191,7 @@ var grammar = {
|
|
|
7924
8191
|
LeftHandSideExpression,
|
|
7925
8192
|
CallExpression,
|
|
7926
8193
|
CallExpressionRest,
|
|
8194
|
+
ExplicitCallExpressionRest,
|
|
7927
8195
|
OptionalShorthand,
|
|
7928
8196
|
OptionalDot,
|
|
7929
8197
|
NonNullAssertion,
|
|
@@ -7939,6 +8207,7 @@ var grammar = {
|
|
|
7939
8207
|
ImplicitAccessStart,
|
|
7940
8208
|
PropertyAccessModifier,
|
|
7941
8209
|
PropertyAccess,
|
|
8210
|
+
ExplicitPropertyGlob,
|
|
7942
8211
|
PropertyGlob,
|
|
7943
8212
|
PropertyBind,
|
|
7944
8213
|
SuperProperty,
|
|
@@ -8206,8 +8475,8 @@ var grammar = {
|
|
|
8206
8475
|
Debugger,
|
|
8207
8476
|
MaybeNestedNonPipelineExpression,
|
|
8208
8477
|
MaybeNestedPostfixedExpression,
|
|
8478
|
+
NestedPostfixedExpressionNoTrailing,
|
|
8209
8479
|
MaybeNestedExpression,
|
|
8210
|
-
NestedExpression,
|
|
8211
8480
|
MaybeParenNestedExpression,
|
|
8212
8481
|
ImportDeclaration,
|
|
8213
8482
|
ImpliedImport,
|
|
@@ -8761,125 +9030,126 @@ var $L123 = (0, import_lib2.$L)("sum");
|
|
|
8761
9030
|
var $L124 = (0, import_lib2.$L)("product");
|
|
8762
9031
|
var $L125 = (0, import_lib2.$L)("min");
|
|
8763
9032
|
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)("
|
|
9033
|
+
var $L127 = (0, import_lib2.$L)("join");
|
|
9034
|
+
var $L128 = (0, import_lib2.$L)("break");
|
|
9035
|
+
var $L129 = (0, import_lib2.$L)("continue");
|
|
9036
|
+
var $L130 = (0, import_lib2.$L)("debugger");
|
|
9037
|
+
var $L131 = (0, import_lib2.$L)("require");
|
|
9038
|
+
var $L132 = (0, import_lib2.$L)("with");
|
|
9039
|
+
var $L133 = (0, import_lib2.$L)("assert");
|
|
9040
|
+
var $L134 = (0, import_lib2.$L)(":=");
|
|
9041
|
+
var $L135 = (0, import_lib2.$L)("\u2254");
|
|
9042
|
+
var $L136 = (0, import_lib2.$L)(".=");
|
|
9043
|
+
var $L137 = (0, import_lib2.$L)("::=");
|
|
9044
|
+
var $L138 = (0, import_lib2.$L)("/*");
|
|
9045
|
+
var $L139 = (0, import_lib2.$L)("*/");
|
|
9046
|
+
var $L140 = (0, import_lib2.$L)("\\");
|
|
9047
|
+
var $L141 = (0, import_lib2.$L)(")");
|
|
9048
|
+
var $L142 = (0, import_lib2.$L)("abstract");
|
|
9049
|
+
var $L143 = (0, import_lib2.$L)("as");
|
|
9050
|
+
var $L144 = (0, import_lib2.$L)("@");
|
|
9051
|
+
var $L145 = (0, import_lib2.$L)("@@");
|
|
9052
|
+
var $L146 = (0, import_lib2.$L)("async");
|
|
9053
|
+
var $L147 = (0, import_lib2.$L)("await");
|
|
9054
|
+
var $L148 = (0, import_lib2.$L)("`");
|
|
9055
|
+
var $L149 = (0, import_lib2.$L)("by");
|
|
9056
|
+
var $L150 = (0, import_lib2.$L)("case");
|
|
9057
|
+
var $L151 = (0, import_lib2.$L)("catch");
|
|
9058
|
+
var $L152 = (0, import_lib2.$L)("class");
|
|
9059
|
+
var $L153 = (0, import_lib2.$L)("#{");
|
|
9060
|
+
var $L154 = (0, import_lib2.$L)("comptime");
|
|
9061
|
+
var $L155 = (0, import_lib2.$L)("declare");
|
|
9062
|
+
var $L156 = (0, import_lib2.$L)("default");
|
|
9063
|
+
var $L157 = (0, import_lib2.$L)("delete");
|
|
9064
|
+
var $L158 = (0, import_lib2.$L)("do");
|
|
9065
|
+
var $L159 = (0, import_lib2.$L)("..");
|
|
9066
|
+
var $L160 = (0, import_lib2.$L)("\u2025");
|
|
9067
|
+
var $L161 = (0, import_lib2.$L)("...");
|
|
9068
|
+
var $L162 = (0, import_lib2.$L)("\u2026");
|
|
9069
|
+
var $L163 = (0, import_lib2.$L)("::");
|
|
9070
|
+
var $L164 = (0, import_lib2.$L)('"');
|
|
9071
|
+
var $L165 = (0, import_lib2.$L)("each");
|
|
9072
|
+
var $L166 = (0, import_lib2.$L)("else");
|
|
9073
|
+
var $L167 = (0, import_lib2.$L)("!");
|
|
9074
|
+
var $L168 = (0, import_lib2.$L)("export");
|
|
9075
|
+
var $L169 = (0, import_lib2.$L)("extends");
|
|
9076
|
+
var $L170 = (0, import_lib2.$L)("finally");
|
|
9077
|
+
var $L171 = (0, import_lib2.$L)("for");
|
|
9078
|
+
var $L172 = (0, import_lib2.$L)("from");
|
|
9079
|
+
var $L173 = (0, import_lib2.$L)("function");
|
|
9080
|
+
var $L174 = (0, import_lib2.$L)("get");
|
|
9081
|
+
var $L175 = (0, import_lib2.$L)("set");
|
|
9082
|
+
var $L176 = (0, import_lib2.$L)("#");
|
|
9083
|
+
var $L177 = (0, import_lib2.$L)("if");
|
|
9084
|
+
var $L178 = (0, import_lib2.$L)("in");
|
|
9085
|
+
var $L179 = (0, import_lib2.$L)("infer");
|
|
9086
|
+
var $L180 = (0, import_lib2.$L)("let");
|
|
9087
|
+
var $L181 = (0, import_lib2.$L)("const");
|
|
9088
|
+
var $L182 = (0, import_lib2.$L)("is");
|
|
9089
|
+
var $L183 = (0, import_lib2.$L)("var");
|
|
9090
|
+
var $L184 = (0, import_lib2.$L)("like");
|
|
9091
|
+
var $L185 = (0, import_lib2.$L)("loop");
|
|
9092
|
+
var $L186 = (0, import_lib2.$L)("new");
|
|
9093
|
+
var $L187 = (0, import_lib2.$L)("not");
|
|
9094
|
+
var $L188 = (0, import_lib2.$L)("of");
|
|
9095
|
+
var $L189 = (0, import_lib2.$L)("[");
|
|
9096
|
+
var $L190 = (0, import_lib2.$L)("operator");
|
|
9097
|
+
var $L191 = (0, import_lib2.$L)("override");
|
|
9098
|
+
var $L192 = (0, import_lib2.$L)("own");
|
|
9099
|
+
var $L193 = (0, import_lib2.$L)("public");
|
|
9100
|
+
var $L194 = (0, import_lib2.$L)("private");
|
|
9101
|
+
var $L195 = (0, import_lib2.$L)("protected");
|
|
9102
|
+
var $L196 = (0, import_lib2.$L)("||>");
|
|
9103
|
+
var $L197 = (0, import_lib2.$L)("|\u25B7");
|
|
9104
|
+
var $L198 = (0, import_lib2.$L)("|>=");
|
|
9105
|
+
var $L199 = (0, import_lib2.$L)("\u25B7=");
|
|
9106
|
+
var $L200 = (0, import_lib2.$L)("|>");
|
|
9107
|
+
var $L201 = (0, import_lib2.$L)("\u25B7");
|
|
9108
|
+
var $L202 = (0, import_lib2.$L)("readonly");
|
|
9109
|
+
var $L203 = (0, import_lib2.$L)("return");
|
|
9110
|
+
var $L204 = (0, import_lib2.$L)("satisfies");
|
|
9111
|
+
var $L205 = (0, import_lib2.$L)("'");
|
|
9112
|
+
var $L206 = (0, import_lib2.$L)("static");
|
|
9113
|
+
var $L207 = (0, import_lib2.$L)("${");
|
|
9114
|
+
var $L208 = (0, import_lib2.$L)("super");
|
|
9115
|
+
var $L209 = (0, import_lib2.$L)("switch");
|
|
9116
|
+
var $L210 = (0, import_lib2.$L)("target");
|
|
9117
|
+
var $L211 = (0, import_lib2.$L)("then");
|
|
9118
|
+
var $L212 = (0, import_lib2.$L)("this");
|
|
9119
|
+
var $L213 = (0, import_lib2.$L)("throw");
|
|
9120
|
+
var $L214 = (0, import_lib2.$L)('"""');
|
|
9121
|
+
var $L215 = (0, import_lib2.$L)("'''");
|
|
9122
|
+
var $L216 = (0, import_lib2.$L)("///");
|
|
9123
|
+
var $L217 = (0, import_lib2.$L)("```");
|
|
9124
|
+
var $L218 = (0, import_lib2.$L)("try");
|
|
9125
|
+
var $L219 = (0, import_lib2.$L)("typeof");
|
|
9126
|
+
var $L220 = (0, import_lib2.$L)("undefined");
|
|
9127
|
+
var $L221 = (0, import_lib2.$L)("unless");
|
|
9128
|
+
var $L222 = (0, import_lib2.$L)("until");
|
|
9129
|
+
var $L223 = (0, import_lib2.$L)("using");
|
|
9130
|
+
var $L224 = (0, import_lib2.$L)("void");
|
|
9131
|
+
var $L225 = (0, import_lib2.$L)("when");
|
|
9132
|
+
var $L226 = (0, import_lib2.$L)("while");
|
|
9133
|
+
var $L227 = (0, import_lib2.$L)("yield");
|
|
9134
|
+
var $L228 = (0, import_lib2.$L)("/>");
|
|
9135
|
+
var $L229 = (0, import_lib2.$L)("</");
|
|
9136
|
+
var $L230 = (0, import_lib2.$L)("<>");
|
|
9137
|
+
var $L231 = (0, import_lib2.$L)("</>");
|
|
9138
|
+
var $L232 = (0, import_lib2.$L)("<!--");
|
|
9139
|
+
var $L233 = (0, import_lib2.$L)("-->");
|
|
9140
|
+
var $L234 = (0, import_lib2.$L)("type");
|
|
9141
|
+
var $L235 = (0, import_lib2.$L)("enum");
|
|
9142
|
+
var $L236 = (0, import_lib2.$L)("interface");
|
|
9143
|
+
var $L237 = (0, import_lib2.$L)("global");
|
|
9144
|
+
var $L238 = (0, import_lib2.$L)("module");
|
|
9145
|
+
var $L239 = (0, import_lib2.$L)("namespace");
|
|
9146
|
+
var $L240 = (0, import_lib2.$L)("asserts");
|
|
9147
|
+
var $L241 = (0, import_lib2.$L)("keyof");
|
|
9148
|
+
var $L242 = (0, import_lib2.$L)("???");
|
|
9149
|
+
var $L243 = (0, import_lib2.$L)("unique");
|
|
9150
|
+
var $L244 = (0, import_lib2.$L)("symbol");
|
|
9151
|
+
var $L245 = (0, import_lib2.$L)("[]");
|
|
9152
|
+
var $L246 = (0, import_lib2.$L)("civet");
|
|
8883
9153
|
var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
|
|
8884
9154
|
var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
|
|
8885
9155
|
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 +9448,7 @@ var ExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, Al
|
|
|
9178
9448
|
function ExplicitArguments(ctx, state2) {
|
|
9179
9449
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitArguments", ExplicitArguments$0);
|
|
9180
9450
|
}
|
|
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)(
|
|
9451
|
+
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
9452
|
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
9453
|
var ApplicationStart$$ = [ApplicationStart$0, ApplicationStart$1];
|
|
9184
9454
|
function ApplicationStart(ctx, state2) {
|
|
@@ -9211,52 +9481,16 @@ var ReservedBinary$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R2, "Rese
|
|
|
9211
9481
|
function ReservedBinary(ctx, state2) {
|
|
9212
9482
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReservedBinary", ReservedBinary$0);
|
|
9213
9483
|
}
|
|
9214
|
-
var
|
|
9484
|
+
var ArgumentsWithTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9215
9485
|
var args = $1;
|
|
9216
9486
|
var trailing = $2;
|
|
9217
|
-
return [args, ...trailing];
|
|
9218
|
-
});
|
|
9219
|
-
function ArgumentsWithTrailingMemberExpressions(ctx, state2) {
|
|
9220
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingMemberExpressions", ArgumentsWithTrailingMemberExpressions$0);
|
|
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();
|
|
9487
|
+
return [args, ...trailing ?? []];
|
|
9237
9488
|
});
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingMemberExpressions", IndentedTrailingMemberExpressions$$);
|
|
9489
|
+
function ArgumentsWithTrailingCallExpressions(ctx, state2) {
|
|
9490
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingCallExpressions", ArgumentsWithTrailingCallExpressions$0);
|
|
9241
9491
|
}
|
|
9242
|
-
var
|
|
9243
|
-
|
|
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$$);
|
|
9258
|
-
}
|
|
9259
|
-
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) {
|
|
9492
|
+
var TrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(ExplicitCallExpressionRest), (0, import_lib2.$E)(IndentedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9493
|
+
$1 = $1.flat();
|
|
9260
9494
|
if (!$1.length && !$2)
|
|
9261
9495
|
return $skip;
|
|
9262
9496
|
if (!$2)
|
|
@@ -9351,10 +9585,10 @@ var NestedArgumentList$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent,
|
|
|
9351
9585
|
function NestedArgumentList(ctx, state2) {
|
|
9352
9586
|
return (0, import_lib2.$EVENT)(ctx, state2, "NestedArgumentList", NestedArgumentList$0);
|
|
9353
9587
|
}
|
|
9354
|
-
var NestedArgument$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Nested, (0, import_lib2.$N)(Bullet), SingleLineArgumentExpressions, ParameterElementDelimiter), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
9355
|
-
var indent = $
|
|
9356
|
-
var args = $
|
|
9357
|
-
var comma = $
|
|
9588
|
+
var NestedArgument$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedImplicitPropertyDefinition), Nested, (0, import_lib2.$N)(Bullet), SingleLineArgumentExpressions, ParameterElementDelimiter), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
9589
|
+
var indent = $2;
|
|
9590
|
+
var args = $4;
|
|
9591
|
+
var comma = $5;
|
|
9358
9592
|
let [arg0, ...rest] = args;
|
|
9359
9593
|
arg0 = prepend(indent, arg0);
|
|
9360
9594
|
return [arg0, ...rest, comma];
|
|
@@ -10475,7 +10709,7 @@ var LeftHandSideExpression$$ = [LeftHandSideExpression$0, LeftHandSideExpression
|
|
|
10475
10709
|
function LeftHandSideExpression(ctx, state2) {
|
|
10476
10710
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LeftHandSideExpression", LeftHandSideExpression$$);
|
|
10477
10711
|
}
|
|
10478
|
-
var CallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Super,
|
|
10712
|
+
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
10713
|
var rest = $3;
|
|
10480
10714
|
return processCallMemberExpression({
|
|
10481
10715
|
type: "CallExpression",
|
|
@@ -10493,7 +10727,7 @@ var CallExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __,
|
|
|
10493
10727
|
var imports = $5;
|
|
10494
10728
|
return dynamizeImportDeclarationExpression([i, iws, imports, fws, from]);
|
|
10495
10729
|
});
|
|
10496
|
-
var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'),
|
|
10730
|
+
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
10731
|
var rest = $3;
|
|
10498
10732
|
return processCallMemberExpression({
|
|
10499
10733
|
type: "CallExpression",
|
|
@@ -10528,7 +10762,7 @@ var CallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_l
|
|
|
10528
10762
|
}
|
|
10529
10763
|
return literal;
|
|
10530
10764
|
});
|
|
10531
|
-
var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand),
|
|
10765
|
+
var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingCallExpressions), function($skip, $loc, $0, $1, $2) {
|
|
10532
10766
|
var optional = $1;
|
|
10533
10767
|
var argsWithTrailing = $2;
|
|
10534
10768
|
if (!optional)
|
|
@@ -10544,6 +10778,32 @@ var CallExpressionRest$$ = [CallExpressionRest$0, CallExpressionRest$1, CallExpr
|
|
|
10544
10778
|
function CallExpressionRest(ctx, state2) {
|
|
10545
10779
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "CallExpressionRest", CallExpressionRest$$);
|
|
10546
10780
|
}
|
|
10781
|
+
var ExplicitCallExpressionRest$0 = MemberExpressionRest;
|
|
10782
|
+
var ExplicitCallExpressionRest$1 = (0, import_lib2.$T)((0, import_lib2.$S)(TypeArguments, (0, import_lib2.$N)((0, import_lib2.$C)(IdentifierName, NumericLiteral))), function(value) {
|
|
10783
|
+
return value[0];
|
|
10784
|
+
});
|
|
10785
|
+
var ExplicitCallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R8, "ExplicitCallExpressionRest /(?=['\"`])/"), (0, import_lib2.$C)(TemplateLiteral, StringLiteral)), function($skip, $loc, $0, $1, $2) {
|
|
10786
|
+
var literal = $2;
|
|
10787
|
+
if (literal.type === "StringLiteral") {
|
|
10788
|
+
literal = "`" + literal.token.slice(1, -1).replace(/(`|\$\{)/g, "\\$1") + "`";
|
|
10789
|
+
}
|
|
10790
|
+
return literal;
|
|
10791
|
+
});
|
|
10792
|
+
var ExplicitCallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ExplicitArguments), function($skip, $loc, $0, $1, $2) {
|
|
10793
|
+
var optional = $1;
|
|
10794
|
+
var call = $2;
|
|
10795
|
+
if (!optional)
|
|
10796
|
+
return call;
|
|
10797
|
+
return {
|
|
10798
|
+
...call,
|
|
10799
|
+
children: [optional, ...call.children],
|
|
10800
|
+
optional
|
|
10801
|
+
};
|
|
10802
|
+
});
|
|
10803
|
+
var ExplicitCallExpressionRest$$ = [ExplicitCallExpressionRest$0, ExplicitCallExpressionRest$1, ExplicitCallExpressionRest$2, ExplicitCallExpressionRest$3];
|
|
10804
|
+
function ExplicitCallExpressionRest(ctx, state2) {
|
|
10805
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "ExplicitCallExpressionRest", ExplicitCallExpressionRest$$);
|
|
10806
|
+
}
|
|
10547
10807
|
var OptionalShorthand$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R9, "OptionalShorthand /(?=[\\/?])/"), (0, import_lib2.$Q)(InlineComment), QuestionMark, OptionalDot), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
10548
10808
|
var comments = $2;
|
|
10549
10809
|
var q = $3;
|
|
@@ -10895,6 +11155,12 @@ var PropertyAccess$$ = [PropertyAccess$0, PropertyAccess$1, PropertyAccess$2, Pr
|
|
|
10895
11155
|
function PropertyAccess(ctx, state2) {
|
|
10896
11156
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PropertyAccess", PropertyAccess$$);
|
|
10897
11157
|
}
|
|
11158
|
+
var ExplicitPropertyGlob$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(ExplicitAccessStart), PropertyGlob), function(value) {
|
|
11159
|
+
return value[1];
|
|
11160
|
+
});
|
|
11161
|
+
function ExplicitPropertyGlob(ctx, state2) {
|
|
11162
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitPropertyGlob", ExplicitPropertyGlob$0);
|
|
11163
|
+
}
|
|
10898
11164
|
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
11165
|
var dot = $1;
|
|
10900
11166
|
var object = $3;
|
|
@@ -11175,7 +11441,8 @@ var NWBindingIdentifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(At, AtIdent
|
|
|
11175
11441
|
return {
|
|
11176
11442
|
type: "AtBinding",
|
|
11177
11443
|
children: [ref],
|
|
11178
|
-
ref
|
|
11444
|
+
ref,
|
|
11445
|
+
names: []
|
|
11179
11446
|
};
|
|
11180
11447
|
});
|
|
11181
11448
|
var NWBindingIdentifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Hash, AtIdentifierRef), function($skip, $loc, $0, $1, $2) {
|
|
@@ -11184,7 +11451,8 @@ var NWBindingIdentifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Hash, AtIde
|
|
|
11184
11451
|
return {
|
|
11185
11452
|
type: "AtBinding",
|
|
11186
11453
|
children: [ref],
|
|
11187
|
-
ref
|
|
11454
|
+
ref,
|
|
11455
|
+
names: []
|
|
11188
11456
|
};
|
|
11189
11457
|
});
|
|
11190
11458
|
var NWBindingIdentifier$2 = Identifier;
|
|
@@ -11507,19 +11775,13 @@ var BindingElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.
|
|
|
11507
11775
|
var binding = $2;
|
|
11508
11776
|
var typeSuffix = $3;
|
|
11509
11777
|
var initializer = $4;
|
|
11510
|
-
if (binding.children) {
|
|
11511
|
-
binding = {
|
|
11512
|
-
...binding,
|
|
11513
|
-
initializer,
|
|
11514
|
-
children: [...binding.children, initializer]
|
|
11515
|
-
};
|
|
11516
|
-
}
|
|
11517
11778
|
return {
|
|
11518
11779
|
type: "BindingElement",
|
|
11519
11780
|
names: binding.names,
|
|
11520
11781
|
typeSuffix,
|
|
11521
11782
|
binding,
|
|
11522
|
-
children: [ws, binding]
|
|
11783
|
+
children: [ws, binding, initializer],
|
|
11784
|
+
initializer
|
|
11523
11785
|
};
|
|
11524
11786
|
});
|
|
11525
11787
|
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 +12485,9 @@ var SingleLineStatements$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidNewl
|
|
|
12223
12485
|
const expressions = [...stmts];
|
|
12224
12486
|
if (last)
|
|
12225
12487
|
expressions.push(last);
|
|
12226
|
-
const maybeComment = expressions.at(-1)?.[2]?.children?.[2]?.at(-1);
|
|
12227
|
-
const hasTrailingComment = maybeComment?.type === "Comment" && maybeComment.token.startsWith("//");
|
|
12228
12488
|
const children = [expressions];
|
|
12229
|
-
if (hasTrailingComment)
|
|
12230
|
-
children.push("\n");
|
|
12489
|
+
if (hasTrailingComment(expressions))
|
|
12490
|
+
children.push(["\n"]);
|
|
12231
12491
|
return {
|
|
12232
12492
|
type: "BlockStatement",
|
|
12233
12493
|
expressions,
|
|
@@ -13308,52 +13568,23 @@ var MethodDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Abstract, __,
|
|
|
13308
13568
|
abstract: true,
|
|
13309
13569
|
signature,
|
|
13310
13570
|
parameters: signature.parameters,
|
|
13571
|
+
async: signature.async,
|
|
13572
|
+
generator: signature.generator,
|
|
13311
13573
|
ts: true
|
|
13312
13574
|
};
|
|
13313
13575
|
});
|
|
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) {
|
|
13576
|
+
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
13577
|
var signature = $1;
|
|
13316
13578
|
var block = $3;
|
|
13317
|
-
let children = $0;
|
|
13318
|
-
let generatorPos = 0;
|
|
13319
|
-
let { modifier } = signature;
|
|
13320
|
-
if (hasAwait(block)) {
|
|
13321
|
-
generatorPos++;
|
|
13322
|
-
children = children.slice();
|
|
13323
|
-
if (modifier?.get || modifier?.set) {
|
|
13324
|
-
children.push({
|
|
13325
|
-
type: "Error",
|
|
13326
|
-
message: "Getters and setters cannot be async"
|
|
13327
|
-
});
|
|
13328
|
-
} else if (modifier?.async) {
|
|
13329
|
-
} else {
|
|
13330
|
-
children.unshift("async ");
|
|
13331
|
-
modifier = { ...modifier, async: true };
|
|
13332
|
-
signature = { ...signature, modifier };
|
|
13333
|
-
}
|
|
13334
|
-
}
|
|
13335
|
-
if (hasYield(block)) {
|
|
13336
|
-
if (children === $0)
|
|
13337
|
-
children = children.slice();
|
|
13338
|
-
if (modifier?.get || modifier?.set) {
|
|
13339
|
-
children.push({
|
|
13340
|
-
type: "Error",
|
|
13341
|
-
message: "Getters and setters cannot be generators"
|
|
13342
|
-
});
|
|
13343
|
-
} else if (modifier?.generator) {
|
|
13344
|
-
} else {
|
|
13345
|
-
children.splice(generatorPos, 0, "*");
|
|
13346
|
-
modifier = { ...modifier, generator: true };
|
|
13347
|
-
signature = { ...signature, modifier };
|
|
13348
|
-
}
|
|
13349
|
-
}
|
|
13350
13579
|
return {
|
|
13351
13580
|
type: "MethodDefinition",
|
|
13352
|
-
children,
|
|
13581
|
+
children: $0,
|
|
13353
13582
|
name: signature.name,
|
|
13354
13583
|
signature,
|
|
13355
13584
|
block,
|
|
13356
|
-
parameters: signature.parameters
|
|
13585
|
+
parameters: signature.parameters,
|
|
13586
|
+
async: signature.async,
|
|
13587
|
+
generator: signature.generator
|
|
13357
13588
|
};
|
|
13358
13589
|
});
|
|
13359
13590
|
var MethodDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(GetOrSet, (0, import_lib2.$E)(_), ForbidIndentedApplication, (0, import_lib2.$E)((0, import_lib2.$S)(MemberBase, (0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(ReturnTypeSuffix))), RestoreIndentedApplication, (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
@@ -13436,36 +13667,38 @@ function MethodDefinition(ctx, state2) {
|
|
|
13436
13667
|
}
|
|
13437
13668
|
var MethodModifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(GetOrSet, (0, import_lib2.$E)(_), (0, import_lib2.$Y)(ClassElementName)), function($skip, $loc, $0, $1, $2, $3) {
|
|
13438
13669
|
var kind = $1;
|
|
13670
|
+
var ws = $2;
|
|
13439
13671
|
return {
|
|
13440
|
-
|
|
13441
|
-
|
|
13442
|
-
|
|
13443
|
-
|
|
13444
|
-
|
|
13445
|
-
|
|
13446
|
-
|
|
13447
|
-
|
|
13448
|
-
var MethodModifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$S)(Async, __), (0, import_lib2.$E)((0, import_lib2.$S)(Star, __))), function($skip, $loc, $0, $1, $2) {
|
|
13449
|
-
return {
|
|
13450
|
-
type: "MethodModifier",
|
|
13451
|
-
async: true,
|
|
13452
|
-
get: false,
|
|
13453
|
-
set: false,
|
|
13454
|
-
generator: !!$2,
|
|
13455
|
-
children: $0
|
|
13672
|
+
// no async or generator, because getters and setters can't be
|
|
13673
|
+
modifier: {
|
|
13674
|
+
async: false,
|
|
13675
|
+
generator: false,
|
|
13676
|
+
get: kind.token === "get",
|
|
13677
|
+
set: kind.token === "set"
|
|
13678
|
+
},
|
|
13679
|
+
children: [kind, ws]
|
|
13456
13680
|
};
|
|
13457
13681
|
});
|
|
13458
|
-
var MethodModifier$
|
|
13682
|
+
var MethodModifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Async, __)), (0, import_lib2.$E)((0, import_lib2.$S)(Star, __))), function($skip, $loc, $0, $1, $2) {
|
|
13683
|
+
var async = $1;
|
|
13684
|
+
var generator = $2;
|
|
13685
|
+
if (!async)
|
|
13686
|
+
async = [];
|
|
13687
|
+
if (!generator)
|
|
13688
|
+
generator = [];
|
|
13459
13689
|
return {
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13690
|
+
async,
|
|
13691
|
+
generator,
|
|
13692
|
+
modifier: {
|
|
13693
|
+
async: !!async.length,
|
|
13694
|
+
get: false,
|
|
13695
|
+
set: false,
|
|
13696
|
+
generator: !!generator.length
|
|
13697
|
+
},
|
|
13698
|
+
children: [async, generator]
|
|
13466
13699
|
};
|
|
13467
13700
|
});
|
|
13468
|
-
var MethodModifier$$ = [MethodModifier$0, MethodModifier$1
|
|
13701
|
+
var MethodModifier$$ = [MethodModifier$0, MethodModifier$1];
|
|
13469
13702
|
function MethodModifier(ctx, state2) {
|
|
13470
13703
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MethodModifier", MethodModifier$$);
|
|
13471
13704
|
}
|
|
@@ -13480,10 +13713,12 @@ var MethodSignature$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ConstructorShor
|
|
|
13480
13713
|
parameters
|
|
13481
13714
|
};
|
|
13482
13715
|
});
|
|
13483
|
-
var MethodSignature$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
13716
|
+
var MethodSignature$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(MethodModifier, ClassElementName, (0, import_lib2.$E)(_), (0, import_lib2.$E)(QuestionMark), (0, import_lib2.$E)(_), NonEmptyParameters, (0, import_lib2.$E)(ReturnTypeSuffix)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
|
|
13484
13717
|
var modifier = $1;
|
|
13485
13718
|
var name = $2;
|
|
13719
|
+
var ws1 = $3;
|
|
13486
13720
|
var optional = $4;
|
|
13721
|
+
var ws2 = $5;
|
|
13487
13722
|
var parameters = $6;
|
|
13488
13723
|
var returnType = $7;
|
|
13489
13724
|
if (name.name) {
|
|
@@ -13492,14 +13727,15 @@ var MethodSignature$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2
|
|
|
13492
13727
|
name = name.token.match(/^(?:"|')/) ? name.token.slice(1, -1) : name.token;
|
|
13493
13728
|
}
|
|
13494
13729
|
if (optional)
|
|
13495
|
-
|
|
13496
|
-
modifier = modifier || {};
|
|
13730
|
+
optional = { ...optional, ts: true };
|
|
13497
13731
|
return {
|
|
13498
13732
|
type: "MethodSignature",
|
|
13499
|
-
children:
|
|
13733
|
+
children: [...modifier.children, name, ws1, optional, ws2, parameters, returnType],
|
|
13734
|
+
async: modifier.async,
|
|
13735
|
+
generator: modifier.generator,
|
|
13500
13736
|
name,
|
|
13501
13737
|
optional,
|
|
13502
|
-
modifier,
|
|
13738
|
+
modifier: modifier.modifier,
|
|
13503
13739
|
// get/set/async/generator
|
|
13504
13740
|
returnType,
|
|
13505
13741
|
parameters
|
|
@@ -14531,7 +14767,7 @@ var ForStatementControlWithReduction$$ = [ForStatementControlWithReduction$0, Fo
|
|
|
14531
14767
|
function ForStatementControlWithReduction(ctx, state2) {
|
|
14532
14768
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ForStatementControlWithReduction", ForStatementControlWithReduction$$);
|
|
14533
14769
|
}
|
|
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) {
|
|
14770
|
+
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
14771
|
var subtype = $1;
|
|
14536
14772
|
var ws = $3;
|
|
14537
14773
|
return {
|
|
@@ -15105,7 +15341,7 @@ var Condition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, Decl
|
|
|
15105
15341
|
expression
|
|
15106
15342
|
};
|
|
15107
15343
|
});
|
|
15108
|
-
var Condition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, InsertOpenParen, (0, import_lib2.$E)((0, import_lib2.$S)(Nested,
|
|
15344
|
+
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
15345
|
var open = $2;
|
|
15110
15346
|
var expression = $3;
|
|
15111
15347
|
var close = $4;
|
|
@@ -15134,7 +15370,7 @@ var Condition$$ = [Condition$0, Condition$1, Condition$2, Condition$3, Condition
|
|
|
15134
15370
|
function Condition(ctx, state2) {
|
|
15135
15371
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Condition", Condition$$);
|
|
15136
15372
|
}
|
|
15137
|
-
var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen,
|
|
15373
|
+
var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, PostfixedExpression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
|
|
15138
15374
|
var open = $1;
|
|
15139
15375
|
var expression = $2;
|
|
15140
15376
|
var close = $3;
|
|
@@ -15481,67 +15717,84 @@ var ThrowStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Throw, MaybeParen
|
|
|
15481
15717
|
function ThrowStatement(ctx, state2) {
|
|
15482
15718
|
return (0, import_lib2.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
|
|
15483
15719
|
}
|
|
15484
|
-
var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15720
|
+
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
15721
|
return { $loc, token: $1 };
|
|
15486
15722
|
});
|
|
15487
15723
|
function Break(ctx, state2) {
|
|
15488
15724
|
return (0, import_lib2.$EVENT)(ctx, state2, "Break", Break$0);
|
|
15489
15725
|
}
|
|
15490
|
-
var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15726
|
+
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
15727
|
return { $loc, token: $1 };
|
|
15492
15728
|
});
|
|
15493
15729
|
function Continue(ctx, state2) {
|
|
15494
15730
|
return (0, import_lib2.$EVENT)(ctx, state2, "Continue", Continue$0);
|
|
15495
15731
|
}
|
|
15496
|
-
var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15732
|
+
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
15733
|
return { $loc, token: $1 };
|
|
15498
15734
|
});
|
|
15499
15735
|
function Debugger(ctx, state2) {
|
|
15500
15736
|
return (0, import_lib2.$EVENT)(ctx, state2, "Debugger", Debugger$0);
|
|
15501
15737
|
}
|
|
15502
15738
|
var MaybeNestedNonPipelineExpression$0 = NestedBulletedArray;
|
|
15503
|
-
var MaybeNestedNonPipelineExpression$1 =
|
|
15504
|
-
|
|
15505
|
-
|
|
15506
|
-
|
|
15739
|
+
var MaybeNestedNonPipelineExpression$1 = NestedImplicitObjectLiteral;
|
|
15740
|
+
var MaybeNestedNonPipelineExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, NonPipelineExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
15741
|
+
var expression = $2;
|
|
15742
|
+
var trailing = $4;
|
|
15743
|
+
if (!expression)
|
|
15744
|
+
return $skip;
|
|
15745
|
+
if (!trailing)
|
|
15746
|
+
return expression;
|
|
15747
|
+
return [expression, trailing];
|
|
15507
15748
|
});
|
|
15508
|
-
var MaybeNestedNonPipelineExpression$
|
|
15509
|
-
var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1, MaybeNestedNonPipelineExpression$2];
|
|
15749
|
+
var MaybeNestedNonPipelineExpression$3 = NonPipelineExpression;
|
|
15750
|
+
var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1, MaybeNestedNonPipelineExpression$2, MaybeNestedNonPipelineExpression$3];
|
|
15510
15751
|
function MaybeNestedNonPipelineExpression(ctx, state2) {
|
|
15511
15752
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedNonPipelineExpression", MaybeNestedNonPipelineExpression$$);
|
|
15512
15753
|
}
|
|
15513
15754
|
var MaybeNestedPostfixedExpression$0 = NestedBulletedArray;
|
|
15514
|
-
var MaybeNestedPostfixedExpression$1 =
|
|
15515
|
-
|
|
15516
|
-
|
|
15517
|
-
|
|
15755
|
+
var MaybeNestedPostfixedExpression$1 = NestedImplicitObjectLiteral;
|
|
15756
|
+
var MaybeNestedPostfixedExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
15757
|
+
var expression = $2;
|
|
15758
|
+
var trailing = $4;
|
|
15759
|
+
if (!expression)
|
|
15760
|
+
return $skip;
|
|
15761
|
+
if (!trailing)
|
|
15762
|
+
return expression;
|
|
15763
|
+
return [expression, trailing];
|
|
15518
15764
|
});
|
|
15519
|
-
var MaybeNestedPostfixedExpression$
|
|
15520
|
-
var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1, MaybeNestedPostfixedExpression$2];
|
|
15765
|
+
var MaybeNestedPostfixedExpression$3 = PostfixedExpression;
|
|
15766
|
+
var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1, MaybeNestedPostfixedExpression$2, MaybeNestedPostfixedExpression$3];
|
|
15521
15767
|
function MaybeNestedPostfixedExpression(ctx, state2) {
|
|
15522
15768
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedPostfixedExpression", MaybeNestedPostfixedExpression$$);
|
|
15523
15769
|
}
|
|
15770
|
+
var NestedPostfixedExpressionNoTrailing$0 = NestedBulletedArray;
|
|
15771
|
+
var NestedPostfixedExpressionNoTrailing$1 = NestedImplicitObjectLiteral;
|
|
15772
|
+
var NestedPostfixedExpressionNoTrailing$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
15773
|
+
var expression = $2;
|
|
15774
|
+
if (!expression)
|
|
15775
|
+
return $skip;
|
|
15776
|
+
return expression;
|
|
15777
|
+
});
|
|
15778
|
+
var NestedPostfixedExpressionNoTrailing$$ = [NestedPostfixedExpressionNoTrailing$0, NestedPostfixedExpressionNoTrailing$1, NestedPostfixedExpressionNoTrailing$2];
|
|
15779
|
+
function NestedPostfixedExpressionNoTrailing(ctx, state2) {
|
|
15780
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedPostfixedExpressionNoTrailing", NestedPostfixedExpressionNoTrailing$$);
|
|
15781
|
+
}
|
|
15524
15782
|
var MaybeNestedExpression$0 = NestedBulletedArray;
|
|
15525
|
-
var MaybeNestedExpression$1 =
|
|
15526
|
-
|
|
15527
|
-
|
|
15528
|
-
|
|
15783
|
+
var MaybeNestedExpression$1 = NestedImplicitObjectLiteral;
|
|
15784
|
+
var MaybeNestedExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
15785
|
+
var expression = $2;
|
|
15786
|
+
var trailing = $4;
|
|
15787
|
+
if (!expression)
|
|
15788
|
+
return $skip;
|
|
15789
|
+
if (!trailing)
|
|
15790
|
+
return expression;
|
|
15791
|
+
return [expression, trailing];
|
|
15529
15792
|
});
|
|
15530
|
-
var MaybeNestedExpression$
|
|
15531
|
-
var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1, MaybeNestedExpression$2];
|
|
15793
|
+
var MaybeNestedExpression$3 = Expression;
|
|
15794
|
+
var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1, MaybeNestedExpression$2, MaybeNestedExpression$3];
|
|
15532
15795
|
function MaybeNestedExpression(ctx, state2) {
|
|
15533
15796
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedExpression", MaybeNestedExpression$$);
|
|
15534
15797
|
}
|
|
15535
|
-
var NestedExpression$0 = NestedBulletedArray;
|
|
15536
|
-
var NestedExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
15537
|
-
if ($3)
|
|
15538
|
-
return $3;
|
|
15539
|
-
return $skip;
|
|
15540
|
-
});
|
|
15541
|
-
var NestedExpression$$ = [NestedExpression$0, NestedExpression$1];
|
|
15542
|
-
function NestedExpression(ctx, state2) {
|
|
15543
|
-
return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedExpression", NestedExpression$$);
|
|
15544
|
-
}
|
|
15545
15798
|
var MaybeParenNestedExpression$0 = (0, import_lib2.$T)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement, NoBlock)), function(value) {
|
|
15546
15799
|
return "";
|
|
15547
15800
|
});
|
|
@@ -15551,7 +15804,7 @@ var MaybeParenNestedExpression$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, i
|
|
|
15551
15804
|
var MaybeParenNestedExpression$2 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), (0, import_lib2.$C)(ArrayLiteral, ObjectLiteral)), function(value) {
|
|
15552
15805
|
return value[1];
|
|
15553
15806
|
});
|
|
15554
|
-
var MaybeParenNestedExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertSpace, InsertOpenParen, PushIndent, (0, import_lib2.$S)(Nested, Expression), PopIndent, InsertNewline, InsertIndent, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
15807
|
+
var MaybeParenNestedExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertSpace, InsertOpenParen, PushIndent, (0, import_lib2.$S)(Nested, Expression), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions), InsertNewline, InsertIndent, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {
|
|
15555
15808
|
var exp = $5;
|
|
15556
15809
|
if (!exp)
|
|
15557
15810
|
return $skip;
|
|
@@ -15561,7 +15814,7 @@ var MaybeParenNestedExpression$$ = [MaybeParenNestedExpression$0, MaybeParenNest
|
|
|
15561
15814
|
function MaybeParenNestedExpression(ctx, state2) {
|
|
15562
15815
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
|
|
15563
15816
|
}
|
|
15564
|
-
var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($
|
|
15817
|
+
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
15818
|
const imp = [
|
|
15566
15819
|
{ ...$1, ts: true },
|
|
15567
15820
|
{ ...$1, token: "const", js: true }
|
|
@@ -15751,7 +16004,7 @@ var ImpliedFrom$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImpliedF
|
|
|
15751
16004
|
function ImpliedFrom(ctx, state2) {
|
|
15752
16005
|
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
|
|
15753
16006
|
}
|
|
15754
|
-
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
16007
|
+
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
16008
|
var keyword = $2;
|
|
15756
16009
|
var object = $5;
|
|
15757
16010
|
return {
|
|
@@ -16077,19 +16330,19 @@ var LexicalDeclaration$$ = [LexicalDeclaration$0, LexicalDeclaration$1];
|
|
|
16077
16330
|
function LexicalDeclaration(ctx, state2) {
|
|
16078
16331
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
|
|
16079
16332
|
}
|
|
16080
|
-
var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
16333
|
+
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
16334
|
return { $loc, token: "=", decl: "const " };
|
|
16082
16335
|
});
|
|
16083
16336
|
function ConstAssignment(ctx, state2) {
|
|
16084
16337
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
|
|
16085
16338
|
}
|
|
16086
|
-
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16339
|
+
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
|
|
16087
16340
|
return { $loc, token: "=", decl: "let " };
|
|
16088
16341
|
});
|
|
16089
16342
|
function LetAssignment(ctx, state2) {
|
|
16090
16343
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
|
|
16091
16344
|
}
|
|
16092
|
-
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16345
|
+
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L137, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
|
|
16093
16346
|
return { $loc, token: "=" };
|
|
16094
16347
|
});
|
|
16095
16348
|
function TypeAssignment(ctx, state2) {
|
|
@@ -16512,7 +16765,7 @@ var MultiLineComment$$ = [MultiLineComment$0, MultiLineComment$1];
|
|
|
16512
16765
|
function MultiLineComment(ctx, state2) {
|
|
16513
16766
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
|
|
16514
16767
|
}
|
|
16515
|
-
var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16768
|
+
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
16769
|
return { type: "Comment", $loc, token: $1 };
|
|
16517
16770
|
});
|
|
16518
16771
|
function JSMultiLineComment(ctx, state2) {
|
|
@@ -16558,7 +16811,7 @@ function _(ctx, state2) {
|
|
|
16558
16811
|
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
16812
|
return { $loc, token: $0 };
|
|
16560
16813
|
});
|
|
16561
|
-
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16814
|
+
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
|
|
16562
16815
|
return " ";
|
|
16563
16816
|
});
|
|
16564
16817
|
var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
|
|
@@ -16609,7 +16862,7 @@ var StatementDelimiter$$ = [StatementDelimiter$0, StatementDelimiter$1, Statemen
|
|
|
16609
16862
|
function StatementDelimiter(ctx, state2) {
|
|
16610
16863
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
|
|
16611
16864
|
}
|
|
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)($
|
|
16865
|
+
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
16866
|
function ClosingDelimiter(ctx, state2) {
|
|
16614
16867
|
return (0, import_lib2.$EVENT)(ctx, state2, "ClosingDelimiter", ClosingDelimiter$0);
|
|
16615
16868
|
}
|
|
@@ -16632,7 +16885,7 @@ var Loc$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Loc ""'), functi
|
|
|
16632
16885
|
function Loc(ctx, state2) {
|
|
16633
16886
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
|
|
16634
16887
|
}
|
|
16635
|
-
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16888
|
+
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
16889
|
return { $loc, token: $1, ts: true };
|
|
16637
16890
|
});
|
|
16638
16891
|
function Abstract(ctx, state2) {
|
|
@@ -16644,43 +16897,43 @@ var Ampersand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L117, 'Ampersan
|
|
|
16644
16897
|
function Ampersand(ctx, state2) {
|
|
16645
16898
|
return (0, import_lib2.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
|
|
16646
16899
|
}
|
|
16647
|
-
var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16900
|
+
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
16901
|
return { $loc, token: $1 };
|
|
16649
16902
|
});
|
|
16650
16903
|
function As(ctx, state2) {
|
|
16651
16904
|
return (0, import_lib2.$EVENT)(ctx, state2, "As", As$0);
|
|
16652
16905
|
}
|
|
16653
|
-
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16906
|
+
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'At "@"'), function($skip, $loc, $0, $1) {
|
|
16654
16907
|
return { $loc, token: $1 };
|
|
16655
16908
|
});
|
|
16656
16909
|
function At(ctx, state2) {
|
|
16657
16910
|
return (0, import_lib2.$EVENT)(ctx, state2, "At", At$0);
|
|
16658
16911
|
}
|
|
16659
|
-
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16912
|
+
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L145, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
|
|
16660
16913
|
return { $loc, token: "@" };
|
|
16661
16914
|
});
|
|
16662
16915
|
function AtAt(ctx, state2) {
|
|
16663
16916
|
return (0, import_lib2.$EVENT)(ctx, state2, "AtAt", AtAt$0);
|
|
16664
16917
|
}
|
|
16665
|
-
var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16918
|
+
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
16919
|
return { $loc, token: $1, type: "Async" };
|
|
16667
16920
|
});
|
|
16668
16921
|
function Async(ctx, state2) {
|
|
16669
16922
|
return (0, import_lib2.$EVENT)(ctx, state2, "Async", Async$0);
|
|
16670
16923
|
}
|
|
16671
|
-
var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16924
|
+
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
16925
|
return { $loc, token: $1, type: "Await" };
|
|
16673
16926
|
});
|
|
16674
16927
|
function Await(ctx, state2) {
|
|
16675
16928
|
return (0, import_lib2.$EVENT)(ctx, state2, "Await", Await$0);
|
|
16676
16929
|
}
|
|
16677
|
-
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16930
|
+
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L148, 'Backtick "`"'), function($skip, $loc, $0, $1) {
|
|
16678
16931
|
return { $loc, token: $1 };
|
|
16679
16932
|
});
|
|
16680
16933
|
function Backtick(ctx, state2) {
|
|
16681
16934
|
return (0, import_lib2.$EVENT)(ctx, state2, "Backtick", Backtick$0);
|
|
16682
16935
|
}
|
|
16683
|
-
var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16936
|
+
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
16937
|
return { $loc, token: $1 };
|
|
16685
16938
|
});
|
|
16686
16939
|
function By(ctx, state2) {
|
|
@@ -16692,19 +16945,19 @@ var Caret$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L22, 'Caret "^"'),
|
|
|
16692
16945
|
function Caret(ctx, state2) {
|
|
16693
16946
|
return (0, import_lib2.$EVENT)(ctx, state2, "Caret", Caret$0);
|
|
16694
16947
|
}
|
|
16695
|
-
var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16948
|
+
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
16949
|
return { $loc, token: $1 };
|
|
16697
16950
|
});
|
|
16698
16951
|
function Case(ctx, state2) {
|
|
16699
16952
|
return (0, import_lib2.$EVENT)(ctx, state2, "Case", Case$0);
|
|
16700
16953
|
}
|
|
16701
|
-
var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16954
|
+
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
16955
|
return { $loc, token: $1 };
|
|
16703
16956
|
});
|
|
16704
16957
|
function Catch(ctx, state2) {
|
|
16705
16958
|
return (0, import_lib2.$EVENT)(ctx, state2, "Catch", Catch$0);
|
|
16706
16959
|
}
|
|
16707
|
-
var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16960
|
+
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
16961
|
return { $loc, token: $1 };
|
|
16709
16962
|
});
|
|
16710
16963
|
function Class(ctx, state2) {
|
|
@@ -16728,13 +16981,13 @@ var CloseBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L46, 'CloseB
|
|
|
16728
16981
|
function CloseBracket(ctx, state2) {
|
|
16729
16982
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
|
|
16730
16983
|
}
|
|
16731
|
-
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16984
|
+
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L141, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
|
|
16732
16985
|
return { $loc, token: $1 };
|
|
16733
16986
|
});
|
|
16734
16987
|
function CloseParen(ctx, state2) {
|
|
16735
16988
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
|
|
16736
16989
|
}
|
|
16737
|
-
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16990
|
+
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L153, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
|
|
16738
16991
|
return { $loc, token: "${" };
|
|
16739
16992
|
});
|
|
16740
16993
|
function CoffeeSubstitutionStart(ctx, state2) {
|
|
@@ -16752,37 +17005,37 @@ var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L17, 'Comma ","'),
|
|
|
16752
17005
|
function Comma(ctx, state2) {
|
|
16753
17006
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comma", Comma$0);
|
|
16754
17007
|
}
|
|
16755
|
-
var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17008
|
+
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
17009
|
return { $loc, token: $1 };
|
|
16757
17010
|
});
|
|
16758
17011
|
function Comptime(ctx, state2) {
|
|
16759
17012
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comptime", Comptime$0);
|
|
16760
17013
|
}
|
|
16761
|
-
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17014
|
+
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
|
|
16762
17015
|
return { $loc, token: "constructor" };
|
|
16763
17016
|
});
|
|
16764
17017
|
function ConstructorShorthand(ctx, state2) {
|
|
16765
17018
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
|
|
16766
17019
|
}
|
|
16767
|
-
var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17020
|
+
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
17021
|
return { $loc, token: $1 };
|
|
16769
17022
|
});
|
|
16770
17023
|
function Declare(ctx, state2) {
|
|
16771
17024
|
return (0, import_lib2.$EVENT)(ctx, state2, "Declare", Declare$0);
|
|
16772
17025
|
}
|
|
16773
|
-
var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17026
|
+
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
17027
|
return { $loc, token: $1 };
|
|
16775
17028
|
});
|
|
16776
17029
|
function Default(ctx, state2) {
|
|
16777
17030
|
return (0, import_lib2.$EVENT)(ctx, state2, "Default", Default$0);
|
|
16778
17031
|
}
|
|
16779
|
-
var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17032
|
+
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
17033
|
return { $loc, token: $1 };
|
|
16781
17034
|
});
|
|
16782
17035
|
function Delete(ctx, state2) {
|
|
16783
17036
|
return (0, import_lib2.$EVENT)(ctx, state2, "Delete", Delete$0);
|
|
16784
17037
|
}
|
|
16785
|
-
var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17038
|
+
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
17039
|
return { $loc, token: $1 };
|
|
16787
17040
|
});
|
|
16788
17041
|
function Do(ctx, state2) {
|
|
@@ -16802,20 +17055,20 @@ var Dot$$ = [Dot$0, Dot$1];
|
|
|
16802
17055
|
function Dot(ctx, state2) {
|
|
16803
17056
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Dot", Dot$$);
|
|
16804
17057
|
}
|
|
16805
|
-
var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17058
|
+
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
17059
|
return { $loc, token: $1 };
|
|
16807
17060
|
});
|
|
16808
|
-
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17061
|
+
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
|
|
16809
17062
|
return { $loc, token: ".." };
|
|
16810
17063
|
});
|
|
16811
17064
|
var DotDot$$ = [DotDot$0, DotDot$1];
|
|
16812
17065
|
function DotDot(ctx, state2) {
|
|
16813
17066
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
|
|
16814
17067
|
}
|
|
16815
|
-
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17068
|
+
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
|
|
16816
17069
|
return { $loc, token: $1 };
|
|
16817
17070
|
});
|
|
16818
|
-
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17071
|
+
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
|
|
16819
17072
|
return { $loc, token: "..." };
|
|
16820
17073
|
});
|
|
16821
17074
|
var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
|
|
@@ -16828,31 +17081,31 @@ var InsertDotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Inse
|
|
|
16828
17081
|
function InsertDotDotDot(ctx, state2) {
|
|
16829
17082
|
return (0, import_lib2.$EVENT)(ctx, state2, "InsertDotDotDot", InsertDotDotDot$0);
|
|
16830
17083
|
}
|
|
16831
|
-
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17084
|
+
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
|
|
16832
17085
|
return { $loc, token: $1 };
|
|
16833
17086
|
});
|
|
16834
17087
|
function DoubleColon(ctx, state2) {
|
|
16835
17088
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
|
|
16836
17089
|
}
|
|
16837
|
-
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17090
|
+
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
|
|
16838
17091
|
return { $loc, token: ":" };
|
|
16839
17092
|
});
|
|
16840
17093
|
function DoubleColonAsColon(ctx, state2) {
|
|
16841
17094
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
|
|
16842
17095
|
}
|
|
16843
|
-
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17096
|
+
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L164, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
16844
17097
|
return { $loc, token: $1 };
|
|
16845
17098
|
});
|
|
16846
17099
|
function DoubleQuote(ctx, state2) {
|
|
16847
17100
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
|
|
16848
17101
|
}
|
|
16849
|
-
var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17102
|
+
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
17103
|
return { $loc, token: $1 };
|
|
16851
17104
|
});
|
|
16852
17105
|
function Each(ctx, state2) {
|
|
16853
17106
|
return (0, import_lib2.$EVENT)(ctx, state2, "Each", Each$0);
|
|
16854
17107
|
}
|
|
16855
|
-
var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17108
|
+
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
17109
|
return { $loc, token: $1 };
|
|
16857
17110
|
});
|
|
16858
17111
|
function Else(ctx, state2) {
|
|
@@ -16864,61 +17117,61 @@ var Equals$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L3, 'Equals "="'),
|
|
|
16864
17117
|
function Equals(ctx, state2) {
|
|
16865
17118
|
return (0, import_lib2.$EVENT)(ctx, state2, "Equals", Equals$0);
|
|
16866
17119
|
}
|
|
16867
|
-
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17120
|
+
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L167, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
|
|
16868
17121
|
return { $loc, token: $1 };
|
|
16869
17122
|
});
|
|
16870
17123
|
function ExclamationPoint(ctx, state2) {
|
|
16871
17124
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
|
|
16872
17125
|
}
|
|
16873
|
-
var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17126
|
+
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
17127
|
return { $loc, token: $1 };
|
|
16875
17128
|
});
|
|
16876
17129
|
function Export(ctx, state2) {
|
|
16877
17130
|
return (0, import_lib2.$EVENT)(ctx, state2, "Export", Export$0);
|
|
16878
17131
|
}
|
|
16879
|
-
var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17132
|
+
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
17133
|
return { $loc, token: $1 };
|
|
16881
17134
|
});
|
|
16882
17135
|
function Extends(ctx, state2) {
|
|
16883
17136
|
return (0, import_lib2.$EVENT)(ctx, state2, "Extends", Extends$0);
|
|
16884
17137
|
}
|
|
16885
|
-
var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17138
|
+
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
17139
|
return { $loc, token: $1 };
|
|
16887
17140
|
});
|
|
16888
17141
|
function Finally(ctx, state2) {
|
|
16889
17142
|
return (0, import_lib2.$EVENT)(ctx, state2, "Finally", Finally$0);
|
|
16890
17143
|
}
|
|
16891
|
-
var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17144
|
+
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
17145
|
return { $loc, token: $1 };
|
|
16893
17146
|
});
|
|
16894
17147
|
function For(ctx, state2) {
|
|
16895
17148
|
return (0, import_lib2.$EVENT)(ctx, state2, "For", For$0);
|
|
16896
17149
|
}
|
|
16897
|
-
var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17150
|
+
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
17151
|
return { $loc, token: $1 };
|
|
16899
17152
|
});
|
|
16900
17153
|
function From(ctx, state2) {
|
|
16901
17154
|
return (0, import_lib2.$EVENT)(ctx, state2, "From", From$0);
|
|
16902
17155
|
}
|
|
16903
|
-
var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17156
|
+
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
17157
|
return { $loc, token: $1 };
|
|
16905
17158
|
});
|
|
16906
17159
|
function Function2(ctx, state2) {
|
|
16907
17160
|
return (0, import_lib2.$EVENT)(ctx, state2, "Function", Function$0);
|
|
16908
17161
|
}
|
|
16909
|
-
var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17162
|
+
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
17163
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
16911
17164
|
});
|
|
16912
17165
|
function GetOrSet(ctx, state2) {
|
|
16913
17166
|
return (0, import_lib2.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
|
|
16914
17167
|
}
|
|
16915
|
-
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17168
|
+
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L176, 'Hash "#"'), function($skip, $loc, $0, $1) {
|
|
16916
17169
|
return { $loc, token: $1 };
|
|
16917
17170
|
});
|
|
16918
17171
|
function Hash(ctx, state2) {
|
|
16919
17172
|
return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
|
|
16920
17173
|
}
|
|
16921
|
-
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17174
|
+
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
17175
|
return { $loc, token: $1 };
|
|
16923
17176
|
});
|
|
16924
17177
|
function If(ctx, state2) {
|
|
@@ -16930,67 +17183,67 @@ var Import$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)
|
|
|
16930
17183
|
function Import(ctx, state2) {
|
|
16931
17184
|
return (0, import_lib2.$EVENT)(ctx, state2, "Import", Import$0);
|
|
16932
17185
|
}
|
|
16933
|
-
var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17186
|
+
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
17187
|
return { $loc, token: $1 };
|
|
16935
17188
|
});
|
|
16936
17189
|
function In(ctx, state2) {
|
|
16937
17190
|
return (0, import_lib2.$EVENT)(ctx, state2, "In", In$0);
|
|
16938
17191
|
}
|
|
16939
|
-
var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17192
|
+
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
17193
|
return { $loc, token: $1 };
|
|
16941
17194
|
});
|
|
16942
17195
|
function Infer(ctx, state2) {
|
|
16943
17196
|
return (0, import_lib2.$EVENT)(ctx, state2, "Infer", Infer$0);
|
|
16944
17197
|
}
|
|
16945
|
-
var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17198
|
+
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
17199
|
return { $loc, token: $1 };
|
|
16947
17200
|
});
|
|
16948
17201
|
function LetOrConst(ctx, state2) {
|
|
16949
17202
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
|
|
16950
17203
|
}
|
|
16951
|
-
var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17204
|
+
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
17205
|
return { $loc, token: $1 };
|
|
16953
17206
|
});
|
|
16954
17207
|
function Const(ctx, state2) {
|
|
16955
17208
|
return (0, import_lib2.$EVENT)(ctx, state2, "Const", Const$0);
|
|
16956
17209
|
}
|
|
16957
|
-
var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17210
|
+
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
17211
|
return { $loc, token: $1 };
|
|
16959
17212
|
});
|
|
16960
17213
|
function Is(ctx, state2) {
|
|
16961
17214
|
return (0, import_lib2.$EVENT)(ctx, state2, "Is", Is$0);
|
|
16962
17215
|
}
|
|
16963
|
-
var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17216
|
+
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
17217
|
return { $loc, token: $1 };
|
|
16965
17218
|
});
|
|
16966
17219
|
function LetOrConstOrVar(ctx, state2) {
|
|
16967
17220
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
|
|
16968
17221
|
}
|
|
16969
|
-
var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17222
|
+
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
17223
|
return { $loc, token: $1 };
|
|
16971
17224
|
});
|
|
16972
17225
|
function Like(ctx, state2) {
|
|
16973
17226
|
return (0, import_lib2.$EVENT)(ctx, state2, "Like", Like$0);
|
|
16974
17227
|
}
|
|
16975
|
-
var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17228
|
+
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
17229
|
return { $loc, token: "while" };
|
|
16977
17230
|
});
|
|
16978
17231
|
function Loop(ctx, state2) {
|
|
16979
17232
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loop", Loop$0);
|
|
16980
17233
|
}
|
|
16981
|
-
var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17234
|
+
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
17235
|
return { $loc, token: $1 };
|
|
16983
17236
|
});
|
|
16984
17237
|
function New(ctx, state2) {
|
|
16985
17238
|
return (0, import_lib2.$EVENT)(ctx, state2, "New", New$0);
|
|
16986
17239
|
}
|
|
16987
|
-
var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17240
|
+
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
17241
|
return { $loc, token: "!" };
|
|
16989
17242
|
});
|
|
16990
17243
|
function Not(ctx, state2) {
|
|
16991
17244
|
return (0, import_lib2.$EVENT)(ctx, state2, "Not", Not$0);
|
|
16992
17245
|
}
|
|
16993
|
-
var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17246
|
+
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
17247
|
return { $loc, token: $1 };
|
|
16995
17248
|
});
|
|
16996
17249
|
function Of(ctx, state2) {
|
|
@@ -17008,7 +17261,7 @@ var OpenBrace$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L1, 'OpenBrace
|
|
|
17008
17261
|
function OpenBrace(ctx, state2) {
|
|
17009
17262
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
|
|
17010
17263
|
}
|
|
17011
|
-
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17264
|
+
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L189, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
17012
17265
|
return { $loc, token: $1 };
|
|
17013
17266
|
});
|
|
17014
17267
|
function OpenBracket(ctx, state2) {
|
|
@@ -17020,49 +17273,49 @@ var OpenParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L4, 'OpenParen
|
|
|
17020
17273
|
function OpenParen(ctx, state2) {
|
|
17021
17274
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
|
|
17022
17275
|
}
|
|
17023
|
-
var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17276
|
+
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
17277
|
return { $loc, token: $1 };
|
|
17025
17278
|
});
|
|
17026
17279
|
function Operator(ctx, state2) {
|
|
17027
17280
|
return (0, import_lib2.$EVENT)(ctx, state2, "Operator", Operator$0);
|
|
17028
17281
|
}
|
|
17029
|
-
var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17282
|
+
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
17283
|
return { $loc, token: $1, ts: true };
|
|
17031
17284
|
});
|
|
17032
17285
|
function Override(ctx, state2) {
|
|
17033
17286
|
return (0, import_lib2.$EVENT)(ctx, state2, "Override", Override$0);
|
|
17034
17287
|
}
|
|
17035
|
-
var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17288
|
+
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
17289
|
return { $loc, token: $1 };
|
|
17037
17290
|
});
|
|
17038
17291
|
function Own(ctx, state2) {
|
|
17039
17292
|
return (0, import_lib2.$EVENT)(ctx, state2, "Own", Own$0);
|
|
17040
17293
|
}
|
|
17041
|
-
var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17294
|
+
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
17295
|
return { $loc, token: $1 };
|
|
17043
17296
|
});
|
|
17044
17297
|
function Public(ctx, state2) {
|
|
17045
17298
|
return (0, import_lib2.$EVENT)(ctx, state2, "Public", Public$0);
|
|
17046
17299
|
}
|
|
17047
|
-
var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17300
|
+
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
17301
|
return { $loc, token: $1 };
|
|
17049
17302
|
});
|
|
17050
17303
|
function Private(ctx, state2) {
|
|
17051
17304
|
return (0, import_lib2.$EVENT)(ctx, state2, "Private", Private$0);
|
|
17052
17305
|
}
|
|
17053
|
-
var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17306
|
+
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
17307
|
return { $loc, token: $1 };
|
|
17055
17308
|
});
|
|
17056
17309
|
function Protected(ctx, state2) {
|
|
17057
17310
|
return (0, import_lib2.$EVENT)(ctx, state2, "Protected", Protected$0);
|
|
17058
17311
|
}
|
|
17059
|
-
var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17312
|
+
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
17313
|
return { $loc, token: "||>" };
|
|
17061
17314
|
});
|
|
17062
|
-
var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17315
|
+
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
17316
|
return { $loc, token: "|>=" };
|
|
17064
17317
|
});
|
|
17065
|
-
var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17318
|
+
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
17319
|
return { $loc, token: "|>" };
|
|
17067
17320
|
});
|
|
17068
17321
|
var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
|
|
@@ -17075,19 +17328,19 @@ var QuestionMark$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L6, 'Questio
|
|
|
17075
17328
|
function QuestionMark(ctx, state2) {
|
|
17076
17329
|
return (0, import_lib2.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
|
|
17077
17330
|
}
|
|
17078
|
-
var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17331
|
+
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
17332
|
return { $loc, token: $1, ts: true };
|
|
17080
17333
|
});
|
|
17081
17334
|
function Readonly(ctx, state2) {
|
|
17082
17335
|
return (0, import_lib2.$EVENT)(ctx, state2, "Readonly", Readonly$0);
|
|
17083
17336
|
}
|
|
17084
|
-
var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17337
|
+
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
17338
|
return { $loc, token: $1 };
|
|
17086
17339
|
});
|
|
17087
17340
|
function Return(ctx, state2) {
|
|
17088
17341
|
return (0, import_lib2.$EVENT)(ctx, state2, "Return", Return$0);
|
|
17089
17342
|
}
|
|
17090
|
-
var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17343
|
+
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
17344
|
return { $loc, token: $1 };
|
|
17092
17345
|
});
|
|
17093
17346
|
function Satisfies(ctx, state2) {
|
|
@@ -17099,7 +17352,7 @@ var Semicolon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L119, 'Semicolo
|
|
|
17099
17352
|
function Semicolon(ctx, state2) {
|
|
17100
17353
|
return (0, import_lib2.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
|
|
17101
17354
|
}
|
|
17102
|
-
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17355
|
+
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L205, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
17103
17356
|
return { $loc, token: $1 };
|
|
17104
17357
|
});
|
|
17105
17358
|
function SingleQuote(ctx, state2) {
|
|
@@ -17111,149 +17364,149 @@ var Star$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L75, 'Star "*"'), fu
|
|
|
17111
17364
|
function Star(ctx, state2) {
|
|
17112
17365
|
return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
|
|
17113
17366
|
}
|
|
17114
|
-
var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17367
|
+
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
17368
|
return { $loc, token: $1 };
|
|
17116
17369
|
});
|
|
17117
|
-
var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17370
|
+
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
17371
|
return { $loc, token: "static " };
|
|
17119
17372
|
});
|
|
17120
17373
|
var Static$$ = [Static$0, Static$1];
|
|
17121
17374
|
function Static(ctx, state2) {
|
|
17122
17375
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Static", Static$$);
|
|
17123
17376
|
}
|
|
17124
|
-
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17377
|
+
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L207, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
17125
17378
|
return { $loc, token: $1 };
|
|
17126
17379
|
});
|
|
17127
17380
|
function SubstitutionStart(ctx, state2) {
|
|
17128
17381
|
return (0, import_lib2.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
|
|
17129
17382
|
}
|
|
17130
|
-
var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17383
|
+
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
17384
|
return { $loc, token: $1 };
|
|
17132
17385
|
});
|
|
17133
17386
|
function Super(ctx, state2) {
|
|
17134
17387
|
return (0, import_lib2.$EVENT)(ctx, state2, "Super", Super$0);
|
|
17135
17388
|
}
|
|
17136
|
-
var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17389
|
+
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
17390
|
return { $loc, token: $1 };
|
|
17138
17391
|
});
|
|
17139
17392
|
function Switch(ctx, state2) {
|
|
17140
17393
|
return (0, import_lib2.$EVENT)(ctx, state2, "Switch", Switch$0);
|
|
17141
17394
|
}
|
|
17142
|
-
var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17395
|
+
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
17396
|
return { $loc, token: $1 };
|
|
17144
17397
|
});
|
|
17145
17398
|
function Target(ctx, state2) {
|
|
17146
17399
|
return (0, import_lib2.$EVENT)(ctx, state2, "Target", Target$0);
|
|
17147
17400
|
}
|
|
17148
|
-
var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
17401
|
+
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
17402
|
return { $loc, token: "" };
|
|
17150
17403
|
});
|
|
17151
17404
|
function Then(ctx, state2) {
|
|
17152
17405
|
return (0, import_lib2.$EVENT)(ctx, state2, "Then", Then$0);
|
|
17153
17406
|
}
|
|
17154
|
-
var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17407
|
+
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
17408
|
return { $loc, token: $1 };
|
|
17156
17409
|
});
|
|
17157
17410
|
function This(ctx, state2) {
|
|
17158
17411
|
return (0, import_lib2.$EVENT)(ctx, state2, "This", This$0);
|
|
17159
17412
|
}
|
|
17160
|
-
var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17413
|
+
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
17414
|
return { $loc, token: $1 };
|
|
17162
17415
|
});
|
|
17163
17416
|
function Throw(ctx, state2) {
|
|
17164
17417
|
return (0, import_lib2.$EVENT)(ctx, state2, "Throw", Throw$0);
|
|
17165
17418
|
}
|
|
17166
|
-
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17419
|
+
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
17167
17420
|
return { $loc, token: "`" };
|
|
17168
17421
|
});
|
|
17169
17422
|
function TripleDoubleQuote(ctx, state2) {
|
|
17170
17423
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
|
|
17171
17424
|
}
|
|
17172
|
-
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17425
|
+
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
17173
17426
|
return { $loc, token: "`" };
|
|
17174
17427
|
});
|
|
17175
17428
|
function TripleSingleQuote(ctx, state2) {
|
|
17176
17429
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
|
|
17177
17430
|
}
|
|
17178
|
-
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17431
|
+
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
17179
17432
|
return { $loc, token: "/" };
|
|
17180
17433
|
});
|
|
17181
17434
|
function TripleSlash(ctx, state2) {
|
|
17182
17435
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
|
|
17183
17436
|
}
|
|
17184
|
-
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17437
|
+
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L217, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
17185
17438
|
return { $loc, token: "`" };
|
|
17186
17439
|
});
|
|
17187
17440
|
function TripleTick(ctx, state2) {
|
|
17188
17441
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
|
|
17189
17442
|
}
|
|
17190
|
-
var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17443
|
+
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
17444
|
return { $loc, token: $1 };
|
|
17192
17445
|
});
|
|
17193
17446
|
function Try(ctx, state2) {
|
|
17194
17447
|
return (0, import_lib2.$EVENT)(ctx, state2, "Try", Try$0);
|
|
17195
17448
|
}
|
|
17196
|
-
var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17449
|
+
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
17450
|
return { $loc, token: $1 };
|
|
17198
17451
|
});
|
|
17199
17452
|
function Typeof(ctx, state2) {
|
|
17200
17453
|
return (0, import_lib2.$EVENT)(ctx, state2, "Typeof", Typeof$0);
|
|
17201
17454
|
}
|
|
17202
|
-
var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17455
|
+
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
17456
|
return { $loc, token: $1 };
|
|
17204
17457
|
});
|
|
17205
17458
|
function Undefined(ctx, state2) {
|
|
17206
17459
|
return (0, import_lib2.$EVENT)(ctx, state2, "Undefined", Undefined$0);
|
|
17207
17460
|
}
|
|
17208
|
-
var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17461
|
+
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
17462
|
return { $loc, token: $1, negated: true };
|
|
17210
17463
|
});
|
|
17211
17464
|
function Unless(ctx, state2) {
|
|
17212
17465
|
return (0, import_lib2.$EVENT)(ctx, state2, "Unless", Unless$0);
|
|
17213
17466
|
}
|
|
17214
|
-
var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17467
|
+
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
17468
|
return { $loc, token: $1, negated: true };
|
|
17216
17469
|
});
|
|
17217
17470
|
function Until(ctx, state2) {
|
|
17218
17471
|
return (0, import_lib2.$EVENT)(ctx, state2, "Until", Until$0);
|
|
17219
17472
|
}
|
|
17220
|
-
var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17473
|
+
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
17474
|
return { $loc, token: $1 };
|
|
17222
17475
|
});
|
|
17223
17476
|
function Using(ctx, state2) {
|
|
17224
17477
|
return (0, import_lib2.$EVENT)(ctx, state2, "Using", Using$0);
|
|
17225
17478
|
}
|
|
17226
|
-
var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17479
|
+
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
17480
|
return { $loc, token: $1 };
|
|
17228
17481
|
});
|
|
17229
17482
|
function Var(ctx, state2) {
|
|
17230
17483
|
return (0, import_lib2.$EVENT)(ctx, state2, "Var", Var$0);
|
|
17231
17484
|
}
|
|
17232
|
-
var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17485
|
+
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
17486
|
return { $loc, token: $1 };
|
|
17234
17487
|
});
|
|
17235
17488
|
function Void(ctx, state2) {
|
|
17236
17489
|
return (0, import_lib2.$EVENT)(ctx, state2, "Void", Void$0);
|
|
17237
17490
|
}
|
|
17238
|
-
var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17491
|
+
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
17492
|
return { $loc, token: "case" };
|
|
17240
17493
|
});
|
|
17241
17494
|
function When(ctx, state2) {
|
|
17242
17495
|
return (0, import_lib2.$EVENT)(ctx, state2, "When", When$0);
|
|
17243
17496
|
}
|
|
17244
|
-
var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17497
|
+
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
17498
|
return { $loc, token: $1 };
|
|
17246
17499
|
});
|
|
17247
17500
|
function While(ctx, state2) {
|
|
17248
17501
|
return (0, import_lib2.$EVENT)(ctx, state2, "While", While$0);
|
|
17249
17502
|
}
|
|
17250
|
-
var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17503
|
+
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
17504
|
return { $loc, token: $1 };
|
|
17252
17505
|
});
|
|
17253
17506
|
function With(ctx, state2) {
|
|
17254
17507
|
return (0, import_lib2.$EVENT)(ctx, state2, "With", With$0);
|
|
17255
17508
|
}
|
|
17256
|
-
var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17509
|
+
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
17510
|
return { $loc, token: $1, type: "Yield" };
|
|
17258
17511
|
});
|
|
17259
17512
|
function Yield(ctx, state2) {
|
|
@@ -17332,7 +17585,7 @@ var JSXElement$$ = [JSXElement$0, JSXElement$1, JSXElement$2];
|
|
|
17332
17585
|
function JSXElement(ctx, state2) {
|
|
17333
17586
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
|
|
17334
17587
|
}
|
|
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)($
|
|
17588
|
+
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
17589
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
17337
17590
|
});
|
|
17338
17591
|
function JSXSelfClosingElement(ctx, state2) {
|
|
@@ -17366,7 +17619,7 @@ var JSXOptionalClosingElement$$ = [JSXOptionalClosingElement$0, JSXOptionalClosi
|
|
|
17366
17619
|
function JSXOptionalClosingElement(ctx, state2) {
|
|
17367
17620
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
|
|
17368
17621
|
}
|
|
17369
|
-
var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17622
|
+
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
17623
|
function JSXClosingElement(ctx, state2) {
|
|
17371
17624
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
|
|
17372
17625
|
}
|
|
@@ -17387,7 +17640,7 @@ var JSXFragment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)
|
|
|
17387
17640
|
];
|
|
17388
17641
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
17389
17642
|
});
|
|
17390
|
-
var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($
|
|
17643
|
+
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
17644
|
var children = $3;
|
|
17392
17645
|
$0 = $0.slice(1);
|
|
17393
17646
|
return {
|
|
@@ -17400,7 +17653,7 @@ var JSXFragment$$ = [JSXFragment$0, JSXFragment$1];
|
|
|
17400
17653
|
function JSXFragment(ctx, state2) {
|
|
17401
17654
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
|
|
17402
17655
|
}
|
|
17403
|
-
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17656
|
+
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L230, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
17404
17657
|
state.JSXTagStack.push("");
|
|
17405
17658
|
return $1;
|
|
17406
17659
|
});
|
|
@@ -17417,11 +17670,11 @@ var JSXOptionalClosingFragment$$ = [JSXOptionalClosingFragment$0, JSXOptionalClo
|
|
|
17417
17670
|
function JSXOptionalClosingFragment(ctx, state2) {
|
|
17418
17671
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
|
|
17419
17672
|
}
|
|
17420
|
-
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($
|
|
17673
|
+
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L231, 'JSXClosingFragment "</>"');
|
|
17421
17674
|
function JSXClosingFragment(ctx, state2) {
|
|
17422
17675
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
|
|
17423
17676
|
}
|
|
17424
|
-
var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17677
|
+
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
17678
|
return config.defaultElement;
|
|
17426
17679
|
});
|
|
17427
17680
|
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 +17855,7 @@ var JSXAttribute$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(Identifier, (0, im
|
|
|
17602
17855
|
}
|
|
17603
17856
|
return $skip;
|
|
17604
17857
|
});
|
|
17605
|
-
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17858
|
+
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
17859
|
return [" ", "id=", $2];
|
|
17607
17860
|
});
|
|
17608
17861
|
var JSXAttribute$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
@@ -17643,17 +17896,13 @@ var JSXAttributeName$$ = [JSXAttributeName$0, JSXAttributeName$1];
|
|
|
17643
17896
|
function JSXAttributeName(ctx, state2) {
|
|
17644
17897
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXAttributeName", JSXAttributeName$$);
|
|
17645
17898
|
}
|
|
17646
|
-
var JSXAttributeInitializer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeJSXEnabled), (0, import_lib2.$E)(Whitespace), Equals, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$Q)(NonNewlineWhitespace), EOL)), InsertInlineOpenBrace,
|
|
17899
|
+
var JSXAttributeInitializer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeJSXEnabled), (0, import_lib2.$E)(Whitespace), Equals, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$Q)(NonNewlineWhitespace), EOL)), InsertInlineOpenBrace, NestedPostfixedExpressionNoTrailing, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
|
|
17647
17900
|
var ws1 = $2;
|
|
17648
17901
|
var equals = $3;
|
|
17649
|
-
var ws2 = $4;
|
|
17650
17902
|
var open = $5;
|
|
17651
|
-
var
|
|
17652
|
-
var
|
|
17653
|
-
|
|
17654
|
-
if (!expression)
|
|
17655
|
-
return $skip;
|
|
17656
|
-
return [ws1, equals, ws2, open, indent, expression, close];
|
|
17903
|
+
var expression = $6;
|
|
17904
|
+
var close = $7;
|
|
17905
|
+
return [ws1, equals, open, trimFirstSpace(expression), close];
|
|
17657
17906
|
});
|
|
17658
17907
|
var JSXAttributeInitializer$1 = (0, import_lib2.$S)((0, import_lib2.$E)(Whitespace), Equals, (0, import_lib2.$E)(Whitespace), JSXAttributeValue);
|
|
17659
17908
|
var JSXAttributeInitializer$$ = [JSXAttributeInitializer$0, JSXAttributeInitializer$1];
|
|
@@ -17947,7 +18196,7 @@ var JSXChildGeneral$$ = [JSXChildGeneral$0, JSXChildGeneral$1, JSXChildGeneral$2
|
|
|
17947
18196
|
function JSXChildGeneral(ctx, state2) {
|
|
17948
18197
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
|
|
17949
18198
|
}
|
|
17950
|
-
var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18199
|
+
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
18200
|
return ["{/*", $2, "*/}"];
|
|
17952
18201
|
});
|
|
17953
18202
|
function JSXComment(ctx, state2) {
|
|
@@ -18235,37 +18484,37 @@ var InterfaceExtendsTarget$0 = ImplementsTarget;
|
|
|
18235
18484
|
function InterfaceExtendsTarget(ctx, state2) {
|
|
18236
18485
|
return (0, import_lib2.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
|
|
18237
18486
|
}
|
|
18238
|
-
var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18487
|
+
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
18488
|
return { $loc, token: $1 };
|
|
18240
18489
|
});
|
|
18241
18490
|
function TypeKeyword(ctx, state2) {
|
|
18242
18491
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
|
|
18243
18492
|
}
|
|
18244
|
-
var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18493
|
+
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
18494
|
return { $loc, token: $1 };
|
|
18246
18495
|
});
|
|
18247
18496
|
function Enum(ctx, state2) {
|
|
18248
18497
|
return (0, import_lib2.$EVENT)(ctx, state2, "Enum", Enum$0);
|
|
18249
18498
|
}
|
|
18250
|
-
var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18499
|
+
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
18500
|
return { $loc, token: $1 };
|
|
18252
18501
|
});
|
|
18253
18502
|
function Interface(ctx, state2) {
|
|
18254
18503
|
return (0, import_lib2.$EVENT)(ctx, state2, "Interface", Interface$0);
|
|
18255
18504
|
}
|
|
18256
|
-
var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18505
|
+
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
18506
|
return { $loc, token: $1 };
|
|
18258
18507
|
});
|
|
18259
18508
|
function Global(ctx, state2) {
|
|
18260
18509
|
return (0, import_lib2.$EVENT)(ctx, state2, "Global", Global$0);
|
|
18261
18510
|
}
|
|
18262
|
-
var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18511
|
+
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
18512
|
return { $loc, token: $1 };
|
|
18264
18513
|
});
|
|
18265
18514
|
function Module(ctx, state2) {
|
|
18266
18515
|
return (0, import_lib2.$EVENT)(ctx, state2, "Module", Module$0);
|
|
18267
18516
|
}
|
|
18268
|
-
var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18517
|
+
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
18518
|
return { $loc, token: $1 };
|
|
18270
18519
|
});
|
|
18271
18520
|
function Namespace(ctx, state2) {
|
|
@@ -18579,7 +18828,7 @@ var ReturnTypeSuffix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib
|
|
|
18579
18828
|
function ReturnTypeSuffix(ctx, state2) {
|
|
18580
18829
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
|
|
18581
18830
|
}
|
|
18582
|
-
var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
18831
|
+
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
18832
|
var asserts = $1;
|
|
18584
18833
|
var t = $3;
|
|
18585
18834
|
if (!t)
|
|
@@ -18680,8 +18929,8 @@ var TypeUnarySuffix$$ = [TypeUnarySuffix$0, TypeUnarySuffix$1, TypeUnarySuffix$2
|
|
|
18680
18929
|
function TypeUnarySuffix(ctx, state2) {
|
|
18681
18930
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
|
|
18682
18931
|
}
|
|
18683
|
-
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18684
|
-
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18932
|
+
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L241, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
18933
|
+
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
18685
18934
|
var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
|
|
18686
18935
|
function TypeUnaryOp(ctx, state2) {
|
|
18687
18936
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
|
|
@@ -18711,7 +18960,7 @@ var TypeIndexedAccess$$ = [TypeIndexedAccess$0, TypeIndexedAccess$1, TypeIndexed
|
|
|
18711
18960
|
function TypeIndexedAccess(ctx, state2) {
|
|
18712
18961
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
|
|
18713
18962
|
}
|
|
18714
|
-
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
18963
|
+
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L242, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
|
|
18715
18964
|
return { $loc, token: "unknown" };
|
|
18716
18965
|
});
|
|
18717
18966
|
function UnknownAlias(ctx, state2) {
|
|
@@ -19104,13 +19353,13 @@ var TypeLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EX
|
|
|
19104
19353
|
return num;
|
|
19105
19354
|
return $0;
|
|
19106
19355
|
});
|
|
19107
|
-
var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19356
|
+
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
19357
|
return { type: "VoidType", $loc, token: $1 };
|
|
19109
19358
|
});
|
|
19110
|
-
var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19359
|
+
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
19360
|
return { type: "UniqueSymbolType", children: $0 };
|
|
19112
19361
|
});
|
|
19113
|
-
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
19362
|
+
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L245, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
19114
19363
|
return { $loc, token: "[]" };
|
|
19115
19364
|
});
|
|
19116
19365
|
var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
|
|
@@ -19129,7 +19378,7 @@ var InlineInterfacePropertyDelimiter$0 = (0, import_lib2.$C)((0, import_lib2.$S)
|
|
|
19129
19378
|
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
19379
|
return value[1];
|
|
19131
19380
|
});
|
|
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)($
|
|
19381
|
+
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
19382
|
var InlineInterfacePropertyDelimiter$3 = (0, import_lib2.$Y)(EOS);
|
|
19134
19383
|
var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
|
|
19135
19384
|
function InlineInterfacePropertyDelimiter(ctx, state2) {
|
|
@@ -19195,14 +19444,17 @@ function TypeFunctionArrow(ctx, state2) {
|
|
|
19195
19444
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeFunctionArrow", TypeFunctionArrow$0);
|
|
19196
19445
|
}
|
|
19197
19446
|
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) {
|
|
19447
|
+
var open = $1;
|
|
19198
19448
|
var args = $2;
|
|
19199
|
-
|
|
19449
|
+
var ws = $3;
|
|
19450
|
+
var close = $4;
|
|
19451
|
+
args = args.flatMap(([ws2, [arg, delim]]) => [prepend(ws2, arg), delim]);
|
|
19200
19452
|
args.pop();
|
|
19201
19453
|
return {
|
|
19202
19454
|
type: "TypeArguments",
|
|
19203
19455
|
ts: true,
|
|
19204
19456
|
args,
|
|
19205
|
-
children:
|
|
19457
|
+
children: [open, args, ws, close]
|
|
19206
19458
|
};
|
|
19207
19459
|
});
|
|
19208
19460
|
function TypeArguments(ctx, state2) {
|
|
@@ -19368,7 +19620,7 @@ var CivetPrologue$$ = [CivetPrologue$0, CivetPrologue$1];
|
|
|
19368
19620
|
function CivetPrologue(ctx, state2) {
|
|
19369
19621
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
|
|
19370
19622
|
}
|
|
19371
|
-
var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19623
|
+
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
19624
|
var options = $3;
|
|
19373
19625
|
return {
|
|
19374
19626
|
type: "CivetPrologue",
|