@danielx/civet 0.11.11 → 0.11.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/dist/browser.js +466 -209
- package/dist/browser.min.js +1 -1
- package/dist/main.js +718 -311
- package/dist/main.mjs +718 -311
- package/dist/ts-service/index.js +232 -178
- package/dist/ts-service/index.js.map +4 -4
- package/dist/ts-service/index.mjs +228 -174
- package/dist/ts-service/index.mjs.map +4 -4
- package/dist/types.d.ts +9 -0
- package/package.json +6 -5
package/dist/main.js
CHANGED
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// node_modules/.pnpm/@danielx+hera@0.9.
|
|
33
|
+
// node_modules/.pnpm/@danielx+hera@0.9.8/node_modules/@danielx/hera/dist/machine.js
|
|
34
34
|
var require_machine = __commonJS({
|
|
35
|
-
"node_modules/.pnpm/@danielx+hera@0.9.
|
|
35
|
+
"node_modules/.pnpm/@danielx+hera@0.9.8/node_modules/@danielx/hera/dist/machine.js"(exports2, module2) {
|
|
36
36
|
var __defProp2 = Object.defineProperty;
|
|
37
37
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
38
38
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
@@ -61,7 +61,7 @@ var require_machine = __commonJS({
|
|
|
61
61
|
$N: () => $N2,
|
|
62
62
|
$P: () => $P2,
|
|
63
63
|
$Q: () => $Q2,
|
|
64
|
-
$R: () => $
|
|
64
|
+
$R: () => $R104,
|
|
65
65
|
$R$0: () => $R$02,
|
|
66
66
|
$S: () => $S2,
|
|
67
67
|
$T: () => $T,
|
|
@@ -78,7 +78,7 @@ var require_machine = __commonJS({
|
|
|
78
78
|
function $EXPECT2(parser2, expectation) {
|
|
79
79
|
return function(ctx, state2) {
|
|
80
80
|
const result = parser2(ctx, state2);
|
|
81
|
-
if (!result) ctx.fail(state2.pos, expectation);
|
|
81
|
+
if (!result) ctx.fail(state2.pos, typeof expectation === "function" ? expectation() : expectation);
|
|
82
82
|
return result;
|
|
83
83
|
};
|
|
84
84
|
}
|
|
@@ -98,7 +98,7 @@ var require_machine = __commonJS({
|
|
|
98
98
|
return;
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
function $
|
|
101
|
+
function $R104(regExp) {
|
|
102
102
|
return function(_ctx, state2) {
|
|
103
103
|
const { input, pos } = state2;
|
|
104
104
|
regExp.lastIndex = state2.pos;
|
|
@@ -1848,6 +1848,7 @@ function adjustBindingElements(elements) {
|
|
|
1848
1848
|
if (restCount === 0) {
|
|
1849
1849
|
return {
|
|
1850
1850
|
children: elements,
|
|
1851
|
+
elements: void 0,
|
|
1851
1852
|
names,
|
|
1852
1853
|
blockPrefix,
|
|
1853
1854
|
length
|
|
@@ -1868,13 +1869,32 @@ function adjustBindingElements(elements) {
|
|
|
1868
1869
|
names: after.flatMap((p) => p.names)
|
|
1869
1870
|
};
|
|
1870
1871
|
}
|
|
1872
|
+
const restTrimmed = {
|
|
1873
|
+
...rest,
|
|
1874
|
+
children: rest.children.slice(0, -1)
|
|
1875
|
+
// remove trailing comma
|
|
1876
|
+
};
|
|
1877
|
+
if (rest.binding.type === "EmptyBinding" && !l) {
|
|
1878
|
+
const preceding = elements.slice(0, restIndex);
|
|
1879
|
+
const last = preceding[preceding.length - 1];
|
|
1880
|
+
if (last && arrayElementHasTrailingComma(last)) {
|
|
1881
|
+
preceding[preceding.length - 1] = {
|
|
1882
|
+
...last,
|
|
1883
|
+
children: last.children.slice(0, -1)
|
|
1884
|
+
};
|
|
1885
|
+
}
|
|
1886
|
+
return {
|
|
1887
|
+
names,
|
|
1888
|
+
children: preceding,
|
|
1889
|
+
elements: [...preceding, restTrimmed],
|
|
1890
|
+
blockPrefix,
|
|
1891
|
+
length
|
|
1892
|
+
};
|
|
1893
|
+
}
|
|
1871
1894
|
return {
|
|
1872
1895
|
names,
|
|
1873
|
-
children: [...elements.slice(0, restIndex),
|
|
1874
|
-
|
|
1875
|
-
children: rest.children.slice(0, -1)
|
|
1876
|
-
// remove trailing comma
|
|
1877
|
-
}],
|
|
1896
|
+
children: [...elements.slice(0, restIndex), restTrimmed],
|
|
1897
|
+
elements: void 0,
|
|
1878
1898
|
blockPrefix,
|
|
1879
1899
|
length
|
|
1880
1900
|
};
|
|
@@ -1886,6 +1906,7 @@ function adjustBindingElements(elements) {
|
|
|
1886
1906
|
return {
|
|
1887
1907
|
names,
|
|
1888
1908
|
children: [...elements, err],
|
|
1909
|
+
elements: void 0,
|
|
1889
1910
|
blockPrefix,
|
|
1890
1911
|
length
|
|
1891
1912
|
};
|
|
@@ -3407,10 +3428,10 @@ function insertReturn(node) {
|
|
|
3407
3428
|
}
|
|
3408
3429
|
insertReturn(node.block);
|
|
3409
3430
|
if (!isExit(node.block)) {
|
|
3410
|
-
const comment = hasTrailingComment(node.block.expressions);
|
|
3431
|
+
const comment = node.block.trailing?.length || hasTrailingComment(node.block.expressions);
|
|
3411
3432
|
let ref12;
|
|
3412
3433
|
node.block.expressions.push([
|
|
3413
|
-
comment ? (ref12 = node.block.expressions)[ref12.length - 1][0] || "\n" : "",
|
|
3434
|
+
comment ? (ref12 = node.block.expressions)[ref12.length - 1]?.[0] || "\n" : "",
|
|
3414
3435
|
wrapWithReturn(void 0, node, !comment)
|
|
3415
3436
|
]);
|
|
3416
3437
|
}
|
|
@@ -3919,6 +3940,9 @@ function processParams(f) {
|
|
|
3919
3940
|
const restIdentifier = rest.binding.ref || rest.binding;
|
|
3920
3941
|
parameters.names.push(...rest.names ?? []);
|
|
3921
3942
|
rest.children.pop();
|
|
3943
|
+
if (rest.binding.type === "EmptyBinding" && !after.length) {
|
|
3944
|
+
restIdentifier.base = restIdentifier.id = "_ref";
|
|
3945
|
+
}
|
|
3922
3946
|
if (after.length) {
|
|
3923
3947
|
let m6;
|
|
3924
3948
|
if (m6 = rest.binding.type, m6 === "ArrayBindingPattern" || m6 === "ObjectBindingPattern" || m6 === "NamedBindingPattern") {
|
|
@@ -4047,6 +4071,53 @@ function processParams(f) {
|
|
|
4047
4071
|
} else {
|
|
4048
4072
|
indent = expressions[0][0];
|
|
4049
4073
|
}
|
|
4074
|
+
const { ancestor: enclosingClass } = findAncestor(f, ($10) => $10.type === "ClassExpression");
|
|
4075
|
+
if (enclosingClass != null) {
|
|
4076
|
+
const fieldTypes = /* @__PURE__ */ new Map();
|
|
4077
|
+
for (let ref20 = gatherRecursiveWithinFunction(enclosingClass.body, ($11) => $11.type === "FieldDefinition"), i9 = 0, len8 = ref20.length; i9 < len8; i9++) {
|
|
4078
|
+
const { id, typeSuffix } = ref20[i9];
|
|
4079
|
+
if (typeSuffix != null && id?.type === "Identifier") {
|
|
4080
|
+
fieldTypes.set(id.name, typeSuffix);
|
|
4081
|
+
}
|
|
4082
|
+
}
|
|
4083
|
+
if (fieldTypes.size) {
|
|
4084
|
+
for (let ref21 = gatherRecursive(parameters, ($12) => $12.type === "Parameter"), i10 = 0, len9 = ref21.length; i10 < len9; i10++) {
|
|
4085
|
+
const parameter = ref21[i10];
|
|
4086
|
+
if (parameter.typeSuffix != null) {
|
|
4087
|
+
continue;
|
|
4088
|
+
}
|
|
4089
|
+
let inferredInPattern = false;
|
|
4090
|
+
for (let ref22 = gatherRecursive(parameter, ($13) => $13.type === "AtBinding"), i11 = 0, len10 = ref22.length; i11 < len10; i11++) {
|
|
4091
|
+
const binding = ref22[i11];
|
|
4092
|
+
const owner = binding.parent;
|
|
4093
|
+
assert(owner, "@-binding has no parent");
|
|
4094
|
+
const fieldType = fieldTypes.get(binding.ref.id);
|
|
4095
|
+
if (!(fieldType != null)) {
|
|
4096
|
+
continue;
|
|
4097
|
+
}
|
|
4098
|
+
owner.typeSuffix = deepCopy(fieldType);
|
|
4099
|
+
updateParentPointers(owner);
|
|
4100
|
+
if (owner === parameter) {
|
|
4101
|
+
const i = owner.children.indexOf(binding);
|
|
4102
|
+
assert.notEqual(i, -1, "@-binding missing from parameter children");
|
|
4103
|
+
owner.children[i + 1] = owner.typeSuffix;
|
|
4104
|
+
} else {
|
|
4105
|
+
inferredInPattern = true;
|
|
4106
|
+
}
|
|
4107
|
+
}
|
|
4108
|
+
if (inferredInPattern) {
|
|
4109
|
+
const pattern = parameter.binding;
|
|
4110
|
+
pattern.typeSuffix = void 0;
|
|
4111
|
+
gatherBindingPatternTypeSuffix(pattern);
|
|
4112
|
+
assert(pattern.typeSuffix, "expected aggregated binding pattern type");
|
|
4113
|
+
parameter.typeSuffix = pattern.typeSuffix;
|
|
4114
|
+
const i = parameter.children.indexOf(pattern);
|
|
4115
|
+
assert.notEqual(i, -1, "binding pattern missing from parameter children");
|
|
4116
|
+
parameter.children[i + 1] = parameter.typeSuffix;
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4119
|
+
}
|
|
4120
|
+
}
|
|
4050
4121
|
const [splices, thisAssignments] = gatherBindingCode(parameters, {
|
|
4051
4122
|
injectParamProps: isConstructor,
|
|
4052
4123
|
assignPins: true
|
|
@@ -4055,22 +4126,21 @@ function processParams(f) {
|
|
|
4055
4126
|
simplifyBindingProperties(parameters.parameters);
|
|
4056
4127
|
simplifyBindingProperties(subbindings);
|
|
4057
4128
|
if (isConstructor) {
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
const
|
|
4061
|
-
const classExpressions = ancestor.body.expressions;
|
|
4129
|
+
if (enclosingClass != null) {
|
|
4130
|
+
const fields = new Set(gatherRecursiveWithinFunction(enclosingClass, ($14) => $14.type === "FieldDefinition").map(($15) => $15.id).filter(((a3) => typeof a3 === "object" && a3 != null && "type" in a3 && a3.type === "Identifier")).map(($16) => $16.name));
|
|
4131
|
+
const classExpressions = enclosingClass.body.expressions;
|
|
4062
4132
|
let index2 = findChildIndex(classExpressions, f);
|
|
4063
4133
|
assert.notEqual(index2, -1, "Could not find constructor in class");
|
|
4064
4134
|
index2 -= precedingOverloads(f).length;
|
|
4065
4135
|
const fStatement = classExpressions[index2];
|
|
4066
|
-
for (let
|
|
4067
|
-
const parameter =
|
|
4136
|
+
for (let ref23 = gatherRecursive(parameters, ($17) => $17.type === "Parameter"), i12 = 0, len11 = ref23.length; i12 < len11; i12++) {
|
|
4137
|
+
const parameter = ref23[i12];
|
|
4068
4138
|
const { accessModifier } = parameter;
|
|
4069
4139
|
if (!(accessModifier || parameter.typeSuffix)) {
|
|
4070
4140
|
continue;
|
|
4071
4141
|
}
|
|
4072
|
-
for (let
|
|
4073
|
-
const binding =
|
|
4142
|
+
for (let ref24 = gatherRecursive(parameter, ($18) => $18.type === "AtBinding"), i13 = 0, len12 = ref24.length; i13 < len12; i13++) {
|
|
4143
|
+
const binding = ref24[i13];
|
|
4074
4144
|
const typeSuffix = binding.parent?.typeSuffix;
|
|
4075
4145
|
if (!(accessModifier || typeSuffix)) {
|
|
4076
4146
|
continue;
|
|
@@ -4108,8 +4178,8 @@ function processParams(f) {
|
|
|
4108
4178
|
decl: "const"
|
|
4109
4179
|
}));
|
|
4110
4180
|
}
|
|
4111
|
-
for (let
|
|
4112
|
-
const binding =
|
|
4181
|
+
for (let ref25 = splices, i14 = 0, len13 = ref25.length; i14 < len13; i14++) {
|
|
4182
|
+
const binding = ref25[i14];
|
|
4113
4183
|
assert.equal(binding.type, "PostRestBindingElements", "splice should be of type Binding");
|
|
4114
4184
|
prefix.push(makeNode({
|
|
4115
4185
|
type: "Declaration",
|
|
@@ -4152,6 +4222,43 @@ function findSuperCall(block) {
|
|
|
4152
4222
|
return -1;
|
|
4153
4223
|
}
|
|
4154
4224
|
}
|
|
4225
|
+
function transformArrowFunctionWithYield(f) {
|
|
4226
|
+
const { block, parameters, returnType, async, signature } = f;
|
|
4227
|
+
if (block?.type === "BlockStatement" && block.implicitlyReturned) {
|
|
4228
|
+
insertReturn(block);
|
|
4229
|
+
block.implicitlyReturned = false;
|
|
4230
|
+
}
|
|
4231
|
+
if (block?.type === "BlockStatement" && block.bare && !block.root) {
|
|
4232
|
+
block.children.unshift(" {");
|
|
4233
|
+
block.children.push("}");
|
|
4234
|
+
block.bare = false;
|
|
4235
|
+
}
|
|
4236
|
+
const generator = ["*"];
|
|
4237
|
+
signature.modifier ??= {};
|
|
4238
|
+
signature.modifier.generator = true;
|
|
4239
|
+
signature.generator = generator;
|
|
4240
|
+
signature.children = [async, "function", generator, parameters, returnType];
|
|
4241
|
+
f.type = "FunctionExpression";
|
|
4242
|
+
f.generator = generator;
|
|
4243
|
+
f.children = [async, "function", generator, parameters, returnType, block];
|
|
4244
|
+
const originalParent = f.parent;
|
|
4245
|
+
const lhs = makeLeftHandSideExpression(f);
|
|
4246
|
+
let ref26;
|
|
4247
|
+
if (gatherRecursiveWithinFunction(block, ((a6) => typeof a6 === "object" && a6 != null && "token" in a6 && a6.token === "this")).length) {
|
|
4248
|
+
ref26 = makeNode({
|
|
4249
|
+
type: "CallExpression",
|
|
4250
|
+
children: [lhs, ".bind(this)"]
|
|
4251
|
+
});
|
|
4252
|
+
} else {
|
|
4253
|
+
ref26 = lhs;
|
|
4254
|
+
}
|
|
4255
|
+
;
|
|
4256
|
+
const newNode = ref26;
|
|
4257
|
+
if (newNode !== f && originalParent != null) {
|
|
4258
|
+
replaceNode(f, newNode, originalParent);
|
|
4259
|
+
updateParentPointers(newNode, originalParent);
|
|
4260
|
+
}
|
|
4261
|
+
}
|
|
4155
4262
|
function processSignature(f) {
|
|
4156
4263
|
const { block, signature } = f;
|
|
4157
4264
|
let addAsync = false;
|
|
@@ -4160,8 +4267,8 @@ function processSignature(f) {
|
|
|
4160
4267
|
if (f.async != null) {
|
|
4161
4268
|
addAsync = true;
|
|
4162
4269
|
} else {
|
|
4163
|
-
for (let
|
|
4164
|
-
const a =
|
|
4270
|
+
for (let ref27 = gatherRecursiveWithinFunction(block, ($19) => $19.type === "Await"), i15 = 0, len14 = ref27.length; i15 < len14; i15++) {
|
|
4271
|
+
const a = ref27[i15];
|
|
4165
4272
|
const i = findChildIndex(a.parent, a);
|
|
4166
4273
|
a.parent.children.splice(i + 1, 0, {
|
|
4167
4274
|
type: "Error",
|
|
@@ -4173,19 +4280,21 @@ function processSignature(f) {
|
|
|
4173
4280
|
if (!f.generator?.length && hasYield(block)) {
|
|
4174
4281
|
if (f.generator != null) {
|
|
4175
4282
|
addGenerator = true;
|
|
4283
|
+
} else if (f.type === "ArrowFunction") {
|
|
4284
|
+
transformArrowFunctionWithYield(f);
|
|
4176
4285
|
} else {
|
|
4177
|
-
for (let
|
|
4178
|
-
const y =
|
|
4179
|
-
const i = y.children.findIndex(($
|
|
4286
|
+
for (let ref28 = gatherRecursiveWithinFunction(block, ($20) => $20.type === "YieldExpression"), i16 = 0, len15 = ref28.length; i16 < len15; i16++) {
|
|
4287
|
+
const y = ref28[i16];
|
|
4288
|
+
const i = y.children.findIndex(($21) => $21.type === "Yield");
|
|
4180
4289
|
y.children.splice(i + 1, 0, {
|
|
4181
4290
|
type: "Error",
|
|
4182
|
-
message: `yield invalid in ${
|
|
4291
|
+
message: `yield invalid in ${signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
|
|
4183
4292
|
});
|
|
4184
4293
|
}
|
|
4185
4294
|
}
|
|
4186
4295
|
}
|
|
4187
|
-
for (let
|
|
4188
|
-
const overload =
|
|
4296
|
+
for (let ref29 = [f, ...precedingOverloads(f)], i17 = 0, len16 = ref29.length; i17 < len16; i17++) {
|
|
4297
|
+
const overload = ref29[i17];
|
|
4189
4298
|
if (addAsync && overload.async != null && !overload.async.length) {
|
|
4190
4299
|
overload.async.push("async ");
|
|
4191
4300
|
overload.signature.modifier.async = true;
|
|
@@ -4204,8 +4313,8 @@ function processSignature(f) {
|
|
|
4204
4313
|
}
|
|
4205
4314
|
}
|
|
4206
4315
|
function processFunctions(statements, config2) {
|
|
4207
|
-
for (let
|
|
4208
|
-
const f =
|
|
4316
|
+
for (let ref30 = gatherRecursiveAll(statements, ($22) => $22.type === "FunctionExpression" || $22.type === "ArrowFunction" || $22.type === "MethodDefinition"), i18 = 0, len17 = ref30.length; i18 < len17; i18++) {
|
|
4317
|
+
const f = ref30[i18];
|
|
4209
4318
|
if (f.type === "FunctionExpression" || f.type === "MethodDefinition") {
|
|
4210
4319
|
implicitFunctionBlock(f);
|
|
4211
4320
|
}
|
|
@@ -4278,14 +4387,14 @@ function expressionizeIteration(exp, consumeRoot) {
|
|
|
4278
4387
|
];
|
|
4279
4388
|
} else {
|
|
4280
4389
|
const reduction = statement.type === "ForStatement" && statement.reduction;
|
|
4281
|
-
let
|
|
4390
|
+
let ref31;
|
|
4282
4391
|
if (!async && !reduction && !statement.block.empty) {
|
|
4283
|
-
|
|
4392
|
+
ref31 = blockContainingStatement(exp);
|
|
4284
4393
|
} else {
|
|
4285
|
-
|
|
4394
|
+
ref31 = void 0;
|
|
4286
4395
|
}
|
|
4287
4396
|
;
|
|
4288
|
-
const parentInfo =
|
|
4397
|
+
const parentInfo = ref31;
|
|
4289
4398
|
if (parentInfo && iterationValueDiscarded(parentInfo.block, parentInfo.index, consumeRoot)) {
|
|
4290
4399
|
const origSemi = parentInfo.block.expressions[parentInfo.index][2];
|
|
4291
4400
|
statements = [["", statement, origSemi]];
|
|
@@ -4301,9 +4410,9 @@ function expressionizeIteration(exp, consumeRoot) {
|
|
|
4301
4410
|
}
|
|
4302
4411
|
let done;
|
|
4303
4412
|
if (!async) {
|
|
4304
|
-
let
|
|
4305
|
-
if ((
|
|
4306
|
-
const { block: parentBlock, index } =
|
|
4413
|
+
let ref32;
|
|
4414
|
+
if ((ref32 = blockContainingStatement(exp)) && typeof ref32 === "object" && "block" in ref32 && "index" in ref32) {
|
|
4415
|
+
const { block: parentBlock, index } = ref32;
|
|
4307
4416
|
statements[0][0] = parentBlock.expressions[index][0];
|
|
4308
4417
|
parentBlock.expressions.splice(index, index + 1 - index, ...statements);
|
|
4309
4418
|
updateParentPointers(parentBlock);
|
|
@@ -4320,8 +4429,8 @@ function expressionizeIteration(exp, consumeRoot) {
|
|
|
4320
4429
|
}
|
|
4321
4430
|
}
|
|
4322
4431
|
function processIterationExpressions(statements, consumeRoot = false) {
|
|
4323
|
-
for (let
|
|
4324
|
-
const s =
|
|
4432
|
+
for (let ref33 = gatherRecursiveAll(statements, ($23) => $23.type === "IterationExpression"), i19 = 0, len18 = ref33.length; i19 < len18; i19++) {
|
|
4433
|
+
const s = ref33[i19];
|
|
4325
4434
|
expressionizeIteration(s, consumeRoot);
|
|
4326
4435
|
}
|
|
4327
4436
|
}
|
|
@@ -4334,7 +4443,12 @@ function skipImplicitArguments(args) {
|
|
|
4334
4443
|
if (arg0.type === "StatementExpression") {
|
|
4335
4444
|
arg0 = arg0.statement;
|
|
4336
4445
|
}
|
|
4337
|
-
|
|
4446
|
+
if (arg0.type === "IterationExpression") {
|
|
4447
|
+
return arg0.subtype !== "DoStatement" && !arg0.async && isEmptyBareBlock(arg0.block);
|
|
4448
|
+
}
|
|
4449
|
+
if (arg0.type === "IfStatement") {
|
|
4450
|
+
return !arg0.else && isEmptyBareBlock(arg0.then);
|
|
4451
|
+
}
|
|
4338
4452
|
}
|
|
4339
4453
|
return false;
|
|
4340
4454
|
}
|
|
@@ -4345,21 +4459,21 @@ function processCoffeeDo(ws, expression) {
|
|
|
4345
4459
|
let { parameters } = expression;
|
|
4346
4460
|
const parameterList = parameters.parameters;
|
|
4347
4461
|
const results3 = [];
|
|
4348
|
-
for (let
|
|
4349
|
-
let parameter = parameterList[
|
|
4462
|
+
for (let i20 = 0, len19 = parameterList.length; i20 < len19; i20++) {
|
|
4463
|
+
let parameter = parameterList[i20];
|
|
4350
4464
|
if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
|
|
4351
|
-
let
|
|
4352
|
-
if (
|
|
4353
|
-
const initializer =
|
|
4465
|
+
let ref34;
|
|
4466
|
+
if (ref34 = parameter.initializer) {
|
|
4467
|
+
const initializer = ref34;
|
|
4354
4468
|
args.push(initializer.expression, parameter.delim);
|
|
4355
4469
|
parameter = {
|
|
4356
4470
|
...parameter,
|
|
4357
4471
|
initializer: void 0,
|
|
4358
|
-
children: parameter.children.filter(((
|
|
4472
|
+
children: parameter.children.filter(((a7) => a7 !== initializer))
|
|
4359
4473
|
};
|
|
4360
4474
|
} else {
|
|
4361
4475
|
args.push(parameter.children.filter(
|
|
4362
|
-
((
|
|
4476
|
+
((a8) => a8 !== parameter.typeSuffix)
|
|
4363
4477
|
));
|
|
4364
4478
|
}
|
|
4365
4479
|
}
|
|
@@ -4370,12 +4484,12 @@ function processCoffeeDo(ws, expression) {
|
|
|
4370
4484
|
const newParameters = {
|
|
4371
4485
|
...parameters,
|
|
4372
4486
|
parameters: newParameterList,
|
|
4373
|
-
children: parameters.children.map(($
|
|
4487
|
+
children: parameters.children.map(($24) => $24 === parameterList ? newParameterList : $24)
|
|
4374
4488
|
};
|
|
4375
4489
|
expression = {
|
|
4376
4490
|
...expression,
|
|
4377
4491
|
parameters: newParameters,
|
|
4378
|
-
children: expression.children.map(($
|
|
4492
|
+
children: expression.children.map(($25) => $25 === parameters ? newParameters : $25)
|
|
4379
4493
|
};
|
|
4380
4494
|
}
|
|
4381
4495
|
return {
|
|
@@ -4397,7 +4511,7 @@ function makeAmpersandFunction(rhs) {
|
|
|
4397
4511
|
ref = makeRef("$");
|
|
4398
4512
|
inplacePrepend(ref, body);
|
|
4399
4513
|
}
|
|
4400
|
-
if (startsWithPredicate(body, ($
|
|
4514
|
+
if (startsWithPredicate(body, ($26) => $26.type === "ObjectExpression")) {
|
|
4401
4515
|
body = makeLeftHandSideExpression(body);
|
|
4402
4516
|
}
|
|
4403
4517
|
const parameterList = [
|
|
@@ -4440,7 +4554,7 @@ function makeAmpersandFunction(rhs) {
|
|
|
4440
4554
|
}
|
|
4441
4555
|
if (gatherRecursiveWithinFunction(
|
|
4442
4556
|
block,
|
|
4443
|
-
((
|
|
4557
|
+
((a9) => a9 === ref)
|
|
4444
4558
|
).length > 1) {
|
|
4445
4559
|
fn.ampersandBlock = false;
|
|
4446
4560
|
}
|
|
@@ -4465,6 +4579,9 @@ function blockWithPrefix(prefixStatements, block) {
|
|
|
4465
4579
|
function braceBlock(block) {
|
|
4466
4580
|
if (block.bare && !block.root) {
|
|
4467
4581
|
block.children.unshift(" {");
|
|
4582
|
+
if (hasTrailingComment(block.children)) {
|
|
4583
|
+
block.children.push("\n");
|
|
4584
|
+
}
|
|
4468
4585
|
block.children.push("}");
|
|
4469
4586
|
const { implicitlyReturned } = block;
|
|
4470
4587
|
block.bare = block.implicitlyReturned = false;
|
|
@@ -5827,6 +5944,19 @@ function processDeclarationCondition(condition, rootCondition, parent) {
|
|
|
5827
5944
|
});
|
|
5828
5945
|
} else {
|
|
5829
5946
|
const { expression } = initializer;
|
|
5947
|
+
if (parent.type === "SwitchStatement" && pattern.type === "Identifier" && !nullCheck) {
|
|
5948
|
+
ref = trimFirstSpace(pattern);
|
|
5949
|
+
Object.assign(condition, {
|
|
5950
|
+
type: "AssignmentExpression",
|
|
5951
|
+
children: [ref],
|
|
5952
|
+
pattern,
|
|
5953
|
+
ref,
|
|
5954
|
+
statementDeclaration: true
|
|
5955
|
+
});
|
|
5956
|
+
updateParentPointers(condition, parent);
|
|
5957
|
+
rootCondition.blockPrefix = getPatternBlockPrefix(pattern, trimFirstSpace(expression), decl, typeSuffix);
|
|
5958
|
+
return;
|
|
5959
|
+
}
|
|
5830
5960
|
ref = maybeRef(expression);
|
|
5831
5961
|
const simple = ref === expression;
|
|
5832
5962
|
let children;
|
|
@@ -6014,15 +6144,42 @@ function dynamizeFromClause(from) {
|
|
|
6014
6144
|
}
|
|
6015
6145
|
return ["(", ...from, ")"];
|
|
6016
6146
|
}
|
|
6147
|
+
function markAllTypeImports(decl) {
|
|
6148
|
+
if (decl.ts) {
|
|
6149
|
+
return decl;
|
|
6150
|
+
}
|
|
6151
|
+
const { imports } = decl;
|
|
6152
|
+
if (!imports) {
|
|
6153
|
+
return decl;
|
|
6154
|
+
}
|
|
6155
|
+
const i = imports;
|
|
6156
|
+
if (!i.binding && !i.star) {
|
|
6157
|
+
const specs = i.specifiers;
|
|
6158
|
+
if (specs?.length && specs.every(($5) => $5.ts)) {
|
|
6159
|
+
return { ...decl, ts: true };
|
|
6160
|
+
}
|
|
6161
|
+
return decl;
|
|
6162
|
+
}
|
|
6163
|
+
const children = imports.children;
|
|
6164
|
+
const namedSpecs = children.at(-1).specifiers;
|
|
6165
|
+
if (!(namedSpecs?.length && namedSpecs.every(($6) => $6.ts))) {
|
|
6166
|
+
return decl;
|
|
6167
|
+
}
|
|
6168
|
+
const [binding, ...rest] = children;
|
|
6169
|
+
const newImportsChildren = [binding, { ts: true, children: rest }];
|
|
6170
|
+
const newImports = { ...imports, children: newImportsChildren };
|
|
6171
|
+
const newDeclChildren = decl.children.map((c) => c === imports ? newImports : c);
|
|
6172
|
+
return { ...decl, imports: newImports, children: newDeclChildren };
|
|
6173
|
+
}
|
|
6017
6174
|
function processStaticImport(decl) {
|
|
6018
6175
|
const { imports, from, children } = decl;
|
|
6019
6176
|
if (!(imports && "rest" in imports)) {
|
|
6020
|
-
return decl;
|
|
6177
|
+
return markAllTypeImports(decl);
|
|
6021
6178
|
}
|
|
6022
6179
|
const namedImports = imports.binding ? imports.children.at(-1) : imports;
|
|
6023
6180
|
const allSpecs = namedImports.specifiers;
|
|
6024
6181
|
if (!(namedImports.rest || allSpecs.some((s) => s.pattern))) {
|
|
6025
|
-
return decl;
|
|
6182
|
+
return markAllTypeImports(decl);
|
|
6026
6183
|
}
|
|
6027
6184
|
const ref = makeRef("imports");
|
|
6028
6185
|
const star = { type: "Star", token: "*" };
|
|
@@ -7711,6 +7868,12 @@ function expressionizeIfStatement(statement) {
|
|
|
7711
7868
|
children.push(":void 0");
|
|
7712
7869
|
}
|
|
7713
7870
|
children.push(closeParen);
|
|
7871
|
+
if (b.trailing?.length) {
|
|
7872
|
+
children.push(b.trailing);
|
|
7873
|
+
}
|
|
7874
|
+
if (e?.block.trailing?.length) {
|
|
7875
|
+
children.push(e.block.trailing);
|
|
7876
|
+
}
|
|
7714
7877
|
return makeNode({
|
|
7715
7878
|
type: "IfExpression",
|
|
7716
7879
|
children
|
|
@@ -8032,6 +8195,11 @@ function processCallMemberExpression(node) {
|
|
|
8032
8195
|
let name = part.name;
|
|
8033
8196
|
let value = part.value ?? name;
|
|
8034
8197
|
const wValue = getTrimmingSpace(part.value);
|
|
8198
|
+
let privateField = void 0;
|
|
8199
|
+
if (value?.privateShorthand) {
|
|
8200
|
+
privateField = value.privateId?.name;
|
|
8201
|
+
}
|
|
8202
|
+
;
|
|
8035
8203
|
[value, suppressPrefix] = handleThisPrivateShorthands(value);
|
|
8036
8204
|
if (glob.reversed) {
|
|
8037
8205
|
[name, value] = [value, name];
|
|
@@ -8085,6 +8253,7 @@ function processCallMemberExpression(node) {
|
|
|
8085
8253
|
type: part.type,
|
|
8086
8254
|
name,
|
|
8087
8255
|
value,
|
|
8256
|
+
privateField,
|
|
8088
8257
|
delim: part.delim,
|
|
8089
8258
|
names: part.names,
|
|
8090
8259
|
children: [
|
|
@@ -8656,18 +8825,80 @@ function processAssignments(statements) {
|
|
|
8656
8825
|
if ($1.some((x) => x[x.length - 1].special)) {
|
|
8657
8826
|
const [, lhs, , op] = $1[0];
|
|
8658
8827
|
const { call, omitLhs } = op;
|
|
8828
|
+
let callLhs = lhs;
|
|
8829
|
+
if (!omitLhs && lhs.type === "MemberExpression") {
|
|
8830
|
+
const memberLhs = lhs;
|
|
8831
|
+
const { children: memberChildren } = memberLhs;
|
|
8832
|
+
let mutated = false;
|
|
8833
|
+
const callChildren = memberChildren.map((child) => {
|
|
8834
|
+
if (!(child?.type === "Index")) {
|
|
8835
|
+
return child;
|
|
8836
|
+
}
|
|
8837
|
+
const indexNode = child;
|
|
8838
|
+
const { ref, refAssignment } = maybeRefAssignment(indexNode.expression);
|
|
8839
|
+
if (!refAssignment) {
|
|
8840
|
+
return child;
|
|
8841
|
+
}
|
|
8842
|
+
mutated = true;
|
|
8843
|
+
replaceNode(indexNode.expression, refAssignment, indexNode);
|
|
8844
|
+
return makeNode({
|
|
8845
|
+
type: "Index",
|
|
8846
|
+
children: ["[", ref, "]"],
|
|
8847
|
+
expression: ref
|
|
8848
|
+
});
|
|
8849
|
+
});
|
|
8850
|
+
if (mutated) {
|
|
8851
|
+
callLhs = makeNode({
|
|
8852
|
+
...memberLhs,
|
|
8853
|
+
children: callChildren
|
|
8854
|
+
});
|
|
8855
|
+
}
|
|
8856
|
+
}
|
|
8659
8857
|
const index = exp.children.indexOf($2);
|
|
8660
8858
|
assert.notEqual(index, -1, "processAssignments: $2 must be directly in exp.children");
|
|
8661
8859
|
exp.children.splice(
|
|
8662
8860
|
index,
|
|
8663
8861
|
1,
|
|
8664
|
-
exp.expression = $2 = [call, "(",
|
|
8862
|
+
exp.expression = $2 = [call, "(", callLhs, ", ", $2, ")"]
|
|
8665
8863
|
);
|
|
8666
8864
|
if (omitLhs) {
|
|
8667
8865
|
replaceNode(exp, $2);
|
|
8668
8866
|
continue;
|
|
8669
8867
|
}
|
|
8670
8868
|
}
|
|
8869
|
+
if ($1.length === 1) {
|
|
8870
|
+
const [, soleLhs, , soleOp] = $1[0];
|
|
8871
|
+
const isPrivateGlobProp = (p) => {
|
|
8872
|
+
return p?.type === "Property" && !!p.privateField;
|
|
8873
|
+
};
|
|
8874
|
+
if (soleOp.token === "=" && soleLhs.type === "ObjectExpression" && soleLhs.properties?.some(isPrivateGlobProp) && !soleLhs.properties.some((p) => p?.type === "SpreadProperty")) {
|
|
8875
|
+
const properties = soleLhs.properties.filter((p) => p?.type === "Property");
|
|
8876
|
+
let prefix, sourceExpr;
|
|
8877
|
+
if (properties.length > 1 && needsRef($2)) {
|
|
8878
|
+
const srcRef = makeRef();
|
|
8879
|
+
prefix = [srcRef, " = ", $2, ", "];
|
|
8880
|
+
sourceExpr = srcRef;
|
|
8881
|
+
exp.hoistDec = {
|
|
8882
|
+
type: "Declaration",
|
|
8883
|
+
children: ["let ", srcRef],
|
|
8884
|
+
names: [],
|
|
8885
|
+
bindings: [],
|
|
8886
|
+
decl: "let"
|
|
8887
|
+
};
|
|
8888
|
+
} else {
|
|
8889
|
+
prefix = [];
|
|
8890
|
+
sourceExpr = $2;
|
|
8891
|
+
}
|
|
8892
|
+
const assignments = properties.map((prop) => {
|
|
8893
|
+
const sourceName = prop.privateField ?? prop.name;
|
|
8894
|
+
return [prop.value, " = ", sourceExpr, ".", sourceName];
|
|
8895
|
+
});
|
|
8896
|
+
const joined = assignments.flatMap((a, idx) => idx ? [", ", a] : [a]);
|
|
8897
|
+
exp.children = [["(", prefix, joined, ")"]];
|
|
8898
|
+
exp.names = [];
|
|
8899
|
+
continue;
|
|
8900
|
+
}
|
|
8901
|
+
}
|
|
8671
8902
|
let wrapped = false;
|
|
8672
8903
|
const insideParens = exp.parent?.type === "ParenthesizedExpression";
|
|
8673
8904
|
let i = 0;
|
|
@@ -8753,7 +8984,7 @@ function processAssignments(statements) {
|
|
|
8753
8984
|
names: []
|
|
8754
8985
|
};
|
|
8755
8986
|
}
|
|
8756
|
-
replaceNode($2, newMemberExp);
|
|
8987
|
+
replaceNode($2, newMemberExp, exp);
|
|
8757
8988
|
$2 = newMemberExp;
|
|
8758
8989
|
}
|
|
8759
8990
|
}
|
|
@@ -9924,6 +10155,9 @@ var grammar = {
|
|
|
9924
10155
|
PostfixedSingleLineNoCommaStatements,
|
|
9925
10156
|
NestedBlockStatements,
|
|
9926
10157
|
NestedBlockStatement,
|
|
10158
|
+
TrailingNestedComments,
|
|
10159
|
+
TrailingInlineComment,
|
|
10160
|
+
TrailingNestedCommentLine,
|
|
9927
10161
|
BlockStatementPart,
|
|
9928
10162
|
Literal,
|
|
9929
10163
|
LiteralContent,
|
|
@@ -10541,6 +10775,7 @@ var grammar = {
|
|
|
10541
10775
|
CoffeeOfEnabled,
|
|
10542
10776
|
CoffeePrototypeEnabled,
|
|
10543
10777
|
ESArrowFunctionEnabled,
|
|
10778
|
+
ESBraceBlockEnabled,
|
|
10544
10779
|
JSXCodeNestedEnabled,
|
|
10545
10780
|
JSXCodeSameLineEnabled,
|
|
10546
10781
|
ObjectIsEnabled,
|
|
@@ -10811,113 +11046,128 @@ var $L245 = (0, import_lib2.$L)("unique");
|
|
|
10811
11046
|
var $L246 = (0, import_lib2.$L)("symbol");
|
|
10812
11047
|
var $L247 = (0, import_lib2.$L)("[]");
|
|
10813
11048
|
var $L248 = (0, import_lib2.$L)("civet");
|
|
10814
|
-
var $R0 = (0, import_lib2.$R)(
|
|
10815
|
-
var $R1 = (0, import_lib2.$R)(
|
|
10816
|
-
var $R2 = (0, import_lib2.$R)(
|
|
10817
|
-
var $R3 = (0, import_lib2.$R)(
|
|
10818
|
-
var $R4 = (0, import_lib2.$R)(
|
|
10819
|
-
var $R5 = (0, import_lib2.$R)(
|
|
10820
|
-
var $R6 = (0, import_lib2.$R)(
|
|
10821
|
-
var $R7 = (0, import_lib2.$R)(
|
|
10822
|
-
var $R8 = (0, import_lib2.$R)(
|
|
10823
|
-
var $R9 = (0, import_lib2.$R)(
|
|
10824
|
-
var $R10 = (0, import_lib2.$R)(
|
|
10825
|
-
var $R11 = (0, import_lib2.$R)(
|
|
10826
|
-
var $R12 = (0, import_lib2.$R)(
|
|
10827
|
-
var $R13 = (0, import_lib2.$R)(
|
|
10828
|
-
var $R14 = (0, import_lib2.$R)(
|
|
10829
|
-
var $R15 = (0, import_lib2.$R)(
|
|
10830
|
-
var $R16 = (0, import_lib2.$R)(
|
|
10831
|
-
var $R17 = (0, import_lib2.$R)(
|
|
10832
|
-
var $R18 = (0, import_lib2.$R)(
|
|
10833
|
-
var $R19 = (0, import_lib2.$R)(
|
|
10834
|
-
var $R20 = (0, import_lib2.$R)(
|
|
10835
|
-
var $R21 = (0, import_lib2.$R)(
|
|
10836
|
-
var $R22 = (0, import_lib2.$R)(
|
|
10837
|
-
var $R23 = (0, import_lib2.$R)(
|
|
10838
|
-
var $R24 = (0, import_lib2.$R)(
|
|
10839
|
-
var $R25 = (0, import_lib2.$R)(
|
|
10840
|
-
var $R26 = (0, import_lib2.$R)(
|
|
10841
|
-
var $R27 = (0, import_lib2.$R)(
|
|
10842
|
-
var $R28 = (0, import_lib2.$R)(
|
|
10843
|
-
var $R29 = (0, import_lib2.$R)(
|
|
10844
|
-
var $R30 = (0, import_lib2.$R)(
|
|
10845
|
-
var $R31 = (0, import_lib2.$R)(
|
|
10846
|
-
var $R32 = (0, import_lib2.$R)(
|
|
10847
|
-
var $R33 = (0, import_lib2.$R)(
|
|
10848
|
-
var $R34 = (0, import_lib2.$R)(
|
|
10849
|
-
var $R35 = (0, import_lib2.$R)(
|
|
10850
|
-
var $R36 = (0, import_lib2.$R)(
|
|
10851
|
-
var $R37 = (0, import_lib2.$R)(
|
|
10852
|
-
var $R38 = (0, import_lib2.$R)(
|
|
10853
|
-
var $R39 = (0, import_lib2.$R)(
|
|
10854
|
-
var $R40 = (0, import_lib2.$R)(
|
|
10855
|
-
var $R41 = (0, import_lib2.$R)(
|
|
10856
|
-
var $R42 = (0, import_lib2.$R)(
|
|
10857
|
-
var $R43 = (0, import_lib2.$R)(
|
|
10858
|
-
var $R44 = (0, import_lib2.$R)(
|
|
10859
|
-
var $R45 = (0, import_lib2.$R)(
|
|
10860
|
-
var $R46 = (0, import_lib2.$R)(
|
|
10861
|
-
var $R47 = (0, import_lib2.$R)(
|
|
10862
|
-
var $R48 = (0, import_lib2.$R)(
|
|
10863
|
-
var $R49 = (0, import_lib2.$R)(
|
|
10864
|
-
var $R50 = (0, import_lib2.$R)(
|
|
10865
|
-
var $R51 = (0, import_lib2.$R)(
|
|
10866
|
-
var $R52 = (0, import_lib2.$R)(
|
|
10867
|
-
var $R53 = (0, import_lib2.$R)(
|
|
10868
|
-
var $R54 = (0, import_lib2.$R)(
|
|
10869
|
-
var $R55 = (0, import_lib2.$R)(
|
|
10870
|
-
var $R56 = (0, import_lib2.$R)(
|
|
10871
|
-
var $R57 = (0, import_lib2.$R)(
|
|
10872
|
-
var $R58 = (0, import_lib2.$R)(
|
|
10873
|
-
var $R59 = (0, import_lib2.$R)(
|
|
10874
|
-
var $R60 = (0, import_lib2.$R)(
|
|
10875
|
-
var $R61 = (0, import_lib2.$R)(
|
|
10876
|
-
var $R62 = (0, import_lib2.$R)(
|
|
10877
|
-
var $R63 = (0, import_lib2.$R)(
|
|
10878
|
-
var $R64 = (0, import_lib2.$R)(
|
|
10879
|
-
var $R65 = (0, import_lib2.$R)(
|
|
10880
|
-
var $R66 = (0, import_lib2.$R)(
|
|
10881
|
-
var $R67 = (0, import_lib2.$R)(
|
|
10882
|
-
var $R68 = (0, import_lib2.$R)(
|
|
10883
|
-
var $R69 = (0, import_lib2.$R)(new
|
|
10884
|
-
var $R70 = (0, import_lib2.$R)(
|
|
10885
|
-
var $R71 = (0, import_lib2.$R)(
|
|
10886
|
-
var $R72 = (0, import_lib2.$R)(
|
|
10887
|
-
var $R73 = (0, import_lib2.$R)(
|
|
10888
|
-
var $R74 = (0, import_lib2.$R)(
|
|
10889
|
-
var $R75 = (0, import_lib2.$R)(
|
|
10890
|
-
var $R76 = (0, import_lib2.$R)(
|
|
10891
|
-
var $R77 = (0, import_lib2.$R)(
|
|
10892
|
-
var $R78 = (0, import_lib2.$R)(
|
|
10893
|
-
var $R79 = (0, import_lib2.$R)(
|
|
10894
|
-
var $R80 = (0, import_lib2.$R)(
|
|
10895
|
-
var $R81 = (0, import_lib2.$R)(
|
|
10896
|
-
var $R82 = (0, import_lib2.$R)(
|
|
10897
|
-
var $R83 = (0, import_lib2.$R)(
|
|
10898
|
-
var $R84 = (0, import_lib2.$R)(
|
|
10899
|
-
var $R85 = (0, import_lib2.$R)(
|
|
10900
|
-
var $R86 = (0, import_lib2.$R)(
|
|
10901
|
-
var $R87 = (0, import_lib2.$R)(
|
|
10902
|
-
var $R88 = (0, import_lib2.$R)(
|
|
10903
|
-
var $R89 = (0, import_lib2.$R)(
|
|
10904
|
-
var $R90 = (0, import_lib2.$R)(
|
|
10905
|
-
var $R91 = (0, import_lib2.$R)(
|
|
10906
|
-
var $R92 = (0, import_lib2.$R)(
|
|
10907
|
-
var $R93 = (0, import_lib2.$R)(
|
|
10908
|
-
var $R94 = (0, import_lib2.$R)(
|
|
10909
|
-
var $R95 = (0, import_lib2.$R)(
|
|
10910
|
-
var $R96 = (0, import_lib2.$R)(
|
|
10911
|
-
var $R97 = (0, import_lib2.$R)(
|
|
10912
|
-
var $R98 = (0, import_lib2.$R)(
|
|
10913
|
-
var $R99 = (0, import_lib2.$R)(
|
|
10914
|
-
var $R100 = (0, import_lib2.$R)(
|
|
10915
|
-
var $R101 = (0, import_lib2.$R)(
|
|
10916
|
-
var $R102 = (0, import_lib2.$R)(
|
|
10917
|
-
var $R103 = (0, import_lib2.$R)(
|
|
10918
|
-
var $
|
|
10919
|
-
|
|
10920
|
-
|
|
11049
|
+
var $R0 = (0, import_lib2.$R)(/(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)/suy);
|
|
11050
|
+
var $R1 = (0, import_lib2.$R)(/&(?=\s)/suy);
|
|
11051
|
+
var $R2 = (0, import_lib2.$R)(/(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\p{ID_Continue}|[\u200C\u200D$])/suy);
|
|
11052
|
+
var $R3 = (0, import_lib2.$R)(/[0-9]/suy);
|
|
11053
|
+
var $R4 = (0, import_lib2.$R)(/(?!\p{ID_Start}|[_$0-9(\[{])/suy);
|
|
11054
|
+
var $R5 = (0, import_lib2.$R)(/[ \t]/suy);
|
|
11055
|
+
var $R6 = (0, import_lib2.$R)(/\p{ID_Continue}|[\u200C\u200D$.#{=]/suy);
|
|
11056
|
+
var $R7 = (0, import_lib2.$R)(/[&=]/suy);
|
|
11057
|
+
var $R8 = (0, import_lib2.$R)(/[@#]/suy);
|
|
11058
|
+
var $R9 = (0, import_lib2.$R)(/(?=['"`])/suy);
|
|
11059
|
+
var $R10 = (0, import_lib2.$R)(/(?=[\/?])/suy);
|
|
11060
|
+
var $R11 = (0, import_lib2.$R)(/(?=[\/\[{?.!@#'’:])/suy);
|
|
11061
|
+
var $R12 = (0, import_lib2.$R)(/%%?/suy);
|
|
11062
|
+
var $R13 = (0, import_lib2.$R)(/[.\s]/suy);
|
|
11063
|
+
var $R14 = (0, import_lib2.$R)(/[)\]}]/suy);
|
|
11064
|
+
var $R15 = (0, import_lib2.$R)(/[+-]/suy);
|
|
11065
|
+
var $R16 = (0, import_lib2.$R)(/\+\+|--|⧺|—|[\+\-&]\S/suy);
|
|
11066
|
+
var $R17 = (0, import_lib2.$R)(/(?=[0-9.'"tfyno])/suy);
|
|
11067
|
+
var $R18 = (0, import_lib2.$R)(/(?=true|false|yes|no|on|off)/suy);
|
|
11068
|
+
var $R19 = (0, import_lib2.$R)(/(?=\[|\s*[.•\/])/suy);
|
|
11069
|
+
var $R20 = (0, import_lib2.$R)(/([<>])(=?)|([≤≥])/suy);
|
|
11070
|
+
var $R21 = (0, import_lib2.$R)(/[ \t]*/suy);
|
|
11071
|
+
var $R22 = (0, import_lib2.$R)(/[ \t]+/suy);
|
|
11072
|
+
var $R23 = (0, import_lib2.$R)(/[!+-]?/suy);
|
|
11073
|
+
var $R24 = (0, import_lib2.$R)(/(?:\p{ID_Continue}|[\u200C\u200D$-])*/suy);
|
|
11074
|
+
var $R25 = (0, import_lib2.$R)(/[=>]/suy);
|
|
11075
|
+
var $R26 = (0, import_lib2.$R)(/(?=\p{ID_Start}|[_$^≪≫⋙≤≥∈∋∉∌≣≡≢≠=⩶⩵‖⁇&|*\/!?%÷<>⧺+-])/suy);
|
|
11076
|
+
var $R27 = (0, import_lib2.$R)(/!\^\^?/suy);
|
|
11077
|
+
var $R28 = (0, import_lib2.$R)(/(?!\+\+|--)[!~+-](?!\s)/suy);
|
|
11078
|
+
var $R29 = (0, import_lib2.$R)(/[:.]/suy);
|
|
11079
|
+
var $R30 = (0, import_lib2.$R)(/(?=for|if|loop|unless|until|while)/suy);
|
|
11080
|
+
var $R31 = (0, import_lib2.$R)(/(?:loop|while|until|for|do)(?!\p{ID_Continue})/suy);
|
|
11081
|
+
var $R32 = (0, import_lib2.$R)(/(?=loop|comptime|do|for|until|while)/suy);
|
|
11082
|
+
var $R33 = (0, import_lib2.$R)(/\s/suy);
|
|
11083
|
+
var $R34 = (0, import_lib2.$R)(/[^;"'\s=>]+/suy);
|
|
11084
|
+
var $R35 = (0, import_lib2.$R)(/(?=[0-9.])/suy);
|
|
11085
|
+
var $R36 = (0, import_lib2.$R)(/(?:0|[1-9](?:_[0-9]|[0-9])*)n/suy);
|
|
11086
|
+
var $R37 = (0, import_lib2.$R)(/(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\.(?:\p{ID_Start}|[_$]))/suy);
|
|
11087
|
+
var $R38 = (0, import_lib2.$R)(/(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\.(?:[0-9](?:_[0-9]|[0-9])*))?/suy);
|
|
11088
|
+
var $R39 = (0, import_lib2.$R)(/(?:\.[0-9](?:_[0-9]|[0-9])*)/suy);
|
|
11089
|
+
var $R40 = (0, import_lib2.$R)(/(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)/suy);
|
|
11090
|
+
var $R41 = (0, import_lib2.$R)(/0[bB][01](?:[01]|_[01])*n?/suy);
|
|
11091
|
+
var $R42 = (0, import_lib2.$R)(/0[oO][0-7](?:[0-7]|_[0-7])*n?/suy);
|
|
11092
|
+
var $R43 = (0, import_lib2.$R)(/0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?/suy);
|
|
11093
|
+
var $R44 = (0, import_lib2.$R)(/(?=[0-9])/suy);
|
|
11094
|
+
var $R45 = (0, import_lib2.$R)(/(?:0|[1-9](?:_[0-9]|[0-9])*)/suy);
|
|
11095
|
+
var $R46 = (0, import_lib2.$R)(/(?:\\.|[^"])*/suy);
|
|
11096
|
+
var $R47 = (0, import_lib2.$R)(/(?:\\.|[^'])*/suy);
|
|
11097
|
+
var $R48 = (0, import_lib2.$R)(/(?:\\.|[^"\n])*/suy);
|
|
11098
|
+
var $R49 = (0, import_lib2.$R)(/(?:\\.|[^'\n])*/suy);
|
|
11099
|
+
var $R50 = (0, import_lib2.$R)(/(?:"(?!"")|#(?!\{)|\\.|[^#"])+/suy);
|
|
11100
|
+
var $R51 = (0, import_lib2.$R)(/(?:"(?!"")|\\.|[^"])+/suy);
|
|
11101
|
+
var $R52 = (0, import_lib2.$R)(/(?:'(?!'')|\\.|[^'])*/suy);
|
|
11102
|
+
var $R53 = (0, import_lib2.$R)(/(?:\\.|#(?!\{)|[^"#])+/suy);
|
|
11103
|
+
var $R54 = (0, import_lib2.$R)(/(?:\\.|[^\]])*/suy);
|
|
11104
|
+
var $R55 = (0, import_lib2.$R)(/\\./suy);
|
|
11105
|
+
var $R56 = (0, import_lib2.$R)(/[\s]+/suy);
|
|
11106
|
+
var $R57 = (0, import_lib2.$R)(/\/(?!\/\/)/suy);
|
|
11107
|
+
var $R58 = (0, import_lib2.$R)(/[^[\/\s#$\\]+|[#$]/suy);
|
|
11108
|
+
var $R59 = (0, import_lib2.$R)(/[*\/\r\n]/suy);
|
|
11109
|
+
var $R60 = (0, import_lib2.$R)(/(?:\\.|[^[\/\r\n])+/suy);
|
|
11110
|
+
var $R61 = (0, import_lib2.$R)(/(?:\p{ID_Continue}|[\u200C\u200D$])*/suy);
|
|
11111
|
+
var $R62 = (0, import_lib2.$R)(/(?=[`'"])/suy);
|
|
11112
|
+
var $R63 = (0, import_lib2.$R)(/(?:\$(?!\{)|\\.|[^$`])+/suy);
|
|
11113
|
+
var $R64 = (0, import_lib2.$R)(/(?:\$(?!\{)|`(?!``)|\\.|[^$`])+/suy);
|
|
11114
|
+
var $R65 = (0, import_lib2.$R)(/(?:off|yes|on|no)/suy);
|
|
11115
|
+
var $R66 = (0, import_lib2.$R)(/isnt/suy);
|
|
11116
|
+
var $R67 = (0, import_lib2.$R)(/by/suy);
|
|
11117
|
+
var $R68 = (0, import_lib2.$R)(/of/suy);
|
|
11118
|
+
var $R69 = (0, import_lib2.$R)(/(?:instanceof|interface|protected|continue|debugger|function|default|extends|finally|private|delete|export|import|public|return|static|switch|typeof|unless|await|break|catch|class|const|false|super|throw|until|while|yield|case|else|enum|loop|null|this|true|void|with|and|for|let|new|not|try|var|do|if|in|is|or)/suy);
|
|
11119
|
+
var $R70 = (0, import_lib2.$R)(/(?=\/|#)/suy);
|
|
11120
|
+
var $R71 = (0, import_lib2.$R)(/\/\/(?!\/(?!\/))[^\r\n]*/suy);
|
|
11121
|
+
var $R72 = (0, import_lib2.$R)(/./suy);
|
|
11122
|
+
var $R73 = (0, import_lib2.$R)(/#(?!##(?!#))([^\r\n]*)/suy);
|
|
11123
|
+
var $R74 = (0, import_lib2.$R)(/[^]*?###/suy);
|
|
11124
|
+
var $R75 = (0, import_lib2.$R)(/###(?!#)/suy);
|
|
11125
|
+
var $R76 = (0, import_lib2.$R)(/\/\*(?:(?!\*\/)[^\r\n])*\*\//suy);
|
|
11126
|
+
var $R77 = (0, import_lib2.$R)(/(?=[ \t\/\\#])/suy);
|
|
11127
|
+
var $R78 = (0, import_lib2.$R)(/(?=\s|\/|#)/suy);
|
|
11128
|
+
var $R79 = (0, import_lib2.$R)(/[=:]/suy);
|
|
11129
|
+
var $R80 = (0, import_lib2.$R)(/['’]s/suy);
|
|
11130
|
+
var $R81 = (0, import_lib2.$R)(/(?=[<])/suy);
|
|
11131
|
+
var $R82 = (0, import_lib2.$R)(/(?:\p{ID_Start}|[_$])(?:\p{ID_Continue}|[\u200C\u200D$-])*/suy);
|
|
11132
|
+
var $R83 = (0, import_lib2.$R)(/[!+-]/suy);
|
|
11133
|
+
var $R84 = (0, import_lib2.$R)(/[\s>]|\/>/suy);
|
|
11134
|
+
var $R85 = (0, import_lib2.$R)(/(?:[\w\-:]+|\([^()]*\)|\[[^\[\]]*\])+/suy);
|
|
11135
|
+
var $R86 = (0, import_lib2.$R)(/"[^"]*"|'[^']*'/suy);
|
|
11136
|
+
var $R87 = (0, import_lib2.$R)(/[<>]/suy);
|
|
11137
|
+
var $R88 = (0, import_lib2.$R)(/[!~+-](?!\s|[!~+-]*&)/suy);
|
|
11138
|
+
var $R89 = (0, import_lib2.$R)(/(?:-[^-]|[^-]*)*/suy);
|
|
11139
|
+
var $R90 = (0, import_lib2.$R)(/[^{}<>\r\n]+/suy);
|
|
11140
|
+
var $R91 = (0, import_lib2.$R)(/[+-]?/suy);
|
|
11141
|
+
var $R92 = (0, import_lib2.$R)(/(?=if|unless)/suy);
|
|
11142
|
+
var $R93 = (0, import_lib2.$R)(/[|&<!=\-⇒→]/suy);
|
|
11143
|
+
var $R94 = (0, import_lib2.$R)(/(extends|not|is)(?!\p{ID_Continue}|[\u200C\u200D$])/suy);
|
|
11144
|
+
var $R95 = (0, import_lib2.$R)(/const|in|out/suy);
|
|
11145
|
+
var $R96 = (0, import_lib2.$R)(/#![^\r\n]*/suy);
|
|
11146
|
+
var $R97 = (0, import_lib2.$R)(/[\t ]*/suy);
|
|
11147
|
+
var $R98 = (0, import_lib2.$R)(/[\s]*/suy);
|
|
11148
|
+
var $R99 = (0, import_lib2.$R)(/\s+([+-]?)([a-zA-Z0-9-]+)(\s*=\s*([\p{ID_Continue}.,+-]*))?/suy);
|
|
11149
|
+
var $R100 = (0, import_lib2.$R)(/\/\/\/[^\r\n]*/suy);
|
|
11150
|
+
var $R101 = (0, import_lib2.$R)(/(?=[ \t\r\n\/#]|$)/suy);
|
|
11151
|
+
var $R102 = (0, import_lib2.$R)(/\r\n|\n|\r|$/suy);
|
|
11152
|
+
var $R103 = (0, import_lib2.$R)(/[^]*/suy);
|
|
11153
|
+
var $RD0 = (($$ctx, $$state) => {
|
|
11154
|
+
const $$source = `(?=\\p{ID_Start}|[_$\\\\]|${nonAsciiIdentifierPattern})`;
|
|
11155
|
+
$RD0 = (0, import_lib2.$R)(new RegExp($$source, "suy"));
|
|
11156
|
+
$RD0.source = $$source;
|
|
11157
|
+
return $RD0($$ctx, $$state);
|
|
11158
|
+
});
|
|
11159
|
+
var $RD1 = (($$ctx, $$state) => {
|
|
11160
|
+
const $$source = `(?:\\p{ID_Start}|[_$]|${unicodeEscapePattern}|${nonAsciiIdentifierPattern})(?:\\p{ID_Continue}|[\\u200C\\u200D$]|${unicodeEscapePattern}|${nonAsciiIdentifierPattern})*`;
|
|
11161
|
+
$RD1 = (0, import_lib2.$R)(new RegExp($$source, "suy"));
|
|
11162
|
+
$RD1.source = $$source;
|
|
11163
|
+
return $RD1($$ctx, $$state);
|
|
11164
|
+
});
|
|
11165
|
+
var $RD2 = (($$ctx, $$state) => {
|
|
11166
|
+
const $$source = `(?!\\p{ID_Continue}|${nonAsciiIdentifierPattern})`;
|
|
11167
|
+
$RD2 = (0, import_lib2.$R)(new RegExp($$source, "suy"));
|
|
11168
|
+
$RD2.source = $$source;
|
|
11169
|
+
return $RD2($$ctx, $$state);
|
|
11170
|
+
});
|
|
10921
11171
|
var Program$parser = (0, import_lib2.$S)(Reset, Init, (0, import_lib2.$E)(EOS), TopLevelStatements, __);
|
|
10922
11172
|
function Program($$ctx, $$state) {
|
|
10923
11173
|
const $$entered = $$ctx.enter?.("Program", $$state);
|
|
@@ -12965,7 +13215,7 @@ function TrailingPostfix($$ctx, $$state) {
|
|
|
12965
13215
|
$$ctx.exit?.("TrailingPostfix", $$state, $$final, $$eventData);
|
|
12966
13216
|
return $$final;
|
|
12967
13217
|
}
|
|
12968
|
-
var FatArrowBody$0$parser = (0, import_lib2.$S)((0, import_lib2.$N)(EOS), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), ExpressionizedStatement)), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), Declaration)), NonPipelineExpression, (0, import_lib2.$N)(TrailingDeclaration), (0, import_lib2.$N)(TrailingPipe), (0, import_lib2.$N)(TrailingPostfix), (0, import_lib2.$N)(SemicolonDelimiter));
|
|
13218
|
+
var FatArrowBody$0$parser = (0, import_lib2.$S)((0, import_lib2.$N)(EOS), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), ExpressionizedStatement)), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), Declaration)), NonPipelineExpression, (0, import_lib2.$N)(TrailingDeclaration), (0, import_lib2.$N)(TrailingPipe), (0, import_lib2.$N)(TrailingPostfix), (0, import_lib2.$C)(ESArrowFunctionEnabled, (0, import_lib2.$N)(SemicolonDelimiter)));
|
|
12969
13219
|
function FatArrowBody$0($$ctx, $$state) {
|
|
12970
13220
|
const $$r = FatArrowBody$0$parser($$ctx, $$state);
|
|
12971
13221
|
if (!$$r) {
|
|
@@ -14081,7 +14331,7 @@ function ClassBracedContent($$ctx, $$state) {
|
|
|
14081
14331
|
$$ctx.exit?.("ClassBracedContent", $$state, $$final, $$eventData);
|
|
14082
14332
|
return $$final;
|
|
14083
14333
|
}
|
|
14084
|
-
var NestedClassElements$parser = (0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedClassElement), PopIndent);
|
|
14334
|
+
var NestedClassElements$parser = (0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedClassElement), (0, import_lib2.$Q)(TrailingNestedCommentLine), PopIndent);
|
|
14085
14335
|
function NestedClassElements($$ctx, $$state) {
|
|
14086
14336
|
const $$entered = $$ctx.enter?.("NestedClassElements", $$state);
|
|
14087
14337
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -14091,12 +14341,13 @@ function NestedClassElements($$ctx, $$state) {
|
|
|
14091
14341
|
$$ctx.exit?.("NestedClassElements", $$state, void 0, $$eventData);
|
|
14092
14342
|
return void 0;
|
|
14093
14343
|
}
|
|
14094
|
-
const $$
|
|
14095
|
-
|
|
14344
|
+
const $$value = $$r.value;
|
|
14345
|
+
const $$m = (function(elements, trailing) {
|
|
14346
|
+
if (!(elements.length || trailing.length)) {
|
|
14096
14347
|
return $skip;
|
|
14097
14348
|
}
|
|
14098
|
-
return elements;
|
|
14099
|
-
})($$
|
|
14349
|
+
return trailing.length ? [...elements, ...trailing] : elements;
|
|
14350
|
+
})($$value[1], $$value[2]);
|
|
14100
14351
|
const $$final = $$m !== import_lib2.SKIP ? ($$r.value = $$m, $$r) : void 0;
|
|
14101
14352
|
$$ctx.exit?.("NestedClassElements", $$state, $$final, $$eventData);
|
|
14102
14353
|
return $$final;
|
|
@@ -16428,7 +16679,10 @@ function ArrayBindingPattern($$ctx, $$state) {
|
|
|
16428
16679
|
...c,
|
|
16429
16680
|
// names, blockPrefix, length
|
|
16430
16681
|
type: "ArrayBindingPattern",
|
|
16431
|
-
elements
|
|
16682
|
+
// `c.elements` may differ from `c.children` when adjustBindingElements
|
|
16683
|
+
// omits an anonymous rest from the emitted destructure but still needs
|
|
16684
|
+
// pattern matching / type generation to see it.
|
|
16685
|
+
elements: c.elements ?? c.children,
|
|
16432
16686
|
children: [ws1, open, c.children, ws2, close]
|
|
16433
16687
|
});
|
|
16434
16688
|
})($$value[0], $$value[1], $$value[2], $$value[3], $$value[4]);
|
|
@@ -16447,7 +16701,7 @@ function ArrayBindingPatternContent$1($$ctx, $$state) {
|
|
|
16447
16701
|
}
|
|
16448
16702
|
const $$m = (function(elements) {
|
|
16449
16703
|
if (!elements) {
|
|
16450
|
-
return { children: [], names: [], length: 0 };
|
|
16704
|
+
return { children: [], elements: void 0, names: [], length: 0 };
|
|
16451
16705
|
}
|
|
16452
16706
|
return adjustBindingElements(elements);
|
|
16453
16707
|
})($$r.value);
|
|
@@ -17665,8 +17919,9 @@ function ThenClause($$ctx, $$state) {
|
|
|
17665
17919
|
}
|
|
17666
17920
|
var ThenBlock$0$parser = (0, import_lib2.$S)(NoBlock, EmptyBlock);
|
|
17667
17921
|
var ThenBlock$1$parser = ImplicitNestedBlock;
|
|
17668
|
-
var ThenBlock$2$parser =
|
|
17669
|
-
var ThenBlock$3$parser =
|
|
17922
|
+
var ThenBlock$2$parser = (0, import_lib2.$S)(ESBraceBlockEnabled, ExplicitBlock);
|
|
17923
|
+
var ThenBlock$3$parser = (0, import_lib2.$S)((0, import_lib2.$N)(ESBraceBlockEnabled), ObjectSingleLineStatements);
|
|
17924
|
+
var ThenBlock$4$parser = SingleLineStatements;
|
|
17670
17925
|
function ThenBlock$0($$ctx, $$state) {
|
|
17671
17926
|
const $$r = ThenBlock$0$parser($$ctx, $$state);
|
|
17672
17927
|
if (!$$r) {
|
|
@@ -17682,16 +17937,35 @@ function ThenBlock$1($$ctx, $$state) {
|
|
|
17682
17937
|
return ThenBlock$1$parser($$ctx, $$state);
|
|
17683
17938
|
}
|
|
17684
17939
|
function ThenBlock$2($$ctx, $$state) {
|
|
17685
|
-
|
|
17940
|
+
const $$r = ThenBlock$2$parser($$ctx, $$state);
|
|
17941
|
+
if (!$$r) {
|
|
17942
|
+
return void 0;
|
|
17943
|
+
}
|
|
17944
|
+
const $$m = /* @__PURE__ */ (function($2) {
|
|
17945
|
+
return $2;
|
|
17946
|
+
})($$r.value[1]);
|
|
17947
|
+
$$r.value = $$m;
|
|
17948
|
+
return $$r;
|
|
17686
17949
|
}
|
|
17687
17950
|
function ThenBlock$3($$ctx, $$state) {
|
|
17688
|
-
|
|
17951
|
+
const $$r = ThenBlock$3$parser($$ctx, $$state);
|
|
17952
|
+
if (!$$r) {
|
|
17953
|
+
return void 0;
|
|
17954
|
+
}
|
|
17955
|
+
const $$m = /* @__PURE__ */ (function($2) {
|
|
17956
|
+
return $2;
|
|
17957
|
+
})($$r.value[1]);
|
|
17958
|
+
$$r.value = $$m;
|
|
17959
|
+
return $$r;
|
|
17960
|
+
}
|
|
17961
|
+
function ThenBlock$4($$ctx, $$state) {
|
|
17962
|
+
return ThenBlock$4$parser($$ctx, $$state);
|
|
17689
17963
|
}
|
|
17690
17964
|
function ThenBlock($$ctx, $$state) {
|
|
17691
17965
|
const $$entered = $$ctx.enter?.("ThenBlock", $$state);
|
|
17692
17966
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
17693
17967
|
const $$eventData = $$entered?.data;
|
|
17694
|
-
const $$final = ThenBlock$0($$ctx, $$state) || ThenBlock$1($$ctx, $$state) || ThenBlock$2($$ctx, $$state) || ThenBlock$3($$ctx, $$state);
|
|
17968
|
+
const $$final = ThenBlock$0($$ctx, $$state) || ThenBlock$1($$ctx, $$state) || ThenBlock$2($$ctx, $$state) || ThenBlock$3($$ctx, $$state) || ThenBlock$4($$ctx, $$state);
|
|
17695
17969
|
$$ctx.exit?.("ThenBlock", $$state, $$final, $$eventData);
|
|
17696
17970
|
return $$final;
|
|
17697
17971
|
}
|
|
@@ -17816,11 +18090,19 @@ function BlockOrEmptyStatement($$ctx, $$state) {
|
|
|
17816
18090
|
$$ctx.exit?.("BlockOrEmptyStatement", $$state, $$final, $$eventData);
|
|
17817
18091
|
return $$final;
|
|
17818
18092
|
}
|
|
17819
|
-
var BlockOrEmpty$0$parser = ObjectSingleLineStatements;
|
|
18093
|
+
var BlockOrEmpty$0$parser = (0, import_lib2.$S)((0, import_lib2.$N)(ESBraceBlockEnabled), ObjectSingleLineStatements);
|
|
17820
18094
|
var BlockOrEmpty$1$parser = Block;
|
|
17821
18095
|
var BlockOrEmpty$2$parser = (0, import_lib2.$S)(NoBlock, EmptyBlock);
|
|
17822
18096
|
function BlockOrEmpty$0($$ctx, $$state) {
|
|
17823
|
-
|
|
18097
|
+
const $$r = BlockOrEmpty$0$parser($$ctx, $$state);
|
|
18098
|
+
if (!$$r) {
|
|
18099
|
+
return void 0;
|
|
18100
|
+
}
|
|
18101
|
+
const $$m = /* @__PURE__ */ (function($2) {
|
|
18102
|
+
return $2;
|
|
18103
|
+
})($$r.value[1]);
|
|
18104
|
+
$$r.value = $$m;
|
|
18105
|
+
return $$r;
|
|
17824
18106
|
}
|
|
17825
18107
|
function BlockOrEmpty$1($$ctx, $$state) {
|
|
17826
18108
|
return BlockOrEmpty$1$parser($$ctx, $$state);
|
|
@@ -18190,7 +18472,7 @@ function PostfixedSingleLineNoCommaStatements($$ctx, $$state) {
|
|
|
18190
18472
|
$$ctx.exit?.("PostfixedSingleLineNoCommaStatements", $$state, $$r, $$eventData);
|
|
18191
18473
|
return $$r;
|
|
18192
18474
|
}
|
|
18193
|
-
var NestedBlockStatements$parser = (0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedBlockStatement), PopIndent);
|
|
18475
|
+
var NestedBlockStatements$parser = (0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedBlockStatement), TrailingNestedComments, PopIndent);
|
|
18194
18476
|
function NestedBlockStatements($$ctx, $$state) {
|
|
18195
18477
|
const $$entered = $$ctx.enter?.("NestedBlockStatements", $$state);
|
|
18196
18478
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -18200,18 +18482,24 @@ function NestedBlockStatements($$ctx, $$state) {
|
|
|
18200
18482
|
$$ctx.exit?.("NestedBlockStatements", $$state, void 0, $$eventData);
|
|
18201
18483
|
return void 0;
|
|
18202
18484
|
}
|
|
18203
|
-
const $$
|
|
18204
|
-
|
|
18485
|
+
const $$value = $$r.value;
|
|
18486
|
+
const $$m = (function(statements, trailing) {
|
|
18487
|
+
if (!(statements.length || trailing.length)) {
|
|
18205
18488
|
return $skip;
|
|
18206
18489
|
}
|
|
18207
|
-
|
|
18490
|
+
const expressions = statements.flat();
|
|
18491
|
+
const children = [expressions];
|
|
18492
|
+
if (trailing.length) {
|
|
18493
|
+
children.push(trailing);
|
|
18494
|
+
}
|
|
18208
18495
|
return {
|
|
18209
18496
|
type: "BlockStatement",
|
|
18210
|
-
expressions
|
|
18211
|
-
children
|
|
18212
|
-
bare: true
|
|
18497
|
+
expressions,
|
|
18498
|
+
children,
|
|
18499
|
+
bare: true,
|
|
18500
|
+
trailing: trailing.length ? trailing : void 0
|
|
18213
18501
|
};
|
|
18214
|
-
})($$
|
|
18502
|
+
})($$value[1], $$value[2]);
|
|
18215
18503
|
const $$final = $$m !== import_lib2.SKIP ? ($$r.value = $$m, $$r) : void 0;
|
|
18216
18504
|
$$ctx.exit?.("NestedBlockStatements", $$state, $$final, $$eventData);
|
|
18217
18505
|
return $$final;
|
|
@@ -18237,6 +18525,70 @@ function NestedBlockStatement($$ctx, $$state) {
|
|
|
18237
18525
|
$$ctx.exit?.("NestedBlockStatement", $$state, $$r, $$eventData);
|
|
18238
18526
|
return $$r;
|
|
18239
18527
|
}
|
|
18528
|
+
var TrailingNestedComments$parser = (0, import_lib2.$S)((0, import_lib2.$E)(TrailingInlineComment), (0, import_lib2.$Q)(TrailingNestedCommentLine));
|
|
18529
|
+
function TrailingNestedComments($$ctx, $$state) {
|
|
18530
|
+
const $$entered = $$ctx.enter?.("TrailingNestedComments", $$state);
|
|
18531
|
+
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
18532
|
+
const $$eventData = $$entered?.data;
|
|
18533
|
+
const $$r = TrailingNestedComments$parser($$ctx, $$state);
|
|
18534
|
+
if (!$$r) {
|
|
18535
|
+
$$ctx.exit?.("TrailingNestedComments", $$state, void 0, $$eventData);
|
|
18536
|
+
return void 0;
|
|
18537
|
+
}
|
|
18538
|
+
const $$value = $$r.value;
|
|
18539
|
+
const $$m = (function(inline, lines) {
|
|
18540
|
+
const out = [];
|
|
18541
|
+
if (inline) {
|
|
18542
|
+
out.push(inline);
|
|
18543
|
+
}
|
|
18544
|
+
if (lines.length) {
|
|
18545
|
+
out.push(...lines);
|
|
18546
|
+
}
|
|
18547
|
+
return out;
|
|
18548
|
+
})($$value[0], $$value[1]);
|
|
18549
|
+
$$r.value = $$m;
|
|
18550
|
+
$$ctx.exit?.("TrailingNestedComments", $$state, $$r, $$eventData);
|
|
18551
|
+
return $$r;
|
|
18552
|
+
}
|
|
18553
|
+
var TrailingInlineComment$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), SingleLineComment);
|
|
18554
|
+
function TrailingInlineComment($$ctx, $$state) {
|
|
18555
|
+
const $$entered = $$ctx.enter?.("TrailingInlineComment", $$state);
|
|
18556
|
+
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
18557
|
+
const $$eventData = $$entered?.data;
|
|
18558
|
+
const $$r = TrailingInlineComment$parser($$ctx, $$state);
|
|
18559
|
+
if (!$$r) {
|
|
18560
|
+
$$ctx.exit?.("TrailingInlineComment", $$state, void 0, $$eventData);
|
|
18561
|
+
return void 0;
|
|
18562
|
+
}
|
|
18563
|
+
const $$value = $$r.value;
|
|
18564
|
+
const $$m = /* @__PURE__ */ (function(ws, c) {
|
|
18565
|
+
return [ws, c];
|
|
18566
|
+
})($$value[0], $$value[1]);
|
|
18567
|
+
$$r.value = $$m;
|
|
18568
|
+
$$ctx.exit?.("TrailingInlineComment", $$state, $$r, $$eventData);
|
|
18569
|
+
return $$r;
|
|
18570
|
+
}
|
|
18571
|
+
var TrailingNestedCommentLine$parser = (0, import_lib2.$S)(EOL, Indent, SingleLineComment);
|
|
18572
|
+
function TrailingNestedCommentLine($$ctx, $$state) {
|
|
18573
|
+
const $$entered = $$ctx.enter?.("TrailingNestedCommentLine", $$state);
|
|
18574
|
+
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
18575
|
+
const $$eventData = $$entered?.data;
|
|
18576
|
+
const $$r = TrailingNestedCommentLine$parser($$ctx, $$state);
|
|
18577
|
+
if (!$$r) {
|
|
18578
|
+
$$ctx.exit?.("TrailingNestedCommentLine", $$state, void 0, $$eventData);
|
|
18579
|
+
return void 0;
|
|
18580
|
+
}
|
|
18581
|
+
const $$value = $$r.value;
|
|
18582
|
+
const $$m = (function(eol, indent, c) {
|
|
18583
|
+
if (!(indent.level >= state.currentIndent.level)) {
|
|
18584
|
+
return $skip;
|
|
18585
|
+
}
|
|
18586
|
+
return [eol, indent, c];
|
|
18587
|
+
})($$value[0], $$value[1], $$value[2]);
|
|
18588
|
+
const $$final = $$m !== import_lib2.SKIP ? ($$r.value = $$m, $$r) : void 0;
|
|
18589
|
+
$$ctx.exit?.("TrailingNestedCommentLine", $$state, $$final, $$eventData);
|
|
18590
|
+
return $$final;
|
|
18591
|
+
}
|
|
18240
18592
|
var BlockStatementPart$parser = (0, import_lib2.$S)((0, import_lib2.$N)(EOS), (0, import_lib2.$E)(_), StatementListItem, StatementDelimiter);
|
|
18241
18593
|
function BlockStatementPart($$ctx, $$state) {
|
|
18242
18594
|
const $$entered = $$ctx.enter?.("BlockStatementPart", $$state);
|
|
@@ -18476,7 +18828,7 @@ function SymbolElement($$ctx, $$state) {
|
|
|
18476
18828
|
$$ctx.exit?.("SymbolElement", $$state, $$r, $$eventData);
|
|
18477
18829
|
return $$r;
|
|
18478
18830
|
}
|
|
18479
|
-
var Identifier$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18831
|
+
var Identifier$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($RD0, () => `Identifier /${$RD0.source}/`), (0, import_lib2.$N)(ReservedWord), IdentifierName);
|
|
18480
18832
|
function Identifier($$ctx, $$state) {
|
|
18481
18833
|
const $$entered = $$ctx.enter?.("Identifier", $$state);
|
|
18482
18834
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -18493,7 +18845,7 @@ function Identifier($$ctx, $$state) {
|
|
|
18493
18845
|
$$ctx.exit?.("Identifier", $$state, $$r, $$eventData);
|
|
18494
18846
|
return $$r;
|
|
18495
18847
|
}
|
|
18496
|
-
var IdentifierName$parser = (0, import_lib2.$EXPECT)($
|
|
18848
|
+
var IdentifierName$parser = (0, import_lib2.$EXPECT)($RD1, () => `IdentifierName /${$RD1.source}/`);
|
|
18497
18849
|
function IdentifierName($$ctx, $$state) {
|
|
18498
18850
|
const $$entered = $$ctx.enter?.("IdentifierName", $$state);
|
|
18499
18851
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -18541,7 +18893,7 @@ function UpcomingAssignment($$ctx, $$state) {
|
|
|
18541
18893
|
$$ctx.exit?.("UpcomingAssignment", $$state, $$final, $$eventData);
|
|
18542
18894
|
return $$final;
|
|
18543
18895
|
}
|
|
18544
|
-
var ArrayLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18896
|
+
var ArrayLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R19, "ArrayLiteral /(?=\\[|\\s*[.\u2022\\/])/"), _ArrayLiteral);
|
|
18545
18897
|
function ArrayLiteral($$ctx, $$state) {
|
|
18546
18898
|
const $$entered = $$ctx.enter?.("ArrayLiteral", $$state);
|
|
18547
18899
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -18723,7 +19075,7 @@ function OptionalRangeEnd($$ctx, $$state) {
|
|
|
18723
19075
|
$$ctx.exit?.("OptionalRangeEnd", $$state, $$final, $$eventData);
|
|
18724
19076
|
return $$final;
|
|
18725
19077
|
}
|
|
18726
|
-
var RangeEnd$parser = (0, import_lib2.$EXPECT)($
|
|
19078
|
+
var RangeEnd$parser = (0, import_lib2.$EXPECT)($R20, "RangeEnd /([<>])(=?)|([\u2264\u2265])/");
|
|
18727
19079
|
function RangeEnd($$ctx, $$state) {
|
|
18728
19080
|
const $$entered = $$ctx.enter?.("RangeEnd", $$state);
|
|
18729
19081
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -19258,8 +19610,8 @@ function BulletIndent($$ctx, $$state) {
|
|
|
19258
19610
|
$$ctx.exit?.("BulletIndent", $$state, $$r, $$eventData);
|
|
19259
19611
|
return $$r;
|
|
19260
19612
|
}
|
|
19261
|
-
var Bullet$0$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L46, 'Bullet "\u2022"'), (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
19262
|
-
var Bullet$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L7, 'Bullet "."'), (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
19613
|
+
var Bullet$0$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L46, 'Bullet "\u2022"'), (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R21, "Bullet /[ \\t]*/")));
|
|
19614
|
+
var Bullet$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L7, 'Bullet "."'), (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R22, "Bullet /[ \\t]+/")));
|
|
19263
19615
|
function Bullet$0($$ctx, $$state) {
|
|
19264
19616
|
return Bullet$0$parser($$ctx, $$state);
|
|
19265
19617
|
}
|
|
@@ -19698,7 +20050,7 @@ function ObjectPropertyDelimiter($$ctx, $$state) {
|
|
|
19698
20050
|
}
|
|
19699
20051
|
var PropertyDefinition$0$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), InsertDotDotDot, IterationExpression);
|
|
19700
20052
|
var PropertyDefinition$1$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), NamedProperty);
|
|
19701
|
-
var PropertyDefinition$2$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($
|
|
20053
|
+
var PropertyDefinition$2$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R23, "PropertyDefinition /[!+-]?/")), PropertyName, (0, import_lib2.$Y)(ObjectPropertyDelimiter));
|
|
19702
20054
|
var PropertyDefinition$3$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), MethodDefinition);
|
|
19703
20055
|
var PropertyDefinition$4$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), DotDotDot, Expression);
|
|
19704
20056
|
var PropertyDefinition$5$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$N)((0, import_lib2.$C)(EOS, (0, import_lib2.$EXPECT)($L7, 'PropertyDefinition "."'))), (0, import_lib2.$Q)(UnaryOp), CallExpression, (0, import_lib2.$E)(UnaryPostfix));
|
|
@@ -20000,7 +20352,7 @@ function SnugNamedProperty($$ctx, $$state) {
|
|
|
20000
20352
|
$$ctx.exit?.("SnugNamedProperty", $$state, $$r, $$eventData);
|
|
20001
20353
|
return $$r;
|
|
20002
20354
|
}
|
|
20003
|
-
var PropertyName$3$parser = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$E)(IdentifierName), (0, import_lib2.$EXPECT)($L22, 'PropertyName "-"'), (0, import_lib2.$EXPECT)($
|
|
20355
|
+
var PropertyName$3$parser = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$E)(IdentifierName), (0, import_lib2.$EXPECT)($L22, 'PropertyName "-"'), (0, import_lib2.$EXPECT)($R24, "PropertyName /(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/")));
|
|
20004
20356
|
var PropertyName$4$parser = IdentifierName;
|
|
20005
20357
|
function PropertyName$0($$ctx, $$state) {
|
|
20006
20358
|
return NumericLiteral($$ctx, $$state);
|
|
@@ -20591,7 +20943,7 @@ var AssignmentOpSymbol$20$parser = (0, import_lib2.$EXPECT)($L68, 'AssignmentOpS
|
|
|
20591
20943
|
var AssignmentOpSymbol$21$parser = (0, import_lib2.$EXPECT)($L69, 'AssignmentOpSymbol "??="');
|
|
20592
20944
|
var AssignmentOpSymbol$22$parser = (0, import_lib2.$EXPECT)($L70, 'AssignmentOpSymbol "\u2047="');
|
|
20593
20945
|
var AssignmentOpSymbol$23$parser = (0, import_lib2.$EXPECT)($L71, 'AssignmentOpSymbol "?="');
|
|
20594
|
-
var AssignmentOpSymbol$24$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L3, 'AssignmentOpSymbol "="'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($
|
|
20946
|
+
var AssignmentOpSymbol$24$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L3, 'AssignmentOpSymbol "="'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R25, "AssignmentOpSymbol /[=>]/")));
|
|
20595
20947
|
var AssignmentOpSymbol$25$parser = (0, import_lib2.$S)(CoffeeWordAssignmentOp);
|
|
20596
20948
|
function AssignmentOpSymbol$0($$ctx, $$state) {
|
|
20597
20949
|
return AssignmentOpSymbol$0$parser($$ctx, $$state);
|
|
@@ -20873,7 +21225,7 @@ function IdentifierBinaryOp($$ctx, $$state) {
|
|
|
20873
21225
|
$$ctx.exit?.("IdentifierBinaryOp", $$state, $$final, $$eventData);
|
|
20874
21226
|
return $$final;
|
|
20875
21227
|
}
|
|
20876
|
-
var BinaryOp$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
21228
|
+
var BinaryOp$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R26, "BinaryOp /(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])/"), _BinaryOp);
|
|
20877
21229
|
function BinaryOp($$ctx, $$state) {
|
|
20878
21230
|
const $$entered = $$ctx.enter?.("BinaryOp", $$state);
|
|
20879
21231
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -20956,7 +21308,7 @@ var BinaryOpSymbol$0$parser = (0, import_lib2.$EXPECT)($L75, 'BinaryOpSymbol "**
|
|
|
20956
21308
|
var BinaryOpSymbol$1$parser = (0, import_lib2.$EXPECT)($L74, 'BinaryOpSymbol "*"');
|
|
20957
21309
|
var BinaryOpSymbol$2$parser = (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L50, 'BinaryOpSymbol "%/"'), (0, import_lib2.$EXPECT)($L51, 'BinaryOpSymbol "\xF7"'), (0, import_lib2.$S)(CoffeeDivEnabled, (0, import_lib2.$EXPECT)($L47, 'BinaryOpSymbol "//"')));
|
|
20958
21310
|
var BinaryOpSymbol$3$parser = (0, import_lib2.$EXPECT)($L52, 'BinaryOpSymbol "%%"');
|
|
20959
|
-
var BinaryOpSymbol$4$parser = (0, import_lib2.$EXPECT)($L76, 'BinaryOpSymbol "/"');
|
|
21311
|
+
var BinaryOpSymbol$4$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L76, 'BinaryOpSymbol "/"'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L76, 'BinaryOpSymbol "/"')));
|
|
20960
21312
|
var BinaryOpSymbol$5$parser = (0, import_lib2.$EXPECT)($L77, 'BinaryOpSymbol "%"');
|
|
20961
21313
|
var BinaryOpSymbol$6$parser = (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L9, 'BinaryOpSymbol "++"'), (0, import_lib2.$EXPECT)($L11, 'BinaryOpSymbol "\u29FA"'));
|
|
20962
21314
|
var BinaryOpSymbol$7$parser = (0, import_lib2.$EXPECT)($L78, 'BinaryOpSymbol "+"');
|
|
@@ -20988,7 +21340,7 @@ var BinaryOpSymbol$32$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L10
|
|
|
20988
21340
|
var BinaryOpSymbol$33$parser = (0, import_lib2.$EXPECT)($L104, 'BinaryOpSymbol "||"');
|
|
20989
21341
|
var BinaryOpSymbol$34$parser = (0, import_lib2.$EXPECT)($L105, 'BinaryOpSymbol "\u2016"');
|
|
20990
21342
|
var BinaryOpSymbol$35$parser = (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L106, 'BinaryOpSymbol "^^"'), (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L107, 'BinaryOpSymbol "xor"'), NonIdContinue));
|
|
20991
|
-
var BinaryOpSymbol$36$parser = (0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
21343
|
+
var BinaryOpSymbol$36$parser = (0, import_lib2.$C)((0, import_lib2.$EXPECT)($R27, "BinaryOpSymbol /!\\^\\^?/"), (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L108, 'BinaryOpSymbol "xnor"'), NonIdContinue));
|
|
20992
21344
|
var BinaryOpSymbol$37$parser = (0, import_lib2.$EXPECT)($L109, 'BinaryOpSymbol "??"');
|
|
20993
21345
|
var BinaryOpSymbol$38$parser = (0, import_lib2.$EXPECT)($L110, 'BinaryOpSymbol "\u2047"');
|
|
20994
21346
|
var BinaryOpSymbol$39$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L6, 'BinaryOpSymbol "?"'), CoffeeBinaryExistentialEnabled);
|
|
@@ -21041,7 +21393,15 @@ function BinaryOpSymbol$3($$ctx, $$state) {
|
|
|
21041
21393
|
return $$r;
|
|
21042
21394
|
}
|
|
21043
21395
|
function BinaryOpSymbol$4($$ctx, $$state) {
|
|
21044
|
-
|
|
21396
|
+
const $$r = BinaryOpSymbol$4$parser($$ctx, $$state);
|
|
21397
|
+
if (!$$r) {
|
|
21398
|
+
return void 0;
|
|
21399
|
+
}
|
|
21400
|
+
const $$m = /* @__PURE__ */ (function($1) {
|
|
21401
|
+
return $1;
|
|
21402
|
+
})($$r.value[0]);
|
|
21403
|
+
$$r.value = $$m;
|
|
21404
|
+
return $$r;
|
|
21045
21405
|
}
|
|
21046
21406
|
function BinaryOpSymbol$5($$ctx, $$state) {
|
|
21047
21407
|
return BinaryOpSymbol$5$parser($$ctx, $$state);
|
|
@@ -21671,7 +22031,7 @@ function Xor($$ctx, $$state) {
|
|
|
21671
22031
|
$$ctx.exit?.("Xor", $$state, $$final, $$eventData);
|
|
21672
22032
|
return $$final;
|
|
21673
22033
|
}
|
|
21674
|
-
var Xnor$0$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
22034
|
+
var Xnor$0$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R27, "Xnor /!\\^\\^?/"));
|
|
21675
22035
|
var Xnor$1$parser = (0, import_lib2.$EXPECT)($L108, 'Xnor "xnor"');
|
|
21676
22036
|
function Xnor$0($$ctx, $$state) {
|
|
21677
22037
|
return Xnor$0$parser($$ctx, $$state);
|
|
@@ -21687,9 +22047,9 @@ function Xnor($$ctx, $$state) {
|
|
|
21687
22047
|
$$ctx.exit?.("Xnor", $$state, $$final, $$eventData);
|
|
21688
22048
|
return $$final;
|
|
21689
22049
|
}
|
|
21690
|
-
var UnaryOp$0$parser = (0, import_lib2.$EXPECT)($
|
|
21691
|
-
var UnaryOp$2$parser = (0, import_lib2.$S)((0, import_lib2.$C)(Delete, Void, Typeof), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($
|
|
21692
|
-
var UnaryOp$3$parser = (0, import_lib2.$S)(Not, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($
|
|
22050
|
+
var UnaryOp$0$parser = (0, import_lib2.$EXPECT)($R28, "UnaryOp /(?!\\+\\+|--)[!~+-](?!\\s)/");
|
|
22051
|
+
var UnaryOp$2$parser = (0, import_lib2.$S)((0, import_lib2.$C)(Delete, Void, Typeof), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R29, "UnaryOp /[:.]/")), (0, import_lib2.$E)(_));
|
|
22052
|
+
var UnaryOp$3$parser = (0, import_lib2.$S)(Not, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R29, "UnaryOp /[:.]/")), (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L16, 'UnaryOp " "')), (0, import_lib2.$E)(_));
|
|
21693
22053
|
function UnaryOp$0($$ctx, $$state) {
|
|
21694
22054
|
const $$r = UnaryOp$0$parser($$ctx, $$state);
|
|
21695
22055
|
if (!$$r) {
|
|
@@ -21982,7 +22342,7 @@ function PostfixedCommaExpression($$ctx, $$state) {
|
|
|
21982
22342
|
$$ctx.exit?.("PostfixedCommaExpression", $$state, $$final, $$eventData);
|
|
21983
22343
|
return $$final;
|
|
21984
22344
|
}
|
|
21985
|
-
var PostfixStatement$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
22345
|
+
var PostfixStatement$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R30, "PostfixStatement /(?=for|if|loop|unless|until|while)/"), _PostfixStatement);
|
|
21986
22346
|
function PostfixStatement($$ctx, $$state) {
|
|
21987
22347
|
const $$entered = $$ctx.enter?.("PostfixStatement", $$state);
|
|
21988
22348
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -22273,7 +22633,7 @@ function Label($$ctx, $$state) {
|
|
|
22273
22633
|
return $$final;
|
|
22274
22634
|
}
|
|
22275
22635
|
var LabelIdentifier$0$parser = (0, import_lib2.$S)(Colon, IdentifierName);
|
|
22276
|
-
var LabelIdentifier$1$parser = (0, import_lib2.$EXPECT)($
|
|
22636
|
+
var LabelIdentifier$1$parser = (0, import_lib2.$EXPECT)($R31, "LabelIdentifier /(?:loop|while|until|for|do)(?!\\p{ID_Continue})/");
|
|
22277
22637
|
var LabelIdentifier$2$parser = Identifier;
|
|
22278
22638
|
function LabelIdentifier$0($$ctx, $$state) {
|
|
22279
22639
|
const $$r = LabelIdentifier$0$parser($$ctx, $$state);
|
|
@@ -22451,7 +22811,7 @@ function IfClause($$ctx, $$state) {
|
|
|
22451
22811
|
$$ctx.exit?.("IfClause", $$state, $$r, $$eventData);
|
|
22452
22812
|
return $$r;
|
|
22453
22813
|
}
|
|
22454
|
-
var IterationStatement$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
22814
|
+
var IterationStatement$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R32, "IterationStatement /(?=loop|comptime|do|for|until|while)/"), _IterationStatement);
|
|
22455
22815
|
function IterationStatement($$ctx, $$state) {
|
|
22456
22816
|
const $$entered = $$ctx.enter?.("IterationStatement", $$state);
|
|
22457
22817
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -23507,10 +23867,16 @@ function CaseClause$2($$ctx, $$state) {
|
|
|
23507
23867
|
return void 0;
|
|
23508
23868
|
}
|
|
23509
23869
|
const $$value = $$r.value;
|
|
23510
|
-
const $$m =
|
|
23870
|
+
const $$m = (function($0, cases, block, b) {
|
|
23871
|
+
let children = $0;
|
|
23872
|
+
if (hasTrailingComment(block)) {
|
|
23873
|
+
const bIdx = children.indexOf(b);
|
|
23874
|
+
b = { ...b, token: "\n" + b.token };
|
|
23875
|
+
children = [...children.slice(0, bIdx), b, ...children.slice(bIdx + 1)];
|
|
23876
|
+
}
|
|
23511
23877
|
return {
|
|
23512
23878
|
type: "WhenClause",
|
|
23513
|
-
children
|
|
23879
|
+
children,
|
|
23514
23880
|
cases,
|
|
23515
23881
|
block,
|
|
23516
23882
|
break: b
|
|
@@ -25202,7 +25568,7 @@ function MaybeNestedExpression($$ctx, $$state) {
|
|
|
25202
25568
|
$$ctx.exit?.("MaybeNestedExpression", $$state, $$final, $$eventData);
|
|
25203
25569
|
return $$final;
|
|
25204
25570
|
}
|
|
25205
|
-
var MaybeParenNestedExpression$0$parser = (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement, NoBlock));
|
|
25571
|
+
var MaybeParenNestedExpression$0$parser = (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement, (0, import_lib2.$C)(NoBlock, (0, import_lib2.$S)((0, import_lib2.$E)(_), Semicolon))));
|
|
25206
25572
|
var MaybeParenNestedExpression$1$parser = (0, import_lib2.$S)((0, import_lib2.$N)(EOS), Expression);
|
|
25207
25573
|
var MaybeParenNestedExpression$2$parser = (0, import_lib2.$S)((0, import_lib2.$Y)(EOS), (0, import_lib2.$C)(ArrayLiteral, ObjectLiteral));
|
|
25208
25574
|
var MaybeParenNestedExpression$3$parser = (0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertSpace, InsertOpenParen, PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions), InsertNewline, InsertIndent, InsertCloseParen);
|
|
@@ -25265,7 +25631,7 @@ function MaybeParenNestedExpression($$ctx, $$state) {
|
|
|
25265
25631
|
var ImportDeclaration$0$parser = (0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($L132, 'ImportDeclaration "require"'), NonIdContinue, Arguments);
|
|
25266
25632
|
var ImportDeclaration$1$parser = (0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$S)(Import, SameLineOrIndentedFurther), ImpliedImport), Operator, (0, import_lib2.$E)(OperatorBehavior), SameLineOrIndentedFurther, OperatorNamedImports, SameLineOrIndentedFurther, FromClause);
|
|
25267
25633
|
var ImportDeclaration$2$parser = (0, import_lib2.$S)(Import, SameLineOrIndentedFurther, (0, import_lib2.$E)((0, import_lib2.$S)(TypeKeyword, SameLineOrIndentedFurther)), ImportClause, __, FromClause);
|
|
25268
|
-
var ImportDeclaration$3$parser = (0, import_lib2.$S)(Import, (0, import_lib2.$Y)((0, import_lib2.$EXPECT)($
|
|
25634
|
+
var ImportDeclaration$3$parser = (0, import_lib2.$S)(Import, (0, import_lib2.$Y)((0, import_lib2.$EXPECT)($R33, "ImportDeclaration /\\s/")), SameLineOrIndentedFurther, ModuleSpecifier);
|
|
25269
25635
|
var ImportDeclaration$4$parser = (0, import_lib2.$S)(Import, (0, import_lib2.$E)(_), (0, import_lib2.$E)(UnclosedSingleLineStringLiteral), (0, import_lib2.$Y)(EOS));
|
|
25270
25636
|
var ImportDeclaration$5$parser = (0, import_lib2.$S)(ImpliedImport, (0, import_lib2.$E)((0, import_lib2.$S)(TypeKeyword, SameLineOrIndentedFurther)), ImportClause, SameLineOrIndentedFurther, FromClause);
|
|
25271
25637
|
var ImportDeclaration$6$parser = (0, import_lib2.$S)(FromClause, SameLineOrIndentedFurther, Import, SameLineOrIndentedFurther, Operator, (0, import_lib2.$E)(OperatorBehavior), SameLineOrIndentedFurther, OperatorNamedImports);
|
|
@@ -25965,7 +26331,7 @@ function UnprocessedModuleSpecifier($$ctx, $$state) {
|
|
|
25965
26331
|
$$ctx.exit?.("UnprocessedModuleSpecifier", $$state, $$final, $$eventData);
|
|
25966
26332
|
return $$final;
|
|
25967
26333
|
}
|
|
25968
|
-
var UnquotedSpecifier$parser = (0, import_lib2.$EXPECT)($
|
|
26334
|
+
var UnquotedSpecifier$parser = (0, import_lib2.$EXPECT)($R34, `UnquotedSpecifier /[^;"'\\s=>]+/`);
|
|
25969
26335
|
function UnquotedSpecifier($$ctx, $$state) {
|
|
25970
26336
|
const $$entered = $$ctx.enter?.("UnquotedSpecifier", $$state);
|
|
25971
26337
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26556,7 +26922,7 @@ function VariableDeclarationList($$ctx, $$state) {
|
|
|
26556
26922
|
$$ctx.exit?.("VariableDeclarationList", $$state, $$r, $$eventData);
|
|
26557
26923
|
return $$r;
|
|
26558
26924
|
}
|
|
26559
|
-
var NumericLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
26925
|
+
var NumericLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R35, "NumericLiteral /(?=[0-9.])/"), NumericLiteralKind);
|
|
26560
26926
|
function NumericLiteral($$ctx, $$state) {
|
|
26561
26927
|
const $$entered = $$ctx.enter?.("NumericLiteral", $$state);
|
|
26562
26928
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26596,7 +26962,7 @@ function NumericLiteralKind($$ctx, $$state) {
|
|
|
26596
26962
|
$$ctx.exit?.("NumericLiteralKind", $$state, $$final, $$eventData);
|
|
26597
26963
|
return $$final;
|
|
26598
26964
|
}
|
|
26599
|
-
var DecimalBigIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
26965
|
+
var DecimalBigIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R36, "DecimalBigIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)n/"));
|
|
26600
26966
|
function DecimalBigIntegerLiteral($$ctx, $$state) {
|
|
26601
26967
|
const $$entered = $$ctx.enter?.("DecimalBigIntegerLiteral", $$state);
|
|
26602
26968
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26605,9 +26971,9 @@ function DecimalBigIntegerLiteral($$ctx, $$state) {
|
|
|
26605
26971
|
$$ctx.exit?.("DecimalBigIntegerLiteral", $$state, $$final, $$eventData);
|
|
26606
26972
|
return $$final;
|
|
26607
26973
|
}
|
|
26608
|
-
var DecimalLiteral$0$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($
|
|
26609
|
-
var DecimalLiteral$1$parser = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
26610
|
-
var DecimalLiteral$2$parser = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
26974
|
+
var DecimalLiteral$0$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R37, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))/")), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L7, 'DecimalLiteral "."'), ExponentPart)));
|
|
26975
|
+
var DecimalLiteral$1$parser = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R38, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?/"), (0, import_lib2.$E)(ExponentPart)));
|
|
26976
|
+
var DecimalLiteral$2$parser = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R39, "DecimalLiteral /(?:\\.[0-9](?:_[0-9]|[0-9])*)/"), (0, import_lib2.$E)(ExponentPart)));
|
|
26611
26977
|
function DecimalLiteral$0($$ctx, $$state) {
|
|
26612
26978
|
const $$r = DecimalLiteral$0$parser($$ctx, $$state);
|
|
26613
26979
|
if (!$$r) {
|
|
@@ -26633,7 +26999,7 @@ function DecimalLiteral($$ctx, $$state) {
|
|
|
26633
26999
|
$$ctx.exit?.("DecimalLiteral", $$state, $$final, $$eventData);
|
|
26634
27000
|
return $$final;
|
|
26635
27001
|
}
|
|
26636
|
-
var ExponentPart$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
27002
|
+
var ExponentPart$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R40, "ExponentPart /(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)/"));
|
|
26637
27003
|
function ExponentPart($$ctx, $$state) {
|
|
26638
27004
|
const $$entered = $$ctx.enter?.("ExponentPart", $$state);
|
|
26639
27005
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26642,7 +27008,7 @@ function ExponentPart($$ctx, $$state) {
|
|
|
26642
27008
|
$$ctx.exit?.("ExponentPart", $$state, $$final, $$eventData);
|
|
26643
27009
|
return $$final;
|
|
26644
27010
|
}
|
|
26645
|
-
var BinaryIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
27011
|
+
var BinaryIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R41, "BinaryIntegerLiteral /0[bB][01](?:[01]|_[01])*n?/"));
|
|
26646
27012
|
function BinaryIntegerLiteral($$ctx, $$state) {
|
|
26647
27013
|
const $$entered = $$ctx.enter?.("BinaryIntegerLiteral", $$state);
|
|
26648
27014
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26651,7 +27017,7 @@ function BinaryIntegerLiteral($$ctx, $$state) {
|
|
|
26651
27017
|
$$ctx.exit?.("BinaryIntegerLiteral", $$state, $$final, $$eventData);
|
|
26652
27018
|
return $$final;
|
|
26653
27019
|
}
|
|
26654
|
-
var OctalIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
27020
|
+
var OctalIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R42, "OctalIntegerLiteral /0[oO][0-7](?:[0-7]|_[0-7])*n?/"));
|
|
26655
27021
|
function OctalIntegerLiteral($$ctx, $$state) {
|
|
26656
27022
|
const $$entered = $$ctx.enter?.("OctalIntegerLiteral", $$state);
|
|
26657
27023
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26660,7 +27026,7 @@ function OctalIntegerLiteral($$ctx, $$state) {
|
|
|
26660
27026
|
$$ctx.exit?.("OctalIntegerLiteral", $$state, $$final, $$eventData);
|
|
26661
27027
|
return $$final;
|
|
26662
27028
|
}
|
|
26663
|
-
var HexIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
27029
|
+
var HexIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R43, "HexIntegerLiteral /0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?/"));
|
|
26664
27030
|
function HexIntegerLiteral($$ctx, $$state) {
|
|
26665
27031
|
const $$entered = $$ctx.enter?.("HexIntegerLiteral", $$state);
|
|
26666
27032
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26669,7 +27035,7 @@ function HexIntegerLiteral($$ctx, $$state) {
|
|
|
26669
27035
|
$$ctx.exit?.("HexIntegerLiteral", $$state, $$final, $$eventData);
|
|
26670
27036
|
return $$final;
|
|
26671
27037
|
}
|
|
26672
|
-
var IntegerLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
27038
|
+
var IntegerLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R44, "IntegerLiteral /(?=[0-9])/"), IntegerLiteralKind);
|
|
26673
27039
|
function IntegerLiteral($$ctx, $$state) {
|
|
26674
27040
|
const $$entered = $$ctx.enter?.("IntegerLiteral", $$state);
|
|
26675
27041
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26709,7 +27075,7 @@ function IntegerLiteralKind($$ctx, $$state) {
|
|
|
26709
27075
|
$$ctx.exit?.("IntegerLiteralKind", $$state, $$final, $$eventData);
|
|
26710
27076
|
return $$final;
|
|
26711
27077
|
}
|
|
26712
|
-
var DecimalIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
27078
|
+
var DecimalIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R45, "DecimalIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)/"));
|
|
26713
27079
|
function DecimalIntegerLiteral($$ctx, $$state) {
|
|
26714
27080
|
const $$entered = $$ctx.enter?.("DecimalIntegerLiteral", $$state);
|
|
26715
27081
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26758,7 +27124,7 @@ function StringLiteral($$ctx, $$state) {
|
|
|
26758
27124
|
$$ctx.exit?.("StringLiteral", $$state, $$final, $$eventData);
|
|
26759
27125
|
return $$final;
|
|
26760
27126
|
}
|
|
26761
|
-
var DoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($
|
|
27127
|
+
var DoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($R46, 'DoubleStringCharacters /(?:\\\\.|[^"])*/');
|
|
26762
27128
|
function DoubleStringCharacters($$ctx, $$state) {
|
|
26763
27129
|
const $$entered = $$ctx.enter?.("DoubleStringCharacters", $$state);
|
|
26764
27130
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26775,7 +27141,7 @@ function DoubleStringCharacters($$ctx, $$state) {
|
|
|
26775
27141
|
$$ctx.exit?.("DoubleStringCharacters", $$state, $$r, $$eventData);
|
|
26776
27142
|
return $$r;
|
|
26777
27143
|
}
|
|
26778
|
-
var SingleStringCharacters$parser = (0, import_lib2.$EXPECT)($
|
|
27144
|
+
var SingleStringCharacters$parser = (0, import_lib2.$EXPECT)($R47, "SingleStringCharacters /(?:\\\\.|[^'])*/");
|
|
26779
27145
|
function SingleStringCharacters($$ctx, $$state) {
|
|
26780
27146
|
const $$entered = $$ctx.enter?.("SingleStringCharacters", $$state);
|
|
26781
27147
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26792,7 +27158,7 @@ function SingleStringCharacters($$ctx, $$state) {
|
|
|
26792
27158
|
$$ctx.exit?.("SingleStringCharacters", $$state, $$r, $$eventData);
|
|
26793
27159
|
return $$r;
|
|
26794
27160
|
}
|
|
26795
|
-
var SingleLineStringLiteral$parser = (0, import_lib2.$C)((0, import_lib2.$TEXT)((0, import_lib2.$S)(DoubleQuote, (0, import_lib2.$EXPECT)($
|
|
27161
|
+
var SingleLineStringLiteral$parser = (0, import_lib2.$C)((0, import_lib2.$TEXT)((0, import_lib2.$S)(DoubleQuote, (0, import_lib2.$EXPECT)($R48, 'SingleLineStringLiteral /(?:\\\\.|[^"\\n])*/'), DoubleQuote)), (0, import_lib2.$TEXT)((0, import_lib2.$S)(SingleQuote, (0, import_lib2.$EXPECT)($R49, "SingleLineStringLiteral /(?:\\\\.|[^'\\n])*/"), SingleQuote)));
|
|
26796
27162
|
function SingleLineStringLiteral($$ctx, $$state) {
|
|
26797
27163
|
const $$entered = $$ctx.enter?.("SingleLineStringLiteral", $$state);
|
|
26798
27164
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26813,7 +27179,7 @@ function SingleLineStringLiteral($$ctx, $$state) {
|
|
|
26813
27179
|
$$ctx.exit?.("SingleLineStringLiteral", $$state, $$r, $$eventData);
|
|
26814
27180
|
return $$r;
|
|
26815
27181
|
}
|
|
26816
|
-
var UnclosedSingleLineStringLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$TEXT)((0, import_lib2.$S)(DoubleQuote, (0, import_lib2.$EXPECT)($
|
|
27182
|
+
var UnclosedSingleLineStringLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$TEXT)((0, import_lib2.$S)(DoubleQuote, (0, import_lib2.$EXPECT)($R48, 'UnclosedSingleLineStringLiteral /(?:\\\\.|[^"\\n])*/'))), (0, import_lib2.$TEXT)((0, import_lib2.$S)(SingleQuote, (0, import_lib2.$EXPECT)($R49, "UnclosedSingleLineStringLiteral /(?:\\\\.|[^'\\n])*/")))), (0, import_lib2.$Y)(EOS));
|
|
26817
27183
|
function UnclosedSingleLineStringLiteral($$ctx, $$state) {
|
|
26818
27184
|
const $$entered = $$ctx.enter?.("UnclosedSingleLineStringLiteral", $$state);
|
|
26819
27185
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26872,7 +27238,7 @@ function TripleDoubleStringContents($$ctx, $$state) {
|
|
|
26872
27238
|
$$ctx.exit?.("TripleDoubleStringContents", $$state, $$final, $$eventData);
|
|
26873
27239
|
return $$final;
|
|
26874
27240
|
}
|
|
26875
|
-
var CoffeeTripleDoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($
|
|
27241
|
+
var CoffeeTripleDoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($R50, 'CoffeeTripleDoubleStringCharacters /(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+/');
|
|
26876
27242
|
function CoffeeTripleDoubleStringCharacters($$ctx, $$state) {
|
|
26877
27243
|
const $$entered = $$ctx.enter?.("CoffeeTripleDoubleStringCharacters", $$state);
|
|
26878
27244
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26889,7 +27255,7 @@ function CoffeeTripleDoubleStringCharacters($$ctx, $$state) {
|
|
|
26889
27255
|
$$ctx.exit?.("CoffeeTripleDoubleStringCharacters", $$state, $$r, $$eventData);
|
|
26890
27256
|
return $$r;
|
|
26891
27257
|
}
|
|
26892
|
-
var TripleDoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($
|
|
27258
|
+
var TripleDoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($R51, 'TripleDoubleStringCharacters /(?:"(?!"")|\\\\.|[^"])+/');
|
|
26893
27259
|
function TripleDoubleStringCharacters($$ctx, $$state) {
|
|
26894
27260
|
const $$entered = $$ctx.enter?.("TripleDoubleStringCharacters", $$state);
|
|
26895
27261
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26906,7 +27272,7 @@ function TripleDoubleStringCharacters($$ctx, $$state) {
|
|
|
26906
27272
|
$$ctx.exit?.("TripleDoubleStringCharacters", $$state, $$r, $$eventData);
|
|
26907
27273
|
return $$r;
|
|
26908
27274
|
}
|
|
26909
|
-
var TripleSingleStringCharacters$parser = (0, import_lib2.$EXPECT)($
|
|
27275
|
+
var TripleSingleStringCharacters$parser = (0, import_lib2.$EXPECT)($R52, "TripleSingleStringCharacters /(?:'(?!'')|\\\\.|[^'])*/");
|
|
26910
27276
|
function TripleSingleStringCharacters($$ctx, $$state) {
|
|
26911
27277
|
const $$entered = $$ctx.enter?.("TripleSingleStringCharacters", $$state);
|
|
26912
27278
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -26962,7 +27328,7 @@ function CoffeeInterpolatedDoubleQuotedString($$ctx, $$state) {
|
|
|
26962
27328
|
$$ctx.exit?.("CoffeeInterpolatedDoubleQuotedString", $$state, $$r, $$eventData);
|
|
26963
27329
|
return $$r;
|
|
26964
27330
|
}
|
|
26965
|
-
var CoffeeDoubleQuotedStringCharacters$parser = (0, import_lib2.$EXPECT)($
|
|
27331
|
+
var CoffeeDoubleQuotedStringCharacters$parser = (0, import_lib2.$EXPECT)($R53, 'CoffeeDoubleQuotedStringCharacters /(?:\\\\.|#(?!\\{)|[^"#])+/');
|
|
26966
27332
|
function CoffeeDoubleQuotedStringCharacters($$ctx, $$state) {
|
|
26967
27333
|
const $$entered = $$ctx.enter?.("CoffeeDoubleQuotedStringCharacters", $$state);
|
|
26968
27334
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27023,7 +27389,7 @@ function RegularExpressionClass($$ctx, $$state) {
|
|
|
27023
27389
|
$$ctx.exit?.("RegularExpressionClass", $$state, $$r, $$eventData);
|
|
27024
27390
|
return $$r;
|
|
27025
27391
|
}
|
|
27026
|
-
var RegularExpressionClassCharacters$parser = (0, import_lib2.$EXPECT)($
|
|
27392
|
+
var RegularExpressionClassCharacters$parser = (0, import_lib2.$EXPECT)($R54, "RegularExpressionClassCharacters /(?:\\\\.|[^\\]])*/");
|
|
27027
27393
|
function RegularExpressionClassCharacters($$ctx, $$state) {
|
|
27028
27394
|
const $$entered = $$ctx.enter?.("RegularExpressionClassCharacters", $$state);
|
|
27029
27395
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27051,7 +27417,7 @@ function HeregexLiteral($$ctx, $$state) {
|
|
|
27051
27417
|
return void 0;
|
|
27052
27418
|
}
|
|
27053
27419
|
const $$value = $$r.value;
|
|
27054
|
-
const $$m = (function($0, open, body, close, flags) {
|
|
27420
|
+
const $$m = (function($loc, $0, open, body, close, flags) {
|
|
27055
27421
|
let hasSubstitutions = body.some((part) => part.type === "Substitution");
|
|
27056
27422
|
if (hasSubstitutions) {
|
|
27057
27423
|
const children = [
|
|
@@ -27060,7 +27426,7 @@ function HeregexLiteral($$ctx, $$state) {
|
|
|
27060
27426
|
body.map(
|
|
27061
27427
|
(e) => e.type === "Substitution" ? e : {
|
|
27062
27428
|
...e,
|
|
27063
|
-
token: e.token.replace(
|
|
27429
|
+
token: e.token.replace(/[`\\$]/g, "\\$&")
|
|
27064
27430
|
}
|
|
27065
27431
|
),
|
|
27066
27432
|
"`"
|
|
@@ -27077,16 +27443,32 @@ function HeregexLiteral($$ctx, $$state) {
|
|
|
27077
27443
|
children
|
|
27078
27444
|
};
|
|
27079
27445
|
}
|
|
27446
|
+
const source = body.map(($14) => $14.token).join("");
|
|
27447
|
+
if (!source.length) {
|
|
27448
|
+
const pos = open.$loc.pos + open.$loc.length;
|
|
27449
|
+
const empty = {
|
|
27450
|
+
token: "(?:)",
|
|
27451
|
+
$loc: { pos, length: close.$loc.pos - pos }
|
|
27452
|
+
};
|
|
27453
|
+
const children = [open, empty, close];
|
|
27454
|
+
if (flags.length) {
|
|
27455
|
+
children.push(flags);
|
|
27456
|
+
}
|
|
27457
|
+
return {
|
|
27458
|
+
type: "RegularExpressionLiteral",
|
|
27459
|
+
children
|
|
27460
|
+
};
|
|
27461
|
+
}
|
|
27080
27462
|
return {
|
|
27081
27463
|
type: "RegularExpressionLiteral",
|
|
27082
27464
|
children: $0
|
|
27083
27465
|
};
|
|
27084
|
-
})($$value, $$value[0], $$value[1], $$value[2], $$value[3]);
|
|
27466
|
+
})($$r.loc, $$value, $$value[0], $$value[1], $$value[2], $$value[3]);
|
|
27085
27467
|
$$r.value = $$m;
|
|
27086
27468
|
$$ctx.exit?.("HeregexLiteral", $$state, $$r, $$eventData);
|
|
27087
27469
|
return $$r;
|
|
27088
27470
|
}
|
|
27089
|
-
var HeregexBody$parser = (0, import_lib2.$S)((0, import_lib2.$N)(
|
|
27471
|
+
var HeregexBody$parser = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L76, 'HeregexBody "/"')), (0, import_lib2.$Q)(HeregexPart));
|
|
27090
27472
|
function HeregexBody($$ctx, $$state) {
|
|
27091
27473
|
const $$entered = $$ctx.enter?.("HeregexBody", $$state);
|
|
27092
27474
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27096,8 +27478,8 @@ function HeregexBody($$ctx, $$state) {
|
|
|
27096
27478
|
$$ctx.exit?.("HeregexBody", $$state, void 0, $$eventData);
|
|
27097
27479
|
return void 0;
|
|
27098
27480
|
}
|
|
27099
|
-
const $$m = /* @__PURE__ */ (function(
|
|
27100
|
-
return
|
|
27481
|
+
const $$m = /* @__PURE__ */ (function(body) {
|
|
27482
|
+
return body;
|
|
27101
27483
|
})($$r.value[1]);
|
|
27102
27484
|
$$r.value = $$m;
|
|
27103
27485
|
$$ctx.exit?.("HeregexBody", $$state, $$r, $$eventData);
|
|
@@ -27105,11 +27487,11 @@ function HeregexBody($$ctx, $$state) {
|
|
|
27105
27487
|
}
|
|
27106
27488
|
var HeregexPart$1$parser = (0, import_lib2.$S)(CoffeeInterpolationEnabled, CoffeeStringSubstitution);
|
|
27107
27489
|
var HeregexPart$2$parser = (0, import_lib2.$S)(TemplateSubstitution);
|
|
27108
|
-
var HeregexPart$3$parser = (0, import_lib2.$EXPECT)($
|
|
27490
|
+
var HeregexPart$3$parser = (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R55, "HeregexPart /\\\\./"));
|
|
27109
27491
|
var HeregexPart$4$parser = (0, import_lib2.$S)(HeregexComment);
|
|
27110
|
-
var HeregexPart$5$parser = (0, import_lib2.$EXPECT)($
|
|
27111
|
-
var HeregexPart$6$parser = (0, import_lib2.$EXPECT)($
|
|
27112
|
-
var HeregexPart$7$parser = (0, import_lib2.$EXPECT)($
|
|
27492
|
+
var HeregexPart$5$parser = (0, import_lib2.$EXPECT)($R56, "HeregexPart /[\\s]+/");
|
|
27493
|
+
var HeregexPart$6$parser = (0, import_lib2.$EXPECT)($R57, "HeregexPart /\\/(?!\\/\\/)/");
|
|
27494
|
+
var HeregexPart$7$parser = (0, import_lib2.$EXPECT)($R58, "HeregexPart /[^[\\/\\s#$\\\\]+|[#$]/");
|
|
27113
27495
|
function HeregexPart$0($$ctx, $$state) {
|
|
27114
27496
|
return RegularExpressionClass($$ctx, $$state);
|
|
27115
27497
|
}
|
|
@@ -27140,21 +27522,9 @@ function HeregexPart$3($$ctx, $$state) {
|
|
|
27140
27522
|
if (!$$r) {
|
|
27141
27523
|
return void 0;
|
|
27142
27524
|
}
|
|
27143
|
-
const $$m = (function($loc,
|
|
27144
|
-
|
|
27145
|
-
|
|
27146
|
-
case "\n":
|
|
27147
|
-
token = "\\n";
|
|
27148
|
-
break;
|
|
27149
|
-
case "\r":
|
|
27150
|
-
token = "\\r";
|
|
27151
|
-
break;
|
|
27152
|
-
case " ":
|
|
27153
|
-
token = " ";
|
|
27154
|
-
break;
|
|
27155
|
-
}
|
|
27156
|
-
return { $loc, token };
|
|
27157
|
-
})($$r.loc, $$r.value[0]);
|
|
27525
|
+
const $$m = (function($loc, escape) {
|
|
27526
|
+
return { $loc, token: heregexEscapes[escape[1]] ?? escape };
|
|
27527
|
+
})($$r.loc, $$r.value);
|
|
27158
27528
|
$$r.value = $$m;
|
|
27159
27529
|
return $$r;
|
|
27160
27530
|
}
|
|
@@ -27234,7 +27604,7 @@ function HeregexComment($$ctx, $$state) {
|
|
|
27234
27604
|
$$ctx.exit?.("HeregexComment", $$state, $$final, $$eventData);
|
|
27235
27605
|
return $$final;
|
|
27236
27606
|
}
|
|
27237
|
-
var RegularExpressionBody$parser = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
27607
|
+
var RegularExpressionBody$parser = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R59, "RegularExpressionBody /[*\\/\\r\\n]/"))), (0, import_lib2.$Q)(RegExpPart));
|
|
27238
27608
|
function RegularExpressionBody($$ctx, $$state) {
|
|
27239
27609
|
const $$entered = $$ctx.enter?.("RegularExpressionBody", $$state);
|
|
27240
27610
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27257,7 +27627,7 @@ function RegExpPart($$ctx, $$state) {
|
|
|
27257
27627
|
$$ctx.exit?.("RegExpPart", $$state, $$final, $$eventData);
|
|
27258
27628
|
return $$final;
|
|
27259
27629
|
}
|
|
27260
|
-
var RegExpCharacter$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
27630
|
+
var RegExpCharacter$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R60, "RegExpCharacter /(?:\\\\.|[^[\\/\\r\\n])+/"));
|
|
27261
27631
|
function RegExpCharacter($$ctx, $$state) {
|
|
27262
27632
|
const $$entered = $$ctx.enter?.("RegExpCharacter", $$state);
|
|
27263
27633
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27266,7 +27636,7 @@ function RegExpCharacter($$ctx, $$state) {
|
|
|
27266
27636
|
$$ctx.exit?.("RegExpCharacter", $$state, $$final, $$eventData);
|
|
27267
27637
|
return $$final;
|
|
27268
27638
|
}
|
|
27269
|
-
var RegularExpressionFlags$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
27639
|
+
var RegularExpressionFlags$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R61, "RegularExpressionFlags /(?:\\p{ID_Continue}|[\\u200C\\u200D$])*/"));
|
|
27270
27640
|
function RegularExpressionFlags($$ctx, $$state) {
|
|
27271
27641
|
const $$entered = $$ctx.enter?.("RegularExpressionFlags", $$state);
|
|
27272
27642
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27275,7 +27645,7 @@ function RegularExpressionFlags($$ctx, $$state) {
|
|
|
27275
27645
|
$$ctx.exit?.("RegularExpressionFlags", $$state, $$final, $$eventData);
|
|
27276
27646
|
return $$final;
|
|
27277
27647
|
}
|
|
27278
|
-
var TemplateLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
27648
|
+
var TemplateLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R62, "TemplateLiteral /(?=[`'\"])/"), _TemplateLiteral);
|
|
27279
27649
|
function TemplateLiteral($$ctx, $$state) {
|
|
27280
27650
|
const $$entered = $$ctx.enter?.("TemplateLiteral", $$state);
|
|
27281
27651
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27379,7 +27749,7 @@ function TemplateSubstitution($$ctx, $$state) {
|
|
|
27379
27749
|
$$ctx.exit?.("TemplateSubstitution", $$state, $$final, $$eventData);
|
|
27380
27750
|
return $$final;
|
|
27381
27751
|
}
|
|
27382
|
-
var TemplateCharacters$parser = (0, import_lib2.$EXPECT)($
|
|
27752
|
+
var TemplateCharacters$parser = (0, import_lib2.$EXPECT)($R63, "TemplateCharacters /(?:\\$(?!\\{)|\\\\.|[^$`])+/");
|
|
27383
27753
|
function TemplateCharacters($$ctx, $$state) {
|
|
27384
27754
|
const $$entered = $$ctx.enter?.("TemplateCharacters", $$state);
|
|
27385
27755
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27396,7 +27766,7 @@ function TemplateCharacters($$ctx, $$state) {
|
|
|
27396
27766
|
$$ctx.exit?.("TemplateCharacters", $$state, $$r, $$eventData);
|
|
27397
27767
|
return $$r;
|
|
27398
27768
|
}
|
|
27399
|
-
var TemplateBlockCharacters$parser = (0, import_lib2.$EXPECT)($
|
|
27769
|
+
var TemplateBlockCharacters$parser = (0, import_lib2.$EXPECT)($R64, "TemplateBlockCharacters /(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+/");
|
|
27400
27770
|
function TemplateBlockCharacters($$ctx, $$state) {
|
|
27401
27771
|
const $$entered = $$ctx.enter?.("TemplateBlockCharacters", $$state);
|
|
27402
27772
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27413,11 +27783,11 @@ function TemplateBlockCharacters($$ctx, $$state) {
|
|
|
27413
27783
|
$$ctx.exit?.("TemplateBlockCharacters", $$state, $$r, $$eventData);
|
|
27414
27784
|
return $$r;
|
|
27415
27785
|
}
|
|
27416
|
-
var ReservedWord$0$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($
|
|
27417
|
-
var ReservedWord$1$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($
|
|
27418
|
-
var ReservedWord$2$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($
|
|
27419
|
-
var ReservedWord$3$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($
|
|
27420
|
-
var ReservedWord$4$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($
|
|
27786
|
+
var ReservedWord$0$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R65, "ReservedWord /(?:off|yes|on|no)/")), NonIdContinue, CoffeeBooleansEnabled);
|
|
27787
|
+
var ReservedWord$1$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R66, "ReservedWord /isnt/")), NonIdContinue, CoffeeIsntEnabled);
|
|
27788
|
+
var ReservedWord$2$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R67, "ReservedWord /by/")), NonIdContinue, CoffeeForLoopsEnabled);
|
|
27789
|
+
var ReservedWord$3$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R68, "ReservedWord /of/")), NonIdContinue, CoffeeOfEnabled);
|
|
27790
|
+
var ReservedWord$4$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R69, "ReservedWord /(?:instanceof|interface|protected|continue|debugger|function|default|extends|finally|private|delete|export|import|public|return|static|switch|typeof|unless|await|break|catch|class|const|false|super|throw|until|while|yield|case|else|enum|loop|null|this|true|void|with|and|for|let|new|not|try|var|do|if|in|is|or)/")), NonIdContinue);
|
|
27421
27791
|
function ReservedWord$0($$ctx, $$state) {
|
|
27422
27792
|
const $$r = ReservedWord$0$parser($$ctx, $$state);
|
|
27423
27793
|
if (!$$r) {
|
|
@@ -27481,7 +27851,7 @@ function ReservedWord($$ctx, $$state) {
|
|
|
27481
27851
|
$$ctx.exit?.("ReservedWord", $$state, $$final, $$eventData);
|
|
27482
27852
|
return $$final;
|
|
27483
27853
|
}
|
|
27484
|
-
var Comment$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
27854
|
+
var Comment$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R70, "Comment /(?=\\/|#)/"), _Comment);
|
|
27485
27855
|
function Comment($$ctx, $$state) {
|
|
27486
27856
|
const $$entered = $$ctx.enter?.("Comment", $$state);
|
|
27487
27857
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27527,7 +27897,7 @@ function SingleLineComment($$ctx, $$state) {
|
|
|
27527
27897
|
$$ctx.exit?.("SingleLineComment", $$state, $$final, $$eventData);
|
|
27528
27898
|
return $$final;
|
|
27529
27899
|
}
|
|
27530
|
-
var JSSingleLineComment$parser = (0, import_lib2.$EXPECT)($
|
|
27900
|
+
var JSSingleLineComment$parser = (0, import_lib2.$EXPECT)($R71, "JSSingleLineComment /\\/\\/(?!\\/(?!\\/))[^\\r\\n]*/");
|
|
27531
27901
|
function JSSingleLineComment($$ctx, $$state) {
|
|
27532
27902
|
const $$entered = $$ctx.enter?.("JSSingleLineComment", $$state);
|
|
27533
27903
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27558,7 +27928,7 @@ function MultiLineComment($$ctx, $$state) {
|
|
|
27558
27928
|
$$ctx.exit?.("MultiLineComment", $$state, $$final, $$eventData);
|
|
27559
27929
|
return $$final;
|
|
27560
27930
|
}
|
|
27561
|
-
var JSMultiLineComment$parser = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L139, 'JSMultiLineComment "/*"'), (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L140, 'JSMultiLineComment "*/"')), (0, import_lib2.$EXPECT)($
|
|
27931
|
+
var JSMultiLineComment$parser = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L139, 'JSMultiLineComment "/*"'), (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L140, 'JSMultiLineComment "*/"')), (0, import_lib2.$EXPECT)($R72, "JSMultiLineComment /./"))), (0, import_lib2.$EXPECT)($L140, 'JSMultiLineComment "*/"')));
|
|
27562
27932
|
function JSMultiLineComment($$ctx, $$state) {
|
|
27563
27933
|
const $$entered = $$ctx.enter?.("JSMultiLineComment", $$state);
|
|
27564
27934
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27575,7 +27945,7 @@ function JSMultiLineComment($$ctx, $$state) {
|
|
|
27575
27945
|
$$ctx.exit?.("JSMultiLineComment", $$state, $$r, $$eventData);
|
|
27576
27946
|
return $$r;
|
|
27577
27947
|
}
|
|
27578
|
-
var CoffeeSingleLineComment$parser = (0, import_lib2.$EXPECT)($
|
|
27948
|
+
var CoffeeSingleLineComment$parser = (0, import_lib2.$EXPECT)($R73, "CoffeeSingleLineComment /#(?!##(?!#))([^\\r\\n]*)/");
|
|
27579
27949
|
function CoffeeSingleLineComment($$ctx, $$state) {
|
|
27580
27950
|
const $$entered = $$ctx.enter?.("CoffeeSingleLineComment", $$state);
|
|
27581
27951
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27592,7 +27962,7 @@ function CoffeeSingleLineComment($$ctx, $$state) {
|
|
|
27592
27962
|
$$ctx.exit?.("CoffeeSingleLineComment", $$state, $$r, $$eventData);
|
|
27593
27963
|
return $$r;
|
|
27594
27964
|
}
|
|
27595
|
-
var CoffeeMultiLineComment$parser = (0, import_lib2.$S)(CoffeeHereCommentStart, (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($
|
|
27965
|
+
var CoffeeMultiLineComment$parser = (0, import_lib2.$S)(CoffeeHereCommentStart, (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R74, "CoffeeMultiLineComment /[^]*?###/")));
|
|
27596
27966
|
function CoffeeMultiLineComment($$ctx, $$state) {
|
|
27597
27967
|
const $$entered = $$ctx.enter?.("CoffeeMultiLineComment", $$state);
|
|
27598
27968
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27610,7 +27980,7 @@ function CoffeeMultiLineComment($$ctx, $$state) {
|
|
|
27610
27980
|
$$ctx.exit?.("CoffeeMultiLineComment", $$state, $$r, $$eventData);
|
|
27611
27981
|
return $$r;
|
|
27612
27982
|
}
|
|
27613
|
-
var CoffeeHereCommentStart$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
27983
|
+
var CoffeeHereCommentStart$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R75, "CoffeeHereCommentStart /###(?!#)/"));
|
|
27614
27984
|
function CoffeeHereCommentStart($$ctx, $$state) {
|
|
27615
27985
|
const $$entered = $$ctx.enter?.("CoffeeHereCommentStart", $$state);
|
|
27616
27986
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27619,7 +27989,7 @@ function CoffeeHereCommentStart($$ctx, $$state) {
|
|
|
27619
27989
|
$$ctx.exit?.("CoffeeHereCommentStart", $$state, $$final, $$eventData);
|
|
27620
27990
|
return $$final;
|
|
27621
27991
|
}
|
|
27622
|
-
var InlineComment$0$parser = (0, import_lib2.$EXPECT)($
|
|
27992
|
+
var InlineComment$0$parser = (0, import_lib2.$EXPECT)($R76, "InlineComment /\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\//");
|
|
27623
27993
|
function InlineComment$0($$ctx, $$state) {
|
|
27624
27994
|
const $$r = InlineComment$0$parser($$ctx, $$state);
|
|
27625
27995
|
if (!$$r) {
|
|
@@ -27660,7 +28030,7 @@ function TrailingComment($$ctx, $$state) {
|
|
|
27660
28030
|
$$ctx.exit?.("TrailingComment", $$state, $$final, $$eventData);
|
|
27661
28031
|
return $$final;
|
|
27662
28032
|
}
|
|
27663
|
-
var _$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
28033
|
+
var _$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R77, "_ /(?=[ \\t\\/\\\\#])/"), (0, import_lib2.$P)((0, import_lib2.$C)(NonNewlineWhitespace, InlineComment)));
|
|
27664
28034
|
function _($$ctx, $$state) {
|
|
27665
28035
|
const $$entered = $$ctx.enter?.("_", $$state);
|
|
27666
28036
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27677,7 +28047,7 @@ function _($$ctx, $$state) {
|
|
|
27677
28047
|
$$ctx.exit?.("_", $$state, $$r, $$eventData);
|
|
27678
28048
|
return $$r;
|
|
27679
28049
|
}
|
|
27680
|
-
var NonNewlineWhitespace$0$parser = (0, import_lib2.$EXPECT)($
|
|
28050
|
+
var NonNewlineWhitespace$0$parser = (0, import_lib2.$EXPECT)($R22, "NonNewlineWhitespace /[ \\t]+/");
|
|
27681
28051
|
var NonNewlineWhitespace$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L141, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL);
|
|
27682
28052
|
function NonNewlineWhitespace$0($$ctx, $$state) {
|
|
27683
28053
|
const $$r = NonNewlineWhitespace$0$parser($$ctx, $$state);
|
|
@@ -27726,7 +28096,7 @@ function Trimmed_($$ctx, $$state) {
|
|
|
27726
28096
|
$$ctx.exit?.("Trimmed_", $$state, $$r, $$eventData);
|
|
27727
28097
|
return $$r;
|
|
27728
28098
|
}
|
|
27729
|
-
var __$0$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
28099
|
+
var __$0$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R78, "__ /(?=\\s|\\/|#)/"), (0, import_lib2.$Q)((0, import_lib2.$C)(Whitespace, Comment)));
|
|
27730
28100
|
var __$1$parser = (0, import_lib2.$EXPECT)($L0, '__ ""');
|
|
27731
28101
|
function __$0($$ctx, $$state) {
|
|
27732
28102
|
const $$r = __$0$parser($$ctx, $$state);
|
|
@@ -27750,7 +28120,7 @@ function __($$ctx, $$state) {
|
|
|
27750
28120
|
$$ctx.exit?.("__", $$state, $$final, $$eventData);
|
|
27751
28121
|
return $$final;
|
|
27752
28122
|
}
|
|
27753
|
-
var Whitespace$parser = (0, import_lib2.$EXPECT)($
|
|
28123
|
+
var Whitespace$parser = (0, import_lib2.$EXPECT)($R56, "Whitespace /[\\s]+/");
|
|
27754
28124
|
function Whitespace($$ctx, $$state) {
|
|
27755
28125
|
const $$entered = $$ctx.enter?.("Whitespace", $$state);
|
|
27756
28126
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -27886,7 +28256,7 @@ function SemicolonDelimiter($$ctx, $$state) {
|
|
|
27886
28256
|
$$ctx.exit?.("SemicolonDelimiter", $$state, $$r, $$eventData);
|
|
27887
28257
|
return $$r;
|
|
27888
28258
|
}
|
|
27889
|
-
var NonIdContinue$parser = (0, import_lib2.$EXPECT)($
|
|
28259
|
+
var NonIdContinue$parser = (0, import_lib2.$EXPECT)($RD2, () => `NonIdContinue /${$RD2.source}/`);
|
|
27890
28260
|
function NonIdContinue($$ctx, $$state) {
|
|
27891
28261
|
const $$entered = $$ctx.enter?.("NonIdContinue", $$state);
|
|
27892
28262
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -28226,7 +28596,7 @@ function CoffeeSubstitutionStart($$ctx, $$state) {
|
|
|
28226
28596
|
$$ctx.exit?.("CoffeeSubstitutionStart", $$state, $$r, $$eventData);
|
|
28227
28597
|
return $$r;
|
|
28228
28598
|
}
|
|
28229
|
-
var Colon$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'Colon ":"'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($
|
|
28599
|
+
var Colon$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'Colon ":"'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R79, "Colon /[=:]/")));
|
|
28230
28600
|
function Colon($$ctx, $$state) {
|
|
28231
28601
|
const $$entered = $$ctx.enter?.("Colon", $$state);
|
|
28232
28602
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -28363,7 +28733,7 @@ function Do($$ctx, $$state) {
|
|
|
28363
28733
|
return $$r;
|
|
28364
28734
|
}
|
|
28365
28735
|
var Dot$0$parser = (0, import_lib2.$EXPECT)($L7, 'Dot "."');
|
|
28366
|
-
var Dot$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
28736
|
+
var Dot$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R80, "Dot /['\u2019]s/"), Trimmed_);
|
|
28367
28737
|
function Dot$0($$ctx, $$state) {
|
|
28368
28738
|
const $$r = Dot$0$parser($$ctx, $$state);
|
|
28369
28739
|
if (!$$r) {
|
|
@@ -29747,7 +30117,7 @@ function JSXImplicitFragment($$ctx, $$state) {
|
|
|
29747
30117
|
$$ctx.exit?.("JSXImplicitFragment", $$state, $$r, $$eventData);
|
|
29748
30118
|
return $$r;
|
|
29749
30119
|
}
|
|
29750
|
-
var JSXTag$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
30120
|
+
var JSXTag$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R81, "JSXTag /(?=[<])/"), _JSXTag);
|
|
29751
30121
|
function JSXTag($$ctx, $$state) {
|
|
29752
30122
|
const $$entered = $$ctx.enter?.("JSXTag", $$state);
|
|
29753
30123
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -30071,7 +30441,7 @@ function JSXElementName($$ctx, $$state) {
|
|
|
30071
30441
|
$$ctx.exit?.("JSXElementName", $$state, $$final, $$eventData);
|
|
30072
30442
|
return $$final;
|
|
30073
30443
|
}
|
|
30074
|
-
var JSXIdentifierName$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
30444
|
+
var JSXIdentifierName$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R82, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
|
|
30075
30445
|
function JSXIdentifierName($$ctx, $$state) {
|
|
30076
30446
|
const $$entered = $$ctx.enter?.("JSXIdentifierName", $$state);
|
|
30077
30447
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -30187,7 +30557,7 @@ var JSXAttribute$3$parser = (0, import_lib2.$S)(AtThis, (0, import_lib2.$E)(Iden
|
|
|
30187
30557
|
var JSXAttribute$4$parser = (0, import_lib2.$S)(Identifier, (0, import_lib2.$P)(InlineJSXCallExpressionRest), (0, import_lib2.$Y)(JSXAttributeSpace));
|
|
30188
30558
|
var JSXAttribute$5$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L177, 'JSXAttribute "#"'), JSXShorthandString);
|
|
30189
30559
|
var JSXAttribute$6$parser = (0, import_lib2.$S)(Dot, JSXShorthandString);
|
|
30190
|
-
var JSXAttribute$7$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($
|
|
30560
|
+
var JSXAttribute$7$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R83, "JSXAttribute /[!+-]/")), JSXAttributeName, (0, import_lib2.$Y)(JSXAttributeSpace));
|
|
30191
30561
|
function JSXAttribute$0($$ctx, $$state) {
|
|
30192
30562
|
const $$r = JSXAttribute$0$parser($$ctx, $$state);
|
|
30193
30563
|
if (!$$r) {
|
|
@@ -30353,7 +30723,7 @@ function JSXAttribute($$ctx, $$state) {
|
|
|
30353
30723
|
$$ctx.exit?.("JSXAttribute", $$state, $$final, $$eventData);
|
|
30354
30724
|
return $$final;
|
|
30355
30725
|
}
|
|
30356
|
-
var JSXAttributeSpace$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
30726
|
+
var JSXAttributeSpace$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R84, "JSXAttributeSpace /[\\s>]|\\/>/"));
|
|
30357
30727
|
function JSXAttributeSpace($$ctx, $$state) {
|
|
30358
30728
|
const $$entered = $$ctx.enter?.("JSXAttributeSpace", $$state);
|
|
30359
30729
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -30362,7 +30732,7 @@ function JSXAttributeSpace($$ctx, $$state) {
|
|
|
30362
30732
|
$$ctx.exit?.("JSXAttributeSpace", $$state, $$final, $$eventData);
|
|
30363
30733
|
return $$final;
|
|
30364
30734
|
}
|
|
30365
|
-
var JSXShorthandString$0$parser = (0, import_lib2.$EXPECT)($
|
|
30735
|
+
var JSXShorthandString$0$parser = (0, import_lib2.$EXPECT)($R85, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/");
|
|
30366
30736
|
var JSXShorthandString$1$parser = (0, import_lib2.$S)(TemplateLiteral);
|
|
30367
30737
|
var JSXShorthandString$3$parser = (0, import_lib2.$S)(OpenBrace, PostfixedExpressionOrCommaLoop, __, CloseBrace);
|
|
30368
30738
|
function JSXShorthandString$0($$ctx, $$state) {
|
|
@@ -30463,7 +30833,7 @@ function JSXAttributeInitializer($$ctx, $$state) {
|
|
|
30463
30833
|
}
|
|
30464
30834
|
var JSXAttributeValue$0$parser = (0, import_lib2.$S)(OpenBrace, PostfixedExpressionOrCommaLoop, __, CloseBrace);
|
|
30465
30835
|
var JSXAttributeValue$3$parser = (0, import_lib2.$S)(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace, (0, import_lib2.$Y)(JSXAttributeSpace));
|
|
30466
|
-
var JSXAttributeValue$4$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
30836
|
+
var JSXAttributeValue$4$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R86, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
|
|
30467
30837
|
function JSXAttributeValue$0($$ctx, $$state) {
|
|
30468
30838
|
return JSXAttributeValue$0$parser($$ctx, $$state);
|
|
30469
30839
|
}
|
|
@@ -30520,7 +30890,7 @@ function InlineJSXAttributeValue($$ctx, $$state) {
|
|
|
30520
30890
|
$$ctx.exit?.("InlineJSXAttributeValue", $$state, $$r, $$eventData);
|
|
30521
30891
|
return $$r;
|
|
30522
30892
|
}
|
|
30523
|
-
var InlineJSXBinaryOpRHS$parser = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($
|
|
30893
|
+
var InlineJSXBinaryOpRHS$parser = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($R87, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression);
|
|
30524
30894
|
function InlineJSXBinaryOpRHS($$ctx, $$state) {
|
|
30525
30895
|
const $$entered = $$ctx.enter?.("InlineJSXBinaryOpRHS", $$state);
|
|
30526
30896
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -30556,7 +30926,7 @@ function InlineJSXUnaryExpression($$ctx, $$state) {
|
|
|
30556
30926
|
$$ctx.exit?.("InlineJSXUnaryExpression", $$state, $$r, $$eventData);
|
|
30557
30927
|
return $$r;
|
|
30558
30928
|
}
|
|
30559
|
-
var InlineJSXUnaryOp$parser = (0, import_lib2.$EXPECT)($
|
|
30929
|
+
var InlineJSXUnaryOp$parser = (0, import_lib2.$EXPECT)($R88, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/");
|
|
30560
30930
|
function InlineJSXUnaryOp($$ctx, $$state) {
|
|
30561
30931
|
const $$entered = $$ctx.enter?.("InlineJSXUnaryOp", $$state);
|
|
30562
30932
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -31117,7 +31487,7 @@ function JSXComment($$ctx, $$state) {
|
|
|
31117
31487
|
$$ctx.exit?.("JSXComment", $$state, $$r, $$eventData);
|
|
31118
31488
|
return $$r;
|
|
31119
31489
|
}
|
|
31120
|
-
var JSXCommentContent$parser = (0, import_lib2.$EXPECT)($
|
|
31490
|
+
var JSXCommentContent$parser = (0, import_lib2.$EXPECT)($R89, "JSXCommentContent /(?:-[^-]|[^-]*)*/");
|
|
31121
31491
|
function JSXCommentContent($$ctx, $$state) {
|
|
31122
31492
|
const $$entered = $$ctx.enter?.("JSXCommentContent", $$state);
|
|
31123
31493
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -31134,7 +31504,7 @@ function JSXCommentContent($$ctx, $$state) {
|
|
|
31134
31504
|
$$ctx.exit?.("JSXCommentContent", $$state, $$r, $$eventData);
|
|
31135
31505
|
return $$r;
|
|
31136
31506
|
}
|
|
31137
|
-
var JSXText$parser = (0, import_lib2.$EXPECT)($
|
|
31507
|
+
var JSXText$parser = (0, import_lib2.$EXPECT)($R90, "JSXText /[^{}<>\\r\\n]+/");
|
|
31138
31508
|
function JSXText($$ctx, $$state) {
|
|
31139
31509
|
const $$entered = $$ctx.enter?.("JSXText", $$state);
|
|
31140
31510
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -32242,7 +32612,7 @@ function TypeProperty($$ctx, $$state) {
|
|
|
32242
32612
|
$$ctx.exit?.("TypeProperty", $$state, $$r, $$eventData);
|
|
32243
32613
|
return $$r;
|
|
32244
32614
|
}
|
|
32245
|
-
var TypeIndexSignature$parser = (0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
32615
|
+
var TypeIndexSignature$parser = (0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R91, "TypeIndexSignature /[+-]?/"), Readonly, NotDedented)), OpenBracket, TypeIndex, CloseBracket, (0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($R15, "TypeIndexSignature /[+-]/"), (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), QuestionMark)))));
|
|
32246
32616
|
function TypeIndexSignature($$ctx, $$state) {
|
|
32247
32617
|
const $$entered = $$ctx.enter?.("TypeIndexSignature", $$state);
|
|
32248
32618
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -33307,7 +33677,7 @@ function TypeWithPostfix($$ctx, $$state) {
|
|
|
33307
33677
|
$$ctx.exit?.("TypeWithPostfix", $$state, $$r, $$eventData);
|
|
33308
33678
|
return $$r;
|
|
33309
33679
|
}
|
|
33310
|
-
var TypeConditional$0$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($
|
|
33680
|
+
var TypeConditional$0$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($R92, "TypeConditional /(?=if|unless)/"), TypeIfThenElse);
|
|
33311
33681
|
var TypeConditional$1$parser = (0, import_lib2.$S)(TypeCondition, NotDedented, QuestionMark, __, Type, __, Colon, __, Type);
|
|
33312
33682
|
var TypeConditional$2$parser = TypeBinary;
|
|
33313
33683
|
function TypeConditional$0($$ctx, $$state) {
|
|
@@ -33732,7 +34102,7 @@ function TypeFunction($$ctx, $$state) {
|
|
|
33732
34102
|
message: "abstract function types must be constructors (abstract new)"
|
|
33733
34103
|
};
|
|
33734
34104
|
}
|
|
33735
|
-
if (returnType.$loc && returnType.token === "") {
|
|
34105
|
+
if ("token" in returnType && returnType.$loc && returnType.token === "") {
|
|
33736
34106
|
const t = {
|
|
33737
34107
|
type: "VoidType",
|
|
33738
34108
|
$loc: returnType.$loc,
|
|
@@ -33849,8 +34219,8 @@ function TypeApplicationStart($$ctx, $$state) {
|
|
|
33849
34219
|
$$ctx.exit?.("TypeApplicationStart", $$state, $$final, $$eventData);
|
|
33850
34220
|
return $$final;
|
|
33851
34221
|
}
|
|
33852
|
-
var ForbiddenImplicitTypeCalls$1$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
33853
|
-
var ForbiddenImplicitTypeCalls$2$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
34222
|
+
var ForbiddenImplicitTypeCalls$1$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R93, "ForbiddenImplicitTypeCalls /[|&<!=\\-\u21D2\u2192]/"));
|
|
34223
|
+
var ForbiddenImplicitTypeCalls$2$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R94, "ForbiddenImplicitTypeCalls /(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
|
|
33854
34224
|
function ForbiddenImplicitTypeCalls$0($$ctx, $$state) {
|
|
33855
34225
|
return ReservedBinary($$ctx, $$state);
|
|
33856
34226
|
}
|
|
@@ -34069,7 +34439,7 @@ function TypeParameters($$ctx, $$state) {
|
|
|
34069
34439
|
$$ctx.exit?.("TypeParameters", $$state, $$r, $$eventData);
|
|
34070
34440
|
return $$r;
|
|
34071
34441
|
}
|
|
34072
|
-
var TypeParameter$parser = (0, import_lib2.$S)(__, (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
34442
|
+
var TypeParameter$parser = (0, import_lib2.$S)(__, (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R95, "TypeParameter /const|in|out/")), _)), Identifier, (0, import_lib2.$E)(TypeConstraint), (0, import_lib2.$E)(TypeInitializer), TypeParameterDelimiter);
|
|
34073
34443
|
function TypeParameter($$ctx, $$state) {
|
|
34074
34444
|
const $$entered = $$ctx.enter?.("TypeParameter", $$state);
|
|
34075
34445
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -34153,7 +34523,7 @@ function ThisType($$ctx, $$state) {
|
|
|
34153
34523
|
$$ctx.exit?.("ThisType", $$state, $$r, $$eventData);
|
|
34154
34524
|
return $$r;
|
|
34155
34525
|
}
|
|
34156
|
-
var Shebang$parser = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
34526
|
+
var Shebang$parser = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R96, "Shebang /#![^\\r\\n]*/")), EOL);
|
|
34157
34527
|
function Shebang($$ctx, $$state) {
|
|
34158
34528
|
const $$entered = $$ctx.enter?.("Shebang", $$state);
|
|
34159
34529
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -34162,8 +34532,8 @@ function Shebang($$ctx, $$state) {
|
|
|
34162
34532
|
$$ctx.exit?.("Shebang", $$state, $$final, $$eventData);
|
|
34163
34533
|
return $$final;
|
|
34164
34534
|
}
|
|
34165
|
-
var CivetPrologue$0$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
34166
|
-
var CivetPrologue$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
34535
|
+
var CivetPrologue$0$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R97, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, (0, import_lib2.$EXPECT)($R21, "CivetPrologue /[ \\t]*/"), (0, import_lib2.$C)(EOL, (0, import_lib2.$Y)(RestOfLine)));
|
|
34536
|
+
var CivetPrologue$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R97, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, (0, import_lib2.$EXPECT)($R21, "CivetPrologue /[ \\t]*/"), (0, import_lib2.$C)(EOL, (0, import_lib2.$Y)(RestOfLine)));
|
|
34167
34537
|
function CivetPrologue$0($$ctx, $$state) {
|
|
34168
34538
|
const $$r = CivetPrologue$0$parser($$ctx, $$state);
|
|
34169
34539
|
if (!$$r) {
|
|
@@ -34194,7 +34564,7 @@ function CivetPrologue($$ctx, $$state) {
|
|
|
34194
34564
|
$$ctx.exit?.("CivetPrologue", $$state, $$final, $$eventData);
|
|
34195
34565
|
return $$final;
|
|
34196
34566
|
}
|
|
34197
|
-
var CivetPrologueContent$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L248, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib2.$Q)(CivetOption), (0, import_lib2.$EXPECT)($
|
|
34567
|
+
var CivetPrologueContent$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L248, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib2.$Q)(CivetOption), (0, import_lib2.$EXPECT)($R98, "CivetPrologueContent /[\\s]*/"));
|
|
34198
34568
|
function CivetPrologueContent($$ctx, $$state) {
|
|
34199
34569
|
const $$entered = $$ctx.enter?.("CivetPrologueContent", $$state);
|
|
34200
34570
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -34215,7 +34585,7 @@ function CivetPrologueContent($$ctx, $$state) {
|
|
|
34215
34585
|
$$ctx.exit?.("CivetPrologueContent", $$state, $$r, $$eventData);
|
|
34216
34586
|
return $$r;
|
|
34217
34587
|
}
|
|
34218
|
-
var CivetOption$parser = (0, import_lib2.$EXPECT)($
|
|
34588
|
+
var CivetOption$parser = (0, import_lib2.$EXPECT)($R99, "CivetOption /\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?/");
|
|
34219
34589
|
function CivetOption($$ctx, $$state) {
|
|
34220
34590
|
const $$entered = $$ctx.enter?.("CivetOption", $$state);
|
|
34221
34591
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -34253,7 +34623,7 @@ function CivetOption($$ctx, $$state) {
|
|
|
34253
34623
|
$$ctx.exit?.("CivetOption", $$state, $$r, $$eventData);
|
|
34254
34624
|
return $$r;
|
|
34255
34625
|
}
|
|
34256
|
-
var UnknownPrologue$parser = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
34626
|
+
var UnknownPrologue$parser = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R97, "UnknownPrologue /[\\t ]*/")), StringLiteral, (0, import_lib2.$TEXT)(SimpleStatementDelimiter), EOS);
|
|
34257
34627
|
function UnknownPrologue($$ctx, $$state) {
|
|
34258
34628
|
const $$entered = $$ctx.enter?.("UnknownPrologue", $$state);
|
|
34259
34629
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -34262,7 +34632,7 @@ function UnknownPrologue($$ctx, $$state) {
|
|
|
34262
34632
|
$$ctx.exit?.("UnknownPrologue", $$state, $$final, $$eventData);
|
|
34263
34633
|
return $$final;
|
|
34264
34634
|
}
|
|
34265
|
-
var TripleSlashDirective$parser = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
34635
|
+
var TripleSlashDirective$parser = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R100, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), (0, import_lib2.$E)(EOS));
|
|
34266
34636
|
function TripleSlashDirective($$ctx, $$state) {
|
|
34267
34637
|
const $$entered = $$ctx.enter?.("TripleSlashDirective", $$state);
|
|
34268
34638
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -34302,7 +34672,7 @@ function PrologueString($$ctx, $$state) {
|
|
|
34302
34672
|
$$ctx.exit?.("PrologueString", $$state, $$final, $$eventData);
|
|
34303
34673
|
return $$final;
|
|
34304
34674
|
}
|
|
34305
|
-
var EOS$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
34675
|
+
var EOS$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R101, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), (0, import_lib2.$P)(RestOfLine));
|
|
34306
34676
|
function EOS($$ctx, $$state) {
|
|
34307
34677
|
const $$entered = $$ctx.enter?.("EOS", $$state);
|
|
34308
34678
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -34319,7 +34689,7 @@ function EOS($$ctx, $$state) {
|
|
|
34319
34689
|
$$ctx.exit?.("EOS", $$state, $$r, $$eventData);
|
|
34320
34690
|
return $$r;
|
|
34321
34691
|
}
|
|
34322
|
-
var EOL$parser = (0, import_lib2.$EXPECT)($
|
|
34692
|
+
var EOL$parser = (0, import_lib2.$EXPECT)($R102, "EOL /\\r\\n|\\n|\\r|$/");
|
|
34323
34693
|
function EOL($$ctx, $$state) {
|
|
34324
34694
|
const $$entered = $$ctx.enter?.("EOL", $$state);
|
|
34325
34695
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -35014,6 +35384,24 @@ function ESArrowFunctionEnabled($$ctx, $$state) {
|
|
|
35014
35384
|
$$ctx.exit?.("ESArrowFunctionEnabled", $$state, $$final, $$eventData);
|
|
35015
35385
|
return $$final;
|
|
35016
35386
|
}
|
|
35387
|
+
var ESBraceBlockEnabled$parser = (0, import_lib2.$EXPECT)($L0, 'ESBraceBlockEnabled ""');
|
|
35388
|
+
function ESBraceBlockEnabled($$ctx, $$state) {
|
|
35389
|
+
const $$entered = $$ctx.enter?.("ESBraceBlockEnabled", $$state);
|
|
35390
|
+
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
35391
|
+
const $$eventData = $$entered?.data;
|
|
35392
|
+
const $$r = ESBraceBlockEnabled$parser($$ctx, $$state);
|
|
35393
|
+
if (!$$r) {
|
|
35394
|
+
$$ctx.exit?.("ESBraceBlockEnabled", $$state, void 0, $$eventData);
|
|
35395
|
+
return void 0;
|
|
35396
|
+
}
|
|
35397
|
+
const $$m = (function() {
|
|
35398
|
+
if (config.esBraceBlock) return;
|
|
35399
|
+
return $skip;
|
|
35400
|
+
})();
|
|
35401
|
+
const $$final = $$m !== import_lib2.SKIP ? ($$r.value = $$m, $$r) : void 0;
|
|
35402
|
+
$$ctx.exit?.("ESBraceBlockEnabled", $$state, $$final, $$eventData);
|
|
35403
|
+
return $$final;
|
|
35404
|
+
}
|
|
35017
35405
|
var JSXCodeNestedEnabled$parser = (0, import_lib2.$EXPECT)($L0, 'JSXCodeNestedEnabled ""');
|
|
35018
35406
|
function JSXCodeNestedEnabled($$ctx, $$state) {
|
|
35019
35407
|
const $$entered = $$ctx.enter?.("JSXCodeNestedEnabled", $$state);
|
|
@@ -35294,7 +35682,7 @@ function Prologue($$ctx, $$state) {
|
|
|
35294
35682
|
$$ctx.exit?.("Prologue", $$state, $$final, $$eventData);
|
|
35295
35683
|
return $$final;
|
|
35296
35684
|
}
|
|
35297
|
-
var ProloguePrefix$parser = (0, import_lib2.$S)(Prologue, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($
|
|
35685
|
+
var ProloguePrefix$parser = (0, import_lib2.$S)(Prologue, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R103, "ProloguePrefix /[^]*/")));
|
|
35298
35686
|
function ProloguePrefix($$ctx, $$state) {
|
|
35299
35687
|
const $$entered = $$ctx.enter?.("ProloguePrefix", $$state);
|
|
35300
35688
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -35303,7 +35691,7 @@ function ProloguePrefix($$ctx, $$state) {
|
|
|
35303
35691
|
$$ctx.exit?.("ProloguePrefix", $$state, $$final, $$eventData);
|
|
35304
35692
|
return $$final;
|
|
35305
35693
|
}
|
|
35306
|
-
var Indent$parser = (0, import_lib2.$EXPECT)($
|
|
35694
|
+
var Indent$parser = (0, import_lib2.$EXPECT)($R21, "Indent /[ \\t]*/");
|
|
35307
35695
|
function Indent($$ctx, $$state) {
|
|
35308
35696
|
const $$entered = $$ctx.enter?.("Indent", $$state);
|
|
35309
35697
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
@@ -35351,12 +35739,19 @@ function TrackIndented($$ctx, $$state) {
|
|
|
35351
35739
|
$$ctx.exit?.("TrackIndented", $$state, $$final, $$eventData);
|
|
35352
35740
|
return $$final;
|
|
35353
35741
|
}
|
|
35354
|
-
var PushIndent$parser = (0, import_lib2.$Y)((0, import_lib2.$S)(EOS, TrackIndented));
|
|
35742
|
+
var PushIndent$0$parser = (0, import_lib2.$Y)((0, import_lib2.$S)(EOS, TrackIndented));
|
|
35743
|
+
var PushIndent$1$parser = (0, import_lib2.$Y)((0, import_lib2.$S)(EOL, TrackIndented));
|
|
35744
|
+
function PushIndent$0($$ctx, $$state) {
|
|
35745
|
+
return PushIndent$0$parser($$ctx, $$state);
|
|
35746
|
+
}
|
|
35747
|
+
function PushIndent$1($$ctx, $$state) {
|
|
35748
|
+
return PushIndent$1$parser($$ctx, $$state);
|
|
35749
|
+
}
|
|
35355
35750
|
function PushIndent($$ctx, $$state) {
|
|
35356
35751
|
const $$entered = $$ctx.enter?.("PushIndent", $$state);
|
|
35357
35752
|
if ($$entered && "cache" in $$entered) return $$entered.cache;
|
|
35358
35753
|
const $$eventData = $$entered?.data;
|
|
35359
|
-
const $$final = PushIndent$
|
|
35754
|
+
const $$final = PushIndent$0($$ctx, $$state) || PushIndent$1($$ctx, $$state);
|
|
35360
35755
|
$$ctx.exit?.("PushIndent", $$state, $$final, $$eventData);
|
|
35361
35756
|
return $$final;
|
|
35362
35757
|
}
|
|
@@ -35681,6 +36076,8 @@ function parseProgram(input, options) {
|
|
|
35681
36076
|
});
|
|
35682
36077
|
}
|
|
35683
36078
|
}
|
|
36079
|
+
var unicodeEscapePattern = String.raw`\\u\{0*(?:[\dA-Fa-f]{1,5}|10[\dA-Fa-f]{4})\}|\\u[\dA-Fa-f]{4}`;
|
|
36080
|
+
var nonAsciiIdentifierPattern = String.raw`[^\u0000-\u007F\p{ID_Continue}\s÷—‖’•‥…⁇→⇒∈∉∋∌≔≠≡≢≣≤≥≪≫⋙▷⧺⩵⩶]`;
|
|
35684
36081
|
var wellKnownSymbols = [
|
|
35685
36082
|
"asyncIterator",
|
|
35686
36083
|
"hasInstance",
|
|
@@ -35696,6 +36093,16 @@ var wellKnownSymbols = [
|
|
|
35696
36093
|
"toStringTag",
|
|
35697
36094
|
"unscopables"
|
|
35698
36095
|
];
|
|
36096
|
+
var heregexEscapes = {
|
|
36097
|
+
"\n": "\\n",
|
|
36098
|
+
"\r": "\\r",
|
|
36099
|
+
"\u2028": "\\u2028",
|
|
36100
|
+
"\u2029": "\\u2029",
|
|
36101
|
+
" ": "\\t",
|
|
36102
|
+
"\v": "\\v",
|
|
36103
|
+
"\f": "\\f",
|
|
36104
|
+
" ": " "
|
|
36105
|
+
};
|
|
35699
36106
|
|
|
35700
36107
|
// source/sourcemap.civet
|
|
35701
36108
|
var sourcemap_exports = {};
|