@danielx/civet 0.8.14 → 0.8.16

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.js CHANGED
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  ));
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
- // node_modules/.pnpm/@danielx+hera@0.8.16/node_modules/@danielx/hera/dist/machine.js
33
+ // node_modules/@danielx/hera/dist/machine.js
34
34
  var require_machine = __commonJS({
35
- "node_modules/.pnpm/@danielx+hera@0.8.16/node_modules/@danielx/hera/dist/machine.js"(exports2, module2) {
35
+ "node_modules/@danielx/hera/dist/machine.js"(exports2, module2) {
36
36
  "use strict";
37
37
  var __defProp2 = Object.defineProperty;
38
38
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -58,7 +58,7 @@ var require_machine = __commonJS({
58
58
  $EVENT: () => $EVENT2,
59
59
  $EVENT_C: () => $EVENT_C2,
60
60
  $EXPECT: () => $EXPECT2,
61
- $L: () => $L246,
61
+ $L: () => $L247,
62
62
  $N: () => $N2,
63
63
  $P: () => $P2,
64
64
  $Q: () => $Q2,
@@ -83,7 +83,7 @@ var require_machine = __commonJS({
83
83
  return result;
84
84
  };
85
85
  }
86
- function $L246(str) {
86
+ function $L247(str) {
87
87
  return function(_ctx, state2) {
88
88
  const { input, pos } = state2, { length } = str, end = pos + length;
89
89
  if (input.substring(pos, end) === str) {
@@ -536,6 +536,7 @@ __export(lib_exports, {
536
536
  hasAwait: () => hasAwait,
537
537
  hasExportDeclaration: () => hasExportDeclaration,
538
538
  hasImportDeclaration: () => hasImportDeclaration,
539
+ hasTrailingComment: () => hasTrailingComment,
539
540
  hasYield: () => hasYield,
540
541
  insertTrimmingSpace: () => insertTrimmingSpace,
541
542
  isComma: () => isComma,
@@ -761,6 +762,8 @@ function isExit(node) {
761
762
  if (!(node != null)) {
762
763
  return false;
763
764
  }
765
+ let ref3;
766
+ let ref4;
764
767
  switch (node.type) {
765
768
  case "ReturnStatement":
766
769
  case "ThrowStatement":
@@ -769,13 +772,30 @@ function isExit(node) {
769
772
  return true;
770
773
  }
771
774
  case "IfStatement": {
772
- return isExit(node.then) && isExit(node.else?.block);
775
+ return (
776
+ // `insertReturn` for IfStatement adds a return to children
777
+ // when there's no else block
778
+ (ref3 = node.children)[ref3.length - 1]?.type === "ReturnStatement" || (ref4 = node.children)[ref4.length - 1]?.[1]?.type === "ReturnStatement" || isExit(node.then) && isExit(node.else?.block)
779
+ );
780
+ }
781
+ case "PatternMatchingStatement": {
782
+ return isExit(node.children[0][1]);
783
+ }
784
+ case "SwitchStatement": {
785
+ return (
786
+ // Ensure exhaustive by requiring an else/default clause
787
+ node.caseBlock.clauses.some(($) => $.type === "DefaultClause") && // Every clause should exit
788
+ node.caseBlock.clauses.every(isExit)
789
+ );
790
+ }
791
+ case "TryStatement": {
792
+ return node.blocks.every(isExit);
773
793
  }
774
794
  case "BlockStatement": {
775
795
  return node.expressions.some((s) => isExit(s[1]));
776
796
  }
777
797
  case "IterationStatement": {
778
- return isLoopStatement(node) && gatherRecursiveWithinFunction(node.block, ($) => $.type === "BreakStatement").length === 0;
798
+ return isLoopStatement(node) && gatherRecursiveWithinFunction(node.block, ($1) => $1.type === "BreakStatement").length === 0;
779
799
  }
780
800
  default: {
781
801
  return false;
@@ -802,6 +822,22 @@ function stripTrailingImplicitComma(children) {
802
822
  return children;
803
823
  }
804
824
  }
825
+ function hasTrailingComment(node) {
826
+ if (!(node != null)) {
827
+ return false;
828
+ }
829
+ if (node.type === "Comment") {
830
+ return true;
831
+ }
832
+ if (Array.isArray(node)) {
833
+ return hasTrailingComment(node[node.length - 1]);
834
+ }
835
+ if ("children" in node) {
836
+ let ref5;
837
+ return hasTrailingComment((ref5 = node.children)[ref5.length - 1]);
838
+ }
839
+ return false;
840
+ }
805
841
  function insertTrimmingSpace(target, c) {
806
842
  if (!(target != null)) {
807
843
  return target;
@@ -810,18 +846,31 @@ function insertTrimmingSpace(target, c) {
810
846
  if (target.length === 0) {
811
847
  return c;
812
848
  }
813
- return target.map((e, i) => {
849
+ const results = [];
850
+ for (let i3 = 0, len3 = target.length; i3 < len3; i3++) {
851
+ const i = i3;
852
+ const e = target[i3];
814
853
  if (i === 0) {
815
- return insertTrimmingSpace(e, c);
854
+ results.push(insertTrimmingSpace(e, c));
816
855
  } else {
817
- return e;
856
+ results.push(e);
818
857
  }
819
- });
858
+ }
859
+ ;
860
+ return results;
820
861
  } else if (isParent(target)) {
821
- return {
862
+ const oldChildren = target.children;
863
+ target = {
822
864
  ...target,
823
865
  children: insertTrimmingSpace(target.children, c)
824
866
  };
867
+ for (const key in target) {
868
+ const i = oldChildren.indexOf(target[key]);
869
+ if (i >= 0) {
870
+ target[key] = target.children[i];
871
+ }
872
+ }
873
+ return target;
825
874
  } else if (isToken(target)) {
826
875
  return {
827
876
  ...target,
@@ -917,7 +966,7 @@ function literalValue(literal) {
917
966
  case "false":
918
967
  return false;
919
968
  }
920
- let ref3;
969
+ let ref6;
921
970
  switch (literal.subtype) {
922
971
  case "StringLiteral": {
923
972
  assert.equal(
@@ -933,8 +982,8 @@ function literalValue(literal) {
933
982
  return BigInt(raw.slice(0, -1));
934
983
  } else if (raw.match(/[\.eE]/)) {
935
984
  return parseFloat(raw);
936
- } else if ((ref3 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref3) && len(ref3, 2)) {
937
- const [, base] = ref3;
985
+ } else if ((ref6 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref6) && len(ref6, 2)) {
986
+ const [, base] = ref6;
938
987
  switch (base.toLowerCase()) {
939
988
  case "x":
940
989
  return parseInt(raw.replace(/0[xX]/, ""), 16);
@@ -996,8 +1045,8 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
996
1045
  return void 0;
997
1046
  }
998
1047
  if (Array.isArray(node)) {
999
- for (let i3 = 0, len3 = node.length; i3 < len3; i3++) {
1000
- const child = node[i3];
1048
+ for (let i4 = 0, len4 = node.length; i4 < len4; i4++) {
1049
+ const child = node[i4];
1001
1050
  if (skip(child)) {
1002
1051
  continue;
1003
1052
  }
@@ -1014,16 +1063,16 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
1014
1063
  return startsWithPredicate(node.children, predicate);
1015
1064
  }
1016
1065
  function hasAwait(exp) {
1017
- return gatherRecursiveWithinFunction(exp, ($1) => $1.type === "Await").length > 0;
1066
+ return gatherRecursiveWithinFunction(exp, ($2) => $2.type === "Await").length > 0;
1018
1067
  }
1019
1068
  function hasYield(exp) {
1020
- return gatherRecursiveWithinFunction(exp, ($2) => $2.type === "Yield").length > 0;
1069
+ return gatherRecursiveWithinFunction(exp, ($3) => $3.type === "Yield").length > 0;
1021
1070
  }
1022
1071
  function hasImportDeclaration(exp) {
1023
- return gatherRecursiveWithinFunction(exp, ($3) => $3.type === "ImportDeclaration").length > 0;
1072
+ return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ImportDeclaration").length > 0;
1024
1073
  }
1025
1074
  function hasExportDeclaration(exp) {
1026
- return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ExportDeclaration").length > 0;
1075
+ return gatherRecursiveWithinFunction(exp, ($5) => $5.type === "ExportDeclaration").length > 0;
1027
1076
  }
1028
1077
  function deepCopy(root) {
1029
1078
  const copied = /* @__PURE__ */ new Map();
@@ -1036,9 +1085,9 @@ function deepCopy(root) {
1036
1085
  if (Array.isArray(node)) {
1037
1086
  const array = new Array(node.length);
1038
1087
  copied.set(node, array);
1039
- for (let i4 = 0, len4 = node.length; i4 < len4; i4++) {
1040
- const i = i4;
1041
- const item = node[i4];
1088
+ for (let i5 = 0, len5 = node.length; i5 < len5; i5++) {
1089
+ const i = i5;
1090
+ const item = node[i5];
1042
1091
  array[i] = recurse(item);
1043
1092
  }
1044
1093
  } else if (node?.type === "Ref") {
@@ -1065,9 +1114,9 @@ function replaceNode(node, newNode, parent) {
1065
1114
  throw new Error("replaceNode failed: node has no parent");
1066
1115
  }
1067
1116
  function recurse(children) {
1068
- for (let i5 = 0, len5 = children.length; i5 < len5; i5++) {
1069
- const i = i5;
1070
- const child = children[i5];
1117
+ for (let i6 = 0, len6 = children.length; i6 < len6; i6++) {
1118
+ const i = i6;
1119
+ const child = children[i6];
1071
1120
  if (child === node) {
1072
1121
  children[i] = newNode;
1073
1122
  return true;
@@ -1104,9 +1153,9 @@ function replaceNodes(root, predicate, replacer) {
1104
1153
  return root;
1105
1154
  }
1106
1155
  }
1107
- for (let i6 = 0, len6 = array.length; i6 < len6; i6++) {
1108
- const i = i6;
1109
- const node = array[i6];
1156
+ for (let i7 = 0, len7 = array.length; i7 < len7; i7++) {
1157
+ const i = i7;
1158
+ const node = array[i7];
1110
1159
  if (!(node != null)) {
1111
1160
  return;
1112
1161
  }
@@ -1168,7 +1217,7 @@ function makeLeftHandSideExpression(expression) {
1168
1217
  if (skipParens.has(expression.type)) {
1169
1218
  return expression;
1170
1219
  }
1171
- if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($5) => $5.type === "ObjectExpression")) {
1220
+ if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($6) => $6.type === "ObjectExpression")) {
1172
1221
  return expression;
1173
1222
  }
1174
1223
  }
@@ -1183,7 +1232,7 @@ function parenthesizeExpression(expression) {
1183
1232
  });
1184
1233
  }
1185
1234
  function checkValidLHS(node) {
1186
- let ref4;
1235
+ let ref7;
1187
1236
  switch (node?.type) {
1188
1237
  case "UnaryExpression": {
1189
1238
  node.children.unshift({
@@ -1193,7 +1242,7 @@ function checkValidLHS(node) {
1193
1242
  return true;
1194
1243
  }
1195
1244
  case "CallExpression": {
1196
- const lastType = (ref4 = node.children)[ref4.length - 1]?.type;
1245
+ const lastType = (ref7 = node.children)[ref7.length - 1]?.type;
1197
1246
  switch (lastType) {
1198
1247
  case "PropertyAccess":
1199
1248
  case "SliceExpression":
@@ -1230,8 +1279,8 @@ function updateParentPointers(node, parent, depth = 1) {
1230
1279
  return;
1231
1280
  }
1232
1281
  if (Array.isArray(node)) {
1233
- for (let i7 = 0, len7 = node.length; i7 < len7; i7++) {
1234
- const child = node[i7];
1282
+ for (let i8 = 0, len8 = node.length; i8 < len8; i8++) {
1283
+ const child = node[i8];
1235
1284
  updateParentPointers(child, parent, depth);
1236
1285
  }
1237
1286
  return;
@@ -1241,8 +1290,8 @@ function updateParentPointers(node, parent, depth = 1) {
1241
1290
  node.parent = parent;
1242
1291
  }
1243
1292
  if (depth && isParent(node)) {
1244
- for (let ref5 = node.children, i8 = 0, len8 = ref5.length; i8 < len8; i8++) {
1245
- const child = ref5[i8];
1293
+ for (let ref8 = node.children, i9 = 0, len9 = ref8.length; i9 < len9; i9++) {
1294
+ const child = ref8[i9];
1246
1295
  updateParentPointers(child, node, depth - 1);
1247
1296
  }
1248
1297
  }
@@ -1290,11 +1339,11 @@ function convertOptionalType(suffix) {
1290
1339
  const wrap = suffix.type === "ReturnTypeAnnotation";
1291
1340
  spliceChild(suffix, suffix.t, 1, suffix.t = [
1292
1341
  getTrimmingSpace(suffix.t),
1293
- wrap && "(",
1342
+ wrap ? "(" : void 0,
1294
1343
  // TODO: avoid parens if unnecessary
1295
1344
  "undefined | ",
1296
- parenthesizeType(insertTrimmingSpace(suffix.t, "")),
1297
- wrap && ")"
1345
+ parenthesizeType(trimFirstSpace(suffix.t)),
1346
+ wrap ? ")" : void 0
1298
1347
  ]);
1299
1348
  }
1300
1349
  var typeNeedsNoParens = /* @__PURE__ */ new Set([
@@ -1308,7 +1357,11 @@ function parenthesizeType(type) {
1308
1357
  if (typeNeedsNoParens.has(type.type)) {
1309
1358
  return type;
1310
1359
  }
1311
- return ["(", type, ")"];
1360
+ return makeNode({
1361
+ type: "TypeParenthesized",
1362
+ ts: true,
1363
+ children: ["(", type, ")"]
1364
+ });
1312
1365
  }
1313
1366
  function wrapIIFE(expressions, asyncFlag, generator) {
1314
1367
  let awaitPrefix;
@@ -1379,8 +1432,8 @@ function wrapIIFE(expressions, asyncFlag, generator) {
1379
1432
  children.splice(1, 0, ".bind(this)");
1380
1433
  }
1381
1434
  if (gatherRecursiveWithinFunction(block, (a2) => typeof a2 === "object" && a2 != null && "token" in a2 && a2.token === "arguments").length) {
1382
- let ref6;
1383
- children[children.length - 1] = (ref6 = parameters.children)[ref6.length - 1] = "(arguments)";
1435
+ let ref9;
1436
+ children[children.length - 1] = (ref9 = parameters.children)[ref9.length - 1] = "(arguments)";
1384
1437
  }
1385
1438
  }
1386
1439
  let exp = makeNode({
@@ -1407,20 +1460,23 @@ function wrapIIFE(expressions, asyncFlag, generator) {
1407
1460
  }
1408
1461
  return exp;
1409
1462
  }
1410
- function wrapWithReturn(expression) {
1463
+ function wrapWithReturn(expression, parent = expression?.parent, semi = false) {
1411
1464
  const children = expression ? ["return ", expression] : ["return"];
1465
+ if (semi) {
1466
+ children.unshift(";");
1467
+ }
1412
1468
  return makeNode({
1413
1469
  type: "ReturnStatement",
1414
1470
  children,
1415
1471
  expression,
1416
- parent: expression?.parent
1472
+ parent
1417
1473
  });
1418
1474
  }
1419
1475
  function flatJoin(array, separator) {
1420
1476
  const result = [];
1421
- for (let i9 = 0, len9 = array.length; i9 < len9; i9++) {
1422
- const i = i9;
1423
- const items = array[i9];
1477
+ for (let i10 = 0, len10 = array.length; i10 < len10; i10++) {
1478
+ const i = i10;
1479
+ const items = array[i10];
1424
1480
  if (i) {
1425
1481
  result.push(separator);
1426
1482
  }
@@ -1655,9 +1711,11 @@ function adjustBindingElements(elements) {
1655
1711
  if (l) {
1656
1712
  if (arrayElementHasTrailingComma(after[l - 1]))
1657
1713
  l++;
1714
+ const elements2 = trimFirstSpace(after);
1658
1715
  blockPrefix = {
1659
1716
  type: "PostRestBindingElements",
1660
- children: ["[", trimFirstSpace(after), "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
1717
+ elements: elements2,
1718
+ children: ["[", elements2, "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
1661
1719
  names: after.flatMap((p) => p.names)
1662
1720
  };
1663
1721
  }
@@ -1992,7 +2050,7 @@ var declareHelper = {
1992
2050
  AutoPromise(ref) {
1993
2051
  state.prelude.push([
1994
2052
  "",
1995
- ts(["type ", ref, "<T> = T extends Promise<unknown> ? T : Promise<T>"]),
2053
+ ts(["type ", ref, "<T> = Promise<Awaited<T>>"]),
1996
2054
  ";\n"
1997
2055
  ]);
1998
2056
  },
@@ -2661,14 +2719,10 @@ function processReturnValue(func) {
2661
2719
  let ref1;
2662
2720
  if (!((ref1 = block.children)[ref1.length - 2]?.type === "ReturnStatement")) {
2663
2721
  let ref2;
2664
- const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]) || ";";
2722
+ const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]);
2665
2723
  block.expressions.push([
2666
- [indent],
2667
- {
2668
- type: "ReturnStatement",
2669
- expression: ref,
2670
- children: ["return ", ref]
2671
- }
2724
+ indent,
2725
+ wrapWithReturn(ref, block, !indent)
2672
2726
  ]);
2673
2727
  }
2674
2728
  return true;
@@ -2680,34 +2734,103 @@ function patternAsValue(pattern) {
2680
2734
  const index = children.indexOf(pattern.elements);
2681
2735
  if (index < 0)
2682
2736
  throw new Error("failed to find elements in ArrayBindingPattern");
2683
- children[index] = pattern.elements.map((el) => {
2684
- const [ws, e, delim] = el.children;
2685
- return { ...el, children: [ws, patternAsValue(e), delim] };
2686
- });
2687
- return { ...pattern, children };
2737
+ const elements = children[index] = pattern.elements.map(patternAsValue);
2738
+ return { ...pattern, elements, children };
2688
2739
  }
2689
2740
  case "ObjectBindingPattern": {
2690
2741
  const children = [...pattern.children];
2691
2742
  const index = children.indexOf(pattern.properties);
2692
2743
  if (index < 0)
2693
2744
  throw new Error("failed to find properties in ArrayBindingPattern");
2694
- children[index] = pattern.properties.map(patternAsValue);
2695
- return { ...pattern, children };
2745
+ const properties = children[index] = pattern.properties.map(patternAsValue);
2746
+ return { ...pattern, properties, children };
2696
2747
  }
2697
- case "Identifier":
2698
2748
  case "BindingProperty": {
2699
- const children = [
2700
- // { name: value } = ... declares value, not name
2701
- pattern.value ?? pattern.name,
2702
- pattern.delim
2703
- ];
2704
- if (isWhitespaceOrEmpty(pattern.children[0])) {
2705
- children.unshift(pattern.children[0]);
2749
+ let children;
2750
+ if (pattern.value?.type === "Identifier") {
2751
+ children = [pattern.value, pattern.delim];
2752
+ if (isWhitespaceOrEmpty(pattern.children[0])) {
2753
+ children.unshift(pattern.children[0]);
2754
+ }
2755
+ } else {
2756
+ children = [...pattern.children];
2757
+ if (pattern.initializer != null) {
2758
+ const index = children.indexOf(pattern.initializer);
2759
+ assert.notEqual(index, -1, "failed to find initializer in BindingElement");
2760
+ children.splice(index, 1);
2761
+ }
2762
+ if (pattern.value != null) {
2763
+ children = children.map(($2) => $2 === pattern.value ? patternAsValue(pattern.value) : $2);
2764
+ }
2706
2765
  }
2707
2766
  return { ...pattern, children };
2708
2767
  }
2709
- default:
2768
+ case "AtBindingProperty": {
2769
+ const children = [...pattern.children];
2770
+ if (pattern.initializer != null) {
2771
+ const index = children.indexOf(pattern.initializer);
2772
+ assert.notEqual(index, -1, "failed to find initializer in AtBindingProperty");
2773
+ children.splice(index, 1);
2774
+ }
2775
+ return { ...pattern, children };
2776
+ }
2777
+ case "BindingElement": {
2778
+ const children = [...pattern.children];
2779
+ if (pattern.initializer != null) {
2780
+ const index2 = children.indexOf(pattern.initializer);
2781
+ assert.notEqual(index2, -1, "failed to find initializer in BindingElement");
2782
+ children.splice(index2, 1);
2783
+ }
2784
+ const index = children.indexOf(pattern.binding);
2785
+ assert.notEqual(index, -1, "failed to find binding in BindingElement");
2786
+ children[index] = patternAsValue(pattern.binding);
2787
+ return { ...pattern, children };
2788
+ }
2789
+ default: {
2710
2790
  return pattern;
2791
+ }
2792
+ }
2793
+ }
2794
+ function patternBindings(pattern) {
2795
+ const bindings = [];
2796
+ recurse(pattern);
2797
+ return bindings;
2798
+ function recurse(pattern2) {
2799
+ switch (pattern2.type) {
2800
+ case "ArrayBindingPattern": {
2801
+ for (let ref3 = pattern2.elements, i2 = 0, len1 = ref3.length; i2 < len1; i2++) {
2802
+ const element = ref3[i2];
2803
+ recurse(element);
2804
+ }
2805
+ ;
2806
+ break;
2807
+ }
2808
+ case "ObjectBindingPattern": {
2809
+ for (let ref4 = pattern2.properties, i3 = 0, len22 = ref4.length; i3 < len22; i3++) {
2810
+ const property = ref4[i3];
2811
+ recurse(property);
2812
+ }
2813
+ ;
2814
+ break;
2815
+ }
2816
+ case "BindingElement": {
2817
+ recurse(pattern2.binding);
2818
+ break;
2819
+ }
2820
+ case "BindingProperty": {
2821
+ recurse(pattern2.value ?? pattern2.name);
2822
+ break;
2823
+ }
2824
+ case "Binding": {
2825
+ recurse(pattern2.pattern);
2826
+ break;
2827
+ }
2828
+ case "Identifier":
2829
+ case "AtBinding": {
2830
+ bindings.push(pattern2);
2831
+ break;
2832
+ }
2833
+ }
2711
2834
  }
2712
2835
  }
2713
2836
  function assignResults(node, collect) {
@@ -2716,8 +2839,8 @@ function assignResults(node, collect) {
2716
2839
  switch (node.type) {
2717
2840
  case "BlockStatement":
2718
2841
  if (node.expressions.length) {
2719
- let ref3;
2720
- assignResults((ref3 = node.expressions)[ref3.length - 1], collect);
2842
+ let ref5;
2843
+ assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
2721
2844
  } else {
2722
2845
  node.expressions.push(["", collect("void 0"), ";"]);
2723
2846
  }
@@ -2752,7 +2875,7 @@ function assignResults(node, collect) {
2752
2875
  if (exp.type === "LabelledStatement") {
2753
2876
  exp = exp.statement;
2754
2877
  }
2755
- let ref4;
2878
+ let ref6;
2756
2879
  switch (exp.type) {
2757
2880
  case "BreakStatement":
2758
2881
  case "ContinueStatement":
@@ -2763,14 +2886,14 @@ function assignResults(node, collect) {
2763
2886
  return;
2764
2887
  }
2765
2888
  case "Declaration": {
2766
- let ref5;
2889
+ let ref7;
2767
2890
  if (exp.bindings?.length) {
2768
- ref5 = patternAsValue((ref4 = exp.bindings)[ref4.length - 1].pattern);
2891
+ ref7 = patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern);
2769
2892
  } else {
2770
- ref5 = "void 0";
2893
+ ref7 = "void 0";
2771
2894
  }
2772
2895
  ;
2773
- const value = ref5;
2896
+ const value = ref7;
2774
2897
  exp.children.push([
2775
2898
  "",
2776
2899
  [";", collect(value)]
@@ -2818,11 +2941,17 @@ function assignResults(node, collect) {
2818
2941
  return;
2819
2942
  }
2820
2943
  case "SwitchStatement": {
2821
- assignResults(exp.children[2], collect);
2944
+ for (let ref8 = exp.caseBlock.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
2945
+ const clause = ref8[i4];
2946
+ assignResults(clause, collect);
2947
+ }
2822
2948
  return;
2823
2949
  }
2824
2950
  case "TryStatement": {
2825
- exp.blocks.forEach((block) => assignResults(block, collect));
2951
+ for (let ref9 = exp.blocks, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
2952
+ const block = ref9[i5];
2953
+ assignResults(block, collect);
2954
+ }
2826
2955
  return;
2827
2956
  }
2828
2957
  }
@@ -2843,20 +2972,28 @@ function insertReturn(node) {
2843
2972
  const last = node.expressions[node.expressions.length - 1];
2844
2973
  insertReturn(last);
2845
2974
  } else {
2846
- if (node.parent.type === "CatchClause") {
2847
- node.expressions.push(["return"]);
2975
+ let m1;
2976
+ if (m1 = node.parent?.type, m1 === "CatchClause" || m1 === "WhenClause") {
2977
+ node.expressions.push(["", wrapWithReturn(void 0, node)]);
2848
2978
  }
2849
2979
  }
2850
2980
  return;
2851
2981
  }
2852
2982
  case "WhenClause": {
2853
2983
  if (node.break) {
2854
- node.children.splice(node.children.indexOf(node.break), 1);
2984
+ const breakIndex = node.children.indexOf(node.break);
2985
+ assert.notEqual(breakIndex, -1, "Could not find break in when clause");
2986
+ node.children.splice(breakIndex, 1);
2987
+ node.break = void 0;
2855
2988
  }
2856
- if (node.block.expressions.length) {
2857
- insertReturn(node.block);
2858
- } else {
2859
- node.block.expressions.push(wrapWithReturn());
2989
+ insertReturn(node.block);
2990
+ if (!isExit(node.block)) {
2991
+ const comment = hasTrailingComment(node.block.expressions);
2992
+ let ref10;
2993
+ node.block.expressions.push([
2994
+ comment ? (ref10 = node.block.expressions)[ref10.length - 1][0] || "\n" : "",
2995
+ wrapWithReturn(void 0, node, !comment)
2996
+ ]);
2860
2997
  }
2861
2998
  return;
2862
2999
  }
@@ -2881,7 +3018,7 @@ function insertReturn(node) {
2881
3018
  if (exp.type === "LabelledStatement") {
2882
3019
  exp = exp.statement;
2883
3020
  }
2884
- let ref6;
3021
+ let ref11;
2885
3022
  switch (exp.type) {
2886
3023
  case "BreakStatement":
2887
3024
  case "ContinueStatement":
@@ -2892,27 +3029,30 @@ function insertReturn(node) {
2892
3029
  return;
2893
3030
  }
2894
3031
  case "Declaration": {
2895
- let ref7;
3032
+ let ref12;
2896
3033
  if (exp.bindings?.length) {
2897
- ref7 = [" ", patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern)];
3034
+ ref12 = [" ", patternAsValue((ref11 = exp.bindings)[ref11.length - 1].pattern)];
2898
3035
  } else {
2899
- ref7 = [];
3036
+ ref12 = [];
2900
3037
  }
2901
3038
  ;
2902
- const value = ref7;
3039
+ const value = ref12;
2903
3040
  const parent = outer.parent;
2904
3041
  const index = findChildIndex(parent?.expressions, outer);
2905
3042
  assert.notEqual(index, -1, "Could not find declaration in parent");
2906
- parent.expressions.splice(index + 1, 0, ["", {
2907
- type: "ReturnStatement",
2908
- expression: value,
2909
- children: [
2910
- !(parent.expressions[index][2] === ";") ? ";" : void 0,
2911
- "return",
2912
- value
2913
- ],
2914
- parent: exp
2915
- }]);
3043
+ parent.expressions.splice(index + 1, 0, [
3044
+ "",
3045
+ {
3046
+ type: "ReturnStatement",
3047
+ expression: value,
3048
+ children: [
3049
+ !(parent.expressions[index][2] === ";") ? ";" : void 0,
3050
+ "return",
3051
+ value
3052
+ ],
3053
+ parent: exp
3054
+ }
3055
+ ]);
2916
3056
  braceBlock(parent);
2917
3057
  return;
2918
3058
  }
@@ -2923,12 +3063,7 @@ function insertReturn(node) {
2923
3063
  assert.notEqual(index, -1, "Could not find function declaration in parent");
2924
3064
  parent.expressions.splice(index + 1, 0, [
2925
3065
  "",
2926
- {
2927
- type: "ReturnStatement",
2928
- expression: exp.id,
2929
- children: [";return ", exp.id],
2930
- parent: exp
2931
- }
3066
+ wrapWithReturn(exp.id, exp, true)
2932
3067
  ]);
2933
3068
  braceBlock(parent);
2934
3069
  return;
@@ -2951,12 +3086,11 @@ function insertReturn(node) {
2951
3086
  if (exp.else)
2952
3087
  insertReturn(exp.else.block);
2953
3088
  else
2954
- exp.children.push(["", {
2955
- type: "ReturnStatement",
2956
- // NOTE: add a prefixed semi-colon because the if block may not be braced
2957
- children: [";return"],
2958
- parent: exp
2959
- }]);
3089
+ exp.children.push([
3090
+ "",
3091
+ // NOTE: add a prefixed semicolon because the if block may not be braced
3092
+ wrapWithReturn(void 0, exp, true)
3093
+ ]);
2960
3094
  return;
2961
3095
  }
2962
3096
  case "PatternMatchingStatement": {
@@ -2964,30 +3098,30 @@ function insertReturn(node) {
2964
3098
  return;
2965
3099
  }
2966
3100
  case "SwitchStatement": {
2967
- insertSwitchReturns(exp);
3101
+ for (let ref13 = exp.caseBlock.clauses, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
3102
+ const clause = ref13[i6];
3103
+ insertReturn(clause);
3104
+ }
2968
3105
  return;
2969
3106
  }
2970
3107
  case "TryStatement": {
2971
- exp.blocks.forEach((block) => insertReturn(block));
3108
+ for (let ref14 = exp.blocks, i7 = 0, len6 = ref14.length; i7 < len6; i7++) {
3109
+ const block = ref14[i7];
3110
+ insertReturn(block);
3111
+ }
2972
3112
  return;
2973
3113
  }
2974
3114
  }
2975
3115
  if (node[node.length - 1]?.type === "SemicolonDelimiter") {
2976
3116
  return;
2977
3117
  }
2978
- const returnStatement = wrapWithReturn(node[1]);
2979
- node.splice(1, 1, returnStatement);
2980
- }
2981
- function insertSwitchReturns(exp) {
2982
- exp.caseBlock.clauses.forEach((clause) => {
2983
- return insertReturn(clause);
2984
- });
3118
+ node[1] = wrapWithReturn(node[1]);
2985
3119
  }
2986
3120
  function processBreakContinueWith(statement) {
2987
3121
  let changed = false;
2988
3122
  for (const control of gatherRecursiveWithinFunction(
2989
3123
  statement.block,
2990
- ($2) => $2.type === "BreakStatement" || $2.type === "ContinueStatement"
3124
+ ($3) => $3.type === "BreakStatement" || $3.type === "ContinueStatement"
2991
3125
  )) {
2992
3126
  let controlName2 = function() {
2993
3127
  switch (control.type) {
@@ -3002,8 +3136,8 @@ function processBreakContinueWith(statement) {
3002
3136
  var controlName = controlName2;
3003
3137
  if (control.with) {
3004
3138
  if (control.label) {
3005
- let m1;
3006
- if (!(m1 = statement.parent, typeof m1 === "object" && m1 != null && "type" in m1 && m1.type === "LabelledStatement" && "label" in m1 && typeof m1.label === "object" && m1.label != null && "name" in m1.label && m1.label.name === control.label.name)) {
3139
+ let m2;
3140
+ if (!(m2 = statement.parent, typeof m2 === "object" && m2 != null && "type" in m2 && m2.type === "LabelledStatement" && "label" in m2 && typeof m2.label === "object" && m2.label != null && "name" in m2.label && m2.label.name === control.label.name)) {
3007
3141
  continue;
3008
3142
  }
3009
3143
  } else {
@@ -3022,7 +3156,7 @@ function processBreakContinueWith(statement) {
3022
3156
  )
3023
3157
  );
3024
3158
  updateParentPointers(control.with, control);
3025
- const i = control.children.findIndex(($3) => $3?.type === "Error");
3159
+ const i = control.children.findIndex(($4) => $4?.type === "Error");
3026
3160
  if (i >= 0) {
3027
3161
  control.children.splice(i, 1);
3028
3162
  }
@@ -3064,7 +3198,7 @@ function wrapIterationReturningResults(statement, collect) {
3064
3198
  }
3065
3199
  const resultsRef = statement.resultsRef = makeRef("results");
3066
3200
  const declaration = iterationDeclaration(statement);
3067
- const { ancestor, child } = findAncestor(statement, ($4) => $4.type === "BlockStatement");
3201
+ const { ancestor, child } = findAncestor(statement, ($5) => $5.type === "BlockStatement");
3068
3202
  assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
3069
3203
  const index = findChildIndex(ancestor.expressions, child);
3070
3204
  assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
@@ -3117,6 +3251,9 @@ function iterationDeclaration(statement) {
3117
3251
  case "product": {
3118
3252
  return "1";
3119
3253
  }
3254
+ case "join": {
3255
+ return '""';
3256
+ }
3120
3257
  default: {
3121
3258
  return "0";
3122
3259
  }
@@ -3161,7 +3298,8 @@ function iterationDeclaration(statement) {
3161
3298
  case "count": {
3162
3299
  return ["if (", node, ") ++", resultsRef];
3163
3300
  }
3164
- case "sum": {
3301
+ case "sum":
3302
+ case "join": {
3165
3303
  return [resultsRef, " += ", node];
3166
3304
  }
3167
3305
  case "product": {
@@ -3186,9 +3324,9 @@ function iterationDefaultBody(statement) {
3186
3324
  }
3187
3325
  const reduction = statement.type === "ForStatement" && statement.reduction;
3188
3326
  function fillBlock(expression) {
3189
- let ref8;
3190
- let m2;
3191
- if (m2 = (ref8 = block.expressions)[ref8.length - 1], Array.isArray(m2) && m2.length >= 2 && typeof m2[1] === "object" && m2[1] != null && "type" in m2[1] && m2[1].type === "EmptyStatement" && "implicit" in m2[1] && m2[1].implicit === true) {
3327
+ let ref15;
3328
+ let m3;
3329
+ if (m3 = (ref15 = block.expressions)[ref15.length - 1], Array.isArray(m3) && m3.length >= 2 && typeof m3[1] === "object" && m3[1] != null && "type" in m3[1] && m3[1].type === "EmptyStatement" && "implicit" in m3[1] && m3[1].implicit === true) {
3192
3330
  block.expressions.pop();
3193
3331
  }
3194
3332
  block.expressions.push(expression);
@@ -3218,7 +3356,29 @@ function iterationDefaultBody(statement) {
3218
3356
  }
3219
3357
  }
3220
3358
  if (statement.type === "ForStatement" && statement.declaration?.type === "ForDeclaration") {
3221
- fillBlock(["", patternAsValue(statement.declaration.binding)]);
3359
+ if (reduction) {
3360
+ const bindings = patternBindings(statement.declaration.binding.pattern);
3361
+ if (bindings.length) {
3362
+ fillBlock(["", bindings[0]]);
3363
+ for (const binding of bindings.slice(1)) {
3364
+ binding.children.unshift({
3365
+ type: "Error",
3366
+ subtype: "Warning",
3367
+ message: "Ignored binding in reduction loop with implicit body"
3368
+ });
3369
+ }
3370
+ } else {
3371
+ fillBlock([
3372
+ "",
3373
+ {
3374
+ type: "Error",
3375
+ message: "Empty binding pattern in reduction loop with implicit body"
3376
+ }
3377
+ ]);
3378
+ }
3379
+ } else {
3380
+ fillBlock(["", patternAsValue(statement.declaration.binding.pattern)]);
3381
+ }
3222
3382
  block.empty = false;
3223
3383
  }
3224
3384
  return false;
@@ -3246,24 +3406,24 @@ function processParams(f) {
3246
3406
  injectParamProps: isConstructor
3247
3407
  });
3248
3408
  if (isConstructor) {
3249
- const { ancestor } = findAncestor(f, ($5) => $5.type === "ClassExpression");
3409
+ const { ancestor } = findAncestor(f, ($6) => $6.type === "ClassExpression");
3250
3410
  if (ancestor != null) {
3251
- const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($6) => $6.type === "FieldDefinition").map(($7) => $7.id).filter((a1) => typeof a1 === "object" && a1 != null && "type" in a1 && a1.type === "Identifier").map(($8) => $8.name));
3411
+ const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($7) => $7.type === "FieldDefinition").map(($8) => $8.id).filter((a1) => typeof a1 === "object" && a1 != null && "type" in a1 && a1.type === "Identifier").map(($9) => $9.name));
3252
3412
  const classExpressions = ancestor.body.expressions;
3253
3413
  let index = findChildIndex(classExpressions, f);
3254
3414
  assert.notEqual(index, -1, "Could not find constructor in class");
3255
- let m3;
3256
- while (m3 = classExpressions[index - 1]?.[1], typeof m3 === "object" && m3 != null && "type" in m3 && m3.type === "MethodDefinition" && "name" in m3 && m3.name === "constructor") {
3415
+ let m4;
3416
+ while (m4 = classExpressions[index - 1]?.[1], typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "MethodDefinition" && "name" in m4 && m4.name === "constructor") {
3257
3417
  index--;
3258
3418
  }
3259
3419
  const fStatement = classExpressions[index];
3260
- for (let ref9 = gatherRecursive(parameters, ($9) => $9.type === "Parameter"), i2 = 0, len1 = ref9.length; i2 < len1; i2++) {
3261
- const parameter = ref9[i2];
3420
+ for (let ref16 = gatherRecursive(parameters, ($10) => $10.type === "Parameter"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
3421
+ const parameter = ref16[i8];
3262
3422
  if (!parameter.typeSuffix) {
3263
3423
  continue;
3264
3424
  }
3265
- for (let ref10 = gatherRecursive(parameter, ($10) => $10.type === "AtBinding"), i3 = 0, len22 = ref10.length; i3 < len22; i3++) {
3266
- const binding = ref10[i3];
3425
+ for (let ref17 = gatherRecursive(parameter, ($11) => $11.type === "AtBinding"), i9 = 0, len8 = ref17.length; i9 < len8; i9++) {
3426
+ const binding = ref17[i9];
3267
3427
  const typeSuffix = binding.parent?.typeSuffix;
3268
3428
  if (!typeSuffix) {
3269
3429
  continue;
@@ -3323,8 +3483,8 @@ function processSignature(f) {
3323
3483
  }
3324
3484
  if (!f.generator?.length && hasYield(block)) {
3325
3485
  if (f.type === "ArrowFunction") {
3326
- gatherRecursiveWithinFunction(block, ($11) => $11.type === "YieldExpression").forEach((y) => {
3327
- const i = y.children.findIndex(($12) => $12.type === "Yield");
3486
+ gatherRecursiveWithinFunction(block, ($12) => $12.type === "YieldExpression").forEach((y) => {
3487
+ const i = y.children.findIndex(($13) => $13.type === "Yield");
3328
3488
  return y.children.splice(i + 1, 0, {
3329
3489
  type: "Error",
3330
3490
  message: "Can't use yield inside of => arrow function"
@@ -3340,8 +3500,8 @@ function processSignature(f) {
3340
3500
  }
3341
3501
  }
3342
3502
  function processFunctions(statements, config2) {
3343
- for (let ref11 = gatherRecursiveAll(statements, ($13) => $13.type === "FunctionExpression" || $13.type === "ArrowFunction"), i4 = 0, len3 = ref11.length; i4 < len3; i4++) {
3344
- const f = ref11[i4];
3503
+ for (let ref18 = gatherRecursiveAll(statements, ($14) => $14.type === "FunctionExpression" || $14.type === "ArrowFunction"), i10 = 0, len9 = ref18.length; i10 < len9; i10++) {
3504
+ const f = ref18[i10];
3345
3505
  if (f.type === "FunctionExpression") {
3346
3506
  implicitFunctionBlock(f);
3347
3507
  }
@@ -3349,8 +3509,8 @@ function processFunctions(statements, config2) {
3349
3509
  processParams(f);
3350
3510
  processReturn(f, config2.implicitReturns);
3351
3511
  }
3352
- for (let ref12 = gatherRecursiveAll(statements, ($14) => $14.type === "MethodDefinition"), i5 = 0, len4 = ref12.length; i5 < len4; i5++) {
3353
- const f = ref12[i5];
3512
+ for (let ref19 = gatherRecursiveAll(statements, ($15) => $15.type === "MethodDefinition"), i11 = 0, len10 = ref19.length; i11 < len10; i11++) {
3513
+ const f = ref19[i11];
3354
3514
  implicitFunctionBlock(f);
3355
3515
  processParams(f);
3356
3516
  processReturn(f, config2.implicitReturns);
@@ -3403,9 +3563,9 @@ function expressionizeIteration(exp) {
3403
3563
  }
3404
3564
  let done;
3405
3565
  if (!async) {
3406
- let ref13;
3407
- if ((ref13 = blockContainingStatement(exp)) && typeof ref13 === "object" && "block" in ref13 && "index" in ref13) {
3408
- const { block: parentBlock, index } = ref13;
3566
+ let ref20;
3567
+ if ((ref20 = blockContainingStatement(exp)) && typeof ref20 === "object" && "block" in ref20 && "index" in ref20) {
3568
+ const { block: parentBlock, index } = ref20;
3409
3569
  statements[0][0] = parentBlock.expressions[index][0];
3410
3570
  parentBlock.expressions.splice(index, index + 1 - index, ...statements);
3411
3571
  updateParentPointers(parentBlock);
@@ -3422,8 +3582,8 @@ function expressionizeIteration(exp) {
3422
3582
  }
3423
3583
  }
3424
3584
  function processIterationExpressions(statements) {
3425
- for (let ref14 = gatherRecursiveAll(statements, ($15) => $15.type === "IterationExpression"), i6 = 0, len5 = ref14.length; i6 < len5; i6++) {
3426
- const s = ref14[i6];
3585
+ for (let ref21 = gatherRecursiveAll(statements, ($16) => $16.type === "IterationExpression"), i12 = 0, len11 = ref21.length; i12 < len11; i12++) {
3586
+ const s = ref21[i12];
3427
3587
  expressionizeIteration(s);
3428
3588
  }
3429
3589
  }
@@ -3449,12 +3609,12 @@ function processCoffeeDo(ws, expression) {
3449
3609
  ...parameters,
3450
3610
  children: (() => {
3451
3611
  const results1 = [];
3452
- for (let ref15 = parameters.children, i7 = 0, len6 = ref15.length; i7 < len6; i7++) {
3453
- let parameter = ref15[i7];
3612
+ for (let ref22 = parameters.children, i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
3613
+ let parameter = ref22[i13];
3454
3614
  if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
3455
- let ref16;
3456
- if (ref16 = parameter.initializer) {
3457
- const initializer = ref16;
3615
+ let ref23;
3616
+ if (ref23 = parameter.initializer) {
3617
+ const initializer = ref23;
3458
3618
  args.push(initializer.expression, parameter.delim);
3459
3619
  parameter = {
3460
3620
  ...parameter,
@@ -3475,7 +3635,7 @@ function processCoffeeDo(ws, expression) {
3475
3635
  expression = {
3476
3636
  ...expression,
3477
3637
  parameters: newParameters,
3478
- children: expression.children.map(($16) => $16 === parameters ? newParameters : $16)
3638
+ children: expression.children.map(($17) => $17 === parameters ? newParameters : $17)
3479
3639
  };
3480
3640
  }
3481
3641
  return {
@@ -3497,7 +3657,7 @@ function makeAmpersandFunction(rhs) {
3497
3657
  ref = makeRef("$");
3498
3658
  inplacePrepend(ref, body);
3499
3659
  }
3500
- if (startsWithPredicate(body, ($17) => $17.type === "ObjectExpression")) {
3660
+ if (startsWithPredicate(body, ($18) => $18.type === "ObjectExpression")) {
3501
3661
  body = makeLeftHandSideExpression(body);
3502
3662
  }
3503
3663
  const parameters = makeNode({
@@ -4103,7 +4263,7 @@ function expandChainedComparisons([first, binops]) {
4103
4263
  // source/parser/pattern-matching.civet
4104
4264
  function processPatternTest(lhs, patterns) {
4105
4265
  const { ref, refAssignmentComma } = maybeRefAssignment(lhs, "m");
4106
- const conditionExpression = flatJoin(patterns.map(($) => getPatternConditions($, ref)).map(($1) => flatJoin($1, " && ")), " || ");
4266
+ const conditionExpression = flatJoin(patterns.map(($1) => getPatternConditions($1, ref)).map(($2) => flatJoin($2, " && ")), " || ");
4107
4267
  return makeLeftHandSideExpression(makeNode({
4108
4268
  type: "PatternTest",
4109
4269
  children: [
@@ -4113,7 +4273,7 @@ function processPatternTest(lhs, patterns) {
4113
4273
  }));
4114
4274
  }
4115
4275
  function processPatternMatching(statements) {
4116
- gatherRecursiveAll(statements, ($2) => $2.type === "SwitchStatement").forEach((s) => {
4276
+ gatherRecursiveAll(statements, ($3) => $3.type === "SwitchStatement").forEach((s) => {
4117
4277
  const { caseBlock } = s;
4118
4278
  const { clauses } = caseBlock;
4119
4279
  for (let i1 = 0, len3 = clauses.length; i1 < len3; i1++) {
@@ -4127,7 +4287,7 @@ function processPatternMatching(statements) {
4127
4287
  }
4128
4288
  let errors = false;
4129
4289
  let isPattern = false;
4130
- if (clauses.some(($3) => $3.type === "PatternClause")) {
4290
+ if (clauses.some(($4) => $4.type === "PatternClause")) {
4131
4291
  isPattern = true;
4132
4292
  for (let i2 = 0, len1 = clauses.length; i2 < len1; i2++) {
4133
4293
  const c = clauses[i2];
@@ -4165,7 +4325,7 @@ function processPatternMatching(statements) {
4165
4325
  }
4166
4326
  let { patterns, block } = c;
4167
4327
  let pattern = patterns[0];
4168
- const conditionExpression = flatJoin(patterns.map(($4) => getPatternConditions($4, ref)).map(($5) => flatJoin($5, " && ")), " || ");
4328
+ const conditionExpression = flatJoin(patterns.map(($5) => getPatternConditions($5, ref)).map(($6) => flatJoin($6, " && ")), " || ");
4169
4329
  const condition2 = makeNode({
4170
4330
  type: "ParenthesizedExpression",
4171
4331
  children: ["(", ...refAssignmentComma, conditionExpression, ")"],
@@ -4358,38 +4518,59 @@ function getPatternBlockPrefix(pattern, ref, decl = "const ", suffix) {
4358
4518
  }
4359
4519
  }
4360
4520
  let [splices, thisAssignments] = gatherBindingCode(pattern);
4361
- const patternBindings = nonMatcherBindings(pattern);
4521
+ const patternBindings2 = nonMatcherBindings(pattern);
4362
4522
  splices = splices.map((s) => [", ", nonMatcherBindings(s)]);
4363
- thisAssignments = thisAssignments.map(($6) => ["", $6, ";"]);
4364
- const duplicateDeclarations = aggregateDuplicateBindings([patternBindings, splices]);
4523
+ thisAssignments = thisAssignments.map(($7) => ["", $7, ";"]);
4524
+ const duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices]);
4365
4525
  return [
4366
4526
  ["", {
4367
4527
  type: "Declaration",
4368
- children: [decl, patternBindings, suffix, " = ", ref, ...splices],
4528
+ children: [decl, patternBindings2, suffix, " = ", ref, ...splices],
4369
4529
  names: [],
4370
4530
  bindings: []
4371
4531
  // avoid implicit return of any bindings
4372
4532
  }, ";"],
4373
4533
  ...thisAssignments,
4374
- ...duplicateDeclarations.map(($7) => ["", $7, ";"])
4534
+ ...duplicateDeclarations.map(($8) => ["", $8, ";"])
4375
4535
  ];
4376
4536
  }
4377
4537
  function elideMatchersFromArrayBindings(elements) {
4378
- return elements.map((el) => {
4379
- if (el.type === "BindingRestElement") {
4380
- return ["", el, void 0];
4381
- }
4382
- const { children: [ws, e, delim] } = el;
4383
- switch (e.type) {
4384
- case "Literal":
4385
- case "RegularExpressionLiteral":
4386
- case "StringLiteral":
4387
- case "PinPattern":
4388
- return delim;
4389
- default:
4390
- return [ws, nonMatcherBindings(e), delim];
4538
+ const results = [];
4539
+ for (let i5 = 0, len4 = elements.length; i5 < len4; i5++) {
4540
+ const element = elements[i5];
4541
+ switch (element.type) {
4542
+ case "BindingRestElement":
4543
+ case "ElisionElement": {
4544
+ results.push(element);
4545
+ break;
4546
+ }
4547
+ case "BindingElement": {
4548
+ switch (element.binding.type) {
4549
+ case "Literal":
4550
+ case "RegularExpressionLiteral":
4551
+ case "StringLiteral":
4552
+ case "PinPattern": {
4553
+ results.push(element.delim);
4554
+ break;
4555
+ }
4556
+ default: {
4557
+ const binding = nonMatcherBindings(element.binding);
4558
+ results.push(makeNode({
4559
+ ...element,
4560
+ binding,
4561
+ children: element.children.map((c) => {
4562
+ return c === element.binding ? binding : c;
4563
+ })
4564
+ }));
4565
+ }
4566
+ }
4567
+ ;
4568
+ break;
4569
+ }
4391
4570
  }
4392
- });
4571
+ }
4572
+ ;
4573
+ return results;
4393
4574
  }
4394
4575
  function elideMatchersFromPropertyBindings(properties) {
4395
4576
  return properties.map((p) => {
@@ -4397,6 +4578,10 @@ function elideMatchersFromPropertyBindings(properties) {
4397
4578
  case "BindingProperty": {
4398
4579
  const { children, name, value } = p;
4399
4580
  const [ws] = children;
4581
+ const shouldElide = name.type === "NumericLiteral" && !value?.name || name.type === "ComputedPropertyName" && value?.subtype === "NumericLiteral";
4582
+ if (shouldElide) {
4583
+ return;
4584
+ }
4400
4585
  switch (value && value.type) {
4401
4586
  case "ArrayBindingPattern":
4402
4587
  case "ObjectBindingPattern": {
@@ -4428,32 +4613,22 @@ function elideMatchersFromPropertyBindings(properties) {
4428
4613
  }
4429
4614
  function nonMatcherBindings(pattern) {
4430
4615
  switch (pattern.type) {
4431
- case "ArrayBindingPattern": {
4616
+ case "ArrayBindingPattern":
4617
+ case "PostRestBindingElements": {
4432
4618
  const elements = elideMatchersFromArrayBindings(pattern.elements);
4433
- return {
4619
+ return makeNode({
4434
4620
  ...pattern,
4435
4621
  elements,
4436
- children: pattern.children.map(($8) => $8 === pattern.elements ? elements : $8)
4437
- };
4438
- }
4439
- case "PostRestBindingElements": {
4440
- const els = elideMatchersFromArrayBindings(pattern.children[1]);
4441
- return {
4442
- ...pattern,
4443
- children: [
4444
- pattern.children[0],
4445
- els,
4446
- ...pattern.children.slice(2)
4447
- ]
4448
- };
4622
+ children: pattern.children.map(($9) => $9 === pattern.elements ? elements : $9)
4623
+ });
4449
4624
  }
4450
4625
  case "ObjectBindingPattern": {
4451
4626
  const properties = elideMatchersFromPropertyBindings(pattern.properties);
4452
- return {
4627
+ return makeNode({
4453
4628
  ...pattern,
4454
4629
  properties,
4455
- children: pattern.children.map(($9) => $9 === pattern.properties ? properties : $9)
4456
- };
4630
+ children: pattern.children.map(($10) => $10 === pattern.properties ? properties : $10)
4631
+ });
4457
4632
  }
4458
4633
  default: {
4459
4634
  return pattern;
@@ -4461,32 +4636,26 @@ function nonMatcherBindings(pattern) {
4461
4636
  }
4462
4637
  }
4463
4638
  function aggregateDuplicateBindings(bindings) {
4464
- const props = gatherRecursiveAll(bindings, ($10) => $10.type === "BindingProperty");
4465
- const arrayBindings = gatherRecursiveAll(bindings, ($11) => $11.type === "ArrayBindingPattern");
4466
- for (let i5 = 0, len4 = arrayBindings.length; i5 < len4; i5++) {
4467
- const { elements } = arrayBindings[i5];
4468
- for (let i6 = 0, len5 = elements.length; i6 < len5; i6++) {
4469
- const element = elements[i6];
4470
- if (Array.isArray(element)) {
4471
- const [, e] = element;
4472
- if (e.type === "Identifier") {
4473
- props.push(e);
4474
- } else if (e.type === "BindingRestElement") {
4475
- props.push(e);
4476
- }
4477
- }
4478
- }
4479
- }
4639
+ const props = gatherRecursiveAll(
4640
+ bindings,
4641
+ ($) => $.type === "BindingProperty" || // Don't deduplicate ...rest properties; user should do so manually
4642
+ // because ...rest can be named arbitrarily
4643
+ //$.type is "BindingRestProperty"
4644
+ $.type === "Identifier" && $.parent?.type === "BindingElement" || $.type === "BindingRestElement"
4645
+ );
4480
4646
  const declarations = [];
4481
4647
  const propsGroupedByName = /* @__PURE__ */ new Map();
4482
- for (let i7 = 0, len6 = props.length; i7 < len6; i7++) {
4483
- const p = props[i7];
4648
+ for (let i6 = 0, len5 = props.length; i6 < len5; i6++) {
4649
+ const p = props[i6];
4484
4650
  const { name, value } = p;
4485
4651
  let m1;
4486
4652
  if (m1 = value?.type, m1 === "ArrayBindingPattern" || m1 === "ObjectBindingPattern") {
4487
4653
  continue;
4488
4654
  }
4489
4655
  const key = value?.name || name?.name || name;
4656
+ if (key?.type === "NumericLiteral" || key?.type === "ComputedPropertyName") {
4657
+ continue;
4658
+ }
4490
4659
  if (propsGroupedByName.has(key)) {
4491
4660
  propsGroupedByName.get(key).push(p);
4492
4661
  } else {
@@ -4502,8 +4671,8 @@ function aggregateDuplicateBindings(bindings) {
4502
4671
  pos: 0,
4503
4672
  input: key
4504
4673
  })) {
4505
- for (let i8 = 0, len7 = shared.length; i8 < len7; i8++) {
4506
- const p = shared[i8];
4674
+ for (let i7 = 0, len6 = shared.length; i7 < len6; i7++) {
4675
+ const p = shared[i7];
4507
4676
  aliasBinding(p, makeRef(`_${key}`, key));
4508
4677
  }
4509
4678
  return;
@@ -5595,9 +5764,12 @@ function forRange(open, forDeclaration, range, stepExp, close) {
5595
5764
  ascDec = [", ", ascRef, " = ", startRef, " <= ", endRef];
5596
5765
  }
5597
5766
  let varAssign = [], varLetAssign = varAssign, varLet = varAssign, blockPrefix;
5598
- let names = forDeclaration?.names;
5599
- if (forDeclaration?.decl) {
5600
- if (forDeclaration.decl === "let") {
5767
+ let names = forDeclaration?.names ?? [];
5768
+ if (forDeclaration != null) {
5769
+ if (forDeclaration.type === "AssignmentExpression") {
5770
+ varAssign = varLetAssign = [forDeclaration, " = "];
5771
+ names = [];
5772
+ } else if (forDeclaration.decl === "let") {
5601
5773
  const varName = forDeclaration.children.splice(1);
5602
5774
  varAssign = [...trimFirstSpace(varName), " = "];
5603
5775
  varLet = [",", ...varName, " = ", counterRef];
@@ -5607,14 +5779,6 @@ function forRange(open, forDeclaration, range, stepExp, close) {
5607
5779
  ["", [forDeclaration, " = ", value], ";"]
5608
5780
  ];
5609
5781
  }
5610
- } else if (forDeclaration) {
5611
- assert.equal(
5612
- forDeclaration.type,
5613
- "AssignmentExpression",
5614
- "Internal error: Coffee-style for loop must be an assignment expression"
5615
- );
5616
- varAssign = varLetAssign = [forDeclaration, " = "];
5617
- names = [];
5618
5782
  }
5619
5783
  const declaration = {
5620
5784
  type: "Declaration",
@@ -6134,7 +6298,8 @@ function addPostfixStatement(statement, ws, post) {
6134
6298
  const block = makeNode({
6135
6299
  type: "BlockStatement",
6136
6300
  children: [" { ", expressions, " }"],
6137
- expressions
6301
+ expressions,
6302
+ bare: false
6138
6303
  });
6139
6304
  const children = [...post.children, block];
6140
6305
  if (!isWhitespaceOrEmpty(ws))
@@ -6533,11 +6698,11 @@ function processCallMemberExpression(node) {
6533
6698
  if (glob?.type === "PropertyGlob") {
6534
6699
  let prefix = children.slice(0, i);
6535
6700
  const parts = [];
6536
- let refAssignmentComma;
6537
- if (prefix.length > 1) {
6538
- const ref = makeRef();
6539
- ({ refAssignmentComma } = makeRefAssignment(ref, prefix));
6540
- prefix = [ref];
6701
+ let ref;
6702
+ if (prefix.length > 1 && glob.object.properties.length > 1) {
6703
+ ref = makeRef();
6704
+ const { refAssignment } = makeRefAssignment(ref, prefix);
6705
+ prefix = [makeLeftHandSideExpression(refAssignment)];
6541
6706
  }
6542
6707
  prefix = prefix.concat(glob.dot);
6543
6708
  for (const part of glob.object.properties) {
@@ -6569,6 +6734,9 @@ function processCallMemberExpression(node) {
6569
6734
  }
6570
6735
  if (!suppressPrefix) {
6571
6736
  value = prefix.concat(trimFirstSpace(value));
6737
+ if (ref != null) {
6738
+ prefix = [ref].concat(glob.dot);
6739
+ }
6572
6740
  }
6573
6741
  if (wValue)
6574
6742
  value.unshift(wValue);
@@ -6579,7 +6747,8 @@ function processCallMemberExpression(node) {
6579
6747
  dots: part.dots,
6580
6748
  delim: part.delim,
6581
6749
  names: part.names,
6582
- children: part.children.slice(0, 2).concat(value, part.delim)
6750
+ children: part.children.slice(0, 2).concat(value, part.delim),
6751
+ usesRef: Boolean(ref)
6583
6752
  });
6584
6753
  } else {
6585
6754
  parts.push({
@@ -6596,12 +6765,13 @@ function processCallMemberExpression(node) {
6596
6765
  value,
6597
6766
  part.delim
6598
6767
  // comma delimiter
6599
- ]
6768
+ ],
6769
+ usesRef: Boolean(ref)
6600
6770
  });
6601
6771
  }
6602
6772
  }
6603
6773
  let ref2;
6604
- let object = {
6774
+ const object = {
6605
6775
  type: "ObjectExpression",
6606
6776
  children: [
6607
6777
  glob.object.children[0],
@@ -6612,13 +6782,6 @@ function processCallMemberExpression(node) {
6612
6782
  ],
6613
6783
  properties: parts
6614
6784
  };
6615
- if (refAssignmentComma) {
6616
- object = makeNode({
6617
- type: "ParenthesizedExpression",
6618
- children: ["(", ...refAssignmentComma, object, ")"],
6619
- expression: object
6620
- });
6621
- }
6622
6785
  if (i === children.length - 1)
6623
6786
  return object;
6624
6787
  return processCallMemberExpression({
@@ -6828,40 +6991,54 @@ function convertNamedImportsToObject(node, pattern) {
6828
6991
  };
6829
6992
  }
6830
6993
  function convertObjectToJSXAttributes(obj) {
6831
- const { properties } = obj;
6832
6994
  const parts = [];
6833
6995
  const rest = [];
6834
- for (let i = 0; i < properties.length; i++) {
6996
+ let i4 = 0;
6997
+ for (const part of obj.properties) {
6998
+ const i = i4++;
6999
+ if (part.usesRef) {
7000
+ rest.push(part);
7001
+ continue;
7002
+ }
6835
7003
  if (i > 0)
6836
7004
  parts.push(" ");
6837
- const part = properties[i];
6838
7005
  switch (part.type) {
6839
- case "Identifier":
7006
+ case "Identifier": {
6840
7007
  parts.push([part.name, "={", part.name, "}"]);
6841
7008
  break;
6842
- case "Property":
7009
+ }
7010
+ case "Property": {
6843
7011
  if (part.name.type === "ComputedPropertyName") {
6844
7012
  rest.push(part);
6845
7013
  } else {
6846
7014
  parts.push([part.name, "={", trimFirstSpace(part.value), "}"]);
6847
7015
  }
7016
+ ;
6848
7017
  break;
6849
- case "SpreadProperty":
7018
+ }
7019
+ case "SpreadProperty": {
6850
7020
  parts.push(["{", part.dots, part.value, "}"]);
6851
7021
  break;
6852
- case "MethodDefinition":
7022
+ }
7023
+ case "MethodDefinition": {
6853
7024
  const func = convertMethodToFunction(part);
6854
7025
  if (func) {
6855
7026
  parts.push([part.name, "={", convertMethodToFunction(part), "}"]);
6856
7027
  } else {
6857
7028
  rest.push(part);
6858
7029
  }
7030
+ ;
6859
7031
  break;
6860
- default:
7032
+ }
7033
+ default: {
6861
7034
  throw new Error(`invalid object literal type in JSX attribute: ${part.type}`);
7035
+ }
6862
7036
  }
6863
7037
  }
6864
7038
  if (rest.length) {
7039
+ if (parts.length && parts[parts.length - 1] !== " ") {
7040
+ parts.push(" ");
7041
+ }
6865
7042
  parts.push(["{...{", ...rest, "}}"]);
6866
7043
  }
6867
7044
  return parts;
@@ -6922,7 +7099,7 @@ function processBindingPatternLHS(lhs, tail) {
6922
7099
  tail.push(...splices.map((s) => [", ", s]), ...thisAssignments.map((a) => [", ", a]));
6923
7100
  }
6924
7101
  function processAssignments(statements) {
6925
- for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i4 = 0, len3 = ref7.length; i4 < len3; i4++) {
7102
+ for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len3 = ref7.length; i5 < len3; i5++) {
6926
7103
  let extractAssignment2 = function(lhs) {
6927
7104
  let expr = lhs;
6928
7105
  while (expr.type === "ParenthesizedExpression") {
@@ -6943,7 +7120,7 @@ function processAssignments(statements) {
6943
7120
  return;
6944
7121
  };
6945
7122
  var extractAssignment = extractAssignment2;
6946
- const exp = ref7[i4];
7123
+ const exp = ref7[i5];
6947
7124
  checkValidLHS(exp.assigned);
6948
7125
  const pre = [], post = [];
6949
7126
  let ref8;
@@ -6952,8 +7129,8 @@ function processAssignments(statements) {
6952
7129
  if (!exp.lhs) {
6953
7130
  continue;
6954
7131
  }
6955
- for (let ref9 = exp.lhs, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
6956
- const lhsPart = ref9[i5];
7132
+ for (let ref9 = exp.lhs, i6 = 0, len4 = ref9.length; i6 < len4; i6++) {
7133
+ const lhsPart = ref9[i6];
6957
7134
  let ref10;
6958
7135
  if (ref10 = extractAssignment2(lhsPart[1])) {
6959
7136
  const newLhs = ref10;
@@ -6997,8 +7174,8 @@ function processAssignments(statements) {
6997
7174
  }
6998
7175
  }
6999
7176
  }
7000
- for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i6 = 0, len5 = ref11.length; i6 < len5; i6++) {
7001
- const exp = ref11[i6];
7177
+ for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len5 = ref11.length; i7 < len5; i7++) {
7178
+ const exp = ref11[i7];
7002
7179
  if (!(exp.names === null)) {
7003
7180
  continue;
7004
7181
  }
@@ -7235,101 +7412,149 @@ function attachPostfixStatementAsExpression(exp, post) {
7235
7412
  }
7236
7413
  }
7237
7414
  function processTypes(node) {
7238
- return gatherRecursiveAll(node, (n) => n.type === "TypeUnary").forEach((unary) => {
7239
- if (!unary.suffix.length) {
7240
- return;
7241
- }
7242
- let ref16;
7243
- let m4;
7244
- if (m4 = (ref16 = unary.suffix)[ref16.length - 1], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
7245
- const { token } = m4;
7246
- let last;
7247
- let count = 0;
7248
- let ref17;
7249
- while (unary.suffix.length && (ref17 = unary.suffix)[ref17.length - 1]?.token === "?") {
7250
- last = unary.suffix.pop();
7251
- count++;
7252
- }
7253
- let ref18;
7254
- while (unary.suffix.length && (ref18 = unary.suffix)[ref18.length - 1]?.type === "NonNullAssertion") {
7255
- unary.suffix.pop();
7256
- }
7257
- let ref19;
7258
- if (unary.suffix.length || unary.prefix.length)
7259
- ref19 = unary;
7260
- else
7261
- ref19 = unary.t;
7262
- const t = ref19;
7263
- if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
7264
- if (count === 1) {
7265
- unary.suffix.push(last);
7266
- return;
7415
+ const results1 = [];
7416
+ for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len6 = ref16.length; i8 < len6; i8++) {
7417
+ const unary = ref16[i8];
7418
+ let suffixIndex = unary.suffix.length - 1;
7419
+ const results2 = [];
7420
+ while (suffixIndex >= 0) {
7421
+ const suffix = unary.suffix[suffixIndex];
7422
+ if (typeof suffix === "object" && suffix != null && "token" in suffix && suffix.token === "?") {
7423
+ const { token } = suffix;
7424
+ let count = 0;
7425
+ let m4;
7426
+ while (m4 = unary.suffix[suffixIndex], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
7427
+ unary.suffix.splice(suffixIndex--, 1);
7428
+ count++;
7267
7429
  }
7268
- replaceNode(unary, [
7269
- getTrimmingSpace(unary),
7270
- "(",
7271
- parenthesizeType(trimFirstSpace(t)),
7272
- " | null)",
7273
- last
7274
- ]);
7275
- } else {
7276
- replaceNode(unary, {
7277
- type: "TypeParenthesized",
7430
+ let m5;
7431
+ while (m5 = unary.suffix[suffixIndex], typeof m5 === "object" && m5 != null && "type" in m5 && m5.type === "NonNullAssertion") {
7432
+ unary.suffix.splice(suffixIndex--, 1);
7433
+ }
7434
+ const { parent, prefix } = unary;
7435
+ unary.prefix = [];
7436
+ unary.children = unary.children.filter((a1) => a1 !== prefix);
7437
+ const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
7438
+ const space = getTrimmingSpace(unary);
7439
+ let replace;
7440
+ if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
7441
+ if (count === 1) {
7442
+ unary.suffix.splice(suffixIndex + 1, 0, suffix);
7443
+ continue;
7444
+ }
7445
+ inplaceInsertTrimmingSpace(unary, "");
7446
+ const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
7447
+ replace = [
7448
+ space,
7449
+ "(",
7450
+ t,
7451
+ " | null)",
7452
+ suffix
7453
+ ];
7454
+ } else {
7455
+ inplaceInsertTrimmingSpace(unary, "");
7456
+ const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
7457
+ replace = makeNode({
7458
+ type: "TypeParenthesized",
7459
+ ts: true,
7460
+ children: [
7461
+ space,
7462
+ "(",
7463
+ t,
7464
+ count === 1 ? " | undefined" : " | undefined | null",
7465
+ ")"
7466
+ ]
7467
+ });
7468
+ }
7469
+ if (prefix.length || outer.length) {
7470
+ replace = makeNode({
7471
+ type: "TypeUnary",
7472
+ ts: true,
7473
+ t: replace,
7474
+ prefix,
7475
+ suffix: outer,
7476
+ children: [prefix, replace, outer]
7477
+ });
7478
+ }
7479
+ results2.push(replaceNode(unary, replace, parent));
7480
+ } else if (typeof suffix === "object" && suffix != null && "type" in suffix && suffix.type === "NonNullAssertion") {
7481
+ const { type } = suffix;
7482
+ let m6;
7483
+ while (m6 = unary.suffix[suffixIndex], typeof m6 === "object" && m6 != null && "type" in m6 && m6.type === "NonNullAssertion") {
7484
+ unary.suffix.splice(suffixIndex--, 1);
7485
+ }
7486
+ let m7;
7487
+ while (m7 = unary.suffix[suffixIndex], typeof m7 === "object" && m7 != null && "token" in m7 && m7.token === "?") {
7488
+ unary.suffix.splice(suffixIndex--, 1);
7489
+ }
7490
+ const { parent, prefix } = unary;
7491
+ unary.prefix = [];
7492
+ unary.children = unary.children.filter((a2) => a2 !== prefix);
7493
+ const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
7494
+ const space = getTrimmingSpace(unary);
7495
+ inplaceInsertTrimmingSpace(unary, "");
7496
+ let ref17;
7497
+ if (unary.suffix.length)
7498
+ ref17 = unary;
7499
+ else
7500
+ ref17 = unary.t;
7501
+ const t = ref17;
7502
+ const arg = makeNode({
7503
+ type: "TypeArgument",
7278
7504
  ts: true,
7505
+ t,
7506
+ children: [t]
7507
+ });
7508
+ const argArray = [arg];
7509
+ const args = makeNode({
7510
+ type: "TypeArguments",
7511
+ ts: true,
7512
+ args: argArray,
7513
+ children: ["<", argArray, ">"]
7514
+ });
7515
+ let replace = makeNode({
7516
+ type: "TypeIdentifier",
7517
+ raw: "NonNullable",
7518
+ args,
7279
7519
  children: [
7280
- getTrimmingSpace(unary),
7281
- "(",
7282
- parenthesizeType(trimFirstSpace(t)),
7283
- count === 1 ? " | undefined" : " | undefined | null",
7284
- ")"
7520
+ space,
7521
+ "NonNullable",
7522
+ args
7285
7523
  ]
7286
7524
  });
7525
+ if (prefix.length || outer.length) {
7526
+ replace = makeNode({
7527
+ type: "TypeUnary",
7528
+ ts: true,
7529
+ t: replace,
7530
+ prefix,
7531
+ suffix: outer,
7532
+ children: [prefix, replace, outer]
7533
+ });
7534
+ }
7535
+ results2.push(replaceNode(unary, replace, parent));
7536
+ } else {
7537
+ results2.push(suffixIndex--);
7287
7538
  }
7288
- } else if (typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "NonNullAssertion") {
7289
- const { type } = m4;
7290
- let ref20;
7291
- while (unary.suffix.length && (ref20 = unary.suffix)[ref20.length - 1]?.type === "NonNullAssertion") {
7292
- unary.suffix.pop();
7293
- }
7294
- let ref21;
7295
- while (unary.suffix.length && (ref21 = unary.suffix)[ref21.length - 1]?.token === "?") {
7296
- unary.suffix.pop();
7297
- }
7298
- const t = trimFirstSpace(
7299
- unary.suffix.length || unary.prefix.length ? unary : unary.t
7300
- );
7301
- const args = {
7302
- type: "TypeArguments",
7303
- ts: true,
7304
- types: [t],
7305
- children: ["<", t, ">"]
7306
- };
7307
- replaceNode(unary, {
7308
- type: "TypeIdentifier",
7309
- raw: "NonNullable",
7310
- args,
7311
- children: [
7312
- getTrimmingSpace(unary),
7313
- "NonNullable",
7314
- args
7315
- ]
7316
- });
7317
7539
  }
7318
- });
7540
+ results1.push(results2);
7541
+ }
7542
+ ;
7543
+ return results1;
7319
7544
  }
7320
7545
  function processStatementExpressions(statements) {
7321
- for (let ref22 = gatherRecursiveAll(statements, ($11) => $11.type === "StatementExpression"), i7 = 0, len6 = ref22.length; i7 < len6; i7++) {
7322
- const exp = ref22[i7];
7546
+ for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len7 = ref18.length; i9 < len7; i9++) {
7547
+ const exp = ref18[i9];
7323
7548
  const { maybe, statement } = exp;
7324
7549
  if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
7325
7550
  replaceNode(exp, statement);
7326
7551
  continue;
7327
7552
  }
7328
- let ref23;
7553
+ let ref19;
7329
7554
  switch (statement.type) {
7330
7555
  case "IfStatement": {
7331
- if (ref23 = expressionizeIfStatement(statement)) {
7332
- const expression = ref23;
7556
+ if (ref19 = expressionizeIfStatement(statement)) {
7557
+ const expression = ref19;
7333
7558
  replaceNode(statement, expression, exp);
7334
7559
  } else {
7335
7560
  replaceNode(statement, wrapIIFE([["", statement]]), exp);
@@ -7387,13 +7612,13 @@ function processNegativeIndexAccess(statements) {
7387
7612
  });
7388
7613
  }
7389
7614
  function processFinallyClauses(statements) {
7390
- for (let ref24 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i8 = 0, len7 = ref24.length; i8 < len7; i8++) {
7391
- let f = ref24[i8];
7392
- let ref25;
7393
- if (!((ref25 = blockContainingStatement(f)) && typeof ref25 === "object" && "block" in ref25 && "index" in ref25)) {
7615
+ for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len8 = ref20.length; i10 < len8; i10++) {
7616
+ let f = ref20[i10];
7617
+ let ref21;
7618
+ if (!((ref21 = blockContainingStatement(f)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21)) {
7394
7619
  throw new Error("finally clause must be inside try statement or block");
7395
7620
  }
7396
- const { block, index } = ref25;
7621
+ const { block, index } = ref21;
7397
7622
  const indent = block.expressions[index][0];
7398
7623
  const expressions = block.expressions.slice(index + 1);
7399
7624
  const t = makeNode({
@@ -7430,7 +7655,7 @@ function processProgram(root) {
7430
7655
  if (config2.iife || config2.repl) {
7431
7656
  rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
7432
7657
  const newExpressions = [["", rootIIFE]];
7433
- root.children = root.children.map(($12) => $12 === root.expressions ? newExpressions : $12);
7658
+ root.children = root.children.map(($13) => $13 === root.expressions ? newExpressions : $13);
7434
7659
  root.expressions = newExpressions;
7435
7660
  }
7436
7661
  addParentPointers(root);
@@ -7471,10 +7696,10 @@ async function processProgramAsync(root) {
7471
7696
  await processComptime(statements);
7472
7697
  }
7473
7698
  function processRepl(root, rootIIFE) {
7474
- const topBlock = gatherRecursive(rootIIFE, ($13) => $13.type === "BlockStatement")[0];
7699
+ const topBlock = gatherRecursive(rootIIFE, ($14) => $14.type === "BlockStatement")[0];
7475
7700
  let i = 0;
7476
- for (let ref26 = gatherRecursiveWithinFunction(topBlock, ($14) => $14.type === "Declaration"), i9 = 0, len8 = ref26.length; i9 < len8; i9++) {
7477
- const decl = ref26[i9];
7701
+ for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($15) => $15.type === "Declaration"), i11 = 0, len9 = ref22.length; i11 < len9; i11++) {
7702
+ const decl = ref22[i11];
7478
7703
  if (!decl.names?.length) {
7479
7704
  continue;
7480
7705
  }
@@ -7487,8 +7712,8 @@ function processRepl(root, rootIIFE) {
7487
7712
  root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]);
7488
7713
  }
7489
7714
  }
7490
- for (let ref27 = gatherRecursive(topBlock, ($15) => $15.type === "FunctionExpression"), i10 = 0, len9 = ref27.length; i10 < len9; i10++) {
7491
- const func = ref27[i10];
7715
+ for (let ref23 = gatherRecursive(topBlock, ($16) => $16.type === "FunctionExpression"), i12 = 0, len10 = ref23.length; i12 < len10; i12++) {
7716
+ const func = ref23[i12];
7492
7717
  if (func.name && func.parent?.type === "BlockStatement") {
7493
7718
  if (func.parent === topBlock) {
7494
7719
  replaceNode(func, void 0);
@@ -7500,17 +7725,17 @@ function processRepl(root, rootIIFE) {
7500
7725
  }
7501
7726
  }
7502
7727
  }
7503
- for (let ref28 = gatherRecursiveWithinFunction(topBlock, ($16) => $16.type === "ClassExpression"), i11 = 0, len10 = ref28.length; i11 < len10; i11++) {
7504
- const classExp = ref28[i11];
7505
- let m5;
7506
- if (classExp.name && classExp.parent === topBlock || (m5 = classExp.parent, typeof m5 === "object" && m5 != null && "type" in m5 && m5.type === "ReturnStatement" && "parent" in m5 && m5.parent === topBlock)) {
7728
+ for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($17) => $17.type === "ClassExpression"), i13 = 0, len11 = ref24.length; i13 < len11; i13++) {
7729
+ const classExp = ref24[i13];
7730
+ let m8;
7731
+ if (classExp.name && classExp.parent === topBlock || (m8 = classExp.parent, typeof m8 === "object" && m8 != null && "type" in m8 && m8.type === "ReturnStatement" && "parent" in m8 && m8.parent === topBlock)) {
7507
7732
  classExp.children.unshift(classExp.name, "=");
7508
7733
  root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]);
7509
7734
  }
7510
7735
  }
7511
7736
  }
7512
7737
  function populateRefs(statements) {
7513
- const refNodes = gatherRecursive(statements, ($17) => $17.type === "Ref");
7738
+ const refNodes = gatherRecursive(statements, ($18) => $18.type === "Ref");
7514
7739
  if (refNodes.length) {
7515
7740
  const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
7516
7741
  const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
@@ -7533,8 +7758,8 @@ function populateRefs(statements) {
7533
7758
  function processPlaceholders(statements) {
7534
7759
  const placeholderMap = /* @__PURE__ */ new Map();
7535
7760
  const liftedIfs = /* @__PURE__ */ new Set();
7536
- for (let ref29 = gatherRecursiveAll(statements, ($18) => $18.type === "Placeholder"), i12 = 0, len11 = ref29.length; i12 < len11; i12++) {
7537
- const exp = ref29[i12];
7761
+ for (let ref25 = gatherRecursiveAll(statements, ($19) => $19.type === "Placeholder"), i14 = 0, len12 = ref25.length; i14 < len12; i14++) {
7762
+ const exp = ref25[i14];
7538
7763
  let ancestor;
7539
7764
  if (exp.subtype === ".") {
7540
7765
  ({ ancestor } = findAncestor(
@@ -7542,8 +7767,8 @@ function processPlaceholders(statements) {
7542
7767
  ($) => $.type === "Call" && !$.parent?.implicit
7543
7768
  ));
7544
7769
  ancestor = ancestor?.parent;
7545
- let m6;
7546
- while (ancestor?.parent != null && (m6 = ancestor.parent.type, m6 === "UnaryExpression" || m6 === "NewExpression" || m6 === "AwaitExpression" || m6 === "ThrowStatement" || m6 === "StatementExpression")) {
7770
+ let m9;
7771
+ while (ancestor?.parent != null && (m9 = ancestor.parent.type, m9 === "UnaryExpression" || m9 === "NewExpression" || m9 === "AwaitExpression" || m9 === "ThrowStatement" || m9 === "StatementExpression")) {
7547
7772
  ancestor = ancestor.parent;
7548
7773
  }
7549
7774
  if (!ancestor) {
@@ -7560,10 +7785,10 @@ function processPlaceholders(statements) {
7560
7785
  if (type === "IfStatement") {
7561
7786
  liftedIfs.add(ancestor2);
7562
7787
  }
7563
- let m7;
7564
- let m8;
7788
+ let m10;
7789
+ let m11;
7565
7790
  return type === "Call" && !ancestor2.parent?.implicit || // Block, except for if/else blocks when condition already lifted
7566
- type === "BlockStatement" && !((m7 = ancestor2.parent, typeof m7 === "object" && m7 != null && "type" in m7 && m7.type === "IfStatement") && liftedIfs.has(ancestor2.parent)) && !((m8 = ancestor2.parent, typeof m8 === "object" && m8 != null && "type" in m8 && m8.type === "ElseClause" && "parent" in m8 && typeof m8.parent === "object" && m8.parent != null && "type" in m8.parent && m8.parent.type === "IfStatement") && liftedIfs.has(ancestor2.parent.parent)) || type === "PipelineExpression" || // Declaration
7791
+ type === "BlockStatement" && !((m10 = ancestor2.parent, typeof m10 === "object" && m10 != null && "type" in m10 && m10.type === "IfStatement") && liftedIfs.has(ancestor2.parent)) && !((m11 = ancestor2.parent, typeof m11 === "object" && m11 != null && "type" in m11 && m11.type === "ElseClause" && "parent" in m11 && typeof m11.parent === "object" && m11.parent != null && "type" in m11.parent && m11.parent.type === "IfStatement") && liftedIfs.has(ancestor2.parent.parent)) || type === "PipelineExpression" || // Declaration
7567
7792
  type === "Initializer" || // Right-hand side of assignment
7568
7793
  type === "AssignmentExpression" && findChildIndex(ancestor2, child2) === ancestor2.children.indexOf(ancestor2.expression) || type === "ReturnStatement" || type === "YieldExpression";
7569
7794
  }));
@@ -7637,11 +7862,11 @@ function processPlaceholders(statements) {
7637
7862
  for (const [ancestor, placeholders] of placeholderMap) {
7638
7863
  let ref = makeRef("$");
7639
7864
  let typeSuffix;
7640
- for (let i13 = 0, len12 = placeholders.length; i13 < len12; i13++) {
7641
- const placeholder = placeholders[i13];
7865
+ for (let i15 = 0, len13 = placeholders.length; i15 < len13; i15++) {
7866
+ const placeholder = placeholders[i15];
7642
7867
  typeSuffix ??= placeholder.typeSuffix;
7643
- let ref30;
7644
- replaceNode((ref30 = placeholder.children)[ref30.length - 1], ref);
7868
+ let ref26;
7869
+ replaceNode((ref26 = placeholder.children)[ref26.length - 1], ref);
7645
7870
  }
7646
7871
  const { parent } = ancestor;
7647
7872
  const body = maybeUnwrap(ancestor);
@@ -7662,16 +7887,16 @@ function processPlaceholders(statements) {
7662
7887
  }
7663
7888
  case "PipelineExpression": {
7664
7889
  const i = findChildIndex(parent, ancestor);
7665
- let ref31;
7890
+ let ref27;
7666
7891
  if (i === 1) {
7667
- ref31 = ancestor === parent.children[i];
7892
+ ref27 = ancestor === parent.children[i];
7668
7893
  } else if (i === 2) {
7669
- ref31 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
7894
+ ref27 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
7670
7895
  } else {
7671
- ref31 = void 0;
7896
+ ref27 = void 0;
7672
7897
  }
7673
7898
  ;
7674
- outer = ref31;
7899
+ outer = ref27;
7675
7900
  break;
7676
7901
  }
7677
7902
  case "AssignmentExpression":
@@ -7686,9 +7911,9 @@ function processPlaceholders(statements) {
7686
7911
  fnExp = makeLeftHandSideExpression(fnExp);
7687
7912
  }
7688
7913
  replaceNode(ancestor, fnExp, parent);
7689
- let ref32;
7690
- if (ref32 = getTrimmingSpace(body)) {
7691
- const ws = ref32;
7914
+ let ref28;
7915
+ if (ref28 = getTrimmingSpace(body)) {
7916
+ const ws = ref28;
7692
7917
  inplaceInsertTrimmingSpace(body, "");
7693
7918
  inplacePrepend(ws, fnExp);
7694
7919
  }
@@ -7733,8 +7958,8 @@ function reorderBindingRestProperty(props) {
7733
7958
  }
7734
7959
  ];
7735
7960
  }
7736
- let ref33;
7737
- if (Array.isArray(rest.delim) && (ref33 = rest.delim)[ref33.length - 1]?.token === ",") {
7961
+ let ref29;
7962
+ if (Array.isArray(rest.delim) && (ref29 = rest.delim)[ref29.length - 1]?.token === ",") {
7738
7963
  rest.delim = rest.delim.slice(0, -1);
7739
7964
  rest.children = [...rest.children.slice(0, -1), rest.delim];
7740
7965
  }
@@ -7831,11 +8056,10 @@ var grammar = {
7831
8056
  ApplicationStart,
7832
8057
  ForbiddenImplicitCalls,
7833
8058
  ReservedBinary,
7834
- ArgumentsWithTrailingMemberExpressions,
7835
- TrailingMemberExpressions,
7836
- IndentedTrailingMemberExpression,
7837
- AllowedTrailingMemberExpressions,
8059
+ ArgumentsWithTrailingCallExpressions,
7838
8060
  TrailingCallExpressions,
8061
+ IndentedTrailingCallExpressions,
8062
+ NestedTrailingCallExpression,
7839
8063
  AllowedTrailingCallExpressions,
7840
8064
  CommaDelimiter,
7841
8065
  OptionalCommaDelimiter,
@@ -7893,6 +8117,7 @@ var grammar = {
7893
8117
  PipelineHeadItem,
7894
8118
  PipelineTailItem,
7895
8119
  PrimaryExpression,
8120
+ OptimizedParenthesizedExpression,
7896
8121
  ParenthesizedExpression,
7897
8122
  Placeholder,
7898
8123
  PlaceholderTypeSuffix,
@@ -7946,6 +8171,7 @@ var grammar = {
7946
8171
  ImplicitAccessStart,
7947
8172
  PropertyAccessModifier,
7948
8173
  PropertyAccess,
8174
+ ExplicitPropertyGlob,
7949
8175
  PropertyGlob,
7950
8176
  PropertyBind,
7951
8177
  SuperProperty,
@@ -8768,125 +8994,126 @@ var $L123 = (0, import_lib2.$L)("sum");
8768
8994
  var $L124 = (0, import_lib2.$L)("product");
8769
8995
  var $L125 = (0, import_lib2.$L)("min");
8770
8996
  var $L126 = (0, import_lib2.$L)("max");
8771
- var $L127 = (0, import_lib2.$L)("break");
8772
- var $L128 = (0, import_lib2.$L)("continue");
8773
- var $L129 = (0, import_lib2.$L)("debugger");
8774
- var $L130 = (0, import_lib2.$L)("require");
8775
- var $L131 = (0, import_lib2.$L)("with");
8776
- var $L132 = (0, import_lib2.$L)("assert");
8777
- var $L133 = (0, import_lib2.$L)(":=");
8778
- var $L134 = (0, import_lib2.$L)("\u2254");
8779
- var $L135 = (0, import_lib2.$L)(".=");
8780
- var $L136 = (0, import_lib2.$L)("::=");
8781
- var $L137 = (0, import_lib2.$L)("/*");
8782
- var $L138 = (0, import_lib2.$L)("*/");
8783
- var $L139 = (0, import_lib2.$L)("\\");
8784
- var $L140 = (0, import_lib2.$L)(")");
8785
- var $L141 = (0, import_lib2.$L)("abstract");
8786
- var $L142 = (0, import_lib2.$L)("as");
8787
- var $L143 = (0, import_lib2.$L)("@");
8788
- var $L144 = (0, import_lib2.$L)("@@");
8789
- var $L145 = (0, import_lib2.$L)("async");
8790
- var $L146 = (0, import_lib2.$L)("await");
8791
- var $L147 = (0, import_lib2.$L)("`");
8792
- var $L148 = (0, import_lib2.$L)("by");
8793
- var $L149 = (0, import_lib2.$L)("case");
8794
- var $L150 = (0, import_lib2.$L)("catch");
8795
- var $L151 = (0, import_lib2.$L)("class");
8796
- var $L152 = (0, import_lib2.$L)("#{");
8797
- var $L153 = (0, import_lib2.$L)("comptime");
8798
- var $L154 = (0, import_lib2.$L)("declare");
8799
- var $L155 = (0, import_lib2.$L)("default");
8800
- var $L156 = (0, import_lib2.$L)("delete");
8801
- var $L157 = (0, import_lib2.$L)("do");
8802
- var $L158 = (0, import_lib2.$L)("..");
8803
- var $L159 = (0, import_lib2.$L)("\u2025");
8804
- var $L160 = (0, import_lib2.$L)("...");
8805
- var $L161 = (0, import_lib2.$L)("\u2026");
8806
- var $L162 = (0, import_lib2.$L)("::");
8807
- var $L163 = (0, import_lib2.$L)('"');
8808
- var $L164 = (0, import_lib2.$L)("each");
8809
- var $L165 = (0, import_lib2.$L)("else");
8810
- var $L166 = (0, import_lib2.$L)("!");
8811
- var $L167 = (0, import_lib2.$L)("export");
8812
- var $L168 = (0, import_lib2.$L)("extends");
8813
- var $L169 = (0, import_lib2.$L)("finally");
8814
- var $L170 = (0, import_lib2.$L)("for");
8815
- var $L171 = (0, import_lib2.$L)("from");
8816
- var $L172 = (0, import_lib2.$L)("function");
8817
- var $L173 = (0, import_lib2.$L)("get");
8818
- var $L174 = (0, import_lib2.$L)("set");
8819
- var $L175 = (0, import_lib2.$L)("#");
8820
- var $L176 = (0, import_lib2.$L)("if");
8821
- var $L177 = (0, import_lib2.$L)("in");
8822
- var $L178 = (0, import_lib2.$L)("infer");
8823
- var $L179 = (0, import_lib2.$L)("let");
8824
- var $L180 = (0, import_lib2.$L)("const");
8825
- var $L181 = (0, import_lib2.$L)("is");
8826
- var $L182 = (0, import_lib2.$L)("var");
8827
- var $L183 = (0, import_lib2.$L)("like");
8828
- var $L184 = (0, import_lib2.$L)("loop");
8829
- var $L185 = (0, import_lib2.$L)("new");
8830
- var $L186 = (0, import_lib2.$L)("not");
8831
- var $L187 = (0, import_lib2.$L)("of");
8832
- var $L188 = (0, import_lib2.$L)("[");
8833
- var $L189 = (0, import_lib2.$L)("operator");
8834
- var $L190 = (0, import_lib2.$L)("override");
8835
- var $L191 = (0, import_lib2.$L)("own");
8836
- var $L192 = (0, import_lib2.$L)("public");
8837
- var $L193 = (0, import_lib2.$L)("private");
8838
- var $L194 = (0, import_lib2.$L)("protected");
8839
- var $L195 = (0, import_lib2.$L)("||>");
8840
- var $L196 = (0, import_lib2.$L)("|\u25B7");
8841
- var $L197 = (0, import_lib2.$L)("|>=");
8842
- var $L198 = (0, import_lib2.$L)("\u25B7=");
8843
- var $L199 = (0, import_lib2.$L)("|>");
8844
- var $L200 = (0, import_lib2.$L)("\u25B7");
8845
- var $L201 = (0, import_lib2.$L)("readonly");
8846
- var $L202 = (0, import_lib2.$L)("return");
8847
- var $L203 = (0, import_lib2.$L)("satisfies");
8848
- var $L204 = (0, import_lib2.$L)("'");
8849
- var $L205 = (0, import_lib2.$L)("static");
8850
- var $L206 = (0, import_lib2.$L)("${");
8851
- var $L207 = (0, import_lib2.$L)("super");
8852
- var $L208 = (0, import_lib2.$L)("switch");
8853
- var $L209 = (0, import_lib2.$L)("target");
8854
- var $L210 = (0, import_lib2.$L)("then");
8855
- var $L211 = (0, import_lib2.$L)("this");
8856
- var $L212 = (0, import_lib2.$L)("throw");
8857
- var $L213 = (0, import_lib2.$L)('"""');
8858
- var $L214 = (0, import_lib2.$L)("'''");
8859
- var $L215 = (0, import_lib2.$L)("///");
8860
- var $L216 = (0, import_lib2.$L)("```");
8861
- var $L217 = (0, import_lib2.$L)("try");
8862
- var $L218 = (0, import_lib2.$L)("typeof");
8863
- var $L219 = (0, import_lib2.$L)("undefined");
8864
- var $L220 = (0, import_lib2.$L)("unless");
8865
- var $L221 = (0, import_lib2.$L)("until");
8866
- var $L222 = (0, import_lib2.$L)("using");
8867
- var $L223 = (0, import_lib2.$L)("void");
8868
- var $L224 = (0, import_lib2.$L)("when");
8869
- var $L225 = (0, import_lib2.$L)("while");
8870
- var $L226 = (0, import_lib2.$L)("yield");
8871
- var $L227 = (0, import_lib2.$L)("/>");
8872
- var $L228 = (0, import_lib2.$L)("</");
8873
- var $L229 = (0, import_lib2.$L)("<>");
8874
- var $L230 = (0, import_lib2.$L)("</>");
8875
- var $L231 = (0, import_lib2.$L)("<!--");
8876
- var $L232 = (0, import_lib2.$L)("-->");
8877
- var $L233 = (0, import_lib2.$L)("type");
8878
- var $L234 = (0, import_lib2.$L)("enum");
8879
- var $L235 = (0, import_lib2.$L)("interface");
8880
- var $L236 = (0, import_lib2.$L)("global");
8881
- var $L237 = (0, import_lib2.$L)("module");
8882
- var $L238 = (0, import_lib2.$L)("namespace");
8883
- var $L239 = (0, import_lib2.$L)("asserts");
8884
- var $L240 = (0, import_lib2.$L)("keyof");
8885
- var $L241 = (0, import_lib2.$L)("???");
8886
- var $L242 = (0, import_lib2.$L)("unique");
8887
- var $L243 = (0, import_lib2.$L)("symbol");
8888
- var $L244 = (0, import_lib2.$L)("[]");
8889
- var $L245 = (0, import_lib2.$L)("civet");
8997
+ var $L127 = (0, import_lib2.$L)("join");
8998
+ var $L128 = (0, import_lib2.$L)("break");
8999
+ var $L129 = (0, import_lib2.$L)("continue");
9000
+ var $L130 = (0, import_lib2.$L)("debugger");
9001
+ var $L131 = (0, import_lib2.$L)("require");
9002
+ var $L132 = (0, import_lib2.$L)("with");
9003
+ var $L133 = (0, import_lib2.$L)("assert");
9004
+ var $L134 = (0, import_lib2.$L)(":=");
9005
+ var $L135 = (0, import_lib2.$L)("\u2254");
9006
+ var $L136 = (0, import_lib2.$L)(".=");
9007
+ var $L137 = (0, import_lib2.$L)("::=");
9008
+ var $L138 = (0, import_lib2.$L)("/*");
9009
+ var $L139 = (0, import_lib2.$L)("*/");
9010
+ var $L140 = (0, import_lib2.$L)("\\");
9011
+ var $L141 = (0, import_lib2.$L)(")");
9012
+ var $L142 = (0, import_lib2.$L)("abstract");
9013
+ var $L143 = (0, import_lib2.$L)("as");
9014
+ var $L144 = (0, import_lib2.$L)("@");
9015
+ var $L145 = (0, import_lib2.$L)("@@");
9016
+ var $L146 = (0, import_lib2.$L)("async");
9017
+ var $L147 = (0, import_lib2.$L)("await");
9018
+ var $L148 = (0, import_lib2.$L)("`");
9019
+ var $L149 = (0, import_lib2.$L)("by");
9020
+ var $L150 = (0, import_lib2.$L)("case");
9021
+ var $L151 = (0, import_lib2.$L)("catch");
9022
+ var $L152 = (0, import_lib2.$L)("class");
9023
+ var $L153 = (0, import_lib2.$L)("#{");
9024
+ var $L154 = (0, import_lib2.$L)("comptime");
9025
+ var $L155 = (0, import_lib2.$L)("declare");
9026
+ var $L156 = (0, import_lib2.$L)("default");
9027
+ var $L157 = (0, import_lib2.$L)("delete");
9028
+ var $L158 = (0, import_lib2.$L)("do");
9029
+ var $L159 = (0, import_lib2.$L)("..");
9030
+ var $L160 = (0, import_lib2.$L)("\u2025");
9031
+ var $L161 = (0, import_lib2.$L)("...");
9032
+ var $L162 = (0, import_lib2.$L)("\u2026");
9033
+ var $L163 = (0, import_lib2.$L)("::");
9034
+ var $L164 = (0, import_lib2.$L)('"');
9035
+ var $L165 = (0, import_lib2.$L)("each");
9036
+ var $L166 = (0, import_lib2.$L)("else");
9037
+ var $L167 = (0, import_lib2.$L)("!");
9038
+ var $L168 = (0, import_lib2.$L)("export");
9039
+ var $L169 = (0, import_lib2.$L)("extends");
9040
+ var $L170 = (0, import_lib2.$L)("finally");
9041
+ var $L171 = (0, import_lib2.$L)("for");
9042
+ var $L172 = (0, import_lib2.$L)("from");
9043
+ var $L173 = (0, import_lib2.$L)("function");
9044
+ var $L174 = (0, import_lib2.$L)("get");
9045
+ var $L175 = (0, import_lib2.$L)("set");
9046
+ var $L176 = (0, import_lib2.$L)("#");
9047
+ var $L177 = (0, import_lib2.$L)("if");
9048
+ var $L178 = (0, import_lib2.$L)("in");
9049
+ var $L179 = (0, import_lib2.$L)("infer");
9050
+ var $L180 = (0, import_lib2.$L)("let");
9051
+ var $L181 = (0, import_lib2.$L)("const");
9052
+ var $L182 = (0, import_lib2.$L)("is");
9053
+ var $L183 = (0, import_lib2.$L)("var");
9054
+ var $L184 = (0, import_lib2.$L)("like");
9055
+ var $L185 = (0, import_lib2.$L)("loop");
9056
+ var $L186 = (0, import_lib2.$L)("new");
9057
+ var $L187 = (0, import_lib2.$L)("not");
9058
+ var $L188 = (0, import_lib2.$L)("of");
9059
+ var $L189 = (0, import_lib2.$L)("[");
9060
+ var $L190 = (0, import_lib2.$L)("operator");
9061
+ var $L191 = (0, import_lib2.$L)("override");
9062
+ var $L192 = (0, import_lib2.$L)("own");
9063
+ var $L193 = (0, import_lib2.$L)("public");
9064
+ var $L194 = (0, import_lib2.$L)("private");
9065
+ var $L195 = (0, import_lib2.$L)("protected");
9066
+ var $L196 = (0, import_lib2.$L)("||>");
9067
+ var $L197 = (0, import_lib2.$L)("|\u25B7");
9068
+ var $L198 = (0, import_lib2.$L)("|>=");
9069
+ var $L199 = (0, import_lib2.$L)("\u25B7=");
9070
+ var $L200 = (0, import_lib2.$L)("|>");
9071
+ var $L201 = (0, import_lib2.$L)("\u25B7");
9072
+ var $L202 = (0, import_lib2.$L)("readonly");
9073
+ var $L203 = (0, import_lib2.$L)("return");
9074
+ var $L204 = (0, import_lib2.$L)("satisfies");
9075
+ var $L205 = (0, import_lib2.$L)("'");
9076
+ var $L206 = (0, import_lib2.$L)("static");
9077
+ var $L207 = (0, import_lib2.$L)("${");
9078
+ var $L208 = (0, import_lib2.$L)("super");
9079
+ var $L209 = (0, import_lib2.$L)("switch");
9080
+ var $L210 = (0, import_lib2.$L)("target");
9081
+ var $L211 = (0, import_lib2.$L)("then");
9082
+ var $L212 = (0, import_lib2.$L)("this");
9083
+ var $L213 = (0, import_lib2.$L)("throw");
9084
+ var $L214 = (0, import_lib2.$L)('"""');
9085
+ var $L215 = (0, import_lib2.$L)("'''");
9086
+ var $L216 = (0, import_lib2.$L)("///");
9087
+ var $L217 = (0, import_lib2.$L)("```");
9088
+ var $L218 = (0, import_lib2.$L)("try");
9089
+ var $L219 = (0, import_lib2.$L)("typeof");
9090
+ var $L220 = (0, import_lib2.$L)("undefined");
9091
+ var $L221 = (0, import_lib2.$L)("unless");
9092
+ var $L222 = (0, import_lib2.$L)("until");
9093
+ var $L223 = (0, import_lib2.$L)("using");
9094
+ var $L224 = (0, import_lib2.$L)("void");
9095
+ var $L225 = (0, import_lib2.$L)("when");
9096
+ var $L226 = (0, import_lib2.$L)("while");
9097
+ var $L227 = (0, import_lib2.$L)("yield");
9098
+ var $L228 = (0, import_lib2.$L)("/>");
9099
+ var $L229 = (0, import_lib2.$L)("</");
9100
+ var $L230 = (0, import_lib2.$L)("<>");
9101
+ var $L231 = (0, import_lib2.$L)("</>");
9102
+ var $L232 = (0, import_lib2.$L)("<!--");
9103
+ var $L233 = (0, import_lib2.$L)("-->");
9104
+ var $L234 = (0, import_lib2.$L)("type");
9105
+ var $L235 = (0, import_lib2.$L)("enum");
9106
+ var $L236 = (0, import_lib2.$L)("interface");
9107
+ var $L237 = (0, import_lib2.$L)("global");
9108
+ var $L238 = (0, import_lib2.$L)("module");
9109
+ var $L239 = (0, import_lib2.$L)("namespace");
9110
+ var $L240 = (0, import_lib2.$L)("asserts");
9111
+ var $L241 = (0, import_lib2.$L)("keyof");
9112
+ var $L242 = (0, import_lib2.$L)("???");
9113
+ var $L243 = (0, import_lib2.$L)("unique");
9114
+ var $L244 = (0, import_lib2.$L)("symbol");
9115
+ var $L245 = (0, import_lib2.$L)("[]");
9116
+ var $L246 = (0, import_lib2.$L)("civet");
8890
9117
  var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
8891
9118
  var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
8892
9119
  var $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
@@ -9080,7 +9307,7 @@ var NestedExpressionizedStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((
9080
9307
  return expression;
9081
9308
  return {
9082
9309
  type: "CallExpression",
9083
- children: [expression, ...trailing.flat()]
9310
+ children: [expression, ...trailing]
9084
9311
  };
9085
9312
  });
9086
9313
  function NestedExpressionizedStatement(ctx, state2) {
@@ -9093,7 +9320,7 @@ var ExpressionizedStatementWithTrailingCallExpressions$0 = (0, import_lib2.$TS)(
9093
9320
  type: "CallExpression",
9094
9321
  children: [
9095
9322
  makeLeftHandSideExpression($1),
9096
- $2
9323
+ ...$2
9097
9324
  ]
9098
9325
  };
9099
9326
  });
@@ -9185,7 +9412,7 @@ var ExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, Al
9185
9412
  function ExplicitArguments(ctx, state2) {
9186
9413
  return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitArguments", ExplicitArguments$0);
9187
9414
  }
9188
- var ApplicationStart$0 = (0, import_lib2.$S)(IndentedApplicationAllowed, (0, import_lib2.$Y)((0, import_lib2.$S)(IndentedFurther, (0, import_lib2.$N)(IdentifierBinaryOp), (0, import_lib2.$N)(ReservedBinary))), (0, import_lib2.$N)(IndentedTrailingMemberExpression));
9415
+ var ApplicationStart$0 = (0, import_lib2.$S)(IndentedApplicationAllowed, (0, import_lib2.$Y)((0, import_lib2.$S)(IndentedFurther, (0, import_lib2.$N)(IdentifierBinaryOp), (0, import_lib2.$N)(ReservedBinary))), (0, import_lib2.$N)(IndentedTrailingCallExpressions));
9189
9416
  var ApplicationStart$1 = (0, import_lib2.$S)((0, import_lib2.$N)(EOS), (0, import_lib2.$Y)((0, import_lib2.$S)(_, (0, import_lib2.$C)(BracedApplicationAllowed, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L1, 'ApplicationStart "{"'))), (0, import_lib2.$N)(ForbiddenImplicitCalls))));
9190
9417
  var ApplicationStart$$ = [ApplicationStart$0, ApplicationStart$1];
9191
9418
  function ApplicationStart(ctx, state2) {
@@ -9218,39 +9445,45 @@ var ReservedBinary$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R2, "Rese
9218
9445
  function ReservedBinary(ctx, state2) {
9219
9446
  return (0, import_lib2.$EVENT)(ctx, state2, "ReservedBinary", ReservedBinary$0);
9220
9447
  }
9221
- var ArgumentsWithTrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, AllowedTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
9448
+ var ArgumentsWithTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
9222
9449
  var args = $1;
9223
9450
  var trailing = $2;
9224
- return [args, ...trailing];
9451
+ return [args, ...trailing ?? []];
9225
9452
  });
9226
- function ArgumentsWithTrailingMemberExpressions(ctx, state2) {
9227
- return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingMemberExpressions", ArgumentsWithTrailingMemberExpressions$0);
9453
+ function ArgumentsWithTrailingCallExpressions(ctx, state2) {
9454
+ return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingCallExpressions", ArgumentsWithTrailingCallExpressions$0);
9228
9455
  }
9229
- var TrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(MemberExpressionRest), (0, import_lib2.$Q)(IndentedTrailingMemberExpression)), function($skip, $loc, $0, $1, $2) {
9456
+ var TrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(IndentedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
9457
+ $1 = $1.flat();
9458
+ if (!$1.length && !$2)
9459
+ return $skip;
9460
+ if (!$2)
9461
+ return $1;
9230
9462
  return [...$1, ...$2];
9231
9463
  });
9232
- function TrailingMemberExpressions(ctx, state2) {
9233
- return (0, import_lib2.$EVENT)(ctx, state2, "TrailingMemberExpressions", TrailingMemberExpressions$0);
9464
+ function TrailingCallExpressions(ctx, state2) {
9465
+ return (0, import_lib2.$EVENT)(ctx, state2, "TrailingCallExpressions", TrailingCallExpressions$0);
9234
9466
  }
9235
- var IndentedTrailingMemberExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(IndentedAtLeast, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$EXPECT)($L6, 'IndentedTrailingMemberExpression "?"')), (0, import_lib2.$EXPECT)($L7, 'IndentedTrailingMemberExpression "."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R3, "IndentedTrailingMemberExpression /[0-9]/")))), MemberExpressionRest), function($skip, $loc, $0, $1, $2, $3) {
9236
- var ws = $1;
9237
- var rest = $3;
9238
- return prepend(ws, rest);
9467
+ var IndentedTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedTrailingCallExpression), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
9468
+ if (!$2.length)
9469
+ return $skip;
9470
+ return $2.flat();
9239
9471
  });
9240
- function IndentedTrailingMemberExpression(ctx, state2) {
9241
- return (0, import_lib2.$EVENT)(ctx, state2, "IndentedTrailingMemberExpression", IndentedTrailingMemberExpression$0);
9242
- }
9243
- var AllowedTrailingMemberExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingMemberExpressions), function(value) {
9244
- return value[1];
9472
+ var IndentedTrailingCallExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingCallExpression), function($skip, $loc, $0, $1) {
9473
+ return $1.flat();
9245
9474
  });
9246
- var AllowedTrailingMemberExpressions$1 = (0, import_lib2.$Q)(MemberExpressionRest);
9247
- var AllowedTrailingMemberExpressions$$ = [AllowedTrailingMemberExpressions$0, AllowedTrailingMemberExpressions$1];
9248
- function AllowedTrailingMemberExpressions(ctx, state2) {
9249
- return (0, import_lib2.$EVENT_C)(ctx, state2, "AllowedTrailingMemberExpressions", AllowedTrailingMemberExpressions$$);
9475
+ var IndentedTrailingCallExpressions$$ = [IndentedTrailingCallExpressions$0, IndentedTrailingCallExpressions$1];
9476
+ function IndentedTrailingCallExpressions(ctx, state2) {
9477
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingCallExpressions", IndentedTrailingCallExpressions$$);
9250
9478
  }
9251
- var TrailingCallExpressions$0 = (0, import_lib2.$P)((0, import_lib2.$S)(IndentedAtLeast, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$EXPECT)($L6, 'TrailingCallExpressions "?"')), (0, import_lib2.$EXPECT)($L7, 'TrailingCallExpressions "."'), (0, import_lib2.$N)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R3, "TrailingCallExpressions /[0-9]/"))))), (0, import_lib2.$P)(CallExpressionRest)));
9252
- function TrailingCallExpressions(ctx, state2) {
9253
- return (0, import_lib2.$EVENT)(ctx, state2, "TrailingCallExpressions", TrailingCallExpressions$0);
9479
+ var NestedTrailingCallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Nested, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$EXPECT)($L6, 'NestedTrailingCallExpression "?"')), (0, import_lib2.$EXPECT)($L7, 'NestedTrailingCallExpression "."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R3, "NestedTrailingCallExpression /[0-9]/")))), (0, import_lib2.$P)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
9480
+ var ws = $1;
9481
+ var rests = $3;
9482
+ const [first, ...rest] = rests.flat();
9483
+ return [prepend(ws, first), ...rest];
9484
+ });
9485
+ function NestedTrailingCallExpression(ctx, state2) {
9486
+ return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingCallExpression", NestedTrailingCallExpression$0);
9254
9487
  }
9255
9488
  var AllowedTrailingCallExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingCallExpressions), function(value) {
9256
9489
  return value[1];
@@ -9855,7 +10088,7 @@ function PipelineExpressionBodySameLine(ctx, state2) {
9855
10088
  return (0, import_lib2.$EVENT)(ctx, state2, "PipelineExpressionBodySameLine", PipelineExpressionBodySameLine$0);
9856
10089
  }
9857
10090
  var PipelineHeadItem$0 = NonPipelineExpression;
9858
- var PipelineHeadItem$1 = ParenthesizedExpression;
10091
+ var PipelineHeadItem$1 = OptimizedParenthesizedExpression;
9859
10092
  var PipelineHeadItem$$ = [PipelineHeadItem$0, PipelineHeadItem$1];
9860
10093
  function PipelineHeadItem(ctx, state2) {
9861
10094
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PipelineHeadItem", PipelineHeadItem$$);
@@ -9890,7 +10123,7 @@ var PrimaryExpression$5 = FunctionExpression;
9890
10123
  var PrimaryExpression$6 = IdentifierReference;
9891
10124
  var PrimaryExpression$7 = ClassExpression;
9892
10125
  var PrimaryExpression$8 = RegularExpressionLiteral;
9893
- var PrimaryExpression$9 = ParenthesizedExpression;
10126
+ var PrimaryExpression$9 = OptimizedParenthesizedExpression;
9894
10127
  var PrimaryExpression$10 = Placeholder;
9895
10128
  var PrimaryExpression$11 = SymbolLiteral;
9896
10129
  var PrimaryExpression$12 = JSXImplicitFragment;
@@ -9898,31 +10131,36 @@ var PrimaryExpression$$ = [PrimaryExpression$0, PrimaryExpression$1, PrimaryExpr
9898
10131
  function PrimaryExpression(ctx, state2) {
9899
10132
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PrimaryExpression", PrimaryExpression$$);
9900
10133
  }
10134
+ var OptimizedParenthesizedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ParenthesizedExpression), function($skip, $loc, $0, $1) {
10135
+ const { expression } = $1;
10136
+ switch (expression.type) {
10137
+ case "StatementExpression":
10138
+ if (expression.statement.type !== "IterationExpression")
10139
+ break;
10140
+ case "IterationExpression":
10141
+ return expression;
10142
+ }
10143
+ return $1;
10144
+ });
10145
+ function OptimizedParenthesizedExpression(ctx, state2) {
10146
+ return (0, import_lib2.$EVENT)(ctx, state2, "OptimizedParenthesizedExpression", OptimizedParenthesizedExpression$0);
10147
+ }
9901
10148
  var ParenthesizedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, AllowAll, (0, import_lib2.$E)((0, import_lib2.$S)(PostfixedCommaExpression, __, CloseParen)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
9902
10149
  var open = $1;
9903
10150
  if (!$3)
9904
10151
  return $skip;
9905
- const [exp, ws, close] = $3;
9906
- switch (exp.type) {
9907
- case "StatementExpression":
9908
- if (exp.statement.type !== "IterationExpression")
9909
- break;
9910
- case "IterationExpression":
9911
- return exp;
9912
- case "ParenthesizedExpression":
9913
- if (exp.implicit) {
9914
- return {
9915
- ...exp,
9916
- children: [open, exp.expression, ws, close],
9917
- implicit: false
9918
- };
9919
- }
9920
- break;
10152
+ const [expression, ws, close] = $3;
10153
+ if (expression.type === "ParenthesizedExpression" && expression.implicit) {
10154
+ return {
10155
+ ...expression,
10156
+ children: [open, expression.expression, ws, close],
10157
+ implicit: false
10158
+ };
9921
10159
  }
9922
10160
  return {
9923
10161
  type: "ParenthesizedExpression",
9924
- children: [open, exp, ws, close],
9925
- expression: exp
10162
+ children: [open, expression, ws, close],
10163
+ expression
9926
10164
  };
9927
10165
  });
9928
10166
  function ParenthesizedExpression(ctx, state2) {
@@ -10435,7 +10673,7 @@ var LeftHandSideExpression$$ = [LeftHandSideExpression$0, LeftHandSideExpression
10435
10673
  function LeftHandSideExpression(ctx, state2) {
10436
10674
  return (0, import_lib2.$EVENT_C)(ctx, state2, "LeftHandSideExpression", LeftHandSideExpression$$);
10437
10675
  }
10438
- var CallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Super, ArgumentsWithTrailingMemberExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
10676
+ var CallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Super, ArgumentsWithTrailingCallExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
10439
10677
  var rest = $3;
10440
10678
  return processCallMemberExpression({
10441
10679
  type: "CallExpression",
@@ -10453,22 +10691,22 @@ var CallExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __,
10453
10691
  var imports = $5;
10454
10692
  return dynamizeImportDeclarationExpression([i, iws, imports, fws, from]);
10455
10693
  });
10456
- var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'), ArgumentsWithTrailingMemberExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
10694
+ var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
10457
10695
  var rest = $3;
10458
10696
  return processCallMemberExpression({
10459
10697
  type: "CallExpression",
10460
10698
  children: [$1, ...$2, ...rest.flat()]
10461
10699
  });
10462
10700
  });
10463
- var CallExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(MemberExpression, AllowedTrailingMemberExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
10701
+ var CallExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(MemberExpression, (0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3) {
10464
10702
  var member = $1;
10465
- var trailing = $2;
10466
- var rest = $3;
10467
- if (rest.length || trailing.length) {
10703
+ var rest = $2;
10704
+ var trailing = $3;
10705
+ if (rest.length || trailing) {
10468
10706
  rest = rest.flat();
10469
10707
  return processCallMemberExpression({
10470
10708
  type: "CallExpression",
10471
- children: [member, ...trailing, ...rest]
10709
+ children: [member, ...rest, ...trailing ?? []]
10472
10710
  });
10473
10711
  }
10474
10712
  return member;
@@ -10488,7 +10726,7 @@ var CallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_l
10488
10726
  }
10489
10727
  return literal;
10490
10728
  });
10491
- var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
10729
+ var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingCallExpressions), function($skip, $loc, $0, $1, $2) {
10492
10730
  var optional = $1;
10493
10731
  var argsWithTrailing = $2;
10494
10732
  if (!optional)
@@ -10855,6 +11093,12 @@ var PropertyAccess$$ = [PropertyAccess$0, PropertyAccess$1, PropertyAccess$2, Pr
10855
11093
  function PropertyAccess(ctx, state2) {
10856
11094
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PropertyAccess", PropertyAccess$$);
10857
11095
  }
11096
+ var ExplicitPropertyGlob$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(ExplicitAccessStart), PropertyGlob), function(value) {
11097
+ return value[1];
11098
+ });
11099
+ function ExplicitPropertyGlob(ctx, state2) {
11100
+ return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitPropertyGlob", ExplicitPropertyGlob$0);
11101
+ }
10858
11102
  var PropertyGlob$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$S)((0, import_lib2.$E)(PropertyAccessModifier), OptionalDot), (0, import_lib2.$Q)(InlineComment), BracedObjectLiteral), function($skip, $loc, $0, $1, $2, $3) {
10859
11103
  var dot = $1;
10860
11104
  var object = $3;
@@ -11467,19 +11711,13 @@ var BindingElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.
11467
11711
  var binding = $2;
11468
11712
  var typeSuffix = $3;
11469
11713
  var initializer = $4;
11470
- if (binding.children) {
11471
- binding = {
11472
- ...binding,
11473
- initializer,
11474
- children: [...binding.children, initializer]
11475
- };
11476
- }
11477
11714
  return {
11478
11715
  type: "BindingElement",
11479
11716
  names: binding.names,
11480
11717
  typeSuffix,
11481
11718
  binding,
11482
- children: [ws, binding]
11719
+ children: [ws, binding, initializer],
11720
+ initializer
11483
11721
  };
11484
11722
  });
11485
11723
  var BindingElement$2 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($L17, 'BindingElement ","'))), function($skip, $loc, $0, $1) {
@@ -12183,11 +12421,9 @@ var SingleLineStatements$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidNewl
12183
12421
  const expressions = [...stmts];
12184
12422
  if (last)
12185
12423
  expressions.push(last);
12186
- const maybeComment = expressions.at(-1)?.[2]?.children?.[2]?.at(-1);
12187
- const hasTrailingComment = maybeComment?.type === "Comment" && maybeComment.token.startsWith("//");
12188
12424
  const children = [expressions];
12189
- if (hasTrailingComment)
12190
- children.push("\n");
12425
+ if (hasTrailingComment(expressions))
12426
+ children.push(["\n"]);
12191
12427
  return {
12192
12428
  type: "BlockStatement",
12193
12429
  expressions,
@@ -13271,7 +13507,7 @@ var MethodDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Abstract, __,
13271
13507
  ts: true
13272
13508
  };
13273
13509
  });
13274
- var MethodDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(MethodSignature, (0, import_lib2.$N)((0, import_lib2.$C)(PropertyAccess, UnaryPostfix, NonNullAssertion)), (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3) {
13510
+ var MethodDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(MethodSignature, (0, import_lib2.$N)((0, import_lib2.$C)(PropertyAccess, ExplicitPropertyGlob, UnaryPostfix, NonNullAssertion)), (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3) {
13275
13511
  var signature = $1;
13276
13512
  var block = $3;
13277
13513
  let children = $0;
@@ -14491,7 +14727,7 @@ var ForStatementControlWithReduction$$ = [ForStatementControlWithReduction$0, Fo
14491
14727
  function ForStatementControlWithReduction(ctx, state2) {
14492
14728
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ForStatementControlWithReduction", ForStatementControlWithReduction$$);
14493
14729
  }
14494
- var ForReduction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L120, 'ForReduction "some"'), (0, import_lib2.$EXPECT)($L121, 'ForReduction "every"'), (0, import_lib2.$EXPECT)($L122, 'ForReduction "count"'), (0, import_lib2.$EXPECT)($L123, 'ForReduction "sum"'), (0, import_lib2.$EXPECT)($L124, 'ForReduction "product"'), (0, import_lib2.$EXPECT)($L125, 'ForReduction "min"'), (0, import_lib2.$EXPECT)($L126, 'ForReduction "max"')), NonIdContinue, __), function($skip, $loc, $0, $1, $2, $3) {
14730
+ var ForReduction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L120, 'ForReduction "some"'), (0, import_lib2.$EXPECT)($L121, 'ForReduction "every"'), (0, import_lib2.$EXPECT)($L122, 'ForReduction "count"'), (0, import_lib2.$EXPECT)($L123, 'ForReduction "sum"'), (0, import_lib2.$EXPECT)($L124, 'ForReduction "product"'), (0, import_lib2.$EXPECT)($L125, 'ForReduction "min"'), (0, import_lib2.$EXPECT)($L126, 'ForReduction "max"'), (0, import_lib2.$EXPECT)($L127, 'ForReduction "join"')), NonIdContinue, __), function($skip, $loc, $0, $1, $2, $3) {
14495
14731
  var subtype = $1;
14496
14732
  var ws = $3;
14497
14733
  return {
@@ -15065,7 +15301,7 @@ var Condition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, Decl
15065
15301
  expression
15066
15302
  };
15067
15303
  });
15068
- var Condition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, InsertOpenParen, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), InsertCloseParen, PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
15304
+ var Condition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, InsertOpenParen, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), InsertCloseParen, PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
15069
15305
  var open = $2;
15070
15306
  var expression = $3;
15071
15307
  var close = $4;
@@ -15094,7 +15330,7 @@ var Condition$$ = [Condition$0, Condition$1, Condition$2, Condition$3, Condition
15094
15330
  function Condition(ctx, state2) {
15095
15331
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Condition", Condition$$);
15096
15332
  }
15097
- var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, Expression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
15333
+ var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, PostfixedExpression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
15098
15334
  var open = $1;
15099
15335
  var expression = $2;
15100
15336
  var close = $3;
@@ -15441,19 +15677,19 @@ var ThrowStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Throw, MaybeParen
15441
15677
  function ThrowStatement(ctx, state2) {
15442
15678
  return (0, import_lib2.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
15443
15679
  }
15444
- var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L127, 'Break "break"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
15680
+ var Break$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L128, 'Break "break"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
15445
15681
  return { $loc, token: $1 };
15446
15682
  });
15447
15683
  function Break(ctx, state2) {
15448
15684
  return (0, import_lib2.$EVENT)(ctx, state2, "Break", Break$0);
15449
15685
  }
15450
- var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L128, 'Continue "continue"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
15686
+ var Continue$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L129, 'Continue "continue"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
15451
15687
  return { $loc, token: $1 };
15452
15688
  });
15453
15689
  function Continue(ctx, state2) {
15454
15690
  return (0, import_lib2.$EVENT)(ctx, state2, "Continue", Continue$0);
15455
15691
  }
15456
- var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L129, 'Debugger "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
15692
+ var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L130, 'Debugger "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
15457
15693
  return { $loc, token: $1 };
15458
15694
  });
15459
15695
  function Debugger(ctx, state2) {
@@ -15521,7 +15757,7 @@ var MaybeParenNestedExpression$$ = [MaybeParenNestedExpression$0, MaybeParenNest
15521
15757
  function MaybeParenNestedExpression(ctx, state2) {
15522
15758
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
15523
15759
  }
15524
- var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($L130, 'ImportDeclaration "require"'), NonIdContinue, Arguments), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15760
+ var ImportDeclaration$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, Identifier, (0, import_lib2.$E)(_), Equals, __, (0, import_lib2.$EXPECT)($L131, 'ImportDeclaration "require"'), NonIdContinue, Arguments), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15525
15761
  const imp = [
15526
15762
  { ...$1, ts: true },
15527
15763
  { ...$1, token: "const", js: true }
@@ -15711,7 +15947,7 @@ var ImpliedFrom$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImpliedF
15711
15947
  function ImpliedFrom(ctx, state2) {
15712
15948
  return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
15713
15949
  }
15714
- var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L131, 'ImportAssertion "with"'), (0, import_lib2.$EXPECT)($L132, 'ImportAssertion "assert"')), NonIdContinue, (0, import_lib2.$E)(_), ObjectLiteral), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
15950
+ var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L132, 'ImportAssertion "with"'), (0, import_lib2.$EXPECT)($L133, 'ImportAssertion "assert"')), NonIdContinue, (0, import_lib2.$E)(_), ObjectLiteral), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
15715
15951
  var keyword = $2;
15716
15952
  var object = $5;
15717
15953
  return {
@@ -16037,19 +16273,19 @@ var LexicalDeclaration$$ = [LexicalDeclaration$0, LexicalDeclaration$1];
16037
16273
  function LexicalDeclaration(ctx, state2) {
16038
16274
  return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
16039
16275
  }
16040
- var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L133, 'ConstAssignment ":="'), (0, import_lib2.$EXPECT)($L134, 'ConstAssignment "\u2254"')), function($skip, $loc, $0, $1) {
16276
+ var ConstAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L134, 'ConstAssignment ":="'), (0, import_lib2.$EXPECT)($L135, 'ConstAssignment "\u2254"')), function($skip, $loc, $0, $1) {
16041
16277
  return { $loc, token: "=", decl: "const " };
16042
16278
  });
16043
16279
  function ConstAssignment(ctx, state2) {
16044
16280
  return (0, import_lib2.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
16045
16281
  }
16046
- var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L135, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
16282
+ var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
16047
16283
  return { $loc, token: "=", decl: "let " };
16048
16284
  });
16049
16285
  function LetAssignment(ctx, state2) {
16050
16286
  return (0, import_lib2.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
16051
16287
  }
16052
- var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
16288
+ var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L137, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
16053
16289
  return { $loc, token: "=" };
16054
16290
  });
16055
16291
  function TypeAssignment(ctx, state2) {
@@ -16472,7 +16708,7 @@ var MultiLineComment$$ = [MultiLineComment$0, MultiLineComment$1];
16472
16708
  function MultiLineComment(ctx, state2) {
16473
16709
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
16474
16710
  }
16475
- var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L137, 'JSMultiLineComment "/*"'), (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L138, 'JSMultiLineComment "*/"')), (0, import_lib2.$EXPECT)($R68, "JSMultiLineComment /./"))), (0, import_lib2.$EXPECT)($L138, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
16711
+ var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L138, 'JSMultiLineComment "/*"'), (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L139, 'JSMultiLineComment "*/"')), (0, import_lib2.$EXPECT)($R68, "JSMultiLineComment /./"))), (0, import_lib2.$EXPECT)($L139, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
16476
16712
  return { type: "Comment", $loc, token: $1 };
16477
16713
  });
16478
16714
  function JSMultiLineComment(ctx, state2) {
@@ -16518,7 +16754,7 @@ function _(ctx, state2) {
16518
16754
  var NonNewlineWhitespace$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R23, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
16519
16755
  return { $loc, token: $0 };
16520
16756
  });
16521
- var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L139, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
16757
+ var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
16522
16758
  return " ";
16523
16759
  });
16524
16760
  var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
@@ -16569,7 +16805,7 @@ var StatementDelimiter$$ = [StatementDelimiter$0, StatementDelimiter$1, Statemen
16569
16805
  function StatementDelimiter(ctx, state2) {
16570
16806
  return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
16571
16807
  }
16572
- var ClosingDelimiter$0 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L37, 'ClosingDelimiter "}"'), (0, import_lib2.$EXPECT)($L140, 'ClosingDelimiter ")"'), (0, import_lib2.$EXPECT)($L46, 'ClosingDelimiter "]"'))));
16808
+ var ClosingDelimiter$0 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L37, 'ClosingDelimiter "}"'), (0, import_lib2.$EXPECT)($L141, 'ClosingDelimiter ")"'), (0, import_lib2.$EXPECT)($L46, 'ClosingDelimiter "]"'))));
16573
16809
  function ClosingDelimiter(ctx, state2) {
16574
16810
  return (0, import_lib2.$EVENT)(ctx, state2, "ClosingDelimiter", ClosingDelimiter$0);
16575
16811
  }
@@ -16592,7 +16828,7 @@ var Loc$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Loc ""'), functi
16592
16828
  function Loc(ctx, state2) {
16593
16829
  return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
16594
16830
  }
16595
- var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L141, 'Abstract "abstract"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L18, 'Abstract " "')))), function($skip, $loc, $0, $1) {
16831
+ var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L142, 'Abstract "abstract"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L18, 'Abstract " "')))), function($skip, $loc, $0, $1) {
16596
16832
  return { $loc, token: $1, ts: true };
16597
16833
  });
16598
16834
  function Abstract(ctx, state2) {
@@ -16604,43 +16840,43 @@ var Ampersand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L117, 'Ampersan
16604
16840
  function Ampersand(ctx, state2) {
16605
16841
  return (0, import_lib2.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
16606
16842
  }
16607
- var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L142, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16843
+ var As$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L143, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16608
16844
  return { $loc, token: $1 };
16609
16845
  });
16610
16846
  function As(ctx, state2) {
16611
16847
  return (0, import_lib2.$EVENT)(ctx, state2, "As", As$0);
16612
16848
  }
16613
- var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L143, 'At "@"'), function($skip, $loc, $0, $1) {
16849
+ var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'At "@"'), function($skip, $loc, $0, $1) {
16614
16850
  return { $loc, token: $1 };
16615
16851
  });
16616
16852
  function At(ctx, state2) {
16617
16853
  return (0, import_lib2.$EVENT)(ctx, state2, "At", At$0);
16618
16854
  }
16619
- var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
16855
+ var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L145, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
16620
16856
  return { $loc, token: "@" };
16621
16857
  });
16622
16858
  function AtAt(ctx, state2) {
16623
16859
  return (0, import_lib2.$EVENT)(ctx, state2, "AtAt", AtAt$0);
16624
16860
  }
16625
- var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L145, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16861
+ var Async$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L146, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16626
16862
  return { $loc, token: $1, type: "Async" };
16627
16863
  });
16628
16864
  function Async(ctx, state2) {
16629
16865
  return (0, import_lib2.$EVENT)(ctx, state2, "Async", Async$0);
16630
16866
  }
16631
- var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L146, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16867
+ var Await$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L147, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16632
16868
  return { $loc, token: $1, type: "Await" };
16633
16869
  });
16634
16870
  function Await(ctx, state2) {
16635
16871
  return (0, import_lib2.$EVENT)(ctx, state2, "Await", Await$0);
16636
16872
  }
16637
- var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L147, 'Backtick "`"'), function($skip, $loc, $0, $1) {
16873
+ var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L148, 'Backtick "`"'), function($skip, $loc, $0, $1) {
16638
16874
  return { $loc, token: $1 };
16639
16875
  });
16640
16876
  function Backtick(ctx, state2) {
16641
16877
  return (0, import_lib2.$EVENT)(ctx, state2, "Backtick", Backtick$0);
16642
16878
  }
16643
- var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L148, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16879
+ var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L149, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16644
16880
  return { $loc, token: $1 };
16645
16881
  });
16646
16882
  function By(ctx, state2) {
@@ -16652,19 +16888,19 @@ var Caret$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L22, 'Caret "^"'),
16652
16888
  function Caret(ctx, state2) {
16653
16889
  return (0, import_lib2.$EVENT)(ctx, state2, "Caret", Caret$0);
16654
16890
  }
16655
- var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L149, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16891
+ var Case$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L150, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16656
16892
  return { $loc, token: $1 };
16657
16893
  });
16658
16894
  function Case(ctx, state2) {
16659
16895
  return (0, import_lib2.$EVENT)(ctx, state2, "Case", Case$0);
16660
16896
  }
16661
- var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L150, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16897
+ var Catch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L151, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16662
16898
  return { $loc, token: $1 };
16663
16899
  });
16664
16900
  function Catch(ctx, state2) {
16665
16901
  return (0, import_lib2.$EVENT)(ctx, state2, "Catch", Catch$0);
16666
16902
  }
16667
- var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L151, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16903
+ var Class$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L152, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16668
16904
  return { $loc, token: $1 };
16669
16905
  });
16670
16906
  function Class(ctx, state2) {
@@ -16688,13 +16924,13 @@ var CloseBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L46, 'CloseB
16688
16924
  function CloseBracket(ctx, state2) {
16689
16925
  return (0, import_lib2.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
16690
16926
  }
16691
- var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L140, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
16927
+ var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L141, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
16692
16928
  return { $loc, token: $1 };
16693
16929
  });
16694
16930
  function CloseParen(ctx, state2) {
16695
16931
  return (0, import_lib2.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
16696
16932
  }
16697
- var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L152, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
16933
+ var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L153, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
16698
16934
  return { $loc, token: "${" };
16699
16935
  });
16700
16936
  function CoffeeSubstitutionStart(ctx, state2) {
@@ -16712,37 +16948,37 @@ var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L17, 'Comma ","'),
16712
16948
  function Comma(ctx, state2) {
16713
16949
  return (0, import_lib2.$EVENT)(ctx, state2, "Comma", Comma$0);
16714
16950
  }
16715
- var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L153, 'Comptime "comptime"'), NonIdContinue, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L16, 'Comptime ":"'))), function($skip, $loc, $0, $1, $2, $3) {
16951
+ var Comptime$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L154, 'Comptime "comptime"'), NonIdContinue, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L16, 'Comptime ":"'))), function($skip, $loc, $0, $1, $2, $3) {
16716
16952
  return { $loc, token: $1 };
16717
16953
  });
16718
16954
  function Comptime(ctx, state2) {
16719
16955
  return (0, import_lib2.$EVENT)(ctx, state2, "Comptime", Comptime$0);
16720
16956
  }
16721
- var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L143, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
16957
+ var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
16722
16958
  return { $loc, token: "constructor" };
16723
16959
  });
16724
16960
  function ConstructorShorthand(ctx, state2) {
16725
16961
  return (0, import_lib2.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
16726
16962
  }
16727
- var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L154, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16963
+ var Declare$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L155, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16728
16964
  return { $loc, token: $1 };
16729
16965
  });
16730
16966
  function Declare(ctx, state2) {
16731
16967
  return (0, import_lib2.$EVENT)(ctx, state2, "Declare", Declare$0);
16732
16968
  }
16733
- var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L155, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16969
+ var Default$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L156, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16734
16970
  return { $loc, token: $1 };
16735
16971
  });
16736
16972
  function Default(ctx, state2) {
16737
16973
  return (0, import_lib2.$EVENT)(ctx, state2, "Default", Default$0);
16738
16974
  }
16739
- var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L156, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16975
+ var Delete$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L157, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16740
16976
  return { $loc, token: $1 };
16741
16977
  });
16742
16978
  function Delete(ctx, state2) {
16743
16979
  return (0, import_lib2.$EVENT)(ctx, state2, "Delete", Delete$0);
16744
16980
  }
16745
- var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L157, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16981
+ var Do$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L158, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16746
16982
  return { $loc, token: $1 };
16747
16983
  });
16748
16984
  function Do(ctx, state2) {
@@ -16762,20 +16998,20 @@ var Dot$$ = [Dot$0, Dot$1];
16762
16998
  function Dot(ctx, state2) {
16763
16999
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Dot", Dot$$);
16764
17000
  }
16765
- var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L158, 'DotDot ".."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L7, 'DotDot "."'))), function($skip, $loc, $0, $1, $2) {
17001
+ var DotDot$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L159, 'DotDot ".."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L7, 'DotDot "."'))), function($skip, $loc, $0, $1, $2) {
16766
17002
  return { $loc, token: $1 };
16767
17003
  });
16768
- var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L159, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
17004
+ var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
16769
17005
  return { $loc, token: ".." };
16770
17006
  });
16771
17007
  var DotDot$$ = [DotDot$0, DotDot$1];
16772
17008
  function DotDot(ctx, state2) {
16773
17009
  return (0, import_lib2.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
16774
17010
  }
16775
- var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
17011
+ var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
16776
17012
  return { $loc, token: $1 };
16777
17013
  });
16778
- var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
17014
+ var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
16779
17015
  return { $loc, token: "..." };
16780
17016
  });
16781
17017
  var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
@@ -16788,31 +17024,31 @@ var InsertDotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Inse
16788
17024
  function InsertDotDotDot(ctx, state2) {
16789
17025
  return (0, import_lib2.$EVENT)(ctx, state2, "InsertDotDotDot", InsertDotDotDot$0);
16790
17026
  }
16791
- var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
17027
+ var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
16792
17028
  return { $loc, token: $1 };
16793
17029
  });
16794
17030
  function DoubleColon(ctx, state2) {
16795
17031
  return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
16796
17032
  }
16797
- var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
17033
+ var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
16798
17034
  return { $loc, token: ":" };
16799
17035
  });
16800
17036
  function DoubleColonAsColon(ctx, state2) {
16801
17037
  return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
16802
17038
  }
16803
- var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
17039
+ var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L164, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
16804
17040
  return { $loc, token: $1 };
16805
17041
  });
16806
17042
  function DoubleQuote(ctx, state2) {
16807
17043
  return (0, import_lib2.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
16808
17044
  }
16809
- var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L164, 'Each "each"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17045
+ var Each$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L165, 'Each "each"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16810
17046
  return { $loc, token: $1 };
16811
17047
  });
16812
17048
  function Each(ctx, state2) {
16813
17049
  return (0, import_lib2.$EVENT)(ctx, state2, "Each", Each$0);
16814
17050
  }
16815
- var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L165, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17051
+ var Else$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L166, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16816
17052
  return { $loc, token: $1 };
16817
17053
  });
16818
17054
  function Else(ctx, state2) {
@@ -16824,61 +17060,61 @@ var Equals$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L3, 'Equals "="'),
16824
17060
  function Equals(ctx, state2) {
16825
17061
  return (0, import_lib2.$EVENT)(ctx, state2, "Equals", Equals$0);
16826
17062
  }
16827
- var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L166, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
17063
+ var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L167, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
16828
17064
  return { $loc, token: $1 };
16829
17065
  });
16830
17066
  function ExclamationPoint(ctx, state2) {
16831
17067
  return (0, import_lib2.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
16832
17068
  }
16833
- var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L167, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17069
+ var Export$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L168, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16834
17070
  return { $loc, token: $1 };
16835
17071
  });
16836
17072
  function Export(ctx, state2) {
16837
17073
  return (0, import_lib2.$EVENT)(ctx, state2, "Export", Export$0);
16838
17074
  }
16839
- var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L168, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17075
+ var Extends$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L169, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16840
17076
  return { $loc, token: $1 };
16841
17077
  });
16842
17078
  function Extends(ctx, state2) {
16843
17079
  return (0, import_lib2.$EVENT)(ctx, state2, "Extends", Extends$0);
16844
17080
  }
16845
- var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L169, 'Finally "finally"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17081
+ var Finally$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L170, 'Finally "finally"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16846
17082
  return { $loc, token: $1 };
16847
17083
  });
16848
17084
  function Finally(ctx, state2) {
16849
17085
  return (0, import_lib2.$EVENT)(ctx, state2, "Finally", Finally$0);
16850
17086
  }
16851
- var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L170, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17087
+ var For$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L171, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16852
17088
  return { $loc, token: $1 };
16853
17089
  });
16854
17090
  function For(ctx, state2) {
16855
17091
  return (0, import_lib2.$EVENT)(ctx, state2, "For", For$0);
16856
17092
  }
16857
- var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L171, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17093
+ var From$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L172, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16858
17094
  return { $loc, token: $1 };
16859
17095
  });
16860
17096
  function From(ctx, state2) {
16861
17097
  return (0, import_lib2.$EVENT)(ctx, state2, "From", From$0);
16862
17098
  }
16863
- var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L172, 'Function "function"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17099
+ var Function$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L173, 'Function "function"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16864
17100
  return { $loc, token: $1 };
16865
17101
  });
16866
17102
  function Function2(ctx, state2) {
16867
17103
  return (0, import_lib2.$EVENT)(ctx, state2, "Function", Function$0);
16868
17104
  }
16869
- var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L173, 'GetOrSet "get"'), (0, import_lib2.$EXPECT)($L174, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17105
+ var GetOrSet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L174, 'GetOrSet "get"'), (0, import_lib2.$EXPECT)($L175, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16870
17106
  return { $loc, token: $1, type: "GetOrSet" };
16871
17107
  });
16872
17108
  function GetOrSet(ctx, state2) {
16873
17109
  return (0, import_lib2.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
16874
17110
  }
16875
- var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L175, 'Hash "#"'), function($skip, $loc, $0, $1) {
17111
+ var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L176, 'Hash "#"'), function($skip, $loc, $0, $1) {
16876
17112
  return { $loc, token: $1 };
16877
17113
  });
16878
17114
  function Hash(ctx, state2) {
16879
17115
  return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
16880
17116
  }
16881
- var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L176, 'If "if"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L18, 'If " "')))), function($skip, $loc, $0, $1) {
17117
+ var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L177, 'If "if"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L18, 'If " "')))), function($skip, $loc, $0, $1) {
16882
17118
  return { $loc, token: $1 };
16883
17119
  });
16884
17120
  function If(ctx, state2) {
@@ -16890,67 +17126,67 @@ var Import$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)
16890
17126
  function Import(ctx, state2) {
16891
17127
  return (0, import_lib2.$EVENT)(ctx, state2, "Import", Import$0);
16892
17128
  }
16893
- var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L177, 'In "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17129
+ var In$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L178, 'In "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16894
17130
  return { $loc, token: $1 };
16895
17131
  });
16896
17132
  function In(ctx, state2) {
16897
17133
  return (0, import_lib2.$EVENT)(ctx, state2, "In", In$0);
16898
17134
  }
16899
- var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L178, 'Infer "infer"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17135
+ var Infer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L179, 'Infer "infer"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16900
17136
  return { $loc, token: $1 };
16901
17137
  });
16902
17138
  function Infer(ctx, state2) {
16903
17139
  return (0, import_lib2.$EVENT)(ctx, state2, "Infer", Infer$0);
16904
17140
  }
16905
- var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L179, 'LetOrConst "let"'), (0, import_lib2.$EXPECT)($L180, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17141
+ var LetOrConst$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L180, 'LetOrConst "let"'), (0, import_lib2.$EXPECT)($L181, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16906
17142
  return { $loc, token: $1 };
16907
17143
  });
16908
17144
  function LetOrConst(ctx, state2) {
16909
17145
  return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
16910
17146
  }
16911
- var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L180, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17147
+ var Const$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L181, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16912
17148
  return { $loc, token: $1 };
16913
17149
  });
16914
17150
  function Const(ctx, state2) {
16915
17151
  return (0, import_lib2.$EVENT)(ctx, state2, "Const", Const$0);
16916
17152
  }
16917
- var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L181, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17153
+ var Is$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L182, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16918
17154
  return { $loc, token: $1 };
16919
17155
  });
16920
17156
  function Is(ctx, state2) {
16921
17157
  return (0, import_lib2.$EVENT)(ctx, state2, "Is", Is$0);
16922
17158
  }
16923
- var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L179, 'LetOrConstOrVar "let"'), (0, import_lib2.$EXPECT)($L180, 'LetOrConstOrVar "const"'), (0, import_lib2.$EXPECT)($L182, 'LetOrConstOrVar "var"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17159
+ var LetOrConstOrVar$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L180, 'LetOrConstOrVar "let"'), (0, import_lib2.$EXPECT)($L181, 'LetOrConstOrVar "const"'), (0, import_lib2.$EXPECT)($L183, 'LetOrConstOrVar "var"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16924
17160
  return { $loc, token: $1 };
16925
17161
  });
16926
17162
  function LetOrConstOrVar(ctx, state2) {
16927
17163
  return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
16928
17164
  }
16929
- var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L183, 'Like "like"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17165
+ var Like$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L184, 'Like "like"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16930
17166
  return { $loc, token: $1 };
16931
17167
  });
16932
17168
  function Like(ctx, state2) {
16933
17169
  return (0, import_lib2.$EVENT)(ctx, state2, "Like", Like$0);
16934
17170
  }
16935
- var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L184, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17171
+ var Loop$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L185, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16936
17172
  return { $loc, token: "while" };
16937
17173
  });
16938
17174
  function Loop(ctx, state2) {
16939
17175
  return (0, import_lib2.$EVENT)(ctx, state2, "Loop", Loop$0);
16940
17176
  }
16941
- var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L185, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17177
+ var New$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L186, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16942
17178
  return { $loc, token: $1 };
16943
17179
  });
16944
17180
  function New(ctx, state2) {
16945
17181
  return (0, import_lib2.$EVENT)(ctx, state2, "New", New$0);
16946
17182
  }
16947
- var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L186, 'Not "not"'), NonIdContinue, (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($L16, 'Not ":"')))), function($skip, $loc, $0, $1, $2, $3) {
17183
+ var Not$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L187, 'Not "not"'), NonIdContinue, (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($L16, 'Not ":"')))), function($skip, $loc, $0, $1, $2, $3) {
16948
17184
  return { $loc, token: "!" };
16949
17185
  });
16950
17186
  function Not(ctx, state2) {
16951
17187
  return (0, import_lib2.$EVENT)(ctx, state2, "Not", Not$0);
16952
17188
  }
16953
- var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L187, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17189
+ var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L188, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16954
17190
  return { $loc, token: $1 };
16955
17191
  });
16956
17192
  function Of(ctx, state2) {
@@ -16968,7 +17204,7 @@ var OpenBrace$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L1, 'OpenBrace
16968
17204
  function OpenBrace(ctx, state2) {
16969
17205
  return (0, import_lib2.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
16970
17206
  }
16971
- var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L188, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
17207
+ var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L189, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
16972
17208
  return { $loc, token: $1 };
16973
17209
  });
16974
17210
  function OpenBracket(ctx, state2) {
@@ -16980,49 +17216,49 @@ var OpenParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L4, 'OpenParen
16980
17216
  function OpenParen(ctx, state2) {
16981
17217
  return (0, import_lib2.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
16982
17218
  }
16983
- var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L189, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17219
+ var Operator$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L190, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16984
17220
  return { $loc, token: $1 };
16985
17221
  });
16986
17222
  function Operator(ctx, state2) {
16987
17223
  return (0, import_lib2.$EVENT)(ctx, state2, "Operator", Operator$0);
16988
17224
  }
16989
- var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L190, 'Override "override"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17225
+ var Override$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L191, 'Override "override"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16990
17226
  return { $loc, token: $1, ts: true };
16991
17227
  });
16992
17228
  function Override(ctx, state2) {
16993
17229
  return (0, import_lib2.$EVENT)(ctx, state2, "Override", Override$0);
16994
17230
  }
16995
- var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L191, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17231
+ var Own$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L192, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16996
17232
  return { $loc, token: $1 };
16997
17233
  });
16998
17234
  function Own(ctx, state2) {
16999
17235
  return (0, import_lib2.$EVENT)(ctx, state2, "Own", Own$0);
17000
17236
  }
17001
- var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L192, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17237
+ var Public$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L193, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17002
17238
  return { $loc, token: $1 };
17003
17239
  });
