@danielx/civet 0.9.2 → 0.9.4
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 +18 -0
- package/dist/browser.js +898 -493
- package/dist/civet +1 -1
- package/dist/esm.mjs +11 -5
- package/dist/main.js +1167 -625
- package/dist/main.mjs +1167 -625
- package/dist/node-worker.mjs +7 -2
- package/dist/types.d.ts +7 -6
- package/dist/unplugin/unplugin.js +5 -15
- package/dist/unplugin/unplugin.mjs +5 -15
- package/package.json +2 -2
package/dist/main.mjs
CHANGED
|
@@ -56,7 +56,7 @@ var require_machine = __commonJS({
|
|
|
56
56
|
$EVENT: () => $EVENT2,
|
|
57
57
|
$EVENT_C: () => $EVENT_C2,
|
|
58
58
|
$EXPECT: () => $EXPECT2,
|
|
59
|
-
$L: () => $
|
|
59
|
+
$L: () => $L249,
|
|
60
60
|
$N: () => $N2,
|
|
61
61
|
$P: () => $P2,
|
|
62
62
|
$Q: () => $Q2,
|
|
@@ -81,7 +81,7 @@ var require_machine = __commonJS({
|
|
|
81
81
|
return result;
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
function $
|
|
84
|
+
function $L249(str) {
|
|
85
85
|
return function(_ctx, state2) {
|
|
86
86
|
const { input, pos } = state2, { length } = str, end = pos + length;
|
|
87
87
|
if (input.substring(pos, end) === str) {
|
|
@@ -494,6 +494,7 @@ __export(lib_civet_exports, {
|
|
|
494
494
|
append: () => append,
|
|
495
495
|
attachPostfixStatementAsExpression: () => attachPostfixStatementAsExpression,
|
|
496
496
|
blockWithPrefix: () => blockWithPrefix,
|
|
497
|
+
braceBlock: () => braceBlock,
|
|
497
498
|
convertNamedImportsToObject: () => convertNamedImportsToObject,
|
|
498
499
|
convertObjectToJSXAttributes: () => convertObjectToJSXAttributes,
|
|
499
500
|
convertWithClause: () => convertWithClause,
|
|
@@ -974,6 +975,57 @@ function literalValue(literal) {
|
|
|
974
975
|
}
|
|
975
976
|
}
|
|
976
977
|
}
|
|
978
|
+
function literalType(literal) {
|
|
979
|
+
let t;
|
|
980
|
+
switch (literal.type) {
|
|
981
|
+
case "RegularExpressionLiteral": {
|
|
982
|
+
t = "RegExp";
|
|
983
|
+
break;
|
|
984
|
+
}
|
|
985
|
+
case "TemplateLiteral": {
|
|
986
|
+
t = "string";
|
|
987
|
+
break;
|
|
988
|
+
}
|
|
989
|
+
case "Literal": {
|
|
990
|
+
switch (literal.subtype) {
|
|
991
|
+
case "NullLiteral": {
|
|
992
|
+
t = "null";
|
|
993
|
+
break;
|
|
994
|
+
}
|
|
995
|
+
case "BooleanLiteral": {
|
|
996
|
+
t = "boolean";
|
|
997
|
+
break;
|
|
998
|
+
}
|
|
999
|
+
case "NumericLiteral": {
|
|
1000
|
+
if (literal.raw.endsWith("n")) {
|
|
1001
|
+
t = "bigint";
|
|
1002
|
+
} else {
|
|
1003
|
+
t = "number";
|
|
1004
|
+
}
|
|
1005
|
+
;
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
case "StringLiteral": {
|
|
1009
|
+
t = "string";
|
|
1010
|
+
break;
|
|
1011
|
+
}
|
|
1012
|
+
default: {
|
|
1013
|
+
throw new Error(`unknown literal subtype ${literal.subtype}`);
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
;
|
|
1017
|
+
break;
|
|
1018
|
+
}
|
|
1019
|
+
default: {
|
|
1020
|
+
throw new Error(`unknown literal type ${literal.type}`);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
return {
|
|
1024
|
+
type: "TypeLiteral",
|
|
1025
|
+
t,
|
|
1026
|
+
children: [t]
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
977
1029
|
function makeNumericLiteral(n) {
|
|
978
1030
|
const s = n.toString();
|
|
979
1031
|
return {
|
|
@@ -1286,7 +1338,7 @@ function skipIfOnlyWS(target) {
|
|
|
1286
1338
|
return target;
|
|
1287
1339
|
}
|
|
1288
1340
|
function spliceChild(node, child, del, ...replacements) {
|
|
1289
|
-
const children = node
|
|
1341
|
+
const children = Array.isArray(node) ? node : node.children;
|
|
1290
1342
|
if (!Array.isArray(children)) {
|
|
1291
1343
|
throw new Error("spliceChild: non-array node has no children field");
|
|
1292
1344
|
}
|
|
@@ -1721,14 +1773,41 @@ function gatherBindingCode(statements, opts) {
|
|
|
1721
1773
|
const thisAssignments = [];
|
|
1722
1774
|
const splices = [];
|
|
1723
1775
|
function insertRestSplices(s, p, thisAssignments2) {
|
|
1724
|
-
|
|
1725
|
-
|
|
1776
|
+
let m;
|
|
1777
|
+
for (let ref2 = gatherRecursiveAll(
|
|
1778
|
+
s,
|
|
1779
|
+
(n) => n.blockPrefix || opts?.injectParamProps && n.accessModifier || n.type === "AtBinding" || opts?.assignPins && (m = n.type, m === "PinPattern" || m === "PinProperty")
|
|
1780
|
+
), i3 = 0, len22 = ref2.length; i3 < len22; i3++) {
|
|
1781
|
+
let n = ref2[i3];
|
|
1726
1782
|
if (n.type === "AtBinding") {
|
|
1727
1783
|
const { ref } = n;
|
|
1728
1784
|
const { id } = ref;
|
|
1729
1785
|
thisAssignments2.push([`this.${id} = `, ref]);
|
|
1730
1786
|
continue;
|
|
1731
1787
|
}
|
|
1788
|
+
if (opts?.assignPins) {
|
|
1789
|
+
if (n.type === "PinProperty") {
|
|
1790
|
+
n.children = n.children.flatMap(($2) => $2 === n.name ? [n.name, ": ", n.value] : $2);
|
|
1791
|
+
updateParentPointers(n);
|
|
1792
|
+
n = n.value;
|
|
1793
|
+
}
|
|
1794
|
+
if (n.type === "PinPattern") {
|
|
1795
|
+
n.ref = makeRef(
|
|
1796
|
+
n.expression.type === "Identifier" ? n.expression.name : "pin"
|
|
1797
|
+
);
|
|
1798
|
+
n.children = [n.ref];
|
|
1799
|
+
updateParentPointers(n);
|
|
1800
|
+
thisAssignments2.push({
|
|
1801
|
+
type: "AssignmentExpression",
|
|
1802
|
+
children: [n.expression, " = ", n.ref],
|
|
1803
|
+
names: [],
|
|
1804
|
+
lhs: n.expression,
|
|
1805
|
+
assigned: n.expression,
|
|
1806
|
+
expression: n.ref
|
|
1807
|
+
});
|
|
1808
|
+
continue;
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1732
1811
|
if (opts?.injectParamProps && n.type === "Parameter" && n.accessModifier) {
|
|
1733
1812
|
for (let ref3 = n.names, i4 = 0, len3 = ref3.length; i4 < len3; i4++) {
|
|
1734
1813
|
const id = ref3[i4];
|
|
@@ -1912,16 +1991,18 @@ var declareHelper = {
|
|
|
1912
1991
|
"\n"
|
|
1913
1992
|
]]);
|
|
1914
1993
|
},
|
|
1915
|
-
|
|
1916
|
-
const RSliceable = makeRef("RSliceable");
|
|
1994
|
+
RSliceable(RSliceableRef) {
|
|
1917
1995
|
state.prelude.push([
|
|
1918
1996
|
"",
|
|
1919
|
-
ts(["type ",
|
|
1997
|
+
ts(["type ", RSliceableRef, "<R> = string | {length: number; slice(start: number, end: number): {reverse(): R}}\n"])
|
|
1920
1998
|
]);
|
|
1999
|
+
},
|
|
2000
|
+
rslice(rsliceRef) {
|
|
2001
|
+
const RSliceableRef = getHelperRef("RSliceable");
|
|
1921
2002
|
state.prelude.push(["", [
|
|
1922
2003
|
preludeVar,
|
|
1923
2004
|
rsliceRef,
|
|
1924
|
-
ts([": <R, T extends string | ",
|
|
2005
|
+
ts([": <R, T extends string | ", RSliceableRef, "<R>>(a: T, start?: number, end?: number) => T extends string ? string : T extends ", RSliceableRef, "<infer R> ? R : never"]),
|
|
1925
2006
|
" = ((a, start = -1, end = -1) => {\n",
|
|
1926
2007
|
" const l = a.length\n",
|
|
1927
2008
|
" if (start < 0) start += l\n",
|
|
@@ -1940,6 +2021,72 @@ var declareHelper = {
|
|
|
1940
2021
|
"})"
|
|
1941
2022
|
], ";\n"]);
|
|
1942
2023
|
},
|
|
2024
|
+
range(rangeRef) {
|
|
2025
|
+
state.prelude.push(["", [
|
|
2026
|
+
preludeVar,
|
|
2027
|
+
rangeRef,
|
|
2028
|
+
ts([": (start: number, end: number) => number[]"]),
|
|
2029
|
+
" ",
|
|
2030
|
+
`= (start, end) => {
|
|
2031
|
+
const length = end - start;
|
|
2032
|
+
if (length <= 0) return [];
|
|
2033
|
+
const arr = Array(length);
|
|
2034
|
+
for (let i = 0; i < length; ++i) {
|
|
2035
|
+
arr[i] = i + start;
|
|
2036
|
+
}
|
|
2037
|
+
return arr;
|
|
2038
|
+
}`
|
|
2039
|
+
], ";\n"]);
|
|
2040
|
+
},
|
|
2041
|
+
revRange(revRangeRef) {
|
|
2042
|
+
state.prelude.push(["", [
|
|
2043
|
+
preludeVar,
|
|
2044
|
+
revRangeRef,
|
|
2045
|
+
ts([": (start: number, end: number) => number[]"]),
|
|
2046
|
+
" ",
|
|
2047
|
+
`= (start, end) => {
|
|
2048
|
+
const length = start - end;
|
|
2049
|
+
if (length <= 0) return [];
|
|
2050
|
+
const arr = Array(length);
|
|
2051
|
+
for (let i = 0; i < length; ++i) {
|
|
2052
|
+
arr[i] = start - i;
|
|
2053
|
+
}
|
|
2054
|
+
return arr;
|
|
2055
|
+
}`
|
|
2056
|
+
], ";\n"]);
|
|
2057
|
+
},
|
|
2058
|
+
stringRange(stringRangeRef) {
|
|
2059
|
+
state.prelude.push(["", [
|
|
2060
|
+
preludeVar,
|
|
2061
|
+
stringRangeRef,
|
|
2062
|
+
ts([": (start: number, length: number) => string[]"]),
|
|
2063
|
+
" ",
|
|
2064
|
+
`= (start, length) => {
|
|
2065
|
+
if (length <= 0) return [];
|
|
2066
|
+
const arr = Array(length);
|
|
2067
|
+
for (let i = 0; i < length; ++i) {
|
|
2068
|
+
arr[i] = String.fromCharCode(start + i);
|
|
2069
|
+
}
|
|
2070
|
+
return arr;
|
|
2071
|
+
}`
|
|
2072
|
+
], ";\n"]);
|
|
2073
|
+
},
|
|
2074
|
+
revStringRange(revStringRangeRef) {
|
|
2075
|
+
state.prelude.push(["", [
|
|
2076
|
+
preludeVar,
|
|
2077
|
+
revStringRangeRef,
|
|
2078
|
+
ts([": (start: number, length: number) => string[]"]),
|
|
2079
|
+
" ",
|
|
2080
|
+
`= (start, length) => {
|
|
2081
|
+
if (length <= 0) return [];
|
|
2082
|
+
const arr = Array(length);
|
|
2083
|
+
for (let i = 0; i < length; ++i) {
|
|
2084
|
+
arr[i] = String.fromCharCode(start - i);
|
|
2085
|
+
}
|
|
2086
|
+
return arr;
|
|
2087
|
+
}`
|
|
2088
|
+
], ";\n"]);
|
|
2089
|
+
},
|
|
1943
2090
|
div(divRef) {
|
|
1944
2091
|
state.prelude.push(["", [
|
|
1945
2092
|
// [indent, statement]
|
|
@@ -2082,9 +2229,28 @@ function peekHelperRef(base) {
|
|
|
2082
2229
|
return state.helperRefs[base];
|
|
2083
2230
|
}
|
|
2084
2231
|
function extractPreludeFor(node) {
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2232
|
+
if (!state.prelude.length) {
|
|
2233
|
+
return state.prelude;
|
|
2234
|
+
}
|
|
2235
|
+
const allHelpers = new Set(Object.values(state.helperRefs));
|
|
2236
|
+
const isHelper = allHelpers.has.bind(allHelpers);
|
|
2237
|
+
const usedHelpers = new Set(gatherRecursive(node, isHelper));
|
|
2238
|
+
while (true) {
|
|
2239
|
+
let prelude = state.prelude.filter((s) => {
|
|
2240
|
+
return gatherRecursive(s, usedHelpers.has.bind(usedHelpers)).length;
|
|
2241
|
+
});
|
|
2242
|
+
let changed = false;
|
|
2243
|
+
for (let ref1 = gatherRecursive(prelude, isHelper), i = 0, len3 = ref1.length; i < len3; i++) {
|
|
2244
|
+
const helper = ref1[i];
|
|
2245
|
+
if (!usedHelpers.has(helper)) {
|
|
2246
|
+
usedHelpers.add(helper);
|
|
2247
|
+
changed = true;
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
if (!changed) {
|
|
2251
|
+
return prelude;
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2088
2254
|
}
|
|
2089
2255
|
|
|
2090
2256
|
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\generate.civet.jsx
|
|
@@ -2096,7 +2262,8 @@ function stringify(node) {
|
|
|
2096
2262
|
}
|
|
2097
2263
|
}
|
|
2098
2264
|
function gen(root, options) {
|
|
2099
|
-
|
|
2265
|
+
let ref;
|
|
2266
|
+
const updateSourceMap = (ref = options?.sourceMap)?.updateSourceMap.bind(ref);
|
|
2100
2267
|
return recurse(root);
|
|
2101
2268
|
function recurse(node) {
|
|
2102
2269
|
if (!(node != null)) {
|
|
@@ -2121,15 +2288,15 @@ function gen(root, options) {
|
|
|
2121
2288
|
let line = "?";
|
|
2122
2289
|
let column = "?";
|
|
2123
2290
|
let offset;
|
|
2124
|
-
let
|
|
2125
|
-
if (
|
|
2126
|
-
const sourceMap =
|
|
2291
|
+
let ref1;
|
|
2292
|
+
if (ref1 = options.sourceMap) {
|
|
2293
|
+
const sourceMap = ref1;
|
|
2127
2294
|
if (node.$loc != null) {
|
|
2128
2295
|
sourceMap.updateSourceMap("", node.$loc.pos);
|
|
2129
2296
|
}
|
|
2130
|
-
line = sourceMap.
|
|
2131
|
-
column = sourceMap.
|
|
2132
|
-
offset = sourceMap.
|
|
2297
|
+
line = sourceMap.srcLine + 1;
|
|
2298
|
+
column = sourceMap.srcColumn + 1;
|
|
2299
|
+
offset = sourceMap.srcOffset;
|
|
2133
2300
|
}
|
|
2134
2301
|
options.errors ??= [];
|
|
2135
2302
|
options.errors.push(new import_lib2.ParseError(
|
|
@@ -3180,9 +3347,30 @@ function wrapIterationReturningResults(statement, collect) {
|
|
|
3180
3347
|
if (statement.resultsRef != null) {
|
|
3181
3348
|
return;
|
|
3182
3349
|
}
|
|
3183
|
-
|
|
3350
|
+
if (statement.resultsParent) {
|
|
3351
|
+
const { ancestor: ancestor2 } = findAncestor(
|
|
3352
|
+
statement,
|
|
3353
|
+
($5) => $5.type === "ForStatement" || $5.type === "IterationStatement",
|
|
3354
|
+
isFunction
|
|
3355
|
+
);
|
|
3356
|
+
if (!ancestor2) {
|
|
3357
|
+
statement.children.unshift({
|
|
3358
|
+
type: "Error",
|
|
3359
|
+
message: "Could not find ancestor of spread iteration"
|
|
3360
|
+
});
|
|
3361
|
+
return;
|
|
3362
|
+
}
|
|
3363
|
+
const resultsRef2 = statement.resultsRef = ancestor2.resultsRef;
|
|
3364
|
+
iterationDefaultBody(statement);
|
|
3365
|
+
const { block } = statement;
|
|
3366
|
+
if (!block.empty) {
|
|
3367
|
+
assignResults(block, (node) => [resultsRef2, ".push(", node, ")"]);
|
|
3368
|
+
}
|
|
3369
|
+
return;
|
|
3370
|
+
}
|
|
3371
|
+
const resultsRef = statement.resultsRef ??= makeRef("results");
|
|
3184
3372
|
const declaration = iterationDeclaration(statement);
|
|
3185
|
-
const { ancestor, child } = findAncestor(statement, ($
|
|
3373
|
+
const { ancestor, child } = findAncestor(statement, ($6) => $6.type === "BlockStatement");
|
|
3186
3374
|
assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
|
|
3187
3375
|
const index = findChildIndex(ancestor.expressions, child);
|
|
3188
3376
|
assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
|
|
@@ -3226,6 +3414,9 @@ function iterationDeclaration(statement) {
|
|
|
3226
3414
|
case "every": {
|
|
3227
3415
|
return "true";
|
|
3228
3416
|
}
|
|
3417
|
+
case "first": {
|
|
3418
|
+
return "undefined";
|
|
3419
|
+
}
|
|
3229
3420
|
case "min": {
|
|
3230
3421
|
return "Infinity";
|
|
3231
3422
|
}
|
|
@@ -3238,6 +3429,9 @@ function iterationDeclaration(statement) {
|
|
|
3238
3429
|
case "join": {
|
|
3239
3430
|
return '""';
|
|
3240
3431
|
}
|
|
3432
|
+
case "concat": {
|
|
3433
|
+
return "[]";
|
|
3434
|
+
}
|
|
3241
3435
|
default: {
|
|
3242
3436
|
return "0";
|
|
3243
3437
|
}
|
|
@@ -3282,10 +3476,16 @@ function iterationDeclaration(statement) {
|
|
|
3282
3476
|
case "count": {
|
|
3283
3477
|
return ["if (", node, ") ++", resultsRef];
|
|
3284
3478
|
}
|
|
3479
|
+
case "first": {
|
|
3480
|
+
return [resultsRef, " = ", node, "; break"];
|
|
3481
|
+
}
|
|
3285
3482
|
case "sum":
|
|
3286
3483
|
case "join": {
|
|
3287
3484
|
return [resultsRef, " += ", node];
|
|
3288
3485
|
}
|
|
3486
|
+
case "concat": {
|
|
3487
|
+
return [getHelperRef("concatAssign"), "(", resultsRef, ", ", node, ")"];
|
|
3488
|
+
}
|
|
3289
3489
|
case "product": {
|
|
3290
3490
|
return [resultsRef, " *= ", node];
|
|
3291
3491
|
}
|
|
@@ -3339,31 +3539,34 @@ function iterationDefaultBody(statement) {
|
|
|
3339
3539
|
}
|
|
3340
3540
|
}
|
|
3341
3541
|
}
|
|
3342
|
-
if (statement.type === "ForStatement"
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
if (
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3542
|
+
if (statement.type === "ForStatement") {
|
|
3543
|
+
const declaration = statement.eachDeclaration ?? statement.declaration;
|
|
3544
|
+
if (declaration?.type === "ForDeclaration") {
|
|
3545
|
+
if (reduction) {
|
|
3546
|
+
const bindings = patternBindings(declaration.binding.pattern);
|
|
3547
|
+
if (bindings.length) {
|
|
3548
|
+
fillBlock(["", bindings[0]]);
|
|
3549
|
+
for (const binding of bindings.slice(1)) {
|
|
3550
|
+
binding.children.unshift({
|
|
3551
|
+
type: "Error",
|
|
3552
|
+
subtype: "Warning",
|
|
3553
|
+
message: "Ignored binding in reduction loop with implicit body"
|
|
3554
|
+
});
|
|
3555
|
+
}
|
|
3556
|
+
} else {
|
|
3557
|
+
fillBlock([
|
|
3558
|
+
"",
|
|
3559
|
+
{
|
|
3560
|
+
type: "Error",
|
|
3561
|
+
message: "Empty binding pattern in reduction loop with implicit body"
|
|
3562
|
+
}
|
|
3563
|
+
]);
|
|
3353
3564
|
}
|
|
3354
3565
|
} else {
|
|
3355
|
-
fillBlock([
|
|
3356
|
-
"",
|
|
3357
|
-
{
|
|
3358
|
-
type: "Error",
|
|
3359
|
-
message: "Empty binding pattern in reduction loop with implicit body"
|
|
3360
|
-
}
|
|
3361
|
-
]);
|
|
3566
|
+
fillBlock(["", patternAsValue(declaration.binding.pattern)]);
|
|
3362
3567
|
}
|
|
3363
|
-
|
|
3364
|
-
fillBlock(["", patternAsValue(statement.declaration.binding.pattern)]);
|
|
3568
|
+
block.empty = false;
|
|
3365
3569
|
}
|
|
3366
|
-
block.empty = false;
|
|
3367
3570
|
}
|
|
3368
3571
|
return false;
|
|
3369
3572
|
}
|
|
@@ -3424,7 +3627,7 @@ function processParams(f) {
|
|
|
3424
3627
|
}
|
|
3425
3628
|
}
|
|
3426
3629
|
}
|
|
3427
|
-
parameters.names = before.flatMap(($
|
|
3630
|
+
parameters.names = before.flatMap(($7) => $7.names);
|
|
3428
3631
|
parameters.parameters.splice(0, 1 / 0, ...[]);
|
|
3429
3632
|
if (tt) {
|
|
3430
3633
|
parameters.parameters.push(tt);
|
|
@@ -3442,7 +3645,7 @@ function processParams(f) {
|
|
|
3442
3645
|
});
|
|
3443
3646
|
}
|
|
3444
3647
|
after = trimFirstSpace(after);
|
|
3445
|
-
const names = after.flatMap(($
|
|
3648
|
+
const names = after.flatMap(($8) => $8.names);
|
|
3446
3649
|
const elements = after.map((p) => {
|
|
3447
3650
|
if (p.type === "Error") {
|
|
3448
3651
|
return p;
|
|
@@ -3531,9 +3734,9 @@ function processParams(f) {
|
|
|
3531
3734
|
colon,
|
|
3532
3735
|
t,
|
|
3533
3736
|
children: [
|
|
3534
|
-
...oldSuffix.children.filter(($
|
|
3737
|
+
...oldSuffix.children.filter(($9) => (
|
|
3535
3738
|
// spaces and colon
|
|
3536
|
-
$
|
|
3739
|
+
$9 !== oldSuffix.optional && $9 !== oldSuffix.t
|
|
3537
3740
|
)),
|
|
3538
3741
|
!oldSuffix.colon ? colon : void 0,
|
|
3539
3742
|
t
|
|
@@ -3564,27 +3767,28 @@ function processParams(f) {
|
|
|
3564
3767
|
indent = expressions[0][0];
|
|
3565
3768
|
}
|
|
3566
3769
|
const [splices, thisAssignments] = gatherBindingCode(parameters, {
|
|
3567
|
-
injectParamProps: isConstructor
|
|
3770
|
+
injectParamProps: isConstructor,
|
|
3771
|
+
assignPins: true
|
|
3568
3772
|
});
|
|
3569
3773
|
if (isConstructor) {
|
|
3570
|
-
const { ancestor } = findAncestor(f, ($
|
|
3774
|
+
const { ancestor } = findAncestor(f, ($10) => $10.type === "ClassExpression");
|
|
3571
3775
|
if (ancestor != null) {
|
|
3572
|
-
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($
|
|
3776
|
+
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($11) => $11.type === "FieldDefinition").map(($12) => $12.id).filter((a3) => typeof a3 === "object" && a3 != null && "type" in a3 && a3.type === "Identifier").map(($13) => $13.name));
|
|
3573
3777
|
const classExpressions = ancestor.body.expressions;
|
|
3574
|
-
let
|
|
3575
|
-
assert.notEqual(
|
|
3778
|
+
let index2 = findChildIndex(classExpressions, f);
|
|
3779
|
+
assert.notEqual(index2, -1, "Could not find constructor in class");
|
|
3576
3780
|
let m4;
|
|
3577
|
-
while (m4 = classExpressions[
|
|
3578
|
-
|
|
3781
|
+
while (m4 = classExpressions[index2 - 1]?.[1], typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "MethodDefinition" && "name" in m4 && m4.name === "constructor") {
|
|
3782
|
+
index2--;
|
|
3579
3783
|
}
|
|
3580
|
-
const fStatement = classExpressions[
|
|
3581
|
-
for (let ref18 = gatherRecursive(parameters, ($
|
|
3784
|
+
const fStatement = classExpressions[index2];
|
|
3785
|
+
for (let ref18 = gatherRecursive(parameters, ($14) => $14.type === "Parameter"), i9 = 0, len8 = ref18.length; i9 < len8; i9++) {
|
|
3582
3786
|
const parameter = ref18[i9];
|
|
3583
3787
|
const { accessModifier } = parameter;
|
|
3584
3788
|
if (!(accessModifier || parameter.typeSuffix)) {
|
|
3585
3789
|
continue;
|
|
3586
3790
|
}
|
|
3587
|
-
for (let ref19 = gatherRecursive(parameter, ($
|
|
3791
|
+
for (let ref19 = gatherRecursive(parameter, ($15) => $15.type === "AtBinding"), i10 = 0, len9 = ref19.length; i10 < len9; i10++) {
|
|
3588
3792
|
const binding = ref19[i10];
|
|
3589
3793
|
const typeSuffix = binding.parent?.typeSuffix;
|
|
3590
3794
|
if (!(accessModifier || typeSuffix)) {
|
|
@@ -3598,7 +3802,7 @@ function processParams(f) {
|
|
|
3598
3802
|
if (fields.has(id)) {
|
|
3599
3803
|
continue;
|
|
3600
3804
|
}
|
|
3601
|
-
classExpressions.splice(
|
|
3805
|
+
classExpressions.splice(index2++, 0, [fStatement[0], {
|
|
3602
3806
|
type: "FieldDefinition",
|
|
3603
3807
|
id,
|
|
3604
3808
|
typeSuffix,
|
|
@@ -3635,25 +3839,31 @@ function processParams(f) {
|
|
|
3635
3839
|
if (!prefix.length) {
|
|
3636
3840
|
return;
|
|
3637
3841
|
}
|
|
3842
|
+
let index = -1;
|
|
3638
3843
|
if (isConstructor) {
|
|
3639
|
-
|
|
3640
|
-
expressions,
|
|
3641
|
-
(a4) => typeof a4 === "object" && a4 != null && "type" in a4 && a4.type === "CallExpression" && "children" in a4 && Array.isArray(a4.children) && a4.children.length >= 1 && typeof a4.children[0] === "object" && a4.children[0] != null && "token" in a4.children[0] && a4.children[0].token === "super"
|
|
3642
|
-
);
|
|
3643
|
-
if (superCalls.length) {
|
|
3644
|
-
const { child } = findAncestor(superCalls[0], (a5) => a5 === block);
|
|
3645
|
-
const index = findChildIndex(expressions, child);
|
|
3646
|
-
if (index < 0) {
|
|
3647
|
-
throw new Error("Could not find super call within top-level expressions");
|
|
3648
|
-
}
|
|
3649
|
-
expressions.splice(index + 1, 0, ...prefix);
|
|
3650
|
-
return;
|
|
3651
|
-
}
|
|
3844
|
+
index = findSuperCall(block);
|
|
3652
3845
|
}
|
|
3653
|
-
expressions.
|
|
3846
|
+
expressions.splice(index + 1, 0, ...prefix);
|
|
3654
3847
|
updateParentPointers(block);
|
|
3655
3848
|
braceBlock(block);
|
|
3656
3849
|
}
|
|
3850
|
+
function findSuperCall(block) {
|
|
3851
|
+
const { expressions } = block;
|
|
3852
|
+
const superCalls = gatherNodes(
|
|
3853
|
+
expressions,
|
|
3854
|
+
(a4) => typeof a4 === "object" && a4 != null && "type" in a4 && a4.type === "CallExpression" && "children" in a4 && Array.isArray(a4.children) && a4.children.length >= 1 && typeof a4.children[0] === "object" && a4.children[0] != null && "token" in a4.children[0] && a4.children[0].token === "super"
|
|
3855
|
+
);
|
|
3856
|
+
if (superCalls.length) {
|
|
3857
|
+
const { child } = findAncestor(superCalls[0], (a5) => a5 === block);
|
|
3858
|
+
const index = findChildIndex(expressions, child);
|
|
3859
|
+
if (index < 0) {
|
|
3860
|
+
throw new Error("Could not find super call within top-level expressions");
|
|
3861
|
+
}
|
|
3862
|
+
return index;
|
|
3863
|
+
} else {
|
|
3864
|
+
return -1;
|
|
3865
|
+
}
|
|
3866
|
+
}
|
|
3657
3867
|
function processSignature(f) {
|
|
3658
3868
|
const { block, signature } = f;
|
|
3659
3869
|
if (!f.async?.length && hasAwait(block)) {
|
|
@@ -3661,7 +3871,7 @@ function processSignature(f) {
|
|
|
3661
3871
|
f.async.push("async ");
|
|
3662
3872
|
signature.modifier.async = true;
|
|
3663
3873
|
} else {
|
|
3664
|
-
for (let ref21 = gatherRecursiveWithinFunction(block, ($
|
|
3874
|
+
for (let ref21 = gatherRecursiveWithinFunction(block, ($16) => $16.type === "Await"), i12 = 0, len11 = ref21.length; i12 < len11; i12++) {
|
|
3665
3875
|
const a = ref21[i12];
|
|
3666
3876
|
const i = findChildIndex(a.parent, a);
|
|
3667
3877
|
a.parent.children.splice(i + 1, 0, {
|
|
@@ -3676,9 +3886,9 @@ function processSignature(f) {
|
|
|
3676
3886
|
f.generator.push("*");
|
|
3677
3887
|
signature.modifier.generator = true;
|
|
3678
3888
|
} else {
|
|
3679
|
-
for (let ref22 = gatherRecursiveWithinFunction(block, ($
|
|
3889
|
+
for (let ref22 = gatherRecursiveWithinFunction(block, ($17) => $17.type === "YieldExpression"), i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
|
|
3680
3890
|
const y = ref22[i13];
|
|
3681
|
-
const i = y.children.findIndex(($
|
|
3891
|
+
const i = y.children.findIndex(($18) => $18.type === "Yield");
|
|
3682
3892
|
y.children.splice(i + 1, 0, {
|
|
3683
3893
|
type: "Error",
|
|
3684
3894
|
message: `yield invalid in ${f.type === "ArrowFunction" ? "=> arrow function" : signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
|
|
@@ -3691,7 +3901,7 @@ function processSignature(f) {
|
|
|
3691
3901
|
}
|
|
3692
3902
|
}
|
|
3693
3903
|
function processFunctions(statements, config2) {
|
|
3694
|
-
for (let ref23 = gatherRecursiveAll(statements, ($
|
|
3904
|
+
for (let ref23 = gatherRecursiveAll(statements, ($19) => $19.type === "FunctionExpression" || $19.type === "ArrowFunction" || $19.type === "MethodDefinition"), i14 = 0, len13 = ref23.length; i14 < len13; i14++) {
|
|
3695
3905
|
const f = ref23[i14];
|
|
3696
3906
|
if (f.type === "FunctionExpression" || f.type === "MethodDefinition") {
|
|
3697
3907
|
implicitFunctionBlock(f);
|
|
@@ -3703,7 +3913,7 @@ function processFunctions(statements, config2) {
|
|
|
3703
3913
|
}
|
|
3704
3914
|
function expressionizeIteration(exp) {
|
|
3705
3915
|
let { async, generator, block, children, statement } = exp;
|
|
3706
|
-
|
|
3916
|
+
let i = children.indexOf(statement);
|
|
3707
3917
|
if (i < 0) {
|
|
3708
3918
|
throw new Error("Could not find iteration statement in iteration expression");
|
|
3709
3919
|
}
|
|
@@ -3714,12 +3924,6 @@ function expressionizeIteration(exp) {
|
|
|
3714
3924
|
}
|
|
3715
3925
|
let statements;
|
|
3716
3926
|
if (generator) {
|
|
3717
|
-
if (statement.reduction) {
|
|
3718
|
-
children.unshift({
|
|
3719
|
-
type: "Error",
|
|
3720
|
-
message: `Cannot use reduction (${statement.reduction.subtype}) with generators`
|
|
3721
|
-
});
|
|
3722
|
-
}
|
|
3723
3927
|
iterationDefaultBody(statement);
|
|
3724
3928
|
assignResults(block, (node) => {
|
|
3725
3929
|
return {
|
|
@@ -3767,7 +3971,7 @@ function expressionizeIteration(exp) {
|
|
|
3767
3971
|
}
|
|
3768
3972
|
}
|
|
3769
3973
|
function processIterationExpressions(statements) {
|
|
3770
|
-
for (let ref25 = gatherRecursiveAll(statements, ($
|
|
3974
|
+
for (let ref25 = gatherRecursiveAll(statements, ($20) => $20.type === "IterationExpression"), i15 = 0, len14 = ref25.length; i15 < len14; i15++) {
|
|
3771
3975
|
const s = ref25[i15];
|
|
3772
3976
|
expressionizeIteration(s);
|
|
3773
3977
|
}
|
|
@@ -3817,12 +4021,12 @@ function processCoffeeDo(ws, expression) {
|
|
|
3817
4021
|
const newParameters = {
|
|
3818
4022
|
...parameters,
|
|
3819
4023
|
parameters: newParameterList,
|
|
3820
|
-
children: parameters.children.map(($
|
|
4024
|
+
children: parameters.children.map(($21) => $21 === parameterList ? newParameterList : $21)
|
|
3821
4025
|
};
|
|
3822
4026
|
expression = {
|
|
3823
4027
|
...expression,
|
|
3824
4028
|
parameters: newParameters,
|
|
3825
|
-
children: expression.children.map(($
|
|
4029
|
+
children: expression.children.map(($22) => $22 === parameters ? newParameters : $22)
|
|
3826
4030
|
};
|
|
3827
4031
|
}
|
|
3828
4032
|
return {
|
|
@@ -3844,7 +4048,7 @@ function makeAmpersandFunction(rhs) {
|
|
|
3844
4048
|
ref = makeRef("$");
|
|
3845
4049
|
inplacePrepend(ref, body);
|
|
3846
4050
|
}
|
|
3847
|
-
if (startsWithPredicate(body, ($
|
|
4051
|
+
if (startsWithPredicate(body, ($23) => $23.type === "ObjectExpression")) {
|
|
3848
4052
|
body = makeLeftHandSideExpression(body);
|
|
3849
4053
|
}
|
|
3850
4054
|
const parameterList = [
|
|
@@ -4704,29 +4908,36 @@ function getPatternBlockPrefix(pattern, ref, decl = "const ", typeSuffix) {
|
|
|
4704
4908
|
}
|
|
4705
4909
|
let [splices, thisAssignments] = gatherBindingCode(pattern);
|
|
4706
4910
|
const patternBindings2 = nonMatcherBindings(pattern);
|
|
4911
|
+
const results = [];
|
|
4912
|
+
for (let ref2 = gatherRecursiveAll(patternBindings2, ($7) => $7.subbinding != null), i5 = 0, len4 = ref2.length; i5 < len4; i5++) {
|
|
4913
|
+
const p = ref2[i5];
|
|
4914
|
+
results.push(prepend(", ", p.subbinding));
|
|
4915
|
+
}
|
|
4916
|
+
;
|
|
4917
|
+
const subbindings = results;
|
|
4707
4918
|
splices = splices.map((s) => [", ", nonMatcherBindings(s)]);
|
|
4708
|
-
thisAssignments = thisAssignments.map(($
|
|
4919
|
+
thisAssignments = thisAssignments.map(($8) => ["", $8, ";"]);
|
|
4709
4920
|
const duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices]);
|
|
4710
4921
|
return [
|
|
4711
4922
|
["", {
|
|
4712
4923
|
type: "Declaration",
|
|
4713
|
-
children: [decl, patternBindings2, typeSuffix, " = ", ref, ...splices],
|
|
4924
|
+
children: [decl, patternBindings2, typeSuffix, " = ", ref, ...subbindings, ...splices],
|
|
4714
4925
|
names: [],
|
|
4715
4926
|
bindings: []
|
|
4716
4927
|
// avoid implicit return of any bindings
|
|
4717
4928
|
}, ";"],
|
|
4718
4929
|
...thisAssignments,
|
|
4719
|
-
...duplicateDeclarations.map(($
|
|
4930
|
+
...duplicateDeclarations.map(($9) => ["", $9, ";"])
|
|
4720
4931
|
];
|
|
4721
4932
|
}
|
|
4722
4933
|
function elideMatchersFromArrayBindings(elements) {
|
|
4723
|
-
const
|
|
4724
|
-
for (let
|
|
4725
|
-
const element = elements[
|
|
4934
|
+
const results1 = [];
|
|
4935
|
+
for (let i6 = 0, len5 = elements.length; i6 < len5; i6++) {
|
|
4936
|
+
const element = elements[i6];
|
|
4726
4937
|
switch (element.type) {
|
|
4727
4938
|
case "BindingRestElement":
|
|
4728
4939
|
case "ElisionElement": {
|
|
4729
|
-
|
|
4940
|
+
results1.push(element);
|
|
4730
4941
|
break;
|
|
4731
4942
|
}
|
|
4732
4943
|
case "BindingElement": {
|
|
@@ -4735,12 +4946,12 @@ function elideMatchersFromArrayBindings(elements) {
|
|
|
4735
4946
|
case "RegularExpressionLiteral":
|
|
4736
4947
|
case "StringLiteral":
|
|
4737
4948
|
case "PinPattern": {
|
|
4738
|
-
|
|
4949
|
+
results1.push(element.delim);
|
|
4739
4950
|
break;
|
|
4740
4951
|
}
|
|
4741
4952
|
default: {
|
|
4742
4953
|
const binding = nonMatcherBindings(element.binding);
|
|
4743
|
-
|
|
4954
|
+
results1.push(makeNode({
|
|
4744
4955
|
...element,
|
|
4745
4956
|
binding,
|
|
4746
4957
|
children: element.children.map((c) => {
|
|
@@ -4755,46 +4966,75 @@ function elideMatchersFromArrayBindings(elements) {
|
|
|
4755
4966
|
}
|
|
4756
4967
|
}
|
|
4757
4968
|
;
|
|
4758
|
-
return
|
|
4969
|
+
return results1;
|
|
4759
4970
|
}
|
|
4760
4971
|
function elideMatchersFromPropertyBindings(properties) {
|
|
4761
|
-
|
|
4972
|
+
const results2 = [];
|
|
4973
|
+
for (let i7 = 0, len6 = properties.length; i7 < len6; i7++) {
|
|
4974
|
+
const p = properties[i7];
|
|
4762
4975
|
switch (p.type) {
|
|
4763
|
-
case "BindingProperty":
|
|
4764
|
-
|
|
4976
|
+
case "BindingProperty":
|
|
4977
|
+
case "PinProperty": {
|
|
4978
|
+
const { children, name, value, bind } = p;
|
|
4765
4979
|
const [ws] = children;
|
|
4766
4980
|
const shouldElide = name.type === "NumericLiteral" && !value?.name || name.type === "ComputedPropertyName" && value?.subtype === "NumericLiteral";
|
|
4767
4981
|
if (shouldElide) {
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
...p,
|
|
4776
|
-
children: [ws, name, bindings && ": ", bindings, p.delim]
|
|
4777
|
-
};
|
|
4982
|
+
if (bind) {
|
|
4983
|
+
results2.push({
|
|
4984
|
+
type: "Error",
|
|
4985
|
+
message: `Cannot bind ${name.type}`
|
|
4986
|
+
});
|
|
4987
|
+
} else {
|
|
4988
|
+
continue;
|
|
4778
4989
|
}
|
|
4779
|
-
|
|
4780
|
-
|
|
4990
|
+
} else {
|
|
4991
|
+
let contents;
|
|
4992
|
+
switch (value?.type) {
|
|
4993
|
+
case "ArrayBindingPattern":
|
|
4994
|
+
case "ObjectBindingPattern": {
|
|
4995
|
+
const bindings = nonMatcherBindings(value);
|
|
4996
|
+
contents = {
|
|
4997
|
+
...p,
|
|
4998
|
+
value: bindings,
|
|
4999
|
+
children: [ws, name, bindings && ": ", bindings, p.delim]
|
|
5000
|
+
};
|
|
5001
|
+
break;
|
|
5002
|
+
}
|
|
5003
|
+
case "Identifier":
|
|
5004
|
+
case void 0: {
|
|
5005
|
+
contents = p;
|
|
5006
|
+
break;
|
|
5007
|
+
}
|
|
5008
|
+
default: {
|
|
5009
|
+
contents = void 0;
|
|
5010
|
+
}
|
|
4781
5011
|
}
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
case "StringLiteral":
|
|
4785
|
-
default:
|
|
4786
|
-
return {
|
|
5012
|
+
if (bind) {
|
|
5013
|
+
results2.push({
|
|
4787
5014
|
...p,
|
|
4788
|
-
children: [ws, name, p.delim]
|
|
4789
|
-
|
|
5015
|
+
children: [ws, name, p.delim],
|
|
5016
|
+
subbinding: contents?.value ? [
|
|
5017
|
+
contents.value,
|
|
5018
|
+
" = ",
|
|
5019
|
+
name
|
|
5020
|
+
] : void 0
|
|
5021
|
+
});
|
|
5022
|
+
} else if (contents) {
|
|
5023
|
+
results2.push(contents);
|
|
5024
|
+
} else {
|
|
5025
|
+
continue;
|
|
5026
|
+
}
|
|
4790
5027
|
}
|
|
5028
|
+
;
|
|
5029
|
+
break;
|
|
5030
|
+
}
|
|
5031
|
+
default: {
|
|
5032
|
+
results2.push(p);
|
|
4791
5033
|
}
|
|
4792
|
-
case "PinProperty":
|
|
4793
|
-
case "BindingRestProperty":
|
|
4794
|
-
default:
|
|
4795
|
-
return p;
|
|
4796
5034
|
}
|
|
4797
|
-
}
|
|
5035
|
+
}
|
|
5036
|
+
;
|
|
5037
|
+
return results2;
|
|
4798
5038
|
}
|
|
4799
5039
|
function nonMatcherBindings(pattern) {
|
|
4800
5040
|
switch (pattern.type) {
|
|
@@ -4804,7 +5044,7 @@ function nonMatcherBindings(pattern) {
|
|
|
4804
5044
|
return makeNode({
|
|
4805
5045
|
...pattern,
|
|
4806
5046
|
elements,
|
|
4807
|
-
children: pattern.children.map(($
|
|
5047
|
+
children: pattern.children.map(($10) => $10 === pattern.elements ? elements : $10)
|
|
4808
5048
|
});
|
|
4809
5049
|
}
|
|
4810
5050
|
case "ObjectBindingPattern": {
|
|
@@ -4812,7 +5052,7 @@ function nonMatcherBindings(pattern) {
|
|
|
4812
5052
|
return makeNode({
|
|
4813
5053
|
...pattern,
|
|
4814
5054
|
properties,
|
|
4815
|
-
children: pattern.children.map(($
|
|
5055
|
+
children: pattern.children.map(($11) => $11 === pattern.properties ? properties : $11)
|
|
4816
5056
|
});
|
|
4817
5057
|
}
|
|
4818
5058
|
default: {
|
|
@@ -4830,8 +5070,8 @@ function aggregateDuplicateBindings(bindings) {
|
|
|
4830
5070
|
);
|
|
4831
5071
|
const declarations = [];
|
|
4832
5072
|
const propsGroupedByName = /* @__PURE__ */ new Map();
|
|
4833
|
-
for (let
|
|
4834
|
-
const p = props[
|
|
5073
|
+
for (let i8 = 0, len7 = props.length; i8 < len7; i8++) {
|
|
5074
|
+
const p = props[i8];
|
|
4835
5075
|
const { name, value } = p;
|
|
4836
5076
|
let m1;
|
|
4837
5077
|
if (m1 = value?.type, m1 === "ArrayBindingPattern" || m1 === "ObjectBindingPattern") {
|
|
@@ -4856,8 +5096,8 @@ function aggregateDuplicateBindings(bindings) {
|
|
|
4856
5096
|
pos: 0,
|
|
4857
5097
|
input: key
|
|
4858
5098
|
})) {
|
|
4859
|
-
for (let
|
|
4860
|
-
const p = shared[
|
|
5099
|
+
for (let i9 = 0, len8 = shared.length; i9 < len8; i9++) {
|
|
5100
|
+
const p = shared[i9];
|
|
4861
5101
|
aliasBinding(p, makeRef(`_${key}`, key));
|
|
4862
5102
|
}
|
|
4863
5103
|
return;
|
|
@@ -4946,18 +5186,47 @@ function processDeclarations(statements) {
|
|
|
4946
5186
|
for (let ref1 = gatherRecursiveAll(statements, ($) => $.type === "Declaration"), i1 = 0, len1 = ref1.length; i1 < len1; i1++) {
|
|
4947
5187
|
const declaration = ref1[i1];
|
|
4948
5188
|
const { bindings } = declaration;
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
5189
|
+
if (!(bindings != null)) {
|
|
5190
|
+
continue;
|
|
5191
|
+
}
|
|
5192
|
+
for (let i2 = 0, len22 = bindings.length; i2 < len22; i2++) {
|
|
5193
|
+
const binding = bindings[i2];
|
|
5194
|
+
let { typeSuffix, initializer } = binding;
|
|
5195
|
+
if (typeSuffix && typeSuffix.optional) {
|
|
5196
|
+
if (initializer && !typeSuffix.t) {
|
|
5197
|
+
const expression = trimFirstSpace(initializer.expression);
|
|
5198
|
+
let m;
|
|
5199
|
+
if (m = expression.type, m === "Identifier" || m === "MemberExpression") {
|
|
5200
|
+
typeSuffix.children.push(": ", typeSuffix.t = {
|
|
5201
|
+
type: "TypeTypeof",
|
|
5202
|
+
children: ["typeof ", expression],
|
|
5203
|
+
expression
|
|
5204
|
+
});
|
|
5205
|
+
} else if (expression.type === "Literal" || expression.type === "RegularExpressionLiteral" || expression.type === "TemplateLiteral") {
|
|
5206
|
+
typeSuffix.children.push(": ", typeSuffix.t = literalType(expression));
|
|
5207
|
+
} else {
|
|
5208
|
+
spliceChild(binding, typeSuffix, 1, {
|
|
5209
|
+
type: "Error",
|
|
5210
|
+
message: `Optional type can only be inferred from literals or member expressions, not ${expression.type}`
|
|
5211
|
+
});
|
|
5212
|
+
continue;
|
|
5213
|
+
}
|
|
5214
|
+
}
|
|
5215
|
+
if (typeSuffix.t) {
|
|
5216
|
+
convertOptionalType(typeSuffix);
|
|
5217
|
+
} else {
|
|
5218
|
+
spliceChild(binding, typeSuffix, 1);
|
|
5219
|
+
binding.children.push(initializer = binding.initializer = {
|
|
5220
|
+
type: "Initializer",
|
|
5221
|
+
expression: "undefined",
|
|
5222
|
+
children: [" = ", "undefined"]
|
|
5223
|
+
});
|
|
5224
|
+
}
|
|
4953
5225
|
}
|
|
4954
|
-
const { initializer } = binding;
|
|
4955
5226
|
if (initializer) {
|
|
4956
|
-
|
|
5227
|
+
prependStatementExpressionBlock(initializer, declaration);
|
|
4957
5228
|
}
|
|
4958
|
-
|
|
4959
|
-
return;
|
|
4960
|
-
});
|
|
5229
|
+
}
|
|
4961
5230
|
}
|
|
4962
5231
|
}
|
|
4963
5232
|
function prependStatementExpressionBlock(initializer, statement) {
|
|
@@ -4967,7 +5236,7 @@ function prependStatementExpressionBlock(initializer, statement) {
|
|
|
4967
5236
|
ws = exp[0];
|
|
4968
5237
|
exp = exp[1];
|
|
4969
5238
|
}
|
|
4970
|
-
if (!(exp
|
|
5239
|
+
if (!(typeof exp === "object" && exp != null && "type" in exp && exp.type === "StatementExpression" || typeof exp === "object" && exp != null && "type" in exp && exp.type === "SpreadElement" && "expression" in exp && typeof exp.expression === "object" && exp.expression != null && "type" in exp.expression && exp.expression.type === "StatementExpression")) {
|
|
4971
5240
|
return;
|
|
4972
5241
|
}
|
|
4973
5242
|
const pre = [];
|
|
@@ -5120,16 +5389,16 @@ function processDeclarationConditionStatement(s) {
|
|
|
5120
5389
|
if (conditions.length) {
|
|
5121
5390
|
let children = condition.children;
|
|
5122
5391
|
if (s.negated) {
|
|
5123
|
-
let
|
|
5124
|
-
if (!(
|
|
5392
|
+
let m1;
|
|
5393
|
+
if (!(m1 = condition.expression, typeof m1 === "object" && m1 != null && "type" in m1 && m1.type === "UnaryExpression" && "children" in m1 && Array.isArray(m1.children) && len2(m1.children, 2) && Array.isArray(m1.children[0]) && len2(m1.children[0], 1) && m1.children[0][0] === "!" && typeof m1.children[1] === "object" && m1.children[1] != null && "type" in m1.children[1] && m1.children[1].type === "ParenthesizedExpression")) {
|
|
5125
5394
|
throw new Error("Unsupported negated condition");
|
|
5126
5395
|
}
|
|
5127
5396
|
;
|
|
5128
5397
|
({ children } = condition.expression.children[1]);
|
|
5129
5398
|
}
|
|
5130
5399
|
children.unshift("(");
|
|
5131
|
-
for (let
|
|
5132
|
-
const c = conditions[
|
|
5400
|
+
for (let i3 = 0, len3 = conditions.length; i3 < len3; i3++) {
|
|
5401
|
+
const c = conditions[i3];
|
|
5133
5402
|
children.push(" && ", c);
|
|
5134
5403
|
}
|
|
5135
5404
|
children.push(")");
|
|
@@ -5250,7 +5519,8 @@ function dynamizeFromClause(from) {
|
|
|
5250
5519
|
if (ref3 = from[from.length - 1]?.assertion) {
|
|
5251
5520
|
const assert2 = ref3;
|
|
5252
5521
|
let ref4;
|
|
5253
|
-
ref4 = from[from.length - 1]
|
|
5522
|
+
ref4 = from[from.length - 1];
|
|
5523
|
+
ref4.children = ref4.children.filter((a2) => a2 !== assert2);
|
|
5254
5524
|
from.push(", {", assert2.keyword, ":", assert2.object, "}");
|
|
5255
5525
|
}
|
|
5256
5526
|
return ["(", ...from, ")"];
|
|
@@ -5804,14 +6074,6 @@ function processRangeExpression(start, ws1, range, end) {
|
|
|
5804
6074
|
;
|
|
5805
6075
|
const abs = ref;
|
|
5806
6076
|
const lengthAdjust = 1 - Number(!range.left.inclusive) - Number(!range.right.inclusive);
|
|
5807
|
-
let ref1;
|
|
5808
|
-
if (lengthAdjust > 0) ref1 = ` + ${lengthAdjust}`;
|
|
5809
|
-
else if (lengthAdjust < 0) ref1 = ` - ${-lengthAdjust}`;
|
|
5810
|
-
else {
|
|
5811
|
-
ref1 = void 0;
|
|
5812
|
-
}
|
|
5813
|
-
;
|
|
5814
|
-
const lengthAdjustExpression = ref1;
|
|
5815
6077
|
let children;
|
|
5816
6078
|
if (typeof start === "object" && start != null && "type" in start && start.type === "Literal" && (typeof end === "object" && end != null && "type" in end && end.type === "Literal")) {
|
|
5817
6079
|
let startValue = literalValue(start);
|
|
@@ -5837,11 +6099,12 @@ function processRangeExpression(start, ws1, range, end) {
|
|
|
5837
6099
|
];
|
|
5838
6100
|
} else {
|
|
5839
6101
|
children = [
|
|
5840
|
-
|
|
5841
|
-
"(
|
|
6102
|
+
getHelperRef(startCode <= endCode ? "stringRange" : "revStringRange"),
|
|
6103
|
+
"(",
|
|
5842
6104
|
startCode.toString(),
|
|
5843
|
-
|
|
5844
|
-
|
|
6105
|
+
", ",
|
|
6106
|
+
length.toString(),
|
|
6107
|
+
")"
|
|
5845
6108
|
];
|
|
5846
6109
|
}
|
|
5847
6110
|
if (range.error != null) {
|
|
@@ -5870,22 +6133,25 @@ function processRangeExpression(start, ws1, range, end) {
|
|
|
5870
6133
|
const sign = range.increasing ? "+" : "-";
|
|
5871
6134
|
end = makeLeftHandSideExpression(end);
|
|
5872
6135
|
children = [
|
|
5873
|
-
|
|
5874
|
-
range.increasing ? [ws2, end, " - s"] : ["s - ", ws2, end],
|
|
5875
|
-
lengthAdjustExpression,
|
|
5876
|
-
"}, (_, i) => s ",
|
|
5877
|
-
sign,
|
|
5878
|
-
" i))",
|
|
6136
|
+
getHelperRef(range.increasing ? "range" : "revRange"),
|
|
5879
6137
|
"(",
|
|
5880
6138
|
range.left.inclusive ? start : [makeLeftHandSideExpression(start), ` ${sign} 1`],
|
|
6139
|
+
",",
|
|
6140
|
+
range.right.inclusive ? [makeLeftHandSideExpression(end), ` ${sign} 1`] : end,
|
|
5881
6141
|
...ws1,
|
|
5882
6142
|
")"
|
|
5883
6143
|
];
|
|
5884
6144
|
} else {
|
|
5885
6145
|
children = [
|
|
5886
|
-
"((s, e) =>
|
|
5887
|
-
|
|
5888
|
-
"
|
|
6146
|
+
"((s, e) => s > e ? ",
|
|
6147
|
+
getHelperRef("revRange"),
|
|
6148
|
+
"(s, e",
|
|
6149
|
+
range.right.inclusive ? " - 1" : void 0,
|
|
6150
|
+
") : ",
|
|
6151
|
+
getHelperRef("range"),
|
|
6152
|
+
"(s, e",
|
|
6153
|
+
range.right.inclusive ? " + 1" : void 0,
|
|
6154
|
+
"))",
|
|
5889
6155
|
"(",
|
|
5890
6156
|
start,
|
|
5891
6157
|
...ws1,
|
|
@@ -5926,25 +6192,25 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
5926
6192
|
asc = false;
|
|
5927
6193
|
}
|
|
5928
6194
|
}
|
|
5929
|
-
let
|
|
6195
|
+
let ref1;
|
|
5930
6196
|
if (stepExp?.type === "Literal") {
|
|
5931
6197
|
try {
|
|
5932
|
-
|
|
6198
|
+
ref1 = literalValue(stepExp);
|
|
5933
6199
|
} catch (e) {
|
|
5934
|
-
|
|
6200
|
+
ref1 = void 0;
|
|
5935
6201
|
}
|
|
5936
6202
|
} else {
|
|
5937
|
-
|
|
6203
|
+
ref1 = void 0;
|
|
5938
6204
|
}
|
|
5939
6205
|
;
|
|
5940
|
-
const stepValue =
|
|
6206
|
+
const stepValue = ref1;
|
|
5941
6207
|
if (typeof stepValue === "number") {
|
|
5942
6208
|
asc = stepValue > 0;
|
|
5943
6209
|
}
|
|
5944
|
-
let
|
|
5945
|
-
if (stepRef)
|
|
5946
|
-
else
|
|
5947
|
-
let startRef =
|
|
6210
|
+
let ref2;
|
|
6211
|
+
if (stepRef) ref2 = start;
|
|
6212
|
+
else ref2 = maybeRef(start, "start");
|
|
6213
|
+
let startRef = ref2;
|
|
5948
6214
|
let endRef = maybeRef(end, "end");
|
|
5949
6215
|
const startRefDec = startRef !== start ? [startRef, " = ", start, ", "] : [];
|
|
5950
6216
|
const endRefDec = endRef !== end ? [endRef, " = ", end, ", "] : [];
|
|
@@ -5956,8 +6222,8 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
5956
6222
|
}
|
|
5957
6223
|
if (start?.type === "Literal" && "Literal" === end?.type) {
|
|
5958
6224
|
asc = literalValue(start) <= literalValue(end);
|
|
5959
|
-
let
|
|
5960
|
-
if ("StringLiteral" === (
|
|
6225
|
+
let ref3;
|
|
6226
|
+
if ("StringLiteral" === (ref3 = start.subtype) && ref3 === end.subtype) {
|
|
5961
6227
|
const startChar = literalValue(start).charCodeAt(0).toString();
|
|
5962
6228
|
startRef = {
|
|
5963
6229
|
type: "Literal",
|
|
@@ -6013,8 +6279,8 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
6013
6279
|
}
|
|
6014
6280
|
function processForInOf($0) {
|
|
6015
6281
|
let [awaits, eachOwn, open, declaration, declaration2, ws, inOf, exp, step, close] = $0;
|
|
6016
|
-
for (let
|
|
6017
|
-
const decl =
|
|
6282
|
+
for (let ref4 = [declaration, declaration2?.[declaration2.length - 1]], i1 = 0, len3 = ref4.length; i1 < len3; i1++) {
|
|
6283
|
+
const decl = ref4[i1];
|
|
6018
6284
|
if (!(decl != null)) {
|
|
6019
6285
|
continue;
|
|
6020
6286
|
}
|
|
@@ -6063,6 +6329,7 @@ function processForInOf($0) {
|
|
|
6063
6329
|
names: assignmentNames,
|
|
6064
6330
|
implicitLift: true
|
|
6065
6331
|
}, ";"]);
|
|
6332
|
+
const eachDeclaration = declaration;
|
|
6066
6333
|
declaration = {
|
|
6067
6334
|
type: "Declaration",
|
|
6068
6335
|
children: ["let ", ...expRefDec, counterRef, " = 0, ", lenRef, " = ", trimFirstSpace(expRef2), ".length"],
|
|
@@ -6070,7 +6337,7 @@ function processForInOf($0) {
|
|
|
6070
6337
|
};
|
|
6071
6338
|
const condition = [counterRef, " < ", lenRef, "; "];
|
|
6072
6339
|
const children = [open, declaration, "; ", condition, counterRef, increment, close];
|
|
6073
|
-
return { declaration, children, blockPrefix };
|
|
6340
|
+
return { declaration, eachDeclaration, children, blockPrefix };
|
|
6074
6341
|
} else {
|
|
6075
6342
|
eachOwnError = {
|
|
6076
6343
|
type: "Error",
|
|
@@ -6284,12 +6551,10 @@ function createVarDecs(block, scopes, pushVar) {
|
|
|
6284
6551
|
}
|
|
6285
6552
|
return assignmentStatements2;
|
|
6286
6553
|
}
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
};
|
|
6292
|
-
}
|
|
6554
|
+
pushVar ??= (name) => {
|
|
6555
|
+
varIds.push(name);
|
|
6556
|
+
return decs.add(name);
|
|
6557
|
+
};
|
|
6293
6558
|
const { expressions: statements } = block;
|
|
6294
6559
|
const decs = findDecs(statements);
|
|
6295
6560
|
scopes.push(decs);
|
|
@@ -7388,7 +7653,7 @@ function processAssignments(statements) {
|
|
|
7388
7653
|
let { lhs: $1, expression: $2 } = exp, tail = [], len3 = $1.length;
|
|
7389
7654
|
let block;
|
|
7390
7655
|
let ref12;
|
|
7391
|
-
if (exp
|
|
7656
|
+
if (blockContainingStatement(exp) && !(ref12 = $1[$1.length - 1])?.[ref12.length - 1]?.special) {
|
|
7392
7657
|
block = makeBlockFragment();
|
|
7393
7658
|
let ref13;
|
|
7394
7659
|
if (ref13 = prependStatementExpressionBlock(
|
|
@@ -7889,6 +8154,91 @@ function processBreaksContinues(statements) {
|
|
|
7889
8154
|
delete label.special;
|
|
7890
8155
|
}
|
|
7891
8156
|
}
|
|
8157
|
+
function processCoffeeClasses(statements) {
|
|
8158
|
+
for (let ref21 = gatherRecursiveAll(statements, ($13) => $13.type === "ClassExpression"), i11 = 0, len9 = ref21.length; i11 < len9; i11++) {
|
|
8159
|
+
const ce = ref21[i11];
|
|
8160
|
+
const { expressions } = ce.body;
|
|
8161
|
+
const indent = expressions[0]?.[0] ?? "\n";
|
|
8162
|
+
const autoBinds = expressions.filter(($14) => $14[1]?.autoBind);
|
|
8163
|
+
if (autoBinds.length) {
|
|
8164
|
+
let construct;
|
|
8165
|
+
for (const [, c] of expressions) {
|
|
8166
|
+
if (typeof c === "object" && c != null && "type" in c && c.type === "MethodDefinition" && "name" in c && c.name === "constructor" && c.block) {
|
|
8167
|
+
construct = c;
|
|
8168
|
+
break;
|
|
8169
|
+
}
|
|
8170
|
+
}
|
|
8171
|
+
if (!construct) {
|
|
8172
|
+
const parametersList = [];
|
|
8173
|
+
const parameters = {
|
|
8174
|
+
type: "Parameters",
|
|
8175
|
+
children: [parametersList],
|
|
8176
|
+
parameters: parametersList,
|
|
8177
|
+
names: []
|
|
8178
|
+
};
|
|
8179
|
+
const signature = {
|
|
8180
|
+
type: "MethodSignature",
|
|
8181
|
+
children: ["constructor(", parameters, ")"],
|
|
8182
|
+
parameters,
|
|
8183
|
+
modifier: {},
|
|
8184
|
+
returnType: void 0
|
|
8185
|
+
};
|
|
8186
|
+
const block = makeEmptyBlock();
|
|
8187
|
+
construct = {
|
|
8188
|
+
...signature,
|
|
8189
|
+
type: "MethodDefinition",
|
|
8190
|
+
name: "constructor",
|
|
8191
|
+
block,
|
|
8192
|
+
signature,
|
|
8193
|
+
children: [...signature.children, block]
|
|
8194
|
+
};
|
|
8195
|
+
expressions.unshift([indent, construct]);
|
|
8196
|
+
}
|
|
8197
|
+
const index = findSuperCall(construct.block);
|
|
8198
|
+
construct.block.expressions.splice(
|
|
8199
|
+
index + 1,
|
|
8200
|
+
0,
|
|
8201
|
+
...(() => {
|
|
8202
|
+
const results3 = [];
|
|
8203
|
+
for (let i12 = 0, len10 = autoBinds.length; i12 < len10; i12++) {
|
|
8204
|
+
const [, a] = autoBinds[i12];
|
|
8205
|
+
results3.push([indent, ["this.", a.name, " = this.", a.name, ".bind(this)"], ";"]);
|
|
8206
|
+
}
|
|
8207
|
+
return results3;
|
|
8208
|
+
})()
|
|
8209
|
+
);
|
|
8210
|
+
}
|
|
8211
|
+
const privates = expressions.filter(($15) => $15[1]?.type === "CoffeeClassPrivate");
|
|
8212
|
+
if (!privates.length) {
|
|
8213
|
+
continue;
|
|
8214
|
+
}
|
|
8215
|
+
const { parent } = ce;
|
|
8216
|
+
for (let i13 = expressions.length + -1; i13 >= 0; --i13) {
|
|
8217
|
+
const i = i13;
|
|
8218
|
+
if (expressions[i][1]?.type === "CoffeeClassPrivate") {
|
|
8219
|
+
expressions.splice(i, 1);
|
|
8220
|
+
}
|
|
8221
|
+
}
|
|
8222
|
+
let wrapped = wrapIIFE([
|
|
8223
|
+
...privates,
|
|
8224
|
+
[indent, wrapWithReturn(ce)]
|
|
8225
|
+
]);
|
|
8226
|
+
if (ce && typeof ce === "object" && "binding" in ce) {
|
|
8227
|
+
let { binding } = ce;
|
|
8228
|
+
binding = trimFirstSpace(binding);
|
|
8229
|
+
wrapped = makeNode({
|
|
8230
|
+
type: "AssignmentExpression",
|
|
8231
|
+
children: [binding, " = ", wrapped],
|
|
8232
|
+
lhs: binding,
|
|
8233
|
+
// TODO: incorrect shape
|
|
8234
|
+
assigned: binding,
|
|
8235
|
+
expression: wrapped,
|
|
8236
|
+
names: [ce.name]
|
|
8237
|
+
});
|
|
8238
|
+
}
|
|
8239
|
+
replaceNode(ce, wrapped, parent);
|
|
8240
|
+
}
|
|
8241
|
+
}
|
|
7892
8242
|
function processProgram(root) {
|
|
7893
8243
|
const state2 = getState();
|
|
7894
8244
|
const config2 = getConfig();
|
|
@@ -7899,15 +8249,8 @@ function processProgram(root) {
|
|
|
7899
8249
|
assert.equal(state2.forbidNewlineBinaryOp.length, 1, "forbidNewlineBinaryOp");
|
|
7900
8250
|
assert.equal(state2.forbidTrailingMemberProperty.length, 1, "forbidTrailingMemberProperty");
|
|
7901
8251
|
assert.equal(state2.JSXTagStack.length, 1, "JSXTagStack");
|
|
7902
|
-
let rootIIFE;
|
|
7903
|
-
if (config2.iife || config2.repl) {
|
|
7904
|
-
rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
|
|
7905
|
-
const newExpressions = [["", rootIIFE]];
|
|
7906
|
-
root.children = root.children.map(($13) => $13 === root.expressions ? newExpressions : $13);
|
|
7907
|
-
root.expressions = newExpressions;
|
|
7908
|
-
}
|
|
7909
8252
|
addParentPointers(root);
|
|
7910
|
-
|
|
8253
|
+
let { expressions: statements } = root;
|
|
7911
8254
|
processPlaceholders(statements);
|
|
7912
8255
|
processNegativeIndexAccess(statements);
|
|
7913
8256
|
processTypes(statements);
|
|
@@ -7920,9 +8263,25 @@ function processProgram(root) {
|
|
|
7920
8263
|
processIterationExpressions(statements);
|
|
7921
8264
|
processFinallyClauses(statements);
|
|
7922
8265
|
processBreaksContinues(statements);
|
|
8266
|
+
root.topLevelAwait = hasAwait(statements);
|
|
8267
|
+
root.topLevelYield = hasYield(statements);
|
|
8268
|
+
let rootIIFE;
|
|
8269
|
+
if (config2.iife || config2.repl) {
|
|
8270
|
+
rootIIFE = wrapIIFE(
|
|
8271
|
+
root.expressions,
|
|
8272
|
+
root.topLevelAwait,
|
|
8273
|
+
root.topLevelYield ? "*" : void 0
|
|
8274
|
+
);
|
|
8275
|
+
statements = [["", rootIIFE]];
|
|
8276
|
+
root.children = root.children.map(($16) => $16 === root.expressions ? statements : $16);
|
|
8277
|
+
root.expressions = statements;
|
|
8278
|
+
}
|
|
7923
8279
|
hoistRefDecs(statements);
|
|
7924
8280
|
processFunctions(statements, config2);
|
|
7925
|
-
|
|
8281
|
+
if (config2.coffeeClasses) {
|
|
8282
|
+
processCoffeeClasses(statements);
|
|
8283
|
+
}
|
|
8284
|
+
statements.unshift(...extractPreludeFor(statements));
|
|
7926
8285
|
if (config2.autoLet) {
|
|
7927
8286
|
createConstLetDecs(statements, [], "let");
|
|
7928
8287
|
} else if (config2.autoConst) {
|
|
@@ -7945,10 +8304,10 @@ async function processProgramAsync(root) {
|
|
|
7945
8304
|
await processComptime(statements);
|
|
7946
8305
|
}
|
|
7947
8306
|
function processRepl(root, rootIIFE) {
|
|
7948
|
-
const topBlock = gatherRecursive(rootIIFE, ($
|
|
8307
|
+
const topBlock = gatherRecursive(rootIIFE, ($17) => $17.type === "BlockStatement")[0];
|
|
7949
8308
|
let i = 0;
|
|
7950
|
-
for (let
|
|
7951
|
-
const decl =
|
|
8309
|
+
for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($18) => $18.type === "Declaration"), i14 = 0, len11 = ref22.length; i14 < len11; i14++) {
|
|
8310
|
+
const decl = ref22[i14];
|
|
7952
8311
|
if (!decl.names?.length) {
|
|
7953
8312
|
continue;
|
|
7954
8313
|
}
|
|
@@ -7961,8 +8320,8 @@ function processRepl(root, rootIIFE) {
|
|
|
7961
8320
|
root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]);
|
|
7962
8321
|
}
|
|
7963
8322
|
}
|
|
7964
|
-
for (let
|
|
7965
|
-
const func =
|
|
8323
|
+
for (let ref23 = gatherRecursive(topBlock, ($19) => $19.type === "FunctionExpression"), i15 = 0, len12 = ref23.length; i15 < len12; i15++) {
|
|
8324
|
+
const func = ref23[i15];
|
|
7966
8325
|
if (func.name && func.parent?.type === "BlockStatement") {
|
|
7967
8326
|
if (func.parent === topBlock) {
|
|
7968
8327
|
replaceNode(func, void 0);
|
|
@@ -7974,8 +8333,8 @@ function processRepl(root, rootIIFE) {
|
|
|
7974
8333
|
}
|
|
7975
8334
|
}
|
|
7976
8335
|
}
|
|
7977
|
-
for (let
|
|
7978
|
-
const classExp =
|
|
8336
|
+
for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($20) => $20.type === "ClassExpression"), i16 = 0, len13 = ref24.length; i16 < len13; i16++) {
|
|
8337
|
+
const classExp = ref24[i16];
|
|
7979
8338
|
let m8;
|
|
7980
8339
|
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)) {
|
|
7981
8340
|
classExp.children.unshift(classExp.name, "=");
|
|
@@ -7984,7 +8343,7 @@ function processRepl(root, rootIIFE) {
|
|
|
7984
8343
|
}
|
|
7985
8344
|
}
|
|
7986
8345
|
function populateRefs(statements) {
|
|
7987
|
-
const refNodes = gatherRecursive(statements, ($
|
|
8346
|
+
const refNodes = gatherRecursive(statements, ($21) => $21.type === "Ref");
|
|
7988
8347
|
if (refNodes.length) {
|
|
7989
8348
|
const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
|
|
7990
8349
|
const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
|
|
@@ -8006,8 +8365,8 @@ function populateRefs(statements) {
|
|
|
8006
8365
|
function processPlaceholders(statements) {
|
|
8007
8366
|
const placeholderMap = /* @__PURE__ */ new Map();
|
|
8008
8367
|
const liftedIfs = /* @__PURE__ */ new Set();
|
|
8009
|
-
for (let
|
|
8010
|
-
const exp =
|
|
8368
|
+
for (let ref25 = gatherRecursiveAll(statements, ($22) => $22.type === "Placeholder"), i17 = 0, len14 = ref25.length; i17 < len14; i17++) {
|
|
8369
|
+
const exp = ref25[i17];
|
|
8011
8370
|
let ancestor;
|
|
8012
8371
|
if (exp.subtype === ".") {
|
|
8013
8372
|
({ ancestor } = findAncestor(
|
|
@@ -8116,11 +8475,11 @@ function processPlaceholders(statements) {
|
|
|
8116
8475
|
for (const [ancestor, placeholders] of placeholderMap) {
|
|
8117
8476
|
let ref = makeRef("$");
|
|
8118
8477
|
let typeSuffix;
|
|
8119
|
-
for (let
|
|
8120
|
-
const placeholder = placeholders[
|
|
8478
|
+
for (let i18 = 0, len15 = placeholders.length; i18 < len15; i18++) {
|
|
8479
|
+
const placeholder = placeholders[i18];
|
|
8121
8480
|
typeSuffix ??= placeholder.typeSuffix;
|
|
8122
|
-
let
|
|
8123
|
-
(
|
|
8481
|
+
let ref26;
|
|
8482
|
+
(ref26 = placeholder.children)[ref26.length - 1] = ref;
|
|
8124
8483
|
}
|
|
8125
8484
|
const { parent } = ancestor;
|
|
8126
8485
|
const body = maybeUnwrap(ancestor);
|
|
@@ -8141,16 +8500,16 @@ function processPlaceholders(statements) {
|
|
|
8141
8500
|
}
|
|
8142
8501
|
case "PipelineExpression": {
|
|
8143
8502
|
const i = findChildIndex(parent, ancestor);
|
|
8144
|
-
let
|
|
8503
|
+
let ref27;
|
|
8145
8504
|
if (i === 1) {
|
|
8146
|
-
|
|
8505
|
+
ref27 = ancestor === parent.children[i];
|
|
8147
8506
|
} else if (i === 2) {
|
|
8148
|
-
|
|
8507
|
+
ref27 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
|
|
8149
8508
|
} else {
|
|
8150
|
-
|
|
8509
|
+
ref27 = void 0;
|
|
8151
8510
|
}
|
|
8152
8511
|
;
|
|
8153
|
-
outer =
|
|
8512
|
+
outer = ref27;
|
|
8154
8513
|
break;
|
|
8155
8514
|
}
|
|
8156
8515
|
case "AssignmentExpression":
|
|
@@ -8165,9 +8524,9 @@ function processPlaceholders(statements) {
|
|
|
8165
8524
|
fnExp = makeLeftHandSideExpression(fnExp);
|
|
8166
8525
|
}
|
|
8167
8526
|
replaceNode(ancestor, fnExp, parent);
|
|
8168
|
-
let
|
|
8169
|
-
if (
|
|
8170
|
-
const ws =
|
|
8527
|
+
let ref28;
|
|
8528
|
+
if (ref28 = getTrimmingSpace(body)) {
|
|
8529
|
+
const ws = ref28;
|
|
8171
8530
|
inplaceInsertTrimmingSpace(body, "");
|
|
8172
8531
|
inplacePrepend(ws, fnExp);
|
|
8173
8532
|
}
|
|
@@ -8211,8 +8570,8 @@ function reorderBindingRestProperty(props) {
|
|
|
8211
8570
|
}
|
|
8212
8571
|
];
|
|
8213
8572
|
}
|
|
8214
|
-
let
|
|
8215
|
-
if (Array.isArray(rest.delim) && (
|
|
8573
|
+
let ref29;
|
|
8574
|
+
if (Array.isArray(rest.delim) && (ref29 = rest.delim)[ref29.length - 1]?.token === ",") {
|
|
8216
8575
|
rest.delim = rest.delim.slice(0, -1);
|
|
8217
8576
|
rest.children = [...rest.children.slice(0, -1), rest.delim];
|
|
8218
8577
|
}
|
|
@@ -8303,6 +8662,8 @@ var grammar = {
|
|
|
8303
8662
|
ExpressionizedStatement,
|
|
8304
8663
|
StatementExpression,
|
|
8305
8664
|
CommaExpression,
|
|
8665
|
+
CommaExpressionSpread,
|
|
8666
|
+
AssignmentExpressionSpread,
|
|
8306
8667
|
Arguments,
|
|
8307
8668
|
ImplicitArguments,
|
|
8308
8669
|
ExplicitArguments,
|
|
@@ -8482,6 +8843,7 @@ var grammar = {
|
|
|
8482
8843
|
BareNestedBlock,
|
|
8483
8844
|
BareBlock,
|
|
8484
8845
|
ThenClause,
|
|
8846
|
+
ThenBlock,
|
|
8485
8847
|
BracedThenClause,
|
|
8486
8848
|
BracedOrEmptyBlock,
|
|
8487
8849
|
NoCommaBracedOrEmptyBlock,
|
|
@@ -8591,6 +8953,7 @@ var grammar = {
|
|
|
8591
8953
|
PostfixStatement,
|
|
8592
8954
|
_PostfixStatement,
|
|
8593
8955
|
Statement,
|
|
8956
|
+
IterationActualStatement,
|
|
8594
8957
|
ShouldExpressionize,
|
|
8595
8958
|
NoCommaStatement,
|
|
8596
8959
|
EmptyStatement,
|
|
@@ -9246,130 +9609,132 @@ var $L119 = (0, import_lib2.$L)(";");
|
|
|
9246
9609
|
var $L120 = (0, import_lib2.$L)("some");
|
|
9247
9610
|
var $L121 = (0, import_lib2.$L)("every");
|
|
9248
9611
|
var $L122 = (0, import_lib2.$L)("count");
|
|
9249
|
-
var $L123 = (0, import_lib2.$L)("
|
|
9250
|
-
var $L124 = (0, import_lib2.$L)("
|
|
9251
|
-
var $L125 = (0, import_lib2.$L)("
|
|
9252
|
-
var $L126 = (0, import_lib2.$L)("
|
|
9253
|
-
var $L127 = (0, import_lib2.$L)("
|
|
9254
|
-
var $L128 = (0, import_lib2.$L)("
|
|
9255
|
-
var $L129 = (0, import_lib2.$L)("
|
|
9256
|
-
var $L130 = (0, import_lib2.$L)("
|
|
9257
|
-
var $L131 = (0, import_lib2.$L)("
|
|
9258
|
-
var $L132 = (0, import_lib2.$L)("
|
|
9259
|
-
var $L133 = (0, import_lib2.$L)("
|
|
9260
|
-
var $L134 = (0, import_lib2.$L)("
|
|
9261
|
-
var $L135 = (0, import_lib2.$L)("
|
|
9262
|
-
var $L136 = (0, import_lib2.$L)("
|
|
9263
|
-
var $L137 = (0, import_lib2.$L)("
|
|
9264
|
-
var $L138 = (0, import_lib2.$L)("
|
|
9265
|
-
var $L139 = (0, import_lib2.$L)("
|
|
9266
|
-
var $L140 = (0, import_lib2.$L)("
|
|
9267
|
-
var $L141 = (0, import_lib2.$L)("
|
|
9268
|
-
var $L142 = (0, import_lib2.$L)("
|
|
9269
|
-
var $L143 = (0, import_lib2.$L)("
|
|
9270
|
-
var $L144 = (0, import_lib2.$L)("
|
|
9271
|
-
var $L145 = (0, import_lib2.$L)("
|
|
9272
|
-
var $L146 = (0, import_lib2.$L)("
|
|
9273
|
-
var $L147 = (0, import_lib2.$L)("
|
|
9274
|
-
var $L148 = (0, import_lib2.$L)("
|
|
9275
|
-
var $L149 = (0, import_lib2.$L)("
|
|
9276
|
-
var $L150 = (0, import_lib2.$L)("
|
|
9277
|
-
var $L151 = (0, import_lib2.$L)("
|
|
9278
|
-
var $L152 = (0, import_lib2.$L)("
|
|
9279
|
-
var $L153 = (0, import_lib2.$L)("
|
|
9280
|
-
var $L154 = (0, import_lib2.$L)("
|
|
9281
|
-
var $L155 = (0, import_lib2.$L)("
|
|
9282
|
-
var $L156 = (0, import_lib2.$L)("
|
|
9283
|
-
var $L157 = (0, import_lib2.$L)("
|
|
9284
|
-
var $L158 = (0, import_lib2.$L)("
|
|
9285
|
-
var $L159 = (0, import_lib2.$L)("
|
|
9286
|
-
var $L160 = (0, import_lib2.$L)("
|
|
9287
|
-
var $L161 = (0, import_lib2.$L)("
|
|
9288
|
-
var $L162 = (0, import_lib2.$L)("\
|
|
9289
|
-
var $L163 = (0, import_lib2.$L)("
|
|
9290
|
-
var $L164 = (0, import_lib2.$L)(
|
|
9291
|
-
var $L165 = (0, import_lib2.$L)("
|
|
9292
|
-
var $L166 = (0, import_lib2.$L)("
|
|
9293
|
-
var $L167 = (0, import_lib2.$L)("
|
|
9294
|
-
var $L168 = (0, import_lib2.$L)("
|
|
9295
|
-
var $L169 = (0, import_lib2.$L)("
|
|
9296
|
-
var $L170 = (0, import_lib2.$L)("
|
|
9297
|
-
var $L171 = (0, import_lib2.$L)("
|
|
9298
|
-
var $L172 = (0, import_lib2.$L)("
|
|
9299
|
-
var $L173 = (0, import_lib2.$L)("
|
|
9300
|
-
var $L174 = (0, import_lib2.$L)("
|
|
9301
|
-
var $L175 = (0, import_lib2.$L)("
|
|
9302
|
-
var $L176 = (0, import_lib2.$L)("
|
|
9303
|
-
var $L177 = (0, import_lib2.$L)("
|
|
9304
|
-
var $L178 = (0, import_lib2.$L)("
|
|
9305
|
-
var $L179 = (0, import_lib2.$L)("
|
|
9306
|
-
var $L180 = (0, import_lib2.$L)("
|
|
9307
|
-
var $L181 = (0, import_lib2.$L)("
|
|
9308
|
-
var $L182 = (0, import_lib2.$L)("
|
|
9309
|
-
var $L183 = (0, import_lib2.$L)("
|
|
9310
|
-
var $L184 = (0, import_lib2.$L)("
|
|
9311
|
-
var $L185 = (0, import_lib2.$L)("
|
|
9312
|
-
var $L186 = (0, import_lib2.$L)("
|
|
9313
|
-
var $L187 = (0, import_lib2.$L)("
|
|
9314
|
-
var $L188 = (0, import_lib2.$L)("
|
|
9315
|
-
var $L189 = (0, import_lib2.$L)("
|
|
9316
|
-
var $L190 = (0, import_lib2.$L)("
|
|
9317
|
-
var $L191 = (0, import_lib2.$L)("
|
|
9318
|
-
var $L192 = (0, import_lib2.$L)("
|
|
9319
|
-
var $L193 = (0, import_lib2.$L)("
|
|
9320
|
-
var $L194 = (0, import_lib2.$L)("
|
|
9321
|
-
var $L195 = (0, import_lib2.$L)("
|
|
9322
|
-
var $L196 = (0, import_lib2.$L)("
|
|
9323
|
-
var $L197 = (0, import_lib2.$L)("
|
|
9324
|
-
var $L198 = (0, import_lib2.$L)("
|
|
9325
|
-
var $L199 = (0, import_lib2.$L)("
|
|
9326
|
-
var $L200 = (0, import_lib2.$L)("
|
|
9327
|
-
var $L201 = (0, import_lib2.$L)("\u25B7");
|
|
9328
|
-
var $L202 = (0, import_lib2.$L)("
|
|
9329
|
-
var $L203 = (0, import_lib2.$L)("
|
|
9330
|
-
var $L204 = (0, import_lib2.$L)("
|
|
9331
|
-
var $L205 = (0, import_lib2.$L)("
|
|
9332
|
-
var $L206 = (0, import_lib2.$L)("
|
|
9333
|
-
var $L207 = (0, import_lib2.$L)("
|
|
9334
|
-
var $L208 = (0, import_lib2.$L)("
|
|
9335
|
-
var $L209 = (0, import_lib2.$L)("
|
|
9336
|
-
var $L210 = (0, import_lib2.$L)("
|
|
9337
|
-
var $L211 = (0, import_lib2.$L)("
|
|
9338
|
-
var $L212 = (0, import_lib2.$L)("
|
|
9339
|
-
var $L213 = (0, import_lib2.$L)("
|
|
9340
|
-
var $L214 = (0, import_lib2.$L)(
|
|
9341
|
-
var $L215 = (0, import_lib2.$L)("
|
|
9342
|
-
var $L216 = (0, import_lib2.$L)("
|
|
9343
|
-
var $L217 = (0, import_lib2.$L)("
|
|
9344
|
-
var $L218 = (0, import_lib2.$L)("
|
|
9345
|
-
var $L219 = (0, import_lib2.$L)("
|
|
9346
|
-
var $L220 = (0, import_lib2.$L)("
|
|
9347
|
-
var $L221 = (0, import_lib2.$L)("
|
|
9348
|
-
var $L222 = (0, import_lib2.$L)("
|
|
9349
|
-
var $L223 = (0, import_lib2.$L)("
|
|
9350
|
-
var $L224 = (0, import_lib2.$L)("
|
|
9351
|
-
var $L225 = (0, import_lib2.$L)("
|
|
9352
|
-
var $L226 = (0, import_lib2.$L)("
|
|
9353
|
-
var $L227 = (0, import_lib2.$L)("
|
|
9354
|
-
var $L228 = (0, import_lib2.$L)("
|
|
9355
|
-
var $L229 = (0, import_lib2.$L)("
|
|
9356
|
-
var $L230 = (0, import_lib2.$L)("
|
|
9357
|
-
var $L231 = (0, import_lib2.$L)("
|
|
9358
|
-
var $L232 = (0, import_lib2.$L)("
|
|
9359
|
-
var $L233 = (0, import_lib2.$L)("
|
|
9360
|
-
var $L234 = (0, import_lib2.$L)("
|
|
9361
|
-
var $L235 = (0, import_lib2.$L)("
|
|
9362
|
-
var $L236 = (0, import_lib2.$L)("
|
|
9363
|
-
var $L237 = (0, import_lib2.$L)("
|
|
9364
|
-
var $L238 = (0, import_lib2.$L)("
|
|
9365
|
-
var $L239 = (0, import_lib2.$L)("
|
|
9366
|
-
var $L240 = (0, import_lib2.$L)("
|
|
9367
|
-
var $L241 = (0, import_lib2.$L)("
|
|
9368
|
-
var $L242 = (0, import_lib2.$L)("
|
|
9369
|
-
var $L243 = (0, import_lib2.$L)("
|
|
9370
|
-
var $L244 = (0, import_lib2.$L)("
|
|
9371
|
-
var $L245 = (0, import_lib2.$L)("
|
|
9372
|
-
var $L246 = (0, import_lib2.$L)("
|
|
9612
|
+
var $L123 = (0, import_lib2.$L)("first");
|
|
9613
|
+
var $L124 = (0, import_lib2.$L)("sum");
|
|
9614
|
+
var $L125 = (0, import_lib2.$L)("product");
|
|
9615
|
+
var $L126 = (0, import_lib2.$L)("min");
|
|
9616
|
+
var $L127 = (0, import_lib2.$L)("max");
|
|
9617
|
+
var $L128 = (0, import_lib2.$L)("join");
|
|
9618
|
+
var $L129 = (0, import_lib2.$L)("concat");
|
|
9619
|
+
var $L130 = (0, import_lib2.$L)("break");
|
|
9620
|
+
var $L131 = (0, import_lib2.$L)("continue");
|
|
9621
|
+
var $L132 = (0, import_lib2.$L)("debugger");
|
|
9622
|
+
var $L133 = (0, import_lib2.$L)("require");
|
|
9623
|
+
var $L134 = (0, import_lib2.$L)("with");
|
|
9624
|
+
var $L135 = (0, import_lib2.$L)("assert");
|
|
9625
|
+
var $L136 = (0, import_lib2.$L)(":=");
|
|
9626
|
+
var $L137 = (0, import_lib2.$L)("\u2254");
|
|
9627
|
+
var $L138 = (0, import_lib2.$L)(".=");
|
|
9628
|
+
var $L139 = (0, import_lib2.$L)("::=");
|
|
9629
|
+
var $L140 = (0, import_lib2.$L)("/*");
|
|
9630
|
+
var $L141 = (0, import_lib2.$L)("*/");
|
|
9631
|
+
var $L142 = (0, import_lib2.$L)("\\");
|
|
9632
|
+
var $L143 = (0, import_lib2.$L)(")");
|
|
9633
|
+
var $L144 = (0, import_lib2.$L)("abstract");
|
|
9634
|
+
var $L145 = (0, import_lib2.$L)("as");
|
|
9635
|
+
var $L146 = (0, import_lib2.$L)("@");
|
|
9636
|
+
var $L147 = (0, import_lib2.$L)("@@");
|
|
9637
|
+
var $L148 = (0, import_lib2.$L)("async");
|
|
9638
|
+
var $L149 = (0, import_lib2.$L)("await");
|
|
9639
|
+
var $L150 = (0, import_lib2.$L)("`");
|
|
9640
|
+
var $L151 = (0, import_lib2.$L)("by");
|
|
9641
|
+
var $L152 = (0, import_lib2.$L)("case");
|
|
9642
|
+
var $L153 = (0, import_lib2.$L)("catch");
|
|
9643
|
+
var $L154 = (0, import_lib2.$L)("class");
|
|
9644
|
+
var $L155 = (0, import_lib2.$L)("#{");
|
|
9645
|
+
var $L156 = (0, import_lib2.$L)("comptime");
|
|
9646
|
+
var $L157 = (0, import_lib2.$L)("declare");
|
|
9647
|
+
var $L158 = (0, import_lib2.$L)("default");
|
|
9648
|
+
var $L159 = (0, import_lib2.$L)("delete");
|
|
9649
|
+
var $L160 = (0, import_lib2.$L)("do");
|
|
9650
|
+
var $L161 = (0, import_lib2.$L)("..");
|
|
9651
|
+
var $L162 = (0, import_lib2.$L)("\u2025");
|
|
9652
|
+
var $L163 = (0, import_lib2.$L)("...");
|
|
9653
|
+
var $L164 = (0, import_lib2.$L)("\u2026");
|
|
9654
|
+
var $L165 = (0, import_lib2.$L)("::");
|
|
9655
|
+
var $L166 = (0, import_lib2.$L)('"');
|
|
9656
|
+
var $L167 = (0, import_lib2.$L)("each");
|
|
9657
|
+
var $L168 = (0, import_lib2.$L)("else");
|
|
9658
|
+
var $L169 = (0, import_lib2.$L)("!");
|
|
9659
|
+
var $L170 = (0, import_lib2.$L)("export");
|
|
9660
|
+
var $L171 = (0, import_lib2.$L)("extends");
|
|
9661
|
+
var $L172 = (0, import_lib2.$L)("finally");
|
|
9662
|
+
var $L173 = (0, import_lib2.$L)("for");
|
|
9663
|
+
var $L174 = (0, import_lib2.$L)("from");
|
|
9664
|
+
var $L175 = (0, import_lib2.$L)("function");
|
|
9665
|
+
var $L176 = (0, import_lib2.$L)("get");
|
|
9666
|
+
var $L177 = (0, import_lib2.$L)("set");
|
|
9667
|
+
var $L178 = (0, import_lib2.$L)("#");
|
|
9668
|
+
var $L179 = (0, import_lib2.$L)("if");
|
|
9669
|
+
var $L180 = (0, import_lib2.$L)("in");
|
|
9670
|
+
var $L181 = (0, import_lib2.$L)("infer");
|
|
9671
|
+
var $L182 = (0, import_lib2.$L)("let");
|
|
9672
|
+
var $L183 = (0, import_lib2.$L)("const");
|
|
9673
|
+
var $L184 = (0, import_lib2.$L)("is");
|
|
9674
|
+
var $L185 = (0, import_lib2.$L)("var");
|
|
9675
|
+
var $L186 = (0, import_lib2.$L)("like");
|
|
9676
|
+
var $L187 = (0, import_lib2.$L)("loop");
|
|
9677
|
+
var $L188 = (0, import_lib2.$L)("new");
|
|
9678
|
+
var $L189 = (0, import_lib2.$L)("not");
|
|
9679
|
+
var $L190 = (0, import_lib2.$L)("of");
|
|
9680
|
+
var $L191 = (0, import_lib2.$L)("[");
|
|
9681
|
+
var $L192 = (0, import_lib2.$L)("operator");
|
|
9682
|
+
var $L193 = (0, import_lib2.$L)("override");
|
|
9683
|
+
var $L194 = (0, import_lib2.$L)("own");
|
|
9684
|
+
var $L195 = (0, import_lib2.$L)("public");
|
|
9685
|
+
var $L196 = (0, import_lib2.$L)("private");
|
|
9686
|
+
var $L197 = (0, import_lib2.$L)("protected");
|
|
9687
|
+
var $L198 = (0, import_lib2.$L)("||>");
|
|
9688
|
+
var $L199 = (0, import_lib2.$L)("|\u25B7");
|
|
9689
|
+
var $L200 = (0, import_lib2.$L)("|>=");
|
|
9690
|
+
var $L201 = (0, import_lib2.$L)("\u25B7=");
|
|
9691
|
+
var $L202 = (0, import_lib2.$L)("|>");
|
|
9692
|
+
var $L203 = (0, import_lib2.$L)("\u25B7");
|
|
9693
|
+
var $L204 = (0, import_lib2.$L)("readonly");
|
|
9694
|
+
var $L205 = (0, import_lib2.$L)("return");
|
|
9695
|
+
var $L206 = (0, import_lib2.$L)("satisfies");
|
|
9696
|
+
var $L207 = (0, import_lib2.$L)("'");
|
|
9697
|
+
var $L208 = (0, import_lib2.$L)("static");
|
|
9698
|
+
var $L209 = (0, import_lib2.$L)("${");
|
|
9699
|
+
var $L210 = (0, import_lib2.$L)("super");
|
|
9700
|
+
var $L211 = (0, import_lib2.$L)("switch");
|
|
9701
|
+
var $L212 = (0, import_lib2.$L)("target");
|
|
9702
|
+
var $L213 = (0, import_lib2.$L)("then");
|
|
9703
|
+
var $L214 = (0, import_lib2.$L)("this");
|
|
9704
|
+
var $L215 = (0, import_lib2.$L)("throw");
|
|
9705
|
+
var $L216 = (0, import_lib2.$L)('"""');
|
|
9706
|
+
var $L217 = (0, import_lib2.$L)("'''");
|
|
9707
|
+
var $L218 = (0, import_lib2.$L)("///");
|
|
9708
|
+
var $L219 = (0, import_lib2.$L)("```");
|
|
9709
|
+
var $L220 = (0, import_lib2.$L)("try");
|
|
9710
|
+
var $L221 = (0, import_lib2.$L)("typeof");
|
|
9711
|
+
var $L222 = (0, import_lib2.$L)("undefined");
|
|
9712
|
+
var $L223 = (0, import_lib2.$L)("unless");
|
|
9713
|
+
var $L224 = (0, import_lib2.$L)("until");
|
|
9714
|
+
var $L225 = (0, import_lib2.$L)("using");
|
|
9715
|
+
var $L226 = (0, import_lib2.$L)("void");
|
|
9716
|
+
var $L227 = (0, import_lib2.$L)("when");
|
|
9717
|
+
var $L228 = (0, import_lib2.$L)("while");
|
|
9718
|
+
var $L229 = (0, import_lib2.$L)("yield");
|
|
9719
|
+
var $L230 = (0, import_lib2.$L)("/>");
|
|
9720
|
+
var $L231 = (0, import_lib2.$L)("</");
|
|
9721
|
+
var $L232 = (0, import_lib2.$L)("<>");
|
|
9722
|
+
var $L233 = (0, import_lib2.$L)("</>");
|
|
9723
|
+
var $L234 = (0, import_lib2.$L)("<!--");
|
|
9724
|
+
var $L235 = (0, import_lib2.$L)("-->");
|
|
9725
|
+
var $L236 = (0, import_lib2.$L)("type");
|
|
9726
|
+
var $L237 = (0, import_lib2.$L)("enum");
|
|
9727
|
+
var $L238 = (0, import_lib2.$L)("interface");
|
|
9728
|
+
var $L239 = (0, import_lib2.$L)("global");
|
|
9729
|
+
var $L240 = (0, import_lib2.$L)("module");
|
|
9730
|
+
var $L241 = (0, import_lib2.$L)("namespace");
|
|
9731
|
+
var $L242 = (0, import_lib2.$L)("asserts");
|
|
9732
|
+
var $L243 = (0, import_lib2.$L)("keyof");
|
|
9733
|
+
var $L244 = (0, import_lib2.$L)("???");
|
|
9734
|
+
var $L245 = (0, import_lib2.$L)("unique");
|
|
9735
|
+
var $L246 = (0, import_lib2.$L)("symbol");
|
|
9736
|
+
var $L247 = (0, import_lib2.$L)("[]");
|
|
9737
|
+
var $L248 = (0, import_lib2.$L)("civet");
|
|
9373
9738
|
var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
|
|
9374
9739
|
var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
|
|
9375
9740
|
var $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
@@ -9485,8 +9850,7 @@ var Program$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Reset, Init, (0, import
|
|
|
9485
9850
|
expressions: statements,
|
|
9486
9851
|
children: [reset, init, ws1, statements, ws2],
|
|
9487
9852
|
bare: true,
|
|
9488
|
-
root: true
|
|
9489
|
-
topLevelAwait: hasAwait(statements)
|
|
9853
|
+
root: true
|
|
9490
9854
|
};
|
|
9491
9855
|
processProgram(program);
|
|
9492
9856
|
return program;
|
|
@@ -9613,6 +9977,71 @@ var CommaExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(AssignmentExpre
|
|
|
9613
9977
|
function CommaExpression(ctx, state2) {
|
|
9614
9978
|
return (0, import_lib2.$EVENT)(ctx, state2, "CommaExpression", CommaExpression$0);
|
|
9615
9979
|
}
|
|
9980
|
+
var CommaExpressionSpread$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), DotDotDot, (0, import_lib2.$E)(_), IterationActualStatement), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
9981
|
+
var ws = $1;
|
|
9982
|
+
var ws2 = $3;
|
|
9983
|
+
var iteration = $4;
|
|
9984
|
+
if (iteration.subtype === "do" || iteration.subtype === "comptime") return $skip;
|
|
9985
|
+
if (ws2) {
|
|
9986
|
+
if (ws) {
|
|
9987
|
+
ws = [ws, ws2];
|
|
9988
|
+
} else {
|
|
9989
|
+
ws = ws2;
|
|
9990
|
+
}
|
|
9991
|
+
}
|
|
9992
|
+
iteration = { ...iteration, resultsParent: true };
|
|
9993
|
+
return prepend(ws, iteration);
|
|
9994
|
+
});
|
|
9995
|
+
var CommaExpressionSpread$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(AssignmentExpressionSpread, (0, import_lib2.$Q)((0, import_lib2.$S)(CommaDelimiter, AssignmentExpressionSpread))), function($skip, $loc, $0, $1, $2) {
|
|
9996
|
+
if ($2.length == 0) return $1;
|
|
9997
|
+
return $0;
|
|
9998
|
+
});
|
|
9999
|
+
var CommaExpressionSpread$$ = [CommaExpressionSpread$0, CommaExpressionSpread$1];
|
|
10000
|
+
function CommaExpressionSpread(ctx, state2) {
|
|
10001
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "CommaExpressionSpread", CommaExpressionSpread$$);
|
|
10002
|
+
}
|
|
10003
|
+
var AssignmentExpressionSpread$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), DotDotDot, AssignmentExpression), function($skip, $loc, $0, $1, $2, $3) {
|
|
10004
|
+
var expression = $3;
|
|
10005
|
+
return {
|
|
10006
|
+
type: "SpreadElement",
|
|
10007
|
+
children: $0,
|
|
10008
|
+
expression,
|
|
10009
|
+
names: expression.names
|
|
10010
|
+
};
|
|
10011
|
+
});
|
|
10012
|
+
var AssignmentExpressionSpread$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(AssignmentExpression, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$E)(_), DotDotDot))), function($skip, $loc, $0, $1, $2) {
|
|
10013
|
+
var expression = $1;
|
|
10014
|
+
if (!$2) return $1;
|
|
10015
|
+
return {
|
|
10016
|
+
type: "SpreadElement",
|
|
10017
|
+
children: [...$2, $1],
|
|
10018
|
+
expression,
|
|
10019
|
+
names: expression.names
|
|
10020
|
+
};
|
|
10021
|
+
});
|
|
10022
|
+
var AssignmentExpressionSpread$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), DotDotDot, AssignmentExpression), function($skip, $loc, $0, $1, $2, $3) {
|
|
10023
|
+
var expression = $3;
|
|
10024
|
+
return {
|
|
10025
|
+
type: "SpreadElement",
|
|
10026
|
+
children: $0,
|
|
10027
|
+
expression,
|
|
10028
|
+
names: expression.names
|
|
10029
|
+
};
|
|
10030
|
+
});
|
|
10031
|
+
var AssignmentExpressionSpread$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(AssignmentExpression, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$E)(_), DotDotDot))), function($skip, $loc, $0, $1, $2) {
|
|
10032
|
+
var expression = $1;
|
|
10033
|
+
if (!$2) return $1;
|
|
10034
|
+
return {
|
|
10035
|
+
type: "SpreadElement",
|
|
10036
|
+
children: [...$2, $1],
|
|
10037
|
+
expression,
|
|
10038
|
+
names: expression.names
|
|
10039
|
+
};
|
|
10040
|
+
});
|
|
10041
|
+
var AssignmentExpressionSpread$$ = [AssignmentExpressionSpread$0, AssignmentExpressionSpread$1, AssignmentExpressionSpread$2, AssignmentExpressionSpread$3];
|
|
10042
|
+
function AssignmentExpressionSpread(ctx, state2) {
|
|
10043
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "AssignmentExpressionSpread", AssignmentExpressionSpread$$);
|
|
10044
|
+
}
|
|
9616
10045
|
var Arguments$0 = ExplicitArguments;
|
|
9617
10046
|
var Arguments$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidTrailingMemberProperty, (0, import_lib2.$E)(ImplicitArguments), RestoreTrailingMemberProperty), function($skip, $loc, $0, $1, $2, $3) {
|
|
9618
10047
|
var args = $2;
|
|
@@ -10743,8 +11172,7 @@ var FieldDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEn
|
|
|
10743
11172
|
var id = $2;
|
|
10744
11173
|
var exp = $6;
|
|
10745
11174
|
switch (exp.type) {
|
|
10746
|
-
|
|
10747
|
-
case "FunctionExpression":
|
|
11175
|
+
case "FunctionExpression": {
|
|
10748
11176
|
const fnTokenIndex = exp.children.findIndex((c) => c?.token?.startsWith("function"));
|
|
10749
11177
|
const children = exp.children.slice();
|
|
10750
11178
|
if (exp.generator) {
|
|
@@ -10754,8 +11182,29 @@ var FieldDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEn
|
|
|
10754
11182
|
}
|
|
10755
11183
|
return {
|
|
10756
11184
|
...exp,
|
|
11185
|
+
type: "MethodDefinition",
|
|
11186
|
+
name: id.name,
|
|
11187
|
+
signature: { ...exp.signature, id, name: id.name },
|
|
10757
11188
|
children
|
|
10758
11189
|
};
|
|
11190
|
+
}
|
|
11191
|
+
case "ArrowFunction": {
|
|
11192
|
+
const block = { ...exp.block };
|
|
11193
|
+
const children = exp.children.filter((c) => !(Array.isArray(c) && c[c.length - 1]?.token?.includes("=>"))).map((c) => c === exp.block ? block : c);
|
|
11194
|
+
children.unshift(id);
|
|
11195
|
+
exp = {
|
|
11196
|
+
...exp,
|
|
11197
|
+
type: "MethodDefinition",
|
|
11198
|
+
name: id.name,
|
|
11199
|
+
signature: { ...exp.signature, id, name: id.name },
|
|
11200
|
+
block,
|
|
11201
|
+
children,
|
|
11202
|
+
autoBind: true
|
|
11203
|
+
};
|
|
11204
|
+
block.parent = exp;
|
|
11205
|
+
braceBlock(block);
|
|
11206
|
+
return exp;
|
|
11207
|
+
}
|
|
10759
11208
|
default:
|
|
10760
11209
|
return {
|
|
10761
11210
|
type: "FieldDefinition",
|
|
@@ -10765,11 +11214,11 @@ var FieldDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEn
|
|
|
10765
11214
|
}
|
|
10766
11215
|
});
|
|
10767
11216
|
var FieldDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertReadonly, ClassElementName, (0, import_lib2.$E)(TypeSuffix), __, ConstAssignment, MaybeNestedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
10768
|
-
var
|
|
11217
|
+
var readonly = $1;
|
|
10769
11218
|
var id = $2;
|
|
10770
11219
|
var typeSuffix = $3;
|
|
10771
11220
|
var ca = $5;
|
|
10772
|
-
|
|
11221
|
+
readonly.children[0].$loc = {
|
|
10773
11222
|
pos: ca.$loc.pos - 1,
|
|
10774
11223
|
length: ca.$loc.length + 1
|
|
10775
11224
|
};
|
|
@@ -10777,21 +11226,36 @@ var FieldDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertReadonly,
|
|
|
10777
11226
|
type: "FieldDefinition",
|
|
10778
11227
|
id,
|
|
10779
11228
|
typeSuffix,
|
|
10780
|
-
children: $0
|
|
11229
|
+
children: $0,
|
|
11230
|
+
readonly
|
|
11231
|
+
};
|
|
11232
|
+
});
|
|
11233
|
+
var FieldDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEnabled, ActualAssignment), function($skip, $loc, $0, $1, $2) {
|
|
11234
|
+
var assignment = $2;
|
|
11235
|
+
return {
|
|
11236
|
+
type: "CoffeeClassPrivate",
|
|
11237
|
+
children: [assignment],
|
|
11238
|
+
assignment
|
|
10781
11239
|
};
|
|
10782
11240
|
});
|
|
10783
|
-
var FieldDefinition$
|
|
11241
|
+
var FieldDefinition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Abstract, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Readonly, (0, import_lib2.$E)(_))), ClassElementName, (0, import_lib2.$E)(TypeSuffix), (0, import_lib2.$E)(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
11242
|
+
var abstract = $1;
|
|
11243
|
+
var readonly = $2;
|
|
10784
11244
|
var id = $3;
|
|
10785
11245
|
var typeSuffix = $4;
|
|
11246
|
+
var initializer = $5;
|
|
10786
11247
|
return {
|
|
10787
11248
|
type: "FieldDefinition",
|
|
10788
11249
|
children: $0,
|
|
10789
|
-
ts:
|
|
11250
|
+
ts: abstract ? true : void 0,
|
|
10790
11251
|
id,
|
|
10791
|
-
typeSuffix
|
|
11252
|
+
typeSuffix,
|
|
11253
|
+
abstract,
|
|
11254
|
+
readonly,
|
|
11255
|
+
initializer
|
|
10792
11256
|
};
|
|
10793
11257
|
});
|
|
10794
|
-
var FieldDefinition$$ = [FieldDefinition$0, FieldDefinition$1, FieldDefinition$2];
|
|
11258
|
+
var FieldDefinition$$ = [FieldDefinition$0, FieldDefinition$1, FieldDefinition$2, FieldDefinition$3];
|
|
10795
11259
|
function FieldDefinition(ctx, state2) {
|
|
10796
11260
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "FieldDefinition", FieldDefinition$$);
|
|
10797
11261
|
}
|
|
@@ -11598,7 +12062,7 @@ var PinPattern$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Caret, SingleLineExp
|
|
|
11598
12062
|
var expression = $2;
|
|
11599
12063
|
return {
|
|
11600
12064
|
type: "PinPattern",
|
|
11601
|
-
children:
|
|
12065
|
+
children: [expression],
|
|
11602
12066
|
expression
|
|
11603
12067
|
};
|
|
11604
12068
|
});
|
|
@@ -11759,29 +12223,71 @@ function NestedBindingPropertyList(ctx, state2) {
|
|
|
11759
12223
|
return (0, import_lib2.$EVENT)(ctx, state2, "NestedBindingPropertyList", NestedBindingPropertyList$0);
|
|
11760
12224
|
}
|
|
11761
12225
|
var BindingProperty$0 = BindingRestProperty;
|
|
11762
|
-
var BindingProperty$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), PropertyName, (0, import_lib2.$E)(_), Colon, (0, import_lib2.$E)(_), (0, import_lib2.$C)(BindingIdentifier, BindingPattern), (0, import_lib2.$E)(BindingTypeSuffix), (0, import_lib2.$E)(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
|
|
12226
|
+
var BindingProperty$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), PropertyName, (0, import_lib2.$E)(Caret), (0, import_lib2.$E)(_), Colon, (0, import_lib2.$E)(_), (0, import_lib2.$C)(BindingIdentifier, BindingPattern), (0, import_lib2.$E)(BindingTypeSuffix), (0, import_lib2.$E)(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
12227
|
+
var ws1 = $1;
|
|
11763
12228
|
var name = $2;
|
|
11764
|
-
var
|
|
11765
|
-
var
|
|
11766
|
-
var
|
|
12229
|
+
var bind = $3;
|
|
12230
|
+
var ws2 = $4;
|
|
12231
|
+
var colon = $5;
|
|
12232
|
+
var ws3 = $6;
|
|
12233
|
+
var value = $7;
|
|
12234
|
+
var typeSuffix = $8;
|
|
12235
|
+
var initializer = $9;
|
|
11767
12236
|
return {
|
|
11768
12237
|
type: "BindingProperty",
|
|
11769
|
-
children: [
|
|
12238
|
+
children: [ws1, name, ws2, colon, ws3, value, initializer],
|
|
11770
12239
|
// omit typeSuffix
|
|
11771
12240
|
name,
|
|
11772
12241
|
value,
|
|
11773
12242
|
typeSuffix,
|
|
11774
12243
|
initializer,
|
|
11775
|
-
names: value.names
|
|
12244
|
+
names: value.names,
|
|
12245
|
+
bind: !!bind
|
|
11776
12246
|
};
|
|
11777
12247
|
});
|
|
11778
|
-
var BindingProperty$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_),
|
|
12248
|
+
var BindingProperty$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), Caret, BindingIdentifier, (0, import_lib2.$E)(BindingTypeSuffix), (0, import_lib2.$E)(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
11779
12249
|
var ws = $1;
|
|
11780
12250
|
var pin = $2;
|
|
11781
12251
|
var binding = $3;
|
|
11782
12252
|
var typeSuffix = $4;
|
|
11783
12253
|
var initializer = $5;
|
|
11784
|
-
|
|
12254
|
+
const children = [ws, binding];
|
|
12255
|
+
if (binding.type === "AtBinding") {
|
|
12256
|
+
children.push({
|
|
12257
|
+
type: "Error",
|
|
12258
|
+
message: "Pinned properties do not yet work with @binding"
|
|
12259
|
+
});
|
|
12260
|
+
}
|
|
12261
|
+
if (typeSuffix) {
|
|
12262
|
+
children.push({
|
|
12263
|
+
type: "Error",
|
|
12264
|
+
message: "Pinned properties cannot have type annotations"
|
|
12265
|
+
});
|
|
12266
|
+
}
|
|
12267
|
+
if (initializer) {
|
|
12268
|
+
children.push({
|
|
12269
|
+
type: "Error",
|
|
12270
|
+
message: "Pinned properties cannot have initializers"
|
|
12271
|
+
});
|
|
12272
|
+
}
|
|
12273
|
+
return {
|
|
12274
|
+
type: "PinProperty",
|
|
12275
|
+
children,
|
|
12276
|
+
name: binding,
|
|
12277
|
+
value: {
|
|
12278
|
+
type: "PinPattern",
|
|
12279
|
+
children: [binding],
|
|
12280
|
+
expression: binding
|
|
12281
|
+
}
|
|
12282
|
+
};
|
|
12283
|
+
});
|
|
12284
|
+
var BindingProperty$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), BindingIdentifier, (0, import_lib2.$E)(Caret), (0, import_lib2.$E)(BindingTypeSuffix), (0, import_lib2.$E)(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
12285
|
+
var ws = $1;
|
|
12286
|
+
var binding = $2;
|
|
12287
|
+
var bind = $3;
|
|
12288
|
+
var typeSuffix = $4;
|
|
12289
|
+
var initializer = $5;
|
|
12290
|
+
const children = [ws, binding, initializer];
|
|
11785
12291
|
if (binding.type === "AtBinding") {
|
|
11786
12292
|
return {
|
|
11787
12293
|
type: "AtBindingProperty",
|
|
@@ -11793,30 +12299,6 @@ var BindingProperty$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2
|
|
|
11793
12299
|
names: []
|
|
11794
12300
|
};
|
|
11795
12301
|
}
|
|
11796
|
-
if (pin) {
|
|
11797
|
-
children = [ws, binding];
|
|
11798
|
-
if (typeSuffix) {
|
|
11799
|
-
children.push({
|
|
11800
|
-
type: "Error",
|
|
11801
|
-
message: "Pinned properties cannot have type annotations"
|
|
11802
|
-
});
|
|
11803
|
-
}
|
|
11804
|
-
if (initializer) {
|
|
11805
|
-
children.push({
|
|
11806
|
-
type: "Error",
|
|
11807
|
-
message: "Pinned properties cannot have initializers"
|
|
11808
|
-
});
|
|
11809
|
-
}
|
|
11810
|
-
return {
|
|
11811
|
-
type: "PinProperty",
|
|
11812
|
-
children,
|
|
11813
|
-
name: binding,
|
|
11814
|
-
value: {
|
|
11815
|
-
type: "PinPattern",
|
|
11816
|
-
expression: binding
|
|
11817
|
-
}
|
|
11818
|
-
};
|
|
11819
|
-
}
|
|
11820
12302
|
return {
|
|
11821
12303
|
type: "BindingProperty",
|
|
11822
12304
|
children,
|
|
@@ -11825,10 +12307,11 @@ var BindingProperty$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2
|
|
|
11825
12307
|
typeSuffix,
|
|
11826
12308
|
initializer,
|
|
11827
12309
|
names: binding.names,
|
|
11828
|
-
identifier: binding
|
|
12310
|
+
identifier: binding,
|
|
12311
|
+
bind: !!bind
|
|
11829
12312
|
};
|
|
11830
12313
|
});
|
|
11831
|
-
var BindingProperty$$ = [BindingProperty$0, BindingProperty$1, BindingProperty$2];
|
|
12314
|
+
var BindingProperty$$ = [BindingProperty$0, BindingProperty$1, BindingProperty$2, BindingProperty$3];
|
|
11832
12315
|
function BindingProperty(ctx, state2) {
|
|
11833
12316
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "BindingProperty", BindingProperty$$);
|
|
11834
12317
|
}
|
|
@@ -12394,12 +12877,21 @@ var BareBlock$$ = [BareBlock$0, BareBlock$1, BareBlock$2, BareBlock$3, BareBlock
|
|
|
12394
12877
|
function BareBlock(ctx, state2) {
|
|
12395
12878
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "BareBlock", BareBlock$$);
|
|
12396
12879
|
}
|
|
12397
|
-
var ThenClause$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Then,
|
|
12880
|
+
var ThenClause$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Then, ThenBlock), function(value) {
|
|
12398
12881
|
return value[1];
|
|
12399
12882
|
});
|
|
12400
12883
|
function ThenClause(ctx, state2) {
|
|
12401
12884
|
return (0, import_lib2.$EVENT)(ctx, state2, "ThenClause", ThenClause$0);
|
|
12402
12885
|
}
|
|
12886
|
+
var ThenBlock$0 = (0, import_lib2.$T)((0, import_lib2.$S)(NoBlock, EmptyBlock), function(value) {
|
|
12887
|
+
return value[1];
|
|
12888
|
+
});
|
|
12889
|
+
var ThenBlock$1 = ImplicitNestedBlock;
|
|
12890
|
+
var ThenBlock$2 = SingleLineStatements;
|
|
12891
|
+
var ThenBlock$$ = [ThenBlock$0, ThenBlock$1, ThenBlock$2];
|
|
12892
|
+
function ThenBlock(ctx, state2) {
|
|
12893
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "ThenBlock", ThenBlock$$);
|
|
12894
|
+
}
|
|
12403
12895
|
var BracedThenClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(Then), InsertOpenBrace, ThenClause, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
12404
12896
|
var open = $2;
|
|
12405
12897
|
var exp = $3;
|
|
@@ -12681,7 +13173,7 @@ function LiteralContent(ctx, state2) {
|
|
|
12681
13173
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LiteralContent", LiteralContent$$);
|
|
12682
13174
|
}
|
|
12683
13175
|
var NullLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L38, 'NullLiteral "null"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12684
|
-
return { $loc, token: $1 };
|
|
13176
|
+
return { type: "NullLiteral", $loc, token: $1 };
|
|
12685
13177
|
});
|
|
12686
13178
|
function NullLiteral(ctx, state2) {
|
|
12687
13179
|
return (0, import_lib2.$EVENT)(ctx, state2, "NullLiteral", NullLiteral$0);
|
|
@@ -12696,17 +13188,17 @@ var _BooleanLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)(CoffeeBooleansEn
|
|
|
12696
13188
|
return value[1];
|
|
12697
13189
|
});
|
|
12698
13190
|
var _BooleanLiteral$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L39, '_BooleanLiteral "true"'), (0, import_lib2.$EXPECT)($L40, '_BooleanLiteral "false"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12699
|
-
return { $loc, token: $1 };
|
|
13191
|
+
return { type: "BooleanLiteral", $loc, token: $1 };
|
|
12700
13192
|
});
|
|
12701
13193
|
var _BooleanLiteral$$ = [_BooleanLiteral$0, _BooleanLiteral$1];
|
|
12702
13194
|
function _BooleanLiteral(ctx, state2) {
|
|
12703
13195
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "_BooleanLiteral", _BooleanLiteral$$);
|
|
12704
13196
|
}
|
|
12705
13197
|
var CoffeeScriptBooleanLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L41, 'CoffeeScriptBooleanLiteral "yes"'), (0, import_lib2.$EXPECT)($L42, 'CoffeeScriptBooleanLiteral "on"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12706
|
-
return { $loc, token: "true" };
|
|
13198
|
+
return { type: "BooleanLiteral", $loc, token: "true" };
|
|
12707
13199
|
});
|
|
12708
13200
|
var CoffeeScriptBooleanLiteral$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L43, 'CoffeeScriptBooleanLiteral "no"'), (0, import_lib2.$EXPECT)($L44, 'CoffeeScriptBooleanLiteral "off"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12709
|
-
return { $loc, token: "false" };
|
|
13201
|
+
return { type: "BooleanLiteral", $loc, token: "false" };
|
|
12710
13202
|
});
|
|
12711
13203
|
var CoffeeScriptBooleanLiteral$$ = [CoffeeScriptBooleanLiteral$0, CoffeeScriptBooleanLiteral$1];
|
|
12712
13204
|
function CoffeeScriptBooleanLiteral(ctx, state2) {
|
|
@@ -14411,11 +14903,7 @@ var Statement$1 = VariableStatement;
|
|
|
14411
14903
|
var Statement$2 = (0, import_lib2.$T)((0, import_lib2.$S)(IfStatement, (0, import_lib2.$N)(ShouldExpressionize)), function(value) {
|
|
14412
14904
|
return value[0];
|
|
14413
14905
|
});
|
|
14414
|
-
var Statement$3 =
|
|
14415
|
-
if ($1.generator) return $skip;
|
|
14416
|
-
if ($1.reduction) return $skip;
|
|
14417
|
-
return $1;
|
|
14418
|
-
});
|
|
14906
|
+
var Statement$3 = IterationActualStatement;
|
|
14419
14907
|
var Statement$4 = (0, import_lib2.$T)((0, import_lib2.$S)(SwitchStatement, (0, import_lib2.$N)(ShouldExpressionize)), function(value) {
|
|
14420
14908
|
return value[0];
|
|
14421
14909
|
});
|
|
@@ -14431,6 +14919,14 @@ var Statement$$ = [Statement$0, Statement$1, Statement$2, Statement$3, Statement
|
|
|
14431
14919
|
function Statement(ctx, state2) {
|
|
14432
14920
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Statement", Statement$$);
|
|
14433
14921
|
}
|
|
14922
|
+
var IterationActualStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(IterationStatement, (0, import_lib2.$N)(ShouldExpressionize)), function($skip, $loc, $0, $1, $2) {
|
|
14923
|
+
if ($1.generator) return $skip;
|
|
14924
|
+
if ($1.reduction) return $skip;
|
|
14925
|
+
return $1;
|
|
14926
|
+
});
|
|
14927
|
+
function IterationActualStatement(ctx, state2) {
|
|
14928
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "IterationActualStatement", IterationActualStatement$0);
|
|
14929
|
+
}
|
|
14434
14930
|
var ShouldExpressionize$0 = AllowedTrailingCallExpressions;
|
|
14435
14931
|
var ShouldExpressionize$1 = (0, import_lib2.$S)(NotDedented, Pipe);
|
|
14436
14932
|
var ShouldExpressionize$2 = BinaryOpRHS;
|
|
@@ -14533,12 +15029,12 @@ var LabelledItem$$ = [LabelledItem$0, LabelledItem$1];
|
|
|
14533
15029
|
function LabelledItem(ctx, state2) {
|
|
14534
15030
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LabelledItem", LabelledItem$$);
|
|
14535
15031
|
}
|
|
14536
|
-
var IfStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)(If, Unless), (0, import_lib2.$E)(_), BoundedCondition,
|
|
15032
|
+
var IfStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)(If, Unless), (0, import_lib2.$E)(_), BoundedCondition, ThenClause, (0, import_lib2.$E)(ElseClause)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
14537
15033
|
var kind = $1;
|
|
14538
15034
|
var ws = $2;
|
|
14539
15035
|
var condition = $3;
|
|
14540
|
-
var block = $
|
|
14541
|
-
var e = $
|
|
15036
|
+
var block = $4;
|
|
15037
|
+
var e = $5;
|
|
14542
15038
|
if (kind.negated) {
|
|
14543
15039
|
kind = { ...kind, token: "if" };
|
|
14544
15040
|
condition = negateCondition(condition);
|
|
@@ -14782,15 +15278,18 @@ function ForStatement(ctx, state2) {
|
|
|
14782
15278
|
var ForClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(For, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$E)(_), Star)), __, ForStatementControlWithWhen), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
14783
15279
|
var generator = $2;
|
|
14784
15280
|
var c = $4;
|
|
14785
|
-
|
|
15281
|
+
let { children, reduction } = c;
|
|
15282
|
+
if (generator && reduction) {
|
|
15283
|
+
children = [{
|
|
15284
|
+
type: "Error",
|
|
15285
|
+
message: `Cannot use reduction (${reduction.subtype}) with generators`
|
|
15286
|
+
}, ...children];
|
|
15287
|
+
}
|
|
14786
15288
|
return {
|
|
15289
|
+
...c,
|
|
14787
15290
|
type: "ForStatement",
|
|
14788
15291
|
children: [$1, ...$3, ...children],
|
|
14789
|
-
declaration,
|
|
14790
15292
|
block: null,
|
|
14791
|
-
blockPrefix: c.blockPrefix,
|
|
14792
|
-
hoistDec: c.hoistDec,
|
|
14793
|
-
reduction: c.reduction,
|
|
14794
15293
|
generator
|
|
14795
15294
|
};
|
|
14796
15295
|
});
|
|
@@ -14836,7 +15335,7 @@ var ForStatementControlWithReduction$$ = [ForStatementControlWithReduction$0, Fo
|
|
|
14836
15335
|
function ForStatementControlWithReduction(ctx, state2) {
|
|
14837
15336
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ForStatementControlWithReduction", ForStatementControlWithReduction$$);
|
|
14838
15337
|
}
|
|
14839
|
-
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 "
|
|
15338
|
+
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 "first"'), (0, import_lib2.$EXPECT)($L124, 'ForReduction "sum"'), (0, import_lib2.$EXPECT)($L125, 'ForReduction "product"'), (0, import_lib2.$EXPECT)($L126, 'ForReduction "min"'), (0, import_lib2.$EXPECT)($L127, 'ForReduction "max"'), (0, import_lib2.$EXPECT)($L128, 'ForReduction "join"'), (0, import_lib2.$EXPECT)($L129, 'ForReduction "concat"')), NonIdContinue, __), function($skip, $loc, $0, $1, $2, $3) {
|
|
14840
15339
|
var subtype = $1;
|
|
14841
15340
|
var ws = $3;
|
|
14842
15341
|
return {
|
|
@@ -15685,7 +16184,7 @@ var RestoreAll$0 = (0, import_lib2.$S)(RestoreTrailingMemberProperty, RestoreBra
|
|
|
15685
16184
|
function RestoreAll(ctx, state2) {
|
|
15686
16185
|
return (0, import_lib2.$EVENT)(ctx, state2, "RestoreAll", RestoreAll$0);
|
|
15687
16186
|
}
|
|
15688
|
-
var CommaExpressionStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
16187
|
+
var CommaExpressionStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CommaExpressionSpread), function($skip, $loc, $0, $1) {
|
|
15689
16188
|
return makeExpressionStatement($1);
|
|
15690
16189
|
});
|
|
15691
16190
|
function CommaExpressionStatement(ctx, state2) {
|
|
@@ -15759,19 +16258,19 @@ var ThrowStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Throw, MaybeParen
|
|
|
15759
16258
|
function ThrowStatement(ctx, state2) {
|
|
15760
16259
|
return (0, import_lib2.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
|
|
15761
16260
|
}
|
|
15762
|
-
var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16261
|
+
var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L130, 'Break "break"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15763
16262
|
return { $loc, token: $1 };
|
|
15764
16263
|
});
|
|
15765
16264
|
function Break(ctx, state2) {
|
|
15766
16265
|
return (0, import_lib2.$EVENT)(ctx, state2, "Break", Break$0);
|
|
15767
16266
|
}
|
|
15768
|
-
var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16267
|
+
var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L131, 'Continue "continue"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15769
16268
|
return { $loc, token: $1 };
|
|
15770
16269
|
});
|
|
15771
16270
|
function Continue(ctx, state2) {
|
|
15772
16271
|
return (0, import_lib2.$EVENT)(ctx, state2, "Continue", Continue$0);
|
|
15773
16272
|
}
|
|
15774
|
-
var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16273
|
+
var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L132, 'Debugger "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15775
16274
|
return { $loc, token: $1 };
|
|
15776
16275
|
});
|
|
15777
16276
|
function Debugger(ctx, state2) {
|
|
@@ -15848,7 +16347,7 @@ var MaybeParenNestedExpression$$ = [MaybeParenNestedExpression$0, MaybeParenNest
|
|
|
15848
16347
|
function MaybeParenNestedExpression(ctx, state2) {
|
|
15849
16348
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
|
|
15850
16349
|
}
|
|
15851
|
-
var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($
|
|
16350
|
+
var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($L133, 'ImportDeclaration "require"'), NonIdContinue, Arguments), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
15852
16351
|
const imp = [
|
|
15853
16352
|
{ ...$1, ts: true },
|
|
15854
16353
|
{ ...$1, token: "const", js: true }
|
|
@@ -16036,7 +16535,7 @@ var ImpliedFrom$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImpliedF
|
|
|
16036
16535
|
function ImpliedFrom(ctx, state2) {
|
|
16037
16536
|
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
|
|
16038
16537
|
}
|
|
16039
|
-
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
16538
|
+
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L134, 'ImportAssertion "with"'), (0, import_lib2.$EXPECT)($L135, 'ImportAssertion "assert"')), NonIdContinue, (0, import_lib2.$E)(_), ObjectLiteral), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
16040
16539
|
var keyword = $2;
|
|
16041
16540
|
var object = $5;
|
|
16042
16541
|
return {
|
|
@@ -16357,19 +16856,19 @@ var LexicalDeclaration$$ = [LexicalDeclaration$0, LexicalDeclaration$1];
|
|
|
16357
16856
|
function LexicalDeclaration(ctx, state2) {
|
|
16358
16857
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
|
|
16359
16858
|
}
|
|
16360
|
-
var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
16859
|
+
var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L136, 'ConstAssignment ":="'), (0, import_lib2.$EXPECT)($L137, 'ConstAssignment "\u2254"')), function($skip, $loc, $0, $1) {
|
|
16361
16860
|
return { $loc, token: "=", decl: "const " };
|
|
16362
16861
|
});
|
|
16363
16862
|
function ConstAssignment(ctx, state2) {
|
|
16364
16863
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
|
|
16365
16864
|
}
|
|
16366
|
-
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16865
|
+
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L138, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
|
|
16367
16866
|
return { $loc, token: "=", decl: "let " };
|
|
16368
16867
|
});
|
|
16369
16868
|
function LetAssignment(ctx, state2) {
|
|
16370
16869
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
|
|
16371
16870
|
}
|
|
16372
|
-
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16871
|
+
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L139, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
|
|
16373
16872
|
return { $loc, token: "=" };
|
|
16374
16873
|
});
|
|
16375
16874
|
function TypeAssignment(ctx, state2) {
|
|
@@ -16592,7 +17091,12 @@ function CoffeeDoubleQuotedStringCharacters(ctx, state2) {
|
|
|
16592
17091
|
}
|
|
16593
17092
|
var RegularExpressionLiteral$0 = HeregexLiteral;
|
|
16594
17093
|
var RegularExpressionLiteral$1 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L77, 'RegularExpressionLiteral "/"'), RegularExpressionBody, (0, import_lib2.$EXPECT)($L77, 'RegularExpressionLiteral "/"'), RegularExpressionFlags)), function($skip, $loc, $0, $1) {
|
|
16595
|
-
|
|
17094
|
+
var raw = $0;
|
|
17095
|
+
return {
|
|
17096
|
+
type: "RegularExpressionLiteral",
|
|
17097
|
+
raw,
|
|
17098
|
+
children: [{ $loc, token: raw }]
|
|
17099
|
+
};
|
|
16596
17100
|
});
|
|
16597
17101
|
var RegularExpressionLiteral$$ = [RegularExpressionLiteral$0, RegularExpressionLiteral$1];
|
|
16598
17102
|
function RegularExpressionLiteral(ctx, state2) {
|
|
@@ -16808,7 +17312,7 @@ var MultiLineComment$$ = [MultiLineComment$0, MultiLineComment$1];
|
|
|
16808
17312
|
function MultiLineComment(ctx, state2) {
|
|
16809
17313
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
|
|
16810
17314
|
}
|
|
16811
|
-
var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17315
|
+
var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'JSMultiLineComment "/*"'), (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L141, 'JSMultiLineComment "*/"')), (0, import_lib2.$EXPECT)($R70, "JSMultiLineComment /./"))), (0, import_lib2.$EXPECT)($L141, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
|
|
16812
17316
|
return { type: "Comment", $loc, token: $1 };
|
|
16813
17317
|
});
|
|
16814
17318
|
function JSMultiLineComment(ctx, state2) {
|
|
@@ -16854,7 +17358,7 @@ function _(ctx, state2) {
|
|
|
16854
17358
|
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) {
|
|
16855
17359
|
return { $loc, token: $0 };
|
|
16856
17360
|
});
|
|
16857
|
-
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17361
|
+
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L142, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
|
|
16858
17362
|
return " ";
|
|
16859
17363
|
});
|
|
16860
17364
|
var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
|
|
@@ -16905,7 +17409,7 @@ var StatementDelimiter$$ = [StatementDelimiter$0, StatementDelimiter$1, Statemen
|
|
|
16905
17409
|
function StatementDelimiter(ctx, state2) {
|
|
16906
17410
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
|
|
16907
17411
|
}
|
|
16908
|
-
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)($
|
|
17412
|
+
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)($L143, 'ClosingDelimiter ")"'), (0, import_lib2.$EXPECT)($L46, 'ClosingDelimiter "]"'))));
|
|
16909
17413
|
function ClosingDelimiter(ctx, state2) {
|
|
16910
17414
|
return (0, import_lib2.$EVENT)(ctx, state2, "ClosingDelimiter", ClosingDelimiter$0);
|
|
16911
17415
|
}
|
|
@@ -16928,7 +17432,7 @@ var Loc$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Loc ""'), functi
|
|
|
16928
17432
|
function Loc(ctx, state2) {
|
|
16929
17433
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
|
|
16930
17434
|
}
|
|
16931
|
-
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17435
|
+
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L144, 'Abstract "abstract"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L18, 'Abstract " "')))), function($skip, $loc, $0, $1) {
|
|
16932
17436
|
return { $loc, token: $1, ts: true };
|
|
16933
17437
|
});
|
|
16934
17438
|
function Abstract(ctx, state2) {
|
|
@@ -16940,43 +17444,43 @@ var Ampersand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L117, 'Ampersan
|
|
|
16940
17444
|
function Ampersand(ctx, state2) {
|
|
16941
17445
|
return (0, import_lib2.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
|
|
16942
17446
|
}
|
|
16943
|
-
var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17447
|
+
var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L145, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16944
17448
|
return { $loc, token: $1 };
|
|
16945
17449
|
});
|
|
16946
17450
|
function As(ctx, state2) {
|
|
16947
17451
|
return (0, import_lib2.$EVENT)(ctx, state2, "As", As$0);
|
|
16948
17452
|
}
|
|
16949
|
-
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17453
|
+
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L146, 'At "@"'), function($skip, $loc, $0, $1) {
|
|
16950
17454
|
return { $loc, token: $1 };
|
|
16951
17455
|
});
|
|
16952
17456
|
function At(ctx, state2) {
|
|
16953
17457
|
return (0, import_lib2.$EVENT)(ctx, state2, "At", At$0);
|
|
16954
17458
|
}
|
|
16955
|
-
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17459
|
+
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L147, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
|
|
16956
17460
|
return { $loc, token: "@" };
|
|
16957
17461
|
});
|
|
16958
17462
|
function AtAt(ctx, state2) {
|
|
16959
17463
|
return (0, import_lib2.$EVENT)(ctx, state2, "AtAt", AtAt$0);
|
|
16960
17464
|
}
|
|
16961
|
-
var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17465
|
+
var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L148, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16962
17466
|
return { $loc, token: $1, type: "Async" };
|
|
16963
17467
|
});
|
|
16964
17468
|
function Async(ctx, state2) {
|
|
16965
17469
|
return (0, import_lib2.$EVENT)(ctx, state2, "Async", Async$0);
|
|
16966
17470
|
}
|
|
16967
|
-
var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17471
|
+
var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L149, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16968
17472
|
return { $loc, token: $1, type: "Await" };
|
|
16969
17473
|
});
|
|
16970
17474
|
function Await(ctx, state2) {
|
|
16971
17475
|
return (0, import_lib2.$EVENT)(ctx, state2, "Await", Await$0);
|
|
16972
17476
|
}
|
|
16973
|
-
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17477
|
+
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L150, 'Backtick "`"'), function($skip, $loc, $0, $1) {
|
|
16974
17478
|
return { $loc, token: $1 };
|
|
16975
17479
|
});
|
|
16976
17480
|
function Backtick(ctx, state2) {
|
|
16977
17481
|
return (0, import_lib2.$EVENT)(ctx, state2, "Backtick", Backtick$0);
|
|
16978
17482
|
}
|
|
16979
|
-
var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17483
|
+
var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L151, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16980
17484
|
return { $loc, token: $1 };
|
|
16981
17485
|
});
|
|
16982
17486
|
function By(ctx, state2) {
|
|
@@ -16988,19 +17492,19 @@ var Caret$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L22, 'Caret "^"'),
|
|
|
16988
17492
|
function Caret(ctx, state2) {
|
|
16989
17493
|
return (0, import_lib2.$EVENT)(ctx, state2, "Caret", Caret$0);
|
|
16990
17494
|
}
|
|
16991
|
-
var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17495
|
+
var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L152, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16992
17496
|
return { $loc, token: $1 };
|
|
16993
17497
|
});
|
|
16994
17498
|
function Case(ctx, state2) {
|
|
16995
17499
|
return (0, import_lib2.$EVENT)(ctx, state2, "Case", Case$0);
|
|
16996
17500
|
}
|
|
16997
|
-
var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17501
|
+
var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L153, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16998
17502
|
return { $loc, token: $1 };
|
|
16999
17503
|
});
|
|
17000
17504
|
function Catch(ctx, state2) {
|
|
17001
17505
|
return (0, import_lib2.$EVENT)(ctx, state2, "Catch", Catch$0);
|
|
17002
17506
|
}
|
|
17003
|
-
var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17507
|
+
var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L154, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17004
17508
|
return { $loc, token: $1 };
|
|
17005
17509
|
});
|
|
17006
17510
|
function Class(ctx, state2) {
|
|
@@ -17024,13 +17528,13 @@ var CloseBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L46, 'CloseB
|
|
|
17024
17528
|
function CloseBracket(ctx, state2) {
|
|
17025
17529
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
|
|
17026
17530
|
}
|
|
17027
|
-
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17531
|
+
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L143, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
|
|
17028
17532
|
return { $loc, token: $1 };
|
|
17029
17533
|
});
|
|
17030
17534
|
function CloseParen(ctx, state2) {
|
|
17031
17535
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
|
|
17032
17536
|
}
|
|
17033
|
-
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17537
|
+
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L155, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
|
|
17034
17538
|
return { $loc, token: "${" };
|
|
17035
17539
|
});
|
|
17036
17540
|
function CoffeeSubstitutionStart(ctx, state2) {
|
|
@@ -17048,37 +17552,37 @@ var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L17, 'Comma ","'),
|
|
|
17048
17552
|
function Comma(ctx, state2) {
|
|
17049
17553
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comma", Comma$0);
|
|
17050
17554
|
}
|
|
17051
|
-
var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17555
|
+
var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L156, 'Comptime "comptime"'), NonIdContinue, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L16, 'Comptime ":"'))), function($skip, $loc, $0, $1, $2, $3) {
|
|
17052
17556
|
return { $loc, token: $1 };
|
|
17053
17557
|
});
|
|
17054
17558
|
function Comptime(ctx, state2) {
|
|
17055
17559
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comptime", Comptime$0);
|
|
17056
17560
|
}
|
|
17057
|
-
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17561
|
+
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L146, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
|
|
17058
17562
|
return { $loc, token: "constructor" };
|
|
17059
17563
|
});
|
|
17060
17564
|
function ConstructorShorthand(ctx, state2) {
|
|
17061
17565
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
|
|
17062
17566
|
}
|
|
17063
|
-
var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17567
|
+
var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L157, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17064
17568
|
return { $loc, token: $1 };
|
|
17065
17569
|
});
|
|
17066
17570
|
function Declare(ctx, state2) {
|
|
17067
17571
|
return (0, import_lib2.$EVENT)(ctx, state2, "Declare", Declare$0);
|
|
17068
17572
|
}
|
|
17069
|
-
var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17573
|
+
var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L158, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17070
17574
|
return { $loc, token: $1 };
|
|
17071
17575
|
});
|
|
17072
17576
|
function Default(ctx, state2) {
|
|
17073
17577
|
return (0, import_lib2.$EVENT)(ctx, state2, "Default", Default$0);
|
|
17074
17578
|
}
|
|
17075
|
-
var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17579
|
+
var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L159, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17076
17580
|
return { $loc, token: $1 };
|
|
17077
17581
|
});
|
|
17078
17582
|
function Delete(ctx, state2) {
|
|
17079
17583
|
return (0, import_lib2.$EVENT)(ctx, state2, "Delete", Delete$0);
|
|
17080
17584
|
}
|
|
17081
|
-
var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17585
|
+
var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L160, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17082
17586
|
return { $loc, token: $1 };
|
|
17083
17587
|
});
|
|
17084
17588
|
function Do(ctx, state2) {
|
|
@@ -17098,20 +17602,20 @@ var Dot$$ = [Dot$0, Dot$1];
|
|
|
17098
17602
|
function Dot(ctx, state2) {
|
|
17099
17603
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Dot", Dot$$);
|
|
17100
17604
|
}
|
|
17101
|
-
var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17605
|
+
var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L161, 'DotDot ".."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L7, 'DotDot "."'))), function($skip, $loc, $0, $1, $2) {
|
|
17102
17606
|
return { $loc, token: $1 };
|
|
17103
17607
|
});
|
|
17104
|
-
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17608
|
+
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
|
|
17105
17609
|
return { $loc, token: ".." };
|
|
17106
17610
|
});
|
|
17107
17611
|
var DotDot$$ = [DotDot$0, DotDot$1];
|
|
17108
17612
|
function DotDot(ctx, state2) {
|
|
17109
17613
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
|
|
17110
17614
|
}
|
|
17111
|
-
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17615
|
+
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
|
|
17112
17616
|
return { $loc, token: $1 };
|
|
17113
17617
|
});
|
|
17114
|
-
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17618
|
+
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L164, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
|
|
17115
17619
|
return { $loc, token: "..." };
|
|
17116
17620
|
});
|
|
17117
17621
|
var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
|
|
@@ -17124,31 +17628,31 @@ var InsertDotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Inse
|
|
|
17124
17628
|
function InsertDotDotDot(ctx, state2) {
|
|
17125
17629
|
return (0, import_lib2.$EVENT)(ctx, state2, "InsertDotDotDot", InsertDotDotDot$0);
|
|
17126
17630
|
}
|
|
17127
|
-
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17631
|
+
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L165, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
|
|
17128
17632
|
return { $loc, token: $1 };
|
|
17129
17633
|
});
|
|
17130
17634
|
function DoubleColon(ctx, state2) {
|
|
17131
17635
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
|
|
17132
17636
|
}
|
|
17133
|
-
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17637
|
+
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L165, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
|
|
17134
17638
|
return { $loc, token: ":" };
|
|
17135
17639
|
});
|
|
17136
17640
|
function DoubleColonAsColon(ctx, state2) {
|
|
17137
17641
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
|
|
17138
17642
|
}
|
|
17139
|
-
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17643
|
+
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L166, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
17140
17644
|
return { $loc, token: $1 };
|
|
17141
17645
|
});
|
|
17142
17646
|
function DoubleQuote(ctx, state2) {
|
|
17143
17647
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
|
|
17144
17648
|
}
|
|
17145
|
-
var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17649
|
+
var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L167, 'Each "each"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17146
17650
|
return { $loc, token: $1 };
|
|
17147
17651
|
});
|
|
17148
17652
|
function Each(ctx, state2) {
|
|
17149
17653
|
return (0, import_lib2.$EVENT)(ctx, state2, "Each", Each$0);
|
|
17150
17654
|
}
|
|
17151
|
-
var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17655
|
+
var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L168, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17152
17656
|
return { $loc, token: $1 };
|
|
17153
17657
|
});
|
|
17154
17658
|
function Else(ctx, state2) {
|
|
@@ -17160,61 +17664,61 @@ var Equals$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L3, 'Equals "="'),
|
|
|
17160
17664
|
function Equals(ctx, state2) {
|
|
17161
17665
|
return (0, import_lib2.$EVENT)(ctx, state2, "Equals", Equals$0);
|
|
17162
17666
|
}
|
|
17163
|
-
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17667
|
+
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L169, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
|
|
17164
17668
|
return { $loc, token: $1 };
|
|
17165
17669
|
});
|
|
17166
17670
|
function ExclamationPoint(ctx, state2) {
|
|
17167
17671
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
|
|
17168
17672
|
}
|
|
17169
|
-
var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17673
|
+
var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L170, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17170
17674
|
return { $loc, token: $1 };
|
|
17171
17675
|
});
|
|
17172
17676
|
function Export(ctx, state2) {
|
|
17173
17677
|
return (0, import_lib2.$EVENT)(ctx, state2, "Export", Export$0);
|
|
17174
17678
|
}
|
|
17175
|
-
var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17679
|
+
var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L171, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17176
17680
|
return { $loc, token: $1 };
|
|
17177
17681
|
});
|
|
17178
17682
|
function Extends(ctx, state2) {
|
|
17179
17683
|
return (0, import_lib2.$EVENT)(ctx, state2, "Extends", Extends$0);
|
|
17180
17684
|
}
|
|
17181
|
-
var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17685
|
+
var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L172, 'Finally "finally"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17182
17686
|
return { $loc, token: $1 };
|
|
17183
17687
|
});
|
|
17184
17688
|
function Finally(ctx, state2) {
|
|
17185
17689
|
return (0, import_lib2.$EVENT)(ctx, state2, "Finally", Finally$0);
|
|
17186
17690
|
}
|
|
17187
|
-
var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17691
|
+
var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L173, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17188
17692
|
return { $loc, token: $1 };
|
|
17189
17693
|
});
|
|
17190
17694
|
function For(ctx, state2) {
|
|
17191
17695
|
return (0, import_lib2.$EVENT)(ctx, state2, "For", For$0);
|
|
17192
17696
|
}
|
|
17193
|
-
var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17697
|
+
var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L174, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17194
17698
|
return { $loc, token: $1 };
|
|
17195
17699
|
});
|
|
17196
17700
|
function From(ctx, state2) {
|
|
17197
17701
|
return (0, import_lib2.$EVENT)(ctx, state2, "From", From$0);
|
|
17198
17702
|
}
|
|
17199
|
-
var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17703
|
+
var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L175, 'Function "function"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17200
17704
|
return { $loc, token: $1 };
|
|
17201
17705
|
});
|
|
17202
17706
|
function Function2(ctx, state2) {
|
|
17203
17707
|
return (0, import_lib2.$EVENT)(ctx, state2, "Function", Function$0);
|
|
17204
17708
|
}
|
|
17205
|
-
var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17709
|
+
var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L176, 'GetOrSet "get"'), (0, import_lib2.$EXPECT)($L177, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17206
17710
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
17207
17711
|
});
|
|
17208
17712
|
function GetOrSet(ctx, state2) {
|
|
17209
17713
|
return (0, import_lib2.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
|
|
17210
17714
|
}
|
|
17211
|
-
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17715
|
+
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L178, 'Hash "#"'), function($skip, $loc, $0, $1) {
|
|
17212
17716
|
return { $loc, token: $1 };
|
|
17213
17717
|
});
|
|
17214
17718
|
function Hash(ctx, state2) {
|
|
17215
17719
|
return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
|
|
17216
17720
|
}
|
|
17217
|
-
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17721
|
+
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L179, 'If "if"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L18, 'If " "')))), function($skip, $loc, $0, $1) {
|
|
17218
17722
|
return { $loc, token: $1 };
|
|
17219
17723
|
});
|
|
17220
17724
|
function If(ctx, state2) {
|
|
@@ -17226,67 +17730,67 @@ var Import$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)
|
|
|
17226
17730
|
function Import(ctx, state2) {
|
|
17227
17731
|
return (0, import_lib2.$EVENT)(ctx, state2, "Import", Import$0);
|
|
17228
17732
|
}
|
|
17229
|
-
var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17733
|
+
var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L180, 'In "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17230
17734
|
return { $loc, token: $1 };
|
|
17231
17735
|
});
|
|
17232
17736
|
function In(ctx, state2) {
|
|
17233
17737
|
return (0, import_lib2.$EVENT)(ctx, state2, "In", In$0);
|
|
17234
17738
|
}
|
|
17235
|
-
var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17739
|
+
var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L181, 'Infer "infer"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17236
17740
|
return { $loc, token: $1 };
|
|
17237
17741
|
});
|
|
17238
17742
|
function Infer(ctx, state2) {
|
|
17239
17743
|
return (0, import_lib2.$EVENT)(ctx, state2, "Infer", Infer$0);
|
|
17240
17744
|
}
|
|
17241
|
-
var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17745
|
+
var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L182, 'LetOrConst "let"'), (0, import_lib2.$EXPECT)($L183, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17242
17746
|
return { $loc, token: $1 };
|
|
17243
17747
|
});
|
|
17244
17748
|
function LetOrConst(ctx, state2) {
|
|
17245
17749
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
|
|
17246
17750
|
}
|
|
17247
|
-
var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17751
|
+
var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L183, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17248
17752
|
return { $loc, token: $1 };
|
|
17249
17753
|
});
|
|
17250
17754
|
function Const(ctx, state2) {
|
|
17251
17755
|
return (0, import_lib2.$EVENT)(ctx, state2, "Const", Const$0);
|
|
17252
17756
|
}
|
|
17253
|
-
var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17757
|
+
var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L184, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17254
17758
|
return { $loc, token: $1 };
|
|
17255
17759
|
});
|
|
17256
17760
|
function Is(ctx, state2) {
|
|
17257
17761
|
return (0, import_lib2.$EVENT)(ctx, state2, "Is", Is$0);
|
|
17258
17762
|
}
|
|
17259
|
-
var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17763
|
+
var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L182, 'LetOrConstOrVar "let"'), (0, import_lib2.$EXPECT)($L183, 'LetOrConstOrVar "const"'), (0, import_lib2.$EXPECT)($L185, 'LetOrConstOrVar "var"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17260
17764
|
return { $loc, token: $1 };
|
|
17261
17765
|
});
|
|
17262
17766
|
function LetOrConstOrVar(ctx, state2) {
|
|
17263
17767
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
|
|
17264
17768
|
}
|
|
17265
|
-
var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17769
|
+
var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L186, 'Like "like"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17266
17770
|
return { $loc, token: $1 };
|
|
17267
17771
|
});
|
|
17268
17772
|
function Like(ctx, state2) {
|
|
17269
17773
|
return (0, import_lib2.$EVENT)(ctx, state2, "Like", Like$0);
|
|
17270
17774
|
}
|
|
17271
|
-
var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17775
|
+
var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L187, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17272
17776
|
return { $loc, token: "while" };
|
|
17273
17777
|
});
|
|
17274
17778
|
function Loop(ctx, state2) {
|
|
17275
17779
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loop", Loop$0);
|
|
17276
17780
|
}
|
|
17277
|
-
var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17781
|
+
var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L188, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17278
17782
|
return { $loc, token: $1 };
|
|
17279
17783
|
});
|
|
17280
17784
|
function New(ctx, state2) {
|
|
17281
17785
|
return (0, import_lib2.$EVENT)(ctx, state2, "New", New$0);
|
|
17282
17786
|
}
|
|
17283
|
-
var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17787
|
+
var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L189, '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) {
|
|
17284
17788
|
return { $loc, token: "!" };
|
|
17285
17789
|
});
|
|
17286
17790
|
function Not(ctx, state2) {
|
|
17287
17791
|
return (0, import_lib2.$EVENT)(ctx, state2, "Not", Not$0);
|
|
17288
17792
|
}
|
|
17289
|
-
var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17793
|
+
var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L190, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17290
17794
|
return { $loc, token: $1 };
|
|
17291
17795
|
});
|
|
17292
17796
|
function Of(ctx, state2) {
|
|
@@ -17304,7 +17808,7 @@ var OpenBrace$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L1, 'OpenBrace
|
|
|
17304
17808
|
function OpenBrace(ctx, state2) {
|
|
17305
17809
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
|
|
17306
17810
|
}
|
|
17307
|
-
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17811
|
+
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L191, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
17308
17812
|
return { $loc, token: $1 };
|
|
17309
17813
|
});
|
|
17310
17814
|
function OpenBracket(ctx, state2) {
|
|
@@ -17316,49 +17820,49 @@ var OpenParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L4, 'OpenParen
|
|
|
17316
17820
|
function OpenParen(ctx, state2) {
|
|
17317
17821
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
|
|
17318
17822
|
}
|
|
17319
|
-
var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17823
|
+
var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L192, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17320
17824
|
return { $loc, token: $1 };
|
|
17321
17825
|
});
|
|
17322
17826
|
function Operator(ctx, state2) {
|
|
17323
17827
|
return (0, import_lib2.$EVENT)(ctx, state2, "Operator", Operator$0);
|
|
17324
17828
|
}
|
|
17325
|
-
var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17829
|
+
var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L193, 'Override "override"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17326
17830
|
return { $loc, token: $1, ts: true };
|
|
17327
17831
|
});
|
|
17328
17832
|
function Override(ctx, state2) {
|
|
17329
17833
|
return (0, import_lib2.$EVENT)(ctx, state2, "Override", Override$0);
|
|
17330
17834
|
}
|
|
17331
|
-
var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17835
|
+
var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L194, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17332
17836
|
return { $loc, token: $1 };
|
|
17333
17837
|
});
|
|
17334
17838
|
function Own(ctx, state2) {
|
|
17335
17839
|
return (0, import_lib2.$EVENT)(ctx, state2, "Own", Own$0);
|
|
17336
17840
|
}
|
|
17337
|
-
var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17841
|
+
var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L195, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17338
17842
|
return { $loc, token: $1 };
|
|
17339
17843
|
});
|
|
17340
17844
|
function Public(ctx, state2) {
|
|
17341
17845
|
return (0, import_lib2.$EVENT)(ctx, state2, "Public", Public$0);
|
|
17342
17846
|
}
|
|
17343
|
-
var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17847
|
+
var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L196, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17344
17848
|
return { $loc, token: $1 };
|
|
17345
17849
|
});
|
|
17346
17850
|
function Private(ctx, state2) {
|
|
17347
17851
|
return (0, import_lib2.$EVENT)(ctx, state2, "Private", Private$0);
|
|
17348
17852
|
}
|
|
17349
|
-
var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17853
|
+
var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L197, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17350
17854
|
return { $loc, token: $1 };
|
|
17351
17855
|
});
|
|
17352
17856
|
function Protected(ctx, state2) {
|
|
17353
17857
|
return (0, import_lib2.$EVENT)(ctx, state2, "Protected", Protected$0);
|
|
17354
17858
|
}
|
|
17355
|
-
var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17859
|
+
var Pipe$0 = (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) {
|
|
17356
17860
|
return { $loc, token: "||>" };
|
|
17357
17861
|
});
|
|
17358
|
-
var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17862
|
+
var Pipe$1 = (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) {
|
|
17359
17863
|
return { $loc, token: "|>=" };
|
|
17360
17864
|
});
|
|
17361
|
-
var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17865
|
+
var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L202, 'Pipe "|>"'), (0, import_lib2.$EXPECT)($L203, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
|
|
17362
17866
|
return { $loc, token: "|>" };
|
|
17363
17867
|
});
|
|
17364
17868
|
var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
|
|
@@ -17371,19 +17875,19 @@ var QuestionMark$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L6, 'Questio
|
|
|
17371
17875
|
function QuestionMark(ctx, state2) {
|
|
17372
17876
|
return (0, import_lib2.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
|
|
17373
17877
|
}
|
|
17374
|
-
var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17878
|
+
var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L204, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17375
17879
|
return { $loc, token: $1, ts: true };
|
|
17376
17880
|
});
|
|
17377
17881
|
function Readonly(ctx, state2) {
|
|
17378
17882
|
return (0, import_lib2.$EVENT)(ctx, state2, "Readonly", Readonly$0);
|
|
17379
17883
|
}
|
|
17380
|
-
var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17884
|
+
var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L205, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17381
17885
|
return { $loc, token: $1 };
|
|
17382
17886
|
});
|
|
17383
17887
|
function Return(ctx, state2) {
|
|
17384
17888
|
return (0, import_lib2.$EVENT)(ctx, state2, "Return", Return$0);
|
|
17385
17889
|
}
|
|
17386
|
-
var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17890
|
+
var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L206, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17387
17891
|
return { $loc, token: $1 };
|
|
17388
17892
|
});
|
|
17389
17893
|
function Satisfies(ctx, state2) {
|
|
@@ -17395,7 +17899,7 @@ var Semicolon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L119, 'Semicolo
|
|
|
17395
17899
|
function Semicolon(ctx, state2) {
|
|
17396
17900
|
return (0, import_lib2.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
|
|
17397
17901
|
}
|
|
17398
|
-
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17902
|
+
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L207, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
17399
17903
|
return { $loc, token: $1 };
|
|
17400
17904
|
});
|
|
17401
17905
|
function SingleQuote(ctx, state2) {
|
|
@@ -17407,149 +17911,149 @@ var Star$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L75, 'Star "*"'), fu
|
|
|
17407
17911
|
function Star(ctx, state2) {
|
|
17408
17912
|
return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
|
|
17409
17913
|
}
|
|
17410
|
-
var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17914
|
+
var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L208, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17411
17915
|
return { $loc, token: $1 };
|
|
17412
17916
|
});
|
|
17413
|
-
var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17917
|
+
var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L146, 'Static "@"'), (0, import_lib2.$N)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L4, 'Static "("'), (0, import_lib2.$EXPECT)($L146, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
|
|
17414
17918
|
return { $loc, token: "static " };
|
|
17415
17919
|
});
|
|
17416
17920
|
var Static$$ = [Static$0, Static$1];
|
|
17417
17921
|
function Static(ctx, state2) {
|
|
17418
17922
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Static", Static$$);
|
|
17419
17923
|
}
|
|
17420
|
-
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17924
|
+
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L209, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
17421
17925
|
return { $loc, token: $1 };
|
|
17422
17926
|
});
|
|
17423
17927
|
function SubstitutionStart(ctx, state2) {
|
|
17424
17928
|
return (0, import_lib2.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
|
|
17425
17929
|
}
|
|
17426
|
-
var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17930
|
+
var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L210, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17427
17931
|
return { $loc, token: $1 };
|
|
17428
17932
|
});
|
|
17429
17933
|
function Super(ctx, state2) {
|
|
17430
17934
|
return (0, import_lib2.$EVENT)(ctx, state2, "Super", Super$0);
|
|
17431
17935
|
}
|
|
17432
|
-
var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17936
|
+
var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L211, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17433
17937
|
return { $loc, token: $1 };
|
|
17434
17938
|
});
|
|
17435
17939
|
function Switch(ctx, state2) {
|
|
17436
17940
|
return (0, import_lib2.$EVENT)(ctx, state2, "Switch", Switch$0);
|
|
17437
17941
|
}
|
|
17438
|
-
var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17942
|
+
var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L212, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17439
17943
|
return { $loc, token: $1 };
|
|
17440
17944
|
});
|
|
17441
17945
|
function Target(ctx, state2) {
|
|
17442
17946
|
return (0, import_lib2.$EVENT)(ctx, state2, "Target", Target$0);
|
|
17443
17947
|
}
|
|
17444
|
-
var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
17948
|
+
var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L213, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
17445
17949
|
return { $loc, token: "" };
|
|
17446
17950
|
});
|
|
17447
17951
|
function Then(ctx, state2) {
|
|
17448
17952
|
return (0, import_lib2.$EVENT)(ctx, state2, "Then", Then$0);
|
|
17449
17953
|
}
|
|
17450
|
-
var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17954
|
+
var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L214, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17451
17955
|
return { $loc, token: $1 };
|
|
17452
17956
|
});
|
|
17453
17957
|
function This(ctx, state2) {
|
|
17454
17958
|
return (0, import_lib2.$EVENT)(ctx, state2, "This", This$0);
|
|
17455
17959
|
}
|
|
17456
|
-
var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17960
|
+
var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L215, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17457
17961
|
return { $loc, token: $1 };
|
|
17458
17962
|
});
|
|
17459
17963
|
function Throw(ctx, state2) {
|
|
17460
17964
|
return (0, import_lib2.$EVENT)(ctx, state2, "Throw", Throw$0);
|
|
17461
17965
|
}
|
|
17462
|
-
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17966
|
+
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
17463
17967
|
return { $loc, token: "`" };
|
|
17464
17968
|
});
|
|
17465
17969
|
function TripleDoubleQuote(ctx, state2) {
|
|
17466
17970
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
|
|
17467
17971
|
}
|
|
17468
|
-
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17972
|
+
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L217, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
17469
17973
|
return { $loc, token: "`" };
|
|
17470
17974
|
});
|
|
17471
17975
|
function TripleSingleQuote(ctx, state2) {
|
|
17472
17976
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
|
|
17473
17977
|
}
|
|
17474
|
-
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17978
|
+
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L218, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
17475
17979
|
return { $loc, token: "/" };
|
|
17476
17980
|
});
|
|
17477
17981
|
function TripleSlash(ctx, state2) {
|
|
17478
17982
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
|
|
17479
17983
|
}
|
|
17480
|
-
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17984
|
+
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L219, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
17481
17985
|
return { $loc, token: "`" };
|
|
17482
17986
|
});
|
|
17483
17987
|
function TripleTick(ctx, state2) {
|
|
17484
17988
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
|
|
17485
17989
|
}
|
|
17486
|
-
var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17990
|
+
var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L220, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17487
17991
|
return { $loc, token: $1 };
|
|
17488
17992
|
});
|
|
17489
17993
|
function Try(ctx, state2) {
|
|
17490
17994
|
return (0, import_lib2.$EVENT)(ctx, state2, "Try", Try$0);
|
|
17491
17995
|
}
|
|
17492
|
-
var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17996
|
+
var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L221, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17493
17997
|
return { $loc, token: $1 };
|
|
17494
17998
|
});
|
|
17495
17999
|
function Typeof(ctx, state2) {
|
|
17496
18000
|
return (0, import_lib2.$EVENT)(ctx, state2, "Typeof", Typeof$0);
|
|
17497
18001
|
}
|
|
17498
|
-
var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18002
|
+
var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L222, 'Undefined "undefined"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17499
18003
|
return { $loc, token: $1 };
|
|
17500
18004
|
});
|
|
17501
18005
|
function Undefined(ctx, state2) {
|
|
17502
18006
|
return (0, import_lib2.$EVENT)(ctx, state2, "Undefined", Undefined$0);
|
|
17503
18007
|
}
|
|
17504
|
-
var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18008
|
+
var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L223, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17505
18009
|
return { $loc, token: $1, negated: true };
|
|
17506
18010
|
});
|
|
17507
18011
|
function Unless(ctx, state2) {
|
|
17508
18012
|
return (0, import_lib2.$EVENT)(ctx, state2, "Unless", Unless$0);
|
|
17509
18013
|
}
|
|
17510
|
-
var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18014
|
+
var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L224, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17511
18015
|
return { $loc, token: $1, negated: true };
|
|
17512
18016
|
});
|
|
17513
18017
|
function Until(ctx, state2) {
|
|
17514
18018
|
return (0, import_lib2.$EVENT)(ctx, state2, "Until", Until$0);
|
|
17515
18019
|
}
|
|
17516
|
-
var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18020
|
+
var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L225, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17517
18021
|
return { $loc, token: $1 };
|
|
17518
18022
|
});
|
|
17519
18023
|
function Using(ctx, state2) {
|
|
17520
18024
|
return (0, import_lib2.$EVENT)(ctx, state2, "Using", Using$0);
|
|
17521
18025
|
}
|
|
17522
|
-
var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18026
|
+
var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L185, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17523
18027
|
return { $loc, token: $1 };
|
|
17524
18028
|
});
|
|
17525
18029
|
function Var(ctx, state2) {
|
|
17526
18030
|
return (0, import_lib2.$EVENT)(ctx, state2, "Var", Var$0);
|
|
17527
18031
|
}
|
|
17528
|
-
var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18032
|
+
var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L226, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17529
18033
|
return { $loc, token: $1 };
|
|
17530
18034
|
});
|
|
17531
18035
|
function Void(ctx, state2) {
|
|
17532
18036
|
return (0, import_lib2.$EVENT)(ctx, state2, "Void", Void$0);
|
|
17533
18037
|
}
|
|
17534
|
-
var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18038
|
+
var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L227, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17535
18039
|
return { $loc, token: "case" };
|
|
17536
18040
|
});
|
|
17537
18041
|
function When(ctx, state2) {
|
|
17538
18042
|
return (0, import_lib2.$EVENT)(ctx, state2, "When", When$0);
|
|
17539
18043
|
}
|
|
17540
|
-
var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18044
|
+
var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L228, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17541
18045
|
return { $loc, token: $1 };
|
|
17542
18046
|
});
|
|
17543
18047
|
function While(ctx, state2) {
|
|
17544
18048
|
return (0, import_lib2.$EVENT)(ctx, state2, "While", While$0);
|
|
17545
18049
|
}
|
|
17546
|
-
var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18050
|
+
var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L134, 'With "with"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17547
18051
|
return { $loc, token: $1 };
|
|
17548
18052
|
});
|
|
17549
18053
|
function With(ctx, state2) {
|
|
17550
18054
|
return (0, import_lib2.$EVENT)(ctx, state2, "With", With$0);
|
|
17551
18055
|
}
|
|
17552
|
-
var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18056
|
+
var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L229, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17553
18057
|
return { $loc, token: $1, type: "Yield" };
|
|
17554
18058
|
});
|
|
17555
18059
|
function Yield(ctx, state2) {
|
|
@@ -17626,7 +18130,7 @@ var JSXElement$$ = [JSXElement$0, JSXElement$1, JSXElement$2];
|
|
|
17626
18130
|
function JSXElement(ctx, state2) {
|
|
17627
18131
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
|
|
17628
18132
|
}
|
|
17629
|
-
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)($
|
|
18133
|
+
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)($L230, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
17630
18134
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
17631
18135
|
});
|
|
17632
18136
|
function JSXSelfClosingElement(ctx, state2) {
|
|
@@ -17659,7 +18163,7 @@ var JSXOptionalClosingElement$$ = [JSXOptionalClosingElement$0, JSXOptionalClosi
|
|
|
17659
18163
|
function JSXOptionalClosingElement(ctx, state2) {
|
|
17660
18164
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
|
|
17661
18165
|
}
|
|
17662
|
-
var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18166
|
+
var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L231, 'JSXClosingElement "</"'), (0, import_lib2.$E)(Whitespace), JSXElementName, (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L45, 'JSXClosingElement ">"'));
|
|
17663
18167
|
function JSXClosingElement(ctx, state2) {
|
|
17664
18168
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
|
|
17665
18169
|
}
|
|
@@ -17679,7 +18183,7 @@ var JSXFragment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)
|
|
|
17679
18183
|
];
|
|
17680
18184
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
17681
18185
|
});
|
|
17682
|
-
var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($
|
|
18186
|
+
var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($L232, 'JSXFragment "<>"'), (0, import_lib2.$E)(JSXChildren), (0, import_lib2.$E)(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
17683
18187
|
var children = $3;
|
|
17684
18188
|
$0 = $0.slice(1);
|
|
17685
18189
|
return {
|
|
@@ -17692,7 +18196,7 @@ var JSXFragment$$ = [JSXFragment$0, JSXFragment$1];
|
|
|
17692
18196
|
function JSXFragment(ctx, state2) {
|
|
17693
18197
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
|
|
17694
18198
|
}
|
|
17695
|
-
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
18199
|
+
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L232, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
17696
18200
|
state.JSXTagStack.push("");
|
|
17697
18201
|
return $1;
|
|
17698
18202
|
});
|
|
@@ -17708,11 +18212,11 @@ var JSXOptionalClosingFragment$$ = [JSXOptionalClosingFragment$0, JSXOptionalClo
|
|
|
17708
18212
|
function JSXOptionalClosingFragment(ctx, state2) {
|
|
17709
18213
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
|
|
17710
18214
|
}
|
|
17711
|
-
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($
|
|
18215
|
+
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L233, 'JSXClosingFragment "</>"');
|
|
17712
18216
|
function JSXClosingFragment(ctx, state2) {
|
|
17713
18217
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
|
|
17714
18218
|
}
|
|
17715
|
-
var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
18219
|
+
var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L178, 'JSXElementName "#"'), Dot), JSXShorthandString)), function($skip, $loc, $0, $1) {
|
|
17716
18220
|
return config.defaultElement;
|
|
17717
18221
|
});
|
|
17718
18222
|
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)))));
|
|
@@ -17889,7 +18393,7 @@ var JSXAttribute$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(Identifier, (0, im
|
|
|
17889
18393
|
}
|
|
17890
18394
|
return $skip;
|
|
17891
18395
|
});
|
|
17892
|
-
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18396
|
+
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L178, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
17893
18397
|
return [" ", "id=", $2];
|
|
17894
18398
|
});
|
|
17895
18399
|
var JSXAttribute$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
@@ -18225,7 +18729,7 @@ var JSXChildGeneral$$ = [JSXChildGeneral$0, JSXChildGeneral$1, JSXChildGeneral$2
|
|
|
18225
18729
|
function JSXChildGeneral(ctx, state2) {
|
|
18226
18730
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
|
|
18227
18731
|
}
|
|
18228
|
-
var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18732
|
+
var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L234, 'JSXComment "<!--"'), JSXCommentContent, (0, import_lib2.$EXPECT)($L235, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
|
|
18229
18733
|
return ["{/*", $2, "*/}"];
|
|
18230
18734
|
});
|
|
18231
18735
|
function JSXComment(ctx, state2) {
|
|
@@ -18509,37 +19013,37 @@ var InterfaceExtendsTarget$0 = ImplementsTarget;
|
|
|
18509
19013
|
function InterfaceExtendsTarget(ctx, state2) {
|
|
18510
19014
|
return (0, import_lib2.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
|
|
18511
19015
|
}
|
|
18512
|
-
var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19016
|
+
var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L236, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18513
19017
|
return { $loc, token: $1 };
|
|
18514
19018
|
});
|
|
18515
19019
|
function TypeKeyword(ctx, state2) {
|
|
18516
19020
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
|
|
18517
19021
|
}
|
|
18518
|
-
var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19022
|
+
var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L237, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18519
19023
|
return { $loc, token: $1 };
|
|
18520
19024
|
});
|
|
18521
19025
|
function Enum(ctx, state2) {
|
|
18522
19026
|
return (0, import_lib2.$EVENT)(ctx, state2, "Enum", Enum$0);
|
|
18523
19027
|
}
|
|
18524
|
-
var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19028
|
+
var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L238, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18525
19029
|
return { $loc, token: $1 };
|
|
18526
19030
|
});
|
|
18527
19031
|
function Interface(ctx, state2) {
|
|
18528
19032
|
return (0, import_lib2.$EVENT)(ctx, state2, "Interface", Interface$0);
|
|
18529
19033
|
}
|
|
18530
|
-
var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19034
|
+
var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L239, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18531
19035
|
return { $loc, token: $1 };
|
|
18532
19036
|
});
|
|
18533
19037
|
function Global(ctx, state2) {
|
|
18534
19038
|
return (0, import_lib2.$EVENT)(ctx, state2, "Global", Global$0);
|
|
18535
19039
|
}
|
|
18536
|
-
var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19040
|
+
var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L240, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18537
19041
|
return { $loc, token: $1 };
|
|
18538
19042
|
});
|
|
18539
19043
|
function Module(ctx, state2) {
|
|
18540
19044
|
return (0, import_lib2.$EVENT)(ctx, state2, "Module", Module$0);
|
|
18541
19045
|
}
|
|
18542
|
-
var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19046
|
+
var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L241, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18543
19047
|
return { $loc, token: $1 };
|
|
18544
19048
|
});
|
|
18545
19049
|
function Namespace(ctx, state2) {
|
|
@@ -18848,7 +19352,7 @@ var ReturnTypeSuffix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib
|
|
|
18848
19352
|
function ReturnTypeSuffix(ctx, state2) {
|
|
18849
19353
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
|
|
18850
19354
|
}
|
|
18851
|
-
var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
19355
|
+
var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L242, 'ReturnType "asserts"'), NonIdContinue)), ForbidIndentedApplication, (0, import_lib2.$E)(TypePredicate), RestoreIndentedApplication), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
18852
19356
|
var asserts = $1;
|
|
18853
19357
|
var t = $3;
|
|
18854
19358
|
if (!t) return $skip;
|
|
@@ -18941,8 +19445,8 @@ var TypeUnarySuffix$$ = [TypeUnarySuffix$0, TypeUnarySuffix$1, TypeUnarySuffix$2
|
|
|
18941
19445
|
function TypeUnarySuffix(ctx, state2) {
|
|
18942
19446
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
|
|
18943
19447
|
}
|
|
18944
|
-
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18945
|
-
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19448
|
+
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L243, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
19449
|
+
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L204, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
18946
19450
|
var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
|
|
18947
19451
|
function TypeUnaryOp(ctx, state2) {
|
|
18948
19452
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
|
|
@@ -18972,7 +19476,7 @@ var TypeIndexedAccess$$ = [TypeIndexedAccess$0, TypeIndexedAccess$1, TypeIndexed
|
|
|
18972
19476
|
function TypeIndexedAccess(ctx, state2) {
|
|
18973
19477
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
|
|
18974
19478
|
}
|
|
18975
|
-
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
19479
|
+
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L244, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
|
|
18976
19480
|
return { $loc, token: "unknown" };
|
|
18977
19481
|
});
|
|
18978
19482
|
function UnknownAlias(ctx, state2) {
|
|
@@ -18980,9 +19484,11 @@ function UnknownAlias(ctx, state2) {
|
|
|
18980
19484
|
}
|
|
18981
19485
|
var TypePrimary$0 = (0, import_lib2.$S)((0, import_lib2.$E)(_), Infer, (0, import_lib2.$E)(_), IdentifierName, (0, import_lib2.$E)((0, import_lib2.$S)(NotDedented, ExtendsToken, Type)));
|
|
18982
19486
|
var TypePrimary$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), Typeof, (0, import_lib2.$E)(_), UnaryExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
19487
|
+
var expression = $4;
|
|
18983
19488
|
return {
|
|
18984
|
-
type: "
|
|
18985
|
-
children: $0
|
|
19489
|
+
type: "TypeTypeof",
|
|
19490
|
+
children: $0,
|
|
19491
|
+
expression
|
|
18986
19492
|
};
|
|
18987
19493
|
});
|
|
18988
19494
|
var TypePrimary$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), TypeTuple), function($skip, $loc, $0, $1, $2) {
|
|
@@ -19347,13 +19853,13 @@ var TypeLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EX
|
|
|
19347
19853
|
if (sign[0] === "+") return num;
|
|
19348
19854
|
return $0;
|
|
19349
19855
|
});
|
|
19350
|
-
var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19856
|
+
var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L226, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
19351
19857
|
return { type: "VoidType", $loc, token: $1 };
|
|
19352
19858
|
});
|
|
19353
|
-
var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19859
|
+
var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L245, 'TypeLiteral "unique"'), _, (0, import_lib2.$EXPECT)($L246, 'TypeLiteral "symbol"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
19354
19860
|
return { type: "UniqueSymbolType", children: $0 };
|
|
19355
19861
|
});
|
|
19356
|
-
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
19862
|
+
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L247, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
19357
19863
|
return { $loc, token: "[]" };
|
|
19358
19864
|
});
|
|
19359
19865
|
var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
|
|
@@ -19372,7 +19878,7 @@ var InlineInterfacePropertyDelimiter$0 = (0, import_lib2.$C)((0, import_lib2.$S)
|
|
|
19372
19878
|
var InlineInterfacePropertyDelimiter$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)(SameLineOrIndentedFurther, InlineBasicInterfaceProperty)), InsertComma), function(value) {
|
|
19373
19879
|
return value[1];
|
|
19374
19880
|
});
|
|
19375
|
-
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)($
|
|
19881
|
+
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)($L143, 'InlineInterfacePropertyDelimiter ")"'), (0, import_lib2.$EXPECT)($L46, 'InlineInterfacePropertyDelimiter "]"'), (0, import_lib2.$EXPECT)($L37, 'InlineInterfacePropertyDelimiter "}"'))));
|
|
19376
19882
|
var InlineInterfacePropertyDelimiter$3 = (0, import_lib2.$Y)(EOS);
|
|
19377
19883
|
var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
|
|
19378
19884
|
function InlineInterfacePropertyDelimiter(ctx, state2) {
|
|
@@ -19612,7 +20118,7 @@ var CivetPrologue$$ = [CivetPrologue$0, CivetPrologue$1];
|
|
|
19612
20118
|
function CivetPrologue(ctx, state2) {
|
|
19613
20119
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
|
|
19614
20120
|
}
|
|
19615
|
-
var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
20121
|
+
var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L248, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib2.$Q)(CivetOption), (0, import_lib2.$EXPECT)($R98, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
19616
20122
|
var options = $3;
|
|
19617
20123
|
return {
|
|
19618
20124
|
type: "CivetPrologue",
|
|
@@ -20321,7 +20827,7 @@ __export(sourcemap_civet_exports, {
|
|
|
20321
20827
|
locationTable: () => locationTable,
|
|
20322
20828
|
lookupLineColumn: () => lookupLineColumn
|
|
20323
20829
|
});
|
|
20324
|
-
|
|
20830
|
+
function locationTable(input) {
|
|
20325
20831
|
const linesRe = /([^\r\n]*)(\r\n|\r|\n|$)/y;
|
|
20326
20832
|
const lines = [];
|
|
20327
20833
|
let line = 0;
|
|
@@ -20336,96 +20842,108 @@ var locationTable = function(input) {
|
|
|
20336
20842
|
}
|
|
20337
20843
|
}
|
|
20338
20844
|
return lines;
|
|
20339
|
-
}
|
|
20340
|
-
|
|
20845
|
+
}
|
|
20846
|
+
function lookupLineColumn(table, pos) {
|
|
20341
20847
|
let l = 0;
|
|
20342
20848
|
let prevEnd = 0;
|
|
20343
20849
|
while (table[l] <= pos) {
|
|
20344
20850
|
prevEnd = table[l++];
|
|
20345
20851
|
}
|
|
20346
20852
|
return [l, pos - prevEnd];
|
|
20347
|
-
}
|
|
20348
|
-
var
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20354
|
-
|
|
20355
|
-
|
|
20356
|
-
|
|
20357
|
-
|
|
20358
|
-
|
|
20359
|
-
|
|
20360
|
-
|
|
20361
|
-
|
|
20362
|
-
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20853
|
+
}
|
|
20854
|
+
var EOL2 = /\r?\n|\r/;
|
|
20855
|
+
var SourceMap = class {
|
|
20856
|
+
lines;
|
|
20857
|
+
line;
|
|
20858
|
+
colOffset;
|
|
20859
|
+
// relative to previous entry
|
|
20860
|
+
srcLine;
|
|
20861
|
+
srcColumn;
|
|
20862
|
+
srcOffset;
|
|
20863
|
+
srcTable;
|
|
20864
|
+
source;
|
|
20865
|
+
constructor(source1) {
|
|
20866
|
+
this.source = source1;
|
|
20867
|
+
this.lines = [[]];
|
|
20868
|
+
this.line = 0;
|
|
20869
|
+
this.colOffset = 0;
|
|
20870
|
+
this.srcLine = 0;
|
|
20871
|
+
this.srcColumn = 0;
|
|
20872
|
+
this.srcOffset = 0;
|
|
20873
|
+
this.srcTable = locationTable(this.source);
|
|
20874
|
+
}
|
|
20875
|
+
renderMappings() {
|
|
20876
|
+
let lastSourceLine = 0;
|
|
20877
|
+
let lastSourceColumn = 0;
|
|
20878
|
+
return (() => {
|
|
20879
|
+
const results = [];
|
|
20880
|
+
for (let ref1 = this.lines, i1 = 0, len3 = ref1.length; i1 < len3; i1++) {
|
|
20881
|
+
const line = ref1[i1];
|
|
20882
|
+
results.push((() => {
|
|
20883
|
+
const results1 = [];
|
|
20884
|
+
for (let i2 = 0, len1 = line.length; i2 < len1; i2++) {
|
|
20885
|
+
const entry = line[i2];
|
|
20886
|
+
if (entry.length === 4) {
|
|
20887
|
+
let [colDelta, sourceFileIndex, srcLine, srcCol] = entry;
|
|
20888
|
+
const lineDelta = srcLine - lastSourceLine;
|
|
20889
|
+
colDelta = srcCol - lastSourceColumn;
|
|
20890
|
+
lastSourceLine = srcLine;
|
|
20891
|
+
lastSourceColumn = srcCol;
|
|
20892
|
+
results1.push(`${encodeVlq(entry[0])}${encodeVlq(sourceFileIndex)}${encodeVlq(lineDelta)}${encodeVlq(colDelta)}`);
|
|
20893
|
+
} else {
|
|
20894
|
+
results1.push(encodeVlq(entry[0]));
|
|
20895
|
+
}
|
|
20380
20896
|
}
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
|
|
20395
|
-
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
|
|
20897
|
+
return results1;
|
|
20898
|
+
})().join(","));
|
|
20899
|
+
}
|
|
20900
|
+
return results;
|
|
20901
|
+
})().join(";");
|
|
20902
|
+
}
|
|
20903
|
+
json(srcFileName, outFileName) {
|
|
20904
|
+
return {
|
|
20905
|
+
version: 3,
|
|
20906
|
+
file: outFileName,
|
|
20907
|
+
sources: [srcFileName],
|
|
20908
|
+
mappings: this.renderMappings(),
|
|
20909
|
+
names: [],
|
|
20910
|
+
sourcesContent: [this.source],
|
|
20911
|
+
toString: function() {
|
|
20912
|
+
return JSON.stringify(this);
|
|
20913
|
+
}
|
|
20914
|
+
};
|
|
20915
|
+
}
|
|
20916
|
+
updateSourceMap(outputStr, inputPos, colOffset = 0) {
|
|
20917
|
+
const outLines = outputStr.split(EOL2);
|
|
20918
|
+
let srcLine, srcCol;
|
|
20919
|
+
if (inputPos != null) {
|
|
20920
|
+
[srcLine, srcCol] = lookupLineColumn(this.srcTable, inputPos);
|
|
20921
|
+
srcCol += colOffset;
|
|
20922
|
+
this.srcLine = srcLine;
|
|
20923
|
+
this.srcColumn = srcCol;
|
|
20924
|
+
this.srcOffset = inputPos + outputStr.length;
|
|
20925
|
+
}
|
|
20926
|
+
for (let i3 = 0, len22 = outLines.length; i3 < len22; i3++) {
|
|
20927
|
+
const i = i3;
|
|
20928
|
+
const line = outLines[i3];
|
|
20929
|
+
if (i > 0) {
|
|
20930
|
+
this.line++;
|
|
20931
|
+
this.srcLine++;
|
|
20932
|
+
this.colOffset = 0;
|
|
20933
|
+
this.lines[this.line] = [];
|
|
20934
|
+
this.srcColumn = srcCol = colOffset;
|
|
20935
|
+
}
|
|
20936
|
+
const l = this.colOffset;
|
|
20937
|
+
this.colOffset = line.length;
|
|
20938
|
+
this.srcColumn += line.length;
|
|
20400
20939
|
if (inputPos != null) {
|
|
20401
|
-
[
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
sm.srcColumn = srcCol;
|
|
20405
|
-
sm.srcOffset = inputPos + outputStr.length;
|
|
20406
|
-
}
|
|
20407
|
-
for (let i1 = 0, len3 = outLines.length; i1 < len3; i1++) {
|
|
20408
|
-
const i = i1;
|
|
20409
|
-
const line = outLines[i1];
|
|
20410
|
-
if (i > 0) {
|
|
20411
|
-
sm.line++;
|
|
20412
|
-
sm.srcLine++;
|
|
20413
|
-
sm.colOffset = 0;
|
|
20414
|
-
sm.lines[sm.line] = [];
|
|
20415
|
-
sm.srcColumn = srcCol = colOffset;
|
|
20416
|
-
}
|
|
20417
|
-
const l = sm.colOffset;
|
|
20418
|
-
sm.colOffset = line.length;
|
|
20419
|
-
sm.srcColumn += line.length;
|
|
20420
|
-
if (inputPos != null) {
|
|
20421
|
-
sm.lines[sm.line].push([l, 0, srcLine + i, srcCol]);
|
|
20422
|
-
} else if (l != 0) {
|
|
20423
|
-
sm.lines[sm.line].push([l]);
|
|
20424
|
-
}
|
|
20940
|
+
this.lines[this.line].push([l, 0, srcLine + i, srcCol]);
|
|
20941
|
+
} else if (l != 0) {
|
|
20942
|
+
this.lines[this.line].push([l]);
|
|
20425
20943
|
}
|
|
20426
|
-
return;
|
|
20427
20944
|
}
|
|
20428
|
-
|
|
20945
|
+
return;
|
|
20946
|
+
}
|
|
20429
20947
|
};
|
|
20430
20948
|
var smRegexp = /\n\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,([+a-zA-Z0-9\/]*=?=?)$/;
|
|
20431
20949
|
var remap = function(codeWithSourceMap, upstreamMap, sourcePath, targetPath) {
|
|
@@ -20436,8 +20954,8 @@ var remap = function(codeWithSourceMap, upstreamMap, sourcePath, targetPath) {
|
|
|
20436
20954
|
});
|
|
20437
20955
|
if (sourceMapText) {
|
|
20438
20956
|
const parsed = parseWithLines(sourceMapText);
|
|
20439
|
-
const composedLines = composeLines(upstreamMap.
|
|
20440
|
-
upstreamMap.
|
|
20957
|
+
const composedLines = composeLines(upstreamMap.lines, parsed.lines);
|
|
20958
|
+
upstreamMap.lines = composedLines;
|
|
20441
20959
|
}
|
|
20442
20960
|
const remappedSourceMapJSON = upstreamMap.json(sourcePath, targetPath);
|
|
20443
20961
|
const newSourceMap = `${"sourceMapping"}URL=data:application/json;charset=utf-8;base64,${base64Encode(JSON.stringify(remappedSourceMapJSON))}`;
|
|
@@ -20499,10 +21017,10 @@ var VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT;
|
|
|
20499
21017
|
var VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1;
|
|
20500
21018
|
var encodeVlq = function(value) {
|
|
20501
21019
|
let answer = "";
|
|
20502
|
-
let
|
|
20503
|
-
if (value < 0)
|
|
20504
|
-
else
|
|
20505
|
-
const signBit =
|
|
21020
|
+
let ref2;
|
|
21021
|
+
if (value < 0) ref2 = 1;
|
|
21022
|
+
else ref2 = 0;
|
|
21023
|
+
const signBit = ref2;
|
|
20506
21024
|
let valueToEncode = (Math.abs(value) << 1) + signBit;
|
|
20507
21025
|
while (valueToEncode || !answer) {
|
|
20508
21026
|
let nextChunk = valueToEncode & VLQ_VALUE_MASK;
|
|
@@ -20674,8 +21192,8 @@ var WorkerPool = class {
|
|
|
20674
21192
|
async run(op, ...args) {
|
|
20675
21193
|
const id = this.jobId++;
|
|
20676
21194
|
return await new Promise(async (resolve2, reject) => {
|
|
20677
|
-
this.callbacks.set(id, { resolve: resolve2, reject });
|
|
20678
21195
|
const job = { id, op, args };
|
|
21196
|
+
this.callbacks.set(id, { job, resolve: resolve2, reject });
|
|
20679
21197
|
if (this.idle.length) {
|
|
20680
21198
|
const worker = this.idle.shift();
|
|
20681
21199
|
worker.ref();
|
|
@@ -20702,8 +21220,32 @@ var WorkerPool = class {
|
|
|
20702
21220
|
const callback = this.callbacks.get(response.id);
|
|
20703
21221
|
this.callbacks.delete(response.id);
|
|
20704
21222
|
if (response.error) {
|
|
20705
|
-
|
|
21223
|
+
const message = `${response.error.name}: ${response.error.message}`;
|
|
21224
|
+
let ref;
|
|
21225
|
+
if (response.error.type in globalThis) {
|
|
21226
|
+
ref = new globalThis[response.error.type](message);
|
|
21227
|
+
} else {
|
|
21228
|
+
ref = new Error(message);
|
|
21229
|
+
}
|
|
21230
|
+
;
|
|
21231
|
+
const error = ref;
|
|
21232
|
+
try {
|
|
21233
|
+
error.name = response.error.name;
|
|
21234
|
+
} catch (e) {
|
|
21235
|
+
}
|
|
21236
|
+
callback.reject(error);
|
|
20706
21237
|
} else {
|
|
21238
|
+
let ref1;
|
|
21239
|
+
if (ref1 = response.result?.sourceMap) {
|
|
21240
|
+
const sourceMap = ref1;
|
|
21241
|
+
response.result.sourceMap = new SourceMap(sourceMap.source);
|
|
21242
|
+
Object.assign(response.result.sourceMap, sourceMap);
|
|
21243
|
+
}
|
|
21244
|
+
let ref2;
|
|
21245
|
+
if (ref2 = callback.job.args[1]?.errors) {
|
|
21246
|
+
const errors = ref2;
|
|
21247
|
+
errors.splice(0, 1 / 0, ...response.errors);
|
|
21248
|
+
}
|
|
20707
21249
|
callback.resolve(response.result);
|
|
20708
21250
|
}
|
|
20709
21251
|
if (this.spawned > this.threads) {
|
|
@@ -20887,7 +21429,7 @@ ${counts}`;
|
|
|
20887
21429
|
return;
|
|
20888
21430
|
}
|
|
20889
21431
|
if (options.sourceMap || options.inlineMap) {
|
|
20890
|
-
options.sourceMap = SourceMap2(src);
|
|
21432
|
+
options.sourceMap = new SourceMap2(src);
|
|
20891
21433
|
const code = generate_civet_default(ast2, options);
|
|
20892
21434
|
checkErrors();
|
|
20893
21435
|
if (options.inlineMap) {
|
|
@@ -20902,7 +21444,7 @@ ${counts}`;
|
|
|
20902
21444
|
const result = generate_civet_default(ast2, options);
|
|
20903
21445
|
if (options.errors?.length) {
|
|
20904
21446
|
delete options.errors;
|
|
20905
|
-
options.sourceMap = SourceMap2(src);
|
|
21447
|
+
options.sourceMap = new SourceMap2(src);
|
|
20906
21448
|
generate_civet_default(ast2, options);
|
|
20907
21449
|
checkErrors();
|
|
20908
21450
|
}
|