@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/dist/main.mjs CHANGED
@@ -28,9 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  mod
29
29
  ));
30
30
 
31
- // node_modules/.pnpm/@danielx+hera@0.9.7/node_modules/@danielx/hera/dist/machine.js
31
+ // node_modules/.pnpm/@danielx+hera@0.9.8/node_modules/@danielx/hera/dist/machine.js
32
32
  var require_machine = __commonJS({
33
- "node_modules/.pnpm/@danielx+hera@0.9.7/node_modules/@danielx/hera/dist/machine.js"(exports, module) {
33
+ "node_modules/.pnpm/@danielx+hera@0.9.8/node_modules/@danielx/hera/dist/machine.js"(exports, module) {
34
34
  var __defProp2 = Object.defineProperty;
35
35
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
36
36
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -59,7 +59,7 @@ var require_machine = __commonJS({
59
59
  $N: () => $N2,
60
60
  $P: () => $P2,
61
61
  $Q: () => $Q2,
62
- $R: () => $R107,
62
+ $R: () => $R104,
63
63
  $R$0: () => $R$02,
64
64
  $S: () => $S2,
65
65
  $T: () => $T,
@@ -76,7 +76,7 @@ var require_machine = __commonJS({
76
76
  function $EXPECT2(parser2, expectation) {
77
77
  return function(ctx, state2) {
78
78
  const result = parser2(ctx, state2);
79
- if (!result) ctx.fail(state2.pos, expectation);
79
+ if (!result) ctx.fail(state2.pos, typeof expectation === "function" ? expectation() : expectation);
80
80
  return result;
81
81
  };
82
82
  }
@@ -96,7 +96,7 @@ var require_machine = __commonJS({
96
96
  return;
97
97
  };
98
98
  }
99
- function $R107(regExp) {
99
+ function $R104(regExp) {
100
100
  return function(_ctx, state2) {
101
101
  const { input, pos } = state2;
102
102
  regExp.lastIndex = state2.pos;
@@ -1827,6 +1827,7 @@ function adjustBindingElements(elements) {
1827
1827
  if (restCount === 0) {
1828
1828
  return {
1829
1829
  children: elements,
1830
+ elements: void 0,
1830
1831
  names,
1831
1832
  blockPrefix,
1832
1833
  length
@@ -1847,13 +1848,32 @@ function adjustBindingElements(elements) {
1847
1848
  names: after.flatMap((p) => p.names)
1848
1849
  };
1849
1850
  }
1851
+ const restTrimmed = {
1852
+ ...rest,
1853
+ children: rest.children.slice(0, -1)
1854
+ // remove trailing comma
1855
+ };
1856
+ if (rest.binding.type === "EmptyBinding" && !l) {
1857
+ const preceding = elements.slice(0, restIndex);
1858
+ const last = preceding[preceding.length - 1];
1859
+ if (last && arrayElementHasTrailingComma(last)) {
1860
+ preceding[preceding.length - 1] = {
1861
+ ...last,
1862
+ children: last.children.slice(0, -1)
1863
+ };
1864
+ }
1865
+ return {
1866
+ names,
1867
+ children: preceding,
1868
+ elements: [...preceding, restTrimmed],
1869
+ blockPrefix,
1870
+ length
1871
+ };
1872
+ }
1850
1873
  return {
1851
1874
  names,
1852
- children: [...elements.slice(0, restIndex), {
1853
- ...rest,
1854
- children: rest.children.slice(0, -1)
1855
- // remove trailing comma
1856
- }],
1875
+ children: [...elements.slice(0, restIndex), restTrimmed],
1876
+ elements: void 0,
1857
1877
  blockPrefix,
1858
1878
  length
1859
1879
  };
@@ -1865,6 +1885,7 @@ function adjustBindingElements(elements) {
1865
1885
  return {
1866
1886
  names,
1867
1887
  children: [...elements, err],
1888
+ elements: void 0,
1868
1889
  blockPrefix,
1869
1890
  length
1870
1891
  };
@@ -3386,10 +3407,10 @@ function insertReturn(node) {
3386
3407
  }
3387
3408
  insertReturn(node.block);
3388
3409
  if (!isExit(node.block)) {
3389
- const comment = hasTrailingComment(node.block.expressions);
3410
+ const comment = node.block.trailing?.length || hasTrailingComment(node.block.expressions);
3390
3411
  let ref12;
3391
3412
  node.block.expressions.push([
3392
- comment ? (ref12 = node.block.expressions)[ref12.length - 1][0] || "\n" : "",
3413
+ comment ? (ref12 = node.block.expressions)[ref12.length - 1]?.[0] || "\n" : "",
3393
3414
  wrapWithReturn(void 0, node, !comment)
3394
3415
  ]);
3395
3416
  }
@@ -3898,6 +3919,9 @@ function processParams(f) {
3898
3919
  const restIdentifier = rest.binding.ref || rest.binding;
3899
3920
  parameters.names.push(...rest.names ?? []);
3900
3921
  rest.children.pop();
3922
+ if (rest.binding.type === "EmptyBinding" && !after.length) {
3923
+ restIdentifier.base = restIdentifier.id = "_ref";
3924
+ }
3901
3925
  if (after.length) {
3902
3926
  let m6;
3903
3927
  if (m6 = rest.binding.type, m6 === "ArrayBindingPattern" || m6 === "ObjectBindingPattern" || m6 === "NamedBindingPattern") {
@@ -4026,6 +4050,53 @@ function processParams(f) {
4026
4050
  } else {
4027
4051
  indent = expressions[0][0];
4028
4052
  }
4053
+ const { ancestor: enclosingClass } = findAncestor(f, ($10) => $10.type === "ClassExpression");
4054
+ if (enclosingClass != null) {
4055
+ const fieldTypes = /* @__PURE__ */ new Map();
4056
+ for (let ref20 = gatherRecursiveWithinFunction(enclosingClass.body, ($11) => $11.type === "FieldDefinition"), i9 = 0, len8 = ref20.length; i9 < len8; i9++) {
4057
+ const { id, typeSuffix } = ref20[i9];
4058
+ if (typeSuffix != null && id?.type === "Identifier") {
4059
+ fieldTypes.set(id.name, typeSuffix);
4060
+ }
4061
+ }
4062
+ if (fieldTypes.size) {
4063
+ for (let ref21 = gatherRecursive(parameters, ($12) => $12.type === "Parameter"), i10 = 0, len9 = ref21.length; i10 < len9; i10++) {
4064
+ const parameter = ref21[i10];
4065
+ if (parameter.typeSuffix != null) {
4066
+ continue;
4067
+ }
4068
+ let inferredInPattern = false;
4069
+ for (let ref22 = gatherRecursive(parameter, ($13) => $13.type === "AtBinding"), i11 = 0, len10 = ref22.length; i11 < len10; i11++) {
4070
+ const binding = ref22[i11];
4071
+ const owner = binding.parent;
4072
+ assert(owner, "@-binding has no parent");
4073
+ const fieldType = fieldTypes.get(binding.ref.id);
4074
+ if (!(fieldType != null)) {
4075
+ continue;
4076
+ }
4077
+ owner.typeSuffix = deepCopy(fieldType);
4078
+ updateParentPointers(owner);
4079
+ if (owner === parameter) {
4080
+ const i = owner.children.indexOf(binding);
4081
+ assert.notEqual(i, -1, "@-binding missing from parameter children");
4082
+ owner.children[i + 1] = owner.typeSuffix;
4083
+ } else {
4084
+ inferredInPattern = true;
4085
+ }
4086
+ }
4087
+ if (inferredInPattern) {
4088
+ const pattern = parameter.binding;
4089
+ pattern.typeSuffix = void 0;
4090
+ gatherBindingPatternTypeSuffix(pattern);
4091
+ assert(pattern.typeSuffix, "expected aggregated binding pattern type");
4092
+ parameter.typeSuffix = pattern.typeSuffix;
4093
+ const i = parameter.children.indexOf(pattern);
4094
+ assert.notEqual(i, -1, "binding pattern missing from parameter children");
4095
+ parameter.children[i + 1] = parameter.typeSuffix;
4096
+ }
4097
+ }
4098
+ }
4099
+ }
4029
4100
  const [splices, thisAssignments] = gatherBindingCode(parameters, {
4030
4101
  injectParamProps: isConstructor,
4031
4102
  assignPins: true
@@ -4034,22 +4105,21 @@ function processParams(f) {
4034
4105
  simplifyBindingProperties(parameters.parameters);
4035
4106
  simplifyBindingProperties(subbindings);
4036
4107
  if (isConstructor) {
4037
- const { ancestor } = findAncestor(f, ($10) => $10.type === "ClassExpression");
4038
- if (ancestor != null) {
4039
- const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($11) => $11.type === "FieldDefinition").map(($12) => $12.id).filter(((a3) => typeof a3 === "object" && a3 != null && "type" in a3 && a3.type === "Identifier")).map(($13) => $13.name));
4040
- const classExpressions = ancestor.body.expressions;
4108
+ if (enclosingClass != null) {
4109
+ 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));
4110
+ const classExpressions = enclosingClass.body.expressions;
4041
4111
  let index2 = findChildIndex(classExpressions, f);
4042
4112
  assert.notEqual(index2, -1, "Could not find constructor in class");
4043
4113
  index2 -= precedingOverloads(f).length;
4044
4114
  const fStatement = classExpressions[index2];
4045
- for (let ref20 = gatherRecursive(parameters, ($14) => $14.type === "Parameter"), i9 = 0, len8 = ref20.length; i9 < len8; i9++) {
4046
- const parameter = ref20[i9];
4115
+ for (let ref23 = gatherRecursive(parameters, ($17) => $17.type === "Parameter"), i12 = 0, len11 = ref23.length; i12 < len11; i12++) {
4116
+ const parameter = ref23[i12];
4047
4117
  const { accessModifier } = parameter;
4048
4118
  if (!(accessModifier || parameter.typeSuffix)) {
4049
4119
  continue;
4050
4120
  }
4051
- for (let ref21 = gatherRecursive(parameter, ($15) => $15.type === "AtBinding"), i10 = 0, len9 = ref21.length; i10 < len9; i10++) {
4052
- const binding = ref21[i10];
4121
+ for (let ref24 = gatherRecursive(parameter, ($18) => $18.type === "AtBinding"), i13 = 0, len12 = ref24.length; i13 < len12; i13++) {
4122
+ const binding = ref24[i13];
4053
4123
  const typeSuffix = binding.parent?.typeSuffix;
4054
4124
  if (!(accessModifier || typeSuffix)) {
4055
4125
  continue;
@@ -4087,8 +4157,8 @@ function processParams(f) {
4087
4157
  decl: "const"
4088
4158
  }));
4089
4159
  }
4090
- for (let ref22 = splices, i11 = 0, len10 = ref22.length; i11 < len10; i11++) {
4091
- const binding = ref22[i11];
4160
+ for (let ref25 = splices, i14 = 0, len13 = ref25.length; i14 < len13; i14++) {
4161
+ const binding = ref25[i14];
4092
4162
  assert.equal(binding.type, "PostRestBindingElements", "splice should be of type Binding");
4093
4163
  prefix.push(makeNode({
4094
4164
  type: "Declaration",
@@ -4131,6 +4201,43 @@ function findSuperCall(block) {
4131
4201
  return -1;
4132
4202
  }
4133
4203
  }
4204
+ function transformArrowFunctionWithYield(f) {
4205
+ const { block, parameters, returnType, async, signature } = f;
4206
+ if (block?.type === "BlockStatement" && block.implicitlyReturned) {
4207
+ insertReturn(block);
4208
+ block.implicitlyReturned = false;
4209
+ }
4210
+ if (block?.type === "BlockStatement" && block.bare && !block.root) {
4211
+ block.children.unshift(" {");
4212
+ block.children.push("}");
4213
+ block.bare = false;
4214
+ }
4215
+ const generator = ["*"];
4216
+ signature.modifier ??= {};
4217
+ signature.modifier.generator = true;
4218
+ signature.generator = generator;
4219
+ signature.children = [async, "function", generator, parameters, returnType];
4220
+ f.type = "FunctionExpression";
4221
+ f.generator = generator;
4222
+ f.children = [async, "function", generator, parameters, returnType, block];
4223
+ const originalParent = f.parent;
4224
+ const lhs = makeLeftHandSideExpression(f);
4225
+ let ref26;
4226
+ if (gatherRecursiveWithinFunction(block, ((a6) => typeof a6 === "object" && a6 != null && "token" in a6 && a6.token === "this")).length) {
4227
+ ref26 = makeNode({
4228
+ type: "CallExpression",
4229
+ children: [lhs, ".bind(this)"]
4230
+ });
4231
+ } else {
4232
+ ref26 = lhs;
4233
+ }
4234
+ ;
4235
+ const newNode = ref26;
4236
+ if (newNode !== f && originalParent != null) {
4237
+ replaceNode(f, newNode, originalParent);
4238
+ updateParentPointers(newNode, originalParent);
4239
+ }
4240
+ }
4134
4241
  function processSignature(f) {
4135
4242
  const { block, signature } = f;
4136
4243
  let addAsync = false;
@@ -4139,8 +4246,8 @@ function processSignature(f) {
4139
4246
  if (f.async != null) {
4140
4247
  addAsync = true;
4141
4248
  } else {
4142
- for (let ref23 = gatherRecursiveWithinFunction(block, ($16) => $16.type === "Await"), i12 = 0, len11 = ref23.length; i12 < len11; i12++) {
4143
- const a = ref23[i12];
4249
+ for (let ref27 = gatherRecursiveWithinFunction(block, ($19) => $19.type === "Await"), i15 = 0, len14 = ref27.length; i15 < len14; i15++) {
4250
+ const a = ref27[i15];
4144
4251
  const i = findChildIndex(a.parent, a);
4145
4252
  a.parent.children.splice(i + 1, 0, {
4146
4253
  type: "Error",
@@ -4152,19 +4259,21 @@ function processSignature(f) {
4152
4259
  if (!f.generator?.length && hasYield(block)) {
4153
4260
  if (f.generator != null) {
4154
4261
  addGenerator = true;
4262
+ } else if (f.type === "ArrowFunction") {
4263
+ transformArrowFunctionWithYield(f);
4155
4264
  } else {
4156
- for (let ref24 = gatherRecursiveWithinFunction(block, ($17) => $17.type === "YieldExpression"), i13 = 0, len12 = ref24.length; i13 < len12; i13++) {
4157
- const y = ref24[i13];
4158
- const i = y.children.findIndex(($18) => $18.type === "Yield");
4265
+ for (let ref28 = gatherRecursiveWithinFunction(block, ($20) => $20.type === "YieldExpression"), i16 = 0, len15 = ref28.length; i16 < len15; i16++) {
4266
+ const y = ref28[i16];
4267
+ const i = y.children.findIndex(($21) => $21.type === "Yield");
4159
4268
  y.children.splice(i + 1, 0, {
4160
4269
  type: "Error",
4161
- message: `yield invalid in ${f.type === "ArrowFunction" ? "=> arrow function" : signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
4270
+ message: `yield invalid in ${signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
4162
4271
  });
4163
4272
  }
4164
4273
  }
4165
4274
  }
4166
- for (let ref25 = [f, ...precedingOverloads(f)], i14 = 0, len13 = ref25.length; i14 < len13; i14++) {
4167
- const overload = ref25[i14];
4275
+ for (let ref29 = [f, ...precedingOverloads(f)], i17 = 0, len16 = ref29.length; i17 < len16; i17++) {
4276
+ const overload = ref29[i17];
4168
4277
  if (addAsync && overload.async != null && !overload.async.length) {
4169
4278
  overload.async.push("async ");
4170
4279
  overload.signature.modifier.async = true;
@@ -4183,8 +4292,8 @@ function processSignature(f) {
4183
4292
  }
4184
4293
  }
4185
4294
  function processFunctions(statements, config2) {
4186
- for (let ref26 = gatherRecursiveAll(statements, ($19) => $19.type === "FunctionExpression" || $19.type === "ArrowFunction" || $19.type === "MethodDefinition"), i15 = 0, len14 = ref26.length; i15 < len14; i15++) {
4187
- const f = ref26[i15];
4295
+ for (let ref30 = gatherRecursiveAll(statements, ($22) => $22.type === "FunctionExpression" || $22.type === "ArrowFunction" || $22.type === "MethodDefinition"), i18 = 0, len17 = ref30.length; i18 < len17; i18++) {
4296
+ const f = ref30[i18];
4188
4297
  if (f.type === "FunctionExpression" || f.type === "MethodDefinition") {
4189
4298
  implicitFunctionBlock(f);
4190
4299
  }
@@ -4257,14 +4366,14 @@ function expressionizeIteration(exp, consumeRoot) {
4257
4366
  ];
4258
4367
  } else {
4259
4368
  const reduction = statement.type === "ForStatement" && statement.reduction;
4260
- let ref27;
4369
+ let ref31;
4261
4370
  if (!async && !reduction && !statement.block.empty) {
4262
- ref27 = blockContainingStatement(exp);
4371
+ ref31 = blockContainingStatement(exp);
4263
4372
  } else {
4264
- ref27 = void 0;
4373
+ ref31 = void 0;
4265
4374
  }
4266
4375
  ;
4267
- const parentInfo = ref27;
4376
+ const parentInfo = ref31;
4268
4377
  if (parentInfo && iterationValueDiscarded(parentInfo.block, parentInfo.index, consumeRoot)) {
4269
4378
  const origSemi = parentInfo.block.expressions[parentInfo.index][2];
4270
4379
  statements = [["", statement, origSemi]];
@@ -4280,9 +4389,9 @@ function expressionizeIteration(exp, consumeRoot) {
4280
4389
  }
4281
4390
  let done;
4282
4391
  if (!async) {
4283
- let ref28;
4284
- if ((ref28 = blockContainingStatement(exp)) && typeof ref28 === "object" && "block" in ref28 && "index" in ref28) {
4285
- const { block: parentBlock, index } = ref28;
4392
+ let ref32;
4393
+ if ((ref32 = blockContainingStatement(exp)) && typeof ref32 === "object" && "block" in ref32 && "index" in ref32) {
4394
+ const { block: parentBlock, index } = ref32;
4286
4395
  statements[0][0] = parentBlock.expressions[index][0];
4287
4396
  parentBlock.expressions.splice(index, index + 1 - index, ...statements);
4288
4397
  updateParentPointers(parentBlock);
@@ -4299,8 +4408,8 @@ function expressionizeIteration(exp, consumeRoot) {
4299
4408
  }
4300
4409
  }
4301
4410
  function processIterationExpressions(statements, consumeRoot = false) {
4302
- for (let ref29 = gatherRecursiveAll(statements, ($20) => $20.type === "IterationExpression"), i16 = 0, len15 = ref29.length; i16 < len15; i16++) {
4303
- const s = ref29[i16];
4411
+ for (let ref33 = gatherRecursiveAll(statements, ($23) => $23.type === "IterationExpression"), i19 = 0, len18 = ref33.length; i19 < len18; i19++) {
4412
+ const s = ref33[i19];
4304
4413
  expressionizeIteration(s, consumeRoot);
4305
4414
  }
4306
4415
  }
@@ -4313,7 +4422,12 @@ function skipImplicitArguments(args) {
4313
4422
  if (arg0.type === "StatementExpression") {
4314
4423
  arg0 = arg0.statement;
4315
4424
  }
4316
- return arg0.type === "IterationExpression" && arg0.subtype !== "DoStatement" && !arg0.async && isEmptyBareBlock(arg0.block);
4425
+ if (arg0.type === "IterationExpression") {
4426
+ return arg0.subtype !== "DoStatement" && !arg0.async && isEmptyBareBlock(arg0.block);
4427
+ }
4428
+ if (arg0.type === "IfStatement") {
4429
+ return !arg0.else && isEmptyBareBlock(arg0.then);
4430
+ }
4317
4431
  }
4318
4432
  return false;
4319
4433
  }
@@ -4324,21 +4438,21 @@ function processCoffeeDo(ws, expression) {
4324
4438
  let { parameters } = expression;
4325
4439
  const parameterList = parameters.parameters;
4326
4440
  const results3 = [];
4327
- for (let i17 = 0, len16 = parameterList.length; i17 < len16; i17++) {
4328
- let parameter = parameterList[i17];
4441
+ for (let i20 = 0, len19 = parameterList.length; i20 < len19; i20++) {
4442
+ let parameter = parameterList[i20];
4329
4443
  if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
4330
- let ref30;
4331
- if (ref30 = parameter.initializer) {
4332
- const initializer = ref30;
4444
+ let ref34;
4445
+ if (ref34 = parameter.initializer) {
4446
+ const initializer = ref34;
4333
4447
  args.push(initializer.expression, parameter.delim);
4334
4448
  parameter = {
4335
4449
  ...parameter,
4336
4450
  initializer: void 0,
4337
- children: parameter.children.filter(((a6) => a6 !== initializer))
4451
+ children: parameter.children.filter(((a7) => a7 !== initializer))
4338
4452
  };
4339
4453
  } else {
4340
4454
  args.push(parameter.children.filter(
4341
- ((a7) => a7 !== parameter.typeSuffix)
4455
+ ((a8) => a8 !== parameter.typeSuffix)
4342
4456
  ));
4343
4457
  }
4344
4458
  }
@@ -4349,12 +4463,12 @@ function processCoffeeDo(ws, expression) {
4349
4463
  const newParameters = {
4350
4464
  ...parameters,
4351
4465
  parameters: newParameterList,
4352
- children: parameters.children.map(($21) => $21 === parameterList ? newParameterList : $21)
4466
+ children: parameters.children.map(($24) => $24 === parameterList ? newParameterList : $24)
4353
4467
  };
4354
4468
  expression = {
4355
4469
  ...expression,
4356
4470
  parameters: newParameters,
4357
- children: expression.children.map(($22) => $22 === parameters ? newParameters : $22)
4471
+ children: expression.children.map(($25) => $25 === parameters ? newParameters : $25)
4358
4472
  };
4359
4473
  }
4360
4474
  return {
@@ -4376,7 +4490,7 @@ function makeAmpersandFunction(rhs) {
4376
4490
  ref = makeRef("$");
4377
4491
  inplacePrepend(ref, body);
4378
4492
  }
4379
- if (startsWithPredicate(body, ($23) => $23.type === "ObjectExpression")) {
4493
+ if (startsWithPredicate(body, ($26) => $26.type === "ObjectExpression")) {
4380
4494
  body = makeLeftHandSideExpression(body);
4381
4495
  }
4382
4496
  const parameterList = [
@@ -4419,7 +4533,7 @@ function makeAmpersandFunction(rhs) {
4419
4533
  }
4420
4534
  if (gatherRecursiveWithinFunction(
4421
4535
  block,
4422
- ((a8) => a8 === ref)
4536
+ ((a9) => a9 === ref)
4423
4537
  ).length > 1) {
4424
4538
  fn.ampersandBlock = false;
4425
4539
  }
@@ -4444,6 +4558,9 @@ function blockWithPrefix(prefixStatements, block) {
4444
4558
  function braceBlock(block) {
4445
4559
  if (block.bare && !block.root) {
4446
4560
  block.children.unshift(" {");
4561
+ if (hasTrailingComment(block.children)) {
4562
+ block.children.push("\n");
4563
+ }
4447
4564
  block.children.push("}");
4448
4565
  const { implicitlyReturned } = block;
4449
4566
  block.bare = block.implicitlyReturned = false;
@@ -5806,6 +5923,19 @@ function processDeclarationCondition(condition, rootCondition, parent) {
5806
5923
  });
5807
5924
  } else {
5808
5925
  const { expression } = initializer;
5926
+ if (parent.type === "SwitchStatement" && pattern.type === "Identifier" && !nullCheck) {
5927
+ ref = trimFirstSpace(pattern);
5928
+ Object.assign(condition, {
5929
+ type: "AssignmentExpression",
5930
+ children: [ref],
5931
+ pattern,
5932
+ ref,
5933
+ statementDeclaration: true
5934
+ });
5935
+ updateParentPointers(condition, parent);
5936
+ rootCondition.blockPrefix = getPatternBlockPrefix(pattern, trimFirstSpace(expression), decl, typeSuffix);
5937
+ return;
5938
+ }
5809
5939
  ref = maybeRef(expression);
5810
5940
  const simple = ref === expression;
5811
5941
  let children;
@@ -5993,15 +6123,42 @@ function dynamizeFromClause(from) {
5993
6123
  }
5994
6124
  return ["(", ...from, ")"];
5995
6125
  }
6126
+ function markAllTypeImports(decl) {
6127
+ if (decl.ts) {
6128
+ return decl;
6129
+ }
6130
+ const { imports } = decl;
6131
+ if (!imports) {
6132
+ return decl;
6133
+ }
6134
+ const i = imports;
6135
+ if (!i.binding && !i.star) {
6136
+ const specs = i.specifiers;
6137
+ if (specs?.length && specs.every(($5) => $5.ts)) {
6138
+ return { ...decl, ts: true };
6139
+ }
6140
+ return decl;
6141
+ }
6142
+ const children = imports.children;
6143
+ const namedSpecs = children.at(-1).specifiers;
6144
+ if (!(namedSpecs?.length && namedSpecs.every(($6) => $6.ts))) {
6145
+ return decl;
6146
+ }
6147
+ const [binding, ...rest] = children;
6148
+ const newImportsChildren = [binding, { ts: true, children: rest }];
6149
+ const newImports = { ...imports, children: newImportsChildren };
6150
+ const newDeclChildren = decl.children.map((c) => c === imports ? newImports : c);
6151
+ return { ...decl, imports: newImports, children: newDeclChildren };
6152
+ }
5996
6153
  function processStaticImport(decl) {
5997
6154
  const { imports, from, children } = decl;
5998
6155
  if (!(imports && "rest" in imports)) {
5999
- return decl;
6156
+ return markAllTypeImports(decl);
6000
6157
  }
6001
6158
  const namedImports = imports.binding ? imports.children.at(-1) : imports;
6002
6159
  const allSpecs = namedImports.specifiers;
6003
6160
  if (!(namedImports.rest || allSpecs.some((s) => s.pattern))) {
6004
- return decl;
6161
+ return markAllTypeImports(decl);
6005
6162
  }
6006
6163
  const ref = makeRef("imports");
6007
6164
  const star = { type: "Star", token: "*" };
@@ -7690,6 +7847,12 @@ function expressionizeIfStatement(statement) {
7690
7847
  children.push(":void 0");
7691
7848
  }
7692
7849
  children.push(closeParen);
7850
+ if (b.trailing?.length) {
7851
+ children.push(b.trailing);
7852
+ }
7853
+ if (e?.block.trailing?.length) {
7854
+ children.push(e.block.trailing);
7855
+ }
7693
7856
  return makeNode({
7694
7857
  type: "IfExpression",
7695
7858
  children
@@ -8011,6 +8174,11 @@ function processCallMemberExpression(node) {
8011
8174
  let name = part.name;
8012
8175
  let value = part.value ?? name;
8013
8176
  const wValue = getTrimmingSpace(part.value);
8177
+ let privateField = void 0;
8178
+ if (value?.privateShorthand) {
8179
+ privateField = value.privateId?.name;
8180
+ }
8181
+ ;
8014
8182
  [value, suppressPrefix] = handleThisPrivateShorthands(value);
8015
8183
  if (glob.reversed) {
8016
8184
  [name, value] = [value, name];
@@ -8064,6 +8232,7 @@ function processCallMemberExpression(node) {
8064
8232
  type: part.type,
8065
8233
  name,
8066
8234
  value,
8235
+ privateField,
8067
8236
  delim: part.delim,
8068
8237
  names: part.names,
8069
8238
  children: [
@@ -8635,18 +8804,80 @@ function processAssignments(statements) {
8635
8804
  if ($1.some((x) => x[x.length - 1].special)) {
8636
8805
  const [, lhs, , op] = $1[0];
8637
8806
  const { call, omitLhs } = op;
8807
+ let callLhs = lhs;
8808
+ if (!omitLhs && lhs.type === "MemberExpression") {
8809
+ const memberLhs = lhs;
8810
+ const { children: memberChildren } = memberLhs;
8811
+ let mutated = false;
8812
+ const callChildren = memberChildren.map((child) => {
8813
+ if (!(child?.type === "Index")) {
8814
+ return child;
8815
+ }
8816
+ const indexNode = child;
8817
+ const { ref, refAssignment } = maybeRefAssignment(indexNode.expression);
8818
+ if (!refAssignment) {
8819
+ return child;
8820
+ }
8821
+ mutated = true;
8822
+ replaceNode(indexNode.expression, refAssignment, indexNode);
8823
+ return makeNode({
8824
+ type: "Index",
8825
+ children: ["[", ref, "]"],
8826
+ expression: ref
8827
+ });
8828
+ });
8829
+ if (mutated) {
8830
+ callLhs = makeNode({
8831
+ ...memberLhs,
8832
+ children: callChildren
8833
+ });
8834
+ }
8835
+ }
8638
8836
  const index = exp.children.indexOf($2);
8639
8837
  assert.notEqual(index, -1, "processAssignments: $2 must be directly in exp.children");
8640
8838
  exp.children.splice(
8641
8839
  index,
8642
8840
  1,
8643
- exp.expression = $2 = [call, "(", lhs, ", ", $2, ")"]
8841
+ exp.expression = $2 = [call, "(", callLhs, ", ", $2, ")"]
8644
8842
  );
8645
8843
  if (omitLhs) {
8646
8844
  replaceNode(exp, $2);
8647
8845
  continue;
8648
8846
  }
8649
8847
  }
8848
+ if ($1.length === 1) {
8849
+ const [, soleLhs, , soleOp] = $1[0];
8850
+ const isPrivateGlobProp = (p) => {
8851
+ return p?.type === "Property" && !!p.privateField;
8852
+ };
8853
+ if (soleOp.token === "=" && soleLhs.type === "ObjectExpression" && soleLhs.properties?.some(isPrivateGlobProp) && !soleLhs.properties.some((p) => p?.type === "SpreadProperty")) {
8854
+ const properties = soleLhs.properties.filter((p) => p?.type === "Property");
8855
+ let prefix, sourceExpr;
8856
+ if (properties.length > 1 && needsRef($2)) {
8857
+ const srcRef = makeRef();
8858
+ prefix = [srcRef, " = ", $2, ", "];
8859
+ sourceExpr = srcRef;
8860
+ exp.hoistDec = {
8861
+ type: "Declaration",
8862
+ children: ["let ", srcRef],
8863
+ names: [],
8864
+ bindings: [],
8865
+ decl: "let"
8866
+ };
8867
+ } else {
8868
+ prefix = [];
8869
+ sourceExpr = $2;
8870
+ }
8871
+ const assignments = properties.map((prop) => {
8872
+ const sourceName = prop.privateField ?? prop.name;
8873
+ return [prop.value, " = ", sourceExpr, ".", sourceName];
8874
+ });
8875
+ const joined = assignments.flatMap((a, idx) => idx ? [", ", a] : [a]);
8876
+ exp.children = [["(", prefix, joined, ")"]];
8877
+ exp.names = [];
8878
+ continue;
8879
+ }
8880
+ }
8650
8881
  let wrapped = false;
8651
8882
  const insideParens = exp.parent?.type === "ParenthesizedExpression";
8652
8883
  let i = 0;
@@ -8732,7 +8963,7 @@ function processAssignments(statements) {
8732
8963
  names: []
8733
8964
  };
8734
8965
  }
8735
- replaceNode($2, newMemberExp);
8966
+ replaceNode($2, newMemberExp, exp);
8736
8967
  $2 = newMemberExp;
8737
8968
  }
8738
8969
  }
@@ -9903,6 +10134,9 @@ var grammar = {
9903
10134
  PostfixedSingleLineNoCommaStatements,
9904
10135
  NestedBlockStatements,
9905
10136
  NestedBlockStatement,
10137
+ TrailingNestedComments,
10138
+ TrailingInlineComment,
10139
+ TrailingNestedCommentLine,
9906
10140
  BlockStatementPart,
9907
10141
  Literal,
9908
10142
  LiteralContent,
@@ -10520,6 +10754,7 @@ var grammar = {
10520
10754
  CoffeeOfEnabled,
10521
10755
  CoffeePrototypeEnabled,
10522
10756
  ESArrowFunctionEnabled,
10757
+ ESBraceBlockEnabled,
10523
10758
  JSXCodeNestedEnabled,
10524
10759
  JSXCodeSameLineEnabled,
10525
10760
  ObjectIsEnabled,
@@ -10790,113 +11025,128 @@ var $L245 = (0, import_lib2.$L)("unique");
10790
11025
  var $L246 = (0, import_lib2.$L)("symbol");
10791
11026
  var $L247 = (0, import_lib2.$L)("[]");
10792
11027
  var $L248 = (0, import_lib2.$L)("civet");
10793
- var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
10794
- var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
10795
- var $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
10796
- var $R3 = (0, import_lib2.$R)(new RegExp("[0-9]", "suy"));
10797
- var $R4 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Start}|[_$0-9(\\[{])", "suy"));
10798
- var $R5 = (0, import_lib2.$R)(new RegExp("[ \\t]", "suy"));
10799
- var $R6 = (0, import_lib2.$R)(new RegExp("\\p{ID_Continue}|[\\u200C\\u200D$.#{=]", "suy"));
10800
- var $R7 = (0, import_lib2.$R)(new RegExp("[&=]", "suy"));
10801
- var $R8 = (0, import_lib2.$R)(new RegExp("[@#]", "suy"));
10802
- var $R9 = (0, import_lib2.$R)(new RegExp("(?=['\"`])", "suy"));
10803
- var $R10 = (0, import_lib2.$R)(new RegExp("(?=[\\/?])", "suy"));
10804
- var $R11 = (0, import_lib2.$R)(new RegExp("(?=[\\/\\[{?.!@#'\u2019:])", "suy"));
10805
- var $R12 = (0, import_lib2.$R)(new RegExp("%%?", "suy"));
10806
- var $R13 = (0, import_lib2.$R)(new RegExp("[.\\s]", "suy"));
10807
- var $R14 = (0, import_lib2.$R)(new RegExp("[)\\]}]", "suy"));
10808
- var $R15 = (0, import_lib2.$R)(new RegExp("[+-]", "suy"));
10809
- var $R16 = (0, import_lib2.$R)(new RegExp("\\+\\+|--|\u29FA|\u2014|[\\+\\-&]\\S", "suy"));
10810
- var $R17 = (0, import_lib2.$R)(new RegExp(`(?=[0-9.'"tfyno])`, "suy"));
10811
- var $R18 = (0, import_lib2.$R)(new RegExp("(?=true|false|yes|no|on|off)", "suy"));
10812
- var $R19 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$\\\\]|[^\\u0000-\\u007F\\p{ID_Continue}\\s\xF7\u2014\u2016\u2019\u2022\u2025\u2026\u2047\u2192\u21D2\u2208\u2209\u220B\u220C\u2254\u2260\u2261\u2262\u2263\u2264\u2265\u226A\u226B\u22D9\u25B7\u29FA\u2A75\u2A76])", "suy"));
10813
- var $R20 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$]|\\\\u\\{0*(?:[\\dA-Fa-f]{1,5}|10[\\dA-Fa-f]{4})\\}|\\\\u[\\dA-Fa-f]{4}|[^\\u0000-\\u007F\\p{ID_Continue}\\s\xF7\u2014\u2016\u2019\u2022\u2025\u2026\u2047\u2192\u21D2\u2208\u2209\u220B\u220C\u2254\u2260\u2261\u2262\u2263\u2264\u2265\u226A\u226B\u22D9\u25B7\u29FA\u2A75\u2A76])(?:\\p{ID_Continue}|[\\u200C\\u200D$]|\\\\u\\{0*(?:[\\dA-Fa-f]{1,5}|10[\\dA-Fa-f]{4})\\}|\\\\u[\\dA-Fa-f]{4}|[^\\u0000-\\u007F\\p{ID_Continue}\\s\xF7\u2014\u2016\u2019\u2022\u2025\u2026\u2047\u2192\u21D2\u2208\u2209\u220B\u220C\u2254\u2260\u2261\u2262\u2263\u2264\u2265\u226A\u226B\u22D9\u25B7\u29FA\u2A75\u2A76])*", "suy"));
10814
- var $R21 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022\\/])", "suy"));
10815
- var $R22 = (0, import_lib2.$R)(new RegExp("([<>])(=?)|([\u2264\u2265])", "suy"));
10816
- var $R23 = (0, import_lib2.$R)(new RegExp("[ \\t]*", "suy"));
10817
- var $R24 = (0, import_lib2.$R)(new RegExp("[ \\t]+", "suy"));
10818
- var $R25 = (0, import_lib2.$R)(new RegExp("[!+-]?", "suy"));
10819
- var $R26 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
10820
- var $R27 = (0, import_lib2.$R)(new RegExp("[=>]", "suy"));
10821
- var $R28 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])", "suy"));
10822
- var $R29 = (0, import_lib2.$R)(new RegExp("!\\^\\^?", "suy"));
10823
- var $R30 = (0, import_lib2.$R)(new RegExp("(?!\\+\\+|--)[!~+-](?!\\s)", "suy"));
10824
- var $R31 = (0, import_lib2.$R)(new RegExp("[:.]", "suy"));
10825
- var $R32 = (0, import_lib2.$R)(new RegExp("(?=for|if|loop|unless|until|while)", "suy"));
10826
- var $R33 = (0, import_lib2.$R)(new RegExp("(?:loop|while|until|for|do)(?!\\p{ID_Continue})", "suy"));
10827
- var $R34 = (0, import_lib2.$R)(new RegExp("(?=loop|comptime|do|for|until|while)", "suy"));
10828
- var $R35 = (0, import_lib2.$R)(new RegExp("\\s", "suy"));
10829
- var $R36 = (0, import_lib2.$R)(new RegExp(`[^;"'\\s=>]+`, "suy"));
10830
- var $R37 = (0, import_lib2.$R)(new RegExp("(?=[0-9.])", "suy"));
10831
- var $R38 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)n", "suy"));
10832
- var $R39 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))", "suy"));
10833
- var $R40 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?", "suy"));
10834
- var $R41 = (0, import_lib2.$R)(new RegExp("(?:\\.[0-9](?:_[0-9]|[0-9])*)", "suy"));
10835
- var $R42 = (0, import_lib2.$R)(new RegExp("(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)", "suy"));
10836
- var $R43 = (0, import_lib2.$R)(new RegExp("0[bB][01](?:[01]|_[01])*n?", "suy"));
10837
- var $R44 = (0, import_lib2.$R)(new RegExp("0[oO][0-7](?:[0-7]|_[0-7])*n?", "suy"));
10838
- var $R45 = (0, import_lib2.$R)(new RegExp("0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?", "suy"));
10839
- var $R46 = (0, import_lib2.$R)(new RegExp("(?=[0-9])", "suy"));
10840
- var $R47 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)", "suy"));
10841
- var $R48 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|[^"])*', "suy"));
10842
- var $R49 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^'])*", "suy"));
10843
- var $R50 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|[^"\\n])*', "suy"));
10844
- var $R51 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^'\\n])*", "suy"));
10845
- var $R52 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+', "suy"));
10846
- var $R53 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|\\\\.|[^"])+', "suy"));
10847
- var $R54 = (0, import_lib2.$R)(new RegExp("(?:'(?!'')|\\\\.|[^'])*", "suy"));
10848
- var $R55 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|#(?!\\{)|[^"#])+', "suy"));
10849
- var $R56 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^\\]])*", "suy"));
10850
- var $R57 = (0, import_lib2.$R)(new RegExp("(?:\\\\.)", "suy"));
10851
- var $R58 = (0, import_lib2.$R)(new RegExp("[\\s]+", "suy"));
10852
- var $R59 = (0, import_lib2.$R)(new RegExp("\\/(?!\\/\\/)", "suy"));
10853
- var $R60 = (0, import_lib2.$R)(new RegExp("[^[\\/\\s#$\\\\]+|[#$]", "suy"));
10854
- var $R61 = (0, import_lib2.$R)(new RegExp("[*\\/\\r\\n]", "suy"));
10855
- var $R62 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^[\\/\\r\\n])+", "suy"));
10856
- var $R63 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
10857
- var $R64 = (0, import_lib2.$R)(new RegExp("(?=[`'\"])", "suy"));
10858
- var $R65 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|\\\\.|[^$`])+", "suy"));
10859
- var $R66 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+", "suy"));
10860
- var $R67 = (0, import_lib2.$R)(new RegExp("(?:off|yes|on|no)", "suy"));
10861
- var $R68 = (0, import_lib2.$R)(new RegExp("isnt", "suy"));
10862
- var $R69 = (0, import_lib2.$R)(new RegExp("by", "suy"));
10863
- var $R70 = (0, import_lib2.$R)(new RegExp("of", "suy"));
10864
- var $R71 = (0, import_lib2.$R)(new RegExp("(?: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"));
10865
- var $R72 = (0, import_lib2.$R)(new RegExp("(?=\\/|#)", "suy"));
10866
- var $R73 = (0, import_lib2.$R)(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy"));
10867
- var $R74 = (0, import_lib2.$R)(new RegExp(".", "suy"));
10868
- var $R75 = (0, import_lib2.$R)(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy"));
10869
- var $R76 = (0, import_lib2.$R)(new RegExp("[^]*?###", "suy"));
10870
- var $R77 = (0, import_lib2.$R)(new RegExp("###(?!#)", "suy"));
10871
- var $R78 = (0, import_lib2.$R)(new RegExp("\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\/", "suy"));
10872
- var $R79 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\/\\\\#])", "suy"));
10873
- var $R80 = (0, import_lib2.$R)(new RegExp("(?=\\s|\\/|#)", "suy"));
10874
- var $R81 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Continue}|[^\\u0000-\\u007F\\p{ID_Continue}\\s\xF7\u2014\u2016\u2019\u2022\u2025\u2026\u2047\u2192\u21D2\u2208\u2209\u220B\u220C\u2254\u2260\u2261\u2262\u2263\u2264\u2265\u226A\u226B\u22D9\u25B7\u29FA\u2A75\u2A76])", "suy"));
10875
- var $R82 = (0, import_lib2.$R)(new RegExp("[=:]", "suy"));
10876
- var $R83 = (0, import_lib2.$R)(new RegExp("['\u2019]s", "suy"));
10877
- var $R84 = (0, import_lib2.$R)(new RegExp("(?=[<])", "suy"));
10878
- var $R85 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
10879
- var $R86 = (0, import_lib2.$R)(new RegExp("[!+-]", "suy"));
10880
- var $R87 = (0, import_lib2.$R)(new RegExp("[\\s>]|\\/>", "suy"));
10881
- var $R88 = (0, import_lib2.$R)(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
10882
- var $R89 = (0, import_lib2.$R)(new RegExp(`"[^"]*"|'[^']*'`, "suy"));
10883
- var $R90 = (0, import_lib2.$R)(new RegExp("[<>]", "suy"));
10884
- var $R91 = (0, import_lib2.$R)(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
10885
- var $R92 = (0, import_lib2.$R)(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
10886
- var $R93 = (0, import_lib2.$R)(new RegExp("[^{}<>\\r\\n]+", "suy"));
10887
- var $R94 = (0, import_lib2.$R)(new RegExp("[+-]?", "suy"));
10888
- var $R95 = (0, import_lib2.$R)(new RegExp("(?=if|unless)", "suy"));
10889
- var $R96 = (0, import_lib2.$R)(new RegExp("[|&<!=\\-\u21D2\u2192]", "suy"));
10890
- var $R97 = (0, import_lib2.$R)(new RegExp("(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
10891
- var $R98 = (0, import_lib2.$R)(new RegExp("const|in|out", "suy"));
10892
- var $R99 = (0, import_lib2.$R)(new RegExp("#![^\\r\\n]*", "suy"));
10893
- var $R100 = (0, import_lib2.$R)(new RegExp("[\\t ]*", "suy"));
10894
- var $R101 = (0, import_lib2.$R)(new RegExp("[\\s]*", "suy"));
10895
- var $R102 = (0, import_lib2.$R)(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?", "suy"));
10896
- var $R103 = (0, import_lib2.$R)(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy"));
10897
- var $R104 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy"));
10898
- var $R105 = (0, import_lib2.$R)(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
10899
- var $R106 = (0, import_lib2.$R)(new RegExp("[^]*", "suy"));
11028
+ var $R0 = (0, import_lib2.$R)(/(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)/suy);
11029
+ var $R1 = (0, import_lib2.$R)(/&(?=\s)/suy);
11030
+ var $R2 = (0, import_lib2.$R)(/(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\p{ID_Continue}|[\u200C\u200D$])/suy);
11031
+ var $R3 = (0, import_lib2.$R)(/[0-9]/suy);
11032
+ var $R4 = (0, import_lib2.$R)(/(?!\p{ID_Start}|[_$0-9(\[{])/suy);
11033
+ var $R5 = (0, import_lib2.$R)(/[ \t]/suy);
11034
+ var $R6 = (0, import_lib2.$R)(/\p{ID_Continue}|[\u200C\u200D$.#{=]/suy);
11035
+ var $R7 = (0, import_lib2.$R)(/[&=]/suy);
11036
+ var $R8 = (0, import_lib2.$R)(/[@#]/suy);
11037
+ var $R9 = (0, import_lib2.$R)(/(?=['"`])/suy);
11038
+ var $R10 = (0, import_lib2.$R)(/(?=[\/?])/suy);
11039
+ var $R11 = (0, import_lib2.$R)(/(?=[\/\[{?.!@#'’:])/suy);
11040
+ var $R12 = (0, import_lib2.$R)(/%%?/suy);
11041
+ var $R13 = (0, import_lib2.$R)(/[.\s]/suy);
11042
+ var $R14 = (0, import_lib2.$R)(/[)\]}]/suy);
11043
+ var $R15 = (0, import_lib2.$R)(/[+-]/suy);
11044
+ var $R16 = (0, import_lib2.$R)(/\+\+|--|⧺|—|[\+\-&]\S/suy);
11045
+ var $R17 = (0, import_lib2.$R)(/(?=[0-9.'"tfyno])/suy);
11046
+ var $R18 = (0, import_lib2.$R)(/(?=true|false|yes|no|on|off)/suy);
11047
+ var $R19 = (0, import_lib2.$R)(/(?=\[|\s*[.•\/])/suy);
11048
+ var $R20 = (0, import_lib2.$R)(/([<>])(=?)|([≤≥])/suy);
11049
+ var $R21 = (0, import_lib2.$R)(/[ \t]*/suy);
11050
+ var $R22 = (0, import_lib2.$R)(/[ \t]+/suy);
11051
+ var $R23 = (0, import_lib2.$R)(/[!+-]?/suy);
11052
+ var $R24 = (0, import_lib2.$R)(/(?:\p{ID_Continue}|[\u200C\u200D$-])*/suy);
11053
+ var $R25 = (0, import_lib2.$R)(/[=>]/suy);
11054
+ var $R26 = (0, import_lib2.$R)(/(?=\p{ID_Start}|[_$^≪≫⋙≤≥∈∋∉∌≣≡≢≠=⩶⩵‖⁇&|*\/!?%÷<>⧺+-])/suy);
11055
+ var $R27 = (0, import_lib2.$R)(/!\^\^?/suy);
11056
+ var $R28 = (0, import_lib2.$R)(/(?!\+\+|--)[!~+-](?!\s)/suy);
11057
+ var $R29 = (0, import_lib2.$R)(/[:.]/suy);
11058
+ var $R30 = (0, import_lib2.$R)(/(?=for|if|loop|unless|until|while)/suy);
11059
+ var $R31 = (0, import_lib2.$R)(/(?:loop|while|until|for|do)(?!\p{ID_Continue})/suy);
11060
+ var $R32 = (0, import_lib2.$R)(/(?=loop|comptime|do|for|until|while)/suy);
11061
+ var $R33 = (0, import_lib2.$R)(/\s/suy);
11062
+ var $R34 = (0, import_lib2.$R)(/[^;"'\s=>]+/suy);
11063
+ var $R35 = (0, import_lib2.$R)(/(?=[0-9.])/suy);
11064
+ var $R36 = (0, import_lib2.$R)(/(?:0|[1-9](?:_[0-9]|[0-9])*)n/suy);
11065
+ var $R37 = (0, import_lib2.$R)(/(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\.(?:\p{ID_Start}|[_$]))/suy);
11066
+ var $R38 = (0, import_lib2.$R)(/(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\.(?:[0-9](?:_[0-9]|[0-9])*))?/suy);
11067
+ var $R39 = (0, import_lib2.$R)(/(?:\.[0-9](?:_[0-9]|[0-9])*)/suy);
11068
+ var $R40 = (0, import_lib2.$R)(/(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)/suy);
11069
+ var $R41 = (0, import_lib2.$R)(/0[bB][01](?:[01]|_[01])*n?/suy);
11070
+ var $R42 = (0, import_lib2.$R)(/0[oO][0-7](?:[0-7]|_[0-7])*n?/suy);
11071
+ var $R43 = (0, import_lib2.$R)(/0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?/suy);
11072
+ var $R44 = (0, import_lib2.$R)(/(?=[0-9])/suy);
11073
+ var $R45 = (0, import_lib2.$R)(/(?:0|[1-9](?:_[0-9]|[0-9])*)/suy);
11074
+ var $R46 = (0, import_lib2.$R)(/(?:\\.|[^"])*/suy);
11075
+ var $R47 = (0, import_lib2.$R)(/(?:\\.|[^'])*/suy);
11076
+ var $R48 = (0, import_lib2.$R)(/(?:\\.|[^"\n])*/suy);
11077
+ var $R49 = (0, import_lib2.$R)(/(?:\\.|[^'\n])*/suy);
11078
+ var $R50 = (0, import_lib2.$R)(/(?:"(?!"")|#(?!\{)|\\.|[^#"])+/suy);
11079
+ var $R51 = (0, import_lib2.$R)(/(?:"(?!"")|\\.|[^"])+/suy);
11080
+ var $R52 = (0, import_lib2.$R)(/(?:'(?!'')|\\.|[^'])*/suy);
11081
+ var $R53 = (0, import_lib2.$R)(/(?:\\.|#(?!\{)|[^"#])+/suy);
11082
+ var $R54 = (0, import_lib2.$R)(/(?:\\.|[^\]])*/suy);
11083
+ var $R55 = (0, import_lib2.$R)(/\\./suy);
11084
+ var $R56 = (0, import_lib2.$R)(/[\s]+/suy);
11085
+ var $R57 = (0, import_lib2.$R)(/\/(?!\/\/)/suy);
11086
+ var $R58 = (0, import_lib2.$R)(/[^[\/\s#$\\]+|[#$]/suy);
11087
+ var $R59 = (0, import_lib2.$R)(/[*\/\r\n]/suy);
11088
+ var $R60 = (0, import_lib2.$R)(/(?:\\.|[^[\/\r\n])+/suy);
11089
+ var $R61 = (0, import_lib2.$R)(/(?:\p{ID_Continue}|[\u200C\u200D$])*/suy);
11090
+ var $R62 = (0, import_lib2.$R)(/(?=[`'"])/suy);
11091
+ var $R63 = (0, import_lib2.$R)(/(?:\$(?!\{)|\\.|[^$`])+/suy);
11092
+ var $R64 = (0, import_lib2.$R)(/(?:\$(?!\{)|`(?!``)|\\.|[^$`])+/suy);
11093
+ var $R65 = (0, import_lib2.$R)(/(?:off|yes|on|no)/suy);
11094
+ var $R66 = (0, import_lib2.$R)(/isnt/suy);
11095
+ var $R67 = (0, import_lib2.$R)(/by/suy);
11096
+ var $R68 = (0, import_lib2.$R)(/of/suy);
11097
+ 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);
11098
+ var $R70 = (0, import_lib2.$R)(/(?=\/|#)/suy);
11099
+ var $R71 = (0, import_lib2.$R)(/\/\/(?!\/(?!\/))[^\r\n]*/suy);
11100
+ var $R72 = (0, import_lib2.$R)(/./suy);
11101
+ var $R73 = (0, import_lib2.$R)(/#(?!##(?!#))([^\r\n]*)/suy);
11102
+ var $R74 = (0, import_lib2.$R)(/[^]*?###/suy);
11103
+ var $R75 = (0, import_lib2.$R)(/###(?!#)/suy);
11104
+ var $R76 = (0, import_lib2.$R)(/\/\*(?:(?!\*\/)[^\r\n])*\*\//suy);
11105
+ var $R77 = (0, import_lib2.$R)(/(?=[ \t\/\\#])/suy);
11106
+ var $R78 = (0, import_lib2.$R)(/(?=\s|\/|#)/suy);
11107
+ var $R79 = (0, import_lib2.$R)(/[=:]/suy);
11108
+ var $R80 = (0, import_lib2.$R)(/['’]s/suy);
11109
+ var $R81 = (0, import_lib2.$R)(/(?=[<])/suy);
11110
+ var $R82 = (0, import_lib2.$R)(/(?:\p{ID_Start}|[_$])(?:\p{ID_Continue}|[\u200C\u200D$-])*/suy);
11111
+ var $R83 = (0, import_lib2.$R)(/[!+-]/suy);
11112
+ var $R84 = (0, import_lib2.$R)(/[\s>]|\/>/suy);
11113
+ var $R85 = (0, import_lib2.$R)(/(?:[\w\-:]+|\([^()]*\)|\[[^\[\]]*\])+/suy);
11114
+ var $R86 = (0, import_lib2.$R)(/"[^"]*"|'[^']*'/suy);
11115
+ var $R87 = (0, import_lib2.$R)(/[<>]/suy);
11116
+ var $R88 = (0, import_lib2.$R)(/[!~+-](?!\s|[!~+-]*&)/suy);
11117
+ var $R89 = (0, import_lib2.$R)(/(?:-[^-]|[^-]*)*/suy);
11118
+ var $R90 = (0, import_lib2.$R)(/[^{}<>\r\n]+/suy);
11119
+ var $R91 = (0, import_lib2.$R)(/[+-]?/suy);
11120
+ var $R92 = (0, import_lib2.$R)(/(?=if|unless)/suy);
11121
+ var $R93 = (0, import_lib2.$R)(/[|&<!=\-⇒→]/suy);
11122
+ var $R94 = (0, import_lib2.$R)(/(extends|not|is)(?!\p{ID_Continue}|[\u200C\u200D$])/suy);
11123
+ var $R95 = (0, import_lib2.$R)(/const|in|out/suy);
11124
+ var $R96 = (0, import_lib2.$R)(/#![^\r\n]*/suy);
11125
+ var $R97 = (0, import_lib2.$R)(/[\t ]*/suy);
11126
+ var $R98 = (0, import_lib2.$R)(/[\s]*/suy);
11127
+ var $R99 = (0, import_lib2.$R)(/\s+([+-]?)([a-zA-Z0-9-]+)(\s*=\s*([\p{ID_Continue}.,+-]*))?/suy);
11128
+ var $R100 = (0, import_lib2.$R)(/\/\/\/[^\r\n]*/suy);
11129
+ var $R101 = (0, import_lib2.$R)(/(?=[ \t\r\n\/#]|$)/suy);
11130
+ var $R102 = (0, import_lib2.$R)(/\r\n|\n|\r|$/suy);
11131
+ var $R103 = (0, import_lib2.$R)(/[^]*/suy);
11132
+ var $RD0 = (($$ctx, $$state) => {
11133
+ const $$source = `(?=\\p{ID_Start}|[_$\\\\]|${nonAsciiIdentifierPattern})`;
11134
+ $RD0 = (0, import_lib2.$R)(new RegExp($$source, "suy"));
11135
+ $RD0.source = $$source;
11136
+ return $RD0($$ctx, $$state);
11137
+ });
11138
+ var $RD1 = (($$ctx, $$state) => {
11139
+ const $$source = `(?:\\p{ID_Start}|[_$]|${unicodeEscapePattern}|${nonAsciiIdentifierPattern})(?:\\p{ID_Continue}|[\\u200C\\u200D$]|${unicodeEscapePattern}|${nonAsciiIdentifierPattern})*`;
11140
+ $RD1 = (0, import_lib2.$R)(new RegExp($$source, "suy"));
11141
+ $RD1.source = $$source;
11142
+ return $RD1($$ctx, $$state);
11143
+ });
11144
+ var $RD2 = (($$ctx, $$state) => {
11145
+ const $$source = `(?!\\p{ID_Continue}|${nonAsciiIdentifierPattern})`;
11146
+ $RD2 = (0, import_lib2.$R)(new RegExp($$source, "suy"));
11147
+ $RD2.source = $$source;
11148
+ return $RD2($$ctx, $$state);
11149
+ });
10900
11150
  var Program$parser = (0, import_lib2.$S)(Reset, Init, (0, import_lib2.$E)(EOS), TopLevelStatements, __);
10901
11151
  function Program($$ctx, $$state) {
10902
11152
  const $$entered = $$ctx.enter?.("Program", $$state);
@@ -12944,7 +13194,7 @@ function TrailingPostfix($$ctx, $$state) {
12944
13194
  $$ctx.exit?.("TrailingPostfix", $$state, $$final, $$eventData);
12945
13195
  return $$final;
12946
13196
  }
12947
- 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));
13197
+ 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)));
12948
13198
  function FatArrowBody$0($$ctx, $$state) {
12949
13199
  const $$r = FatArrowBody$0$parser($$ctx, $$state);
12950
13200
  if (!$$r) {
@@ -14060,7 +14310,7 @@ function ClassBracedContent($$ctx, $$state) {
14060
14310
  $$ctx.exit?.("ClassBracedContent", $$state, $$final, $$eventData);
14061
14311
  return $$final;
14062
14312
  }
14063
- var NestedClassElements$parser = (0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedClassElement), PopIndent);
14313
+ var NestedClassElements$parser = (0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedClassElement), (0, import_lib2.$Q)(TrailingNestedCommentLine), PopIndent);
14064
14314
  function NestedClassElements($$ctx, $$state) {
14065
14315
  const $$entered = $$ctx.enter?.("NestedClassElements", $$state);
14066
14316
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -14070,12 +14320,13 @@ function NestedClassElements($$ctx, $$state) {
14070
14320
  $$ctx.exit?.("NestedClassElements", $$state, void 0, $$eventData);
14071
14321
  return void 0;
14072
14322
  }
14073
- const $$m = (function(elements) {
14074
- if (!elements.length) {
14323
+ const $$value = $$r.value;
14324
+ const $$m = (function(elements, trailing) {
14325
+ if (!(elements.length || trailing.length)) {
14075
14326
  return $skip;
14076
14327
  }
14077
- return elements;
14078
- })($$r.value[1]);
14328
+ return trailing.length ? [...elements, ...trailing] : elements;
14329
+ })($$value[1], $$value[2]);
14079
14330
  const $$final = $$m !== import_lib2.SKIP ? ($$r.value = $$m, $$r) : void 0;
14080
14331
  $$ctx.exit?.("NestedClassElements", $$state, $$final, $$eventData);
14081
14332
  return $$final;
@@ -16407,7 +16658,10 @@ function ArrayBindingPattern($$ctx, $$state) {
16407
16658
  ...c,
16408
16659
  // names, blockPrefix, length
16409
16660
  type: "ArrayBindingPattern",
16410
- elements: c.children,
16661
+ // `c.elements` may differ from `c.children` when adjustBindingElements
16662
+ // omits an anonymous rest from the emitted destructure but still needs
16663
+ // pattern matching / type generation to see it.
16664
+ elements: c.elements ?? c.children,
16411
16665
  children: [ws1, open, c.children, ws2, close]
16412
16666
  });
16413
16667
  })($$value[0], $$value[1], $$value[2], $$value[3], $$value[4]);
@@ -16426,7 +16680,7 @@ function ArrayBindingPatternContent$1($$ctx, $$state) {
16426
16680
  }
16427
16681
  const $$m = (function(elements) {
16428
16682
  if (!elements) {
16429
- return { children: [], names: [], length: 0 };
16683
+ return { children: [], elements: void 0, names: [], length: 0 };
16430
16684
  }
16431
16685
  return adjustBindingElements(elements);
16432
16686
  })($$r.value);
@@ -17644,8 +17898,9 @@ function ThenClause($$ctx, $$state) {
17644
17898
  }
17645
17899
  var ThenBlock$0$parser = (0, import_lib2.$S)(NoBlock, EmptyBlock);
17646
17900
  var ThenBlock$1$parser = ImplicitNestedBlock;
17647
- var ThenBlock$2$parser = ObjectSingleLineStatements;
17648
- var ThenBlock$3$parser = SingleLineStatements;
17901
+ var ThenBlock$2$parser = (0, import_lib2.$S)(ESBraceBlockEnabled, ExplicitBlock);
17902
+ var ThenBlock$3$parser = (0, import_lib2.$S)((0, import_lib2.$N)(ESBraceBlockEnabled), ObjectSingleLineStatements);
17903
+ var ThenBlock$4$parser = SingleLineStatements;
17649
17904
  function ThenBlock$0($$ctx, $$state) {
17650
17905
  const $$r = ThenBlock$0$parser($$ctx, $$state);
17651
17906
  if (!$$r) {
@@ -17661,16 +17916,35 @@ function ThenBlock$1($$ctx, $$state) {
17661
17916
  return ThenBlock$1$parser($$ctx, $$state);
17662
17917
  }
17663
17918
  function ThenBlock$2($$ctx, $$state) {
17664
- return ThenBlock$2$parser($$ctx, $$state);
17919
+ const $$r = ThenBlock$2$parser($$ctx, $$state);
17920
+ if (!$$r) {
17921
+ return void 0;
17922
+ }
17923
+ const $$m = /* @__PURE__ */ (function($2) {
17924
+ return $2;
17925
+ })($$r.value[1]);
17926
+ $$r.value = $$m;
17927
+ return $$r;
17665
17928
  }
17666
17929
  function ThenBlock$3($$ctx, $$state) {
17667
- return ThenBlock$3$parser($$ctx, $$state);
17930
+ const $$r = ThenBlock$3$parser($$ctx, $$state);
17931
+ if (!$$r) {
17932
+ return void 0;
17933
+ }
17934
+ const $$m = /* @__PURE__ */ (function($2) {
17935
+ return $2;
17936
+ })($$r.value[1]);
17937
+ $$r.value = $$m;
17938
+ return $$r;
17939
+ }
17940
+ function ThenBlock$4($$ctx, $$state) {
17941
+ return ThenBlock$4$parser($$ctx, $$state);
17668
17942
  }
17669
17943
  function ThenBlock($$ctx, $$state) {
17670
17944
  const $$entered = $$ctx.enter?.("ThenBlock", $$state);
17671
17945
  if ($$entered && "cache" in $$entered) return $$entered.cache;
17672
17946
  const $$eventData = $$entered?.data;
17673
- const $$final = ThenBlock$0($$ctx, $$state) || ThenBlock$1($$ctx, $$state) || ThenBlock$2($$ctx, $$state) || ThenBlock$3($$ctx, $$state);
17947
+ const $$final = ThenBlock$0($$ctx, $$state) || ThenBlock$1($$ctx, $$state) || ThenBlock$2($$ctx, $$state) || ThenBlock$3($$ctx, $$state) || ThenBlock$4($$ctx, $$state);
17674
17948
  $$ctx.exit?.("ThenBlock", $$state, $$final, $$eventData);
17675
17949
  return $$final;
17676
17950
  }
@@ -17795,11 +18069,19 @@ function BlockOrEmptyStatement($$ctx, $$state) {
17795
18069
  $$ctx.exit?.("BlockOrEmptyStatement", $$state, $$final, $$eventData);
17796
18070
  return $$final;
17797
18071
  }
17798
- var BlockOrEmpty$0$parser = ObjectSingleLineStatements;
18072
+ var BlockOrEmpty$0$parser = (0, import_lib2.$S)((0, import_lib2.$N)(ESBraceBlockEnabled), ObjectSingleLineStatements);
17799
18073
  var BlockOrEmpty$1$parser = Block;
17800
18074
  var BlockOrEmpty$2$parser = (0, import_lib2.$S)(NoBlock, EmptyBlock);
17801
18075
  function BlockOrEmpty$0($$ctx, $$state) {
17802
- return BlockOrEmpty$0$parser($$ctx, $$state);
18076
+ const $$r = BlockOrEmpty$0$parser($$ctx, $$state);
18077
+ if (!$$r) {
18078
+ return void 0;
18079
+ }
18080
+ const $$m = /* @__PURE__ */ (function($2) {
18081
+ return $2;
18082
+ })($$r.value[1]);
18083
+ $$r.value = $$m;
18084
+ return $$r;
17803
18085
  }
17804
18086
  function BlockOrEmpty$1($$ctx, $$state) {
17805
18087
  return BlockOrEmpty$1$parser($$ctx, $$state);
@@ -18169,7 +18451,7 @@ function PostfixedSingleLineNoCommaStatements($$ctx, $$state) {
18169
18451
  $$ctx.exit?.("PostfixedSingleLineNoCommaStatements", $$state, $$r, $$eventData);
18170
18452
  return $$r;
18171
18453
  }
18172
- var NestedBlockStatements$parser = (0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedBlockStatement), PopIndent);
18454
+ var NestedBlockStatements$parser = (0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedBlockStatement), TrailingNestedComments, PopIndent);
18173
18455
  function NestedBlockStatements($$ctx, $$state) {
18174
18456
  const $$entered = $$ctx.enter?.("NestedBlockStatements", $$state);
18175
18457
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -18179,18 +18461,24 @@ function NestedBlockStatements($$ctx, $$state) {
18179
18461
  $$ctx.exit?.("NestedBlockStatements", $$state, void 0, $$eventData);
18180
18462
  return void 0;
18181
18463
  }
18182
- const $$m = (function(statements) {
18183
- if (!statements.length) {
18464
+ const $$value = $$r.value;
18465
+ const $$m = (function(statements, trailing) {
18466
+ if (!(statements.length || trailing.length)) {
18184
18467
  return $skip;
18185
18468
  }
18186
- statements = statements.flat();
18469
+ const expressions = statements.flat();
18470
+ const children = [expressions];
18471
+ if (trailing.length) {
18472
+ children.push(trailing);
18473
+ }
18187
18474
  return {
18188
18475
  type: "BlockStatement",
18189
- expressions: statements,
18190
- children: [statements],
18191
- bare: true
18476
+ expressions,
18477
+ children,
18478
+ bare: true,
18479
+ trailing: trailing.length ? trailing : void 0
18192
18480
  };
18193
- })($$r.value[1]);
18481
+ })($$value[1], $$value[2]);
18194
18482
  const $$final = $$m !== import_lib2.SKIP ? ($$r.value = $$m, $$r) : void 0;
18195
18483
  $$ctx.exit?.("NestedBlockStatements", $$state, $$final, $$eventData);
18196
18484
  return $$final;
@@ -18216,6 +18504,70 @@ function NestedBlockStatement($$ctx, $$state) {
18216
18504
  $$ctx.exit?.("NestedBlockStatement", $$state, $$r, $$eventData);
18217
18505
  return $$r;
18218
18506
  }
18507
+ var TrailingNestedComments$parser = (0, import_lib2.$S)((0, import_lib2.$E)(TrailingInlineComment), (0, import_lib2.$Q)(TrailingNestedCommentLine));
18508
+ function TrailingNestedComments($$ctx, $$state) {
18509
+ const $$entered = $$ctx.enter?.("TrailingNestedComments", $$state);
18510
+ if ($$entered && "cache" in $$entered) return $$entered.cache;
18511
+ const $$eventData = $$entered?.data;
18512
+ const $$r = TrailingNestedComments$parser($$ctx, $$state);
18513
+ if (!$$r) {
18514
+ $$ctx.exit?.("TrailingNestedComments", $$state, void 0, $$eventData);
18515
+ return void 0;
18516
+ }
18517
+ const $$value = $$r.value;
18518
+ const $$m = (function(inline, lines) {
18519
+ const out = [];
18520
+ if (inline) {
18521
+ out.push(inline);
18522
+ }
18523
+ if (lines.length) {
18524
+ out.push(...lines);
18525
+ }
18526
+ return out;
18527
+ })($$value[0], $$value[1]);
18528
+ $$r.value = $$m;
18529
+ $$ctx.exit?.("TrailingNestedComments", $$state, $$r, $$eventData);
18530
+ return $$r;
18531
+ }
18532
+ var TrailingInlineComment$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), SingleLineComment);
18533
+ function TrailingInlineComment($$ctx, $$state) {
18534
+ const $$entered = $$ctx.enter?.("TrailingInlineComment", $$state);
18535
+ if ($$entered && "cache" in $$entered) return $$entered.cache;
18536
+ const $$eventData = $$entered?.data;
18537
+ const $$r = TrailingInlineComment$parser($$ctx, $$state);
18538
+ if (!$$r) {
18539
+ $$ctx.exit?.("TrailingInlineComment", $$state, void 0, $$eventData);
18540
+ return void 0;
18541
+ }
18542
+ const $$value = $$r.value;
18543
+ const $$m = /* @__PURE__ */ (function(ws, c) {
18544
+ return [ws, c];
18545
+ })($$value[0], $$value[1]);
18546
+ $$r.value = $$m;
18547
+ $$ctx.exit?.("TrailingInlineComment", $$state, $$r, $$eventData);
18548
+ return $$r;
18549
+ }
18550
+ var TrailingNestedCommentLine$parser = (0, import_lib2.$S)(EOL, Indent, SingleLineComment);
18551
+ function TrailingNestedCommentLine($$ctx, $$state) {
18552
+ const $$entered = $$ctx.enter?.("TrailingNestedCommentLine", $$state);
18553
+ if ($$entered && "cache" in $$entered) return $$entered.cache;
18554
+ const $$eventData = $$entered?.data;
18555
+ const $$r = TrailingNestedCommentLine$parser($$ctx, $$state);
18556
+ if (!$$r) {
18557
+ $$ctx.exit?.("TrailingNestedCommentLine", $$state, void 0, $$eventData);
18558
+ return void 0;
18559
+ }
18560
+ const $$value = $$r.value;
18561
+ const $$m = (function(eol, indent, c) {
18562
+ if (!(indent.level >= state.currentIndent.level)) {
18563
+ return $skip;
18564
+ }
18565
+ return [eol, indent, c];
18566
+ })($$value[0], $$value[1], $$value[2]);
18567
+ const $$final = $$m !== import_lib2.SKIP ? ($$r.value = $$m, $$r) : void 0;
18568
+ $$ctx.exit?.("TrailingNestedCommentLine", $$state, $$final, $$eventData);
18569
+ return $$final;
18570
+ }
18219
18571
  var BlockStatementPart$parser = (0, import_lib2.$S)((0, import_lib2.$N)(EOS), (0, import_lib2.$E)(_), StatementListItem, StatementDelimiter);
18220
18572
  function BlockStatementPart($$ctx, $$state) {
18221
18573
  const $$entered = $$ctx.enter?.("BlockStatementPart", $$state);
@@ -18455,7 +18807,7 @@ function SymbolElement($$ctx, $$state) {
18455
18807
  $$ctx.exit?.("SymbolElement", $$state, $$r, $$eventData);
18456
18808
  return $$r;
18457
18809
  }
18458
- var Identifier$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R19, "Identifier /(?=\\p{ID_Start}|[_$\\\\]|[^\\u0000-\\u007F\\p{ID_Continue}\\s\xF7\u2014\u2016\u2019\u2022\u2025\u2026\u2047\u2192\u21D2\u2208\u2209\u220B\u220C\u2254\u2260\u2261\u2262\u2263\u2264\u2265\u226A\u226B\u22D9\u25B7\u29FA\u2A75\u2A76])/"), (0, import_lib2.$N)(ReservedWord), IdentifierName);
18810
+ var Identifier$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($RD0, () => `Identifier /${$RD0.source}/`), (0, import_lib2.$N)(ReservedWord), IdentifierName);
18459
18811
  function Identifier($$ctx, $$state) {
18460
18812
  const $$entered = $$ctx.enter?.("Identifier", $$state);
18461
18813
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -18472,7 +18824,7 @@ function Identifier($$ctx, $$state) {
18472
18824
  $$ctx.exit?.("Identifier", $$state, $$r, $$eventData);
18473
18825
  return $$r;
18474
18826
  }
18475
- var IdentifierName$parser = (0, import_lib2.$EXPECT)($R20, "IdentifierName /(?:\\p{ID_Start}|[_$]|\\\\u\\{0*(?:[\\dA-Fa-f]{1,5}|10[\\dA-Fa-f]{4})\\}|\\\\u[\\dA-Fa-f]{4}|[^\\u0000-\\u007F\\p{ID_Continue}\\s\xF7\u2014\u2016\u2019\u2022\u2025\u2026\u2047\u2192\u21D2\u2208\u2209\u220B\u220C\u2254\u2260\u2261\u2262\u2263\u2264\u2265\u226A\u226B\u22D9\u25B7\u29FA\u2A75\u2A76])(?:\\p{ID_Continue}|[\\u200C\\u200D$]|\\\\u\\{0*(?:[\\dA-Fa-f]{1,5}|10[\\dA-Fa-f]{4})\\}|\\\\u[\\dA-Fa-f]{4}|[^\\u0000-\\u007F\\p{ID_Continue}\\s\xF7\u2014\u2016\u2019\u2022\u2025\u2026\u2047\u2192\u21D2\u2208\u2209\u220B\u220C\u2254\u2260\u2261\u2262\u2263\u2264\u2265\u226A\u226B\u22D9\u25B7\u29FA\u2A75\u2A76])*/");
18827
+ var IdentifierName$parser = (0, import_lib2.$EXPECT)($RD1, () => `IdentifierName /${$RD1.source}/`);
18476
18828
  function IdentifierName($$ctx, $$state) {
18477
18829
  const $$entered = $$ctx.enter?.("IdentifierName", $$state);
18478
18830
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -18520,7 +18872,7 @@ function UpcomingAssignment($$ctx, $$state) {
18520
18872
  $$ctx.exit?.("UpcomingAssignment", $$state, $$final, $$eventData);
18521
18873
  return $$final;
18522
18874
  }
18523
- var ArrayLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R21, "ArrayLiteral /(?=\\[|\\s*[.\u2022\\/])/"), _ArrayLiteral);
18875
+ var ArrayLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R19, "ArrayLiteral /(?=\\[|\\s*[.\u2022\\/])/"), _ArrayLiteral);
18524
18876
  function ArrayLiteral($$ctx, $$state) {
18525
18877
  const $$entered = $$ctx.enter?.("ArrayLiteral", $$state);
18526
18878
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -18702,7 +19054,7 @@ function OptionalRangeEnd($$ctx, $$state) {
18702
19054
  $$ctx.exit?.("OptionalRangeEnd", $$state, $$final, $$eventData);
18703
19055
  return $$final;
18704
19056
  }
18705
- var RangeEnd$parser = (0, import_lib2.$EXPECT)($R22, "RangeEnd /([<>])(=?)|([\u2264\u2265])/");
19057
+ var RangeEnd$parser = (0, import_lib2.$EXPECT)($R20, "RangeEnd /([<>])(=?)|([\u2264\u2265])/");
18706
19058
  function RangeEnd($$ctx, $$state) {
18707
19059
  const $$entered = $$ctx.enter?.("RangeEnd", $$state);
18708
19060
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -19237,8 +19589,8 @@ function BulletIndent($$ctx, $$state) {
19237
19589
  $$ctx.exit?.("BulletIndent", $$state, $$r, $$eventData);
19238
19590
  return $$r;
19239
19591
  }
19240
- var Bullet$0$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L46, 'Bullet "\u2022"'), (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R23, "Bullet /[ \\t]*/")));
19241
- var Bullet$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L7, 'Bullet "."'), (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R24, "Bullet /[ \\t]+/")));
19592
+ 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]*/")));
19593
+ 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]+/")));
19242
19594
  function Bullet$0($$ctx, $$state) {
19243
19595
  return Bullet$0$parser($$ctx, $$state);
19244
19596
  }
@@ -19677,7 +20029,7 @@ function ObjectPropertyDelimiter($$ctx, $$state) {
19677
20029
  }
19678
20030
  var PropertyDefinition$0$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), InsertDotDotDot, IterationExpression);
19679
20031
  var PropertyDefinition$1$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), NamedProperty);
19680
- var PropertyDefinition$2$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R25, "PropertyDefinition /[!+-]?/")), PropertyName, (0, import_lib2.$Y)(ObjectPropertyDelimiter));
20032
+ 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));
19681
20033
  var PropertyDefinition$3$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), MethodDefinition);
19682
20034
  var PropertyDefinition$4$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), DotDotDot, Expression);
19683
20035
  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));
@@ -19979,7 +20331,7 @@ function SnugNamedProperty($$ctx, $$state) {
19979
20331
  $$ctx.exit?.("SnugNamedProperty", $$state, $$r, $$eventData);
19980
20332
  return $$r;
19981
20333
  }
19982
- 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)($R26, "PropertyName /(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/")));
20334
+ 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$-])*/")));
19983
20335
  var PropertyName$4$parser = IdentifierName;
19984
20336
  function PropertyName$0($$ctx, $$state) {
19985
20337
  return NumericLiteral($$ctx, $$state);
@@ -20570,7 +20922,7 @@ var AssignmentOpSymbol$20$parser = (0, import_lib2.$EXPECT)($L68, 'AssignmentOpS
20570
20922
  var AssignmentOpSymbol$21$parser = (0, import_lib2.$EXPECT)($L69, 'AssignmentOpSymbol "??="');
20571
20923
  var AssignmentOpSymbol$22$parser = (0, import_lib2.$EXPECT)($L70, 'AssignmentOpSymbol "\u2047="');
20572
20924
  var AssignmentOpSymbol$23$parser = (0, import_lib2.$EXPECT)($L71, 'AssignmentOpSymbol "?="');
20573
- var AssignmentOpSymbol$24$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L3, 'AssignmentOpSymbol "="'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R27, "AssignmentOpSymbol /[=>]/")));
20925
+ var AssignmentOpSymbol$24$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L3, 'AssignmentOpSymbol "="'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R25, "AssignmentOpSymbol /[=>]/")));
20574
20926
  var AssignmentOpSymbol$25$parser = (0, import_lib2.$S)(CoffeeWordAssignmentOp);
20575
20927
  function AssignmentOpSymbol$0($$ctx, $$state) {
20576
20928
  return AssignmentOpSymbol$0$parser($$ctx, $$state);
@@ -20852,7 +21204,7 @@ function IdentifierBinaryOp($$ctx, $$state) {
20852
21204
  $$ctx.exit?.("IdentifierBinaryOp", $$state, $$final, $$eventData);
20853
21205
  return $$final;
20854
21206
  }
20855
- var BinaryOp$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R28, "BinaryOp /(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])/"), _BinaryOp);
21207
+ 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);
20856
21208
  function BinaryOp($$ctx, $$state) {
20857
21209
  const $$entered = $$ctx.enter?.("BinaryOp", $$state);
20858
21210
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -20935,7 +21287,7 @@ var BinaryOpSymbol$0$parser = (0, import_lib2.$EXPECT)($L75, 'BinaryOpSymbol "**
20935
21287
  var BinaryOpSymbol$1$parser = (0, import_lib2.$EXPECT)($L74, 'BinaryOpSymbol "*"');
20936
21288
  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 "//"')));
20937
21289
  var BinaryOpSymbol$3$parser = (0, import_lib2.$EXPECT)($L52, 'BinaryOpSymbol "%%"');
20938
- var BinaryOpSymbol$4$parser = (0, import_lib2.$EXPECT)($L76, 'BinaryOpSymbol "/"');
21290
+ var BinaryOpSymbol$4$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L76, 'BinaryOpSymbol "/"'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L76, 'BinaryOpSymbol "/"')));
20939
21291
  var BinaryOpSymbol$5$parser = (0, import_lib2.$EXPECT)($L77, 'BinaryOpSymbol "%"');
20940
21292
  var BinaryOpSymbol$6$parser = (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L9, 'BinaryOpSymbol "++"'), (0, import_lib2.$EXPECT)($L11, 'BinaryOpSymbol "\u29FA"'));
20941
21293
  var BinaryOpSymbol$7$parser = (0, import_lib2.$EXPECT)($L78, 'BinaryOpSymbol "+"');
@@ -20967,7 +21319,7 @@ var BinaryOpSymbol$32$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L10
20967
21319
  var BinaryOpSymbol$33$parser = (0, import_lib2.$EXPECT)($L104, 'BinaryOpSymbol "||"');
20968
21320
  var BinaryOpSymbol$34$parser = (0, import_lib2.$EXPECT)($L105, 'BinaryOpSymbol "\u2016"');
20969
21321
  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));
20970
- var BinaryOpSymbol$36$parser = (0, import_lib2.$C)((0, import_lib2.$EXPECT)($R29, "BinaryOpSymbol /!\\^\\^?/"), (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L108, 'BinaryOpSymbol "xnor"'), NonIdContinue));
21322
+ 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));
20971
21323
  var BinaryOpSymbol$37$parser = (0, import_lib2.$EXPECT)($L109, 'BinaryOpSymbol "??"');
20972
21324
  var BinaryOpSymbol$38$parser = (0, import_lib2.$EXPECT)($L110, 'BinaryOpSymbol "\u2047"');
20973
21325
  var BinaryOpSymbol$39$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L6, 'BinaryOpSymbol "?"'), CoffeeBinaryExistentialEnabled);
@@ -21020,7 +21372,15 @@ function BinaryOpSymbol$3($$ctx, $$state) {
21020
21372
  return $$r;
21021
21373
  }
21022
21374
  function BinaryOpSymbol$4($$ctx, $$state) {
21023
- return BinaryOpSymbol$4$parser($$ctx, $$state);
21375
+ const $$r = BinaryOpSymbol$4$parser($$ctx, $$state);
21376
+ if (!$$r) {
21377
+ return void 0;
21378
+ }
21379
+ const $$m = /* @__PURE__ */ (function($1) {
21380
+ return $1;
21381
+ })($$r.value[0]);
21382
+ $$r.value = $$m;
21383
+ return $$r;
21024
21384
  }
21025
21385
  function BinaryOpSymbol$5($$ctx, $$state) {
21026
21386
  return BinaryOpSymbol$5$parser($$ctx, $$state);
@@ -21650,7 +22010,7 @@ function Xor($$ctx, $$state) {
21650
22010
  $$ctx.exit?.("Xor", $$state, $$final, $$eventData);
21651
22011
  return $$final;
21652
22012
  }
21653
- var Xnor$0$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R29, "Xnor /!\\^\\^?/"));
22013
+ var Xnor$0$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R27, "Xnor /!\\^\\^?/"));
21654
22014
  var Xnor$1$parser = (0, import_lib2.$EXPECT)($L108, 'Xnor "xnor"');
21655
22015
  function Xnor$0($$ctx, $$state) {
21656
22016
  return Xnor$0$parser($$ctx, $$state);
@@ -21666,9 +22026,9 @@ function Xnor($$ctx, $$state) {
21666
22026
  $$ctx.exit?.("Xnor", $$state, $$final, $$eventData);
21667
22027
  return $$final;
21668
22028
  }
21669
- var UnaryOp$0$parser = (0, import_lib2.$EXPECT)($R30, "UnaryOp /(?!\\+\\+|--)[!~+-](?!\\s)/");
21670
- var UnaryOp$2$parser = (0, import_lib2.$S)((0, import_lib2.$C)(Delete, Void, Typeof), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R31, "UnaryOp /[:.]/")), (0, import_lib2.$E)(_));
21671
- var UnaryOp$3$parser = (0, import_lib2.$S)(Not, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R31, "UnaryOp /[:.]/")), (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L16, 'UnaryOp " "')), (0, import_lib2.$E)(_));
22029
+ var UnaryOp$0$parser = (0, import_lib2.$EXPECT)($R28, "UnaryOp /(?!\\+\\+|--)[!~+-](?!\\s)/");
22030
+ 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)(_));
22031
+ 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)(_));
21672
22032
  function UnaryOp$0($$ctx, $$state) {
21673
22033
  const $$r = UnaryOp$0$parser($$ctx, $$state);
21674
22034
  if (!$$r) {
@@ -21961,7 +22321,7 @@ function PostfixedCommaExpression($$ctx, $$state) {
21961
22321
  $$ctx.exit?.("PostfixedCommaExpression", $$state, $$final, $$eventData);
21962
22322
  return $$final;
21963
22323
  }
21964
- var PostfixStatement$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R32, "PostfixStatement /(?=for|if|loop|unless|until|while)/"), _PostfixStatement);
22324
+ var PostfixStatement$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R30, "PostfixStatement /(?=for|if|loop|unless|until|while)/"), _PostfixStatement);
21965
22325
  function PostfixStatement($$ctx, $$state) {
21966
22326
  const $$entered = $$ctx.enter?.("PostfixStatement", $$state);
21967
22327
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -22252,7 +22612,7 @@ function Label($$ctx, $$state) {
22252
22612
  return $$final;
22253
22613
  }
22254
22614
  var LabelIdentifier$0$parser = (0, import_lib2.$S)(Colon, IdentifierName);
22255
- var LabelIdentifier$1$parser = (0, import_lib2.$EXPECT)($R33, "LabelIdentifier /(?:loop|while|until|for|do)(?!\\p{ID_Continue})/");
22615
+ var LabelIdentifier$1$parser = (0, import_lib2.$EXPECT)($R31, "LabelIdentifier /(?:loop|while|until|for|do)(?!\\p{ID_Continue})/");
22256
22616
  var LabelIdentifier$2$parser = Identifier;
22257
22617
  function LabelIdentifier$0($$ctx, $$state) {
22258
22618
  const $$r = LabelIdentifier$0$parser($$ctx, $$state);
@@ -22430,7 +22790,7 @@ function IfClause($$ctx, $$state) {
22430
22790
  $$ctx.exit?.("IfClause", $$state, $$r, $$eventData);
22431
22791
  return $$r;
22432
22792
  }
22433
- var IterationStatement$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R34, "IterationStatement /(?=loop|comptime|do|for|until|while)/"), _IterationStatement);
22793
+ var IterationStatement$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R32, "IterationStatement /(?=loop|comptime|do|for|until|while)/"), _IterationStatement);
22434
22794
  function IterationStatement($$ctx, $$state) {
22435
22795
  const $$entered = $$ctx.enter?.("IterationStatement", $$state);
22436
22796
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -23486,10 +23846,16 @@ function CaseClause$2($$ctx, $$state) {
23486
23846
  return void 0;
23487
23847
  }
23488
23848
  const $$value = $$r.value;
23489
- const $$m = /* @__PURE__ */ (function($0, cases, block, b) {
23849
+ const $$m = (function($0, cases, block, b) {
23850
+ let children = $0;
23851
+ if (hasTrailingComment(block)) {
23852
+ const bIdx = children.indexOf(b);
23853
+ b = { ...b, token: "\n" + b.token };
23854
+ children = [...children.slice(0, bIdx), b, ...children.slice(bIdx + 1)];
23855
+ }
23490
23856
  return {
23491
23857
  type: "WhenClause",
23492
- children: $0,
23858
+ children,
23493
23859
  cases,
23494
23860
  block,
23495
23861
  break: b
@@ -25181,7 +25547,7 @@ function MaybeNestedExpression($$ctx, $$state) {
25181
25547
  $$ctx.exit?.("MaybeNestedExpression", $$state, $$final, $$eventData);
25182
25548
  return $$final;
25183
25549
  }
25184
- var MaybeParenNestedExpression$0$parser = (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement, NoBlock));
25550
+ 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))));
25185
25551
  var MaybeParenNestedExpression$1$parser = (0, import_lib2.$S)((0, import_lib2.$N)(EOS), Expression);
25186
25552
  var MaybeParenNestedExpression$2$parser = (0, import_lib2.$S)((0, import_lib2.$Y)(EOS), (0, import_lib2.$C)(ArrayLiteral, ObjectLiteral));
25187
25553
  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);
@@ -25244,7 +25610,7 @@ function MaybeParenNestedExpression($$ctx, $$state) {
25244
25610
  var ImportDeclaration$0$parser = (0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($L132, 'ImportDeclaration "require"'), NonIdContinue, Arguments);
25245
25611
  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);
25246
25612
  var ImportDeclaration$2$parser = (0, import_lib2.$S)(Import, SameLineOrIndentedFurther, (0, import_lib2.$E)((0, import_lib2.$S)(TypeKeyword, SameLineOrIndentedFurther)), ImportClause, __, FromClause);
25247
- var ImportDeclaration$3$parser = (0, import_lib2.$S)(Import, (0, import_lib2.$Y)((0, import_lib2.$EXPECT)($R35, "ImportDeclaration /\\s/")), SameLineOrIndentedFurther, ModuleSpecifier);
25613
+ var ImportDeclaration$3$parser = (0, import_lib2.$S)(Import, (0, import_lib2.$Y)((0, import_lib2.$EXPECT)($R33, "ImportDeclaration /\\s/")), SameLineOrIndentedFurther, ModuleSpecifier);
25248
25614
  var ImportDeclaration$4$parser = (0, import_lib2.$S)(Import, (0, import_lib2.$E)(_), (0, import_lib2.$E)(UnclosedSingleLineStringLiteral), (0, import_lib2.$Y)(EOS));
25249
25615
  var ImportDeclaration$5$parser = (0, import_lib2.$S)(ImpliedImport, (0, import_lib2.$E)((0, import_lib2.$S)(TypeKeyword, SameLineOrIndentedFurther)), ImportClause, SameLineOrIndentedFurther, FromClause);
25250
25616
  var ImportDeclaration$6$parser = (0, import_lib2.$S)(FromClause, SameLineOrIndentedFurther, Import, SameLineOrIndentedFurther, Operator, (0, import_lib2.$E)(OperatorBehavior), SameLineOrIndentedFurther, OperatorNamedImports);
@@ -25944,7 +26310,7 @@ function UnprocessedModuleSpecifier($$ctx, $$state) {
25944
26310
  $$ctx.exit?.("UnprocessedModuleSpecifier", $$state, $$final, $$eventData);
25945
26311
  return $$final;
25946
26312
  }
25947
- var UnquotedSpecifier$parser = (0, import_lib2.$EXPECT)($R36, `UnquotedSpecifier /[^;"'\\s=>]+/`);
26313
+ var UnquotedSpecifier$parser = (0, import_lib2.$EXPECT)($R34, `UnquotedSpecifier /[^;"'\\s=>]+/`);
25948
26314
  function UnquotedSpecifier($$ctx, $$state) {
25949
26315
  const $$entered = $$ctx.enter?.("UnquotedSpecifier", $$state);
25950
26316
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26535,7 +26901,7 @@ function VariableDeclarationList($$ctx, $$state) {
26535
26901
  $$ctx.exit?.("VariableDeclarationList", $$state, $$r, $$eventData);
26536
26902
  return $$r;
26537
26903
  }
26538
- var NumericLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R37, "NumericLiteral /(?=[0-9.])/"), NumericLiteralKind);
26904
+ var NumericLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R35, "NumericLiteral /(?=[0-9.])/"), NumericLiteralKind);
26539
26905
  function NumericLiteral($$ctx, $$state) {
26540
26906
  const $$entered = $$ctx.enter?.("NumericLiteral", $$state);
26541
26907
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26575,7 +26941,7 @@ function NumericLiteralKind($$ctx, $$state) {
26575
26941
  $$ctx.exit?.("NumericLiteralKind", $$state, $$final, $$eventData);
26576
26942
  return $$final;
26577
26943
  }
26578
- var DecimalBigIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R38, "DecimalBigIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)n/"));
26944
+ var DecimalBigIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R36, "DecimalBigIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)n/"));
26579
26945
  function DecimalBigIntegerLiteral($$ctx, $$state) {
26580
26946
  const $$entered = $$ctx.enter?.("DecimalBigIntegerLiteral", $$state);
26581
26947
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26584,9 +26950,9 @@ function DecimalBigIntegerLiteral($$ctx, $$state) {
26584
26950
  $$ctx.exit?.("DecimalBigIntegerLiteral", $$state, $$final, $$eventData);
26585
26951
  return $$final;
26586
26952
  }
26587
- var DecimalLiteral$0$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R39, "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)));
26588
- var DecimalLiteral$1$parser = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R40, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?/"), (0, import_lib2.$E)(ExponentPart)));
26589
- var DecimalLiteral$2$parser = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R41, "DecimalLiteral /(?:\\.[0-9](?:_[0-9]|[0-9])*)/"), (0, import_lib2.$E)(ExponentPart)));
26953
+ 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)));
26954
+ 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)));
26955
+ 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)));
26590
26956
  function DecimalLiteral$0($$ctx, $$state) {
26591
26957
  const $$r = DecimalLiteral$0$parser($$ctx, $$state);
26592
26958
  if (!$$r) {
@@ -26612,7 +26978,7 @@ function DecimalLiteral($$ctx, $$state) {
26612
26978
  $$ctx.exit?.("DecimalLiteral", $$state, $$final, $$eventData);
26613
26979
  return $$final;
26614
26980
  }
26615
- var ExponentPart$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R42, "ExponentPart /(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)/"));
26981
+ var ExponentPart$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R40, "ExponentPart /(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)/"));
26616
26982
  function ExponentPart($$ctx, $$state) {
26617
26983
  const $$entered = $$ctx.enter?.("ExponentPart", $$state);
26618
26984
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26621,7 +26987,7 @@ function ExponentPart($$ctx, $$state) {
26621
26987
  $$ctx.exit?.("ExponentPart", $$state, $$final, $$eventData);
26622
26988
  return $$final;
26623
26989
  }
26624
- var BinaryIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R43, "BinaryIntegerLiteral /0[bB][01](?:[01]|_[01])*n?/"));
26990
+ var BinaryIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R41, "BinaryIntegerLiteral /0[bB][01](?:[01]|_[01])*n?/"));
26625
26991
  function BinaryIntegerLiteral($$ctx, $$state) {
26626
26992
  const $$entered = $$ctx.enter?.("BinaryIntegerLiteral", $$state);
26627
26993
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26630,7 +26996,7 @@ function BinaryIntegerLiteral($$ctx, $$state) {
26630
26996
  $$ctx.exit?.("BinaryIntegerLiteral", $$state, $$final, $$eventData);
26631
26997
  return $$final;
26632
26998
  }
26633
- var OctalIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R44, "OctalIntegerLiteral /0[oO][0-7](?:[0-7]|_[0-7])*n?/"));
26999
+ var OctalIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R42, "OctalIntegerLiteral /0[oO][0-7](?:[0-7]|_[0-7])*n?/"));
26634
27000
  function OctalIntegerLiteral($$ctx, $$state) {
26635
27001
  const $$entered = $$ctx.enter?.("OctalIntegerLiteral", $$state);
26636
27002
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26639,7 +27005,7 @@ function OctalIntegerLiteral($$ctx, $$state) {
26639
27005
  $$ctx.exit?.("OctalIntegerLiteral", $$state, $$final, $$eventData);
26640
27006
  return $$final;
26641
27007
  }
26642
- var HexIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R45, "HexIntegerLiteral /0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?/"));
27008
+ 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?/"));
26643
27009
  function HexIntegerLiteral($$ctx, $$state) {
26644
27010
  const $$entered = $$ctx.enter?.("HexIntegerLiteral", $$state);
26645
27011
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26648,7 +27014,7 @@ function HexIntegerLiteral($$ctx, $$state) {
26648
27014
  $$ctx.exit?.("HexIntegerLiteral", $$state, $$final, $$eventData);
26649
27015
  return $$final;
26650
27016
  }
26651
- var IntegerLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R46, "IntegerLiteral /(?=[0-9])/"), IntegerLiteralKind);
27017
+ var IntegerLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R44, "IntegerLiteral /(?=[0-9])/"), IntegerLiteralKind);
26652
27018
  function IntegerLiteral($$ctx, $$state) {
26653
27019
  const $$entered = $$ctx.enter?.("IntegerLiteral", $$state);
26654
27020
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26688,7 +27054,7 @@ function IntegerLiteralKind($$ctx, $$state) {
26688
27054
  $$ctx.exit?.("IntegerLiteralKind", $$state, $$final, $$eventData);
26689
27055
  return $$final;
26690
27056
  }
26691
- var DecimalIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R47, "DecimalIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)/"));
27057
+ var DecimalIntegerLiteral$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R45, "DecimalIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)/"));
26692
27058
  function DecimalIntegerLiteral($$ctx, $$state) {
26693
27059
  const $$entered = $$ctx.enter?.("DecimalIntegerLiteral", $$state);
26694
27060
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26737,7 +27103,7 @@ function StringLiteral($$ctx, $$state) {
26737
27103
  $$ctx.exit?.("StringLiteral", $$state, $$final, $$eventData);
26738
27104
  return $$final;
26739
27105
  }
26740
- var DoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($R48, 'DoubleStringCharacters /(?:\\\\.|[^"])*/');
27106
+ var DoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($R46, 'DoubleStringCharacters /(?:\\\\.|[^"])*/');
26741
27107
  function DoubleStringCharacters($$ctx, $$state) {
26742
27108
  const $$entered = $$ctx.enter?.("DoubleStringCharacters", $$state);
26743
27109
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26754,7 +27120,7 @@ function DoubleStringCharacters($$ctx, $$state) {
26754
27120
  $$ctx.exit?.("DoubleStringCharacters", $$state, $$r, $$eventData);
26755
27121
  return $$r;
26756
27122
  }
26757
- var SingleStringCharacters$parser = (0, import_lib2.$EXPECT)($R49, "SingleStringCharacters /(?:\\\\.|[^'])*/");
27123
+ var SingleStringCharacters$parser = (0, import_lib2.$EXPECT)($R47, "SingleStringCharacters /(?:\\\\.|[^'])*/");
26758
27124
  function SingleStringCharacters($$ctx, $$state) {
26759
27125
  const $$entered = $$ctx.enter?.("SingleStringCharacters", $$state);
26760
27126
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26771,7 +27137,7 @@ function SingleStringCharacters($$ctx, $$state) {
26771
27137
  $$ctx.exit?.("SingleStringCharacters", $$state, $$r, $$eventData);
26772
27138
  return $$r;
26773
27139
  }
26774
- var SingleLineStringLiteral$parser = (0, import_lib2.$C)((0, import_lib2.$TEXT)((0, import_lib2.$S)(DoubleQuote, (0, import_lib2.$EXPECT)($R50, 'SingleLineStringLiteral /(?:\\\\.|[^"\\n])*/'), DoubleQuote)), (0, import_lib2.$TEXT)((0, import_lib2.$S)(SingleQuote, (0, import_lib2.$EXPECT)($R51, "SingleLineStringLiteral /(?:\\\\.|[^'\\n])*/"), SingleQuote)));
27140
+ 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)));
26775
27141
  function SingleLineStringLiteral($$ctx, $$state) {
26776
27142
  const $$entered = $$ctx.enter?.("SingleLineStringLiteral", $$state);
26777
27143
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26792,7 +27158,7 @@ function SingleLineStringLiteral($$ctx, $$state) {
26792
27158
  $$ctx.exit?.("SingleLineStringLiteral", $$state, $$r, $$eventData);
26793
27159
  return $$r;
26794
27160
  }
26795
- var UnclosedSingleLineStringLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$TEXT)((0, import_lib2.$S)(DoubleQuote, (0, import_lib2.$EXPECT)($R50, 'UnclosedSingleLineStringLiteral /(?:\\\\.|[^"\\n])*/'))), (0, import_lib2.$TEXT)((0, import_lib2.$S)(SingleQuote, (0, import_lib2.$EXPECT)($R51, "UnclosedSingleLineStringLiteral /(?:\\\\.|[^'\\n])*/")))), (0, import_lib2.$Y)(EOS));
27161
+ 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));
26796
27162
  function UnclosedSingleLineStringLiteral($$ctx, $$state) {
26797
27163
  const $$entered = $$ctx.enter?.("UnclosedSingleLineStringLiteral", $$state);
26798
27164
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26851,7 +27217,7 @@ function TripleDoubleStringContents($$ctx, $$state) {
26851
27217
  $$ctx.exit?.("TripleDoubleStringContents", $$state, $$final, $$eventData);
26852
27218
  return $$final;
26853
27219
  }
26854
- var CoffeeTripleDoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($R52, 'CoffeeTripleDoubleStringCharacters /(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+/');
27220
+ var CoffeeTripleDoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($R50, 'CoffeeTripleDoubleStringCharacters /(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+/');
26855
27221
  function CoffeeTripleDoubleStringCharacters($$ctx, $$state) {
26856
27222
  const $$entered = $$ctx.enter?.("CoffeeTripleDoubleStringCharacters", $$state);
26857
27223
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26868,7 +27234,7 @@ function CoffeeTripleDoubleStringCharacters($$ctx, $$state) {
26868
27234
  $$ctx.exit?.("CoffeeTripleDoubleStringCharacters", $$state, $$r, $$eventData);
26869
27235
  return $$r;
26870
27236
  }
26871
- var TripleDoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($R53, 'TripleDoubleStringCharacters /(?:"(?!"")|\\\\.|[^"])+/');
27237
+ var TripleDoubleStringCharacters$parser = (0, import_lib2.$EXPECT)($R51, 'TripleDoubleStringCharacters /(?:"(?!"")|\\\\.|[^"])+/');
26872
27238
  function TripleDoubleStringCharacters($$ctx, $$state) {
26873
27239
  const $$entered = $$ctx.enter?.("TripleDoubleStringCharacters", $$state);
26874
27240
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26885,7 +27251,7 @@ function TripleDoubleStringCharacters($$ctx, $$state) {
26885
27251
  $$ctx.exit?.("TripleDoubleStringCharacters", $$state, $$r, $$eventData);
26886
27252
  return $$r;
26887
27253
  }
26888
- var TripleSingleStringCharacters$parser = (0, import_lib2.$EXPECT)($R54, "TripleSingleStringCharacters /(?:'(?!'')|\\\\.|[^'])*/");
27254
+ var TripleSingleStringCharacters$parser = (0, import_lib2.$EXPECT)($R52, "TripleSingleStringCharacters /(?:'(?!'')|\\\\.|[^'])*/");
26889
27255
  function TripleSingleStringCharacters($$ctx, $$state) {
26890
27256
  const $$entered = $$ctx.enter?.("TripleSingleStringCharacters", $$state);
26891
27257
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -26941,7 +27307,7 @@ function CoffeeInterpolatedDoubleQuotedString($$ctx, $$state) {
26941
27307
  $$ctx.exit?.("CoffeeInterpolatedDoubleQuotedString", $$state, $$r, $$eventData);
26942
27308
  return $$r;
26943
27309
  }
26944
- var CoffeeDoubleQuotedStringCharacters$parser = (0, import_lib2.$EXPECT)($R55, 'CoffeeDoubleQuotedStringCharacters /(?:\\\\.|#(?!\\{)|[^"#])+/');
27310
+ var CoffeeDoubleQuotedStringCharacters$parser = (0, import_lib2.$EXPECT)($R53, 'CoffeeDoubleQuotedStringCharacters /(?:\\\\.|#(?!\\{)|[^"#])+/');
26945
27311
  function CoffeeDoubleQuotedStringCharacters($$ctx, $$state) {
26946
27312
  const $$entered = $$ctx.enter?.("CoffeeDoubleQuotedStringCharacters", $$state);
26947
27313
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27002,7 +27368,7 @@ function RegularExpressionClass($$ctx, $$state) {
27002
27368
  $$ctx.exit?.("RegularExpressionClass", $$state, $$r, $$eventData);
27003
27369
  return $$r;
27004
27370
  }
27005
- var RegularExpressionClassCharacters$parser = (0, import_lib2.$EXPECT)($R56, "RegularExpressionClassCharacters /(?:\\\\.|[^\\]])*/");
27371
+ var RegularExpressionClassCharacters$parser = (0, import_lib2.$EXPECT)($R54, "RegularExpressionClassCharacters /(?:\\\\.|[^\\]])*/");
27006
27372
  function RegularExpressionClassCharacters($$ctx, $$state) {
27007
27373
  const $$entered = $$ctx.enter?.("RegularExpressionClassCharacters", $$state);
27008
27374
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27030,7 +27396,7 @@ function HeregexLiteral($$ctx, $$state) {
27030
27396
  return void 0;
27031
27397
  }
27032
27398
  const $$value = $$r.value;
27033
- const $$m = (function($0, open, body, close, flags) {
27399
+ const $$m = (function($loc, $0, open, body, close, flags) {
27034
27400
  let hasSubstitutions = body.some((part) => part.type === "Substitution");
27035
27401
  if (hasSubstitutions) {
27036
27402
  const children = [
@@ -27039,7 +27405,7 @@ function HeregexLiteral($$ctx, $$state) {
27039
27405
  body.map(
27040
27406
  (e) => e.type === "Substitution" ? e : {
27041
27407
  ...e,
27042
- token: e.token.replace(/`|\\|\$/g, "\\$&")
27408
+ token: e.token.replace(/[`\\$]/g, "\\$&")
27043
27409
  }
27044
27410
  ),
27045
27411
  "`"
@@ -27056,16 +27422,32 @@ function HeregexLiteral($$ctx, $$state) {
27056
27422
  children
27057
27423
  };
27058
27424
  }
27425
+ const source = body.map(($14) => $14.token).join("");
27426
+ if (!source.length) {
27427
+ const pos = open.$loc.pos + open.$loc.length;
27428
+ const empty = {
27429
+ token: "(?:)",
27430
+ $loc: { pos, length: close.$loc.pos - pos }
27431
+ };
27432
+ const children = [open, empty, close];
27433
+ if (flags.length) {
27434
+ children.push(flags);
27435
+ }
27436
+ return {
27437
+ type: "RegularExpressionLiteral",
27438
+ children
27439
+ };
27440
+ }
27059
27441
  return {
27060
27442
  type: "RegularExpressionLiteral",
27061
27443
  children: $0
27062
27444
  };
27063
- })($$value, $$value[0], $$value[1], $$value[2], $$value[3]);
27445
+ })($$r.loc, $$value, $$value[0], $$value[1], $$value[2], $$value[3]);
27064
27446
  $$r.value = $$m;
27065
27447
  $$ctx.exit?.("HeregexLiteral", $$state, $$r, $$eventData);
27066
27448
  return $$r;
27067
27449
  }
27068
- var HeregexBody$parser = (0, import_lib2.$S)((0, import_lib2.$N)(TripleSlash), (0, import_lib2.$Q)(HeregexPart));
27450
+ var HeregexBody$parser = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L76, 'HeregexBody "/"')), (0, import_lib2.$Q)(HeregexPart));
27069
27451
  function HeregexBody($$ctx, $$state) {
27070
27452
  const $$entered = $$ctx.enter?.("HeregexBody", $$state);
27071
27453
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27075,8 +27457,8 @@ function HeregexBody($$ctx, $$state) {
27075
27457
  $$ctx.exit?.("HeregexBody", $$state, void 0, $$eventData);
27076
27458
  return void 0;
27077
27459
  }
27078
- const $$m = /* @__PURE__ */ (function($2) {
27079
- return $2;
27460
+ const $$m = /* @__PURE__ */ (function(body) {
27461
+ return body;
27080
27462
  })($$r.value[1]);
27081
27463
  $$r.value = $$m;
27082
27464
  $$ctx.exit?.("HeregexBody", $$state, $$r, $$eventData);
@@ -27084,11 +27466,11 @@ function HeregexBody($$ctx, $$state) {
27084
27466
  }
27085
27467
  var HeregexPart$1$parser = (0, import_lib2.$S)(CoffeeInterpolationEnabled, CoffeeStringSubstitution);
27086
27468
  var HeregexPart$2$parser = (0, import_lib2.$S)(TemplateSubstitution);
27087
- var HeregexPart$3$parser = (0, import_lib2.$EXPECT)($R57, "HeregexPart /(?:\\\\.)/");
27469
+ var HeregexPart$3$parser = (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R55, "HeregexPart /\\\\./"));
27088
27470
  var HeregexPart$4$parser = (0, import_lib2.$S)(HeregexComment);
27089
- var HeregexPart$5$parser = (0, import_lib2.$EXPECT)($R58, "HeregexPart /[\\s]+/");
27090
- var HeregexPart$6$parser = (0, import_lib2.$EXPECT)($R59, "HeregexPart /\\/(?!\\/\\/)/");
27091
- var HeregexPart$7$parser = (0, import_lib2.$EXPECT)($R60, "HeregexPart /[^[\\/\\s#$\\\\]+|[#$]/");
27471
+ var HeregexPart$5$parser = (0, import_lib2.$EXPECT)($R56, "HeregexPart /[\\s]+/");
27472
+ var HeregexPart$6$parser = (0, import_lib2.$EXPECT)($R57, "HeregexPart /\\/(?!\\/\\/)/");
27473
+ var HeregexPart$7$parser = (0, import_lib2.$EXPECT)($R58, "HeregexPart /[^[\\/\\s#$\\\\]+|[#$]/");
27092
27474
  function HeregexPart$0($$ctx, $$state) {
27093
27475
  return RegularExpressionClass($$ctx, $$state);
27094
27476
  }
@@ -27119,21 +27501,9 @@ function HeregexPart$3($$ctx, $$state) {
27119
27501
  if (!$$r) {
27120
27502
  return void 0;
27121
27503
  }
27122
- const $$m = (function($loc, $0) {
27123
- let token = $0;
27124
- switch ($0[1]) {
27125
- case "\n":
27126
- token = "\\n";
27127
- break;
27128
- case "\r":
27129
- token = "\\r";
27130
- break;
27131
- case " ":
27132
- token = " ";
27133
- break;
27134
- }
27135
- return { $loc, token };
27136
- })($$r.loc, $$r.value[0]);
27504
+ const $$m = (function($loc, escape) {
27505
+ return { $loc, token: heregexEscapes[escape[1]] ?? escape };
27506
+ })($$r.loc, $$r.value);
27137
27507
  $$r.value = $$m;
27138
27508
  return $$r;
27139
27509
  }
@@ -27213,7 +27583,7 @@ function HeregexComment($$ctx, $$state) {
27213
27583
  $$ctx.exit?.("HeregexComment", $$state, $$final, $$eventData);
27214
27584
  return $$final;
27215
27585
  }
27216
- var RegularExpressionBody$parser = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R61, "RegularExpressionBody /[*\\/\\r\\n]/"))), (0, import_lib2.$Q)(RegExpPart));
27586
+ 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));
27217
27587
  function RegularExpressionBody($$ctx, $$state) {
27218
27588
  const $$entered = $$ctx.enter?.("RegularExpressionBody", $$state);
27219
27589
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27236,7 +27606,7 @@ function RegExpPart($$ctx, $$state) {
27236
27606
  $$ctx.exit?.("RegExpPart", $$state, $$final, $$eventData);
27237
27607
  return $$final;
27238
27608
  }
27239
- var RegExpCharacter$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R62, "RegExpCharacter /(?:\\\\.|[^[\\/\\r\\n])+/"));
27609
+ var RegExpCharacter$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R60, "RegExpCharacter /(?:\\\\.|[^[\\/\\r\\n])+/"));
27240
27610
  function RegExpCharacter($$ctx, $$state) {
27241
27611
  const $$entered = $$ctx.enter?.("RegExpCharacter", $$state);
27242
27612
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27245,7 +27615,7 @@ function RegExpCharacter($$ctx, $$state) {
27245
27615
  $$ctx.exit?.("RegExpCharacter", $$state, $$final, $$eventData);
27246
27616
  return $$final;
27247
27617
  }
27248
- var RegularExpressionFlags$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R63, "RegularExpressionFlags /(?:\\p{ID_Continue}|[\\u200C\\u200D$])*/"));
27618
+ var RegularExpressionFlags$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R61, "RegularExpressionFlags /(?:\\p{ID_Continue}|[\\u200C\\u200D$])*/"));
27249
27619
  function RegularExpressionFlags($$ctx, $$state) {
27250
27620
  const $$entered = $$ctx.enter?.("RegularExpressionFlags", $$state);
27251
27621
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27254,7 +27624,7 @@ function RegularExpressionFlags($$ctx, $$state) {
27254
27624
  $$ctx.exit?.("RegularExpressionFlags", $$state, $$final, $$eventData);
27255
27625
  return $$final;
27256
27626
  }
27257
- var TemplateLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R64, "TemplateLiteral /(?=[`'\"])/"), _TemplateLiteral);
27627
+ var TemplateLiteral$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R62, "TemplateLiteral /(?=[`'\"])/"), _TemplateLiteral);
27258
27628
  function TemplateLiteral($$ctx, $$state) {
27259
27629
  const $$entered = $$ctx.enter?.("TemplateLiteral", $$state);
27260
27630
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27358,7 +27728,7 @@ function TemplateSubstitution($$ctx, $$state) {
27358
27728
  $$ctx.exit?.("TemplateSubstitution", $$state, $$final, $$eventData);
27359
27729
  return $$final;
27360
27730
  }
27361
- var TemplateCharacters$parser = (0, import_lib2.$EXPECT)($R65, "TemplateCharacters /(?:\\$(?!\\{)|\\\\.|[^$`])+/");
27731
+ var TemplateCharacters$parser = (0, import_lib2.$EXPECT)($R63, "TemplateCharacters /(?:\\$(?!\\{)|\\\\.|[^$`])+/");
27362
27732
  function TemplateCharacters($$ctx, $$state) {
27363
27733
  const $$entered = $$ctx.enter?.("TemplateCharacters", $$state);
27364
27734
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27375,7 +27745,7 @@ function TemplateCharacters($$ctx, $$state) {
27375
27745
  $$ctx.exit?.("TemplateCharacters", $$state, $$r, $$eventData);
27376
27746
  return $$r;
27377
27747
  }
27378
- var TemplateBlockCharacters$parser = (0, import_lib2.$EXPECT)($R66, "TemplateBlockCharacters /(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+/");
27748
+ var TemplateBlockCharacters$parser = (0, import_lib2.$EXPECT)($R64, "TemplateBlockCharacters /(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+/");
27379
27749
  function TemplateBlockCharacters($$ctx, $$state) {
27380
27750
  const $$entered = $$ctx.enter?.("TemplateBlockCharacters", $$state);
27381
27751
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27392,11 +27762,11 @@ function TemplateBlockCharacters($$ctx, $$state) {
27392
27762
  $$ctx.exit?.("TemplateBlockCharacters", $$state, $$r, $$eventData);
27393
27763
  return $$r;
27394
27764
  }
27395
- var ReservedWord$0$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R67, "ReservedWord /(?:off|yes|on|no)/")), NonIdContinue, CoffeeBooleansEnabled);
27396
- var ReservedWord$1$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R68, "ReservedWord /isnt/")), NonIdContinue, CoffeeIsntEnabled);
27397
- var ReservedWord$2$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R69, "ReservedWord /by/")), NonIdContinue, CoffeeForLoopsEnabled);
27398
- var ReservedWord$3$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R70, "ReservedWord /of/")), NonIdContinue, CoffeeOfEnabled);
27399
- var ReservedWord$4$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R71, "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);
27765
+ var ReservedWord$0$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R65, "ReservedWord /(?:off|yes|on|no)/")), NonIdContinue, CoffeeBooleansEnabled);
27766
+ var ReservedWord$1$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R66, "ReservedWord /isnt/")), NonIdContinue, CoffeeIsntEnabled);
27767
+ var ReservedWord$2$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R67, "ReservedWord /by/")), NonIdContinue, CoffeeForLoopsEnabled);
27768
+ var ReservedWord$3$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R68, "ReservedWord /of/")), NonIdContinue, CoffeeOfEnabled);
27769
+ 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);
27400
27770
  function ReservedWord$0($$ctx, $$state) {
27401
27771
  const $$r = ReservedWord$0$parser($$ctx, $$state);
27402
27772
  if (!$$r) {
@@ -27460,7 +27830,7 @@ function ReservedWord($$ctx, $$state) {
27460
27830
  $$ctx.exit?.("ReservedWord", $$state, $$final, $$eventData);
27461
27831
  return $$final;
27462
27832
  }
27463
- var Comment$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R72, "Comment /(?=\\/|#)/"), _Comment);
27833
+ var Comment$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R70, "Comment /(?=\\/|#)/"), _Comment);
27464
27834
  function Comment($$ctx, $$state) {
27465
27835
  const $$entered = $$ctx.enter?.("Comment", $$state);
27466
27836
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27506,7 +27876,7 @@ function SingleLineComment($$ctx, $$state) {
27506
27876
  $$ctx.exit?.("SingleLineComment", $$state, $$final, $$eventData);
27507
27877
  return $$final;
27508
27878
  }
27509
- var JSSingleLineComment$parser = (0, import_lib2.$EXPECT)($R73, "JSSingleLineComment /\\/\\/(?!\\/)[^\\r\\n]*/");
27879
+ var JSSingleLineComment$parser = (0, import_lib2.$EXPECT)($R71, "JSSingleLineComment /\\/\\/(?!\\/(?!\\/))[^\\r\\n]*/");
27510
27880
  function JSSingleLineComment($$ctx, $$state) {
27511
27881
  const $$entered = $$ctx.enter?.("JSSingleLineComment", $$state);
27512
27882
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27537,7 +27907,7 @@ function MultiLineComment($$ctx, $$state) {
27537
27907
  $$ctx.exit?.("MultiLineComment", $$state, $$final, $$eventData);
27538
27908
  return $$final;
27539
27909
  }
27540
- 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)($R74, "JSMultiLineComment /./"))), (0, import_lib2.$EXPECT)($L140, 'JSMultiLineComment "*/"')));
27910
+ 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 "*/"')));
27541
27911
  function JSMultiLineComment($$ctx, $$state) {
27542
27912
  const $$entered = $$ctx.enter?.("JSMultiLineComment", $$state);
27543
27913
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27554,7 +27924,7 @@ function JSMultiLineComment($$ctx, $$state) {
27554
27924
  $$ctx.exit?.("JSMultiLineComment", $$state, $$r, $$eventData);
27555
27925
  return $$r;
27556
27926
  }
27557
- var CoffeeSingleLineComment$parser = (0, import_lib2.$EXPECT)($R75, "CoffeeSingleLineComment /#(?!##(?!#))([^\\r\\n]*)/");
27927
+ var CoffeeSingleLineComment$parser = (0, import_lib2.$EXPECT)($R73, "CoffeeSingleLineComment /#(?!##(?!#))([^\\r\\n]*)/");
27558
27928
  function CoffeeSingleLineComment($$ctx, $$state) {
27559
27929
  const $$entered = $$ctx.enter?.("CoffeeSingleLineComment", $$state);
27560
27930
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27571,7 +27941,7 @@ function CoffeeSingleLineComment($$ctx, $$state) {
27571
27941
  $$ctx.exit?.("CoffeeSingleLineComment", $$state, $$r, $$eventData);
27572
27942
  return $$r;
27573
27943
  }
27574
- var CoffeeMultiLineComment$parser = (0, import_lib2.$S)(CoffeeHereCommentStart, (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R76, "CoffeeMultiLineComment /[^]*?###/")));
27944
+ var CoffeeMultiLineComment$parser = (0, import_lib2.$S)(CoffeeHereCommentStart, (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R74, "CoffeeMultiLineComment /[^]*?###/")));
27575
27945
  function CoffeeMultiLineComment($$ctx, $$state) {
27576
27946
  const $$entered = $$ctx.enter?.("CoffeeMultiLineComment", $$state);
27577
27947
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27589,7 +27959,7 @@ function CoffeeMultiLineComment($$ctx, $$state) {
27589
27959
  $$ctx.exit?.("CoffeeMultiLineComment", $$state, $$r, $$eventData);
27590
27960
  return $$r;
27591
27961
  }
27592
- var CoffeeHereCommentStart$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R77, "CoffeeHereCommentStart /###(?!#)/"));
27962
+ var CoffeeHereCommentStart$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R75, "CoffeeHereCommentStart /###(?!#)/"));
27593
27963
  function CoffeeHereCommentStart($$ctx, $$state) {
27594
27964
  const $$entered = $$ctx.enter?.("CoffeeHereCommentStart", $$state);
27595
27965
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27598,7 +27968,7 @@ function CoffeeHereCommentStart($$ctx, $$state) {
27598
27968
  $$ctx.exit?.("CoffeeHereCommentStart", $$state, $$final, $$eventData);
27599
27969
  return $$final;
27600
27970
  }
27601
- var InlineComment$0$parser = (0, import_lib2.$EXPECT)($R78, "InlineComment /\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\//");
27971
+ var InlineComment$0$parser = (0, import_lib2.$EXPECT)($R76, "InlineComment /\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\//");
27602
27972
  function InlineComment$0($$ctx, $$state) {
27603
27973
  const $$r = InlineComment$0$parser($$ctx, $$state);
27604
27974
  if (!$$r) {
@@ -27639,7 +28009,7 @@ function TrailingComment($$ctx, $$state) {
27639
28009
  $$ctx.exit?.("TrailingComment", $$state, $$final, $$eventData);
27640
28010
  return $$final;
27641
28011
  }
27642
- var _$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R79, "_ /(?=[ \\t\\/\\\\#])/"), (0, import_lib2.$P)((0, import_lib2.$C)(NonNewlineWhitespace, InlineComment)));
28012
+ var _$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R77, "_ /(?=[ \\t\\/\\\\#])/"), (0, import_lib2.$P)((0, import_lib2.$C)(NonNewlineWhitespace, InlineComment)));
27643
28013
  function _($$ctx, $$state) {
27644
28014
  const $$entered = $$ctx.enter?.("_", $$state);
27645
28015
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27656,7 +28026,7 @@ function _($$ctx, $$state) {
27656
28026
  $$ctx.exit?.("_", $$state, $$r, $$eventData);
27657
28027
  return $$r;
27658
28028
  }
27659
- var NonNewlineWhitespace$0$parser = (0, import_lib2.$EXPECT)($R24, "NonNewlineWhitespace /[ \\t]+/");
28029
+ var NonNewlineWhitespace$0$parser = (0, import_lib2.$EXPECT)($R22, "NonNewlineWhitespace /[ \\t]+/");
27660
28030
  var NonNewlineWhitespace$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L141, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL);