17004
17240
  function Public(ctx, state2) {
17005
17241
  return (0, import_lib2.$EVENT)(ctx, state2, "Public", Public$0);
17006
17242
  }
17007
- var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L193, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17243
+ var Private$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L194, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17008
17244
  return { $loc, token: $1 };
17009
17245
  });
17010
17246
  function Private(ctx, state2) {
17011
17247
  return (0, import_lib2.$EVENT)(ctx, state2, "Private", Private$0);
17012
17248
  }
17013
- var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L194, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17249
+ var Protected$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L195, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17014
17250
  return { $loc, token: $1 };
17015
17251
  });
17016
17252
  function Protected(ctx, state2) {
17017
17253
  return (0, import_lib2.$EVENT)(ctx, state2, "Protected", Protected$0);
17018
17254
  }
17019
- var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L195, 'Pipe "||>"'), (0, import_lib2.$EXPECT)($L196, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
17255
+ var Pipe$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L196, 'Pipe "||>"'), (0, import_lib2.$EXPECT)($L197, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
17020
17256
  return { $loc, token: "||>" };
17021
17257
  });
17022
- var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L197, 'Pipe "|>="'), (0, import_lib2.$EXPECT)($L198, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
17258
+ var Pipe$1 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L198, 'Pipe "|>="'), (0, import_lib2.$EXPECT)($L199, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
17023
17259
  return { $loc, token: "|>=" };
17024
17260
  });
