@danielx/civet 0.6.19 → 0.6.21
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/dist/browser.js +580 -658
- package/dist/main.js +580 -658
- package/dist/main.mjs +580 -658
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -344,11 +344,7 @@ var Civet = (() => {
|
|
|
344
344
|
exp.children.splice(i, 1, ...wrapIIFE(exp.children, exp.async));
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
|
-
const resultsRef =
|
|
348
|
-
type: "Ref",
|
|
349
|
-
base: "results",
|
|
350
|
-
id: "results"
|
|
351
|
-
};
|
|
347
|
+
const resultsRef = makeRef("results");
|
|
352
348
|
insertPush(exp.block, resultsRef);
|
|
353
349
|
exp.children.splice(
|
|
354
350
|
i,
|
|
@@ -426,10 +422,7 @@ var Civet = (() => {
|
|
|
426
422
|
const parts = [];
|
|
427
423
|
let hoistDec, refAssignment;
|
|
428
424
|
if (prefix.length > 1) {
|
|
429
|
-
const ref =
|
|
430
|
-
type: "Ref",
|
|
431
|
-
base: "ref"
|
|
432
|
-
};
|
|
425
|
+
const ref = makeRef();
|
|
433
426
|
hoistDec = {
|
|
434
427
|
type: "Declaration",
|
|
435
428
|
children: ["let ", ref],
|
|
@@ -531,11 +524,7 @@ var Civet = (() => {
|
|
|
531
524
|
}
|
|
532
525
|
return;
|
|
533
526
|
}
|
|
534
|
-
const resultsRef =
|
|
535
|
-
type: "Ref",
|
|
536
|
-
base: "results",
|
|
537
|
-
id: "results"
|
|
538
|
-
};
|
|
527
|
+
const resultsRef = makeRef("results");
|
|
539
528
|
const declaration = {
|
|
540
529
|
type: "Declaration",
|
|
541
530
|
children: ["const ", resultsRef, "=[];"]
|
|
@@ -1040,13 +1029,123 @@ var Civet = (() => {
|
|
|
1040
1029
|
if (target.token)
|
|
1041
1030
|
return target.token.match(/^ ?/)[0];
|
|
1042
1031
|
}
|
|
1032
|
+
function processForInOf($0) {
|
|
1033
|
+
let [awaits, each, open, declaration, declaration2, ws, inOf, exp, step, close] = $0;
|
|
1034
|
+
if (exp.type === "RangeExpression" && inOf.token === "of" && !declaration2) {
|
|
1035
|
+
return forRange(open, declaration, exp, step, close);
|
|
1036
|
+
} else if (step) {
|
|
1037
|
+
throw new Error("for..of/in cannot use 'by' except with range literals");
|
|
1038
|
+
}
|
|
1039
|
+
let eachError;
|
|
1040
|
+
let hoistDec, blockPrefix = [];
|
|
1041
|
+
if (each) {
|
|
1042
|
+
if (inOf.token === "of") {
|
|
1043
|
+
const counterRef = makeRef("i");
|
|
1044
|
+
const lenRef = makeRef("len");
|
|
1045
|
+
const expRef = maybeRef(exp);
|
|
1046
|
+
const increment = "++";
|
|
1047
|
+
let indexAssignment, assignmentNames = [...declaration.names];
|
|
1048
|
+
if (declaration2) {
|
|
1049
|
+
const [, , ws22, decl22] = declaration2;
|
|
1050
|
+
blockPrefix.push(["", [
|
|
1051
|
+
insertTrimmingSpace(ws22, ""),
|
|
1052
|
+
decl22,
|
|
1053
|
+
" = ",
|
|
1054
|
+
counterRef
|
|
1055
|
+
], ";"]);
|
|
1056
|
+
assignmentNames.push(...decl22.names);
|
|
1057
|
+
}
|
|
1058
|
+
const expRefDec = expRef !== exp ? [insertTrimmingSpace(expRef, " "), " = ", insertTrimmingSpace(exp, ""), ", "] : [];
|
|
1059
|
+
blockPrefix.push(["", {
|
|
1060
|
+
type: "AssignmentExpression",
|
|
1061
|
+
children: [declaration, " = ", insertTrimmingSpace(expRef, ""), "[", counterRef, "]"],
|
|
1062
|
+
names: assignmentNames
|
|
1063
|
+
}, ";"]);
|
|
1064
|
+
declaration = {
|
|
1065
|
+
type: "Declaration",
|
|
1066
|
+
children: ["let ", ...expRefDec, counterRef, " = 0, ", lenRef, " = ", insertTrimmingSpace(expRef, ""), ".length"],
|
|
1067
|
+
names: []
|
|
1068
|
+
};
|
|
1069
|
+
const condition = [counterRef, " < ", lenRef, "; "];
|
|
1070
|
+
const children = [open, declaration, "; ", condition, counterRef, increment, close];
|
|
1071
|
+
return { declaration, children, blockPrefix };
|
|
1072
|
+
} else {
|
|
1073
|
+
eachError = {
|
|
1074
|
+
type: "Error",
|
|
1075
|
+
message: "'each' is only meaningful in for..of loops"
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
if (!declaration2) {
|
|
1080
|
+
return {
|
|
1081
|
+
declaration,
|
|
1082
|
+
children: [awaits, eachError, open, declaration, ws, inOf, exp, step, close]
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
const [, , ws2, decl2] = declaration2;
|
|
1086
|
+
switch (inOf.token) {
|
|
1087
|
+
case "of": {
|
|
1088
|
+
const counterRef = makeRef("i");
|
|
1089
|
+
hoistDec = {
|
|
1090
|
+
type: "Declaration",
|
|
1091
|
+
children: ["let ", counterRef, " = 0"],
|
|
1092
|
+
names: []
|
|
1093
|
+
};
|
|
1094
|
+
blockPrefix.push(["", {
|
|
1095
|
+
type: "Declaration",
|
|
1096
|
+
children: [insertTrimmingSpace(ws2, ""), decl2, " = ", counterRef, "++"],
|
|
1097
|
+
names: decl2.names
|
|
1098
|
+
}, ";"]);
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
case "in": {
|
|
1102
|
+
const expRef = maybeRef(exp);
|
|
1103
|
+
if (expRef !== exp) {
|
|
1104
|
+
hoistDec = {
|
|
1105
|
+
type: "Declaration",
|
|
1106
|
+
children: ["let ", expRef],
|
|
1107
|
+
names: []
|
|
1108
|
+
};
|
|
1109
|
+
exp = {
|
|
1110
|
+
type: "AssignmentExpression",
|
|
1111
|
+
children: [" ", expRef, " =", exp]
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
let { binding } = declaration;
|
|
1115
|
+
if (binding?.type !== "Identifier") {
|
|
1116
|
+
const keyRef = makeRef("key");
|
|
1117
|
+
blockPrefix.push(["", [
|
|
1118
|
+
declaration,
|
|
1119
|
+
" = ",
|
|
1120
|
+
keyRef
|
|
1121
|
+
], ";"]);
|
|
1122
|
+
declaration = {
|
|
1123
|
+
type: "ForDeclaration",
|
|
1124
|
+
binding: binding = keyRef,
|
|
1125
|
+
children: ["const ", keyRef],
|
|
1126
|
+
names: []
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
blockPrefix.push(["", {
|
|
1130
|
+
type: "Declaration",
|
|
1131
|
+
children: [insertTrimmingSpace(ws2, ""), decl2, " = ", insertTrimmingSpace(expRef, ""), "[", insertTrimmingSpace(binding, ""), "]"],
|
|
1132
|
+
names: decl2.names
|
|
1133
|
+
}, ";"]);
|
|
1134
|
+
break;
|
|
1135
|
+
}
|
|
1136
|
+
default:
|
|
1137
|
+
throw new Error(`for item, index must use 'of' or 'in' instead of '${inOf.token}'`);
|
|
1138
|
+
}
|
|
1139
|
+
return {
|
|
1140
|
+
declaration,
|
|
1141
|
+
children: [awaits, eachError, open, declaration, ws, inOf, exp, step, close],
|
|
1142
|
+
blockPrefix,
|
|
1143
|
+
hoistDec
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1043
1146
|
function forRange(open, forDeclaration, range, stepExp, close) {
|
|
1044
1147
|
const { start, end, inclusive } = range;
|
|
1045
|
-
const counterRef =
|
|
1046
|
-
type: "Ref",
|
|
1047
|
-
base: "i",
|
|
1048
|
-
id: "i"
|
|
1049
|
-
};
|
|
1148
|
+
const counterRef = makeRef("i");
|
|
1050
1149
|
let stepRef;
|
|
1051
1150
|
if (stepExp) {
|
|
1052
1151
|
stepExp = insertTrimmingSpace(stepExp, "");
|
|
@@ -1064,11 +1163,7 @@ var Civet = (() => {
|
|
|
1064
1163
|
} else if (start.type === "Literal" && end.type === "Literal") {
|
|
1065
1164
|
asc = literalValue(start) <= literalValue(end);
|
|
1066
1165
|
} else {
|
|
1067
|
-
ascRef =
|
|
1068
|
-
type: "Ref",
|
|
1069
|
-
base: "asc",
|
|
1070
|
-
id: "asc"
|
|
1071
|
-
};
|
|
1166
|
+
ascRef = makeRef("asc");
|
|
1072
1167
|
ascDec = [", ", ascRef, " = ", startRef, " <= ", endRef];
|
|
1073
1168
|
}
|
|
1074
1169
|
let varAssign = [], varLetAssign = varAssign, varLet = varAssign, blockPrefix;
|
|
@@ -1208,15 +1303,6 @@ var Civet = (() => {
|
|
|
1208
1303
|
};
|
|
1209
1304
|
}
|
|
1210
1305
|
}
|
|
1211
|
-
function maybeRef(exp, base = "ref") {
|
|
1212
|
-
if (!needsRef(exp))
|
|
1213
|
-
return exp;
|
|
1214
|
-
return {
|
|
1215
|
-
type: "Ref",
|
|
1216
|
-
base,
|
|
1217
|
-
id: base
|
|
1218
|
-
};
|
|
1219
|
-
}
|
|
1220
1306
|
function modifyString(str) {
|
|
1221
1307
|
return str.replace(/(^.?|[^\\]{2})(\\\\)*\n/g, "$1$2\\n");
|
|
1222
1308
|
}
|
|
@@ -1312,13 +1398,20 @@ var Civet = (() => {
|
|
|
1312
1398
|
case "Identifier":
|
|
1313
1399
|
case "Literal":
|
|
1314
1400
|
return;
|
|
1315
|
-
default:
|
|
1316
|
-
return {
|
|
1317
|
-
type: "Ref",
|
|
1318
|
-
base,
|
|
1319
|
-
id: base
|
|
1320
|
-
};
|
|
1321
1401
|
}
|
|
1402
|
+
return makeRef(base);
|
|
1403
|
+
}
|
|
1404
|
+
function makeRef(base = "ref") {
|
|
1405
|
+
return {
|
|
1406
|
+
type: "Ref",
|
|
1407
|
+
base,
|
|
1408
|
+
id: base
|
|
1409
|
+
};
|
|
1410
|
+
}
|
|
1411
|
+
function maybeRef(exp, base = "ref") {
|
|
1412
|
+
if (!needsRef(exp))
|
|
1413
|
+
return exp;
|
|
1414
|
+
return makeRef(base);
|
|
1322
1415
|
}
|
|
1323
1416
|
function processCoffeeInterpolation(s, parts, e, $loc) {
|
|
1324
1417
|
if (parts.length === 0 || parts.length === 1 && parts[0].token != null) {
|
|
@@ -1811,11 +1904,7 @@ var Civet = (() => {
|
|
|
1811
1904
|
if (shared.length === 1)
|
|
1812
1905
|
return;
|
|
1813
1906
|
const refs = shared.map((p) => {
|
|
1814
|
-
const ref =
|
|
1815
|
-
type: "Ref",
|
|
1816
|
-
base: key,
|
|
1817
|
-
id: key
|
|
1818
|
-
};
|
|
1907
|
+
const ref = makeRef(key);
|
|
1819
1908
|
aliasBinding(p, ref);
|
|
1820
1909
|
return ref;
|
|
1821
1910
|
});
|
|
@@ -1849,7 +1938,7 @@ var Civet = (() => {
|
|
|
1849
1938
|
if (expression.type === "ParenthesizedExpression") {
|
|
1850
1939
|
expression = expression.expression;
|
|
1851
1940
|
}
|
|
1852
|
-
let hoistDec, refAssignment = [], ref =
|
|
1941
|
+
let hoistDec, refAssignment = [], ref = maybeRef(expression, "m");
|
|
1853
1942
|
if (ref !== expression) {
|
|
1854
1943
|
hoistDec = {
|
|
1855
1944
|
type: "Declaration",
|
|
@@ -1975,7 +2064,7 @@ var Civet = (() => {
|
|
|
1975
2064
|
arg.children.push(access);
|
|
1976
2065
|
break outer;
|
|
1977
2066
|
}
|
|
1978
|
-
usingRef =
|
|
2067
|
+
usingRef = makeRef();
|
|
1979
2068
|
initRef = {
|
|
1980
2069
|
type: "AssignmentExpression",
|
|
1981
2070
|
children: [usingRef, " = ", arg, ","]
|
|
@@ -2065,10 +2154,11 @@ var Civet = (() => {
|
|
|
2065
2154
|
});
|
|
2066
2155
|
}
|
|
2067
2156
|
function processProgram(root, config, m, ReservedWord) {
|
|
2157
|
+
assert.equal(m.forbidBracedApplication.length, 1, "forbidBracedApplication");
|
|
2068
2158
|
assert.equal(m.forbidClassImplicitCall.length, 1, "forbidClassImplicitCall");
|
|
2069
2159
|
assert.equal(m.forbidIndentedApplication.length, 1, "forbidIndentedApplication");
|
|
2160
|
+
assert.equal(m.forbidNewlineBinaryOp.length, 1, "forbidNewlineBinaryOp");
|
|
2070
2161
|
assert.equal(m.forbidTrailingMemberProperty.length, 1, "forbidTrailingMemberProperty");
|
|
2071
|
-
assert.equal(m.forbidMultiLineImplicitObjectLiteral.length, 1, "forbidMultiLineImplicitObjectLiteral");
|
|
2072
2162
|
assert.equal(m.JSXTagStack.length, 0, "JSXTagStack should be empty");
|
|
2073
2163
|
addParentPointers(root);
|
|
2074
2164
|
const { expressions: statements } = root;
|
|
@@ -2249,11 +2339,7 @@ var Civet = (() => {
|
|
|
2249
2339
|
);
|
|
2250
2340
|
if (!values.length)
|
|
2251
2341
|
return false;
|
|
2252
|
-
const ref =
|
|
2253
|
-
type: "Ref",
|
|
2254
|
-
base: "ret",
|
|
2255
|
-
id: "ret"
|
|
2256
|
-
};
|
|
2342
|
+
const ref = makeRef("ret");
|
|
2257
2343
|
let declared;
|
|
2258
2344
|
values.forEach((value) => {
|
|
2259
2345
|
value.children = [ref];
|
|
@@ -2582,13 +2668,15 @@ var Civet = (() => {
|
|
|
2582
2668
|
makeAsConst,
|
|
2583
2669
|
makeEmptyBlock,
|
|
2584
2670
|
makeLeftHandSideExpression,
|
|
2671
|
+
makeRef,
|
|
2585
2672
|
maybeRef,
|
|
2586
2673
|
modifyString,
|
|
2587
2674
|
needsRef,
|
|
2675
|
+
processAssignmentDeclaration,
|
|
2588
2676
|
processBinaryOpExpression,
|
|
2589
2677
|
processCallMemberExpression,
|
|
2590
2678
|
processCoffeeInterpolation,
|
|
2591
|
-
|
|
2679
|
+
processForInOf,
|
|
2592
2680
|
processParams,
|
|
2593
2681
|
processProgram,
|
|
2594
2682
|
processReturnValue,
|
|
@@ -3192,10 +3280,8 @@ ${input.slice(result.pos)}
|
|
|
3192
3280
|
InlineObjectLiteral,
|
|
3193
3281
|
ImplicitInlineObjectPropertyDelimiter,
|
|
3194
3282
|
ObjectPropertyDelimiter,
|
|
3195
|
-
PropertyDefinitionList,
|
|
3196
3283
|
PropertyDefinition,
|
|
3197
3284
|
NamedProperty,
|
|
3198
|
-
ImplicitNamedProperty,
|
|
3199
3285
|
SnugNamedProperty,
|
|
3200
3286
|
PropertyName,
|
|
3201
3287
|
ComputedPropertyName,
|
|
@@ -3301,10 +3387,6 @@ ${input.slice(result.pos)}
|
|
|
3301
3387
|
AllowTrailingMemberProperty,
|
|
3302
3388
|
RestoreTrailingMemberProperty,
|
|
3303
3389
|
TrailingMemberPropertyAllowed,
|
|
3304
|
-
ForbidMultiLineImplicitObjectLiteral,
|
|
3305
|
-
AllowMultiLineImplicitObjectLiteral,
|
|
3306
|
-
RestoreMultiLineImplicitObjectLiteral,
|
|
3307
|
-
MultiLineImplicitObjectLiteralAllowed,
|
|
3308
3390
|
AllowNewlineBinaryOp,
|
|
3309
3391
|
ForbidNewlineBinaryOp,
|
|
3310
3392
|
RestoreNewlineBinaryOp,
|
|
@@ -3435,6 +3517,7 @@ ${input.slice(result.pos)}
|
|
|
3435
3517
|
DotDotDot,
|
|
3436
3518
|
DoubleColon,
|
|
3437
3519
|
DoubleQuote,
|
|
3520
|
+
Each,
|
|
3438
3521
|
Else,
|
|
3439
3522
|
Equals,
|
|
3440
3523
|
Export,
|
|
@@ -3538,6 +3621,7 @@ ${input.slice(result.pos)}
|
|
|
3538
3621
|
NestedJSXChildExpression,
|
|
3539
3622
|
TypeDeclaration,
|
|
3540
3623
|
TypeDeclarationRest,
|
|
3624
|
+
OptionalEquals,
|
|
3541
3625
|
TypeLexicalDeclaration,
|
|
3542
3626
|
TypeDeclarationBinding,
|
|
3543
3627
|
InterfaceExtendsClause,
|
|
@@ -3626,6 +3710,7 @@ ${input.slice(result.pos)}
|
|
|
3626
3710
|
InsertOpenBracket,
|
|
3627
3711
|
InsertCloseBracket,
|
|
3628
3712
|
InsertComma,
|
|
3713
|
+
InsertSpaceEquals,
|
|
3629
3714
|
InsertConst,
|
|
3630
3715
|
InsertLet,
|
|
3631
3716
|
InsertReadonly,
|
|
@@ -3653,13 +3738,13 @@ ${input.slice(result.pos)}
|
|
|
3653
3738
|
Init,
|
|
3654
3739
|
Indent,
|
|
3655
3740
|
TrackIndented,
|
|
3656
|
-
Samedent,
|
|
3657
|
-
IndentedFurther,
|
|
3658
|
-
NotDedented,
|
|
3659
|
-
Dedented,
|
|
3660
3741
|
PushIndent,
|
|
3661
3742
|
PopIndent,
|
|
3662
|
-
Nested
|
|
3743
|
+
Nested,
|
|
3744
|
+
IndentedFurther,
|
|
3745
|
+
IndentedAtLeast,
|
|
3746
|
+
NotDedented,
|
|
3747
|
+
Dedented
|
|
3663
3748
|
});
|
|
3664
3749
|
var $L0 = $L("");
|
|
3665
3750
|
var $L1 = $L("{");
|
|
@@ -3799,75 +3884,76 @@ ${input.slice(result.pos)}
|
|
|
3799
3884
|
var $L135 = $L("\u2026");
|
|
3800
3885
|
var $L136 = $L("::");
|
|
3801
3886
|
var $L137 = $L('"');
|
|
3802
|
-
var $L138 = $L("
|
|
3803
|
-
var $L139 = $L("
|
|
3804
|
-
var $L140 = $L("
|
|
3805
|
-
var $L141 = $L("
|
|
3806
|
-
var $L142 = $L("
|
|
3807
|
-
var $L143 = $L("
|
|
3808
|
-
var $L144 = $L("
|
|
3809
|
-
var $L145 = $L("
|
|
3810
|
-
var $L146 = $L("
|
|
3811
|
-
var $L147 = $L("
|
|
3812
|
-
var $L148 = $L("
|
|
3813
|
-
var $L149 = $L("
|
|
3814
|
-
var $L150 = $L("
|
|
3815
|
-
var $L151 = $L("
|
|
3816
|
-
var $L152 = $L("
|
|
3817
|
-
var $L153 = $L("
|
|
3818
|
-
var $L154 = $L("
|
|
3819
|
-
var $L155 = $L("
|
|
3820
|
-
var $L156 = $L("
|
|
3821
|
-
var $L157 = $L("
|
|
3822
|
-
var $L158 = $L("
|
|
3823
|
-
var $L159 = $L("
|
|
3824
|
-
var $L160 = $L("
|
|
3825
|
-
var $L161 = $L("
|
|
3826
|
-
var $L162 = $L("
|
|
3827
|
-
var $L163 = $L("
|
|
3828
|
-
var $L164 = $L("
|
|
3829
|
-
var $L165 = $L("
|
|
3830
|
-
var $L166 = $L("
|
|
3831
|
-
var $L167 = $L("
|
|
3832
|
-
var $L168 = $L("
|
|
3833
|
-
var $L169 = $L("
|
|
3834
|
-
var $L170 = $L("
|
|
3835
|
-
var $L171 = $L("
|
|
3836
|
-
var $L172 = $L("
|
|
3837
|
-
var $L173 = $L("
|
|
3838
|
-
var $L174 = $L("
|
|
3839
|
-
var $L175 = $L("
|
|
3840
|
-
var $L176 = $L("
|
|
3841
|
-
var $L177 = $L(
|
|
3842
|
-
var $L178 = $L("'
|
|
3843
|
-
var $L179 = $L("
|
|
3844
|
-
var $L180 = $L("
|
|
3845
|
-
var $L181 = $L("
|
|
3846
|
-
var $L182 = $L("
|
|
3847
|
-
var $L183 = $L("
|
|
3848
|
-
var $L184 = $L("
|
|
3849
|
-
var $L185 = $L("
|
|
3850
|
-
var $L186 = $L("
|
|
3851
|
-
var $L187 = $L("
|
|
3852
|
-
var $L188 = $L("
|
|
3853
|
-
var $L189 = $L("
|
|
3854
|
-
var $L190 = $L("
|
|
3855
|
-
var $L191 = $L("
|
|
3856
|
-
var $L192 = $L("
|
|
3857
|
-
var $L193 = $L("
|
|
3858
|
-
var $L194 = $L("
|
|
3859
|
-
var $L195 = $L("
|
|
3860
|
-
var $L196 = $L("
|
|
3861
|
-
var $L197 = $L("
|
|
3862
|
-
var $L198 = $L("
|
|
3863
|
-
var $L199 = $L("
|
|
3864
|
-
var $L200 = $L("
|
|
3865
|
-
var $L201 = $L("
|
|
3866
|
-
var $L202 = $L("
|
|
3867
|
-
var $L203 = $L("
|
|
3868
|
-
var $L204 = $L("
|
|
3869
|
-
var $L205 = $L("
|
|
3870
|
-
var $L206 = $L("
|
|
3887
|
+
var $L138 = $L("each");
|
|
3888
|
+
var $L139 = $L("else");
|
|
3889
|
+
var $L140 = $L("export");
|
|
3890
|
+
var $L141 = $L("extends");
|
|
3891
|
+
var $L142 = $L("finally");
|
|
3892
|
+
var $L143 = $L("for");
|
|
3893
|
+
var $L144 = $L("from");
|
|
3894
|
+
var $L145 = $L("function");
|
|
3895
|
+
var $L146 = $L("get");
|
|
3896
|
+
var $L147 = $L("set");
|
|
3897
|
+
var $L148 = $L("if");
|
|
3898
|
+
var $L149 = $L("in");
|
|
3899
|
+
var $L150 = $L("let");
|
|
3900
|
+
var $L151 = $L("const");
|
|
3901
|
+
var $L152 = $L("is");
|
|
3902
|
+
var $L153 = $L("loop");
|
|
3903
|
+
var $L154 = $L("new");
|
|
3904
|
+
var $L155 = $L("not");
|
|
3905
|
+
var $L156 = $L("<");
|
|
3906
|
+
var $L157 = $L("operator");
|
|
3907
|
+
var $L158 = $L("public");
|
|
3908
|
+
var $L159 = $L("private");
|
|
3909
|
+
var $L160 = $L("protected");
|
|
3910
|
+
var $L161 = $L("||>");
|
|
3911
|
+
var $L162 = $L("|\u25B7");
|
|
3912
|
+
var $L163 = $L("|>=");
|
|
3913
|
+
var $L164 = $L("\u25B7=");
|
|
3914
|
+
var $L165 = $L("|>");
|
|
3915
|
+
var $L166 = $L("\u25B7");
|
|
3916
|
+
var $L167 = $L("readonly");
|
|
3917
|
+
var $L168 = $L("return");
|
|
3918
|
+
var $L169 = $L("satisfies");
|
|
3919
|
+
var $L170 = $L("'");
|
|
3920
|
+
var $L171 = $L("static");
|
|
3921
|
+
var $L172 = $L("${");
|
|
3922
|
+
var $L173 = $L("switch");
|
|
3923
|
+
var $L174 = $L("target");
|
|
3924
|
+
var $L175 = $L("then");
|
|
3925
|
+
var $L176 = $L("this");
|
|
3926
|
+
var $L177 = $L("throw");
|
|
3927
|
+
var $L178 = $L('"""');
|
|
3928
|
+
var $L179 = $L("'''");
|
|
3929
|
+
var $L180 = $L("///");
|
|
3930
|
+
var $L181 = $L("```");
|
|
3931
|
+
var $L182 = $L("try");
|
|
3932
|
+
var $L183 = $L("typeof");
|
|
3933
|
+
var $L184 = $L("unless");
|
|
3934
|
+
var $L185 = $L("until");
|
|
3935
|
+
var $L186 = $L("var");
|
|
3936
|
+
var $L187 = $L("void");
|
|
3937
|
+
var $L188 = $L("when");
|
|
3938
|
+
var $L189 = $L("while");
|
|
3939
|
+
var $L190 = $L("yield");
|
|
3940
|
+
var $L191 = $L("/>");
|
|
3941
|
+
var $L192 = $L("</");
|
|
3942
|
+
var $L193 = $L("<>");
|
|
3943
|
+
var $L194 = $L("</>");
|
|
3944
|
+
var $L195 = $L("<!--");
|
|
3945
|
+
var $L196 = $L("-->");
|
|
3946
|
+
var $L197 = $L("type");
|
|
3947
|
+
var $L198 = $L("enum");
|
|
3948
|
+
var $L199 = $L("interface");
|
|
3949
|
+
var $L200 = $L("global");
|
|
3950
|
+
var $L201 = $L("module");
|
|
3951
|
+
var $L202 = $L("namespace");
|
|
3952
|
+
var $L203 = $L("asserts");
|
|
3953
|
+
var $L204 = $L("keyof");
|
|
3954
|
+
var $L205 = $L("infer");
|
|
3955
|
+
var $L206 = $L("[]");
|
|
3956
|
+
var $L207 = $L("civet");
|
|
3871
3957
|
var $R0 = $R(new RegExp("(as|of|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
3872
3958
|
var $R1 = $R(new RegExp("[0-9]", "suy"));
|
|
3873
3959
|
var $R2 = $R(new RegExp("[)}]", "suy"));
|
|
@@ -3878,7 +3964,7 @@ ${input.slice(result.pos)}
|
|
|
3878
3964
|
var $R7 = $R(new RegExp("<(?!\\p{ID_Start}|[_$])", "suy"));
|
|
3879
3965
|
var $R8 = $R(new RegExp("!\\^\\^?", "suy"));
|
|
3880
3966
|
var $R9 = $R(new RegExp("(?!\\+\\+|--)[!~+-](?!\\s|[!~+-]*[&.])", "suy"));
|
|
3881
|
-
var $R10 = $R(new RegExp("(?=[\\s\\)])", "suy"));
|
|
3967
|
+
var $R10 = $R(new RegExp("(?=[\\s\\),])", "suy"));
|
|
3882
3968
|
var $R11 = $R(new RegExp('[^;"\\s]+', "suy"));
|
|
3883
3969
|
var $R12 = $R(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)n", "suy"));
|
|
3884
3970
|
var $R13 = $R(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))", "suy"));
|
|
@@ -4503,7 +4589,7 @@ ${input.slice(result.pos)}
|
|
|
4503
4589
|
return result;
|
|
4504
4590
|
}
|
|
4505
4591
|
}
|
|
4506
|
-
var TrailingMemberExpressions$0 = $TS($S($Q(MemberExpressionRest), $Q($S(
|
|
4592
|
+
var TrailingMemberExpressions$0 = $TS($S($Q(MemberExpressionRest), $Q($S(IndentedAtLeast, $Y($S($E($EXPECT($L5, fail, 'TrailingMemberExpressions "?"')), $EXPECT($L6, fail, 'TrailingMemberExpressions "."'), $N($EXPECT($R1, fail, "TrailingMemberExpressions /[0-9]/")))), MemberExpressionRest))), function($skip, $loc, $0, $1, $2) {
|
|
4507
4593
|
return $1.concat($2);
|
|
4508
4594
|
});
|
|
4509
4595
|
function TrailingMemberExpressions(state) {
|
|
@@ -4554,7 +4640,7 @@ ${input.slice(result.pos)}
|
|
|
4554
4640
|
return result;
|
|
4555
4641
|
}
|
|
4556
4642
|
}
|
|
4557
|
-
var TrailingCallExpressions$0 = $P($S(
|
|
4643
|
+
var TrailingCallExpressions$0 = $P($S(IndentedAtLeast, $Y($S($E($EXPECT($L5, fail, 'TrailingCallExpressions "?"')), $EXPECT($L6, fail, 'TrailingCallExpressions "."'), $N($R$0($EXPECT($R1, fail, "TrailingCallExpressions /[0-9]/"))))), $P(CallExpressionRest)));
|
|
4558
4644
|
function TrailingCallExpressions(state) {
|
|
4559
4645
|
let eventData;
|
|
4560
4646
|
if (state.events) {
|
|
@@ -4602,7 +4688,7 @@ ${input.slice(result.pos)}
|
|
|
4602
4688
|
return result;
|
|
4603
4689
|
}
|
|
4604
4690
|
}
|
|
4605
|
-
var CommaDelimiter$0 = $S(
|
|
4691
|
+
var CommaDelimiter$0 = $S(NotDedented, Comma);
|
|
4606
4692
|
function CommaDelimiter(state) {
|
|
4607
4693
|
let eventData;
|
|
4608
4694
|
if (state.events) {
|
|
@@ -5512,10 +5598,7 @@ ${input.slice(result.pos)}
|
|
|
5512
5598
|
var head = $2;
|
|
5513
5599
|
var body = $3;
|
|
5514
5600
|
if (head.token === "&") {
|
|
5515
|
-
const ref =
|
|
5516
|
-
type: "Ref",
|
|
5517
|
-
base: "$"
|
|
5518
|
-
};
|
|
5601
|
+
const ref = makeRef("$");
|
|
5519
5602
|
const arrowBody = {
|
|
5520
5603
|
type: "PipelineExpression",
|
|
5521
5604
|
children: [ws, ref, body]
|
|
@@ -7286,11 +7369,7 @@ ${input.slice(result.pos)}
|
|
|
7286
7369
|
});
|
|
7287
7370
|
var AtIdentifierRef$1 = $TV(IdentifierName, function($skip, $loc, $0, $1) {
|
|
7288
7371
|
var id = $0;
|
|
7289
|
-
return
|
|
7290
|
-
type: "Ref",
|
|
7291
|
-
base: id.name,
|
|
7292
|
-
id: id.name
|
|
7293
|
-
};
|
|
7372
|
+
return makeRef(id.name);
|
|
7294
7373
|
});
|
|
7295
7374
|
function AtIdentifierRef(state) {
|
|
7296
7375
|
let eventData;
|
|
@@ -7912,11 +7991,7 @@ ${input.slice(result.pos)}
|
|
|
7912
7991
|
}
|
|
7913
7992
|
}
|
|
7914
7993
|
var EmptyBindingPattern$0 = $TV($EXPECT($L0, fail, 'EmptyBindingPattern ""'), function($skip, $loc, $0, $1) {
|
|
7915
|
-
const ref =
|
|
7916
|
-
type: "Ref",
|
|
7917
|
-
base: "ref",
|
|
7918
|
-
id: "ref"
|
|
7919
|
-
};
|
|
7994
|
+
const ref = makeRef();
|
|
7920
7995
|
return {
|
|
7921
7996
|
type: "EmptyBinding",
|
|
7922
7997
|
children: [ref],
|
|
@@ -8074,11 +8149,7 @@ ${input.slice(result.pos)}
|
|
|
8074
8149
|
return $skip;
|
|
8075
8150
|
let body, ref;
|
|
8076
8151
|
if (!rhs) {
|
|
8077
|
-
body = ref =
|
|
8078
|
-
type: "Ref",
|
|
8079
|
-
base: "$",
|
|
8080
|
-
id: "$"
|
|
8081
|
-
};
|
|
8152
|
+
body = ref = makeRef("$");
|
|
8082
8153
|
} else {
|
|
8083
8154
|
let exp = rhs;
|
|
8084
8155
|
while (!exp.ref && exp.expression) {
|
|
@@ -8258,11 +8329,7 @@ ${input.slice(result.pos)}
|
|
|
8258
8329
|
var binopRHS = $3;
|
|
8259
8330
|
if (!callExpRest && !binopRHS && !unaryPostfix)
|
|
8260
8331
|
return $skip;
|
|
8261
|
-
const ref =
|
|
8262
|
-
type: "Ref",
|
|
8263
|
-
base: "$",
|
|
8264
|
-
id: "$"
|
|
8265
|
-
};
|
|
8332
|
+
const ref = makeRef("$");
|
|
8266
8333
|
let exp = {
|
|
8267
8334
|
type: "AmpersandRef",
|
|
8268
8335
|
children: [ref],
|
|
@@ -8758,7 +8825,7 @@ ${input.slice(result.pos)}
|
|
|
8758
8825
|
var s = $3;
|
|
8759
8826
|
var ws = $4;
|
|
8760
8827
|
var c = $5;
|
|
8761
|
-
if (!s.
|
|
8828
|
+
if (!s.expressions.length)
|
|
8762
8829
|
return $skip;
|
|
8763
8830
|
return {
|
|
8764
8831
|
type: "BlockStatement",
|
|
@@ -8833,16 +8900,16 @@ ${input.slice(result.pos)}
|
|
|
8833
8900
|
return result;
|
|
8834
8901
|
}
|
|
8835
8902
|
}
|
|
8836
|
-
var SingleLineStatements$0 = $TS($S($Q($S($S($E(_), $N(EOS)), Statement, SemicolonDelimiter)), $E($S($S($E(_), $N(EOS)), Statement, $E(SemicolonDelimiter)))), function($skip, $loc, $0, $1, $2) {
|
|
8837
|
-
var stmts = $
|
|
8838
|
-
var last = $
|
|
8839
|
-
const
|
|
8903
|
+
var SingleLineStatements$0 = $TS($S(ForbidNewlineBinaryOp, $Q($S($S($E(_), $N(EOS)), Statement, SemicolonDelimiter)), $E($S($S($E(_), $N(EOS)), Statement, $E(SemicolonDelimiter))), RestoreNewlineBinaryOp), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
8904
|
+
var stmts = $2;
|
|
8905
|
+
var last = $3;
|
|
8906
|
+
const expressions = [...stmts];
|
|
8840
8907
|
if (last)
|
|
8841
|
-
|
|
8908
|
+
expressions.push(last);
|
|
8842
8909
|
return {
|
|
8843
8910
|
type: "BlockStatement",
|
|
8844
|
-
expressions
|
|
8845
|
-
children,
|
|
8911
|
+
expressions,
|
|
8912
|
+
children: [expressions],
|
|
8846
8913
|
bare: true
|
|
8847
8914
|
};
|
|
8848
8915
|
});
|
|
@@ -9298,9 +9365,7 @@ ${input.slice(result.pos)}
|
|
|
9298
9365
|
} else {
|
|
9299
9366
|
children = [open, content, ...ws, close];
|
|
9300
9367
|
}
|
|
9301
|
-
const names = children.flatMap((c) =>
|
|
9302
|
-
return c.names || [];
|
|
9303
|
-
});
|
|
9368
|
+
const names = children.flatMap((c) => c?.names || []);
|
|
9304
9369
|
return {
|
|
9305
9370
|
type: "ArrayExpression",
|
|
9306
9371
|
children,
|
|
@@ -9416,17 +9481,17 @@ ${input.slice(result.pos)}
|
|
|
9416
9481
|
}
|
|
9417
9482
|
}
|
|
9418
9483
|
var ArrayLiteralContent$0 = RangeExpression;
|
|
9419
|
-
var ArrayLiteralContent$1 = $S(
|
|
9420
|
-
var ArrayLiteralContent$2 = NestedElementList
|
|
9421
|
-
var ArrayLiteralContent$3 = $TS($S(ElementListWithIndentedApplicationForbidden, InsertComma, $E(NestedElementList)), function($skip, $loc, $0, $1, $2, $3) {
|
|
9484
|
+
var ArrayLiteralContent$1 = $S(NestedElementList, $Y($S(__, CloseBracket)));
|
|
9485
|
+
var ArrayLiteralContent$2 = $TS($S(ElementListWithIndentedApplicationForbidden, ArrayElementDelimiter, $E(NestedElementList), $Y($S(__, CloseBracket))), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
9422
9486
|
var list = $1;
|
|
9423
|
-
var
|
|
9487
|
+
var delimiter = $2;
|
|
9424
9488
|
var nested = $3;
|
|
9425
|
-
if (nested)
|
|
9426
|
-
return [...list, comma, ...nested];
|
|
9427
|
-
} else {
|
|
9489
|
+
if (!nested)
|
|
9428
9490
|
return list;
|
|
9429
|
-
|
|
9491
|
+
return [...list, delimiter, ...nested];
|
|
9492
|
+
});
|
|
9493
|
+
var ArrayLiteralContent$3 = $TV($Q($S(__, ElementListWithIndentedApplicationForbidden, ArrayElementDelimiter)), function($skip, $loc, $0, $1) {
|
|
9494
|
+
return $1.flat();
|
|
9430
9495
|
});
|
|
9431
9496
|
function ArrayLiteralContent(state) {
|
|
9432
9497
|
let eventData;
|
|
@@ -9574,9 +9639,9 @@ ${input.slice(result.pos)}
|
|
|
9574
9639
|
return result;
|
|
9575
9640
|
}
|
|
9576
9641
|
}
|
|
9577
|
-
var ElementList$0 = $TS($S(ArrayElementExpression, $Q(ElementListRest)), function($skip, $loc, $0, $1, $2) {
|
|
9578
|
-
var first = $
|
|
9579
|
-
var rest = $
|
|
9642
|
+
var ElementList$0 = $TS($S($N(EOS), ArrayElementExpression, $Q(ElementListRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
9643
|
+
var first = $2;
|
|
9644
|
+
var rest = $3;
|
|
9580
9645
|
if (rest.length) {
|
|
9581
9646
|
return [{
|
|
9582
9647
|
...first,
|
|
@@ -9613,7 +9678,7 @@ ${input.slice(result.pos)}
|
|
|
9613
9678
|
return result;
|
|
9614
9679
|
}
|
|
9615
9680
|
}
|
|
9616
|
-
var ElementListRest$0 = $S($S(
|
|
9681
|
+
var ElementListRest$0 = $S($S($E(_), Comma, $N(EOS)), ArrayElementExpression);
|
|
9617
9682
|
function ElementListRest(state) {
|
|
9618
9683
|
let eventData;
|
|
9619
9684
|
if (state.events) {
|
|
@@ -9642,12 +9707,7 @@ ${input.slice(result.pos)}
|
|
|
9642
9707
|
var ws = $2;
|
|
9643
9708
|
var dots = $3;
|
|
9644
9709
|
if (!exp) {
|
|
9645
|
-
exp = {
|
|
9646
|
-
type: "Ref",
|
|
9647
|
-
base: "ref",
|
|
9648
|
-
id: "ref",
|
|
9649
|
-
names: []
|
|
9650
|
-
};
|
|
9710
|
+
exp = { ...makeRef(), names: [] };
|
|
9651
9711
|
}
|
|
9652
9712
|
return {
|
|
9653
9713
|
type: "SpreadElement",
|
|
@@ -9728,26 +9788,16 @@ ${input.slice(result.pos)}
|
|
|
9728
9788
|
return result;
|
|
9729
9789
|
}
|
|
9730
9790
|
}
|
|
9731
|
-
var BracedObjectLiteral$0 = $TS($S(OpenBrace, AllowAll, $E($S(
|
|
9791
|
+
var BracedObjectLiteral$0 = $TS($S(OpenBrace, AllowAll, $E($S(BracedObjectLiteralContent, __, CloseBrace)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
9732
9792
|
var open = $1;
|
|
9733
9793
|
if (!$3)
|
|
9734
9794
|
return $skip;
|
|
9735
9795
|
const [properties, ...close] = $3;
|
|
9736
|
-
if (properties) {
|
|
9737
|
-
const children = [open, ...properties, close];
|
|
9738
|
-
return {
|
|
9739
|
-
type: "ObjectExpression",
|
|
9740
|
-
children,
|
|
9741
|
-
names: children.flatMap((c) => {
|
|
9742
|
-
return c.names || [];
|
|
9743
|
-
}),
|
|
9744
|
-
properties
|
|
9745
|
-
};
|
|
9746
|
-
}
|
|
9747
9796
|
return {
|
|
9748
9797
|
type: "ObjectExpression",
|
|
9749
|
-
children: [open, close],
|
|
9750
|
-
names: []
|
|
9798
|
+
children: [open, properties, close],
|
|
9799
|
+
names: properties.flatMap((c) => c.names || []),
|
|
9800
|
+
properties
|
|
9751
9801
|
};
|
|
9752
9802
|
});
|
|
9753
9803
|
function BracedObjectLiteral(state) {
|
|
@@ -9772,8 +9822,33 @@ ${input.slice(result.pos)}
|
|
|
9772
9822
|
return result;
|
|
9773
9823
|
}
|
|
9774
9824
|
}
|
|
9775
|
-
var BracedObjectLiteralContent$0 = NestedPropertyDefinitions
|
|
9776
|
-
|
|
9825
|
+
var BracedObjectLiteralContent$0 = $TS($S($Q($S(PropertyDefinition, ObjectPropertyDelimiter)), $E(NestedPropertyDefinitions)), function($skip, $loc, $0, $1, $2) {
|
|
9826
|
+
var line = $1;
|
|
9827
|
+
var nested = $2;
|
|
9828
|
+
line = line.flatMap(([prop, delim]) => {
|
|
9829
|
+
prop = Array.isArray(prop) ? prop : [prop];
|
|
9830
|
+
let last = prop[prop.length - 1];
|
|
9831
|
+
last = {
|
|
9832
|
+
...last,
|
|
9833
|
+
delim,
|
|
9834
|
+
children: [...last.children, delim]
|
|
9835
|
+
};
|
|
9836
|
+
return [...prop.slice(0, prop.length - 1), last];
|
|
9837
|
+
});
|
|
9838
|
+
return line.concat(nested || []);
|
|
9839
|
+
});
|
|
9840
|
+
var BracedObjectLiteralContent$1 = $TV($P($S(__, PropertyDefinition, ObjectPropertyDelimiter)), function($skip, $loc, $0, $1) {
|
|
9841
|
+
return $0.flatMap(([ws, prop, delim]) => {
|
|
9842
|
+
prop = Array.isArray(prop) ? prop : [prop];
|
|
9843
|
+
let last = prop[prop.length - 1];
|
|
9844
|
+
last = {
|
|
9845
|
+
...last,
|
|
9846
|
+
delim,
|
|
9847
|
+
children: [ws, ...last.children.slice(1), delim]
|
|
9848
|
+
};
|
|
9849
|
+
return [...prop.slice(0, prop.length - 1), last];
|
|
9850
|
+
});
|
|
9851
|
+
});
|
|
9777
9852
|
function BracedObjectLiteralContent(state) {
|
|
9778
9853
|
let eventData;
|
|
9779
9854
|
if (state.events) {
|
|
@@ -9797,9 +9872,11 @@ ${input.slice(result.pos)}
|
|
|
9797
9872
|
}
|
|
9798
9873
|
}
|
|
9799
9874
|
var NestedImplicitObjectLiteral$0 = $TS($S(InsertOpenBrace, NestedImplicitPropertyDefinitions, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
9875
|
+
var properties = $2;
|
|
9800
9876
|
return {
|
|
9801
9877
|
type: "ObjectExpression",
|
|
9802
|
-
|
|
9878
|
+
properties,
|
|
9879
|
+
children: $0
|
|
9803
9880
|
};
|
|
9804
9881
|
});
|
|
9805
9882
|
function NestedImplicitObjectLiteral(state) {
|
|
@@ -9852,7 +9929,7 @@ ${input.slice(result.pos)}
|
|
|
9852
9929
|
return result;
|
|
9853
9930
|
}
|
|
9854
9931
|
}
|
|
9855
|
-
var NestedImplicitPropertyDefinition$0 = $TS($S(Nested,
|
|
9932
|
+
var NestedImplicitPropertyDefinition$0 = $TS($S(Nested, NamedProperty, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
|
|
9856
9933
|
var ws = $1;
|
|
9857
9934
|
var prop = $2;
|
|
9858
9935
|
var delimiter = $3;
|
|
@@ -9955,7 +10032,7 @@ ${input.slice(result.pos)}
|
|
|
9955
10032
|
return result;
|
|
9956
10033
|
}
|
|
9957
10034
|
}
|
|
9958
|
-
var InlineObjectLiteral$0 = $TS($S(InsertInlineOpenBrace, SnugNamedProperty, $Q($S(ImplicitInlineObjectPropertyDelimiter,
|
|
10035
|
+
var InlineObjectLiteral$0 = $TS($S(InsertInlineOpenBrace, SnugNamedProperty, $Q($S(ImplicitInlineObjectPropertyDelimiter, NamedProperty)), $E($S($E(_), Comma, $Y(Dedented))), InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
9959
10036
|
var open = $1;
|
|
9960
10037
|
var first = $2;
|
|
9961
10038
|
var rest = $3;
|
|
@@ -9989,7 +10066,7 @@ ${input.slice(result.pos)}
|
|
|
9989
10066
|
}
|
|
9990
10067
|
}
|
|
9991
10068
|
var ImplicitInlineObjectPropertyDelimiter$0 = $S($E(_), Comma, $C(NotDedented, $E(_)));
|
|
9992
|
-
var ImplicitInlineObjectPropertyDelimiter$1 = $T($S($Y($S(
|
|
10069
|
+
var ImplicitInlineObjectPropertyDelimiter$1 = $T($S($Y($S(Nested, NamedProperty)), InsertComma, $C(Nested, $E(_))), function(value) {
|
|
9993
10070
|
return [value[1], value[2]];
|
|
9994
10071
|
});
|
|
9995
10072
|
function ImplicitInlineObjectPropertyDelimiter(state) {
|
|
@@ -10041,41 +10118,7 @@ ${input.slice(result.pos)}
|
|
|
10041
10118
|
return result;
|
|
10042
10119
|
}
|
|
10043
10120
|
}
|
|
10044
|
-
var
|
|
10045
|
-
return $0.flatMap(([prop, delim]) => {
|
|
10046
|
-
prop = Array.isArray(prop) ? prop : [prop];
|
|
10047
|
-
let last = prop[prop.length - 1];
|
|
10048
|
-
last = {
|
|
10049
|
-
...last,
|
|
10050
|
-
delim,
|
|
10051
|
-
children: [...last.children, delim]
|
|
10052
|
-
};
|
|
10053
|
-
return [...prop.slice(0, prop.length - 1), last];
|
|
10054
|
-
});
|
|
10055
|
-
});
|
|
10056
|
-
function PropertyDefinitionList(state) {
|
|
10057
|
-
let eventData;
|
|
10058
|
-
if (state.events) {
|
|
10059
|
-
const result = state.events.enter?.("PropertyDefinitionList", state);
|
|
10060
|
-
if (result) {
|
|
10061
|
-
if (result.cache)
|
|
10062
|
-
return result.cache;
|
|
10063
|
-
eventData = result.data;
|
|
10064
|
-
}
|
|
10065
|
-
}
|
|
10066
|
-
if (state.tokenize) {
|
|
10067
|
-
const result = $TOKEN("PropertyDefinitionList", state, PropertyDefinitionList$0(state));
|
|
10068
|
-
if (state.events)
|
|
10069
|
-
state.events.exit?.("PropertyDefinitionList", state, result, eventData);
|
|
10070
|
-
return result;
|
|
10071
|
-
} else {
|
|
10072
|
-
const result = PropertyDefinitionList$0(state);
|
|
10073
|
-
if (state.events)
|
|
10074
|
-
state.events.exit?.("PropertyDefinitionList", state, result, eventData);
|
|
10075
|
-
return result;
|
|
10076
|
-
}
|
|
10077
|
-
}
|
|
10078
|
-
var PropertyDefinition$0 = $TS($S(__, AtThis, IdentifierReference), function($skip, $loc, $0, $1, $2, $3) {
|
|
10121
|
+
var PropertyDefinition$0 = $TS($S($E(_), AtThis, IdentifierReference), function($skip, $loc, $0, $1, $2, $3) {
|
|
10079
10122
|
var ws = $1;
|
|
10080
10123
|
var at = $2;
|
|
10081
10124
|
var id = $3;
|
|
@@ -10088,7 +10131,7 @@ ${input.slice(result.pos)}
|
|
|
10088
10131
|
value
|
|
10089
10132
|
};
|
|
10090
10133
|
});
|
|
10091
|
-
var PropertyDefinition$1 = $TS($S(
|
|
10134
|
+
var PropertyDefinition$1 = $TS($S($E(_), NamedProperty), function($skip, $loc, $0, $1, $2) {
|
|
10092
10135
|
var ws = $1;
|
|
10093
10136
|
var prop = $2;
|
|
10094
10137
|
return {
|
|
@@ -10096,7 +10139,7 @@ ${input.slice(result.pos)}
|
|
|
10096
10139
|
children: [ws, ...prop.children]
|
|
10097
10140
|
};
|
|
10098
10141
|
});
|
|
10099
|
-
var PropertyDefinition$2 = $TS($S(
|
|
10142
|
+
var PropertyDefinition$2 = $TS($S($E(_), $TEXT($EXPECT($R6, fail, "PropertyDefinition /[!+-]/")), PropertyName), function($skip, $loc, $0, $1, $2, $3) {
|
|
10100
10143
|
var ws = $1;
|
|
10101
10144
|
var toggle = $2;
|
|
10102
10145
|
var id = $3;
|
|
@@ -10109,7 +10152,7 @@ ${input.slice(result.pos)}
|
|
|
10109
10152
|
value
|
|
10110
10153
|
};
|
|
10111
10154
|
});
|
|
10112
|
-
var PropertyDefinition$3 = $TS($S(
|
|
10155
|
+
var PropertyDefinition$3 = $TS($S($E(_), MethodDefinition), function($skip, $loc, $0, $1, $2) {
|
|
10113
10156
|
var ws = $1;
|
|
10114
10157
|
var def = $2;
|
|
10115
10158
|
if (!def.block || def.block.empty)
|
|
@@ -10119,7 +10162,7 @@ ${input.slice(result.pos)}
|
|
|
10119
10162
|
children: [ws, ...def.children]
|
|
10120
10163
|
};
|
|
10121
10164
|
});
|
|
10122
|
-
var PropertyDefinition$4 = $TS($S(
|
|
10165
|
+
var PropertyDefinition$4 = $TS($S($E(_), DotDotDot, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
|
|
10123
10166
|
var ws = $1;
|
|
10124
10167
|
var dots = $2;
|
|
10125
10168
|
var exp = $3;
|
|
@@ -10131,9 +10174,9 @@ ${input.slice(result.pos)}
|
|
|
10131
10174
|
value: exp
|
|
10132
10175
|
};
|
|
10133
10176
|
});
|
|
10134
|
-
var PropertyDefinition$5 = $TS($S(
|
|
10177
|
+
var PropertyDefinition$5 = $TS($S($E(_), $N(EOS), CallExpression), function($skip, $loc, $0, $1, $2, $3) {
|
|
10135
10178
|
var ws = $1;
|
|
10136
|
-
var value = $
|
|
10179
|
+
var value = $3;
|
|
10137
10180
|
switch (value.type) {
|
|
10138
10181
|
case "Identifier":
|
|
10139
10182
|
return { ...value, children: [ws, ...value.children] };
|
|
@@ -10254,41 +10297,8 @@ ${input.slice(result.pos)}
|
|
|
10254
10297
|
return result;
|
|
10255
10298
|
}
|
|
10256
10299
|
}
|
|
10257
|
-
var
|
|
10258
|
-
var
|
|
10259
|
-
var exp = $5;
|
|
10260
|
-
return {
|
|
10261
|
-
type: "Property",
|
|
10262
|
-
children: $0,
|
|
10263
|
-
name,
|
|
10264
|
-
names: exp.names || [],
|
|
10265
|
-
value: exp
|
|
10266
|
-
};
|
|
10267
|
-
});
|
|
10268
|
-
function ImplicitNamedProperty(state) {
|
|
10269
|
-
let eventData;
|
|
10270
|
-
if (state.events) {
|
|
10271
|
-
const result = state.events.enter?.("ImplicitNamedProperty", state);
|
|
10272
|
-
if (result) {
|
|
10273
|
-
if (result.cache)
|
|
10274
|
-
return result.cache;
|
|
10275
|
-
eventData = result.data;
|
|
10276
|
-
}
|
|
10277
|
-
}
|
|
10278
|
-
if (state.tokenize) {
|
|
10279
|
-
const result = $TOKEN("ImplicitNamedProperty", state, ImplicitNamedProperty$0(state));
|
|
10280
|
-
if (state.events)
|
|
10281
|
-
state.events.exit?.("ImplicitNamedProperty", state, result, eventData);
|
|
10282
|
-
return result;
|
|
10283
|
-
} else {
|
|
10284
|
-
const result = ImplicitNamedProperty$0(state);
|
|
10285
|
-
if (state.events)
|
|
10286
|
-
state.events.exit?.("ImplicitNamedProperty", state, result, eventData);
|
|
10287
|
-
return result;
|
|
10288
|
-
}
|
|
10289
|
-
}
|
|
10290
|
-
var SnugNamedProperty$0 = $TS($S(PropertyName, Colon, $C(MultiLineImplicitObjectLiteralAllowed, $N(EOS)), ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
10291
|
-
var exp = $4;
|
|
10300
|
+
var SnugNamedProperty$0 = $TS($S(PropertyName, Colon, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
|
|
10301
|
+
var exp = $3;
|
|
10292
10302
|
return {
|
|
10293
10303
|
type: "Property",
|
|
10294
10304
|
children: $0,
|
|
@@ -10864,7 +10874,7 @@ ${input.slice(result.pos)}
|
|
|
10864
10874
|
ws.push(...$2);
|
|
10865
10875
|
return [ws, $3];
|
|
10866
10876
|
});
|
|
10867
|
-
var NotDedentedBinaryOp$1 = $TS($S(
|
|
10877
|
+
var NotDedentedBinaryOp$1 = $TS($S(Nested, $E(_), $N(Identifier), BinaryOp), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
10868
10878
|
const ws = [...$1];
|
|
10869
10879
|
if ($2)
|
|
10870
10880
|
ws.push(...$2);
|
|
@@ -11652,7 +11662,7 @@ ${input.slice(result.pos)}
|
|
|
11652
11662
|
return result;
|
|
11653
11663
|
}
|
|
11654
11664
|
}
|
|
11655
|
-
var ElseClause$0 = $S(
|
|
11665
|
+
var ElseClause$0 = $S(Nested, Else, Block);
|
|
11656
11666
|
var ElseClause$1 = $S($E(_), Else, Block);
|
|
11657
11667
|
function ElseClause(state) {
|
|
11658
11668
|
let eventData;
|
|
@@ -11796,7 +11806,7 @@ ${input.slice(result.pos)}
|
|
|
11796
11806
|
return result;
|
|
11797
11807
|
}
|
|
11798
11808
|
}
|
|
11799
|
-
var ElseExpressionClause$0 = $TS($S($C($S(
|
|
11809
|
+
var ElseExpressionClause$0 = $TS($S($C($S(Nested, Else), $S($E(_), Else)), ElseExpressionBlock), function($skip, $loc, $0, $1, $2) {
|
|
11800
11810
|
return [...$1, $2];
|
|
11801
11811
|
});
|
|
11802
11812
|
function ElseExpressionClause(state) {
|
|
@@ -12293,7 +12303,8 @@ ${input.slice(result.pos)}
|
|
|
12293
12303
|
children: [$1, ...$2, ...children],
|
|
12294
12304
|
declaration,
|
|
12295
12305
|
block: null,
|
|
12296
|
-
blockPrefix: c.blockPrefix
|
|
12306
|
+
blockPrefix: c.blockPrefix,
|
|
12307
|
+
hoistDec: c.hoistDec
|
|
12297
12308
|
};
|
|
12298
12309
|
});
|
|
12299
12310
|
function ForClause(state) {
|
|
@@ -12401,7 +12412,7 @@ ${input.slice(result.pos)}
|
|
|
12401
12412
|
if (step) {
|
|
12402
12413
|
throw new Error("Can't use 'by' with 'from' in CoffeeScript for loops");
|
|
12403
12414
|
}
|
|
12404
|
-
kind
|
|
12415
|
+
kind = { ...kind, token: "of" };
|
|
12405
12416
|
} else if (kind.token === "of") {
|
|
12406
12417
|
if (step) {
|
|
12407
12418
|
throw new Error("Can't use 'by' with 'of' in CoffeeScript for loops");
|
|
@@ -12419,30 +12430,12 @@ ${input.slice(result.pos)}
|
|
|
12419
12430
|
}
|
|
12420
12431
|
kind.token = "in";
|
|
12421
12432
|
} else if (kind.token === "in") {
|
|
12422
|
-
const counterRef =
|
|
12423
|
-
|
|
12424
|
-
|
|
12425
|
-
|
|
12426
|
-
};
|
|
12427
|
-
const lenRef = {
|
|
12428
|
-
type: "Ref",
|
|
12429
|
-
base: "len",
|
|
12430
|
-
id: "len"
|
|
12431
|
-
};
|
|
12432
|
-
let expRef;
|
|
12433
|
-
switch (exp.type) {
|
|
12434
|
-
case "Identifier":
|
|
12435
|
-
expRef = exp;
|
|
12436
|
-
break;
|
|
12437
|
-
case "RangeExpression":
|
|
12438
|
-
return forRange(open, declaration, exp, step?.[2], close);
|
|
12439
|
-
default:
|
|
12440
|
-
expRef = {
|
|
12441
|
-
type: "Ref",
|
|
12442
|
-
base: "ref",
|
|
12443
|
-
id: "ref"
|
|
12444
|
-
};
|
|
12433
|
+
const counterRef = makeRef("i");
|
|
12434
|
+
const lenRef = makeRef("len");
|
|
12435
|
+
if (exp.type === "RangeExpression") {
|
|
12436
|
+
return forRange(open, declaration, exp, step?.[2], close);
|
|
12445
12437
|
}
|
|
12438
|
+
const expRef = maybeRef(exp);
|
|
12446
12439
|
const varRef = declaration;
|
|
12447
12440
|
let increment = "++", indexAssignment, assignmentNames = [...varRef.names];
|
|
12448
12441
|
if (index) {
|
|
@@ -12597,39 +12590,11 @@ ${input.slice(result.pos)}
|
|
|
12597
12590
|
children: $0
|
|
12598
12591
|
};
|
|
12599
12592
|
});
|
|
12600
|
-
var ForStatementParameters$2 = $TS($S($E($S(Await, __)), OpenParen, __, ForInOfDeclaration, __, $C(In, Of), ExpressionWithObjectApplicationForbidden, $E($S(__, By, ExpressionWithObjectApplicationForbidden)), __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {
|
|
12601
|
-
|
|
12602
|
-
var declaration = $4;
|
|
12603
|
-
var op = $6;
|
|
12604
|
-
var exp = $7;
|
|
12605
|
-
var step = $8;
|
|
12606
|
-
var close = $10;
|
|
12607
|
-
if (exp.type === "RangeExpression" && op.token === "of") {
|
|
12608
|
-
return forRange(open, declaration, exp, step, close);
|
|
12609
|
-
} else if (step) {
|
|
12610
|
-
throw new Error("for..of/in cannot use 'by' except with range literals");
|
|
12611
|
-
}
|
|
12612
|
-
return {
|
|
12613
|
-
declaration,
|
|
12614
|
-
children: $0
|
|
12615
|
-
};
|
|
12593
|
+
var ForStatementParameters$2 = $TS($S($E($S(Await, __)), $E($S(Each, __)), $S(OpenParen, __), ForInOfDeclaration, $E($S(__, Comma, __, ForInOfDeclaration)), __, $C(In, Of), ExpressionWithObjectApplicationForbidden, $E($S(__, By, ExpressionWithObjectApplicationForbidden)), $S(__, CloseParen)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {
|
|
12594
|
+
return processForInOf($0);
|
|
12616
12595
|
});
|
|
12617
|
-
var ForStatementParameters$3 = $TS($S($E($S(Await, __)), InsertOpenParen, ForInOfDeclaration, __, $C(In, Of), ExpressionWithObjectApplicationForbidden, $E($S(__, By, ExpressionWithObjectApplicationForbidden)), InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
|
|
12618
|
-
|
|
12619
|
-
var declaration = $3;
|
|
12620
|
-
var op = $5;
|
|
12621
|
-
var exp = $6;
|
|
12622
|
-
var step = $7;
|
|
12623
|
-
var close = $8;
|
|
12624
|
-
if (exp.type === "RangeExpression" && op.token === "of") {
|
|
12625
|
-
return forRange(open, declaration, exp, step, close);
|
|
12626
|
-
} else if (step) {
|
|
12627
|
-
throw new Error("for..of/in cannot use 'by' except with range literals");
|
|
12628
|
-
}
|
|
12629
|
-
return {
|
|
12630
|
-
declaration,
|
|
12631
|
-
children: $0
|
|
12632
|
-
};
|
|
12596
|
+
var ForStatementParameters$3 = $TS($S($E($S(Await, __)), $E($S(Each, __)), InsertOpenParen, ForInOfDeclaration, $E($S(__, Comma, __, ForInOfDeclaration)), __, $C(In, Of), ExpressionWithObjectApplicationForbidden, $E($S(__, By, ExpressionWithObjectApplicationForbidden)), InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {
|
|
12597
|
+
return processForInOf($0);
|
|
12633
12598
|
});
|
|
12634
12599
|
var ForStatementParameters$4 = ForRangeParameters;
|
|
12635
12600
|
function ForStatementParameters(state) {
|
|
@@ -12696,6 +12661,7 @@ ${input.slice(result.pos)}
|
|
|
12696
12661
|
type: "ForDeclaration",
|
|
12697
12662
|
children: $0,
|
|
12698
12663
|
declare: $1,
|
|
12664
|
+
binding,
|
|
12699
12665
|
names: binding.names
|
|
12700
12666
|
};
|
|
12701
12667
|
});
|
|
@@ -12730,16 +12696,18 @@ ${input.slice(result.pos)}
|
|
|
12730
12696
|
type: "ForDeclaration",
|
|
12731
12697
|
children: [c, binding],
|
|
12732
12698
|
declare: c,
|
|
12699
|
+
binding,
|
|
12733
12700
|
names: binding.names
|
|
12734
12701
|
};
|
|
12735
12702
|
});
|
|
12736
|
-
var ForDeclaration$1 = $TS($S(InsertConst, ForBinding, $EXPECT($R10, fail, "ForDeclaration /(?=[\\s\\)])/")), function($skip, $loc, $0, $1, $2, $3) {
|
|
12703
|
+
var ForDeclaration$1 = $TS($S(InsertConst, ForBinding, $EXPECT($R10, fail, "ForDeclaration /(?=[\\s\\),])/")), function($skip, $loc, $0, $1, $2, $3) {
|
|
12737
12704
|
var c = $1;
|
|
12738
12705
|
var binding = $2;
|
|
12739
12706
|
return {
|
|
12740
12707
|
type: "ForDeclaration",
|
|
12741
12708
|
children: [c, binding],
|
|
12742
12709
|
declare: c,
|
|
12710
|
+
binding,
|
|
12743
12711
|
names: binding.names
|
|
12744
12712
|
};
|
|
12745
12713
|
});
|
|
@@ -12900,7 +12868,7 @@ ${input.slice(result.pos)}
|
|
|
12900
12868
|
return result;
|
|
12901
12869
|
}
|
|
12902
12870
|
}
|
|
12903
|
-
var CaseBlock$0 = $TS($S($E($C(
|
|
12871
|
+
var CaseBlock$0 = $TS($S($E($C(Nested, _)), OpenBrace, NestedCaseClauses, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
12904
12872
|
var clauses = $3;
|
|
12905
12873
|
return {
|
|
12906
12874
|
type: "CaseBlock",
|
|
@@ -13117,11 +13085,9 @@ ${input.slice(result.pos)}
|
|
|
13117
13085
|
return result;
|
|
13118
13086
|
}
|
|
13119
13087
|
}
|
|
13120
|
-
var CaseExpressionList$0 = $TS($S(
|
|
13121
|
-
var first = $
|
|
13122
|
-
var rest = $
|
|
13123
|
-
if (!first)
|
|
13124
|
-
return $skip;
|
|
13088
|
+
var CaseExpressionList$0 = $TS($S($S($E(_), CaseExpression, InsertColon), $Q($S(__, Comma, CaseExpression, InsertColon))), function($skip, $loc, $0, $1, $2) {
|
|
13089
|
+
var first = $1;
|
|
13090
|
+
var rest = $2;
|
|
13125
13091
|
const result = rest.map(([ws, _comma, exp, col]) => {
|
|
13126
13092
|
exp = insertTrimmingSpace(exp, "");
|
|
13127
13093
|
if (ws.length)
|
|
@@ -13314,7 +13280,7 @@ ${input.slice(result.pos)}
|
|
|
13314
13280
|
return result;
|
|
13315
13281
|
}
|
|
13316
13282
|
}
|
|
13317
|
-
var CatchClause$0 = $TS($S($C(
|
|
13283
|
+
var CatchClause$0 = $TS($S($C(Nested, _), Catch, $E(CatchBind), $C(ThenClause, BracedOrEmptyBlock)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
13318
13284
|
var block = $4;
|
|
13319
13285
|
return {
|
|
13320
13286
|
type: "CatchClause",
|
|
@@ -13368,7 +13334,7 @@ ${input.slice(result.pos)}
|
|
|
13368
13334
|
return result;
|
|
13369
13335
|
}
|
|
13370
13336
|
}
|
|
13371
|
-
var FinallyClause$0 = $S($C(
|
|
13337
|
+
var FinallyClause$0 = $S($C(Nested, _), Finally, $C(ThenClause, BracedOrEmptyBlock));
|
|
13372
13338
|
function FinallyClause(state) {
|
|
13373
13339
|
let eventData;
|
|
13374
13340
|
if (state.events) {
|
|
@@ -13476,10 +13442,7 @@ ${input.slice(result.pos)}
|
|
|
13476
13442
|
}
|
|
13477
13443
|
var DeclarationCondition$0 = $TV(LexicalDeclaration, function($skip, $loc, $0, $1) {
|
|
13478
13444
|
var dec = $0;
|
|
13479
|
-
const ref =
|
|
13480
|
-
type: "Ref",
|
|
13481
|
-
base: "ref"
|
|
13482
|
-
};
|
|
13445
|
+
const ref = makeRef();
|
|
13483
13446
|
const { decl, bindings } = dec;
|
|
13484
13447
|
const binding = bindings[0];
|
|
13485
13448
|
const { pattern, suffix, initializer, splices, thisAssignments } = binding;
|
|
@@ -13992,110 +13955,6 @@ ${input.slice(result.pos)}
|
|
|
13992
13955
|
return result;
|
|
13993
13956
|
}
|
|
13994
13957
|
}
|
|
13995
|
-
var ForbidMultiLineImplicitObjectLiteral$0 = $TV($EXPECT($L0, fail, 'ForbidMultiLineImplicitObjectLiteral ""'), function($skip, $loc, $0, $1) {
|
|
13996
|
-
module.forbidMultiLineImplicitObjectLiteral.push(true);
|
|
13997
|
-
});
|
|
13998
|
-
function ForbidMultiLineImplicitObjectLiteral(state) {
|
|
13999
|
-
let eventData;
|
|
14000
|
-
if (state.events) {
|
|
14001
|
-
const result = state.events.enter?.("ForbidMultiLineImplicitObjectLiteral", state);
|
|
14002
|
-
if (result) {
|
|
14003
|
-
if (result.cache)
|
|
14004
|
-
return result.cache;
|
|
14005
|
-
eventData = result.data;
|
|
14006
|
-
}
|
|
14007
|
-
}
|
|
14008
|
-
if (state.tokenize) {
|
|
14009
|
-
const result = $TOKEN("ForbidMultiLineImplicitObjectLiteral", state, ForbidMultiLineImplicitObjectLiteral$0(state));
|
|
14010
|
-
if (state.events)
|
|
14011
|
-
state.events.exit?.("ForbidMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14012
|
-
return result;
|
|
14013
|
-
} else {
|
|
14014
|
-
const result = ForbidMultiLineImplicitObjectLiteral$0(state);
|
|
14015
|
-
if (state.events)
|
|
14016
|
-
state.events.exit?.("ForbidMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14017
|
-
return result;
|
|
14018
|
-
}
|
|
14019
|
-
}
|
|
14020
|
-
var AllowMultiLineImplicitObjectLiteral$0 = $TV($EXPECT($L0, fail, 'AllowMultiLineImplicitObjectLiteral ""'), function($skip, $loc, $0, $1) {
|
|
14021
|
-
module.forbidMultiLineImplicitObjectLiteral.push(false);
|
|
14022
|
-
});
|
|
14023
|
-
function AllowMultiLineImplicitObjectLiteral(state) {
|
|
14024
|
-
let eventData;
|
|
14025
|
-
if (state.events) {
|
|
14026
|
-
const result = state.events.enter?.("AllowMultiLineImplicitObjectLiteral", state);
|
|
14027
|
-
if (result) {
|
|
14028
|
-
if (result.cache)
|
|
14029
|
-
return result.cache;
|
|
14030
|
-
eventData = result.data;
|
|
14031
|
-
}
|
|
14032
|
-
}
|
|
14033
|
-
if (state.tokenize) {
|
|
14034
|
-
const result = $TOKEN("AllowMultiLineImplicitObjectLiteral", state, AllowMultiLineImplicitObjectLiteral$0(state));
|
|
14035
|
-
if (state.events)
|
|
14036
|
-
state.events.exit?.("AllowMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14037
|
-
return result;
|
|
14038
|
-
} else {
|
|
14039
|
-
const result = AllowMultiLineImplicitObjectLiteral$0(state);
|
|
14040
|
-
if (state.events)
|
|
14041
|
-
state.events.exit?.("AllowMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14042
|
-
return result;
|
|
14043
|
-
}
|
|
14044
|
-
}
|
|
14045
|
-
var RestoreMultiLineImplicitObjectLiteral$0 = $TV($EXPECT($L0, fail, 'RestoreMultiLineImplicitObjectLiteral ""'), function($skip, $loc, $0, $1) {
|
|
14046
|
-
module.forbidMultiLineImplicitObjectLiteral.pop();
|
|
14047
|
-
});
|
|
14048
|
-
function RestoreMultiLineImplicitObjectLiteral(state) {
|
|
14049
|
-
let eventData;
|
|
14050
|
-
if (state.events) {
|
|
14051
|
-
const result = state.events.enter?.("RestoreMultiLineImplicitObjectLiteral", state);
|
|
14052
|
-
if (result) {
|
|
14053
|
-
if (result.cache)
|
|
14054
|
-
return result.cache;
|
|
14055
|
-
eventData = result.data;
|
|
14056
|
-
}
|
|
14057
|
-
}
|
|
14058
|
-
if (state.tokenize) {
|
|
14059
|
-
const result = $TOKEN("RestoreMultiLineImplicitObjectLiteral", state, RestoreMultiLineImplicitObjectLiteral$0(state));
|
|
14060
|
-
if (state.events)
|
|
14061
|
-
state.events.exit?.("RestoreMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14062
|
-
return result;
|
|
14063
|
-
} else {
|
|
14064
|
-
const result = RestoreMultiLineImplicitObjectLiteral$0(state);
|
|
14065
|
-
if (state.events)
|
|
14066
|
-
state.events.exit?.("RestoreMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14067
|
-
return result;
|
|
14068
|
-
}
|
|
14069
|
-
}
|
|
14070
|
-
var MultiLineImplicitObjectLiteralAllowed$0 = $TV($EXPECT($L0, fail, 'MultiLineImplicitObjectLiteralAllowed ""'), function($skip, $loc, $0, $1) {
|
|
14071
|
-
if (module.config.verbose) {
|
|
14072
|
-
console.log("forbidMultiLineImplicitObjectLiteral:", module.forbidMultiLineImplicitObjectLiteral);
|
|
14073
|
-
}
|
|
14074
|
-
if (module.multiLineImplicitObjectLiteralForbidden)
|
|
14075
|
-
return $skip;
|
|
14076
|
-
});
|
|
14077
|
-
function MultiLineImplicitObjectLiteralAllowed(state) {
|
|
14078
|
-
let eventData;
|
|
14079
|
-
if (state.events) {
|
|
14080
|
-
const result = state.events.enter?.("MultiLineImplicitObjectLiteralAllowed", state);
|
|
14081
|
-
if (result) {
|
|
14082
|
-
if (result.cache)
|
|
14083
|
-
return result.cache;
|
|
14084
|
-
eventData = result.data;
|
|
14085
|
-
}
|
|
14086
|
-
}
|
|
14087
|
-
if (state.tokenize) {
|
|
14088
|
-
const result = $TOKEN("MultiLineImplicitObjectLiteralAllowed", state, MultiLineImplicitObjectLiteralAllowed$0(state));
|
|
14089
|
-
if (state.events)
|
|
14090
|
-
state.events.exit?.("MultiLineImplicitObjectLiteralAllowed", state, result, eventData);
|
|
14091
|
-
return result;
|
|
14092
|
-
} else {
|
|
14093
|
-
const result = MultiLineImplicitObjectLiteralAllowed$0(state);
|
|
14094
|
-
if (state.events)
|
|
14095
|
-
state.events.exit?.("MultiLineImplicitObjectLiteralAllowed", state, result, eventData);
|
|
14096
|
-
return result;
|
|
14097
|
-
}
|
|
14098
|
-
}
|
|
14099
13958
|
var AllowNewlineBinaryOp$0 = $TV($EXPECT($L0, fail, 'AllowNewlineBinaryOp ""'), function($skip, $loc, $0, $1) {
|
|
14100
13959
|
module.forbidNewlineBinaryOp.push(false);
|
|
14101
13960
|
});
|
|
@@ -14200,7 +14059,7 @@ ${input.slice(result.pos)}
|
|
|
14200
14059
|
return result;
|
|
14201
14060
|
}
|
|
14202
14061
|
}
|
|
14203
|
-
var AllowAll$0 = $S(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication,
|
|
14062
|
+
var AllowAll$0 = $S(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication, AllowClassImplicitCall, AllowNewlineBinaryOp);
|
|
14204
14063
|
function AllowAll(state) {
|
|
14205
14064
|
let eventData;
|
|
14206
14065
|
if (state.events) {
|
|
@@ -14223,7 +14082,7 @@ ${input.slice(result.pos)}
|
|
|
14223
14082
|
return result;
|
|
14224
14083
|
}
|
|
14225
14084
|
}
|
|
14226
|
-
var RestoreAll$0 = $S(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication,
|
|
14085
|
+
var RestoreAll$0 = $S(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication, RestoreClassImplicitCall, RestoreNewlineBinaryOp);
|
|
14227
14086
|
function RestoreAll(state) {
|
|
14228
14087
|
let eventData;
|
|
14229
14088
|
if (state.events) {
|
|
@@ -16826,7 +16685,7 @@ ${input.slice(result.pos)}
|
|
|
16826
16685
|
}
|
|
16827
16686
|
}
|
|
16828
16687
|
var StatementDelimiter$0 = SemicolonDelimiter;
|
|
16829
|
-
var StatementDelimiter$1 = $S($Y($S(
|
|
16688
|
+
var StatementDelimiter$1 = $S($Y($S(Nested, $C($EXPECT($L4, fail, 'StatementDelimiter "("'), $EXPECT($L114, fail, 'StatementDelimiter "["'), $EXPECT($L115, fail, 'StatementDelimiter "`"'), $EXPECT($L59, fail, 'StatementDelimiter "+"'), $EXPECT($L20, fail, 'StatementDelimiter "-"'), $EXPECT($L55, fail, 'StatementDelimiter "*"'), $EXPECT($L56, fail, 'StatementDelimiter "/"'), ObjectLiteral, Arrow, FatArrow, $S(Function, $E($S($E(_), Star)), $E(_), $EXPECT($L4, fail, 'StatementDelimiter "("'))))), InsertSemicolon);
|
|
16830
16689
|
var StatementDelimiter$2 = $Y(EOS);
|
|
16831
16690
|
function StatementDelimiter(state) {
|
|
16832
16691
|
let eventData;
|
|
@@ -17639,7 +17498,32 @@ ${input.slice(result.pos)}
|
|
|
17639
17498
|
return result;
|
|
17640
17499
|
}
|
|
17641
17500
|
}
|
|
17642
|
-
var
|
|
17501
|
+
var Each$0 = $TS($S($EXPECT($L138, fail, 'Each "each"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17502
|
+
return { $loc, token: $1 };
|
|
17503
|
+
});
|
|
17504
|
+
function Each(state) {
|
|
17505
|
+
let eventData;
|
|
17506
|
+
if (state.events) {
|
|
17507
|
+
const result = state.events.enter?.("Each", state);
|
|
17508
|
+
if (result) {
|
|
17509
|
+
if (result.cache)
|
|
17510
|
+
return result.cache;
|
|
17511
|
+
eventData = result.data;
|
|
17512
|
+
}
|
|
17513
|
+
}
|
|
17514
|
+
if (state.tokenize) {
|
|
17515
|
+
const result = $TOKEN("Each", state, Each$0(state));
|
|
17516
|
+
if (state.events)
|
|
17517
|
+
state.events.exit?.("Each", state, result, eventData);
|
|
17518
|
+
return result;
|
|
17519
|
+
} else {
|
|
17520
|
+
const result = Each$0(state);
|
|
17521
|
+
if (state.events)
|
|
17522
|
+
state.events.exit?.("Each", state, result, eventData);
|
|
17523
|
+
return result;
|
|
17524
|
+
}
|
|
17525
|
+
}
|
|
17526
|
+
var Else$0 = $TS($S($EXPECT($L139, fail, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17643
17527
|
return { $loc, token: $1 };
|
|
17644
17528
|
});
|
|
17645
17529
|
function Else(state) {
|
|
@@ -17689,7 +17573,7 @@ ${input.slice(result.pos)}
|
|
|
17689
17573
|
return result;
|
|
17690
17574
|
}
|
|
17691
17575
|
}
|
|
17692
|
-
var Export$0 = $TS($S($EXPECT($
|
|
17576
|
+
var Export$0 = $TS($S($EXPECT($L140, fail, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17693
17577
|
return { $loc, token: $1 };
|
|
17694
17578
|
});
|
|
17695
17579
|
function Export(state) {
|
|
@@ -17714,7 +17598,7 @@ ${input.slice(result.pos)}
|
|
|
17714
17598
|
return result;
|
|
17715
17599
|
}
|
|
17716
17600
|
}
|
|
17717
|
-
var Extends$0 = $TS($S($EXPECT($
|
|
17601
|
+
var Extends$0 = $TS($S($EXPECT($L141, fail, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17718
17602
|
return { $loc, token: $1 };
|
|
17719
17603
|
});
|
|
17720
17604
|
function Extends(state) {
|
|
@@ -17739,7 +17623,7 @@ ${input.slice(result.pos)}
|
|
|
17739
17623
|
return result;
|
|
17740
17624
|
}
|
|
17741
17625
|
}
|
|
17742
|
-
var Finally$0 = $TS($S($EXPECT($
|
|
17626
|
+
var Finally$0 = $TS($S($EXPECT($L142, fail, 'Finally "finally"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17743
17627
|
return { $loc, token: $1 };
|
|
17744
17628
|
});
|
|
17745
17629
|
function Finally(state) {
|
|
@@ -17764,7 +17648,7 @@ ${input.slice(result.pos)}
|
|
|
17764
17648
|
return result;
|
|
17765
17649
|
}
|
|
17766
17650
|
}
|
|
17767
|
-
var For$0 = $TS($S($EXPECT($
|
|
17651
|
+
var For$0 = $TS($S($EXPECT($L143, fail, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17768
17652
|
return { $loc, token: $1 };
|
|
17769
17653
|
});
|
|
17770
17654
|
function For(state) {
|
|
@@ -17789,7 +17673,7 @@ ${input.slice(result.pos)}
|
|
|
17789
17673
|
return result;
|
|
17790
17674
|
}
|
|
17791
17675
|
}
|
|
17792
|
-
var From$0 = $TS($S($EXPECT($
|
|
17676
|
+
var From$0 = $TS($S($EXPECT($L144, fail, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17793
17677
|
return { $loc, token: $1 };
|
|
17794
17678
|
});
|
|
17795
17679
|
function From(state) {
|
|
@@ -17814,7 +17698,7 @@ ${input.slice(result.pos)}
|
|
|
17814
17698
|
return result;
|
|
17815
17699
|
}
|
|
17816
17700
|
}
|
|
17817
|
-
var Function$0 = $TS($S($EXPECT($
|
|
17701
|
+
var Function$0 = $TS($S($EXPECT($L145, fail, 'Function "function"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17818
17702
|
return { $loc, token: $1 };
|
|
17819
17703
|
});
|
|
17820
17704
|
function Function(state) {
|
|
@@ -17839,7 +17723,7 @@ ${input.slice(result.pos)}
|
|
|
17839
17723
|
return result;
|
|
17840
17724
|
}
|
|
17841
17725
|
}
|
|
17842
|
-
var GetOrSet$0 = $TS($S($C($EXPECT($
|
|
17726
|
+
var GetOrSet$0 = $TS($S($C($EXPECT($L146, fail, 'GetOrSet "get"'), $EXPECT($L147, fail, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17843
17727
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
17844
17728
|
});
|
|
17845
17729
|
function GetOrSet(state) {
|
|
@@ -17864,7 +17748,7 @@ ${input.slice(result.pos)}
|
|
|
17864
17748
|
return result;
|
|
17865
17749
|
}
|
|
17866
17750
|
}
|
|
17867
|
-
var If$0 = $TV($TEXT($S($EXPECT($
|
|
17751
|
+
var If$0 = $TV($TEXT($S($EXPECT($L148, fail, 'If "if"'), NonIdContinue, $E($EXPECT($L11, fail, 'If " "')))), function($skip, $loc, $0, $1) {
|
|
17868
17752
|
return { $loc, token: $1 };
|
|
17869
17753
|
});
|
|
17870
17754
|
function If(state) {
|
|
@@ -17914,7 +17798,7 @@ ${input.slice(result.pos)}
|
|
|
17914
17798
|
return result;
|
|
17915
17799
|
}
|
|
17916
17800
|
}
|
|
17917
|
-
var In$0 = $TS($S($EXPECT($
|
|
17801
|
+
var In$0 = $TS($S($EXPECT($L149, fail, 'In "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17918
17802
|
return { $loc, token: $1 };
|
|
17919
17803
|
});
|
|
17920
17804
|
function In(state) {
|
|
@@ -17939,7 +17823,7 @@ ${input.slice(result.pos)}
|
|
|
17939
17823
|
return result;
|
|
17940
17824
|
}
|
|
17941
17825
|
}
|
|
17942
|
-
var LetOrConst$0 = $TS($S($C($EXPECT($
|
|
17826
|
+
var LetOrConst$0 = $TS($S($C($EXPECT($L150, fail, 'LetOrConst "let"'), $EXPECT($L151, fail, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17943
17827
|
return { $loc, token: $1 };
|
|
17944
17828
|
});
|
|
17945
17829
|
function LetOrConst(state) {
|
|
@@ -17964,7 +17848,7 @@ ${input.slice(result.pos)}
|
|
|
17964
17848
|
return result;
|
|
17965
17849
|
}
|
|
17966
17850
|
}
|
|
17967
|
-
var Const$0 = $TS($S($EXPECT($
|
|
17851
|
+
var Const$0 = $TS($S($EXPECT($L151, fail, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17968
17852
|
return { $loc, token: $1 };
|
|
17969
17853
|
});
|
|
17970
17854
|
function Const(state) {
|
|
@@ -17989,7 +17873,7 @@ ${input.slice(result.pos)}
|
|
|
17989
17873
|
return result;
|
|
17990
17874
|
}
|
|
17991
17875
|
}
|
|
17992
|
-
var Is$0 = $TS($S($EXPECT($
|
|
17876
|
+
var Is$0 = $TS($S($EXPECT($L152, fail, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17993
17877
|
return { $loc, token: $1 };
|
|
17994
17878
|
});
|
|
17995
17879
|
function Is(state) {
|
|
@@ -18038,7 +17922,7 @@ ${input.slice(result.pos)}
|
|
|
18038
17922
|
return result;
|
|
18039
17923
|
}
|
|
18040
17924
|
}
|
|
18041
|
-
var Loop$0 = $TS($S($EXPECT($
|
|
17925
|
+
var Loop$0 = $TS($S($EXPECT($L153, fail, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18042
17926
|
return { $loc, token: "while(true)" };
|
|
18043
17927
|
});
|
|
18044
17928
|
function Loop(state) {
|
|
@@ -18063,7 +17947,7 @@ ${input.slice(result.pos)}
|
|
|
18063
17947
|
return result;
|
|
18064
17948
|
}
|
|
18065
17949
|
}
|
|
18066
|
-
var New$0 = $TS($S($EXPECT($
|
|
17950
|
+
var New$0 = $TS($S($EXPECT($L154, fail, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18067
17951
|
return { $loc, token: $1 };
|
|
18068
17952
|
});
|
|
18069
17953
|
function New(state) {
|
|
@@ -18088,7 +17972,7 @@ ${input.slice(result.pos)}
|
|
|
18088
17972
|
return result;
|
|
18089
17973
|
}
|
|
18090
17974
|
}
|
|
18091
|
-
var Not$0 = $TS($S($EXPECT($
|
|
17975
|
+
var Not$0 = $TS($S($EXPECT($L155, fail, 'Not "not"'), NonIdContinue, $N($S($E(_), $EXPECT($L12, fail, 'Not ":"')))), function($skip, $loc, $0, $1, $2, $3) {
|
|
18092
17976
|
return { $loc, token: "!" };
|
|
18093
17977
|
});
|
|
18094
17978
|
function Not(state) {
|
|
@@ -18138,7 +18022,7 @@ ${input.slice(result.pos)}
|
|
|
18138
18022
|
return result;
|
|
18139
18023
|
}
|
|
18140
18024
|
}
|
|
18141
|
-
var OpenAngleBracket$0 = $TV($EXPECT($
|
|
18025
|
+
var OpenAngleBracket$0 = $TV($EXPECT($L156, fail, 'OpenAngleBracket "<"'), function($skip, $loc, $0, $1) {
|
|
18142
18026
|
return { $loc, token: $1 };
|
|
18143
18027
|
});
|
|
18144
18028
|
function OpenAngleBracket(state) {
|
|
@@ -18238,7 +18122,7 @@ ${input.slice(result.pos)}
|
|
|
18238
18122
|
return result;
|
|
18239
18123
|
}
|
|
18240
18124
|
}
|
|
18241
|
-
var Operator$0 = $TS($S($EXPECT($
|
|
18125
|
+
var Operator$0 = $TS($S($EXPECT($L157, fail, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18242
18126
|
return { $loc, token: $1 };
|
|
18243
18127
|
});
|
|
18244
18128
|
function Operator(state) {
|
|
@@ -18263,7 +18147,7 @@ ${input.slice(result.pos)}
|
|
|
18263
18147
|
return result;
|
|
18264
18148
|
}
|
|
18265
18149
|
}
|
|
18266
|
-
var Public$0 = $TS($S($EXPECT($
|
|
18150
|
+
var Public$0 = $TS($S($EXPECT($L158, fail, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18267
18151
|
return { $loc, token: $1 };
|
|
18268
18152
|
});
|
|
18269
18153
|
function Public(state) {
|
|
@@ -18288,7 +18172,7 @@ ${input.slice(result.pos)}
|
|
|
18288
18172
|
return result;
|
|
18289
18173
|
}
|
|
18290
18174
|
}
|
|
18291
|
-
var Private$0 = $TS($S($EXPECT($
|
|
18175
|
+
var Private$0 = $TS($S($EXPECT($L159, fail, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18292
18176
|
return { $loc, token: $1 };
|
|
18293
18177
|
});
|
|
18294
18178
|
function Private(state) {
|
|
@@ -18313,7 +18197,7 @@ ${input.slice(result.pos)}
|
|
|
18313
18197
|
return result;
|
|
18314
18198
|
}
|
|
18315
18199
|
}
|
|
18316
|
-
var Protected$0 = $TS($S($EXPECT($
|
|
18200
|
+
var Protected$0 = $TS($S($EXPECT($L160, fail, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18317
18201
|
return { $loc, token: $1 };
|
|
18318
18202
|
});
|
|
18319
18203
|
function Protected(state) {
|
|
@@ -18338,13 +18222,13 @@ ${input.slice(result.pos)}
|
|
|
18338
18222
|
return result;
|
|
18339
18223
|
}
|
|
18340
18224
|
}
|
|
18341
|
-
var Pipe$0 = $TV($C($EXPECT($
|
|
18225
|
+
var Pipe$0 = $TV($C($EXPECT($L161, fail, 'Pipe "||>"'), $EXPECT($L162, fail, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
|
|
18342
18226
|
return { $loc, token: "||>" };
|
|
18343
18227
|
});
|
|
18344
|
-
var Pipe$1 = $TV($C($EXPECT($
|
|
18228
|
+
var Pipe$1 = $TV($C($EXPECT($L163, fail, 'Pipe "|>="'), $EXPECT($L164, fail, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
|
|
18345
18229
|
return { $loc, token: "|>=" };
|
|
18346
18230
|
});
|
|
18347
|
-
var Pipe$2 = $TV($C($EXPECT($
|
|
18231
|
+
var Pipe$2 = $TV($C($EXPECT($L165, fail, 'Pipe "|>"'), $EXPECT($L166, fail, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
|
|
18348
18232
|
return { $loc, token: "|>" };
|
|
18349
18233
|
});
|
|
18350
18234
|
function Pipe(state) {
|
|
@@ -18394,7 +18278,7 @@ ${input.slice(result.pos)}
|
|
|
18394
18278
|
return result;
|
|
18395
18279
|
}
|
|
18396
18280
|
}
|
|
18397
|
-
var Readonly$0 = $TS($S($EXPECT($
|
|
18281
|
+
var Readonly$0 = $TS($S($EXPECT($L167, fail, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18398
18282
|
return { $loc, token: $1, ts: true };
|
|
18399
18283
|
});
|
|
18400
18284
|
function Readonly(state) {
|
|
@@ -18419,7 +18303,7 @@ ${input.slice(result.pos)}
|
|
|
18419
18303
|
return result;
|
|
18420
18304
|
}
|
|
18421
18305
|
}
|
|
18422
|
-
var Return$0 = $TS($S($EXPECT($
|
|
18306
|
+
var Return$0 = $TS($S($EXPECT($L168, fail, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18423
18307
|
return { $loc, token: $1 };
|
|
18424
18308
|
});
|
|
18425
18309
|
function Return(state) {
|
|
@@ -18444,7 +18328,7 @@ ${input.slice(result.pos)}
|
|
|
18444
18328
|
return result;
|
|
18445
18329
|
}
|
|
18446
18330
|
}
|
|
18447
|
-
var Satisfies$0 = $TS($S($EXPECT($
|
|
18331
|
+
var Satisfies$0 = $TS($S($EXPECT($L169, fail, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18448
18332
|
return { $loc, token: $1 };
|
|
18449
18333
|
});
|
|
18450
18334
|
function Satisfies(state) {
|
|
@@ -18494,7 +18378,7 @@ ${input.slice(result.pos)}
|
|
|
18494
18378
|
return result;
|
|
18495
18379
|
}
|
|
18496
18380
|
}
|
|
18497
|
-
var SingleQuote$0 = $TV($EXPECT($
|
|
18381
|
+
var SingleQuote$0 = $TV($EXPECT($L170, fail, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
18498
18382
|
return { $loc, token: $1 };
|
|
18499
18383
|
});
|
|
18500
18384
|
function SingleQuote(state) {
|
|
@@ -18544,7 +18428,7 @@ ${input.slice(result.pos)}
|
|
|
18544
18428
|
return result;
|
|
18545
18429
|
}
|
|
18546
18430
|
}
|
|
18547
|
-
var Static$0 = $TS($S($EXPECT($
|
|
18431
|
+
var Static$0 = $TS($S($EXPECT($L171, fail, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18548
18432
|
return { $loc, token: $1 };
|
|
18549
18433
|
});
|
|
18550
18434
|
var Static$1 = $TS($S($EXPECT($L118, fail, 'Static "@"'), $N($C($EXPECT($L4, fail, 'Static "("'), $EXPECT($L118, fail, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
|
|
@@ -18572,7 +18456,7 @@ ${input.slice(result.pos)}
|
|
|
18572
18456
|
return result;
|
|
18573
18457
|
}
|
|
18574
18458
|
}
|
|
18575
|
-
var SubstitutionStart$0 = $TV($EXPECT($
|
|
18459
|
+
var SubstitutionStart$0 = $TV($EXPECT($L172, fail, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
18576
18460
|
return { $loc, token: $1 };
|
|
18577
18461
|
});
|
|
18578
18462
|
function SubstitutionStart(state) {
|
|
@@ -18597,7 +18481,7 @@ ${input.slice(result.pos)}
|
|
|
18597
18481
|
return result;
|
|
18598
18482
|
}
|
|
18599
18483
|
}
|
|
18600
|
-
var Switch$0 = $TS($S($EXPECT($
|
|
18484
|
+
var Switch$0 = $TS($S($EXPECT($L173, fail, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18601
18485
|
return { $loc, token: $1 };
|
|
18602
18486
|
});
|
|
18603
18487
|
function Switch(state) {
|
|
@@ -18622,7 +18506,7 @@ ${input.slice(result.pos)}
|
|
|
18622
18506
|
return result;
|
|
18623
18507
|
}
|
|
18624
18508
|
}
|
|
18625
|
-
var Target$0 = $TS($S($EXPECT($
|
|
18509
|
+
var Target$0 = $TS($S($EXPECT($L174, fail, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18626
18510
|
return { $loc, token: $1 };
|
|
18627
18511
|
});
|
|
18628
18512
|
function Target(state) {
|
|
@@ -18647,7 +18531,7 @@ ${input.slice(result.pos)}
|
|
|
18647
18531
|
return result;
|
|
18648
18532
|
}
|
|
18649
18533
|
}
|
|
18650
|
-
var Then$0 = $TS($S(__, $EXPECT($
|
|
18534
|
+
var Then$0 = $TS($S(__, $EXPECT($L175, fail, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
18651
18535
|
return { $loc, token: "" };
|
|
18652
18536
|
});
|
|
18653
18537
|
function Then(state) {
|
|
@@ -18672,7 +18556,7 @@ ${input.slice(result.pos)}
|
|
|
18672
18556
|
return result;
|
|
18673
18557
|
}
|
|
18674
18558
|
}
|
|
18675
|
-
var This$0 = $TS($S($EXPECT($
|
|
18559
|
+
var This$0 = $TS($S($EXPECT($L176, fail, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18676
18560
|
return { $loc, token: $1 };
|
|
18677
18561
|
});
|
|
18678
18562
|
function This(state) {
|
|
@@ -18697,7 +18581,7 @@ ${input.slice(result.pos)}
|
|
|
18697
18581
|
return result;
|
|
18698
18582
|
}
|
|
18699
18583
|
}
|
|
18700
|
-
var Throw$0 = $TS($S($EXPECT($
|
|
18584
|
+
var Throw$0 = $TS($S($EXPECT($L177, fail, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18701
18585
|
return { $loc, token: $1 };
|
|
18702
18586
|
});
|
|
18703
18587
|
function Throw(state) {
|
|
@@ -18722,7 +18606,7 @@ ${input.slice(result.pos)}
|
|
|
18722
18606
|
return result;
|
|
18723
18607
|
}
|
|
18724
18608
|
}
|
|
18725
|
-
var TripleDoubleQuote$0 = $TV($EXPECT($
|
|
18609
|
+
var TripleDoubleQuote$0 = $TV($EXPECT($L178, fail, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
18726
18610
|
return { $loc, token: "`" };
|
|
18727
18611
|
});
|
|
18728
18612
|
function TripleDoubleQuote(state) {
|
|
@@ -18747,7 +18631,7 @@ ${input.slice(result.pos)}
|
|
|
18747
18631
|
return result;
|
|
18748
18632
|
}
|
|
18749
18633
|
}
|
|
18750
|
-
var TripleSingleQuote$0 = $TV($EXPECT($
|
|
18634
|
+
var TripleSingleQuote$0 = $TV($EXPECT($L179, fail, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
18751
18635
|
return { $loc, token: "`" };
|
|
18752
18636
|
});
|
|
18753
18637
|
function TripleSingleQuote(state) {
|
|
@@ -18772,7 +18656,7 @@ ${input.slice(result.pos)}
|
|
|
18772
18656
|
return result;
|
|
18773
18657
|
}
|
|
18774
18658
|
}
|
|
18775
|
-
var TripleSlash$0 = $TV($EXPECT($
|
|
18659
|
+
var TripleSlash$0 = $TV($EXPECT($L180, fail, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
18776
18660
|
return { $loc, token: "/" };
|
|
18777
18661
|
});
|
|
18778
18662
|
function TripleSlash(state) {
|
|
@@ -18797,7 +18681,7 @@ ${input.slice(result.pos)}
|
|
|
18797
18681
|
return result;
|
|
18798
18682
|
}
|
|
18799
18683
|
}
|
|
18800
|
-
var TripleTick$0 = $TV($EXPECT($
|
|
18684
|
+
var TripleTick$0 = $TV($EXPECT($L181, fail, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
18801
18685
|
return { $loc, token: "`" };
|
|
18802
18686
|
});
|
|
18803
18687
|
function TripleTick(state) {
|
|
@@ -18822,7 +18706,7 @@ ${input.slice(result.pos)}
|
|
|
18822
18706
|
return result;
|
|
18823
18707
|
}
|
|
18824
18708
|
}
|
|
18825
|
-
var Try$0 = $TS($S($EXPECT($
|
|
18709
|
+
var Try$0 = $TS($S($EXPECT($L182, fail, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18826
18710
|
return { $loc, token: $1 };
|
|
18827
18711
|
});
|
|
18828
18712
|
function Try(state) {
|
|
@@ -18847,7 +18731,7 @@ ${input.slice(result.pos)}
|
|
|
18847
18731
|
return result;
|
|
18848
18732
|
}
|
|
18849
18733
|
}
|
|
18850
|
-
var Typeof$0 = $TS($S($EXPECT($
|
|
18734
|
+
var Typeof$0 = $TS($S($EXPECT($L183, fail, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18851
18735
|
return { $loc, token: $1 };
|
|
18852
18736
|
});
|
|
18853
18737
|
function Typeof(state) {
|
|
@@ -18872,7 +18756,7 @@ ${input.slice(result.pos)}
|
|
|
18872
18756
|
return result;
|
|
18873
18757
|
}
|
|
18874
18758
|
}
|
|
18875
|
-
var Unless$0 = $TS($S($EXPECT($
|
|
18759
|
+
var Unless$0 = $TS($S($EXPECT($L184, fail, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18876
18760
|
return { $loc, token: $1 };
|
|
18877
18761
|
});
|
|
18878
18762
|
function Unless(state) {
|
|
@@ -18897,7 +18781,7 @@ ${input.slice(result.pos)}
|
|
|
18897
18781
|
return result;
|
|
18898
18782
|
}
|
|
18899
18783
|
}
|
|
18900
|
-
var Until$0 = $TS($S($EXPECT($
|
|
18784
|
+
var Until$0 = $TS($S($EXPECT($L185, fail, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18901
18785
|
return { $loc, token: $1 };
|
|
18902
18786
|
});
|
|
18903
18787
|
function Until(state) {
|
|
@@ -18922,7 +18806,7 @@ ${input.slice(result.pos)}
|
|
|
18922
18806
|
return result;
|
|
18923
18807
|
}
|
|
18924
18808
|
}
|
|
18925
|
-
var Var$0 = $TS($S($EXPECT($
|
|
18809
|
+
var Var$0 = $TS($S($EXPECT($L186, fail, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18926
18810
|
return { $loc, token: $1 };
|
|
18927
18811
|
});
|
|
18928
18812
|
function Var(state) {
|
|
@@ -18947,7 +18831,7 @@ ${input.slice(result.pos)}
|
|
|
18947
18831
|
return result;
|
|
18948
18832
|
}
|
|
18949
18833
|
}
|
|
18950
|
-
var Void$0 = $TS($S($EXPECT($
|
|
18834
|
+
var Void$0 = $TS($S($EXPECT($L187, fail, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18951
18835
|
return { $loc, token: $1 };
|
|
18952
18836
|
});
|
|
18953
18837
|
function Void(state) {
|
|
@@ -18972,7 +18856,7 @@ ${input.slice(result.pos)}
|
|
|
18972
18856
|
return result;
|
|
18973
18857
|
}
|
|
18974
18858
|
}
|
|
18975
|
-
var When$0 = $TS($S($EXPECT($
|
|
18859
|
+
var When$0 = $TS($S($EXPECT($L188, fail, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
18976
18860
|
return { $loc, token: "case" };
|
|
18977
18861
|
});
|
|
18978
18862
|
function When(state) {
|
|
@@ -18997,7 +18881,7 @@ ${input.slice(result.pos)}
|
|
|
18997
18881
|
return result;
|
|
18998
18882
|
}
|
|
18999
18883
|
}
|
|
19000
|
-
var While$0 = $TS($S($EXPECT($
|
|
18884
|
+
var While$0 = $TS($S($EXPECT($L189, fail, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
19001
18885
|
return { $loc, token: $1 };
|
|
19002
18886
|
});
|
|
19003
18887
|
function While(state) {
|
|
@@ -19022,7 +18906,7 @@ ${input.slice(result.pos)}
|
|
|
19022
18906
|
return result;
|
|
19023
18907
|
}
|
|
19024
18908
|
}
|
|
19025
|
-
var Yield$0 = $TS($S($EXPECT($
|
|
18909
|
+
var Yield$0 = $TS($S($EXPECT($L190, fail, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
19026
18910
|
return { $loc, token: $1, type: "Yield" };
|
|
19027
18911
|
});
|
|
19028
18912
|
function Yield(state) {
|
|
@@ -19047,7 +18931,7 @@ ${input.slice(result.pos)}
|
|
|
19047
18931
|
return result;
|
|
19048
18932
|
}
|
|
19049
18933
|
}
|
|
19050
|
-
var JSXImplicitFragment$0 = $TS($S(JSXTag, $Q($S(
|
|
18934
|
+
var JSXImplicitFragment$0 = $TS($S(JSXTag, $Q($S(Nested, JSXTag))), function($skip, $loc, $0, $1, $2) {
|
|
19051
18935
|
const jsx = $2.length === 0 ? $1 : {
|
|
19052
18936
|
type: "JSXFragment",
|
|
19053
18937
|
children: [
|
|
@@ -19167,7 +19051,7 @@ ${input.slice(result.pos)}
|
|
|
19167
19051
|
return result;
|
|
19168
19052
|
}
|
|
19169
19053
|
}
|
|
19170
|
-
var JSXSelfClosingElement$0 = $TS($S($EXPECT($
|
|
19054
|
+
var JSXSelfClosingElement$0 = $TS($S($EXPECT($L156, fail, 'JSXSelfClosingElement "<"'), JSXElementName, $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L191, fail, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
19171
19055
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
19172
19056
|
});
|
|
19173
19057
|
function JSXSelfClosingElement(state) {
|
|
@@ -19243,7 +19127,7 @@ ${input.slice(result.pos)}
|
|
|
19243
19127
|
return result;
|
|
19244
19128
|
}
|
|
19245
19129
|
}
|
|
19246
|
-
var JSXOpeningElement$0 = $S($EXPECT($
|
|
19130
|
+
var JSXOpeningElement$0 = $S($EXPECT($L156, fail, 'JSXOpeningElement "<"'), JSXElementName, $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L34, fail, 'JSXOpeningElement ">"'));
|
|
19247
19131
|
function JSXOpeningElement(state) {
|
|
19248
19132
|
let eventData;
|
|
19249
19133
|
if (state.events) {
|
|
@@ -19295,7 +19179,7 @@ ${input.slice(result.pos)}
|
|
|
19295
19179
|
return result;
|
|
19296
19180
|
}
|
|
19297
19181
|
}
|
|
19298
|
-
var JSXClosingElement$0 = $S($EXPECT($
|
|
19182
|
+
var JSXClosingElement$0 = $S($EXPECT($L192, fail, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L34, fail, 'JSXClosingElement ">"'));
|
|
19299
19183
|
function JSXClosingElement(state) {
|
|
19300
19184
|
let eventData;
|
|
19301
19185
|
if (state.events) {
|
|
@@ -19333,7 +19217,7 @@ ${input.slice(result.pos)}
|
|
|
19333
19217
|
];
|
|
19334
19218
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
19335
19219
|
});
|
|
19336
|
-
var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($
|
|
19220
|
+
var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L193, fail, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
19337
19221
|
var children = $3;
|
|
19338
19222
|
$0 = $0.slice(1);
|
|
19339
19223
|
return {
|
|
@@ -19364,7 +19248,7 @@ ${input.slice(result.pos)}
|
|
|
19364
19248
|
return result;
|
|
19365
19249
|
}
|
|
19366
19250
|
}
|
|
19367
|
-
var PushJSXOpeningFragment$0 = $TV($EXPECT($
|
|
19251
|
+
var PushJSXOpeningFragment$0 = $TV($EXPECT($L193, fail, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
19368
19252
|
module.JSXTagStack.push("");
|
|
19369
19253
|
return $1;
|
|
19370
19254
|
});
|
|
@@ -19418,7 +19302,7 @@ ${input.slice(result.pos)}
|
|
|
19418
19302
|
return result;
|
|
19419
19303
|
}
|
|
19420
19304
|
}
|
|
19421
|
-
var JSXClosingFragment$0 = $EXPECT($
|
|
19305
|
+
var JSXClosingFragment$0 = $EXPECT($L194, fail, 'JSXClosingFragment "</>"');
|
|
19422
19306
|
function JSXClosingFragment(state) {
|
|
19423
19307
|
let eventData;
|
|
19424
19308
|
if (state.events) {
|
|
@@ -20387,7 +20271,7 @@ ${input.slice(result.pos)}
|
|
|
20387
20271
|
return result;
|
|
20388
20272
|
}
|
|
20389
20273
|
}
|
|
20390
|
-
var JSXComment$0 = $TS($S($EXPECT($
|
|
20274
|
+
var JSXComment$0 = $TS($S($EXPECT($L195, fail, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L196, fail, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
|
|
20391
20275
|
return ["{/*", $2, "*/}"];
|
|
20392
20276
|
});
|
|
20393
20277
|
function JSXComment(state) {
|
|
@@ -20567,7 +20451,7 @@ ${input.slice(result.pos)}
|
|
|
20567
20451
|
return result;
|
|
20568
20452
|
}
|
|
20569
20453
|
}
|
|
20570
|
-
var TypeDeclarationRest$0 = $S(TypeKeyword, $E(_), IdentifierName, $E(TypeParameters),
|
|
20454
|
+
var TypeDeclarationRest$0 = $S(TypeKeyword, $E(_), IdentifierName, $E(TypeParameters), OptionalEquals, $C($S($E(_), Type), $S(__, Type)));
|
|
20571
20455
|
var TypeDeclarationRest$1 = $S(Interface, $E(_), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock);
|
|
20572
20456
|
var TypeDeclarationRest$2 = $S(Namespace, $E(_), IdentifierName, ModuleBlock);
|
|
20573
20457
|
var TypeDeclarationRest$3 = FunctionSignature;
|
|
@@ -20593,6 +20477,32 @@ ${input.slice(result.pos)}
|
|
|
20593
20477
|
return result;
|
|
20594
20478
|
}
|
|
20595
20479
|
}
|
|
20480
|
+
var OptionalEquals$0 = $S(__, Equals);
|
|
20481
|
+
var OptionalEquals$1 = $T($S($Y(IndentedFurther), InsertSpaceEquals), function(value) {
|
|
20482
|
+
return value[1];
|
|
20483
|
+
});
|
|
20484
|
+
function OptionalEquals(state) {
|
|
20485
|
+
let eventData;
|
|
20486
|
+
if (state.events) {
|
|
20487
|
+
const result = state.events.enter?.("OptionalEquals", state);
|
|
20488
|
+
if (result) {
|
|
20489
|
+
if (result.cache)
|
|
20490
|
+
return result.cache;
|
|
20491
|
+
eventData = result.data;
|
|
20492
|
+
}
|
|
20493
|
+
}
|
|
20494
|
+
if (state.tokenize) {
|
|
20495
|
+
const result = $TOKEN("OptionalEquals", state, OptionalEquals$0(state) || OptionalEquals$1(state));
|
|
20496
|
+
if (state.events)
|
|
20497
|
+
state.events.exit?.("OptionalEquals", state, result, eventData);
|
|
20498
|
+
return result;
|
|
20499
|
+
} else {
|
|
20500
|
+
const result = OptionalEquals$0(state) || OptionalEquals$1(state);
|
|
20501
|
+
if (state.events)
|
|
20502
|
+
state.events.exit?.("OptionalEquals", state, result, eventData);
|
|
20503
|
+
return result;
|
|
20504
|
+
}
|
|
20505
|
+
}
|
|
20596
20506
|
var TypeLexicalDeclaration$0 = $S(__, LetOrConstOrVar, TypeDeclarationBinding, $Q($S(CommaDelimiter, __, TypeDeclarationBinding)));
|
|
20597
20507
|
var TypeLexicalDeclaration$1 = $S(__, EnumDeclaration);
|
|
20598
20508
|
var TypeLexicalDeclaration$2 = ClassSignature;
|
|
@@ -20690,7 +20600,7 @@ ${input.slice(result.pos)}
|
|
|
20690
20600
|
return result;
|
|
20691
20601
|
}
|
|
20692
20602
|
}
|
|
20693
|
-
var TypeKeyword$0 = $TS($S($EXPECT($
|
|
20603
|
+
var TypeKeyword$0 = $TS($S($EXPECT($L197, fail, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
20694
20604
|
return { $loc, token: $1 };
|
|
20695
20605
|
});
|
|
20696
20606
|
function TypeKeyword(state) {
|
|
@@ -20715,7 +20625,7 @@ ${input.slice(result.pos)}
|
|
|
20715
20625
|
return result;
|
|
20716
20626
|
}
|
|
20717
20627
|
}
|
|
20718
|
-
var Enum$0 = $TS($S($EXPECT($
|
|
20628
|
+
var Enum$0 = $TS($S($EXPECT($L198, fail, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
20719
20629
|
return { $loc, token: $1 };
|
|
20720
20630
|
});
|
|
20721
20631
|
function Enum(state) {
|
|
@@ -20740,7 +20650,7 @@ ${input.slice(result.pos)}
|
|
|
20740
20650
|
return result;
|
|
20741
20651
|
}
|
|
20742
20652
|
}
|
|
20743
|
-
var Interface$0 = $TS($S($EXPECT($
|
|
20653
|
+
var Interface$0 = $TS($S($EXPECT($L199, fail, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
20744
20654
|
return { $loc, token: $1 };
|
|
20745
20655
|
});
|
|
20746
20656
|
function Interface(state) {
|
|
@@ -20765,7 +20675,7 @@ ${input.slice(result.pos)}
|
|
|
20765
20675
|
return result;
|
|
20766
20676
|
}
|
|
20767
20677
|
}
|
|
20768
|
-
var Global$0 = $TS($S($EXPECT($
|
|
20678
|
+
var Global$0 = $TS($S($EXPECT($L200, fail, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
20769
20679
|
return { $loc, token: $1 };
|
|
20770
20680
|
});
|
|
20771
20681
|
function Global(state) {
|
|
@@ -20790,7 +20700,7 @@ ${input.slice(result.pos)}
|
|
|
20790
20700
|
return result;
|
|
20791
20701
|
}
|
|
20792
20702
|
}
|
|
20793
|
-
var Module$0 = $TS($S($EXPECT($
|
|
20703
|
+
var Module$0 = $TS($S($EXPECT($L201, fail, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
20794
20704
|
return { $loc, token: $1 };
|
|
20795
20705
|
});
|
|
20796
20706
|
function Module(state) {
|
|
@@ -20815,7 +20725,7 @@ ${input.slice(result.pos)}
|
|
|
20815
20725
|
return result;
|
|
20816
20726
|
}
|
|
20817
20727
|
}
|
|
20818
|
-
var Namespace$0 = $TS($S($EXPECT($
|
|
20728
|
+
var Namespace$0 = $TS($S($EXPECT($L202, fail, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
20819
20729
|
return { $loc, token: $1 };
|
|
20820
20730
|
});
|
|
20821
20731
|
function Namespace(state) {
|
|
@@ -21509,7 +21419,7 @@ ${input.slice(result.pos)}
|
|
|
21509
21419
|
return result;
|
|
21510
21420
|
}
|
|
21511
21421
|
}
|
|
21512
|
-
var ReturnType$0 = $TS($S($E($S(__, $EXPECT($
|
|
21422
|
+
var ReturnType$0 = $TS($S($E($S(__, $EXPECT($L203, fail, 'ReturnType "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2) {
|
|
21513
21423
|
var asserts = $1;
|
|
21514
21424
|
var t = $2;
|
|
21515
21425
|
if (asserts) {
|
|
@@ -21549,7 +21459,7 @@ ${input.slice(result.pos)}
|
|
|
21549
21459
|
return result;
|
|
21550
21460
|
}
|
|
21551
21461
|
}
|
|
21552
|
-
var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($
|
|
21462
|
+
var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($L152, fail, 'TypePredicate "is"'), NonIdContinue, Type))), function($skip, $loc, $0, $1, $2) {
|
|
21553
21463
|
var lhs = $1;
|
|
21554
21464
|
var rhs = $2;
|
|
21555
21465
|
if (!rhs)
|
|
@@ -21691,10 +21601,10 @@ ${input.slice(result.pos)}
|
|
|
21691
21601
|
return result;
|
|
21692
21602
|
}
|
|
21693
21603
|
}
|
|
21694
|
-
var TypeUnaryOp$0 = $S($EXPECT($
|
|
21695
|
-
var TypeUnaryOp$1 = $S($EXPECT($
|
|
21696
|
-
var TypeUnaryOp$2 = $S($EXPECT($
|
|
21697
|
-
var TypeUnaryOp$3 = $S($EXPECT($
|
|
21604
|
+
var TypeUnaryOp$0 = $S($EXPECT($L204, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
21605
|
+
var TypeUnaryOp$1 = $S($EXPECT($L183, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
|
|
21606
|
+
var TypeUnaryOp$2 = $S($EXPECT($L205, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
|
|
21607
|
+
var TypeUnaryOp$3 = $S($EXPECT($L167, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
21698
21608
|
function TypeUnaryOp(state) {
|
|
21699
21609
|
let eventData;
|
|
21700
21610
|
if (state.events) {
|
|
@@ -21740,10 +21650,10 @@ ${input.slice(result.pos)}
|
|
|
21740
21650
|
return result;
|
|
21741
21651
|
}
|
|
21742
21652
|
}
|
|
21743
|
-
var TypePrimary$0 =
|
|
21744
|
-
var TypePrimary$1 =
|
|
21745
|
-
var TypePrimary$2 = $S($E(_),
|
|
21746
|
-
var TypePrimary$3 = $S($E(_),
|
|
21653
|
+
var TypePrimary$0 = $S($E(_), TypeTuple);
|
|
21654
|
+
var TypePrimary$1 = InterfaceBlock;
|
|
21655
|
+
var TypePrimary$2 = $S($E(_), FunctionType);
|
|
21656
|
+
var TypePrimary$3 = $S($E(_), InlineInterfaceLiteral);
|
|
21747
21657
|
var TypePrimary$4 = $S($E(_), ImportType);
|
|
21748
21658
|
var TypePrimary$5 = $TS($S($E(_), TypeLiteral), function($skip, $loc, $0, $1, $2) {
|
|
21749
21659
|
var t = $2;
|
|
@@ -21856,25 +21766,34 @@ ${input.slice(result.pos)}
|
|
|
21856
21766
|
return result;
|
|
21857
21767
|
}
|
|
21858
21768
|
}
|
|
21859
|
-
var TypeElement$0 = $TS($S(__, IdentifierName, $E(_), DotDotDot, $S(__, $E($S(QuestionMark, $E(_))), Colon, __), Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
21769
|
+
var TypeElement$0 = $TS($S(__, $E($S(DotDotDot, __)), IdentifierName, $E($S($E(_), DotDotDot)), $S(__, $E($S(QuestionMark, $E(_))), Colon, __), Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
21860
21770
|
var ws = $1;
|
|
21861
|
-
var
|
|
21862
|
-
var
|
|
21863
|
-
var
|
|
21771
|
+
var dots1 = $2;
|
|
21772
|
+
var name = $3;
|
|
21773
|
+
var dots2 = $4;
|
|
21864
21774
|
var colon = $5;
|
|
21865
21775
|
var type = $6;
|
|
21866
|
-
|
|
21776
|
+
let dots = dots1 || dots2 && [dots2[1], dots2[0]];
|
|
21777
|
+
if (dots1 && dots2) {
|
|
21778
|
+
dots = [dots, {
|
|
21779
|
+
type: "Error",
|
|
21780
|
+
message: "... both before and after identifier"
|
|
21781
|
+
}];
|
|
21782
|
+
}
|
|
21783
|
+
return [ws, dots, name, colon, type];
|
|
21867
21784
|
});
|
|
21868
|
-
var TypeElement$1 = $
|
|
21785
|
+
var TypeElement$1 = $S(__, DotDotDot, __, Type);
|
|
21786
|
+
var TypeElement$2 = $TS($S(Type, $E($S($E(_), DotDotDot))), function($skip, $loc, $0, $1, $2) {
|
|
21869
21787
|
var type = $1;
|
|
21870
|
-
var
|
|
21871
|
-
|
|
21788
|
+
var spaceDots = $2;
|
|
21789
|
+
if (!spaceDots)
|
|
21790
|
+
return type;
|
|
21791
|
+
const [space, dots] = spaceDots;
|
|
21872
21792
|
const ws = getTrimmingSpace(type);
|
|
21873
21793
|
if (!ws)
|
|
21874
21794
|
return [dots, space, type];
|
|
21875
21795
|
return [ws, dots, space, insertTrimmingSpace(type, "")];
|
|
21876
21796
|
});
|
|
21877
|
-
var TypeElement$2 = $S($E($S(__, DotDotDot)), $E($S(__, IdentifierName, __, $E($S(QuestionMark, $E(_))), Colon, __)), Type);
|
|
21878
21797
|
function TypeElement(state) {
|
|
21879
21798
|
let eventData;
|
|
21880
21799
|
if (state.events) {
|
|
@@ -21948,7 +21867,7 @@ ${input.slice(result.pos)}
|
|
|
21948
21867
|
return result;
|
|
21949
21868
|
}
|
|
21950
21869
|
}
|
|
21951
|
-
var TypeConditional$0 = $TS($S(TypeBinary, $E($S(__, $EXPECT($
|
|
21870
|
+
var TypeConditional$0 = $TS($S(TypeBinary, $E($S(__, $EXPECT($L141, fail, 'TypeConditional "extends"'), NonIdContinue, Type, $E($S(__, QuestionMark, Type, __, Colon, Type))))), function($skip, $loc, $0, $1, $2) {
|
|
21952
21871
|
if ($2)
|
|
21953
21872
|
return $0;
|
|
21954
21873
|
return $1;
|
|
@@ -22080,10 +21999,10 @@ ${input.slice(result.pos)}
|
|
|
22080
21999
|
}
|
|
22081
22000
|
var TypeLiteral$0 = TypeTemplateLiteral;
|
|
22082
22001
|
var TypeLiteral$1 = Literal;
|
|
22083
|
-
var TypeLiteral$2 = $TS($S($EXPECT($
|
|
22002
|
+
var TypeLiteral$2 = $TS($S($EXPECT($L187, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
22084
22003
|
return { type: "VoidType", $loc, token: $1 };
|
|
22085
22004
|
});
|
|
22086
|
-
var TypeLiteral$3 = $TV($EXPECT($
|
|
22005
|
+
var TypeLiteral$3 = $TV($EXPECT($L206, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
22087
22006
|
return { $loc, token: "[]" };
|
|
22088
22007
|
});
|
|
22089
22008
|
function TypeLiteral(state) {
|
|
@@ -22264,7 +22183,7 @@ ${input.slice(result.pos)}
|
|
|
22264
22183
|
return result;
|
|
22265
22184
|
}
|
|
22266
22185
|
}
|
|
22267
|
-
var TypeArguments$0 = $TS($S($EXPECT($
|
|
22186
|
+
var TypeArguments$0 = $TS($S($EXPECT($L156, fail, 'TypeArguments "<"'), $P(TypeArgument), __, $EXPECT($L34, fail, 'TypeArguments ">"')), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
22268
22187
|
var args = $2;
|
|
22269
22188
|
return { ts: true, types: args.map(([, t]) => t), children: $0 };
|
|
22270
22189
|
});
|
|
@@ -22336,7 +22255,7 @@ ${input.slice(result.pos)}
|
|
|
22336
22255
|
return result;
|
|
22337
22256
|
}
|
|
22338
22257
|
}
|
|
22339
|
-
var TypeParameters$0 = $TS($S($E(_), $EXPECT($
|
|
22258
|
+
var TypeParameters$0 = $TS($S($E(_), $EXPECT($L156, fail, 'TypeParameters "<"'), $P(TypeParameter), __, $EXPECT($L34, fail, 'TypeParameters ">"')), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
22340
22259
|
var parameters = $3;
|
|
22341
22260
|
return {
|
|
22342
22261
|
type: "TypeParameters",
|
|
@@ -22367,7 +22286,7 @@ ${input.slice(result.pos)}
|
|
|
22367
22286
|
return result;
|
|
22368
22287
|
}
|
|
22369
22288
|
}
|
|
22370
|
-
var TypeParameter$0 = $S(__, $E($S($EXPECT($
|
|
22289
|
+
var TypeParameter$0 = $S(__, $E($S($EXPECT($L151, fail, 'TypeParameter "const"'), $E(_))), Identifier, $E(TypeConstraint), $E(TypeInitializer), TypeParameterDelimiter);
|
|
22371
22290
|
function TypeParameter(state) {
|
|
22372
22291
|
let eventData;
|
|
22373
22292
|
if (state.events) {
|
|
@@ -22390,7 +22309,7 @@ ${input.slice(result.pos)}
|
|
|
22390
22309
|
return result;
|
|
22391
22310
|
}
|
|
22392
22311
|
}
|
|
22393
|
-
var TypeConstraint$0 = $S(__, $EXPECT($
|
|
22312
|
+
var TypeConstraint$0 = $S(__, $EXPECT($L141, fail, 'TypeConstraint "extends"'), NonIdContinue, Type);
|
|
22394
22313
|
function TypeConstraint(state) {
|
|
22395
22314
|
let eventData;
|
|
22396
22315
|
if (state.events) {
|
|
@@ -22541,7 +22460,7 @@ ${input.slice(result.pos)}
|
|
|
22541
22460
|
return result;
|
|
22542
22461
|
}
|
|
22543
22462
|
}
|
|
22544
|
-
var CivetPrologueContent$0 = $TS($S($EXPECT($
|
|
22463
|
+
var CivetPrologueContent$0 = $TS($S($EXPECT($L207, fail, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R63, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
22545
22464
|
var options = $3;
|
|
22546
22465
|
return {
|
|
22547
22466
|
type: "CivetPrologue",
|
|
@@ -22977,6 +22896,31 @@ ${input.slice(result.pos)}
|
|
|
22977
22896
|
return result;
|
|
22978
22897
|
}
|
|
22979
22898
|
}
|
|
22899
|
+
var InsertSpaceEquals$0 = $TV($EXPECT($L0, fail, 'InsertSpaceEquals ""'), function($skip, $loc, $0, $1) {
|
|
22900
|
+
return { $loc, token: " =" };
|
|
22901
|
+
});
|
|
22902
|
+
function InsertSpaceEquals(state) {
|
|
22903
|
+
let eventData;
|
|
22904
|
+
if (state.events) {
|
|
22905
|
+
const result = state.events.enter?.("InsertSpaceEquals", state);
|
|
22906
|
+
if (result) {
|
|
22907
|
+
if (result.cache)
|
|
22908
|
+
return result.cache;
|
|
22909
|
+
eventData = result.data;
|
|
22910
|
+
}
|
|
22911
|
+
}
|
|
22912
|
+
if (state.tokenize) {
|
|
22913
|
+
const result = $TOKEN("InsertSpaceEquals", state, InsertSpaceEquals$0(state));
|
|
22914
|
+
if (state.events)
|
|
22915
|
+
state.events.exit?.("InsertSpaceEquals", state, result, eventData);
|
|
22916
|
+
return result;
|
|
22917
|
+
} else {
|
|
22918
|
+
const result = InsertSpaceEquals$0(state);
|
|
22919
|
+
if (state.events)
|
|
22920
|
+
state.events.exit?.("InsertSpaceEquals", state, result, eventData);
|
|
22921
|
+
return result;
|
|
22922
|
+
}
|
|
22923
|
+
}
|
|
22980
22924
|
var InsertConst$0 = $TV($EXPECT($L0, fail, 'InsertConst ""'), function($skip, $loc, $0, $1) {
|
|
22981
22925
|
return { $loc, token: "const " };
|
|
22982
22926
|
});
|
|
@@ -23589,7 +23533,6 @@ ${input.slice(result.pos)}
|
|
|
23589
23533
|
module.forbidIndentedApplication = [false];
|
|
23590
23534
|
module.forbidBracedApplication = [false];
|
|
23591
23535
|
module.forbidTrailingMemberProperty = [false];
|
|
23592
|
-
module.forbidMultiLineImplicitObjectLiteral = [false];
|
|
23593
23536
|
module.forbidNewlineBinaryOp = [false];
|
|
23594
23537
|
module.JSXTagStack = [];
|
|
23595
23538
|
module.operators = /* @__PURE__ */ new Set();
|
|
@@ -23626,12 +23569,6 @@ ${input.slice(result.pos)}
|
|
|
23626
23569
|
return s[s.length - 1];
|
|
23627
23570
|
}
|
|
23628
23571
|
},
|
|
23629
|
-
multiLineImplicitObjectLiteralForbidden: {
|
|
23630
|
-
get() {
|
|
23631
|
-
const { forbidMultiLineImplicitObjectLiteral: s } = module;
|
|
23632
|
-
return s[s.length - 1];
|
|
23633
|
-
}
|
|
23634
|
-
},
|
|
23635
23572
|
newlineBinaryOpForbidden: {
|
|
23636
23573
|
get() {
|
|
23637
23574
|
const { forbidNewlineBinaryOp: s } = module;
|
|
@@ -23766,11 +23703,7 @@ ${input.slice(result.pos)}
|
|
|
23766
23703
|
module.getRef = function(base) {
|
|
23767
23704
|
if (refs.hasOwnProperty(base))
|
|
23768
23705
|
return refs[base];
|
|
23769
|
-
const ref =
|
|
23770
|
-
type: "Ref",
|
|
23771
|
-
base,
|
|
23772
|
-
id: base
|
|
23773
|
-
};
|
|
23706
|
+
const ref = makeRef(base);
|
|
23774
23707
|
if (declareRef.hasOwnProperty(base))
|
|
23775
23708
|
declareRef[base](ref);
|
|
23776
23709
|
return refs[base] = ref;
|
|
@@ -23934,19 +23867,11 @@ ${input.slice(result.pos)}
|
|
|
23934
23867
|
return result;
|
|
23935
23868
|
}
|
|
23936
23869
|
}
|
|
23937
|
-
var
|
|
23938
|
-
|
|
23939
|
-
const { level } = indent;
|
|
23940
|
-
const currentIndentLevel = module.currentIndent.level;
|
|
23941
|
-
if (level === currentIndentLevel) {
|
|
23942
|
-
return $0;
|
|
23943
|
-
}
|
|
23944
|
-
return $skip;
|
|
23945
|
-
});
|
|
23946
|
-
function Samedent(state) {
|
|
23870
|
+
var PushIndent$0 = $Y($S(EOS, TrackIndented));
|
|
23871
|
+
function PushIndent(state) {
|
|
23947
23872
|
let eventData;
|
|
23948
23873
|
if (state.events) {
|
|
23949
|
-
const result = state.events.enter?.("
|
|
23874
|
+
const result = state.events.enter?.("PushIndent", state);
|
|
23950
23875
|
if (result) {
|
|
23951
23876
|
if (result.cache)
|
|
23952
23877
|
return result.cache;
|
|
@@ -23954,30 +23879,27 @@ ${input.slice(result.pos)}
|
|
|
23954
23879
|
}
|
|
23955
23880
|
}
|
|
23956
23881
|
if (state.tokenize) {
|
|
23957
|
-
const result = $TOKEN("
|
|
23882
|
+
const result = $TOKEN("PushIndent", state, PushIndent$0(state));
|
|
23958
23883
|
if (state.events)
|
|
23959
|
-
state.events.exit?.("
|
|
23884
|
+
state.events.exit?.("PushIndent", state, result, eventData);
|
|
23960
23885
|
return result;
|
|
23961
23886
|
} else {
|
|
23962
|
-
const result =
|
|
23887
|
+
const result = PushIndent$0(state);
|
|
23963
23888
|
if (state.events)
|
|
23964
|
-
state.events.exit?.("
|
|
23889
|
+
state.events.exit?.("PushIndent", state, result, eventData);
|
|
23965
23890
|
return result;
|
|
23966
23891
|
}
|
|
23967
23892
|
}
|
|
23968
|
-
var
|
|
23969
|
-
|
|
23970
|
-
|
|
23971
|
-
const currentIndentLevel = module.currentIndent.level;
|
|
23972
|
-
if (level > currentIndentLevel) {
|
|
23973
|
-
return $0;
|
|
23893
|
+
var PopIndent$0 = $TV($EXPECT($L0, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
|
|
23894
|
+
if (module.config.verbose) {
|
|
23895
|
+
console.log("popping indent", module.indentLevels[module.indentLevels.length - 1], "->", module.indentLevels[module.indentLevels.length - 2]);
|
|
23974
23896
|
}
|
|
23975
|
-
|
|
23897
|
+
module.indentLevels.pop();
|
|
23976
23898
|
});
|
|
23977
|
-
function
|
|
23899
|
+
function PopIndent(state) {
|
|
23978
23900
|
let eventData;
|
|
23979
23901
|
if (state.events) {
|
|
23980
|
-
const result = state.events.enter?.("
|
|
23902
|
+
const result = state.events.enter?.("PopIndent", state);
|
|
23981
23903
|
if (result) {
|
|
23982
23904
|
if (result.cache)
|
|
23983
23905
|
return result.cache;
|
|
@@ -23985,29 +23907,30 @@ ${input.slice(result.pos)}
|
|
|
23985
23907
|
}
|
|
23986
23908
|
}
|
|
23987
23909
|
if (state.tokenize) {
|
|
23988
|
-
const result = $TOKEN("
|
|
23910
|
+
const result = $TOKEN("PopIndent", state, PopIndent$0(state));
|
|
23989
23911
|
if (state.events)
|
|
23990
|
-
state.events.exit?.("
|
|
23912
|
+
state.events.exit?.("PopIndent", state, result, eventData);
|
|
23991
23913
|
return result;
|
|
23992
23914
|
} else {
|
|
23993
|
-
const result =
|
|
23915
|
+
const result = PopIndent$0(state);
|
|
23994
23916
|
if (state.events)
|
|
23995
|
-
state.events.exit?.("
|
|
23917
|
+
state.events.exit?.("PopIndent", state, result, eventData);
|
|
23996
23918
|
return result;
|
|
23997
23919
|
}
|
|
23998
23920
|
}
|
|
23999
|
-
var
|
|
24000
|
-
|
|
24001
|
-
if (
|
|
24002
|
-
|
|
24003
|
-
if (
|
|
24004
|
-
|
|
24005
|
-
|
|
23921
|
+
var Nested$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
|
|
23922
|
+
var indent = $2;
|
|
23923
|
+
if (indent.level === module.currentIndent.level)
|
|
23924
|
+
return $0;
|
|
23925
|
+
if (module.config.verbose) {
|
|
23926
|
+
console.log(`failing Nested: ${indent.level} does not match current indent level ${module.currentIndent.level}`);
|
|
23927
|
+
}
|
|
23928
|
+
return $skip;
|
|
24006
23929
|
});
|
|
24007
|
-
function
|
|
23930
|
+
function Nested(state) {
|
|
24008
23931
|
let eventData;
|
|
24009
23932
|
if (state.events) {
|
|
24010
|
-
const result = state.events.enter?.("
|
|
23933
|
+
const result = state.events.enter?.("Nested", state);
|
|
24011
23934
|
if (result) {
|
|
24012
23935
|
if (result.cache)
|
|
24013
23936
|
return result.cache;
|
|
@@ -24015,24 +23938,27 @@ ${input.slice(result.pos)}
|
|
|
24015
23938
|
}
|
|
24016
23939
|
}
|
|
24017
23940
|
if (state.tokenize) {
|
|
24018
|
-
const result = $TOKEN("
|
|
23941
|
+
const result = $TOKEN("Nested", state, Nested$0(state));
|
|
24019
23942
|
if (state.events)
|
|
24020
|
-
state.events.exit?.("
|
|
23943
|
+
state.events.exit?.("Nested", state, result, eventData);
|
|
24021
23944
|
return result;
|
|
24022
23945
|
} else {
|
|
24023
|
-
const result =
|
|
23946
|
+
const result = Nested$0(state);
|
|
24024
23947
|
if (state.events)
|
|
24025
|
-
state.events.exit?.("
|
|
23948
|
+
state.events.exit?.("Nested", state, result, eventData);
|
|
24026
23949
|
return result;
|
|
24027
23950
|
}
|
|
24028
23951
|
}
|
|
24029
|
-
var
|
|
24030
|
-
|
|
23952
|
+
var IndentedFurther$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
|
|
23953
|
+
var indent = $2;
|
|
23954
|
+
if (indent.level > module.currentIndent.level)
|
|
23955
|
+
return $0;
|
|
23956
|
+
return $skip;
|
|
24031
23957
|
});
|
|
24032
|
-
function
|
|
23958
|
+
function IndentedFurther(state) {
|
|
24033
23959
|
let eventData;
|
|
24034
23960
|
if (state.events) {
|
|
24035
|
-
const result = state.events.enter?.("
|
|
23961
|
+
const result = state.events.enter?.("IndentedFurther", state);
|
|
24036
23962
|
if (result) {
|
|
24037
23963
|
if (result.cache)
|
|
24038
23964
|
return result.cache;
|
|
@@ -24040,22 +23966,27 @@ ${input.slice(result.pos)}
|
|
|
24040
23966
|
}
|
|
24041
23967
|
}
|
|
24042
23968
|
if (state.tokenize) {
|
|
24043
|
-
const result = $TOKEN("
|
|
23969
|
+
const result = $TOKEN("IndentedFurther", state, IndentedFurther$0(state));
|
|
24044
23970
|
if (state.events)
|
|
24045
|
-
state.events.exit?.("
|
|
23971
|
+
state.events.exit?.("IndentedFurther", state, result, eventData);
|
|
24046
23972
|
return result;
|
|
24047
23973
|
} else {
|
|
24048
|
-
const result =
|
|
23974
|
+
const result = IndentedFurther$0(state);
|
|
24049
23975
|
if (state.events)
|
|
24050
|
-
state.events.exit?.("
|
|
23976
|
+
state.events.exit?.("IndentedFurther", state, result, eventData);
|
|
24051
23977
|
return result;
|
|
24052
23978
|
}
|
|
24053
23979
|
}
|
|
24054
|
-
var
|
|
24055
|
-
|
|
23980
|
+
var IndentedAtLeast$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
|
|
23981
|
+
var indent = $2;
|
|
23982
|
+
if (indent.level >= module.currentIndent.level)
|
|
23983
|
+
return $0;
|
|
23984
|
+
return $skip;
|
|
23985
|
+
});
|
|
23986
|
+
function IndentedAtLeast(state) {
|
|
24056
23987
|
let eventData;
|
|
24057
23988
|
if (state.events) {
|
|
24058
|
-
const result = state.events.enter?.("
|
|
23989
|
+
const result = state.events.enter?.("IndentedAtLeast", state);
|
|
24059
23990
|
if (result) {
|
|
24060
23991
|
if (result.cache)
|
|
24061
23992
|
return result.cache;
|
|
@@ -24063,27 +23994,29 @@ ${input.slice(result.pos)}
|
|
|
24063
23994
|
}
|
|
24064
23995
|
}
|
|
24065
23996
|
if (state.tokenize) {
|
|
24066
|
-
const result = $TOKEN("
|
|
23997
|
+
const result = $TOKEN("IndentedAtLeast", state, IndentedAtLeast$0(state));
|
|
24067
23998
|
if (state.events)
|
|
24068
|
-
state.events.exit?.("
|
|
23999
|
+
state.events.exit?.("IndentedAtLeast", state, result, eventData);
|
|
24069
24000
|
return result;
|
|
24070
24001
|
} else {
|
|
24071
|
-
const result =
|
|
24002
|
+
const result = IndentedAtLeast$0(state);
|
|
24072
24003
|
if (state.events)
|
|
24073
|
-
state.events.exit?.("
|
|
24004
|
+
state.events.exit?.("IndentedAtLeast", state, result, eventData);
|
|
24074
24005
|
return result;
|
|
24075
24006
|
}
|
|
24076
24007
|
}
|
|
24077
|
-
var
|
|
24078
|
-
|
|
24079
|
-
|
|
24080
|
-
|
|
24081
|
-
|
|
24008
|
+
var NotDedented$0 = $TS($S($E(IndentedAtLeast), $E(_)), function($skip, $loc, $0, $1, $2) {
|
|
24009
|
+
const ws = [];
|
|
24010
|
+
if ($1)
|
|
24011
|
+
ws.push(...$1);
|
|
24012
|
+
if ($2)
|
|
24013
|
+
ws.push(...$2);
|
|
24014
|
+
return ws.flat(Infinity).filter(Boolean);
|
|
24082
24015
|
});
|
|
24083
|
-
function
|
|
24016
|
+
function NotDedented(state) {
|
|
24084
24017
|
let eventData;
|
|
24085
24018
|
if (state.events) {
|
|
24086
|
-
const result = state.events.enter?.("
|
|
24019
|
+
const result = state.events.enter?.("NotDedented", state);
|
|
24087
24020
|
if (result) {
|
|
24088
24021
|
if (result.cache)
|
|
24089
24022
|
return result.cache;
|
|
@@ -24091,37 +24024,24 @@ ${input.slice(result.pos)}
|
|
|
24091
24024
|
}
|
|
24092
24025
|
}
|
|
24093
24026
|
if (state.tokenize) {
|
|
24094
|
-
const result = $TOKEN("
|
|
24027
|
+
const result = $TOKEN("NotDedented", state, NotDedented$0(state));
|
|
24095
24028
|
if (state.events)
|
|
24096
|
-
state.events.exit?.("
|
|
24029
|
+
state.events.exit?.("NotDedented", state, result, eventData);
|
|
24097
24030
|
return result;
|
|
24098
24031
|
} else {
|
|
24099
|
-
const result =
|
|
24032
|
+
const result = NotDedented$0(state);
|
|
24100
24033
|
if (state.events)
|
|
24101
|
-
state.events.exit?.("
|
|
24034
|
+
state.events.exit?.("NotDedented", state, result, eventData);
|
|
24102
24035
|
return result;
|
|
24103
24036
|
}
|
|
24104
24037
|
}
|
|
24105
|
-
var
|
|
24106
|
-
|
|
24107
|
-
var indent = $2;
|
|
24108
|
-
const { level } = indent;
|
|
24109
|
-
const currentIndent = module.currentIndent;
|
|
24110
|
-
if (module.config.verbose) {
|
|
24111
|
-
console.log("Indented", level, currentIndent);
|
|
24112
|
-
}
|
|
24113
|
-
if (level !== currentIndent.level) {
|
|
24114
|
-
if (module.config.verbose) {
|
|
24115
|
-
console.log("skipped nested");
|
|
24116
|
-
}
|
|
24117
|
-
return $skip;
|
|
24118
|
-
}
|
|
24119
|
-
return $0;
|
|
24038
|
+
var Dedented$0 = $T($S($N(IndentedAtLeast), EOS), function(value) {
|
|
24039
|
+
return value[1];
|
|
24120
24040
|
});
|
|
24121
|
-
function
|
|
24041
|
+
function Dedented(state) {
|
|
24122
24042
|
let eventData;
|
|
24123
24043
|
if (state.events) {
|
|
24124
|
-
const result = state.events.enter?.("
|
|
24044
|
+
const result = state.events.enter?.("Dedented", state);
|
|
24125
24045
|
if (result) {
|
|
24126
24046
|
if (result.cache)
|
|
24127
24047
|
return result.cache;
|
|
@@ -24129,14 +24049,14 @@ ${input.slice(result.pos)}
|
|
|
24129
24049
|
}
|
|
24130
24050
|
}
|
|
24131
24051
|
if (state.tokenize) {
|
|
24132
|
-
const result = $TOKEN("
|
|
24052
|
+
const result = $TOKEN("Dedented", state, Dedented$0(state));
|
|
24133
24053
|
if (state.events)
|
|
24134
|
-
state.events.exit?.("
|
|
24054
|
+
state.events.exit?.("Dedented", state, result, eventData);
|
|
24135
24055
|
return result;
|
|
24136
24056
|
} else {
|
|
24137
|
-
const result =
|
|
24057
|
+
const result = Dedented$0(state);
|
|
24138
24058
|
if (state.events)
|
|
24139
|
-
state.events.exit?.("
|
|
24059
|
+
state.events.exit?.("Dedented", state, result, eventData);
|
|
24140
24060
|
return result;
|
|
24141
24061
|
}
|
|
24142
24062
|
}
|
|
@@ -24164,12 +24084,14 @@ ${input.slice(result.pos)}
|
|
|
24164
24084
|
literalValue,
|
|
24165
24085
|
makeEmptyBlock,
|
|
24166
24086
|
makeLeftHandSideExpression,
|
|
24087
|
+
makeRef,
|
|
24167
24088
|
maybeRef,
|
|
24168
24089
|
modifyString,
|
|
24090
|
+
processAssignmentDeclaration,
|
|
24169
24091
|
processBinaryOpExpression,
|
|
24170
24092
|
processCallMemberExpression,
|
|
24171
24093
|
processCoffeeInterpolation,
|
|
24172
|
-
|
|
24094
|
+
processForInOf,
|
|
24173
24095
|
processProgram,
|
|
24174
24096
|
processUnaryExpression,
|
|
24175
24097
|
quoteString,
|
|
@@ -24613,7 +24535,7 @@ ${input.slice(result.pos)}
|
|
|
24613
24535
|
var uncacheable;
|
|
24614
24536
|
({ parse } = import_parser.default);
|
|
24615
24537
|
({ SourceMap: SourceMap2 } = util_exports);
|
|
24616
|
-
uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "AllowAll", "AllowClassImplicitCall", "AllowBracedApplication", "AllowIndentedApplication", "AllowMultiLineImplicitObjectLiteral", "AllowNewlineBinaryOp", "AllowTrailingMemberProperty", "AllowedTrailingMemberExpressions", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedApplicationAllowed", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "ClassImplicitCallForbidden", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "ConditionFragment", "Declaration", "Debugger", "Dedented", "ElementListWithIndentedApplicationForbidden", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationForbidden", "ExpressionWithObjectApplicationForbidden", "ExtendedExpression", "FatArrowBody", "ForbidClassImplicitCall", "ForbidBracedApplication", "ForbidIndentedApplication", "ForbidMultiLineImplicitObjectLiteral", "ForbidNewlineBinaryOp", "ForbidTrailingMemberProperty", "FunctionDeclaration", "FunctionExpression", "HoistableDeclaration", "ImplicitArguments", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedApplicationAllowed", "IndentedFurther", "IndentedJSXChildExpression", "InlineObjectLiteral", "InsertIndent", "JSXChild", "JSXChildren", "JSXElement", "JSXFragment", "JSXImplicitFragment", "JSXMixedChildren", "JSXNested", "JSXNestedChildren", "JSXOptionalClosingElement", "JSXOptionalClosingFragment", "JSXTag", "LeftHandSideExpression", "MemberExpression", "MemberExpressionRest", "Nested", "NestedBindingElement", "NestedBindingElements", "NestedBlockExpression", "NestedBlockExpression", "NestedBlockStatement", "NestedBlockStatements", "NestedClassSignatureElement", "NestedClassSignatureElements", "NestedDeclareElement", "NestedDeclareElements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedModuleItem", "NestedModuleItems", "NestedNonAssignmentExtendedExpression", "NestedObject", "NestedPropertyDefinitions", "NewlineBinaryOpAllowed", "NonPipelineAssignmentExpression", "NonPipelineExtendedExpression", "NonPipelinePostfixedExpression", "NonSingleBracedBlock", "NotDedented", "ObjectLiteral", "PatternExpressionList", "PopIndent", "PopJSXStack", "PostfixedExpression", "PostfixedStatement", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "RestoreAll", "RestoreClassImplicitCall", "RestoreMultiLineImplicitObjectLiteral", "RestoreBracedApplication", "RestoreIndentedApplication", "RestoreTrailingMemberProperty", "RestoreNewlineBinaryOp", "RHS", "
|
|
24538
|
+
uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "AllowAll", "AllowClassImplicitCall", "AllowBracedApplication", "AllowIndentedApplication", "AllowMultiLineImplicitObjectLiteral", "AllowNewlineBinaryOp", "AllowTrailingMemberProperty", "AllowedTrailingMemberExpressions", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedApplicationAllowed", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "ClassImplicitCallForbidden", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "ConditionFragment", "Declaration", "Debugger", "Dedented", "ElementListWithIndentedApplicationForbidden", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationForbidden", "ExpressionWithObjectApplicationForbidden", "ExtendedExpression", "FatArrowBody", "ForbidClassImplicitCall", "ForbidBracedApplication", "ForbidIndentedApplication", "ForbidMultiLineImplicitObjectLiteral", "ForbidNewlineBinaryOp", "ForbidTrailingMemberProperty", "FunctionDeclaration", "FunctionExpression", "HoistableDeclaration", "ImplicitArguments", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedApplicationAllowed", "IndentedAtLeast", "IndentedFurther", "IndentedJSXChildExpression", "InlineObjectLiteral", "InsertIndent", "JSXChild", "JSXChildren", "JSXElement", "JSXFragment", "JSXImplicitFragment", "JSXMixedChildren", "JSXNested", "JSXNestedChildren", "JSXOptionalClosingElement", "JSXOptionalClosingFragment", "JSXTag", "LeftHandSideExpression", "MemberExpression", "MemberExpressionRest", "Nested", "NestedBindingElement", "NestedBindingElements", "NestedBlockExpression", "NestedBlockExpression", "NestedBlockStatement", "NestedBlockStatements", "NestedClassSignatureElement", "NestedClassSignatureElements", "NestedDeclareElement", "NestedDeclareElements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedModuleItem", "NestedModuleItems", "NestedNonAssignmentExtendedExpression", "NestedObject", "NestedPropertyDefinitions", "NewlineBinaryOpAllowed", "NonPipelineArgumentPart", "NonPipelineArgumentList", "NonPipelineAssignmentExpression", "NonPipelineExtendedExpression", "NonPipelinePostfixedExpression", "NonSingleBracedBlock", "NotDedented", "ObjectLiteral", "PatternExpressionList", "PopIndent", "PopJSXStack", "PostfixedExpression", "PostfixedStatement", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "RestoreAll", "RestoreClassImplicitCall", "RestoreMultiLineImplicitObjectLiteral", "RestoreBracedApplication", "RestoreIndentedApplication", "RestoreTrailingMemberProperty", "RestoreNewlineBinaryOp", "RHS", "ShortCircuitExpression", "SingleLineAssignmentExpression", "SingleLineBinaryOpRHS", "SingleLineComment", "SingleLineStatements", "SnugNamedProperty", "Statement", "StatementListItem", "SuffixedExpression", "SuffixedStatement", "ThinArrowFunction", "TrackIndented", "TrailingMemberExpressions", "TrailingMemberPropertyAllowed", "TypedJSXElement", "TypedJSXFragment", "UnaryExpression", "UpdateExpression"]);
|
|
24617
24539
|
var compile = function(src, options) {
|
|
24618
24540
|
var ast, code, events, filename, ref, result, sm;
|
|
24619
24541
|
if (!options) {
|