@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/browser.js
CHANGED
|
@@ -38,9 +38,9 @@ var Civet = (() => {
|
|
|
38
38
|
));
|
|
39
39
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
40
40
|
|
|
41
|
-
// node_modules
|
|
41
|
+
// node_modules/@danielx/hera/dist/machine.js
|
|
42
42
|
var require_machine = __commonJS({
|
|
43
|
-
"node_modules
|
|
43
|
+
"node_modules/@danielx/hera/dist/machine.js"(exports, module) {
|
|
44
44
|
"use strict";
|
|
45
45
|
var __defProp2 = Object.defineProperty;
|
|
46
46
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -66,7 +66,7 @@ var Civet = (() => {
|
|
|
66
66
|
$EVENT: () => $EVENT2,
|
|
67
67
|
$EVENT_C: () => $EVENT_C2,
|
|
68
68
|
$EXPECT: () => $EXPECT2,
|
|
69
|
-
$L: () => $
|
|
69
|
+
$L: () => $L247,
|
|
70
70
|
$N: () => $N2,
|
|
71
71
|
$P: () => $P2,
|
|
72
72
|
$Q: () => $Q2,
|
|
@@ -91,7 +91,7 @@ var Civet = (() => {
|
|
|
91
91
|
return result;
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
function $
|
|
94
|
+
function $L247(str) {
|
|
95
95
|
return function(_ctx, state2) {
|
|
96
96
|
const { input, pos } = state2, { length } = str, end = pos + length;
|
|
97
97
|
if (input.substring(pos, end) === str) {
|
|
@@ -545,6 +545,7 @@ ${body}`;
|
|
|
545
545
|
hasAwait: () => hasAwait,
|
|
546
546
|
hasExportDeclaration: () => hasExportDeclaration,
|
|
547
547
|
hasImportDeclaration: () => hasImportDeclaration,
|
|
548
|
+
hasTrailingComment: () => hasTrailingComment,
|
|
548
549
|
hasYield: () => hasYield,
|
|
549
550
|
insertTrimmingSpace: () => insertTrimmingSpace,
|
|
550
551
|
isComma: () => isComma,
|
|
@@ -770,6 +771,8 @@ ${body}`;
|
|
|
770
771
|
if (!(node != null)) {
|
|
771
772
|
return false;
|
|
772
773
|
}
|
|
774
|
+
let ref3;
|
|
775
|
+
let ref4;
|
|
773
776
|
switch (node.type) {
|
|
774
777
|
case "ReturnStatement":
|
|
775
778
|
case "ThrowStatement":
|
|
@@ -778,13 +781,30 @@ ${body}`;
|
|
|
778
781
|
return true;
|
|
779
782
|
}
|
|
780
783
|
case "IfStatement": {
|
|
781
|
-
return
|
|
784
|
+
return (
|
|
785
|
+
// `insertReturn` for IfStatement adds a return to children
|
|
786
|
+
// when there's no else block
|
|
787
|
+
(ref3 = node.children)[ref3.length - 1]?.type === "ReturnStatement" || (ref4 = node.children)[ref4.length - 1]?.[1]?.type === "ReturnStatement" || isExit(node.then) && isExit(node.else?.block)
|
|
788
|
+
);
|
|
789
|
+
}
|
|
790
|
+
case "PatternMatchingStatement": {
|
|
791
|
+
return isExit(node.children[0][1]);
|
|
792
|
+
}
|
|
793
|
+
case "SwitchStatement": {
|
|
794
|
+
return (
|
|
795
|
+
// Ensure exhaustive by requiring an else/default clause
|
|
796
|
+
node.caseBlock.clauses.some(($) => $.type === "DefaultClause") && // Every clause should exit
|
|
797
|
+
node.caseBlock.clauses.every(isExit)
|
|
798
|
+
);
|
|
799
|
+
}
|
|
800
|
+
case "TryStatement": {
|
|
801
|
+
return node.blocks.every(isExit);
|
|
782
802
|
}
|
|
783
803
|
case "BlockStatement": {
|
|
784
804
|
return node.expressions.some((s) => isExit(s[1]));
|
|
785
805
|
}
|
|
786
806
|
case "IterationStatement": {
|
|
787
|
-
return isLoopStatement(node) && gatherRecursiveWithinFunction(node.block, ($) =>
|
|
807
|
+
return isLoopStatement(node) && gatherRecursiveWithinFunction(node.block, ($1) => $1.type === "BreakStatement").length === 0;
|
|
788
808
|
}
|
|
789
809
|
default: {
|
|
790
810
|
return false;
|
|
@@ -811,6 +831,22 @@ ${body}`;
|
|
|
811
831
|
return children;
|
|
812
832
|
}
|
|
813
833
|
}
|
|
834
|
+
function hasTrailingComment(node) {
|
|
835
|
+
if (!(node != null)) {
|
|
836
|
+
return false;
|
|
837
|
+
}
|
|
838
|
+
if (node.type === "Comment") {
|
|
839
|
+
return true;
|
|
840
|
+
}
|
|
841
|
+
if (Array.isArray(node)) {
|
|
842
|
+
return hasTrailingComment(node[node.length - 1]);
|
|
843
|
+
}
|
|
844
|
+
if ("children" in node) {
|
|
845
|
+
let ref5;
|
|
846
|
+
return hasTrailingComment((ref5 = node.children)[ref5.length - 1]);
|
|
847
|
+
}
|
|
848
|
+
return false;
|
|
849
|
+
}
|
|
814
850
|
function insertTrimmingSpace(target, c) {
|
|
815
851
|
if (!(target != null)) {
|
|
816
852
|
return target;
|
|
@@ -819,18 +855,31 @@ ${body}`;
|
|
|
819
855
|
if (target.length === 0) {
|
|
820
856
|
return c;
|
|
821
857
|
}
|
|
822
|
-
|
|
858
|
+
const results = [];
|
|
859
|
+
for (let i3 = 0, len3 = target.length; i3 < len3; i3++) {
|
|
860
|
+
const i = i3;
|
|
861
|
+
const e = target[i3];
|
|
823
862
|
if (i === 0) {
|
|
824
|
-
|
|
863
|
+
results.push(insertTrimmingSpace(e, c));
|
|
825
864
|
} else {
|
|
826
|
-
|
|
865
|
+
results.push(e);
|
|
827
866
|
}
|
|
828
|
-
}
|
|
867
|
+
}
|
|
868
|
+
;
|
|
869
|
+
return results;
|
|
829
870
|
} else if (isParent(target)) {
|
|
830
|
-
|
|
871
|
+
const oldChildren = target.children;
|
|
872
|
+
target = {
|
|
831
873
|
...target,
|
|
832
874
|
children: insertTrimmingSpace(target.children, c)
|
|
833
875
|
};
|
|
876
|
+
for (const key in target) {
|
|
877
|
+
const i = oldChildren.indexOf(target[key]);
|
|
878
|
+
if (i >= 0) {
|
|
879
|
+
target[key] = target.children[i];
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
return target;
|
|
834
883
|
} else if (isToken(target)) {
|
|
835
884
|
return {
|
|
836
885
|
...target,
|
|
@@ -926,7 +975,7 @@ ${body}`;
|
|
|
926
975
|
case "false":
|
|
927
976
|
return false;
|
|
928
977
|
}
|
|
929
|
-
let
|
|
978
|
+
let ref6;
|
|
930
979
|
switch (literal.subtype) {
|
|
931
980
|
case "StringLiteral": {
|
|
932
981
|
assert.equal(
|
|
@@ -942,8 +991,8 @@ ${body}`;
|
|
|
942
991
|
return BigInt(raw.slice(0, -1));
|
|
943
992
|
} else if (raw.match(/[\.eE]/)) {
|
|
944
993
|
return parseFloat(raw);
|
|
945
|
-
} else if ((
|
|
946
|
-
const [, base] =
|
|
994
|
+
} else if ((ref6 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref6) && len(ref6, 2)) {
|
|
995
|
+
const [, base] = ref6;
|
|
947
996
|
switch (base.toLowerCase()) {
|
|
948
997
|
case "x":
|
|
949
998
|
return parseInt(raw.replace(/0[xX]/, ""), 16);
|
|
@@ -1005,8 +1054,8 @@ ${body}`;
|
|
|
1005
1054
|
return void 0;
|
|
1006
1055
|
}
|
|
1007
1056
|
if (Array.isArray(node)) {
|
|
1008
|
-
for (let
|
|
1009
|
-
const child = node[
|
|
1057
|
+
for (let i4 = 0, len4 = node.length; i4 < len4; i4++) {
|
|
1058
|
+
const child = node[i4];
|
|
1010
1059
|
if (skip(child)) {
|
|
1011
1060
|
continue;
|
|
1012
1061
|
}
|
|
@@ -1023,16 +1072,16 @@ ${body}`;
|
|
|
1023
1072
|
return startsWithPredicate(node.children, predicate);
|
|
1024
1073
|
}
|
|
1025
1074
|
function hasAwait(exp) {
|
|
1026
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1075
|
+
return gatherRecursiveWithinFunction(exp, ($2) => $2.type === "Await").length > 0;
|
|
1027
1076
|
}
|
|
1028
1077
|
function hasYield(exp) {
|
|
1029
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1078
|
+
return gatherRecursiveWithinFunction(exp, ($3) => $3.type === "Yield").length > 0;
|
|
1030
1079
|
}
|
|
1031
1080
|
function hasImportDeclaration(exp) {
|
|
1032
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1081
|
+
return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ImportDeclaration").length > 0;
|
|
1033
1082
|
}
|
|
1034
1083
|
function hasExportDeclaration(exp) {
|
|
1035
|
-
return gatherRecursiveWithinFunction(exp, ($
|
|
1084
|
+
return gatherRecursiveWithinFunction(exp, ($5) => $5.type === "ExportDeclaration").length > 0;
|
|
1036
1085
|
}
|
|
1037
1086
|
function deepCopy(root) {
|
|
1038
1087
|
const copied = /* @__PURE__ */ new Map();
|
|
@@ -1045,9 +1094,9 @@ ${body}`;
|
|
|
1045
1094
|
if (Array.isArray(node)) {
|
|
1046
1095
|
const array = new Array(node.length);
|
|
1047
1096
|
copied.set(node, array);
|
|
1048
|
-
for (let
|
|
1049
|
-
const i =
|
|
1050
|
-
const item = node[
|
|
1097
|
+
for (let i5 = 0, len5 = node.length; i5 < len5; i5++) {
|
|
1098
|
+
const i = i5;
|
|
1099
|
+
const item = node[i5];
|
|
1051
1100
|
array[i] = recurse(item);
|
|
1052
1101
|
}
|
|
1053
1102
|
} else if (node?.type === "Ref") {
|
|
@@ -1074,9 +1123,9 @@ ${body}`;
|
|
|
1074
1123
|
throw new Error("replaceNode failed: node has no parent");
|
|
1075
1124
|
}
|
|
1076
1125
|
function recurse(children) {
|
|
1077
|
-
for (let
|
|
1078
|
-
const i =
|
|
1079
|
-
const child = children[
|
|
1126
|
+
for (let i6 = 0, len6 = children.length; i6 < len6; i6++) {
|
|
1127
|
+
const i = i6;
|
|
1128
|
+
const child = children[i6];
|
|
1080
1129
|
if (child === node) {
|
|
1081
1130
|
children[i] = newNode;
|
|
1082
1131
|
return true;
|
|
@@ -1113,9 +1162,9 @@ ${body}`;
|
|
|
1113
1162
|
return root;
|
|
1114
1163
|
}
|
|
1115
1164
|
}
|
|
1116
|
-
for (let
|
|
1117
|
-
const i =
|
|
1118
|
-
const node = array[
|
|
1165
|
+
for (let i7 = 0, len7 = array.length; i7 < len7; i7++) {
|
|
1166
|
+
const i = i7;
|
|
1167
|
+
const node = array[i7];
|
|
1119
1168
|
if (!(node != null)) {
|
|
1120
1169
|
return;
|
|
1121
1170
|
}
|
|
@@ -1177,7 +1226,7 @@ ${body}`;
|
|
|
1177
1226
|
if (skipParens.has(expression.type)) {
|
|
1178
1227
|
return expression;
|
|
1179
1228
|
}
|
|
1180
|
-
if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($
|
|
1229
|
+
if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($6) => $6.type === "ObjectExpression")) {
|
|
1181
1230
|
return expression;
|
|
1182
1231
|
}
|
|
1183
1232
|
}
|
|
@@ -1192,7 +1241,7 @@ ${body}`;
|
|
|
1192
1241
|
});
|
|
1193
1242
|
}
|
|
1194
1243
|
function checkValidLHS(node) {
|
|
1195
|
-
let
|
|
1244
|
+
let ref7;
|
|
1196
1245
|
switch (node?.type) {
|
|
1197
1246
|
case "UnaryExpression": {
|
|
1198
1247
|
node.children.unshift({
|
|
@@ -1202,7 +1251,7 @@ ${body}`;
|
|
|
1202
1251
|
return true;
|
|
1203
1252
|
}
|
|
1204
1253
|
case "CallExpression": {
|
|
1205
|
-
const lastType = (
|
|
1254
|
+
const lastType = (ref7 = node.children)[ref7.length - 1]?.type;
|
|
1206
1255
|
switch (lastType) {
|
|
1207
1256
|
case "PropertyAccess":
|
|
1208
1257
|
case "SliceExpression":
|
|
@@ -1239,8 +1288,8 @@ ${body}`;
|
|
|
1239
1288
|
return;
|
|
1240
1289
|
}
|
|
1241
1290
|
if (Array.isArray(node)) {
|
|
1242
|
-
for (let
|
|
1243
|
-
const child = node[
|
|
1291
|
+
for (let i8 = 0, len8 = node.length; i8 < len8; i8++) {
|
|
1292
|
+
const child = node[i8];
|
|
1244
1293
|
updateParentPointers(child, parent, depth);
|
|
1245
1294
|
}
|
|
1246
1295
|
return;
|
|
@@ -1250,8 +1299,8 @@ ${body}`;
|
|
|
1250
1299
|
node.parent = parent;
|
|
1251
1300
|
}
|
|
1252
1301
|
if (depth && isParent(node)) {
|
|
1253
|
-
for (let
|
|
1254
|
-
const child =
|
|
1302
|
+
for (let ref8 = node.children, i9 = 0, len9 = ref8.length; i9 < len9; i9++) {
|
|
1303
|
+
const child = ref8[i9];
|
|
1255
1304
|
updateParentPointers(child, node, depth - 1);
|
|
1256
1305
|
}
|
|
1257
1306
|
}
|
|
@@ -1299,11 +1348,11 @@ ${body}`;
|
|
|
1299
1348
|
const wrap = suffix.type === "ReturnTypeAnnotation";
|
|
1300
1349
|
spliceChild(suffix, suffix.t, 1, suffix.t = [
|
|
1301
1350
|
getTrimmingSpace(suffix.t),
|
|
1302
|
-
wrap
|
|
1351
|
+
wrap ? "(" : void 0,
|
|
1303
1352
|
// TODO: avoid parens if unnecessary
|
|
1304
1353
|
"undefined | ",
|
|
1305
|
-
parenthesizeType(
|
|
1306
|
-
wrap
|
|
1354
|
+
parenthesizeType(trimFirstSpace(suffix.t)),
|
|
1355
|
+
wrap ? ")" : void 0
|
|
1307
1356
|
]);
|
|
1308
1357
|
}
|
|
1309
1358
|
var typeNeedsNoParens = /* @__PURE__ */ new Set([
|
|
@@ -1317,7 +1366,11 @@ ${body}`;
|
|
|
1317
1366
|
if (typeNeedsNoParens.has(type.type)) {
|
|
1318
1367
|
return type;
|
|
1319
1368
|
}
|
|
1320
|
-
return
|
|
1369
|
+
return makeNode({
|
|
1370
|
+
type: "TypeParenthesized",
|
|
1371
|
+
ts: true,
|
|
1372
|
+
children: ["(", type, ")"]
|
|
1373
|
+
});
|
|
1321
1374
|
}
|
|
1322
1375
|
function wrapIIFE(expressions, asyncFlag, generator) {
|
|
1323
1376
|
let awaitPrefix;
|
|
@@ -1388,8 +1441,8 @@ ${body}`;
|
|
|
1388
1441
|
children.splice(1, 0, ".bind(this)");
|
|
1389
1442
|
}
|
|
1390
1443
|
if (gatherRecursiveWithinFunction(block, (a2) => typeof a2 === "object" && a2 != null && "token" in a2 && a2.token === "arguments").length) {
|
|
1391
|
-
let
|
|
1392
|
-
children[children.length - 1] = (
|
|
1444
|
+
let ref9;
|
|
1445
|
+
children[children.length - 1] = (ref9 = parameters.children)[ref9.length - 1] = "(arguments)";
|
|
1393
1446
|
}
|
|
1394
1447
|
}
|
|
1395
1448
|
let exp = makeNode({
|
|
@@ -1416,20 +1469,23 @@ ${body}`;
|
|
|
1416
1469
|
}
|
|
1417
1470
|
return exp;
|
|
1418
1471
|
}
|
|
1419
|
-
function wrapWithReturn(expression) {
|
|
1472
|
+
function wrapWithReturn(expression, parent = expression?.parent, semi = false) {
|
|
1420
1473
|
const children = expression ? ["return ", expression] : ["return"];
|
|
1474
|
+
if (semi) {
|
|
1475
|
+
children.unshift(";");
|
|
1476
|
+
}
|
|
1421
1477
|
return makeNode({
|
|
1422
1478
|
type: "ReturnStatement",
|
|
1423
1479
|
children,
|
|
1424
1480
|
expression,
|
|
1425
|
-
parent
|
|
1481
|
+
parent
|
|
1426
1482
|
});
|
|
1427
1483
|
}
|
|
1428
1484
|
function flatJoin(array, separator) {
|
|
1429
1485
|
const result = [];
|
|
1430
|
-
for (let
|
|
1431
|
-
const i =
|
|
1432
|
-
const items = array[
|
|
1486
|
+
for (let i10 = 0, len10 = array.length; i10 < len10; i10++) {
|
|
1487
|
+
const i = i10;
|
|
1488
|
+
const items = array[i10];
|
|
1433
1489
|
if (i) {
|
|
1434
1490
|
result.push(separator);
|
|
1435
1491
|
}
|
|
@@ -1664,9 +1720,11 @@ ${body}`;
|
|
|
1664
1720
|
if (l) {
|
|
1665
1721
|
if (arrayElementHasTrailingComma(after[l - 1]))
|
|
1666
1722
|
l++;
|
|
1723
|
+
const elements2 = trimFirstSpace(after);
|
|
1667
1724
|
blockPrefix = {
|
|
1668
1725
|
type: "PostRestBindingElements",
|
|
1669
|
-
|
|
1726
|
+
elements: elements2,
|
|
1727
|
+
children: ["[", elements2, "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
|
|
1670
1728
|
names: after.flatMap((p) => p.names)
|
|
1671
1729
|
};
|
|
1672
1730
|
}
|
|
@@ -2016,7 +2074,7 @@ ${body}`;
|
|
|
2016
2074
|
AutoPromise(ref) {
|
|
2017
2075
|
state.prelude.push([
|
|
2018
2076
|
"",
|
|
2019
|
-
ts(["type ", ref, "<T> =
|
|
2077
|
+
ts(["type ", ref, "<T> = Promise<Awaited<T>>"]),
|
|
2020
2078
|
";\n"
|
|
2021
2079
|
]);
|
|
2022
2080
|
},
|
|
@@ -2685,14 +2743,10 @@ ${js}`
|
|
|
2685
2743
|
let ref1;
|
|
2686
2744
|
if (!((ref1 = block.children)[ref1.length - 2]?.type === "ReturnStatement")) {
|
|
2687
2745
|
let ref2;
|
|
2688
|
-
const indent = getIndent((ref2 = block.expressions)[ref2.length - 1])
|
|
2746
|
+
const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]);
|
|
2689
2747
|
block.expressions.push([
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
type: "ReturnStatement",
|
|
2693
|
-
expression: ref,
|
|
2694
|
-
children: ["return ", ref]
|
|
2695
|
-
}
|
|
2748
|
+
indent,
|
|
2749
|
+
wrapWithReturn(ref, block, !indent)
|
|
2696
2750
|
]);
|
|
2697
2751
|
}
|
|
2698
2752
|
return true;
|
|
@@ -2704,34 +2758,103 @@ ${js}`
|
|
|
2704
2758
|
const index = children.indexOf(pattern.elements);
|
|
2705
2759
|
if (index < 0)
|
|
2706
2760
|
throw new Error("failed to find elements in ArrayBindingPattern");
|
|
2707
|
-
children[index] = pattern.elements.map(
|
|
2708
|
-
|
|
2709
|
-
return { ...el, children: [ws, patternAsValue(e), delim] };
|
|
2710
|
-
});
|
|
2711
|
-
return { ...pattern, children };
|
|
2761
|
+
const elements = children[index] = pattern.elements.map(patternAsValue);
|
|
2762
|
+
return { ...pattern, elements, children };
|
|
2712
2763
|
}
|
|
2713
2764
|
case "ObjectBindingPattern": {
|
|
2714
2765
|
const children = [...pattern.children];
|
|
2715
2766
|
const index = children.indexOf(pattern.properties);
|
|
2716
2767
|
if (index < 0)
|
|
2717
2768
|
throw new Error("failed to find properties in ArrayBindingPattern");
|
|
2718
|
-
children[index] = pattern.properties.map(patternAsValue);
|
|
2719
|
-
return { ...pattern, children };
|
|
2769
|
+
const properties = children[index] = pattern.properties.map(patternAsValue);
|
|
2770
|
+
return { ...pattern, properties, children };
|
|
2720
2771
|
}
|
|
2721
|
-
case "Identifier":
|
|
2722
2772
|
case "BindingProperty": {
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
pattern.value
|
|
2726
|
-
pattern.
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2773
|
+
let children;
|
|
2774
|
+
if (pattern.value?.type === "Identifier") {
|
|
2775
|
+
children = [pattern.value, pattern.delim];
|
|
2776
|
+
if (isWhitespaceOrEmpty(pattern.children[0])) {
|
|
2777
|
+
children.unshift(pattern.children[0]);
|
|
2778
|
+
}
|
|
2779
|
+
} else {
|
|
2780
|
+
children = [...pattern.children];
|
|
2781
|
+
if (pattern.initializer != null) {
|
|
2782
|
+
const index = children.indexOf(pattern.initializer);
|
|
2783
|
+
assert.notEqual(index, -1, "failed to find initializer in BindingElement");
|
|
2784
|
+
children.splice(index, 1);
|
|
2785
|
+
}
|
|
2786
|
+
if (pattern.value != null) {
|
|
2787
|
+
children = children.map(($2) => $2 === pattern.value ? patternAsValue(pattern.value) : $2);
|
|
2788
|
+
}
|
|
2730
2789
|
}
|
|
2731
2790
|
return { ...pattern, children };
|
|
2732
2791
|
}
|
|
2733
|
-
|
|
2792
|
+
case "AtBindingProperty": {
|
|
2793
|
+
const children = [...pattern.children];
|
|
2794
|
+
if (pattern.initializer != null) {
|
|
2795
|
+
const index = children.indexOf(pattern.initializer);
|
|
2796
|
+
assert.notEqual(index, -1, "failed to find initializer in AtBindingProperty");
|
|
2797
|
+
children.splice(index, 1);
|
|
2798
|
+
}
|
|
2799
|
+
return { ...pattern, children };
|
|
2800
|
+
}
|
|
2801
|
+
case "BindingElement": {
|
|
2802
|
+
const children = [...pattern.children];
|
|
2803
|
+
if (pattern.initializer != null) {
|
|
2804
|
+
const index2 = children.indexOf(pattern.initializer);
|
|
2805
|
+
assert.notEqual(index2, -1, "failed to find initializer in BindingElement");
|
|
2806
|
+
children.splice(index2, 1);
|
|
2807
|
+
}
|
|
2808
|
+
const index = children.indexOf(pattern.binding);
|
|
2809
|
+
assert.notEqual(index, -1, "failed to find binding in BindingElement");
|
|
2810
|
+
children[index] = patternAsValue(pattern.binding);
|
|
2811
|
+
return { ...pattern, children };
|
|
2812
|
+
}
|
|
2813
|
+
default: {
|
|
2734
2814
|
return pattern;
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
}
|
|
2818
|
+
function patternBindings(pattern) {
|
|
2819
|
+
const bindings = [];
|
|
2820
|
+
recurse(pattern);
|
|
2821
|
+
return bindings;
|
|
2822
|
+
function recurse(pattern2) {
|
|
2823
|
+
switch (pattern2.type) {
|
|
2824
|
+
case "ArrayBindingPattern": {
|
|
2825
|
+
for (let ref3 = pattern2.elements, i2 = 0, len1 = ref3.length; i2 < len1; i2++) {
|
|
2826
|
+
const element = ref3[i2];
|
|
2827
|
+
recurse(element);
|
|
2828
|
+
}
|
|
2829
|
+
;
|
|
2830
|
+
break;
|
|
2831
|
+
}
|
|
2832
|
+
case "ObjectBindingPattern": {
|
|
2833
|
+
for (let ref4 = pattern2.properties, i3 = 0, len22 = ref4.length; i3 < len22; i3++) {
|
|
2834
|
+
const property = ref4[i3];
|
|
2835
|
+
recurse(property);
|
|
2836
|
+
}
|
|
2837
|
+
;
|
|
2838
|
+
break;
|
|
2839
|
+
}
|
|
2840
|
+
case "BindingElement": {
|
|
2841
|
+
recurse(pattern2.binding);
|
|
2842
|
+
break;
|
|
2843
|
+
}
|
|
2844
|
+
case "BindingProperty": {
|
|
2845
|
+
recurse(pattern2.value ?? pattern2.name);
|
|
2846
|
+
break;
|
|
2847
|
+
}
|
|
2848
|
+
case "Binding": {
|
|
2849
|
+
recurse(pattern2.pattern);
|
|
2850
|
+
break;
|
|
2851
|
+
}
|
|
2852
|
+
case "Identifier":
|
|
2853
|
+
case "AtBinding": {
|
|
2854
|
+
bindings.push(pattern2);
|
|
2855
|
+
break;
|
|
2856
|
+
}
|
|
2857
|
+
}
|
|
2735
2858
|
}
|
|
2736
2859
|
}
|
|
2737
2860
|
function assignResults(node, collect) {
|
|
@@ -2740,8 +2863,8 @@ ${js}`
|
|
|
2740
2863
|
switch (node.type) {
|
|
2741
2864
|
case "BlockStatement":
|
|
2742
2865
|
if (node.expressions.length) {
|
|
2743
|
-
let
|
|
2744
|
-
assignResults((
|
|
2866
|
+
let ref5;
|
|
2867
|
+
assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
|
|
2745
2868
|
} else {
|
|
2746
2869
|
node.expressions.push(["", collect("void 0"), ";"]);
|
|
2747
2870
|
}
|
|
@@ -2776,7 +2899,7 @@ ${js}`
|
|
|
2776
2899
|
if (exp.type === "LabelledStatement") {
|
|
2777
2900
|
exp = exp.statement;
|
|
2778
2901
|
}
|
|
2779
|
-
let
|
|
2902
|
+
let ref6;
|
|
2780
2903
|
switch (exp.type) {
|
|
2781
2904
|
case "BreakStatement":
|
|
2782
2905
|
case "ContinueStatement":
|
|
@@ -2787,14 +2910,14 @@ ${js}`
|
|
|
2787
2910
|
return;
|
|
2788
2911
|
}
|
|
2789
2912
|
case "Declaration": {
|
|
2790
|
-
let
|
|
2913
|
+
let ref7;
|
|
2791
2914
|
if (exp.bindings?.length) {
|
|
2792
|
-
|
|
2915
|
+
ref7 = patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern);
|
|
2793
2916
|
} else {
|
|
2794
|
-
|
|
2917
|
+
ref7 = "void 0";
|
|
2795
2918
|
}
|
|
2796
2919
|
;
|
|
2797
|
-
const value =
|
|
2920
|
+
const value = ref7;
|
|
2798
2921
|
exp.children.push([
|
|
2799
2922
|
"",
|
|
2800
2923
|
[";", collect(value)]
|
|
@@ -2842,11 +2965,17 @@ ${js}`
|
|
|
2842
2965
|
return;
|
|
2843
2966
|
}
|
|
2844
2967
|
case "SwitchStatement": {
|
|
2845
|
-
|
|
2968
|
+
for (let ref8 = exp.caseBlock.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
|
|
2969
|
+
const clause = ref8[i4];
|
|
2970
|
+
assignResults(clause, collect);
|
|
2971
|
+
}
|
|
2846
2972
|
return;
|
|
2847
2973
|
}
|
|
2848
2974
|
case "TryStatement": {
|
|
2849
|
-
exp.blocks
|
|
2975
|
+
for (let ref9 = exp.blocks, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
|
|
2976
|
+
const block = ref9[i5];
|
|
2977
|
+
assignResults(block, collect);
|
|
2978
|
+
}
|
|
2850
2979
|
return;
|
|
2851
2980
|
}
|
|
2852
2981
|
}
|
|
@@ -2867,20 +2996,28 @@ ${js}`
|
|
|
2867
2996
|
const last = node.expressions[node.expressions.length - 1];
|
|
2868
2997
|
insertReturn(last);
|
|
2869
2998
|
} else {
|
|
2870
|
-
|
|
2871
|
-
|
|
2999
|
+
let m1;
|
|
3000
|
+
if (m1 = node.parent?.type, m1 === "CatchClause" || m1 === "WhenClause") {
|
|
3001
|
+
node.expressions.push(["", wrapWithReturn(void 0, node)]);
|
|
2872
3002
|
}
|
|
2873
3003
|
}
|
|
2874
3004
|
return;
|
|
2875
3005
|
}
|
|
2876
3006
|
case "WhenClause": {
|
|
2877
3007
|
if (node.break) {
|
|
2878
|
-
node.children.
|
|
3008
|
+
const breakIndex = node.children.indexOf(node.break);
|
|
3009
|
+
assert.notEqual(breakIndex, -1, "Could not find break in when clause");
|
|
3010
|
+
node.children.splice(breakIndex, 1);
|
|
3011
|
+
node.break = void 0;
|
|
2879
3012
|
}
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
3013
|
+
insertReturn(node.block);
|
|
3014
|
+
if (!isExit(node.block)) {
|
|
3015
|
+
const comment = hasTrailingComment(node.block.expressions);
|
|
3016
|
+
let ref10;
|
|
3017
|
+
node.block.expressions.push([
|
|
3018
|
+
comment ? (ref10 = node.block.expressions)[ref10.length - 1][0] || "\n" : "",
|
|
3019
|
+
wrapWithReturn(void 0, node, !comment)
|
|
3020
|
+
]);
|
|
2884
3021
|
}
|
|
2885
3022
|
return;
|
|
2886
3023
|
}
|
|
@@ -2905,7 +3042,7 @@ ${js}`
|
|
|
2905
3042
|
if (exp.type === "LabelledStatement") {
|
|
2906
3043
|
exp = exp.statement;
|
|
2907
3044
|
}
|
|
2908
|
-
let
|
|
3045
|
+
let ref11;
|
|
2909
3046
|
switch (exp.type) {
|
|
2910
3047
|
case "BreakStatement":
|
|
2911
3048
|
case "ContinueStatement":
|
|
@@ -2916,27 +3053,30 @@ ${js}`
|
|
|
2916
3053
|
return;
|
|
2917
3054
|
}
|
|
2918
3055
|
case "Declaration": {
|
|
2919
|
-
let
|
|
3056
|
+
let ref12;
|
|
2920
3057
|
if (exp.bindings?.length) {
|
|
2921
|
-
|
|
3058
|
+
ref12 = [" ", patternAsValue((ref11 = exp.bindings)[ref11.length - 1].pattern)];
|
|
2922
3059
|
} else {
|
|
2923
|
-
|
|
3060
|
+
ref12 = [];
|
|
2924
3061
|
}
|
|
2925
3062
|
;
|
|
2926
|
-
const value =
|
|
3063
|
+
const value = ref12;
|
|
2927
3064
|
const parent = outer.parent;
|
|
2928
3065
|
const index = findChildIndex(parent?.expressions, outer);
|
|
2929
3066
|
assert.notEqual(index, -1, "Could not find declaration in parent");
|
|
2930
|
-
parent.expressions.splice(index + 1, 0, [
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
3067
|
+
parent.expressions.splice(index + 1, 0, [
|
|
3068
|
+
"",
|
|
3069
|
+
{
|
|
3070
|
+
type: "ReturnStatement",
|
|
3071
|
+
expression: value,
|
|
3072
|
+
children: [
|
|
3073
|
+
!(parent.expressions[index][2] === ";") ? ";" : void 0,
|
|
3074
|
+
"return",
|
|
3075
|
+
value
|
|
3076
|
+
],
|
|
3077
|
+
parent: exp
|
|
3078
|
+
}
|
|
3079
|
+
]);
|
|
2940
3080
|
braceBlock(parent);
|
|
2941
3081
|
return;
|
|
2942
3082
|
}
|
|
@@ -2947,12 +3087,7 @@ ${js}`
|
|
|
2947
3087
|
assert.notEqual(index, -1, "Could not find function declaration in parent");
|
|
2948
3088
|
parent.expressions.splice(index + 1, 0, [
|
|
2949
3089
|
"",
|
|
2950
|
-
|
|
2951
|
-
type: "ReturnStatement",
|
|
2952
|
-
expression: exp.id,
|
|
2953
|
-
children: [";return ", exp.id],
|
|
2954
|
-
parent: exp
|
|
2955
|
-
}
|
|
3090
|
+
wrapWithReturn(exp.id, exp, true)
|
|
2956
3091
|
]);
|
|
2957
3092
|
braceBlock(parent);
|
|
2958
3093
|
return;
|
|
@@ -2975,12 +3110,11 @@ ${js}`
|
|
|
2975
3110
|
if (exp.else)
|
|
2976
3111
|
insertReturn(exp.else.block);
|
|
2977
3112
|
else
|
|
2978
|
-
exp.children.push([
|
|
2979
|
-
|
|
2980
|
-
// NOTE: add a prefixed
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
}]);
|
|
3113
|
+
exp.children.push([
|
|
3114
|
+
"",
|
|
3115
|
+
// NOTE: add a prefixed semicolon because the if block may not be braced
|
|
3116
|
+
wrapWithReturn(void 0, exp, true)
|
|
3117
|
+
]);
|
|
2984
3118
|
return;
|
|
2985
3119
|
}
|
|
2986
3120
|
case "PatternMatchingStatement": {
|
|
@@ -2988,30 +3122,30 @@ ${js}`
|
|
|
2988
3122
|
return;
|
|
2989
3123
|
}
|
|
2990
3124
|
case "SwitchStatement": {
|
|
2991
|
-
|
|
3125
|
+
for (let ref13 = exp.caseBlock.clauses, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
|
|
3126
|
+
const clause = ref13[i6];
|
|
3127
|
+
insertReturn(clause);
|
|
3128
|
+
}
|
|
2992
3129
|
return;
|
|
2993
3130
|
}
|
|
2994
3131
|
case "TryStatement": {
|
|
2995
|
-
exp.blocks.
|
|
3132
|
+
for (let ref14 = exp.blocks, i7 = 0, len6 = ref14.length; i7 < len6; i7++) {
|
|
3133
|
+
const block = ref14[i7];
|
|
3134
|
+
insertReturn(block);
|
|
3135
|
+
}
|
|
2996
3136
|
return;
|
|
2997
3137
|
}
|
|
2998
3138
|
}
|
|
2999
3139
|
if (node[node.length - 1]?.type === "SemicolonDelimiter") {
|
|
3000
3140
|
return;
|
|
3001
3141
|
}
|
|
3002
|
-
|
|
3003
|
-
node.splice(1, 1, returnStatement);
|
|
3004
|
-
}
|
|
3005
|
-
function insertSwitchReturns(exp) {
|
|
3006
|
-
exp.caseBlock.clauses.forEach((clause) => {
|
|
3007
|
-
return insertReturn(clause);
|
|
3008
|
-
});
|
|
3142
|
+
node[1] = wrapWithReturn(node[1]);
|
|
3009
3143
|
}
|
|
3010
3144
|
function processBreakContinueWith(statement) {
|
|
3011
3145
|
let changed = false;
|
|
3012
3146
|
for (const control of gatherRecursiveWithinFunction(
|
|
3013
3147
|
statement.block,
|
|
3014
|
-
($
|
|
3148
|
+
($3) => $3.type === "BreakStatement" || $3.type === "ContinueStatement"
|
|
3015
3149
|
)) {
|
|
3016
3150
|
let controlName2 = function() {
|
|
3017
3151
|
switch (control.type) {
|
|
@@ -3026,8 +3160,8 @@ ${js}`
|
|
|
3026
3160
|
var controlName = controlName2;
|
|
3027
3161
|
if (control.with) {
|
|
3028
3162
|
if (control.label) {
|
|
3029
|
-
let
|
|
3030
|
-
if (!(
|
|
3163
|
+
let m2;
|
|
3164
|
+
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)) {
|
|
3031
3165
|
continue;
|
|
3032
3166
|
}
|
|
3033
3167
|
} else {
|
|
@@ -3046,7 +3180,7 @@ ${js}`
|
|
|
3046
3180
|
)
|
|
3047
3181
|
);
|
|
3048
3182
|
updateParentPointers(control.with, control);
|
|
3049
|
-
const i = control.children.findIndex(($
|
|
3183
|
+
const i = control.children.findIndex(($4) => $4?.type === "Error");
|
|
3050
3184
|
if (i >= 0) {
|
|
3051
3185
|
control.children.splice(i, 1);
|
|
3052
3186
|
}
|
|
@@ -3088,7 +3222,7 @@ ${js}`
|
|
|
3088
3222
|
}
|
|
3089
3223
|
const resultsRef = statement.resultsRef = makeRef("results");
|
|
3090
3224
|
const declaration = iterationDeclaration(statement);
|
|
3091
|
-
const { ancestor, child } = findAncestor(statement, ($
|
|
3225
|
+
const { ancestor, child } = findAncestor(statement, ($5) => $5.type === "BlockStatement");
|
|
3092
3226
|
assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
|
|
3093
3227
|
const index = findChildIndex(ancestor.expressions, child);
|
|
3094
3228
|
assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
|
|
@@ -3141,6 +3275,9 @@ ${js}`
|
|
|
3141
3275
|
case "product": {
|
|
3142
3276
|
return "1";
|
|
3143
3277
|
}
|
|
3278
|
+
case "join": {
|
|
3279
|
+
return '""';
|
|
3280
|
+
}
|
|
3144
3281
|
default: {
|
|
3145
3282
|
return "0";
|
|
3146
3283
|
}
|
|
@@ -3185,7 +3322,8 @@ ${js}`
|
|
|
3185
3322
|
case "count": {
|
|
3186
3323
|
return ["if (", node, ") ++", resultsRef];
|
|
3187
3324
|
}
|
|
3188
|
-
case "sum":
|
|
3325
|
+
case "sum":
|
|
3326
|
+
case "join": {
|
|
3189
3327
|
return [resultsRef, " += ", node];
|
|
3190
3328
|
}
|
|
3191
3329
|
case "product": {
|
|
@@ -3210,9 +3348,9 @@ ${js}`
|
|
|
3210
3348
|
}
|
|
3211
3349
|
const reduction = statement.type === "ForStatement" && statement.reduction;
|
|
3212
3350
|
function fillBlock(expression) {
|
|
3213
|
-
let
|
|
3214
|
-
let
|
|
3215
|
-
if (
|
|
3351
|
+
let ref15;
|
|
3352
|
+
let m3;
|
|
3353
|
+
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) {
|
|
3216
3354
|
block.expressions.pop();
|
|
3217
3355
|
}
|
|
3218
3356
|
block.expressions.push(expression);
|
|
@@ -3242,7 +3380,29 @@ ${js}`
|
|
|
3242
3380
|
}
|
|
3243
3381
|
}
|
|
3244
3382
|
if (statement.type === "ForStatement" && statement.declaration?.type === "ForDeclaration") {
|
|
3245
|
-
|
|
3383
|
+
if (reduction) {
|
|
3384
|
+
const bindings = patternBindings(statement.declaration.binding.pattern);
|
|
3385
|
+
if (bindings.length) {
|
|
3386
|
+
fillBlock(["", bindings[0]]);
|
|
3387
|
+
for (const binding of bindings.slice(1)) {
|
|
3388
|
+
binding.children.unshift({
|
|
3389
|
+
type: "Error",
|
|
3390
|
+
subtype: "Warning",
|
|
3391
|
+
message: "Ignored binding in reduction loop with implicit body"
|
|
3392
|
+
});
|
|
3393
|
+
}
|
|
3394
|
+
} else {
|
|
3395
|
+
fillBlock([
|
|
3396
|
+
"",
|
|
3397
|
+
{
|
|
3398
|
+
type: "Error",
|
|
3399
|
+
message: "Empty binding pattern in reduction loop with implicit body"
|
|
3400
|
+
}
|
|
3401
|
+
]);
|
|
3402
|
+
}
|
|
3403
|
+
} else {
|
|
3404
|
+
fillBlock(["", patternAsValue(statement.declaration.binding.pattern)]);
|
|
3405
|
+
}
|
|
3246
3406
|
block.empty = false;
|
|
3247
3407
|
}
|
|
3248
3408
|
return false;
|
|
@@ -3270,24 +3430,24 @@ ${js}`
|
|
|
3270
3430
|
injectParamProps: isConstructor
|
|
3271
3431
|
});
|
|
3272
3432
|
if (isConstructor) {
|
|
3273
|
-
const { ancestor } = findAncestor(f, ($
|
|
3433
|
+
const { ancestor } = findAncestor(f, ($6) => $6.type === "ClassExpression");
|
|
3274
3434
|
if (ancestor != null) {
|
|
3275
|
-
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($
|
|
3435
|
+
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));
|
|
3276
3436
|
const classExpressions = ancestor.body.expressions;
|
|
3277
3437
|
let index = findChildIndex(classExpressions, f);
|
|
3278
3438
|
assert.notEqual(index, -1, "Could not find constructor in class");
|
|
3279
|
-
let
|
|
3280
|
-
while (
|
|
3439
|
+
let m4;
|
|
3440
|
+
while (m4 = classExpressions[index - 1]?.[1], typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "MethodDefinition" && "name" in m4 && m4.name === "constructor") {
|
|
3281
3441
|
index--;
|
|
3282
3442
|
}
|
|
3283
3443
|
const fStatement = classExpressions[index];
|
|
3284
|
-
for (let
|
|
3285
|
-
const parameter =
|
|
3444
|
+
for (let ref16 = gatherRecursive(parameters, ($10) => $10.type === "Parameter"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
|
|
3445
|
+
const parameter = ref16[i8];
|
|
3286
3446
|
if (!parameter.typeSuffix) {
|
|
3287
3447
|
continue;
|
|
3288
3448
|
}
|
|
3289
|
-
for (let
|
|
3290
|
-
const binding =
|
|
3449
|
+
for (let ref17 = gatherRecursive(parameter, ($11) => $11.type === "AtBinding"), i9 = 0, len8 = ref17.length; i9 < len8; i9++) {
|
|
3450
|
+
const binding = ref17[i9];
|
|
3291
3451
|
const typeSuffix = binding.parent?.typeSuffix;
|
|
3292
3452
|
if (!typeSuffix) {
|
|
3293
3453
|
continue;
|
|
@@ -3347,8 +3507,8 @@ ${js}`
|
|
|
3347
3507
|
}
|
|
3348
3508
|
if (!f.generator?.length && hasYield(block)) {
|
|
3349
3509
|
if (f.type === "ArrowFunction") {
|
|
3350
|
-
gatherRecursiveWithinFunction(block, ($
|
|
3351
|
-
const i = y.children.findIndex(($
|
|
3510
|
+
gatherRecursiveWithinFunction(block, ($12) => $12.type === "YieldExpression").forEach((y) => {
|
|
3511
|
+
const i = y.children.findIndex(($13) => $13.type === "Yield");
|
|
3352
3512
|
return y.children.splice(i + 1, 0, {
|
|
3353
3513
|
type: "Error",
|
|
3354
3514
|
message: "Can't use yield inside of => arrow function"
|
|
@@ -3364,8 +3524,8 @@ ${js}`
|
|
|
3364
3524
|
}
|
|
3365
3525
|
}
|
|
3366
3526
|
function processFunctions(statements, config2) {
|
|
3367
|
-
for (let
|
|
3368
|
-
const f =
|
|
3527
|
+
for (let ref18 = gatherRecursiveAll(statements, ($14) => $14.type === "FunctionExpression" || $14.type === "ArrowFunction"), i10 = 0, len9 = ref18.length; i10 < len9; i10++) {
|
|
3528
|
+
const f = ref18[i10];
|
|
3369
3529
|
if (f.type === "FunctionExpression") {
|
|
3370
3530
|
implicitFunctionBlock(f);
|
|
3371
3531
|
}
|
|
@@ -3373,8 +3533,8 @@ ${js}`
|
|
|
3373
3533
|
processParams(f);
|
|
3374
3534
|
processReturn(f, config2.implicitReturns);
|
|
3375
3535
|
}
|
|
3376
|
-
for (let
|
|
3377
|
-
const f =
|
|
3536
|
+
for (let ref19 = gatherRecursiveAll(statements, ($15) => $15.type === "MethodDefinition"), i11 = 0, len10 = ref19.length; i11 < len10; i11++) {
|
|
3537
|
+
const f = ref19[i11];
|
|
3378
3538
|
implicitFunctionBlock(f);
|
|
3379
3539
|
processParams(f);
|
|
3380
3540
|
processReturn(f, config2.implicitReturns);
|
|
@@ -3427,9 +3587,9 @@ ${js}`
|
|
|
3427
3587
|
}
|
|
3428
3588
|
let done;
|
|
3429
3589
|
if (!async) {
|
|
3430
|
-
let
|
|
3431
|
-
if ((
|
|
3432
|
-
const { block: parentBlock, index } =
|
|
3590
|
+
let ref20;
|
|
3591
|
+
if ((ref20 = blockContainingStatement(exp)) && typeof ref20 === "object" && "block" in ref20 && "index" in ref20) {
|
|
3592
|
+
const { block: parentBlock, index } = ref20;
|
|
3433
3593
|
statements[0][0] = parentBlock.expressions[index][0];
|
|
3434
3594
|
parentBlock.expressions.splice(index, index + 1 - index, ...statements);
|
|
3435
3595
|
updateParentPointers(parentBlock);
|
|
@@ -3446,8 +3606,8 @@ ${js}`
|
|
|
3446
3606
|
}
|
|
3447
3607
|
}
|
|
3448
3608
|
function processIterationExpressions(statements) {
|
|
3449
|
-
for (let
|
|
3450
|
-
const s =
|
|
3609
|
+
for (let ref21 = gatherRecursiveAll(statements, ($16) => $16.type === "IterationExpression"), i12 = 0, len11 = ref21.length; i12 < len11; i12++) {
|
|
3610
|
+
const s = ref21[i12];
|
|
3451
3611
|
expressionizeIteration(s);
|
|
3452
3612
|
}
|
|
3453
3613
|
}
|
|
@@ -3473,12 +3633,12 @@ ${js}`
|
|
|
3473
3633
|
...parameters,
|
|
3474
3634
|
children: (() => {
|
|
3475
3635
|
const results1 = [];
|
|
3476
|
-
for (let
|
|
3477
|
-
let parameter =
|
|
3636
|
+
for (let ref22 = parameters.children, i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
|
|
3637
|
+
let parameter = ref22[i13];
|
|
3478
3638
|
if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
|
|
3479
|
-
let
|
|
3480
|
-
if (
|
|
3481
|
-
const initializer =
|
|
3639
|
+
let ref23;
|
|
3640
|
+
if (ref23 = parameter.initializer) {
|
|
3641
|
+
const initializer = ref23;
|
|
3482
3642
|
args.push(initializer.expression, parameter.delim);
|
|
3483
3643
|
parameter = {
|
|
3484
3644
|
...parameter,
|
|
@@ -3499,7 +3659,7 @@ ${js}`
|
|
|
3499
3659
|
expression = {
|
|
3500
3660
|
...expression,
|
|
3501
3661
|
parameters: newParameters,
|
|
3502
|
-
children: expression.children.map(($
|
|
3662
|
+
children: expression.children.map(($17) => $17 === parameters ? newParameters : $17)
|
|
3503
3663
|
};
|
|
3504
3664
|
}
|
|
3505
3665
|
return {
|
|
@@ -3521,7 +3681,7 @@ ${js}`
|
|
|
3521
3681
|
ref = makeRef("$");
|
|
3522
3682
|
inplacePrepend(ref, body);
|
|
3523
3683
|
}
|
|
3524
|
-
if (startsWithPredicate(body, ($
|
|
3684
|
+
if (startsWithPredicate(body, ($18) => $18.type === "ObjectExpression")) {
|
|
3525
3685
|
body = makeLeftHandSideExpression(body);
|
|
3526
3686
|
}
|
|
3527
3687
|
const parameters = makeNode({
|
|
@@ -4127,7 +4287,7 @@ ${js}`
|
|
|
4127
4287
|
// source/parser/pattern-matching.civet
|
|
4128
4288
|
function processPatternTest(lhs, patterns) {
|
|
4129
4289
|
const { ref, refAssignmentComma } = maybeRefAssignment(lhs, "m");
|
|
4130
|
-
const conditionExpression = flatJoin(patterns.map(($) => getPatternConditions(
|
|
4290
|
+
const conditionExpression = flatJoin(patterns.map(($1) => getPatternConditions($1, ref)).map(($2) => flatJoin($2, " && ")), " || ");
|
|
4131
4291
|
return makeLeftHandSideExpression(makeNode({
|
|
4132
4292
|
type: "PatternTest",
|
|
4133
4293
|
children: [
|
|
@@ -4137,7 +4297,7 @@ ${js}`
|
|
|
4137
4297
|
}));
|
|
4138
4298
|
}
|
|
4139
4299
|
function processPatternMatching(statements) {
|
|
4140
|
-
gatherRecursiveAll(statements, ($
|
|
4300
|
+
gatherRecursiveAll(statements, ($3) => $3.type === "SwitchStatement").forEach((s) => {
|
|
4141
4301
|
const { caseBlock } = s;
|
|
4142
4302
|
const { clauses } = caseBlock;
|
|
4143
4303
|
for (let i1 = 0, len3 = clauses.length; i1 < len3; i1++) {
|
|
@@ -4151,7 +4311,7 @@ ${js}`
|
|
|
4151
4311
|
}
|
|
4152
4312
|
let errors = false;
|
|
4153
4313
|
let isPattern = false;
|
|
4154
|
-
if (clauses.some(($
|
|
4314
|
+
if (clauses.some(($4) => $4.type === "PatternClause")) {
|
|
4155
4315
|
isPattern = true;
|
|
4156
4316
|
for (let i2 = 0, len1 = clauses.length; i2 < len1; i2++) {
|
|
4157
4317
|
const c = clauses[i2];
|
|
@@ -4189,7 +4349,7 @@ ${js}`
|
|
|
4189
4349
|
}
|
|
4190
4350
|
let { patterns, block } = c;
|
|
4191
4351
|
let pattern = patterns[0];
|
|
4192
|
-
const conditionExpression = flatJoin(patterns.map(($
|
|
4352
|
+
const conditionExpression = flatJoin(patterns.map(($5) => getPatternConditions($5, ref)).map(($6) => flatJoin($6, " && ")), " || ");
|
|
4193
4353
|
const condition2 = makeNode({
|
|
4194
4354
|
type: "ParenthesizedExpression",
|
|
4195
4355
|
children: ["(", ...refAssignmentComma, conditionExpression, ")"],
|
|
@@ -4382,38 +4542,59 @@ ${js}`
|
|
|
4382
4542
|
}
|
|
4383
4543
|
}
|
|
4384
4544
|
let [splices, thisAssignments] = gatherBindingCode(pattern);
|
|
4385
|
-
const
|
|
4545
|
+
const patternBindings2 = nonMatcherBindings(pattern);
|
|
4386
4546
|
splices = splices.map((s) => [", ", nonMatcherBindings(s)]);
|
|
4387
|
-
thisAssignments = thisAssignments.map(($
|
|
4388
|
-
const duplicateDeclarations = aggregateDuplicateBindings([
|
|
4547
|
+
thisAssignments = thisAssignments.map(($7) => ["", $7, ";"]);
|
|
4548
|
+
const duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices]);
|
|
4389
4549
|
return [
|
|
4390
4550
|
["", {
|
|
4391
4551
|
type: "Declaration",
|
|
4392
|
-
children: [decl,
|
|
4552
|
+
children: [decl, patternBindings2, suffix, " = ", ref, ...splices],
|
|
4393
4553
|
names: [],
|
|
4394
4554
|
bindings: []
|
|
4395
4555
|
// avoid implicit return of any bindings
|
|
4396
4556
|
}, ";"],
|
|
4397
4557
|
...thisAssignments,
|
|
4398
|
-
...duplicateDeclarations.map(($
|
|
4558
|
+
...duplicateDeclarations.map(($8) => ["", $8, ";"])
|
|
4399
4559
|
];
|
|
4400
4560
|
}
|
|
4401
4561
|
function elideMatchersFromArrayBindings(elements) {
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
case "
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4562
|
+
const results = [];
|
|
4563
|
+
for (let i5 = 0, len4 = elements.length; i5 < len4; i5++) {
|
|
4564
|
+
const element = elements[i5];
|
|
4565
|
+
switch (element.type) {
|
|
4566
|
+
case "BindingRestElement":
|
|
4567
|
+
case "ElisionElement": {
|
|
4568
|
+
results.push(element);
|
|
4569
|
+
break;
|
|
4570
|
+
}
|
|
4571
|
+
case "BindingElement": {
|
|
4572
|
+
switch (element.binding.type) {
|
|
4573
|
+
case "Literal":
|
|
4574
|
+
case "RegularExpressionLiteral":
|
|
4575
|
+
case "StringLiteral":
|
|
4576
|
+
case "PinPattern": {
|
|
4577
|
+
results.push(element.delim);
|
|
4578
|
+
break;
|
|
4579
|
+
}
|
|
4580
|
+
default: {
|
|
4581
|
+
const binding = nonMatcherBindings(element.binding);
|
|
4582
|
+
results.push(makeNode({
|
|
4583
|
+
...element,
|
|
4584
|
+
binding,
|
|
4585
|
+
children: element.children.map((c) => {
|
|
4586
|
+
return c === element.binding ? binding : c;
|
|
4587
|
+
})
|
|
4588
|
+
}));
|
|
4589
|
+
}
|
|
4590
|
+
}
|
|
4591
|
+
;
|
|
4592
|
+
break;
|
|
4593
|
+
}
|
|
4415
4594
|
}
|
|
4416
|
-
}
|
|
4595
|
+
}
|
|
4596
|
+
;
|
|
4597
|
+
return results;
|
|
4417
4598
|
}
|
|
4418
4599
|
function elideMatchersFromPropertyBindings(properties) {
|
|
4419
4600
|
return properties.map((p) => {
|
|
@@ -4421,6 +4602,10 @@ ${js}`
|
|
|
4421
4602
|
case "BindingProperty": {
|
|
4422
4603
|
const { children, name, value } = p;
|
|
4423
4604
|
const [ws] = children;
|
|
4605
|
+
const shouldElide = name.type === "NumericLiteral" && !value?.name || name.type === "ComputedPropertyName" && value?.subtype === "NumericLiteral";
|
|
4606
|
+
if (shouldElide) {
|
|
4607
|
+
return;
|
|
4608
|
+
}
|
|
4424
4609
|
switch (value && value.type) {
|
|
4425
4610
|
case "ArrayBindingPattern":
|
|
4426
4611
|
case "ObjectBindingPattern": {
|
|
@@ -4452,32 +4637,22 @@ ${js}`
|
|
|
4452
4637
|
}
|
|
4453
4638
|
function nonMatcherBindings(pattern) {
|
|
4454
4639
|
switch (pattern.type) {
|
|
4455
|
-
case "ArrayBindingPattern":
|
|
4640
|
+
case "ArrayBindingPattern":
|
|
4641
|
+
case "PostRestBindingElements": {
|
|
4456
4642
|
const elements = elideMatchersFromArrayBindings(pattern.elements);
|
|
4457
|
-
return {
|
|
4643
|
+
return makeNode({
|
|
4458
4644
|
...pattern,
|
|
4459
4645
|
elements,
|
|
4460
|
-
children: pattern.children.map(($
|
|
4461
|
-
};
|
|
4462
|
-
}
|
|
4463
|
-
case "PostRestBindingElements": {
|
|
4464
|
-
const els = elideMatchersFromArrayBindings(pattern.children[1]);
|
|
4465
|
-
return {
|
|
4466
|
-
...pattern,
|
|
4467
|
-
children: [
|
|
4468
|
-
pattern.children[0],
|
|
4469
|
-
els,
|
|
4470
|
-
...pattern.children.slice(2)
|
|
4471
|
-
]
|
|
4472
|
-
};
|
|
4646
|
+
children: pattern.children.map(($9) => $9 === pattern.elements ? elements : $9)
|
|
4647
|
+
});
|
|
4473
4648
|
}
|
|
4474
4649
|
case "ObjectBindingPattern": {
|
|
4475
4650
|
const properties = elideMatchersFromPropertyBindings(pattern.properties);
|
|
4476
|
-
return {
|
|
4651
|
+
return makeNode({
|
|
4477
4652
|
...pattern,
|
|
4478
4653
|
properties,
|
|
4479
|
-
children: pattern.children.map(($
|
|
4480
|
-
};
|
|
4654
|
+
children: pattern.children.map(($10) => $10 === pattern.properties ? properties : $10)
|
|
4655
|
+
});
|
|
4481
4656
|
}
|
|
4482
4657
|
default: {
|
|
4483
4658
|
return pattern;
|
|
@@ -4485,32 +4660,26 @@ ${js}`
|
|
|
4485
4660
|
}
|
|
4486
4661
|
}
|
|
4487
4662
|
function aggregateDuplicateBindings(bindings) {
|
|
4488
|
-
const props = gatherRecursiveAll(
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
const [, e] = element;
|
|
4496
|
-
if (e.type === "Identifier") {
|
|
4497
|
-
props.push(e);
|
|
4498
|
-
} else if (e.type === "BindingRestElement") {
|
|
4499
|
-
props.push(e);
|
|
4500
|
-
}
|
|
4501
|
-
}
|
|
4502
|
-
}
|
|
4503
|
-
}
|
|
4663
|
+
const props = gatherRecursiveAll(
|
|
4664
|
+
bindings,
|
|
4665
|
+
($) => $.type === "BindingProperty" || // Don't deduplicate ...rest properties; user should do so manually
|
|
4666
|
+
// because ...rest can be named arbitrarily
|
|
4667
|
+
//$.type is "BindingRestProperty"
|
|
4668
|
+
$.type === "Identifier" && $.parent?.type === "BindingElement" || $.type === "BindingRestElement"
|
|
4669
|
+
);
|
|
4504
4670
|
const declarations = [];
|
|
4505
4671
|
const propsGroupedByName = /* @__PURE__ */ new Map();
|
|
4506
|
-
for (let
|
|
4507
|
-
const p = props[
|
|
4672
|
+
for (let i6 = 0, len5 = props.length; i6 < len5; i6++) {
|
|
4673
|
+
const p = props[i6];
|
|
4508
4674
|
const { name, value } = p;
|
|
4509
4675
|
let m1;
|
|
4510
4676
|
if (m1 = value?.type, m1 === "ArrayBindingPattern" || m1 === "ObjectBindingPattern") {
|
|
4511
4677
|
continue;
|
|
4512
4678
|
}
|
|
4513
4679
|
const key = value?.name || name?.name || name;
|
|
4680
|
+
if (key?.type === "NumericLiteral" || key?.type === "ComputedPropertyName") {
|
|
4681
|
+
continue;
|
|
4682
|
+
}
|
|
4514
4683
|
if (propsGroupedByName.has(key)) {
|
|
4515
4684
|
propsGroupedByName.get(key).push(p);
|
|
4516
4685
|
} else {
|
|
@@ -4526,8 +4695,8 @@ ${js}`
|
|
|
4526
4695
|
pos: 0,
|
|
4527
4696
|
input: key
|
|
4528
4697
|
})) {
|
|
4529
|
-
for (let
|
|
4530
|
-
const p = shared[
|
|
4698
|
+
for (let i7 = 0, len6 = shared.length; i7 < len6; i7++) {
|
|
4699
|
+
const p = shared[i7];
|
|
4531
4700
|
aliasBinding(p, makeRef(`_${key}`, key));
|
|
4532
4701
|
}
|
|
4533
4702
|
return;
|
|
@@ -5619,9 +5788,12 @@ ${js}`
|
|
|
5619
5788
|
ascDec = [", ", ascRef, " = ", startRef, " <= ", endRef];
|
|
5620
5789
|
}
|
|
5621
5790
|
let varAssign = [], varLetAssign = varAssign, varLet = varAssign, blockPrefix;
|
|
5622
|
-
let names = forDeclaration?.names;
|
|
5623
|
-
if (forDeclaration
|
|
5624
|
-
if (forDeclaration.
|
|
5791
|
+
let names = forDeclaration?.names ?? [];
|
|
5792
|
+
if (forDeclaration != null) {
|
|
5793
|
+
if (forDeclaration.type === "AssignmentExpression") {
|
|
5794
|
+
varAssign = varLetAssign = [forDeclaration, " = "];
|
|
5795
|
+
names = [];
|
|
5796
|
+
} else if (forDeclaration.decl === "let") {
|
|
5625
5797
|
const varName = forDeclaration.children.splice(1);
|
|
5626
5798
|
varAssign = [...trimFirstSpace(varName), " = "];
|
|
5627
5799
|
varLet = [",", ...varName, " = ", counterRef];
|
|
@@ -5631,14 +5803,6 @@ ${js}`
|
|
|
5631
5803
|
["", [forDeclaration, " = ", value], ";"]
|
|
5632
5804
|
];
|
|
5633
5805
|
}
|
|
5634
|
-
} else if (forDeclaration) {
|
|
5635
|
-
assert.equal(
|
|
5636
|
-
forDeclaration.type,
|
|
5637
|
-
"AssignmentExpression",
|
|
5638
|
-
"Internal error: Coffee-style for loop must be an assignment expression"
|
|
5639
|
-
);
|
|
5640
|
-
varAssign = varLetAssign = [forDeclaration, " = "];
|
|
5641
|
-
names = [];
|
|
5642
5806
|
}
|
|
5643
5807
|
const declaration = {
|
|
5644
5808
|
type: "Declaration",
|
|
@@ -6158,7 +6322,8 @@ ${js}`
|
|
|
6158
6322
|
const block = makeNode({
|
|
6159
6323
|
type: "BlockStatement",
|
|
6160
6324
|
children: [" { ", expressions, " }"],
|
|
6161
|
-
expressions
|
|
6325
|
+
expressions,
|
|
6326
|
+
bare: false
|
|
6162
6327
|
});
|
|
6163
6328
|
const children = [...post.children, block];
|
|
6164
6329
|
if (!isWhitespaceOrEmpty(ws))
|
|
@@ -6557,11 +6722,11 @@ ${js}`
|
|
|
6557
6722
|
if (glob?.type === "PropertyGlob") {
|
|
6558
6723
|
let prefix = children.slice(0, i);
|
|
6559
6724
|
const parts = [];
|
|
6560
|
-
let
|
|
6561
|
-
if (prefix.length > 1) {
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
prefix = [
|
|
6725
|
+
let ref;
|
|
6726
|
+
if (prefix.length > 1 && glob.object.properties.length > 1) {
|
|
6727
|
+
ref = makeRef();
|
|
6728
|
+
const { refAssignment } = makeRefAssignment(ref, prefix);
|
|
6729
|
+
prefix = [makeLeftHandSideExpression(refAssignment)];
|
|
6565
6730
|
}
|
|
6566
6731
|
prefix = prefix.concat(glob.dot);
|
|
6567
6732
|
for (const part of glob.object.properties) {
|
|
@@ -6593,6 +6758,9 @@ ${js}`
|
|
|
6593
6758
|
}
|
|
6594
6759
|
if (!suppressPrefix) {
|
|
6595
6760
|
value = prefix.concat(trimFirstSpace(value));
|
|
6761
|
+
if (ref != null) {
|
|
6762
|
+
prefix = [ref].concat(glob.dot);
|
|
6763
|
+
}
|
|
6596
6764
|
}
|
|
6597
6765
|
if (wValue)
|
|
6598
6766
|
value.unshift(wValue);
|
|
@@ -6603,7 +6771,8 @@ ${js}`
|
|
|
6603
6771
|
dots: part.dots,
|
|
6604
6772
|
delim: part.delim,
|
|
6605
6773
|
names: part.names,
|
|
6606
|
-
children: part.children.slice(0, 2).concat(value, part.delim)
|
|
6774
|
+
children: part.children.slice(0, 2).concat(value, part.delim),
|
|
6775
|
+
usesRef: Boolean(ref)
|
|
6607
6776
|
});
|
|
6608
6777
|
} else {
|
|
6609
6778
|
parts.push({
|
|
@@ -6620,12 +6789,13 @@ ${js}`
|
|
|
6620
6789
|
value,
|
|
6621
6790
|
part.delim
|
|
6622
6791
|
// comma delimiter
|
|
6623
|
-
]
|
|
6792
|
+
],
|
|
6793
|
+
usesRef: Boolean(ref)
|
|
6624
6794
|
});
|
|
6625
6795
|
}
|
|
6626
6796
|
}
|
|
6627
6797
|
let ref2;
|
|
6628
|
-
|
|
6798
|
+
const object = {
|
|
6629
6799
|
type: "ObjectExpression",
|
|
6630
6800
|
children: [
|
|
6631
6801
|
glob.object.children[0],
|
|
@@ -6636,13 +6806,6 @@ ${js}`
|
|
|
6636
6806
|
],
|
|
6637
6807
|
properties: parts
|
|
6638
6808
|
};
|
|
6639
|
-
if (refAssignmentComma) {
|
|
6640
|
-
object = makeNode({
|
|
6641
|
-
type: "ParenthesizedExpression",
|
|
6642
|
-
children: ["(", ...refAssignmentComma, object, ")"],
|
|
6643
|
-
expression: object
|
|
6644
|
-
});
|
|
6645
|
-
}
|
|
6646
6809
|
if (i === children.length - 1)
|
|
6647
6810
|
return object;
|
|
6648
6811
|
return processCallMemberExpression({
|
|
@@ -6852,40 +7015,54 @@ ${js}`
|
|
|
6852
7015
|
};
|
|
6853
7016
|
}
|
|
6854
7017
|
function convertObjectToJSXAttributes(obj) {
|
|
6855
|
-
const { properties } = obj;
|
|
6856
7018
|
const parts = [];
|
|
6857
7019
|
const rest = [];
|
|
6858
|
-
|
|
7020
|
+
let i4 = 0;
|
|
7021
|
+
for (const part of obj.properties) {
|
|
7022
|
+
const i = i4++;
|
|
7023
|
+
if (part.usesRef) {
|
|
7024
|
+
rest.push(part);
|
|
7025
|
+
continue;
|
|
7026
|
+
}
|
|
6859
7027
|
if (i > 0)
|
|
6860
7028
|
parts.push(" ");
|
|
6861
|
-
const part = properties[i];
|
|
6862
7029
|
switch (part.type) {
|
|
6863
|
-
case "Identifier":
|
|
7030
|
+
case "Identifier": {
|
|
6864
7031
|
parts.push([part.name, "={", part.name, "}"]);
|
|
6865
7032
|
break;
|
|
6866
|
-
|
|
7033
|
+
}
|
|
7034
|
+
case "Property": {
|
|
6867
7035
|
if (part.name.type === "ComputedPropertyName") {
|
|
6868
7036
|
rest.push(part);
|
|
6869
7037
|
} else {
|
|
6870
7038
|
parts.push([part.name, "={", trimFirstSpace(part.value), "}"]);
|
|
6871
7039
|
}
|
|
7040
|
+
;
|
|
6872
7041
|
break;
|
|
6873
|
-
|
|
7042
|
+
}
|
|
7043
|
+
case "SpreadProperty": {
|
|
6874
7044
|
parts.push(["{", part.dots, part.value, "}"]);
|
|
6875
7045
|
break;
|
|
6876
|
-
|
|
7046
|
+
}
|
|
7047
|
+
case "MethodDefinition": {
|
|
6877
7048
|
const func = convertMethodToFunction(part);
|
|
6878
7049
|
if (func) {
|
|
6879
7050
|
parts.push([part.name, "={", convertMethodToFunction(part), "}"]);
|
|
6880
7051
|
} else {
|
|
6881
7052
|
rest.push(part);
|
|
6882
7053
|
}
|
|
7054
|
+
;
|
|
6883
7055
|
break;
|
|
6884
|
-
|
|
7056
|
+
}
|
|
7057
|
+
default: {
|
|
6885
7058
|
throw new Error(`invalid object literal type in JSX attribute: ${part.type}`);
|
|
7059
|
+
}
|
|
6886
7060
|
}
|
|
6887
7061
|
}
|
|
6888
7062
|
if (rest.length) {
|
|
7063
|
+
if (parts.length && parts[parts.length - 1] !== " ") {
|
|
7064
|
+
parts.push(" ");
|
|
7065
|
+
}
|
|
6889
7066
|
parts.push(["{...{", ...rest, "}}"]);
|
|
6890
7067
|
}
|
|
6891
7068
|
return parts;
|
|
@@ -6946,7 +7123,7 @@ ${js}`
|
|
|
6946
7123
|
tail.push(...splices.map((s) => [", ", s]), ...thisAssignments.map((a) => [", ", a]));
|
|
6947
7124
|
}
|
|
6948
7125
|
function processAssignments(statements) {
|
|
6949
|
-
for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"),
|
|
7126
|
+
for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len3 = ref7.length; i5 < len3; i5++) {
|
|
6950
7127
|
let extractAssignment2 = function(lhs) {
|
|
6951
7128
|
let expr = lhs;
|
|
6952
7129
|
while (expr.type === "ParenthesizedExpression") {
|
|
@@ -6967,7 +7144,7 @@ ${js}`
|
|
|
6967
7144
|
return;
|
|
6968
7145
|
};
|
|
6969
7146
|
var extractAssignment = extractAssignment2;
|
|
6970
|
-
const exp = ref7[
|
|
7147
|
+
const exp = ref7[i5];
|
|
6971
7148
|
checkValidLHS(exp.assigned);
|
|
6972
7149
|
const pre = [], post = [];
|
|
6973
7150
|
let ref8;
|
|
@@ -6976,8 +7153,8 @@ ${js}`
|
|
|
6976
7153
|
if (!exp.lhs) {
|
|
6977
7154
|
continue;
|
|
6978
7155
|
}
|
|
6979
|
-
for (let ref9 = exp.lhs,
|
|
6980
|
-
const lhsPart = ref9[
|
|
7156
|
+
for (let ref9 = exp.lhs, i6 = 0, len4 = ref9.length; i6 < len4; i6++) {
|
|
7157
|
+
const lhsPart = ref9[i6];
|
|
6981
7158
|
let ref10;
|
|
6982
7159
|
if (ref10 = extractAssignment2(lhsPart[1])) {
|
|
6983
7160
|
const newLhs = ref10;
|
|
@@ -7021,8 +7198,8 @@ ${js}`
|
|
|
7021
7198
|
}
|
|
7022
7199
|
}
|
|
7023
7200
|
}
|
|
7024
|
-
for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"),
|
|
7025
|
-
const exp = ref11[
|
|
7201
|
+
for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len5 = ref11.length; i7 < len5; i7++) {
|
|
7202
|
+
const exp = ref11[i7];
|
|
7026
7203
|
if (!(exp.names === null)) {
|
|
7027
7204
|
continue;
|
|
7028
7205
|
}
|
|
@@ -7259,101 +7436,149 @@ ${js}`
|
|
|
7259
7436
|
}
|
|
7260
7437
|
}
|
|
7261
7438
|
function processTypes(node) {
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
}
|
|
7277
|
-
let ref18;
|
|
7278
|
-
while (unary.suffix.length && (ref18 = unary.suffix)[ref18.length - 1]?.type === "NonNullAssertion") {
|
|
7279
|
-
unary.suffix.pop();
|
|
7280
|
-
}
|
|
7281
|
-
let ref19;
|
|
7282
|
-
if (unary.suffix.length || unary.prefix.length)
|
|
7283
|
-
ref19 = unary;
|
|
7284
|
-
else
|
|
7285
|
-
ref19 = unary.t;
|
|
7286
|
-
const t = ref19;
|
|
7287
|
-
if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
|
|
7288
|
-
if (count === 1) {
|
|
7289
|
-
unary.suffix.push(last);
|
|
7290
|
-
return;
|
|
7439
|
+
const results1 = [];
|
|
7440
|
+
for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len6 = ref16.length; i8 < len6; i8++) {
|
|
7441
|
+
const unary = ref16[i8];
|
|
7442
|
+
let suffixIndex = unary.suffix.length - 1;
|
|
7443
|
+
const results2 = [];
|
|
7444
|
+
while (suffixIndex >= 0) {
|
|
7445
|
+
const suffix = unary.suffix[suffixIndex];
|
|
7446
|
+
if (typeof suffix === "object" && suffix != null && "token" in suffix && suffix.token === "?") {
|
|
7447
|
+
const { token } = suffix;
|
|
7448
|
+
let count = 0;
|
|
7449
|
+
let m4;
|
|
7450
|
+
while (m4 = unary.suffix[suffixIndex], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
|
|
7451
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7452
|
+
count++;
|
|
7291
7453
|
}
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7454
|
+
let m5;
|
|
7455
|
+
while (m5 = unary.suffix[suffixIndex], typeof m5 === "object" && m5 != null && "type" in m5 && m5.type === "NonNullAssertion") {
|
|
7456
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7457
|
+
}
|
|
7458
|
+
const { parent, prefix } = unary;
|
|
7459
|
+
unary.prefix = [];
|
|
7460
|
+
unary.children = unary.children.filter((a1) => a1 !== prefix);
|
|
7461
|
+
const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
|
|
7462
|
+
const space = getTrimmingSpace(unary);
|
|
7463
|
+
let replace;
|
|
7464
|
+
if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
|
|
7465
|
+
if (count === 1) {
|
|
7466
|
+
unary.suffix.splice(suffixIndex + 1, 0, suffix);
|
|
7467
|
+
continue;
|
|
7468
|
+
}
|
|
7469
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7470
|
+
const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
|
|
7471
|
+
replace = [
|
|
7472
|
+
space,
|
|
7473
|
+
"(",
|
|
7474
|
+
t,
|
|
7475
|
+
" | null)",
|
|
7476
|
+
suffix
|
|
7477
|
+
];
|
|
7478
|
+
} else {
|
|
7479
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7480
|
+
const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
|
|
7481
|
+
replace = makeNode({
|
|
7482
|
+
type: "TypeParenthesized",
|
|
7483
|
+
ts: true,
|
|
7484
|
+
children: [
|
|
7485
|
+
space,
|
|
7486
|
+
"(",
|
|
7487
|
+
t,
|
|
7488
|
+
count === 1 ? " | undefined" : " | undefined | null",
|
|
7489
|
+
")"
|
|
7490
|
+
]
|
|
7491
|
+
});
|
|
7492
|
+
}
|
|
7493
|
+
if (prefix.length || outer.length) {
|
|
7494
|
+
replace = makeNode({
|
|
7495
|
+
type: "TypeUnary",
|
|
7496
|
+
ts: true,
|
|
7497
|
+
t: replace,
|
|
7498
|
+
prefix,
|
|
7499
|
+
suffix: outer,
|
|
7500
|
+
children: [prefix, replace, outer]
|
|
7501
|
+
});
|
|
7502
|
+
}
|
|
7503
|
+
results2.push(replaceNode(unary, replace, parent));
|
|
7504
|
+
} else if (typeof suffix === "object" && suffix != null && "type" in suffix && suffix.type === "NonNullAssertion") {
|
|
7505
|
+
const { type } = suffix;
|
|
7506
|
+
let m6;
|
|
7507
|
+
while (m6 = unary.suffix[suffixIndex], typeof m6 === "object" && m6 != null && "type" in m6 && m6.type === "NonNullAssertion") {
|
|
7508
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7509
|
+
}
|
|
7510
|
+
let m7;
|
|
7511
|
+
while (m7 = unary.suffix[suffixIndex], typeof m7 === "object" && m7 != null && "token" in m7 && m7.token === "?") {
|
|
7512
|
+
unary.suffix.splice(suffixIndex--, 1);
|
|
7513
|
+
}
|
|
7514
|
+
const { parent, prefix } = unary;
|
|
7515
|
+
unary.prefix = [];
|
|
7516
|
+
unary.children = unary.children.filter((a2) => a2 !== prefix);
|
|
7517
|
+
const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
|
|
7518
|
+
const space = getTrimmingSpace(unary);
|
|
7519
|
+
inplaceInsertTrimmingSpace(unary, "");
|
|
7520
|
+
let ref17;
|
|
7521
|
+
if (unary.suffix.length)
|
|
7522
|
+
ref17 = unary;
|
|
7523
|
+
else
|
|
7524
|
+
ref17 = unary.t;
|
|
7525
|
+
const t = ref17;
|
|
7526
|
+
const arg = makeNode({
|
|
7527
|
+
type: "TypeArgument",
|
|
7302
7528
|
ts: true,
|
|
7529
|
+
t,
|
|
7530
|
+
children: [t]
|
|
7531
|
+
});
|
|
7532
|
+
const argArray = [arg];
|
|
7533
|
+
const args = makeNode({
|
|
7534
|
+
type: "TypeArguments",
|
|
7535
|
+
ts: true,
|
|
7536
|
+
args: argArray,
|
|
7537
|
+
children: ["<", argArray, ">"]
|
|
7538
|
+
});
|
|
7539
|
+
let replace = makeNode({
|
|
7540
|
+
type: "TypeIdentifier",
|
|
7541
|
+
raw: "NonNullable",
|
|
7542
|
+
args,
|
|
7303
7543
|
children: [
|
|
7304
|
-
|
|
7305
|
-
"
|
|
7306
|
-
|
|
7307
|
-
count === 1 ? " | undefined" : " | undefined | null",
|
|
7308
|
-
")"
|
|
7544
|
+
space,
|
|
7545
|
+
"NonNullable",
|
|
7546
|
+
args
|
|
7309
7547
|
]
|
|
7310
7548
|
});
|
|
7549
|
+
if (prefix.length || outer.length) {
|
|
7550
|
+
replace = makeNode({
|
|
7551
|
+
type: "TypeUnary",
|
|
7552
|
+
ts: true,
|
|
7553
|
+
t: replace,
|
|
7554
|
+
prefix,
|
|
7555
|
+
suffix: outer,
|
|
7556
|
+
children: [prefix, replace, outer]
|
|
7557
|
+
});
|
|
7558
|
+
}
|
|
7559
|
+
results2.push(replaceNode(unary, replace, parent));
|
|
7560
|
+
} else {
|
|
7561
|
+
results2.push(suffixIndex--);
|
|
7311
7562
|
}
|
|
7312
|
-
} else if (typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "NonNullAssertion") {
|
|
7313
|
-
const { type } = m4;
|
|
7314
|
-
let ref20;
|
|
7315
|
-
while (unary.suffix.length && (ref20 = unary.suffix)[ref20.length - 1]?.type === "NonNullAssertion") {
|
|
7316
|
-
unary.suffix.pop();
|
|
7317
|
-
}
|
|
7318
|
-
let ref21;
|
|
7319
|
-
while (unary.suffix.length && (ref21 = unary.suffix)[ref21.length - 1]?.token === "?") {
|
|
7320
|
-
unary.suffix.pop();
|
|
7321
|
-
}
|
|
7322
|
-
const t = trimFirstSpace(
|
|
7323
|
-
unary.suffix.length || unary.prefix.length ? unary : unary.t
|
|
7324
|
-
);
|
|
7325
|
-
const args = {
|
|
7326
|
-
type: "TypeArguments",
|
|
7327
|
-
ts: true,
|
|
7328
|
-
types: [t],
|
|
7329
|
-
children: ["<", t, ">"]
|
|
7330
|
-
};
|
|
7331
|
-
replaceNode(unary, {
|
|
7332
|
-
type: "TypeIdentifier",
|
|
7333
|
-
raw: "NonNullable",
|
|
7334
|
-
args,
|
|
7335
|
-
children: [
|
|
7336
|
-
getTrimmingSpace(unary),
|
|
7337
|
-
"NonNullable",
|
|
7338
|
-
args
|
|
7339
|
-
]
|
|
7340
|
-
});
|
|
7341
7563
|
}
|
|
7342
|
-
|
|
7564
|
+
results1.push(results2);
|
|
7565
|
+
}
|
|
7566
|
+
;
|
|
7567
|
+
return results1;
|
|
7343
7568
|
}
|
|
7344
7569
|
function processStatementExpressions(statements) {
|
|
7345
|
-
for (let
|
|
7346
|
-
const exp =
|
|
7570
|
+
for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len7 = ref18.length; i9 < len7; i9++) {
|
|
7571
|
+
const exp = ref18[i9];
|
|
7347
7572
|
const { maybe, statement } = exp;
|
|
7348
7573
|
if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
|
|
7349
7574
|
replaceNode(exp, statement);
|
|
7350
7575
|
continue;
|
|
7351
7576
|
}
|
|
7352
|
-
let
|
|
7577
|
+
let ref19;
|
|
7353
7578
|
switch (statement.type) {
|
|
7354
7579
|
case "IfStatement": {
|
|
7355
|
-
if (
|
|
7356
|
-
const expression =
|
|
7580
|
+
if (ref19 = expressionizeIfStatement(statement)) {
|
|
7581
|
+
const expression = ref19;
|
|
7357
7582
|
replaceNode(statement, expression, exp);
|
|
7358
7583
|
} else {
|
|
7359
7584
|
replaceNode(statement, wrapIIFE([["", statement]]), exp);
|
|
@@ -7411,13 +7636,13 @@ ${js}`
|
|
|
7411
7636
|
});
|
|
7412
7637
|
}
|
|
7413
7638
|
function processFinallyClauses(statements) {
|
|
7414
|
-
for (let
|
|
7415
|
-
let f =
|
|
7416
|
-
let
|
|
7417
|
-
if (!((
|
|
7639
|
+
for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len8 = ref20.length; i10 < len8; i10++) {
|
|
7640
|
+
let f = ref20[i10];
|
|
7641
|
+
let ref21;
|
|
7642
|
+
if (!((ref21 = blockContainingStatement(f)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21)) {
|
|
7418
7643
|
throw new Error("finally clause must be inside try statement or block");
|
|
7419
7644
|
}
|
|
7420
|
-
const { block, index } =
|
|
7645
|
+
const { block, index } = ref21;
|
|
7421
7646
|
const indent = block.expressions[index][0];
|
|
7422
7647
|
const expressions = block.expressions.slice(index + 1);
|
|
7423
7648
|
const t = makeNode({
|
|
@@ -7454,7 +7679,7 @@ ${js}`
|
|
|
7454
7679
|
if (config2.iife || config2.repl) {
|
|
7455
7680
|
rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
|
|
7456
7681
|
const newExpressions = [["", rootIIFE]];
|
|
7457
|
-
root.children = root.children.map(($
|
|
7682
|
+
root.children = root.children.map(($13) => $13 === root.expressions ? newExpressions : $13);
|
|
7458
7683
|
root.expressions = newExpressions;
|
|
7459
7684
|
}
|
|
7460
7685
|
addParentPointers(root);
|
|
@@ -7495,10 +7720,10 @@ ${js}`
|
|
|
7495
7720
|
await processComptime(statements);
|
|
7496
7721
|
}
|
|
7497
7722
|
function processRepl(root, rootIIFE) {
|
|
7498
|
-
const topBlock = gatherRecursive(rootIIFE, ($
|
|
7723
|
+
const topBlock = gatherRecursive(rootIIFE, ($14) => $14.type === "BlockStatement")[0];
|
|
7499
7724
|
let i = 0;
|
|
7500
|
-
for (let
|
|
7501
|
-
const decl =
|
|
7725
|
+
for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($15) => $15.type === "Declaration"), i11 = 0, len9 = ref22.length; i11 < len9; i11++) {
|
|
7726
|
+
const decl = ref22[i11];
|
|
7502
7727
|
if (!decl.names?.length) {
|
|
7503
7728
|
continue;
|
|
7504
7729
|
}
|
|
@@ -7511,8 +7736,8 @@ ${js}`
|
|
|
7511
7736
|
root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]);
|
|
7512
7737
|
}
|
|
7513
7738
|
}
|
|
7514
|
-
for (let
|
|
7515
|
-
const func =
|
|
7739
|
+
for (let ref23 = gatherRecursive(topBlock, ($16) => $16.type === "FunctionExpression"), i12 = 0, len10 = ref23.length; i12 < len10; i12++) {
|
|
7740
|
+
const func = ref23[i12];
|
|
7516
7741
|
if (func.name && func.parent?.type === "BlockStatement") {
|
|
7517
7742
|
if (func.parent === topBlock) {
|
|
7518
7743
|
replaceNode(func, void 0);
|
|
@@ -7524,17 +7749,17 @@ ${js}`
|
|
|
7524
7749
|
}
|
|
7525
7750
|
}
|
|
7526
7751
|
}
|
|
7527
|
-
for (let
|
|
7528
|
-
const classExp =
|
|
7529
|
-
let
|
|
7530
|
-
if (classExp.name && classExp.parent === topBlock || (
|
|
7752
|
+
for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($17) => $17.type === "ClassExpression"), i13 = 0, len11 = ref24.length; i13 < len11; i13++) {
|
|
7753
|
+
const classExp = ref24[i13];
|
|
7754
|
+
let m8;
|
|
7755
|
+
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)) {
|
|
7531
7756
|
classExp.children.unshift(classExp.name, "=");
|
|
7532
7757
|
root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]);
|
|
7533
7758
|
}
|
|
7534
7759
|
}
|
|
7535
7760
|
}
|
|
7536
7761
|
function populateRefs(statements) {
|
|
7537
|
-
const refNodes = gatherRecursive(statements, ($
|
|
7762
|
+
const refNodes = gatherRecursive(statements, ($18) => $18.type === "Ref");
|
|
7538
7763
|
if (refNodes.length) {
|
|
7539
7764
|
const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
|
|
7540
7765
|
const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
|
|
@@ -7557,8 +7782,8 @@ ${js}`
|
|
|
7557
7782
|
function processPlaceholders(statements) {
|
|
7558
7783
|
const placeholderMap = /* @__PURE__ */ new Map();
|
|
7559
7784
|
const liftedIfs = /* @__PURE__ */ new Set();
|
|
7560
|
-
for (let
|
|
7561
|
-
const exp =
|
|
7785
|
+
for (let ref25 = gatherRecursiveAll(statements, ($19) => $19.type === "Placeholder"), i14 = 0, len12 = ref25.length; i14 < len12; i14++) {
|
|
7786
|
+
const exp = ref25[i14];
|
|
7562
7787
|
let ancestor;
|
|
7563
7788
|
if (exp.subtype === ".") {
|
|
7564
7789
|
({ ancestor } = findAncestor(
|
|
@@ -7566,8 +7791,8 @@ ${js}`
|
|
|
7566
7791
|
($) => $.type === "Call" && !$.parent?.implicit
|
|
7567
7792
|
));
|
|
7568
7793
|
ancestor = ancestor?.parent;
|
|
7569
|
-
let
|
|
7570
|
-
while (ancestor?.parent != null && (
|
|
7794
|
+
let m9;
|
|
7795
|
+
while (ancestor?.parent != null && (m9 = ancestor.parent.type, m9 === "UnaryExpression" || m9 === "NewExpression" || m9 === "AwaitExpression" || m9 === "ThrowStatement" || m9 === "StatementExpression")) {
|
|
7571
7796
|
ancestor = ancestor.parent;
|
|
7572
7797
|
}
|
|
7573
7798
|
if (!ancestor) {
|
|
@@ -7584,10 +7809,10 @@ ${js}`
|
|
|
7584
7809
|
if (type === "IfStatement") {
|
|
7585
7810
|
liftedIfs.add(ancestor2);
|
|
7586
7811
|
}
|
|
7587
|
-
let
|
|
7588
|
-
let
|
|
7812
|
+
let m10;
|
|
7813
|
+
let m11;
|
|
7589
7814
|
return type === "Call" && !ancestor2.parent?.implicit || // Block, except for if/else blocks when condition already lifted
|
|
7590
|
-
type === "BlockStatement" && !((
|
|
7815
|
+
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
|
|
7591
7816
|
type === "Initializer" || // Right-hand side of assignment
|
|
7592
7817
|
type === "AssignmentExpression" && findChildIndex(ancestor2, child2) === ancestor2.children.indexOf(ancestor2.expression) || type === "ReturnStatement" || type === "YieldExpression";
|
|
7593
7818
|
}));
|
|
@@ -7661,11 +7886,11 @@ ${js}`
|
|
|
7661
7886
|
for (const [ancestor, placeholders] of placeholderMap) {
|
|
7662
7887
|
let ref = makeRef("$");
|
|
7663
7888
|
let typeSuffix;
|
|
7664
|
-
for (let
|
|
7665
|
-
const placeholder = placeholders[
|
|
7889
|
+
for (let i15 = 0, len13 = placeholders.length; i15 < len13; i15++) {
|
|
7890
|
+
const placeholder = placeholders[i15];
|
|
7666
7891
|
typeSuffix ??= placeholder.typeSuffix;
|
|
7667
|
-
let
|
|
7668
|
-
replaceNode((
|
|
7892
|
+
let ref26;
|
|
7893
|
+
replaceNode((ref26 = placeholder.children)[ref26.length - 1], ref);
|
|
7669
7894
|
}
|
|
7670
7895
|
const { parent } = ancestor;
|
|
7671
7896
|
const body = maybeUnwrap(ancestor);
|
|
@@ -7686,16 +7911,16 @@ ${js}`
|
|
|
7686
7911
|
}
|
|
7687
7912
|
case "PipelineExpression": {
|
|
7688
7913
|
const i = findChildIndex(parent, ancestor);
|
|
7689
|
-
let
|
|
7914
|
+
let ref27;
|
|
7690
7915
|
if (i === 1) {
|
|
7691
|
-
|
|
7916
|
+
ref27 = ancestor === parent.children[i];
|
|
7692
7917
|
} else if (i === 2) {
|
|
7693
|
-
|
|
7918
|
+
ref27 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
|
|
7694
7919
|
} else {
|
|
7695
|
-
|
|
7920
|
+
ref27 = void 0;
|
|
7696
7921
|
}
|
|
7697
7922
|
;
|
|
7698
|
-
outer =
|
|
7923
|
+
outer = ref27;
|
|
7699
7924
|
break;
|
|
7700
7925
|
}
|
|
7701
7926
|
case "AssignmentExpression":
|
|
@@ -7710,9 +7935,9 @@ ${js}`
|
|
|
7710
7935
|
fnExp = makeLeftHandSideExpression(fnExp);
|
|
7711
7936
|
}
|
|
7712
7937
|
replaceNode(ancestor, fnExp, parent);
|
|
7713
|
-
let
|
|
7714
|
-
if (
|
|
7715
|
-
const ws =
|
|
7938
|
+
let ref28;
|
|
7939
|
+
if (ref28 = getTrimmingSpace(body)) {
|
|
7940
|
+
const ws = ref28;
|
|
7716
7941
|
inplaceInsertTrimmingSpace(body, "");
|
|
7717
7942
|
inplacePrepend(ws, fnExp);
|
|
7718
7943
|
}
|
|
@@ -7757,8 +7982,8 @@ ${js}`
|
|
|
7757
7982
|
}
|
|
7758
7983
|
];
|
|
7759
7984
|
}
|
|
7760
|
-
let
|
|
7761
|
-
if (Array.isArray(rest.delim) && (
|
|
7985
|
+
let ref29;
|
|
7986
|
+
if (Array.isArray(rest.delim) && (ref29 = rest.delim)[ref29.length - 1]?.token === ",") {
|
|
7762
7987
|
rest.delim = rest.delim.slice(0, -1);
|
|
7763
7988
|
rest.children = [...rest.children.slice(0, -1), rest.delim];
|
|
7764
7989
|
}
|
|
@@ -7855,11 +8080,10 @@ ${js}`
|
|
|
7855
8080
|
ApplicationStart,
|
|
7856
8081
|
ForbiddenImplicitCalls,
|
|
7857
8082
|
ReservedBinary,
|
|
7858
|
-
|
|
7859
|
-
TrailingMemberExpressions,
|
|
7860
|
-
IndentedTrailingMemberExpression,
|
|
7861
|
-
AllowedTrailingMemberExpressions,
|
|
8083
|
+
ArgumentsWithTrailingCallExpressions,
|
|
7862
8084
|
TrailingCallExpressions,
|
|
8085
|
+
IndentedTrailingCallExpressions,
|
|
8086
|
+
NestedTrailingCallExpression,
|
|
7863
8087
|
AllowedTrailingCallExpressions,
|
|
7864
8088
|
CommaDelimiter,
|
|
7865
8089
|
OptionalCommaDelimiter,
|
|
@@ -7917,6 +8141,7 @@ ${js}`
|
|
|
7917
8141
|
PipelineHeadItem,
|
|
7918
8142
|
PipelineTailItem,
|
|
7919
8143
|
PrimaryExpression,
|
|
8144
|
+
OptimizedParenthesizedExpression,
|
|
7920
8145
|
ParenthesizedExpression,
|
|
7921
8146
|
Placeholder,
|
|
7922
8147
|
PlaceholderTypeSuffix,
|
|
@@ -7970,6 +8195,7 @@ ${js}`
|
|
|
7970
8195
|
ImplicitAccessStart,
|
|
7971
8196
|
PropertyAccessModifier,
|
|
7972
8197
|
PropertyAccess,
|
|
8198
|
+
ExplicitPropertyGlob,
|
|
7973
8199
|
PropertyGlob,
|
|
7974
8200
|
PropertyBind,
|
|
7975
8201
|
SuperProperty,
|
|
@@ -8792,125 +9018,126 @@ ${js}`
|
|
|
8792
9018
|
var $L124 = (0, import_lib2.$L)("product");
|
|
8793
9019
|
var $L125 = (0, import_lib2.$L)("min");
|
|
8794
9020
|
var $L126 = (0, import_lib2.$L)("max");
|
|
8795
|
-
var $L127 = (0, import_lib2.$L)("
|
|
8796
|
-
var $L128 = (0, import_lib2.$L)("
|
|
8797
|
-
var $L129 = (0, import_lib2.$L)("
|
|
8798
|
-
var $L130 = (0, import_lib2.$L)("
|
|
8799
|
-
var $L131 = (0, import_lib2.$L)("
|
|
8800
|
-
var $L132 = (0, import_lib2.$L)("
|
|
8801
|
-
var $L133 = (0, import_lib2.$L)("
|
|
8802
|
-
var $L134 = (0, import_lib2.$L)("
|
|
8803
|
-
var $L135 = (0, import_lib2.$L)("
|
|
8804
|
-
var $L136 = (0, import_lib2.$L)("
|
|
8805
|
-
var $L137 = (0, import_lib2.$L)("
|
|
8806
|
-
var $L138 = (0, import_lib2.$L)("
|
|
8807
|
-
var $L139 = (0, import_lib2.$L)("
|
|
8808
|
-
var $L140 = (0, import_lib2.$L)("
|
|
8809
|
-
var $L141 = (0, import_lib2.$L)("
|
|
8810
|
-
var $L142 = (0, import_lib2.$L)("
|
|
8811
|
-
var $L143 = (0, import_lib2.$L)("
|
|
8812
|
-
var $L144 = (0, import_lib2.$L)("
|
|
8813
|
-
var $L145 = (0, import_lib2.$L)("
|
|
8814
|
-
var $L146 = (0, import_lib2.$L)("
|
|
8815
|
-
var $L147 = (0, import_lib2.$L)("
|
|
8816
|
-
var $L148 = (0, import_lib2.$L)("
|
|
8817
|
-
var $L149 = (0, import_lib2.$L)("
|
|
8818
|
-
var $L150 = (0, import_lib2.$L)("
|
|
8819
|
-
var $L151 = (0, import_lib2.$L)("
|
|
8820
|
-
var $L152 = (0, import_lib2.$L)("
|
|
8821
|
-
var $L153 = (0, import_lib2.$L)("
|
|
8822
|
-
var $L154 = (0, import_lib2.$L)("
|
|
8823
|
-
var $L155 = (0, import_lib2.$L)("
|
|
8824
|
-
var $L156 = (0, import_lib2.$L)("
|
|
8825
|
-
var $L157 = (0, import_lib2.$L)("
|
|
8826
|
-
var $L158 = (0, import_lib2.$L)("
|
|
8827
|
-
var $L159 = (0, import_lib2.$L)("
|
|
8828
|
-
var $L160 = (0, import_lib2.$L)("
|
|
8829
|
-
var $L161 = (0, import_lib2.$L)("
|
|
8830
|
-
var $L162 = (0, import_lib2.$L)("
|
|
8831
|
-
var $L163 = (0, import_lib2.$L)(
|
|
8832
|
-
var $L164 = (0, import_lib2.$L)("
|
|
8833
|
-
var $L165 = (0, import_lib2.$L)("
|
|
8834
|
-
var $L166 = (0, import_lib2.$L)("
|
|
8835
|
-
var $L167 = (0, import_lib2.$L)("
|
|
8836
|
-
var $L168 = (0, import_lib2.$L)("
|
|
8837
|
-
var $L169 = (0, import_lib2.$L)("
|
|
8838
|
-
var $L170 = (0, import_lib2.$L)("
|
|
8839
|
-
var $L171 = (0, import_lib2.$L)("
|
|
8840
|
-
var $L172 = (0, import_lib2.$L)("
|
|
8841
|
-
var $L173 = (0, import_lib2.$L)("
|
|
8842
|
-
var $L174 = (0, import_lib2.$L)("
|
|
8843
|
-
var $L175 = (0, import_lib2.$L)("
|
|
8844
|
-
var $L176 = (0, import_lib2.$L)("
|
|
8845
|
-
var $L177 = (0, import_lib2.$L)("
|
|
8846
|
-
var $L178 = (0, import_lib2.$L)("
|
|
8847
|
-
var $L179 = (0, import_lib2.$L)("
|
|
8848
|
-
var $L180 = (0, import_lib2.$L)("
|
|
8849
|
-
var $L181 = (0, import_lib2.$L)("
|
|
8850
|
-
var $L182 = (0, import_lib2.$L)("
|
|
8851
|
-
var $L183 = (0, import_lib2.$L)("
|
|
8852
|
-
var $L184 = (0, import_lib2.$L)("
|
|
8853
|
-
var $L185 = (0, import_lib2.$L)("
|
|
8854
|
-
var $L186 = (0, import_lib2.$L)("
|
|
8855
|
-
var $L187 = (0, import_lib2.$L)("
|
|
8856
|
-
var $L188 = (0, import_lib2.$L)("
|
|
8857
|
-
var $L189 = (0, import_lib2.$L)("
|
|
8858
|
-
var $L190 = (0, import_lib2.$L)("
|
|
8859
|
-
var $L191 = (0, import_lib2.$L)("
|
|
8860
|
-
var $L192 = (0, import_lib2.$L)("
|
|
8861
|
-
var $L193 = (0, import_lib2.$L)("
|
|
8862
|
-
var $L194 = (0, import_lib2.$L)("
|
|
8863
|
-
var $L195 = (0, import_lib2.$L)("
|
|
8864
|
-
var $L196 = (0, import_lib2.$L)("
|
|
8865
|
-
var $L197 = (0, import_lib2.$L)("
|
|
8866
|
-
var $L198 = (0, import_lib2.$L)("
|
|
8867
|
-
var $L199 = (0, import_lib2.$L)("
|
|
8868
|
-
var $L200 = (0, import_lib2.$L)("
|
|
8869
|
-
var $L201 = (0, import_lib2.$L)("
|
|
8870
|
-
var $L202 = (0, import_lib2.$L)("
|
|
8871
|
-
var $L203 = (0, import_lib2.$L)("
|
|
8872
|
-
var $L204 = (0, import_lib2.$L)("
|
|
8873
|
-
var $L205 = (0, import_lib2.$L)("
|
|
8874
|
-
var $L206 = (0, import_lib2.$L)("
|
|
8875
|
-
var $L207 = (0, import_lib2.$L)("
|
|
8876
|
-
var $L208 = (0, import_lib2.$L)("
|
|
8877
|
-
var $L209 = (0, import_lib2.$L)("
|
|
8878
|
-
var $L210 = (0, import_lib2.$L)("
|
|
8879
|
-
var $L211 = (0, import_lib2.$L)("
|
|
8880
|
-
var $L212 = (0, import_lib2.$L)("
|
|
8881
|
-
var $L213 = (0, import_lib2.$L)(
|
|
8882
|
-
var $L214 = (0, import_lib2.$L)("'
|
|
8883
|
-
var $L215 = (0, import_lib2.$L)("
|
|
8884
|
-
var $L216 = (0, import_lib2.$L)("
|
|
8885
|
-
var $L217 = (0, import_lib2.$L)("
|
|
8886
|
-
var $L218 = (0, import_lib2.$L)("
|
|
8887
|
-
var $L219 = (0, import_lib2.$L)("
|
|
8888
|
-
var $L220 = (0, import_lib2.$L)("
|
|
8889
|
-
var $L221 = (0, import_lib2.$L)("
|
|
8890
|
-
var $L222 = (0, import_lib2.$L)("
|
|
8891
|
-
var $L223 = (0, import_lib2.$L)("
|
|
8892
|
-
var $L224 = (0, import_lib2.$L)("
|
|
8893
|
-
var $L225 = (0, import_lib2.$L)("
|
|
8894
|
-
var $L226 = (0, import_lib2.$L)("
|
|
8895
|
-
var $L227 = (0, import_lib2.$L)("
|
|
8896
|
-
var $L228 = (0, import_lib2.$L)("
|
|
8897
|
-
var $L229 = (0, import_lib2.$L)("
|
|
8898
|
-
var $L230 = (0, import_lib2.$L)("
|
|
8899
|
-
var $L231 = (0, import_lib2.$L)("
|
|
8900
|
-
var $L232 = (0, import_lib2.$L)("
|
|
8901
|
-
var $L233 = (0, import_lib2.$L)("
|
|
8902
|
-
var $L234 = (0, import_lib2.$L)("
|
|
8903
|
-
var $L235 = (0, import_lib2.$L)("
|
|
8904
|
-
var $L236 = (0, import_lib2.$L)("
|
|
8905
|
-
var $L237 = (0, import_lib2.$L)("
|
|
8906
|
-
var $L238 = (0, import_lib2.$L)("
|
|
8907
|
-
var $L239 = (0, import_lib2.$L)("
|
|
8908
|
-
var $L240 = (0, import_lib2.$L)("
|
|
8909
|
-
var $L241 = (0, import_lib2.$L)("
|
|
8910
|
-
var $L242 = (0, import_lib2.$L)("
|
|
8911
|
-
var $L243 = (0, import_lib2.$L)("
|
|
8912
|
-
var $L244 = (0, import_lib2.$L)("
|
|
8913
|
-
var $L245 = (0, import_lib2.$L)("
|
|
9021
|
+
var $L127 = (0, import_lib2.$L)("join");
|
|
9022
|
+
var $L128 = (0, import_lib2.$L)("break");
|
|
9023
|
+
var $L129 = (0, import_lib2.$L)("continue");
|
|
9024
|
+
var $L130 = (0, import_lib2.$L)("debugger");
|
|
9025
|
+
var $L131 = (0, import_lib2.$L)("require");
|
|
9026
|
+
var $L132 = (0, import_lib2.$L)("with");
|
|
9027
|
+
var $L133 = (0, import_lib2.$L)("assert");
|
|
9028
|
+
var $L134 = (0, import_lib2.$L)(":=");
|
|
9029
|
+
var $L135 = (0, import_lib2.$L)("\u2254");
|
|
9030
|
+
var $L136 = (0, import_lib2.$L)(".=");
|
|
9031
|
+
var $L137 = (0, import_lib2.$L)("::=");
|
|
9032
|
+
var $L138 = (0, import_lib2.$L)("/*");
|
|
9033
|
+
var $L139 = (0, import_lib2.$L)("*/");
|
|
9034
|
+
var $L140 = (0, import_lib2.$L)("\\");
|
|
9035
|
+
var $L141 = (0, import_lib2.$L)(")");
|
|
9036
|
+
var $L142 = (0, import_lib2.$L)("abstract");
|
|
9037
|
+
var $L143 = (0, import_lib2.$L)("as");
|
|
9038
|
+
var $L144 = (0, import_lib2.$L)("@");
|
|
9039
|
+
var $L145 = (0, import_lib2.$L)("@@");
|
|
9040
|
+
var $L146 = (0, import_lib2.$L)("async");
|
|
9041
|
+
var $L147 = (0, import_lib2.$L)("await");
|
|
9042
|
+
var $L148 = (0, import_lib2.$L)("`");
|
|
9043
|
+
var $L149 = (0, import_lib2.$L)("by");
|
|
9044
|
+
var $L150 = (0, import_lib2.$L)("case");
|
|
9045
|
+
var $L151 = (0, import_lib2.$L)("catch");
|
|
9046
|
+
var $L152 = (0, import_lib2.$L)("class");
|
|
9047
|
+
var $L153 = (0, import_lib2.$L)("#{");
|
|
9048
|
+
var $L154 = (0, import_lib2.$L)("comptime");
|
|
9049
|
+
var $L155 = (0, import_lib2.$L)("declare");
|
|
9050
|
+
var $L156 = (0, import_lib2.$L)("default");
|
|
9051
|
+
var $L157 = (0, import_lib2.$L)("delete");
|
|
9052
|
+
var $L158 = (0, import_lib2.$L)("do");
|
|
9053
|
+
var $L159 = (0, import_lib2.$L)("..");
|
|
9054
|
+
var $L160 = (0, import_lib2.$L)("\u2025");
|
|
9055
|
+
var $L161 = (0, import_lib2.$L)("...");
|
|
9056
|
+
var $L162 = (0, import_lib2.$L)("\u2026");
|
|
9057
|
+
var $L163 = (0, import_lib2.$L)("::");
|
|
9058
|
+
var $L164 = (0, import_lib2.$L)('"');
|
|
9059
|
+
var $L165 = (0, import_lib2.$L)("each");
|
|
9060
|
+
var $L166 = (0, import_lib2.$L)("else");
|
|
9061
|
+
var $L167 = (0, import_lib2.$L)("!");
|
|
9062
|
+
var $L168 = (0, import_lib2.$L)("export");
|
|
9063
|
+
var $L169 = (0, import_lib2.$L)("extends");
|
|
9064
|
+
var $L170 = (0, import_lib2.$L)("finally");
|
|
9065
|
+
var $L171 = (0, import_lib2.$L)("for");
|
|
9066
|
+
var $L172 = (0, import_lib2.$L)("from");
|
|
9067
|
+
var $L173 = (0, import_lib2.$L)("function");
|
|
9068
|
+
var $L174 = (0, import_lib2.$L)("get");
|
|
9069
|
+
var $L175 = (0, import_lib2.$L)("set");
|
|
9070
|
+
var $L176 = (0, import_lib2.$L)("#");
|
|
9071
|
+
var $L177 = (0, import_lib2.$L)("if");
|
|
9072
|
+
var $L178 = (0, import_lib2.$L)("in");
|
|
9073
|
+
var $L179 = (0, import_lib2.$L)("infer");
|
|
9074
|
+
var $L180 = (0, import_lib2.$L)("let");
|
|
9075
|
+
var $L181 = (0, import_lib2.$L)("const");
|
|
9076
|
+
var $L182 = (0, import_lib2.$L)("is");
|
|
9077
|
+
var $L183 = (0, import_lib2.$L)("var");
|
|
9078
|
+
var $L184 = (0, import_lib2.$L)("like");
|
|
9079
|
+
var $L185 = (0, import_lib2.$L)("loop");
|
|
9080
|
+
var $L186 = (0, import_lib2.$L)("new");
|
|
9081
|
+
var $L187 = (0, import_lib2.$L)("not");
|
|
9082
|
+
var $L188 = (0, import_lib2.$L)("of");
|
|
9083
|
+
var $L189 = (0, import_lib2.$L)("[");
|
|
9084
|
+
var $L190 = (0, import_lib2.$L)("operator");
|
|
9085
|
+
var $L191 = (0, import_lib2.$L)("override");
|
|
9086
|
+
var $L192 = (0, import_lib2.$L)("own");
|
|
9087
|
+
var $L193 = (0, import_lib2.$L)("public");
|
|
9088
|
+
var $L194 = (0, import_lib2.$L)("private");
|
|
9089
|
+
var $L195 = (0, import_lib2.$L)("protected");
|
|
9090
|
+
var $L196 = (0, import_lib2.$L)("||>");
|
|
9091
|
+
var $L197 = (0, import_lib2.$L)("|\u25B7");
|
|
9092
|
+
var $L198 = (0, import_lib2.$L)("|>=");
|
|
9093
|
+
var $L199 = (0, import_lib2.$L)("\u25B7=");
|
|
9094
|
+
var $L200 = (0, import_lib2.$L)("|>");
|
|
9095
|
+
var $L201 = (0, import_lib2.$L)("\u25B7");
|
|
9096
|
+
var $L202 = (0, import_lib2.$L)("readonly");
|
|
9097
|
+
var $L203 = (0, import_lib2.$L)("return");
|
|
9098
|
+
var $L204 = (0, import_lib2.$L)("satisfies");
|
|
9099
|
+
var $L205 = (0, import_lib2.$L)("'");
|
|
9100
|
+
var $L206 = (0, import_lib2.$L)("static");
|
|
9101
|
+
var $L207 = (0, import_lib2.$L)("${");
|
|
9102
|
+
var $L208 = (0, import_lib2.$L)("super");
|
|
9103
|
+
var $L209 = (0, import_lib2.$L)("switch");
|
|
9104
|
+
var $L210 = (0, import_lib2.$L)("target");
|
|
9105
|
+
var $L211 = (0, import_lib2.$L)("then");
|
|
9106
|
+
var $L212 = (0, import_lib2.$L)("this");
|
|
9107
|
+
var $L213 = (0, import_lib2.$L)("throw");
|
|
9108
|
+
var $L214 = (0, import_lib2.$L)('"""');
|
|
9109
|
+
var $L215 = (0, import_lib2.$L)("'''");
|
|
9110
|
+
var $L216 = (0, import_lib2.$L)("///");
|
|
9111
|
+
var $L217 = (0, import_lib2.$L)("```");
|
|
9112
|
+
var $L218 = (0, import_lib2.$L)("try");
|
|
9113
|
+
var $L219 = (0, import_lib2.$L)("typeof");
|
|
9114
|
+
var $L220 = (0, import_lib2.$L)("undefined");
|
|
9115
|
+
var $L221 = (0, import_lib2.$L)("unless");
|
|
9116
|
+
var $L222 = (0, import_lib2.$L)("until");
|
|
9117
|
+
var $L223 = (0, import_lib2.$L)("using");
|
|
9118
|
+
var $L224 = (0, import_lib2.$L)("void");
|
|
9119
|
+
var $L225 = (0, import_lib2.$L)("when");
|
|
9120
|
+
var $L226 = (0, import_lib2.$L)("while");
|
|
9121
|
+
var $L227 = (0, import_lib2.$L)("yield");
|
|
9122
|
+
var $L228 = (0, import_lib2.$L)("/>");
|
|
9123
|
+
var $L229 = (0, import_lib2.$L)("</");
|
|
9124
|
+
var $L230 = (0, import_lib2.$L)("<>");
|
|
9125
|
+
var $L231 = (0, import_lib2.$L)("</>");
|
|
9126
|
+
var $L232 = (0, import_lib2.$L)("<!--");
|
|
9127
|
+
var $L233 = (0, import_lib2.$L)("-->");
|
|
9128
|
+
var $L234 = (0, import_lib2.$L)("type");
|
|
9129
|
+
var $L235 = (0, import_lib2.$L)("enum");
|
|
9130
|
+
var $L236 = (0, import_lib2.$L)("interface");
|
|
9131
|
+
var $L237 = (0, import_lib2.$L)("global");
|
|
9132
|
+
var $L238 = (0, import_lib2.$L)("module");
|
|
9133
|
+
var $L239 = (0, import_lib2.$L)("namespace");
|
|
9134
|
+
var $L240 = (0, import_lib2.$L)("asserts");
|
|
9135
|
+
var $L241 = (0, import_lib2.$L)("keyof");
|
|
9136
|
+
var $L242 = (0, import_lib2.$L)("???");
|
|
9137
|
+
var $L243 = (0, import_lib2.$L)("unique");
|
|
9138
|
+
var $L244 = (0, import_lib2.$L)("symbol");
|
|
9139
|
+
var $L245 = (0, import_lib2.$L)("[]");
|
|
9140
|
+
var $L246 = (0, import_lib2.$L)("civet");
|
|
8914
9141
|
var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
|
|
8915
9142
|
var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
|
|
8916
9143
|
var $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
@@ -9104,7 +9331,7 @@ ${js}`
|
|
|
9104
9331
|
return expression;
|
|
9105
9332
|
return {
|
|
9106
9333
|
type: "CallExpression",
|
|
9107
|
-
children: [expression, ...trailing
|
|
9334
|
+
children: [expression, ...trailing]
|
|
9108
9335
|
};
|
|
9109
9336
|
});
|
|
9110
9337
|
function NestedExpressionizedStatement(ctx, state2) {
|
|
@@ -9117,7 +9344,7 @@ ${js}`
|
|
|
9117
9344
|
type: "CallExpression",
|
|
9118
9345
|
children: [
|
|
9119
9346
|
makeLeftHandSideExpression($1),
|
|
9120
|
-
|
|
9347
|
+
...$2
|
|
9121
9348
|
]
|
|
9122
9349
|
};
|
|
9123
9350
|
});
|
|
@@ -9209,7 +9436,7 @@ ${js}`
|
|
|
9209
9436
|
function ExplicitArguments(ctx, state2) {
|
|
9210
9437
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitArguments", ExplicitArguments$0);
|
|
9211
9438
|
}
|
|
9212
|
-
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)(
|
|
9439
|
+
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));
|
|
9213
9440
|
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))));
|
|
9214
9441
|
var ApplicationStart$$ = [ApplicationStart$0, ApplicationStart$1];
|
|
9215
9442
|
function ApplicationStart(ctx, state2) {
|
|
@@ -9242,39 +9469,45 @@ ${js}`
|
|
|
9242
9469
|
function ReservedBinary(ctx, state2) {
|
|
9243
9470
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReservedBinary", ReservedBinary$0);
|
|
9244
9471
|
}
|
|
9245
|
-
var
|
|
9472
|
+
var ArgumentsWithTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9246
9473
|
var args = $1;
|
|
9247
9474
|
var trailing = $2;
|
|
9248
|
-
return [args, ...trailing];
|
|
9475
|
+
return [args, ...trailing ?? []];
|
|
9249
9476
|
});
|
|
9250
|
-
function
|
|
9251
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "
|
|
9477
|
+
function ArgumentsWithTrailingCallExpressions(ctx, state2) {
|
|
9478
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingCallExpressions", ArgumentsWithTrailingCallExpressions$0);
|
|
9252
9479
|
}
|
|
9253
|
-
var
|
|
9480
|
+
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) {
|
|
9481
|
+
$1 = $1.flat();
|
|
9482
|
+
if (!$1.length && !$2)
|
|
9483
|
+
return $skip;
|
|
9484
|
+
if (!$2)
|
|
9485
|
+
return $1;
|
|
9254
9486
|
return [...$1, ...$2];
|
|
9255
9487
|
});
|
|
9256
|
-
function
|
|
9257
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "
|
|
9488
|
+
function TrailingCallExpressions(ctx, state2) {
|
|
9489
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "TrailingCallExpressions", TrailingCallExpressions$0);
|
|
9258
9490
|
}
|
|
9259
|
-
var
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
return
|
|
9491
|
+
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) {
|
|
9492
|
+
if (!$2.length)
|
|
9493
|
+
return $skip;
|
|
9494
|
+
return $2.flat();
|
|
9263
9495
|
});
|
|
9264
|
-
|
|
9265
|
-
return (
|
|
9266
|
-
}
|
|
9267
|
-
var AllowedTrailingMemberExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingMemberExpressions), function(value) {
|
|
9268
|
-
return value[1];
|
|
9496
|
+
var IndentedTrailingCallExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingCallExpression), function($skip, $loc, $0, $1) {
|
|
9497
|
+
return $1.flat();
|
|
9269
9498
|
});
|
|
9270
|
-
var
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
return (0, import_lib2.$EVENT_C)(ctx, state2, "AllowedTrailingMemberExpressions", AllowedTrailingMemberExpressions$$);
|
|
9499
|
+
var IndentedTrailingCallExpressions$$ = [IndentedTrailingCallExpressions$0, IndentedTrailingCallExpressions$1];
|
|
9500
|
+
function IndentedTrailingCallExpressions(ctx, state2) {
|
|
9501
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingCallExpressions", IndentedTrailingCallExpressions$$);
|
|
9274
9502
|
}
|
|
9275
|
-
var
|
|
9276
|
-
|
|
9277
|
-
|
|
9503
|
+
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) {
|
|
9504
|
+
var ws = $1;
|
|
9505
|
+
var rests = $3;
|
|
9506
|
+
const [first, ...rest] = rests.flat();
|
|
9507
|
+
return [prepend(ws, first), ...rest];
|
|
9508
|
+
});
|
|
9509
|
+
function NestedTrailingCallExpression(ctx, state2) {
|
|
9510
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingCallExpression", NestedTrailingCallExpression$0);
|
|
9278
9511
|
}
|
|
9279
9512
|
var AllowedTrailingCallExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingCallExpressions), function(value) {
|
|
9280
9513
|
return value[1];
|
|
@@ -9879,7 +10112,7 @@ ${js}`
|
|
|
9879
10112
|
return (0, import_lib2.$EVENT)(ctx, state2, "PipelineExpressionBodySameLine", PipelineExpressionBodySameLine$0);
|
|
9880
10113
|
}
|
|
9881
10114
|
var PipelineHeadItem$0 = NonPipelineExpression;
|
|
9882
|
-
var PipelineHeadItem$1 =
|
|
10115
|
+
var PipelineHeadItem$1 = OptimizedParenthesizedExpression;
|
|
9883
10116
|
var PipelineHeadItem$$ = [PipelineHeadItem$0, PipelineHeadItem$1];
|
|
9884
10117
|
function PipelineHeadItem(ctx, state2) {
|
|
9885
10118
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PipelineHeadItem", PipelineHeadItem$$);
|
|
@@ -9914,7 +10147,7 @@ ${js}`
|
|
|
9914
10147
|
var PrimaryExpression$6 = IdentifierReference;
|
|
9915
10148
|
var PrimaryExpression$7 = ClassExpression;
|
|
9916
10149
|
var PrimaryExpression$8 = RegularExpressionLiteral;
|
|
9917
|
-
var PrimaryExpression$9 =
|
|
10150
|
+
var PrimaryExpression$9 = OptimizedParenthesizedExpression;
|
|
9918
10151
|
var PrimaryExpression$10 = Placeholder;
|
|
9919
10152
|
var PrimaryExpression$11 = SymbolLiteral;
|
|
9920
10153
|
var PrimaryExpression$12 = JSXImplicitFragment;
|
|
@@ -9922,31 +10155,36 @@ ${js}`
|
|
|
9922
10155
|
function PrimaryExpression(ctx, state2) {
|
|
9923
10156
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PrimaryExpression", PrimaryExpression$$);
|
|
9924
10157
|
}
|
|
10158
|
+
var OptimizedParenthesizedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ParenthesizedExpression), function($skip, $loc, $0, $1) {
|
|
10159
|
+
const { expression } = $1;
|
|
10160
|
+
switch (expression.type) {
|
|
10161
|
+
case "StatementExpression":
|
|
10162
|
+
if (expression.statement.type !== "IterationExpression")
|
|
10163
|
+
break;
|
|
10164
|
+
case "IterationExpression":
|
|
10165
|
+
return expression;
|
|
10166
|
+
}
|
|
10167
|
+
return $1;
|
|
10168
|
+
});
|
|
10169
|
+
function OptimizedParenthesizedExpression(ctx, state2) {
|
|
10170
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "OptimizedParenthesizedExpression", OptimizedParenthesizedExpression$0);
|
|
10171
|
+
}
|
|
9925
10172
|
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) {
|
|
9926
10173
|
var open = $1;
|
|
9927
10174
|
if (!$3)
|
|
9928
10175
|
return $skip;
|
|
9929
|
-
const [
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
case "ParenthesizedExpression":
|
|
9937
|
-
if (exp.implicit) {
|
|
9938
|
-
return {
|
|
9939
|
-
...exp,
|
|
9940
|
-
children: [open, exp.expression, ws, close],
|
|
9941
|
-
implicit: false
|
|
9942
|
-
};
|
|
9943
|
-
}
|
|
9944
|
-
break;
|
|
10176
|
+
const [expression, ws, close] = $3;
|
|
10177
|
+
if (expression.type === "ParenthesizedExpression" && expression.implicit) {
|
|
10178
|
+
return {
|
|
10179
|
+
...expression,
|
|
10180
|
+
children: [open, expression.expression, ws, close],
|
|
10181
|
+
implicit: false
|
|
10182
|
+
};
|
|
9945
10183
|
}
|
|
9946
10184
|
return {
|
|
9947
10185
|
type: "ParenthesizedExpression",
|
|
9948
|
-
children: [open,
|
|
9949
|
-
expression
|
|
10186
|
+
children: [open, expression, ws, close],
|
|
10187
|
+
expression
|
|
9950
10188
|
};
|
|
9951
10189
|
});
|
|
9952
10190
|
function ParenthesizedExpression(ctx, state2) {
|
|
@@ -10459,7 +10697,7 @@ ${js}`
|
|
|
10459
10697
|
function LeftHandSideExpression(ctx, state2) {
|
|
10460
10698
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LeftHandSideExpression", LeftHandSideExpression$$);
|
|
10461
10699
|
}
|
|
10462
|
-
var CallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Super,
|
|
10700
|
+
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) {
|
|
10463
10701
|
var rest = $3;
|
|
10464
10702
|
return processCallMemberExpression({
|
|
10465
10703
|
type: "CallExpression",
|
|
@@ -10477,22 +10715,22 @@ ${js}`
|
|
|
10477
10715
|
var imports = $5;
|
|
10478
10716
|
return dynamizeImportDeclarationExpression([i, iws, imports, fws, from]);
|
|
10479
10717
|
});
|
|
10480
|
-
var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'),
|
|
10718
|
+
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) {
|
|
10481
10719
|
var rest = $3;
|
|
10482
10720
|
return processCallMemberExpression({
|
|
10483
10721
|
type: "CallExpression",
|
|
10484
10722
|
children: [$1, ...$2, ...rest.flat()]
|
|
10485
10723
|
});
|
|
10486
10724
|
});
|
|
10487
|
-
var CallExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(MemberExpression,
|
|
10725
|
+
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) {
|
|
10488
10726
|
var member = $1;
|
|
10489
|
-
var
|
|
10490
|
-
var
|
|
10491
|
-
if (rest.length || trailing
|
|
10727
|
+
var rest = $2;
|
|
10728
|
+
var trailing = $3;
|
|
10729
|
+
if (rest.length || trailing) {
|
|
10492
10730
|
rest = rest.flat();
|
|
10493
10731
|
return processCallMemberExpression({
|
|
10494
10732
|
type: "CallExpression",
|
|
10495
|
-
children: [member, ...
|
|
10733
|
+
children: [member, ...rest, ...trailing ?? []]
|
|
10496
10734
|
});
|
|
10497
10735
|
}
|
|
10498
10736
|
return member;
|
|
@@ -10512,7 +10750,7 @@ ${js}`
|
|
|
10512
10750
|
}
|
|
10513
10751
|
return literal;
|
|
10514
10752
|
});
|
|
10515
|
-
var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand),
|
|
10753
|
+
var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingCallExpressions), function($skip, $loc, $0, $1, $2) {
|
|
10516
10754
|
var optional = $1;
|
|
10517
10755
|
var argsWithTrailing = $2;
|
|
10518
10756
|
if (!optional)
|
|
@@ -10879,6 +11117,12 @@ ${js}`
|
|
|
10879
11117
|
function PropertyAccess(ctx, state2) {
|
|
10880
11118
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PropertyAccess", PropertyAccess$$);
|
|
10881
11119
|
}
|
|
11120
|
+
var ExplicitPropertyGlob$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(ExplicitAccessStart), PropertyGlob), function(value) {
|
|
11121
|
+
return value[1];
|
|
11122
|
+
});
|
|
11123
|
+
function ExplicitPropertyGlob(ctx, state2) {
|
|
11124
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitPropertyGlob", ExplicitPropertyGlob$0);
|
|
11125
|
+
}
|
|
10882
11126
|
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) {
|
|
10883
11127
|
var dot = $1;
|
|
10884
11128
|
var object = $3;
|
|
@@ -11491,19 +11735,13 @@ ${js}`
|
|
|
11491
11735
|
var binding = $2;
|
|
11492
11736
|
var typeSuffix = $3;
|
|
11493
11737
|
var initializer = $4;
|
|
11494
|
-
if (binding.children) {
|
|
11495
|
-
binding = {
|
|
11496
|
-
...binding,
|
|
11497
|
-
initializer,
|
|
11498
|
-
children: [...binding.children, initializer]
|
|
11499
|
-
};
|
|
11500
|
-
}
|
|
11501
11738
|
return {
|
|
11502
11739
|
type: "BindingElement",
|
|
11503
11740
|
names: binding.names,
|
|
11504
11741
|
typeSuffix,
|
|
11505
11742
|
binding,
|
|
11506
|
-
children: [ws, binding]
|
|
11743
|
+
children: [ws, binding, initializer],
|
|
11744
|
+
initializer
|
|
11507
11745
|
};
|
|
11508
11746
|
});
|
|
11509
11747
|
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) {
|
|
@@ -12207,11 +12445,9 @@ ${js}`
|
|
|
12207
12445
|
const expressions = [...stmts];
|
|
12208
12446
|
if (last)
|
|
12209
12447
|
expressions.push(last);
|
|
12210
|
-
const maybeComment = expressions.at(-1)?.[2]?.children?.[2]?.at(-1);
|
|
12211
|
-
const hasTrailingComment = maybeComment?.type === "Comment" && maybeComment.token.startsWith("//");
|
|
12212
12448
|
const children = [expressions];
|
|
12213
|
-
if (hasTrailingComment)
|
|
12214
|
-
children.push("\n");
|
|
12449
|
+
if (hasTrailingComment(expressions))
|
|
12450
|
+
children.push(["\n"]);
|
|
12215
12451
|
return {
|
|
12216
12452
|
type: "BlockStatement",
|
|
12217
12453
|
expressions,
|
|
@@ -13295,7 +13531,7 @@ ${js}`
|
|
|
13295
13531
|
ts: true
|
|
13296
13532
|
};
|
|
13297
13533
|
});
|
|
13298
|
-
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) {
|
|
13534
|
+
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) {
|
|
13299
13535
|
var signature = $1;
|
|
13300
13536
|
var block = $3;
|
|
13301
13537
|
let children = $0;
|
|
@@ -14515,7 +14751,7 @@ ${js}`
|
|
|
14515
14751
|
function ForStatementControlWithReduction(ctx, state2) {
|
|
14516
14752
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ForStatementControlWithReduction", ForStatementControlWithReduction$$);
|
|
14517
14753
|
}
|
|
14518
|
-
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) {
|
|
14754
|
+
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) {
|
|
14519
14755
|
var subtype = $1;
|
|
14520
14756
|
var ws = $3;
|
|
14521
14757
|
return {
|
|
@@ -15089,7 +15325,7 @@ ${js}`
|
|
|
15089
15325
|
expression
|
|
15090
15326
|
};
|
|
15091
15327
|
});
|
|
15092
|
-
var Condition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, InsertOpenParen, (0, import_lib2.$E)((0, import_lib2.$S)(Nested,
|
|
15328
|
+
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) {
|
|
15093
15329
|
var open = $2;
|
|
15094
15330
|
var expression = $3;
|
|
15095
15331
|
var close = $4;
|
|
@@ -15118,7 +15354,7 @@ ${js}`
|
|
|
15118
15354
|
function Condition(ctx, state2) {
|
|
15119
15355
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Condition", Condition$$);
|
|
15120
15356
|
}
|
|
15121
|
-
var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen,
|
|
15357
|
+
var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, PostfixedExpression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
|
|
15122
15358
|
var open = $1;
|
|
15123
15359
|
var expression = $2;
|
|
15124
15360
|
var close = $3;
|
|
@@ -15465,19 +15701,19 @@ ${js}`
|
|
|
15465
15701
|
function ThrowStatement(ctx, state2) {
|
|
15466
15702
|
return (0, import_lib2.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
|
|
15467
15703
|
}
|
|
15468
|
-
var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15704
|
+
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) {
|
|
15469
15705
|
return { $loc, token: $1 };
|
|
15470
15706
|
});
|
|
15471
15707
|
function Break(ctx, state2) {
|
|
15472
15708
|
return (0, import_lib2.$EVENT)(ctx, state2, "Break", Break$0);
|
|
15473
15709
|
}
|
|
15474
|
-
var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15710
|
+
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) {
|
|
15475
15711
|
return { $loc, token: $1 };
|
|
15476
15712
|
});
|
|
15477
15713
|
function Continue(ctx, state2) {
|
|
15478
15714
|
return (0, import_lib2.$EVENT)(ctx, state2, "Continue", Continue$0);
|
|
15479
15715
|
}
|
|
15480
|
-
var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
15716
|
+
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) {
|
|
15481
15717
|
return { $loc, token: $1 };
|
|
15482
15718
|
});
|
|
15483
15719
|
function Debugger(ctx, state2) {
|
|
@@ -15545,7 +15781,7 @@ ${js}`
|
|
|
15545
15781
|
function MaybeParenNestedExpression(ctx, state2) {
|
|
15546
15782
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
|
|
15547
15783
|
}
|
|
15548
|
-
var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($
|
|
15784
|
+
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) {
|
|
15549
15785
|
const imp = [
|
|
15550
15786
|
{ ...$1, ts: true },
|
|
15551
15787
|
{ ...$1, token: "const", js: true }
|
|
@@ -15735,7 +15971,7 @@ ${js}`
|
|
|
15735
15971
|
function ImpliedFrom(ctx, state2) {
|
|
15736
15972
|
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
|
|
15737
15973
|
}
|
|
15738
|
-
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
15974
|
+
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) {
|
|
15739
15975
|
var keyword = $2;
|
|
15740
15976
|
var object = $5;
|
|
15741
15977
|
return {
|
|
@@ -16061,19 +16297,19 @@ ${js}`
|
|
|
16061
16297
|
function LexicalDeclaration(ctx, state2) {
|
|
16062
16298
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
|
|
16063
16299
|
}
|
|
16064
|
-
var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
16300
|
+
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) {
|
|
16065
16301
|
return { $loc, token: "=", decl: "const " };
|
|
16066
16302
|
});
|
|
16067
16303
|
function ConstAssignment(ctx, state2) {
|
|
16068
16304
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
|
|
16069
16305
|
}
|
|
16070
|
-
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16306
|
+
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
|
|
16071
16307
|
return { $loc, token: "=", decl: "let " };
|
|
16072
16308
|
});
|
|
16073
16309
|
function LetAssignment(ctx, state2) {
|
|
16074
16310
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
|
|
16075
16311
|
}
|
|
16076
|
-
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16312
|
+
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L137, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
|
|
16077
16313
|
return { $loc, token: "=" };
|
|
16078
16314
|
});
|
|
16079
16315
|
function TypeAssignment(ctx, state2) {
|
|
@@ -16496,7 +16732,7 @@ ${js}`
|
|
|
16496
16732
|
function MultiLineComment(ctx, state2) {
|
|
16497
16733
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
|
|
16498
16734
|
}
|
|
16499
|
-
var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16735
|
+
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) {
|
|
16500
16736
|
return { type: "Comment", $loc, token: $1 };
|
|
16501
16737
|
});
|
|
16502
16738
|
function JSMultiLineComment(ctx, state2) {
|
|
@@ -16542,7 +16778,7 @@ ${js}`
|
|
|
16542
16778
|
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) {
|
|
16543
16779
|
return { $loc, token: $0 };
|
|
16544
16780
|
});
|
|
16545
|
-
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16781
|
+
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
|
|
16546
16782
|
return " ";
|
|
16547
16783
|
});
|
|
16548
16784
|
var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
|
|
@@ -16593,7 +16829,7 @@ ${js}`
|
|
|
16593
16829
|
function StatementDelimiter(ctx, state2) {
|
|
16594
16830
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
|
|
16595
16831
|
}
|
|
16596
|
-
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)($
|
|
16832
|
+
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 "]"'))));
|
|
16597
16833
|
function ClosingDelimiter(ctx, state2) {
|
|
16598
16834
|
return (0, import_lib2.$EVENT)(ctx, state2, "ClosingDelimiter", ClosingDelimiter$0);
|
|
16599
16835
|
}
|
|
@@ -16616,7 +16852,7 @@ ${js}`
|
|
|
16616
16852
|
function Loc(ctx, state2) {
|
|
16617
16853
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
|
|
16618
16854
|
}
|
|
16619
|
-
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16855
|
+
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) {
|
|
16620
16856
|
return { $loc, token: $1, ts: true };
|
|
16621
16857
|
});
|
|
16622
16858
|
function Abstract(ctx, state2) {
|
|
@@ -16628,43 +16864,43 @@ ${js}`
|
|
|
16628
16864
|
function Ampersand(ctx, state2) {
|
|
16629
16865
|
return (0, import_lib2.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
|
|
16630
16866
|
}
|
|
16631
|
-
var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16867
|
+
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) {
|
|
16632
16868
|
return { $loc, token: $1 };
|
|
16633
16869
|
});
|
|
16634
16870
|
function As(ctx, state2) {
|
|
16635
16871
|
return (0, import_lib2.$EVENT)(ctx, state2, "As", As$0);
|
|
16636
16872
|
}
|
|
16637
|
-
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16873
|
+
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'At "@"'), function($skip, $loc, $0, $1) {
|
|
16638
16874
|
return { $loc, token: $1 };
|
|
16639
16875
|
});
|
|
16640
16876
|
function At(ctx, state2) {
|
|
16641
16877
|
return (0, import_lib2.$EVENT)(ctx, state2, "At", At$0);
|
|
16642
16878
|
}
|
|
16643
|
-
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16879
|
+
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L145, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
|
|
16644
16880
|
return { $loc, token: "@" };
|
|
16645
16881
|
});
|
|
16646
16882
|
function AtAt(ctx, state2) {
|
|
16647
16883
|
return (0, import_lib2.$EVENT)(ctx, state2, "AtAt", AtAt$0);
|
|
16648
16884
|
}
|
|
16649
|
-
var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16885
|
+
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) {
|
|
16650
16886
|
return { $loc, token: $1, type: "Async" };
|
|
16651
16887
|
});
|
|
16652
16888
|
function Async(ctx, state2) {
|
|
16653
16889
|
return (0, import_lib2.$EVENT)(ctx, state2, "Async", Async$0);
|
|
16654
16890
|
}
|
|
16655
|
-
var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16891
|
+
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) {
|
|
16656
16892
|
return { $loc, token: $1, type: "Await" };
|
|
16657
16893
|
});
|
|
16658
16894
|
function Await(ctx, state2) {
|
|
16659
16895
|
return (0, import_lib2.$EVENT)(ctx, state2, "Await", Await$0);
|
|
16660
16896
|
}
|
|
16661
|
-
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16897
|
+
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L148, 'Backtick "`"'), function($skip, $loc, $0, $1) {
|
|
16662
16898
|
return { $loc, token: $1 };
|
|
16663
16899
|
});
|
|
16664
16900
|
function Backtick(ctx, state2) {
|
|
16665
16901
|
return (0, import_lib2.$EVENT)(ctx, state2, "Backtick", Backtick$0);
|
|
16666
16902
|
}
|
|
16667
|
-
var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16903
|
+
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) {
|
|
16668
16904
|
return { $loc, token: $1 };
|
|
16669
16905
|
});
|
|
16670
16906
|
function By(ctx, state2) {
|
|
@@ -16676,19 +16912,19 @@ ${js}`
|
|
|
16676
16912
|
function Caret(ctx, state2) {
|
|
16677
16913
|
return (0, import_lib2.$EVENT)(ctx, state2, "Caret", Caret$0);
|
|
16678
16914
|
}
|
|
16679
|
-
var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16915
|
+
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) {
|
|
16680
16916
|
return { $loc, token: $1 };
|
|
16681
16917
|
});
|
|
16682
16918
|
function Case(ctx, state2) {
|
|
16683
16919
|
return (0, import_lib2.$EVENT)(ctx, state2, "Case", Case$0);
|
|
16684
16920
|
}
|
|
16685
|
-
var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16921
|
+
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) {
|
|
16686
16922
|
return { $loc, token: $1 };
|
|
16687
16923
|
});
|
|
16688
16924
|
function Catch(ctx, state2) {
|
|
16689
16925
|
return (0, import_lib2.$EVENT)(ctx, state2, "Catch", Catch$0);
|
|
16690
16926
|
}
|
|
16691
|
-
var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16927
|
+
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) {
|
|
16692
16928
|
return { $loc, token: $1 };
|
|
16693
16929
|
});
|
|
16694
16930
|
function Class(ctx, state2) {
|
|
@@ -16712,13 +16948,13 @@ ${js}`
|
|
|
16712
16948
|
function CloseBracket(ctx, state2) {
|
|
16713
16949
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
|
|
16714
16950
|
}
|
|
16715
|
-
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16951
|
+
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L141, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
|
|
16716
16952
|
return { $loc, token: $1 };
|
|
16717
16953
|
});
|
|
16718
16954
|
function CloseParen(ctx, state2) {
|
|
16719
16955
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
|
|
16720
16956
|
}
|
|
16721
|
-
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16957
|
+
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L153, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
|
|
16722
16958
|
return { $loc, token: "${" };
|
|
16723
16959
|
});
|
|
16724
16960
|
function CoffeeSubstitutionStart(ctx, state2) {
|
|
@@ -16736,37 +16972,37 @@ ${js}`
|
|
|
16736
16972
|
function Comma(ctx, state2) {
|
|
16737
16973
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comma", Comma$0);
|
|
16738
16974
|
}
|
|
16739
|
-
var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16975
|
+
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) {
|
|
16740
16976
|
return { $loc, token: $1 };
|
|
16741
16977
|
});
|
|
16742
16978
|
function Comptime(ctx, state2) {
|
|
16743
16979
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comptime", Comptime$0);
|
|
16744
16980
|
}
|
|
16745
|
-
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16981
|
+
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
|
|
16746
16982
|
return { $loc, token: "constructor" };
|
|
16747
16983
|
});
|
|
16748
16984
|
function ConstructorShorthand(ctx, state2) {
|
|
16749
16985
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
|
|
16750
16986
|
}
|
|
16751
|
-
var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16987
|
+
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) {
|
|
16752
16988
|
return { $loc, token: $1 };
|
|
16753
16989
|
});
|
|
16754
16990
|
function Declare(ctx, state2) {
|
|
16755
16991
|
return (0, import_lib2.$EVENT)(ctx, state2, "Declare", Declare$0);
|
|
16756
16992
|
}
|
|
16757
|
-
var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16993
|
+
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) {
|
|
16758
16994
|
return { $loc, token: $1 };
|
|
16759
16995
|
});
|
|
16760
16996
|
function Default(ctx, state2) {
|
|
16761
16997
|
return (0, import_lib2.$EVENT)(ctx, state2, "Default", Default$0);
|
|
16762
16998
|
}
|
|
16763
|
-
var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16999
|
+
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) {
|
|
16764
17000
|
return { $loc, token: $1 };
|
|
16765
17001
|
});
|
|
16766
17002
|
function Delete(ctx, state2) {
|
|
16767
17003
|
return (0, import_lib2.$EVENT)(ctx, state2, "Delete", Delete$0);
|
|
16768
17004
|
}
|
|
16769
|
-
var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17005
|
+
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) {
|
|
16770
17006
|
return { $loc, token: $1 };
|
|
16771
17007
|
});
|
|
16772
17008
|
function Do(ctx, state2) {
|
|
@@ -16786,20 +17022,20 @@ ${js}`
|
|
|
16786
17022
|
function Dot(ctx, state2) {
|
|
16787
17023
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Dot", Dot$$);
|
|
16788
17024
|
}
|
|
16789
|
-
var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17025
|
+
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) {
|
|
16790
17026
|
return { $loc, token: $1 };
|
|
16791
17027
|
});
|
|
16792
|
-
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17028
|
+
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
|
|
16793
17029
|
return { $loc, token: ".." };
|
|
16794
17030
|
});
|
|
16795
17031
|
var DotDot$$ = [DotDot$0, DotDot$1];
|
|
16796
17032
|
function DotDot(ctx, state2) {
|
|
16797
17033
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
|
|
16798
17034
|
}
|
|
16799
|
-
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17035
|
+
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
|
|
16800
17036
|
return { $loc, token: $1 };
|
|
16801
17037
|
});
|
|
16802
|
-
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17038
|
+
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
|
|
16803
17039
|
return { $loc, token: "..." };
|
|
16804
17040
|
});
|
|
16805
17041
|
var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
|
|
@@ -16812,31 +17048,31 @@ ${js}`
|
|
|
16812
17048
|
function InsertDotDotDot(ctx, state2) {
|
|
16813
17049
|
return (0, import_lib2.$EVENT)(ctx, state2, "InsertDotDotDot", InsertDotDotDot$0);
|
|
16814
17050
|
}
|
|
16815
|
-
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17051
|
+
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
|
|
16816
17052
|
return { $loc, token: $1 };
|
|
16817
17053
|
});
|
|
16818
17054
|
function DoubleColon(ctx, state2) {
|
|
16819
17055
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
|
|
16820
17056
|
}
|
|
16821
|
-
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17057
|
+
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
|
|
16822
17058
|
return { $loc, token: ":" };
|
|
16823
17059
|
});
|
|
16824
17060
|
function DoubleColonAsColon(ctx, state2) {
|
|
16825
17061
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
|
|
16826
17062
|
}
|
|
16827
|
-
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17063
|
+
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L164, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
16828
17064
|
return { $loc, token: $1 };
|
|
16829
17065
|
});
|
|
16830
17066
|
function DoubleQuote(ctx, state2) {
|
|
16831
17067
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
|
|
16832
17068
|
}
|
|
16833
|
-
var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17069
|
+
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) {
|
|
16834
17070
|
return { $loc, token: $1 };
|
|
16835
17071
|
});
|
|
16836
17072
|
function Each(ctx, state2) {
|
|
16837
17073
|
return (0, import_lib2.$EVENT)(ctx, state2, "Each", Each$0);
|
|
16838
17074
|
}
|
|
16839
|
-
var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17075
|
+
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) {
|
|
16840
17076
|
return { $loc, token: $1 };
|
|
16841
17077
|
});
|
|
16842
17078
|
function Else(ctx, state2) {
|
|
@@ -16848,61 +17084,61 @@ ${js}`
|
|
|
16848
17084
|
function Equals(ctx, state2) {
|
|
16849
17085
|
return (0, import_lib2.$EVENT)(ctx, state2, "Equals", Equals$0);
|
|
16850
17086
|
}
|
|
16851
|
-
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17087
|
+
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L167, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
|
|
16852
17088
|
return { $loc, token: $1 };
|
|
16853
17089
|
});
|
|
16854
17090
|
function ExclamationPoint(ctx, state2) {
|
|
16855
17091
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
|
|
16856
17092
|
}
|
|
16857
|
-
var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17093
|
+
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) {
|
|
16858
17094
|
return { $loc, token: $1 };
|
|
16859
17095
|
});
|
|
16860
17096
|
function Export(ctx, state2) {
|
|
16861
17097
|
return (0, import_lib2.$EVENT)(ctx, state2, "Export", Export$0);
|
|
16862
17098
|
}
|
|
16863
|
-
var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17099
|
+
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) {
|
|
16864
17100
|
return { $loc, token: $1 };
|
|
16865
17101
|
});
|
|
16866
17102
|
function Extends(ctx, state2) {
|
|
16867
17103
|
return (0, import_lib2.$EVENT)(ctx, state2, "Extends", Extends$0);
|
|
16868
17104
|
}
|
|
16869
|
-
var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17105
|
+
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) {
|
|
16870
17106
|
return { $loc, token: $1 };
|
|
16871
17107
|
});
|
|
16872
17108
|
function Finally(ctx, state2) {
|
|
16873
17109
|
return (0, import_lib2.$EVENT)(ctx, state2, "Finally", Finally$0);
|
|
16874
17110
|
}
|
|
16875
|
-
var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17111
|
+
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) {
|
|
16876
17112
|
return { $loc, token: $1 };
|
|
16877
17113
|
});
|
|
16878
17114
|
function For(ctx, state2) {
|
|
16879
17115
|
return (0, import_lib2.$EVENT)(ctx, state2, "For", For$0);
|
|
16880
17116
|
}
|
|
16881
|
-
var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17117
|
+
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) {
|
|
16882
17118
|
return { $loc, token: $1 };
|
|
16883
17119
|
});
|
|
16884
17120
|
function From(ctx, state2) {
|
|
16885
17121
|
return (0, import_lib2.$EVENT)(ctx, state2, "From", From$0);
|
|
16886
17122
|
}
|
|
16887
|
-
var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17123
|
+
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) {
|
|
16888
17124
|
return { $loc, token: $1 };
|
|
16889
17125
|
});
|
|
16890
17126
|
function Function2(ctx, state2) {
|
|
16891
17127
|
return (0, import_lib2.$EVENT)(ctx, state2, "Function", Function$0);
|
|
16892
17128
|
}
|
|
16893
|
-
var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17129
|
+
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) {
|
|
16894
17130
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
16895
17131
|
});
|
|
16896
17132
|
function GetOrSet(ctx, state2) {
|
|
16897
17133
|
return (0, import_lib2.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
|
|
16898
17134
|
}
|
|
16899
|
-
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17135
|
+
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L176, 'Hash "#"'), function($skip, $loc, $0, $1) {
|
|
16900
17136
|
return { $loc, token: $1 };
|
|
16901
17137
|
});
|
|
16902
17138
|
function Hash(ctx, state2) {
|
|
16903
17139
|
return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
|
|
16904
17140
|
}
|
|
16905
|
-
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17141
|
+
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) {
|
|
16906
17142
|
return { $loc, token: $1 };
|
|
16907
17143
|
});
|
|
16908
17144
|
function If(ctx, state2) {
|
|
@@ -16914,67 +17150,67 @@ ${js}`
|
|
|
16914
17150
|
function Import(ctx, state2) {
|
|
16915
17151
|
return (0, import_lib2.$EVENT)(ctx, state2, "Import", Import$0);
|
|
16916
17152
|
}
|
|
16917
|
-
var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17153
|
+
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) {
|
|
16918
17154
|
return { $loc, token: $1 };
|
|
16919
17155
|
});
|
|
16920
17156
|
function In(ctx, state2) {
|
|
16921
17157
|
return (0, import_lib2.$EVENT)(ctx, state2, "In", In$0);
|
|
16922
17158
|
}
|
|
16923
|
-
var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17159
|
+
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) {
|
|
16924
17160
|
return { $loc, token: $1 };
|
|
16925
17161
|
});
|
|
16926
17162
|
function Infer(ctx, state2) {
|
|
16927
17163
|
return (0, import_lib2.$EVENT)(ctx, state2, "Infer", Infer$0);
|
|
16928
17164
|
}
|
|
16929
|
-
var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17165
|
+
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) {
|
|
16930
17166
|
return { $loc, token: $1 };
|
|
16931
17167
|
});
|
|
16932
17168
|
function LetOrConst(ctx, state2) {
|
|
16933
17169
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
|
|
16934
17170
|
}
|
|
16935
|
-
var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17171
|
+
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) {
|
|
16936
17172
|
return { $loc, token: $1 };
|
|
16937
17173
|
});
|
|
16938
17174
|
function Const(ctx, state2) {
|
|
16939
17175
|
return (0, import_lib2.$EVENT)(ctx, state2, "Const", Const$0);
|
|
16940
17176
|
}
|
|
16941
|
-
var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17177
|
+
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) {
|
|
16942
17178
|
return { $loc, token: $1 };
|
|
16943
17179
|
});
|
|
16944
17180
|
function Is(ctx, state2) {
|
|
16945
17181
|
return (0, import_lib2.$EVENT)(ctx, state2, "Is", Is$0);
|
|
16946
17182
|
}
|
|
16947
|
-
var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17183
|
+
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) {
|
|
16948
17184
|
return { $loc, token: $1 };
|
|
16949
17185
|
});
|
|
16950
17186
|
function LetOrConstOrVar(ctx, state2) {
|
|
16951
17187
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
|
|
16952
17188
|
}
|
|
16953
|
-
var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17189
|
+
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) {
|
|
16954
17190
|
return { $loc, token: $1 };
|
|
16955
17191
|
});
|
|
16956
17192
|
function Like(ctx, state2) {
|
|
16957
17193
|
return (0, import_lib2.$EVENT)(ctx, state2, "Like", Like$0);
|
|
16958
17194
|
}
|
|
16959
|
-
var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17195
|
+
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) {
|
|
16960
17196
|
return { $loc, token: "while" };
|
|
16961
17197
|
});
|
|
16962
17198
|
function Loop(ctx, state2) {
|
|
16963
17199
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loop", Loop$0);
|
|
16964
17200
|
}
|
|
16965
|
-
var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17201
|
+
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) {
|
|
16966
17202
|
return { $loc, token: $1 };
|
|
16967
17203
|
});
|
|
16968
17204
|
function New(ctx, state2) {
|
|
16969
17205
|
return (0, import_lib2.$EVENT)(ctx, state2, "New", New$0);
|
|
16970
17206
|
}
|
|
16971
|
-
var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17207
|
+
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) {
|
|
16972
17208
|
return { $loc, token: "!" };
|
|
16973
17209
|
});
|
|
16974
17210
|
function Not(ctx, state2) {
|
|
16975
17211
|
return (0, import_lib2.$EVENT)(ctx, state2, "Not", Not$0);
|
|
16976
17212
|
}
|
|
16977
|
-
var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17213
|
+
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) {
|
|
16978
17214
|
return { $loc, token: $1 };
|
|
16979
17215
|
});
|
|
16980
17216
|
function Of(ctx, state2) {
|
|
@@ -16992,7 +17228,7 @@ ${js}`
|
|
|
16992
17228
|
function OpenBrace(ctx, state2) {
|
|
16993
17229
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
|
|
16994
17230
|
}
|
|
16995
|
-
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17231
|
+
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L189, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
16996
17232
|
return { $loc, token: $1 };
|
|
16997
17233
|
});
|
|
16998
17234
|
function OpenBracket(ctx, state2) {
|
|
@@ -17004,49 +17240,49 @@ ${js}`
|
|
|
17004
17240
|
function OpenParen(ctx, state2) {
|
|
17005
17241
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
|
|
17006
17242
|
}
|
|
17007
|
-
var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17243
|
+
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) {
|
|
17008
17244
|
return { $loc, token: $1 };
|
|
17009
17245
|
});
|
|
17010
17246
|
function Operator(ctx, state2) {
|
|
17011
17247
|
return (0, import_lib2.$EVENT)(ctx, state2, "Operator", Operator$0);
|
|
17012
17248
|
}
|
|
17013
|
-
var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17249
|
+
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) {
|
|
17014
17250
|
return { $loc, token: $1, ts: true };
|
|
17015
17251
|
});
|
|
17016
17252
|
function Override(ctx, state2) {
|
|
17017
17253
|
return (0, import_lib2.$EVENT)(ctx, state2, "Override", Override$0);
|
|
17018
17254
|
}
|
|
17019
|
-
var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17255
|
+
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) {
|
|
17020
17256
|
return { $loc, token: $1 };
|
|
17021
17257
|
});
|
|
17022
17258
|
function Own(ctx, state2) {
|
|
17023
17259
|
return (0, import_lib2.$EVENT)(ctx, state2, "Own", Own$0);
|
|
17024
17260
|
}
|
|
17025
|
-
var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17261
|
+
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) {
|
|
17026
17262
|
return { $loc, token: $1 };
|
|
17027
17263
|
});
|
|
17028
17264
|
function Public(ctx, state2) {
|
|
17029
17265
|
return (0, import_lib2.$EVENT)(ctx, state2, "Public", Public$0);
|
|
17030
17266
|
}
|
|
17031
|
-
var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17267
|
+
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) {
|
|
17032
17268
|
return { $loc, token: $1 };
|
|
17033
17269
|
});
|
|
17034
17270
|
function Private(ctx, state2) {
|
|
17035
17271
|
return (0, import_lib2.$EVENT)(ctx, state2, "Private", Private$0);
|
|
17036
17272
|
}
|
|
17037
|
-
var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17273
|
+
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) {
|
|
17038
17274
|
return { $loc, token: $1 };
|
|
17039
17275
|
});
|
|
17040
17276
|
function Protected(ctx, state2) {
|
|
17041
17277
|
return (0, import_lib2.$EVENT)(ctx, state2, "Protected", Protected$0);
|
|
17042
17278
|
}
|
|
17043
|
-
var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17279
|
+
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) {
|
|
17044
17280
|
return { $loc, token: "||>" };
|
|
17045
17281
|
});
|
|
17046
|
-
var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17282
|
+
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) {
|
|
17047
17283
|
return { $loc, token: "|>=" };
|
|
17048
17284
|
});
|
|
17049
|
-
var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17285
|
+
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) {
|
|
17050
17286
|
return { $loc, token: "|>" };
|
|
17051
17287
|
});
|
|
17052
17288
|
var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
|
|
@@ -17059,19 +17295,19 @@ ${js}`
|
|
|
17059
17295
|
function QuestionMark(ctx, state2) {
|
|
17060
17296
|
return (0, import_lib2.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
|
|
17061
17297
|
}
|
|
17062
|
-
var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17298
|
+
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) {
|
|
17063
17299
|
return { $loc, token: $1, ts: true };
|
|
17064
17300
|
});
|
|
17065
17301
|
function Readonly(ctx, state2) {
|
|
17066
17302
|
return (0, import_lib2.$EVENT)(ctx, state2, "Readonly", Readonly$0);
|
|
17067
17303
|
}
|
|
17068
|
-
var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17304
|
+
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) {
|
|
17069
17305
|
return { $loc, token: $1 };
|
|
17070
17306
|
});
|
|
17071
17307
|
function Return(ctx, state2) {
|
|
17072
17308
|
return (0, import_lib2.$EVENT)(ctx, state2, "Return", Return$0);
|
|
17073
17309
|
}
|
|
17074
|
-
var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17310
|
+
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) {
|
|
17075
17311
|
return { $loc, token: $1 };
|
|
17076
17312
|
});
|
|
17077
17313
|
function Satisfies(ctx, state2) {
|
|
@@ -17083,7 +17319,7 @@ ${js}`
|
|
|
17083
17319
|
function Semicolon(ctx, state2) {
|
|
17084
17320
|
return (0, import_lib2.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
|
|
17085
17321
|
}
|
|
17086
|
-
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17322
|
+
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L205, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
17087
17323
|
return { $loc, token: $1 };
|
|
17088
17324
|
});
|
|
17089
17325
|
function SingleQuote(ctx, state2) {
|
|
@@ -17095,149 +17331,149 @@ ${js}`
|
|
|
17095
17331
|
function Star(ctx, state2) {
|
|
17096
17332
|
return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
|
|
17097
17333
|
}
|
|
17098
|
-
var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17334
|
+
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) {
|
|
17099
17335
|
return { $loc, token: $1 };
|
|
17100
17336
|
});
|
|
17101
|
-
var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17337
|
+
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) {
|
|
17102
17338
|
return { $loc, token: "static " };
|
|
17103
17339
|
});
|
|
17104
17340
|
var Static$$ = [Static$0, Static$1];
|
|
17105
17341
|
function Static(ctx, state2) {
|
|
17106
17342
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Static", Static$$);
|
|
17107
17343
|
}
|
|
17108
|
-
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17344
|
+
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L207, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
17109
17345
|
return { $loc, token: $1 };
|
|
17110
17346
|
});
|
|
17111
17347
|
function SubstitutionStart(ctx, state2) {
|
|
17112
17348
|
return (0, import_lib2.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
|
|
17113
17349
|
}
|
|
17114
|
-
var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17350
|
+
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) {
|
|
17115
17351
|
return { $loc, token: $1 };
|
|
17116
17352
|
});
|
|
17117
17353
|
function Super(ctx, state2) {
|
|
17118
17354
|
return (0, import_lib2.$EVENT)(ctx, state2, "Super", Super$0);
|
|
17119
17355
|
}
|
|
17120
|
-
var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17356
|
+
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) {
|
|
17121
17357
|
return { $loc, token: $1 };
|
|
17122
17358
|
});
|
|
17123
17359
|
function Switch(ctx, state2) {
|
|
17124
17360
|
return (0, import_lib2.$EVENT)(ctx, state2, "Switch", Switch$0);
|
|
17125
17361
|
}
|
|
17126
|
-
var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17362
|
+
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) {
|
|
17127
17363
|
return { $loc, token: $1 };
|
|
17128
17364
|
});
|
|
17129
17365
|
function Target(ctx, state2) {
|
|
17130
17366
|
return (0, import_lib2.$EVENT)(ctx, state2, "Target", Target$0);
|
|
17131
17367
|
}
|
|
17132
|
-
var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
17368
|
+
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) {
|
|
17133
17369
|
return { $loc, token: "" };
|
|
17134
17370
|
});
|
|
17135
17371
|
function Then(ctx, state2) {
|
|
17136
17372
|
return (0, import_lib2.$EVENT)(ctx, state2, "Then", Then$0);
|
|
17137
17373
|
}
|
|
17138
|
-
var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17374
|
+
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) {
|
|
17139
17375
|
return { $loc, token: $1 };
|
|
17140
17376
|
});
|
|
17141
17377
|
function This(ctx, state2) {
|
|
17142
17378
|
return (0, import_lib2.$EVENT)(ctx, state2, "This", This$0);
|
|
17143
17379
|
}
|
|
17144
|
-
var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17380
|
+
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) {
|
|
17145
17381
|
return { $loc, token: $1 };
|
|
17146
17382
|
});
|
|
17147
17383
|
function Throw(ctx, state2) {
|
|
17148
17384
|
return (0, import_lib2.$EVENT)(ctx, state2, "Throw", Throw$0);
|
|
17149
17385
|
}
|
|
17150
|
-
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17386
|
+
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
17151
17387
|
return { $loc, token: "`" };
|
|
17152
17388
|
});
|
|
17153
17389
|
function TripleDoubleQuote(ctx, state2) {
|
|
17154
17390
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
|
|
17155
17391
|
}
|
|
17156
|
-
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17392
|
+
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
17157
17393
|
return { $loc, token: "`" };
|
|
17158
17394
|
});
|
|
17159
17395
|
function TripleSingleQuote(ctx, state2) {
|
|
17160
17396
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
|
|
17161
17397
|
}
|
|
17162
|
-
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17398
|
+
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
17163
17399
|
return { $loc, token: "/" };
|
|
17164
17400
|
});
|
|
17165
17401
|
function TripleSlash(ctx, state2) {
|
|
17166
17402
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
|
|
17167
17403
|
}
|
|
17168
|
-
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17404
|
+
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L217, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
17169
17405
|
return { $loc, token: "`" };
|
|
17170
17406
|
});
|
|
17171
17407
|
function TripleTick(ctx, state2) {
|
|
17172
17408
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
|
|
17173
17409
|
}
|
|
17174
|
-
var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17410
|
+
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) {
|
|
17175
17411
|
return { $loc, token: $1 };
|
|
17176
17412
|
});
|
|
17177
17413
|
function Try(ctx, state2) {
|
|
17178
17414
|
return (0, import_lib2.$EVENT)(ctx, state2, "Try", Try$0);
|
|
17179
17415
|
}
|
|
17180
|
-
var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17416
|
+
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) {
|
|
17181
17417
|
return { $loc, token: $1 };
|
|
17182
17418
|
});
|
|
17183
17419
|
function Typeof(ctx, state2) {
|
|
17184
17420
|
return (0, import_lib2.$EVENT)(ctx, state2, "Typeof", Typeof$0);
|
|
17185
17421
|
}
|
|
17186
|
-
var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17422
|
+
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) {
|
|
17187
17423
|
return { $loc, token: $1 };
|
|
17188
17424
|
});
|
|
17189
17425
|
function Undefined(ctx, state2) {
|
|
17190
17426
|
return (0, import_lib2.$EVENT)(ctx, state2, "Undefined", Undefined$0);
|
|
17191
17427
|
}
|
|
17192
|
-
var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17428
|
+
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) {
|
|
17193
17429
|
return { $loc, token: $1, negated: true };
|
|
17194
17430
|
});
|
|
17195
17431
|
function Unless(ctx, state2) {
|
|
17196
17432
|
return (0, import_lib2.$EVENT)(ctx, state2, "Unless", Unless$0);
|
|
17197
17433
|
}
|
|
17198
|
-
var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17434
|
+
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) {
|
|
17199
17435
|
return { $loc, token: $1, negated: true };
|
|
17200
17436
|
});
|
|
17201
17437
|
function Until(ctx, state2) {
|
|
17202
17438
|
return (0, import_lib2.$EVENT)(ctx, state2, "Until", Until$0);
|
|
17203
17439
|
}
|
|
17204
|
-
var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17440
|
+
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) {
|
|
17205
17441
|
return { $loc, token: $1 };
|
|
17206
17442
|
});
|
|
17207
17443
|
function Using(ctx, state2) {
|
|
17208
17444
|
return (0, import_lib2.$EVENT)(ctx, state2, "Using", Using$0);
|
|
17209
17445
|
}
|
|
17210
|
-
var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17446
|
+
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) {
|
|
17211
17447
|
return { $loc, token: $1 };
|
|
17212
17448
|
});
|
|
17213
17449
|
function Var(ctx, state2) {
|
|
17214
17450
|
return (0, import_lib2.$EVENT)(ctx, state2, "Var", Var$0);
|
|
17215
17451
|
}
|
|
17216
|
-
var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17452
|
+
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) {
|
|
17217
17453
|
return { $loc, token: $1 };
|
|
17218
17454
|
});
|
|
17219
17455
|
function Void(ctx, state2) {
|
|
17220
17456
|
return (0, import_lib2.$EVENT)(ctx, state2, "Void", Void$0);
|
|
17221
17457
|
}
|
|
17222
|
-
var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17458
|
+
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) {
|
|
17223
17459
|
return { $loc, token: "case" };
|
|
17224
17460
|
});
|
|
17225
17461
|
function When(ctx, state2) {
|
|
17226
17462
|
return (0, import_lib2.$EVENT)(ctx, state2, "When", When$0);
|
|
17227
17463
|
}
|
|
17228
|
-
var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17464
|
+
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) {
|
|
17229
17465
|
return { $loc, token: $1 };
|
|
17230
17466
|
});
|
|
17231
17467
|
function While(ctx, state2) {
|
|
17232
17468
|
return (0, import_lib2.$EVENT)(ctx, state2, "While", While$0);
|
|
17233
17469
|
}
|
|
17234
|
-
var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17470
|
+
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) {
|
|
17235
17471
|
return { $loc, token: $1 };
|
|
17236
17472
|
});
|
|
17237
17473
|
function With(ctx, state2) {
|
|
17238
17474
|
return (0, import_lib2.$EVENT)(ctx, state2, "With", With$0);
|
|
17239
17475
|
}
|
|
17240
|
-
var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17476
|
+
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) {
|
|
17241
17477
|
return { $loc, token: $1, type: "Yield" };
|
|
17242
17478
|
});
|
|
17243
17479
|
function Yield(ctx, state2) {
|
|
@@ -17316,7 +17552,7 @@ ${js}`
|
|
|
17316
17552
|
function JSXElement(ctx, state2) {
|
|
17317
17553
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
|
|
17318
17554
|
}
|
|
17319
|
-
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)($
|
|
17555
|
+
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) {
|
|
17320
17556
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
17321
17557
|
});
|
|
17322
17558
|
function JSXSelfClosingElement(ctx, state2) {
|
|
@@ -17350,7 +17586,7 @@ ${js}`
|
|
|
17350
17586
|
function JSXOptionalClosingElement(ctx, state2) {
|
|
17351
17587
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
|
|
17352
17588
|
}
|
|
17353
|
-
var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17589
|
+
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 ">"'));
|
|
17354
17590
|
function JSXClosingElement(ctx, state2) {
|
|
17355
17591
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
|
|
17356
17592
|
}
|
|
@@ -17371,7 +17607,7 @@ ${js}`
|
|
|
17371
17607
|
];
|
|
17372
17608
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
17373
17609
|
});
|
|
17374
|
-
var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($
|
|
17610
|
+
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) {
|
|
17375
17611
|
var children = $3;
|
|
17376
17612
|
$0 = $0.slice(1);
|
|
17377
17613
|
return {
|
|
@@ -17384,7 +17620,7 @@ ${js}`
|
|
|
17384
17620
|
function JSXFragment(ctx, state2) {
|
|
17385
17621
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
|
|
17386
17622
|
}
|
|
17387
|
-
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17623
|
+
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L230, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
17388
17624
|
state.JSXTagStack.push("");
|
|
17389
17625
|
return $1;
|
|
17390
17626
|
});
|
|
@@ -17401,11 +17637,11 @@ ${js}`
|
|
|
17401
17637
|
function JSXOptionalClosingFragment(ctx, state2) {
|
|
17402
17638
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
|
|
17403
17639
|
}
|
|
17404
|
-
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($
|
|
17640
|
+
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L231, 'JSXClosingFragment "</>"');
|
|
17405
17641
|
function JSXClosingFragment(ctx, state2) {
|
|
17406
17642
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
|
|
17407
17643
|
}
|
|
17408
|
-
var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17644
|
+
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) {
|
|
17409
17645
|
return config.defaultElement;
|
|
17410
17646
|
});
|
|
17411
17647
|
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)))));
|
|
@@ -17586,7 +17822,7 @@ ${js}`
|
|
|
17586
17822
|
}
|
|
17587
17823
|
return $skip;
|
|
17588
17824
|
});
|
|
17589
|
-
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17825
|
+
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L176, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
17590
17826
|
return [" ", "id=", $2];
|
|
17591
17827
|
});
|
|
17592
17828
|
var JSXAttribute$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
@@ -17807,7 +18043,7 @@ ${js}`
|
|
|
17807
18043
|
var InlineJSXPrimaryExpression$6 = BracedObjectLiteral;
|
|
17808
18044
|
var InlineJSXPrimaryExpression$7 = IdentifierReference;
|
|
17809
18045
|
var InlineJSXPrimaryExpression$8 = RegularExpressionLiteral;
|
|
17810
|
-
var InlineJSXPrimaryExpression$9 =
|
|
18046
|
+
var InlineJSXPrimaryExpression$9 = OptimizedParenthesizedExpression;
|
|
17811
18047
|
var InlineJSXPrimaryExpression$$ = [InlineJSXPrimaryExpression$0, InlineJSXPrimaryExpression$1, InlineJSXPrimaryExpression$2, InlineJSXPrimaryExpression$3, InlineJSXPrimaryExpression$4, InlineJSXPrimaryExpression$5, InlineJSXPrimaryExpression$6, InlineJSXPrimaryExpression$7, InlineJSXPrimaryExpression$8, InlineJSXPrimaryExpression$9];
|
|
17812
18048
|
function InlineJSXPrimaryExpression(ctx, state2) {
|
|
17813
18049
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "InlineJSXPrimaryExpression", InlineJSXPrimaryExpression$$);
|
|
@@ -17931,7 +18167,7 @@ ${js}`
|
|
|
17931
18167
|
function JSXChildGeneral(ctx, state2) {
|
|
17932
18168
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
|
|
17933
18169
|
}
|
|
17934
|
-
var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18170
|
+
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) {
|
|
17935
18171
|
return ["{/*", $2, "*/}"];
|
|
17936
18172
|
});
|
|
17937
18173
|
function JSXComment(ctx, state2) {
|
|
@@ -18219,37 +18455,37 @@ ${js}`
|
|
|
18219
18455
|
function InterfaceExtendsTarget(ctx, state2) {
|
|
18220
18456
|
return (0, import_lib2.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
|
|
18221
18457
|
}
|
|
18222
|
-
var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18458
|
+
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) {
|
|
18223
18459
|
return { $loc, token: $1 };
|
|
18224
18460
|
});
|
|
18225
18461
|
function TypeKeyword(ctx, state2) {
|
|
18226
18462
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
|
|
18227
18463
|
}
|
|
18228
|
-
var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18464
|
+
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) {
|
|
18229
18465
|
return { $loc, token: $1 };
|
|
18230
18466
|
});
|
|
18231
18467
|
function Enum(ctx, state2) {
|
|
18232
18468
|
return (0, import_lib2.$EVENT)(ctx, state2, "Enum", Enum$0);
|
|
18233
18469
|
}
|
|
18234
|
-
var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18470
|
+
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) {
|
|
18235
18471
|
return { $loc, token: $1 };
|
|
18236
18472
|
});
|
|
18237
18473
|
function Interface(ctx, state2) {
|
|
18238
18474
|
return (0, import_lib2.$EVENT)(ctx, state2, "Interface", Interface$0);
|
|
18239
18475
|
}
|
|
18240
|
-
var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18476
|
+
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) {
|
|
18241
18477
|
return { $loc, token: $1 };
|
|
18242
18478
|
});
|
|
18243
18479
|
function Global(ctx, state2) {
|
|
18244
18480
|
return (0, import_lib2.$EVENT)(ctx, state2, "Global", Global$0);
|
|
18245
18481
|
}
|
|
18246
|
-
var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18482
|
+
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) {
|
|
18247
18483
|
return { $loc, token: $1 };
|
|
18248
18484
|
});
|
|
18249
18485
|
function Module(ctx, state2) {
|
|
18250
18486
|
return (0, import_lib2.$EVENT)(ctx, state2, "Module", Module$0);
|
|
18251
18487
|
}
|
|
18252
|
-
var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18488
|
+
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) {
|
|
18253
18489
|
return { $loc, token: $1 };
|
|
18254
18490
|
});
|
|
18255
18491
|
function Namespace(ctx, state2) {
|
|
@@ -18563,7 +18799,7 @@ ${js}`
|
|
|
18563
18799
|
function ReturnTypeSuffix(ctx, state2) {
|
|
18564
18800
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
|
|
18565
18801
|
}
|
|
18566
|
-
var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
18802
|
+
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) {
|
|
18567
18803
|
var asserts = $1;
|
|
18568
18804
|
var t = $3;
|
|
18569
18805
|
if (!t)
|
|
@@ -18664,8 +18900,8 @@ ${js}`
|
|
|
18664
18900
|
function TypeUnarySuffix(ctx, state2) {
|
|
18665
18901
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
|
|
18666
18902
|
}
|
|
18667
|
-
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18668
|
-
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18903
|
+
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L241, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
18904
|
+
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
18669
18905
|
var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
|
|
18670
18906
|
function TypeUnaryOp(ctx, state2) {
|
|
18671
18907
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
|
|
@@ -18695,7 +18931,7 @@ ${js}`
|
|
|
18695
18931
|
function TypeIndexedAccess(ctx, state2) {
|
|
18696
18932
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
|
|
18697
18933
|
}
|
|
18698
|
-
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
18934
|
+
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L242, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
|
|
18699
18935
|
return { $loc, token: "unknown" };
|
|
18700
18936
|
});
|
|
18701
18937
|
function UnknownAlias(ctx, state2) {
|
|
@@ -18973,7 +19209,7 @@ ${js}`
|
|
|
18973
19209
|
function TypeBullet(ctx, state2) {
|
|
18974
19210
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeBullet", TypeBullet$0);
|
|
18975
19211
|
}
|
|
18976
|
-
var TypeWithPostfix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(TypeConditional, (0, import_lib2.$E)((0, import_lib2.$S)(
|
|
19212
|
+
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) {
|
|
18977
19213
|
var t = $1;
|
|
18978
19214
|
var postfix = $2;
|
|
18979
19215
|
if (!postfix)
|
|
@@ -19088,13 +19324,13 @@ ${js}`
|
|
|
19088
19324
|
return num;
|
|
19089
19325
|
return $0;
|
|
19090
19326
|
});
|
|
19091
|
-
var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19327
|
+
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) {
|
|
19092
19328
|
return { type: "VoidType", $loc, token: $1 };
|
|
19093
19329
|
});
|
|
19094
|
-
var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19330
|
+
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) {
|
|
19095
19331
|
return { type: "UniqueSymbolType", children: $0 };
|
|
19096
19332
|
});
|
|
19097
|
-
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
19333
|
+
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L245, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
19098
19334
|
return { $loc, token: "[]" };
|
|
19099
19335
|
});
|
|
19100
19336
|
var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
|
|
@@ -19113,7 +19349,7 @@ ${js}`
|
|
|
19113
19349
|
var InlineInterfacePropertyDelimiter$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)(SameLineOrIndentedFurther, InlineBasicInterfaceProperty)), InsertComma), function(value) {
|
|
19114
19350
|
return value[1];
|
|
19115
19351
|
});
|
|
19116
|
-
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)($
|
|
19352
|
+
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 "}"'))));
|
|
19117
19353
|
var InlineInterfacePropertyDelimiter$3 = (0, import_lib2.$Y)(EOS);
|
|
19118
19354
|
var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
|
|
19119
19355
|
function InlineInterfacePropertyDelimiter(ctx, state2) {
|
|
@@ -19179,14 +19415,17 @@ ${js}`
|
|
|
19179
19415
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeFunctionArrow", TypeFunctionArrow$0);
|
|
19180
19416
|
}
|
|
19181
19417
|
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) {
|
|
19418
|
+
var open = $1;
|
|
19182
19419
|
var args = $2;
|
|
19183
|
-
|
|
19420
|
+
var ws = $3;
|
|
19421
|
+
var close = $4;
|
|
19422
|
+
args = args.flatMap(([ws2, [arg, delim]]) => [prepend(ws2, arg), delim]);
|
|
19184
19423
|
args.pop();
|
|
19185
19424
|
return {
|
|
19186
19425
|
type: "TypeArguments",
|
|
19187
19426
|
ts: true,
|
|
19188
19427
|
args,
|
|
19189
|
-
children:
|
|
19428
|
+
children: [open, args, ws, close]
|
|
19190
19429
|
};
|
|
19191
19430
|
});
|
|
19192
19431
|
function TypeArguments(ctx, state2) {
|
|
@@ -19352,7 +19591,7 @@ ${js}`
|
|
|
19352
19591
|
function CivetPrologue(ctx, state2) {
|
|
19353
19592
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
|
|
19354
19593
|
}
|
|
19355
|
-
var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19594
|
+
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) {
|
|
19356
19595
|
var options = $3;
|
|
19357
19596
|
return {
|
|
19358
19597
|
type: "CivetPrologue",
|