17025
- var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L199, 'Pipe "|>"'), (0, import_lib2.$EXPECT)($L200, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
17261
+ var Pipe$2 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L200, 'Pipe "|>"'), (0, import_lib2.$EXPECT)($L201, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
17026
17262
  return { $loc, token: "|>" };
17027
17263
  });
17028
17264
  var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
@@ -17035,19 +17271,19 @@ var QuestionMark$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L6, 'Questio
17035
17271
  function QuestionMark(ctx, state2) {
17036
17272
  return (0, import_lib2.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
17037
17273
  }
17038
- var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L201, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17274
+ var Readonly$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17039
17275
  return { $loc, token: $1, ts: true };
17040
17276
  });
17041
17277
  function Readonly(ctx, state2) {
17042
17278
  return (0, import_lib2.$EVENT)(ctx, state2, "Readonly", Readonly$0);
17043
17279
  }
17044
- var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17280
+ var Return$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L203, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17045
17281
  return { $loc, token: $1 };
17046
17282
  });
17047
17283
  function Return(ctx, state2) {
17048
17284
  return (0, import_lib2.$EVENT)(ctx, state2, "Return", Return$0);
17049
17285
  }
17050
- var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L203, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17286
+ var Satisfies$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L204, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17051
17287
  return { $loc, token: $1 };
