@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.js
CHANGED
|
@@ -57,7 +57,7 @@ var require_machine = __commonJS({
|
|
|
57
57
|
$EVENT: () => $EVENT2,
|
|
58
58
|
$EVENT_C: () => $EVENT_C2,
|
|
59
59
|
$EXPECT: () => $EXPECT2,
|
|
60
|
-
$L: () => $
|
|
60
|
+
$L: () => $L249,
|
|
61
61
|
$N: () => $N2,
|
|
62
62
|
$P: () => $P2,
|
|
63
63
|
$Q: () => $Q2,
|
|
@@ -82,7 +82,7 @@ var require_machine = __commonJS({
|
|
|
82
82
|
return result;
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
function $
|
|
85
|
+
function $L249(str) {
|
|
86
86
|
return function(_ctx, state2) {
|
|
87
87
|
const { input, pos } = state2, { length } = str, end = pos + length;
|
|
88
88
|
if (input.substring(pos, end) === str) {
|
|
@@ -513,6 +513,7 @@ __export(lib_civet_exports, {
|
|
|
513
513
|
append: () => append,
|
|
514
514
|
attachPostfixStatementAsExpression: () => attachPostfixStatementAsExpression,
|
|
515
515
|
blockWithPrefix: () => blockWithPrefix,
|
|
516
|
+
braceBlock: () => braceBlock,
|
|
516
517
|
convertNamedImportsToObject: () => convertNamedImportsToObject,
|
|
517
518
|
convertObjectToJSXAttributes: () => convertObjectToJSXAttributes,
|
|
518
519
|
convertWithClause: () => convertWithClause,
|
|
@@ -993,6 +994,57 @@ function literalValue(literal) {
|
|
|
993
994
|
}
|
|
994
995
|
}
|
|
995
996
|
}
|
|
997
|
+
function literalType(literal) {
|
|
998
|
+
let t;
|
|
999
|
+
switch (literal.type) {
|
|
1000
|
+
case "RegularExpressionLiteral": {
|
|
1001
|
+
t = "RegExp";
|
|
1002
|
+
break;
|
|
1003
|
+
}
|
|
1004
|
+
case "TemplateLiteral": {
|
|
1005
|
+
t = "string";
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
case "Literal": {
|
|
1009
|
+
switch (literal.subtype) {
|
|
1010
|
+
case "NullLiteral": {
|
|
1011
|
+
t = "null";
|
|
1012
|
+
break;
|
|
1013
|
+
}
|
|
1014
|
+
case "BooleanLiteral": {
|
|
1015
|
+
t = "boolean";
|
|
1016
|
+
break;
|
|
1017
|
+
}
|
|
1018
|
+
case "NumericLiteral": {
|
|
1019
|
+
if (literal.raw.endsWith("n")) {
|
|
1020
|
+
t = "bigint";
|
|
1021
|
+
} else {
|
|
1022
|
+
t = "number";
|
|
1023
|
+
}
|
|
1024
|
+
;
|
|
1025
|
+
break;
|
|
1026
|
+
}
|
|
1027
|
+
case "StringLiteral": {
|
|
1028
|
+
t = "string";
|
|
1029
|
+
break;
|
|
1030
|
+
}
|
|
1031
|
+
default: {
|
|
1032
|
+
throw new Error(`unknown literal subtype ${literal.subtype}`);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
;
|
|
1036
|
+
break;
|
|
1037
|
+
}
|
|
1038
|
+
default: {
|
|
1039
|
+
throw new Error(`unknown literal type ${literal.type}`);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
return {
|
|
1043
|
+
type: "TypeLiteral",
|
|
1044
|
+
t,
|
|
1045
|
+
children: [t]
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
996
1048
|
function makeNumericLiteral(n) {
|
|
997
1049
|
const s = n.toString();
|
|
998
1050
|
return {
|
|
@@ -1305,7 +1357,7 @@ function skipIfOnlyWS(target) {
|
|
|
1305
1357
|
return target;
|
|
1306
1358
|
}
|
|
1307
1359
|
function spliceChild(node, child, del, ...replacements) {
|
|
1308
|
-
const children = node
|
|
1360
|
+
const children = Array.isArray(node) ? node : node.children;
|
|
1309
1361
|
if (!Array.isArray(children)) {
|
|
1310
1362
|
throw new Error("spliceChild: non-array node has no children field");
|
|
1311
1363
|
}
|
|
@@ -1740,14 +1792,41 @@ function gatherBindingCode(statements, opts) {
|
|
|
1740
1792
|
const thisAssignments = [];
|
|
1741
1793
|
const splices = [];
|
|
1742
1794
|
function insertRestSplices(s, p, thisAssignments2) {
|
|
1743
|
-
|
|
1744
|
-
|
|
1795
|
+
let m;
|
|
1796
|
+
for (let ref2 = gatherRecursiveAll(
|
|
1797
|
+
s,
|
|
1798
|
+
(n) => n.blockPrefix || opts?.injectParamProps && n.accessModifier || n.type === "AtBinding" || opts?.assignPins && (m = n.type, m === "PinPattern" || m === "PinProperty")
|
|
1799
|
+
), i3 = 0, len22 = ref2.length; i3 < len22; i3++) {
|
|
1800
|
+
let n = ref2[i3];
|
|
1745
1801
|
if (n.type === "AtBinding") {
|
|
1746
1802
|
const { ref } = n;
|
|
1747
1803
|
const { id } = ref;
|
|
1748
1804
|
thisAssignments2.push([`this.${id} = `, ref]);
|
|
1749
1805
|
continue;
|
|
1750
1806
|
}
|
|
1807
|
+
if (opts?.assignPins) {
|
|
1808
|
+
if (n.type === "PinProperty") {
|
|
1809
|
+
n.children = n.children.flatMap(($2) => $2 === n.name ? [n.name, ": ", n.value] : $2);
|
|
1810
|
+
updateParentPointers(n);
|
|
1811
|
+
n = n.value;
|
|
1812
|
+
}
|
|
1813
|
+
if (n.type === "PinPattern") {
|
|
1814
|
+
n.ref = makeRef(
|
|
1815
|
+
n.expression.type === "Identifier" ? n.expression.name : "pin"
|
|
1816
|
+
);
|
|
1817
|
+
n.children = [n.ref];
|
|
1818
|
+
updateParentPointers(n);
|
|
1819
|
+
thisAssignments2.push({
|
|
1820
|
+
type: "AssignmentExpression",
|
|
1821
|
+
children: [n.expression, " = ", n.ref],
|
|
1822
|
+
names: [],
|
|
1823
|
+
lhs: n.expression,
|
|
1824
|
+
assigned: n.expression,
|
|
1825
|
+
expression: n.ref
|
|
1826
|
+
});
|
|
1827
|
+
continue;
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1751
1830
|
if (opts?.injectParamProps && n.type === "Parameter" && n.accessModifier) {
|
|
1752
1831
|
for (let ref3 = n.names, i4 = 0, len3 = ref3.length; i4 < len3; i4++) {
|
|
1753
1832
|
const id = ref3[i4];
|
|
@@ -1931,16 +2010,18 @@ var declareHelper = {
|
|
|
1931
2010
|
"\n"
|
|
1932
2011
|
]]);
|
|
1933
2012
|
},
|
|
1934
|
-
|
|
1935
|
-
const RSliceable = makeRef("RSliceable");
|
|
2013
|
+
RSliceable(RSliceableRef) {
|
|
1936
2014
|
state.prelude.push([
|
|
1937
2015
|
"",
|
|
1938
|
-
ts(["type ",
|
|
2016
|
+
ts(["type ", RSliceableRef, "<R> = string | {length: number; slice(start: number, end: number): {reverse(): R}}\n"])
|
|
1939
2017
|
]);
|
|
2018
|
+
},
|
|
2019
|
+
rslice(rsliceRef) {
|
|
2020
|
+
const RSliceableRef = getHelperRef("RSliceable");
|
|
1940
2021
|
state.prelude.push(["", [
|
|
1941
2022
|
preludeVar,
|
|
1942
2023
|
rsliceRef,
|
|
1943
|
-
ts([": <R, T extends string | ",
|
|
2024
|
+
ts([": <R, T extends string | ", RSliceableRef, "<R>>(a: T, start?: number, end?: number) => T extends string ? string : T extends ", RSliceableRef, "<infer R> ? R : never"]),
|
|
1944
2025
|
" = ((a, start = -1, end = -1) => {\n",
|
|
1945
2026
|
" const l = a.length\n",
|
|
1946
2027
|
" if (start < 0) start += l\n",
|
|
@@ -1959,6 +2040,72 @@ var declareHelper = {
|
|
|
1959
2040
|
"})"
|
|
1960
2041
|
], ";\n"]);
|
|
1961
2042
|
},
|
|
2043
|
+
range(rangeRef) {
|
|
2044
|
+
state.prelude.push(["", [
|
|
2045
|
+
preludeVar,
|
|
2046
|
+
rangeRef,
|
|
2047
|
+
ts([": (start: number, end: number) => number[]"]),
|
|
2048
|
+
" ",
|
|
2049
|
+
`= (start, end) => {
|
|
2050
|
+
const length = end - start;
|
|
2051
|
+
if (length <= 0) return [];
|
|
2052
|
+
const arr = Array(length);
|
|
2053
|
+
for (let i = 0; i < length; ++i) {
|
|
2054
|
+
arr[i] = i + start;
|
|
2055
|
+
}
|
|
2056
|
+
return arr;
|
|
2057
|
+
}`
|
|
2058
|
+
], ";\n"]);
|
|
2059
|
+
},
|
|
2060
|
+
revRange(revRangeRef) {
|
|
2061
|
+
state.prelude.push(["", [
|
|
2062
|
+
preludeVar,
|
|
2063
|
+
revRangeRef,
|
|
2064
|
+
ts([": (start: number, end: number) => number[]"]),
|
|
2065
|
+
" ",
|
|
2066
|
+
`= (start, end) => {
|
|
2067
|
+
const length = start - end;
|
|
2068
|
+
if (length <= 0) return [];
|
|
2069
|
+
const arr = Array(length);
|
|
2070
|
+
for (let i = 0; i < length; ++i) {
|
|
2071
|
+
arr[i] = start - i;
|
|
2072
|
+
}
|
|
2073
|
+
return arr;
|
|
2074
|
+
}`
|
|
2075
|
+
], ";\n"]);
|
|
2076
|
+
},
|
|
2077
|
+
stringRange(stringRangeRef) {
|
|
2078
|
+
state.prelude.push(["", [
|
|
2079
|
+
preludeVar,
|
|
2080
|
+
stringRangeRef,
|
|
2081
|
+
ts([": (start: number, length: number) => string[]"]),
|
|
2082
|
+
" ",
|
|
2083
|
+
`= (start, length) => {
|
|
2084
|
+
if (length <= 0) return [];
|
|
2085
|
+
const arr = Array(length);
|
|
2086
|
+
for (let i = 0; i < length; ++i) {
|
|
2087
|
+
arr[i] = String.fromCharCode(start + i);
|
|
2088
|
+
}
|
|
2089
|
+
return arr;
|
|
2090
|
+
}`
|
|
2091
|
+
], ";\n"]);
|
|
2092
|
+
},
|
|
2093
|
+
revStringRange(revStringRangeRef) {
|
|
2094
|
+
state.prelude.push(["", [
|
|
2095
|
+
preludeVar,
|
|
2096
|
+
revStringRangeRef,
|
|
2097
|
+
ts([": (start: number, length: number) => string[]"]),
|
|
2098
|
+
" ",
|
|
2099
|
+
`= (start, length) => {
|
|
2100
|
+
if (length <= 0) return [];
|
|
2101
|
+
const arr = Array(length);
|
|
2102
|
+
for (let i = 0; i < length; ++i) {
|
|
2103
|
+
arr[i] = String.fromCharCode(start - i);
|
|
2104
|
+
}
|
|
2105
|
+
return arr;
|
|
2106
|
+
}`
|
|
2107
|
+
], ";\n"]);
|
|
2108
|
+
},
|
|
1962
2109
|
div(divRef) {
|
|
1963
2110
|
state.prelude.push(["", [
|
|
1964
2111
|
// [indent, statement]
|
|
@@ -2101,9 +2248,28 @@ function peekHelperRef(base) {
|
|
|
2101
2248
|
return state.helperRefs[base];
|
|
2102
2249
|
}
|
|
2103
2250
|
function extractPreludeFor(node) {
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2251
|
+
if (!state.prelude.length) {
|
|
2252
|
+
return state.prelude;
|
|
2253
|
+
}
|
|
2254
|
+
const allHelpers = new Set(Object.values(state.helperRefs));
|
|
2255
|
+
const isHelper = allHelpers.has.bind(allHelpers);
|
|
2256
|
+
const usedHelpers = new Set(gatherRecursive(node, isHelper));
|
|
2257
|
+
while (true) {
|
|
2258
|
+
let prelude = state.prelude.filter((s) => {
|
|
2259
|
+
return gatherRecursive(s, usedHelpers.has.bind(usedHelpers)).length;
|
|
2260
|
+
});
|
|
2261
|
+
let changed = false;
|
|
2262
|
+
for (let ref1 = gatherRecursive(prelude, isHelper), i = 0, len3 = ref1.length; i < len3; i++) {
|
|
2263
|
+
const helper = ref1[i];
|
|
2264
|
+
if (!usedHelpers.has(helper)) {
|
|
2265
|
+
usedHelpers.add(helper);
|
|
2266
|
+
changed = true;
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
if (!changed) {
|
|
2270
|
+
return prelude;
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2107
2273
|
}
|
|
2108
2274
|
|
|
2109
2275
|
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\generate.civet.jsx
|
|
@@ -2115,7 +2281,8 @@ function stringify(node) {
|
|
|
2115
2281
|
}
|
|
2116
2282
|
}
|
|
2117
2283
|
function gen(root, options) {
|
|
2118
|
-
|
|
2284
|
+
let ref;
|
|
2285
|
+
const updateSourceMap = (ref = options?.sourceMap)?.updateSourceMap.bind(ref);
|
|
2119
2286
|
return recurse(root);
|
|
2120
2287
|
function recurse(node) {
|
|
2121
2288
|
if (!(node != null)) {
|
|
@@ -2140,15 +2307,15 @@ function gen(root, options) {
|
|
|
2140
2307
|
let line = "?";
|
|
2141
2308
|
let column = "?";
|
|
2142
2309
|
let offset;
|
|
2143
|
-
let
|
|
2144
|
-
if (
|
|
2145
|
-
const sourceMap =
|
|
2310
|
+
let ref1;
|
|
2311
|
+
if (ref1 = options.sourceMap) {
|
|
2312
|
+
const sourceMap = ref1;
|
|
2146
2313
|
if (node.$loc != null) {
|
|
2147
2314
|
sourceMap.updateSourceMap("", node.$loc.pos);
|
|
2148
2315
|
}
|
|
2149
|
-
line = sourceMap.
|
|
2150
|
-
column = sourceMap.
|
|
2151
|
-
offset = sourceMap.
|
|
2316
|
+
line = sourceMap.srcLine + 1;
|
|
2317
|
+
column = sourceMap.srcColumn + 1;
|
|
2318
|
+
offset = sourceMap.srcOffset;
|
|
2152
2319
|
}
|
|
2153
2320
|
options.errors ??= [];
|
|
2154
2321
|
options.errors.push(new import_lib2.ParseError(
|
|
@@ -3199,9 +3366,30 @@ function wrapIterationReturningResults(statement, collect) {
|
|
|
3199
3366
|
if (statement.resultsRef != null) {
|
|
3200
3367
|
return;
|
|
3201
3368
|
}
|
|
3202
|
-
|
|
3369
|
+
if (statement.resultsParent) {
|
|
3370
|
+
const { ancestor: ancestor2 } = findAncestor(
|
|
3371
|
+
statement,
|
|
3372
|
+
($5) => $5.type === "ForStatement" || $5.type === "IterationStatement",
|
|
3373
|
+
isFunction
|
|
3374
|
+
);
|
|
3375
|
+
if (!ancestor2) {
|
|
3376
|
+
statement.children.unshift({
|
|
3377
|
+
type: "Error",
|
|
3378
|
+
message: "Could not find ancestor of spread iteration"
|
|
3379
|
+
});
|
|
3380
|
+
return;
|
|
3381
|
+
}
|
|
3382
|
+
const resultsRef2 = statement.resultsRef = ancestor2.resultsRef;
|
|
3383
|
+
iterationDefaultBody(statement);
|
|
3384
|
+
const { block } = statement;
|
|
3385
|
+
if (!block.empty) {
|
|
3386
|
+
assignResults(block, (node) => [resultsRef2, ".push(", node, ")"]);
|
|
3387
|
+
}
|
|
3388
|
+
return;
|
|
3389
|
+
}
|
|
3390
|
+
const resultsRef = statement.resultsRef ??= makeRef("results");
|
|
3203
3391
|
const declaration = iterationDeclaration(statement);
|
|
3204
|
-
const { ancestor, child } = findAncestor(statement, ($
|
|
3392
|
+
const { ancestor, child } = findAncestor(statement, ($6) => $6.type === "BlockStatement");
|
|
3205
3393
|
assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
|
|
3206
3394
|
const index = findChildIndex(ancestor.expressions, child);
|
|
3207
3395
|
assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
|
|
@@ -3245,6 +3433,9 @@ function iterationDeclaration(statement) {
|
|
|
3245
3433
|
case "every": {
|
|
3246
3434
|
return "true";
|
|
3247
3435
|
}
|
|
3436
|
+
case "first": {
|
|
3437
|
+
return "undefined";
|
|
3438
|
+
}
|
|
3248
3439
|
case "min": {
|
|
3249
3440
|
return "Infinity";
|
|
3250
3441
|
}
|
|
@@ -3257,6 +3448,9 @@ function iterationDeclaration(statement) {
|
|
|
3257
3448
|
case "join": {
|
|
3258
3449
|
return '""';
|
|
3259
3450
|
}
|
|
3451
|
+
case "concat": {
|
|
3452
|
+
return "[]";
|
|
3453
|
+
}
|
|
3260
3454
|
default: {
|
|
3261
3455
|
return "0";
|
|
3262
3456
|
}
|
|
@@ -3301,10 +3495,16 @@ function iterationDeclaration(statement) {
|
|
|
3301
3495
|
case "count": {
|
|
3302
3496
|
return ["if (", node, ") ++", resultsRef];
|
|
3303
3497
|
}
|
|
3498
|
+
case "first": {
|
|
3499
|
+
return [resultsRef, " = ", node, "; break"];
|
|
3500
|
+
}
|
|
3304
3501
|
case "sum":
|
|
3305
3502
|
case "join": {
|
|
3306
3503
|
return [resultsRef, " += ", node];
|
|
3307
3504
|
}
|
|
3505
|
+
case "concat": {
|
|
3506
|
+
return [getHelperRef("concatAssign"), "(", resultsRef, ", ", node, ")"];
|
|
3507
|
+
}
|
|
3308
3508
|
case "product": {
|
|
3309
3509
|
return [resultsRef, " *= ", node];
|
|
3310
3510
|
}
|
|
@@ -3358,31 +3558,34 @@ function iterationDefaultBody(statement) {
|
|
|
3358
3558
|
}
|
|
3359
3559
|
}
|
|
3360
3560
|
}
|
|
3361
|
-
if (statement.type === "ForStatement"
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
if (
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3561
|
+
if (statement.type === "ForStatement") {
|
|
3562
|
+
const declaration = statement.eachDeclaration ?? statement.declaration;
|
|
3563
|
+
if (declaration?.type === "ForDeclaration") {
|
|
3564
|
+
if (reduction) {
|
|
3565
|
+
const bindings = patternBindings(declaration.binding.pattern);
|
|
3566
|
+
if (bindings.length) {
|
|
3567
|
+
fillBlock(["", bindings[0]]);
|
|
3568
|
+
for (const binding of bindings.slice(1)) {
|
|
3569
|
+
binding.children.unshift({
|
|
3570
|
+
type: "Error",
|
|
3571
|
+
subtype: "Warning",
|
|
3572
|
+
message: "Ignored binding in reduction loop with implicit body"
|
|
3573
|
+
});
|
|
3574
|
+
}
|
|
3575
|
+
} else {
|
|
3576
|
+
fillBlock([
|
|
3577
|
+
"",
|
|
3578
|
+
{
|
|
3579
|
+
type: "Error",
|
|
3580
|
+
message: "Empty binding pattern in reduction loop with implicit body"
|
|
3581
|
+
}
|
|
3582
|
+
]);
|
|
3372
3583
|
}
|
|
3373
3584
|
} else {
|
|
3374
|
-
fillBlock([
|
|
3375
|
-
"",
|
|
3376
|
-
{
|
|
3377
|
-
type: "Error",
|
|
3378
|
-
message: "Empty binding pattern in reduction loop with implicit body"
|
|
3379
|
-
}
|
|
3380
|
-
]);
|
|
3585
|
+
fillBlock(["", patternAsValue(declaration.binding.pattern)]);
|
|
3381
3586
|
}
|
|
3382
|
-
|
|
3383
|
-
fillBlock(["", patternAsValue(statement.declaration.binding.pattern)]);
|
|
3587
|
+
block.empty = false;
|
|
3384
3588
|
}
|
|
3385
|
-
block.empty = false;
|
|
3386
3589
|
}
|
|
3387
3590
|
return false;
|
|
3388
3591
|
}
|
|
@@ -3443,7 +3646,7 @@ function processParams(f) {
|
|
|
3443
3646
|
}
|
|
3444
3647
|
}
|
|
3445
3648
|
}
|
|
3446
|
-
parameters.names = before.flatMap(($
|
|
3649
|
+
parameters.names = before.flatMap(($7) => $7.names);
|
|
3447
3650
|
parameters.parameters.splice(0, 1 / 0, ...[]);
|
|
3448
3651
|
if (tt) {
|
|
3449
3652
|
parameters.parameters.push(tt);
|
|
@@ -3461,7 +3664,7 @@ function processParams(f) {
|
|
|
3461
3664
|
});
|
|
3462
3665
|
}
|
|
3463
3666
|
after = trimFirstSpace(after);
|
|
3464
|
-
const names = after.flatMap(($
|
|
3667
|
+
const names = after.flatMap(($8) => $8.names);
|
|
3465
3668
|
const elements = after.map((p) => {
|
|
3466
3669
|
if (p.type === "Error") {
|
|
3467
3670
|
return p;
|
|
@@ -3550,9 +3753,9 @@ function processParams(f) {
|
|
|
3550
3753
|
colon,
|
|
3551
3754
|
t,
|
|
3552
3755
|
children: [
|
|
3553
|
-
...oldSuffix.children.filter(($
|
|
3756
|
+
...oldSuffix.children.filter(($9) => (
|
|
3554
3757
|
// spaces and colon
|
|
3555
|
-
$
|
|
3758
|
+
$9 !== oldSuffix.optional && $9 !== oldSuffix.t
|
|
3556
3759
|
)),
|
|
3557
3760
|
!oldSuffix.colon ? colon : void 0,
|
|
3558
3761
|
t
|
|
@@ -3583,27 +3786,28 @@ function processParams(f) {
|
|
|
3583
3786
|
indent = expressions[0][0];
|
|
3584
3787
|
}
|
|
3585
3788
|
const [splices, thisAssignments] = gatherBindingCode(parameters, {
|
|
3586
|
-
injectParamProps: isConstructor
|
|
3789
|
+
injectParamProps: isConstructor,
|
|
3790
|
+
assignPins: true
|
|
3587
3791
|
});
|
|
3588
3792
|
if (isConstructor) {
|
|
3589
|
-
const { ancestor } = findAncestor(f, ($
|
|
3793
|
+
const { ancestor } = findAncestor(f, ($10) => $10.type === "ClassExpression");
|
|
3590
3794
|
if (ancestor != null) {
|
|
3591
|
-
const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($
|
|
3795
|
+
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));
|
|
3592
3796
|
const classExpressions = ancestor.body.expressions;
|
|
3593
|
-
let
|
|
3594
|
-
assert.notEqual(
|
|
3797
|
+
let index2 = findChildIndex(classExpressions, f);
|
|
3798
|
+
assert.notEqual(index2, -1, "Could not find constructor in class");
|
|
3595
3799
|
let m4;
|
|
3596
|
-
while (m4 = classExpressions[
|
|
3597
|
-
|
|
3800
|
+
while (m4 = classExpressions[index2 - 1]?.[1], typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "MethodDefinition" && "name" in m4 && m4.name === "constructor") {
|
|
3801
|
+
index2--;
|
|
3598
3802
|
}
|
|
3599
|
-
const fStatement = classExpressions[
|
|
3600
|
-
for (let ref18 = gatherRecursive(parameters, ($
|
|
3803
|
+
const fStatement = classExpressions[index2];
|
|
3804
|
+
for (let ref18 = gatherRecursive(parameters, ($14) => $14.type === "Parameter"), i9 = 0, len8 = ref18.length; i9 < len8; i9++) {
|
|
3601
3805
|
const parameter = ref18[i9];
|
|
3602
3806
|
const { accessModifier } = parameter;
|
|
3603
3807
|
if (!(accessModifier || parameter.typeSuffix)) {
|
|
3604
3808
|
continue;
|
|
3605
3809
|
}
|
|
3606
|
-
for (let ref19 = gatherRecursive(parameter, ($
|
|
3810
|
+
for (let ref19 = gatherRecursive(parameter, ($15) => $15.type === "AtBinding"), i10 = 0, len9 = ref19.length; i10 < len9; i10++) {
|
|
3607
3811
|
const binding = ref19[i10];
|
|
3608
3812
|
const typeSuffix = binding.parent?.typeSuffix;
|
|
3609
3813
|
if (!(accessModifier || typeSuffix)) {
|
|
@@ -3617,7 +3821,7 @@ function processParams(f) {
|
|
|
3617
3821
|
if (fields.has(id)) {
|
|
3618
3822
|
continue;
|
|
3619
3823
|
}
|
|
3620
|
-
classExpressions.splice(
|
|
3824
|
+
classExpressions.splice(index2++, 0, [fStatement[0], {
|
|
3621
3825
|
type: "FieldDefinition",
|
|
3622
3826
|
id,
|
|
3623
3827
|
typeSuffix,
|
|
@@ -3654,25 +3858,31 @@ function processParams(f) {
|
|
|
3654
3858
|
if (!prefix.length) {
|
|
3655
3859
|
return;
|
|
3656
3860
|
}
|
|
3861
|
+
let index = -1;
|
|
3657
3862
|
if (isConstructor) {
|
|
3658
|
-
|
|
3659
|
-
expressions,
|
|
3660
|
-
(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"
|
|
3661
|
-
);
|
|
3662
|
-
if (superCalls.length) {
|
|
3663
|
-
const { child } = findAncestor(superCalls[0], (a5) => a5 === block);
|
|
3664
|
-
const index = findChildIndex(expressions, child);
|
|
3665
|
-
if (index < 0) {
|
|
3666
|
-
throw new Error("Could not find super call within top-level expressions");
|
|
3667
|
-
}
|
|
3668
|
-
expressions.splice(index + 1, 0, ...prefix);
|
|
3669
|
-
return;
|
|
3670
|
-
}
|
|
3863
|
+
index = findSuperCall(block);
|
|
3671
3864
|
}
|
|
3672
|
-
expressions.
|
|
3865
|
+
expressions.splice(index + 1, 0, ...prefix);
|
|
3673
3866
|
updateParentPointers(block);
|
|
3674
3867
|
braceBlock(block);
|
|
3675
3868
|
}
|
|
3869
|
+
function findSuperCall(block) {
|
|
3870
|
+
const { expressions } = block;
|
|
3871
|
+
const superCalls = gatherNodes(
|
|
3872
|
+
expressions,
|
|
3873
|
+
(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"
|
|
3874
|
+
);
|
|
3875
|
+
if (superCalls.length) {
|
|
3876
|
+
const { child } = findAncestor(superCalls[0], (a5) => a5 === block);
|
|
3877
|
+
const index = findChildIndex(expressions, child);
|
|
3878
|
+
if (index < 0) {
|
|
3879
|
+
throw new Error("Could not find super call within top-level expressions");
|
|
3880
|
+
}
|
|
3881
|
+
return index;
|
|
3882
|
+
} else {
|
|
3883
|
+
return -1;
|
|
3884
|
+
}
|
|
3885
|
+
}
|
|
3676
3886
|
function processSignature(f) {
|
|
3677
3887
|
const { block, signature } = f;
|
|
3678
3888
|
if (!f.async?.length && hasAwait(block)) {
|
|
@@ -3680,7 +3890,7 @@ function processSignature(f) {
|
|
|
3680
3890
|
f.async.push("async ");
|
|
3681
3891
|
signature.modifier.async = true;
|
|
3682
3892
|
} else {
|
|
3683
|
-
for (let ref21 = gatherRecursiveWithinFunction(block, ($
|
|
3893
|
+
for (let ref21 = gatherRecursiveWithinFunction(block, ($16) => $16.type === "Await"), i12 = 0, len11 = ref21.length; i12 < len11; i12++) {
|
|
3684
3894
|
const a = ref21[i12];
|
|
3685
3895
|
const i = findChildIndex(a.parent, a);
|
|
3686
3896
|
a.parent.children.splice(i + 1, 0, {
|
|
@@ -3695,9 +3905,9 @@ function processSignature(f) {
|
|
|
3695
3905
|
f.generator.push("*");
|
|
3696
3906
|
signature.modifier.generator = true;
|
|
3697
3907
|
} else {
|
|
3698
|
-
for (let ref22 = gatherRecursiveWithinFunction(block, ($
|
|
3908
|
+
for (let ref22 = gatherRecursiveWithinFunction(block, ($17) => $17.type === "YieldExpression"), i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
|
|
3699
3909
|
const y = ref22[i13];
|
|
3700
|
-
const i = y.children.findIndex(($
|
|
3910
|
+
const i = y.children.findIndex(($18) => $18.type === "Yield");
|
|
3701
3911
|
y.children.splice(i + 1, 0, {
|
|
3702
3912
|
type: "Error",
|
|
3703
3913
|
message: `yield invalid in ${f.type === "ArrowFunction" ? "=> arrow function" : signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
|
|
@@ -3710,7 +3920,7 @@ function processSignature(f) {
|
|
|
3710
3920
|
}
|
|
3711
3921
|
}
|
|
3712
3922
|
function processFunctions(statements, config2) {
|
|
3713
|
-
for (let ref23 = gatherRecursiveAll(statements, ($
|
|
3923
|
+
for (let ref23 = gatherRecursiveAll(statements, ($19) => $19.type === "FunctionExpression" || $19.type === "ArrowFunction" || $19.type === "MethodDefinition"), i14 = 0, len13 = ref23.length; i14 < len13; i14++) {
|
|
3714
3924
|
const f = ref23[i14];
|
|
3715
3925
|
if (f.type === "FunctionExpression" || f.type === "MethodDefinition") {
|
|
3716
3926
|
implicitFunctionBlock(f);
|
|
@@ -3722,7 +3932,7 @@ function processFunctions(statements, config2) {
|
|
|
3722
3932
|
}
|
|
3723
3933
|
function expressionizeIteration(exp) {
|
|
3724
3934
|
let { async, generator, block, children, statement } = exp;
|
|
3725
|
-
|
|
3935
|
+
let i = children.indexOf(statement);
|
|
3726
3936
|
if (i < 0) {
|
|
3727
3937
|
throw new Error("Could not find iteration statement in iteration expression");
|
|
3728
3938
|
}
|
|
@@ -3733,12 +3943,6 @@ function expressionizeIteration(exp) {
|
|
|
3733
3943
|
}
|
|
3734
3944
|
let statements;
|
|
3735
3945
|
if (generator) {
|
|
3736
|
-
if (statement.reduction) {
|
|
3737
|
-
children.unshift({
|
|
3738
|
-
type: "Error",
|
|
3739
|
-
message: `Cannot use reduction (${statement.reduction.subtype}) with generators`
|
|
3740
|
-
});
|
|
3741
|
-
}
|
|
3742
3946
|
iterationDefaultBody(statement);
|
|
3743
3947
|
assignResults(block, (node) => {
|
|
3744
3948
|
return {
|
|
@@ -3786,7 +3990,7 @@ function expressionizeIteration(exp) {
|
|
|
3786
3990
|
}
|
|
3787
3991
|
}
|
|
3788
3992
|
function processIterationExpressions(statements) {
|
|
3789
|
-
for (let ref25 = gatherRecursiveAll(statements, ($
|
|
3993
|
+
for (let ref25 = gatherRecursiveAll(statements, ($20) => $20.type === "IterationExpression"), i15 = 0, len14 = ref25.length; i15 < len14; i15++) {
|
|
3790
3994
|
const s = ref25[i15];
|
|
3791
3995
|
expressionizeIteration(s);
|
|
3792
3996
|
}
|
|
@@ -3836,12 +4040,12 @@ function processCoffeeDo(ws, expression) {
|
|
|
3836
4040
|
const newParameters = {
|
|
3837
4041
|
...parameters,
|
|
3838
4042
|
parameters: newParameterList,
|
|
3839
|
-
children: parameters.children.map(($
|
|
4043
|
+
children: parameters.children.map(($21) => $21 === parameterList ? newParameterList : $21)
|
|
3840
4044
|
};
|
|
3841
4045
|
expression = {
|
|
3842
4046
|
...expression,
|
|
3843
4047
|
parameters: newParameters,
|
|
3844
|
-
children: expression.children.map(($
|
|
4048
|
+
children: expression.children.map(($22) => $22 === parameters ? newParameters : $22)
|
|
3845
4049
|
};
|
|
3846
4050
|
}
|
|
3847
4051
|
return {
|
|
@@ -3863,7 +4067,7 @@ function makeAmpersandFunction(rhs) {
|
|
|
3863
4067
|
ref = makeRef("$");
|
|
3864
4068
|
inplacePrepend(ref, body);
|
|
3865
4069
|
}
|
|
3866
|
-
if (startsWithPredicate(body, ($
|
|
4070
|
+
if (startsWithPredicate(body, ($23) => $23.type === "ObjectExpression")) {
|
|
3867
4071
|
body = makeLeftHandSideExpression(body);
|
|
3868
4072
|
}
|
|
3869
4073
|
const parameterList = [
|
|
@@ -4723,29 +4927,36 @@ function getPatternBlockPrefix(pattern, ref, decl = "const ", typeSuffix) {
|
|
|
4723
4927
|
}
|
|
4724
4928
|
let [splices, thisAssignments] = gatherBindingCode(pattern);
|
|
4725
4929
|
const patternBindings2 = nonMatcherBindings(pattern);
|
|
4930
|
+
const results = [];
|
|
4931
|
+
for (let ref2 = gatherRecursiveAll(patternBindings2, ($7) => $7.subbinding != null), i5 = 0, len4 = ref2.length; i5 < len4; i5++) {
|
|
4932
|
+
const p = ref2[i5];
|
|
4933
|
+
results.push(prepend(", ", p.subbinding));
|
|
4934
|
+
}
|
|
4935
|
+
;
|
|
4936
|
+
const subbindings = results;
|
|
4726
4937
|
splices = splices.map((s) => [", ", nonMatcherBindings(s)]);
|
|
4727
|
-
thisAssignments = thisAssignments.map(($
|
|
4938
|
+
thisAssignments = thisAssignments.map(($8) => ["", $8, ";"]);
|
|
4728
4939
|
const duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices]);
|
|
4729
4940
|
return [
|
|
4730
4941
|
["", {
|
|
4731
4942
|
type: "Declaration",
|
|
4732
|
-
children: [decl, patternBindings2, typeSuffix, " = ", ref, ...splices],
|
|
4943
|
+
children: [decl, patternBindings2, typeSuffix, " = ", ref, ...subbindings, ...splices],
|
|
4733
4944
|
names: [],
|
|
4734
4945
|
bindings: []
|
|
4735
4946
|
// avoid implicit return of any bindings
|
|
4736
4947
|
}, ";"],
|
|
4737
4948
|
...thisAssignments,
|
|
4738
|
-
...duplicateDeclarations.map(($
|
|
4949
|
+
...duplicateDeclarations.map(($9) => ["", $9, ";"])
|
|
4739
4950
|
];
|
|
4740
4951
|
}
|
|
4741
4952
|
function elideMatchersFromArrayBindings(elements) {
|
|
4742
|
-
const
|
|
4743
|
-
for (let
|
|
4744
|
-
const element = elements[
|
|
4953
|
+
const results1 = [];
|
|
4954
|
+
for (let i6 = 0, len5 = elements.length; i6 < len5; i6++) {
|
|
4955
|
+
const element = elements[i6];
|
|
4745
4956
|
switch (element.type) {
|
|
4746
4957
|
case "BindingRestElement":
|
|
4747
4958
|
case "ElisionElement": {
|
|
4748
|
-
|
|
4959
|
+
results1.push(element);
|
|
4749
4960
|
break;
|
|
4750
4961
|
}
|
|
4751
4962
|
case "BindingElement": {
|
|
@@ -4754,12 +4965,12 @@ function elideMatchersFromArrayBindings(elements) {
|
|
|
4754
4965
|
case "RegularExpressionLiteral":
|
|
4755
4966
|
case "StringLiteral":
|
|
4756
4967
|
case "PinPattern": {
|
|
4757
|
-
|
|
4968
|
+
results1.push(element.delim);
|
|
4758
4969
|
break;
|
|
4759
4970
|
}
|
|
4760
4971
|
default: {
|
|
4761
4972
|
const binding = nonMatcherBindings(element.binding);
|
|
4762
|
-
|
|
4973
|
+
results1.push(makeNode({
|
|
4763
4974
|
...element,
|
|
4764
4975
|
binding,
|
|
4765
4976
|
children: element.children.map((c) => {
|
|
@@ -4774,46 +4985,75 @@ function elideMatchersFromArrayBindings(elements) {
|
|
|
4774
4985
|
}
|
|
4775
4986
|
}
|
|
4776
4987
|
;
|
|
4777
|
-
return
|
|
4988
|
+
return results1;
|
|
4778
4989
|
}
|
|
4779
4990
|
function elideMatchersFromPropertyBindings(properties) {
|
|
4780
|
-
|
|
4991
|
+
const results2 = [];
|
|
4992
|
+
for (let i7 = 0, len6 = properties.length; i7 < len6; i7++) {
|
|
4993
|
+
const p = properties[i7];
|
|
4781
4994
|
switch (p.type) {
|
|
4782
|
-
case "BindingProperty":
|
|
4783
|
-
|
|
4995
|
+
case "BindingProperty":
|
|
4996
|
+
case "PinProperty": {
|
|
4997
|
+
const { children, name, value, bind } = p;
|
|
4784
4998
|
const [ws] = children;
|
|
4785
4999
|
const shouldElide = name.type === "NumericLiteral" && !value?.name || name.type === "ComputedPropertyName" && value?.subtype === "NumericLiteral";
|
|
4786
5000
|
if (shouldElide) {
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
...p,
|
|
4795
|
-
children: [ws, name, bindings && ": ", bindings, p.delim]
|
|
4796
|
-
};
|
|
5001
|
+
if (bind) {
|
|
5002
|
+
results2.push({
|
|
5003
|
+
type: "Error",
|
|
5004
|
+
message: `Cannot bind ${name.type}`
|
|
5005
|
+
});
|
|
5006
|
+
} else {
|
|
5007
|
+
continue;
|
|
4797
5008
|
}
|
|
4798
|
-
|
|
4799
|
-
|
|
5009
|
+
} else {
|
|
5010
|
+
let contents;
|
|
5011
|
+
switch (value?.type) {
|
|
5012
|
+
case "ArrayBindingPattern":
|
|
5013
|
+
case "ObjectBindingPattern": {
|
|
5014
|
+
const bindings = nonMatcherBindings(value);
|
|
5015
|
+
contents = {
|
|
5016
|
+
...p,
|
|
5017
|
+
value: bindings,
|
|
5018
|
+
children: [ws, name, bindings && ": ", bindings, p.delim]
|
|
5019
|
+
};
|
|
5020
|
+
break;
|
|
5021
|
+
}
|
|
5022
|
+
case "Identifier":
|
|
5023
|
+
case void 0: {
|
|
5024
|
+
contents = p;
|
|
5025
|
+
break;
|
|
5026
|
+
}
|
|
5027
|
+
default: {
|
|
5028
|
+
contents = void 0;
|
|
5029
|
+
}
|
|
4800
5030
|
}
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
case "StringLiteral":
|
|
4804
|
-
default:
|
|
4805
|
-
return {
|
|
5031
|
+
if (bind) {
|
|
5032
|
+
results2.push({
|
|
4806
5033
|
...p,
|
|
4807
|
-
children: [ws, name, p.delim]
|
|
4808
|
-
|
|
5034
|
+
children: [ws, name, p.delim],
|
|
5035
|
+
subbinding: contents?.value ? [
|
|
5036
|
+
contents.value,
|
|
5037
|
+
" = ",
|
|
5038
|
+
name
|
|
5039
|
+
] : void 0
|
|
5040
|
+
});
|
|
5041
|
+
} else if (contents) {
|
|
5042
|
+
results2.push(contents);
|
|
5043
|
+
} else {
|
|
5044
|
+
continue;
|
|
5045
|
+
}
|
|
4809
5046
|
}
|
|
5047
|
+
;
|
|
5048
|
+
break;
|
|
5049
|
+
}
|
|
5050
|
+
default: {
|
|
5051
|
+
results2.push(p);
|
|
4810
5052
|
}
|
|
4811
|
-
case "PinProperty":
|
|
4812
|
-
case "BindingRestProperty":
|
|
4813
|
-
default:
|
|
4814
|
-
return p;
|
|
4815
5053
|
}
|
|
4816
|
-
}
|
|
5054
|
+
}
|
|
5055
|
+
;
|
|
5056
|
+
return results2;
|
|
4817
5057
|
}
|
|
4818
5058
|
function nonMatcherBindings(pattern) {
|
|
4819
5059
|
switch (pattern.type) {
|
|
@@ -4823,7 +5063,7 @@ function nonMatcherBindings(pattern) {
|
|
|
4823
5063
|
return makeNode({
|
|
4824
5064
|
...pattern,
|
|
4825
5065
|
elements,
|
|
4826
|
-
children: pattern.children.map(($
|
|
5066
|
+
children: pattern.children.map(($10) => $10 === pattern.elements ? elements : $10)
|
|
4827
5067
|
});
|
|
4828
5068
|
}
|
|
4829
5069
|
case "ObjectBindingPattern": {
|
|
@@ -4831,7 +5071,7 @@ function nonMatcherBindings(pattern) {
|
|
|
4831
5071
|
return makeNode({
|
|
4832
5072
|
...pattern,
|
|
4833
5073
|
properties,
|
|
4834
|
-
children: pattern.children.map(($
|
|
5074
|
+
children: pattern.children.map(($11) => $11 === pattern.properties ? properties : $11)
|
|
4835
5075
|
});
|
|
4836
5076
|
}
|
|
4837
5077
|
default: {
|
|
@@ -4849,8 +5089,8 @@ function aggregateDuplicateBindings(bindings) {
|
|
|
4849
5089
|
);
|
|
4850
5090
|
const declarations = [];
|
|
4851
5091
|
const propsGroupedByName = /* @__PURE__ */ new Map();
|
|
4852
|
-
for (let
|
|
4853
|
-
const p = props[
|
|
5092
|
+
for (let i8 = 0, len7 = props.length; i8 < len7; i8++) {
|
|
5093
|
+
const p = props[i8];
|
|
4854
5094
|
const { name, value } = p;
|
|
4855
5095
|
let m1;
|
|
4856
5096
|
if (m1 = value?.type, m1 === "ArrayBindingPattern" || m1 === "ObjectBindingPattern") {
|
|
@@ -4875,8 +5115,8 @@ function aggregateDuplicateBindings(bindings) {
|
|
|
4875
5115
|
pos: 0,
|
|
4876
5116
|
input: key
|
|
4877
5117
|
})) {
|
|
4878
|
-
for (let
|
|
4879
|
-
const p = shared[
|
|
5118
|
+
for (let i9 = 0, len8 = shared.length; i9 < len8; i9++) {
|
|
5119
|
+
const p = shared[i9];
|
|
4880
5120
|
aliasBinding(p, makeRef(`_${key}`, key));
|
|
4881
5121
|
}
|
|
4882
5122
|
return;
|
|
@@ -4965,18 +5205,47 @@ function processDeclarations(statements) {
|
|
|
4965
5205
|
for (let ref1 = gatherRecursiveAll(statements, ($) => $.type === "Declaration"), i1 = 0, len1 = ref1.length; i1 < len1; i1++) {
|
|
4966
5206
|
const declaration = ref1[i1];
|
|
4967
5207
|
const { bindings } = declaration;
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
5208
|
+
if (!(bindings != null)) {
|
|
5209
|
+
continue;
|
|
5210
|
+
}
|
|
5211
|
+
for (let i2 = 0, len22 = bindings.length; i2 < len22; i2++) {
|
|
5212
|
+
const binding = bindings[i2];
|
|
5213
|
+
let { typeSuffix, initializer } = binding;
|
|
5214
|
+
if (typeSuffix && typeSuffix.optional) {
|
|
5215
|
+
if (initializer && !typeSuffix.t) {
|
|
5216
|
+
const expression = trimFirstSpace(initializer.expression);
|
|
5217
|
+
let m;
|
|
5218
|
+
if (m = expression.type, m === "Identifier" || m === "MemberExpression") {
|
|
5219
|
+
typeSuffix.children.push(": ", typeSuffix.t = {
|
|
5220
|
+
type: "TypeTypeof",
|
|
5221
|
+
children: ["typeof ", expression],
|
|
5222
|
+
expression
|
|
5223
|
+
});
|
|
5224
|
+
} else if (expression.type === "Literal" || expression.type === "RegularExpressionLiteral" || expression.type === "TemplateLiteral") {
|
|
5225
|
+
typeSuffix.children.push(": ", typeSuffix.t = literalType(expression));
|
|
5226
|
+
} else {
|
|
5227
|
+
spliceChild(binding, typeSuffix, 1, {
|
|
5228
|
+
type: "Error",
|
|
5229
|
+
message: `Optional type can only be inferred from literals or member expressions, not ${expression.type}`
|
|
5230
|
+
});
|
|
5231
|
+
continue;
|
|
5232
|
+
}
|
|
5233
|
+
}
|
|
5234
|
+
if (typeSuffix.t) {
|
|
5235
|
+
convertOptionalType(typeSuffix);
|
|
5236
|
+
} else {
|
|
5237
|
+
spliceChild(binding, typeSuffix, 1);
|
|
5238
|
+
binding.children.push(initializer = binding.initializer = {
|
|
5239
|
+
type: "Initializer",
|
|
5240
|
+
expression: "undefined",
|
|
5241
|
+
children: [" = ", "undefined"]
|
|
5242
|
+
});
|
|
5243
|
+
}
|
|
4972
5244
|
}
|
|
4973
|
-
const { initializer } = binding;
|
|
4974
5245
|
if (initializer) {
|
|
4975
|
-
|
|
5246
|
+
prependStatementExpressionBlock(initializer, declaration);
|
|
4976
5247
|
}
|
|
4977
|
-
|
|
4978
|
-
return;
|
|
4979
|
-
});
|
|
5248
|
+
}
|
|
4980
5249
|
}
|
|
4981
5250
|
}
|
|
4982
5251
|
function prependStatementExpressionBlock(initializer, statement) {
|
|
@@ -4986,7 +5255,7 @@ function prependStatementExpressionBlock(initializer, statement) {
|
|
|
4986
5255
|
ws = exp[0];
|
|
4987
5256
|
exp = exp[1];
|
|
4988
5257
|
}
|
|
4989
|
-
if (!(exp
|
|
5258
|
+
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")) {
|
|
4990
5259
|
return;
|
|
4991
5260
|
}
|
|
4992
5261
|
const pre = [];
|
|
@@ -5139,16 +5408,16 @@ function processDeclarationConditionStatement(s) {
|
|
|
5139
5408
|
if (conditions.length) {
|
|
5140
5409
|
let children = condition.children;
|
|
5141
5410
|
if (s.negated) {
|
|
5142
|
-
let
|
|
5143
|
-
if (!(
|
|
5411
|
+
let m1;
|
|
5412
|
+
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")) {
|
|
5144
5413
|
throw new Error("Unsupported negated condition");
|
|
5145
5414
|
}
|
|
5146
5415
|
;
|
|
5147
5416
|
({ children } = condition.expression.children[1]);
|
|
5148
5417
|
}
|
|
5149
5418
|
children.unshift("(");
|
|
5150
|
-
for (let
|
|
5151
|
-
const c = conditions[
|
|
5419
|
+
for (let i3 = 0, len3 = conditions.length; i3 < len3; i3++) {
|
|
5420
|
+
const c = conditions[i3];
|
|
5152
5421
|
children.push(" && ", c);
|
|
5153
5422
|
}
|
|
5154
5423
|
children.push(")");
|
|
@@ -5269,7 +5538,8 @@ function dynamizeFromClause(from) {
|
|
|
5269
5538
|
if (ref3 = from[from.length - 1]?.assertion) {
|
|
5270
5539
|
const assert2 = ref3;
|
|
5271
5540
|
let ref4;
|
|
5272
|
-
ref4 = from[from.length - 1]
|
|
5541
|
+
ref4 = from[from.length - 1];
|
|
5542
|
+
ref4.children = ref4.children.filter((a2) => a2 !== assert2);
|
|
5273
5543
|
from.push(", {", assert2.keyword, ":", assert2.object, "}");
|
|
5274
5544
|
}
|
|
5275
5545
|
return ["(", ...from, ")"];
|
|
@@ -5823,14 +6093,6 @@ function processRangeExpression(start, ws1, range, end) {
|
|
|
5823
6093
|
;
|
|
5824
6094
|
const abs = ref;
|
|
5825
6095
|
const lengthAdjust = 1 - Number(!range.left.inclusive) - Number(!range.right.inclusive);
|
|
5826
|
-
let ref1;
|
|
5827
|
-
if (lengthAdjust > 0) ref1 = ` + ${lengthAdjust}`;
|
|
5828
|
-
else if (lengthAdjust < 0) ref1 = ` - ${-lengthAdjust}`;
|
|
5829
|
-
else {
|
|
5830
|
-
ref1 = void 0;
|
|
5831
|
-
}
|
|
5832
|
-
;
|
|
5833
|
-
const lengthAdjustExpression = ref1;
|
|
5834
6096
|
let children;
|
|
5835
6097
|
if (typeof start === "object" && start != null && "type" in start && start.type === "Literal" && (typeof end === "object" && end != null && "type" in end && end.type === "Literal")) {
|
|
5836
6098
|
let startValue = literalValue(start);
|
|
@@ -5856,11 +6118,12 @@ function processRangeExpression(start, ws1, range, end) {
|
|
|
5856
6118
|
];
|
|
5857
6119
|
} else {
|
|
5858
6120
|
children = [
|
|
5859
|
-
|
|
5860
|
-
"(
|
|
6121
|
+
getHelperRef(startCode <= endCode ? "stringRange" : "revStringRange"),
|
|
6122
|
+
"(",
|
|
5861
6123
|
startCode.toString(),
|
|
5862
|
-
|
|
5863
|
-
|
|
6124
|
+
", ",
|
|
6125
|
+
length.toString(),
|
|
6126
|
+
")"
|
|
5864
6127
|
];
|
|
5865
6128
|
}
|
|
5866
6129
|
if (range.error != null) {
|
|
@@ -5889,22 +6152,25 @@ function processRangeExpression(start, ws1, range, end) {
|
|
|
5889
6152
|
const sign = range.increasing ? "+" : "-";
|
|
5890
6153
|
end = makeLeftHandSideExpression(end);
|
|
5891
6154
|
children = [
|
|
5892
|
-
|
|
5893
|
-
range.increasing ? [ws2, end, " - s"] : ["s - ", ws2, end],
|
|
5894
|
-
lengthAdjustExpression,
|
|
5895
|
-
"}, (_, i) => s ",
|
|
5896
|
-
sign,
|
|
5897
|
-
" i))",
|
|
6155
|
+
getHelperRef(range.increasing ? "range" : "revRange"),
|
|
5898
6156
|
"(",
|
|
5899
6157
|
range.left.inclusive ? start : [makeLeftHandSideExpression(start), ` ${sign} 1`],
|
|
6158
|
+
",",
|
|
6159
|
+
range.right.inclusive ? [makeLeftHandSideExpression(end), ` ${sign} 1`] : end,
|
|
5900
6160
|
...ws1,
|
|
5901
6161
|
")"
|
|
5902
6162
|
];
|
|
5903
6163
|
} else {
|
|
5904
6164
|
children = [
|
|
5905
|
-
"((s, e) =>
|
|
5906
|
-
|
|
5907
|
-
"
|
|
6165
|
+
"((s, e) => s > e ? ",
|
|
6166
|
+
getHelperRef("revRange"),
|
|
6167
|
+
"(s, e",
|
|
6168
|
+
range.right.inclusive ? " - 1" : void 0,
|
|
6169
|
+
") : ",
|
|
6170
|
+
getHelperRef("range"),
|
|
6171
|
+
"(s, e",
|
|
6172
|
+
range.right.inclusive ? " + 1" : void 0,
|
|
6173
|
+
"))",
|
|
5908
6174
|
"(",
|
|
5909
6175
|
start,
|
|
5910
6176
|
...ws1,
|
|
@@ -5945,25 +6211,25 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
5945
6211
|
asc = false;
|
|
5946
6212
|
}
|
|
5947
6213
|
}
|
|
5948
|
-
let
|
|
6214
|
+
let ref1;
|
|
5949
6215
|
if (stepExp?.type === "Literal") {
|
|
5950
6216
|
try {
|
|
5951
|
-
|
|
6217
|
+
ref1 = literalValue(stepExp);
|
|
5952
6218
|
} catch (e) {
|
|
5953
|
-
|
|
6219
|
+
ref1 = void 0;
|
|
5954
6220
|
}
|
|
5955
6221
|
} else {
|
|
5956
|
-
|
|
6222
|
+
ref1 = void 0;
|
|
5957
6223
|
}
|
|
5958
6224
|
;
|
|
5959
|
-
const stepValue =
|
|
6225
|
+
const stepValue = ref1;
|
|
5960
6226
|
if (typeof stepValue === "number") {
|
|
5961
6227
|
asc = stepValue > 0;
|
|
5962
6228
|
}
|
|
5963
|
-
let
|
|
5964
|
-
if (stepRef)
|
|
5965
|
-
else
|
|
5966
|
-
let startRef =
|
|
6229
|
+
let ref2;
|
|
6230
|
+
if (stepRef) ref2 = start;
|
|
6231
|
+
else ref2 = maybeRef(start, "start");
|
|
6232
|
+
let startRef = ref2;
|
|
5967
6233
|
let endRef = maybeRef(end, "end");
|
|
5968
6234
|
const startRefDec = startRef !== start ? [startRef, " = ", start, ", "] : [];
|
|
5969
6235
|
const endRefDec = endRef !== end ? [endRef, " = ", end, ", "] : [];
|
|
@@ -5975,8 +6241,8 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
5975
6241
|
}
|
|
5976
6242
|
if (start?.type === "Literal" && "Literal" === end?.type) {
|
|
5977
6243
|
asc = literalValue(start) <= literalValue(end);
|
|
5978
|
-
let
|
|
5979
|
-
if ("StringLiteral" === (
|
|
6244
|
+
let ref3;
|
|
6245
|
+
if ("StringLiteral" === (ref3 = start.subtype) && ref3 === end.subtype) {
|
|
5980
6246
|
const startChar = literalValue(start).charCodeAt(0).toString();
|
|
5981
6247
|
startRef = {
|
|
5982
6248
|
type: "Literal",
|
|
@@ -6032,8 +6298,8 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
6032
6298
|
}
|
|
6033
6299
|
function processForInOf($0) {
|
|
6034
6300
|
let [awaits, eachOwn, open, declaration, declaration2, ws, inOf, exp, step, close] = $0;
|
|
6035
|
-
for (let
|
|
6036
|
-
const decl =
|
|
6301
|
+
for (let ref4 = [declaration, declaration2?.[declaration2.length - 1]], i1 = 0, len3 = ref4.length; i1 < len3; i1++) {
|
|
6302
|
+
const decl = ref4[i1];
|
|
6037
6303
|
if (!(decl != null)) {
|
|
6038
6304
|
continue;
|
|
6039
6305
|
}
|
|
@@ -6082,6 +6348,7 @@ function processForInOf($0) {
|
|
|
6082
6348
|
names: assignmentNames,
|
|
6083
6349
|
implicitLift: true
|
|
6084
6350
|
}, ";"]);
|
|
6351
|
+
const eachDeclaration = declaration;
|
|
6085
6352
|
declaration = {
|
|
6086
6353
|
type: "Declaration",
|
|
6087
6354
|
children: ["let ", ...expRefDec, counterRef, " = 0, ", lenRef, " = ", trimFirstSpace(expRef2), ".length"],
|
|
@@ -6089,7 +6356,7 @@ function processForInOf($0) {
|
|
|
6089
6356
|
};
|
|
6090
6357
|
const condition = [counterRef, " < ", lenRef, "; "];
|
|
6091
6358
|
const children = [open, declaration, "; ", condition, counterRef, increment, close];
|
|
6092
|
-
return { declaration, children, blockPrefix };
|
|
6359
|
+
return { declaration, eachDeclaration, children, blockPrefix };
|
|
6093
6360
|
} else {
|
|
6094
6361
|
eachOwnError = {
|
|
6095
6362
|
type: "Error",
|
|
@@ -6303,12 +6570,10 @@ function createVarDecs(block, scopes, pushVar) {
|
|
|
6303
6570
|
}
|
|
6304
6571
|
return assignmentStatements2;
|
|
6305
6572
|
}
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
};
|
|
6311
|
-
}
|
|
6573
|
+
pushVar ??= (name) => {
|
|
6574
|
+
varIds.push(name);
|
|
6575
|
+
return decs.add(name);
|
|
6576
|
+
};
|
|
6312
6577
|
const { expressions: statements } = block;
|
|
6313
6578
|
const decs = findDecs(statements);
|
|
6314
6579
|
scopes.push(decs);
|
|
@@ -7407,7 +7672,7 @@ function processAssignments(statements) {
|
|
|
7407
7672
|
let { lhs: $1, expression: $2 } = exp, tail = [], len3 = $1.length;
|
|
7408
7673
|
let block;
|
|
7409
7674
|
let ref12;
|
|
7410
|
-
if (exp
|
|
7675
|
+
if (blockContainingStatement(exp) && !(ref12 = $1[$1.length - 1])?.[ref12.length - 1]?.special) {
|
|
7411
7676
|
block = makeBlockFragment();
|
|
7412
7677
|
let ref13;
|
|
7413
7678
|
if (ref13 = prependStatementExpressionBlock(
|
|
@@ -7908,6 +8173,91 @@ function processBreaksContinues(statements) {
|
|
|
7908
8173
|
delete label.special;
|
|
7909
8174
|
}
|
|
7910
8175
|
}
|
|
8176
|
+
function processCoffeeClasses(statements) {
|
|
8177
|
+
for (let ref21 = gatherRecursiveAll(statements, ($13) => $13.type === "ClassExpression"), i11 = 0, len9 = ref21.length; i11 < len9; i11++) {
|
|
8178
|
+
const ce = ref21[i11];
|
|
8179
|
+
const { expressions } = ce.body;
|
|
8180
|
+
const indent = expressions[0]?.[0] ?? "\n";
|
|
8181
|
+
const autoBinds = expressions.filter(($14) => $14[1]?.autoBind);
|
|
8182
|
+
if (autoBinds.length) {
|
|
8183
|
+
let construct;
|
|
8184
|
+
for (const [, c] of expressions) {
|
|
8185
|
+
if (typeof c === "object" && c != null && "type" in c && c.type === "MethodDefinition" && "name" in c && c.name === "constructor" && c.block) {
|
|
8186
|
+
construct = c;
|
|
8187
|
+
break;
|
|
8188
|
+
}
|
|
8189
|
+
}
|
|
8190
|
+
if (!construct) {
|
|
8191
|
+
const parametersList = [];
|
|
8192
|
+
const parameters = {
|
|
8193
|
+
type: "Parameters",
|
|
8194
|
+
children: [parametersList],
|
|
8195
|
+
parameters: parametersList,
|
|
8196
|
+
names: []
|
|
8197
|
+
};
|
|
8198
|
+
const signature = {
|
|
8199
|
+
type: "MethodSignature",
|
|
8200
|
+
children: ["constructor(", parameters, ")"],
|
|
8201
|
+
parameters,
|
|
8202
|
+
modifier: {},
|
|
8203
|
+
returnType: void 0
|
|
8204
|
+
};
|
|
8205
|
+
const block = makeEmptyBlock();
|
|
8206
|
+
construct = {
|
|
8207
|
+
...signature,
|
|
8208
|
+
type: "MethodDefinition",
|
|
8209
|
+
name: "constructor",
|
|
8210
|
+
block,
|
|
8211
|
+
signature,
|
|
8212
|
+
children: [...signature.children, block]
|
|
8213
|
+
};
|
|
8214
|
+
expressions.unshift([indent, construct]);
|
|
8215
|
+
}
|
|
8216
|
+
const index = findSuperCall(construct.block);
|
|
8217
|
+
construct.block.expressions.splice(
|
|
8218
|
+
index + 1,
|
|
8219
|
+
0,
|
|
8220
|
+
...(() => {
|
|
8221
|
+
const results3 = [];
|
|
8222
|
+
for (let i12 = 0, len10 = autoBinds.length; i12 < len10; i12++) {
|
|
8223
|
+
const [, a] = autoBinds[i12];
|
|
8224
|
+
results3.push([indent, ["this.", a.name, " = this.", a.name, ".bind(this)"], ";"]);
|
|
8225
|
+
}
|
|
8226
|
+
return results3;
|
|
8227
|
+
})()
|
|
8228
|
+
);
|
|
8229
|
+
}
|
|
8230
|
+
const privates = expressions.filter(($15) => $15[1]?.type === "CoffeeClassPrivate");
|
|
8231
|
+
if (!privates.length) {
|
|
8232
|
+
continue;
|
|
8233
|
+
}
|
|
8234
|
+
const { parent } = ce;
|
|
8235
|
+
for (let i13 = expressions.length + -1; i13 >= 0; --i13) {
|
|
8236
|
+
const i = i13;
|
|
8237
|
+
if (expressions[i][1]?.type === "CoffeeClassPrivate") {
|
|
8238
|
+
expressions.splice(i, 1);
|
|
8239
|
+
}
|
|
8240
|
+
}
|
|
8241
|
+
let wrapped = wrapIIFE([
|
|
8242
|
+
...privates,
|
|
8243
|
+
[indent, wrapWithReturn(ce)]
|
|
8244
|
+
]);
|
|
8245
|
+
if (ce && typeof ce === "object" && "binding" in ce) {
|
|
8246
|
+
let { binding } = ce;
|
|
8247
|
+
binding = trimFirstSpace(binding);
|
|
8248
|
+
wrapped = makeNode({
|
|
8249
|
+
type: "AssignmentExpression",
|
|
8250
|
+
children: [binding, " = ", wrapped],
|
|
8251
|
+
lhs: binding,
|
|
8252
|
+
// TODO: incorrect shape
|
|
8253
|
+
assigned: binding,
|
|
8254
|
+
expression: wrapped,
|
|
8255
|
+
names: [ce.name]
|
|
8256
|
+
});
|
|
8257
|
+
}
|
|
8258
|
+
replaceNode(ce, wrapped, parent);
|
|
8259
|
+
}
|
|
8260
|
+
}
|
|
7911
8261
|
function processProgram(root) {
|
|
7912
8262
|
const state2 = getState();
|
|
7913
8263
|
const config2 = getConfig();
|
|
@@ -7918,15 +8268,8 @@ function processProgram(root) {
|
|
|
7918
8268
|
assert.equal(state2.forbidNewlineBinaryOp.length, 1, "forbidNewlineBinaryOp");
|
|
7919
8269
|
assert.equal(state2.forbidTrailingMemberProperty.length, 1, "forbidTrailingMemberProperty");
|
|
7920
8270
|
assert.equal(state2.JSXTagStack.length, 1, "JSXTagStack");
|
|
7921
|
-
let rootIIFE;
|
|
7922
|
-
if (config2.iife || config2.repl) {
|
|
7923
|
-
rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
|
|
7924
|
-
const newExpressions = [["", rootIIFE]];
|
|
7925
|
-
root.children = root.children.map(($13) => $13 === root.expressions ? newExpressions : $13);
|
|
7926
|
-
root.expressions = newExpressions;
|
|
7927
|
-
}
|
|
7928
8271
|
addParentPointers(root);
|
|
7929
|
-
|
|
8272
|
+
let { expressions: statements } = root;
|
|
7930
8273
|
processPlaceholders(statements);
|
|
7931
8274
|
processNegativeIndexAccess(statements);
|
|
7932
8275
|
processTypes(statements);
|
|
@@ -7939,9 +8282,25 @@ function processProgram(root) {
|
|
|
7939
8282
|
processIterationExpressions(statements);
|
|
7940
8283
|
processFinallyClauses(statements);
|
|
7941
8284
|
processBreaksContinues(statements);
|
|
8285
|
+
root.topLevelAwait = hasAwait(statements);
|
|
8286
|
+
root.topLevelYield = hasYield(statements);
|
|
8287
|
+
let rootIIFE;
|
|
8288
|
+
if (config2.iife || config2.repl) {
|
|
8289
|
+
rootIIFE = wrapIIFE(
|
|
8290
|
+
root.expressions,
|
|
8291
|
+
root.topLevelAwait,
|
|
8292
|
+
root.topLevelYield ? "*" : void 0
|
|
8293
|
+
);
|
|
8294
|
+
statements = [["", rootIIFE]];
|
|
8295
|
+
root.children = root.children.map(($16) => $16 === root.expressions ? statements : $16);
|
|
8296
|
+
root.expressions = statements;
|
|
8297
|
+
}
|
|
7942
8298
|
hoistRefDecs(statements);
|
|
7943
8299
|
processFunctions(statements, config2);
|
|
7944
|
-
|
|
8300
|
+
if (config2.coffeeClasses) {
|
|
8301
|
+
processCoffeeClasses(statements);
|
|
8302
|
+
}
|
|
8303
|
+
statements.unshift(...extractPreludeFor(statements));
|
|
7945
8304
|
if (config2.autoLet) {
|
|
7946
8305
|
createConstLetDecs(statements, [], "let");
|
|
7947
8306
|
} else if (config2.autoConst) {
|
|
@@ -7964,10 +8323,10 @@ async function processProgramAsync(root) {
|
|
|
7964
8323
|
await processComptime(statements);
|
|
7965
8324
|
}
|
|
7966
8325
|
function processRepl(root, rootIIFE) {
|
|
7967
|
-
const topBlock = gatherRecursive(rootIIFE, ($
|
|
8326
|
+
const topBlock = gatherRecursive(rootIIFE, ($17) => $17.type === "BlockStatement")[0];
|
|
7968
8327
|
let i = 0;
|
|
7969
|
-
for (let
|
|
7970
|
-
const decl =
|
|
8328
|
+
for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($18) => $18.type === "Declaration"), i14 = 0, len11 = ref22.length; i14 < len11; i14++) {
|
|
8329
|
+
const decl = ref22[i14];
|
|
7971
8330
|
if (!decl.names?.length) {
|
|
7972
8331
|
continue;
|
|
7973
8332
|
}
|
|
@@ -7980,8 +8339,8 @@ function processRepl(root, rootIIFE) {
|
|
|
7980
8339
|
root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]);
|
|
7981
8340
|
}
|
|
7982
8341
|
}
|
|
7983
|
-
for (let
|
|
7984
|
-
const func =
|
|
8342
|
+
for (let ref23 = gatherRecursive(topBlock, ($19) => $19.type === "FunctionExpression"), i15 = 0, len12 = ref23.length; i15 < len12; i15++) {
|
|
8343
|
+
const func = ref23[i15];
|
|
7985
8344
|
if (func.name && func.parent?.type === "BlockStatement") {
|
|
7986
8345
|
if (func.parent === topBlock) {
|
|
7987
8346
|
replaceNode(func, void 0);
|
|
@@ -7993,8 +8352,8 @@ function processRepl(root, rootIIFE) {
|
|
|
7993
8352
|
}
|
|
7994
8353
|
}
|
|
7995
8354
|
}
|
|
7996
|
-
for (let
|
|
7997
|
-
const classExp =
|
|
8355
|
+
for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($20) => $20.type === "ClassExpression"), i16 = 0, len13 = ref24.length; i16 < len13; i16++) {
|
|
8356
|
+
const classExp = ref24[i16];
|
|
7998
8357
|
let m8;
|
|
7999
8358
|
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)) {
|
|
8000
8359
|
classExp.children.unshift(classExp.name, "=");
|
|
@@ -8003,7 +8362,7 @@ function processRepl(root, rootIIFE) {
|
|
|
8003
8362
|
}
|
|
8004
8363
|
}
|
|
8005
8364
|
function populateRefs(statements) {
|
|
8006
|
-
const refNodes = gatherRecursive(statements, ($
|
|
8365
|
+
const refNodes = gatherRecursive(statements, ($21) => $21.type === "Ref");
|
|
8007
8366
|
if (refNodes.length) {
|
|
8008
8367
|
const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
|
|
8009
8368
|
const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
|
|
@@ -8025,8 +8384,8 @@ function populateRefs(statements) {
|
|
|
8025
8384
|
function processPlaceholders(statements) {
|
|
8026
8385
|
const placeholderMap = /* @__PURE__ */ new Map();
|
|
8027
8386
|
const liftedIfs = /* @__PURE__ */ new Set();
|
|
8028
|
-
for (let
|
|
8029
|
-
const exp =
|
|
8387
|
+
for (let ref25 = gatherRecursiveAll(statements, ($22) => $22.type === "Placeholder"), i17 = 0, len14 = ref25.length; i17 < len14; i17++) {
|
|
8388
|
+
const exp = ref25[i17];
|
|
8030
8389
|
let ancestor;
|
|
8031
8390
|
if (exp.subtype === ".") {
|
|
8032
8391
|
({ ancestor } = findAncestor(
|
|
@@ -8135,11 +8494,11 @@ function processPlaceholders(statements) {
|
|
|
8135
8494
|
for (const [ancestor, placeholders] of placeholderMap) {
|
|
8136
8495
|
let ref = makeRef("$");
|
|
8137
8496
|
let typeSuffix;
|
|
8138
|
-
for (let
|
|
8139
|
-
const placeholder = placeholders[
|
|
8497
|
+
for (let i18 = 0, len15 = placeholders.length; i18 < len15; i18++) {
|
|
8498
|
+
const placeholder = placeholders[i18];
|
|
8140
8499
|
typeSuffix ??= placeholder.typeSuffix;
|
|
8141
|
-
let
|
|
8142
|
-
(
|
|
8500
|
+
let ref26;
|
|
8501
|
+
(ref26 = placeholder.children)[ref26.length - 1] = ref;
|
|
8143
8502
|
}
|
|
8144
8503
|
const { parent } = ancestor;
|
|
8145
8504
|
const body = maybeUnwrap(ancestor);
|
|
@@ -8160,16 +8519,16 @@ function processPlaceholders(statements) {
|
|
|
8160
8519
|
}
|
|
8161
8520
|
case "PipelineExpression": {
|
|
8162
8521
|
const i = findChildIndex(parent, ancestor);
|
|
8163
|
-
let
|
|
8522
|
+
let ref27;
|
|
8164
8523
|
if (i === 1) {
|
|
8165
|
-
|
|
8524
|
+
ref27 = ancestor === parent.children[i];
|
|
8166
8525
|
} else if (i === 2) {
|
|
8167
|
-
|
|
8526
|
+
ref27 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
|
|
8168
8527
|
} else {
|
|
8169
|
-
|
|
8528
|
+
ref27 = void 0;
|
|
8170
8529
|
}
|
|
8171
8530
|
;
|
|
8172
|
-
outer =
|
|
8531
|
+
outer = ref27;
|
|
8173
8532
|
break;
|
|
8174
8533
|
}
|
|
8175
8534
|
case "AssignmentExpression":
|
|
@@ -8184,9 +8543,9 @@ function processPlaceholders(statements) {
|
|
|
8184
8543
|
fnExp = makeLeftHandSideExpression(fnExp);
|
|
8185
8544
|
}
|
|
8186
8545
|
replaceNode(ancestor, fnExp, parent);
|
|
8187
|
-
let
|
|
8188
|
-
if (
|
|
8189
|
-
const ws =
|
|
8546
|
+
let ref28;
|
|
8547
|
+
if (ref28 = getTrimmingSpace(body)) {
|
|
8548
|
+
const ws = ref28;
|
|
8190
8549
|
inplaceInsertTrimmingSpace(body, "");
|
|
8191
8550
|
inplacePrepend(ws, fnExp);
|
|
8192
8551
|
}
|
|
@@ -8230,8 +8589,8 @@ function reorderBindingRestProperty(props) {
|
|
|
8230
8589
|
}
|
|
8231
8590
|
];
|
|
8232
8591
|
}
|
|
8233
|
-
let
|
|
8234
|
-
if (Array.isArray(rest.delim) && (
|
|
8592
|
+
let ref29;
|
|
8593
|
+
if (Array.isArray(rest.delim) && (ref29 = rest.delim)[ref29.length - 1]?.token === ",") {
|
|
8235
8594
|
rest.delim = rest.delim.slice(0, -1);
|
|
8236
8595
|
rest.children = [...rest.children.slice(0, -1), rest.delim];
|
|
8237
8596
|
}
|
|
@@ -8322,6 +8681,8 @@ var grammar = {
|
|
|
8322
8681
|
ExpressionizedStatement,
|
|
8323
8682
|
StatementExpression,
|
|
8324
8683
|
CommaExpression,
|
|
8684
|
+
CommaExpressionSpread,
|
|
8685
|
+
AssignmentExpressionSpread,
|
|
8325
8686
|
Arguments,
|
|
8326
8687
|
ImplicitArguments,
|
|
8327
8688
|
ExplicitArguments,
|
|
@@ -8501,6 +8862,7 @@ var grammar = {
|
|
|
8501
8862
|
BareNestedBlock,
|
|
8502
8863
|
BareBlock,
|
|
8503
8864
|
ThenClause,
|
|
8865
|
+
ThenBlock,
|
|
8504
8866
|
BracedThenClause,
|
|
8505
8867
|
BracedOrEmptyBlock,
|
|
8506
8868
|
NoCommaBracedOrEmptyBlock,
|
|
@@ -8610,6 +8972,7 @@ var grammar = {
|
|
|
8610
8972
|
PostfixStatement,
|
|
8611
8973
|
_PostfixStatement,
|
|
8612
8974
|
Statement,
|
|
8975
|
+
IterationActualStatement,
|
|
8613
8976
|
ShouldExpressionize,
|
|
8614
8977
|
NoCommaStatement,
|
|
8615
8978
|
EmptyStatement,
|
|
@@ -9265,130 +9628,132 @@ var $L119 = (0, import_lib2.$L)(";");
|
|
|
9265
9628
|
var $L120 = (0, import_lib2.$L)("some");
|
|
9266
9629
|
var $L121 = (0, import_lib2.$L)("every");
|
|
9267
9630
|
var $L122 = (0, import_lib2.$L)("count");
|
|
9268
|
-
var $L123 = (0, import_lib2.$L)("
|
|
9269
|
-
var $L124 = (0, import_lib2.$L)("
|
|
9270
|
-
var $L125 = (0, import_lib2.$L)("
|
|
9271
|
-
var $L126 = (0, import_lib2.$L)("
|
|
9272
|
-
var $L127 = (0, import_lib2.$L)("
|
|
9273
|
-
var $L128 = (0, import_lib2.$L)("
|
|
9274
|
-
var $L129 = (0, import_lib2.$L)("
|
|
9275
|
-
var $L130 = (0, import_lib2.$L)("
|
|
9276
|
-
var $L131 = (0, import_lib2.$L)("
|
|
9277
|
-
var $L132 = (0, import_lib2.$L)("
|
|
9278
|
-
var $L133 = (0, import_lib2.$L)("
|
|
9279
|
-
var $L134 = (0, import_lib2.$L)("
|
|
9280
|
-
var $L135 = (0, import_lib2.$L)("
|
|
9281
|
-
var $L136 = (0, import_lib2.$L)("
|
|
9282
|
-
var $L137 = (0, import_lib2.$L)("
|
|
9283
|
-
var $L138 = (0, import_lib2.$L)("
|
|
9284
|
-
var $L139 = (0, import_lib2.$L)("
|
|
9285
|
-
var $L140 = (0, import_lib2.$L)("
|
|
9286
|
-
var $L141 = (0, import_lib2.$L)("
|
|
9287
|
-
var $L142 = (0, import_lib2.$L)("
|
|
9288
|
-
var $L143 = (0, import_lib2.$L)("
|
|
9289
|
-
var $L144 = (0, import_lib2.$L)("
|
|
9290
|
-
var $L145 = (0, import_lib2.$L)("
|
|
9291
|
-
var $L146 = (0, import_lib2.$L)("
|
|
9292
|
-
var $L147 = (0, import_lib2.$L)("
|
|
9293
|
-
var $L148 = (0, import_lib2.$L)("
|
|
9294
|
-
var $L149 = (0, import_lib2.$L)("
|
|
9295
|
-
var $L150 = (0, import_lib2.$L)("
|
|
9296
|
-
var $L151 = (0, import_lib2.$L)("
|
|
9297
|
-
var $L152 = (0, import_lib2.$L)("
|
|
9298
|
-
var $L153 = (0, import_lib2.$L)("
|
|
9299
|
-
var $L154 = (0, import_lib2.$L)("
|
|
9300
|
-
var $L155 = (0, import_lib2.$L)("
|
|
9301
|
-
var $L156 = (0, import_lib2.$L)("
|
|
9302
|
-
var $L157 = (0, import_lib2.$L)("
|
|
9303
|
-
var $L158 = (0, import_lib2.$L)("
|
|
9304
|
-
var $L159 = (0, import_lib2.$L)("
|
|
9305
|
-
var $L160 = (0, import_lib2.$L)("
|
|
9306
|
-
var $L161 = (0, import_lib2.$L)("
|
|
9307
|
-
var $L162 = (0, import_lib2.$L)("\
|
|
9308
|
-
var $L163 = (0, import_lib2.$L)("
|
|
9309
|
-
var $L164 = (0, import_lib2.$L)(
|
|
9310
|
-
var $L165 = (0, import_lib2.$L)("
|
|
9311
|
-
var $L166 = (0, import_lib2.$L)("
|
|
9312
|
-
var $L167 = (0, import_lib2.$L)("
|
|
9313
|
-
var $L168 = (0, import_lib2.$L)("
|
|
9314
|
-
var $L169 = (0, import_lib2.$L)("
|
|
9315
|
-
var $L170 = (0, import_lib2.$L)("
|
|
9316
|
-
var $L171 = (0, import_lib2.$L)("
|
|
9317
|
-
var $L172 = (0, import_lib2.$L)("
|
|
9318
|
-
var $L173 = (0, import_lib2.$L)("
|
|
9319
|
-
var $L174 = (0, import_lib2.$L)("
|
|
9320
|
-
var $L175 = (0, import_lib2.$L)("
|
|
9321
|
-
var $L176 = (0, import_lib2.$L)("
|
|
9322
|
-
var $L177 = (0, import_lib2.$L)("
|
|
9323
|
-
var $L178 = (0, import_lib2.$L)("
|
|
9324
|
-
var $L179 = (0, import_lib2.$L)("
|
|
9325
|
-
var $L180 = (0, import_lib2.$L)("
|
|
9326
|
-
var $L181 = (0, import_lib2.$L)("
|
|
9327
|
-
var $L182 = (0, import_lib2.$L)("
|
|
9328
|
-
var $L183 = (0, import_lib2.$L)("
|
|
9329
|
-
var $L184 = (0, import_lib2.$L)("
|
|
9330
|
-
var $L185 = (0, import_lib2.$L)("
|
|
9331
|
-
var $L186 = (0, import_lib2.$L)("
|
|
9332
|
-
var $L187 = (0, import_lib2.$L)("
|
|
9333
|
-
var $L188 = (0, import_lib2.$L)("
|
|
9334
|
-
var $L189 = (0, import_lib2.$L)("
|
|
9335
|
-
var $L190 = (0, import_lib2.$L)("
|
|
9336
|
-
var $L191 = (0, import_lib2.$L)("
|
|
9337
|
-
var $L192 = (0, import_lib2.$L)("
|
|
9338
|
-
var $L193 = (0, import_lib2.$L)("
|
|
9339
|
-
var $L194 = (0, import_lib2.$L)("
|
|
9340
|
-
var $L195 = (0, import_lib2.$L)("
|
|
9341
|
-
var $L196 = (0, import_lib2.$L)("
|
|
9342
|
-
var $L197 = (0, import_lib2.$L)("
|
|
9343
|
-
var $L198 = (0, import_lib2.$L)("
|
|
9344
|
-
var $L199 = (0, import_lib2.$L)("
|
|
9345
|
-
var $L200 = (0, import_lib2.$L)("
|
|
9346
|
-
var $L201 = (0, import_lib2.$L)("\u25B7");
|
|
9347
|
-
var $L202 = (0, import_lib2.$L)("
|
|
9348
|
-
var $L203 = (0, import_lib2.$L)("
|
|
9349
|
-
var $L204 = (0, import_lib2.$L)("
|
|
9350
|
-
var $L205 = (0, import_lib2.$L)("
|
|
9351
|
-
var $L206 = (0, import_lib2.$L)("
|
|
9352
|
-
var $L207 = (0, import_lib2.$L)("
|
|
9353
|
-
var $L208 = (0, import_lib2.$L)("
|
|
9354
|
-
var $L209 = (0, import_lib2.$L)("
|
|
9355
|
-
var $L210 = (0, import_lib2.$L)("
|
|
9356
|
-
var $L211 = (0, import_lib2.$L)("
|
|
9357
|
-
var $L212 = (0, import_lib2.$L)("
|
|
9358
|
-
var $L213 = (0, import_lib2.$L)("
|
|
9359
|
-
var $L214 = (0, import_lib2.$L)(
|
|
9360
|
-
var $L215 = (0, import_lib2.$L)("
|
|
9361
|
-
var $L216 = (0, import_lib2.$L)("
|
|
9362
|
-
var $L217 = (0, import_lib2.$L)("
|
|
9363
|
-
var $L218 = (0, import_lib2.$L)("
|
|
9364
|
-
var $L219 = (0, import_lib2.$L)("
|
|
9365
|
-
var $L220 = (0, import_lib2.$L)("
|
|
9366
|
-
var $L221 = (0, import_lib2.$L)("
|
|
9367
|
-
var $L222 = (0, import_lib2.$L)("
|
|
9368
|
-
var $L223 = (0, import_lib2.$L)("
|
|
9369
|
-
var $L224 = (0, import_lib2.$L)("
|
|
9370
|
-
var $L225 = (0, import_lib2.$L)("
|
|
9371
|
-
var $L226 = (0, import_lib2.$L)("
|
|
9372
|
-
var $L227 = (0, import_lib2.$L)("
|
|
9373
|
-
var $L228 = (0, import_lib2.$L)("
|
|
9374
|
-
var $L229 = (0, import_lib2.$L)("
|
|
9375
|
-
var $L230 = (0, import_lib2.$L)("
|
|
9376
|
-
var $L231 = (0, import_lib2.$L)("
|
|
9377
|
-
var $L232 = (0, import_lib2.$L)("
|
|
9378
|
-
var $L233 = (0, import_lib2.$L)("
|
|
9379
|
-
var $L234 = (0, import_lib2.$L)("
|
|
9380
|
-
var $L235 = (0, import_lib2.$L)("
|
|
9381
|
-
var $L236 = (0, import_lib2.$L)("
|
|
9382
|
-
var $L237 = (0, import_lib2.$L)("
|
|
9383
|
-
var $L238 = (0, import_lib2.$L)("
|
|
9384
|
-
var $L239 = (0, import_lib2.$L)("
|
|
9385
|
-
var $L240 = (0, import_lib2.$L)("
|
|
9386
|
-
var $L241 = (0, import_lib2.$L)("
|
|
9387
|
-
var $L242 = (0, import_lib2.$L)("
|
|
9388
|
-
var $L243 = (0, import_lib2.$L)("
|
|
9389
|
-
var $L244 = (0, import_lib2.$L)("
|
|
9390
|
-
var $L245 = (0, import_lib2.$L)("
|
|
9391
|
-
var $L246 = (0, import_lib2.$L)("
|
|
9631
|
+
var $L123 = (0, import_lib2.$L)("first");
|
|
9632
|
+
var $L124 = (0, import_lib2.$L)("sum");
|
|
9633
|
+
var $L125 = (0, import_lib2.$L)("product");
|
|
9634
|
+
var $L126 = (0, import_lib2.$L)("min");
|
|
9635
|
+
var $L127 = (0, import_lib2.$L)("max");
|
|
9636
|
+
var $L128 = (0, import_lib2.$L)("join");
|
|
9637
|
+
var $L129 = (0, import_lib2.$L)("concat");
|
|
9638
|
+
var $L130 = (0, import_lib2.$L)("break");
|
|
9639
|
+
var $L131 = (0, import_lib2.$L)("continue");
|
|
9640
|
+
var $L132 = (0, import_lib2.$L)("debugger");
|
|
9641
|
+
var $L133 = (0, import_lib2.$L)("require");
|
|
9642
|
+
var $L134 = (0, import_lib2.$L)("with");
|
|
9643
|
+
var $L135 = (0, import_lib2.$L)("assert");
|
|
9644
|
+
var $L136 = (0, import_lib2.$L)(":=");
|
|
9645
|
+
var $L137 = (0, import_lib2.$L)("\u2254");
|
|
9646
|
+
var $L138 = (0, import_lib2.$L)(".=");
|
|
9647
|
+
var $L139 = (0, import_lib2.$L)("::=");
|
|
9648
|
+
var $L140 = (0, import_lib2.$L)("/*");
|
|
9649
|
+
var $L141 = (0, import_lib2.$L)("*/");
|
|
9650
|
+
var $L142 = (0, import_lib2.$L)("\\");
|
|
9651
|
+
var $L143 = (0, import_lib2.$L)(")");
|
|
9652
|
+
var $L144 = (0, import_lib2.$L)("abstract");
|
|
9653
|
+
var $L145 = (0, import_lib2.$L)("as");
|
|
9654
|
+
var $L146 = (0, import_lib2.$L)("@");
|
|
9655
|
+
var $L147 = (0, import_lib2.$L)("@@");
|
|
9656
|
+
var $L148 = (0, import_lib2.$L)("async");
|
|
9657
|
+
var $L149 = (0, import_lib2.$L)("await");
|
|
9658
|
+
var $L150 = (0, import_lib2.$L)("`");
|
|
9659
|
+
var $L151 = (0, import_lib2.$L)("by");
|
|
9660
|
+
var $L152 = (0, import_lib2.$L)("case");
|
|
9661
|
+
var $L153 = (0, import_lib2.$L)("catch");
|
|
9662
|
+
var $L154 = (0, import_lib2.$L)("class");
|
|
9663
|
+
var $L155 = (0, import_lib2.$L)("#{");
|
|
9664
|
+
var $L156 = (0, import_lib2.$L)("comptime");
|
|
9665
|
+
var $L157 = (0, import_lib2.$L)("declare");
|
|
9666
|
+
var $L158 = (0, import_lib2.$L)("default");
|
|
9667
|
+
var $L159 = (0, import_lib2.$L)("delete");
|
|
9668
|
+
var $L160 = (0, import_lib2.$L)("do");
|
|
9669
|
+
var $L161 = (0, import_lib2.$L)("..");
|
|
9670
|
+
var $L162 = (0, import_lib2.$L)("\u2025");
|
|
9671
|
+
var $L163 = (0, import_lib2.$L)("...");
|
|
9672
|
+
var $L164 = (0, import_lib2.$L)("\u2026");
|
|
9673
|
+
var $L165 = (0, import_lib2.$L)("::");
|
|
9674
|
+
var $L166 = (0, import_lib2.$L)('"');
|
|
9675
|
+
var $L167 = (0, import_lib2.$L)("each");
|
|
9676
|
+
var $L168 = (0, import_lib2.$L)("else");
|
|
9677
|
+
var $L169 = (0, import_lib2.$L)("!");
|
|
9678
|
+
var $L170 = (0, import_lib2.$L)("export");
|
|
9679
|
+
var $L171 = (0, import_lib2.$L)("extends");
|
|
9680
|
+
var $L172 = (0, import_lib2.$L)("finally");
|
|
9681
|
+
var $L173 = (0, import_lib2.$L)("for");
|
|
9682
|
+
var $L174 = (0, import_lib2.$L)("from");
|
|
9683
|
+
var $L175 = (0, import_lib2.$L)("function");
|
|
9684
|
+
var $L176 = (0, import_lib2.$L)("get");
|
|
9685
|
+
var $L177 = (0, import_lib2.$L)("set");
|
|
9686
|
+
var $L178 = (0, import_lib2.$L)("#");
|
|
9687
|
+
var $L179 = (0, import_lib2.$L)("if");
|
|
9688
|
+
var $L180 = (0, import_lib2.$L)("in");
|
|
9689
|
+
var $L181 = (0, import_lib2.$L)("infer");
|
|
9690
|
+
var $L182 = (0, import_lib2.$L)("let");
|
|
9691
|
+
var $L183 = (0, import_lib2.$L)("const");
|
|
9692
|
+
var $L184 = (0, import_lib2.$L)("is");
|
|
9693
|
+
var $L185 = (0, import_lib2.$L)("var");
|
|
9694
|
+
var $L186 = (0, import_lib2.$L)("like");
|
|
9695
|
+
var $L187 = (0, import_lib2.$L)("loop");
|
|
9696
|
+
var $L188 = (0, import_lib2.$L)("new");
|
|
9697
|
+
var $L189 = (0, import_lib2.$L)("not");
|
|
9698
|
+
var $L190 = (0, import_lib2.$L)("of");
|
|
9699
|
+
var $L191 = (0, import_lib2.$L)("[");
|
|
9700
|
+
var $L192 = (0, import_lib2.$L)("operator");
|
|
9701
|
+
var $L193 = (0, import_lib2.$L)("override");
|
|
9702
|
+
var $L194 = (0, import_lib2.$L)("own");
|
|
9703
|
+
var $L195 = (0, import_lib2.$L)("public");
|
|
9704
|
+
var $L196 = (0, import_lib2.$L)("private");
|
|
9705
|
+
var $L197 = (0, import_lib2.$L)("protected");
|
|
9706
|
+
var $L198 = (0, import_lib2.$L)("||>");
|
|
9707
|
+
var $L199 = (0, import_lib2.$L)("|\u25B7");
|
|
9708
|
+
var $L200 = (0, import_lib2.$L)("|>=");
|
|
9709
|
+
var $L201 = (0, import_lib2.$L)("\u25B7=");
|
|
9710
|
+
var $L202 = (0, import_lib2.$L)("|>");
|
|
9711
|
+
var $L203 = (0, import_lib2.$L)("\u25B7");
|
|
9712
|
+
var $L204 = (0, import_lib2.$L)("readonly");
|
|
9713
|
+
var $L205 = (0, import_lib2.$L)("return");
|
|
9714
|
+
var $L206 = (0, import_lib2.$L)("satisfies");
|
|
9715
|
+
var $L207 = (0, import_lib2.$L)("'");
|
|
9716
|
+
var $L208 = (0, import_lib2.$L)("static");
|
|
9717
|
+
var $L209 = (0, import_lib2.$L)("${");
|
|
9718
|
+
var $L210 = (0, import_lib2.$L)("super");
|
|
9719
|
+
var $L211 = (0, import_lib2.$L)("switch");
|
|
9720
|
+
var $L212 = (0, import_lib2.$L)("target");
|
|
9721
|
+
var $L213 = (0, import_lib2.$L)("then");
|
|
9722
|
+
var $L214 = (0, import_lib2.$L)("this");
|
|
9723
|
+
var $L215 = (0, import_lib2.$L)("throw");
|
|
9724
|
+
var $L216 = (0, import_lib2.$L)('"""');
|
|
9725
|
+
var $L217 = (0, import_lib2.$L)("'''");
|
|
9726
|
+
var $L218 = (0, import_lib2.$L)("///");
|
|
9727
|
+
var $L219 = (0, import_lib2.$L)("```");
|
|
9728
|
+
var $L220 = (0, import_lib2.$L)("try");
|
|
9729
|
+
var $L221 = (0, import_lib2.$L)("typeof");
|
|
9730
|
+
var $L222 = (0, import_lib2.$L)("undefined");
|
|
9731
|
+
var $L223 = (0, import_lib2.$L)("unless");
|
|
9732
|
+
var $L224 = (0, import_lib2.$L)("until");
|
|
9733
|
+
var $L225 = (0, import_lib2.$L)("using");
|
|
9734
|
+
var $L226 = (0, import_lib2.$L)("void");
|
|
9735
|
+
var $L227 = (0, import_lib2.$L)("when");
|
|
9736
|
+
var $L228 = (0, import_lib2.$L)("while");
|
|
9737
|
+
var $L229 = (0, import_lib2.$L)("yield");
|
|
9738
|
+
var $L230 = (0, import_lib2.$L)("/>");
|
|
9739
|
+
var $L231 = (0, import_lib2.$L)("</");
|
|
9740
|
+
var $L232 = (0, import_lib2.$L)("<>");
|
|
9741
|
+
var $L233 = (0, import_lib2.$L)("</>");
|
|
9742
|
+
var $L234 = (0, import_lib2.$L)("<!--");
|
|
9743
|
+
var $L235 = (0, import_lib2.$L)("-->");
|
|
9744
|
+
var $L236 = (0, import_lib2.$L)("type");
|
|
9745
|
+
var $L237 = (0, import_lib2.$L)("enum");
|
|
9746
|
+
var $L238 = (0, import_lib2.$L)("interface");
|
|
9747
|
+
var $L239 = (0, import_lib2.$L)("global");
|
|
9748
|
+
var $L240 = (0, import_lib2.$L)("module");
|
|
9749
|
+
var $L241 = (0, import_lib2.$L)("namespace");
|
|
9750
|
+
var $L242 = (0, import_lib2.$L)("asserts");
|
|
9751
|
+
var $L243 = (0, import_lib2.$L)("keyof");
|
|
9752
|
+
var $L244 = (0, import_lib2.$L)("???");
|
|
9753
|
+
var $L245 = (0, import_lib2.$L)("unique");
|
|
9754
|
+
var $L246 = (0, import_lib2.$L)("symbol");
|
|
9755
|
+
var $L247 = (0, import_lib2.$L)("[]");
|
|
9756
|
+
var $L248 = (0, import_lib2.$L)("civet");
|
|
9392
9757
|
var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
|
|
9393
9758
|
var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
|
|
9394
9759
|
var $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
@@ -9504,8 +9869,7 @@ var Program$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Reset, Init, (0, import
|
|
|
9504
9869
|
expressions: statements,
|
|
9505
9870
|
children: [reset, init, ws1, statements, ws2],
|
|
9506
9871
|
bare: true,
|
|
9507
|
-
root: true
|
|
9508
|
-
topLevelAwait: hasAwait(statements)
|
|
9872
|
+
root: true
|
|
9509
9873
|
};
|
|
9510
9874
|
processProgram(program);
|
|
9511
9875
|
return program;
|
|
@@ -9632,6 +9996,71 @@ var CommaExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(AssignmentExpre
|
|
|
9632
9996
|
function CommaExpression(ctx, state2) {
|
|
9633
9997
|
return (0, import_lib2.$EVENT)(ctx, state2, "CommaExpression", CommaExpression$0);
|
|
9634
9998
|
}
|
|
9999
|
+
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) {
|
|
10000
|
+
var ws = $1;
|
|
10001
|
+
var ws2 = $3;
|
|
10002
|
+
var iteration = $4;
|
|
10003
|
+
if (iteration.subtype === "do" || iteration.subtype === "comptime") return $skip;
|
|
10004
|
+
if (ws2) {
|
|
10005
|
+
if (ws) {
|
|
10006
|
+
ws = [ws, ws2];
|
|
10007
|
+
} else {
|
|
10008
|
+
ws = ws2;
|
|
10009
|
+
}
|
|
10010
|
+
}
|
|
10011
|
+
iteration = { ...iteration, resultsParent: true };
|
|
10012
|
+
return prepend(ws, iteration);
|
|
10013
|
+
});
|
|
10014
|
+
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) {
|
|
10015
|
+
if ($2.length == 0) return $1;
|
|
10016
|
+
return $0;
|
|
10017
|
+
});
|
|
10018
|
+
var CommaExpressionSpread$$ = [CommaExpressionSpread$0, CommaExpressionSpread$1];
|
|
10019
|
+
function CommaExpressionSpread(ctx, state2) {
|
|
10020
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "CommaExpressionSpread", CommaExpressionSpread$$);
|
|
10021
|
+
}
|
|
10022
|
+
var AssignmentExpressionSpread$0 = (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$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) {
|
|
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$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), DotDotDot, AssignmentExpression), function($skip, $loc, $0, $1, $2, $3) {
|
|
10042
|
+
var expression = $3;
|
|
10043
|
+
return {
|
|
10044
|
+
type: "SpreadElement",
|
|
10045
|
+
children: $0,
|
|
10046
|
+
expression,
|
|
10047
|
+
names: expression.names
|
|
10048
|
+
};
|
|
10049
|
+
});
|
|
10050
|
+
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) {
|
|
10051
|
+
var expression = $1;
|
|
10052
|
+
if (!$2) return $1;
|
|
10053
|
+
return {
|
|
10054
|
+
type: "SpreadElement",
|
|
10055
|
+
children: [...$2, $1],
|
|
10056
|
+
expression,
|
|
10057
|
+
names: expression.names
|
|
10058
|
+
};
|
|
10059
|
+
});
|
|
10060
|
+
var AssignmentExpressionSpread$$ = [AssignmentExpressionSpread$0, AssignmentExpressionSpread$1, AssignmentExpressionSpread$2, AssignmentExpressionSpread$3];
|
|
10061
|
+
function AssignmentExpressionSpread(ctx, state2) {
|
|
10062
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "AssignmentExpressionSpread", AssignmentExpressionSpread$$);
|
|
10063
|
+
}
|
|
9635
10064
|
var Arguments$0 = ExplicitArguments;
|
|
9636
10065
|
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) {
|
|
9637
10066
|
var args = $2;
|
|
@@ -10762,8 +11191,7 @@ var FieldDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEn
|
|
|
10762
11191
|
var id = $2;
|
|
10763
11192
|
var exp = $6;
|
|
10764
11193
|
switch (exp.type) {
|
|
10765
|
-
|
|
10766
|
-
case "FunctionExpression":
|
|
11194
|
+
case "FunctionExpression": {
|
|
10767
11195
|
const fnTokenIndex = exp.children.findIndex((c) => c?.token?.startsWith("function"));
|
|
10768
11196
|
const children = exp.children.slice();
|
|
10769
11197
|
if (exp.generator) {
|
|
@@ -10773,8 +11201,29 @@ var FieldDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEn
|
|
|
10773
11201
|
}
|
|
10774
11202
|
return {
|
|
10775
11203
|
...exp,
|
|
11204
|
+
type: "MethodDefinition",
|
|
11205
|
+
name: id.name,
|
|
11206
|
+
signature: { ...exp.signature, id, name: id.name },
|
|
10776
11207
|
children
|
|
10777
11208
|
};
|
|
11209
|
+
}
|
|
11210
|
+
case "ArrowFunction": {
|
|
11211
|
+
const block = { ...exp.block };
|
|
11212
|
+
const children = exp.children.filter((c) => !(Array.isArray(c) && c[c.length - 1]?.token?.includes("=>"))).map((c) => c === exp.block ? block : c);
|
|
11213
|
+
children.unshift(id);
|
|
11214
|
+
exp = {
|
|
11215
|
+
...exp,
|
|
11216
|
+
type: "MethodDefinition",
|
|
11217
|
+
name: id.name,
|
|
11218
|
+
signature: { ...exp.signature, id, name: id.name },
|
|
11219
|
+
block,
|
|
11220
|
+
children,
|
|
11221
|
+
autoBind: true
|
|
11222
|
+
};
|
|
11223
|
+
block.parent = exp;
|
|
11224
|
+
braceBlock(block);
|
|
11225
|
+
return exp;
|
|
11226
|
+
}
|
|
10778
11227
|
default:
|
|
10779
11228
|
return {
|
|
10780
11229
|
type: "FieldDefinition",
|
|
@@ -10784,11 +11233,11 @@ var FieldDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEn
|
|
|
10784
11233
|
}
|
|
10785
11234
|
});
|
|
10786
11235
|
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) {
|
|
10787
|
-
var
|
|
11236
|
+
var readonly = $1;
|
|
10788
11237
|
var id = $2;
|
|
10789
11238
|
var typeSuffix = $3;
|
|
10790
11239
|
var ca = $5;
|
|
10791
|
-
|
|
11240
|
+
readonly.children[0].$loc = {
|
|
10792
11241
|
pos: ca.$loc.pos - 1,
|
|
10793
11242
|
length: ca.$loc.length + 1
|
|
10794
11243
|
};
|
|
@@ -10796,21 +11245,36 @@ var FieldDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertReadonly,
|
|
|
10796
11245
|
type: "FieldDefinition",
|
|
10797
11246
|
id,
|
|
10798
11247
|
typeSuffix,
|
|
10799
|
-
children: $0
|
|
11248
|
+
children: $0,
|
|
11249
|
+
readonly
|
|
11250
|
+
};
|
|
11251
|
+
});
|
|
11252
|
+
var FieldDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEnabled, ActualAssignment), function($skip, $loc, $0, $1, $2) {
|
|
11253
|
+
var assignment = $2;
|
|
11254
|
+
return {
|
|
11255
|
+
type: "CoffeeClassPrivate",
|
|
11256
|
+
children: [assignment],
|
|
11257
|
+
assignment
|
|
10800
11258
|
};
|
|
10801
11259
|
});
|
|
10802
|
-
var FieldDefinition$
|
|
11260
|
+
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) {
|
|
11261
|
+
var abstract = $1;
|
|
11262
|
+
var readonly = $2;
|
|
10803
11263
|
var id = $3;
|
|
10804
11264
|
var typeSuffix = $4;
|
|
11265
|
+
var initializer = $5;
|
|
10805
11266
|
return {
|
|
10806
11267
|
type: "FieldDefinition",
|
|
10807
11268
|
children: $0,
|
|
10808
|
-
ts:
|
|
11269
|
+
ts: abstract ? true : void 0,
|
|
10809
11270
|
id,
|
|
10810
|
-
typeSuffix
|
|
11271
|
+
typeSuffix,
|
|
11272
|
+
abstract,
|
|
11273
|
+
readonly,
|
|
11274
|
+
initializer
|
|
10811
11275
|
};
|
|
10812
11276
|
});
|
|
10813
|
-
var FieldDefinition$$ = [FieldDefinition$0, FieldDefinition$1, FieldDefinition$2];
|
|
11277
|
+
var FieldDefinition$$ = [FieldDefinition$0, FieldDefinition$1, FieldDefinition$2, FieldDefinition$3];
|
|
10814
11278
|
function FieldDefinition(ctx, state2) {
|
|
10815
11279
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "FieldDefinition", FieldDefinition$$);
|
|
10816
11280
|
}
|
|
@@ -11617,7 +12081,7 @@ var PinPattern$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Caret, SingleLineExp
|
|
|
11617
12081
|
var expression = $2;
|
|
11618
12082
|
return {
|
|
11619
12083
|
type: "PinPattern",
|
|
11620
|
-
children:
|
|
12084
|
+
children: [expression],
|
|
11621
12085
|
expression
|
|
11622
12086
|
};
|
|
11623
12087
|
});
|
|
@@ -11778,29 +12242,71 @@ function NestedBindingPropertyList(ctx, state2) {
|
|
|
11778
12242
|
return (0, import_lib2.$EVENT)(ctx, state2, "NestedBindingPropertyList", NestedBindingPropertyList$0);
|
|
11779
12243
|
}
|
|
11780
12244
|
var BindingProperty$0 = BindingRestProperty;
|
|
11781
|
-
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) {
|
|
12245
|
+
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) {
|
|
12246
|
+
var ws1 = $1;
|
|
11782
12247
|
var name = $2;
|
|
11783
|
-
var
|
|
11784
|
-
var
|
|
11785
|
-
var
|
|
12248
|
+
var bind = $3;
|
|
12249
|
+
var ws2 = $4;
|
|
12250
|
+
var colon = $5;
|
|
12251
|
+
var ws3 = $6;
|
|
12252
|
+
var value = $7;
|
|
12253
|
+
var typeSuffix = $8;
|
|
12254
|
+
var initializer = $9;
|
|
11786
12255
|
return {
|
|
11787
12256
|
type: "BindingProperty",
|
|
11788
|
-
children: [
|
|
12257
|
+
children: [ws1, name, ws2, colon, ws3, value, initializer],
|
|
11789
12258
|
// omit typeSuffix
|
|
11790
12259
|
name,
|
|
11791
12260
|
value,
|
|
11792
12261
|
typeSuffix,
|
|
11793
12262
|
initializer,
|
|
11794
|
-
names: value.names
|
|
12263
|
+
names: value.names,
|
|
12264
|
+
bind: !!bind
|
|
11795
12265
|
};
|
|
11796
12266
|
});
|
|
11797
|
-
var BindingProperty$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_),
|
|
12267
|
+
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) {
|
|
11798
12268
|
var ws = $1;
|
|
11799
12269
|
var pin = $2;
|
|
11800
12270
|
var binding = $3;
|
|
11801
12271
|
var typeSuffix = $4;
|
|
11802
12272
|
var initializer = $5;
|
|
11803
|
-
|
|
12273
|
+
const children = [ws, binding];
|
|
12274
|
+
if (binding.type === "AtBinding") {
|
|
12275
|
+
children.push({
|
|
12276
|
+
type: "Error",
|
|
12277
|
+
message: "Pinned properties do not yet work with @binding"
|
|
12278
|
+
});
|
|
12279
|
+
}
|
|
12280
|
+
if (typeSuffix) {
|
|
12281
|
+
children.push({
|
|
12282
|
+
type: "Error",
|
|
12283
|
+
message: "Pinned properties cannot have type annotations"
|
|
12284
|
+
});
|
|
12285
|
+
}
|
|
12286
|
+
if (initializer) {
|
|
12287
|
+
children.push({
|
|
12288
|
+
type: "Error",
|
|
12289
|
+
message: "Pinned properties cannot have initializers"
|
|
12290
|
+
});
|
|
12291
|
+
}
|
|
12292
|
+
return {
|
|
12293
|
+
type: "PinProperty",
|
|
12294
|
+
children,
|
|
12295
|
+
name: binding,
|
|
12296
|
+
value: {
|
|
12297
|
+
type: "PinPattern",
|
|
12298
|
+
children: [binding],
|
|
12299
|
+
expression: binding
|
|
12300
|
+
}
|
|
12301
|
+
};
|
|
12302
|
+
});
|
|
12303
|
+
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) {
|
|
12304
|
+
var ws = $1;
|
|
12305
|
+
var binding = $2;
|
|
12306
|
+
var bind = $3;
|
|
12307
|
+
var typeSuffix = $4;
|
|
12308
|
+
var initializer = $5;
|
|
12309
|
+
const children = [ws, binding, initializer];
|
|
11804
12310
|
if (binding.type === "AtBinding") {
|
|
11805
12311
|
return {
|
|
11806
12312
|
type: "AtBindingProperty",
|
|
@@ -11812,30 +12318,6 @@ var BindingProperty$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2
|
|
|
11812
12318
|
names: []
|
|
11813
12319
|
};
|
|
11814
12320
|
}
|
|
11815
|
-
if (pin) {
|
|
11816
|
-
children = [ws, binding];
|
|
11817
|
-
if (typeSuffix) {
|
|
11818
|
-
children.push({
|
|
11819
|
-
type: "Error",
|
|
11820
|
-
message: "Pinned properties cannot have type annotations"
|
|
11821
|
-
});
|
|
11822
|
-
}
|
|
11823
|
-
if (initializer) {
|
|
11824
|
-
children.push({
|
|
11825
|
-
type: "Error",
|
|
11826
|
-
message: "Pinned properties cannot have initializers"
|
|
11827
|
-
});
|
|
11828
|
-
}
|
|
11829
|
-
return {
|
|
11830
|
-
type: "PinProperty",
|
|
11831
|
-
children,
|
|
11832
|
-
name: binding,
|
|
11833
|
-
value: {
|
|
11834
|
-
type: "PinPattern",
|
|
11835
|
-
expression: binding
|
|
11836
|
-
}
|
|
11837
|
-
};
|
|
11838
|
-
}
|
|
11839
12321
|
return {
|
|
11840
12322
|
type: "BindingProperty",
|
|
11841
12323
|
children,
|
|
@@ -11844,10 +12326,11 @@ var BindingProperty$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2
|
|
|
11844
12326
|
typeSuffix,
|
|
11845
12327
|
initializer,
|
|
11846
12328
|
names: binding.names,
|
|
11847
|
-
identifier: binding
|
|
12329
|
+
identifier: binding,
|
|
12330
|
+
bind: !!bind
|
|
11848
12331
|
};
|
|
11849
12332
|
});
|
|
11850
|
-
var BindingProperty$$ = [BindingProperty$0, BindingProperty$1, BindingProperty$2];
|
|
12333
|
+
var BindingProperty$$ = [BindingProperty$0, BindingProperty$1, BindingProperty$2, BindingProperty$3];
|
|
11851
12334
|
function BindingProperty(ctx, state2) {
|
|
11852
12335
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "BindingProperty", BindingProperty$$);
|
|
11853
12336
|
}
|
|
@@ -12413,12 +12896,21 @@ var BareBlock$$ = [BareBlock$0, BareBlock$1, BareBlock$2, BareBlock$3, BareBlock
|
|
|
12413
12896
|
function BareBlock(ctx, state2) {
|
|
12414
12897
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "BareBlock", BareBlock$$);
|
|
12415
12898
|
}
|
|
12416
|
-
var ThenClause$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Then,
|
|
12899
|
+
var ThenClause$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Then, ThenBlock), function(value) {
|
|
12417
12900
|
return value[1];
|
|
12418
12901
|
});
|
|
12419
12902
|
function ThenClause(ctx, state2) {
|
|
12420
12903
|
return (0, import_lib2.$EVENT)(ctx, state2, "ThenClause", ThenClause$0);
|
|
12421
12904
|
}
|
|
12905
|
+
var ThenBlock$0 = (0, import_lib2.$T)((0, import_lib2.$S)(NoBlock, EmptyBlock), function(value) {
|
|
12906
|
+
return value[1];
|
|
12907
|
+
});
|
|
12908
|
+
var ThenBlock$1 = ImplicitNestedBlock;
|
|
12909
|
+
var ThenBlock$2 = SingleLineStatements;
|
|
12910
|
+
var ThenBlock$$ = [ThenBlock$0, ThenBlock$1, ThenBlock$2];
|
|
12911
|
+
function ThenBlock(ctx, state2) {
|
|
12912
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "ThenBlock", ThenBlock$$);
|
|
12913
|
+
}
|
|
12422
12914
|
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) {
|
|
12423
12915
|
var open = $2;
|
|
12424
12916
|
var exp = $3;
|
|
@@ -12700,7 +13192,7 @@ function LiteralContent(ctx, state2) {
|
|
|
12700
13192
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LiteralContent", LiteralContent$$);
|
|
12701
13193
|
}
|
|
12702
13194
|
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) {
|
|
12703
|
-
return { $loc, token: $1 };
|
|
13195
|
+
return { type: "NullLiteral", $loc, token: $1 };
|
|
12704
13196
|
});
|
|
12705
13197
|
function NullLiteral(ctx, state2) {
|
|
12706
13198
|
return (0, import_lib2.$EVENT)(ctx, state2, "NullLiteral", NullLiteral$0);
|
|
@@ -12715,17 +13207,17 @@ var _BooleanLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)(CoffeeBooleansEn
|
|
|
12715
13207
|
return value[1];
|
|
12716
13208
|
});
|
|
12717
13209
|
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) {
|
|
12718
|
-
return { $loc, token: $1 };
|
|
13210
|
+
return { type: "BooleanLiteral", $loc, token: $1 };
|
|
12719
13211
|
});
|
|
12720
13212
|
var _BooleanLiteral$$ = [_BooleanLiteral$0, _BooleanLiteral$1];
|
|
12721
13213
|
function _BooleanLiteral(ctx, state2) {
|
|
12722
13214
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "_BooleanLiteral", _BooleanLiteral$$);
|
|
12723
13215
|
}
|
|
12724
13216
|
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) {
|
|
12725
|
-
return { $loc, token: "true" };
|
|
13217
|
+
return { type: "BooleanLiteral", $loc, token: "true" };
|
|
12726
13218
|
});
|
|
12727
13219
|
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) {
|
|
12728
|
-
return { $loc, token: "false" };
|
|
13220
|
+
return { type: "BooleanLiteral", $loc, token: "false" };
|
|
12729
13221
|
});
|
|
12730
13222
|
var CoffeeScriptBooleanLiteral$$ = [CoffeeScriptBooleanLiteral$0, CoffeeScriptBooleanLiteral$1];
|
|
12731
13223
|
function CoffeeScriptBooleanLiteral(ctx, state2) {
|
|
@@ -14430,11 +14922,7 @@ var Statement$1 = VariableStatement;
|
|
|
14430
14922
|
var Statement$2 = (0, import_lib2.$T)((0, import_lib2.$S)(IfStatement, (0, import_lib2.$N)(ShouldExpressionize)), function(value) {
|
|
14431
14923
|
return value[0];
|
|
14432
14924
|
});
|
|
14433
|
-
var Statement$3 =
|
|
14434
|
-
if ($1.generator) return $skip;
|
|
14435
|
-
if ($1.reduction) return $skip;
|
|
14436
|
-
return $1;
|
|
14437
|
-
});
|
|
14925
|
+
var Statement$3 = IterationActualStatement;
|
|
14438
14926
|
var Statement$4 = (0, import_lib2.$T)((0, import_lib2.$S)(SwitchStatement, (0, import_lib2.$N)(ShouldExpressionize)), function(value) {
|
|
14439
14927
|
return value[0];
|
|
14440
14928
|
});
|
|
@@ -14450,6 +14938,14 @@ var Statement$$ = [Statement$0, Statement$1, Statement$2, Statement$3, Statement
|
|
|
14450
14938
|
function Statement(ctx, state2) {
|
|
14451
14939
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Statement", Statement$$);
|
|
14452
14940
|
}
|
|
14941
|
+
var IterationActualStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(IterationStatement, (0, import_lib2.$N)(ShouldExpressionize)), function($skip, $loc, $0, $1, $2) {
|
|
14942
|
+
if ($1.generator) return $skip;
|
|
14943
|
+
if ($1.reduction) return $skip;
|
|
14944
|
+
return $1;
|
|
14945
|
+
});
|
|
14946
|
+
function IterationActualStatement(ctx, state2) {
|
|
14947
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "IterationActualStatement", IterationActualStatement$0);
|
|
14948
|
+
}
|
|
14453
14949
|
var ShouldExpressionize$0 = AllowedTrailingCallExpressions;
|
|
14454
14950
|
var ShouldExpressionize$1 = (0, import_lib2.$S)(NotDedented, Pipe);
|
|
14455
14951
|
var ShouldExpressionize$2 = BinaryOpRHS;
|
|
@@ -14552,12 +15048,12 @@ var LabelledItem$$ = [LabelledItem$0, LabelledItem$1];
|
|
|
14552
15048
|
function LabelledItem(ctx, state2) {
|
|
14553
15049
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LabelledItem", LabelledItem$$);
|
|
14554
15050
|
}
|
|
14555
|
-
var IfStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)(If, Unless), (0, import_lib2.$E)(_), BoundedCondition,
|
|
15051
|
+
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) {
|
|
14556
15052
|
var kind = $1;
|
|
14557
15053
|
var ws = $2;
|
|
14558
15054
|
var condition = $3;
|
|
14559
|
-
var block = $
|
|
14560
|
-
var e = $
|
|
15055
|
+
var block = $4;
|
|
15056
|
+
var e = $5;
|
|
14561
15057
|
if (kind.negated) {
|
|
14562
15058
|
kind = { ...kind, token: "if" };
|
|
14563
15059
|
condition = negateCondition(condition);
|
|
@@ -14801,15 +15297,18 @@ function ForStatement(ctx, state2) {
|
|
|
14801
15297
|
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) {
|
|
14802
15298
|
var generator = $2;
|
|
14803
15299
|
var c = $4;
|
|
14804
|
-
|
|
15300
|
+
let { children, reduction } = c;
|
|
15301
|
+
if (generator && reduction) {
|
|
15302
|
+
children = [{
|
|
15303
|
+
type: "Error",
|
|
15304
|
+
message: `Cannot use reduction (${reduction.subtype}) with generators`
|
|
15305
|
+
}, ...children];
|
|
15306
|
+
}
|
|
14805
15307
|
return {
|
|
15308
|
+
...c,
|
|
14806
15309
|
type: "ForStatement",
|
|
14807
15310
|
children: [$1, ...$3, ...children],
|
|
14808
|
-
declaration,
|
|
14809
15311
|
block: null,
|
|
14810
|
-
blockPrefix: c.blockPrefix,
|
|
14811
|
-
hoistDec: c.hoistDec,
|
|
14812
|
-
reduction: c.reduction,
|
|
14813
15312
|
generator
|
|
14814
15313
|
};
|
|
14815
15314
|
});
|
|
@@ -14855,7 +15354,7 @@ var ForStatementControlWithReduction$$ = [ForStatementControlWithReduction$0, Fo
|
|
|
14855
15354
|
function ForStatementControlWithReduction(ctx, state2) {
|
|
14856
15355
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ForStatementControlWithReduction", ForStatementControlWithReduction$$);
|
|
14857
15356
|
}
|
|
14858
|
-
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 "
|
|
15357
|
+
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) {
|
|
14859
15358
|
var subtype = $1;
|
|
14860
15359
|
var ws = $3;
|
|
14861
15360
|
return {
|
|
@@ -15704,7 +16203,7 @@ var RestoreAll$0 = (0, import_lib2.$S)(RestoreTrailingMemberProperty, RestoreBra
|
|
|
15704
16203
|
function RestoreAll(ctx, state2) {
|
|
15705
16204
|
return (0, import_lib2.$EVENT)(ctx, state2, "RestoreAll", RestoreAll$0);
|
|
15706
16205
|
}
|
|
15707
|
-
var CommaExpressionStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
16206
|
+
var CommaExpressionStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CommaExpressionSpread), function($skip, $loc, $0, $1) {
|
|
15708
16207
|
return makeExpressionStatement($1);
|
|
15709
16208
|
});
|
|
15710
16209
|
function CommaExpressionStatement(ctx, state2) {
|
|
@@ -15778,19 +16277,19 @@ var ThrowStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Throw, MaybeParen
|
|
|
15778
16277
|
function ThrowStatement(ctx, state2) {
|
|
15779
16278
|
return (0, import_lib2.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
|
|
15780
16279
|
}
|
|
15781
|
-
var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16280
|
+
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) {
|
|
15782
16281
|
return { $loc, token: $1 };
|
|
15783
16282
|
});
|
|
15784
16283
|
function Break(ctx, state2) {
|
|
15785
16284
|
return (0, import_lib2.$EVENT)(ctx, state2, "Break", Break$0);
|
|
15786
16285
|
}
|
|
15787
|
-
var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16286
|
+
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) {
|
|
15788
16287
|
return { $loc, token: $1 };
|
|
15789
16288
|
});
|
|
15790
16289
|
function Continue(ctx, state2) {
|
|
15791
16290
|
return (0, import_lib2.$EVENT)(ctx, state2, "Continue", Continue$0);
|
|
15792
16291
|
}
|
|
15793
|
-
var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
16292
|
+
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) {
|
|
15794
16293
|
return { $loc, token: $1 };
|
|
15795
16294
|
});
|
|
15796
16295
|
function Debugger(ctx, state2) {
|
|
@@ -15867,7 +16366,7 @@ var MaybeParenNestedExpression$$ = [MaybeParenNestedExpression$0, MaybeParenNest
|
|
|
15867
16366
|
function MaybeParenNestedExpression(ctx, state2) {
|
|
15868
16367
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
|
|
15869
16368
|
}
|
|
15870
|
-
var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($
|
|
16369
|
+
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) {
|
|
15871
16370
|
const imp = [
|
|
15872
16371
|
{ ...$1, ts: true },
|
|
15873
16372
|
{ ...$1, token: "const", js: true }
|
|
@@ -16055,7 +16554,7 @@ var ImpliedFrom$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImpliedF
|
|
|
16055
16554
|
function ImpliedFrom(ctx, state2) {
|
|
16056
16555
|
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
|
|
16057
16556
|
}
|
|
16058
|
-
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
16557
|
+
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) {
|
|
16059
16558
|
var keyword = $2;
|
|
16060
16559
|
var object = $5;
|
|
16061
16560
|
return {
|
|
@@ -16376,19 +16875,19 @@ var LexicalDeclaration$$ = [LexicalDeclaration$0, LexicalDeclaration$1];
|
|
|
16376
16875
|
function LexicalDeclaration(ctx, state2) {
|
|
16377
16876
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
|
|
16378
16877
|
}
|
|
16379
|
-
var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
16878
|
+
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) {
|
|
16380
16879
|
return { $loc, token: "=", decl: "const " };
|
|
16381
16880
|
});
|
|
16382
16881
|
function ConstAssignment(ctx, state2) {
|
|
16383
16882
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
|
|
16384
16883
|
}
|
|
16385
|
-
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16884
|
+
var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L138, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
|
|
16386
16885
|
return { $loc, token: "=", decl: "let " };
|
|
16387
16886
|
});
|
|
16388
16887
|
function LetAssignment(ctx, state2) {
|
|
16389
16888
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
|
|
16390
16889
|
}
|
|
16391
|
-
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
16890
|
+
var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L139, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
|
|
16392
16891
|
return { $loc, token: "=" };
|
|
16393
16892
|
});
|
|
16394
16893
|
function TypeAssignment(ctx, state2) {
|
|
@@ -16611,7 +17110,12 @@ function CoffeeDoubleQuotedStringCharacters(ctx, state2) {
|
|
|
16611
17110
|
}
|
|
16612
17111
|
var RegularExpressionLiteral$0 = HeregexLiteral;
|
|
16613
17112
|
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) {
|
|
16614
|
-
|
|
17113
|
+
var raw = $0;
|
|
17114
|
+
return {
|
|
17115
|
+
type: "RegularExpressionLiteral",
|
|
17116
|
+
raw,
|
|
17117
|
+
children: [{ $loc, token: raw }]
|
|
17118
|
+
};
|
|
16615
17119
|
});
|
|
16616
17120
|
var RegularExpressionLiteral$$ = [RegularExpressionLiteral$0, RegularExpressionLiteral$1];
|
|
16617
17121
|
function RegularExpressionLiteral(ctx, state2) {
|
|
@@ -16827,7 +17331,7 @@ var MultiLineComment$$ = [MultiLineComment$0, MultiLineComment$1];
|
|
|
16827
17331
|
function MultiLineComment(ctx, state2) {
|
|
16828
17332
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
|
|
16829
17333
|
}
|
|
16830
|
-
var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17334
|
+
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) {
|
|
16831
17335
|
return { type: "Comment", $loc, token: $1 };
|
|
16832
17336
|
});
|
|
16833
17337
|
function JSMultiLineComment(ctx, state2) {
|
|
@@ -16873,7 +17377,7 @@ function _(ctx, state2) {
|
|
|
16873
17377
|
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) {
|
|
16874
17378
|
return { $loc, token: $0 };
|
|
16875
17379
|
});
|
|
16876
|
-
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17380
|
+
var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L142, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
|
|
16877
17381
|
return " ";
|
|
16878
17382
|
});
|
|
16879
17383
|
var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
|
|
@@ -16924,7 +17428,7 @@ var StatementDelimiter$$ = [StatementDelimiter$0, StatementDelimiter$1, Statemen
|
|
|
16924
17428
|
function StatementDelimiter(ctx, state2) {
|
|
16925
17429
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
|
|
16926
17430
|
}
|
|
16927
|
-
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)($
|
|
17431
|
+
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 "]"'))));
|
|
16928
17432
|
function ClosingDelimiter(ctx, state2) {
|
|
16929
17433
|
return (0, import_lib2.$EVENT)(ctx, state2, "ClosingDelimiter", ClosingDelimiter$0);
|
|
16930
17434
|
}
|
|
@@ -16947,7 +17451,7 @@ var Loc$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Loc ""'), functi
|
|
|
16947
17451
|
function Loc(ctx, state2) {
|
|
16948
17452
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
|
|
16949
17453
|
}
|
|
16950
|
-
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17454
|
+
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) {
|
|
16951
17455
|
return { $loc, token: $1, ts: true };
|
|
16952
17456
|
});
|
|
16953
17457
|
function Abstract(ctx, state2) {
|
|
@@ -16959,43 +17463,43 @@ var Ampersand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L117, 'Ampersan
|
|
|
16959
17463
|
function Ampersand(ctx, state2) {
|
|
16960
17464
|
return (0, import_lib2.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
|
|
16961
17465
|
}
|
|
16962
|
-
var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17466
|
+
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) {
|
|
16963
17467
|
return { $loc, token: $1 };
|
|
16964
17468
|
});
|
|
16965
17469
|
function As(ctx, state2) {
|
|
16966
17470
|
return (0, import_lib2.$EVENT)(ctx, state2, "As", As$0);
|
|
16967
17471
|
}
|
|
16968
|
-
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17472
|
+
var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L146, 'At "@"'), function($skip, $loc, $0, $1) {
|
|
16969
17473
|
return { $loc, token: $1 };
|
|
16970
17474
|
});
|
|
16971
17475
|
function At(ctx, state2) {
|
|
16972
17476
|
return (0, import_lib2.$EVENT)(ctx, state2, "At", At$0);
|
|
16973
17477
|
}
|
|
16974
|
-
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17478
|
+
var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L147, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
|
|
16975
17479
|
return { $loc, token: "@" };
|
|
16976
17480
|
});
|
|
16977
17481
|
function AtAt(ctx, state2) {
|
|
16978
17482
|
return (0, import_lib2.$EVENT)(ctx, state2, "AtAt", AtAt$0);
|
|
16979
17483
|
}
|
|
16980
|
-
var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17484
|
+
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) {
|
|
16981
17485
|
return { $loc, token: $1, type: "Async" };
|
|
16982
17486
|
});
|
|
16983
17487
|
function Async(ctx, state2) {
|
|
16984
17488
|
return (0, import_lib2.$EVENT)(ctx, state2, "Async", Async$0);
|
|
16985
17489
|
}
|
|
16986
|
-
var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17490
|
+
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) {
|
|
16987
17491
|
return { $loc, token: $1, type: "Await" };
|
|
16988
17492
|
});
|
|
16989
17493
|
function Await(ctx, state2) {
|
|
16990
17494
|
return (0, import_lib2.$EVENT)(ctx, state2, "Await", Await$0);
|
|
16991
17495
|
}
|
|
16992
|
-
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17496
|
+
var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L150, 'Backtick "`"'), function($skip, $loc, $0, $1) {
|
|
16993
17497
|
return { $loc, token: $1 };
|
|
16994
17498
|
});
|
|
16995
17499
|
function Backtick(ctx, state2) {
|
|
16996
17500
|
return (0, import_lib2.$EVENT)(ctx, state2, "Backtick", Backtick$0);
|
|
16997
17501
|
}
|
|
16998
|
-
var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17502
|
+
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) {
|
|
16999
17503
|
return { $loc, token: $1 };
|
|
17000
17504
|
});
|
|
17001
17505
|
function By(ctx, state2) {
|
|
@@ -17007,19 +17511,19 @@ var Caret$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L22, 'Caret "^"'),
|
|
|
17007
17511
|
function Caret(ctx, state2) {
|
|
17008
17512
|
return (0, import_lib2.$EVENT)(ctx, state2, "Caret", Caret$0);
|
|
17009
17513
|
}
|
|
17010
|
-
var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17514
|
+
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) {
|
|
17011
17515
|
return { $loc, token: $1 };
|
|
17012
17516
|
});
|
|
17013
17517
|
function Case(ctx, state2) {
|
|
17014
17518
|
return (0, import_lib2.$EVENT)(ctx, state2, "Case", Case$0);
|
|
17015
17519
|
}
|
|
17016
|
-
var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17520
|
+
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) {
|
|
17017
17521
|
return { $loc, token: $1 };
|
|
17018
17522
|
});
|
|
17019
17523
|
function Catch(ctx, state2) {
|
|
17020
17524
|
return (0, import_lib2.$EVENT)(ctx, state2, "Catch", Catch$0);
|
|
17021
17525
|
}
|
|
17022
|
-
var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17526
|
+
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) {
|
|
17023
17527
|
return { $loc, token: $1 };
|
|
17024
17528
|
});
|
|
17025
17529
|
function Class(ctx, state2) {
|
|
@@ -17043,13 +17547,13 @@ var CloseBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L46, 'CloseB
|
|
|
17043
17547
|
function CloseBracket(ctx, state2) {
|
|
17044
17548
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
|
|
17045
17549
|
}
|
|
17046
|
-
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17550
|
+
var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L143, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
|
|
17047
17551
|
return { $loc, token: $1 };
|
|
17048
17552
|
});
|
|
17049
17553
|
function CloseParen(ctx, state2) {
|
|
17050
17554
|
return (0, import_lib2.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
|
|
17051
17555
|
}
|
|
17052
|
-
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17556
|
+
var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L155, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
|
|
17053
17557
|
return { $loc, token: "${" };
|
|
17054
17558
|
});
|
|
17055
17559
|
function CoffeeSubstitutionStart(ctx, state2) {
|
|
@@ -17067,37 +17571,37 @@ var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L17, 'Comma ","'),
|
|
|
17067
17571
|
function Comma(ctx, state2) {
|
|
17068
17572
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comma", Comma$0);
|
|
17069
17573
|
}
|
|
17070
|
-
var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17574
|
+
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) {
|
|
17071
17575
|
return { $loc, token: $1 };
|
|
17072
17576
|
});
|
|
17073
17577
|
function Comptime(ctx, state2) {
|
|
17074
17578
|
return (0, import_lib2.$EVENT)(ctx, state2, "Comptime", Comptime$0);
|
|
17075
17579
|
}
|
|
17076
|
-
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17580
|
+
var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L146, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
|
|
17077
17581
|
return { $loc, token: "constructor" };
|
|
17078
17582
|
});
|
|
17079
17583
|
function ConstructorShorthand(ctx, state2) {
|
|
17080
17584
|
return (0, import_lib2.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
|
|
17081
17585
|
}
|
|
17082
|
-
var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17586
|
+
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) {
|
|
17083
17587
|
return { $loc, token: $1 };
|
|
17084
17588
|
});
|
|
17085
17589
|
function Declare(ctx, state2) {
|
|
17086
17590
|
return (0, import_lib2.$EVENT)(ctx, state2, "Declare", Declare$0);
|
|
17087
17591
|
}
|
|
17088
|
-
var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17592
|
+
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) {
|
|
17089
17593
|
return { $loc, token: $1 };
|
|
17090
17594
|
});
|
|
17091
17595
|
function Default(ctx, state2) {
|
|
17092
17596
|
return (0, import_lib2.$EVENT)(ctx, state2, "Default", Default$0);
|
|
17093
17597
|
}
|
|
17094
|
-
var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17598
|
+
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) {
|
|
17095
17599
|
return { $loc, token: $1 };
|
|
17096
17600
|
});
|
|
17097
17601
|
function Delete(ctx, state2) {
|
|
17098
17602
|
return (0, import_lib2.$EVENT)(ctx, state2, "Delete", Delete$0);
|
|
17099
17603
|
}
|
|
17100
|
-
var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17604
|
+
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) {
|
|
17101
17605
|
return { $loc, token: $1 };
|
|
17102
17606
|
});
|
|
17103
17607
|
function Do(ctx, state2) {
|
|
@@ -17117,20 +17621,20 @@ var Dot$$ = [Dot$0, Dot$1];
|
|
|
17117
17621
|
function Dot(ctx, state2) {
|
|
17118
17622
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Dot", Dot$$);
|
|
17119
17623
|
}
|
|
17120
|
-
var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17624
|
+
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) {
|
|
17121
17625
|
return { $loc, token: $1 };
|
|
17122
17626
|
});
|
|
17123
|
-
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17627
|
+
var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
|
|
17124
17628
|
return { $loc, token: ".." };
|
|
17125
17629
|
});
|
|
17126
17630
|
var DotDot$$ = [DotDot$0, DotDot$1];
|
|
17127
17631
|
function DotDot(ctx, state2) {
|
|
17128
17632
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
|
|
17129
17633
|
}
|
|
17130
|
-
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17634
|
+
var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
|
|
17131
17635
|
return { $loc, token: $1 };
|
|
17132
17636
|
});
|
|
17133
|
-
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17637
|
+
var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L164, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
|
|
17134
17638
|
return { $loc, token: "..." };
|
|
17135
17639
|
});
|
|
17136
17640
|
var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
|
|
@@ -17143,31 +17647,31 @@ var InsertDotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Inse
|
|
|
17143
17647
|
function InsertDotDotDot(ctx, state2) {
|
|
17144
17648
|
return (0, import_lib2.$EVENT)(ctx, state2, "InsertDotDotDot", InsertDotDotDot$0);
|
|
17145
17649
|
}
|
|
17146
|
-
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17650
|
+
var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L165, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
|
|
17147
17651
|
return { $loc, token: $1 };
|
|
17148
17652
|
});
|
|
17149
17653
|
function DoubleColon(ctx, state2) {
|
|
17150
17654
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
|
|
17151
17655
|
}
|
|
17152
|
-
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17656
|
+
var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L165, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
|
|
17153
17657
|
return { $loc, token: ":" };
|
|
17154
17658
|
});
|
|
17155
17659
|
function DoubleColonAsColon(ctx, state2) {
|
|
17156
17660
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
|
|
17157
17661
|
}
|
|
17158
|
-
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17662
|
+
var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L166, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
17159
17663
|
return { $loc, token: $1 };
|
|
17160
17664
|
});
|
|
17161
17665
|
function DoubleQuote(ctx, state2) {
|
|
17162
17666
|
return (0, import_lib2.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
|
|
17163
17667
|
}
|
|
17164
|
-
var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17668
|
+
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) {
|
|
17165
17669
|
return { $loc, token: $1 };
|
|
17166
17670
|
});
|
|
17167
17671
|
function Each(ctx, state2) {
|
|
17168
17672
|
return (0, import_lib2.$EVENT)(ctx, state2, "Each", Each$0);
|
|
17169
17673
|
}
|
|
17170
|
-
var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17674
|
+
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) {
|
|
17171
17675
|
return { $loc, token: $1 };
|
|
17172
17676
|
});
|
|
17173
17677
|
function Else(ctx, state2) {
|
|
@@ -17179,61 +17683,61 @@ var Equals$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L3, 'Equals "="'),
|
|
|
17179
17683
|
function Equals(ctx, state2) {
|
|
17180
17684
|
return (0, import_lib2.$EVENT)(ctx, state2, "Equals", Equals$0);
|
|
17181
17685
|
}
|
|
17182
|
-
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17686
|
+
var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L169, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
|
|
17183
17687
|
return { $loc, token: $1 };
|
|
17184
17688
|
});
|
|
17185
17689
|
function ExclamationPoint(ctx, state2) {
|
|
17186
17690
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
|
|
17187
17691
|
}
|
|
17188
|
-
var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17692
|
+
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) {
|
|
17189
17693
|
return { $loc, token: $1 };
|
|
17190
17694
|
});
|
|
17191
17695
|
function Export(ctx, state2) {
|
|
17192
17696
|
return (0, import_lib2.$EVENT)(ctx, state2, "Export", Export$0);
|
|
17193
17697
|
}
|
|
17194
|
-
var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17698
|
+
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) {
|
|
17195
17699
|
return { $loc, token: $1 };
|
|
17196
17700
|
});
|
|
17197
17701
|
function Extends(ctx, state2) {
|
|
17198
17702
|
return (0, import_lib2.$EVENT)(ctx, state2, "Extends", Extends$0);
|
|
17199
17703
|
}
|
|
17200
|
-
var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17704
|
+
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) {
|
|
17201
17705
|
return { $loc, token: $1 };
|
|
17202
17706
|
});
|
|
17203
17707
|
function Finally(ctx, state2) {
|
|
17204
17708
|
return (0, import_lib2.$EVENT)(ctx, state2, "Finally", Finally$0);
|
|
17205
17709
|
}
|
|
17206
|
-
var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17710
|
+
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) {
|
|
17207
17711
|
return { $loc, token: $1 };
|
|
17208
17712
|
});
|
|
17209
17713
|
function For(ctx, state2) {
|
|
17210
17714
|
return (0, import_lib2.$EVENT)(ctx, state2, "For", For$0);
|
|
17211
17715
|
}
|
|
17212
|
-
var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17716
|
+
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) {
|
|
17213
17717
|
return { $loc, token: $1 };
|
|
17214
17718
|
});
|
|
17215
17719
|
function From(ctx, state2) {
|
|
17216
17720
|
return (0, import_lib2.$EVENT)(ctx, state2, "From", From$0);
|
|
17217
17721
|
}
|
|
17218
|
-
var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17722
|
+
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) {
|
|
17219
17723
|
return { $loc, token: $1 };
|
|
17220
17724
|
});
|
|
17221
17725
|
function Function2(ctx, state2) {
|
|
17222
17726
|
return (0, import_lib2.$EVENT)(ctx, state2, "Function", Function$0);
|
|
17223
17727
|
}
|
|
17224
|
-
var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17728
|
+
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) {
|
|
17225
17729
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
17226
17730
|
});
|
|
17227
17731
|
function GetOrSet(ctx, state2) {
|
|
17228
17732
|
return (0, import_lib2.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
|
|
17229
17733
|
}
|
|
17230
|
-
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17734
|
+
var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L178, 'Hash "#"'), function($skip, $loc, $0, $1) {
|
|
17231
17735
|
return { $loc, token: $1 };
|
|
17232
17736
|
});
|
|
17233
17737
|
function Hash(ctx, state2) {
|
|
17234
17738
|
return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
|
|
17235
17739
|
}
|
|
17236
|
-
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17740
|
+
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) {
|
|
17237
17741
|
return { $loc, token: $1 };
|
|
17238
17742
|
});
|
|
17239
17743
|
function If(ctx, state2) {
|
|
@@ -17245,67 +17749,67 @@ var Import$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)
|
|
|
17245
17749
|
function Import(ctx, state2) {
|
|
17246
17750
|
return (0, import_lib2.$EVENT)(ctx, state2, "Import", Import$0);
|
|
17247
17751
|
}
|
|
17248
|
-
var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17752
|
+
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) {
|
|
17249
17753
|
return { $loc, token: $1 };
|
|
17250
17754
|
});
|
|
17251
17755
|
function In(ctx, state2) {
|
|
17252
17756
|
return (0, import_lib2.$EVENT)(ctx, state2, "In", In$0);
|
|
17253
17757
|
}
|
|
17254
|
-
var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17758
|
+
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) {
|
|
17255
17759
|
return { $loc, token: $1 };
|
|
17256
17760
|
});
|
|
17257
17761
|
function Infer(ctx, state2) {
|
|
17258
17762
|
return (0, import_lib2.$EVENT)(ctx, state2, "Infer", Infer$0);
|
|
17259
17763
|
}
|
|
17260
|
-
var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17764
|
+
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) {
|
|
17261
17765
|
return { $loc, token: $1 };
|
|
17262
17766
|
});
|
|
17263
17767
|
function LetOrConst(ctx, state2) {
|
|
17264
17768
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
|
|
17265
17769
|
}
|
|
17266
|
-
var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17770
|
+
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) {
|
|
17267
17771
|
return { $loc, token: $1 };
|
|
17268
17772
|
});
|
|
17269
17773
|
function Const(ctx, state2) {
|
|
17270
17774
|
return (0, import_lib2.$EVENT)(ctx, state2, "Const", Const$0);
|
|
17271
17775
|
}
|
|
17272
|
-
var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17776
|
+
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) {
|
|
17273
17777
|
return { $loc, token: $1 };
|
|
17274
17778
|
});
|
|
17275
17779
|
function Is(ctx, state2) {
|
|
17276
17780
|
return (0, import_lib2.$EVENT)(ctx, state2, "Is", Is$0);
|
|
17277
17781
|
}
|
|
17278
|
-
var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17782
|
+
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) {
|
|
17279
17783
|
return { $loc, token: $1 };
|
|
17280
17784
|
});
|
|
17281
17785
|
function LetOrConstOrVar(ctx, state2) {
|
|
17282
17786
|
return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
|
|
17283
17787
|
}
|
|
17284
|
-
var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17788
|
+
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) {
|
|
17285
17789
|
return { $loc, token: $1 };
|
|
17286
17790
|
});
|
|
17287
17791
|
function Like(ctx, state2) {
|
|
17288
17792
|
return (0, import_lib2.$EVENT)(ctx, state2, "Like", Like$0);
|
|
17289
17793
|
}
|
|
17290
|
-
var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17794
|
+
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) {
|
|
17291
17795
|
return { $loc, token: "while" };
|
|
17292
17796
|
});
|
|
17293
17797
|
function Loop(ctx, state2) {
|
|
17294
17798
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loop", Loop$0);
|
|
17295
17799
|
}
|
|
17296
|
-
var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17800
|
+
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) {
|
|
17297
17801
|
return { $loc, token: $1 };
|
|
17298
17802
|
});
|
|
17299
17803
|
function New(ctx, state2) {
|
|
17300
17804
|
return (0, import_lib2.$EVENT)(ctx, state2, "New", New$0);
|
|
17301
17805
|
}
|
|
17302
|
-
var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17806
|
+
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) {
|
|
17303
17807
|
return { $loc, token: "!" };
|
|
17304
17808
|
});
|
|
17305
17809
|
function Not(ctx, state2) {
|
|
17306
17810
|
return (0, import_lib2.$EVENT)(ctx, state2, "Not", Not$0);
|
|
17307
17811
|
}
|
|
17308
|
-
var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17812
|
+
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) {
|
|
17309
17813
|
return { $loc, token: $1 };
|
|
17310
17814
|
});
|
|
17311
17815
|
function Of(ctx, state2) {
|
|
@@ -17323,7 +17827,7 @@ var OpenBrace$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L1, 'OpenBrace
|
|
|
17323
17827
|
function OpenBrace(ctx, state2) {
|
|
17324
17828
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
|
|
17325
17829
|
}
|
|
17326
|
-
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17830
|
+
var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L191, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
17327
17831
|
return { $loc, token: $1 };
|
|
17328
17832
|
});
|
|
17329
17833
|
function OpenBracket(ctx, state2) {
|
|
@@ -17335,49 +17839,49 @@ var OpenParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L4, 'OpenParen
|
|
|
17335
17839
|
function OpenParen(ctx, state2) {
|
|
17336
17840
|
return (0, import_lib2.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
|
|
17337
17841
|
}
|
|
17338
|
-
var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17842
|
+
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) {
|
|
17339
17843
|
return { $loc, token: $1 };
|
|
17340
17844
|
});
|
|
17341
17845
|
function Operator(ctx, state2) {
|
|
17342
17846
|
return (0, import_lib2.$EVENT)(ctx, state2, "Operator", Operator$0);
|
|
17343
17847
|
}
|
|
17344
|
-
var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17848
|
+
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) {
|
|
17345
17849
|
return { $loc, token: $1, ts: true };
|
|
17346
17850
|
});
|
|
17347
17851
|
function Override(ctx, state2) {
|
|
17348
17852
|
return (0, import_lib2.$EVENT)(ctx, state2, "Override", Override$0);
|
|
17349
17853
|
}
|
|
17350
|
-
var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17854
|
+
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) {
|
|
17351
17855
|
return { $loc, token: $1 };
|
|
17352
17856
|
});
|
|
17353
17857
|
function Own(ctx, state2) {
|
|
17354
17858
|
return (0, import_lib2.$EVENT)(ctx, state2, "Own", Own$0);
|
|
17355
17859
|
}
|
|
17356
|
-
var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17860
|
+
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) {
|
|
17357
17861
|
return { $loc, token: $1 };
|
|
17358
17862
|
});
|
|
17359
17863
|
function Public(ctx, state2) {
|
|
17360
17864
|
return (0, import_lib2.$EVENT)(ctx, state2, "Public", Public$0);
|
|
17361
17865
|
}
|
|
17362
|
-
var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17866
|
+
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) {
|
|
17363
17867
|
return { $loc, token: $1 };
|
|
17364
17868
|
});
|
|
17365
17869
|
function Private(ctx, state2) {
|
|
17366
17870
|
return (0, import_lib2.$EVENT)(ctx, state2, "Private", Private$0);
|
|
17367
17871
|
}
|
|
17368
|
-
var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17872
|
+
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) {
|
|
17369
17873
|
return { $loc, token: $1 };
|
|
17370
17874
|
});
|
|
17371
17875
|
function Protected(ctx, state2) {
|
|
17372
17876
|
return (0, import_lib2.$EVENT)(ctx, state2, "Protected", Protected$0);
|
|
17373
17877
|
}
|
|
17374
|
-
var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17878
|
+
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) {
|
|
17375
17879
|
return { $loc, token: "||>" };
|
|
17376
17880
|
});
|
|
17377
|
-
var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17881
|
+
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) {
|
|
17378
17882
|
return { $loc, token: "|>=" };
|
|
17379
17883
|
});
|
|
17380
|
-
var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
17884
|
+
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) {
|
|
17381
17885
|
return { $loc, token: "|>" };
|
|
17382
17886
|
});
|
|
17383
17887
|
var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
|
|
@@ -17390,19 +17894,19 @@ var QuestionMark$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L6, 'Questio
|
|
|
17390
17894
|
function QuestionMark(ctx, state2) {
|
|
17391
17895
|
return (0, import_lib2.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
|
|
17392
17896
|
}
|
|
17393
|
-
var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17897
|
+
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) {
|
|
17394
17898
|
return { $loc, token: $1, ts: true };
|
|
17395
17899
|
});
|
|
17396
17900
|
function Readonly(ctx, state2) {
|
|
17397
17901
|
return (0, import_lib2.$EVENT)(ctx, state2, "Readonly", Readonly$0);
|
|
17398
17902
|
}
|
|
17399
|
-
var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17903
|
+
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) {
|
|
17400
17904
|
return { $loc, token: $1 };
|
|
17401
17905
|
});
|
|
17402
17906
|
function Return(ctx, state2) {
|
|
17403
17907
|
return (0, import_lib2.$EVENT)(ctx, state2, "Return", Return$0);
|
|
17404
17908
|
}
|
|
17405
|
-
var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17909
|
+
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) {
|
|
17406
17910
|
return { $loc, token: $1 };
|
|
17407
17911
|
});
|
|
17408
17912
|
function Satisfies(ctx, state2) {
|
|
@@ -17414,7 +17918,7 @@ var Semicolon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L119, 'Semicolo
|
|
|
17414
17918
|
function Semicolon(ctx, state2) {
|
|
17415
17919
|
return (0, import_lib2.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
|
|
17416
17920
|
}
|
|
17417
|
-
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17921
|
+
var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L207, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
17418
17922
|
return { $loc, token: $1 };
|
|
17419
17923
|
});
|
|
17420
17924
|
function SingleQuote(ctx, state2) {
|
|
@@ -17426,149 +17930,149 @@ var Star$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L75, 'Star "*"'), fu
|
|
|
17426
17930
|
function Star(ctx, state2) {
|
|
17427
17931
|
return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
|
|
17428
17932
|
}
|
|
17429
|
-
var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17933
|
+
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) {
|
|
17430
17934
|
return { $loc, token: $1 };
|
|
17431
17935
|
});
|
|
17432
|
-
var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17936
|
+
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) {
|
|
17433
17937
|
return { $loc, token: "static " };
|
|
17434
17938
|
});
|
|
17435
17939
|
var Static$$ = [Static$0, Static$1];
|
|
17436
17940
|
function Static(ctx, state2) {
|
|
17437
17941
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "Static", Static$$);
|
|
17438
17942
|
}
|
|
17439
|
-
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17943
|
+
var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L209, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
17440
17944
|
return { $loc, token: $1 };
|
|
17441
17945
|
});
|
|
17442
17946
|
function SubstitutionStart(ctx, state2) {
|
|
17443
17947
|
return (0, import_lib2.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
|
|
17444
17948
|
}
|
|
17445
|
-
var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17949
|
+
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) {
|
|
17446
17950
|
return { $loc, token: $1 };
|
|
17447
17951
|
});
|
|
17448
17952
|
function Super(ctx, state2) {
|
|
17449
17953
|
return (0, import_lib2.$EVENT)(ctx, state2, "Super", Super$0);
|
|
17450
17954
|
}
|
|
17451
|
-
var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17955
|
+
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) {
|
|
17452
17956
|
return { $loc, token: $1 };
|
|
17453
17957
|
});
|
|
17454
17958
|
function Switch(ctx, state2) {
|
|
17455
17959
|
return (0, import_lib2.$EVENT)(ctx, state2, "Switch", Switch$0);
|
|
17456
17960
|
}
|
|
17457
|
-
var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17961
|
+
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) {
|
|
17458
17962
|
return { $loc, token: $1 };
|
|
17459
17963
|
});
|
|
17460
17964
|
function Target(ctx, state2) {
|
|
17461
17965
|
return (0, import_lib2.$EVENT)(ctx, state2, "Target", Target$0);
|
|
17462
17966
|
}
|
|
17463
|
-
var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
17967
|
+
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) {
|
|
17464
17968
|
return { $loc, token: "" };
|
|
17465
17969
|
});
|
|
17466
17970
|
function Then(ctx, state2) {
|
|
17467
17971
|
return (0, import_lib2.$EVENT)(ctx, state2, "Then", Then$0);
|
|
17468
17972
|
}
|
|
17469
|
-
var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17973
|
+
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) {
|
|
17470
17974
|
return { $loc, token: $1 };
|
|
17471
17975
|
});
|
|
17472
17976
|
function This(ctx, state2) {
|
|
17473
17977
|
return (0, import_lib2.$EVENT)(ctx, state2, "This", This$0);
|
|
17474
17978
|
}
|
|
17475
|
-
var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17979
|
+
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) {
|
|
17476
17980
|
return { $loc, token: $1 };
|
|
17477
17981
|
});
|
|
17478
17982
|
function Throw(ctx, state2) {
|
|
17479
17983
|
return (0, import_lib2.$EVENT)(ctx, state2, "Throw", Throw$0);
|
|
17480
17984
|
}
|
|
17481
|
-
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17985
|
+
var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
17482
17986
|
return { $loc, token: "`" };
|
|
17483
17987
|
});
|
|
17484
17988
|
function TripleDoubleQuote(ctx, state2) {
|
|
17485
17989
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
|
|
17486
17990
|
}
|
|
17487
|
-
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17991
|
+
var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L217, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
17488
17992
|
return { $loc, token: "`" };
|
|
17489
17993
|
});
|
|
17490
17994
|
function TripleSingleQuote(ctx, state2) {
|
|
17491
17995
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
|
|
17492
17996
|
}
|
|
17493
|
-
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17997
|
+
var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L218, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
17494
17998
|
return { $loc, token: "/" };
|
|
17495
17999
|
});
|
|
17496
18000
|
function TripleSlash(ctx, state2) {
|
|
17497
18001
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
|
|
17498
18002
|
}
|
|
17499
|
-
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
18003
|
+
var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L219, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
17500
18004
|
return { $loc, token: "`" };
|
|
17501
18005
|
});
|
|
17502
18006
|
function TripleTick(ctx, state2) {
|
|
17503
18007
|
return (0, import_lib2.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
|
|
17504
18008
|
}
|
|
17505
|
-
var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18009
|
+
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) {
|
|
17506
18010
|
return { $loc, token: $1 };
|
|
17507
18011
|
});
|
|
17508
18012
|
function Try(ctx, state2) {
|
|
17509
18013
|
return (0, import_lib2.$EVENT)(ctx, state2, "Try", Try$0);
|
|
17510
18014
|
}
|
|
17511
|
-
var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18015
|
+
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) {
|
|
17512
18016
|
return { $loc, token: $1 };
|
|
17513
18017
|
});
|
|
17514
18018
|
function Typeof(ctx, state2) {
|
|
17515
18019
|
return (0, import_lib2.$EVENT)(ctx, state2, "Typeof", Typeof$0);
|
|
17516
18020
|
}
|
|
17517
|
-
var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18021
|
+
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) {
|
|
17518
18022
|
return { $loc, token: $1 };
|
|
17519
18023
|
});
|
|
17520
18024
|
function Undefined(ctx, state2) {
|
|
17521
18025
|
return (0, import_lib2.$EVENT)(ctx, state2, "Undefined", Undefined$0);
|
|
17522
18026
|
}
|
|
17523
|
-
var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18027
|
+
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) {
|
|
17524
18028
|
return { $loc, token: $1, negated: true };
|
|
17525
18029
|
});
|
|
17526
18030
|
function Unless(ctx, state2) {
|
|
17527
18031
|
return (0, import_lib2.$EVENT)(ctx, state2, "Unless", Unless$0);
|
|
17528
18032
|
}
|
|
17529
|
-
var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18033
|
+
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) {
|
|
17530
18034
|
return { $loc, token: $1, negated: true };
|
|
17531
18035
|
});
|
|
17532
18036
|
function Until(ctx, state2) {
|
|
17533
18037
|
return (0, import_lib2.$EVENT)(ctx, state2, "Until", Until$0);
|
|
17534
18038
|
}
|
|
17535
|
-
var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18039
|
+
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) {
|
|
17536
18040
|
return { $loc, token: $1 };
|
|
17537
18041
|
});
|
|
17538
18042
|
function Using(ctx, state2) {
|
|
17539
18043
|
return (0, import_lib2.$EVENT)(ctx, state2, "Using", Using$0);
|
|
17540
18044
|
}
|
|
17541
|
-
var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18045
|
+
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) {
|
|
17542
18046
|
return { $loc, token: $1 };
|
|
17543
18047
|
});
|
|
17544
18048
|
function Var(ctx, state2) {
|
|
17545
18049
|
return (0, import_lib2.$EVENT)(ctx, state2, "Var", Var$0);
|
|
17546
18050
|
}
|
|
17547
|
-
var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18051
|
+
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) {
|
|
17548
18052
|
return { $loc, token: $1 };
|
|
17549
18053
|
});
|
|
17550
18054
|
function Void(ctx, state2) {
|
|
17551
18055
|
return (0, import_lib2.$EVENT)(ctx, state2, "Void", Void$0);
|
|
17552
18056
|
}
|
|
17553
|
-
var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18057
|
+
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) {
|
|
17554
18058
|
return { $loc, token: "case" };
|
|
17555
18059
|
});
|
|
17556
18060
|
function When(ctx, state2) {
|
|
17557
18061
|
return (0, import_lib2.$EVENT)(ctx, state2, "When", When$0);
|
|
17558
18062
|
}
|
|
17559
|
-
var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18063
|
+
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) {
|
|
17560
18064
|
return { $loc, token: $1 };
|
|
17561
18065
|
});
|
|
17562
18066
|
function While(ctx, state2) {
|
|
17563
18067
|
return (0, import_lib2.$EVENT)(ctx, state2, "While", While$0);
|
|
17564
18068
|
}
|
|
17565
|
-
var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18069
|
+
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) {
|
|
17566
18070
|
return { $loc, token: $1 };
|
|
17567
18071
|
});
|
|
17568
18072
|
function With(ctx, state2) {
|
|
17569
18073
|
return (0, import_lib2.$EVENT)(ctx, state2, "With", With$0);
|
|
17570
18074
|
}
|
|
17571
|
-
var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18075
|
+
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) {
|
|
17572
18076
|
return { $loc, token: $1, type: "Yield" };
|
|
17573
18077
|
});
|
|
17574
18078
|
function Yield(ctx, state2) {
|
|
@@ -17645,7 +18149,7 @@ var JSXElement$$ = [JSXElement$0, JSXElement$1, JSXElement$2];
|
|
|
17645
18149
|
function JSXElement(ctx, state2) {
|
|
17646
18150
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
|
|
17647
18151
|
}
|
|
17648
|
-
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)($
|
|
18152
|
+
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) {
|
|
17649
18153
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
17650
18154
|
});
|
|
17651
18155
|
function JSXSelfClosingElement(ctx, state2) {
|
|
@@ -17678,7 +18182,7 @@ var JSXOptionalClosingElement$$ = [JSXOptionalClosingElement$0, JSXOptionalClosi
|
|
|
17678
18182
|
function JSXOptionalClosingElement(ctx, state2) {
|
|
17679
18183
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
|
|
17680
18184
|
}
|
|
17681
|
-
var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18185
|
+
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 ">"'));
|
|
17682
18186
|
function JSXClosingElement(ctx, state2) {
|
|
17683
18187
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
|
|
17684
18188
|
}
|
|
@@ -17698,7 +18202,7 @@ var JSXFragment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)
|
|
|
17698
18202
|
];
|
|
17699
18203
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
17700
18204
|
});
|
|
17701
|
-
var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($
|
|
18205
|
+
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) {
|
|
17702
18206
|
var children = $3;
|
|
17703
18207
|
$0 = $0.slice(1);
|
|
17704
18208
|
return {
|
|
@@ -17711,7 +18215,7 @@ var JSXFragment$$ = [JSXFragment$0, JSXFragment$1];
|
|
|
17711
18215
|
function JSXFragment(ctx, state2) {
|
|
17712
18216
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
|
|
17713
18217
|
}
|
|
17714
|
-
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
18218
|
+
var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L232, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
17715
18219
|
state.JSXTagStack.push("");
|
|
17716
18220
|
return $1;
|
|
17717
18221
|
});
|
|
@@ -17727,11 +18231,11 @@ var JSXOptionalClosingFragment$$ = [JSXOptionalClosingFragment$0, JSXOptionalClo
|
|
|
17727
18231
|
function JSXOptionalClosingFragment(ctx, state2) {
|
|
17728
18232
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
|
|
17729
18233
|
}
|
|
17730
|
-
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($
|
|
18234
|
+
var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L233, 'JSXClosingFragment "</>"');
|
|
17731
18235
|
function JSXClosingFragment(ctx, state2) {
|
|
17732
18236
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
|
|
17733
18237
|
}
|
|
17734
|
-
var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
18238
|
+
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) {
|
|
17735
18239
|
return config.defaultElement;
|
|
17736
18240
|
});
|
|
17737
18241
|
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)))));
|
|
@@ -17908,7 +18412,7 @@ var JSXAttribute$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(Identifier, (0, im
|
|
|
17908
18412
|
}
|
|
17909
18413
|
return $skip;
|
|
17910
18414
|
});
|
|
17911
|
-
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18415
|
+
var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L178, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
17912
18416
|
return [" ", "id=", $2];
|
|
17913
18417
|
});
|
|
17914
18418
|
var JSXAttribute$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
@@ -18244,7 +18748,7 @@ var JSXChildGeneral$$ = [JSXChildGeneral$0, JSXChildGeneral$1, JSXChildGeneral$2
|
|
|
18244
18748
|
function JSXChildGeneral(ctx, state2) {
|
|
18245
18749
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
|
|
18246
18750
|
}
|
|
18247
|
-
var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18751
|
+
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) {
|
|
18248
18752
|
return ["{/*", $2, "*/}"];
|
|
18249
18753
|
});
|
|
18250
18754
|
function JSXComment(ctx, state2) {
|
|
@@ -18528,37 +19032,37 @@ var InterfaceExtendsTarget$0 = ImplementsTarget;
|
|
|
18528
19032
|
function InterfaceExtendsTarget(ctx, state2) {
|
|
18529
19033
|
return (0, import_lib2.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
|
|
18530
19034
|
}
|
|
18531
|
-
var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19035
|
+
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) {
|
|
18532
19036
|
return { $loc, token: $1 };
|
|
18533
19037
|
});
|
|
18534
19038
|
function TypeKeyword(ctx, state2) {
|
|
18535
19039
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
|
|
18536
19040
|
}
|
|
18537
|
-
var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19041
|
+
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) {
|
|
18538
19042
|
return { $loc, token: $1 };
|
|
18539
19043
|
});
|
|
18540
19044
|
function Enum(ctx, state2) {
|
|
18541
19045
|
return (0, import_lib2.$EVENT)(ctx, state2, "Enum", Enum$0);
|
|
18542
19046
|
}
|
|
18543
|
-
var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19047
|
+
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) {
|
|
18544
19048
|
return { $loc, token: $1 };
|
|
18545
19049
|
});
|
|
18546
19050
|
function Interface(ctx, state2) {
|
|
18547
19051
|
return (0, import_lib2.$EVENT)(ctx, state2, "Interface", Interface$0);
|
|
18548
19052
|
}
|
|
18549
|
-
var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19053
|
+
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) {
|
|
18550
19054
|
return { $loc, token: $1 };
|
|
18551
19055
|
});
|
|
18552
19056
|
function Global(ctx, state2) {
|
|
18553
19057
|
return (0, import_lib2.$EVENT)(ctx, state2, "Global", Global$0);
|
|
18554
19058
|
}
|
|
18555
|
-
var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19059
|
+
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) {
|
|
18556
19060
|
return { $loc, token: $1 };
|
|
18557
19061
|
});
|
|
18558
19062
|
function Module(ctx, state2) {
|
|
18559
19063
|
return (0, import_lib2.$EVENT)(ctx, state2, "Module", Module$0);
|
|
18560
19064
|
}
|
|
18561
|
-
var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19065
|
+
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) {
|
|
18562
19066
|
return { $loc, token: $1 };
|
|
18563
19067
|
});
|
|
18564
19068
|
function Namespace(ctx, state2) {
|
|
@@ -18867,7 +19371,7 @@ var ReturnTypeSuffix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib
|
|
|
18867
19371
|
function ReturnTypeSuffix(ctx, state2) {
|
|
18868
19372
|
return (0, import_lib2.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
|
|
18869
19373
|
}
|
|
18870
|
-
var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($
|
|
19374
|
+
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) {
|
|
18871
19375
|
var asserts = $1;
|
|
18872
19376
|
var t = $3;
|
|
18873
19377
|
if (!t) return $skip;
|
|
@@ -18960,8 +19464,8 @@ var TypeUnarySuffix$$ = [TypeUnarySuffix$0, TypeUnarySuffix$1, TypeUnarySuffix$2
|
|
|
18960
19464
|
function TypeUnarySuffix(ctx, state2) {
|
|
18961
19465
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
|
|
18962
19466
|
}
|
|
18963
|
-
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18964
|
-
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19467
|
+
var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L243, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
19468
|
+
var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L204, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
18965
19469
|
var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
|
|
18966
19470
|
function TypeUnaryOp(ctx, state2) {
|
|
18967
19471
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
|
|
@@ -18991,7 +19495,7 @@ var TypeIndexedAccess$$ = [TypeIndexedAccess$0, TypeIndexedAccess$1, TypeIndexed
|
|
|
18991
19495
|
function TypeIndexedAccess(ctx, state2) {
|
|
18992
19496
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
|
|
18993
19497
|
}
|
|
18994
|
-
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
19498
|
+
var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L244, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
|
|
18995
19499
|
return { $loc, token: "unknown" };
|
|
18996
19500
|
});
|
|
18997
19501
|
function UnknownAlias(ctx, state2) {
|
|
@@ -18999,9 +19503,11 @@ function UnknownAlias(ctx, state2) {
|
|
|
18999
19503
|
}
|
|
19000
19504
|
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)));
|
|
19001
19505
|
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) {
|
|
19506
|
+
var expression = $4;
|
|
19002
19507
|
return {
|
|
19003
|
-
type: "
|
|
19004
|
-
children: $0
|
|
19508
|
+
type: "TypeTypeof",
|
|
19509
|
+
children: $0,
|
|
19510
|
+
expression
|
|
19005
19511
|
};
|
|
19006
19512
|
});
|
|
19007
19513
|
var TypePrimary$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), TypeTuple), function($skip, $loc, $0, $1, $2) {
|
|
@@ -19366,13 +19872,13 @@ var TypeLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EX
|
|
|
19366
19872
|
if (sign[0] === "+") return num;
|
|
19367
19873
|
return $0;
|
|
19368
19874
|
});
|
|
19369
|
-
var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19875
|
+
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) {
|
|
19370
19876
|
return { type: "VoidType", $loc, token: $1 };
|
|
19371
19877
|
});
|
|
19372
|
-
var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
19878
|
+
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) {
|
|
19373
19879
|
return { type: "UniqueSymbolType", children: $0 };
|
|
19374
19880
|
});
|
|
19375
|
-
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
19881
|
+
var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L247, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
19376
19882
|
return { $loc, token: "[]" };
|
|
19377
19883
|
});
|
|
19378
19884
|
var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
|
|
@@ -19391,7 +19897,7 @@ var InlineInterfacePropertyDelimiter$0 = (0, import_lib2.$C)((0, import_lib2.$S)
|
|
|
19391
19897
|
var InlineInterfacePropertyDelimiter$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)(SameLineOrIndentedFurther, InlineBasicInterfaceProperty)), InsertComma), function(value) {
|
|
19392
19898
|
return value[1];
|
|
19393
19899
|
});
|
|
19394
|
-
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)($
|
|
19900
|
+
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 "}"'))));
|
|
19395
19901
|
var InlineInterfacePropertyDelimiter$3 = (0, import_lib2.$Y)(EOS);
|
|
19396
19902
|
var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
|
|
19397
19903
|
function InlineInterfacePropertyDelimiter(ctx, state2) {
|
|
@@ -19631,7 +20137,7 @@ var CivetPrologue$$ = [CivetPrologue$0, CivetPrologue$1];
|
|
|
19631
20137
|
function CivetPrologue(ctx, state2) {
|
|
19632
20138
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
|
|
19633
20139
|
}
|
|
19634
|
-
var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
20140
|
+
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) {
|
|
19635
20141
|
var options = $3;
|
|
19636
20142
|
return {
|
|
19637
20143
|
type: "CivetPrologue",
|
|
@@ -20340,7 +20846,7 @@ __export(sourcemap_civet_exports, {
|
|
|
20340
20846
|
locationTable: () => locationTable,
|
|
20341
20847
|
lookupLineColumn: () => lookupLineColumn
|
|
20342
20848
|
});
|
|
20343
|
-
|
|
20849
|
+
function locationTable(input) {
|
|
20344
20850
|
const linesRe = /([^\r\n]*)(\r\n|\r|\n|$)/y;
|
|
20345
20851
|
const lines = [];
|
|
20346
20852
|
let line = 0;
|
|
@@ -20355,96 +20861,108 @@ var locationTable = function(input) {
|
|
|
20355
20861
|
}
|
|
20356
20862
|
}
|
|
20357
20863
|
return lines;
|
|
20358
|
-
}
|
|
20359
|
-
|
|
20864
|
+
}
|
|
20865
|
+
function lookupLineColumn(table, pos) {
|
|
20360
20866
|
let l = 0;
|
|
20361
20867
|
let prevEnd = 0;
|
|
20362
20868
|
while (table[l] <= pos) {
|
|
20363
20869
|
prevEnd = table[l++];
|
|
20364
20870
|
}
|
|
20365
20871
|
return [l, pos - prevEnd];
|
|
20366
|
-
}
|
|
20367
|
-
var
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
|
|
20395
|
-
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
|
|
20872
|
+
}
|
|
20873
|
+
var EOL2 = /\r?\n|\r/;
|
|
20874
|
+
var SourceMap = class {
|
|
20875
|
+
lines;
|
|
20876
|
+
line;
|
|
20877
|
+
colOffset;
|
|
20878
|
+
// relative to previous entry
|
|
20879
|
+
srcLine;
|
|
20880
|
+
srcColumn;
|
|
20881
|
+
srcOffset;
|
|
20882
|
+
srcTable;
|
|
20883
|
+
source;
|
|
20884
|
+
constructor(source1) {
|
|
20885
|
+
this.source = source1;
|
|
20886
|
+
this.lines = [[]];
|
|
20887
|
+
this.line = 0;
|
|
20888
|
+
this.colOffset = 0;
|
|
20889
|
+
this.srcLine = 0;
|
|
20890
|
+
this.srcColumn = 0;
|
|
20891
|
+
this.srcOffset = 0;
|
|
20892
|
+
this.srcTable = locationTable(this.source);
|
|
20893
|
+
}
|
|
20894
|
+
renderMappings() {
|
|
20895
|
+
let lastSourceLine = 0;
|
|
20896
|
+
let lastSourceColumn = 0;
|
|
20897
|
+
return (() => {
|
|
20898
|
+
const results = [];
|
|
20899
|
+
for (let ref1 = this.lines, i1 = 0, len3 = ref1.length; i1 < len3; i1++) {
|
|
20900
|
+
const line = ref1[i1];
|
|
20901
|
+
results.push((() => {
|
|
20902
|
+
const results1 = [];
|
|
20903
|
+
for (let i2 = 0, len1 = line.length; i2 < len1; i2++) {
|
|
20904
|
+
const entry = line[i2];
|
|
20905
|
+
if (entry.length === 4) {
|
|
20906
|
+
let [colDelta, sourceFileIndex, srcLine, srcCol] = entry;
|
|
20907
|
+
const lineDelta = srcLine - lastSourceLine;
|
|
20908
|
+
colDelta = srcCol - lastSourceColumn;
|
|
20909
|
+
lastSourceLine = srcLine;
|
|
20910
|
+
lastSourceColumn = srcCol;
|
|
20911
|
+
results1.push(`${encodeVlq(entry[0])}${encodeVlq(sourceFileIndex)}${encodeVlq(lineDelta)}${encodeVlq(colDelta)}`);
|
|
20912
|
+
} else {
|
|
20913
|
+
results1.push(encodeVlq(entry[0]));
|
|
20914
|
+
}
|
|
20399
20915
|
}
|
|
20400
|
-
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
|
|
20412
|
-
|
|
20413
|
-
|
|
20414
|
-
|
|
20415
|
-
|
|
20416
|
-
|
|
20417
|
-
|
|
20418
|
-
|
|
20916
|
+
return results1;
|
|
20917
|
+
})().join(","));
|
|
20918
|
+
}
|
|
20919
|
+
return results;
|
|
20920
|
+
})().join(";");
|
|
20921
|
+
}
|
|
20922
|
+
json(srcFileName, outFileName) {
|
|
20923
|
+
return {
|
|
20924
|
+
version: 3,
|
|
20925
|
+
file: outFileName,
|
|
20926
|
+
sources: [srcFileName],
|
|
20927
|
+
mappings: this.renderMappings(),
|
|
20928
|
+
names: [],
|
|
20929
|
+
sourcesContent: [this.source],
|
|
20930
|
+
toString: function() {
|
|
20931
|
+
return JSON.stringify(this);
|
|
20932
|
+
}
|
|
20933
|
+
};
|
|
20934
|
+
}
|
|
20935
|
+
updateSourceMap(outputStr, inputPos, colOffset = 0) {
|
|
20936
|
+
const outLines = outputStr.split(EOL2);
|
|
20937
|
+
let srcLine, srcCol;
|
|
20938
|
+
if (inputPos != null) {
|
|
20939
|
+
[srcLine, srcCol] = lookupLineColumn(this.srcTable, inputPos);
|
|
20940
|
+
srcCol += colOffset;
|
|
20941
|
+
this.srcLine = srcLine;
|
|
20942
|
+
this.srcColumn = srcCol;
|
|
20943
|
+
this.srcOffset = inputPos + outputStr.length;
|
|
20944
|
+
}
|
|
20945
|
+
for (let i3 = 0, len22 = outLines.length; i3 < len22; i3++) {
|
|
20946
|
+
const i = i3;
|
|
20947
|
+
const line = outLines[i3];
|
|
20948
|
+
if (i > 0) {
|
|
20949
|
+
this.line++;
|
|
20950
|
+
this.srcLine++;
|
|
20951
|
+
this.colOffset = 0;
|
|
20952
|
+
this.lines[this.line] = [];
|
|
20953
|
+
this.srcColumn = srcCol = colOffset;
|
|
20954
|
+
}
|
|
20955
|
+
const l = this.colOffset;
|
|
20956
|
+
this.colOffset = line.length;
|
|
20957
|
+
this.srcColumn += line.length;
|
|
20419
20958
|
if (inputPos != null) {
|
|
20420
|
-
[
|
|
20421
|
-
|
|
20422
|
-
|
|
20423
|
-
sm.srcColumn = srcCol;
|
|
20424
|
-
sm.srcOffset = inputPos + outputStr.length;
|
|
20425
|
-
}
|
|
20426
|
-
for (let i1 = 0, len3 = outLines.length; i1 < len3; i1++) {
|
|
20427
|
-
const i = i1;
|
|
20428
|
-
const line = outLines[i1];
|
|
20429
|
-
if (i > 0) {
|
|
20430
|
-
sm.line++;
|
|
20431
|
-
sm.srcLine++;
|
|
20432
|
-
sm.colOffset = 0;
|
|
20433
|
-
sm.lines[sm.line] = [];
|
|
20434
|
-
sm.srcColumn = srcCol = colOffset;
|
|
20435
|
-
}
|
|
20436
|
-
const l = sm.colOffset;
|
|
20437
|
-
sm.colOffset = line.length;
|
|
20438
|
-
sm.srcColumn += line.length;
|
|
20439
|
-
if (inputPos != null) {
|
|
20440
|
-
sm.lines[sm.line].push([l, 0, srcLine + i, srcCol]);
|
|
20441
|
-
} else if (l != 0) {
|
|
20442
|
-
sm.lines[sm.line].push([l]);
|
|
20443
|
-
}
|
|
20959
|
+
this.lines[this.line].push([l, 0, srcLine + i, srcCol]);
|
|
20960
|
+
} else if (l != 0) {
|
|
20961
|
+
this.lines[this.line].push([l]);
|
|
20444
20962
|
}
|
|
20445
|
-
return;
|
|
20446
20963
|
}
|
|
20447
|
-
|
|
20964
|
+
return;
|
|
20965
|
+
}
|
|
20448
20966
|
};
|
|
20449
20967
|
var smRegexp = /\n\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,([+a-zA-Z0-9\/]*=?=?)$/;
|
|
20450
20968
|
var remap = function(codeWithSourceMap, upstreamMap, sourcePath, targetPath) {
|
|
@@ -20455,8 +20973,8 @@ var remap = function(codeWithSourceMap, upstreamMap, sourcePath, targetPath) {
|
|
|
20455
20973
|
});
|
|
20456
20974
|
if (sourceMapText) {
|
|
20457
20975
|
const parsed = parseWithLines(sourceMapText);
|
|
20458
|
-
const composedLines = composeLines(upstreamMap.
|
|
20459
|
-
upstreamMap.
|
|
20976
|
+
const composedLines = composeLines(upstreamMap.lines, parsed.lines);
|
|
20977
|
+
upstreamMap.lines = composedLines;
|
|
20460
20978
|
}
|
|
20461
20979
|
const remappedSourceMapJSON = upstreamMap.json(sourcePath, targetPath);
|
|
20462
20980
|
const newSourceMap = `${"sourceMapping"}URL=data:application/json;charset=utf-8;base64,${base64Encode(JSON.stringify(remappedSourceMapJSON))}`;
|
|
@@ -20518,10 +21036,10 @@ var VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT;
|
|
|
20518
21036
|
var VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1;
|
|
20519
21037
|
var encodeVlq = function(value) {
|
|
20520
21038
|
let answer = "";
|
|
20521
|
-
let
|
|
20522
|
-
if (value < 0)
|
|
20523
|
-
else
|
|
20524
|
-
const signBit =
|
|
21039
|
+
let ref2;
|
|
21040
|
+
if (value < 0) ref2 = 1;
|
|
21041
|
+
else ref2 = 0;
|
|
21042
|
+
const signBit = ref2;
|
|
20525
21043
|
let valueToEncode = (Math.abs(value) << 1) + signBit;
|
|
20526
21044
|
while (valueToEncode || !answer) {
|
|
20527
21045
|
let nextChunk = valueToEncode & VLQ_VALUE_MASK;
|
|
@@ -20693,8 +21211,8 @@ var WorkerPool = class {
|
|
|
20693
21211
|
async run(op, ...args) {
|
|
20694
21212
|
const id = this.jobId++;
|
|
20695
21213
|
return await new Promise(async (resolve2, reject) => {
|
|
20696
|
-
this.callbacks.set(id, { resolve: resolve2, reject });
|
|
20697
21214
|
const job = { id, op, args };
|
|
21215
|
+
this.callbacks.set(id, { job, resolve: resolve2, reject });
|
|
20698
21216
|
if (this.idle.length) {
|
|
20699
21217
|
const worker = this.idle.shift();
|
|
20700
21218
|
worker.ref();
|
|
@@ -20715,8 +21233,32 @@ var WorkerPool = class {
|
|
|
20715
21233
|
const callback = this.callbacks.get(response.id);
|
|
20716
21234
|
this.callbacks.delete(response.id);
|
|
20717
21235
|
if (response.error) {
|
|
20718
|
-
|
|
21236
|
+
const message = `${response.error.name}: ${response.error.message}`;
|
|
21237
|
+
let ref;
|
|
21238
|
+
if (response.error.type in globalThis) {
|
|
21239
|
+
ref = new globalThis[response.error.type](message);
|
|
21240
|
+
} else {
|
|
21241
|
+
ref = new Error(message);
|
|
21242
|
+
}
|
|
21243
|
+
;
|
|
21244
|
+
const error = ref;
|
|
21245
|
+
try {
|
|
21246
|
+
error.name = response.error.name;
|
|
21247
|
+
} catch (e) {
|
|
21248
|
+
}
|
|
21249
|
+
callback.reject(error);
|
|
20719
21250
|
} else {
|
|
21251
|
+
let ref1;
|
|
21252
|
+
if (ref1 = response.result?.sourceMap) {
|
|
21253
|
+
const sourceMap = ref1;
|
|
21254
|
+
response.result.sourceMap = new SourceMap(sourceMap.source);
|
|
21255
|
+
Object.assign(response.result.sourceMap, sourceMap);
|
|
21256
|
+
}
|
|
21257
|
+
let ref2;
|
|
21258
|
+
if (ref2 = callback.job.args[1]?.errors) {
|
|
21259
|
+
const errors = ref2;
|
|
21260
|
+
errors.splice(0, 1 / 0, ...response.errors);
|
|
21261
|
+
}
|
|
20720
21262
|
callback.resolve(response.result);
|
|
20721
21263
|
}
|
|
20722
21264
|
if (this.spawned > this.threads) {
|
|
@@ -20900,7 +21442,7 @@ ${counts}`;
|
|
|
20900
21442
|
return;
|
|
20901
21443
|
}
|
|
20902
21444
|
if (options.sourceMap || options.inlineMap) {
|
|
20903
|
-
options.sourceMap = SourceMap2(src);
|
|
21445
|
+
options.sourceMap = new SourceMap2(src);
|
|
20904
21446
|
const code = generate_civet_default(ast2, options);
|
|
20905
21447
|
checkErrors();
|
|
20906
21448
|
if (options.inlineMap) {
|
|
@@ -20915,7 +21457,7 @@ ${counts}`;
|
|
|
20915
21457
|
const result = generate_civet_default(ast2, options);
|
|
20916
21458
|
if (options.errors?.length) {
|
|
20917
21459
|
delete options.errors;
|
|
20918
|
-
options.sourceMap = SourceMap2(src);
|
|
21460
|
+
options.sourceMap = new SourceMap2(src);
|
|
20919
21461
|
generate_civet_default(ast2, options);
|
|
20920
21462
|
checkErrors();
|
|
20921
21463
|
}
|