@danielx/civet 0.8.14 → 0.8.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +1 -1
- package/dist/browser.js +936 -697
- package/dist/config.js +1 -7253
- package/dist/config.mjs +1 -7276
- package/dist/main.js +936 -697
- package/dist/main.mjs +936 -697
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -28,9 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
mod
|
|
29
29
|
));
|
|
30
30
|
|
|
31
|
-
// node_modules
|
|
31
|
+
// node_modules/@danielx/hera/dist/machine.js
|
|
32
32
|
var require_machine = __commonJS({
|
|
33
|
-
"node_modules
|
|
33
|
+
"node_modules/@danielx/hera/dist/machine.js"(exports, module) {
|
|
34
34
|
"use strict";
|
|
35
35
|
var __defProp2 = Object.defineProperty;
|
|
36
36
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -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;
|
|
@@ -790,18 +826,31 @@ function insertTrimmingSpace(target, c) {
|
|
|
790
826
|
if (target.length === 0) {
|
|
791
827
|
return c;
|
|
792
828
|
}
|
|
793
|
-
|
|
829
|
+
const results = [];
|
|
830
|
+
for (let i3 = 0, len3 = target.length; i3 < len3; i3++) {
|
|
831
|
+
const i = i3;
|
|
832
|
+
const e = target[i3];
|
|
794
833
|
if (i === 0) {
|
|
795
|
-
|
|
834
|
+
results.push(insertTrimmingSpace(e, c));
|
|
796
835
|
} else {
|
|
797
|
-
|
|
836
|
+
results.push(e);
|
|
798
837
|
}
|
|
799
|
-
}
|
|
838
|
+
}
|
|
839
|
+
;
|
|
840
|
+
return results;
|
|
800
841
|
} else if (isParent(target)) {
|
|
801
|
-
|
|
842
|
+
const oldChildren = target.children;
|
|
843
|
+
target = {
|
|
802
844
|
...target,
|
|
803
845
|
children: insertTrimmingSpace(target.children, c)
|
|
804
846
|
};
|
|
847
|
+
for (const key in target) {
|
|
848
|
+
const i = oldChildren.indexOf(target[key]);
|
|
849
|
+
if (i >= 0) {
|
|
850
|
+
target[key] = target.children[i];
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
return target;
|
|
805
854
|
} else if (isToken(target)) {
|
|
806
855
|
return {
|
|
807
856
|
...target,
|
|
@@ -897,7 +946,7 @@ function literalValue(literal) {
|
|
|
897
946
|
case "false":
|
|
898
947
|
return false;
|
|
899
948
|
}
|
|
900
|
-
let
|
|
949
|
+
let ref6;
|
|
901
950
|
switch (literal.subtype) {
|
|
902
951
|
case "StringLiteral": {
|
|
903
952
|
assert.equal(
|
|
@@ -913,8 +962,8 @@ function literalValue(literal) {
|
|
|
913
962
|
return BigInt(raw.slice(0, -1));
|
|
914
963
|
} else if (raw.match(/[\.eE]/)) {
|
|
915
964
|
return parseFloat(raw);
|
|
916
|
-
} else if ((
|
|
917
|
-
const [, base] =
|
|
965
|
+
} else if ((ref6 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref6) && len(ref6, 2)) {
|
|
966
|
+
const [, base] = ref6;
|
|
918
967
|
switch (base.toLowerCase()) {
|
|
919
968
|
case "x":
|
|
920
969
|
return parseInt(raw.replace(/0[xX]/, ""), 16);
|
|
@@ -976,8 +1025,8 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
|
|
|
976
1025
|
return void 0;
|
|
977
1026
|
}
|
|
978
1027
|
if (Array.isArray(node)) {
|
|
979
|
-
for (let
|
|
980
|
-
const child = node[
|
|
1028
|
+
for (let i4 = 0, len4 = node.length; i4 < len4; i4++) {
|
|
1029
|
+
const child = node[i4];
|
|
981
1030
|
if (skip(child)) {
|
|
982
1031
|
continue;
|
|
983
1032
|
}
|
|
@@ -994,16 +1043,16 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
|
|
|
994
1043
|
return startsWithPredicate(node.children, predicate);
|
|
995
1044
|
}
|
|
996
1045
|
function hasAwait(exp) {
|
|
997
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1046
|
+
return gatherRecursiveWithinFunction(exp, ($2) => $2.type === "Await").length > 0;
|
|
998
1047
|
}
|
|
999
1048
|
function hasYield(exp) {
|
|
1000
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1049
|
+
return gatherRecursiveWithinFunction(exp, ($3) => $3.type === "Yield").length > 0;
|
|
1001
1050
|
}
|
|
1002
1051
|
function hasImportDeclaration(exp) {
|
|
1003
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1052
|
+
return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ImportDeclaration").length > 0;
|
|
1004
1053
|
}
|
|
1005
1054
|
function hasExportDeclaration(exp) {
|
|
1006
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1055
|
+
return gatherRecursiveWithinFunction(exp, ($5) => $5.type === "ExportDeclaration").length > 0;
|
|
1007
1056
|
}
|
|
1008
1057
|
function deepCopy(root) {
|
|
1009
1058
|
const copied = /* @__PURE__ */ new Map();
|
|
@@ -1016,9 +1065,9 @@ function deepCopy(root) {
|
|
|
1016
1065
|
if (Array.isArray(node)) {
|
|
1017
1066
|
const array = new Array(node.length);
|
|
1018
1067
|
copied.set(node, array);
|
|
1019
|
-
for (let
|
|
1020
|
-
const i =
|
|
1021
|
-
const item = node[
|
|
1068
|
+
for (let i5 = 0, len5 = node.length; i5 < len5; i5++) {
|
|
1069
|
+
const i = i5;
|
|
1070
|
+
const item = node[i5];
|
|
1022
1071
|
array[i] = recurse(item);
|
|
1023
1072
|
}
|
|
1024
1073
|
} else if (node?.type === "Ref") {
|
|
@@ -1045,9 +1094,9 @@ function replaceNode(node, newNode, parent) {
|
|
|
1045
1094
|
throw new Error("replaceNode failed: node has no parent");
|
|
1046
1095
|
}
|
|
1047
1096
|
function recurse(children) {
|
|
1048
|
-
for (let
|
|
1049
|
-
const i =
|
|
1050
|
-
const child = children[
|
|
1097
|
+
for (let i6 = 0, len6 = children.length; i6 < len6; i6++) {
|
|
1098
|
+
const i = i6;
|
|
1099
|
+
const child = children[i6];
|
|
1051
1100
|
if (child === node) {
|
|
1052
1101
|
children[i] = newNode;
|
|
1053
1102
|
return true;
|
|
@@ -1084,9 +1133,9 @@ function replaceNodes(root, predicate, replacer) {
|
|
|
1084
1133
|
return root;
|
|
1085
1134
|
}
|
|
1086
1135
|
}
|
|
1087
|
-
for (let
|
|
1088
|
-
const i =
|
|
1089
|
-
const node = array[
|
|
1136
|
+
for (let i7 = 0, len7 = array.length; i7 < len7; i7++) {
|
|
1137
|
+
const i = i7;
|
|
1138
|
+
const node = array[i7];
|
|
1090
1139
|
if (!(node != null)) {
|
|
1091
1140
|
return;
|
|
1092
1141
|
}
|
|
@@ -1148,7 +1197,7 @@ function makeLeftHandSideExpression(expression) {
|
|
|
1148
1197
|
if (skipParens.has(expression.type)) {
|
|
1149
1198
|
return expression;
|
|
1150
1199
|
}
|
|
1151
|
-
if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($
|
|
1200
|
+
if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($6) => $6.type === "ObjectExpression")) {
|
|
1152
1201
|
return expression;
|
|
1153
1202
|
}
|
|
1154
1203
|
}
|
|
@@ -1163,7 +1212,7 @@ function parenthesizeExpression(expression) {
|
|
|
1163
1212
|
});
|
|
1164
1213
|
}
|
|
1165
1214
|
function checkValidLHS(node) {
|
|
1166
|
-
let
|
|
1215
|
+
let ref7;
|
|
1167
1216
|
switch (node?.type) {
|
|
1168
1217
|
case "UnaryExpression": {
|
|
1169
1218
|
node.children.unshift({
|
|
@@ -1173,7 +1222,7 @@ function checkValidLHS(node) {
|
|
|
1173
1222
|
return true;
|
|
1174
1223
|
}
|
|
1175
1224
|
case "CallExpression": {
|
|
1176
|
-
const lastType = (
|
|
1225
|
+
const lastType = (ref7 = node.children)[ref7.length - 1]?.type;
|
|
1177
1226
|
switch (lastType) {
|
|
1178
1227
|
case "PropertyAccess":
|
|
1179
1228
|
case "SliceExpression":
|
|
@@ -1210,8 +1259,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1210
1259
|
return;
|
|
1211
1260
|
}
|
|
1212
1261
|
if (Array.isArray(node)) {
|
|
1213
|
-
for (let
|
|
1214
|
-
const child = node[
|
|
1262
|
+
for (let i8 = 0, len8 = node.length; i8 < len8; i8++) {
|
|
1263
|
+
const child = node[i8];
|
|
1215
1264
|
updateParentPointers(child, parent, depth);
|
|
1216
1265
|
}
|
|
1217
1266
|
return;
|
|
@@ -1221,8 +1270,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1221
1270
|
node.parent = parent;
|
|
1222
1271
|
}
|
|
1223
1272
|
if (depth && isParent(node)) {
|
|
1224
|
-
for (let
|
|
1225
|
-
const child =
|
|
1273
|
+
for (let ref8 = node.children, i9 = 0, len9 = ref8.length; i9 < len9; i9++) {
|
|
1274
|
+
const child = ref8[i9];
|
|
1226
1275
|
updateParentPointers(child, node, depth - 1);
|
|
1227
1276
|
}
|
|
1228
1277
|
}
|
|
@@ -1270,11 +1319,11 @@ function convertOptionalType(suffix) {
|
|
|
1270
1319
|
const wrap = suffix.type === "ReturnTypeAnnotation";
|
|
1271
1320
|
spliceChild(suffix, suffix.t, 1, suffix.t = [
|
|
1272
1321
|
getTrimmingSpace(suffix.t),
|
|
1273
|
-
wrap
|
|
1322
|
+
wrap ? "(" : void 0,
|
|
1274
1323
|
// TODO: avoid parens if unnecessary
|
|
1275
1324
|
"undefined | ",
|
|
1276
|
-
parenthesizeType(
|
|
1277
|
-
wrap
|
|
1325
|
+
parenthesizeType(trimFirstSpace(suffix.t)),
|
|
1326
|
+
wrap ? ")" : void 0
|
|
1278
1327
|
]);
|
|
1279
1328
|
}
|
|
1280
1329
|
var typeNeedsNoParens = /* @__PURE__ */ new Set([
|
|
@@ -1288,7 +1337,11 @@ function parenthesizeType(type) {
|
|
|
1288
1337
|
if (typeNeedsNoParens.has(type.type)) {
|
|
1289
1338
|
return type;
|
|
1290
1339
|
}
|
|
1291
|
-
return
|
|
1340
|
+
return makeNode({
|
|
1341
|
+
type: "TypeParenthesized",
|
|
1342
|
+
ts: true,
|
|
1343
|
+
children: ["(", type, ")"]
|
|
1344
|
+
});
|
|
1292
1345
|
}
|
|
1293
1346
|
function wrapIIFE(expressions, asyncFlag, generator) {
|
|
1294
1347
|
let awaitPrefix;
|
|
@@ -1359,8 +1412,8 @@ function wrapIIFE(expressions, asyncFlag, generator) {
|
|
|
1359
1412
|
children.splice(1, 0, ".bind(this)");
|
|
1360
1413
|
}
|
|
1361
1414
|
if (gatherRecursiveWithinFunction(block, (a2) => typeof a2 === "object" && a2 != null && "token" in a2 && a2.token === "arguments").length) {
|
|
1362
|
-
let
|
|
1363
|
-
children[children.length - 1] = (
|
|
1415
|
+
let ref9;
|
|
1416
|
+
children[children.length - 1] = (ref9 = parameters.children)[ref9.length - 1] = "(arguments)";
|
|
1364
1417
|
}
|
|
1365
1418
|
}
|
|
1366
1419
|
let exp = makeNode({
|
|
@@ -1387,20 +1440,23 @@ function wrapIIFE(expressions, asyncFlag, generator) {
|
|
|
1387
1440
|
}
|
|
1388
1441
|
return exp;
|
|
1389
1442
|
}
|
|
1390
|
-
function wrapWithReturn(expression) {
|
|
1443
|
+
function wrapWithReturn(expression, parent = expression?.parent, semi = false) {
|
|
1391
1444
|
const children = expression ? ["return ", expression] : ["return"];
|
|
1445
|
+
if (semi) {
|
|
1446
|
+
children.unshift(";");
|
|
1447
|
+
}
|
|
1392
1448
|
return makeNode({
|
|
1393
1449
|
type: "ReturnStatement",
|
|
1394
1450
|
children,
|
|
1395
1451
|
expression,
|
|
1396
|
-
parent
|
|
1452
|
+
parent
|
|
1397
1453
|
});
|
|
1398
1454
|
}
|
|
1399
1455
|
function flatJoin(array, separator) {
|
|
1400
1456
|
const result = [];
|
|
1401
|
-
for (let
|
|
1402
|
-
const i =
|
|
1403
|
-
const items = array[
|
|
1457
|
+
for (let i10 = 0, len10 = array.length; i10 < len10; i10++) {
|
|
1458
|
+
const i = i10;
|
|
1459
|
+
const items = array[i10];
|
|
1404
1460
|
if (i) {
|
|
1405
1461
|
result.push(separator);
|
|
1406
1462
|
}
|
|
@@ -1635,9 +1691,11 @@ function adjustBindingElements(elements) {
|
|
|
1635
1691
|
if (l) {
|
|
1636
1692
|
if (arrayElementHasTrailingComma(after[l - 1]))
|
|
1637
1693
|
l++;
|
|
1694
|
+
const elements2 = trimFirstSpace(after);
|
|
1638
1695
|
blockPrefix = {
|
|
1639
1696
|
type: "PostRestBindingElements",
|
|
1640
|
-
|
|
1697
|
+
elements: elements2,
|
|
1698
|
+
children: ["[", elements2, "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
|
|
1641
1699
|
names: after.flatMap((p) => p.names)
|
|
1642
1700
|
};
|
|
1643
1701
|
}
|
|
@@ -1972,7 +2030,7 @@ var declareHelper = {
|
|
|
1972
2030
|
AutoPromise(ref) {
|
|
1973
2031
|
state.prelude.push([
|
|
1974
2032
|
"",
|
|
1975
|
-
ts(["type ", ref, "<T> =
|
|
2033
|
+
ts(["type ", ref, "<T> = Promise<Awaited<T>>"]),
|
|
1976
2034
|
";\n"
|
|
1977
2035
|
]);
|
|
1978
2036
|
},
|
|
@@ -2641,14 +2699,10 @@ function processReturnValue(func) {
|
|
|
2641
2699
|
let ref1;
|
|
2642
2700
|
if (!((ref1 = block.children)[ref1.length - 2]?.type === "ReturnStatement")) {
|
|
2643
2701
|
let ref2;
|
|
2644
|
-
const indent = getIndent((ref2 = block.expressions)[ref2.length - 1])
|
|
2702
|
+
const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]);
|
|
2645
2703
|
block.expressions.push([
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
type: "ReturnStatement",
|
|
2649
|
-
expression: ref,
|
|
2650
|
-
children: ["return ", ref]
|
|
2651
|
-
}
|
|
2704
|
+
indent,
|
|
2705
|
+
wrapWithReturn(ref, block, !indent)
|
|
2652
2706
|
]);
|
|
2653
2707
|
}
|
|
2654
2708
|
return true;
|
|
@@ -2660,34 +2714,103 @@ function patternAsValue(pattern) {
|
|
|
2660
2714
|
const index = children.indexOf(pattern.elements);
|
|
2661
2715
|
if (index < 0)
|
|
2662
2716
|
throw new Error("failed to find elements in ArrayBindingPattern");
|
|
2663
|
-
children[index] = pattern.elements.map(
|
|
2664
|
-
|
|
2665
|
-
return { ...el, children: [ws, patternAsValue(e), delim] };
|
|
2666
|
-
});
|
|
2667
|
-
return { ...pattern, children };
|
|
2717
|
+
const elements = children[index] = pattern.elements.map(patternAsValue);
|
|
2718
|
+
return { ...pattern, elements, children };
|
|
2668
2719
|
}
|
|
2669
2720
|
case "ObjectBindingPattern": {
|
|
2670
2721
|
const children = [...pattern.children];
|
|
2671
2722
|
const index = children.indexOf(pattern.properties);
|
|
2672
2723
|
if (index < 0)
|
|
2673
2724
|
throw new Error("failed to find properties in ArrayBindingPattern");
|
|
2674
|
-
children[index] = pattern.properties.map(patternAsValue);
|
|
2675
|
-
return { ...pattern, children };
|
|
2725
|
+
const properties = children[index] = pattern.properties.map(patternAsValue);
|
|
2726
|
+
return { ...pattern, properties, children };
|
|
2676
2727
|
}
|
|
2677
|
-
case "Identifier":
|
|
2678
2728
|
case "BindingProperty": {
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
pattern.value
|
|
2682
|
-
pattern.
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2729
|
+
let children;
|
|
2730
|
+
if (pattern.value?.type === "Identifier") {
|
|
2731
|
+
children = [pattern.value, pattern.delim];
|
|
2732
|
+
if (isWhitespaceOrEmpty(pattern.children[0])) {
|
|
2733
|
+
children.unshift(pattern.children[0]);
|
|
2734
|
+
}
|
|
2735
|
+
} else {
|
|
2736
|
+
children = [...pattern.children];
|
|
2737
|
+
if (pattern.initializer != null) {
|
|
2738
|
+
const index = children.indexOf(pattern.initializer);
|
|
2739
|
+
assert.notEqual(index, -1, "failed to find initializer in BindingElement");
|
|
2740
|
+
children.splice(index, 1);
|
|
2741
|
+
}
|
|
2742
|
+
if (pattern.value != null) {
|
|
2743
|
+
children = children.map(($2) => $2 === pattern.value ? patternAsValue(pattern.value) : $2);
|
|
2744
|
+
}
|
|
2686
2745
|
}
|
|
2687
2746
|
return { ...pattern, children };
|
|
2688
2747
|
}
|
|
2689
|
-
|
|
2748
|
+
case "AtBindingProperty": {
|
|
2749
|
+
const children = [...pattern.children];
|
|
2750
|
+
if (pattern.initializer != null) {
|
|
2751
|
+
const index = children.indexOf(pattern.initializer);
|
|
2752
|
+
assert.notEqual(index, -1, "failed to find initializer in AtBindingProperty");
|
|
2753
|
+
children.splice(index, 1);
|
|
2754
|
+
}
|
|
2755
|
+
return { ...pattern, children };
|
|
2756
|
+
}
|
|
2757
|
+
case "BindingElement": {
|
|
2758
|
+
const children = [...pattern.children];
|
|
2759
|
+
if (pattern.initializer != null) {
|
|
2760
|
+
const index2 = children.indexOf(pattern.initializer);
|
|
2761
|
+
assert.notEqual(index2, -1, "failed to find initializer in BindingElement");
|
|
2762
|
+
children.splice(index2, 1);
|
|
2763
|
+
}
|
|
2764
|
+
const index = children.indexOf(pattern.binding);
|
|
2765
|
+
assert.notEqual(index, -1, "failed to find binding in BindingElement");
|
|
2766
|
+
children[index] = patternAsValue(pattern.binding);
|
|
2767
|
+
return { ...pattern, children };
|
|
2768
|
+
}
|
|
2769
|
+
default: {
|
|
2690
2770
|
return pattern;
|
|
2771
|
+
}
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
function patternBindings(pattern) {
|
|
2775
|
+
const bindings = [];
|
|
2776
|
+
recurse(pattern);
|
|
2777
|
+
return bindings;
|
|
2778
|
+
function recurse(pattern2) {
|
|
2779
|
+
switch (pattern2.type) {
|
|
2780
|
+
case "ArrayBindingPattern": {
|
|
2781
|
+
for (let ref3 = pattern2.elements, i2 = 0, len1 = ref3.length; i2 < len1; i2++) {
|
|
2782
|
+
const element = ref3[i2];
|
|
2783
|
+
recurse(element);
|
|
2784
|
+
}
|
|
2785
|
+
;
|
|
2786
|
+
break;
|
|
2787
|
+
}
|
|
2788
|
+
case "ObjectBindingPattern": {
|
|
2789
|
+
for (let ref4 = pattern2.properties, i3 = 0, len22 = ref4.length; i3 < len22; i3++) {
|
|
2790
|
+
const property = ref4[i3];
|
|
2791
|
+
recurse(property);
|
|
2792
|
+
}
|
|
2793
|
+
;
|
|
2794
|
+
break;
|
|
2795
|
+
}
|
|
2796
|
+
case "BindingElement": {
|
|
2797
|
+
recurse(pattern2.binding);
|
|
2798
|
+
break;
|
|
2799
|
+
}
|
|
2800
|
+
case "BindingProperty": {
|
|
2801
|
+
recurse(pattern2.value ?? pattern2.name);
|
|
2802
|
+
break;
|
|
2803
|
+
}
|
|
2804
|
+
case "Binding": {
|
|
2805
|
+
recurse(pattern2.pattern);
|
|
2806
|
+
break;
|
|
2807
|
+
}
|
|
2808
|
+
case "Identifier":
|
|
2809
|
+
case "AtBinding": {
|
|
2810
|
+
bindings.push(pattern2);
|
|
2811
|
+
break;
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2691
2814
|
}
|
|
2692
2815
|
}
|
|
2693
2816
|
function assignResults(node, collect) {
|
|
@@ -2696,8 +2819,8 @@ function assignResults(node, collect) {
|
|
|
2696
2819
|
switch (node.type) {
|
|
2697
2820
|
case "BlockStatement":
|
|
2698
2821
|
if (node.expressions.length) {
|
|
2699
|
-
let
|
|
2700
|
-
assignResults((
|
|
2822
|
+
let ref5;
|
|
2823
|
+
assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
|
|
2701
2824
|
} else {
|
|
2702
2825
|
node.expressions.push(["", collect("void 0"), ";"]);
|
|
2703
2826
|
}
|
|
@@ -2732,7 +2855,7 @@ function assignResults(node, collect) {
|
|
|
2732
2855
|
if (exp.type === "LabelledStatement") {
|
|
2733
2856
|
exp = exp.statement;
|
|
2734
2857
|
}
|
|
2735
|
-
let
|
|
2858
|
+
let ref6;
|
|
2736
2859
|
switch (exp.type) {
|
|
2737
2860
|
case "BreakStatement":
|
|
2738
2861
|
case "ContinueStatement":
|
|
@@ -2743,14 +2866,14 @@ function assignResults(node, collect) {
|
|
|
2743
2866
|
return;
|
|
2744
2867
|
}
|
|
2745
2868
|
case "Declaration": {
|
|
2746
|
-
let
|
|
2869
|
+
let ref7;
|
|
2747
2870
|
if (exp.bindings?.length) {
|
|
2748
|
-
|
|
2871
|
+
ref7 = patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern);
|
|
2749
2872
|
} else {
|
|
2750
|
-
|
|
2873
|
+
ref7 = "void 0";
|
|
2751
2874
|
}
|
|
2752
2875
|
;
|
|
2753
|
-
const value =
|
|
2876
|
+
const value = ref7;
|
|
2754
2877
|
exp.children.push([
|
|
2755
2878
|
"",
|
|
2756
2879
|
[";", collect(value)]
|
|
@@ -2798,11 +2921,17 @@ function assignResults(node, collect) {
|
|
|
2798
2921
|
return;
|
|
2799
2922
|
}
|
|
2800
2923
|
case "SwitchStatement": {
|
|
2801
|
-
|
|
2924
|
+
for (let ref8 = exp.caseBlock.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
|
|
2925
|
+
const clause = ref8[i4];
|
|
2926
|
+
assignResults(clause, collect);
|
|
2927
|
+
}
|
|
2802
2928
|
return;
|
|
2803
2929
|
}
|
|
2804
2930
|
case "TryStatement": {
|
|
2805
|
-
exp.blocks
|
|
2931
|
+
for (let ref9 = exp.blocks, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
|
|
2932
|
+
const block = ref9[i5];
|
|
2933
|
+
assignResults(block, collect);
|
|
2934
|
+
}
|
|
2806
2935
|
return;
|
|
2807
2936
|
}
|
|
2808
2937
|
}
|
|
@@ -2823,20 +2952,28 @@ function insertReturn(node) {
|
|
|
2823
2952
|
const last = node.expressions[node.expressions.length - 1];
|
|
2824
2953
|
insertReturn(last);
|
|
2825
2954
|
} else {
|
|
2826
|
-
|
|
2827
|
-
|
|
2955
|
+
let m1;
|
|
2956
|
+
if (m1 = node.parent?.type, m1 === "CatchClause" || m1 === "WhenClause") {
|
|
2957
|
+
node.expressions.push(["", wrapWithReturn(void 0, node)]);
|
|
2828
2958
|
}
|
|
2829
2959
|
}
|
|
2830
2960
|
return;
|
|
2831
2961
|
}
|
|
2832
2962
|
case "WhenClause": {
|
|
2833
2963
|
if (node.break) {
|
|
2834
|
-
node.children.
|
|
2964
|
+
const breakIndex = node.children.indexOf(node.break);
|
|
2965
|
+
assert.notEqual(breakIndex, -1, "Could not find break in when clause");
|
|
2966
|
+
node.children.splice(breakIndex, 1);
|
|
2967
|
+
node.break = void 0;
|
|
2835
2968
|
}
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2969
|
+
insertReturn(node.block);
|
|
2970
|
+
if (!isExit(node.block)) {
|
|
2971
|
+
const comment = hasTrailingComment(node.block.expressions);
|
|
2972
|
+
let ref10;
|
|
2973
|
+
node.block.expressions.push([
|
|
2974
|
+
comment ? (ref10 = node.block.expressions)[ref10.length - 1][0] || "\n" : "",
|
|
2975
|
+
wrapWithReturn(void 0, node, !comment)
|
|
2976
|
+
]);
|
|
2840
2977
|
}
|
|
2841
2978
|
return;
|
|
2842
2979
|
}
|
|
@@ -2861,7 +2998,7 @@ function insertReturn(node) {
|
|
|
2861
2998
|
if (exp.type === "LabelledStatement") {
|
|
2862
2999
|
exp = exp.statement;
|
|
2863
3000
|
}
|
|
2864
|
-
let
|
|
3001
|
+
let ref11;
|
|
2865
3002
|
switch (exp.type) {
|
|
2866
3003
|
case "BreakStatement":
|
|
2867
3004
|
case "ContinueStatement":
|
|
@@ -2872,27 +3009,30 @@ function insertReturn(node) {
|
|
|
2872
3009
|
return;
|
|
2873
3010
|
}
|
|
2874
3011
|
case "Declaration": {
|
|
2875
|
-
let
|
|
3012
|
+
let ref12;
|
|
2876
3013
|
if (exp.bindings?.length) {
|
|
2877
|
-
|
|
3014
|
+
ref12 = [" ", patternAsValue((ref11 = exp.bindings)[ref11.length - 1].pattern)];
|
|
2878
3015
|
} else {
|
|
2879
|
-
|
|
3016
|
+
ref12 = [];
|
|
2880
3017
|
}
|
|
2881
3018
|
;
|
|
2882
|
-
const value =
|
|
3019
|
+
const value = ref12;
|
|
2883
3020
|
const parent = outer.parent;
|
|
2884
3021
|
const index = findChildIndex(parent?.expressions, outer);
|
|
2885
3022
|
assert.notEqual(index, -1, "Could not find declaration in parent");
|
|
2886
|
-
parent.expressions.splice(index + 1, 0, [
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
3023
|
+
parent.expressions.splice(index + 1, 0, [
|
|
3024
|
+
"",
|
|
3025
|
+
{
|
|
3026
|
+
type: "ReturnStatement",
|
|
3027
|
+
expression: value,
|
|
3028
|
+
children: [
|
|
3029
|
+
!(parent.expressions[index][2] === ";") ? ";" : void 0,
|
|
3030
|
+
"return",
|
|
3031
|
+
value
|
|
3032
|
+
],
|
|
3033
|
+
parent: exp
|
|
3034
|
+
}
|
|
3035
|
+
]);
|
|
2896
3036
|
braceBlock(parent);
|
|
2897
3037
|
return;
|
|
2898
3038
|
}
|
|
@@ -2903,12 +3043,7 @@ function insertReturn(node) {
|
|
|
2903
3043
|
assert.notEqual(index, -1, "Could not find function declaration in parent");
|
|
2904
3044
|
parent.expressions.splice(index + 1, 0, [
|
|
2905
3045
|
"",
|
|
2906
|
-
|
|
2907
|
-
type: "ReturnStatement",
|
|
2908
|
-
expression: exp.id,
|
|
2909
|
-
children: [";return ", exp.id],
|
|
2910
|
-
parent: exp
|
|
2911
|
-
}
|
|
3046
|
+
wrapWithReturn(exp.id, exp, true)
|
|
2912
3047
|
]);
|
|
2913
3048
|
braceBlock(parent);
|
|
2914
3049
|
return;
|
|
@@ -2931,12 +3066,11 @@ function insertReturn(node) {
|
|
|
2931
3066
|
if (exp.else)
|
|
2932
3067
|
insertReturn(exp.else.block);
|
|
2933
3068
|
else
|
|
2934
|
-
exp.children.push([
|
|
2935
|
-
|
|
2936
|
-
// NOTE: add a prefixed
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
}]);
|
|
3069
|
+
exp.children.push([
|
|
3070
|
+
"",
|
|
3071
|
+
// NOTE: add a prefixed semicolon because the if block may not be braced
|
|
3072
|
+
wrapWithReturn(void 0, exp, true)
|
|
3073
|
+
]);
|
|
2940
3074
|
return;
|
|
2941
3075
|
}
|
|
2942
3076
|
case "PatternMatchingStatement": {
|
|
@@ -2944,30 +3078,30 @@ function insertReturn(node) {
|
|
|
2944
3078
|
return;
|
|
2945
3079
|
}
|
|
2946
3080
|
case "SwitchStatement": {
|
|
2947
|
-
|
|
3081
|
+
for (let ref13 = exp.caseBlock.clauses, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
|
|
3082
|
+
const clause = ref13[i6];
|
|
3083
|
+
insertReturn(clause);
|
|
3084
|
+
}
|
|
2948
3085
|
return;
|
|
2949
3086
|
}
|
|
2950
3087
|
case "TryStatement": {
|
|
2951
|
-
exp.blocks.
|
|
3088
|
+
for (let ref14 = exp.blocks, i7 = 0, len6 = ref14.length; i7 < len6; i7++) {
|
|
3089
|
+
const block = ref14[i7];
|
|
3090
|
+
insertReturn(block);
|
|
3091
|
+
}
|
|
2952
3092
|
return;
|
|
2953
3093
|
}
|
|
2954
3094
|
}
|
|
2955
3095
|
if (node[node.length - 1]?.type === "SemicolonDelimiter") {
|
|
2956
3096
|
return;
|
|
2957
3097
|
}
|
|
2958
|
-
|
|
2959
|
-
node.splice(1, 1, returnStatement);
|
|
2960
|
-
}
|
|
2961
|
-
function insertSwitchReturns(exp) {
|
|
2962
|
-
exp.caseBlock.clauses.forEach((clause) => {
|
|
2963
|
-
return insertReturn(clause);
|
|
2964
|
-
});
|
|
3098
|
+
node[1] = wrapWithReturn(node[1]);
|
|
2965
3099
|
}
|
|
2966
3100
|
function processBreakContinueWith(statement) {
|
|
2967
3101
|
let changed = false;
|
|
2968
3102
|
for (const control of gatherRecursiveWithinFunction(
|
|
2969
3103
|
statement.block,
|
|
2970
|
-
($
|
|
3104
|
+
($3) => $3.type === "BreakStatement" || $3.type === "ContinueStatement"
|
|
2971
3105
|
)) {
|
|
2972
3106
|
let controlName2 = function() {
|
|
2973
3107
|
switch (control.type) {
|
|
@@ -2982,8 +3116,8 @@ function processBreakContinueWith(statement) {
|
|
|
2982
3116
|
var controlName = controlName2;
|
|
2983
3117
|
if (control.with) {
|
|
2984
3118
|
if (control.label) {
|
|
2985
|
-
let
|
|
2986
|
-
if (!(
|
|
3119
|
+
let m2;
|
|
3120
|
+
if (!(m2 = statement.parent, typeof m2 === "object" && m2 != null && "type" in m2 && m2.type === "LabelledStatement" && "label" in m2 && typeof m2.label === "object" && m2.label != null && "name" in m2.label && m2.label.name === control.label.name)) {
|
|
2987
3121
|
continue;
|
|
2988
3122
|
}
|
|
2989
3123
|
} else {
|
|
@@ -3002,7 +3136,7 @@ function processBreakContinueWith(statement) {
|
|
|
3002
3136
|
)
|
|
3003
3137
|
);
|
|
3004
3138
|
updateParentPointers(control.with, control);
|
|
3005
|
-
const i = control.children.findIndex(($
|
|
3139
|
+
const i = control.children.findIndex(($4) => $4?.type === "Error");
|
|
3006
3140
|
if (i >= 0) {
|
|
3007
3141
|
control.children.splice(i, 1);
|
|
3008
3142
|
}
|
|
@@ -3044,7 +3178,7 @@ function wrapIterationReturningResults(statement, collect) {
|
|
|
3044
3178
|
}
|
|
3045
3179
|
const resultsRef = statement.resultsRef = makeRef("results");
|
|
3046
3180
|
const declaration = iterationDeclaration(statement);
|
|
3047
|
-
const { ancestor, child } = findAncestor(statement, ($
|
|
3181
|
+
const { ancestor, child } = findAncestor(statement, ($5) => $5.type === "BlockStatement");
|
|
3048
3182
|
assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
|
|
3049
3183
|
const index = findChildIndex(ancestor.expressions, child);
|
|
3050
3184
|
assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
|
|
@@ -3097,6 +3231,9 @@ function iterationDeclaration(statement) {
|
|
|
3097
3231
|
case "product": {
|
|
3098
3232
|
return "1";
|
|
3099
3233
|
}
|
|
3234
|
+
case "join": {
|
|
3235
|
+
return '""';
|
|
3236
|
+
}
|
|
3100
3237
|
default: {
|
|
3101
3238
|
return "0";
|
|
3102
3239
|
}
|
|
@@ -3141,7 +3278,8 @@ function iterationDeclaration(statement) {
|
|
|
3141
3278
|
case "count": {
|
|
3142
3279
|
return ["if (", node, ") ++", resultsRef];
|
|
3143
3280
|
}
|
|
3144
|
-
case "sum":
|
|
3281
|
+
case "sum":
|
|
3282
|
+
case "join": {
|
|
3145
3283
|
return [resultsRef, " += ", node];
|
|
3146
3284
|
}
|
|
3147
3285
|
case "product": {
|
|
@@ -3166,9 +3304,9 @@ function iterationDefaultBody(statement) {
|
|
|
3166
3304
|
}
|
|
3167
3305
|
const reduction = statement.type === "ForStatement" && statement.reduction;
|
|
3168
3306
|
function fillBlock(expression) {
|
|
3169
|
-
let
|
|
3170
|
-
let
|
|
3171
|
-
if (
|
|
3307
|
+
let ref15;
|
|
3308
|
+
let m3;
|
|
3309
|
+
if (m3 = (ref15 = block.expressions)[ref15.length - 1], Array.isArray(m3) && m3.length >= 2 && typeof m3[1] === "object" && m3[1] != null && "type" in m3[1] && m3[1].type === "EmptyStatement" && "implicit" in m3[1] && m3[1].implicit === true) {
|
|
3172
3310
|
block.expressions.pop();
|
|
3173
3311
|
}
|
|
3174
3312
|
block.expressions.push(expression);
|
|
@@ -3198,7 +3336,29 @@ function iterationDefaultBody(statement) {
|
|
|
3198
3336
|
}
|
|
3199
3337
|
}
|
|
3200
3338
|
if (statement.type === "ForStatement" && statement.declaration?.type === "ForDeclaration") {
|
|
3201
|
-
|
|
3339
|
+
if (reduction) {
|
|
3340
|
+
const bindings = patternBindings(statement.declaration.binding.pattern);
|
|
3341
|
+
if (bindings.length) {
|
|
3342
|
+
fillBlock(["", bindings[0]]);
|
|
3343
|
+
for (const binding of bindings.slice(1)) {
|
|
3344
|
+
binding.children.unshift({
|
|
3345
|
+
type: "Error",
|
|
3346
|
+
subtype: "Warning",
|
|
3347
|
+
message: "Ignored binding in reduction loop with implicit body"
|
|
3348
|
+
});
|
|
3349
|
+
}
|
|
3350
|
+
} else {
|
|
3351
|
+
fillBlock([
|
|
3352
|
+
"",
|
|
3353
|
+
{
|
|
3354
|
+
type: "Error",
|
|
3355
|
+
message: "Empty binding pattern in reduction loop with implicit body"
|
|
3356
|
+
}
|
|
3357
|
+
]);
|
|
3358
|
+
}
|
|
3359
|
+
} else {
|
|
3360
|
+
fillBlock(["", patternAsValue(statement.declaration.binding.pattern)]);
|
|
3361
|
+
}
|
|
3202
3362
|
block.empty = false;
|
|
3203
3363
|
}
|
|
3204
3364
|
return false;
|
|
@@ -3226,24 +3386,24 @@ function processParams(f) {
|
|
|
3226
3386
|
injectParamProps: isConstructor
|
|
3227
3387
|
});
|
|
3228
3388
|
if (isConstructor) {
|
|
3229
|
-
const { ancestor } = findAncestor(f, ($
|
|
3389
|
+
const { ancestor } = findAncestor(f, ($6) => $6.type === "ClassExpression");
|
|
3230
3390
|
if (ancestor != null) {
|
|
3231
|
-
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($
|
|
3391
|
+
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($7) => $7.type === "FieldDefinition").map(($8) => $8.id).filter((a1) => typeof a1 === "object" && a1 != null && "type" in a1 && a1.type === "Identifier").map(($9) => $9.name));
|
|
3232
3392
|
const classExpressions = ancestor.body.expressions;
|
|
3233
3393
|
let index = findChildIndex(classExpressions, f);
|
|
3234
3394
|
assert.notEqual(index, -1, "Could not find constructor in class");
|
|
3235
|
-
let
|
|
3236
|
-
while (
|
|
3395
|
+
let m4;
|
|
3396
|
+
while (m4 = classExpressions[index - 1]?.[1], typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "MethodDefinition" && "name" in m4 && m4.name === "constructor") {
|
|
3237
3397
|
index--;
|
|
3238
3398
|
}
|
|
3239
3399
|
const fStatement = classExpressions[index];
|
|
3240
|
-
for (let
|
|
3241
|
-
const parameter =
|
|
3400
|
+
for (let ref16 = gatherRecursive(parameters, ($10) => $10.type === "Parameter"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
|
|
3401
|
+
const parameter = ref16[i8];
|
|
3242
3402
|
if (!parameter.typeSuffix) {
|
|
3243
3403
|
continue;
|
|
3244
3404
|
}
|
|
3245
|
-
for (let
|
|
3246
|
-
const binding =
|
|
3405
|
+
for (let ref17 = gatherRecursive(parameter, ($11) => $11.type === "AtBinding"), i9 = 0, len8 = ref17.length; i9 < len8; i9++) {
|
|
3406
|
+
const binding = ref17[i9];
|
|
3247
3407
|
const typeSuffix = binding.parent?.typeSuffix;
|
|
3248
3408
|
if (!typeSuffix) {
|
|
3249
3409
|
continue;
|
|
@@ -3303,8 +3463,8 @@ function processSignature(f) {
|
|
|
3303
3463
|
}
|
|
3304
3464
|
if (!f.generator?.length && hasYield(block)) {
|
|
3305
3465
|
if (f.type === "ArrowFunction") {
|
|
3306
|
-
gatherRecursiveWithinFunction(block, ($
|
|
3307
|
-
const i = y.children.findIndex(($
|
|
3466
|
+
gatherRecursiveWithinFunction(block, ($12) => $12.type === "YieldExpression").forEach((y) => {
|
|
3467
|
+
const i = y.children.findIndex(($13) => $13.type === "Yield");
|
|
3308
3468
|
return y.children.splice(i + 1, 0, {
|
|
3309
3469
|
type: "Error",
|
|
3310
3470
|
message: "Can't use yield inside of => arrow function"
|
|
@@ -3320,8 +3480,8 @@ function processSignature(f) {
|
|
|
3320
3480
|
}
|
|
3321
3481
|
}
|
|
3322
3482
|
function processFunctions(statements, config2) {
|
|
3323
|
-
for (let
|
|
3324
|
-
const f =
|
|
3483
|
+
for (let ref18 = gatherRecursiveAll(statements, ($14) => $14.type === "FunctionExpression" || $14.type === "ArrowFunction"), i10 = 0, len9 = ref18.length; i10 < len9; i10++) {
|
|
3484
|
+
const f = ref18[i10];
|
|
3325
3485
|
if (f.type === "FunctionExpression") {
|
|
3326
3486
|
implicitFunctionBlock(f);
|
|
3327
3487
|
}
|
|
@@ -3329,8 +3489,8 @@ function processFunctions(statements, config2) {
|
|
|
3329
3489
|
processParams(f);
|
|
3330
3490
|
processReturn(f, config2.implicitReturns);
|
|
3331
3491
|
}
|
|
3332
|
-
for (let
|
|
3333
|
-
const f =
|
|
3492
|
+
for (let ref19 = gatherRecursiveAll(statements, ($15) => $15.type === "MethodDefinition"), i11 = 0, len10 = ref19.length; i11 < len10; i11++) {
|
|
3493
|
+
const f = ref19[i11];
|
|
3334
3494
|
implicitFunctionBlock(f);
|
|
3335
3495
|
processParams(f);
|
|
3336
3496
|
processReturn(f, config2.implicitReturns);
|
|
@@ -3383,9 +3543,9 @@ function expressionizeIteration(exp) {
|
|
|
3383
3543
|
}
|
|
3384
3544
|
let done;
|
|
3385
3545
|
if (!async) {
|
|
3386
|
-
let
|
|
3387
|
-
if ((
|
|
3388
|
-
const { block: parentBlock, index } =
|
|
3546
|
+
let ref20;
|
|
3547
|
+
if ((ref20 = blockContainingStatement(exp)) && typeof ref20 === "object" && "block" in ref20 && "index" in ref20) {
|
|
3548
|
+
const { block: parentBlock, index } = ref20;
|
|
3389
3549
|
statements[0][0] = parentBlock.expressions[index][0];
|
|
3390
3550
|
parentBlock.expressions.splice(index, index + 1 - index, ...statements);
|
|
3391
3551
|
updateParentPointers(parentBlock);
|
|
@@ -3402,8 +3562,8 @@ function expressionizeIteration(exp) {
|
|
|
3402
3562
|
}
|
|
3403
3563
|
}
|
|
3404
3564
|
function processIterationExpressions(statements) {
|
|
3405
|
-
for (let
|
|
3406
|
-
const s =
|
|
3565
|
+
for (let ref21 = gatherRecursiveAll(statements, ($16) => $16.type === "IterationExpression"), i12 = 0, len11 = ref21.length; i12 < len11; i12++) {
|
|
3566
|
+
const s = ref21[i12];
|
|
3407
3567
|
expressionizeIteration(s);
|
|
3408
3568
|
}
|
|
3409
3569
|
}
|
|
@@ -3429,12 +3589,12 @@ function processCoffeeDo(ws, expression) {
|
|
|
3429
3589
|
...parameters,
|
|
3430
3590
|
children: (() => {
|
|
3431
3591
|
const results1 = [];
|
|
3432
|
-
for (let
|
|
3433
|
-
let parameter =
|
|
3592
|
+
for (let ref22 = parameters.children, i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
|
|
3593
|
+
let parameter = ref22[i13];
|
|
3434
3594
|
if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
|
|
3435
|
-
let
|
|
3436
|
-
if (
|
|
3437
|
-
const initializer =
|
|
3595
|
+
let ref23;
|
|
3596
|
+
if (ref23 = parameter.initializer) {
|
|
3597
|
+
const initializer = ref23;
|
|
3438
3598
|
args.push(initializer.expression, parameter.delim);
|
|
3439
3599
|
parameter = {
|
|
3440
3600
|
...parameter,
|
|
@@ -3455,7 +3615,7 @@ function processCoffeeDo(ws, expression) {
|
|
|
3455
3615
|
expression = {
|
|
3456
3616
|
...expression,
|
|
3457
3617
|
parameters: newParameters,
|
|
3458
|
-
children: expression.children.map(($
|
|
3618
|
+
children: expression.children.map(($17) => $17 === parameters ? newParameters : $17)
|
|
3459
3619
|
};
|
|
3460
3620
|
}
|
|
3461
3621
|
return {
|
|
@@ -3477,7 +3637,7 @@ function makeAmpersandFunction(rhs) {
|
|
|
3477
3637
|
ref = makeRef("$");
|
|
3478
3638
|
inplacePrepend(ref, body);
|
|
3479
3639
|
}
|
|
3480
|
-
if (startsWithPredicate(body, ($
|
|
3640
|
+
if (startsWithPredicate(body, ($18) => $18.type === "ObjectExpression")) {
|
|
3481
3641
|
body = makeLeftHandSideExpression(body);
|
|
3482
3642
|
}
|
|
3483
3643
|
const parameters = makeNode({
|
|
@@ -4083,7 +4243,7 @@ function expandChainedComparisons([first, binops]) {
|
|
|
4083
4243
|
// source/parser/pattern-matching.civet
|
|
4084
4244
|
function processPatternTest(lhs, patterns) {
|
|
4085
4245
|
const { ref, refAssignmentComma } = maybeRefAssignment(lhs, "m");
|
|
4086
|
-
const conditionExpression = flatJoin(patterns.map(($) => getPatternConditions(
|
|
4246
|
+
const conditionExpression = flatJoin(patterns.map(($1) => getPatternConditions($1, ref)).map(($2) => flatJoin($2, " && ")), " || ");
|
|
4087
4247
|
return makeLeftHandSideExpression(makeNode({
|
|
4088
4248
|
type: "PatternTest",
|
|
4089
4249
|
children: [
|
|
@@ -4093,7 +4253,7 @@ function processPatternTest(lhs, patterns) {
|
|
|
4093
4253
|
}));
|
|
4094
4254
|
}
|
|
4095
4255
|
function processPatternMatching(statements) {
|
|
4096
|
-
gatherRecursiveAll(statements, ($
|
|
4256
|
+
gatherRecursiveAll(statements, ($3) => $3.type === "SwitchStatement").forEach((s) => {
|
|
4097
4257
|
const { caseBlock } = s;
|
|
4098
4258
|
const { clauses } = caseBlock;
|
|
4099
4259
|
for (let i1 = 0, len3 = clauses.length; i1 < len3; i1++) {
|
|
@@ -4107,7 +4267,7 @@ function processPatternMatching(statements) {
|
|
|
4107
4267
|
}
|
|
4108
4268
|
let errors = false;
|
|
4109
4269
|
let isPattern = false;
|
|
4110
|
-
if (clauses.some(($
|
|
4270
|
+
if (clauses.some(($4) => $4.type === "PatternClause")) {
|
|
4111
4271
|
isPattern = true;
|
|
4112
4272
|
for (let i2 = 0, len1 = clauses.length; i2 < len1; i2++) {
|
|
4113
4273
|
const c = clauses[i2];
|
|
@@ -4145,7 +4305,7 @@ function processPatternMatching(statements) {
|
|
|
4145
4305
|
}
|
|
4146
4306
|
let { patterns, block } = c;
|
|
4147
4307
|
let pattern = patterns[0];
|
|
4148
|
-
const conditionExpression = flatJoin(patterns.map(($
|
|
4308
|
+
const conditionExpression = flatJoin(patterns.map(($5) => getPatternConditions($5, ref)).map(($6) => flatJoin($6, " && ")), " || ");
|
|
4149
4309
|
const condition2 = makeNode({
|
|
4150
4310
|
type: "ParenthesizedExpression",
|
|
4151
4311
|
children: ["(", ...refAssignmentComma, conditionExpression, ")"],
|
|
@@ -4338,38 +4498,59 @@ function getPatternBlockPrefix(pattern, ref, decl = "const ", suffix) {
|
|
|
4338
4498
|
}
|
|
4339
4499
|
}
|
|
4340
4500
|
let [splices, thisAssignments] = gatherBindingCode(pattern);
|
|
4341
|
-
const
|
|
4501
|
+
const patternBindings2 = nonMatcherBindings(pattern);
|
|
4342
4502
|
splices = splices.map((s) => [", ", nonMatcherBindings(s)]);
|
|
4343
|
-
thisAssignments = thisAssignments.map(($
|
|
4344
|
-
const duplicateDeclarations = aggregateDuplicateBindings([
|
|
4503
|
+
thisAssignments = thisAssignments.map(($7) => ["", $7, ";"]);
|
|
4504
|
+
const duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices]);
|
|
4345
4505
|
return [
|
|
4346
4506
|
["", {
|
|
4347
4507
|
type: "Declaration",
|
|
4348
|
-
children: [decl,
|
|
4508
|
+
children: [decl, patternBindings2, suffix, " = ", ref, ...splices],
|
|
4349
4509
|
names: [],
|
|
4350
4510
|
bindings: []
|
|
4351
4511
|
// avoid implicit return of any bindings
|
|
4352
4512
|
}, ";"],
|
|
4353
4513
|
...thisAssignments,
|
|
4354
|
-
...duplicateDeclarations.map(($
|
|
4514
|
+
...duplicateDeclarations.map(($8) => ["", $8, ";"])
|
|
4355
4515
|
];
|
|
4356
4516
|
}
|
|
4357
4517
|
function elideMatchersFromArrayBindings(elements) {
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
case "
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4518
|
+
const results = [];
|
|
4519
|
+
for (let i5 = 0, len4 = elements.length; i5 < len4; i5++) {
|
|
4520
|
+
const element = elements[i5];
|
|
4521
|
+
switch (element.type) {
|
|
4522
|
+
case "BindingRestElement":
|
|
4523
|
+
case "ElisionElement": {
|
|
4524
|
+
results.push(element);
|
|
4525
|
+
break;
|
|
4526
|
+
}
|
|
4527
|
+
case "BindingElement": {
|
|
4528
|
+
switch (element.binding.type) {
|
|
4529
|
+
case "Literal":
|
|
4530
|
+
case "RegularExpressionLiteral":
|
|
4531
|
+
case "StringLiteral":
|
|
4532
|
+
case "PinPattern": {
|
|
4533
|
+
results.push(element.delim);
|
|
4534
|
+
break;
|
|
4535
|
+
}
|
|
4536
|
+
default: {
|
|
4537
|
+
const binding = nonMatcherBindings(element.binding);
|
|
4538
|
+
results.push(makeNode({
|
|
4539
|
+
...element,
|
|
4540
|
+
binding,
|
|
4541
|
+
children: element.children.map((c) => {
|
|
4542
|
+
return c === element.binding ? binding : c;
|
|
4543
|
+
})
|
|
4544
|
+
}));
|
|
4545
|
+
}
|
|
4546
|
+
}
|
|
4547
|
+
;
|
|
4548
|
+
break;
|
|
4549
|
+
}
|
|
4371
4550
|
}
|
|
4372
|
-
}
|
|
4551
|
+
}
|
|
4552
|
+
;
|
|
4553
|
+
return results;
|
|
4373
4554
|
}
|
|
4374
4555
|
function elideMatchersFromPropertyBindings(properties) {
|
|
4375
4556
|
return properties.map((p) => {
|
|
@@ -4377,6 +4558,10 @@ function elideMatchersFromPropertyBindings(properties) {
|
|
|
4377
4558
|
case "BindingProperty": {
|
|
4378
4559
|
const { children, name, value } = p;
|
|
4379
4560
|
const [ws] = children;
|
|
4561
|
+
const shouldElide = name.type === "NumericLiteral" && !value?.name || name.type === "ComputedPropertyName" && value?.subtype === "NumericLiteral";
|
|
4562
|
+
if (shouldElide) {
|
|
4563
|
+
return;
|
|
4564
|
+
}
|
|
4380
4565
|
switch (value && value.type) {
|
|
4381
4566
|
case "ArrayBindingPattern":
|
|
4382
4567
|
case "ObjectBindingPattern": {
|
|
@@ -4408,32 +4593,22 @@ function elideMatchersFromPropertyBindings(properties) {
|
|
|
4408
4593
|
}
|
|
4409
4594
|
function nonMatcherBindings(pattern) {
|
|
4410
4595
|
switch (pattern.type) {
|
|
4411
|
-
case "ArrayBindingPattern":
|
|
4596
|
+
case "ArrayBindingPattern":
|
|
4597
|
+
case "PostRestBindingElements": {
|
|
4412
4598
|
const elements = elideMatchersFromArrayBindings(pattern.elements);
|
|
4413
|
-
return {
|
|
4599
|
+
return makeNode({
|
|
4414
4600
|
...pattern,
|
|
4415
4601
|
elements,
|
|
4416
|
-
children: pattern.children.map(($
|
|
4417
|
-
};
|
|
4418
|
-
}
|
|
4419
|
-
case "PostRestBindingElements": {
|
|
4420
|
-
const els = elideMatchersFromArrayBindings(pattern.children[1]);
|
|
4421
|
-
return {
|
|
4422
|
-
...pattern,
|
|
4423
|
-
children: [
|
|
4424
|
-
pattern.children[0],
|
|
4425
|
-
els,
|
|
4426
|
-
...pattern.children.slice(2)
|
|
4427
|
-
]
|
|
4428
|
-
};
|
|
4602
|
+
children: pattern.children.map(($9) => $9 === pattern.elements ? elements : $9)
|
|
4603
|
+
});
|
|
4429
4604
|
}
|
|
4430
4605
|
case "ObjectBindingPattern": {
|
|
4431
4606
|
const properties = elideMatchersFromPropertyBindings(pattern.properties);
|
|
4432
|
-
return {
|
|
4607
|
+
return makeNode({
|
|
4433
4608
|
...pattern,
|
|
4434
4609
|
properties,
|
|
4435
|
-
children: pattern.children.map(($
|
|
4436
|
-
};
|
|
4610
|
+
children: pattern.children.map(($10) => $10 === pattern.properties ? properties : $10)
|
|
4611
|
+
});
|
|
4437
4612
|
}
|
|
4438
4613
|
default: {
|
|
4439
4614
|
return pattern;
|
|
@@ -4441,32 +4616,26 @@ function nonMatcherBindings(pattern) {
|
|
|
4441
4616
|
}
|
|
4442
4617
|
}
|
|
4443
4618
|
function aggregateDuplicateBindings(bindings) {
|
|
4444
|
-
const props = gatherRecursiveAll(
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
const [, e] = element;
|
|
4452
|
-
if (e.type === "Identifier") {
|
|
4453
|
-
props.push(e);
|
|
4454
|
-
} else if (e.type === "BindingRestElement") {
|
|
4455
|
-
props.push(e);
|
|
4456
|
-
}
|
|
4457
|
-
}
|
|
4458
|
-
}
|
|
4459
|
-
}
|
|
4619
|
+
const props = gatherRecursiveAll(
|
|
4620
|
+
bindings,
|
|
4621
|
+
($) => $.type === "BindingProperty" || // Don't deduplicate ...rest properties; user should do so manually
|
|
4622
|
+
// because ...rest can be named arbitrarily
|
|
4623
|
+
//$.type is "BindingRestProperty"
|
|
4624
|
+
$.type === "Identifier" && $.parent?.type === "BindingElement" || $.type === "BindingRestElement"
|
|
4625
|
+
);
|
|
4460
4626
|
const declarations = [];
|
|
4461
4627
|
const propsGroupedByName = /* @__PURE__ */ new Map();
|
|
4462
|
-
for (let
|
|
4463
|
-
const p = props[
|
|
4628
|
+
for (let i6 = 0, len5 = props.length; i6 < len5; i6++) {
|
|
4629
|
+
const p = props[i6];
|
|
4464
4630
|
const { name, value } = p;
|
|
4465
4631
|
let m1;
|
|
4466
4632
|
if (m1 = value?.type, m1 === "ArrayBindingPattern" || m1 === "ObjectBindingPattern") {
|
|
4467
4633
|
continue;
|
|
4468
4634
|
}
|
|
4469
4635
|
const key = value?.name || name?.name || name;
|
|
4636
|
+
if (key?.type === "NumericLiteral" || key?.type === "ComputedPropertyName") {
|
|
4637
|
+
continue;
|
|
4638
|
+
}
|
|
4470
4639
|
if (propsGroupedByName.has(key)) {
|
|
4471
4640
|
propsGroupedByName.get(key).push(p);
|
|
4472
4641
|
} else {
|
|
@@ -4482,8 +4651,8 @@ function aggregateDuplicateBindings(bindings) {
|
|
|
4482
4651
|
pos: 0,
|
|
4483
4652
|
input: key
|
|
4484
4653
|
})) {
|
|
4485
|
-
for (let
|
|
4486
|
-
const p = shared[
|
|
4654
|
+
for (let i7 = 0, len6 = shared.length; i7 < len6; i7++) {
|
|
4655
|
+
const p = shared[i7];
|
|
4487
4656
|
aliasBinding(p, makeRef(`_${key}`, key));
|
|
4488
4657
|
}
|
|
4489
4658
|
return;
|
|
@@ -5575,9 +5744,12 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
5575
5744
|
ascDec = [", ", ascRef, " = ", startRef, " <= ", endRef];
|
|
5576
5745
|
}
|
|
5577
5746
|
let varAssign = [], varLetAssign = varAssign, varLet = varAssign, blockPrefix;
|
|
5578
|
-
let names = forDeclaration?.names;
|
|
5579
|
-
if (forDeclaration
|
|
5580
|
-
if (forDeclaration.
|
|
5747
|
+
let names = forDeclaration?.names ?? [];
|
|
5748
|
+
if (forDeclaration != null) {
|
|
5749
|
+
if (forDeclaration.type === "AssignmentExpression") {
|
|
5750
|
+
varAssign = varLetAssign = [forDeclaration, " = "];
|
|
5751
|
+
names = [];
|
|
5752
|
+
} else if (forDeclaration.decl === "let") {
|
|
5581
5753
|
const varName = forDeclaration.children.splice(1);
|
|
5582
5754
|
varAssign = [...trimFirstSpace(varName), " = "];
|
|
5583
5755
|
varLet = [",", ...varName, " = ", counterRef];
|
|
@@ -5587,14 +5759,6 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
5587
5759
|
["", [forDeclaration, " = ", value], ";"]
|
|
5588
5760
|
];
|
|
5589
5761
|
}
|
|
5590
|
-
} else if (forDeclaration) {
|
|
5591
|
-
assert.equal(
|
|
5592
|
-
forDeclaration.type,
|
|
5593
|
-
"AssignmentExpression",
|
|
5594
|
-
"Internal error: Coffee-style for loop must be an assignment expression"
|
|
5595
|
-
);
|
|
5596
|
-
varAssign = varLetAssign = [forDeclaration, " = "];
|
|
5597
|
-
names = [];
|
|
5598
5762
|
}
|
|
5599
5763
|
const declaration = {
|
|
5600
5764
|
type: "Declaration",
|
|
@@ -6114,7 +6278,8 @@ function addPostfixStatement(statement, ws, post) {
|
|
|
6114
6278
|
const block = makeNode({
|
|
6115
6279
|
type: "BlockStatement",
|
|
6116
6280
|
children: [" { ", expressions, " }"],
|
|
6117
|
-
expressions
|
|
6281
|
+
expressions,
|
|
6282
|
+
bare: false
|
|
6118
6283
|
});
|
|
6119
6284
|
const children = [...post.children, block];
|
|
6120
6285
|
if (!isWhitespaceOrEmpty(ws))
|
|
@@ -6513,11 +6678,11 @@ function processCallMemberExpression(node) {
|
|
|
6513
6678
|
if (glob?.type === "PropertyGlob") {
|
|
6514
6679
|
let prefix = children.slice(0, i);
|
|
6515
6680
|
const parts = [];
|
|
6516
|
-
let
|
|
6517
|
-
if (prefix.length > 1) {
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
prefix = [
|
|
6681
|
+
let ref;
|
|
6682
|
+
if (prefix.length > 1 && glob.object.properties.length > 1) {
|
|
6683
|
+
ref = makeRef();
|
|
6684
|
+
const { refAssignment } = makeRefAssignment(ref, prefix);
|
|
6685
|
+
prefix = [makeLeftHandSideExpression(refAssignment)];
|
|
6521
6686
|
}
|
|
6522
6687
|
prefix = prefix.concat(glob.dot);
|
|
6523
6688
|
for (const part of glob.object.properties) {
|
|
@@ -6549,6 +6714,9 @@ function processCallMemberExpression(node) {
|
|
|
6549
6714
|
}
|
|
6550
6715
|
if (!suppressPrefix) {
|
|
6551
6716
|
value = prefix.concat(trimFirstSpace(value));
|
|
6717
|
+
if (ref != null) {
|
|
6718
|
+
prefix = [ref].concat(glob.dot);
|
|
6719
|
+
}
|
|
6552
6720
|
}
|
|
6553
6721
|
if (wValue)
|
|
6554
6722
|
value.unshift(wValue);
|
|
@@ -6559,7 +6727,8 @@ function processCallMemberExpression(node) {
|
|
|
6559
6727
|
dots: part.dots,
|
|
6560
6728
|
delim: part.delim,
|
|
6561
6729
|
names: part.names,
|
|
6562
|
-
children: part.children.slice(0, 2).concat(value, part.delim)
|
|
6730
|
+
children: part.children.slice(0, 2).concat(value, part.delim),
|
|
6731
|
+
usesRef: Boolean(ref)
|
|
6563
6732
|
});
|
|
6564
6733
|
} else {
|
|
6565
6734
|
parts.push({
|
|
@@ -6576,12 +6745,13 @@ function processCallMemberExpression(node) {
|
|
|
6576
6745
|
value,
|
|
6577
6746
|
part.delim
|
|
6578
6747
|
// comma delimiter
|
|
6579
|
-
]
|
|
6748
|
+
],
|
|
6749
|
+
usesRef: Boolean(ref)
|
|
6580
6750
|
});
|
|
6581
6751
|
}
|
|
6582
6752
|
}
|
|
6583
6753
|
let ref2;
|
|
6584
|
-
|
|
6754
|
+
const object = {
|
|
6585
6755
|
type: "ObjectExpression",
|
|
6586
6756
|
children: [
|
|
6587
6757
|
glob.object.children[0],
|
|
@@ -6592,13 +6762,6 @@ function processCallMemberExpression(node) {
|
|
|
6592
6762
|
],
|
|
6593
6763
|
properties: parts
|
|
6594
6764
|
};
|
|
6595
|
-
if (refAssignmentComma) {
|
|
6596
|
-
object = makeNode({
|
|
6597
|
-
type: "ParenthesizedExpression",
|
|
6598
|
-
children: ["(", ...refAssignmentComma, object, ")"],
|
|
6599
|
-
expression: object
|
|
6600
|
-
});
|
|
6601
|
-
}
|
|
6602
6765
|
if (i === children.length - 1)
|
|
6603
6766
|
return object;
|
|
6604
6767
|
return processCallMemberExpression({
|
|
@@ -6808,40 +6971,54 @@ function convertNamedImportsToObject(node, pattern) {
|
|
|
6808
6971
|
};
|
|
6809
6972
|
}
|
|
6810
6973
|
function convertObjectToJSXAttributes(obj) {
|
|
6811
|
-
const { properties } = obj;
|
|
6812
6974
|
const parts = [];
|
|
6813
6975
|
const rest = [];
|
|
6814
|
-
|
|
6976
|
+
let i4 = 0;
|
|
6977
|
+
for (const part of obj.properties) {
|
|
6978
|
+
const i = i4++;
|
|
6979
|
+
if (part.usesRef) {
|
|
6980
|
+
rest.push(part);
|
|
6981
|
+
continue;
|
|
6982
|
+
}
|
|
6815
6983
|
if (i > 0)
|
|
6816
6984
|
parts.push(" ");
|
|
6817
|
-
const part = properties[i];
|
|
6818
6985
|
switch (part.type) {
|
|
6819
|
-
case "Identifier":
|
|
6986
|
+
case "Identifier": {
|
|
6820
6987
|
parts.push([part.name, "={", part.name, "}"]);
|
|
6821
6988
|
break;
|
|
6822
|
-
|
|
6989
|
+
}
|
|
6990
|
+
case "Property": {
|
|
6823
6991
|
if (part.name.type === "ComputedPropertyName") {
|
|
6824
6992
|
rest.push(part);
|
|
6825
6993
|
} else {
|
|
6826
6994
|
parts.push([part.name, "={", trimFirstSpace(part.value), "}"]);
|
|
6827
6995
|
}
|
|
6996
|
+
;
|
|
6828
6997
|
break;
|
|
6829
|
-
|
|
6998
|
+
}
|
|
6999
|
+
case "SpreadProperty": {
|
|
6830
7000
|
parts.push(["{", part.dots, part.value, "}"]);
|
|
6831
7001
|
break;
|
|
6832
|
-
|
|
7002
|
+
}
|
|
7003
|
+
case "MethodDefinition": {
|
|
6833
7004
|
const func = convertMethodToFunction(part);
|
|
6834
7005
|
if (func) {
|
|
6835
7006
|
parts.push([part.name, "={", convertMethodToFunction(part), "}"]);
|
|
6836
7007
|
} else {
|
|
6837
7008
|
rest.push(part);
|
|
6838
7009
|
}
|
|
7010
|
+
;
|
|
6839
7011
|
break;
|
|
6840
|
-
|
|
7012
|
+
}
|
|
7013
|
+
default: {
|
|
6841
7014
|
throw new Error(`invalid object literal type in JSX attribute: ${part.type}`);
|
|
7015
|
+
}
|
|
6842
7016
|
}
|
|
6843
7017
|
}
|
|
6844
7018
|
if (rest.length) {
|
|
7019
|
+
if (parts.length && parts[parts.length - 1] !== " ") {
|
|
7020
|
+
parts.push(" ");
|
|
7021
|
+
}
|
|
6845
7022
|
parts.push(["{...{", ...rest, "}}"]);
|
|
6846
7023
|
}
|
|
6847
7024
|
return parts;
|
|
@@ -6902,7 +7079,7 @@ function processBindingPatternLHS(lhs, tail) {
|
|
|
6902
7079
|
tail.push(...splices.map((s) => [", ", s]), ...thisAssignments.map((a) => [", ", a]));
|
|
6903
7080
|
}
|
|
6904
7081
|
function processAssignments(statements) {
|
|
6905
|
-
for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"),
|
|
7082
|
+
for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len3 = ref7.length; i5 < len3; i5++) {
|
|
6906
7083
|
let extractAssignment2 = function(lhs) {
|
|
6907
7084
|
let expr = lhs;
|
|
6908
7085
|
while (expr.type === "ParenthesizedExpression") {
|
|
@@ -6923,7 +7100,7 @@ function processAssignments(statements) {
|
|
|
6923
7100
|
return;
|
|
6924
7101
|
};
|
|
6925
7102
|
var extractAssignment = extractAssignment2;
|
|
6926
|
-
const exp = ref7[
|
|
7103
|
+
const exp = ref7[i5];
|
|
6927
7104
|
checkValidLHS(exp.assigned);
|
|
6928
7105
|
const pre = [], post = [];
|
|
6929
7106
|
let ref8;
|
|
@@ -6932,8 +7109,8 @@ function processAssignments(statements) {
|
|
|
6932
7109
|
if (!exp.lhs) {
|
|
6933
7110
|
continue;
|
|
6934
7111
|
}
|
|
6935
|
-
for (let ref9 = exp.lhs,
|
|
6936
|
-
const lhsPart = ref9[
|
|
7112
|
+
for (let ref9 = exp.lhs, i6 = 0, len4 = ref9.length; i6 < len4; i6++) {
|
|
7113
|
+
const lhsPart = ref9[i6];
|
|
6937
7114
|
let ref10;
|
|
6938
7115
|
if (ref10 = extractAssignment2(lhsPart[1])) {
|
|
6939
7116
|
const newLhs = ref10;
|
|
@@ -6977,8 +7154,8 @@ function processAssignments(statements) {
|
|
|
6977
7154
|
}
|
|
6978
7155
|
}
|
|
6979
7156
|
}
|
|
6980
|
-
for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"),
|
|
6981
|
-
const exp = ref11[
|
|
7157
|
+
for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len5 = ref11.length; i7 < len5; i7++) {
|
|
7158
|
+
const exp = ref11[i7];
|
|
6982
7159
|
if (!(exp.names === null)) {
|
|
6983
7160
|
continue;
|
|
6984
7161
|
}
|
|
@@ -7215,101 +7392,149 @@ function attachPostfixStatementAsExpression(exp, post) {
|
|
|
7215
7392
|
}
|
|
7216
7393
|
}
|
|
7217
7394
|
function processTypes(node) {
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
}
|
|
7233
|
-
let ref18;
|
|
7234
|
-
while (unary.suffix.length && (ref18 = unary.suffix)[ref18.length - 1]?.type === "NonNullAssertion") {
|
|
7235
|
-
unary.suffix.pop();
|
|
7236
|
-
}
|
|
7237
|
-
let ref19;
|
|
7238
|
-
if (unary.suffix.length || unary.prefix.length)
|
|
7239
|
-
ref19 = unary;
|
|
7240
|
-
else
|
|
7241
|
-
ref19 = unary.t;
|
|
7242
|
-
const t = ref19;
|
|
7243
|
-
if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
|
|
7244
|
-
if (count === 1) {
|
|
7245
|
-
unary.suffix.push(last);
|
|
7246
|
-
return;
|
|
7395
|
+
const results1 = [];
|
|
7396
|
+
for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len6 = ref16.length; i8 < len6; i8++) {
|
|
7397
|
+
const unary = ref16[i8];
|
|
7398
|
+
let suffixIndex = unary.suffix.length - 1;
|
|
7399
|
+
const results2 = [];
|
|
7400
|
+
while (suffixIndex >= 0) {
|
|
7401
|
+
const suffix = unary.suffix[suffixIndex];
|
|
7402
|
+
if (typeof suffix === "object" && suffix != null && "token" in suffix && suffix.token === "?") {
|
|
7403
|
+
const { token } = suffix;
|
|
7404
|
+
let count = 0;
|
|
7405
|
+
let m4;
|
|
7406
|
+
while (m4 = unary.suffix[suffixIndex], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
|
|
7407
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7408
|
+
count++;
|
|
7247
7409
|
}
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7410
|
+
let m5;
|
|
7411
|
+
while (m5 = unary.suffix[suffixIndex], typeof m5 === "object" && m5 != null && "type" in m5 && m5.type === "NonNullAssertion") {
|
|
7412
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7413
|
+
}
|
|
7414
|
+
const { parent, prefix } = unary;
|
|
7415
|
+
unary.prefix = [];
|
|
7416
|
+
unary.children = unary.children.filter((a1) => a1 !== prefix);
|
|
7417
|
+
const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
|
|
7418
|
+
const space = getTrimmingSpace(unary);
|
|
7419
|
+
let replace;
|
|
7420
|
+
if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
|
|
7421
|
+
if (count === 1) {
|
|
7422
|
+
unary.suffix.splice(suffixIndex + 1, 0, suffix);
|
|
7423
|
+
continue;
|
|
7424
|
+
}
|
|
7425
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7426
|
+
const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
|
|
7427
|
+
replace = [
|
|
7428
|
+
space,
|
|
7429
|
+
"(",
|
|
7430
|
+
t,
|
|
7431
|
+
" | null)",
|
|
7432
|
+
suffix
|
|
7433
|
+
];
|
|
7434
|
+
} else {
|
|
7435
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7436
|
+
const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
|
|
7437
|
+
replace = makeNode({
|
|
7438
|
+
type: "TypeParenthesized",
|
|
7439
|
+
ts: true,
|
|
7440
|
+
children: [
|
|
7441
|
+
space,
|
|
7442
|
+
"(",
|
|
7443
|
+
t,
|
|
7444
|
+
count === 1 ? " | undefined" : " | undefined | null",
|
|
7445
|
+
")"
|
|
7446
|
+
]
|
|
7447
|
+
});
|
|
7448
|
+
}
|
|
7449
|
+
if (prefix.length || outer.length) {
|
|
7450
|
+
replace = makeNode({
|
|
7451
|
+
type: "TypeUnary",
|
|
7452
|
+
ts: true,
|
|
7453
|
+
t: replace,
|
|
7454
|
+
prefix,
|
|
7455
|
+
suffix: outer,
|
|
7456
|
+
children: [prefix, replace, outer]
|
|
7457
|
+
});
|
|
7458
|
+
}
|
|
7459
|
+
results2.push(replaceNode(unary, replace, parent));
|
|
7460
|
+
} else if (typeof suffix === "object" && suffix != null && "type" in suffix && suffix.type === "NonNullAssertion") {
|
|
7461
|
+
const { type } = suffix;
|
|
7462
|
+
let m6;
|
|
7463
|
+
while (m6 = unary.suffix[suffixIndex], typeof m6 === "object" && m6 != null && "type" in m6 && m6.type === "NonNullAssertion") {
|
|
7464
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7465
|
+
}
|
|
7466
|
+
let m7;
|
|
7467
|
+
while (m7 = unary.suffix[suffixIndex], typeof m7 === "object" && m7 != null && "token" in m7 && m7.token === "?") {
|
|
7468
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7469
|
+
}
|
|
7470
|
+
const { parent, prefix } = unary;
|
|
7471
|
+
unary.prefix = [];
|
|
7472
|
+
unary.children = unary.children.filter((a2) => a2 !== prefix);
|
|
7473
|
+
const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
|
|
7474
|
+
const space = getTrimmingSpace(unary);
|
|
7475
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7476
|
+
let ref17;
|
|
7477
|
+
if (unary.suffix.length)
|
|
7478
|
+
ref17 = unary;
|
|
7479
|
+
else
|
|
7480
|
+
ref17 = unary.t;
|
|
7481
|
+
const t = ref17;
|
|
7482
|
+
const arg = makeNode({
|
|
7483
|
+
type: "TypeArgument",
|
|
7258
7484
|
ts: true,
|
|
7485
|
+
t,
|
|
7486
|
+
children: [t]
|
|
7487
|
+
});
|
|
7488
|
+
const argArray = [arg];
|
|
7489
|
+
const args = makeNode({
|
|
7490
|
+
type: "TypeArguments",
|
|
7491
|
+
ts: true,
|
|
7492
|
+
args: argArray,
|
|
7493
|
+
children: ["<", argArray, ">"]
|
|
7494
|
+
});
|
|
7495
|
+
let replace = makeNode({
|
|
7496
|
+
type: "TypeIdentifier",
|
|
7497
|
+
raw: "NonNullable",
|
|
7498
|
+
args,
|
|
7259
7499
|
children: [
|
|
7260
|
-
|
|
7261
|
-
"
|
|
7262
|
-
|
|
7263
|
-
count === 1 ? " | undefined" : " | undefined | null",
|
|
7264
|
-
")"
|
|
7500
|
+
space,
|
|
7501
|
+
"NonNullable",
|
|
7502
|
+
args
|
|
7265
7503
|
]
|
|
7266
7504
|
});
|
|
7505
|
+
if (prefix.length || outer.length) {
|
|
7506
|
+
replace = makeNode({
|
|
7507
|
+
type: "TypeUnary",
|
|
7508
|
+
ts: true,
|
|
7509
|
+
t: replace,
|
|
7510
|
+
prefix,
|
|
7511
|
+
suffix: outer,
|
|
7512
|
+
children: [prefix, replace, outer]
|
|
7513
|
+
});
|
|
7514
|
+
}
|
|
7515
|
+
results2.push(replaceNode(unary, replace, parent));
|
|
7516
|
+
} else {
|
|
7517
|
+
results2.push(suffixIndex--);
|
|
7267
7518
|
}
|
|
7268
|
-
} else if (typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "NonNullAssertion") {
|
|
7269
|
-
const { type } = m4;
|
|
7270
|
-
let ref20;
|
|
7271
|
-
while (unary.suffix.length && (ref20 = unary.suffix)[ref20.length - 1]?.type === "NonNullAssertion") {
|
|
7272
|
-
unary.suffix.pop();
|
|
7273
|
-
}
|
|
7274
|
-
let ref21;
|
|
7275
|
-
while (unary.suffix.length && (ref21 = unary.suffix)[ref21.length - 1]?.token === "?") {
|
|
7276
|
-
unary.suffix.pop();
|
|
7277
|
-
}
|
|
7278
|
-
const t = trimFirstSpace(
|
|
7279
|
-
unary.suffix.length || unary.prefix.length ? unary : unary.t
|
|
7280
|
-
);
|
|
7281
|
-
const args = {
|
|
7282
|
-
type: "TypeArguments",
|
|
7283
|
-
ts: true,
|
|
7284
|
-
types: [t],
|
|
7285
|
-
children: ["<", t, ">"]
|
|
7286
|
-
};
|
|
7287
|
-
replaceNode(unary, {
|
|
7288
|
-
type: "TypeIdentifier",
|
|
7289
|
-
raw: "NonNullable",
|
|
7290
|
-
args,
|
|
7291
|
-
children: [
|
|
7292
|
-
getTrimmingSpace(unary),
|
|
7293
|
-
"NonNullable",
|
|
7294
|
-
args
|
|
7295
|
-
]
|
|
7296
|
-
});
|
|
7297
7519
|
}
|
|
7298
|
-
|
|
7520
|
+
results1.push(results2);
|
|
7521
|
+
}
|
|
7522
|
+
;
|
|
7523
|
+
return results1;
|
|
7299
7524
|
}
|
|
7300
7525
|
function processStatementExpressions(statements) {
|
|
7301
|
-
for (let
|
|
7302
|
-
const exp =
|
|
7526
|
+
for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len7 = ref18.length; i9 < len7; i9++) {
|
|
7527
|
+
const exp = ref18[i9];
|
|
7303
7528
|
const { maybe, statement } = exp;
|
|
7304
7529
|
if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
|
|
7305
7530
|
replaceNode(exp, statement);
|
|
7306
7531
|
continue;
|
|
7307
7532
|
}
|
|
7308
|
-
let
|
|
7533
|
+
let ref19;
|
|
7309
7534
|
switch (statement.type) {
|
|
7310
7535
|
case "IfStatement": {
|
|
7311
|
-
if (
|
|
7312
|
-
const expression =
|
|
7536
|
+
if (ref19 = expressionizeIfStatement(statement)) {
|
|
7537
|
+
const expression = ref19;
|
|
7313
7538
|
replaceNode(statement, expression, exp);
|
|
7314
7539
|
} else {
|
|
7315
7540
|
replaceNode(statement, wrapIIFE([["", statement]]), exp);
|
|
@@ -7367,13 +7592,13 @@ function processNegativeIndexAccess(statements) {
|
|
|
7367
7592
|
});
|
|
7368
7593
|
}
|
|
7369
7594
|
function processFinallyClauses(statements) {
|
|
7370
|
-
for (let
|
|
7371
|
-
let f =
|
|
7372
|
-
let
|
|
7373
|
-
if (!((
|
|
7595
|
+
for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len8 = ref20.length; i10 < len8; i10++) {
|
|
7596
|
+
let f = ref20[i10];
|
|
7597
|
+
let ref21;
|
|
7598
|
+
if (!((ref21 = blockContainingStatement(f)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21)) {
|
|
7374
7599
|
throw new Error("finally clause must be inside try statement or block");
|
|
7375
7600
|
}
|
|
7376
|
-
const { block, index } =
|
|
7601
|
+
const { block, index } = ref21;
|
|
7377
7602
|
const indent = block.expressions[index][0];
|
|
7378
7603
|
const expressions = block.expressions.slice(index + 1);
|
|
7379
7604
|
const t = makeNode({
|
|
@@ -7410,7 +7635,7 @@ function processProgram(root) {
|
|
|
7410
7635
|
if (config2.iife || config2.repl) {
|
|
7411
7636
|
rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
|
|
7412
7637
|
const newExpressions = [["", rootIIFE]];
|
|
7413
|
-
root.children = root.children.map(($
|
|
7638
|
+
root.children = root.children.map(($13) => $13 === root.expressions ? newExpressions : $13);
|
|
7414
7639
|
root.expressions = newExpressions;
|
|
7415
7640
|
}
|
|
7416
7641
|
addParentPointers(root);
|
|
@@ -7451,10 +7676,10 @@ async function processProgramAsync(root) {
|
|
|
7451
7676
|
await processComptime(statements);
|
|
7452
7677
|
}
|
|
7453
7678
|
function processRepl(root, rootIIFE) {
|
|
7454
|
-
const topBlock = gatherRecursive(rootIIFE, ($
|
|
7679
|
+
const topBlock = gatherRecursive(rootIIFE, ($14) => $14.type === "BlockStatement")[0];
|
|
7455
7680
|
let i = 0;
|
|
7456
|
-
for (let
|
|
7457
|
-
const decl =
|
|
7681
|
+
for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($15) => $15.type === "Declaration"), i11 = 0, len9 = ref22.length; i11 < len9; i11++) {
|
|
7682
|
+
const decl = ref22[i11];
|
|
7458
7683
|
if (!decl.names?.length) {
|
|
7459
7684
|
continue;
|
|
7460
7685
|
}
|
|
@@ -7467,8 +7692,8 @@ function processRepl(root, rootIIFE) {
|
|
|
7467
7692
|
root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]);
|
|
7468
7693
|
}
|
|
7469
7694
|
}
|
|
7470
|
-
for (let
|
|
7471
|
-
const func =
|
|
7695
|
+
for (let ref23 = gatherRecursive(topBlock, ($16) => $16.type === "FunctionExpression"), i12 = 0, len10 = ref23.length; i12 < len10; i12++) {
|
|
7696
|
+
const func = ref23[i12];
|
|
7472
7697
|
if (func.name && func.parent?.type === "BlockStatement") {
|
|
7473
7698
|
if (func.parent === topBlock) {
|
|
7474
7699
|
replaceNode(func, void 0);
|
|
@@ -7480,17 +7705,17 @@ function processRepl(root, rootIIFE) {
|
|
|
7480
7705
|
}
|
|
7481
7706
|
}
|
|
7482
7707
|
}
|
|
7483
|
-
for (let
|
|
7484
|
-
const classExp =
|
|
7485
|
-
let
|
|
7486
|
-
if (classExp.name && classExp.parent === topBlock || (
|
|
7708
|
+
for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($17) => $17.type === "ClassExpression"), i13 = 0, len11 = ref24.length; i13 < len11; i13++) {
|
|
7709
|
+
const classExp = ref24[i13];
|
|
7710
|
+
let m8;
|
|
7711
|
+
if (classExp.name && classExp.parent === topBlock || (m8 = classExp.parent, typeof m8 === "object" && m8 != null && "type" in m8 && m8.type === "ReturnStatement" && "parent" in m8 && m8.parent === topBlock)) {
|
|
7487
7712
|
classExp.children.unshift(classExp.name, "=");
|
|
7488
7713
|
root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]);
|
|
7489
7714
|
}
|
|
7490
7715
|
}
|
|
7491
7716
|
}
|
|
7492
7717
|
function populateRefs(statements) {
|
|
7493
|
-
const refNodes = gatherRecursive(statements, ($
|
|
7718
|
+
const refNodes = gatherRecursive(statements, ($18) => $18.type === "Ref");
|
|
7494
7719
|
if (refNodes.length) {
|
|
7495
7720
|
const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
|
|
7496
7721
|
const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
|
|
@@ -7513,8 +7738,8 @@ function populateRefs(statements) {
|
|
|
7513
7738
|
function processPlaceholders(statements) {
|
|
7514
7739
|
const placeholderMap = /* @__PURE__ */ new Map();
|
|
7515
7740
|
const liftedIfs = /* @__PURE__ */ new Set();
|
|
7516
|
-
for (let
|
|
7517
|
-
const exp =
|
|
7741
|
+
for (let ref25 = gatherRecursiveAll(statements, ($19) => $19.type === "Placeholder"), i14 = 0, len12 = ref25.length; i14 < len12; i14++) {
|
|
7742
|
+
const exp = ref25[i14];
|
|
7518
7743
|
let ancestor;
|
|
7519
7744
|
if (exp.subtype === ".") {
|
|
7520
7745
|
({ ancestor } = findAncestor(
|
|
@@ -7522,8 +7747,8 @@ function processPlaceholders(statements) {
|
|
|
7522
7747
|
($) => $.type === "Call" && !$.parent?.implicit
|
|
7523
7748
|
));
|
|
7524
7749
|
ancestor = ancestor?.parent;
|
|
7525
|
-
let
|
|
7526
|
-
while (ancestor?.parent != null && (
|
|
7750
|
+
let m9;
|
|
7751
|
+
while (ancestor?.parent != null && (m9 = ancestor.parent.type, m9 === "UnaryExpression" || m9 === "NewExpression" || m9 === "AwaitExpression" || m9 === "ThrowStatement" || m9 === "StatementExpression")) {
|
|
7527
7752
|
ancestor = ancestor.parent;
|
|
7528
7753
|
}
|
|
7529
7754
|
if (!ancestor) {
|
|
@@ -7540,10 +7765,10 @@ function processPlaceholders(statements) {
|
|
|
7540
7765
|
if (type === "IfStatement") {
|
|
7541
7766
|
liftedIfs.add(ancestor2);
|
|
7542
7767
|
}
|
|
7543
|
-
let
|
|
7544
|
-
let
|
|
7768
|
+
let m10;
|
|
7769
|
+
let m11;
|
|
7545
7770
|
return type === "Call" && !ancestor2.parent?.implicit || // Block, except for if/else blocks when condition already lifted
|
|
7546
|
-
type === "BlockStatement" && !((
|
|
7771
|
+
type === "BlockStatement" && !((m10 = ancestor2.parent, typeof m10 === "object" && m10 != null && "type" in m10 && m10.type === "IfStatement") && liftedIfs.has(ancestor2.parent)) && !((m11 = ancestor2.parent, typeof m11 === "object" && m11 != null && "type" in m11 && m11.type === "ElseClause" && "parent" in m11 && typeof m11.parent === "object" && m11.parent != null && "type" in m11.parent && m11.parent.type === "IfStatement") && liftedIfs.has(ancestor2.parent.parent)) || type === "PipelineExpression" || // Declaration
|
|
7547
7772
|
type === "Initializer" || // Right-hand side of assignment
|
|
7548
7773
|
type === "AssignmentExpression" && findChildIndex(ancestor2, child2) === ancestor2.children.indexOf(ancestor2.expression) || type === "ReturnStatement" || type === "YieldExpression";
|
|
7549
7774
|
}));
|
|
@@ -7617,11 +7842,11 @@ function processPlaceholders(statements) {
|
|
|
7617
7842
|
for (const [ancestor, placeholders] of placeholderMap) {
|
|
7618
7843
|
let ref = makeRef("$");
|
|
7619
7844
|
let typeSuffix;
|
|
7620
|
-
for (let
|
|
7621
|
-
const placeholder = placeholders[
|
|
7845
|
+
for (let i15 = 0, len13 = placeholders.length; i15 < len13; i15++) {
|
|
7846
|
+
const placeholder = placeholders[i15];
|
|
7622
7847
|
typeSuffix ??= placeholder.typeSuffix;
|
|
7623
|
-
let
|
|
7624
|
-
replaceNode((
|
|
7848
|
+
let ref26;
|
|
7849
|
+
replaceNode((ref26 = placeholder.children)[ref26.length - 1], ref);
|
|
7625
7850
|
}
|
|
7626
7851
|
const { parent } = ancestor;
|
|
7627
7852
|
const body = maybeUnwrap(ancestor);
|
|
@@ -7642,16 +7867,16 @@ function processPlaceholders(statements) {
|
|
|
7642
7867
|
}
|
|
7643
7868
|
case "PipelineExpression": {
|
|
7644
7869
|
const i = findChildIndex(parent, ancestor);
|
|
7645
|
-
let
|
|
7870
|
+
let ref27;
|
|
7646
7871
|
if (i === 1) {
|
|
7647
|
-
|
|
7872
|
+
ref27 = ancestor === parent.children[i];
|
|
7648
7873
|
} else if (i === 2) {
|
|
7649
|
-
|
|
7874
|
+
ref27 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
|
|
7650
7875
|
} else {
|
|
7651
|
-
|
|
7876
|
+
ref27 = void 0;
|
|
7652
7877
|
}
|
|
7653
7878
|
;
|
|
7654
|
-
outer =
|
|
7879
|
+
outer = ref27;
|
|
7655
7880
|
break;
|
|
7656
7881
|
}
|
|
7657
7882
|
case "AssignmentExpression":
|
|
@@ -7666,9 +7891,9 @@ function processPlaceholders(statements) {
|
|
|
7666
7891
|
fnExp = makeLeftHandSideExpression(fnExp);
|
|
7667
7892
|
}
|
|
7668
7893
|
replaceNode(ancestor, fnExp, parent);
|
|
7669
|
-
let
|
|
7670
|
-
if (
|
|
7671
|
-
const ws =
|
|
7894
|
+
let ref28;
|
|
7895
|
+
if (ref28 = getTrimmingSpace(body)) {
|
|
7896
|
+
const ws = ref28;
|
|
7672
7897
|
inplaceInsertTrimmingSpace(body, "");
|
|
7673
7898
|
inplacePrepend(ws, fnExp);
|
|
7674
7899
|
}
|
|
@@ -7713,8 +7938,8 @@ function reorderBindingRestProperty(props) {
|
|
|
7713
7938
|
}
|
|
7714
7939
|
];
|
|
7715
7940
|
}
|
|
7716
|
-
let
|
|
7717
|
-
if (Array.isArray(rest.delim) && (
|
|
7941
|
+
let ref29;
|
|
7942
|
+
if (Array.isArray(rest.delim) && (ref29 = rest.delim)[ref29.length - 1]?.token === ",") {
|
|
7718
7943
|
rest.delim = rest.delim.slice(0, -1);
|
|
7719
7944
|
rest.children = [...rest.children.slice(0, -1), rest.delim];
|
|
7720
7945
|
}
|
|
@@ -7811,11 +8036,10 @@ var grammar = {
|
|
|
7811
8036
|
ApplicationStart,
|
|
7812
8037
|
ForbiddenImplicitCalls,
|
|
7813
8038
|
ReservedBinary,
|
|
7814
|
-
|
|
7815
|
-
TrailingMemberExpressions,
|
|
7816
|
-
IndentedTrailingMemberExpression,
|
|
7817
|
-
AllowedTrailingMemberExpressions,
|
|
8039
|
+
ArgumentsWithTrailingCallExpressions,
|
|
7818
8040
|
TrailingCallExpressions,
|
|
8041
|
+
IndentedTrailingCallExpressions,
|
|
8042
|
+
NestedTrailingCallExpression,
|
|
7819
8043
|
AllowedTrailingCallExpressions,
|
|
7820
8044
|
CommaDelimiter,
|
|
7821
8045
|
OptionalCommaDelimiter,
|
|
@@ -7873,6 +8097,7 @@ var grammar = {
|
|
|
7873
8097
|
PipelineHeadItem,
|
|
7874
8098
|
PipelineTailItem,
|
|
7875
8099
|
PrimaryExpression,
|
|
8100
|
+
OptimizedParenthesizedExpression,
|
|
7876
8101
|
ParenthesizedExpression,
|
|
7877
8102
|
Placeholder,
|
|
7878
8103
|
PlaceholderTypeSuffix,
|
|
@@ -7926,6 +8151,7 @@ var grammar = {
|
|
|
7926
8151
|
ImplicitAccessStart,
|
|
7927
8152
|
PropertyAccessModifier,
|
|
7928
8153
|
PropertyAccess,
|
|
8154
|
+
ExplicitPropertyGlob,
|
|
7929
8155
|
PropertyGlob,
|
|
7930
8156
|
PropertyBind,
|
|
7931
8157
|
SuperProperty,
|
|
@@ -8748,125 +8974,126 @@ var $L123 = (0, import_lib2.$L)("sum");
|
|
|
8748
8974
|
var $L124 = (0, import_lib2.$L)("product");
|
|
8749
8975
|
var $L125 = (0, import_lib2.$L)("min");
|
|
8750
8976
|
var $L126 = (0, import_lib2.$L)("max");
|
|
8751
|
-
var $L127 = (0, import_lib2.$L)("
|
|
8752
|
-
var $L128 = (0, import_lib2.$L)("
|
|
8753
|
-
var $L129 = (0, import_lib2.$L)("
|
|
8754
|
-
var $L130 = (0, import_lib2.$L)("
|
|
8755
|
-
var $L131 = (0, import_lib2.$L)("
|
|
8756
|
-
var $L132 = (0, import_lib2.$L)("
|
|
8757
|
-
var $L133 = (0, import_lib2.$L)("
|
|
8758
|
-
var $L134 = (0, import_lib2.$L)("
|
|
8759
|
-
var $L135 = (0, import_lib2.$L)("
|
|
8760
|
-
var $L136 = (0, import_lib2.$L)("
|
|
8761
|
-
var $L137 = (0, import_lib2.$L)("
|
|
8762
|
-
var $L138 = (0, import_lib2.$L)("
|
|
8763
|
-
var $L139 = (0, import_lib2.$L)("
|
|
8764
|
-
var $L140 = (0, import_lib2.$L)("
|
|
8765
|
-
var $L141 = (0, import_lib2.$L)("
|
|
8766
|
-
var $L142 = (0, import_lib2.$L)("
|
|
8767
|
-
var $L143 = (0, import_lib2.$L)("
|
|
8768
|
-
var $L144 = (0, import_lib2.$L)("
|
|
8769
|
-
var $L145 = (0, import_lib2.$L)("
|
|
8770
|
-
var $L146 = (0, import_lib2.$L)("
|
|
8771
|
-
var $L147 = (0, import_lib2.$L)("
|
|
8772
|
-
var $L148 = (0, import_lib2.$L)("
|
|
8773
|
-
var $L149 = (0, import_lib2.$L)("
|
|
8774
|
-
var $L150 = (0, import_lib2.$L)("
|
|
8775
|
-
var $L151 = (0, import_lib2.$L)("
|
|
8776
|
-
var $L152 = (0, import_lib2.$L)("
|
|
8777
|
-
var $L153 = (0, import_lib2.$L)("
|
|
8778
|
-
var $L154 = (0, import_lib2.$L)("
|
|
8779
|
-
var $L155 = (0, import_lib2.$L)("
|
|
8780
|
-
var $L156 = (0, import_lib2.$L)("
|
|
8781
|
-
var $L157 = (0, import_lib2.$L)("
|
|
8782
|
-
var $L158 = (0, import_lib2.$L)("
|
|
8783
|
-
var $L159 = (0, import_lib2.$L)("
|
|
8784
|
-
var $L160 = (0, import_lib2.$L)("
|
|
8785
|
-
var $L161 = (0, import_lib2.$L)("
|
|
8786
|
-
var $L162 = (0, import_lib2.$L)("
|
|
8787
|
-
var $L163 = (0, import_lib2.$L)(
|
|
8788
|
-
var $L164 = (0, import_lib2.$L)("
|
|
8789
|
-
var $L165 = (0, import_lib2.$L)("
|
|
8790
|
-
var $L166 = (0, import_lib2.$L)("
|
|
8791
|
-
var $L167 = (0, import_lib2.$L)("
|
|
8792
|
-
var $L168 = (0, import_lib2.$L)("
|
|
8793
|
-
var $L169 = (0, import_lib2.$L)("
|
|
8794
|
-
var $L170 = (0, import_lib2.$L)("
|
|
8795
|
-
var $L171 = (0, import_lib2.$L)("
|
|
8796
|
-
var $L172 = (0, import_lib2.$L)("
|
|
8797
|
-
var $L173 = (0, import_lib2.$L)("
|
|
8798
|
-
var $L174 = (0, import_lib2.$L)("
|
|
8799
|
-
var $L175 = (0, import_lib2.$L)("
|
|
8800
|
-
var $L176 = (0, import_lib2.$L)("
|
|
8801
|
-
var $L177 = (0, import_lib2.$L)("
|
|
8802
|
-
var $L178 = (0, import_lib2.$L)("
|
|
8803
|
-
var $L179 = (0, import_lib2.$L)("
|
|
8804
|
-
var $L180 = (0, import_lib2.$L)("
|
|
8805
|
-
var $L181 = (0, import_lib2.$L)("
|
|
8806
|
-
var $L182 = (0, import_lib2.$L)("
|
|
8807
|
-
var $L183 = (0, import_lib2.$L)("
|
|
8808
|
-
var $L184 = (0, import_lib2.$L)("
|
|
8809
|
-
var $L185 = (0, import_lib2.$L)("
|
|
8810
|
-
var $L186 = (0, import_lib2.$L)("
|
|
8811
|
-
var $L187 = (0, import_lib2.$L)("
|
|
8812
|
-
var $L188 = (0, import_lib2.$L)("
|
|
8813
|
-
var $L189 = (0, import_lib2.$L)("
|
|
8814
|
-
var $L190 = (0, import_lib2.$L)("
|
|
8815
|
-
var $L191 = (0, import_lib2.$L)("
|
|
8816
|
-
var $L192 = (0, import_lib2.$L)("
|
|
8817
|
-
var $L193 = (0, import_lib2.$L)("
|
|
8818
|
-
var $L194 = (0, import_lib2.$L)("
|
|
8819
|
-
var $L195 = (0, import_lib2.$L)("
|
|
8820
|
-
var $L196 = (0, import_lib2.$L)("
|
|
8821
|
-
var $L197 = (0, import_lib2.$L)("
|
|
8822
|
-
var $L198 = (0, import_lib2.$L)("
|
|
8823
|
-
var $L199 = (0, import_lib2.$L)("
|
|
8824
|
-
var $L200 = (0, import_lib2.$L)("
|
|
8825
|
-
var $L201 = (0, import_lib2.$L)("
|
|
8826
|
-
var $L202 = (0, import_lib2.$L)("
|
|
8827
|
-
var $L203 = (0, import_lib2.$L)("
|
|
8828
|
-
var $L204 = (0, import_lib2.$L)("
|
|
8829
|
-
var $L205 = (0, import_lib2.$L)("
|
|
8830
|
-
var $L206 = (0, import_lib2.$L)("
|
|
8831
|
-
var $L207 = (0, import_lib2.$L)("
|
|
8832
|
-
var $L208 = (0, import_lib2.$L)("
|
|
8833
|
-
var $L209 = (0, import_lib2.$L)("
|
|
8834
|
-
var $L210 = (0, import_lib2.$L)("
|
|
8835
|
-
var $L211 = (0, import_lib2.$L)("
|
|
8836
|
-
var $L212 = (0, import_lib2.$L)("
|
|
8837
|
-
var $L213 = (0, import_lib2.$L)(
|
|
8838
|
-
var $L214 = (0, import_lib2.$L)("'
|
|
8839
|
-
var $L215 = (0, import_lib2.$L)("
|
|
8840
|
-
var $L216 = (0, import_lib2.$L)("
|
|
8841
|
-
var $L217 = (0, import_lib2.$L)("
|
|
8842
|
-
var $L218 = (0, import_lib2.$L)("
|
|
8843
|
-
var $L219 = (0, import_lib2.$L)("
|
|
8844
|
-
var $L220 = (0, import_lib2.$L)("
|
|
8845
|
-
var $L221 = (0, import_lib2.$L)("
|
|
8846
|
-
var $L222 = (0, import_lib2.$L)("
|
|
8847
|
-
var $L223 = (0, import_lib2.$L)("
|
|
8848
|
-
var $L224 = (0, import_lib2.$L)("
|
|
8849
|
-
var $L225 = (0, import_lib2.$L)("
|
|
8850
|
-
var $L226 = (0, import_lib2.$L)("
|
|
8851
|
-
var $L227 = (0, import_lib2.$L)("
|
|
8852
|
-
var $L228 = (0, import_lib2.$L)("
|
|
8853
|
-
var $L229 = (0, import_lib2.$L)("
|
|
8854
|
-
var $L230 = (0, import_lib2.$L)("
|
|
8855
|
-
var $L231 = (0, import_lib2.$L)("
|
|
8856
|
-
var $L232 = (0, import_lib2.$L)("
|
|
8857
|
-
var $L233 = (0, import_lib2.$L)("
|
|
8858
|
-
var $L234 = (0, import_lib2.$L)("
|
|
8859
|
-
var $L235 = (0, import_lib2.$L)("
|
|
8860
|
-
var $L236 = (0, import_lib2.$L)("
|
|
8861
|
-
var $L237 = (0, import_lib2.$L)("
|
|
8862
|
-
var $L238 = (0, import_lib2.$L)("
|
|
8863
|
-
var $L239 = (0, import_lib2.$L)("
|
|
8864
|
-
var $L240 = (0, import_lib2.$L)("
|
|
8865
|
-
var $L241 = (0, import_lib2.$L)("
|
|
8866
|
-
var $L242 = (0, import_lib2.$L)("
|
|
8867
|
-
var $L243 = (0, import_lib2.$L)("
|
|
8868
|
-
var $L244 = (0, import_lib2.$L)("
|
|
8869
|
-
var $L245 = (0, import_lib2.$L)("
|
|
8977
|
+
var $L127 = (0, import_lib2.$L)("join");
|
|
8978
|
+
var $L128 = (0, import_lib2.$L)("break");
|
|
8979
|
+
var $L129 = (0, import_lib2.$L)("continue");
|
|
8980
|
+
var $L130 = (0, import_lib2.$L)("debugger");
|
|
8981
|
+
var $L131 = (0, import_lib2.$L)("require");
|
|
8982
|
+
var $L132 = (0, import_lib2.$L)("with");
|
|
8983
|
+
var $L133 = (0, import_lib2.$L)("assert");
|
|
8984
|
+
var $L134 = (0, import_lib2.$L)(":=");
|
|
8985
|
+
var $L135 = (0, import_lib2.$L)("\u2254");
|
|
8986
|
+
var $L136 = (0, import_lib2.$L)(".=");
|
|
8987
|
+
var $L137 = (0, import_lib2.$L)("::=");
|
|
8988
|
+
var $L138 = (0, import_lib2.$L)("/*");
|
|
8989
|
+
var $L139 = (0, import_lib2.$L)("*/");
|
|
8990
|
+
var $L140 = (0, import_lib2.$L)("\\");
|
|
8991
|
+
var $L141 = (0, import_lib2.$L)(")");
|
|
8992
|
+
var $L142 = (0, import_lib2.$L)("abstract");
|
|
8993
|
+
var $L143 = (0, import_lib2.$L)("as");
|
|
8994
|
+
var $L144 = (0, import_lib2.$L)("@");
|
|
8995
|
+
var $L145 = (0, import_lib2.$L)("@@");
|
|
8996
|
+
var $L146 = (0, import_lib2.$L)("async");
|
|
8997
|
+
var $L147 = (0, import_lib2.$L)("await");
|
|
8998
|
+
var $L148 = (0, import_lib2.$L)("`");
|
|
8999
|
+
var $L149 = (0, import_lib2.$L)("by");
|
|
9000
|
+
var $L150 = (0, import_lib2.$L)("case");
|
|
9001
|
+
var $L151 = (0, import_lib2.$L)("catch");
|
|
9002
|
+
var $L152 = (0, import_lib2.$L)("class");
|
|
9003
|
+
var $L153 = (0, import_lib2.$L)("#{");
|
|
9004
|
+
var $L154 = (0, import_lib2.$L)("comptime");
|
|
9005
|
+
var $L155 = (0, import_lib2.$L)("declare");
|
|
9006
|
+
var $L156 = (0, import_lib2.$L)("default");
|
|
9007
|
+
var $L157 = (0, import_lib2.$L)("delete");
|
|
9008
|
+
var $L158 = (0, import_lib2.$L)("do");
|
|
9009
|
+
var $L159 = (0, import_lib2.$L)("..");
|
|
9010
|
+
var $L160 = (0, import_lib2.$L)("\u2025");
|
|
9011
|
+
var $L161 = (0, import_lib2.$L)("...");
|
|
9012
|
+
var $L162 = (0, import_lib2.$L)("\u2026");
|
|
9013
|
+
var $L163 = (0, import_lib2.$L)("::");
|
|
9014
|
+
var $L164 = (0, import_lib2.$L)('"');
|
|
9015
|
+
var $L165 = (0, import_lib2.$L)("each");
|
|
9016
|
+
var $L166 = (0, import_lib2.$L)("else");
|
|
9017
|
+
var $L167 = (0, import_lib2.$L)("!");
|
|
9018
|
+
var $L168 = (0, import_lib2.$L)("export");
|
|
9019
|
+
var $L169 = (0, import_lib2.$L)("extends");
|
|
9020
|
+
var $L170 = (0, import_lib2.$L)("finally");
|
|
9021
|
+
var $L171 = (0, import_lib2.$L)("for");
|
|
9022
|
+
var $L172 = (0, import_lib2.$L)("from");
|
|
9023
|
+
var $L173 = (0, import_lib2.$L)("function");
|
|
9024
|
+
var $L174 = (0, import_lib2.$L)("get");
|
|
9025
|
+
var $L175 = (0, import_lib2.$L)("set");
|
|
9026
|
+
var $L176 = (0, import_lib2.$L)("#");
|
|
9027
|
+
var $L177 = (0, import_lib2.$L)("if");
|
|
9028
|
+
var $L178 = (0, import_lib2.$L)("in");
|
|
9029
|
+
var $L179 = (0, import_lib2.$L)("infer");
|
|
9030
|
+
var $L180 = (0, import_lib2.$L)("let");
|
|
9031
|
+
var $L181 = (0, import_lib2.$L)("const");
|
|
9032
|
+
var $L182 = (0, import_lib2.$L)("is");
|
|
9033
|
+
var $L183 = (0, import_lib2.$L)("var");
|
|
9034
|
+
var $L184 = (0, import_lib2.$L)("like");
|
|
9035
|
+
var $L185 = (0, import_lib2.$L)("loop");
|
|
9036
|
+
var $L186 = (0, import_lib2.$L)("new");
|
|
9037
|
+
var $L187 = (0, import_lib2.$L)("not");
|
|
9038
|
+
var $L188 = (0, import_lib2.$L)("of");
|
|
9039
|
+
var $L189 = (0, import_lib2.$L)("[");
|
|
9040
|
+
var $L190 = (0, import_lib2.$L)("operator");
|
|
9041
|
+
var $L191 = (0, import_lib2.$L)("override");
|
|
9042
|
+
var $L192 = (0, import_lib2.$L)("own");
|
|
9043
|
+
var $L193 = (0, import_lib2.$L)("public");
|
|
9044
|
+
var $L194 = (0, import_lib2.$L)("private");
|
|
9045
|
+
var $L195 = (0, import_lib2.$L)("protected");
|
|
9046
|
+
var $L196 = (0, import_lib2.$L)("||>");
|
|
9047
|
+
var $L197 = (0, import_lib2.$L)("|\u25B7");
|
|
9048
|
+
var $L198 = (0, import_lib2.$L)("|>=");
|
|
9049
|
+
var $L199 = (0, import_lib2.$L)("\u25B7=");
|
|
9050
|
+
var $L200 = (0, import_lib2.$L)("|>");
|
|
9051
|
+
var $L201 = (0, import_lib2.$L)("\u25B7");
|
|
9052
|
+
var $L202 = (0, import_lib2.$L)("readonly");
|
|
9053
|
+
var $L203 = (0, import_lib2.$L)("return");
|
|
9054
|
+
var $L204 = (0, import_lib2.$L)("satisfies");
|
|
9055
|
+
var $L205 = (0, import_lib2.$L)("'");
|
|
9056
|
+
var $L206 = (0, import_lib2.$L)("static");
|
|
9057
|
+
var $L207 = (0, import_lib2.$L)("${");
|
|
9058
|
+
var $L208 = (0, import_lib2.$L)("super");
|
|
9059
|
+
var $L209 = (0, import_lib2.$L)("switch");
|
|
9060
|
+
var $L210 = (0, import_lib2.$L)("target");
|
|
9061
|
+
var $L211 = (0, import_lib2.$L)("then");
|
|
9062
|
+
var $L212 = (0, import_lib2.$L)("this");
|
|
9063
|
+
var $L213 = (0, import_lib2.$L)("throw");
|
|
9064
|
+
var $L214 = (0, import_lib2.$L)('"""');
|
|
9065
|
+
var $L215 = (0, import_lib2.$L)("'''");
|
|
9066
|
+
var $L216 = (0, import_lib2.$L)("///");
|
|
9067
|
+
var $L217 = (0, import_lib2.$L)("```");
|
|
9068
|
+
var $L218 = (0, import_lib2.$L)("try");
|
|
9069
|
+
var $L219 = (0, import_lib2.$L)("typeof");
|
|
9070
|
+
var $L220 = (0, import_lib2.$L)("undefined");
|
|
9071
|
+
var $L221 = (0, import_lib2.$L)("unless");
|
|
9072
|
+
var $L222 = (0, import_lib2.$L)("until");
|
|
9073
|
+
var $L223 = (0, import_lib2.$L)("using");
|
|
9074
|
+
var $L224 = (0, import_lib2.$L)("void");
|
|
9075
|
+
var $L225 = (0, import_lib2.$L)("when");
|
|
9076
|
+
var $L226 = (0, import_lib2.$L)("while");
|
|
9077
|
+
var $L227 = (0, import_lib2.$L)("yield");
|
|
9078
|
+
var $L228 = (0, import_lib2.$L)("/>");
|
|
9079
|
+
var $L229 = (0, import_lib2.$L)("</");
|
|
9080
|
+
var $L230 = (0, import_lib2.$L)("<>");
|
|
9081
|
+
var $L231 = (0, import_lib2.$L)("</>");
|
|
9082
|
+
var $L232 = (0, import_lib2.$L)("<!--");
|
|
9083
|
+
var $L233 = (0, import_lib2.$L)("-->");
|
|
9084
|
+
var $L234 = (0, import_lib2.$L)("type");
|
|
9085
|
+
var $L235 = (0, import_lib2.$L)("enum");
|
|
9086
|
+
var $L236 = (0, import_lib2.$L)("interface");
|
|
9087
|
+
var $L237 = (0, import_lib2.$L)("global");
|
|
9088
|
+
var $L238 = (0, import_lib2.$L)("module");
|
|
9089
|
+
var $L239 = (0, import_lib2.$L)("namespace");
|
|
9090
|
+
var $L240 = (0, import_lib2.$L)("asserts");
|
|
9091
|
+
var $L241 = (0, import_lib2.$L)("keyof");
|
|
9092
|
+
var $L242 = (0, import_lib2.$L)("???");
|
|
9093
|
+
var $L243 = (0, import_lib2.$L)("unique");
|
|
9094
|
+
var $L244 = (0, import_lib2.$L)("symbol");
|
|
9095
|
+
var $L245 = (0, import_lib2.$L)("[]");
|
|
9096
|
+
var $L246 = (0, import_lib2.$L)("civet");
|
|
8870
9097
|
var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
|
|
8871
9098
|
var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
|
|
8872
9099
|
var $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
@@ -9060,7 +9287,7 @@ var NestedExpressionizedStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((
|
|
|
9060
9287
|
return expression;
|
|
9061
9288
|
return {
|
|
9062
9289
|
type: "CallExpression",
|
|
9063
|
-
children: [expression, ...trailing
|
|
9290
|
+
children: [expression, ...trailing]
|
|
9064
9291
|
};
|
|
9065
9292
|
});
|
|
9066
9293
|
function NestedExpressionizedStatement(ctx, state2) {
|
|
@@ -9073,7 +9300,7 @@ var ExpressionizedStatementWithTrailingCallExpressions$0 = (0, import_lib2.$TS)(
|
|
|
9073
9300
|
type: "CallExpression",
|
|
9074
9301
|
children: [
|
|
9075
9302
|
makeLeftHandSideExpression($1),
|
|
9076
|
-
|
|
9303
|
+
...$2
|
|
9077
9304
|
]
|
|
9078
9305
|
};
|
|
9079
9306
|
});
|
|
@@ -9165,7 +9392,7 @@ var ExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, Al
|
|
|
9165
9392
|
function ExplicitArguments(ctx, state2) {
|
|
9166
9393
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitArguments", ExplicitArguments$0);
|
|
9167
9394
|
}
|
|
9168
|
-
var ApplicationStart$0 = (0, import_lib2.$S)(IndentedApplicationAllowed, (0, import_lib2.$Y)((0, import_lib2.$S)(IndentedFurther, (0, import_lib2.$N)(IdentifierBinaryOp), (0, import_lib2.$N)(ReservedBinary))), (0, import_lib2.$N)(
|
|
9395
|
+
var ApplicationStart$0 = (0, import_lib2.$S)(IndentedApplicationAllowed, (0, import_lib2.$Y)((0, import_lib2.$S)(IndentedFurther, (0, import_lib2.$N)(IdentifierBinaryOp), (0, import_lib2.$N)(ReservedBinary))), (0, import_lib2.$N)(IndentedTrailingCallExpressions));
|
|
9169
9396
|
var ApplicationStart$1 = (0, import_lib2.$S)((0, import_lib2.$N)(EOS), (0, import_lib2.$Y)((0, import_lib2.$S)(_, (0, import_lib2.$C)(BracedApplicationAllowed, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L1, 'ApplicationStart "{"'))), (0, import_lib2.$N)(ForbiddenImplicitCalls))));
|
|
9170
9397
|
var ApplicationStart$$ = [ApplicationStart$0, ApplicationStart$1];
|
|
9171
9398
|
function ApplicationStart(ctx, state2) {
|
|
@@ -9198,39 +9425,45 @@ var ReservedBinary$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R2, "Rese
|
|
|
9198
9425
|
function ReservedBinary(ctx, state2) {
|
|
9199
9426
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReservedBinary", ReservedBinary$0);
|
|
9200
9427
|
}
|
|
9201
|
-
var
|
|
9428
|
+
var ArgumentsWithTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9202
9429
|
var args = $1;
|
|
9203
9430
|
var trailing = $2;
|
|
9204
|
-
return [args, ...trailing];
|
|
9431
|
+
return [args, ...trailing ?? []];
|
|
9205
9432
|
});
|
|
9206
|
-
function
|
|
9207
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "
|
|
9433
|
+
function ArgumentsWithTrailingCallExpressions(ctx, state2) {
|
|
9434
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingCallExpressions", ArgumentsWithTrailingCallExpressions$0);
|
|
9208
9435
|
}
|
|
9209
|
-
var
|
|
9436
|
+
var TrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(IndentedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9437
|
+
$1 = $1.flat();
|
|
9438
|
+
if (!$1.length && !$2)
|
|
9439
|
+
return $skip;
|
|
9440
|
+
if (!$2)
|
|
9441
|
+
return $1;
|
|
9210
9442
|
return [...$1, ...$2];
|
|
9211
9443
|
});
|
|
9212
|
-
function
|
|
9213
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "
|
|
9444
|
+
function TrailingCallExpressions(ctx, state2) {
|
|
9445
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "TrailingCallExpressions", TrailingCallExpressions$0);
|
|
9214
9446
|
}
|
|
9215
|
-
var
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
return
|
|
9447
|
+
var IndentedTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedTrailingCallExpression), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
9448
|
+
if (!$2.length)
|
|
9449
|
+
return $skip;
|
|
9450
|
+
return $2.flat();
|
|
9219
9451
|
});
|
|
9220
|
-
|
|
9221
|
-
return (
|
|
9222
|
-
}
|
|
9223
|
-
var AllowedTrailingMemberExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingMemberExpressions), function(value) {
|
|
9224
|
-
return value[1];
|
|
9452
|
+
var IndentedTrailingCallExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingCallExpression), function($skip, $loc, $0, $1) {
|
|
9453
|
+
return $1.flat();
|
|
9225
9454
|
});
|
|
9226
|
-
var
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
return (0, import_lib2.$EVENT_C)(ctx, state2, "AllowedTrailingMemberExpressions", AllowedTrailingMemberExpressions$$);
|
|
9455
|
+
var IndentedTrailingCallExpressions$$ = [IndentedTrailingCallExpressions$0, IndentedTrailingCallExpressions$1];
|
|
9456
|
+
function IndentedTrailingCallExpressions(ctx, state2) {
|
|
9457
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingCallExpressions", IndentedTrailingCallExpressions$$);
|
|
9230
9458
|
}
|
|
9231
|
-
var
|
|
9232
|
-
|
|
9233
|
-
|
|
9459
|
+
var NestedTrailingCallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Nested, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$EXPECT)($L6, 'NestedTrailingCallExpression "?"')), (0, import_lib2.$EXPECT)($L7, 'NestedTrailingCallExpression "."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R3, "NestedTrailingCallExpression /[0-9]/")))), (0, import_lib2.$P)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
9460
|
+
var ws = $1;
|
|
9461
|
+
var rests = $3;
|
|
9462
|
+
const [first, ...rest] = rests.flat();
|
|
9463
|
+
return [prepend(ws, first), ...rest];
|
|
9464
|
+
});
|
|
9465
|
+
function NestedTrailingCallExpression(ctx, state2) {
|
|
9466
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingCallExpression", NestedTrailingCallExpression$0);
|
|
9234
9467
|
}
|
|
9235
9468
|
var AllowedTrailingCallExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingCallExpressions), function(value) {
|
|
9236
9469
|
return value[1];
|
|
@@ -9835,7 +10068,7 @@ function PipelineExpressionBodySameLine(ctx, state2) {
|
|
|
9835
10068
|
return (0, import_lib2.$EVENT)(ctx, state2, "PipelineExpressionBodySameLine", PipelineExpressionBodySameLine$0);
|
|
9836
10069
|
}
|
|
9837
10070
|
var PipelineHeadItem$0 = NonPipelineExpression;
|
|
9838
|
-
var PipelineHeadItem$1 =
|
|
10071
|
+
var PipelineHeadItem$1 = OptimizedParenthesizedExpression;
|
|
9839
10072
|
var PipelineHeadItem$$ = [PipelineHeadItem$0, PipelineHeadItem$1];
|
|
9840
10073
|
function PipelineHeadItem(ctx, state2) {
|
|
9841
10074
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PipelineHeadItem", PipelineHeadItem$$);
|
|
@@ -9870,7 +10103,7 @@ var PrimaryExpression$5 = FunctionExpression;
|
|
|
9870
10103
|
var PrimaryExpression$6 = IdentifierReference;
|
|
9871
10104
|
var PrimaryExpression$7 = ClassExpression;
|
|
9872
10105
|
var PrimaryExpression$8 = RegularExpressionLiteral;
|
|
9873
|
-
var PrimaryExpression$9 =
|
|
10106
|
+
var PrimaryExpression$9 = OptimizedParenthesizedExpression;
|
|
9874
10107
|
var PrimaryExpression$10 = Placeholder;
|
|
9875
10108
|
var PrimaryExpression$11 = SymbolLiteral;
|
|
9876
10109
|
var PrimaryExpression$12 = JSXImplicitFragment;
|
|
@@ -9878,31 +10111,36 @@ var PrimaryExpression$$ = [PrimaryExpression$0, PrimaryExpression$1, PrimaryExpr
|
|
|
9878
10111
|
function PrimaryExpression(ctx, state2) {
|
|
9879
10112
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PrimaryExpression", PrimaryExpression$$);
|
|
9880
10113
|
}
|
|
10114
|
+
var OptimizedParenthesizedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ParenthesizedExpression), function($skip, $loc, $0, $1) {
|
|
10115
|
+
const { expression } = $1;
|
|
10116
|
+
switch (expression.type) {
|
|
10117
|
+
case "StatementExpression":
|
|
10118
|
+
if (expression.statement.type !== "IterationExpression")
|
|
10119
|
+
break;
|
|
10120
|
+
case "IterationExpression":
|
|
10121
|
+
return expression;
|
|
10122
|
+
}
|
|
10123
|
+
return $1;
|
|
10124
|
+
});
|
|
10125
|
+
function OptimizedParenthesizedExpression(ctx, state2) {
|
|
10126
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "OptimizedParenthesizedExpression", OptimizedParenthesizedExpression$0);
|
|
10127
|
+
}
|
|
9881
10128
|
var ParenthesizedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, AllowAll, (0, import_lib2.$E)((0, import_lib2.$S)(PostfixedCommaExpression, __, CloseParen)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
9882
10129
|
var open = $1;
|
|
9883
10130
|
if (!$3)
|
|
9884
10131
|
return $skip;
|
|
9885
|
-
const [
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
case "ParenthesizedExpression":
|
|
9893
|
-
if (exp.implicit) {
|
|
9894
|
-
return {
|
|
9895
|
-
...exp,
|
|
9896
|
-
children: [open, exp.expression, ws, close],
|
|
9897
|
-
implicit: false
|
|
9898
|
-
};
|
|
9899
|
-
}
|
|
9900
|
-
break;
|
|
10132
|
+
const [expression, ws, close] = $3;
|
|
10133
|
+
if (expression.type === "ParenthesizedExpression" && expression.implicit) {
|
|
10134
|
+
return {
|
|
10135
|
+
...expression,
|
|
10136
|
+
children: [open, expression.expression, ws, close],
|
|
10137
|
+
implicit: false
|
|
10138
|
+
};
|
|
9901
10139
|
}
|
|
9902
10140
|
return {
|
|
9903
10141
|
type: "ParenthesizedExpression",
|
|
9904
|
-
children: [open,
|
|
9905
|
-
expression
|
|
10142
|
+
children: [open, expression, ws, close],
|
|
10143
|
+
expression
|
|
9906
10144
|
};
|
|
9907
10145
|
});
|
|
9908
10146
|
function ParenthesizedExpression(ctx, state2) {
|
|
@@ -10415,7 +10653,7 @@ var LeftHandSideExpression$$ = [LeftHandSideExpression$0, LeftHandSideExpression
|
|
|
10415
10653
|
function LeftHandSideExpression(ctx, state2) {
|
|
10416
10654
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LeftHandSideExpression", LeftHandSideExpression$$);
|
|
10417
10655
|
}
|
|
10418
|
-
var CallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Super,
|
|
10656
|
+
var CallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Super, ArgumentsWithTrailingCallExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
10419
10657
|
var rest = $3;
|
|
10420
10658
|
return processCallMemberExpression({
|
|
10421
10659
|
type: "CallExpression",
|
|
@@ -10433,22 +10671,22 @@ var CallExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __,
|
|
|
10433
10671
|
var imports = $5;
|
|
10434
10672
|
return dynamizeImportDeclarationExpression([i, iws, imports, fws, from]);
|
|
10435
10673
|
});
|
|
10436
|
-
var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'),
|
|
10674
|
+
var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
10437
10675
|
var rest = $3;
|
|
10438
10676
|
return processCallMemberExpression({
|
|
10439
10677
|
type: "CallExpression",
|
|
10440
10678
|
children: [$1, ...$2, ...rest.flat()]
|
|
10441
10679
|
});
|
|
10442
10680
|
});
|
|
10443
|
-
var CallExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(MemberExpression,
|
|
10681
|
+
var CallExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(MemberExpression, (0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3) {
|
|
10444
10682
|
var member = $1;
|
|
10445
|
-
var
|
|
10446
|
-
var
|
|
10447
|
-
if (rest.length || trailing
|
|
10683
|
+
var rest = $2;
|
|
10684
|
+
var trailing = $3;
|
|
10685
|
+
if (rest.length || trailing) {
|
|
10448
10686
|
rest = rest.flat();
|
|
10449
10687
|
return processCallMemberExpression({
|
|
10450
10688
|
type: "CallExpression",
|
|
10451
|
-
children: [member, ...
|
|
10689
|
+
children: [member, ...rest, ...trailing ?? []]
|
|
10452
10690
|
});
|
|
10453
10691
|
}
|
|
10454
10692
|
return member;
|
|
@@ -10468,7 +10706,7 @@ var CallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_l
|
|
|
10468
10706
|
}
|
|
10469
10707
|
return literal;
|
|
10470
10708
|
});
|
|
10471
|
-
var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand),
|
|
10709
|
+
var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingCallExpressions), function($skip, $loc, $0, $1, $2) {
|
|
10472
10710
|
var optional = $1;
|
|
10473
10711
|
var argsWithTrailing = $2;
|
|
10474
10712
|
if (!optional)
|
|
@@ -10835,6 +11073,12 @@ var PropertyAccess$$ = [PropertyAccess$0, PropertyAccess$1, PropertyAccess$2, Pr
|
|
|
10835
11073
|
function PropertyAccess(ctx, state2) {
|
|
10836
11074
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PropertyAccess", PropertyAccess$$);
|
|
10837
11075
|
}
|
|
11076
|
+
var ExplicitPropertyGlob$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(ExplicitAccessStart), PropertyGlob), function(value) {
|
|
11077
|
+
return value[1];
|
|
11078
|
+
});
|
|
11079
|
+
function ExplicitPropertyGlob(ctx, state2) {
|
|
11080
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitPropertyGlob", ExplicitPropertyGlob$0);
|
|
11081
|
+
}
|
|
10838
11082
|
var PropertyGlob$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$S)((0, import_lib2.$E)(PropertyAccessModifier), OptionalDot), (0, import_lib2.$Q)(InlineComment), BracedObjectLiteral), function($skip, $loc, $0, $1, $2, $3) {
|
|
10839
11083
|
var dot = $1;
|
|
10840
11084
|
var object = $3;
|
|
@@ -11447,19 +11691,13 @@ var BindingElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.
|
|
|
11447
11691
|
var binding = $2;
|
|
11448
11692
|
var typeSuffix = $3;
|
|
11449
11693
|
var initializer = $4;
|
|
11450
|
-
if (binding.children) {
|
|
11451
|
-
binding = {
|
|
11452
|
-
...binding,
|
|
11453
|
-
initializer,
|
|
11454
|
-
children: [...binding.children, initializer]
|
|
11455
|
-
};
|
|
11456
|
-
}
|
|
11457
11694
|
return {
|
|
11458
11695
|
type: "BindingElement",
|
|
11459
11696
|
names: binding.names,
|
|
11460
11697
|
typeSuffix,
|
|
11461
11698
|
binding,
|
|
11462
|
-
children: [ws, binding]
|
|
11699
|
+
children: [ws, binding, initializer],
|
|
11700
|
+
initializer
|
|
11463
11701
|
};
|
|
11464
11702
|
});
|
|
11465
11703
|
var BindingElement$2 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($L17, 'BindingElement ","'))), function($skip, $loc, $0, $1) {
|
|
@@ -12163,11 +12401,9 @@ var SingleLineStatements$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidNewl
|
|
|
12163
12401
|
const expressions = [...stmts];
|
|
12164
12402
|
if (last)
|
|
12165
12403
|
expressions.push(last);
|
|
12166
|
-
const maybeComment = expressions.at(-1)?.[2]?.children?.[2]?.at(-1);
|
|
12167
|
-
const hasTrailingComment = maybeComment?.type === "Comment" && maybeComment.token.startsWith("//");
|
|
12168
12404
|
const children = [expressions];
|
|
12169
|
-
if (hasTrailingComment)
|
|
12170
|
-
children.push("\n");
|
|
12405
|
+
if (hasTrailingComment(expressions))
|
|
12406
|
+
children.push(["\n"]);
|
|
12171
12407
|
return {
|
|
12172
12408
|
type: "BlockStatement",
|
|
12173
12409
|
expressions,
|
|
@@ -13251,7 +13487,7 @@ var MethodDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Abstract, __,
|
|
|
13251
13487
|
ts: true
|
|
13252
13488
|
};
|
|
13253
13489
|
});
|
|
13254
|
-
var MethodDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(MethodSignature, (0, import_lib2.$N)((0, import_lib2.$C)(PropertyAccess, UnaryPostfix, NonNullAssertion)), (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3) {
|
|
13490
|
+
var MethodDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(MethodSignature, (0, import_lib2.$N)((0, import_lib2.$C)(PropertyAccess, ExplicitPropertyGlob, UnaryPostfix, NonNullAssertion)), (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3) {
|
|
13255
13491
|
var signature = $1;
|
|
13256
13492
|
var block = $3;
|
|
13257
13493
|
let children = $0;
|
|
@@ -14471,7 +14707,7 @@ var ForStatementControlWithReduction$$ = [ForStatementControlWithReduction$0, Fo
|
|
|
14471
14707
|
function ForStatementControlWithReduction(ctx, state2) {
|
|
14472
14708
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ForStatementControlWithReduction", ForStatementControlWithReduction$$);
|
|
14473
14709
|
}
|
|
14474
|
-
var ForReduction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L120, 'ForReduction "some"'), (0, import_lib2.$EXPECT)($L121, 'ForReduction "every"'), (0, import_lib2.$EXPECT)($L122, 'ForReduction "count"'), (0, import_lib2.$EXPECT)($L123, 'ForReduction "sum"'), (0, import_lib2.$EXPECT)($L124, 'ForReduction "product"'), (0, import_lib2.$EXPECT)($L125, 'ForReduction "min"'), (0, import_lib2.$EXPECT)($L126, 'ForReduction "max"')), NonIdContinue, __), function($skip, $loc, $0, $1, $2, $3) {
|
|
14710
|
+
var ForReduction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L120, 'ForReduction "some"'), (0, import_lib2.$EXPECT)($L121, 'ForReduction "every"'), (0, import_lib2.$EXPECT)($L122, 'ForReduction "count"'), (0, import_lib2.$EXPECT)($L123, 'ForReduction "sum"'), (0, import_lib2.$EXPECT)($L124, 'ForReduction "product"'), (0, import_lib2.$EXPECT)($L125, 'ForReduction "min"'), (0, import_lib2.$EXPECT)($L126, 'ForReduction "max"'), (0, import_lib2.$EXPECT)($L127, 'ForReduction "join"')), NonIdContinue, __), function($skip, $loc, $0, $1, $2, $3) {
|
|
14475
14711
|
var subtype = $1;
|
|
14476
14712
|
var ws = $3;
|
|
14477
14713
|
return {
|
|
@@ -15045,7 +15281,7 @@ var Condition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, Decl
|
|
|
15045
15281
|
expression
|
|
15046
15282
|
};
|
|
15047
15283
|
});
|
|
15048
|
-
var Condition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, InsertOpenParen, (0, import_lib2.$E)((0, import_lib2.$S)(Nested,
|
|
15284
|
+
var Condition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, InsertOpenParen, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), InsertCloseParen, PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
15049
15285
|
var open = $2;
|
|
15050
15286
|
var expression = $3;
|
|
15051
15287
|
var close = $4;
|
|
@@ -15074,7 +15310,7 @@ var Condition$$ = [Condition$0, Condition$1, Condition$2, Condition$3, Condition
|
|
|
15074
15310
|
function Condition(ctx, state2) {
|
|
15075
15311
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Condition", Condition$$);
|
|
15076
15312
|
}
|
|
15077
|
-
var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen,
|
|
15313
|
+
var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, PostfixedExpression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
|
|
15078
15314
|
var open = $1;
|
|
15079
15315
|
var expression = $2;
|
|
15080
15316
|
var close = $3;
|
|
@@ -15421,19 +15657,19 @@ var ThrowStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Throw, MaybeParen
|
|
|
15421
15657
|
function ThrowStatement(ctx, state2) {
|
|
15422
15658
|
return (0, import_lib2.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
|
|
15423
15659
|
}
|
|
15424
|
-
var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15660
|
+
var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L128, 'Break "break"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15425
15661
|
return { $loc, token: $1 };
|
|
15426
15662
|
});
|
|
15427
15663
|
function Break(ctx, state2) {
|
|
15428
15664
|
return (0, import_lib2.$EVENT)(ctx, state2, "Break", Break$0);
|
|
15429
15665
|
}
|
|
15430
|
-
var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15666
|
+
var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L129, 'Continue "continue"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15431
15667
|
return { $loc, token: $1 };
|
|
15432
15668
|
});
|
|
15433
15669
|
function Continue(ctx, state2) {
|
|
15434
15670
|
return (0, import_lib2.$EVENT)(ctx, state2, "Continue", Continue$0);
|
|
15435
15671
|
}
|
|
15436
|
-
var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15672
|
+
var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L130, 'Debugger "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15437
15673
|
return { $loc, token: $1 };
|
|
15438
15674
|
});
|
|
15439
15675
|
function Debugger(ctx, state2) {
|
|
@@ -15501,7 +15737,7 @@ var MaybeParenNestedExpression$$ = [MaybeParenNestedExpression$0, MaybeParenNest
|
|
|
15501
15737
|
function MaybeParenNestedExpression(ctx, state2) {
|
|
15502
15738
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
|
|
15503
15739
|
}
|
|
15504
|
-
var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($
|
|
15740
|
+
var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($L131, 'ImportDeclaration "require"'), NonIdContinue, Arguments), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
15505
15741
|
const imp = [
|
|
15506
15742
|
{ ...$1, ts: true },
|
|
15507
15743
|
{ ...$1, token: "const", js: true }
|
|
@@ -15691,7 +15927,7 @@ var ImpliedFrom$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImpliedF
|
|
|
15691
15927
|
function ImpliedFrom(ctx, state2) {
|
|
15692
15928
|
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
|
|
15693
15929
|
}
|
|
15694
|
-
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
15930
|
+
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L132, 'ImportAssertion "with"'), (0, import_lib2.$EXPECT)($L133, 'ImportAssertion "assert"')), NonIdContinue, (0, import_lib2.$E)(_), ObjectLiteral), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
15695
15931
|
var keyword = $2;
|
|
15696
15932
|
var object = $5;
|
|
15697
15933
|
return {
|
|
@@ -16017,19 +16253,19 @@ var LexicalDeclaration$$ = [LexicalDeclaration$0, LexicalDeclaration$1];
|
|
|
16017
16253
|
function LexicalDeclaration(ctx, state2) {
|
|
16018
16254
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
|
|
16019
16255
|
}
|
|
16020
|
-
var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
16256
|
+
var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L134, 'ConstAssignment ":="'), (0, import_lib2.$EXPECT)($L135, 'ConstAssignment "\u2254"')), function($skip, $loc, $0, $1) {
|
|
16021
16257
|
return { $loc, token: "=", decl: "const " };
|
|
16022
16258
|
});
|
|
16023
16259
|
function ConstAssignment(ctx, state2) {
|
|
16024
16260
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
|
|
16025
16261
|
}
|
|
16026
|
-
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16262
|
+
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
|
|
16027
16263
|
return { $loc, token: "=", decl: "let " };
|
|
16028
16264
|
});
|
|
16029
16265
|
function LetAssignment(ctx, state2) {
|
|
16030
16266
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
|
|
16031
16267
|
}
|
|
16032
|
-
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16268
|
+
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L137, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
|
|
16033
16269
|
return { $loc, token: "=" };
|
|
16034
16270
|
});
|
|
16035
16271
|
function TypeAssignment(ctx, state2) {
|
|
@@ -16452,7 +16688,7 @@ var MultiLineComment$$ = [MultiLineComment$0, MultiLineComment$1];
|
|
|
16452
16688
|
function MultiLineComment(ctx, state2) {
|
|
16453
16689
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
|
|
16454
16690
|
}
|
|
16455
|
-
var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16691
|
+
var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L138, 'JSMultiLineComment "/*"'), (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L139, 'JSMultiLineComment "*/"')), (0, import_lib2.$EXPECT)($R68, "JSMultiLineComment /./"))), (0, import_lib2.$EXPECT)($L139, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
|
|
16456
16692
|
return { type: "Comment", $loc, token: $1 };
|
|
16457
16693
|
});
|
|
16458
16694
|
function JSMultiLineComment(ctx, state2) {
|
|
@@ -16498,7 +16734,7 @@ function _(ctx, state2) {
|
|
|
16498
16734
|
var NonNewlineWhitespace$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R23, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
16499
16735
|
return { $loc, token: $0 };
|
|
16500
16736
|
});
|
|
16501
|
-
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16737
|
+
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
|
|
16502
16738
|
return " ";
|
|
16503
16739
|
});
|
|
16504
16740
|
var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
|
|
@@ -16549,7 +16785,7 @@ var StatementDelimiter$$ = [StatementDelimiter$0, StatementDelimiter$1, Statemen
|
|
|
16549
16785
|
function StatementDelimiter(ctx, state2) {
|
|
16550
16786
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
|
|
16551
16787
|
}
|
|
16552
|
-
var ClosingDelimiter$0 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L37, 'ClosingDelimiter "}"'), (0, import_lib2.$EXPECT)($
|
|
16788
|
+
var ClosingDelimiter$0 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L37, 'ClosingDelimiter "}"'), (0, import_lib2.$EXPECT)($L141, 'ClosingDelimiter ")"'), (0, import_lib2.$EXPECT)($L46, 'ClosingDelimiter "]"'))));
|
|
16553
16789
|
function ClosingDelimiter(ctx, state2) {
|
|
16554
16790
|
return (0, import_lib2.$EVENT)(ctx, state2, "ClosingDelimiter", ClosingDelimiter$0);
|
|
16555
16791
|
}
|
|
@@ -16572,7 +16808,7 @@ var Loc$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Loc ""'), functi
|
|
|
16572
16808
|
function Loc(ctx, state2) {
|
|
16573
16809
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
|
|
16574
16810
|
}
|
|
16575
|
-
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16811
|
+
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L142, 'Abstract "abstract"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L18, 'Abstract " "')))), function($skip, $loc, $0, $1) {
|
|
16576
16812
|
return { $loc, token: $1, ts: true };
|
|
16577
16813
|
});
|
|
16578
16814
|
function Abstract(ctx, state2) {
|
|
@@ -16584,43 +16820,43 @@ var Ampersand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L117, 'Ampersan
|
|
|
16584
16820
|
function Ampersand(ctx, state2) {
|
|
16585
16821
|
return (0, import_lib2.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
|
|
16586
16822
|
}
|
|
16587
|
-
var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16823
|
+
var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L143, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16588
16824
|
return { $loc, token: $1 };
|
|
16589
16825
|
});
|
|
16590
16826
|
function As(ctx, state2) {
|
|
16591
16827
|
return (0, import_lib2.$EVENT)(ctx, state2, "As", As$0);
|
|
16592
16828
|
}
|
|
16593
|
-
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16829
|
+
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'At "@"'), function($skip, $loc, $0, $1) {
|
|
16594
16830
|
return { $loc, token: $1 };
|
|
16595
16831
|
});
|
|
16596
16832
|
function At(ctx, state2) {
|
|
16597
16833
|
return (0, import_lib2.$EVENT)(ctx, state2, "At", At$0);
|
|
16598
16834
|
}
|
|
16599
|
-
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16835
|
+
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L145, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
|
|
16600
16836
|
return { $loc, token: "@" };
|
|
16601
16837
|
});
|
|
16602
16838
|
function AtAt(ctx, state2) {
|
|
16603
16839
|
return (0, import_lib2.$EVENT)(ctx, state2, "AtAt", AtAt$0);
|
|
16604
16840
|
}
|
|
16605
|
-
var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16841
|
+
var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L146, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16606
16842
|
return { $loc, token: $1, type: "Async" };
|
|
16607
16843
|
});
|
|
16608
16844
|
function Async(ctx, state2) {
|
|
16609
16845
|
return (0, import_lib2.$EVENT)(ctx, state2, "Async", Async$0);
|
|
16610
16846
|
}
|
|
16611
|
-
var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16847
|
+
var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L147, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16612
16848
|
return { $loc, token: $1, type: "Await" };
|
|
16613
16849
|
});
|
|
16614
16850
|
function Await(ctx, state2) {
|
|
16615
16851
|
return (0, import_lib2.$EVENT)(ctx, state2, "Await", Await$0);
|
|
16616
16852
|
}
|
|
16617
|
-
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16853
|
+
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L148, 'Backtick "`"'), function($skip, $loc, $0, $1) {
|
|
16618
16854
|
return { $loc, token: $1 };
|
|
16619
16855
|
});
|
|
16620
16856
|
function Backtick(ctx, state2) {
|
|
16621
16857
|
return (0, import_lib2.$EVENT)(ctx, state2, "Backtick", Backtick$0);
|
|
16622
16858
|
}
|
|
16623
|
-
var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16859
|
+
var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L149, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16624
16860
|
return { $loc, token: $1 };
|
|
16625
16861
|
});
|
|
16626
16862
|
function By(ctx, state2) {
|
|
@@ -16632,19 +16868,19 @@ var Caret$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L22, 'Caret "^"'),
|
|
|
16632
16868
|
function Caret(ctx, state2) {
|
|
16633
16869
|
return (0, import_lib2.$EVENT)(ctx, state2, "Caret", Caret$0);
|
|
16634
16870
|
}
|
|
16635
|
-
var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16871
|
+
var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L150, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16636
16872
|
return { $loc, token: $1 };
|
|
16637
16873
|
});
|
|
16638
16874
|
function Case(ctx, state2) {
|
|
16639
16875
|
return (0, import_lib2.$EVENT)(ctx, state2, "Case", Case$0);
|
|
16640
16876
|
}
|
|
16641
|
-
var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16877
|
+
var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L151, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16642
16878
|
return { $loc, token: $1 };
|
|
16643
16879
|
});
|
|
16644
16880
|
function Catch(ctx, state2) {
|
|
16645
16881
|
return (0, import_lib2.$EVENT)(ctx, state2, "Catch", Catch$0);
|
|
16646
16882
|
}
|
|
16647
|
-
var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16883
|
+
var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L152, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16648
16884
|
return { $loc, token: $1 };
|
|
16649
16885
|
});
|
|
16650
16886
|
function Class(ctx, state2) {
|
|
@@ -16668,13 +16904,13 @@ var CloseBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L46, 'CloseB
|
|
|
16668
16904
|
function CloseBracket(ctx, state2) {
|
|
16669
16905
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
|
|
16670
16906
|
}
|
|
16671
|
-
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16907
|
+
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L141, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
|
|
16672
16908
|
return { $loc, token: $1 };
|
|
16673
16909
|
});
|
|
16674
16910
|
function CloseParen(ctx, state2) {
|
|
16675
16911
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
|
|
16676
16912
|
}
|
|
16677
|
-
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16913
|
+
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L153, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
|
|
16678
16914
|
return { $loc, token: "${" };
|
|
16679
16915
|
});
|
|
16680
16916
|
function CoffeeSubstitutionStart(ctx, state2) {
|
|
@@ -16692,37 +16928,37 @@ var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L17, 'Comma ","'),
|
|
|
16692
16928
|
function Comma(ctx, state2) {
|
|
16693
16929
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comma", Comma$0);
|
|
16694
16930
|
}
|
|
16695
|
-
var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16931
|
+
var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L154, 'Comptime "comptime"'), NonIdContinue, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L16, 'Comptime ":"'))), function($skip, $loc, $0, $1, $2, $3) {
|
|
16696
16932
|
return { $loc, token: $1 };
|
|
16697
16933
|
});
|
|
16698
16934
|
function Comptime(ctx, state2) {
|
|
16699
16935
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comptime", Comptime$0);
|
|
16700
16936
|
}
|
|
16701
|
-
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16937
|
+
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
|
|
16702
16938
|
return { $loc, token: "constructor" };
|
|
16703
16939
|
});
|
|
16704
16940
|
function ConstructorShorthand(ctx, state2) {
|
|
16705
16941
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
|
|
16706
16942
|
}
|
|
16707
|
-
var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16943
|
+
var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L155, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16708
16944
|
return { $loc, token: $1 };
|
|
16709
16945
|
});
|
|
16710
16946
|
function Declare(ctx, state2) {
|
|
16711
16947
|
return (0, import_lib2.$EVENT)(ctx, state2, "Declare", Declare$0);
|
|
16712
16948
|
}
|
|
16713
|
-
var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16949
|
+
var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L156, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16714
16950
|
return { $loc, token: $1 };
|
|
16715
16951
|
});
|
|
16716
16952
|
function Default(ctx, state2) {
|
|
16717
16953
|
return (0, import_lib2.$EVENT)(ctx, state2, "Default", Default$0);
|
|
16718
16954
|
}
|
|
16719
|
-
var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16955
|
+
var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L157, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16720
16956
|
return { $loc, token: $1 };
|
|
16721
16957
|
});
|
|
16722
16958
|
function Delete(ctx, state2) {
|
|
16723
16959
|
return (0, import_lib2.$EVENT)(ctx, state2, "Delete", Delete$0);
|
|
16724
16960
|
}
|
|
16725
|
-
var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16961
|
+
var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L158, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16726
16962
|
return { $loc, token: $1 };
|
|
16727
16963
|
});
|
|
16728
16964
|
function Do(ctx, state2) {
|
|
@@ -16742,20 +16978,20 @@ var Dot$$ = [Dot$0, Dot$1];
|
|
|
16742
16978
|
function Dot(ctx, state2) {
|
|
16743
16979
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Dot", Dot$$);
|
|
16744
16980
|
}
|
|
16745
|
-
var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16981
|
+
var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L159, 'DotDot ".."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L7, 'DotDot "."'))), function($skip, $loc, $0, $1, $2) {
|
|
16746
16982
|
return { $loc, token: $1 };
|
|
16747
16983
|
});
|
|
16748
|
-
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16984
|
+
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
|
|
16749
16985
|
return { $loc, token: ".." };
|
|
16750
16986
|
});
|
|
16751
16987
|
var DotDot$$ = [DotDot$0, DotDot$1];
|
|
16752
16988
|
function DotDot(ctx, state2) {
|
|
16753
16989
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
|
|
16754
16990
|
}
|
|
16755
|
-
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16991
|
+
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
|
|
16756
16992
|
return { $loc, token: $1 };
|
|
16757
16993
|
});
|
|
16758
|
-
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16994
|
+
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
|
|
16759
16995
|
return { $loc, token: "..." };
|
|
16760
16996
|
});
|
|
16761
16997
|
var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
|
|
@@ -16768,31 +17004,31 @@ var InsertDotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Inse
|
|
|
16768
17004
|
function InsertDotDotDot(ctx, state2) {
|
|
16769
17005
|
return (0, import_lib2.$EVENT)(ctx, state2, "InsertDotDotDot", InsertDotDotDot$0);
|
|
16770
17006
|
}
|
|
16771
|
-
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17007
|
+
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
|
|
16772
17008
|
return { $loc, token: $1 };
|
|
16773
17009
|
});
|
|
16774
17010
|
function DoubleColon(ctx, state2) {
|
|
16775
17011
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
|
|
16776
17012
|
}
|
|
16777
|
-
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17013
|
+
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
|
|
16778
17014
|
return { $loc, token: ":" };
|
|
16779
17015
|
});
|
|
16780
17016
|
function DoubleColonAsColon(ctx, state2) {
|
|
16781
17017
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
|
|
16782
17018
|
}
|
|
16783
|
-
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17019
|
+
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L164, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
16784
17020
|
return { $loc, token: $1 };
|
|
16785
17021
|
});
|
|
16786
17022
|
function DoubleQuote(ctx, state2) {
|
|
16787
17023
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
|
|
16788
17024
|
}
|
|
16789
|
-
var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17025
|
+
var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L165, 'Each "each"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16790
17026
|
return { $loc, token: $1 };
|
|
16791
17027
|
});
|
|
16792
17028
|
function Each(ctx, state2) {
|
|
16793
17029
|
return (0, import_lib2.$EVENT)(ctx, state2, "Each", Each$0);
|
|
16794
17030
|
}
|
|
16795
|
-
var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17031
|
+
var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L166, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16796
17032
|
return { $loc, token: $1 };
|
|
16797
17033
|
});
|
|
16798
17034
|
function Else(ctx, state2) {
|
|
@@ -16804,61 +17040,61 @@ var Equals$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L3, 'Equals "="'),
|
|
|
16804
17040
|
function Equals(ctx, state2) {
|
|
16805
17041
|
return (0, import_lib2.$EVENT)(ctx, state2, "Equals", Equals$0);
|
|
16806
17042
|
}
|
|
16807
|
-
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17043
|
+
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L167, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
|
|
16808
17044
|
return { $loc, token: $1 };
|
|
16809
17045
|
});
|
|
16810
17046
|
function ExclamationPoint(ctx, state2) {
|
|
16811
17047
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
|
|
16812
17048
|
}
|
|
16813
|
-
var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17049
|
+
var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L168, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16814
17050
|
return { $loc, token: $1 };
|
|
16815
17051
|
});
|
|
16816
17052
|
function Export(ctx, state2) {
|
|
16817
17053
|
return (0, import_lib2.$EVENT)(ctx, state2, "Export", Export$0);
|
|
16818
17054
|
}
|
|
16819
|
-
var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17055
|
+
var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L169, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16820
17056
|
return { $loc, token: $1 };
|
|
16821
17057
|
});
|
|
16822
17058
|
function Extends(ctx, state2) {
|
|
16823
17059
|
return (0, import_lib2.$EVENT)(ctx, state2, "Extends", Extends$0);
|
|
16824
17060
|
}
|
|
16825
|
-
var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17061
|
+
var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L170, 'Finally "finally"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16826
17062
|
return { $loc, token: $1 };
|
|
16827
17063
|
});
|
|
16828
17064
|
function Finally(ctx, state2) {
|
|
16829
17065
|
return (0, import_lib2.$EVENT)(ctx, state2, "Finally", Finally$0);
|
|
16830
17066
|
}
|
|
16831
|
-
var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17067
|
+
var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L171, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16832
17068
|
return { $loc, token: $1 };
|
|
16833
17069
|
});
|
|
16834
17070
|
function For(ctx, state2) {
|
|
16835
17071
|
return (0, import_lib2.$EVENT)(ctx, state2, "For", For$0);
|
|
16836
17072
|
}
|
|
16837
|
-
var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17073
|
+
var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L172, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16838
17074
|
return { $loc, token: $1 };
|
|
16839
17075
|
});
|
|
16840
17076
|
function From(ctx, state2) {
|
|
16841
17077
|
return (0, import_lib2.$EVENT)(ctx, state2, "From", From$0);
|
|
16842
17078
|
}
|
|
16843
|
-
var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17079
|
+
var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L173, 'Function "function"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16844
17080
|
return { $loc, token: $1 };
|
|
16845
17081
|
});
|
|
16846
17082
|
function Function2(ctx, state2) {
|
|
16847
17083
|
return (0, import_lib2.$EVENT)(ctx, state2, "Function", Function$0);
|
|
16848
17084
|
}
|
|
16849
|
-
var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17085
|
+
var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L174, 'GetOrSet "get"'), (0, import_lib2.$EXPECT)($L175, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16850
17086
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
16851
17087
|
});
|
|
16852
17088
|
function GetOrSet(ctx, state2) {
|
|
16853
17089
|
return (0, import_lib2.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
|
|
16854
17090
|
}
|
|
16855
|
-
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17091
|
+
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L176, 'Hash "#"'), function($skip, $loc, $0, $1) {
|
|
16856
17092
|
return { $loc, token: $1 };
|
|
16857
17093
|
});
|
|
16858
17094
|
function Hash(ctx, state2) {
|
|
16859
17095
|
return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
|
|
16860
17096
|
}
|
|
16861
|
-
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17097
|
+
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L177, 'If "if"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L18, 'If " "')))), function($skip, $loc, $0, $1) {
|
|
16862
17098
|
return { $loc, token: $1 };
|
|
16863
17099
|
});
|
|
16864
17100
|
function If(ctx, state2) {
|
|
@@ -16870,67 +17106,67 @@ var Import$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)
|
|
|
16870
17106
|
function Import(ctx, state2) {
|
|
16871
17107
|
return (0, import_lib2.$EVENT)(ctx, state2, "Import", Import$0);
|
|
16872
17108
|
}
|
|
16873
|
-
var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17109
|
+
var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L178, 'In "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16874
17110
|
return { $loc, token: $1 };
|
|
16875
17111
|
});
|
|
16876
17112
|
function In(ctx, state2) {
|
|
16877
17113
|
return (0, import_lib2.$EVENT)(ctx, state2, "In", In$0);
|
|
16878
17114
|
}
|
|
16879
|
-
var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17115
|
+
var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L179, 'Infer "infer"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16880
17116
|
return { $loc, token: $1 };
|
|
16881
17117
|
});
|
|
16882
17118
|
function Infer(ctx, state2) {
|
|
16883
17119
|
return (0, import_lib2.$EVENT)(ctx, state2, "Infer", Infer$0);
|
|
16884
17120
|
}
|
|
16885
|
-
var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17121
|
+
var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L180, 'LetOrConst "let"'), (0, import_lib2.$EXPECT)($L181, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16886
17122
|
return { $loc, token: $1 };
|
|
16887
17123
|
});
|
|
16888
17124
|
function LetOrConst(ctx, state2) {
|
|
16889
17125
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
|
|
16890
17126
|
}
|
|
16891
|
-
var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17127
|
+
var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L181, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16892
17128
|
return { $loc, token: $1 };
|
|
16893
17129
|
});
|
|
16894
17130
|
function Const(ctx, state2) {
|
|
16895
17131
|
return (0, import_lib2.$EVENT)(ctx, state2, "Const", Const$0);
|
|
16896
17132
|
}
|
|
16897
|
-
var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17133
|
+
var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L182, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16898
17134
|
return { $loc, token: $1 };
|
|
16899
17135
|
});
|
|
16900
17136
|
function Is(ctx, state2) {
|
|
16901
17137
|
return (0, import_lib2.$EVENT)(ctx, state2, "Is", Is$0);
|
|
16902
17138
|
}
|
|
16903
|
-
var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17139
|
+
var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L180, 'LetOrConstOrVar "let"'), (0, import_lib2.$EXPECT)($L181, 'LetOrConstOrVar "const"'), (0, import_lib2.$EXPECT)($L183, 'LetOrConstOrVar "var"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16904
17140
|
return { $loc, token: $1 };
|
|
16905
17141
|
});
|
|
16906
17142
|
function LetOrConstOrVar(ctx, state2) {
|
|
16907
17143
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
|
|
16908
17144
|
}
|
|
16909
|
-
var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17145
|
+
var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L184, 'Like "like"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16910
17146
|
return { $loc, token: $1 };
|
|
16911
17147
|
});
|
|
16912
17148
|
function Like(ctx, state2) {
|
|
16913
17149
|
return (0, import_lib2.$EVENT)(ctx, state2, "Like", Like$0);
|
|
16914
17150
|
}
|
|
16915
|
-
var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17151
|
+
var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L185, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16916
17152
|
return { $loc, token: "while" };
|
|
16917
17153
|
});
|
|
16918
17154
|
function Loop(ctx, state2) {
|
|
16919
17155
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loop", Loop$0);
|
|
16920
17156
|
}
|
|
16921
|
-
var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17157
|
+
var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L186, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16922
17158
|
return { $loc, token: $1 };
|
|
16923
17159
|
});
|
|
16924
17160
|
function New(ctx, state2) {
|
|
16925
17161
|
return (0, import_lib2.$EVENT)(ctx, state2, "New", New$0);
|
|
16926
17162
|
}
|
|
16927
|
-
var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17163
|
+
var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L187, 'Not "not"'), NonIdContinue, (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($L16, 'Not ":"')))), function($skip, $loc, $0, $1, $2, $3) {
|
|
16928
17164
|
return { $loc, token: "!" };
|
|
16929
17165
|
});
|
|
16930
17166
|
function Not(ctx, state2) {
|
|
16931
17167
|
return (0, import_lib2.$EVENT)(ctx, state2, "Not", Not$0);
|
|
16932
17168
|
}
|
|
16933
|
-
var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17169
|
+
var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L188, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16934
17170
|
return { $loc, token: $1 };
|
|
16935
17171
|
});
|
|
16936
17172
|
function Of(ctx, state2) {
|
|
@@ -16948,7 +17184,7 @@ var OpenBrace$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L1, 'OpenBrace
|
|
|
16948
17184
|
function OpenBrace(ctx, state2) {
|
|
16949
17185
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
|
|
16950
17186
|
}
|
|
16951
|
-
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17187
|
+
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L189, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
16952
17188
|
return { $loc, token: $1 };
|
|
16953
17189
|
});
|
|
16954
17190
|
function OpenBracket(ctx, state2) {
|
|
@@ -16960,49 +17196,49 @@ var OpenParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L4, 'OpenParen
|
|
|
16960
17196
|
function OpenParen(ctx, state2) {
|
|
16961
17197
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
|
|
16962
17198
|
}
|
|
16963
|
-
var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17199
|
+
var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L190, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16964
17200
|
return { $loc, token: $1 };
|
|
16965
17201
|
});
|
|
16966
17202
|
function Operator(ctx, state2) {
|
|
16967
17203
|
return (0, import_lib2.$EVENT)(ctx, state2, "Operator", Operator$0);
|
|
16968
17204
|
}
|
|
16969
|
-
var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17205
|
+
var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L191, 'Override "override"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16970
17206
|
return { $loc, token: $1, ts: true };
|
|
16971
17207
|
});
|
|
16972
17208
|
function Override(ctx, state2) {
|
|
16973
17209
|
return (0, import_lib2.$EVENT)(ctx, state2, "Override", Override$0);
|
|
16974
17210
|
}
|
|
16975
|
-
var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17211
|
+
var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L192, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16976
17212
|
return { $loc, token: $1 };
|
|
16977
17213
|
});
|
|
16978
17214
|
function Own(ctx, state2) {
|
|
16979
17215
|
return (0, import_lib2.$EVENT)(ctx, state2, "Own", Own$0);
|
|
16980
17216
|
}
|
|
16981
|
-
var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17217
|
+
var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L193, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16982
17218
|
return { $loc, token: $1 };
|
|
16983
17219
|
});
|
|
16984
17220
|
function Public(ctx, state2) {
|
|
16985
17221
|
return (0, import_lib2.$EVENT)(ctx, state2, "Public", Public$0);
|
|
16986
17222
|
}
|
|
16987
|
-
var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17223
|
+
var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L194, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16988
17224
|
return { $loc, token: $1 };
|
|
16989
17225
|
});
|
|
16990
17226
|
function Private(ctx, state2) {
|
|
16991
17227
|
return (0, import_lib2.$EVENT)(ctx, state2, "Private", Private$0);
|
|
16992
17228
|
}
|
|
16993
|
-
var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17229
|
+
var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L195, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16994
17230
|
return { $loc, token: $1 };
|
|
16995
17231
|
});
|
|
16996
17232
|
function Protected(ctx, state2) {
|
|
16997
17233
|
return (0, import_lib2.$EVENT)(ctx, state2, "Protected", Protected$0);
|
|
16998
17234
|
}
|
|
16999
|
-
var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17235
|
+
var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L196, 'Pipe "||>"'), (0, import_lib2.$EXPECT)($L197, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
|
|
17000
17236
|
return { $loc, token: "||>" };
|
|
17001
17237
|
});
|
|
17002
|
-
var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17238
|
+
var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L198, 'Pipe "|>="'), (0, import_lib2.$EXPECT)($L199, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
|
|
17003
17239
|
return { $loc, token: "|>=" };
|
|
17004
17240
|
});
|
|
17005
|
-
var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17241
|
+
var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L200, 'Pipe "|>"'), (0, import_lib2.$EXPECT)($L201, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
|
|
17006
17242
|
return { $loc, token: "|>" };
|
|
17007
17243
|
});
|
|
17008
17244
|
var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
|
|
@@ -17015,19 +17251,19 @@ var QuestionMark$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L6, 'Questio
|
|
|
17015
17251
|
function QuestionMark(ctx, state2) {
|
|
17016
17252
|
return (0, import_lib2.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
|
|
17017
17253
|
}
|
|
17018
|
-
var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17254
|
+
var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17019
17255
|
return { $loc, token: $1, ts: true };
|
|
17020
17256
|
});
|
|
17021
17257
|
function Readonly(ctx, state2) {
|
|
17022
17258
|
return (0, import_lib2.$EVENT)(ctx, state2, "Readonly", Readonly$0);
|
|
17023
17259
|
}
|
|
17024
|
-
var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17260
|
+
var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L203, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17025
17261
|
return { $loc, token: $1 };
|
|
17026
17262
|
});
|
|
17027
17263
|
function Return(ctx, state2) {
|
|
17028
17264
|
return (0, import_lib2.$EVENT)(ctx, state2, "Return", Return$0);
|
|
17029
17265
|
}
|
|
17030
|
-
var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17266
|
+
var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L204, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17031
17267
|
return { $loc, token: $1 };
|
|
17032
17268
|
});
|
|
17033
17269
|
function Satisfies(ctx, state2) {
|
|
@@ -17039,7 +17275,7 @@ var Semicolon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L119, 'Semicolo
|
|
|
17039
17275
|
function Semicolon(ctx, state2) {
|
|
17040
17276
|
return (0, import_lib2.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
|
|
17041
17277
|
}
|
|
17042
|
-
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17278
|
+
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L205, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
17043
17279
|
return { $loc, token: $1 };
|
|
17044
17280
|
});
|
|
17045
17281
|
function SingleQuote(ctx, state2) {
|
|
@@ -17051,149 +17287,149 @@ var Star$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L75, 'Star "*"'), fu
|
|
|
17051
17287
|
function Star(ctx, state2) {
|
|
17052
17288
|
return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
|
|
17053
17289
|
}
|
|
17054
|
-
var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17290
|
+
var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L206, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17055
17291
|
return { $loc, token: $1 };
|
|
17056
17292
|
});
|
|
17057
|
-
var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17293
|
+
var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L144, 'Static "@"'), (0, import_lib2.$N)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L4, 'Static "("'), (0, import_lib2.$EXPECT)($L144, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
|
|
17058
17294
|
return { $loc, token: "static " };
|
|
17059
17295
|
});
|
|
17060
17296
|
var Static$$ = [Static$0, Static$1];
|
|
17061
17297
|
function Static(ctx, state2) {
|
|
17062
17298
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Static", Static$$);
|
|
17063
17299
|
}
|
|
17064
|
-
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17300
|
+
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L207, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
17065
17301
|
return { $loc, token: $1 };
|
|
17066
17302
|
});
|
|
17067
17303
|
function SubstitutionStart(ctx, state2) {
|
|
17068
17304
|
return (0, import_lib2.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
|
|
17069
17305
|
}
|
|
17070
|
-
var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17306
|
+
var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L208, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17071
17307
|
return { $loc, token: $1 };
|
|
17072
17308
|
});
|
|
17073
17309
|
function Super(ctx, state2) {
|
|
17074
17310
|
return (0, import_lib2.$EVENT)(ctx, state2, "Super", Super$0);
|
|
17075
17311
|
}
|
|
17076
|
-
var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17312
|
+
var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L209, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17077
17313
|
return { $loc, token: $1 };
|
|
17078
17314
|
});
|
|
17079
17315
|
function Switch(ctx, state2) {
|
|
17080
17316
|
return (0, import_lib2.$EVENT)(ctx, state2, "Switch", Switch$0);
|
|
17081
17317
|
}
|
|
17082
|
-
var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17318
|
+
var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L210, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17083
17319
|
return { $loc, token: $1 };
|
|
17084
17320
|
});
|
|
17085
17321
|
function Target(ctx, state2) {
|
|
17086
17322
|
return (0, import_lib2.$EVENT)(ctx, state2, "Target", Target$0);
|
|
17087
17323
|
}
|
|
17088
|
-
var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
17324
|
+
var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L211, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
17089
17325
|
return { $loc, token: "" };
|
|
17090
17326
|
});
|
|
17091
17327
|
function Then(ctx, state2) {
|
|
17092
17328
|
return (0, import_lib2.$EVENT)(ctx, state2, "Then", Then$0);
|
|
17093
17329
|
}
|
|
17094
|
-
var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17330
|
+
var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L212, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17095
17331
|
return { $loc, token: $1 };
|
|
17096
17332
|
});
|
|
17097
17333
|
function This(ctx, state2) {
|
|
17098
17334
|
return (0, import_lib2.$EVENT)(ctx, state2, "This", This$0);
|
|
17099
17335
|
}
|
|
17100
|
-
var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17336
|
+
var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L213, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17101
17337
|
return { $loc, token: $1 };
|
|
17102
17338
|
});
|
|
17103
17339
|
function Throw(ctx, state2) {
|
|
17104
17340
|
return (0, import_lib2.$EVENT)(ctx, state2, "Throw", Throw$0);
|
|
17105
17341
|
}
|
|
17106
|
-
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17342
|
+
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
17107
17343
|
return { $loc, token: "`" };
|
|
17108
17344
|
});
|
|
17109
17345
|
function TripleDoubleQuote(ctx, state2) {
|
|
17110
17346
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
|
|
17111
17347
|
}
|
|
17112
|
-
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17348
|
+
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
17113
17349
|
return { $loc, token: "`" };
|
|
17114
17350
|
});
|
|
17115
17351
|
function TripleSingleQuote(ctx, state2) {
|
|
17116
17352
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
|
|
17117
17353
|
}
|
|
17118
|
-
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17354
|
+
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
17119
17355
|
return { $loc, token: "/" };
|
|
17120
17356
|
});
|
|
17121
17357
|
function TripleSlash(ctx, state2) {
|
|
17122
17358
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
|
|
17123
17359
|
}
|
|
17124
|
-
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17360
|
+
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L217, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
17125
17361
|
return { $loc, token: "`" };
|
|
17126
17362
|
});
|
|
17127
17363
|
function TripleTick(ctx, state2) {
|
|
17128
17364
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
|
|
17129
17365
|
}
|
|
17130
|
-
var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17366
|
+
var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L218, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17131
17367
|
return { $loc, token: $1 };
|
|
17132
17368
|
});
|
|
17133
17369
|
function Try(ctx, state2) {
|
|
17134
17370
|
return (0, import_lib2.$EVENT)(ctx, state2, "Try", Try$0);
|
|
17135
17371
|
}
|
|
17136
|
-
var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17372
|
+
var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L219, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17137
17373
|
return { $loc, token: $1 };
|
|
17138
17374
|
});
|
|
17139
17375
|
function Typeof(ctx, state2) {
|
|
17140
17376
|
return (0, import_lib2.$EVENT)(ctx, state2, "Typeof", Typeof$0);
|
|
17141
17377
|
}
|
|
17142
|
-
var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17378
|
+
var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L220, 'Undefined "undefined"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17143
17379
|
return { $loc, token: $1 };
|
|
17144
17380
|
});
|
|
17145
17381
|
function Undefined(ctx, state2) {
|
|
17146
17382
|
return (0, import_lib2.$EVENT)(ctx, state2, "Undefined", Undefined$0);
|
|
17147
17383
|
}
|
|
17148
|
-
var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17384
|
+
var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L221, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17149
17385
|
return { $loc, token: $1, negated: true };
|
|
17150
17386
|
});
|
|
17151
17387
|
function Unless(ctx, state2) {
|
|
17152
17388
|
return (0, import_lib2.$EVENT)(ctx, state2, "Unless", Unless$0);
|
|
17153
17389
|
}
|
|
17154
|
-
var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17390
|
+
var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L222, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17155
17391
|
return { $loc, token: $1, negated: true };
|
|
17156
17392
|
});
|
|
17157
17393
|
function Until(ctx, state2) {
|
|
17158
17394
|
return (0, import_lib2.$EVENT)(ctx, state2, "Until", Until$0);
|
|
17159
17395
|
}
|
|
17160
|
-
var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17396
|
+
var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L223, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17161
17397
|
return { $loc, token: $1 };
|
|
17162
17398
|
});
|
|
17163
17399
|
function Using(ctx, state2) {
|
|
17164
17400
|
return (0, import_lib2.$EVENT)(ctx, state2, "Using", Using$0);
|
|
17165
17401
|
}
|
|
17166
|
-
var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17402
|
+
var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L183, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17167
17403
|
return { $loc, token: $1 };
|
|
17168
17404
|
});
|
|
17169
17405
|
function Var(ctx, state2) {
|
|
17170
17406
|
return (0, import_lib2.$EVENT)(ctx, state2, "Var", Var$0);
|
|
17171
17407
|
}
|
|
17172
|
-
var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17408
|
+
var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L224, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17173
17409
|
return { $loc, token: $1 };
|
|
17174
17410
|
});
|
|
17175
17411
|
function Void(ctx, state2) {
|
|
17176
17412
|
return (0, import_lib2.$EVENT)(ctx, state2, "Void", Void$0);
|
|
17177
17413
|
}
|
|
17178
|
-
var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17414
|
+
var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L225, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17179
17415
|
return { $loc, token: "case" };
|
|
17180
17416
|
});
|
|
17181
17417
|
function When(ctx, state2) {
|
|
17182
17418
|
return (0, import_lib2.$EVENT)(ctx, state2, "When", When$0);
|
|
17183
17419
|
}
|
|
17184
|
-
var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17420
|
+
var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L226, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17185
17421
|
return { $loc, token: $1 };
|
|
17186
17422
|
});
|
|
17187
17423
|
function While(ctx, state2) {
|
|
17188
17424
|
return (0, import_lib2.$EVENT)(ctx, state2, "While", While$0);
|
|
17189
17425
|
}
|
|
17190
|
-
var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17426
|
+
var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L132, 'With "with"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17191
17427
|
return { $loc, token: $1 };
|
|
17192
17428
|
});
|
|
17193
17429
|
function With(ctx, state2) {
|
|
17194
17430
|
return (0, import_lib2.$EVENT)(ctx, state2, "With", With$0);
|
|
17195
17431
|
}
|
|
17196
|
-
var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17432
|
+
var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L227, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17197
17433
|
return { $loc, token: $1, type: "Yield" };
|
|
17198
17434
|
});
|
|
17199
17435
|
function Yield(ctx, state2) {
|
|
@@ -17272,7 +17508,7 @@ var JSXElement$$ = [JSXElement$0, JSXElement$1, JSXElement$2];
|
|
|
17272
17508
|
function JSXElement(ctx, state2) {
|
|
17273
17509
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
|
|
17274
17510
|
}
|
|
17275
|
-
var JSXSelfClosingElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L19, 'JSXSelfClosingElement "<"'), JSXElementName, (0, import_lib2.$E)(TypeArguments), (0, import_lib2.$E)(JSXAttributes), (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($
|
|
17511
|
+
var JSXSelfClosingElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L19, 'JSXSelfClosingElement "<"'), JSXElementName, (0, import_lib2.$E)(TypeArguments), (0, import_lib2.$E)(JSXAttributes), (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L228, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
17276
17512
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
17277
17513
|
});
|
|
17278
17514
|
function JSXSelfClosingElement(ctx, state2) {
|
|
@@ -17306,7 +17542,7 @@ var JSXOptionalClosingElement$$ = [JSXOptionalClosingElement$0, JSXOptionalClosi
|
|
|
17306
17542
|
function JSXOptionalClosingElement(ctx, state2) {
|
|
17307
17543
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
|
|
17308
17544
|
}
|
|
17309
|
-
var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17545
|
+
var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L229, 'JSXClosingElement "</"'), (0, import_lib2.$E)(Whitespace), JSXElementName, (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L45, 'JSXClosingElement ">"'));
|
|
17310
17546
|
function JSXClosingElement(ctx, state2) {
|
|
17311
17547
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
|
|
17312
17548
|
}
|
|
@@ -17327,7 +17563,7 @@ var JSXFragment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)
|
|
|
17327
17563
|
];
|
|
17328
17564
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
17329
17565
|
});
|
|
17330
|
-
var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($
|
|
17566
|
+
var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($L230, 'JSXFragment "<>"'), (0, import_lib2.$E)(JSXChildren), (0, import_lib2.$E)(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
17331
17567
|
var children = $3;
|
|
17332
17568
|
$0 = $0.slice(1);
|
|
17333
17569
|
return {
|
|
@@ -17340,7 +17576,7 @@ var JSXFragment$$ = [JSXFragment$0, JSXFragment$1];
|
|
|
17340
17576
|
function JSXFragment(ctx, state2) {
|
|
17341
17577
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
|
|
17342
17578
|
}
|
|
17343
|
-
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17579
|
+
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L230, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
17344
17580
|
state.JSXTagStack.push("");
|
|
17345
17581
|
return $1;
|
|
17346
17582
|
});
|
|
@@ -17357,11 +17593,11 @@ var JSXOptionalClosingFragment$$ = [JSXOptionalClosingFragment$0, JSXOptionalClo
|
|
|
17357
17593
|
function JSXOptionalClosingFragment(ctx, state2) {
|
|
17358
17594
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
|
|
17359
17595
|
}
|
|
17360
|
-
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($
|
|
17596
|
+
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L231, 'JSXClosingFragment "</>"');
|
|
17361
17597
|
function JSXClosingFragment(ctx, state2) {
|
|
17362
17598
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
|
|
17363
17599
|
}
|
|
17364
|
-
var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17600
|
+
var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L176, 'JSXElementName "#"'), Dot), JSXShorthandString)), function($skip, $loc, $0, $1) {
|
|
17365
17601
|
return config.defaultElement;
|
|
17366
17602
|
});
|
|
17367
17603
|
var JSXElementName$1 = (0, import_lib2.$TEXT)((0, import_lib2.$S)(JSXIdentifierName, (0, import_lib2.$C)((0, import_lib2.$S)(Colon, JSXIdentifierName), (0, import_lib2.$Q)((0, import_lib2.$S)(Dot, JSXIdentifierName)))));
|
|
@@ -17542,7 +17778,7 @@ var JSXAttribute$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(Identifier, (0, im
|
|
|
17542
17778
|
}
|
|
17543
17779
|
return $skip;
|
|
17544
17780
|
});
|
|
17545
|
-
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17781
|
+
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L176, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
17546
17782
|
return [" ", "id=", $2];
|
|
17547
17783
|
});
|
|
17548
17784
|
var JSXAttribute$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
@@ -17763,7 +17999,7 @@ var InlineJSXPrimaryExpression$5 = ArrayLiteral;
|
|
|
17763
17999
|
var InlineJSXPrimaryExpression$6 = BracedObjectLiteral;
|
|
17764
18000
|
var InlineJSXPrimaryExpression$7 = IdentifierReference;
|
|
17765
18001
|
var InlineJSXPrimaryExpression$8 = RegularExpressionLiteral;
|
|
17766
|
-
var InlineJSXPrimaryExpression$9 =
|
|
18002
|
+
var InlineJSXPrimaryExpression$9 = OptimizedParenthesizedExpression;
|
|
17767
18003
|
var InlineJSXPrimaryExpression$$ = [InlineJSXPrimaryExpression$0, InlineJSXPrimaryExpression$1, InlineJSXPrimaryExpression$2, InlineJSXPrimaryExpression$3, InlineJSXPrimaryExpression$4, InlineJSXPrimaryExpression$5, InlineJSXPrimaryExpression$6, InlineJSXPrimaryExpression$7, InlineJSXPrimaryExpression$8, InlineJSXPrimaryExpression$9];
|
|
17768
18004
|
function InlineJSXPrimaryExpression(ctx, state2) {
|
|
17769
18005
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "InlineJSXPrimaryExpression", InlineJSXPrimaryExpression$$);
|
|
@@ -17887,7 +18123,7 @@ var JSXChildGeneral$$ = [JSXChildGeneral$0, JSXChildGeneral$1, JSXChildGeneral$2
|
|
|
17887
18123
|
function JSXChildGeneral(ctx, state2) {
|
|
17888
18124
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
|
|
17889
18125
|
}
|
|
17890
|
-
var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18126
|
+
var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L232, 'JSXComment "<!--"'), JSXCommentContent, (0, import_lib2.$EXPECT)($L233, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
|
|
17891
18127
|
return ["{/*", $2, "*/}"];
|
|
17892
18128
|
});
|
|
17893
18129
|
function JSXComment(ctx, state2) {
|
|
@@ -18175,37 +18411,37 @@ var InterfaceExtendsTarget$0 = ImplementsTarget;
|
|
|
18175
18411
|
function InterfaceExtendsTarget(ctx, state2) {
|
|
18176
18412
|
return (0, import_lib2.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
|
|
18177
18413
|
}
|
|
18178
|
-
var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18414
|
+
var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L234, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18179
18415
|
return { $loc, token: $1 };
|
|
18180
18416
|
});
|
|
18181
18417
|
function TypeKeyword(ctx, state2) {
|
|
18182
18418
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
|
|
18183
18419
|
}
|
|
18184
|
-
var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18420
|
+
var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L235, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18185
18421
|
return { $loc, token: $1 };
|
|
18186
18422
|
});
|
|
18187
18423
|
function Enum(ctx, state2) {
|
|
18188
18424
|
return (0, import_lib2.$EVENT)(ctx, state2, "Enum", Enum$0);
|
|
18189
18425
|
}
|
|
18190
|
-
var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18426
|
+
var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L236, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18191
18427
|
return { $loc, token: $1 };
|
|
18192
18428
|
});
|
|
18193
18429
|
function Interface(ctx, state2) {
|
|
18194
18430
|
return (0, import_lib2.$EVENT)(ctx, state2, "Interface", Interface$0);
|
|
18195
18431
|
}
|
|
18196
|
-
var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18432
|
+
var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L237, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18197
18433
|
return { $loc, token: $1 };
|
|
18198
18434
|
});
|
|
18199
18435
|
function Global(ctx, state2) {
|
|
18200
18436
|
return (0, import_lib2.$EVENT)(ctx, state2, "Global", Global$0);
|
|
18201
18437
|
}
|
|
18202
|
-
var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18438
|
+
var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L238, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18203
18439
|
return { $loc, token: $1 };
|
|
18204
18440
|
});
|
|
18205
18441
|
function Module(ctx, state2) {
|
|
18206
18442
|
return (0, import_lib2.$EVENT)(ctx, state2, "Module", Module$0);
|
|
18207
18443
|
}
|
|
18208
|
-
var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18444
|
+
var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L239, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18209
18445
|
return { $loc, token: $1 };
|
|
18210
18446
|
});
|
|
18211
18447
|
function Namespace(ctx, state2) {
|
|
@@ -18519,7 +18755,7 @@ var ReturnTypeSuffix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib
|
|
|
18519
18755
|
function ReturnTypeSuffix(ctx, state2) {
|
|
18520
18756
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
|
|
18521
18757
|
}
|
|
18522
|
-
var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
18758
|
+
var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L240, 'ReturnType "asserts"'), NonIdContinue)), ForbidIndentedApplication, (0, import_lib2.$E)(TypePredicate), RestoreIndentedApplication), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
18523
18759
|
var asserts = $1;
|
|
18524
18760
|
var t = $3;
|
|
18525
18761
|
if (!t)
|
|
@@ -18620,8 +18856,8 @@ var TypeUnarySuffix$$ = [TypeUnarySuffix$0, TypeUnarySuffix$1, TypeUnarySuffix$2
|
|
|
18620
18856
|
function TypeUnarySuffix(ctx, state2) {
|
|
18621
18857
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
|
|
18622
18858
|
}
|
|
18623
|
-
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18624
|
-
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18859
|
+
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L241, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
18860
|
+
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
18625
18861
|
var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
|
|
18626
18862
|
function TypeUnaryOp(ctx, state2) {
|
|
18627
18863
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
|
|
@@ -18651,7 +18887,7 @@ var TypeIndexedAccess$$ = [TypeIndexedAccess$0, TypeIndexedAccess$1, TypeIndexed
|
|
|
18651
18887
|
function TypeIndexedAccess(ctx, state2) {
|
|
18652
18888
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
|
|
18653
18889
|
}
|
|
18654
|
-
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
18890
|
+
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L242, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
|
|
18655
18891
|
return { $loc, token: "unknown" };
|
|
18656
18892
|
});
|
|
18657
18893
|
function UnknownAlias(ctx, state2) {
|
|
@@ -18929,7 +19165,7 @@ var TypeBullet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(BulletIndent, (0, im
|
|
|
18929
19165
|
function TypeBullet(ctx, state2) {
|
|
18930
19166
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeBullet", TypeBullet$0);
|
|
18931
19167
|
}
|
|
18932
|
-
var TypeWithPostfix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(TypeConditional, (0, import_lib2.$E)((0, import_lib2.$S)(
|
|
19168
|
+
var TypeWithPostfix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(TypeConditional, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$E)(_), TypeIfClause))), function($skip, $loc, $0, $1, $2) {
|
|
18933
19169
|
var t = $1;
|
|
18934
19170
|
var postfix = $2;
|
|
18935
19171
|
if (!postfix)
|
|
@@ -19044,13 +19280,13 @@ var TypeLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EX
|
|
|
19044
19280
|
return num;
|
|
19045
19281
|
return $0;
|
|
19046
19282
|
});
|
|
19047
|
-
var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19283
|
+
var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L224, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
19048
19284
|
return { type: "VoidType", $loc, token: $1 };
|
|
19049
19285
|
});
|
|
19050
|
-
var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19286
|
+
var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L243, 'TypeLiteral "unique"'), _, (0, import_lib2.$EXPECT)($L244, 'TypeLiteral "symbol"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
19051
19287
|
return { type: "UniqueSymbolType", children: $0 };
|
|
19052
19288
|
});
|
|
19053
|
-
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
19289
|
+
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L245, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
19054
19290
|
return { $loc, token: "[]" };
|
|
19055
19291
|
});
|
|
19056
19292
|
var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
|
|
@@ -19069,7 +19305,7 @@ var InlineInterfacePropertyDelimiter$0 = (0, import_lib2.$C)((0, import_lib2.$S)
|
|
|
19069
19305
|
var InlineInterfacePropertyDelimiter$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)(SameLineOrIndentedFurther, InlineBasicInterfaceProperty)), InsertComma), function(value) {
|
|
19070
19306
|
return value[1];
|
|
19071
19307
|
});
|
|
19072
|
-
var InlineInterfacePropertyDelimiter$2 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L16, 'InlineInterfacePropertyDelimiter ":"'), (0, import_lib2.$EXPECT)($
|
|
19308
|
+
var InlineInterfacePropertyDelimiter$2 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L16, 'InlineInterfacePropertyDelimiter ":"'), (0, import_lib2.$EXPECT)($L141, 'InlineInterfacePropertyDelimiter ")"'), (0, import_lib2.$EXPECT)($L46, 'InlineInterfacePropertyDelimiter "]"'), (0, import_lib2.$EXPECT)($L37, 'InlineInterfacePropertyDelimiter "}"'))));
|
|
19073
19309
|
var InlineInterfacePropertyDelimiter$3 = (0, import_lib2.$Y)(EOS);
|
|
19074
19310
|
var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
|
|
19075
19311
|
function InlineInterfacePropertyDelimiter(ctx, state2) {
|
|
@@ -19135,14 +19371,17 @@ function TypeFunctionArrow(ctx, state2) {
|
|
|
19135
19371
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeFunctionArrow", TypeFunctionArrow$0);
|
|
19136
19372
|
}
|
|
19137
19373
|
var TypeArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenAngleBracket, (0, import_lib2.$P)((0, import_lib2.$S)(__, TypeArgumentDelimited)), __, CloseAngleBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
19374
|
+
var open = $1;
|
|
19138
19375
|
var args = $2;
|
|
19139
|
-
|
|
19376
|
+
var ws = $3;
|
|
19377
|
+
var close = $4;
|
|
19378
|
+
args = args.flatMap(([ws2, [arg, delim]]) => [prepend(ws2, arg), delim]);
|
|
19140
19379
|
args.pop();
|
|
19141
19380
|
return {
|
|
19142
19381
|
type: "TypeArguments",
|
|
19143
19382
|
ts: true,
|
|
19144
19383
|
args,
|
|
19145
|
-
children:
|
|
19384
|
+
children: [open, args, ws, close]
|
|
19146
19385
|
};
|
|
19147
19386
|
});
|
|
19148
19387
|
function TypeArguments(ctx, state2) {
|
|
@@ -19308,7 +19547,7 @@ var CivetPrologue$$ = [CivetPrologue$0, CivetPrologue$1];
|
|
|
19308
19547
|
function CivetPrologue(ctx, state2) {
|
|
19309
19548
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
|
|
19310
19549
|
}
|
|
19311
|
-
var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19550
|
+
var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L246, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib2.$Q)(CivetOption), (0, import_lib2.$EXPECT)($R96, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
19312
19551
|
var options = $3;
|
|
19313
19552
|
return {
|
|
19314
19553
|
type: "CivetPrologue",
|