17052
17288
  });
17053
17289
  function Satisfies(ctx, state2) {
@@ -17059,7 +17295,7 @@ var Semicolon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L119, 'Semicolo
17059
17295
  function Semicolon(ctx, state2) {
17060
17296
  return (0, import_lib2.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
17061
17297
  }
17062
- var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L204, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
17298
+ var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L205, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
17063
17299
  return { $loc, token: $1 };
17064
17300
  });
17065
17301
  function SingleQuote(ctx, state2) {
@@ -17071,149 +17307,149 @@ var Star$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L75, 'Star "*"'), fu
17071
17307
  function Star(ctx, state2) {
17072
17308
  return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
17073
17309
  }
17074
- var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L205, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17310
+ var Static$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L206, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17075
17311
  return { $loc, token: $1 };
17076
17312
  });
17077
- var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L143, 'Static "@"'), (0, import_lib2.$N)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L4, 'Static "("'), (0, import_lib2.$EXPECT)($L143, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
17313
+ var Static$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L144, 'Static "@"'), (0, import_lib2.$N)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L4, 'Static "("'), (0, import_lib2.$EXPECT)($L144, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
17078
17314
  return { $loc, token: "static " };
17079
17315
  });
17080
17316
  var Static$$ = [Static$0, Static$1];