27661
28031
  function NonNewlineWhitespace$0($$ctx, $$state) {
27662
28032
  const $$r = NonNewlineWhitespace$0$parser($$ctx, $$state);
@@ -27705,7 +28075,7 @@ function Trimmed_($$ctx, $$state) {
27705
28075
  $$ctx.exit?.("Trimmed_", $$state, $$r, $$eventData);
27706
28076
  return $$r;
27707
28077
  }
27708
- var __$0$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R80, "__ /(?=\\s|\\/|#)/"), (0, import_lib2.$Q)((0, import_lib2.$C)(Whitespace, Comment)));
28078
+ var __$0$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R78, "__ /(?=\\s|\\/|#)/"), (0, import_lib2.$Q)((0, import_lib2.$C)(Whitespace, Comment)));
27709
28079
  var __$1$parser = (0, import_lib2.$EXPECT)($L0, '__ ""');
27710
28080
  function __$0($$ctx, $$state) {
27711
28081
  const $$r = __$0$parser($$ctx, $$state);
@@ -27729,7 +28099,7 @@ function __($$ctx, $$state) {
27729
28099
  $$ctx.exit?.("__", $$state, $$final, $$eventData);
27730
28100
  return $$final;
27731
28101
  }
27732
- var Whitespace$parser = (0, import_lib2.$EXPECT)($R58, "Whitespace /[\\s]+/");
28102
+ var Whitespace$parser = (0, import_lib2.$EXPECT)($R56, "Whitespace /[\\s]+/");
27733
28103
  function Whitespace($$ctx, $$state) {
27734
28104
  const $$entered = $$ctx.enter?.("Whitespace", $$state);
27735
28105
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -27865,7 +28235,7 @@ function SemicolonDelimiter($$ctx, $$state) {
27865
28235
  $$ctx.exit?.("SemicolonDelimiter", $$state, $$r, $$eventData);
27866
28236
  return $$r;
27867
28237
  }
27868
- var NonIdContinue$parser = (0, import_lib2.$EXPECT)($R81, "NonIdContinue /(?!\\p{ID_Continue}|[^\\u0000-\\u007F\\p{ID_Continue}\\s\xF7\u2014\u2016\u2019\u2022\u2025\u2026\u2047\u2192\u21D2\u2208\u2209\u220B\u220C\u2254\u2260\u2261\u2262\u2263\u2264\u2265\u226A\u226B\u22D9\u25B7\u29FA\u2A75\u2A76])/");
28238
+ var NonIdContinue$parser = (0, import_lib2.$EXPECT)($RD2, () => `NonIdContinue /${$RD2.source}/`);
27869
28239
  function NonIdContinue($$ctx, $$state) {
27870
28240
  const $$entered = $$ctx.enter?.("NonIdContinue", $$state);
27871
28241
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -28205,7 +28575,7 @@ function CoffeeSubstitutionStart($$ctx, $$state) {
28205
28575
  $$ctx.exit?.("CoffeeSubstitutionStart", $$state, $$r, $$eventData);
28206
28576
  return $$r;
28207
28577
  }
28208
- var Colon$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'Colon ":"'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R82, "Colon /[=:]/")));
28578
+ var Colon$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'Colon ":"'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R79, "Colon /[=:]/")));
28209
28579
  function Colon($$ctx, $$state) {
28210
28580
  const $$entered = $$ctx.enter?.("Colon", $$state);
28211
28581
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -28342,7 +28712,7 @@ function Do($$ctx, $$state) {
28342
28712
  return $$r;
28343
28713
  }
28344
28714
  var Dot$0$parser = (0, import_lib2.$EXPECT)($L7, 'Dot "."');
28345
- var Dot$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R83, "Dot /['\u2019]s/"), Trimmed_);
28715
+ var Dot$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R80, "Dot /['\u2019]s/"), Trimmed_);
28346
28716
  function Dot$0($$ctx, $$state) {
28347
28717
  const $$r = Dot$0$parser($$ctx, $$state);
28348
28718
  if (!$$r) {
@@ -29726,7 +30096,7 @@ function JSXImplicitFragment($$ctx, $$state) {
29726
30096
  $$ctx.exit?.("JSXImplicitFragment", $$state, $$r, $$eventData);
29727
30097
  return $$r;
29728
30098
  }
29729
- var JSXTag$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R84, "JSXTag /(?=[<])/"), _JSXTag);
30099
+ var JSXTag$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R81, "JSXTag /(?=[<])/"), _JSXTag);
29730
30100
  function JSXTag($$ctx, $$state) {
29731
30101
  const $$entered = $$ctx.enter?.("JSXTag", $$state);
29732
30102
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -30050,7 +30420,7 @@ function JSXElementName($$ctx, $$state) {
30050
30420
  $$ctx.exit?.("JSXElementName", $$state, $$final, $$eventData);
30051
30421
  return $$final;
30052
30422
  }
30053
- var JSXIdentifierName$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R85, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
30423
+ var JSXIdentifierName$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R82, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
30054
30424
  function JSXIdentifierName($$ctx, $$state) {
30055
30425
  const $$entered = $$ctx.enter?.("JSXIdentifierName", $$state);
30056
30426
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -30166,7 +30536,7 @@ var JSXAttribute$3$parser = (0, import_lib2.$S)(AtThis, (0, import_lib2.$E)(Iden
30166
30536
  var JSXAttribute$4$parser = (0, import_lib2.$S)(Identifier, (0, import_lib2.$P)(InlineJSXCallExpressionRest), (0, import_lib2.$Y)(JSXAttributeSpace));
30167
30537
  var JSXAttribute$5$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L177, 'JSXAttribute "#"'), JSXShorthandString);
30168
30538
  var JSXAttribute$6$parser = (0, import_lib2.$S)(Dot, JSXShorthandString);
30169
- var JSXAttribute$7$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R86, "JSXAttribute /[!+-]/")), JSXAttributeName, (0, import_lib2.$Y)(JSXAttributeSpace));
30539
+ var JSXAttribute$7$parser = (0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R83, "JSXAttribute /[!+-]/")), JSXAttributeName, (0, import_lib2.$Y)(JSXAttributeSpace));
30170
30540
  function JSXAttribute$0($$ctx, $$state) {
30171
30541
  const $$r = JSXAttribute$0$parser($$ctx, $$state);
30172
30542
  if (!$$r) {
@@ -30332,7 +30702,7 @@ function JSXAttribute($$ctx, $$state) {
30332
30702
  $$ctx.exit?.("JSXAttribute", $$state, $$final, $$eventData);
30333
30703
  return $$final;
30334
30704
  }
30335
- var JSXAttributeSpace$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R87, "JSXAttributeSpace /[\\s>]|\\/>/"));
30705
+ var JSXAttributeSpace$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R84, "JSXAttributeSpace /[\\s>]|\\/>/"));
30336
30706
  function JSXAttributeSpace($$ctx, $$state) {
30337
30707
  const $$entered = $$ctx.enter?.("JSXAttributeSpace", $$state);
30338
30708
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -30341,7 +30711,7 @@ function JSXAttributeSpace($$ctx, $$state) {
30341
30711
  $$ctx.exit?.("JSXAttributeSpace", $$state, $$final, $$eventData);
30342
30712
  return $$final;
30343
30713
  }
30344
- var JSXShorthandString$0$parser = (0, import_lib2.$EXPECT)($R88, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/");
30714
+ var JSXShorthandString$0$parser = (0, import_lib2.$EXPECT)($R85, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/");
30345
30715
  var JSXShorthandString$1$parser = (0, import_lib2.$S)(TemplateLiteral);
30346
30716
  var JSXShorthandString$3$parser = (0, import_lib2.$S)(OpenBrace, PostfixedExpressionOrCommaLoop, __, CloseBrace);
30347
30717
  function JSXShorthandString$0($$ctx, $$state) {
@@ -30442,7 +30812,7 @@ function JSXAttributeInitializer($$ctx, $$state) {
30442
30812
  }
30443
30813
  var JSXAttributeValue$0$parser = (0, import_lib2.$S)(OpenBrace, PostfixedExpressionOrCommaLoop, __, CloseBrace);
30444
30814
  var JSXAttributeValue$3$parser = (0, import_lib2.$S)(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace, (0, import_lib2.$Y)(JSXAttributeSpace));
30445
- var JSXAttributeValue$4$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R89, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
30815
+ var JSXAttributeValue$4$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R86, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
30446
30816
  function JSXAttributeValue$0($$ctx, $$state) {
30447
30817
  return JSXAttributeValue$0$parser($$ctx, $$state);
30448
30818
  }
@@ -30499,7 +30869,7 @@ function InlineJSXAttributeValue($$ctx, $$state) {
30499
30869
  $$ctx.exit?.("InlineJSXAttributeValue", $$state, $$r, $$eventData);
30500
30870
  return $$r;
30501
30871
  }
30502
- var InlineJSXBinaryOpRHS$parser = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($R90, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression);
30872
+ var InlineJSXBinaryOpRHS$parser = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($R87, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression);
30503
30873
  function InlineJSXBinaryOpRHS($$ctx, $$state) {
30504
30874
  const $$entered = $$ctx.enter?.("InlineJSXBinaryOpRHS", $$state);
30505
30875
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -30535,7 +30905,7 @@ function InlineJSXUnaryExpression($$ctx, $$state) {
30535
30905
  $$ctx.exit?.("InlineJSXUnaryExpression", $$state, $$r, $$eventData);
30536
30906
  return $$r;
30537
30907
  }
30538
- var InlineJSXUnaryOp$parser = (0, import_lib2.$EXPECT)($R91, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/");
30908
+ var InlineJSXUnaryOp$parser = (0, import_lib2.$EXPECT)($R88, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/");
30539
30909
  function InlineJSXUnaryOp($$ctx, $$state) {
30540
30910
  const $$entered = $$ctx.enter?.("InlineJSXUnaryOp", $$state);
30541
30911
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -31096,7 +31466,7 @@ function JSXComment($$ctx, $$state) {
31096
31466
  $$ctx.exit?.("JSXComment", $$state, $$r, $$eventData);
31097
31467
  return $$r;
31098
31468
  }
31099
- var JSXCommentContent$parser = (0, import_lib2.$EXPECT)($R92, "JSXCommentContent /(?:-[^-]|[^-]*)*/");
31469
+ var JSXCommentContent$parser = (0, import_lib2.$EXPECT)($R89, "JSXCommentContent /(?:-[^-]|[^-]*)*/");
31100
31470
  function JSXCommentContent($$ctx, $$state) {
31101
31471
  const $$entered = $$ctx.enter?.("JSXCommentContent", $$state);
31102
31472
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -31113,7 +31483,7 @@ function JSXCommentContent($$ctx, $$state) {
31113
31483
  $$ctx.exit?.("JSXCommentContent", $$state, $$r, $$eventData);
31114
31484
  return $$r;
31115
31485
  }
31116
- var JSXText$parser = (0, import_lib2.$EXPECT)($R93, "JSXText /[^{}<>\\r\\n]+/");
31486
+ var JSXText$parser = (0, import_lib2.$EXPECT)($R90, "JSXText /[^{}<>\\r\\n]+/");
31117
31487
  function JSXText($$ctx, $$state) {
31118
31488
  const $$entered = $$ctx.enter?.("JSXText", $$state);
31119
31489
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -32221,7 +32591,7 @@ function TypeProperty($$ctx, $$state) {
32221
32591
  $$ctx.exit?.("TypeProperty", $$state, $$r, $$eventData);
32222
32592
  return $$r;
32223
32593
  }
32224
- var TypeIndexSignature$parser = (0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R94, "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)))));
32594
+ 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)))));
32225
32595
  function TypeIndexSignature($$ctx, $$state) {
32226
32596
  const $$entered = $$ctx.enter?.("TypeIndexSignature", $$state);
32227
32597
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -33286,7 +33656,7 @@ function TypeWithPostfix($$ctx, $$state) {
33286
33656
  $$ctx.exit?.("TypeWithPostfix", $$state, $$r, $$eventData);
33287
33657
  return $$r;
33288
33658
  }
33289
- var TypeConditional$0$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($R95, "TypeConditional /(?=if|unless)/"), TypeIfThenElse);
33659
+ var TypeConditional$0$parser = (0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($R92, "TypeConditional /(?=if|unless)/"), TypeIfThenElse);
33290
33660
  var TypeConditional$1$parser = (0, import_lib2.$S)(TypeCondition, NotDedented, QuestionMark, __, Type, __, Colon, __, Type);
33291
33661
  var TypeConditional$2$parser = TypeBinary;
33292
33662
  function TypeConditional$0($$ctx, $$state) {
@@ -33711,7 +34081,7 @@ function TypeFunction($$ctx, $$state) {
33711
34081
  message: "abstract function types must be constructors (abstract new)"
33712
34082
  };
33713
34083
  }
33714
- if (returnType.$loc && returnType.token === "") {
34084
+ if ("token" in returnType && returnType.$loc && returnType.token === "") {
33715
34085
  const t = {
33716
34086
  type: "VoidType",
33717
34087
  $loc: returnType.$loc,
@@ -33828,8 +34198,8 @@ function TypeApplicationStart($$ctx, $$state) {
33828
34198
  $$ctx.exit?.("TypeApplicationStart", $$state, $$final, $$eventData);
33829
34199
  return $$final;
33830
34200
  }
33831
- var ForbiddenImplicitTypeCalls$1$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R96, "ForbiddenImplicitTypeCalls /[|&<!=\\-\u21D2\u2192]/"));
33832
- var ForbiddenImplicitTypeCalls$2$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R97, "ForbiddenImplicitTypeCalls /(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
34201
+ var ForbiddenImplicitTypeCalls$1$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R93, "ForbiddenImplicitTypeCalls /[|&<!=\\-\u21D2\u2192]/"));
34202
+ var ForbiddenImplicitTypeCalls$2$parser = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R94, "ForbiddenImplicitTypeCalls /(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
33833
34203
  function ForbiddenImplicitTypeCalls$0($$ctx, $$state) {
33834
34204
  return ReservedBinary($$ctx, $$state);
33835
34205
  }
@@ -34048,7 +34418,7 @@ function TypeParameters($$ctx, $$state) {
34048
34418
  $$ctx.exit?.("TypeParameters", $$state, $$r, $$eventData);
34049
34419
  return $$r;
34050
34420
  }
34051
- var TypeParameter$parser = (0, import_lib2.$S)(__, (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R98, "TypeParameter /const|in|out/")), _)), Identifier, (0, import_lib2.$E)(TypeConstraint), (0, import_lib2.$E)(TypeInitializer), TypeParameterDelimiter);
34421
+ 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);
34052
34422
  function TypeParameter($$ctx, $$state) {
34053
34423
  const $$entered = $$ctx.enter?.("TypeParameter", $$state);
34054
34424
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -34132,7 +34502,7 @@ function ThisType($$ctx, $$state) {
34132
34502
  $$ctx.exit?.("ThisType", $$state, $$r, $$eventData);
34133
34503
  return $$r;
34134
34504
  }
34135
- var Shebang$parser = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R99, "Shebang /#![^\\r\\n]*/")), EOL);
34505
+ var Shebang$parser = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R96, "Shebang /#![^\\r\\n]*/")), EOL);
34136
34506
  function Shebang($$ctx, $$state) {
34137
34507
  const $$entered = $$ctx.enter?.("Shebang", $$state);
34138
34508
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -34141,8 +34511,8 @@ function Shebang($$ctx, $$state) {
34141
34511
  $$ctx.exit?.("Shebang", $$state, $$final, $$eventData);
34142
34512
  return $$final;
34143
34513
  }
34144
- var CivetPrologue$0$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R100, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, (0, import_lib2.$EXPECT)($R23, "CivetPrologue /[ \\t]*/"), (0, import_lib2.$C)(EOL, (0, import_lib2.$Y)(RestOfLine)));
34145
- var CivetPrologue$1$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R100, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, (0, import_lib2.$EXPECT)($R23, "CivetPrologue /[ \\t]*/"), (0, import_lib2.$C)(EOL, (0, import_lib2.$Y)(RestOfLine)));
34514
+ 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)));
34515
+ 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)));
34146
34516
  function CivetPrologue$0($$ctx, $$state) {
34147
34517
  const $$r = CivetPrologue$0$parser($$ctx, $$state);
34148
34518
  if (!$$r) {
@@ -34173,7 +34543,7 @@ function CivetPrologue($$ctx, $$state) {
34173
34543
  $$ctx.exit?.("CivetPrologue", $$state, $$final, $$eventData);
34174
34544
  return $$final;
34175
34545
  }
34176
- var CivetPrologueContent$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L248, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib2.$Q)(CivetOption), (0, import_lib2.$EXPECT)($R101, "CivetPrologueContent /[\\s]*/"));
34546
+ 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]*/"));
34177
34547
  function CivetPrologueContent($$ctx, $$state) {
34178
34548
  const $$entered = $$ctx.enter?.("CivetPrologueContent", $$state);
34179
34549
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -34194,7 +34564,7 @@ function CivetPrologueContent($$ctx, $$state) {
34194
34564
  $$ctx.exit?.("CivetPrologueContent", $$state, $$r, $$eventData);
34195
34565
  return $$r;
34196
34566
  }
34197
- var CivetOption$parser = (0, import_lib2.$EXPECT)($R102, "CivetOption /\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?/");
34567
+ var CivetOption$parser = (0, import_lib2.$EXPECT)($R99, "CivetOption /\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?/");
34198
34568
  function CivetOption($$ctx, $$state) {
34199
34569
  const $$entered = $$ctx.enter?.("CivetOption", $$state);
34200
34570
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -34232,7 +34602,7 @@ function CivetOption($$ctx, $$state) {
34232
34602
  $$ctx.exit?.("CivetOption", $$state, $$r, $$eventData);
34233
34603
  return $$r;
34234
34604
  }
34235
- var UnknownPrologue$parser = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R100, "UnknownPrologue /[\\t ]*/")), StringLiteral, (0, import_lib2.$TEXT)(SimpleStatementDelimiter), EOS);
34605
+ 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);
34236
34606
  function UnknownPrologue($$ctx, $$state) {
34237
34607
  const $$entered = $$ctx.enter?.("UnknownPrologue", $$state);
34238
34608
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -34241,7 +34611,7 @@ function UnknownPrologue($$ctx, $$state) {
34241
34611
  $$ctx.exit?.("UnknownPrologue", $$state, $$final, $$eventData);
34242
34612
  return $$final;
34243
34613
  }
34244
- var TripleSlashDirective$parser = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R103, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), (0, import_lib2.$E)(EOS));
34614
+ 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));
34245
34615
  function TripleSlashDirective($$ctx, $$state) {
34246
34616
  const $$entered = $$ctx.enter?.("TripleSlashDirective", $$state);
34247
34617
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -34281,7 +34651,7 @@ function PrologueString($$ctx, $$state) {
34281
34651
  $$ctx.exit?.("PrologueString", $$state, $$final, $$eventData);
34282
34652
  return $$final;
34283
34653
  }
34284
- var EOS$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R104, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), (0, import_lib2.$P)(RestOfLine));
34654
+ var EOS$parser = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($R101, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), (0, import_lib2.$P)(RestOfLine));
34285
34655
  function EOS($$ctx, $$state) {
34286
34656
  const $$entered = $$ctx.enter?.("EOS", $$state);
34287
34657
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -34298,7 +34668,7 @@ function EOS($$ctx, $$state) {
34298
34668
  $$ctx.exit?.("EOS", $$state, $$r, $$eventData);
34299
34669
  return $$r;
34300
34670
  }
34301
- var EOL$parser = (0, import_lib2.$EXPECT)($R105, "EOL /\\r\\n|\\n|\\r|$/");
34671
+ var EOL$parser = (0, import_lib2.$EXPECT)($R102, "EOL /\\r\\n|\\n|\\r|$/");
34302
34672
  function EOL($$ctx, $$state) {
34303
34673
  const $$entered = $$ctx.enter?.("EOL", $$state);
34304
34674
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -34993,6 +35363,24 @@ function ESArrowFunctionEnabled($$ctx, $$state) {
34993
35363
  $$ctx.exit?.("ESArrowFunctionEnabled", $$state, $$final, $$eventData);
34994
35364
  return $$final;
34995
35365
  }
35366
+ var ESBraceBlockEnabled$parser = (0, import_lib2.$EXPECT)($L0, 'ESBraceBlockEnabled ""');
35367
+ function ESBraceBlockEnabled($$ctx, $$state) {
35368
+ const $$entered = $$ctx.enter?.("ESBraceBlockEnabled", $$state);
35369
+ if ($$entered && "cache" in $$entered) return $$entered.cache;
35370
+ const $$eventData = $$entered?.data;
35371
+ const $$r = ESBraceBlockEnabled$parser($$ctx, $$state);
35372
+ if (!$$r) {
35373
+ $$ctx.exit?.("ESBraceBlockEnabled", $$state, void 0, $$eventData);
35374
+ return void 0;
35375
+ }
35376
+ const $$m = (function() {
35377
+ if (config.esBraceBlock) return;
35378
+ return $skip;
35379
+ })();
35380
+ const $$final = $$m !== import_lib2.SKIP ? ($$r.value = $$m, $$r) : void 0;
35381
+ $$ctx.exit?.("ESBraceBlockEnabled", $$state, $$final, $$eventData);
35382
+ return $$final;
35383
+ }
34996
35384
  var JSXCodeNestedEnabled$parser = (0, import_lib2.$EXPECT)($L0, 'JSXCodeNestedEnabled ""');
34997
35385
  function JSXCodeNestedEnabled($$ctx, $$state) {
34998
35386
  const $$entered = $$ctx.enter?.("JSXCodeNestedEnabled", $$state);
@@ -35273,7 +35661,7 @@ function Prologue($$ctx, $$state) {
35273
35661
  $$ctx.exit?.("Prologue", $$state, $$final, $$eventData);
35274
35662
  return $$final;
35275
35663
  }
35276
- var ProloguePrefix$parser = (0, import_lib2.$S)(Prologue, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R106, "ProloguePrefix /[^]*/")));
35664
+ var ProloguePrefix$parser = (0, import_lib2.$S)(Prologue, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R103, "ProloguePrefix /[^]*/")));
35277
35665
  function ProloguePrefix($$ctx, $$state) {
35278
35666
  const $$entered = $$ctx.enter?.("ProloguePrefix", $$state);
35279
35667
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -35282,7 +35670,7 @@ function ProloguePrefix($$ctx, $$state) {
35282
35670
  $$ctx.exit?.("ProloguePrefix", $$state, $$final, $$eventData);
35283
35671
  return $$final;
35284
35672
  }
35285
- var Indent$parser = (0, import_lib2.$EXPECT)($R23, "Indent /[ \\t]*/");
35673
+ var Indent$parser = (0, import_lib2.$EXPECT)($R21, "Indent /[ \\t]*/");
35286
35674
  function Indent($$ctx, $$state) {
35287
35675
  const $$entered = $$ctx.enter?.("Indent", $$state);
35288
35676
  if ($$entered && "cache" in $$entered) return $$entered.cache;
@@ -35330,12 +35718,19 @@ function TrackIndented($$ctx, $$state) {
35330
35718
  $$ctx.exit?.("TrackIndented", $$state, $$final, $$eventData);
35331
35719
  return $$final;
35332
35720
  }
35333
- var PushIndent$parser = (0, import_lib2.$Y)((0, import_lib2.$S)(EOS, TrackIndented));
35721
+ var PushIndent$0$parser = (0, import_lib2.$Y)((0, import_lib2.$S)(EOS, TrackIndented));
35722
+ var PushIndent$1$parser = (0, import_lib2.$Y)((0, import_lib2.$S)(EOL, TrackIndented));
35723
+ function PushIndent$0($$ctx, $$state) {
35724
+ return PushIndent$0$parser($$ctx, $$state);
35725
+ }
35726
+ function PushIndent$1($$ctx, $$state) {
35727
+ return PushIndent$1$parser($$ctx, $$state);
35728
+ }
35334
35729
  function PushIndent($$ctx, $$state) {
35335
35730
  const $$entered = $$ctx.enter?.("PushIndent", $$state);
35336
35731
  if ($$entered && "cache" in $$entered) return $$entered.cache;
35337
35732
  const $$eventData = $$entered?.data;
35338
- const $$final = PushIndent$parser($$ctx, $$state);
35733
+ const $$final = PushIndent$0($$ctx, $$state) || PushIndent$1($$ctx, $$state);
35339
35734
  $$ctx.exit?.("PushIndent", $$state, $$final, $$eventData);
35340
35735
  return $$final;
35341
35736
  }
@@ -35660,6 +36055,8 @@ function parseProgram(input, options) {
35660
36055
  });
35661
36056
  }
