@danielx/civet 0.8.7 → 0.8.9
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 +27 -7
- package/dist/browser.js +1169 -734
- package/dist/main.js +1169 -734
- package/dist/main.mjs +1169 -734
- package/dist/types.d.ts +1 -0
- package/dist/unplugin/unplugin.js +47 -22
- package/dist/unplugin/unplugin.mjs +47 -22
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -66,7 +66,7 @@ var Civet = (() => {
|
|
|
66
66
|
$EVENT: () => $EVENT2,
|
|
67
67
|
$EVENT_C: () => $EVENT_C2,
|
|
68
68
|
$EXPECT: () => $EXPECT2,
|
|
69
|
-
$L: () => $
|
|
69
|
+
$L: () => $L246,
|
|
70
70
|
$N: () => $N2,
|
|
71
71
|
$P: () => $P2,
|
|
72
72
|
$Q: () => $Q2,
|
|
@@ -91,7 +91,7 @@ var Civet = (() => {
|
|
|
91
91
|
return result;
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
function $
|
|
94
|
+
function $L246(str) {
|
|
95
95
|
return function(_ctx, state2) {
|
|
96
96
|
const { input, pos } = state2, { length } = str, end = pos + length;
|
|
97
97
|
if (input.substring(pos, end) === str) {
|
|
@@ -585,7 +585,8 @@ ${body}`;
|
|
|
585
585
|
stripTrailingImplicitComma: () => stripTrailingImplicitComma,
|
|
586
586
|
trimFirstSpace: () => trimFirstSpace,
|
|
587
587
|
typeOfJSX: () => typeOfJSX,
|
|
588
|
-
wrapIIFE: () => wrapIIFE
|
|
588
|
+
wrapIIFE: () => wrapIIFE,
|
|
589
|
+
wrapTypeInPromise: () => wrapTypeInPromise
|
|
589
590
|
});
|
|
590
591
|
|
|
591
592
|
// source/parser/util.civet
|
|
@@ -925,32 +926,54 @@ ${body}`;
|
|
|
925
926
|
case "false":
|
|
926
927
|
return false;
|
|
927
928
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
929
|
+
let ref3;
|
|
930
|
+
switch (literal.subtype) {
|
|
931
|
+
case "StringLiteral": {
|
|
932
|
+
assert.equal(
|
|
933
|
+
raw.startsWith('"') && raw.endsWith('"') || raw.startsWith("'") && raw.endsWith("'"),
|
|
934
|
+
true,
|
|
935
|
+
"String literal should begin and end in single or double quotes"
|
|
936
|
+
);
|
|
937
|
+
return raw.slice(1, -1);
|
|
938
|
+
}
|
|
939
|
+
case "NumericLiteral": {
|
|
940
|
+
raw = raw.replace(/_/g, "");
|
|
941
|
+
if (raw.endsWith("n")) {
|
|
942
|
+
return BigInt(raw.slice(0, -1));
|
|
943
|
+
} else if (raw.match(/[\.eE]/)) {
|
|
944
|
+
return parseFloat(raw);
|
|
945
|
+
} else if ((ref3 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref3) && len(ref3, 2)) {
|
|
946
|
+
const [, base] = ref3;
|
|
947
|
+
switch (base.toLowerCase()) {
|
|
948
|
+
case "x":
|
|
949
|
+
return parseInt(raw.replace(/0[xX]/, ""), 16);
|
|
950
|
+
case "b":
|
|
951
|
+
return parseInt(raw.replace(/0[bB]/, ""), 2);
|
|
952
|
+
case "o":
|
|
953
|
+
return parseInt(raw.replace(/0[oO]/, ""), 8);
|
|
954
|
+
}
|
|
949
955
|
}
|
|
956
|
+
return parseInt(raw, 10);
|
|
957
|
+
}
|
|
958
|
+
default: {
|
|
959
|
+
throw new Error("Unrecognized literal " + JSON.stringify(literal));
|
|
950
960
|
}
|
|
951
|
-
return parseInt(raw, 10);
|
|
952
961
|
}
|
|
953
|
-
|
|
962
|
+
}
|
|
963
|
+
function makeNumericLiteral(n) {
|
|
964
|
+
const s = n.toString();
|
|
965
|
+
return {
|
|
966
|
+
type: "Literal",
|
|
967
|
+
subtype: "NumericLiteral",
|
|
968
|
+
raw: s,
|
|
969
|
+
children: [
|
|
970
|
+
{
|
|
971
|
+
type: "NumericLiteral",
|
|
972
|
+
token: s
|
|
973
|
+
}
|
|
974
|
+
// missing $loc
|
|
975
|
+
]
|
|
976
|
+
};
|
|
954
977
|
}
|
|
955
978
|
function startsWith(target, value) {
|
|
956
979
|
if (!target)
|
|
@@ -1011,21 +1034,39 @@ ${body}`;
|
|
|
1011
1034
|
function hasExportDeclaration(exp) {
|
|
1012
1035
|
return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ExportDeclaration").length > 0;
|
|
1013
1036
|
}
|
|
1014
|
-
function deepCopy(
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1037
|
+
function deepCopy(root) {
|
|
1038
|
+
const copied = /* @__PURE__ */ new Map();
|
|
1039
|
+
return recurse(root);
|
|
1040
|
+
function recurse(node) {
|
|
1041
|
+
if (!(node != null && typeof node === "object")) {
|
|
1042
|
+
return node;
|
|
1043
|
+
}
|
|
1044
|
+
if (!copied.has(node)) {
|
|
1045
|
+
if (Array.isArray(node)) {
|
|
1046
|
+
const array = new Array(node.length);
|
|
1047
|
+
copied.set(node, array);
|
|
1048
|
+
for (let i4 = 0, len4 = node.length; i4 < len4; i4++) {
|
|
1049
|
+
const i = i4;
|
|
1050
|
+
const item = node[i4];
|
|
1051
|
+
array[i] = recurse(item);
|
|
1052
|
+
}
|
|
1053
|
+
} else if (node?.type === "Ref") {
|
|
1054
|
+
copied.set(node, node);
|
|
1055
|
+
} else {
|
|
1056
|
+
const obj = {};
|
|
1057
|
+
copied.set(node, obj);
|
|
1058
|
+
for (const key in node) {
|
|
1059
|
+
const value = node[key];
|
|
1060
|
+
if (key === "parent") {
|
|
1061
|
+
obj.parent = copied.get(value) ?? value;
|
|
1062
|
+
} else {
|
|
1063
|
+
obj[key] = recurse(value);
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
return copied.get(node);
|
|
1021
1069
|
}
|
|
1022
|
-
if (node?.type === "Ref")
|
|
1023
|
-
return node;
|
|
1024
|
-
return Object.fromEntries(
|
|
1025
|
-
Object.entries(node).map(([key, value]) => {
|
|
1026
|
-
return [key, deepCopy(value)];
|
|
1027
|
-
})
|
|
1028
|
-
);
|
|
1029
1070
|
}
|
|
1030
1071
|
function removeHoistDecs(node) {
|
|
1031
1072
|
if (node == null)
|
|
@@ -1099,8 +1140,8 @@ ${body}`;
|
|
|
1099
1140
|
return;
|
|
1100
1141
|
}
|
|
1101
1142
|
if (Array.isArray(node)) {
|
|
1102
|
-
for (let
|
|
1103
|
-
const child = node[
|
|
1143
|
+
for (let i5 = 0, len5 = node.length; i5 < len5; i5++) {
|
|
1144
|
+
const child = node[i5];
|
|
1104
1145
|
updateParentPointers(child, parent, depth);
|
|
1105
1146
|
}
|
|
1106
1147
|
return;
|
|
@@ -1110,8 +1151,8 @@ ${body}`;
|
|
|
1110
1151
|
node.parent = parent;
|
|
1111
1152
|
}
|
|
1112
1153
|
if (depth && isParent(node)) {
|
|
1113
|
-
for (let
|
|
1114
|
-
const child =
|
|
1154
|
+
for (let ref4 = node.children, i6 = 0, len6 = ref4.length; i6 < len6; i6++) {
|
|
1155
|
+
const child = ref4[i6];
|
|
1115
1156
|
updateParentPointers(child, node, depth - 1);
|
|
1116
1157
|
}
|
|
1117
1158
|
}
|
|
@@ -1148,7 +1189,7 @@ ${body}`;
|
|
|
1148
1189
|
return children.splice(index, del, ...replacements);
|
|
1149
1190
|
}
|
|
1150
1191
|
function convertOptionalType(suffix) {
|
|
1151
|
-
if (suffix.t.type === "
|
|
1192
|
+
if (suffix.t.type === "TypeAsserts") {
|
|
1152
1193
|
spliceChild(suffix, suffix.optional, 1, suffix.optional = {
|
|
1153
1194
|
type: "Error",
|
|
1154
1195
|
message: "Can't use optional ?: syntax with asserts type"
|
|
@@ -1170,7 +1211,7 @@ ${body}`;
|
|
|
1170
1211
|
"TypeIdentifier",
|
|
1171
1212
|
"ImportType",
|
|
1172
1213
|
"TypeLiteral",
|
|
1173
|
-
"
|
|
1214
|
+
"TypeTuple",
|
|
1174
1215
|
"TypeParenthesized"
|
|
1175
1216
|
]);
|
|
1176
1217
|
function parenthesizeType(type) {
|
|
@@ -1248,8 +1289,8 @@ ${body}`;
|
|
|
1248
1289
|
children.splice(1, 0, ".bind(this)");
|
|
1249
1290
|
}
|
|
1250
1291
|
if (gatherRecursiveWithinFunction(block, (a2) => typeof a2 === "object" && a2 != null && "token" in a2 && a2.token === "arguments").length) {
|
|
1251
|
-
let
|
|
1252
|
-
children[children.length - 1] = (
|
|
1292
|
+
let ref5;
|
|
1293
|
+
children[children.length - 1] = (ref5 = parameters.children)[ref5.length - 1] = "(arguments)";
|
|
1253
1294
|
}
|
|
1254
1295
|
}
|
|
1255
1296
|
let exp = makeNode({
|
|
@@ -1287,9 +1328,9 @@ ${body}`;
|
|
|
1287
1328
|
}
|
|
1288
1329
|
function flatJoin(array, separator) {
|
|
1289
1330
|
const result = [];
|
|
1290
|
-
for (let
|
|
1291
|
-
const i =
|
|
1292
|
-
const items = array[
|
|
1331
|
+
for (let i7 = 0, len7 = array.length; i7 < len7; i7++) {
|
|
1332
|
+
const i = i7;
|
|
1333
|
+
const items = array[i7];
|
|
1293
1334
|
if (i) {
|
|
1294
1335
|
result.push(separator);
|
|
1295
1336
|
}
|
|
@@ -1875,6 +1916,13 @@ ${body}`;
|
|
|
1875
1916
|
").push(rhs), lhs);\n"
|
|
1876
1917
|
]]);
|
|
1877
1918
|
},
|
|
1919
|
+
AutoPromise(ref) {
|
|
1920
|
+
state.prelude.push([
|
|
1921
|
+
"",
|
|
1922
|
+
ts(["type ", ref, "<T> = T extends Promise<unknown> ? T : Promise<T>"]),
|
|
1923
|
+
";\n"
|
|
1924
|
+
]);
|
|
1925
|
+
},
|
|
1878
1926
|
JSX(jsxRef) {
|
|
1879
1927
|
state.prelude.push([
|
|
1880
1928
|
"",
|
|
@@ -1980,12 +2028,17 @@ ${body}`;
|
|
|
1980
2028
|
));
|
|
1981
2029
|
return "";
|
|
1982
2030
|
}
|
|
1983
|
-
if (
|
|
2031
|
+
if ("$loc" in node) {
|
|
1984
2032
|
const { token, $loc } = node;
|
|
1985
|
-
|
|
2033
|
+
if ($loc != null) {
|
|
2034
|
+
updateSourceMap?.(token, $loc.pos);
|
|
2035
|
+
}
|
|
1986
2036
|
return token;
|
|
1987
2037
|
}
|
|
1988
2038
|
if (!node.children) {
|
|
2039
|
+
if (node.token != null) {
|
|
2040
|
+
return node.token;
|
|
2041
|
+
}
|
|
1989
2042
|
switch (node.type) {
|
|
1990
2043
|
case "Ref": {
|
|
1991
2044
|
throw new Error(`Unpopulated ref ${stringify(node)}`);
|
|
@@ -2165,6 +2218,9 @@ ${js}`
|
|
|
2165
2218
|
throw new TypeError("cannot serialize native function");
|
|
2166
2219
|
}
|
|
2167
2220
|
if (/^class[\s{]/u.test(string)) {
|
|
2221
|
+
if (!Object.isExtensible(val)) {
|
|
2222
|
+
string = `Object.preventExtensions(${string})`;
|
|
2223
|
+
}
|
|
2168
2224
|
return string;
|
|
2169
2225
|
}
|
|
2170
2226
|
if (stack.has(val)) {
|
|
@@ -2192,6 +2248,9 @@ ${js}`
|
|
|
2192
2248
|
}
|
|
2193
2249
|
string = `Object.defineProperties(${string},${recurse(props)})`;
|
|
2194
2250
|
}
|
|
2251
|
+
if (!Object.isExtensible(val)) {
|
|
2252
|
+
string = `Object.preventExtensions(${string})`;
|
|
2253
|
+
}
|
|
2195
2254
|
stack.delete(val);
|
|
2196
2255
|
return string;
|
|
2197
2256
|
} else if (typeof val === "symbol") {
|
|
@@ -2357,9 +2416,49 @@ ${js}`
|
|
|
2357
2416
|
function isVoidType(t) {
|
|
2358
2417
|
return typeof t === "object" && t != null && "type" in t && t.type === "TypeLiteral" && "t" in t && typeof t.t === "object" && t.t != null && "type" in t.t && t.t.type === "VoidType";
|
|
2359
2418
|
}
|
|
2419
|
+
function isPromiseType(t) {
|
|
2420
|
+
return typeof t === "object" && t != null && "type" in t && t.type === "TypeIdentifier" && "raw" in t && t.raw === "Promise";
|
|
2421
|
+
}
|
|
2360
2422
|
function isPromiseVoidType(t) {
|
|
2361
|
-
|
|
2362
|
-
|
|
2423
|
+
if (!isPromiseType(t)) {
|
|
2424
|
+
return false;
|
|
2425
|
+
}
|
|
2426
|
+
const args = getTypeArguments(t.args?.args);
|
|
2427
|
+
return args.length === 1 && isVoidType(args[0].t);
|
|
2428
|
+
}
|
|
2429
|
+
function wrapTypeInPromise(t) {
|
|
2430
|
+
if (isPromiseType(t)) {
|
|
2431
|
+
return t;
|
|
2432
|
+
}
|
|
2433
|
+
return wrapTypeInApplication(t, getHelperRef("AutoPromise"), "Promise");
|
|
2434
|
+
}
|
|
2435
|
+
function wrapTypeInApplication(t, id, raw) {
|
|
2436
|
+
const ws = getTrimmingSpace(t);
|
|
2437
|
+
t = trimFirstSpace(t);
|
|
2438
|
+
const innerArgs = [{
|
|
2439
|
+
type: "TypeArgument",
|
|
2440
|
+
ts: true,
|
|
2441
|
+
t,
|
|
2442
|
+
children: [t]
|
|
2443
|
+
}];
|
|
2444
|
+
const args = {
|
|
2445
|
+
type: "TypeArguments",
|
|
2446
|
+
ts: true,
|
|
2447
|
+
args: innerArgs,
|
|
2448
|
+
children: ["<", innerArgs, ">"]
|
|
2449
|
+
};
|
|
2450
|
+
if (!(raw != null)) {
|
|
2451
|
+
if (!(typeof id === "string")) {
|
|
2452
|
+
throw new Error("wrapTypeInApplication requires string id or raw argument");
|
|
2453
|
+
}
|
|
2454
|
+
raw = id;
|
|
2455
|
+
}
|
|
2456
|
+
return {
|
|
2457
|
+
type: "TypeIdentifier",
|
|
2458
|
+
raw,
|
|
2459
|
+
args,
|
|
2460
|
+
children: [ws, id, args]
|
|
2461
|
+
};
|
|
2363
2462
|
}
|
|
2364
2463
|
function implicitFunctionBlock(f) {
|
|
2365
2464
|
if (f.abstract || f.block || f.signature?.optional)
|
|
@@ -2420,7 +2519,8 @@ ${js}`
|
|
|
2420
2519
|
}
|
|
2421
2520
|
const ref = makeRef("ret");
|
|
2422
2521
|
let declaration;
|
|
2423
|
-
values.
|
|
2522
|
+
for (let i1 = 0, len3 = values.length; i1 < len3; i1++) {
|
|
2523
|
+
const value = values[i1];
|
|
2424
2524
|
value.children = [ref];
|
|
2425
2525
|
const { ancestor, child } = findAncestor(
|
|
2426
2526
|
value,
|
|
@@ -2428,21 +2528,41 @@ ${js}`
|
|
|
2428
2528
|
isFunction
|
|
2429
2529
|
);
|
|
2430
2530
|
if (ancestor) {
|
|
2431
|
-
|
|
2531
|
+
declaration ??= child;
|
|
2432
2532
|
}
|
|
2433
|
-
|
|
2434
|
-
return;
|
|
2435
|
-
});
|
|
2533
|
+
}
|
|
2436
2534
|
let returnType = func.returnType ?? func.signature?.returnType;
|
|
2437
2535
|
if (returnType) {
|
|
2438
2536
|
const { t } = returnType;
|
|
2439
2537
|
let m;
|
|
2440
2538
|
if (m = t.type, m === "TypePredicate") {
|
|
2441
|
-
|
|
2442
|
-
|
|
2539
|
+
const token = { token: "boolean" };
|
|
2540
|
+
const literal = {
|
|
2541
|
+
type: "TypeLiteral",
|
|
2542
|
+
t: token,
|
|
2543
|
+
children: [token]
|
|
2544
|
+
};
|
|
2545
|
+
returnType = {
|
|
2546
|
+
type: "ReturnTypeAnnotation",
|
|
2547
|
+
ts: true,
|
|
2548
|
+
t: literal,
|
|
2549
|
+
children: [": ", literal]
|
|
2550
|
+
};
|
|
2551
|
+
} else if (m === "TypeAsserts") {
|
|
2443
2552
|
returnType = void 0;
|
|
2444
2553
|
}
|
|
2445
2554
|
}
|
|
2555
|
+
if (returnType) {
|
|
2556
|
+
returnType = deepCopy(returnType);
|
|
2557
|
+
addParentPointers(returnType);
|
|
2558
|
+
if (func.signature.modifier.async) {
|
|
2559
|
+
replaceNode(
|
|
2560
|
+
returnType.t,
|
|
2561
|
+
makeNode(wrapTypeInApplication(returnType.t, "Awaited")),
|
|
2562
|
+
returnType
|
|
2563
|
+
);
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2446
2566
|
if (declaration) {
|
|
2447
2567
|
if (!(declaration.typeSuffix != null)) {
|
|
2448
2568
|
declaration.children[1] = declaration.typeSuffix = returnType;
|
|
@@ -2450,11 +2570,11 @@ ${js}`
|
|
|
2450
2570
|
} else {
|
|
2451
2571
|
block.expressions.unshift([
|
|
2452
2572
|
getIndent(block.expressions[0]),
|
|
2453
|
-
{
|
|
2573
|
+
makeNode({
|
|
2454
2574
|
type: "Declaration",
|
|
2455
2575
|
children: ["let ", ref, returnType],
|
|
2456
2576
|
names: []
|
|
2457
|
-
},
|
|
2577
|
+
}),
|
|
2458
2578
|
";"
|
|
2459
2579
|
]);
|
|
2460
2580
|
}
|
|
@@ -2872,19 +2992,15 @@ ${js}`
|
|
|
2872
2992
|
"wrapIterationReturningResults should not be called twice on the same statement"
|
|
2873
2993
|
);
|
|
2874
2994
|
const resultsRef = statement.resultsRef = makeRef("results");
|
|
2875
|
-
const
|
|
2995
|
+
const declaration = iterationDeclaration(statement);
|
|
2876
2996
|
const { ancestor, child } = findAncestor(statement, ($4) => $4.type === "BlockStatement");
|
|
2877
2997
|
assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
|
|
2878
2998
|
const index = findChildIndex(ancestor.expressions, child);
|
|
2999
|
+
assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
|
|
2879
3000
|
const iterationTuple = ancestor.expressions[index];
|
|
2880
3001
|
ancestor.expressions.splice(index, 0, [iterationTuple[0], declaration, ";"]);
|
|
2881
3002
|
iterationTuple[0] = "";
|
|
2882
3003
|
braceBlock(ancestor);
|
|
2883
|
-
if (!breakWithOnly) {
|
|
2884
|
-
assignResults(statement.block, (node) => {
|
|
2885
|
-
return [resultsRef, ".push(", node, ")"];
|
|
2886
|
-
});
|
|
2887
|
-
}
|
|
2888
3004
|
if (collect) {
|
|
2889
3005
|
statement.children.push(collect(resultsRef));
|
|
2890
3006
|
} else {
|
|
@@ -2892,15 +3008,16 @@ ${js}`
|
|
|
2892
3008
|
}
|
|
2893
3009
|
}
|
|
2894
3010
|
function iterationDeclaration(statement) {
|
|
2895
|
-
const { resultsRef } = statement;
|
|
2896
|
-
|
|
3011
|
+
const { resultsRef, block } = statement;
|
|
3012
|
+
const reduction = statement.type === "ForStatement" && statement.reduction;
|
|
3013
|
+
let decl = reduction ? "let" : "const";
|
|
2897
3014
|
if (statement.type === "IterationStatement" || statement.type === "ForStatement") {
|
|
2898
3015
|
if (processBreakContinueWith(statement)) {
|
|
2899
3016
|
decl = "let";
|
|
2900
3017
|
}
|
|
2901
3018
|
}
|
|
2902
3019
|
const breakWithOnly = decl === "let" && isLoopStatement(statement) && gatherRecursive(
|
|
2903
|
-
|
|
3020
|
+
block,
|
|
2904
3021
|
(s) => s.type === "BreakStatement" && !s.with,
|
|
2905
3022
|
(s) => isFunction(s) || s.type === "IterationStatement"
|
|
2906
3023
|
).length === 0;
|
|
@@ -2911,14 +3028,124 @@ ${js}`
|
|
|
2911
3028
|
names: [],
|
|
2912
3029
|
bindings: []
|
|
2913
3030
|
};
|
|
2914
|
-
if (
|
|
2915
|
-
declaration.children.push("=
|
|
3031
|
+
if (reduction) {
|
|
3032
|
+
declaration.children.push("=" + (() => {
|
|
3033
|
+
switch (reduction.subtype) {
|
|
3034
|
+
case "some": {
|
|
3035
|
+
return "false";
|
|
3036
|
+
}
|
|
3037
|
+
case "every": {
|
|
3038
|
+
return "true";
|
|
3039
|
+
}
|
|
3040
|
+
case "min": {
|
|
3041
|
+
return "Infinity";
|
|
3042
|
+
}
|
|
3043
|
+
case "max": {
|
|
3044
|
+
return "-Infinity";
|
|
3045
|
+
}
|
|
3046
|
+
case "product": {
|
|
3047
|
+
return "1";
|
|
3048
|
+
}
|
|
3049
|
+
default: {
|
|
3050
|
+
return "0";
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3053
|
+
})());
|
|
2916
3054
|
} else {
|
|
2917
|
-
if (
|
|
2918
|
-
declaration.children.push("
|
|
3055
|
+
if (decl === "const") {
|
|
3056
|
+
declaration.children.push("=[]");
|
|
3057
|
+
} else {
|
|
3058
|
+
if (!breakWithOnly) {
|
|
3059
|
+
declaration.children.push(";", resultsRef, "=[]");
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
if (!breakWithOnly) {
|
|
3064
|
+
if (iterationDefaultBody(statement)) {
|
|
3065
|
+
return declaration;
|
|
3066
|
+
}
|
|
3067
|
+
if (!block.empty) {
|
|
3068
|
+
assignResults(block, (node) => {
|
|
3069
|
+
if (!reduction) {
|
|
3070
|
+
return [resultsRef, ".push(", node, ")"];
|
|
3071
|
+
}
|
|
3072
|
+
switch (reduction.subtype) {
|
|
3073
|
+
case "some": {
|
|
3074
|
+
return ["if (", node, ") {", resultsRef, " = true; break}"];
|
|
3075
|
+
}
|
|
3076
|
+
case "every": {
|
|
3077
|
+
return [
|
|
3078
|
+
"if (!",
|
|
3079
|
+
makeLeftHandSideExpression(node),
|
|
3080
|
+
") {",
|
|
3081
|
+
resultsRef,
|
|
3082
|
+
" = false; break}"
|
|
3083
|
+
];
|
|
3084
|
+
}
|
|
3085
|
+
case "count": {
|
|
3086
|
+
return ["if (", node, ") ++", resultsRef];
|
|
3087
|
+
}
|
|
3088
|
+
case "sum": {
|
|
3089
|
+
return [resultsRef, " += ", node];
|
|
3090
|
+
}
|
|
3091
|
+
case "product": {
|
|
3092
|
+
return [resultsRef, " *= ", node];
|
|
3093
|
+
}
|
|
3094
|
+
case "min": {
|
|
3095
|
+
return [resultsRef, " = Math.min(", resultsRef, ", ", node, ")"];
|
|
3096
|
+
}
|
|
3097
|
+
case "max": {
|
|
3098
|
+
return [resultsRef, " = Math.max(", resultsRef, ", ", node, ")"];
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3101
|
+
});
|
|
2919
3102
|
}
|
|
2920
3103
|
}
|
|
2921
|
-
return
|
|
3104
|
+
return declaration;
|
|
3105
|
+
}
|
|
3106
|
+
function iterationDefaultBody(statement) {
|
|
3107
|
+
const { block, resultsRef } = statement;
|
|
3108
|
+
if (!block.empty) {
|
|
3109
|
+
return false;
|
|
3110
|
+
}
|
|
3111
|
+
const reduction = statement.type === "ForStatement" && statement.reduction;
|
|
3112
|
+
function fillBlock(expression) {
|
|
3113
|
+
let ref8;
|
|
3114
|
+
let m2;
|
|
3115
|
+
if (m2 = (ref8 = block.expressions)[ref8.length - 1], Array.isArray(m2) && m2.length >= 2 && typeof m2[1] === "object" && m2[1] != null && "type" in m2[1] && m2[1].type === "EmptyStatement" && "implicit" in m2[1] && m2[1].implicit === true) {
|
|
3116
|
+
block.expressions.pop();
|
|
3117
|
+
}
|
|
3118
|
+
block.expressions.push(expression);
|
|
3119
|
+
block.empty = false;
|
|
3120
|
+
return braceBlock(block);
|
|
3121
|
+
}
|
|
3122
|
+
if (reduction) {
|
|
3123
|
+
switch (reduction.subtype) {
|
|
3124
|
+
case "some": {
|
|
3125
|
+
fillBlock(["", [resultsRef, " = true; break"]]);
|
|
3126
|
+
block.empty = false;
|
|
3127
|
+
braceBlock(block);
|
|
3128
|
+
return true;
|
|
3129
|
+
}
|
|
3130
|
+
case "every": {
|
|
3131
|
+
fillBlock(["", [resultsRef, " = false; break"]]);
|
|
3132
|
+
block.empty = false;
|
|
3133
|
+
braceBlock(block);
|
|
3134
|
+
return true;
|
|
3135
|
+
}
|
|
3136
|
+
case "count": {
|
|
3137
|
+
fillBlock(["", ["++", resultsRef]]);
|
|
3138
|
+
block.empty = false;
|
|
3139
|
+
braceBlock(block);
|
|
3140
|
+
return true;
|
|
3141
|
+
}
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
if (statement.type === "ForStatement" && statement.declaration?.type === "ForDeclaration") {
|
|
3145
|
+
fillBlock(["", patternAsValue(statement.declaration.binding)]);
|
|
3146
|
+
block.empty = false;
|
|
3147
|
+
}
|
|
3148
|
+
return false;
|
|
2922
3149
|
}
|
|
2923
3150
|
function processParams(f) {
|
|
2924
3151
|
const { type, parameters, block } = f;
|
|
@@ -2949,18 +3176,18 @@ ${js}`
|
|
|
2949
3176
|
const classExpressions = ancestor.body.expressions;
|
|
2950
3177
|
let index = findChildIndex(classExpressions, f);
|
|
2951
3178
|
assert.notEqual(index, -1, "Could not find constructor in class");
|
|
2952
|
-
let
|
|
2953
|
-
while (
|
|
3179
|
+
let m3;
|
|
3180
|
+
while (m3 = classExpressions[index - 1]?.[1], typeof m3 === "object" && m3 != null && "type" in m3 && m3.type === "MethodDefinition" && "name" in m3 && m3.name === "constructor") {
|
|
2954
3181
|
index--;
|
|
2955
3182
|
}
|
|
2956
3183
|
const fStatement = classExpressions[index];
|
|
2957
|
-
for (let
|
|
2958
|
-
const parameter =
|
|
3184
|
+
for (let ref9 = gatherRecursive(parameters, ($9) => $9.type === "Parameter"), i2 = 0, len1 = ref9.length; i2 < len1; i2++) {
|
|
3185
|
+
const parameter = ref9[i2];
|
|
2959
3186
|
if (!parameter.typeSuffix) {
|
|
2960
3187
|
continue;
|
|
2961
3188
|
}
|
|
2962
|
-
for (let
|
|
2963
|
-
const binding =
|
|
3189
|
+
for (let ref10 = gatherRecursive(parameter, ($10) => $10.type === "AtBinding"), i3 = 0, len22 = ref10.length; i3 < len22; i3++) {
|
|
3190
|
+
const binding = ref10[i3];
|
|
2964
3191
|
const typeSuffix = binding.parent?.typeSuffix;
|
|
2965
3192
|
if (!typeSuffix) {
|
|
2966
3193
|
continue;
|
|
@@ -3014,11 +3241,11 @@ ${js}`
|
|
|
3014
3241
|
}
|
|
3015
3242
|
function processSignature(f) {
|
|
3016
3243
|
const { block, signature } = f;
|
|
3017
|
-
if (
|
|
3244
|
+
if (!f.async?.length && hasAwait(block)) {
|
|
3018
3245
|
f.async.push("async ");
|
|
3019
3246
|
signature.modifier.async = true;
|
|
3020
3247
|
}
|
|
3021
|
-
if (
|
|
3248
|
+
if (!f.generator?.length && hasYield(block)) {
|
|
3022
3249
|
if (f.type === "ArrowFunction") {
|
|
3023
3250
|
gatherRecursiveWithinFunction(block, ($11) => $11.type === "YieldExpression").forEach((y) => {
|
|
3024
3251
|
const i = y.children.findIndex(($12) => $12.type === "Yield");
|
|
@@ -3032,21 +3259,26 @@ ${js}`
|
|
|
3032
3259
|
signature.modifier.generator = true;
|
|
3033
3260
|
}
|
|
3034
3261
|
}
|
|
3262
|
+
if (signature.modifier.async && !signature.modifier.generator && signature.returnType && !isPromiseType(signature.returnType.t)) {
|
|
3263
|
+
replaceNode(signature.returnType.t, wrapTypeInPromise(signature.returnType.t));
|
|
3264
|
+
}
|
|
3035
3265
|
}
|
|
3036
3266
|
function processFunctions(statements, config2) {
|
|
3037
|
-
gatherRecursiveAll(statements, (
|
|
3267
|
+
for (let ref11 = gatherRecursiveAll(statements, ($13) => $13.type === "FunctionExpression" || $13.type === "ArrowFunction"), i4 = 0, len3 = ref11.length; i4 < len3; i4++) {
|
|
3268
|
+
const f = ref11[i4];
|
|
3038
3269
|
if (f.type === "FunctionExpression") {
|
|
3039
3270
|
implicitFunctionBlock(f);
|
|
3040
3271
|
}
|
|
3041
3272
|
processSignature(f);
|
|
3042
3273
|
processParams(f);
|
|
3043
|
-
|
|
3044
|
-
}
|
|
3045
|
-
gatherRecursiveAll(statements, (
|
|
3274
|
+
processReturn(f, config2.implicitReturns);
|
|
3275
|
+
}
|
|
3276
|
+
for (let ref12 = gatherRecursiveAll(statements, ($14) => $14.type === "MethodDefinition"), i5 = 0, len4 = ref12.length; i5 < len4; i5++) {
|
|
3277
|
+
const f = ref12[i5];
|
|
3046
3278
|
implicitFunctionBlock(f);
|
|
3047
3279
|
processParams(f);
|
|
3048
|
-
|
|
3049
|
-
}
|
|
3280
|
+
processReturn(f, config2.implicitReturns);
|
|
3281
|
+
}
|
|
3050
3282
|
}
|
|
3051
3283
|
function expressionizeIteration(exp) {
|
|
3052
3284
|
let { async, generator, block, children, statement } = exp;
|
|
@@ -3059,47 +3291,65 @@ ${js}`
|
|
|
3059
3291
|
updateParentPointers(exp);
|
|
3060
3292
|
return;
|
|
3061
3293
|
}
|
|
3294
|
+
let statements;
|
|
3062
3295
|
if (generator) {
|
|
3296
|
+
if (statement.reduction) {
|
|
3297
|
+
children.unshift({
|
|
3298
|
+
type: "Error",
|
|
3299
|
+
message: `Cannot use reduction (${statement.reduction.subtype}) with generators`
|
|
3300
|
+
});
|
|
3301
|
+
}
|
|
3302
|
+
iterationDefaultBody(statement);
|
|
3063
3303
|
assignResults(block, (node) => {
|
|
3064
3304
|
return {
|
|
3065
3305
|
type: "YieldExpression",
|
|
3066
3306
|
expression: node,
|
|
3067
|
-
children: [
|
|
3307
|
+
children: [
|
|
3308
|
+
{
|
|
3309
|
+
type: "Yield",
|
|
3310
|
+
token: "yield "
|
|
3311
|
+
},
|
|
3312
|
+
node
|
|
3313
|
+
]
|
|
3068
3314
|
};
|
|
3069
3315
|
});
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
wrapIIFE([
|
|
3074
|
-
["", statement, void 0],
|
|
3075
|
-
// Prevent implicit return in generator, by adding an explicit return
|
|
3076
|
-
["", {
|
|
3077
|
-
type: "ReturnStatement",
|
|
3078
|
-
expression: void 0,
|
|
3079
|
-
children: [";return"]
|
|
3080
|
-
}, void 0]
|
|
3081
|
-
], async, generator)
|
|
3082
|
-
);
|
|
3316
|
+
statements = [
|
|
3317
|
+
["", statement]
|
|
3318
|
+
];
|
|
3083
3319
|
} else {
|
|
3084
3320
|
const resultsRef = statement.resultsRef ??= makeRef("results");
|
|
3085
|
-
const
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3321
|
+
const declaration = iterationDeclaration(statement);
|
|
3322
|
+
statements = [
|
|
3323
|
+
["", declaration, ";"],
|
|
3324
|
+
["", statement, statement.block.bare ? ";" : void 0],
|
|
3325
|
+
["", resultsRef]
|
|
3326
|
+
];
|
|
3327
|
+
}
|
|
3328
|
+
let done;
|
|
3329
|
+
if (!async) {
|
|
3330
|
+
let ref13;
|
|
3331
|
+
if ((ref13 = blockContainingStatement(exp)) && typeof ref13 === "object" && "block" in ref13 && "index" in ref13) {
|
|
3332
|
+
const { block: parentBlock, index } = ref13;
|
|
3333
|
+
statements[0][0] = parentBlock.expressions[index][0];
|
|
3334
|
+
parentBlock.expressions.splice(index, index + 1 - index, ...statements);
|
|
3335
|
+
updateParentPointers(parentBlock);
|
|
3336
|
+
braceBlock(parentBlock);
|
|
3337
|
+
done = true;
|
|
3091
3338
|
}
|
|
3092
|
-
children.splice(
|
|
3093
|
-
i,
|
|
3094
|
-
1,
|
|
3095
|
-
wrapIIFE([
|
|
3096
|
-
["", declaration, ";"],
|
|
3097
|
-
["", statement, void 0],
|
|
3098
|
-
["", wrapWithReturn(resultsRef)]
|
|
3099
|
-
], async)
|
|
3100
|
-
);
|
|
3101
3339
|
}
|
|
3102
|
-
|
|
3340
|
+
if (!done) {
|
|
3341
|
+
if (!generator) {
|
|
3342
|
+
statements[statements.length - 1][1] = wrapWithReturn(statements[statements.length - 1][1]);
|
|
3343
|
+
}
|
|
3344
|
+
children.splice(i, 1, wrapIIFE(statements, async, generator));
|
|
3345
|
+
updateParentPointers(exp);
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3348
|
+
function processIterationExpressions(statements) {
|
|
3349
|
+
for (let ref14 = gatherRecursiveAll(statements, ($15) => $15.type === "IterationExpression"), i6 = 0, len5 = ref14.length; i6 < len5; i6++) {
|
|
3350
|
+
const s = ref14[i6];
|
|
3351
|
+
expressionizeIteration(s);
|
|
3352
|
+
}
|
|
3103
3353
|
}
|
|
3104
3354
|
function skipImplicitArguments(args) {
|
|
3105
3355
|
if (args.length === 1) {
|
|
@@ -3123,12 +3373,12 @@ ${js}`
|
|
|
3123
3373
|
...parameters,
|
|
3124
3374
|
children: (() => {
|
|
3125
3375
|
const results1 = [];
|
|
3126
|
-
for (let
|
|
3127
|
-
let parameter =
|
|
3376
|
+
for (let ref15 = parameters.children, i7 = 0, len6 = ref15.length; i7 < len6; i7++) {
|
|
3377
|
+
let parameter = ref15[i7];
|
|
3128
3378
|
if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
|
|
3129
|
-
let
|
|
3130
|
-
if (
|
|
3131
|
-
const initializer =
|
|
3379
|
+
let ref16;
|
|
3380
|
+
if (ref16 = parameter.initializer) {
|
|
3381
|
+
const initializer = ref16;
|
|
3132
3382
|
args.push(initializer.expression, parameter.delim);
|
|
3133
3383
|
parameter = {
|
|
3134
3384
|
...parameter,
|
|
@@ -3149,7 +3399,7 @@ ${js}`
|
|
|
3149
3399
|
expression = {
|
|
3150
3400
|
...expression,
|
|
3151
3401
|
parameters: newParameters,
|
|
3152
|
-
children: expression.children.map(($
|
|
3402
|
+
children: expression.children.map(($16) => $16 === parameters ? newParameters : $16)
|
|
3153
3403
|
};
|
|
3154
3404
|
}
|
|
3155
3405
|
return {
|
|
@@ -3171,7 +3421,7 @@ ${js}`
|
|
|
3171
3421
|
ref = makeRef("$");
|
|
3172
3422
|
inplacePrepend(ref, body);
|
|
3173
3423
|
}
|
|
3174
|
-
if (startsWithPredicate(body, ($
|
|
3424
|
+
if (startsWithPredicate(body, ($17) => $17.type === "ObjectExpression")) {
|
|
3175
3425
|
body = makeLeftHandSideExpression(body);
|
|
3176
3426
|
}
|
|
3177
3427
|
const parameters = makeNode({
|
|
@@ -3411,6 +3661,28 @@ ${js}`
|
|
|
3411
3661
|
}
|
|
3412
3662
|
}
|
|
3413
3663
|
}
|
|
3664
|
+
function blockContainingStatement(exp) {
|
|
3665
|
+
let child = exp;
|
|
3666
|
+
let parent = exp.parent;
|
|
3667
|
+
let m;
|
|
3668
|
+
while (parent != null && (m = parent.type, m === "StatementExpression" || m === "PipelineExpression" || m === "UnwrappedExpression")) {
|
|
3669
|
+
child = parent;
|
|
3670
|
+
parent = parent.parent;
|
|
3671
|
+
}
|
|
3672
|
+
if (!(parent?.type === "BlockStatement")) {
|
|
3673
|
+
return;
|
|
3674
|
+
}
|
|
3675
|
+
const index = findChildIndex(parent.expressions, child);
|
|
3676
|
+
assert.notEqual(index, -1, "Could not find statement in parent block");
|
|
3677
|
+
if (!(parent.expressions[index][1] === child)) {
|
|
3678
|
+
return;
|
|
3679
|
+
}
|
|
3680
|
+
return {
|
|
3681
|
+
block: parent,
|
|
3682
|
+
index,
|
|
3683
|
+
child
|
|
3684
|
+
};
|
|
3685
|
+
}
|
|
3414
3686
|
|
|
3415
3687
|
// source/parser/op.civet
|
|
3416
3688
|
var precedenceOrder = [
|
|
@@ -4672,8 +4944,9 @@ ${js}`
|
|
|
4672
4944
|
|
|
4673
4945
|
// source/parser/unary.civet
|
|
4674
4946
|
function processUnaryExpression(pre, exp, post) {
|
|
4675
|
-
if (!(pre.length || post))
|
|
4947
|
+
if (!(pre.length || post)) {
|
|
4676
4948
|
return exp;
|
|
4949
|
+
}
|
|
4677
4950
|
if (post?.token === "?") {
|
|
4678
4951
|
post = {
|
|
4679
4952
|
$loc: post.$loc,
|
|
@@ -4704,29 +4977,25 @@ ${js}`
|
|
|
4704
4977
|
}
|
|
4705
4978
|
return exp;
|
|
4706
4979
|
}
|
|
4707
|
-
if (exp
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
children: [literal, post]
|
|
4721
|
-
};
|
|
4722
|
-
}
|
|
4723
|
-
return literal;
|
|
4980
|
+
if (exp?.type === "Literal" && pre.length) {
|
|
4981
|
+
let [...ref] = pre, [last] = ref.splice(-1);
|
|
4982
|
+
let m;
|
|
4983
|
+
if (m = last?.token, m === "+" || m === "-") {
|
|
4984
|
+
last = last;
|
|
4985
|
+
exp = {
|
|
4986
|
+
...exp,
|
|
4987
|
+
children: [last, ...exp.children],
|
|
4988
|
+
raw: `${last.token}${exp.raw}`
|
|
4989
|
+
};
|
|
4990
|
+
pre = pre.slice(0, -1);
|
|
4991
|
+
if (!(pre.length || post)) {
|
|
4992
|
+
return exp;
|
|
4724
4993
|
}
|
|
4725
4994
|
}
|
|
4726
4995
|
}
|
|
4727
|
-
let
|
|
4728
|
-
while (
|
|
4729
|
-
const l =
|
|
4996
|
+
let ref1;
|
|
4997
|
+
while (ref1 = pre.length) {
|
|
4998
|
+
const l = ref1;
|
|
4730
4999
|
const last = pre[l - 1];
|
|
4731
5000
|
if (last.type === "Await") {
|
|
4732
5001
|
if (last.op) {
|
|
@@ -4739,8 +5008,8 @@ ${js}`
|
|
|
4739
5008
|
};
|
|
4740
5009
|
pre = pre.slice(0, -1);
|
|
4741
5010
|
} else {
|
|
4742
|
-
let
|
|
4743
|
-
if (
|
|
5011
|
+
let m1;
|
|
5012
|
+
if (m1 = firstNonSpace(exp), typeof m1 === "string" && /^[ \t]*\n/.test(m1) || typeof m1 === "object" && m1 != null && "token" in m1 && typeof m1.token === "string" && /^[ \t]*\n/.test(m1.token)) {
|
|
4744
5013
|
exp = parenthesizeExpression(exp);
|
|
4745
5014
|
}
|
|
4746
5015
|
exp = {
|
|
@@ -4844,6 +5113,7 @@ ${js}`
|
|
|
4844
5113
|
updateParentPointers(ref);
|
|
4845
5114
|
return makeNode({
|
|
4846
5115
|
type: "UnwrappedExpression",
|
|
5116
|
+
expression: body,
|
|
4847
5117
|
children: [skipIfOnlyWS(fn.leadingComment), body, skipIfOnlyWS(fn.trailingComment)]
|
|
4848
5118
|
});
|
|
4849
5119
|
}
|
|
@@ -4880,6 +5150,17 @@ ${js}`
|
|
|
4880
5150
|
returning
|
|
4881
5151
|
];
|
|
4882
5152
|
}
|
|
5153
|
+
case "throw": {
|
|
5154
|
+
const statement = { type: "ThrowStatement", children };
|
|
5155
|
+
return [
|
|
5156
|
+
{
|
|
5157
|
+
type: "StatementExpression",
|
|
5158
|
+
statement,
|
|
5159
|
+
children: [statement]
|
|
5160
|
+
},
|
|
5161
|
+
null
|
|
5162
|
+
];
|
|
5163
|
+
}
|
|
4883
5164
|
case "return": {
|
|
4884
5165
|
return [{
|
|
4885
5166
|
type: "ReturnStatement",
|
|
@@ -5164,25 +5445,40 @@ ${js}`
|
|
|
5164
5445
|
const infinite = typeof end === "object" && end != null && "type" in end && end.type === "Identifier" && "name" in end && end.name === "Infinity";
|
|
5165
5446
|
let stepRef, asc;
|
|
5166
5447
|
if (stepExp) {
|
|
5167
|
-
stepExp =
|
|
5448
|
+
stepExp = trimFirstSpace(stepExp);
|
|
5168
5449
|
stepRef = maybeRef(stepExp, "step");
|
|
5169
5450
|
} else if (infinite) {
|
|
5170
|
-
stepExp = stepRef =
|
|
5451
|
+
stepExp = stepRef = makeNumericLiteral(1);
|
|
5171
5452
|
} else if (increasing != null) {
|
|
5172
5453
|
if (increasing) {
|
|
5173
|
-
stepExp = stepRef =
|
|
5454
|
+
stepExp = stepRef = makeNumericLiteral(1);
|
|
5174
5455
|
asc = true;
|
|
5175
5456
|
} else {
|
|
5176
|
-
stepExp = stepRef =
|
|
5457
|
+
stepExp = stepRef = makeNumericLiteral(-1);
|
|
5177
5458
|
asc = false;
|
|
5178
5459
|
}
|
|
5179
5460
|
}
|
|
5180
5461
|
let ref2;
|
|
5462
|
+
if (stepExp?.type === "Literal") {
|
|
5463
|
+
try {
|
|
5464
|
+
ref2 = literalValue(stepExp);
|
|
5465
|
+
} catch (e) {
|
|
5466
|
+
ref2 = void 0;
|
|
5467
|
+
}
|
|
5468
|
+
} else {
|
|
5469
|
+
ref2 = void 0;
|
|
5470
|
+
}
|
|
5471
|
+
;
|
|
5472
|
+
const stepValue = ref2;
|
|
5473
|
+
if (typeof stepValue === "number") {
|
|
5474
|
+
asc = stepValue > 0;
|
|
5475
|
+
}
|
|
5476
|
+
let ref3;
|
|
5181
5477
|
if (stepRef)
|
|
5182
|
-
|
|
5478
|
+
ref3 = start;
|
|
5183
5479
|
else
|
|
5184
|
-
|
|
5185
|
-
let startRef =
|
|
5480
|
+
ref3 = maybeRef(start, "start");
|
|
5481
|
+
let startRef = ref3;
|
|
5186
5482
|
let endRef = maybeRef(end, "end");
|
|
5187
5483
|
const startRefDec = startRef !== start ? [startRef, " = ", start, ", "] : [];
|
|
5188
5484
|
const endRefDec = endRef !== end ? [endRef, " = ", end, ", "] : [];
|
|
@@ -5194,11 +5490,11 @@ ${js}`
|
|
|
5194
5490
|
];
|
|
5195
5491
|
}
|
|
5196
5492
|
let ascDec = [], ascRef;
|
|
5197
|
-
if (
|
|
5493
|
+
if (stepExp) {
|
|
5198
5494
|
if (!(stepRef === stepExp)) {
|
|
5199
5495
|
ascDec = [", ", stepRef, " = ", stepExp];
|
|
5200
5496
|
}
|
|
5201
|
-
} else if ("Literal"
|
|
5497
|
+
} else if (start?.type === "Literal" && "Literal" === end?.type) {
|
|
5202
5498
|
asc = literalValue(start) <= literalValue(end);
|
|
5203
5499
|
if ("StringLiteral" === start.subtype && start.subtype === end.subtype) {
|
|
5204
5500
|
startRef = literalValue(start).charCodeAt(0).toString();
|
|
@@ -5209,10 +5505,11 @@ ${js}`
|
|
|
5209
5505
|
ascDec = [", ", ascRef, " = ", startRef, " <= ", endRef];
|
|
5210
5506
|
}
|
|
5211
5507
|
let varAssign = [], varLetAssign = varAssign, varLet = varAssign, blockPrefix;
|
|
5212
|
-
|
|
5213
|
-
|
|
5508
|
+
let names = forDeclaration?.names;
|
|
5509
|
+
if (forDeclaration?.decl) {
|
|
5510
|
+
if (forDeclaration.decl === "let") {
|
|
5214
5511
|
const varName = forDeclaration.children.splice(1);
|
|
5215
|
-
varAssign = [...
|
|
5512
|
+
varAssign = [...trimFirstSpace(varName), " = "];
|
|
5216
5513
|
varLet = [",", ...varName, " = ", counterRef];
|
|
5217
5514
|
} else {
|
|
5218
5515
|
const value = "StringLiteral" === start.subtype ? ["String.fromCharCode(", counterRef, ")"] : counterRef;
|
|
@@ -5221,26 +5518,41 @@ ${js}`
|
|
|
5221
5518
|
];
|
|
5222
5519
|
}
|
|
5223
5520
|
} else if (forDeclaration) {
|
|
5521
|
+
assert.equal(
|
|
5522
|
+
forDeclaration.type,
|
|
5523
|
+
"AssignmentExpression",
|
|
5524
|
+
"Internal error: Coffee-style for loop must be an assignment expression"
|
|
5525
|
+
);
|
|
5224
5526
|
varAssign = varLetAssign = [forDeclaration, " = "];
|
|
5527
|
+
names = [];
|
|
5225
5528
|
}
|
|
5226
5529
|
const declaration = {
|
|
5227
5530
|
type: "Declaration",
|
|
5228
5531
|
children: ["let ", ...startRefDec, ...endRefDec, counterRef, " = ", ...varLetAssign, startRef, ...varLet, ...ascDec],
|
|
5229
|
-
names
|
|
5532
|
+
names
|
|
5230
5533
|
};
|
|
5231
5534
|
const counterPart = right.inclusive ? [counterRef, " <= ", endRef, " : ", counterRef, " >= ", endRef] : [counterRef, " < ", endRef, " : ", counterRef, " > ", endRef];
|
|
5232
|
-
const condition = infinite ? [] : asc != null ? asc ? counterPart.slice(0, 3) : counterPart.slice(4) : stepRef ? [stepRef, " !== 0 && (", stepRef, " > 0 ? ", ...counterPart, ")"] : [ascRef, " ? ", ...counterPart];
|
|
5233
|
-
const increment =
|
|
5535
|
+
const condition = infinite || stepValue === 0 ? [] : asc != null ? asc ? counterPart.slice(0, 3) : counterPart.slice(4) : stepRef ? [stepRef, " !== 0 && (", stepRef, " > 0 ? ", ...counterPart, ")"] : [ascRef, " ? ", ...counterPart];
|
|
5536
|
+
const increment = stepValue === 1 ? [...varAssign, "++", counterRef] : stepValue === -1 ? [...varAssign, "--", counterRef] : stepRef ? [...varAssign, counterRef, " += ", stepRef] : ascRef ? [...varAssign, ascRef, " ? ++", counterRef, " : --", counterRef] : [...varAssign, asc ? "++" : "--", counterRef];
|
|
5234
5537
|
return {
|
|
5235
|
-
declaration,
|
|
5538
|
+
// This declaration doesn't always appear in the output,
|
|
5539
|
+
// but it's still helpful for determining the primary loop variable
|
|
5540
|
+
declaration: forDeclaration,
|
|
5236
5541
|
children: [range.error, open, declaration, "; ", ...condition, "; ", ...increment, close],
|
|
5237
5542
|
blockPrefix
|
|
5238
5543
|
};
|
|
5239
5544
|
}
|
|
5240
|
-
function processForInOf($0
|
|
5545
|
+
function processForInOf($0) {
|
|
5241
5546
|
let [awaits, eachOwn, open, declaration, declaration2, ws, inOf, exp, step, close] = $0;
|
|
5242
5547
|
if (exp.type === "RangeExpression" && inOf.token === "of" && !declaration2) {
|
|
5243
|
-
return forRange(
|
|
5548
|
+
return forRange(
|
|
5549
|
+
open,
|
|
5550
|
+
declaration,
|
|
5551
|
+
exp,
|
|
5552
|
+
step && prepend(trimFirstSpace(step[0]), trimFirstSpace(step[2])),
|
|
5553
|
+
// omit "by" token
|
|
5554
|
+
close
|
|
5555
|
+
);
|
|
5244
5556
|
} else if (step) {
|
|
5245
5557
|
throw new Error("for..of/in cannot use 'by' except with range literals");
|
|
5246
5558
|
}
|
|
@@ -5256,22 +5568,22 @@ ${js}`
|
|
|
5256
5568
|
if (declaration2) {
|
|
5257
5569
|
const [, , ws22, decl22] = declaration2;
|
|
5258
5570
|
blockPrefix.push(["", [
|
|
5259
|
-
|
|
5571
|
+
trimFirstSpace(ws22),
|
|
5260
5572
|
decl22,
|
|
5261
5573
|
" = ",
|
|
5262
5574
|
counterRef
|
|
5263
5575
|
], ";"]);
|
|
5264
5576
|
assignmentNames.push(...decl22.names);
|
|
5265
5577
|
}
|
|
5266
|
-
const expRefDec = expRef2 !== exp ? [
|
|
5578
|
+
const expRefDec = expRef2 !== exp ? [trimFirstSpace(expRef2), " = ", trimFirstSpace(exp), ", "] : [];
|
|
5267
5579
|
blockPrefix.push(["", {
|
|
5268
5580
|
type: "Declaration",
|
|
5269
|
-
children: [declaration, " = ",
|
|
5581
|
+
children: [declaration, " = ", trimFirstSpace(expRef2), "[", counterRef, "]"],
|
|
5270
5582
|
names: assignmentNames
|
|
5271
5583
|
}, ";"]);
|
|
5272
5584
|
declaration = {
|
|
5273
5585
|
type: "Declaration",
|
|
5274
|
-
children: ["let ", ...expRefDec, counterRef, " = 0, ", lenRef, " = ",
|
|
5586
|
+
children: ["let ", ...expRefDec, counterRef, " = 0, ", lenRef, " = ", trimFirstSpace(expRef2), ".length"],
|
|
5275
5587
|
names: []
|
|
5276
5588
|
};
|
|
5277
5589
|
const condition = [counterRef, " < ", lenRef, "; "];
|
|
@@ -5319,7 +5631,7 @@ ${js}`
|
|
|
5319
5631
|
return {
|
|
5320
5632
|
declaration,
|
|
5321
5633
|
blockPrefix,
|
|
5322
|
-
children: [awaits, eachOwnError, open, declaration, ws, inOf, expRef ?? exp,
|
|
5634
|
+
children: [awaits, eachOwnError, open, declaration, ws, inOf, expRef ?? exp, close]
|
|
5323
5635
|
// omit declaration2, replace eachOwn with eachOwnError, replace exp with expRef
|
|
5324
5636
|
};
|
|
5325
5637
|
}
|
|
@@ -5336,7 +5648,7 @@ ${js}`
|
|
|
5336
5648
|
};
|
|
5337
5649
|
blockPrefix.push(["", {
|
|
5338
5650
|
type: "Declaration",
|
|
5339
|
-
children: [
|
|
5651
|
+
children: [trimFirstSpace(ws2), decl2, " = ", counterRef, "++"],
|
|
5340
5652
|
names: decl2.names
|
|
5341
5653
|
}, ";"]);
|
|
5342
5654
|
break;
|
|
@@ -5355,13 +5667,13 @@ ${js}`
|
|
|
5355
5667
|
};
|
|
5356
5668
|
}
|
|
5357
5669
|
if (own) {
|
|
5358
|
-
const hasPropRef =
|
|
5359
|
-
blockPrefix.push(["", ["if (!", hasPropRef, "(",
|
|
5670
|
+
const hasPropRef = getHelperRef("hasProp");
|
|
5671
|
+
blockPrefix.push(["", ["if (!", hasPropRef, "(", trimFirstSpace(expRef2), ", ", trimFirstSpace(pattern), ")) continue"], ";"]);
|
|
5360
5672
|
}
|
|
5361
5673
|
if (decl2) {
|
|
5362
5674
|
blockPrefix.push(["", {
|
|
5363
5675
|
type: "Declaration",
|
|
5364
|
-
children: [
|
|
5676
|
+
children: [trimFirstSpace(ws2), decl2, " = ", trimFirstSpace(expRef2), "[", trimFirstSpace(pattern), "]"],
|
|
5365
5677
|
names: decl2.names
|
|
5366
5678
|
}, ";"]);
|
|
5367
5679
|
}
|
|
@@ -5374,7 +5686,7 @@ ${js}`
|
|
|
5374
5686
|
}
|
|
5375
5687
|
return {
|
|
5376
5688
|
declaration,
|
|
5377
|
-
children: [awaits, eachOwnError, open, declaration, ws, inOf, exp,
|
|
5689
|
+
children: [awaits, eachOwnError, open, declaration, ws, inOf, exp, close],
|
|
5378
5690
|
// omit declaration2, replace each with eachOwnError
|
|
5379
5691
|
blockPrefix,
|
|
5380
5692
|
hoistDec
|
|
@@ -5507,7 +5819,7 @@ ${js}`
|
|
|
5507
5819
|
return createVarDecs(block2, scopes, pushVar);
|
|
5508
5820
|
});
|
|
5509
5821
|
forNodes.forEach(({ block: block2, declaration }) => {
|
|
5510
|
-
scopes.push(new Set(declaration
|
|
5822
|
+
scopes.push(new Set(declaration?.names));
|
|
5511
5823
|
createVarDecs(block2, scopes, pushVar);
|
|
5512
5824
|
return scopes.pop();
|
|
5513
5825
|
});
|
|
@@ -6471,8 +6783,8 @@ ${js}`
|
|
|
6471
6783
|
tail.push(...splices.map((s) => [", ", s]), ...thisAssignments.map((a) => [", ", a]));
|
|
6472
6784
|
}
|
|
6473
6785
|
function processAssignments(statements) {
|
|
6474
|
-
gatherRecursiveAll(statements, (
|
|
6475
|
-
function
|
|
6786
|
+
for (let ref6 = gatherRecursiveAll(statements, ($3) => $3.type === "AssignmentExpression" || $3.type === "UpdateExpression"), i5 = 0, len4 = ref6.length; i5 < len4; i5++) {
|
|
6787
|
+
let extractAssignment2 = function(lhs) {
|
|
6476
6788
|
let expr = lhs;
|
|
6477
6789
|
while (expr.type === "ParenthesizedExpression") {
|
|
6478
6790
|
expr = expr.expression;
|
|
@@ -6490,17 +6802,20 @@ ${js}`
|
|
|
6490
6802
|
}
|
|
6491
6803
|
;
|
|
6492
6804
|
return;
|
|
6493
|
-
}
|
|
6805
|
+
};
|
|
6806
|
+
var extractAssignment = extractAssignment2;
|
|
6807
|
+
const exp = ref6[i5];
|
|
6494
6808
|
const pre = [], post = [];
|
|
6495
|
-
let
|
|
6809
|
+
let ref7;
|
|
6496
6810
|
switch (exp.type) {
|
|
6497
6811
|
case "AssignmentExpression": {
|
|
6498
|
-
if (!exp.lhs)
|
|
6499
|
-
|
|
6812
|
+
if (!exp.lhs) {
|
|
6813
|
+
continue;
|
|
6814
|
+
}
|
|
6500
6815
|
exp.lhs.forEach((lhsPart, i) => {
|
|
6501
|
-
let
|
|
6502
|
-
if (
|
|
6503
|
-
const newLhs =
|
|
6816
|
+
let ref8;
|
|
6817
|
+
if (ref8 = extractAssignment2(lhsPart[1])) {
|
|
6818
|
+
const newLhs = ref8;
|
|
6504
6819
|
return lhsPart[1] = newLhs;
|
|
6505
6820
|
}
|
|
6506
6821
|
;
|
|
@@ -6509,8 +6824,8 @@ ${js}`
|
|
|
6509
6824
|
break;
|
|
6510
6825
|
}
|
|
6511
6826
|
case "UpdateExpression": {
|
|
6512
|
-
if (
|
|
6513
|
-
const newLhs =
|
|
6827
|
+
if (ref7 = extractAssignment2(exp.assigned)) {
|
|
6828
|
+
const newLhs = ref7;
|
|
6514
6829
|
const i = exp.children.indexOf(exp.assigned);
|
|
6515
6830
|
exp.assigned = exp.children[i] = newLhs;
|
|
6516
6831
|
}
|
|
@@ -6518,15 +6833,17 @@ ${js}`
|
|
|
6518
6833
|
break;
|
|
6519
6834
|
}
|
|
6520
6835
|
}
|
|
6521
|
-
if (pre.length)
|
|
6836
|
+
if (pre.length) {
|
|
6522
6837
|
exp.children.unshift(...pre);
|
|
6523
|
-
|
|
6838
|
+
}
|
|
6839
|
+
if (post.length) {
|
|
6524
6840
|
exp.children.push(...post);
|
|
6841
|
+
}
|
|
6525
6842
|
if (exp.type === "UpdateExpression") {
|
|
6526
6843
|
const { assigned } = exp;
|
|
6527
6844
|
const ref = makeRef();
|
|
6528
6845
|
const newMemberExp = unchainOptionalMemberExpression(assigned, ref, (children) => {
|
|
6529
|
-
return exp.children.map(($
|
|
6846
|
+
return exp.children.map(($4) => $4 === assigned ? children : $4);
|
|
6530
6847
|
});
|
|
6531
6848
|
if (newMemberExp !== assigned) {
|
|
6532
6849
|
if (newMemberExp.usesRef) {
|
|
@@ -6536,169 +6853,163 @@ ${js}`
|
|
|
6536
6853
|
names: []
|
|
6537
6854
|
};
|
|
6538
6855
|
}
|
|
6539
|
-
|
|
6856
|
+
replaceNode(exp, newMemberExp);
|
|
6540
6857
|
}
|
|
6541
|
-
;
|
|
6542
|
-
return;
|
|
6543
6858
|
}
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
block = void 0;
|
|
6566
|
-
}
|
|
6859
|
+
}
|
|
6860
|
+
for (let ref9 = gatherRecursiveAll(statements, ($5) => $5.type === "AssignmentExpression"), i6 = 0, len5 = ref9.length; i6 < len5; i6++) {
|
|
6861
|
+
const exp = ref9[i6];
|
|
6862
|
+
if (!(exp.names === null)) {
|
|
6863
|
+
continue;
|
|
6864
|
+
}
|
|
6865
|
+
let { lhs: $1, expression: $2 } = exp, tail = [], len3 = $1.length;
|
|
6866
|
+
let block;
|
|
6867
|
+
let ref10;
|
|
6868
|
+
if (exp.parent?.type === "BlockStatement" && !(ref10 = $1[$1.length - 1])?.[ref10.length - 1]?.special) {
|
|
6869
|
+
block = makeBlockFragment();
|
|
6870
|
+
let ref11;
|
|
6871
|
+
if (ref11 = prependStatementExpressionBlock(
|
|
6872
|
+
{ type: "Initializer", expression: $2, children: [void 0, void 0, $2] },
|
|
6873
|
+
block
|
|
6874
|
+
)) {
|
|
6875
|
+
const ref = ref11;
|
|
6876
|
+
exp.children = exp.children.map(($6) => $6 === $2 ? ref : $6);
|
|
6877
|
+
$2 = ref;
|
|
6878
|
+
} else {
|
|
6879
|
+
block = void 0;
|
|
6567
6880
|
}
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
exp
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
)
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6881
|
+
}
|
|
6882
|
+
let ref12;
|
|
6883
|
+
if ($1.some(($7) => (ref12 = $7)[ref12.length - 1].special)) {
|
|
6884
|
+
if ($1.length !== 1)
|
|
6885
|
+
throw new Error("Only one assignment with id= is allowed");
|
|
6886
|
+
const [, lhs, , op] = $1[0];
|
|
6887
|
+
const { call, omitLhs } = op;
|
|
6888
|
+
const index = exp.children.indexOf($2);
|
|
6889
|
+
if (index < 0)
|
|
6890
|
+
throw new Error("Assertion error: exp not in AssignmentExpression");
|
|
6891
|
+
exp.children.splice(
|
|
6892
|
+
index,
|
|
6893
|
+
1,
|
|
6894
|
+
exp.expression = $2 = [call, "(", lhs, ", ", $2, ")"]
|
|
6895
|
+
);
|
|
6896
|
+
if (omitLhs) {
|
|
6897
|
+
replaceNode(exp, $2);
|
|
6898
|
+
continue;
|
|
6585
6899
|
}
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6900
|
+
}
|
|
6901
|
+
let wrapped = false;
|
|
6902
|
+
let i = 0;
|
|
6903
|
+
while (i < len3) {
|
|
6904
|
+
const lastAssignment = $1[i++];
|
|
6905
|
+
const [, lhs, , op] = lastAssignment;
|
|
6906
|
+
if (!(op.token === "=")) {
|
|
6907
|
+
continue;
|
|
6908
|
+
}
|
|
6909
|
+
let m2;
|
|
6910
|
+
if (m2 = lhs.type, m2 === "ObjectExpression" || m2 === "ObjectBindingPattern") {
|
|
6911
|
+
if (!wrapped) {
|
|
6912
|
+
wrapped = true;
|
|
6913
|
+
lhs.children.splice(0, 0, "(");
|
|
6914
|
+
tail.push(")");
|
|
6601
6915
|
}
|
|
6602
6916
|
}
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6917
|
+
}
|
|
6918
|
+
const refsToDeclare = /* @__PURE__ */ new Set();
|
|
6919
|
+
i = len3 - 1;
|
|
6920
|
+
while (i >= 0) {
|
|
6921
|
+
const lastAssignment = $1[i];
|
|
6922
|
+
if (lastAssignment[3].token === "=") {
|
|
6923
|
+
const lhs = lastAssignment[1];
|
|
6924
|
+
let m3;
|
|
6925
|
+
if (lhs.type === "MemberExpression") {
|
|
6926
|
+
const members = lhs.children;
|
|
6927
|
+
const lastMember = members[members.length - 1];
|
|
6928
|
+
if (typeof lastMember === "object" && lastMember != null && "type" in lastMember && lastMember.type === "CallExpression" && "children" in lastMember && Array.isArray(lastMember.children) && lastMember.children.length >= 1 && lastMember.children[0] === peekHelperRef("rslice")) {
|
|
6929
|
+
lastMember.children.push({
|
|
6930
|
+
type: "Error",
|
|
6931
|
+
message: "Slice range cannot be decreasing in assignment"
|
|
6932
|
+
});
|
|
6933
|
+
break;
|
|
6934
|
+
}
|
|
6935
|
+
if (lastMember.type === "SliceExpression") {
|
|
6936
|
+
const { start, end, children: c } = lastMember;
|
|
6937
|
+
c[0].token = ".splice(";
|
|
6938
|
+
c[1] = start;
|
|
6939
|
+
c[2] = ", ";
|
|
6940
|
+
if (end) {
|
|
6941
|
+
c[3] = [end, " - ", start];
|
|
6942
|
+
} else {
|
|
6943
|
+
c[3] = ["1/0"];
|
|
6619
6944
|
}
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
c[2] = ", ";
|
|
6625
|
-
if (end) {
|
|
6626
|
-
c[3] = [end, " - ", start];
|
|
6627
|
-
} else {
|
|
6628
|
-
c[3] = ["1/0"];
|
|
6629
|
-
}
|
|
6630
|
-
c[4] = [", ...", $2];
|
|
6631
|
-
c[5] = ")";
|
|
6945
|
+
c[4] = [", ...", $2];
|
|
6946
|
+
c[5] = ")";
|
|
6947
|
+
lastAssignment.pop();
|
|
6948
|
+
if (isWhitespaceOrEmpty(lastAssignment[2]))
|
|
6632
6949
|
lastAssignment.pop();
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
if ($1.length > 1) {
|
|
6636
|
-
throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
|
|
6637
|
-
}
|
|
6638
|
-
exp.children = [$1];
|
|
6639
|
-
exp.names = [];
|
|
6640
|
-
break;
|
|
6950
|
+
if ($1.length > 1) {
|
|
6951
|
+
throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
|
|
6641
6952
|
}
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6953
|
+
exp.children = [$1];
|
|
6954
|
+
exp.names = [];
|
|
6955
|
+
break;
|
|
6645
6956
|
}
|
|
6957
|
+
} else if (m3 = lhs.type, m3 === "ObjectBindingPattern" || m3 === "ArrayBindingPattern") {
|
|
6958
|
+
processBindingPatternLHS(lhs, tail);
|
|
6959
|
+
gatherRecursiveAll(lhs, ($8) => $8.type === "Ref").forEach(refsToDeclare.add.bind(refsToDeclare));
|
|
6646
6960
|
}
|
|
6647
|
-
i--;
|
|
6648
6961
|
}
|
|
6649
|
-
i
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
newMemberExp.parent = exp;
|
|
6670
|
-
$2 = newMemberExp;
|
|
6962
|
+
i--;
|
|
6963
|
+
}
|
|
6964
|
+
i = len3 - 1;
|
|
6965
|
+
const optionalChainRef = makeRef();
|
|
6966
|
+
while (i >= 0) {
|
|
6967
|
+
const assignment = $1[i];
|
|
6968
|
+
const [ws1, lhs, ws2, op] = assignment;
|
|
6969
|
+
if (lhs.type === "MemberExpression" || lhs.type === "CallExpression") {
|
|
6970
|
+
const newMemberExp = unchainOptionalMemberExpression(lhs, optionalChainRef, (children) => {
|
|
6971
|
+
const assigns = $1.splice(i + 1, len3 - 1 - i);
|
|
6972
|
+
$1.pop();
|
|
6973
|
+
return [ws1, ...children, ws2, op, ...assigns, $2];
|
|
6974
|
+
});
|
|
6975
|
+
if (newMemberExp !== lhs) {
|
|
6976
|
+
if (newMemberExp.usesRef) {
|
|
6977
|
+
exp.hoistDec = {
|
|
6978
|
+
type: "Declaration",
|
|
6979
|
+
children: ["let ", optionalChainRef],
|
|
6980
|
+
names: []
|
|
6981
|
+
};
|
|
6671
6982
|
}
|
|
6983
|
+
replaceNode($2, newMemberExp);
|
|
6984
|
+
$2 = newMemberExp;
|
|
6672
6985
|
}
|
|
6673
|
-
i--;
|
|
6674
|
-
}
|
|
6675
|
-
if (refsToDeclare.size) {
|
|
6676
|
-
if (exp.hoistDec) {
|
|
6677
|
-
exp.hoistDec.children.push([...refsToDeclare].map(($7) => [",", $7]));
|
|
6678
|
-
} else {
|
|
6679
|
-
exp.hoistDec = {
|
|
6680
|
-
type: "Declaration",
|
|
6681
|
-
children: ["let ", [...refsToDeclare].map((r, i2) => i2 ? [",", r] : r)],
|
|
6682
|
-
names: []
|
|
6683
|
-
};
|
|
6684
|
-
}
|
|
6685
|
-
}
|
|
6686
|
-
exp.names = $1.flatMap(([, l]) => l.names || []);
|
|
6687
|
-
if (tail.length) {
|
|
6688
|
-
const index = exp.children.indexOf($2);
|
|
6689
|
-
if (index < 0)
|
|
6690
|
-
throw new Error("Assertion error: exp not in AssignmentExpression");
|
|
6691
|
-
exp.children.splice(index + 1, 0, ...tail);
|
|
6692
6986
|
}
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6987
|
+
i--;
|
|
6988
|
+
}
|
|
6989
|
+
if (refsToDeclare.size) {
|
|
6990
|
+
if (exp.hoistDec) {
|
|
6991
|
+
exp.hoistDec.children.push([...refsToDeclare].map(($9) => [",", $9]));
|
|
6992
|
+
} else {
|
|
6993
|
+
exp.hoistDec = {
|
|
6994
|
+
type: "Declaration",
|
|
6995
|
+
children: ["let ", [...refsToDeclare].map((r, i2) => i2 ? [",", r] : r)],
|
|
6996
|
+
names: []
|
|
6997
|
+
};
|
|
6698
6998
|
}
|
|
6699
|
-
return exp;
|
|
6700
6999
|
}
|
|
6701
|
-
|
|
7000
|
+
exp.names = $1.flatMap(([, l]) => l.names || []);
|
|
7001
|
+
if (tail.length) {
|
|
7002
|
+
const index = exp.children.indexOf($2);
|
|
7003
|
+
if (index < 0)
|
|
7004
|
+
throw new Error("Assertion error: exp not in AssignmentExpression");
|
|
7005
|
+
exp.children.splice(index + 1, 0, ...tail);
|
|
7006
|
+
}
|
|
7007
|
+
if (block) {
|
|
7008
|
+
replaceNode(exp, block);
|
|
7009
|
+
block.expressions.push(["", exp]);
|
|
7010
|
+
exp.parent = block;
|
|
7011
|
+
}
|
|
7012
|
+
}
|
|
6702
7013
|
}
|
|
6703
7014
|
function unchainOptionalMemberExpression(exp, ref, innerExp) {
|
|
6704
7015
|
let j = 0;
|
|
@@ -6748,9 +7059,9 @@ ${js}`
|
|
|
6748
7059
|
}
|
|
6749
7060
|
j++;
|
|
6750
7061
|
}
|
|
6751
|
-
let
|
|
6752
|
-
if (
|
|
6753
|
-
const l =
|
|
7062
|
+
let ref13;
|
|
7063
|
+
if (ref13 = conditions.length) {
|
|
7064
|
+
const l = ref13;
|
|
6754
7065
|
const cs = flatJoin(conditions, " && ");
|
|
6755
7066
|
return {
|
|
6756
7067
|
...exp,
|
|
@@ -6789,28 +7100,28 @@ ${js}`
|
|
|
6789
7100
|
if (!unary.suffix.length) {
|
|
6790
7101
|
return;
|
|
6791
7102
|
}
|
|
6792
|
-
let
|
|
7103
|
+
let ref14;
|
|
6793
7104
|
let m4;
|
|
6794
|
-
if (m4 = (
|
|
7105
|
+
if (m4 = (ref14 = unary.suffix)[ref14.length - 1], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
|
|
6795
7106
|
const { token } = m4;
|
|
6796
7107
|
let last;
|
|
6797
7108
|
let count = 0;
|
|
6798
|
-
let
|
|
6799
|
-
while (unary.suffix.length && (
|
|
7109
|
+
let ref15;
|
|
7110
|
+
while (unary.suffix.length && (ref15 = unary.suffix)[ref15.length - 1]?.token === "?") {
|
|
6800
7111
|
last = unary.suffix.pop();
|
|
6801
7112
|
count++;
|
|
6802
7113
|
}
|
|
6803
|
-
let
|
|
6804
|
-
while (unary.suffix.length && (
|
|
7114
|
+
let ref16;
|
|
7115
|
+
while (unary.suffix.length && (ref16 = unary.suffix)[ref16.length - 1]?.type === "NonNullAssertion") {
|
|
6805
7116
|
unary.suffix.pop();
|
|
6806
7117
|
}
|
|
6807
|
-
let
|
|
7118
|
+
let ref17;
|
|
6808
7119
|
if (unary.suffix.length || unary.prefix.length)
|
|
6809
|
-
|
|
7120
|
+
ref17 = unary;
|
|
6810
7121
|
else
|
|
6811
|
-
|
|
6812
|
-
const t =
|
|
6813
|
-
if (unary.parent?.type === "
|
|
7122
|
+
ref17 = unary.t;
|
|
7123
|
+
const t = ref17;
|
|
7124
|
+
if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
|
|
6814
7125
|
if (count === 1) {
|
|
6815
7126
|
unary.suffix.push(last);
|
|
6816
7127
|
return;
|
|
@@ -6837,12 +7148,12 @@ ${js}`
|
|
|
6837
7148
|
}
|
|
6838
7149
|
} else if (typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "NonNullAssertion") {
|
|
6839
7150
|
const { type } = m4;
|
|
6840
|
-
let
|
|
6841
|
-
while (unary.suffix.length && (
|
|
7151
|
+
let ref18;
|
|
7152
|
+
while (unary.suffix.length && (ref18 = unary.suffix)[ref18.length - 1]?.type === "NonNullAssertion") {
|
|
6842
7153
|
unary.suffix.pop();
|
|
6843
7154
|
}
|
|
6844
|
-
let
|
|
6845
|
-
while (unary.suffix.length && (
|
|
7155
|
+
let ref19;
|
|
7156
|
+
while (unary.suffix.length && (ref19 = unary.suffix)[ref19.length - 1]?.token === "?") {
|
|
6846
7157
|
unary.suffix.pop();
|
|
6847
7158
|
}
|
|
6848
7159
|
const t = trimFirstSpace(
|
|
@@ -6868,35 +7179,41 @@ ${js}`
|
|
|
6868
7179
|
});
|
|
6869
7180
|
}
|
|
6870
7181
|
function processStatementExpressions(statements) {
|
|
6871
|
-
gatherRecursiveAll(statements, ($
|
|
6872
|
-
const exp =
|
|
6873
|
-
const { statement } = exp;
|
|
6874
|
-
|
|
7182
|
+
for (let ref20 = gatherRecursiveAll(statements, ($10) => $10.type === "StatementExpression"), i7 = 0, len6 = ref20.length; i7 < len6; i7++) {
|
|
7183
|
+
const exp = ref20[i7];
|
|
7184
|
+
const { maybe, statement } = exp;
|
|
7185
|
+
if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
|
|
7186
|
+
replaceNode(exp, statement);
|
|
7187
|
+
continue;
|
|
7188
|
+
}
|
|
7189
|
+
let ref21;
|
|
6875
7190
|
switch (statement.type) {
|
|
6876
7191
|
case "IfStatement": {
|
|
6877
|
-
if (
|
|
6878
|
-
const expression =
|
|
6879
|
-
|
|
7192
|
+
if (ref21 = expressionizeIfStatement(statement)) {
|
|
7193
|
+
const expression = ref21;
|
|
7194
|
+
replaceNode(statement, expression, exp);
|
|
6880
7195
|
} else {
|
|
6881
|
-
|
|
7196
|
+
replaceNode(statement, wrapIIFE([["", statement]]), exp);
|
|
6882
7197
|
}
|
|
7198
|
+
;
|
|
7199
|
+
break;
|
|
6883
7200
|
}
|
|
6884
7201
|
case "IterationExpression": {
|
|
6885
7202
|
if (statement.subtype === "ComptimeStatement") {
|
|
6886
|
-
|
|
7203
|
+
replaceNode(
|
|
6887
7204
|
statement,
|
|
6888
7205
|
expressionizeComptime(statement.statement),
|
|
6889
7206
|
exp
|
|
6890
7207
|
);
|
|
6891
7208
|
}
|
|
6892
7209
|
;
|
|
6893
|
-
|
|
7210
|
+
break;
|
|
6894
7211
|
}
|
|
6895
7212
|
default: {
|
|
6896
|
-
|
|
7213
|
+
replaceNode(statement, wrapIIFE([["", statement]]), exp);
|
|
6897
7214
|
}
|
|
6898
7215
|
}
|
|
6899
|
-
}
|
|
7216
|
+
}
|
|
6900
7217
|
}
|
|
6901
7218
|
function processNegativeIndexAccess(statements) {
|
|
6902
7219
|
gatherRecursiveAll(statements, (n) => n.type === "NegativeIndex").forEach((exp) => {
|
|
@@ -6944,7 +7261,7 @@ ${js}`
|
|
|
6944
7261
|
if (config2.iife || config2.repl) {
|
|
6945
7262
|
rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
|
|
6946
7263
|
const newExpressions = [["", rootIIFE]];
|
|
6947
|
-
root.children = root.children.map(($
|
|
7264
|
+
root.children = root.children.map(($11) => $11 === root.expressions ? newExpressions : $11);
|
|
6948
7265
|
root.expressions = newExpressions;
|
|
6949
7266
|
}
|
|
6950
7267
|
addParentPointers(root);
|
|
@@ -6958,7 +7275,7 @@ ${js}`
|
|
|
6958
7275
|
processAssignments(statements);
|
|
6959
7276
|
processStatementExpressions(statements);
|
|
6960
7277
|
processPatternMatching(statements);
|
|
6961
|
-
|
|
7278
|
+
processIterationExpressions(statements);
|
|
6962
7279
|
hoistRefDecs(statements);
|
|
6963
7280
|
processFunctions(statements, config2);
|
|
6964
7281
|
statements.unshift(...state2.prelude);
|
|
@@ -6984,17 +7301,17 @@ ${js}`
|
|
|
6984
7301
|
await processComptime(statements);
|
|
6985
7302
|
}
|
|
6986
7303
|
function processRepl(root, rootIIFE) {
|
|
6987
|
-
const topBlock = gatherRecursive(rootIIFE, ($
|
|
7304
|
+
const topBlock = gatherRecursive(rootIIFE, ($12) => $12.type === "BlockStatement")[0];
|
|
6988
7305
|
let i = 0;
|
|
6989
|
-
for (let
|
|
6990
|
-
const decl =
|
|
7306
|
+
for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($13) => $13.type === "Declaration"), i8 = 0, len7 = ref22.length; i8 < len7; i8++) {
|
|
7307
|
+
const decl = ref22[i8];
|
|
6991
7308
|
if (decl.parent === topBlock || decl.decl === "var") {
|
|
6992
7309
|
decl.children.shift();
|
|
6993
7310
|
root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")};`]);
|
|
6994
7311
|
}
|
|
6995
7312
|
}
|
|
6996
|
-
for (let
|
|
6997
|
-
const func =
|
|
7313
|
+
for (let ref23 = gatherRecursive(topBlock, ($14) => $14.type === "FunctionExpression"), i9 = 0, len8 = ref23.length; i9 < len8; i9++) {
|
|
7314
|
+
const func = ref23[i9];
|
|
6998
7315
|
if (func.name && func.parent?.type === "BlockStatement") {
|
|
6999
7316
|
if (func.parent === topBlock) {
|
|
7000
7317
|
replaceNode(func, void 0);
|
|
@@ -7006,8 +7323,8 @@ ${js}`
|
|
|
7006
7323
|
}
|
|
7007
7324
|
}
|
|
7008
7325
|
}
|
|
7009
|
-
for (let
|
|
7010
|
-
const classExp =
|
|
7326
|
+
for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($15) => $15.type === "ClassExpression"), i10 = 0, len9 = ref24.length; i10 < len9; i10++) {
|
|
7327
|
+
const classExp = ref24[i10];
|
|
7011
7328
|
let m5;
|
|
7012
7329
|
if (classExp.name && classExp.parent === topBlock || (m5 = classExp.parent, typeof m5 === "object" && m5 != null && "type" in m5 && m5.type === "ReturnStatement" && "parent" in m5 && m5.parent === topBlock)) {
|
|
7013
7330
|
classExp.children.unshift(classExp.name, "=");
|
|
@@ -7016,7 +7333,7 @@ ${js}`
|
|
|
7016
7333
|
}
|
|
7017
7334
|
}
|
|
7018
7335
|
function populateRefs(statements) {
|
|
7019
|
-
const refNodes = gatherRecursive(statements, ($
|
|
7336
|
+
const refNodes = gatherRecursive(statements, ($16) => $16.type === "Ref");
|
|
7020
7337
|
if (refNodes.length) {
|
|
7021
7338
|
const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
|
|
7022
7339
|
const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
|
|
@@ -7039,13 +7356,14 @@ ${js}`
|
|
|
7039
7356
|
function processPlaceholders(statements) {
|
|
7040
7357
|
const placeholderMap = /* @__PURE__ */ new Map();
|
|
7041
7358
|
const liftedIfs = /* @__PURE__ */ new Set();
|
|
7042
|
-
gatherRecursiveAll(statements, ($
|
|
7359
|
+
gatherRecursiveAll(statements, ($17) => $17.type === "Placeholder").forEach((_exp) => {
|
|
7043
7360
|
const exp = _exp;
|
|
7044
7361
|
let ancestor;
|
|
7045
7362
|
if (exp.subtype === ".") {
|
|
7046
|
-
({ ancestor } = findAncestor(exp, ($
|
|
7363
|
+
({ ancestor } = findAncestor(exp, ($18) => $18.type === "Call"));
|
|
7047
7364
|
ancestor = ancestor?.parent;
|
|
7048
|
-
|
|
7365
|
+
let m6;
|
|
7366
|
+
while (ancestor?.parent != null && (m6 = ancestor.parent.type, m6 === "UnaryExpression" || m6 === "NewExpression" || m6 === "AwaitExpression" || m6 === "ThrowStatement" || m6 === "StatementExpression")) {
|
|
7049
7367
|
ancestor = ancestor.parent;
|
|
7050
7368
|
}
|
|
7051
7369
|
if (!ancestor) {
|
|
@@ -7062,10 +7380,10 @@ ${js}`
|
|
|
7062
7380
|
if (type === "IfStatement") {
|
|
7063
7381
|
liftedIfs.add(ancestor2);
|
|
7064
7382
|
}
|
|
7065
|
-
let m6;
|
|
7066
7383
|
let m7;
|
|
7384
|
+
let m8;
|
|
7067
7385
|
return type === "Call" || // Block, except for if/else blocks when condition already lifted
|
|
7068
|
-
type === "BlockStatement" && !((
|
|
7386
|
+
type === "BlockStatement" && !((m7 = ancestor2.parent, typeof m7 === "object" && m7 != null && "type" in m7 && m7.type === "IfStatement") && liftedIfs.has(ancestor2.parent)) && !((m8 = ancestor2.parent, typeof m8 === "object" && m8 != null && "type" in m8 && m8.type === "ElseClause" && "parent" in m8 && typeof m8.parent === "object" && m8.parent != null && "type" in m8.parent && m8.parent.type === "IfStatement") && liftedIfs.has(ancestor2.parent.parent)) || type === "PipelineExpression" || // Declaration
|
|
7069
7387
|
type === "Initializer" || // Right-hand side of assignment
|
|
7070
7388
|
type === "AssignmentExpression" && findChildIndex(ancestor2, child2) === ancestor2.children.indexOf(ancestor2.expression) || type === "ReturnStatement" || type === "YieldExpression";
|
|
7071
7389
|
}));
|
|
@@ -7141,11 +7459,11 @@ ${js}`
|
|
|
7141
7459
|
for (const [ancestor, placeholders] of placeholderMap) {
|
|
7142
7460
|
let ref = makeRef("$");
|
|
7143
7461
|
let typeSuffix;
|
|
7144
|
-
for (let
|
|
7145
|
-
const placeholder = placeholders[
|
|
7462
|
+
for (let i11 = 0, len10 = placeholders.length; i11 < len10; i11++) {
|
|
7463
|
+
const placeholder = placeholders[i11];
|
|
7146
7464
|
typeSuffix ??= placeholder.typeSuffix;
|
|
7147
|
-
let
|
|
7148
|
-
replaceNode((
|
|
7465
|
+
let ref25;
|
|
7466
|
+
replaceNode((ref25 = placeholder.children)[ref25.length - 1], ref);
|
|
7149
7467
|
}
|
|
7150
7468
|
const { parent } = ancestor;
|
|
7151
7469
|
const body = maybeUnwrap(ancestor);
|
|
@@ -7166,16 +7484,16 @@ ${js}`
|
|
|
7166
7484
|
}
|
|
7167
7485
|
case "PipelineExpression": {
|
|
7168
7486
|
const i = findChildIndex(parent, ancestor);
|
|
7169
|
-
let
|
|
7487
|
+
let ref26;
|
|
7170
7488
|
if (i === 1) {
|
|
7171
|
-
|
|
7489
|
+
ref26 = ancestor === parent.children[i];
|
|
7172
7490
|
} else if (i === 2) {
|
|
7173
|
-
|
|
7491
|
+
ref26 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
|
|
7174
7492
|
} else {
|
|
7175
|
-
|
|
7493
|
+
ref26 = void 0;
|
|
7176
7494
|
}
|
|
7177
7495
|
;
|
|
7178
|
-
outer =
|
|
7496
|
+
outer = ref26;
|
|
7179
7497
|
break;
|
|
7180
7498
|
}
|
|
7181
7499
|
case "AssignmentExpression":
|
|
@@ -7190,9 +7508,9 @@ ${js}`
|
|
|
7190
7508
|
fnExp = makeLeftHandSideExpression(fnExp);
|
|
7191
7509
|
}
|
|
7192
7510
|
replaceNode(ancestor, fnExp, parent);
|
|
7193
|
-
let
|
|
7194
|
-
if (
|
|
7195
|
-
const ws =
|
|
7511
|
+
let ref27;
|
|
7512
|
+
if (ref27 = getTrimmingSpace(body)) {
|
|
7513
|
+
const ws = ref27;
|
|
7196
7514
|
inplaceInsertTrimmingSpace(body, "");
|
|
7197
7515
|
inplacePrepend(ws, fnExp);
|
|
7198
7516
|
}
|
|
@@ -7237,8 +7555,8 @@ ${js}`
|
|
|
7237
7555
|
}
|
|
7238
7556
|
];
|
|
7239
7557
|
}
|
|
7240
|
-
let
|
|
7241
|
-
if (Array.isArray(rest.delim) && (
|
|
7558
|
+
let ref28;
|
|
7559
|
+
if (Array.isArray(rest.delim) && (ref28 = rest.delim)[ref28.length - 1]?.token === ",") {
|
|
7242
7560
|
rest.delim = rest.delim.slice(0, -1);
|
|
7243
7561
|
rest.children = [...rest.children.slice(0, -1), rest.delim];
|
|
7244
7562
|
}
|
|
@@ -7263,9 +7581,9 @@ ${js}`
|
|
|
7263
7581
|
return root;
|
|
7264
7582
|
}
|
|
7265
7583
|
}
|
|
7266
|
-
for (let
|
|
7267
|
-
const i =
|
|
7268
|
-
const node = array[
|
|
7584
|
+
for (let i12 = 0, len11 = array.length; i12 < len11; i12++) {
|
|
7585
|
+
const i = i12;
|
|
7586
|
+
const node = array[i12];
|
|
7269
7587
|
if (!(node != null)) {
|
|
7270
7588
|
return;
|
|
7271
7589
|
}
|
|
@@ -7277,34 +7595,6 @@ ${js}`
|
|
|
7277
7595
|
}
|
|
7278
7596
|
return root;
|
|
7279
7597
|
}
|
|
7280
|
-
function replaceNodesRecursive(root, predicate, replacer) {
|
|
7281
|
-
if (!(root != null)) {
|
|
7282
|
-
return root;
|
|
7283
|
-
}
|
|
7284
|
-
const array = Array.isArray(root) ? root : root.children;
|
|
7285
|
-
if (!array) {
|
|
7286
|
-
if (predicate(root)) {
|
|
7287
|
-
return replacer(root, root);
|
|
7288
|
-
} else {
|
|
7289
|
-
return root;
|
|
7290
|
-
}
|
|
7291
|
-
}
|
|
7292
|
-
for (let i10 = 0, len9 = array.length; i10 < len9; i10++) {
|
|
7293
|
-
const i = i10;
|
|
7294
|
-
const node = array[i10];
|
|
7295
|
-
if (!(node != null)) {
|
|
7296
|
-
continue;
|
|
7297
|
-
}
|
|
7298
|
-
if (predicate(node)) {
|
|
7299
|
-
const ret = replacer(node, root);
|
|
7300
|
-
replaceNodesRecursive(ret, predicate, replacer);
|
|
7301
|
-
array[i] = ret;
|
|
7302
|
-
} else {
|
|
7303
|
-
replaceNodesRecursive(node, predicate, replacer);
|
|
7304
|
-
}
|
|
7305
|
-
}
|
|
7306
|
-
return root;
|
|
7307
|
-
}
|
|
7308
7598
|
function typeOfJSX(node, config2) {
|
|
7309
7599
|
switch (node.type) {
|
|
7310
7600
|
case "JSXElement":
|
|
@@ -7585,6 +7875,8 @@ ${js}`
|
|
|
7585
7875
|
BooleanLiteral,
|
|
7586
7876
|
_BooleanLiteral,
|
|
7587
7877
|
CoffeeScriptBooleanLiteral,
|
|
7878
|
+
SymbolLiteral,
|
|
7879
|
+
SymbolElement,
|
|
7588
7880
|
Identifier,
|
|
7589
7881
|
IdentifierName,
|
|
7590
7882
|
IdentifierReference,
|
|
@@ -7685,6 +7977,8 @@ ${js}`
|
|
|
7685
7977
|
WhileClause,
|
|
7686
7978
|
ForStatement,
|
|
7687
7979
|
ForClause,
|
|
7980
|
+
ForStatementControlWithWhen,
|
|
7981
|
+
ForReduction,
|
|
7688
7982
|
ForStatementControl,
|
|
7689
7983
|
WhenCondition,
|
|
7690
7984
|
CoffeeForStatementParameters,
|
|
@@ -8098,7 +8392,7 @@ ${js}`
|
|
|
8098
8392
|
InlineInterfacePropertyDelimiter,
|
|
8099
8393
|
TypeBinaryOp,
|
|
8100
8394
|
TypeFunction,
|
|
8101
|
-
|
|
8395
|
+
TypeFunctionArrow,
|
|
8102
8396
|
TypeArguments,
|
|
8103
8397
|
ImplicitTypeArguments,
|
|
8104
8398
|
TypeApplicationStart,
|
|
@@ -8305,128 +8599,135 @@ ${js}`
|
|
|
8305
8599
|
var $L117 = (0, import_lib4.$L)("&");
|
|
8306
8600
|
var $L118 = (0, import_lib4.$L)("|");
|
|
8307
8601
|
var $L119 = (0, import_lib4.$L)(";");
|
|
8308
|
-
var $L120 = (0, import_lib4.$L)("
|
|
8309
|
-
var $L121 = (0, import_lib4.$L)("
|
|
8310
|
-
var $L122 = (0, import_lib4.$L)("
|
|
8311
|
-
var $L123 = (0, import_lib4.$L)("
|
|
8312
|
-
var $L124 = (0, import_lib4.$L)("
|
|
8313
|
-
var $L125 = (0, import_lib4.$L)("
|
|
8314
|
-
var $L126 = (0, import_lib4.$L)("
|
|
8315
|
-
var $L127 = (0, import_lib4.$L)("
|
|
8316
|
-
var $L128 = (0, import_lib4.$L)("
|
|
8317
|
-
var $L129 = (0, import_lib4.$L)("
|
|
8318
|
-
var $L130 = (0, import_lib4.$L)("
|
|
8319
|
-
var $L131 = (0, import_lib4.$L)("
|
|
8320
|
-
var $L132 = (0, import_lib4.$L)("
|
|
8321
|
-
var $L133 = (0, import_lib4.$L)("
|
|
8322
|
-
var $L134 = (0, import_lib4.$L)("
|
|
8323
|
-
var $L135 = (0, import_lib4.$L)("
|
|
8324
|
-
var $L136 = (0, import_lib4.$L)("
|
|
8325
|
-
var $L137 = (0, import_lib4.$L)("
|
|
8326
|
-
var $L138 = (0, import_lib4.$L)("
|
|
8327
|
-
var $L139 = (0, import_lib4.$L)("
|
|
8328
|
-
var $L140 = (0, import_lib4.$L)("
|
|
8329
|
-
var $L141 = (0, import_lib4.$L)("
|
|
8330
|
-
var $L142 = (0, import_lib4.$L)("
|
|
8331
|
-
var $L143 = (0, import_lib4.$L)("
|
|
8332
|
-
var $L144 = (0, import_lib4.$L)("
|
|
8333
|
-
var $L145 = (0, import_lib4.$L)("
|
|
8334
|
-
var $L146 = (0, import_lib4.$L)("
|
|
8335
|
-
var $L147 = (0, import_lib4.$L)("
|
|
8336
|
-
var $L148 = (0, import_lib4.$L)("
|
|
8337
|
-
var $L149 = (0, import_lib4.$L)("
|
|
8338
|
-
var $L150 = (0, import_lib4.$L)("
|
|
8339
|
-
var $L151 = (0, import_lib4.$L)("
|
|
8340
|
-
var $L152 = (0, import_lib4.$L)("
|
|
8341
|
-
var $L153 = (0, import_lib4.$L)("
|
|
8342
|
-
var $L154 = (0, import_lib4.$L)("
|
|
8343
|
-
var $L155 = (0, import_lib4.$L)("
|
|
8344
|
-
var $L156 = (0, import_lib4.$L)(
|
|
8345
|
-
var $L157 = (0, import_lib4.$L)("
|
|
8346
|
-
var $L158 = (0, import_lib4.$L)("
|
|
8347
|
-
var $L159 = (0, import_lib4.$L)("
|
|
8348
|
-
var $L160 = (0, import_lib4.$L)("
|
|
8349
|
-
var $L161 = (0, import_lib4.$L)("
|
|
8350
|
-
var $L162 = (0, import_lib4.$L)("
|
|
8351
|
-
var $L163 = (0, import_lib4.$L)("
|
|
8352
|
-
var $L164 = (0, import_lib4.$L)("
|
|
8353
|
-
var $L165 = (0, import_lib4.$L)("
|
|
8354
|
-
var $L166 = (0, import_lib4.$L)("
|
|
8355
|
-
var $L167 = (0, import_lib4.$L)("
|
|
8356
|
-
var $L168 = (0, import_lib4.$L)("
|
|
8357
|
-
var $L169 = (0, import_lib4.$L)("
|
|
8358
|
-
var $L170 = (0, import_lib4.$L)("
|
|
8359
|
-
var $L171 = (0, import_lib4.$L)("
|
|
8360
|
-
var $L172 = (0, import_lib4.$L)("
|
|
8361
|
-
var $L173 = (0, import_lib4.$L)("
|
|
8362
|
-
var $L174 = (0, import_lib4.$L)("
|
|
8363
|
-
var $L175 = (0, import_lib4.$L)("
|
|
8364
|
-
var $L176 = (0, import_lib4.$L)("
|
|
8365
|
-
var $L177 = (0, import_lib4.$L)("
|
|
8366
|
-
var $L178 = (0, import_lib4.$L)("
|
|
8367
|
-
var $L179 = (0, import_lib4.$L)("
|
|
8368
|
-
var $L180 = (0, import_lib4.$L)("
|
|
8369
|
-
var $L181 = (0, import_lib4.$L)("
|
|
8370
|
-
var $L182 = (0, import_lib4.$L)("
|
|
8371
|
-
var $L183 = (0, import_lib4.$L)("
|
|
8372
|
-
var $L184 = (0, import_lib4.$L)("
|
|
8373
|
-
var $L185 = (0, import_lib4.$L)("
|
|
8374
|
-
var $L186 = (0, import_lib4.$L)("
|
|
8375
|
-
var $L187 = (0, import_lib4.$L)("
|
|
8376
|
-
var $L188 = (0, import_lib4.$L)("
|
|
8377
|
-
var $L189 = (0, import_lib4.$L)("
|
|
8378
|
-
var $L190 = (0, import_lib4.$L)("
|
|
8379
|
-
var $L191 = (0, import_lib4.$L)("
|
|
8380
|
-
var $L192 = (0, import_lib4.$L)("
|
|
8381
|
-
var $L193 = (0, import_lib4.$L)("
|
|
8382
|
-
var $L194 = (0, import_lib4.$L)("
|
|
8383
|
-
var $L195 = (0, import_lib4.$L)("
|
|
8384
|
-
var $L196 = (0, import_lib4.$L)("
|
|
8385
|
-
var $L197 = (0, import_lib4.$L)("
|
|
8386
|
-
var $L198 = (0, import_lib4.$L)("
|
|
8387
|
-
var $L199 = (0, import_lib4.$L)("
|
|
8388
|
-
var $L200 = (0, import_lib4.$L)("
|
|
8389
|
-
var $L201 = (0, import_lib4.$L)("
|
|
8390
|
-
var $L202 = (0, import_lib4.$L)("
|
|
8391
|
-
var $L203 = (0, import_lib4.$L)("
|
|
8392
|
-
var $L204 = (0, import_lib4.$L)("
|
|
8393
|
-
var $L205 = (0, import_lib4.$L)("
|
|
8394
|
-
var $L206 = (0, import_lib4.$L)(
|
|
8395
|
-
var $L207 = (0, import_lib4.$L)("
|
|
8396
|
-
var $L208 = (0, import_lib4.$L)("
|
|
8397
|
-
var $L209 = (0, import_lib4.$L)("
|
|
8398
|
-
var $L210 = (0, import_lib4.$L)("
|
|
8399
|
-
var $L211 = (0, import_lib4.$L)("
|
|
8400
|
-
var $L212 = (0, import_lib4.$L)("
|
|
8401
|
-
var $L213 = (0, import_lib4.$L)("
|
|
8402
|
-
var $L214 = (0, import_lib4.$L)("
|
|
8403
|
-
var $L215 = (0, import_lib4.$L)("
|
|
8404
|
-
var $L216 = (0, import_lib4.$L)("
|
|
8405
|
-
var $L217 = (0, import_lib4.$L)("
|
|
8406
|
-
var $L218 = (0, import_lib4.$L)("
|
|
8407
|
-
var $L219 = (0, import_lib4.$L)("
|
|
8408
|
-
var $L220 = (0, import_lib4.$L)("
|
|
8409
|
-
var $L221 = (0, import_lib4.$L)("
|
|
8410
|
-
var $L222 = (0, import_lib4.$L)("
|
|
8411
|
-
var $L223 = (0, import_lib4.$L)("
|
|
8412
|
-
var $L224 = (0, import_lib4.$L)("
|
|
8413
|
-
var $L225 = (0, import_lib4.$L)("
|
|
8414
|
-
var $L226 = (0, import_lib4.$L)("
|
|
8415
|
-
var $L227 = (0, import_lib4.$L)("
|
|
8416
|
-
var $L228 = (0, import_lib4.$L)("
|
|
8417
|
-
var $L229 = (0, import_lib4.$L)("
|
|
8418
|
-
var $L230 = (0, import_lib4.$L)("
|
|
8419
|
-
var $L231 = (0, import_lib4.$L)("
|
|
8420
|
-
var $L232 = (0, import_lib4.$L)("
|
|
8421
|
-
var $L233 = (0, import_lib4.$L)("
|
|
8422
|
-
var $L234 = (0, import_lib4.$L)("
|
|
8423
|
-
var $L235 = (0, import_lib4.$L)("
|
|
8424
|
-
var $L236 = (0, import_lib4.$L)("
|
|
8425
|
-
var $L237 = (0, import_lib4.$L)("
|
|
8426
|
-
var $L238 = (0, import_lib4.$L)("
|
|
8602
|
+
var $L120 = (0, import_lib4.$L)("some");
|
|
8603
|
+
var $L121 = (0, import_lib4.$L)("every");
|
|
8604
|
+
var $L122 = (0, import_lib4.$L)("count");
|
|
8605
|
+
var $L123 = (0, import_lib4.$L)("sum");
|
|
8606
|
+
var $L124 = (0, import_lib4.$L)("product");
|
|
8607
|
+
var $L125 = (0, import_lib4.$L)("min");
|
|
8608
|
+
var $L126 = (0, import_lib4.$L)("max");
|
|
8609
|
+
var $L127 = (0, import_lib4.$L)("break");
|
|
8610
|
+
var $L128 = (0, import_lib4.$L)("continue");
|
|
8611
|
+
var $L129 = (0, import_lib4.$L)("debugger");
|
|
8612
|
+
var $L130 = (0, import_lib4.$L)("require");
|
|
8613
|
+
var $L131 = (0, import_lib4.$L)("with");
|
|
8614
|
+
var $L132 = (0, import_lib4.$L)("assert");
|
|
8615
|
+
var $L133 = (0, import_lib4.$L)(":=");
|
|
8616
|
+
var $L134 = (0, import_lib4.$L)("\u2254");
|
|
8617
|
+
var $L135 = (0, import_lib4.$L)(".=");
|
|
8618
|
+
var $L136 = (0, import_lib4.$L)("::=");
|
|
8619
|
+
var $L137 = (0, import_lib4.$L)("/*");
|
|
8620
|
+
var $L138 = (0, import_lib4.$L)("*/");
|
|
8621
|
+
var $L139 = (0, import_lib4.$L)("\\");
|
|
8622
|
+
var $L140 = (0, import_lib4.$L)(")");
|
|
8623
|
+
var $L141 = (0, import_lib4.$L)("abstract");
|
|
8624
|
+
var $L142 = (0, import_lib4.$L)("as");
|
|
8625
|
+
var $L143 = (0, import_lib4.$L)("@");
|
|
8626
|
+
var $L144 = (0, import_lib4.$L)("@@");
|
|
8627
|
+
var $L145 = (0, import_lib4.$L)("async");
|
|
8628
|
+
var $L146 = (0, import_lib4.$L)("await");
|
|
8629
|
+
var $L147 = (0, import_lib4.$L)("`");
|
|
8630
|
+
var $L148 = (0, import_lib4.$L)("by");
|
|
8631
|
+
var $L149 = (0, import_lib4.$L)("case");
|
|
8632
|
+
var $L150 = (0, import_lib4.$L)("catch");
|
|
8633
|
+
var $L151 = (0, import_lib4.$L)("class");
|
|
8634
|
+
var $L152 = (0, import_lib4.$L)("#{");
|
|
8635
|
+
var $L153 = (0, import_lib4.$L)("comptime");
|
|
8636
|
+
var $L154 = (0, import_lib4.$L)("declare");
|
|
8637
|
+
var $L155 = (0, import_lib4.$L)("default");
|
|
8638
|
+
var $L156 = (0, import_lib4.$L)("delete");
|
|
8639
|
+
var $L157 = (0, import_lib4.$L)("do");
|
|
8640
|
+
var $L158 = (0, import_lib4.$L)("..");
|
|
8641
|
+
var $L159 = (0, import_lib4.$L)("\u2025");
|
|
8642
|
+
var $L160 = (0, import_lib4.$L)("...");
|
|
8643
|
+
var $L161 = (0, import_lib4.$L)("\u2026");
|
|
8644
|
+
var $L162 = (0, import_lib4.$L)("::");
|
|
8645
|
+
var $L163 = (0, import_lib4.$L)('"');
|
|
8646
|
+
var $L164 = (0, import_lib4.$L)("each");
|
|
8647
|
+
var $L165 = (0, import_lib4.$L)("else");
|
|
8648
|
+
var $L166 = (0, import_lib4.$L)("!");
|
|
8649
|
+
var $L167 = (0, import_lib4.$L)("export");
|
|
8650
|
+
var $L168 = (0, import_lib4.$L)("extends");
|
|
8651
|
+
var $L169 = (0, import_lib4.$L)("finally");
|
|
8652
|
+
var $L170 = (0, import_lib4.$L)("for");
|
|
8653
|
+
var $L171 = (0, import_lib4.$L)("from");
|
|
8654
|
+
var $L172 = (0, import_lib4.$L)("function");
|
|
8655
|
+
var $L173 = (0, import_lib4.$L)("get");
|
|
8656
|
+
var $L174 = (0, import_lib4.$L)("set");
|
|
8657
|
+
var $L175 = (0, import_lib4.$L)("#");
|
|
8658
|
+
var $L176 = (0, import_lib4.$L)("if");
|
|
8659
|
+
var $L177 = (0, import_lib4.$L)("in");
|
|
8660
|
+
var $L178 = (0, import_lib4.$L)("infer");
|
|
8661
|
+
var $L179 = (0, import_lib4.$L)("let");
|
|
8662
|
+
var $L180 = (0, import_lib4.$L)("const");
|
|
8663
|
+
var $L181 = (0, import_lib4.$L)("is");
|
|
8664
|
+
var $L182 = (0, import_lib4.$L)("var");
|
|
8665
|
+
var $L183 = (0, import_lib4.$L)("like");
|
|
8666
|
+
var $L184 = (0, import_lib4.$L)("loop");
|
|
8667
|
+
var $L185 = (0, import_lib4.$L)("new");
|
|
8668
|
+
var $L186 = (0, import_lib4.$L)("not");
|
|
8669
|
+
var $L187 = (0, import_lib4.$L)("of");
|
|
8670
|
+
var $L188 = (0, import_lib4.$L)("[");
|
|
8671
|
+
var $L189 = (0, import_lib4.$L)("operator");
|
|
8672
|
+
var $L190 = (0, import_lib4.$L)("override");
|
|
8673
|
+
var $L191 = (0, import_lib4.$L)("own");
|
|
8674
|
+
var $L192 = (0, import_lib4.$L)("public");
|
|
8675
|
+
var $L193 = (0, import_lib4.$L)("private");
|
|
8676
|
+
var $L194 = (0, import_lib4.$L)("protected");
|
|
8677
|
+
var $L195 = (0, import_lib4.$L)("||>");
|
|
8678
|
+
var $L196 = (0, import_lib4.$L)("|\u25B7");
|
|
8679
|
+
var $L197 = (0, import_lib4.$L)("|>=");
|
|
8680
|
+
var $L198 = (0, import_lib4.$L)("\u25B7=");
|
|
8681
|
+
var $L199 = (0, import_lib4.$L)("|>");
|
|
8682
|
+
var $L200 = (0, import_lib4.$L)("\u25B7");
|
|
8683
|
+
var $L201 = (0, import_lib4.$L)("readonly");
|
|
8684
|
+
var $L202 = (0, import_lib4.$L)("return");
|
|
8685
|
+
var $L203 = (0, import_lib4.$L)("satisfies");
|
|
8686
|
+
var $L204 = (0, import_lib4.$L)("'");
|
|
8687
|
+
var $L205 = (0, import_lib4.$L)("static");
|
|
8688
|
+
var $L206 = (0, import_lib4.$L)("${");
|
|
8689
|
+
var $L207 = (0, import_lib4.$L)("super");
|
|
8690
|
+
var $L208 = (0, import_lib4.$L)("switch");
|
|
8691
|
+
var $L209 = (0, import_lib4.$L)("target");
|
|
8692
|
+
var $L210 = (0, import_lib4.$L)("then");
|
|
8693
|
+
var $L211 = (0, import_lib4.$L)("this");
|
|
8694
|
+
var $L212 = (0, import_lib4.$L)("throw");
|
|
8695
|
+
var $L213 = (0, import_lib4.$L)('"""');
|
|
8696
|
+
var $L214 = (0, import_lib4.$L)("'''");
|
|
8697
|
+
var $L215 = (0, import_lib4.$L)("///");
|
|
8698
|
+
var $L216 = (0, import_lib4.$L)("```");
|
|
8699
|
+
var $L217 = (0, import_lib4.$L)("try");
|
|
8700
|
+
var $L218 = (0, import_lib4.$L)("typeof");
|
|
8701
|
+
var $L219 = (0, import_lib4.$L)("undefined");
|
|
8702
|
+
var $L220 = (0, import_lib4.$L)("unless");
|
|
8703
|
+
var $L221 = (0, import_lib4.$L)("until");
|
|
8704
|
+
var $L222 = (0, import_lib4.$L)("using");
|
|
8705
|
+
var $L223 = (0, import_lib4.$L)("void");
|
|
8706
|
+
var $L224 = (0, import_lib4.$L)("when");
|
|
8707
|
+
var $L225 = (0, import_lib4.$L)("while");
|
|
8708
|
+
var $L226 = (0, import_lib4.$L)("yield");
|
|
8709
|
+
var $L227 = (0, import_lib4.$L)("/>");
|
|
8710
|
+
var $L228 = (0, import_lib4.$L)("</");
|
|
8711
|
+
var $L229 = (0, import_lib4.$L)("<>");
|
|
8712
|
+
var $L230 = (0, import_lib4.$L)("</>");
|
|
8713
|
+
var $L231 = (0, import_lib4.$L)("<!--");
|
|
8714
|
+
var $L232 = (0, import_lib4.$L)("-->");
|
|
8715
|
+
var $L233 = (0, import_lib4.$L)("type");
|
|
8716
|
+
var $L234 = (0, import_lib4.$L)("enum");
|
|
8717
|
+
var $L235 = (0, import_lib4.$L)("interface");
|
|
8718
|
+
var $L236 = (0, import_lib4.$L)("global");
|
|
8719
|
+
var $L237 = (0, import_lib4.$L)("module");
|
|
8720
|
+
var $L238 = (0, import_lib4.$L)("namespace");
|
|
8721
|
+
var $L239 = (0, import_lib4.$L)("asserts");
|
|
8722
|
+
var $L240 = (0, import_lib4.$L)("keyof");
|
|
8723
|
+
var $L241 = (0, import_lib4.$L)("???");
|
|
8724
|
+
var $L242 = (0, import_lib4.$L)("unique");
|
|
8725
|
+
var $L243 = (0, import_lib4.$L)("symbol");
|
|
8726
|
+
var $L244 = (0, import_lib4.$L)("[]");
|
|
8727
|
+
var $L245 = (0, import_lib4.$L)("civet");
|
|
8427
8728
|
var $R0 = (0, import_lib4.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
|
|
8428
8729
|
var $R1 = (0, import_lib4.$R)(new RegExp("&(?=\\s)", "suy"));
|
|
8429
|
-
var $R2 = (0, import_lib4.$R)(new RegExp("(as|of|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
8730
|
+
var $R2 = (0, import_lib4.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
8430
8731
|
var $R3 = (0, import_lib4.$R)(new RegExp("[0-9]", "suy"));
|
|
8431
8732
|
var $R4 = (0, import_lib4.$R)(new RegExp("(?!\\p{ID_Start}|[_$0-9(\\[{])", "suy"));
|
|
8432
8733
|
var $R5 = (0, import_lib4.$R)(new RegExp("[ \\t]", "suy"));
|
|
@@ -8653,12 +8954,7 @@ ${js}`
|
|
|
8653
8954
|
return $skip;
|
|
8654
8955
|
return $1;
|
|
8655
8956
|
});
|
|
8656
|
-
var StatementExpression$2 =
|
|
8657
|
-
if ($1.block.implicit && $1.subtype !== "DoStatement" && $1.subtype !== "ComptimeStatement") {
|
|
8658
|
-
return $skip;
|
|
8659
|
-
}
|
|
8660
|
-
return $1;
|
|
8661
|
-
});
|
|
8957
|
+
var StatementExpression$2 = IterationExpression;
|
|
8662
8958
|
var StatementExpression$3 = SwitchStatement;
|
|
8663
8959
|
var StatementExpression$4 = ThrowStatement;
|
|
8664
8960
|
var StatementExpression$5 = TryStatement;
|
|
@@ -8756,7 +9052,7 @@ ${js}`
|
|
|
8756
9052
|
function ForbiddenImplicitCalls(ctx, state2) {
|
|
8757
9053
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "ForbiddenImplicitCalls", ForbiddenImplicitCalls$$);
|
|
8758
9054
|
}
|
|
8759
|
-
var ReservedBinary$0 = (0, import_lib4.$R$0)((0, import_lib4.$EXPECT)($R2, "ReservedBinary /(as|of|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
|
|
9055
|
+
var ReservedBinary$0 = (0, import_lib4.$R$0)((0, import_lib4.$EXPECT)($R2, "ReservedBinary /(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
|
|
8760
9056
|
function ReservedBinary(ctx, state2) {
|
|
8761
9057
|
return (0, import_lib4.$EVENT)(ctx, state2, "ReservedBinary", ReservedBinary$0);
|
|
8762
9058
|
}
|
|
@@ -9387,7 +9683,7 @@ ${js}`
|
|
|
9387
9683
|
function PipelineHeadItem(ctx, state2) {
|
|
9388
9684
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "PipelineHeadItem", PipelineHeadItem$$);
|
|
9389
9685
|
}
|
|
9390
|
-
var PipelineTailItem$0 = (0, import_lib4.$T)((0, import_lib4.$S)((0, import_lib4.$C)(AwaitOp, Yield, Return), (0, import_lib4.$N)(AccessStart)), function(value) {
|
|
9686
|
+
var PipelineTailItem$0 = (0, import_lib4.$T)((0, import_lib4.$S)((0, import_lib4.$C)(AwaitOp, Yield, Return, Throw), (0, import_lib4.$N)(AccessStart), (0, import_lib4.$N)(MaybeNestedExpression)), function(value) {
|
|
9391
9687
|
return value[0];
|
|
9392
9688
|
});
|
|
9393
9689
|
var PipelineTailItem$1 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L15, 'PipelineTailItem "import"'), (0, import_lib4.$N)(AccessStart)), function($skip, $loc, $0, $1, $2) {
|
|
@@ -9419,8 +9715,9 @@ ${js}`
|
|
|
9419
9715
|
var PrimaryExpression$8 = RegularExpressionLiteral;
|
|
9420
9716
|
var PrimaryExpression$9 = ParenthesizedExpression;
|
|
9421
9717
|
var PrimaryExpression$10 = Placeholder;
|
|
9422
|
-
var PrimaryExpression$11 =
|
|
9423
|
-
var PrimaryExpression
|
|
9718
|
+
var PrimaryExpression$11 = SymbolLiteral;
|
|
9719
|
+
var PrimaryExpression$12 = JSXImplicitFragment;
|
|
9720
|
+
var PrimaryExpression$$ = [PrimaryExpression$0, PrimaryExpression$1, PrimaryExpression$2, PrimaryExpression$3, PrimaryExpression$4, PrimaryExpression$5, PrimaryExpression$6, PrimaryExpression$7, PrimaryExpression$8, PrimaryExpression$9, PrimaryExpression$10, PrimaryExpression$11, PrimaryExpression$12];
|
|
9424
9721
|
function PrimaryExpression(ctx, state2) {
|
|
9425
9722
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "PrimaryExpression", PrimaryExpression$$);
|
|
9426
9723
|
}
|
|
@@ -10249,7 +10546,7 @@ ${js}`
|
|
|
10249
10546
|
function PropertyAccessModifier(ctx, state2) {
|
|
10250
10547
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "PropertyAccessModifier", PropertyAccessModifier$$);
|
|
10251
10548
|
}
|
|
10252
|
-
var PropertyAccess$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(AccessStart, (0, import_lib4.$C)(TemplateLiteral, StringLiteral, IntegerLiteral)), function($skip, $loc, $0, $1, $2) {
|
|
10549
|
+
var PropertyAccess$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(AccessStart, (0, import_lib4.$C)(TemplateLiteral, StringLiteral, IntegerLiteral, SymbolLiteral)), function($skip, $loc, $0, $1, $2) {
|
|
10253
10550
|
var dot = $1;
|
|
10254
10551
|
var literal = $2;
|
|
10255
10552
|
return {
|
|
@@ -11793,6 +12090,55 @@ ${js}`
|
|
|
11793
12090
|
function CoffeeScriptBooleanLiteral(ctx, state2) {
|
|
11794
12091
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "CoffeeScriptBooleanLiteral", CoffeeScriptBooleanLiteral$$);
|
|
11795
12092
|
}
|
|
12093
|
+
var SymbolLiteral$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(Colon, (0, import_lib4.$C)(IdentifierName, StringLiteral)), function($skip, $loc, $0, $1, $2) {
|
|
12094
|
+
var colon = $1;
|
|
12095
|
+
var id = $2;
|
|
12096
|
+
let name, token;
|
|
12097
|
+
if (id.type === "Identifier") {
|
|
12098
|
+
({ name, children: [token] } = id);
|
|
12099
|
+
} else {
|
|
12100
|
+
name = literalValue({
|
|
12101
|
+
type: "Literal",
|
|
12102
|
+
subtype: "StringLiteral",
|
|
12103
|
+
raw: id.token,
|
|
12104
|
+
children: [id]
|
|
12105
|
+
});
|
|
12106
|
+
token = id;
|
|
12107
|
+
}
|
|
12108
|
+
if (config.symbols.includes(name)) {
|
|
12109
|
+
return {
|
|
12110
|
+
type: "SymbolLiteral",
|
|
12111
|
+
children: id.type === "Identifier" ? [
|
|
12112
|
+
{ ...colon, token: "Symbol." },
|
|
12113
|
+
token
|
|
12114
|
+
] : [
|
|
12115
|
+
{ ...colon, token: "Symbol[" },
|
|
12116
|
+
token,
|
|
12117
|
+
"]"
|
|
12118
|
+
],
|
|
12119
|
+
name
|
|
12120
|
+
};
|
|
12121
|
+
} else {
|
|
12122
|
+
return {
|
|
12123
|
+
type: "SymbolLiteral",
|
|
12124
|
+
children: [
|
|
12125
|
+
{ ...colon, token: "Symbol.for(" },
|
|
12126
|
+
id.type === "Identifier" ? ['"', token, '"'] : token,
|
|
12127
|
+
")"
|
|
12128
|
+
],
|
|
12129
|
+
name
|
|
12130
|
+
};
|
|
12131
|
+
}
|
|
12132
|
+
});
|
|
12133
|
+
function SymbolLiteral(ctx, state2) {
|
|
12134
|
+
return (0, import_lib4.$EVENT)(ctx, state2, "SymbolLiteral", SymbolLiteral$0);
|
|
12135
|
+
}
|
|
12136
|
+
var SymbolElement$0 = (0, import_lib4.$T)((0, import_lib4.$S)(SymbolLiteral), function(value) {
|
|
12137
|
+
return ["[", value[0], "]"];
|
|
12138
|
+
});
|
|
12139
|
+
function SymbolElement(ctx, state2) {
|
|
12140
|
+
return (0, import_lib4.$EVENT)(ctx, state2, "SymbolElement", SymbolElement$0);
|
|
12141
|
+
}
|
|
11796
12142
|
var Identifier$0 = (0, import_lib4.$T)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($R17, "Identifier /(?=\\p{ID_Start}|[_$])/"), (0, import_lib4.$N)(ReservedWord), IdentifierName), function(value) {
|
|
11797
12143
|
var id = value[2];
|
|
11798
12144
|
return id;
|
|
@@ -12540,7 +12886,8 @@ ${js}`
|
|
|
12540
12886
|
});
|
|
12541
12887
|
var PropertyName$4 = IdentifierName;
|
|
12542
12888
|
var PropertyName$5 = LengthShorthand;
|
|
12543
|
-
var PropertyName
|
|
12889
|
+
var PropertyName$6 = SymbolElement;
|
|
12890
|
+
var PropertyName$$ = [PropertyName$0, PropertyName$1, PropertyName$2, PropertyName$3, PropertyName$4, PropertyName$5, PropertyName$6];
|
|
12544
12891
|
function PropertyName(ctx, state2) {
|
|
12545
12892
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "PropertyName", PropertyName$$);
|
|
12546
12893
|
}
|
|
@@ -12802,7 +13149,8 @@ ${js}`
|
|
|
12802
13149
|
var ClassElementName$0 = PropertyName;
|
|
12803
13150
|
var ClassElementName$1 = LengthShorthand;
|
|
12804
13151
|
var ClassElementName$2 = PrivateIdentifier;
|
|
12805
|
-
var ClassElementName
|
|
13152
|
+
var ClassElementName$3 = SymbolElement;
|
|
13153
|
+
var ClassElementName$$ = [ClassElementName$0, ClassElementName$1, ClassElementName$2, ClassElementName$3];
|
|
12806
13154
|
function ClassElementName(ctx, state2) {
|
|
12807
13155
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "ClassElementName", ClassElementName$$);
|
|
12808
13156
|
}
|
|
@@ -13419,6 +13767,8 @@ ${js}`
|
|
|
13419
13767
|
var Statement$3 = (0, import_lib4.$TS)((0, import_lib4.$S)(IterationStatement, (0, import_lib4.$N)(ShouldExpressionize)), function($skip, $loc, $0, $1, $2) {
|
|
13420
13768
|
if ($1.generator)
|
|
13421
13769
|
return $skip;
|
|
13770
|
+
if ($1.reduction)
|
|
13771
|
+
return $skip;
|
|
13422
13772
|
return $1;
|
|
13423
13773
|
});
|
|
13424
13774
|
var Statement$4 = (0, import_lib4.$T)((0, import_lib4.$S)(SwitchStatement, (0, import_lib4.$N)(ShouldExpressionize)), function(value) {
|
|
@@ -13464,7 +13814,7 @@ ${js}`
|
|
|
13464
13814
|
return (0, import_lib4.$EVENT)(ctx, state2, "EmptyStatement", EmptyStatement$0);
|
|
13465
13815
|
}
|
|
13466
13816
|
var InsertEmptyStatement$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(InsertSemicolon), function($skip, $loc, $0, $1) {
|
|
13467
|
-
return { type: "EmptyStatement", children: [$1] };
|
|
13817
|
+
return { type: "EmptyStatement", children: [$1], implicit: true };
|
|
13468
13818
|
});
|
|
13469
13819
|
function InsertEmptyStatement(ctx, state2) {
|
|
13470
13820
|
return (0, import_lib4.$EVENT)(ctx, state2, "InsertEmptyStatement", InsertEmptyStatement$0);
|
|
@@ -13759,7 +14109,7 @@ ${js}`
|
|
|
13759
14109
|
function ForStatement(ctx, state2) {
|
|
13760
14110
|
return (0, import_lib4.$EVENT)(ctx, state2, "ForStatement", ForStatement$0);
|
|
13761
14111
|
}
|
|
13762
|
-
var ForClause$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(For, (0, import_lib4.$E)((0, import_lib4.$S)((0, import_lib4.$E)(_), Star)), __,
|
|
14112
|
+
var ForClause$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(For, (0, import_lib4.$E)((0, import_lib4.$S)((0, import_lib4.$E)(_), Star)), __, ForStatementControlWithWhen), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
13763
14113
|
var generator = $2;
|
|
13764
14114
|
var c = $4;
|
|
13765
14115
|
const { children, declaration } = c;
|
|
@@ -13770,32 +14120,63 @@ ${js}`
|
|
|
13770
14120
|
block: null,
|
|
13771
14121
|
blockPrefix: c.blockPrefix,
|
|
13772
14122
|
hoistDec: c.hoistDec,
|
|
14123
|
+
reduction: c.reduction,
|
|
13773
14124
|
generator
|
|
13774
14125
|
};
|
|
13775
14126
|
});
|
|
13776
14127
|
function ForClause(ctx, state2) {
|
|
13777
14128
|
return (0, import_lib4.$EVENT)(ctx, state2, "ForClause", ForClause$0);
|
|
13778
14129
|
}
|
|
14130
|
+
var ForStatementControlWithWhen$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$E)(ForReduction), ForStatementControl, (0, import_lib4.$E)(WhenCondition)), function($skip, $loc, $0, $1, $2, $3) {
|
|
14131
|
+
var reduction = $1;
|
|
14132
|
+
var control = $2;
|
|
14133
|
+
var condition = $3;
|
|
14134
|
+
if (reduction)
|
|
14135
|
+
control = { ...control, reduction };
|
|
14136
|
+
if (!condition)
|
|
14137
|
+
return control;
|
|
14138
|
+
const expressions = [["", {
|
|
14139
|
+
type: "ContinueStatement",
|
|
14140
|
+
children: ["continue"]
|
|
14141
|
+
}]];
|
|
14142
|
+
const block = {
|
|
14143
|
+
type: "BlockStatement",
|
|
14144
|
+
expressions,
|
|
14145
|
+
children: [expressions],
|
|
14146
|
+
bare: true
|
|
14147
|
+
};
|
|
14148
|
+
return {
|
|
14149
|
+
...control,
|
|
14150
|
+
blockPrefix: [
|
|
14151
|
+
...control.blockPrefix ?? [],
|
|
14152
|
+
["", {
|
|
14153
|
+
type: "IfStatement",
|
|
14154
|
+
then: block,
|
|
14155
|
+
children: ["if (!", makeLeftHandSideExpression(trimFirstSpace(condition)), ") ", block]
|
|
14156
|
+
}, ";"]
|
|
14157
|
+
]
|
|
14158
|
+
};
|
|
14159
|
+
});
|
|
14160
|
+
function ForStatementControlWithWhen(ctx, state2) {
|
|
14161
|
+
return (0, import_lib4.$EVENT)(ctx, state2, "ForStatementControlWithWhen", ForStatementControlWithWhen$0);
|
|
14162
|
+
}
|
|
14163
|
+
var ForReduction$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L120, 'ForReduction "some"'), (0, import_lib4.$EXPECT)($L121, 'ForReduction "every"'), (0, import_lib4.$EXPECT)($L122, 'ForReduction "count"'), (0, import_lib4.$EXPECT)($L123, 'ForReduction "sum"'), (0, import_lib4.$EXPECT)($L124, 'ForReduction "product"'), (0, import_lib4.$EXPECT)($L125, 'ForReduction "min"'), (0, import_lib4.$EXPECT)($L126, 'ForReduction "max"')), NonIdContinue, __), function($skip, $loc, $0, $1, $2, $3) {
|
|
14164
|
+
var subtype = $1;
|
|
14165
|
+
var ws = $3;
|
|
14166
|
+
return {
|
|
14167
|
+
type: "ForReduction",
|
|
14168
|
+
subtype,
|
|
14169
|
+
children: [ws]
|
|
14170
|
+
};
|
|
14171
|
+
});
|
|
14172
|
+
function ForReduction(ctx, state2) {
|
|
14173
|
+
return (0, import_lib4.$EVENT)(ctx, state2, "ForReduction", ForReduction$0);
|
|
14174
|
+
}
|
|
13779
14175
|
var ForStatementControl$0 = (0, import_lib4.$T)((0, import_lib4.$S)((0, import_lib4.$N)(CoffeeForLoopsEnabled), ForStatementParameters), function(value) {
|
|
13780
14176
|
return value[1];
|
|
13781
14177
|
});
|
|
13782
|
-
var ForStatementControl$1 = (0, import_lib4.$
|
|
13783
|
-
|
|
13784
|
-
if (condition) {
|
|
13785
|
-
const block = "continue";
|
|
13786
|
-
$2 = {
|
|
13787
|
-
...$2,
|
|
13788
|
-
blockPrefix: [
|
|
13789
|
-
...$2.blockPrefix,
|
|
13790
|
-
["", {
|
|
13791
|
-
type: "IfStatement",
|
|
13792
|
-
then: block,
|
|
13793
|
-
children: ["if (!(", trimFirstSpace(condition), ")) ", block]
|
|
13794
|
-
}, ";"]
|
|
13795
|
-
]
|
|
13796
|
-
};
|
|
13797
|
-
}
|
|
13798
|
-
return $2;
|
|
14178
|
+
var ForStatementControl$1 = (0, import_lib4.$T)((0, import_lib4.$S)(CoffeeForLoopsEnabled, CoffeeForStatementParameters), function(value) {
|
|
14179
|
+
return value[1];
|
|
13799
14180
|
});
|
|
13800
14181
|
var ForStatementControl$$ = [ForStatementControl$0, ForStatementControl$1];
|
|
13801
14182
|
function ForStatementControl(ctx, state2) {
|
|
@@ -13844,7 +14225,7 @@ ${js}`
|
|
|
13844
14225
|
const counterRef = makeRef("i");
|
|
13845
14226
|
const lenRef = makeRef("len");
|
|
13846
14227
|
if (exp.type === "RangeExpression") {
|
|
13847
|
-
return forRange(open, declaration, exp, step
|
|
14228
|
+
return forRange(open, declaration, exp, step && prepend(trimFirstSpace(step[0]), trimFirstSpace(step[2])), close);
|
|
13848
14229
|
}
|
|
13849
14230
|
const expRef = maybeRef(exp);
|
|
13850
14231
|
const varRef = declaration;
|
|
@@ -13946,10 +14327,10 @@ ${js}`
|
|
|
13946
14327
|
};
|
|
13947
14328
|
});
|
|
13948
14329
|
var ForStatementParameters$2 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$E)((0, import_lib4.$S)(Await, __)), (0, import_lib4.$E)((0, import_lib4.$S)((0, import_lib4.$C)(Each, Own), __)), (0, import_lib4.$S)(OpenParen, __), ForInOfDeclaration, (0, import_lib4.$E)((0, import_lib4.$S)(__, Comma, __, ForInOfDeclaration)), __, (0, import_lib4.$C)(In, Of), ExpressionWithObjectApplicationForbidden, (0, import_lib4.$E)((0, import_lib4.$S)(__, By, ExpressionWithObjectApplicationForbidden)), (0, import_lib4.$S)(__, CloseParen)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {
|
|
13949
|
-
return processForInOf($0
|
|
14330
|
+
return processForInOf($0);
|
|
13950
14331
|
});
|
|
13951
14332
|
var ForStatementParameters$3 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$E)((0, import_lib4.$S)(Await, __)), (0, import_lib4.$E)((0, import_lib4.$S)((0, import_lib4.$C)(Each, Own), __)), InsertOpenParen, ForInOfDeclaration, (0, import_lib4.$E)((0, import_lib4.$S)(__, Comma, __, ForInOfDeclaration)), __, (0, import_lib4.$C)(In, Of), ExpressionWithObjectApplicationForbidden, (0, import_lib4.$E)((0, import_lib4.$S)(__, By, ExpressionWithObjectApplicationForbidden)), InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {
|
|
13952
|
-
return processForInOf($0
|
|
14333
|
+
return processForInOf($0);
|
|
13953
14334
|
});
|
|
13954
14335
|
var ForStatementParameters$4 = ForRangeParameters;
|
|
13955
14336
|
var ForStatementParameters$$ = [ForStatementParameters$0, ForStatementParameters$1, ForStatementParameters$2, ForStatementParameters$3, ForStatementParameters$4];
|
|
@@ -13986,7 +14367,7 @@ ${js}`
|
|
|
13986
14367
|
return {
|
|
13987
14368
|
type: "ForDeclaration",
|
|
13988
14369
|
children: [c, binding],
|
|
13989
|
-
|
|
14370
|
+
decl: c.token,
|
|
13990
14371
|
binding,
|
|
13991
14372
|
names: binding.names
|
|
13992
14373
|
};
|
|
@@ -13997,7 +14378,7 @@ ${js}`
|
|
|
13997
14378
|
return {
|
|
13998
14379
|
type: "ForDeclaration",
|
|
13999
14380
|
children: [c, binding],
|
|
14000
|
-
|
|
14381
|
+
decl: c.token,
|
|
14001
14382
|
binding,
|
|
14002
14383
|
names: binding.names
|
|
14003
14384
|
};
|
|
@@ -14717,19 +15098,19 @@ ${js}`
|
|
|
14717
15098
|
function ThrowStatement(ctx, state2) {
|
|
14718
15099
|
return (0, import_lib4.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
|
|
14719
15100
|
}
|
|
14720
|
-
var Break$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
15101
|
+
var Break$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L127, 'Break "break"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
14721
15102
|
return { $loc, token: $1 };
|
|
14722
15103
|
});
|
|
14723
15104
|
function Break(ctx, state2) {
|
|
14724
15105
|
return (0, import_lib4.$EVENT)(ctx, state2, "Break", Break$0);
|
|
14725
15106
|
}
|
|
14726
|
-
var Continue$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
15107
|
+
var Continue$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L128, 'Continue "continue"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
14727
15108
|
return { $loc, token: $1 };
|
|
14728
15109
|
});
|
|
14729
15110
|
function Continue(ctx, state2) {
|
|
14730
15111
|
return (0, import_lib4.$EVENT)(ctx, state2, "Continue", Continue$0);
|
|
14731
15112
|
}
|
|
14732
|
-
var Debugger$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
15113
|
+
var Debugger$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L129, 'Debugger "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
14733
15114
|
return { $loc, token: $1 };
|
|
14734
15115
|
});
|
|
14735
15116
|
function Debugger(ctx, state2) {
|
|
@@ -14797,7 +15178,7 @@ ${js}`
|
|
|
14797
15178
|
function MaybeParenNestedExpression(ctx, state2) {
|
|
14798
15179
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
|
|
14799
15180
|
}
|
|
14800
|
-
var ImportDeclaration$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(Import, _, Identifier, (0, import_lib4.$E)(_), Equals, __, (0, import_lib4.$EXPECT)($
|
|
15181
|
+
var ImportDeclaration$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(Import, _, Identifier, (0, import_lib4.$E)(_), Equals, __, (0, import_lib4.$EXPECT)($L130, 'ImportDeclaration "require"'), NonIdContinue, Arguments), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
14801
15182
|
const imp = [
|
|
14802
15183
|
{ ...$1, ts: true },
|
|
14803
15184
|
{ ...$1, token: "const", js: true }
|
|
@@ -14987,7 +15368,7 @@ ${js}`
|
|
|
14987
15368
|
function ImpliedFrom(ctx, state2) {
|
|
14988
15369
|
return (0, import_lib4.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
|
|
14989
15370
|
}
|
|
14990
|
-
var ImportAssertion$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$E)(_), (0, import_lib4.$C)((0, import_lib4.$EXPECT)($
|
|
15371
|
+
var ImportAssertion$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$E)(_), (0, import_lib4.$C)((0, import_lib4.$EXPECT)($L131, 'ImportAssertion "with"'), (0, import_lib4.$EXPECT)($L132, 'ImportAssertion "assert"')), NonIdContinue, (0, import_lib4.$E)(_), ObjectLiteral), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
14991
15372
|
var keyword = $2;
|
|
14992
15373
|
var object = $5;
|
|
14993
15374
|
return {
|
|
@@ -15306,19 +15687,19 @@ ${js}`
|
|
|
15306
15687
|
function LexicalDeclaration(ctx, state2) {
|
|
15307
15688
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
|
|
15308
15689
|
}
|
|
15309
|
-
var ConstAssignment$0 = (0, import_lib4.$TV)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($
|
|
15690
|
+
var ConstAssignment$0 = (0, import_lib4.$TV)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L133, 'ConstAssignment ":="'), (0, import_lib4.$EXPECT)($L134, 'ConstAssignment "\u2254"')), function($skip, $loc, $0, $1) {
|
|
15310
15691
|
return { $loc, token: "=", decl: "const " };
|
|
15311
15692
|
});
|
|
15312
15693
|
function ConstAssignment(ctx, state2) {
|
|
15313
15694
|
return (0, import_lib4.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
|
|
15314
15695
|
}
|
|
15315
|
-
var LetAssignment$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
15696
|
+
var LetAssignment$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L135, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
|
|
15316
15697
|
return { $loc, token: "=", decl: "let " };
|
|
15317
15698
|
});
|
|
15318
15699
|
function LetAssignment(ctx, state2) {
|
|
15319
15700
|
return (0, import_lib4.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
|
|
15320
15701
|
}
|
|
15321
|
-
var TypeAssignment$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
15702
|
+
var TypeAssignment$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L136, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
|
|
15322
15703
|
return { $loc, token: "=" };
|
|
15323
15704
|
});
|
|
15324
15705
|
function TypeAssignment(ctx, state2) {
|
|
@@ -15741,7 +16122,7 @@ ${js}`
|
|
|
15741
16122
|
function MultiLineComment(ctx, state2) {
|
|
15742
16123
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
|
|
15743
16124
|
}
|
|
15744
|
-
var JSMultiLineComment$0 = (0, import_lib4.$TV)((0, import_lib4.$TEXT)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16125
|
+
var JSMultiLineComment$0 = (0, import_lib4.$TV)((0, import_lib4.$TEXT)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L137, 'JSMultiLineComment "/*"'), (0, import_lib4.$Q)((0, import_lib4.$S)((0, import_lib4.$N)((0, import_lib4.$EXPECT)($L138, 'JSMultiLineComment "*/"')), (0, import_lib4.$EXPECT)($R67, "JSMultiLineComment /./"))), (0, import_lib4.$EXPECT)($L138, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
|
|
15745
16126
|
return { type: "Comment", $loc, token: $1 };
|
|
15746
16127
|
});
|
|
15747
16128
|
function JSMultiLineComment(ctx, state2) {
|
|
@@ -15787,7 +16168,7 @@ ${js}`
|
|
|
15787
16168
|
var NonNewlineWhitespace$0 = (0, import_lib4.$TR)((0, import_lib4.$EXPECT)($R22, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
15788
16169
|
return { $loc, token: $0 };
|
|
15789
16170
|
});
|
|
15790
|
-
var NonNewlineWhitespace$1 = (0, import_lib4.$T)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16171
|
+
var NonNewlineWhitespace$1 = (0, import_lib4.$T)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L139, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
|
|
15791
16172
|
return " ";
|
|
15792
16173
|
});
|
|
15793
16174
|
var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
|
|
@@ -15833,7 +16214,7 @@ ${js}`
|
|
|
15833
16214
|
}
|
|
15834
16215
|
var StatementDelimiter$0 = (0, import_lib4.$Y)(EOS);
|
|
15835
16216
|
var StatementDelimiter$1 = SemicolonDelimiter;
|
|
15836
|
-
var StatementDelimiter$2 = (0, import_lib4.$Y)((0, import_lib4.$S)((0, import_lib4.$E)(_), (0, import_lib4.$C)((0, import_lib4.$EXPECT)($L37, 'StatementDelimiter "}"'), (0, import_lib4.$EXPECT)($
|
|
16217
|
+
var StatementDelimiter$2 = (0, import_lib4.$Y)((0, import_lib4.$S)((0, import_lib4.$E)(_), (0, import_lib4.$C)((0, import_lib4.$EXPECT)($L37, 'StatementDelimiter "}"'), (0, import_lib4.$EXPECT)($L140, 'StatementDelimiter ")"'), (0, import_lib4.$EXPECT)($L46, 'StatementDelimiter "]"'))));
|
|
15837
16218
|
var StatementDelimiter$$ = [StatementDelimiter$0, StatementDelimiter$1, StatementDelimiter$2];
|
|
15838
16219
|
function StatementDelimiter(ctx, state2) {
|
|
15839
16220
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
|
|
@@ -15857,7 +16238,7 @@ ${js}`
|
|
|
15857
16238
|
function Loc(ctx, state2) {
|
|
15858
16239
|
return (0, import_lib4.$EVENT)(ctx, state2, "Loc", Loc$0);
|
|
15859
16240
|
}
|
|
15860
|
-
var Abstract$0 = (0, import_lib4.$TV)((0, import_lib4.$TEXT)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16241
|
+
var Abstract$0 = (0, import_lib4.$TV)((0, import_lib4.$TEXT)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L141, 'Abstract "abstract"'), NonIdContinue, (0, import_lib4.$E)((0, import_lib4.$EXPECT)($L18, 'Abstract " "')))), function($skip, $loc, $0, $1) {
|
|
15861
16242
|
return { $loc, token: $1, ts: true };
|
|
15862
16243
|
});
|
|
15863
16244
|
function Abstract(ctx, state2) {
|
|
@@ -15869,43 +16250,43 @@ ${js}`
|
|
|
15869
16250
|
function Ampersand(ctx, state2) {
|
|
15870
16251
|
return (0, import_lib4.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
|
|
15871
16252
|
}
|
|
15872
|
-
var As$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16253
|
+
var As$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L142, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15873
16254
|
return { $loc, token: $1 };
|
|
15874
16255
|
});
|
|
15875
16256
|
function As(ctx, state2) {
|
|
15876
16257
|
return (0, import_lib4.$EVENT)(ctx, state2, "As", As$0);
|
|
15877
16258
|
}
|
|
15878
|
-
var At$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16259
|
+
var At$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L143, 'At "@"'), function($skip, $loc, $0, $1) {
|
|
15879
16260
|
return { $loc, token: $1 };
|
|
15880
16261
|
});
|
|
15881
16262
|
function At(ctx, state2) {
|
|
15882
16263
|
return (0, import_lib4.$EVENT)(ctx, state2, "At", At$0);
|
|
15883
16264
|
}
|
|
15884
|
-
var AtAt$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16265
|
+
var AtAt$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L144, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
|
|
15885
16266
|
return { $loc, token: "@" };
|
|
15886
16267
|
});
|
|
15887
16268
|
function AtAt(ctx, state2) {
|
|
15888
16269
|
return (0, import_lib4.$EVENT)(ctx, state2, "AtAt", AtAt$0);
|
|
15889
16270
|
}
|
|
15890
|
-
var Async$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16271
|
+
var Async$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L145, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15891
16272
|
return { $loc, token: $1, type: "Async" };
|
|
15892
16273
|
});
|
|
15893
16274
|
function Async(ctx, state2) {
|
|
15894
16275
|
return (0, import_lib4.$EVENT)(ctx, state2, "Async", Async$0);
|
|
15895
16276
|
}
|
|
15896
|
-
var Await$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16277
|
+
var Await$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L146, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15897
16278
|
return { $loc, token: $1, type: "Await" };
|
|
15898
16279
|
});
|
|
15899
16280
|
function Await(ctx, state2) {
|
|
15900
16281
|
return (0, import_lib4.$EVENT)(ctx, state2, "Await", Await$0);
|
|
15901
16282
|
}
|
|
15902
|
-
var Backtick$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16283
|
+
var Backtick$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L147, 'Backtick "`"'), function($skip, $loc, $0, $1) {
|
|
15903
16284
|
return { $loc, token: $1 };
|
|
15904
16285
|
});
|
|
15905
16286
|
function Backtick(ctx, state2) {
|
|
15906
16287
|
return (0, import_lib4.$EVENT)(ctx, state2, "Backtick", Backtick$0);
|
|
15907
16288
|
}
|
|
15908
|
-
var By$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16289
|
+
var By$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L148, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15909
16290
|
return { $loc, token: $1 };
|
|
15910
16291
|
});
|
|
15911
16292
|
function By(ctx, state2) {
|
|
@@ -15917,19 +16298,19 @@ ${js}`
|
|
|
15917
16298
|
function Caret(ctx, state2) {
|
|
15918
16299
|
return (0, import_lib4.$EVENT)(ctx, state2, "Caret", Caret$0);
|
|
15919
16300
|
}
|
|
15920
|
-
var Case$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16301
|
+
var Case$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L149, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15921
16302
|
return { $loc, token: $1 };
|
|
15922
16303
|
});
|
|
15923
16304
|
function Case(ctx, state2) {
|
|
15924
16305
|
return (0, import_lib4.$EVENT)(ctx, state2, "Case", Case$0);
|
|
15925
16306
|
}
|
|
15926
|
-
var Catch$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16307
|
+
var Catch$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L150, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15927
16308
|
return { $loc, token: $1 };
|
|
15928
16309
|
});
|
|
15929
16310
|
function Catch(ctx, state2) {
|
|
15930
16311
|
return (0, import_lib4.$EVENT)(ctx, state2, "Catch", Catch$0);
|
|
15931
16312
|
}
|
|
15932
|
-
var Class$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16313
|
+
var Class$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L151, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15933
16314
|
return { $loc, token: $1 };
|
|
15934
16315
|
});
|
|
15935
16316
|
function Class(ctx, state2) {
|
|
@@ -15953,13 +16334,13 @@ ${js}`
|
|
|
15953
16334
|
function CloseBracket(ctx, state2) {
|
|
15954
16335
|
return (0, import_lib4.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
|
|
15955
16336
|
}
|
|
15956
|
-
var CloseParen$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16337
|
+
var CloseParen$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L140, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
|
|
15957
16338
|
return { $loc, token: $1 };
|
|
15958
16339
|
});
|
|
15959
16340
|
function CloseParen(ctx, state2) {
|
|
15960
16341
|
return (0, import_lib4.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
|
|
15961
16342
|
}
|
|
15962
|
-
var CoffeeSubstitutionStart$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16343
|
+
var CoffeeSubstitutionStart$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L152, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
|
|
15963
16344
|
return { $loc, token: "${" };
|
|
15964
16345
|
});
|
|
15965
16346
|
function CoffeeSubstitutionStart(ctx, state2) {
|
|
@@ -15977,37 +16358,37 @@ ${js}`
|
|
|
15977
16358
|
function Comma(ctx, state2) {
|
|
15978
16359
|
return (0, import_lib4.$EVENT)(ctx, state2, "Comma", Comma$0);
|
|
15979
16360
|
}
|
|
15980
|
-
var Comptime$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16361
|
+
var Comptime$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L153, 'Comptime "comptime"'), NonIdContinue, (0, import_lib4.$N)((0, import_lib4.$EXPECT)($L16, 'Comptime ":"'))), function($skip, $loc, $0, $1, $2, $3) {
|
|
15981
16362
|
return { $loc, token: $1 };
|
|
15982
16363
|
});
|
|
15983
16364
|
function Comptime(ctx, state2) {
|
|
15984
16365
|
return (0, import_lib4.$EVENT)(ctx, state2, "Comptime", Comptime$0);
|
|
15985
16366
|
}
|
|
15986
|
-
var ConstructorShorthand$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16367
|
+
var ConstructorShorthand$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L143, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
|
|
15987
16368
|
return { $loc, token: "constructor" };
|
|
15988
16369
|
});
|
|
15989
16370
|
function ConstructorShorthand(ctx, state2) {
|
|
15990
16371
|
return (0, import_lib4.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
|
|
15991
16372
|
}
|
|
15992
|
-
var Declare$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16373
|
+
var Declare$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L154, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15993
16374
|
return { $loc, token: $1 };
|
|
15994
16375
|
});
|
|
15995
16376
|
function Declare(ctx, state2) {
|
|
15996
16377
|
return (0, import_lib4.$EVENT)(ctx, state2, "Declare", Declare$0);
|
|
15997
16378
|
}
|
|
15998
|
-
var Default$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16379
|
+
var Default$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L155, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
15999
16380
|
return { $loc, token: $1 };
|
|
16000
16381
|
});
|
|
16001
16382
|
function Default(ctx, state2) {
|
|
16002
16383
|
return (0, import_lib4.$EVENT)(ctx, state2, "Default", Default$0);
|
|
16003
16384
|
}
|
|
16004
|
-
var Delete$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16385
|
+
var Delete$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L156, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16005
16386
|
return { $loc, token: $1 };
|
|
16006
16387
|
});
|
|
16007
16388
|
function Delete(ctx, state2) {
|
|
16008
16389
|
return (0, import_lib4.$EVENT)(ctx, state2, "Delete", Delete$0);
|
|
16009
16390
|
}
|
|
16010
|
-
var Do$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16391
|
+
var Do$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L157, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16011
16392
|
return { $loc, token: $1 };
|
|
16012
16393
|
});
|
|
16013
16394
|
function Do(ctx, state2) {
|
|
@@ -16027,51 +16408,51 @@ ${js}`
|
|
|
16027
16408
|
function Dot(ctx, state2) {
|
|
16028
16409
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "Dot", Dot$$);
|
|
16029
16410
|
}
|
|
16030
|
-
var DotDot$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16411
|
+
var DotDot$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L158, 'DotDot ".."'), (0, import_lib4.$N)((0, import_lib4.$EXPECT)($L7, 'DotDot "."'))), function($skip, $loc, $0, $1, $2) {
|
|
16031
16412
|
return { $loc, token: $1 };
|
|
16032
16413
|
});
|
|
16033
|
-
var DotDot$1 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16414
|
+
var DotDot$1 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L159, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
|
|
16034
16415
|
return { $loc, token: ".." };
|
|
16035
16416
|
});
|
|
16036
16417
|
var DotDot$$ = [DotDot$0, DotDot$1];
|
|
16037
16418
|
function DotDot(ctx, state2) {
|
|
16038
16419
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
|
|
16039
16420
|
}
|
|
16040
|
-
var DotDotDot$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16421
|
+
var DotDotDot$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L160, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
|
|
16041
16422
|
return { $loc, token: $1 };
|
|
16042
16423
|
});
|
|
16043
|
-
var DotDotDot$1 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16424
|
+
var DotDotDot$1 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L161, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
|
|
16044
16425
|
return { $loc, token: "..." };
|
|
16045
16426
|
});
|
|
16046
16427
|
var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
|
|
16047
16428
|
function DotDotDot(ctx, state2) {
|
|
16048
16429
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "DotDotDot", DotDotDot$$);
|
|
16049
16430
|
}
|
|
16050
|
-
var DoubleColon$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16431
|
+
var DoubleColon$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L162, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
|
|
16051
16432
|
return { $loc, token: $1 };
|
|
16052
16433
|
});
|
|
16053
16434
|
function DoubleColon(ctx, state2) {
|
|
16054
16435
|
return (0, import_lib4.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
|
|
16055
16436
|
}
|
|
16056
|
-
var DoubleColonAsColon$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16437
|
+
var DoubleColonAsColon$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L162, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
|
|
16057
16438
|
return { $loc, token: ":" };
|
|
16058
16439
|
});
|
|
16059
16440
|
function DoubleColonAsColon(ctx, state2) {
|
|
16060
16441
|
return (0, import_lib4.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
|
|
16061
16442
|
}
|
|
16062
|
-
var DoubleQuote$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16443
|
+
var DoubleQuote$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L163, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
16063
16444
|
return { $loc, token: $1 };
|
|
16064
16445
|
});
|
|
16065
16446
|
function DoubleQuote(ctx, state2) {
|
|
16066
16447
|
return (0, import_lib4.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
|
|
16067
16448
|
}
|
|
16068
|
-
var Each$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16449
|
+
var Each$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L164, 'Each "each"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16069
16450
|
return { $loc, token: $1 };
|
|
16070
16451
|
});
|
|
16071
16452
|
function Each(ctx, state2) {
|
|
16072
16453
|
return (0, import_lib4.$EVENT)(ctx, state2, "Each", Each$0);
|
|
16073
16454
|
}
|
|
16074
|
-
var Else$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16455
|
+
var Else$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L165, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16075
16456
|
return { $loc, token: $1 };
|
|
16076
16457
|
});
|
|
16077
16458
|
function Else(ctx, state2) {
|
|
@@ -16083,61 +16464,61 @@ ${js}`
|
|
|
16083
16464
|
function Equals(ctx, state2) {
|
|
16084
16465
|
return (0, import_lib4.$EVENT)(ctx, state2, "Equals", Equals$0);
|
|
16085
16466
|
}
|
|
16086
|
-
var ExclamationPoint$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16467
|
+
var ExclamationPoint$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L166, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
|
|
16087
16468
|
return { $loc, token: $1 };
|
|
16088
16469
|
});
|
|
16089
16470
|
function ExclamationPoint(ctx, state2) {
|
|
16090
16471
|
return (0, import_lib4.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
|
|
16091
16472
|
}
|
|
16092
|
-
var Export$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16473
|
+
var Export$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L167, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16093
16474
|
return { $loc, token: $1 };
|
|
16094
16475
|
});
|
|
16095
16476
|
function Export(ctx, state2) {
|
|
16096
16477
|
return (0, import_lib4.$EVENT)(ctx, state2, "Export", Export$0);
|
|
16097
16478
|
}
|
|
16098
|
-
var Extends$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16479
|
+
var Extends$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L168, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16099
16480
|
return { $loc, token: $1 };
|
|
16100
16481
|
});
|
|
16101
16482
|
function Extends(ctx, state2) {
|
|
16102
16483
|
return (0, import_lib4.$EVENT)(ctx, state2, "Extends", Extends$0);
|
|
16103
16484
|
}
|
|
16104
|
-
var Finally$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16485
|
+
var Finally$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L169, 'Finally "finally"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16105
16486
|
return { $loc, token: $1 };
|
|
16106
16487
|
});
|
|
16107
16488
|
function Finally(ctx, state2) {
|
|
16108
16489
|
return (0, import_lib4.$EVENT)(ctx, state2, "Finally", Finally$0);
|
|
16109
16490
|
}
|
|
16110
|
-
var For$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16491
|
+
var For$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L170, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16111
16492
|
return { $loc, token: $1 };
|
|
16112
16493
|
});
|
|
16113
16494
|
function For(ctx, state2) {
|
|
16114
16495
|
return (0, import_lib4.$EVENT)(ctx, state2, "For", For$0);
|
|
16115
16496
|
}
|
|
16116
|
-
var From$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16497
|
+
var From$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L171, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16117
16498
|
return { $loc, token: $1 };
|
|
16118
16499
|
});
|
|
16119
16500
|
function From(ctx, state2) {
|
|
16120
16501
|
return (0, import_lib4.$EVENT)(ctx, state2, "From", From$0);
|
|
16121
16502
|
}
|
|
16122
|
-
var Function$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16503
|
+
var Function$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L172, 'Function "function"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16123
16504
|
return { $loc, token: $1 };
|
|
16124
16505
|
});
|
|
16125
16506
|
function Function2(ctx, state2) {
|
|
16126
16507
|
return (0, import_lib4.$EVENT)(ctx, state2, "Function", Function$0);
|
|
16127
16508
|
}
|
|
16128
|
-
var GetOrSet$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($
|
|
16509
|
+
var GetOrSet$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L173, 'GetOrSet "get"'), (0, import_lib4.$EXPECT)($L174, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16129
16510
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
16130
16511
|
});
|
|
16131
16512
|
function GetOrSet(ctx, state2) {
|
|
16132
16513
|
return (0, import_lib4.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
|
|
16133
16514
|
}
|
|
16134
|
-
var Hash$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16515
|
+
var Hash$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L175, 'Hash "#"'), function($skip, $loc, $0, $1) {
|
|
16135
16516
|
return { $loc, token: $1 };
|
|
16136
16517
|
});
|
|
16137
16518
|
function Hash(ctx, state2) {
|
|
16138
16519
|
return (0, import_lib4.$EVENT)(ctx, state2, "Hash", Hash$0);
|
|
16139
16520
|
}
|
|
16140
|
-
var If$0 = (0, import_lib4.$TV)((0, import_lib4.$TEXT)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16521
|
+
var If$0 = (0, import_lib4.$TV)((0, import_lib4.$TEXT)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L176, 'If "if"'), NonIdContinue, (0, import_lib4.$E)((0, import_lib4.$EXPECT)($L18, 'If " "')))), function($skip, $loc, $0, $1) {
|
|
16141
16522
|
return { $loc, token: $1 };
|
|
16142
16523
|
});
|
|
16143
16524
|
function If(ctx, state2) {
|
|
@@ -16149,67 +16530,67 @@ ${js}`
|
|
|
16149
16530
|
function Import(ctx, state2) {
|
|
16150
16531
|
return (0, import_lib4.$EVENT)(ctx, state2, "Import", Import$0);
|
|
16151
16532
|
}
|
|
16152
|
-
var In$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16533
|
+
var In$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L177, 'In "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16153
16534
|
return { $loc, token: $1 };
|
|
16154
16535
|
});
|
|
16155
16536
|
function In(ctx, state2) {
|
|
16156
16537
|
return (0, import_lib4.$EVENT)(ctx, state2, "In", In$0);
|
|
16157
16538
|
}
|
|
16158
|
-
var Infer$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16539
|
+
var Infer$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L178, 'Infer "infer"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16159
16540
|
return { $loc, token: $1 };
|
|
16160
16541
|
});
|
|
16161
16542
|
function Infer(ctx, state2) {
|
|
16162
16543
|
return (0, import_lib4.$EVENT)(ctx, state2, "Infer", Infer$0);
|
|
16163
16544
|
}
|
|
16164
|
-
var LetOrConst$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($
|
|
16545
|
+
var LetOrConst$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L179, 'LetOrConst "let"'), (0, import_lib4.$EXPECT)($L180, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16165
16546
|
return { $loc, token: $1 };
|
|
16166
16547
|
});
|
|
16167
16548
|
function LetOrConst(ctx, state2) {
|
|
16168
16549
|
return (0, import_lib4.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
|
|
16169
16550
|
}
|
|
16170
|
-
var Const$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16551
|
+
var Const$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L180, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16171
16552
|
return { $loc, token: $1 };
|
|
16172
16553
|
});
|
|
16173
16554
|
function Const(ctx, state2) {
|
|
16174
16555
|
return (0, import_lib4.$EVENT)(ctx, state2, "Const", Const$0);
|
|
16175
16556
|
}
|
|
16176
|
-
var Is$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16557
|
+
var Is$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L181, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16177
16558
|
return { $loc, token: $1 };
|
|
16178
16559
|
});
|
|
16179
16560
|
function Is(ctx, state2) {
|
|
16180
16561
|
return (0, import_lib4.$EVENT)(ctx, state2, "Is", Is$0);
|
|
16181
16562
|
}
|
|
16182
|
-
var LetOrConstOrVar$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($
|
|
16563
|
+
var LetOrConstOrVar$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L179, 'LetOrConstOrVar "let"'), (0, import_lib4.$EXPECT)($L180, 'LetOrConstOrVar "const"'), (0, import_lib4.$EXPECT)($L182, 'LetOrConstOrVar "var"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16183
16564
|
return { $loc, token: $1 };
|
|
16184
16565
|
});
|
|
16185
16566
|
function LetOrConstOrVar(ctx, state2) {
|
|
16186
16567
|
return (0, import_lib4.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
|
|
16187
16568
|
}
|
|
16188
|
-
var Like$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16569
|
+
var Like$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L183, 'Like "like"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16189
16570
|
return { $loc, token: $1 };
|
|
16190
16571
|
});
|
|
16191
16572
|
function Like(ctx, state2) {
|
|
16192
16573
|
return (0, import_lib4.$EVENT)(ctx, state2, "Like", Like$0);
|
|
16193
16574
|
}
|
|
16194
|
-
var Loop$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16575
|
+
var Loop$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L184, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16195
16576
|
return { $loc, token: "while" };
|
|
16196
16577
|
});
|
|
16197
16578
|
function Loop(ctx, state2) {
|
|
16198
16579
|
return (0, import_lib4.$EVENT)(ctx, state2, "Loop", Loop$0);
|
|
16199
16580
|
}
|
|
16200
|
-
var New$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16581
|
+
var New$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L185, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16201
16582
|
return { $loc, token: $1 };
|
|
16202
16583
|
});
|
|
16203
16584
|
function New(ctx, state2) {
|
|
16204
16585
|
return (0, import_lib4.$EVENT)(ctx, state2, "New", New$0);
|
|
16205
16586
|
}
|
|
16206
|
-
var Not$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16587
|
+
var Not$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L186, 'Not "not"'), NonIdContinue, (0, import_lib4.$N)((0, import_lib4.$S)((0, import_lib4.$E)(_), (0, import_lib4.$EXPECT)($L16, 'Not ":"')))), function($skip, $loc, $0, $1, $2, $3) {
|
|
16207
16588
|
return { $loc, token: "!" };
|
|
16208
16589
|
});
|
|
16209
16590
|
function Not(ctx, state2) {
|
|
16210
16591
|
return (0, import_lib4.$EVENT)(ctx, state2, "Not", Not$0);
|
|
16211
16592
|
}
|
|
16212
|
-
var Of$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16593
|
+
var Of$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L187, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16213
16594
|
return { $loc, token: $1 };
|
|
16214
16595
|
});
|
|
16215
16596
|
function Of(ctx, state2) {
|
|
@@ -16227,7 +16608,7 @@ ${js}`
|
|
|
16227
16608
|
function OpenBrace(ctx, state2) {
|
|
16228
16609
|
return (0, import_lib4.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
|
|
16229
16610
|
}
|
|
16230
|
-
var OpenBracket$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16611
|
+
var OpenBracket$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L188, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
16231
16612
|
return { $loc, token: $1 };
|
|
16232
16613
|
});
|
|
16233
16614
|
function OpenBracket(ctx, state2) {
|
|
@@ -16239,49 +16620,49 @@ ${js}`
|
|
|
16239
16620
|
function OpenParen(ctx, state2) {
|
|
16240
16621
|
return (0, import_lib4.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
|
|
16241
16622
|
}
|
|
16242
|
-
var Operator$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16623
|
+
var Operator$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L189, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16243
16624
|
return { $loc, token: $1 };
|
|
16244
16625
|
});
|
|
16245
16626
|
function Operator(ctx, state2) {
|
|
16246
16627
|
return (0, import_lib4.$EVENT)(ctx, state2, "Operator", Operator$0);
|
|
16247
16628
|
}
|
|
16248
|
-
var Override$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16629
|
+
var Override$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L190, 'Override "override"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16249
16630
|
return { $loc, token: $1, ts: true };
|
|
16250
16631
|
});
|
|
16251
16632
|
function Override(ctx, state2) {
|
|
16252
16633
|
return (0, import_lib4.$EVENT)(ctx, state2, "Override", Override$0);
|
|
16253
16634
|
}
|
|
16254
|
-
var Own$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16635
|
+
var Own$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L191, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16255
16636
|
return { $loc, token: $1 };
|
|
16256
16637
|
});
|
|
16257
16638
|
function Own(ctx, state2) {
|
|
16258
16639
|
return (0, import_lib4.$EVENT)(ctx, state2, "Own", Own$0);
|
|
16259
16640
|
}
|
|
16260
|
-
var Public$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16641
|
+
var Public$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L192, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16261
16642
|
return { $loc, token: $1 };
|
|
16262
16643
|
});
|
|
16263
16644
|
function Public(ctx, state2) {
|
|
16264
16645
|
return (0, import_lib4.$EVENT)(ctx, state2, "Public", Public$0);
|
|
16265
16646
|
}
|
|
16266
|
-
var Private$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16647
|
+
var Private$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L193, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16267
16648
|
return { $loc, token: $1 };
|
|
16268
16649
|
});
|
|
16269
16650
|
function Private(ctx, state2) {
|
|
16270
16651
|
return (0, import_lib4.$EVENT)(ctx, state2, "Private", Private$0);
|
|
16271
16652
|
}
|
|
16272
|
-
var Protected$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16653
|
+
var Protected$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L194, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16273
16654
|
return { $loc, token: $1 };
|
|
16274
16655
|
});
|
|
16275
16656
|
function Protected(ctx, state2) {
|
|
16276
16657
|
return (0, import_lib4.$EVENT)(ctx, state2, "Protected", Protected$0);
|
|
16277
16658
|
}
|
|
16278
|
-
var Pipe$0 = (0, import_lib4.$TV)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($
|
|
16659
|
+
var Pipe$0 = (0, import_lib4.$TV)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L195, 'Pipe "||>"'), (0, import_lib4.$EXPECT)($L196, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
|
|
16279
16660
|
return { $loc, token: "||>" };
|
|
16280
16661
|
});
|
|
16281
|
-
var Pipe$1 = (0, import_lib4.$TV)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($
|
|
16662
|
+
var Pipe$1 = (0, import_lib4.$TV)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L197, 'Pipe "|>="'), (0, import_lib4.$EXPECT)($L198, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
|
|
16282
16663
|
return { $loc, token: "|>=" };
|
|
16283
16664
|
});
|
|
16284
|
-
var Pipe$2 = (0, import_lib4.$TV)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($
|
|
16665
|
+
var Pipe$2 = (0, import_lib4.$TV)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L199, 'Pipe "|>"'), (0, import_lib4.$EXPECT)($L200, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
|
|
16285
16666
|
return { $loc, token: "|>" };
|
|
16286
16667
|
});
|
|
16287
16668
|
var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
|
|
@@ -16294,19 +16675,19 @@ ${js}`
|
|
|
16294
16675
|
function QuestionMark(ctx, state2) {
|
|
16295
16676
|
return (0, import_lib4.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
|
|
16296
16677
|
}
|
|
16297
|
-
var Readonly$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16678
|
+
var Readonly$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L201, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16298
16679
|
return { $loc, token: $1, ts: true };
|
|
16299
16680
|
});
|
|
16300
16681
|
function Readonly(ctx, state2) {
|
|
16301
16682
|
return (0, import_lib4.$EVENT)(ctx, state2, "Readonly", Readonly$0);
|
|
16302
16683
|
}
|
|
16303
|
-
var Return$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16684
|
+
var Return$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L202, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16304
16685
|
return { $loc, token: $1 };
|
|
16305
16686
|
});
|
|
16306
16687
|
function Return(ctx, state2) {
|
|
16307
16688
|
return (0, import_lib4.$EVENT)(ctx, state2, "Return", Return$0);
|
|
16308
16689
|
}
|
|
16309
|
-
var Satisfies$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16690
|
+
var Satisfies$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L203, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16310
16691
|
return { $loc, token: $1 };
|
|
16311
16692
|
});
|
|
16312
16693
|
function Satisfies(ctx, state2) {
|
|
@@ -16318,7 +16699,7 @@ ${js}`
|
|
|
16318
16699
|
function Semicolon(ctx, state2) {
|
|
16319
16700
|
return (0, import_lib4.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
|
|
16320
16701
|
}
|
|
16321
|
-
var SingleQuote$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16702
|
+
var SingleQuote$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L204, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
16322
16703
|
return { $loc, token: $1 };
|
|
16323
16704
|
});
|
|
16324
16705
|
function SingleQuote(ctx, state2) {
|
|
@@ -16330,149 +16711,149 @@ ${js}`
|
|
|
16330
16711
|
function Star(ctx, state2) {
|
|
16331
16712
|
return (0, import_lib4.$EVENT)(ctx, state2, "Star", Star$0);
|
|
16332
16713
|
}
|
|
16333
|
-
var Static$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16714
|
+
var Static$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L205, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16334
16715
|
return { $loc, token: $1 };
|
|
16335
16716
|
});
|
|
16336
|
-
var Static$1 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16717
|
+
var Static$1 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L143, 'Static "@"'), (0, import_lib4.$N)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L4, 'Static "("'), (0, import_lib4.$EXPECT)($L143, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
|
|
16337
16718
|
return { $loc, token: "static " };
|
|
16338
16719
|
});
|
|
16339
16720
|
var Static$$ = [Static$0, Static$1];
|
|
16340
16721
|
function Static(ctx, state2) {
|
|
16341
16722
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "Static", Static$$);
|
|
16342
16723
|
}
|
|
16343
|
-
var SubstitutionStart$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16724
|
+
var SubstitutionStart$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L206, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
16344
16725
|
return { $loc, token: $1 };
|
|
16345
16726
|
});
|
|
16346
16727
|
function SubstitutionStart(ctx, state2) {
|
|
16347
16728
|
return (0, import_lib4.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
|
|
16348
16729
|
}
|
|
16349
|
-
var Super$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16730
|
+
var Super$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L207, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16350
16731
|
return { $loc, token: $1 };
|
|
16351
16732
|
});
|
|
16352
16733
|
function Super(ctx, state2) {
|
|
16353
16734
|
return (0, import_lib4.$EVENT)(ctx, state2, "Super", Super$0);
|
|
16354
16735
|
}
|
|
16355
|
-
var Switch$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16736
|
+
var Switch$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L208, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16356
16737
|
return { $loc, token: $1 };
|
|
16357
16738
|
});
|
|
16358
16739
|
function Switch(ctx, state2) {
|
|
16359
16740
|
return (0, import_lib4.$EVENT)(ctx, state2, "Switch", Switch$0);
|
|
16360
16741
|
}
|
|
16361
|
-
var Target$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16742
|
+
var Target$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L209, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16362
16743
|
return { $loc, token: $1 };
|
|
16363
16744
|
});
|
|
16364
16745
|
function Target(ctx, state2) {
|
|
16365
16746
|
return (0, import_lib4.$EVENT)(ctx, state2, "Target", Target$0);
|
|
16366
16747
|
}
|
|
16367
|
-
var Then$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(__, (0, import_lib4.$EXPECT)($
|
|
16748
|
+
var Then$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(__, (0, import_lib4.$EXPECT)($L210, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
16368
16749
|
return { $loc, token: "" };
|
|
16369
16750
|
});
|
|
16370
16751
|
function Then(ctx, state2) {
|
|
16371
16752
|
return (0, import_lib4.$EVENT)(ctx, state2, "Then", Then$0);
|
|
16372
16753
|
}
|
|
16373
|
-
var This$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16754
|
+
var This$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L211, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16374
16755
|
return { $loc, token: $1 };
|
|
16375
16756
|
});
|
|
16376
16757
|
function This(ctx, state2) {
|
|
16377
16758
|
return (0, import_lib4.$EVENT)(ctx, state2, "This", This$0);
|
|
16378
16759
|
}
|
|
16379
|
-
var Throw$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16760
|
+
var Throw$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L212, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16380
16761
|
return { $loc, token: $1 };
|
|
16381
16762
|
});
|
|
16382
16763
|
function Throw(ctx, state2) {
|
|
16383
16764
|
return (0, import_lib4.$EVENT)(ctx, state2, "Throw", Throw$0);
|
|
16384
16765
|
}
|
|
16385
|
-
var TripleDoubleQuote$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16766
|
+
var TripleDoubleQuote$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L213, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
16386
16767
|
return { $loc, token: "`" };
|
|
16387
16768
|
});
|
|
16388
16769
|
function TripleDoubleQuote(ctx, state2) {
|
|
16389
16770
|
return (0, import_lib4.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
|
|
16390
16771
|
}
|
|
16391
|
-
var TripleSingleQuote$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16772
|
+
var TripleSingleQuote$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L214, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
16392
16773
|
return { $loc, token: "`" };
|
|
16393
16774
|
});
|
|
16394
16775
|
function TripleSingleQuote(ctx, state2) {
|
|
16395
16776
|
return (0, import_lib4.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
|
|
16396
16777
|
}
|
|
16397
|
-
var TripleSlash$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16778
|
+
var TripleSlash$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L215, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
16398
16779
|
return { $loc, token: "/" };
|
|
16399
16780
|
});
|
|
16400
16781
|
function TripleSlash(ctx, state2) {
|
|
16401
16782
|
return (0, import_lib4.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
|
|
16402
16783
|
}
|
|
16403
|
-
var TripleTick$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
16784
|
+
var TripleTick$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L216, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
16404
16785
|
return { $loc, token: "`" };
|
|
16405
16786
|
});
|
|
16406
16787
|
function TripleTick(ctx, state2) {
|
|
16407
16788
|
return (0, import_lib4.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
|
|
16408
16789
|
}
|
|
16409
|
-
var Try$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16790
|
+
var Try$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L217, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16410
16791
|
return { $loc, token: $1 };
|
|
16411
16792
|
});
|
|
16412
16793
|
function Try(ctx, state2) {
|
|
16413
16794
|
return (0, import_lib4.$EVENT)(ctx, state2, "Try", Try$0);
|
|
16414
16795
|
}
|
|
16415
|
-
var Typeof$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16796
|
+
var Typeof$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L218, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16416
16797
|
return { $loc, token: $1 };
|
|
16417
16798
|
});
|
|
16418
16799
|
function Typeof(ctx, state2) {
|
|
16419
16800
|
return (0, import_lib4.$EVENT)(ctx, state2, "Typeof", Typeof$0);
|
|
16420
16801
|
}
|
|
16421
|
-
var Undefined$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16802
|
+
var Undefined$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L219, 'Undefined "undefined"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16422
16803
|
return { $loc, token: $1 };
|
|
16423
16804
|
});
|
|
16424
16805
|
function Undefined(ctx, state2) {
|
|
16425
16806
|
return (0, import_lib4.$EVENT)(ctx, state2, "Undefined", Undefined$0);
|
|
16426
16807
|
}
|
|
16427
|
-
var Unless$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16808
|
+
var Unless$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L220, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16428
16809
|
return { $loc, token: $1, negated: true };
|
|
16429
16810
|
});
|
|
16430
16811
|
function Unless(ctx, state2) {
|
|
16431
16812
|
return (0, import_lib4.$EVENT)(ctx, state2, "Unless", Unless$0);
|
|
16432
16813
|
}
|
|
16433
|
-
var Until$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16814
|
+
var Until$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L221, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16434
16815
|
return { $loc, token: $1, negated: true };
|
|
16435
16816
|
});
|
|
16436
16817
|
function Until(ctx, state2) {
|
|
16437
16818
|
return (0, import_lib4.$EVENT)(ctx, state2, "Until", Until$0);
|
|
16438
16819
|
}
|
|
16439
|
-
var Using$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16820
|
+
var Using$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L222, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16440
16821
|
return { $loc, token: $1 };
|
|
16441
16822
|
});
|
|
16442
16823
|
function Using(ctx, state2) {
|
|
16443
16824
|
return (0, import_lib4.$EVENT)(ctx, state2, "Using", Using$0);
|
|
16444
16825
|
}
|
|
16445
|
-
var Var$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16826
|
+
var Var$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L182, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16446
16827
|
return { $loc, token: $1 };
|
|
16447
16828
|
});
|
|
16448
16829
|
function Var(ctx, state2) {
|
|
16449
16830
|
return (0, import_lib4.$EVENT)(ctx, state2, "Var", Var$0);
|
|
16450
16831
|
}
|
|
16451
|
-
var Void$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16832
|
+
var Void$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L223, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16452
16833
|
return { $loc, token: $1 };
|
|
16453
16834
|
});
|
|
16454
16835
|
function Void(ctx, state2) {
|
|
16455
16836
|
return (0, import_lib4.$EVENT)(ctx, state2, "Void", Void$0);
|
|
16456
16837
|
}
|
|
16457
|
-
var When$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16838
|
+
var When$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L224, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16458
16839
|
return { $loc, token: "case" };
|
|
16459
16840
|
});
|
|
16460
16841
|
function When(ctx, state2) {
|
|
16461
16842
|
return (0, import_lib4.$EVENT)(ctx, state2, "When", When$0);
|
|
16462
16843
|
}
|
|
16463
|
-
var While$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16844
|
+
var While$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L225, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16464
16845
|
return { $loc, token: $1 };
|
|
16465
16846
|
});
|
|
16466
16847
|
function While(ctx, state2) {
|
|
16467
16848
|
return (0, import_lib4.$EVENT)(ctx, state2, "While", While$0);
|
|
16468
16849
|
}
|
|
16469
|
-
var With$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16850
|
+
var With$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L131, 'With "with"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16470
16851
|
return { $loc, token: $1 };
|
|
16471
16852
|
});
|
|
16472
16853
|
function With(ctx, state2) {
|
|
16473
16854
|
return (0, import_lib4.$EVENT)(ctx, state2, "With", With$0);
|
|
16474
16855
|
}
|
|
16475
|
-
var Yield$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16856
|
+
var Yield$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L226, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16476
16857
|
return { $loc, token: $1, type: "Yield" };
|
|
16477
16858
|
});
|
|
16478
16859
|
function Yield(ctx, state2) {
|
|
@@ -16491,7 +16872,7 @@ ${js}`
|
|
|
16491
16872
|
],
|
|
16492
16873
|
jsxChildren: [$1].concat($2.map(([, tag]) => tag))
|
|
16493
16874
|
};
|
|
16494
|
-
const type = typeOfJSX(jsx, config
|
|
16875
|
+
const type = typeOfJSX(jsx, config);
|
|
16495
16876
|
return type ? [
|
|
16496
16877
|
{ ts: true, children: ["("] },
|
|
16497
16878
|
jsx,
|
|
@@ -16551,7 +16932,7 @@ ${js}`
|
|
|
16551
16932
|
function JSXElement(ctx, state2) {
|
|
16552
16933
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
|
|
16553
16934
|
}
|
|
16554
|
-
var JSXSelfClosingElement$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L19, 'JSXSelfClosingElement "<"'), JSXElementName, (0, import_lib4.$E)(TypeArguments), (0, import_lib4.$E)(JSXAttributes), (0, import_lib4.$E)(Whitespace), (0, import_lib4.$EXPECT)($
|
|
16935
|
+
var JSXSelfClosingElement$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L19, 'JSXSelfClosingElement "<"'), JSXElementName, (0, import_lib4.$E)(TypeArguments), (0, import_lib4.$E)(JSXAttributes), (0, import_lib4.$E)(Whitespace), (0, import_lib4.$EXPECT)($L227, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
16555
16936
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
16556
16937
|
});
|
|
16557
16938
|
function JSXSelfClosingElement(ctx, state2) {
|
|
@@ -16585,7 +16966,7 @@ ${js}`
|
|
|
16585
16966
|
function JSXOptionalClosingElement(ctx, state2) {
|
|
16586
16967
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
|
|
16587
16968
|
}
|
|
16588
|
-
var JSXClosingElement$0 = (0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
16969
|
+
var JSXClosingElement$0 = (0, import_lib4.$S)((0, import_lib4.$EXPECT)($L228, 'JSXClosingElement "</"'), (0, import_lib4.$E)(Whitespace), JSXElementName, (0, import_lib4.$E)(Whitespace), (0, import_lib4.$EXPECT)($L45, 'JSXClosingElement ">"'));
|
|
16589
16970
|
function JSXClosingElement(ctx, state2) {
|
|
16590
16971
|
return (0, import_lib4.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
|
|
16591
16972
|
}
|
|
@@ -16606,7 +16987,7 @@ ${js}`
|
|
|
16606
16987
|
];
|
|
16607
16988
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
16608
16989
|
});
|
|
16609
|
-
var JSXFragment$1 = (0, import_lib4.$TS)((0, import_lib4.$S)(CoffeeJSXEnabled, (0, import_lib4.$EXPECT)($
|
|
16990
|
+
var JSXFragment$1 = (0, import_lib4.$TS)((0, import_lib4.$S)(CoffeeJSXEnabled, (0, import_lib4.$EXPECT)($L229, 'JSXFragment "<>"'), (0, import_lib4.$E)(JSXChildren), (0, import_lib4.$E)(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
16610
16991
|
var children = $3;
|
|
16611
16992
|
$0 = $0.slice(1);
|
|
16612
16993
|
return {
|
|
@@ -16619,7 +17000,7 @@ ${js}`
|
|
|
16619
17000
|
function JSXFragment(ctx, state2) {
|
|
16620
17001
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
|
|
16621
17002
|
}
|
|
16622
|
-
var PushJSXOpeningFragment$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
17003
|
+
var PushJSXOpeningFragment$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L229, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
16623
17004
|
state.JSXTagStack.push("");
|
|
16624
17005
|
return $1;
|
|
16625
17006
|
});
|
|
@@ -16636,11 +17017,11 @@ ${js}`
|
|
|
16636
17017
|
function JSXOptionalClosingFragment(ctx, state2) {
|
|
16637
17018
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
|
|
16638
17019
|
}
|
|
16639
|
-
var JSXClosingFragment$0 = (0, import_lib4.$EXPECT)($
|
|
17020
|
+
var JSXClosingFragment$0 = (0, import_lib4.$EXPECT)($L230, 'JSXClosingFragment "</>"');
|
|
16640
17021
|
function JSXClosingFragment(ctx, state2) {
|
|
16641
17022
|
return (0, import_lib4.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
|
|
16642
17023
|
}
|
|
16643
|
-
var JSXElementName$0 = (0, import_lib4.$TV)((0, import_lib4.$Y)((0, import_lib4.$S)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($
|
|
17024
|
+
var JSXElementName$0 = (0, import_lib4.$TV)((0, import_lib4.$Y)((0, import_lib4.$S)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L175, 'JSXElementName "#"'), Dot), JSXShorthandString)), function($skip, $loc, $0, $1) {
|
|
16644
17025
|
return config.defaultElement;
|
|
16645
17026
|
});
|
|
16646
17027
|
var JSXElementName$1 = (0, import_lib4.$TEXT)((0, import_lib4.$S)(JSXIdentifierName, (0, import_lib4.$C)((0, import_lib4.$S)(Colon, JSXIdentifierName), (0, import_lib4.$Q)((0, import_lib4.$S)(Dot, JSXIdentifierName)))));
|
|
@@ -16818,7 +17199,7 @@ ${js}`
|
|
|
16818
17199
|
}
|
|
16819
17200
|
return $skip;
|
|
16820
17201
|
});
|
|
16821
|
-
var JSXAttribute$5 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
17202
|
+
var JSXAttribute$5 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L175, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
16822
17203
|
return [" ", "id=", $2];
|
|
16823
17204
|
});
|
|
16824
17205
|
var JSXAttribute$6 = (0, import_lib4.$TS)((0, import_lib4.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
@@ -17163,7 +17544,7 @@ ${js}`
|
|
|
17163
17544
|
function JSXChildGeneral(ctx, state2) {
|
|
17164
17545
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
|
|
17165
17546
|
}
|
|
17166
|
-
var JSXComment$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
17547
|
+
var JSXComment$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L231, 'JSXComment "<!--"'), JSXCommentContent, (0, import_lib4.$EXPECT)($L232, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
|
|
17167
17548
|
return ["{/*", $2, "*/}"];
|
|
17168
17549
|
});
|
|
17169
17550
|
function JSXComment(ctx, state2) {
|
|
@@ -17451,37 +17832,37 @@ ${js}`
|
|
|
17451
17832
|
function InterfaceExtendsTarget(ctx, state2) {
|
|
17452
17833
|
return (0, import_lib4.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
|
|
17453
17834
|
}
|
|
17454
|
-
var TypeKeyword$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
17835
|
+
var TypeKeyword$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L233, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17455
17836
|
return { $loc, token: $1 };
|
|
17456
17837
|
});
|
|
17457
17838
|
function TypeKeyword(ctx, state2) {
|
|
17458
17839
|
return (0, import_lib4.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
|
|
17459
17840
|
}
|
|
17460
|
-
var Enum$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
17841
|
+
var Enum$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L234, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17461
17842
|
return { $loc, token: $1 };
|
|
17462
17843
|
});
|
|
17463
17844
|
function Enum(ctx, state2) {
|
|
17464
17845
|
return (0, import_lib4.$EVENT)(ctx, state2, "Enum", Enum$0);
|
|
17465
17846
|
}
|
|
17466
|
-
var Interface$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
17847
|
+
var Interface$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L235, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17467
17848
|
return { $loc, token: $1 };
|
|
17468
17849
|
});
|
|
17469
17850
|
function Interface(ctx, state2) {
|
|
17470
17851
|
return (0, import_lib4.$EVENT)(ctx, state2, "Interface", Interface$0);
|
|
17471
17852
|
}
|
|
17472
|
-
var Global$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
17853
|
+
var Global$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L236, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17473
17854
|
return { $loc, token: $1 };
|
|
17474
17855
|
});
|
|
17475
17856
|
function Global(ctx, state2) {
|
|
17476
17857
|
return (0, import_lib4.$EVENT)(ctx, state2, "Global", Global$0);
|
|
17477
17858
|
}
|
|
17478
|
-
var Module$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
17859
|
+
var Module$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L237, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17479
17860
|
return { $loc, token: $1 };
|
|
17480
17861
|
});
|
|
17481
17862
|
function Module(ctx, state2) {
|
|
17482
17863
|
return (0, import_lib4.$EVENT)(ctx, state2, "Module", Module$0);
|
|
17483
17864
|
}
|
|
17484
|
-
var Namespace$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
17865
|
+
var Namespace$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L238, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17485
17866
|
return { $loc, token: $1 };
|
|
17486
17867
|
});
|
|
17487
17868
|
function Namespace(ctx, state2) {
|
|
@@ -17795,14 +18176,14 @@ ${js}`
|
|
|
17795
18176
|
function ReturnTypeSuffix(ctx, state2) {
|
|
17796
18177
|
return (0, import_lib4.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
|
|
17797
18178
|
}
|
|
17798
|
-
var ReturnType$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$E)((0, import_lib4.$S)(__, (0, import_lib4.$EXPECT)($
|
|
18179
|
+
var ReturnType$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$E)((0, import_lib4.$S)(__, (0, import_lib4.$EXPECT)($L239, 'ReturnType "asserts"'), NonIdContinue)), ForbidIndentedApplication, (0, import_lib4.$E)(TypePredicate), RestoreIndentedApplication), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
17799
18180
|
var asserts = $1;
|
|
17800
18181
|
var t = $3;
|
|
17801
18182
|
if (!t)
|
|
17802
18183
|
return $skip;
|
|
17803
18184
|
if (asserts) {
|
|
17804
18185
|
t = {
|
|
17805
|
-
type: "
|
|
18186
|
+
type: "TypeAsserts",
|
|
17806
18187
|
t,
|
|
17807
18188
|
children: [asserts[0], asserts[1], t],
|
|
17808
18189
|
ts: true
|
|
@@ -17896,8 +18277,8 @@ ${js}`
|
|
|
17896
18277
|
function TypeUnarySuffix(ctx, state2) {
|
|
17897
18278
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
|
|
17898
18279
|
}
|
|
17899
|
-
var TypeUnaryOp$0 = (0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
17900
|
-
var TypeUnaryOp$1 = (0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
18280
|
+
var TypeUnaryOp$0 = (0, import_lib4.$S)((0, import_lib4.$EXPECT)($L240, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
18281
|
+
var TypeUnaryOp$1 = (0, import_lib4.$S)((0, import_lib4.$EXPECT)($L201, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
17901
18282
|
var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
|
|
17902
18283
|
function TypeUnaryOp(ctx, state2) {
|
|
17903
18284
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
|
|
@@ -17927,7 +18308,7 @@ ${js}`
|
|
|
17927
18308
|
function TypeIndexedAccess(ctx, state2) {
|
|
17928
18309
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
|
|
17929
18310
|
}
|
|
17930
|
-
var UnknownAlias$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
18311
|
+
var UnknownAlias$0 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L241, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
|
|
17931
18312
|
return { $loc, token: "unknown" };
|
|
17932
18313
|
});
|
|
17933
18314
|
function UnknownAlias(ctx, state2) {
|
|
@@ -17998,12 +18379,17 @@ ${js}`
|
|
|
17998
18379
|
function ImportType(ctx, state2) {
|
|
17999
18380
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "ImportType", ImportType$$);
|
|
18000
18381
|
}
|
|
18001
|
-
var TypeTuple$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(OpenBracket, AllowAll, (0, import_lib4.$E)(
|
|
18002
|
-
|
|
18382
|
+
var TypeTuple$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(OpenBracket, AllowAll, (0, import_lib4.$E)(TypeTupleContent), RestoreAll, __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
18383
|
+
var open = $1;
|
|
18384
|
+
var elements = $3;
|
|
18385
|
+
var ws = $5;
|
|
18386
|
+
var close = $6;
|
|
18387
|
+
if (!elements)
|
|
18003
18388
|
return $skip;
|
|
18004
18389
|
return {
|
|
18005
18390
|
type: "TypeTuple",
|
|
18006
|
-
|
|
18391
|
+
elements,
|
|
18392
|
+
children: [open, elements, ws, close]
|
|
18007
18393
|
};
|
|
18008
18394
|
});
|
|
18009
18395
|
function TypeTuple(ctx, state2) {
|
|
@@ -18065,19 +18451,28 @@ ${js}`
|
|
|
18065
18451
|
message: "... both before and after identifier"
|
|
18066
18452
|
}];
|
|
18067
18453
|
}
|
|
18068
|
-
return
|
|
18454
|
+
return {
|
|
18455
|
+
type: "TypeElement",
|
|
18456
|
+
name,
|
|
18457
|
+
t: type,
|
|
18458
|
+
children: [ws, dots, name, colon, type]
|
|
18459
|
+
};
|
|
18069
18460
|
});
|
|
18070
18461
|
var TypeElement$1 = (0, import_lib4.$S)(__, DotDotDot, __, Type);
|
|
18071
18462
|
var TypeElement$2 = (0, import_lib4.$TS)((0, import_lib4.$S)(Type, (0, import_lib4.$E)((0, import_lib4.$S)((0, import_lib4.$E)(_), DotDotDot))), function($skip, $loc, $0, $1, $2) {
|
|
18072
18463
|
var type = $1;
|
|
18073
18464
|
var spaceDots = $2;
|
|
18074
|
-
if (
|
|
18075
|
-
|
|
18076
|
-
|
|
18077
|
-
|
|
18078
|
-
|
|
18079
|
-
|
|
18080
|
-
return
|
|
18465
|
+
if (spaceDots) {
|
|
18466
|
+
const [space, dots] = spaceDots;
|
|
18467
|
+
const ws = getTrimmingSpace(type);
|
|
18468
|
+
spaceDots = [ws, dots, space];
|
|
18469
|
+
type = trimFirstSpace(type);
|
|
18470
|
+
}
|
|
18471
|
+
return {
|
|
18472
|
+
type: "TypeElement",
|
|
18473
|
+
t: type,
|
|
18474
|
+
children: [spaceDots, type]
|
|
18475
|
+
};
|
|
18081
18476
|
});
|
|
18082
18477
|
var TypeElement$$ = [TypeElement$0, TypeElement$1, TypeElement$2];
|
|
18083
18478
|
function TypeElement(ctx, state2) {
|
|
@@ -18306,13 +18701,13 @@ ${js}`
|
|
|
18306
18701
|
return num;
|
|
18307
18702
|
return $0;
|
|
18308
18703
|
});
|
|
18309
|
-
var TypeLiteral$3 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
18704
|
+
var TypeLiteral$3 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L223, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18310
18705
|
return { type: "VoidType", $loc, token: $1 };
|
|
18311
18706
|
});
|
|
18312
|
-
var TypeLiteral$4 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
18707
|
+
var TypeLiteral$4 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L242, 'TypeLiteral "unique"'), _, (0, import_lib4.$EXPECT)($L243, 'TypeLiteral "symbol"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
18313
18708
|
return { type: "UniqueSymbolType", children: $0 };
|
|
18314
18709
|
});
|
|
18315
|
-
var TypeLiteral$5 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($
|
|
18710
|
+
var TypeLiteral$5 = (0, import_lib4.$TV)((0, import_lib4.$EXPECT)($L244, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
18316
18711
|
return { $loc, token: "[]" };
|
|
18317
18712
|
});
|
|
18318
18713
|
var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
|
|
@@ -18331,7 +18726,7 @@ ${js}`
|
|
|
18331
18726
|
var InlineInterfacePropertyDelimiter$1 = (0, import_lib4.$T)((0, import_lib4.$S)((0, import_lib4.$Y)((0, import_lib4.$S)(SameLineOrIndentedFurther, InlineBasicInterfaceProperty)), InsertComma), function(value) {
|
|
18332
18727
|
return value[1];
|
|
18333
18728
|
});
|
|
18334
|
-
var InlineInterfacePropertyDelimiter$2 = (0, import_lib4.$Y)((0, import_lib4.$S)(__, (0, import_lib4.$C)((0, import_lib4.$EXPECT)($L16, 'InlineInterfacePropertyDelimiter ":"'), (0, import_lib4.$EXPECT)($
|
|
18729
|
+
var InlineInterfacePropertyDelimiter$2 = (0, import_lib4.$Y)((0, import_lib4.$S)(__, (0, import_lib4.$C)((0, import_lib4.$EXPECT)($L16, 'InlineInterfacePropertyDelimiter ":"'), (0, import_lib4.$EXPECT)($L140, 'InlineInterfacePropertyDelimiter ")"'), (0, import_lib4.$EXPECT)($L46, 'InlineInterfacePropertyDelimiter "]"'), (0, import_lib4.$EXPECT)($L37, 'InlineInterfacePropertyDelimiter "}"'))));
|
|
18335
18730
|
var InlineInterfacePropertyDelimiter$3 = (0, import_lib4.$Y)(EOS);
|
|
18336
18731
|
var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
|
|
18337
18732
|
function InlineInterfacePropertyDelimiter(ctx, state2) {
|
|
@@ -18347,31 +18742,54 @@ ${js}`
|
|
|
18347
18742
|
function TypeBinaryOp(ctx, state2) {
|
|
18348
18743
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "TypeBinaryOp", TypeBinaryOp$$);
|
|
18349
18744
|
}
|
|
18350
|
-
var TypeFunction$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$E)((0, import_lib4.$S)(Abstract, (0, import_lib4.$E)(_))), (0, import_lib4.$E)((0, import_lib4.$S)(New, (0, import_lib4.$E)(_))), Parameters, __,
|
|
18351
|
-
var
|
|
18352
|
-
|
|
18353
|
-
|
|
18745
|
+
var TypeFunction$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$E)((0, import_lib4.$S)(Abstract, (0, import_lib4.$E)(_))), (0, import_lib4.$E)((0, import_lib4.$S)(Async, (0, import_lib4.$E)(_))), (0, import_lib4.$E)((0, import_lib4.$S)(New, (0, import_lib4.$E)(_))), Parameters, __, TypeFunctionArrow, (0, import_lib4.$C)(ReturnType, Loc)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
|
|
18746
|
+
var abstract = $1;
|
|
18747
|
+
var async = $2;
|
|
18748
|
+
var new_ = $3;
|
|
18749
|
+
var returnType = $7;
|
|
18750
|
+
const children = [abstract, ...$0.slice(2)];
|
|
18751
|
+
if (abstract && !new_) {
|
|
18354
18752
|
children[1] = {
|
|
18355
18753
|
type: "Error",
|
|
18356
18754
|
message: "abstract function types must be constructors (abstract new)"
|
|
18357
18755
|
};
|
|
18358
18756
|
}
|
|
18359
|
-
if (
|
|
18360
|
-
|
|
18757
|
+
if (returnType.$loc && returnType.token === "") {
|
|
18758
|
+
const t = {
|
|
18759
|
+
type: "VoidType",
|
|
18760
|
+
$loc: returnType.$loc,
|
|
18761
|
+
token: "void"
|
|
18762
|
+
};
|
|
18763
|
+
children[children.length - 1] = returnType = {
|
|
18764
|
+
type: "ReturnTypeAnnotation",
|
|
18765
|
+
ts: true,
|
|
18766
|
+
t,
|
|
18767
|
+
children: [t]
|
|
18768
|
+
};
|
|
18769
|
+
}
|
|
18770
|
+
if (async) {
|
|
18771
|
+
const t = wrapTypeInPromise(returnType.t);
|
|
18772
|
+
children[children.length - 1] = returnType = {
|
|
18773
|
+
...returnType,
|
|
18774
|
+
t,
|
|
18775
|
+
children: returnType.children.map(($) => $ === returnType.t ? t : $)
|
|
18776
|
+
};
|
|
18777
|
+
}
|
|
18361
18778
|
return {
|
|
18362
18779
|
type: "TypeFunction",
|
|
18363
18780
|
children,
|
|
18364
|
-
ts: true
|
|
18781
|
+
ts: true,
|
|
18782
|
+
returnType
|
|
18365
18783
|
};
|
|
18366
18784
|
});
|
|
18367
18785
|
function TypeFunction(ctx, state2) {
|
|
18368
18786
|
return (0, import_lib4.$EVENT)(ctx, state2, "TypeFunction", TypeFunction$0);
|
|
18369
18787
|
}
|
|
18370
|
-
var
|
|
18788
|
+
var TypeFunctionArrow$0 = (0, import_lib4.$TV)((0, import_lib4.$C)((0, import_lib4.$EXPECT)($L13, 'TypeFunctionArrow "=>"'), (0, import_lib4.$EXPECT)($L14, 'TypeFunctionArrow "\u21D2"'), (0, import_lib4.$EXPECT)($L35, 'TypeFunctionArrow "->"'), (0, import_lib4.$EXPECT)($L36, 'TypeFunctionArrow "\u2192"')), function($skip, $loc, $0, $1) {
|
|
18371
18789
|
return { $loc, token: "=>" };
|
|
18372
18790
|
});
|
|
18373
|
-
function
|
|
18374
|
-
return (0, import_lib4.$EVENT)(ctx, state2, "
|
|
18791
|
+
function TypeFunctionArrow(ctx, state2) {
|
|
18792
|
+
return (0, import_lib4.$EVENT)(ctx, state2, "TypeFunctionArrow", TypeFunctionArrow$0);
|
|
18375
18793
|
}
|
|
18376
18794
|
var TypeArguments$0 = (0, import_lib4.$TS)((0, import_lib4.$S)(OpenAngleBracket, (0, import_lib4.$P)((0, import_lib4.$S)(__, TypeArgumentDelimited)), __, CloseAngleBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
18377
18795
|
var args = $2;
|
|
@@ -18547,7 +18965,7 @@ ${js}`
|
|
|
18547
18965
|
function CivetPrologue(ctx, state2) {
|
|
18548
18966
|
return (0, import_lib4.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
|
|
18549
18967
|
}
|
|
18550
|
-
var CivetPrologueContent$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($
|
|
18968
|
+
var CivetPrologueContent$0 = (0, import_lib4.$TS)((0, import_lib4.$S)((0, import_lib4.$EXPECT)($L245, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib4.$Q)(CivetOption), (0, import_lib4.$EXPECT)($R95, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
18551
18969
|
var options = $3;
|
|
18552
18970
|
return {
|
|
18553
18971
|
type: "CivetPrologue",
|
|
@@ -18572,6 +18990,7 @@ ${js}`
|
|
|
18572
18990
|
value = 0;
|
|
18573
18991
|
break;
|
|
18574
18992
|
case "globals":
|
|
18993
|
+
case "symbols":
|
|
18575
18994
|
value = value.split(",").filter(Boolean);
|
|
18576
18995
|
break;
|
|
18577
18996
|
}
|
|
@@ -18947,6 +19366,7 @@ ${js}`
|
|
|
18947
19366
|
repl: false,
|
|
18948
19367
|
rewriteTsImports: true,
|
|
18949
19368
|
server: false,
|
|
19369
|
+
symbols: wellKnownSymbols,
|
|
18950
19370
|
tab: void 0,
|
|
18951
19371
|
// default behavior = same as space
|
|
18952
19372
|
verbose: false
|
|
@@ -19243,6 +19663,21 @@ ${js}`
|
|
|
19243
19663
|
});
|
|
19244
19664
|
}
|
|
19245
19665
|
}
|
|
19666
|
+
var wellKnownSymbols = [
|
|
19667
|
+
"asyncIterator",
|
|
19668
|
+
"hasInstance",
|
|
19669
|
+
"isConcatSpreadable",
|
|
19670
|
+
"iterator",
|
|
19671
|
+
"match",
|
|
19672
|
+
"matchAll",
|
|
19673
|
+
"replace",
|
|
19674
|
+
"search",
|
|
19675
|
+
"species",
|
|
19676
|
+
"split",
|
|
19677
|
+
"toPrimitive",
|
|
19678
|
+
"toStringTag",
|
|
19679
|
+
"unscopables"
|
|
19680
|
+
];
|
|
19246
19681
|
|
|
19247
19682
|
// source/sourcemap.civet
|
|
19248
19683
|
var sourcemap_exports = {};
|