17081
17317
  function Static(ctx, state2) {
17082
17318
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Static", Static$$);
17083
17319
  }
17084
- var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L206, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
17320
+ var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L207, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
17085
17321
  return { $loc, token: $1 };
17086
17322
  });
17087
17323
  function SubstitutionStart(ctx, state2) {
17088
17324
  return (0, import_lib2.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
17089
17325
  }
17090
- var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L207, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17326
+ var Super$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L208, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17091
17327
  return { $loc, token: $1 };
17092
17328
  });
17093
17329
  function Super(ctx, state2) {
17094
17330
  return (0, import_lib2.$EVENT)(ctx, state2, "Super", Super$0);
17095
17331
  }
17096
- var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L208, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17332
+ var Switch$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L209, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17097
17333
  return { $loc, token: $1 };
17098
17334
  });
17099
17335
  function Switch(ctx, state2) {
17100
17336
  return (0, import_lib2.$EVENT)(ctx, state2, "Switch", Switch$0);
17101
17337
  }
17102
- var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L209, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17338
+ var Target$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L210, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17103
17339
  return { $loc, token: $1 };
17104
17340
  });
17105
17341
  function Target(ctx, state2) {
17106
17342
  return (0, import_lib2.$EVENT)(ctx, state2, "Target", Target$0);
17107
17343
  }