35662
36057
  }
36058
+ var unicodeEscapePattern = String.raw`\\u\{0*(?:[\dA-Fa-f]{1,5}|10[\dA-Fa-f]{4})\}|\\u[\dA-Fa-f]{4}`;
36059
+ var nonAsciiIdentifierPattern = String.raw`[^\u0000-\u007F\p{ID_Continue}\s÷—‖’•‥…⁇→⇒∈∉∋∌≔≠≡≢≣≤≥≪≫⋙▷⧺⩵⩶]`;
35663
36060
  var wellKnownSymbols = [
35664
36061
  "asyncIterator",
35665
36062
  "hasInstance",
@@ -35675,6 +36072,16 @@ var wellKnownSymbols = [
35675
36072
  "toStringTag",
35676
36073
  "unscopables"
35677
36074
  ];
36075
+ var heregexEscapes = {
36076
+ "\n": "\\n",
36077
+ "\r": "\\r",
36078
+ "\u2028": "\\u2028",
36079
+ "\u2029": "\\u2029",
36080
+ " ": "\\t",
36081
+ "\v": "\\v",
36082
+ "\f": "\\f",
36083
+ " ": " "
36084
+ };
35678
36085
 
35679
36086
  // source/sourcemap.civet
35680
36087
  var sourcemap_exports = {};