17108
- var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L210, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
17344
+ var Then$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L211, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
17109
17345
  return { $loc, token: "" };
17110
17346
  });
17111
17347
  function Then(ctx, state2) {
17112
17348
  return (0, import_lib2.$EVENT)(ctx, state2, "Then", Then$0);
17113
17349
  }
17114
- var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L211, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17350
+ var This$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L212, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17115
17351
  return { $loc, token: $1 };
17116
17352
  });
17117
17353
  function This(ctx, state2) {
17118
17354
  return (0, import_lib2.$EVENT)(ctx, state2, "This", This$0);
17119
17355
  }
17120
- var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L212, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17356
+ var Throw$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L213, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17121
17357
  return { $loc, token: $1 };
17122
17358
  });
17123
17359
  function Throw(ctx, state2) {
17124
17360
  return (0, import_lib2.$EVENT)(ctx, state2, "Throw", Throw$0);
17125
17361
  }
17126
- var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L213, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
17362
+ var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
17127
17363
  return { $loc, token: "`" };
17128
17364
  });
17129
17365
  function TripleDoubleQuote(ctx, state2) {
17130
17366
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
17131
17367
  }
17132
- var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
17368
+ var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
17133
17369
  return { $loc, token: "`" };
17134
17370
  });
17135
17371
  function TripleSingleQuote(ctx, state2) {
17136
17372
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
17137
17373
  }
17138
- var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
17374
+ var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
17139
17375
  return { $loc, token: "/" };
17140
17376
  });
17141
17377
  function TripleSlash(ctx, state2) {
17142
17378
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
17143
17379
  }
17144
- var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
17380
+ var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L217, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
17145
17381
  return { $loc, token: "`" };
17146
17382
  });
17147
17383
  function TripleTick(ctx, state2) {
17148
17384
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
17149
17385
  }
17150
- var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L217, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17386
+ var Try$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L218, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17151
17387
  return { $loc, token: $1 };
17152
17388
  });
17153
17389
  function Try(ctx, state2) {
17154
17390
  return (0, import_lib2.$EVENT)(ctx, state2, "Try", Try$0);
17155
17391
  }
17156
- var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L218, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17392
+ var Typeof$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L219, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17157
17393
  return { $loc, token: $1 };
17158
17394
  });
17159
17395
  function Typeof(ctx, state2) {
17160
17396
  return (0, import_lib2.$EVENT)(ctx, state2, "Typeof", Typeof$0);
17161
17397
  }
17162
- var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L219, 'Undefined "undefined"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17398
+ var Undefined$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L220, 'Undefined "undefined"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17163
17399
  return { $loc, token: $1 };
17164
17400
  });
17165
17401
  function Undefined(ctx, state2) {
17166
17402
  return (0, import_lib2.$EVENT)(ctx, state2, "Undefined", Undefined$0);
17167
17403
  }
17168
- var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L220, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17404
+ var Unless$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L221, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17169
17405
  return { $loc, token: $1, negated: true };
17170
17406
  });
17171
17407
  function Unless(ctx, state2) {
17172
17408
  return (0, import_lib2.$EVENT)(ctx, state2, "Unless", Unless$0);
17173
17409
  }
17174
- var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L221, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17410
+ var Until$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L222, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17175
17411
  return { $loc, token: $1, negated: true };
17176
17412
  });
17177
17413
  function Until(ctx, state2) {
17178
17414
  return (0, import_lib2.$EVENT)(ctx, state2, "Until", Until$0);
17179
17415
  }
17180
- var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L222, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17416
+ var Using$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L223, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17181
17417
  return { $loc, token: $1 };
17182
17418
  });
17183
17419
  function Using(ctx, state2) {
17184
17420
  return (0, import_lib2.$EVENT)(ctx, state2, "Using", Using$0);
17185
17421
  }
17186
- var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L182, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17422
+ var Var$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L183, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17187
17423
  return { $loc, token: $1 };
17188
17424
  });
17189
17425
  function Var(ctx, state2) {
17190
17426
  return (0, import_lib2.$EVENT)(ctx, state2, "Var", Var$0);
17191
17427
  }
17192
- var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L223, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17428
+ var Void$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L224, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17193
17429
  return { $loc, token: $1 };
17194
17430
  });
17195
17431
  function Void(ctx, state2) {
17196
17432
  return (0, import_lib2.$EVENT)(ctx, state2, "Void", Void$0);
17197
17433
  }
17198
- var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L224, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17434
+ var When$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L225, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17199
17435
  return { $loc, token: "case" };
17200
17436
  });
17201
17437
  function When(ctx, state2) {
17202
17438
  return (0, import_lib2.$EVENT)(ctx, state2, "When", When$0);
17203
17439
  }
17204
- var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L225, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17440
+ var While$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L226, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17205
17441
  return { $loc, token: $1 };
17206
17442
  });
17207
17443
  function While(ctx, state2) {
17208
17444
  return (0, import_lib2.$EVENT)(ctx, state2, "While", While$0);
17209
17445
  }
17210
- var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L131, 'With "with"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17446
+ var With$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L132, 'With "with"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17211
17447
  return { $loc, token: $1 };
17212
17448
  });
17213
17449
  function With(ctx, state2) {
17214
17450
  return (0, import_lib2.$EVENT)(ctx, state2, "With", With$0);
17215
17451
  }
17216
- var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L226, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17452
+ var Yield$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L227, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
17217
17453
  return { $loc, token: $1, type: "Yield" };
17218
17454
  });
17219
17455
  function Yield(ctx, state2) {
@@ -17292,7 +17528,7 @@ var JSXElement$$ = [JSXElement$0, JSXElement$1, JSXElement$2];
17292
17528
  function JSXElement(ctx, state2) {
17293
17529
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
17294
17530
  }
17295
- var JSXSelfClosingElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L19, 'JSXSelfClosingElement "<"'), JSXElementName, (0, import_lib2.$E)(TypeArguments), (0, import_lib2.$E)(JSXAttributes), (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L227, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
17531
+ var JSXSelfClosingElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L19, 'JSXSelfClosingElement "<"'), JSXElementName, (0, import_lib2.$E)(TypeArguments), (0, import_lib2.$E)(JSXAttributes), (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L228, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
17296
17532
  return { type: "JSXElement", children: $0, tag: $2 };
17297
17533
  });
17298
17534
  function JSXSelfClosingElement(ctx, state2) {
@@ -17326,7 +17562,7 @@ var JSXOptionalClosingElement$$ = [JSXOptionalClosingElement$0, JSXOptionalClosi
17326
17562
  function JSXOptionalClosingElement(ctx, state2) {
17327
17563
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
17328
17564
  }
17329
- var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L228, 'JSXClosingElement "</"'), (0, import_lib2.$E)(Whitespace), JSXElementName, (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L45, 'JSXClosingElement ">"'));
17565
+ var JSXClosingElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L229, 'JSXClosingElement "</"'), (0, import_lib2.$E)(Whitespace), JSXElementName, (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L45, 'JSXClosingElement ">"'));
17330
17566
  function JSXClosingElement(ctx, state2) {
17331
17567
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
17332
17568
  }
@@ -17347,7 +17583,7 @@ var JSXFragment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)
17347
17583
  ];
17348
17584
  return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
17349
17585
  });
17350
- var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($L229, 'JSXFragment "<>"'), (0, import_lib2.$E)(JSXChildren), (0, import_lib2.$E)(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
17586
+ var JSXFragment$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeJSXEnabled, (0, import_lib2.$EXPECT)($L230, 'JSXFragment "<>"'), (0, import_lib2.$E)(JSXChildren), (0, import_lib2.$E)(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
17351
17587
  var children = $3;
17352
17588
  $0 = $0.slice(1);
17353
17589
  return {
@@ -17360,7 +17596,7 @@ var JSXFragment$$ = [JSXFragment$0, JSXFragment$1];
17360
17596
  function JSXFragment(ctx, state2) {
17361
17597
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
17362
17598
  }
17363
- var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L229, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
17599
+ var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L230, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
17364
17600
  state.JSXTagStack.push("");
17365
17601
  return $1;
17366
17602
  });
@@ -17377,11 +17613,11 @@ var JSXOptionalClosingFragment$$ = [JSXOptionalClosingFragment$0, JSXOptionalClo
17377
17613
  function JSXOptionalClosingFragment(ctx, state2) {
17378
17614
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
17379
17615
  }
17380
- var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L230, 'JSXClosingFragment "</>"');
17616
+ var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L231, 'JSXClosingFragment "</>"');
17381
17617
  function JSXClosingFragment(ctx, state2) {
17382
17618
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
17383
17619
  }
17384
- var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L175, 'JSXElementName "#"'), Dot), JSXShorthandString)), function($skip, $loc, $0, $1) {
17620
+ var JSXElementName$0 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L176, 'JSXElementName "#"'), Dot), JSXShorthandString)), function($skip, $loc, $0, $1) {
17385
17621
  return config.defaultElement;
17386
17622
  });
17387
17623
  var JSXElementName$1 = (0, import_lib2.$TEXT)((0, import_lib2.$S)(JSXIdentifierName, (0, import_lib2.$C)((0, import_lib2.$S)(Colon, JSXIdentifierName), (0, import_lib2.$Q)((0, import_lib2.$S)(Dot, JSXIdentifierName)))));
@@ -17562,7 +17798,7 @@ var JSXAttribute$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(Identifier, (0, im
17562
17798
  }
17563
17799
  return $skip;
17564
17800
  });
17565
- var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L175, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
17801
+ var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L176, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
17566
17802
  return [" ", "id=", $2];
17567
17803
  });
17568
17804
  var JSXAttribute$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
@@ -17783,7 +18019,7 @@ var InlineJSXPrimaryExpression$5 = ArrayLiteral;
17783
18019
  var InlineJSXPrimaryExpression$6 = BracedObjectLiteral;
17784
18020
  var InlineJSXPrimaryExpression$7 = IdentifierReference;
17785
18021
  var InlineJSXPrimaryExpression$8 = RegularExpressionLiteral;
17786
- var InlineJSXPrimaryExpression$9 = ParenthesizedExpression;
18022
+ var InlineJSXPrimaryExpression$9 = OptimizedParenthesizedExpression;
17787
18023
  var InlineJSXPrimaryExpression$$ = [InlineJSXPrimaryExpression$0, InlineJSXPrimaryExpression$1, InlineJSXPrimaryExpression$2, InlineJSXPrimaryExpression$3, InlineJSXPrimaryExpression$4, InlineJSXPrimaryExpression$5, InlineJSXPrimaryExpression$6, InlineJSXPrimaryExpression$7, InlineJSXPrimaryExpression$8, InlineJSXPrimaryExpression$9];
17788
18024
  function InlineJSXPrimaryExpression(ctx, state2) {
17789
18025
  return (0, import_lib2.$EVENT_C)(ctx, state2, "InlineJSXPrimaryExpression", InlineJSXPrimaryExpression$$);
@@ -17907,7 +18143,7 @@ var JSXChildGeneral$$ = [JSXChildGeneral$0, JSXChildGeneral$1, JSXChildGeneral$2
17907
18143
  function JSXChildGeneral(ctx, state2) {
17908
18144
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
17909
18145
  }
17910
- var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L231, 'JSXComment "<!--"'), JSXCommentContent, (0, import_lib2.$EXPECT)($L232, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
18146
+ var JSXComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L232, 'JSXComment "<!--"'), JSXCommentContent, (0, import_lib2.$EXPECT)($L233, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
17911
18147
  return ["{/*", $2, "*/}"];
17912
18148
  });
17913
18149
  function JSXComment(ctx, state2) {
@@ -18195,37 +18431,37 @@ var InterfaceExtendsTarget$0 = ImplementsTarget;
18195
18431
  function InterfaceExtendsTarget(ctx, state2) {
18196
18432
  return (0, import_lib2.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
18197
18433
  }
18198
- var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L233, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18434
+ var TypeKeyword$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L234, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18199
18435
  return { $loc, token: $1 };
18200
18436
  });
18201
18437
  function TypeKeyword(ctx, state2) {
18202
18438
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
18203
18439
  }
18204
- var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L234, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18440
+ var Enum$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L235, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18205
18441
  return { $loc, token: $1 };
18206
18442
  });
18207
18443
  function Enum(ctx, state2) {
18208
18444
  return (0, import_lib2.$EVENT)(ctx, state2, "Enum", Enum$0);
18209
18445
  }
18210
- var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L235, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18446
+ var Interface$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L236, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18211
18447
  return { $loc, token: $1 };
18212
18448
  });
18213
18449
  function Interface(ctx, state2) {
18214
18450
  return (0, import_lib2.$EVENT)(ctx, state2, "Interface", Interface$0);
18215
18451
  }
18216
- var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L236, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18452
+ var Global$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L237, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18217
18453
  return { $loc, token: $1 };
18218
18454
  });
18219
18455
  function Global(ctx, state2) {
18220
18456
  return (0, import_lib2.$EVENT)(ctx, state2, "Global", Global$0);
18221
18457
  }
18222
- var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L237, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18458
+ var Module$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L238, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18223
18459
  return { $loc, token: $1 };
18224
18460
  });
18225
18461
  function Module(ctx, state2) {
18226
18462
  return (0, import_lib2.$EVENT)(ctx, state2, "Module", Module$0);
18227
18463
  }
18228
- var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L238, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18464
+ var Namespace$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L239, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
18229
18465
  return { $loc, token: $1 };
18230
18466
  });
18231
18467
  function Namespace(ctx, state2) {
@@ -18539,7 +18775,7 @@ var ReturnTypeSuffix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib
18539
18775
  function ReturnTypeSuffix(ctx, state2) {
18540
18776
  return (0, import_lib2.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
18541
18777
  }
18542
- var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L239, 'ReturnType "asserts"'), NonIdContinue)), ForbidIndentedApplication, (0, import_lib2.$E)(TypePredicate), RestoreIndentedApplication), function($skip, $loc, $0, $1, $2, $3, $4) {
18778
+ var ReturnType$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L240, 'ReturnType "asserts"'), NonIdContinue)), ForbidIndentedApplication, (0, import_lib2.$E)(TypePredicate), RestoreIndentedApplication), function($skip, $loc, $0, $1, $2, $3, $4) {
18543
18779
  var asserts = $1;
18544
18780
  var t = $3;
18545
18781
  if (!t)
@@ -18640,8 +18876,8 @@ var TypeUnarySuffix$$ = [TypeUnarySuffix$0, TypeUnarySuffix$1, TypeUnarySuffix$2
18640
18876
  function TypeUnarySuffix(ctx, state2) {
18641
18877
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
18642
18878
  }
18643
- var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L240, 'TypeUnaryOp "keyof"'), NonIdContinue);
18644
- var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L201, 'TypeUnaryOp "readonly"'), NonIdContinue);
18879
+ var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L241, 'TypeUnaryOp "keyof"'), NonIdContinue);
18880
+ var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'TypeUnaryOp "readonly"'), NonIdContinue);
18645
18881
  var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
18646
18882
  function TypeUnaryOp(ctx, state2) {
18647
18883
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
@@ -18671,7 +18907,7 @@ var TypeIndexedAccess$$ = [TypeIndexedAccess$0, TypeIndexedAccess$1, TypeIndexed
18671
18907
  function TypeIndexedAccess(ctx, state2) {
18672
18908
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
18673
18909
  }
18674
- var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L241, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
18910
+ var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L242, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
18675
18911
  return { $loc, token: "unknown" };
18676
18912
  });
18677
18913
  function UnknownAlias(ctx, state2) {
@@ -18949,7 +19185,7 @@ var TypeBullet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(BulletIndent, (0, im
18949
19185
  function TypeBullet(ctx, state2) {
18950
19186
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeBullet", TypeBullet$0);
18951
19187
  }
18952
- var TypeWithPostfix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(TypeConditional, (0, import_lib2.$E)((0, import_lib2.$S)(SameLineOrIndentedFurther, TypeIfClause))), function($skip, $loc, $0, $1, $2) {
19188
+ var TypeWithPostfix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(TypeConditional, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$E)(_), TypeIfClause))), function($skip, $loc, $0, $1, $2) {
18953
19189
  var t = $1;
18954
19190
  var postfix = $2;
18955
19191
  if (!postfix)
@@ -19064,13 +19300,13 @@ var TypeLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EX
19064
19300
  return num;
19065
19301
  return $0;
19066
19302
  });
19067
- var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L223, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
19303
+ var TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L224, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
19068
19304
  return { type: "VoidType", $loc, token: $1 };
19069
19305
  });
19070
- var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L242, 'TypeLiteral "unique"'), _, (0, import_lib2.$EXPECT)($L243, 'TypeLiteral "symbol"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4) {
19306
+ var TypeLiteral$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L243, 'TypeLiteral "unique"'), _, (0, import_lib2.$EXPECT)($L244, 'TypeLiteral "symbol"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4) {
19071
19307
  return { type: "UniqueSymbolType", children: $0 };
19072
19308
  });
19073
- var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L244, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
19309
+ var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L245, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
19074
19310
  return { $loc, token: "[]" };
19075
19311
  });
19076
19312
  var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
@@ -19089,7 +19325,7 @@ var InlineInterfacePropertyDelimiter$0 = (0, import_lib2.$C)((0, import_lib2.$S)
19089
19325
  var InlineInterfacePropertyDelimiter$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)(SameLineOrIndentedFurther, InlineBasicInterfaceProperty)), InsertComma), function(value) {
19090
19326
  return value[1];
19091
19327
  });
19092
- var InlineInterfacePropertyDelimiter$2 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L16, 'InlineInterfacePropertyDelimiter ":"'), (0, import_lib2.$EXPECT)($L140, 'InlineInterfacePropertyDelimiter ")"'), (0, import_lib2.$EXPECT)($L46, 'InlineInterfacePropertyDelimiter "]"'), (0, import_lib2.$EXPECT)($L37, 'InlineInterfacePropertyDelimiter "}"'))));
19328
+ var InlineInterfacePropertyDelimiter$2 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L16, 'InlineInterfacePropertyDelimiter ":"'), (0, import_lib2.$EXPECT)($L141, 'InlineInterfacePropertyDelimiter ")"'), (0, import_lib2.$EXPECT)($L46, 'InlineInterfacePropertyDelimiter "]"'), (0, import_lib2.$EXPECT)($L37, 'InlineInterfacePropertyDelimiter "}"'))));
19093
19329
  var InlineInterfacePropertyDelimiter$3 = (0, import_lib2.$Y)(EOS);
19094
19330
  var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
19095
19331
  function InlineInterfacePropertyDelimiter(ctx, state2) {
@@ -19155,14 +19391,17 @@ function TypeFunctionArrow(ctx, state2) {
19155
19391
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeFunctionArrow", TypeFunctionArrow$0);
19156
19392
  }
19157
19393
  var TypeArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenAngleBracket, (0, import_lib2.$P)((0, import_lib2.$S)(__, TypeArgumentDelimited)), __, CloseAngleBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
19394
+ var open = $1;
19158
19395
  var args = $2;
19159
- args = args.flatMap(([ws, [arg, delim]]) => [prepend(ws, arg), delim]);
19396
+ var ws = $3;
19397
+ var close = $4;
19398
+ args = args.flatMap(([ws2, [arg, delim]]) => [prepend(ws2, arg), delim]);
19160
19399
  args.pop();
19161
19400
  return {
19162
19401
  type: "TypeArguments",
19163
19402
  ts: true,
19164
19403
  args,
19165
- children: $0
19404
+ children: [open, args, ws, close]
19166
19405
  };
19167
19406
  });
19168
19407
  function TypeArguments(ctx, state2) {
@@ -19328,7 +19567,7 @@ var CivetPrologue$$ = [CivetPrologue$0, CivetPrologue$1];
19328
19567
  function CivetPrologue(ctx, state2) {
19329
19568
  return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
19330
19569
  }
19331
- var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L245, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib2.$Q)(CivetOption), (0, import_lib2.$EXPECT)($R96, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
19570
+ var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L246, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib2.$Q)(CivetOption), (0, import_lib2.$EXPECT)($R96, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
19332
19571
  var options = $3;
19333
19572
  return {
19334
19573
  type: "CivetPrologue",