@danielx/civet 0.8.15 → 0.8.17

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
@@ -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;
@@ -930,7 +966,7 @@ function literalValue(literal) {
930
966
  case "false":
931
967
  return false;
932
968
  }
933
- let ref3;
969
+ let ref6;
934
970
  switch (literal.subtype) {
935
971
  case "StringLiteral": {
936
972
  assert.equal(
@@ -946,8 +982,8 @@ function literalValue(literal) {
946
982
  return BigInt(raw.slice(0, -1));
947
983
  } else if (raw.match(/[\.eE]/)) {
948
984
  return parseFloat(raw);
949
- } else if ((ref3 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref3) && len(ref3, 2)) {
950
- const [, base] = ref3;
985
+ } else if ((ref6 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref6) && len(ref6, 2)) {
986
+ const [, base] = ref6;
951
987
  switch (base.toLowerCase()) {
952
988
  case "x":
953
989
  return parseInt(raw.replace(/0[xX]/, ""), 16);
@@ -1027,16 +1063,16 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
1027
1063
  return startsWithPredicate(node.children, predicate);
1028
1064
  }
1029
1065
  function hasAwait(exp) {
1030
- return gatherRecursiveWithinFunction(exp, ($1) => $1.type === "Await").length > 0;
1066
+ return gatherRecursiveWithinFunction(exp, ($2) => $2.type === "Await").length > 0;
1031
1067
  }
1032
1068
  function hasYield(exp) {
1033
- return gatherRecursiveWithinFunction(exp, ($2) => $2.type === "Yield").length > 0;
1069
+ return gatherRecursiveWithinFunction(exp, ($3) => $3.type === "Yield").length > 0;
1034
1070
  }
1035
1071
  function hasImportDeclaration(exp) {
1036
- return gatherRecursiveWithinFunction(exp, ($3) => $3.type === "ImportDeclaration").length > 0;
1072
+ return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ImportDeclaration").length > 0;
1037
1073
  }
1038
1074
  function hasExportDeclaration(exp) {
1039
- return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ExportDeclaration").length > 0;
1075
+ return gatherRecursiveWithinFunction(exp, ($5) => $5.type === "ExportDeclaration").length > 0;
1040
1076
  }
1041
1077
  function deepCopy(root) {
1042
1078
  const copied = /* @__PURE__ */ new Map();
@@ -1159,7 +1195,6 @@ var skipParens = /* @__PURE__ */ new Set([
1159
1195
  "JSXElement",
1160
1196
  "JSXFragment",
1161
1197
  "Literal",
1162
- "NewExpression",
1163
1198
  "ParenthesizedExpression",
1164
1199
  "Ref",
1165
1200
  "Placeholder",
@@ -1181,7 +1216,10 @@ function makeLeftHandSideExpression(expression) {
1181
1216
  if (skipParens.has(expression.type)) {
1182
1217
  return expression;
1183
1218
  }
1184
- if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($5) => $5.type === "ObjectExpression")) {
1219
+ if (expression.type === "NewExpression" && expression.expression.children.some(($6) => $6?.type === "Call")) {
1220
+ return expression;
1221
+ }
1222
+ if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($7) => $7.type === "ObjectExpression")) {
1185
1223
  return expression;
1186
1224
  }
1187
1225
  }
@@ -1196,7 +1234,7 @@ function parenthesizeExpression(expression) {
1196
1234
  });
1197
1235
  }
1198
1236
  function checkValidLHS(node) {
1199
- let ref4;
1237
+ let ref7;
1200
1238
  switch (node?.type) {
1201
1239
  case "UnaryExpression": {
1202
1240
  node.children.unshift({
@@ -1206,7 +1244,7 @@ function checkValidLHS(node) {
1206
1244
  return true;
1207
1245
  }
1208
1246
  case "CallExpression": {
1209
- const lastType = (ref4 = node.children)[ref4.length - 1]?.type;
1247
+ const lastType = (ref7 = node.children)[ref7.length - 1]?.type;
1210
1248
  switch (lastType) {
1211
1249
  case "PropertyAccess":
1212
1250
  case "SliceExpression":
@@ -1254,8 +1292,8 @@ function updateParentPointers(node, parent, depth = 1) {
1254
1292
  node.parent = parent;
1255
1293
  }
1256
1294
  if (depth && isParent(node)) {
1257
- for (let ref5 = node.children, i9 = 0, len9 = ref5.length; i9 < len9; i9++) {
1258
- const child = ref5[i9];
1295
+ for (let ref8 = node.children, i9 = 0, len9 = ref8.length; i9 < len9; i9++) {
1296
+ const child = ref8[i9];
1259
1297
  updateParentPointers(child, node, depth - 1);
1260
1298
  }
1261
1299
  }
@@ -1303,11 +1341,11 @@ function convertOptionalType(suffix) {
1303
1341
  const wrap = suffix.type === "ReturnTypeAnnotation";
1304
1342
  spliceChild(suffix, suffix.t, 1, suffix.t = [
1305
1343
  getTrimmingSpace(suffix.t),
1306
- wrap && "(",
1344
+ wrap ? "(" : void 0,
1307
1345
  // TODO: avoid parens if unnecessary
1308
1346
  "undefined | ",
1309
- parenthesizeType(insertTrimmingSpace(suffix.t, "")),
1310
- wrap && ")"
1347
+ parenthesizeType(trimFirstSpace(suffix.t)),
1348
+ wrap ? ")" : void 0
1311
1349
  ]);
1312
1350
  }
1313
1351
  var typeNeedsNoParens = /* @__PURE__ */ new Set([
@@ -1321,7 +1359,11 @@ function parenthesizeType(type) {
1321
1359
  if (typeNeedsNoParens.has(type.type)) {
1322
1360
  return type;
1323
1361
  }
1324
- return ["(", type, ")"];
1362
+ return makeNode({
1363
+ type: "TypeParenthesized",
1364
+ ts: true,
1365
+ children: ["(", type, ")"]
1366
+ });
1325
1367
  }
1326
1368
  function wrapIIFE(expressions, asyncFlag, generator) {
1327
1369
  let awaitPrefix;
@@ -1392,8 +1434,8 @@ function wrapIIFE(expressions, asyncFlag, generator) {
1392
1434
  children.splice(1, 0, ".bind(this)");
1393
1435
  }
1394
1436
  if (gatherRecursiveWithinFunction(block, (a2) => typeof a2 === "object" && a2 != null && "token" in a2 && a2.token === "arguments").length) {
1395
- let ref6;
1396
- children[children.length - 1] = (ref6 = parameters.children)[ref6.length - 1] = "(arguments)";
1437
+ let ref9;
1438
+ children[children.length - 1] = (ref9 = parameters.children)[ref9.length - 1] = "(arguments)";
1397
1439
  }
1398
1440
  }
1399
1441
  let exp = makeNode({
@@ -1420,13 +1462,16 @@ function wrapIIFE(expressions, asyncFlag, generator) {
1420
1462
  }
1421
1463
  return exp;
1422
1464
  }
1423
- function wrapWithReturn(expression) {
1465
+ function wrapWithReturn(expression, parent = expression?.parent, semi = false) {
1424
1466
  const children = expression ? ["return ", expression] : ["return"];
1467
+ if (semi) {
1468
+ children.unshift(";");
1469
+ }
1425
1470
  return makeNode({
1426
1471
  type: "ReturnStatement",
1427
1472
  children,
1428
1473
  expression,
1429
- parent: expression?.parent
1474
+ parent
1430
1475
  });
1431
1476
  }
1432
1477
  function flatJoin(array, separator) {
@@ -1668,9 +1713,11 @@ function adjustBindingElements(elements) {
1668
1713
  if (l) {
1669
1714
  if (arrayElementHasTrailingComma(after[l - 1]))
1670
1715
  l++;
1716
+ const elements2 = trimFirstSpace(after);
1671
1717
  blockPrefix = {
1672
1718
  type: "PostRestBindingElements",
1673
- children: ["[", trimFirstSpace(after), "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
1719
+ elements: elements2,
1720
+ children: ["[", elements2, "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
1674
1721
  names: after.flatMap((p) => p.names)
1675
1722
  };
1676
1723
  }
@@ -1708,13 +1755,14 @@ function gatherBindingCode(statements, opts) {
1708
1755
  return;
1709
1756
  }
1710
1757
  if (opts?.injectParamProps && n.type === "Parameter" && n.accessModifier) {
1711
- n.names.forEach((id) => ({
1712
- push: thisAssignments2.push({
1758
+ for (let ref1 = n.names, i2 = 0, len1 = ref1.length; i2 < len1; i2++) {
1759
+ const id = ref1[i2];
1760
+ thisAssignments2.push({
1713
1761
  type: "AssignmentExpression",
1714
1762
  children: [`this.${id} = `, id],
1715
1763
  js: true
1716
- })
1717
- }));
1764
+ });
1765
+ }
1718
1766
  return;
1719
1767
  }
1720
1768
  const { blockPrefix } = n;
@@ -1726,8 +1774,8 @@ function gatherBindingCode(statements, opts) {
1726
1774
  return [splices, thisAssignments];
1727
1775
  }
1728
1776
  function arrayElementHasTrailingComma(elementNode) {
1729
- let ref1;
1730
- const lastChild = (ref1 = elementNode.children)[ref1.length - 1];
1777
+ let ref2;
1778
+ const lastChild = (ref2 = elementNode.children)[ref2.length - 1];
1731
1779
  return lastChild && lastChild[lastChild.length - 1]?.token === ",";
1732
1780
  }
1733
1781
  function gatherBindingPatternTypeSuffix(pattern) {
@@ -1739,8 +1787,8 @@ function gatherBindingPatternTypeSuffix(pattern) {
1739
1787
  case "ArrayBindingPattern": {
1740
1788
  {
1741
1789
  const results = [];
1742
- for (let ref2 = pattern.elements, i2 = 0, len1 = ref2.length; i2 < len1; i2++) {
1743
- const elem = ref2[i2];
1790
+ for (let ref3 = pattern.elements, i3 = 0, len22 = ref3.length; i3 < len22; i3++) {
1791
+ const elem = ref3[i3];
1744
1792
  let { typeSuffix } = elem;
1745
1793
  typeSuffix ??= elem.binding?.typeSuffix;
1746
1794
  if (typeSuffix) {
@@ -1778,8 +1826,8 @@ function gatherBindingPatternTypeSuffix(pattern) {
1778
1826
  {
1779
1827
  let restType;
1780
1828
  const results1 = [];
1781
- for (let ref3 = pattern.properties, i3 = 0, len22 = ref3.length; i3 < len22; i3++) {
1782
- const prop = ref3[i3];
1829
+ for (let ref4 = pattern.properties, i4 = 0, len3 = ref4.length; i4 < len3; i4++) {
1830
+ const prop = ref4[i4];
1783
1831
  let { typeSuffix } = prop;
1784
1832
  typeSuffix ??= prop.value?.typeSuffix;
1785
1833
  if (typeSuffix) {
@@ -1931,8 +1979,14 @@ var declareHelper = {
1931
1979
  // [indent, statement]
1932
1980
  preludeVar,
1933
1981
  moduloRef,
1934
- ts(": (a: number, b: number) => number"),
1935
- " = (a, b) => (a % b + b) % b"
1982
+ " = ",
1983
+ ts("("),
1984
+ "(a",
1985
+ ts(": number"),
1986
+ ", b",
1987
+ ts(": number"),
1988
+ ") => (a % b + b) % b",
1989
+ ts(") as ((a: number, b: number) => number) & ((a: bigint, b: bigint) => bigint)")
1936
1990
  ], ";\n"]);
1937
1991
  },
1938
1992
  Falsy(FalsyRef) {
@@ -2005,7 +2059,7 @@ var declareHelper = {
2005
2059
  AutoPromise(ref) {
2006
2060
  state.prelude.push([
2007
2061
  "",
2008
- ts(["type ", ref, "<T> = T extends Promise<unknown> ? T : Promise<T>"]),
2062
+ ts(["type ", ref, "<T> = Promise<Awaited<T>>"]),
2009
2063
  ";\n"
2010
2064
  ]);
2011
2065
  },
@@ -2497,7 +2551,7 @@ function getTypeArguments(args) {
2497
2551
  if (!Array.isArray(args)) {
2498
2552
  throw new Error("getTypeArguments could not find relevant array");
2499
2553
  }
2500
- return args.filter((a) => typeof a === "object" && a != null && "type" in a && a.type === "TypeArgument");
2554
+ return args.filter((a1) => typeof a1 === "object" && a1 != null && "type" in a1 && a1.type === "TypeArgument");
2501
2555
  }
2502
2556
  function isVoidType(t) {
2503
2557
  return typeof t === "object" && t != null && "type" in t && t.type === "TypeLiteral" && "t" in t && typeof t.t === "object" && t.t != null && "type" in t.t && t.t.type === "VoidType";
@@ -2674,14 +2728,10 @@ function processReturnValue(func) {
2674
2728
  let ref1;
2675
2729
  if (!((ref1 = block.children)[ref1.length - 2]?.type === "ReturnStatement")) {
2676
2730
  let ref2;
2677
- const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]) || ";";
2731
+ const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]);
2678
2732
  block.expressions.push([
2679
- [indent],
2680
- {
2681
- type: "ReturnStatement",
2682
- expression: ref,
2683
- children: ["return ", ref]
2684
- }
2733
+ indent,
2734
+ wrapWithReturn(ref, block, !indent)
2685
2735
  ]);
2686
2736
  }
2687
2737
  return true;
@@ -2693,34 +2743,103 @@ function patternAsValue(pattern) {
2693
2743
  const index = children.indexOf(pattern.elements);
2694
2744
  if (index < 0)
2695
2745
  throw new Error("failed to find elements in ArrayBindingPattern");
2696
- children[index] = pattern.elements.map((el) => {
2697
- const [ws, e, delim] = el.children;
2698
- return { ...el, children: [ws, patternAsValue(e), delim] };
2699
- });
2700
- return { ...pattern, children };
2746
+ const elements = children[index] = pattern.elements.map(patternAsValue);
2747
+ return { ...pattern, elements, children };
2701
2748
  }
2702
2749
  case "ObjectBindingPattern": {
2703
2750
  const children = [...pattern.children];
2704
2751
  const index = children.indexOf(pattern.properties);
2705
2752
  if (index < 0)
2706
2753
  throw new Error("failed to find properties in ArrayBindingPattern");
2707
- children[index] = pattern.properties.map(patternAsValue);
2708
- return { ...pattern, children };
2754
+ const properties = children[index] = pattern.properties.map(patternAsValue);
2755
+ return { ...pattern, properties, children };
2709
2756
  }
2710
- case "Identifier":
2711
2757
  case "BindingProperty": {
2712
- const children = [
2713
- // { name: value } = ... declares value, not name
2714
- pattern.value ?? pattern.name,
2715
- pattern.delim
2716
- ];
2717
- if (isWhitespaceOrEmpty(pattern.children[0])) {
2718
- children.unshift(pattern.children[0]);
2758
+ let children;
2759
+ if (pattern.value?.type === "Identifier") {
2760
+ children = [pattern.value, pattern.delim];
2761
+ if (isWhitespaceOrEmpty(pattern.children[0])) {
2762
+ children.unshift(pattern.children[0]);
2763
+ }
2764
+ } else {
2765
+ children = [...pattern.children];
2766
+ if (pattern.initializer != null) {
2767
+ const index = children.indexOf(pattern.initializer);
2768
+ assert.notEqual(index, -1, "failed to find initializer in BindingElement");
2769
+ children.splice(index, 1);
2770
+ }
2771
+ if (pattern.value != null) {
2772
+ children = children.map(($2) => $2 === pattern.value ? patternAsValue(pattern.value) : $2);
2773
+ }
2719
2774
  }
2720
2775
  return { ...pattern, children };
2721
2776
  }
2722
- default:
2777
+ case "AtBindingProperty": {
2778
+ const children = [...pattern.children];
2779
+ if (pattern.initializer != null) {
2780
+ const index = children.indexOf(pattern.initializer);
2781
+ assert.notEqual(index, -1, "failed to find initializer in AtBindingProperty");
2782
+ children.splice(index, 1);
2783
+ }
2784
+ return { ...pattern, children };
2785
+ }
2786
+ case "BindingElement": {
2787
+ const children = [...pattern.children];
2788
+ if (pattern.initializer != null) {
2789
+ const index2 = children.indexOf(pattern.initializer);
2790
+ assert.notEqual(index2, -1, "failed to find initializer in BindingElement");
2791
+ children.splice(index2, 1);
2792
+ }
2793
+ const index = children.indexOf(pattern.binding);
2794
+ assert.notEqual(index, -1, "failed to find binding in BindingElement");
2795
+ children[index] = patternAsValue(pattern.binding);
2796
+ return { ...pattern, children };
2797
+ }
2798
+ default: {
2723
2799
  return pattern;
2800
+ }
2801
+ }
2802
+ }
2803
+ function patternBindings(pattern) {
2804
+ const bindings = [];
2805
+ recurse(pattern);
2806
+ return bindings;
2807
+ function recurse(pattern2) {
2808
+ switch (pattern2.type) {
2809
+ case "ArrayBindingPattern": {
2810
+ for (let ref3 = pattern2.elements, i2 = 0, len1 = ref3.length; i2 < len1; i2++) {
2811
+ const element = ref3[i2];
2812
+ recurse(element);
2813
+ }
2814
+ ;
2815
+ break;
2816
+ }
2817
+ case "ObjectBindingPattern": {
2818
+ for (let ref4 = pattern2.properties, i3 = 0, len22 = ref4.length; i3 < len22; i3++) {
2819
+ const property = ref4[i3];
2820
+ recurse(property);
2821
+ }
2822
+ ;
2823
+ break;
2824
+ }
2825
+ case "BindingElement": {
2826
+ recurse(pattern2.binding);
2827
+ break;
2828
+ }
2829
+ case "BindingProperty": {
2830
+ recurse(pattern2.value ?? pattern2.name);
2831
+ break;
2832
+ }
2833
+ case "Binding": {
2834
+ recurse(pattern2.pattern);
2835
+ break;
2836
+ }
2837
+ case "Identifier":
2838
+ case "AtBinding": {
2839
+ bindings.push(pattern2);
2840
+ break;
2841
+ }
2842
+ }
2724
2843
  }
2725
2844
  }
2726
2845
  function assignResults(node, collect) {
@@ -2729,8 +2848,8 @@ function assignResults(node, collect) {
2729
2848
  switch (node.type) {
2730
2849
  case "BlockStatement":
2731
2850
  if (node.expressions.length) {
2732
- let ref3;
2733
- assignResults((ref3 = node.expressions)[ref3.length - 1], collect);
2851
+ let ref5;
2852
+ assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
2734
2853
  } else {
2735
2854
  node.expressions.push(["", collect("void 0"), ";"]);
2736
2855
  }
@@ -2765,7 +2884,7 @@ function assignResults(node, collect) {
2765
2884
  if (exp.type === "LabelledStatement") {
2766
2885
  exp = exp.statement;
2767
2886
  }
2768
- let ref4;
2887
+ let ref6;
2769
2888
  switch (exp.type) {
2770
2889
  case "BreakStatement":
2771
2890
  case "ContinueStatement":
@@ -2776,14 +2895,14 @@ function assignResults(node, collect) {
2776
2895
  return;
2777
2896
  }
2778
2897
  case "Declaration": {
2779
- let ref5;
2898
+ let ref7;
2780
2899
  if (exp.bindings?.length) {
2781
- ref5 = patternAsValue((ref4 = exp.bindings)[ref4.length - 1].pattern);
2900
+ ref7 = patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern);
2782
2901
  } else {
2783
- ref5 = "void 0";
2902
+ ref7 = "void 0";
2784
2903
  }
2785
2904
  ;
2786
- const value = ref5;
2905
+ const value = ref7;
2787
2906
  exp.children.push([
2788
2907
  "",
2789
2908
  [";", collect(value)]
@@ -2831,11 +2950,17 @@ function assignResults(node, collect) {
2831
2950
  return;
2832
2951
  }
2833
2952
  case "SwitchStatement": {
2834
- assignResults(exp.children[2], collect);
2953
+ for (let ref8 = exp.caseBlock.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
2954
+ const clause = ref8[i4];
2955
+ assignResults(clause, collect);
2956
+ }
2835
2957
  return;
2836
2958
  }
2837
2959
  case "TryStatement": {
2838
- exp.blocks.forEach((block) => assignResults(block, collect));
2960
+ for (let ref9 = exp.blocks, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
2961
+ const block = ref9[i5];
2962
+ assignResults(block, collect);
2963
+ }
2839
2964
  return;
2840
2965
  }
2841
2966
  }
@@ -2856,20 +2981,28 @@ function insertReturn(node) {
2856
2981
  const last = node.expressions[node.expressions.length - 1];
2857
2982
  insertReturn(last);
2858
2983
  } else {
2859
- if (node.parent.type === "CatchClause") {
2860
- node.expressions.push(["return"]);
2984
+ let m1;
2985
+ if (m1 = node.parent?.type, m1 === "CatchClause" || m1 === "WhenClause") {
2986
+ node.expressions.push(["", wrapWithReturn(void 0, node)]);
2861
2987
  }
2862
2988
  }
2863
2989
  return;
2864
2990
  }
2865
2991
  case "WhenClause": {
2866
2992
  if (node.break) {
2867
- node.children.splice(node.children.indexOf(node.break), 1);
2993
+ const breakIndex = node.children.indexOf(node.break);
2994
+ assert.notEqual(breakIndex, -1, "Could not find break in when clause");
2995
+ node.children.splice(breakIndex, 1);
2996
+ node.break = void 0;
2868
2997
  }
2869
- if (node.block.expressions.length) {
2870
- insertReturn(node.block);
2871
- } else {
2872
- node.block.expressions.push(wrapWithReturn());
2998
+ insertReturn(node.block);
2999
+ if (!isExit(node.block)) {
3000
+ const comment = hasTrailingComment(node.block.expressions);
3001
+ let ref10;
3002
+ node.block.expressions.push([
3003
+ comment ? (ref10 = node.block.expressions)[ref10.length - 1][0] || "\n" : "",
3004
+ wrapWithReturn(void 0, node, !comment)
3005
+ ]);
2873
3006
  }
2874
3007
  return;
2875
3008
  }
@@ -2894,7 +3027,7 @@ function insertReturn(node) {
2894
3027
  if (exp.type === "LabelledStatement") {
2895
3028
  exp = exp.statement;
2896
3029
  }
2897
- let ref6;
3030
+ let ref11;
2898
3031
  switch (exp.type) {
2899
3032
  case "BreakStatement":
2900
3033
  case "ContinueStatement":
@@ -2905,27 +3038,30 @@ function insertReturn(node) {
2905
3038
  return;
2906
3039
  }
2907
3040
  case "Declaration": {
2908
- let ref7;
3041
+ let ref12;
2909
3042
  if (exp.bindings?.length) {
2910
- ref7 = [" ", patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern)];
3043
+ ref12 = [" ", patternAsValue((ref11 = exp.bindings)[ref11.length - 1].pattern)];
2911
3044
  } else {
2912
- ref7 = [];
3045
+ ref12 = [];
2913
3046
  }
2914
3047
  ;
2915
- const value = ref7;
3048
+ const value = ref12;
2916
3049
  const parent = outer.parent;
2917
3050
  const index = findChildIndex(parent?.expressions, outer);
2918
3051
  assert.notEqual(index, -1, "Could not find declaration in parent");
2919
- parent.expressions.splice(index + 1, 0, ["", {
2920
- type: "ReturnStatement",
2921
- expression: value,
2922
- children: [
2923
- !(parent.expressions[index][2] === ";") ? ";" : void 0,
2924
- "return",
2925
- value
2926
- ],
2927
- parent: exp
2928
- }]);
3052
+ parent.expressions.splice(index + 1, 0, [
3053
+ "",
3054
+ {
3055
+ type: "ReturnStatement",
3056
+ expression: value,
3057
+ children: [
3058
+ !(parent.expressions[index][2] === ";") ? ";" : void 0,
3059
+ "return",
3060
+ value
3061
+ ],
3062
+ parent: exp
3063
+ }
3064
+ ]);
2929
3065
  braceBlock(parent);
2930
3066
  return;
2931
3067
  }
@@ -2936,12 +3072,7 @@ function insertReturn(node) {
2936
3072
  assert.notEqual(index, -1, "Could not find function declaration in parent");
2937
3073
  parent.expressions.splice(index + 1, 0, [
2938
3074
  "",
2939
- {
2940
- type: "ReturnStatement",
2941
- expression: exp.id,
2942
- children: [";return ", exp.id],
2943
- parent: exp
2944
- }
3075
+ wrapWithReturn(exp.id, exp, true)
2945
3076
  ]);
2946
3077
  braceBlock(parent);
2947
3078
  return;
@@ -2964,12 +3095,11 @@ function insertReturn(node) {
2964
3095
  if (exp.else)
2965
3096
  insertReturn(exp.else.block);
2966
3097
  else
2967
- exp.children.push(["", {
2968
- type: "ReturnStatement",
2969
- // NOTE: add a prefixed semi-colon because the if block may not be braced
2970
- children: [";return"],
2971
- parent: exp
2972
- }]);
3098
+ exp.children.push([
3099
+ "",
3100
+ // NOTE: add a prefixed semicolon because the if block may not be braced
3101
+ wrapWithReturn(void 0, exp, true)
3102
+ ]);
2973
3103
  return;
2974
3104
  }
2975
3105
  case "PatternMatchingStatement": {
@@ -2977,30 +3107,30 @@ function insertReturn(node) {
2977
3107
  return;
2978
3108
  }
2979
3109
  case "SwitchStatement": {
2980
- insertSwitchReturns(exp);
3110
+ for (let ref13 = exp.caseBlock.clauses, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
3111
+ const clause = ref13[i6];
3112
+ insertReturn(clause);
3113
+ }
2981
3114
  return;
2982
3115
  }
2983
3116
  case "TryStatement": {
2984
- exp.blocks.forEach((block) => insertReturn(block));
3117
+ for (let ref14 = exp.blocks, i7 = 0, len6 = ref14.length; i7 < len6; i7++) {
3118
+ const block = ref14[i7];
3119
+ insertReturn(block);
3120
+ }
2985
3121
  return;
2986
3122
  }
2987
3123
  }
2988
3124
  if (node[node.length - 1]?.type === "SemicolonDelimiter") {
2989
3125
  return;
2990
3126
  }
2991
- const returnStatement = wrapWithReturn(node[1]);
2992
- node.splice(1, 1, returnStatement);
2993
- }
2994
- function insertSwitchReturns(exp) {
2995
- exp.caseBlock.clauses.forEach((clause) => {
2996
- return insertReturn(clause);
2997
- });
3127
+ node[1] = wrapWithReturn(node[1]);
2998
3128
  }
2999
3129
  function processBreakContinueWith(statement) {
3000
3130
  let changed = false;
3001
3131
  for (const control of gatherRecursiveWithinFunction(
3002
3132
  statement.block,
3003
- ($2) => $2.type === "BreakStatement" || $2.type === "ContinueStatement"
3133
+ ($3) => $3.type === "BreakStatement" || $3.type === "ContinueStatement"
3004
3134
  )) {
3005
3135
  let controlName2 = function() {
3006
3136
  switch (control.type) {
@@ -3015,8 +3145,8 @@ function processBreakContinueWith(statement) {
3015
3145
  var controlName = controlName2;
3016
3146
  if (control.with) {
3017
3147
  if (control.label) {
3018
- let m1;
3019
- 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)) {
3148
+ let m2;
3149
+ 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)) {
3020
3150
  continue;
3021
3151
  }
3022
3152
  } else {
@@ -3035,7 +3165,7 @@ function processBreakContinueWith(statement) {
3035
3165
  )
3036
3166
  );
3037
3167
  updateParentPointers(control.with, control);
3038
- const i = control.children.findIndex(($3) => $3?.type === "Error");
3168
+ const i = control.children.findIndex(($4) => $4?.type === "Error");
3039
3169
  if (i >= 0) {
3040
3170
  control.children.splice(i, 1);
3041
3171
  }
@@ -3077,7 +3207,7 @@ function wrapIterationReturningResults(statement, collect) {
3077
3207
  }
3078
3208
  const resultsRef = statement.resultsRef = makeRef("results");
3079
3209
  const declaration = iterationDeclaration(statement);
3080
- const { ancestor, child } = findAncestor(statement, ($4) => $4.type === "BlockStatement");
3210
+ const { ancestor, child } = findAncestor(statement, ($5) => $5.type === "BlockStatement");
3081
3211
  assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
3082
3212
  const index = findChildIndex(ancestor.expressions, child);
3083
3213
  assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
@@ -3130,6 +3260,9 @@ function iterationDeclaration(statement) {
3130
3260
  case "product": {
3131
3261
  return "1";
3132
3262
  }
3263
+ case "join": {
3264
+ return '""';
3265
+ }
3133
3266
  default: {
3134
3267
  return "0";
3135
3268
  }
@@ -3174,7 +3307,8 @@ function iterationDeclaration(statement) {
3174
3307
  case "count": {
3175
3308
  return ["if (", node, ") ++", resultsRef];
3176
3309
  }
3177
- case "sum": {
3310
+ case "sum":
3311
+ case "join": {
3178
3312
  return [resultsRef, " += ", node];
3179
3313
  }
3180
3314
  case "product": {
@@ -3199,9 +3333,9 @@ function iterationDefaultBody(statement) {
3199
3333
  }
3200
3334
  const reduction = statement.type === "ForStatement" && statement.reduction;
3201
3335
  function fillBlock(expression) {
3202
- let ref8;
3203
- let m2;
3204
- 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) {
3336
+ let ref15;
3337
+ let m3;
3338
+ 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) {
3205
3339
  block.expressions.pop();
3206
3340
  }
3207
3341
  block.expressions.push(expression);
@@ -3231,7 +3365,29 @@ function iterationDefaultBody(statement) {
3231
3365
  }
3232
3366
  }
3233
3367
  if (statement.type === "ForStatement" && statement.declaration?.type === "ForDeclaration") {
3234
- fillBlock(["", patternAsValue(statement.declaration.binding)]);
3368
+ if (reduction) {
3369
+ const bindings = patternBindings(statement.declaration.binding.pattern);
3370
+ if (bindings.length) {
3371
+ fillBlock(["", bindings[0]]);
3372
+ for (const binding of bindings.slice(1)) {
3373
+ binding.children.unshift({
3374
+ type: "Error",
3375
+ subtype: "Warning",
3376
+ message: "Ignored binding in reduction loop with implicit body"
3377
+ });
3378
+ }
3379
+ } else {
3380
+ fillBlock([
3381
+ "",
3382
+ {
3383
+ type: "Error",
3384
+ message: "Empty binding pattern in reduction loop with implicit body"
3385
+ }
3386
+ ]);
3387
+ }
3388
+ } else {
3389
+ fillBlock(["", patternAsValue(statement.declaration.binding.pattern)]);
3390
+ }
3235
3391
  block.empty = false;
3236
3392
  }
3237
3393
  return false;
@@ -3259,28 +3415,33 @@ function processParams(f) {
3259
3415
  injectParamProps: isConstructor
3260
3416
  });
3261
3417
  if (isConstructor) {
3262
- const { ancestor } = findAncestor(f, ($5) => $5.type === "ClassExpression");
3418
+ const { ancestor } = findAncestor(f, ($6) => $6.type === "ClassExpression");
3263
3419
  if (ancestor != null) {
3264
- 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));
3420
+ const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($7) => $7.type === "FieldDefinition").map(($8) => $8.id).filter((a2) => typeof a2 === "object" && a2 != null && "type" in a2 && a2.type === "Identifier").map(($9) => $9.name));
3265
3421
  const classExpressions = ancestor.body.expressions;
3266
3422
  let index = findChildIndex(classExpressions, f);
3267
3423
  assert.notEqual(index, -1, "Could not find constructor in class");
3268
- let m3;
3269
- while (m3 = classExpressions[index - 1]?.[1], typeof m3 === "object" && m3 != null && "type" in m3 && m3.type === "MethodDefinition" && "name" in m3 && m3.name === "constructor") {
3424
+ let m4;
3425
+ while (m4 = classExpressions[index - 1]?.[1], typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "MethodDefinition" && "name" in m4 && m4.name === "constructor") {
3270
3426
  index--;
3271
3427
  }
3272
3428
  const fStatement = classExpressions[index];
3273
- for (let ref9 = gatherRecursive(parameters, ($9) => $9.type === "Parameter"), i2 = 0, len1 = ref9.length; i2 < len1; i2++) {
3274
- const parameter = ref9[i2];
3275
- if (!parameter.typeSuffix) {
3429
+ for (let ref16 = gatherRecursive(parameters, ($10) => $10.type === "Parameter"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
3430
+ const parameter = ref16[i8];
3431
+ const { accessModifier } = parameter;
3432
+ if (!(accessModifier || parameter.typeSuffix)) {
3276
3433
  continue;
3277
3434
  }
3278
- for (let ref10 = gatherRecursive(parameter, ($10) => $10.type === "AtBinding"), i3 = 0, len22 = ref10.length; i3 < len22; i3++) {
3279
- const binding = ref10[i3];
3435
+ for (let ref17 = gatherRecursive(parameter, ($11) => $11.type === "AtBinding"), i9 = 0, len8 = ref17.length; i9 < len8; i9++) {
3436
+ const binding = ref17[i9];
3280
3437
  const typeSuffix = binding.parent?.typeSuffix;
3281
- if (!typeSuffix) {
3438
+ if (!(accessModifier || typeSuffix)) {
3282
3439
  continue;
3283
3440
  }
3441
+ if (parameter.accessModifier) {
3442
+ replaceNode(parameter.accessModifier, void 0);
3443
+ parameter.accessModifier = void 0;
3444
+ }
3284
3445
  const id = binding.ref.id;
3285
3446
  if (fields.has(id)) {
3286
3447
  continue;
@@ -3289,7 +3450,7 @@ function processParams(f) {
3289
3450
  type: "FieldDefinition",
3290
3451
  id,
3291
3452
  typeSuffix,
3292
- children: [id, typeSuffix]
3453
+ children: [accessModifier, id, typeSuffix]
3293
3454
  }, ";"]);
3294
3455
  fStatement[0] = "";
3295
3456
  }
@@ -3313,10 +3474,10 @@ function processParams(f) {
3313
3474
  if (isConstructor) {
3314
3475
  const superCalls = gatherNodes(
3315
3476
  expressions,
3316
- (a2) => typeof a2 === "object" && a2 != null && "type" in a2 && a2.type === "CallExpression" && "children" in a2 && Array.isArray(a2.children) && a2.children.length >= 1 && typeof a2.children[0] === "object" && a2.children[0] != null && "token" in a2.children[0] && a2.children[0].token === "super"
3477
+ (a3) => typeof a3 === "object" && a3 != null && "type" in a3 && a3.type === "CallExpression" && "children" in a3 && Array.isArray(a3.children) && a3.children.length >= 1 && typeof a3.children[0] === "object" && a3.children[0] != null && "token" in a3.children[0] && a3.children[0].token === "super"
3317
3478
  );
3318
3479
  if (superCalls.length) {
3319
- const { child } = findAncestor(superCalls[0], (a3) => a3 === block);
3480
+ const { child } = findAncestor(superCalls[0], (a4) => a4 === block);
3320
3481
  const index = findChildIndex(expressions, child);
3321
3482
  if (index < 0) {
3322
3483
  throw new Error("Could not find super call within top-level expressions");
@@ -3331,21 +3492,33 @@ function processParams(f) {
3331
3492
  function processSignature(f) {
3332
3493
  const { block, signature } = f;
3333
3494
  if (!f.async?.length && hasAwait(block)) {
3334
- f.async.push("async ");
3335
- signature.modifier.async = true;
3336
- }
3337
- if (!f.generator?.length && hasYield(block)) {
3338
- if (f.type === "ArrowFunction") {
3339
- gatherRecursiveWithinFunction(block, ($11) => $11.type === "YieldExpression").forEach((y) => {
3340
- const i = y.children.findIndex(($12) => $12.type === "Yield");
3341
- return y.children.splice(i + 1, 0, {
3495
+ if (f.async != null) {
3496
+ f.async.push("async ");
3497
+ signature.modifier.async = true;
3498
+ } else {
3499
+ for (let ref18 = gatherRecursiveWithinFunction(block, ($12) => $12.type === "Await"), i10 = 0, len9 = ref18.length; i10 < len9; i10++) {
3500
+ const a = ref18[i10];
3501
+ const i = findChildIndex(a.parent, a);
3502
+ a.parent.children.splice(i + 1, 0, {
3342
3503
  type: "Error",
3343
- message: "Can't use yield inside of => arrow function"
3504
+ message: `await invalid in ${signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
3344
3505
  });
3345
- });
3346
- } else {
3506
+ }
3507
+ }
3508
+ }
3509
+ if (!f.generator?.length && hasYield(block)) {
3510
+ if (f.generator != null) {
3347
3511
  f.generator.push("*");
3348
3512
  signature.modifier.generator = true;
3513
+ } else {
3514
+ for (let ref19 = gatherRecursiveWithinFunction(block, ($13) => $13.type === "YieldExpression"), i11 = 0, len10 = ref19.length; i11 < len10; i11++) {
3515
+ const y = ref19[i11];
3516
+ const i = y.children.findIndex(($14) => $14.type === "Yield");
3517
+ y.children.splice(i + 1, 0, {
3518
+ type: "Error",
3519
+ message: `yield invalid in ${f.type === "ArrowFunction" ? "=> arrow function" : signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
3520
+ });
3521
+ }
3349
3522
  }
3350
3523
  }
3351
3524
  if (signature.modifier.async && !signature.modifier.generator && signature.returnType && !isPromiseType(signature.returnType.t)) {
@@ -3353,21 +3526,15 @@ function processSignature(f) {
3353
3526
  }
3354
3527
  }
3355
3528
  function processFunctions(statements, config2) {
3356
- for (let ref11 = gatherRecursiveAll(statements, ($13) => $13.type === "FunctionExpression" || $13.type === "ArrowFunction"), i4 = 0, len3 = ref11.length; i4 < len3; i4++) {
3357
- const f = ref11[i4];
3358
- if (f.type === "FunctionExpression") {
3529
+ for (let ref20 = gatherRecursiveAll(statements, ($15) => $15.type === "FunctionExpression" || $15.type === "ArrowFunction" || $15.type === "MethodDefinition"), i12 = 0, len11 = ref20.length; i12 < len11; i12++) {
3530
+ const f = ref20[i12];
3531
+ if (f.type === "FunctionExpression" || f.type === "MethodDefinition") {
3359
3532
  implicitFunctionBlock(f);
3360
3533
  }
3361
3534
  processSignature(f);
3362
3535
  processParams(f);
3363
3536
  processReturn(f, config2.implicitReturns);
3364
3537
  }
3365
- for (let ref12 = gatherRecursiveAll(statements, ($14) => $14.type === "MethodDefinition"), i5 = 0, len4 = ref12.length; i5 < len4; i5++) {
3366
- const f = ref12[i5];
3367
- implicitFunctionBlock(f);
3368
- processParams(f);
3369
- processReturn(f, config2.implicitReturns);
3370
- }
3371
3538
  }
3372
3539
  function expressionizeIteration(exp) {
3373
3540
  let { async, generator, block, children, statement } = exp;
@@ -3416,9 +3583,9 @@ function expressionizeIteration(exp) {
3416
3583
  }
3417
3584
  let done;
3418
3585
  if (!async) {
3419
- let ref13;
3420
- if ((ref13 = blockContainingStatement(exp)) && typeof ref13 === "object" && "block" in ref13 && "index" in ref13) {
3421
- const { block: parentBlock, index } = ref13;
3586
+ let ref21;
3587
+ if ((ref21 = blockContainingStatement(exp)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21) {
3588
+ const { block: parentBlock, index } = ref21;
3422
3589
  statements[0][0] = parentBlock.expressions[index][0];
3423
3590
  parentBlock.expressions.splice(index, index + 1 - index, ...statements);
3424
3591
  updateParentPointers(parentBlock);
@@ -3435,8 +3602,8 @@ function expressionizeIteration(exp) {
3435
3602
  }
3436
3603
  }
3437
3604
  function processIterationExpressions(statements) {
3438
- for (let ref14 = gatherRecursiveAll(statements, ($15) => $15.type === "IterationExpression"), i6 = 0, len5 = ref14.length; i6 < len5; i6++) {
3439
- const s = ref14[i6];
3605
+ for (let ref22 = gatherRecursiveAll(statements, ($16) => $16.type === "IterationExpression"), i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
3606
+ const s = ref22[i13];
3440
3607
  expressionizeIteration(s);
3441
3608
  }
3442
3609
  }
@@ -3462,21 +3629,21 @@ function processCoffeeDo(ws, expression) {
3462
3629
  ...parameters,
3463
3630
  children: (() => {
3464
3631
  const results1 = [];
3465
- for (let ref15 = parameters.children, i7 = 0, len6 = ref15.length; i7 < len6; i7++) {
3466
- let parameter = ref15[i7];
3632
+ for (let ref23 = parameters.children, i14 = 0, len13 = ref23.length; i14 < len13; i14++) {
3633
+ let parameter = ref23[i14];
3467
3634
  if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
3468
- let ref16;
3469
- if (ref16 = parameter.initializer) {
3470
- const initializer = ref16;
3635
+ let ref24;
3636
+ if (ref24 = parameter.initializer) {
3637
+ const initializer = ref24;
3471
3638
  args.push(initializer.expression, parameter.delim);
3472
3639
  parameter = {
3473
3640
  ...parameter,
3474
3641
  initializer: void 0,
3475
- children: parameter.children.filter((a4) => a4 !== initializer)
3642
+ children: parameter.children.filter((a5) => a5 !== initializer)
3476
3643
  };
3477
3644
  } else {
3478
3645
  args.push(parameter.children.filter(
3479
- (a5) => a5 !== parameter.typeSuffix
3646
+ (a6) => a6 !== parameter.typeSuffix
3480
3647
  ));
3481
3648
  }
3482
3649
  }
@@ -3488,7 +3655,7 @@ function processCoffeeDo(ws, expression) {
3488
3655
  expression = {
3489
3656
  ...expression,
3490
3657
  parameters: newParameters,
3491
- children: expression.children.map(($16) => $16 === parameters ? newParameters : $16)
3658
+ children: expression.children.map(($17) => $17 === parameters ? newParameters : $17)
3492
3659
  };
3493
3660
  }
3494
3661
  return {
@@ -3510,7 +3677,7 @@ function makeAmpersandFunction(rhs) {
3510
3677
  ref = makeRef("$");
3511
3678
  inplacePrepend(ref, body);
3512
3679
  }
3513
- if (startsWithPredicate(body, ($17) => $17.type === "ObjectExpression")) {
3680
+ if (startsWithPredicate(body, ($18) => $18.type === "ObjectExpression")) {
3514
3681
  body = makeLeftHandSideExpression(body);
3515
3682
  }
3516
3683
  const parameters = makeNode({
@@ -3549,7 +3716,7 @@ function makeAmpersandFunction(rhs) {
3549
3716
  }
3550
3717
  if (gatherRecursiveWithinFunction(
3551
3718
  block,
3552
- (a6) => a6 === ref
3719
+ (a7) => a7 === ref
3553
3720
  ).length > 1) {
3554
3721
  fn.ampersandBlock = false;
3555
3722
  }
@@ -4116,7 +4283,7 @@ function expandChainedComparisons([first, binops]) {
4116
4283
  // source/parser/pattern-matching.civet
4117
4284
  function processPatternTest(lhs, patterns) {
4118
4285
  const { ref, refAssignmentComma } = maybeRefAssignment(lhs, "m");
4119
- const conditionExpression = flatJoin(patterns.map(($) => getPatternConditions($, ref)).map(($1) => flatJoin($1, " && ")), " || ");
4286
+ const conditionExpression = flatJoin(patterns.map(($1) => getPatternConditions($1, ref)).map(($2) => flatJoin($2, " && ")), " || ");
4120
4287
  return makeLeftHandSideExpression(makeNode({
4121
4288
  type: "PatternTest",
4122
4289
  children: [
@@ -4126,7 +4293,7 @@ function processPatternTest(lhs, patterns) {
4126
4293
  }));
4127
4294
  }
4128
4295
  function processPatternMatching(statements) {
4129
- gatherRecursiveAll(statements, ($2) => $2.type === "SwitchStatement").forEach((s) => {
4296
+ gatherRecursiveAll(statements, ($3) => $3.type === "SwitchStatement").forEach((s) => {
4130
4297
  const { caseBlock } = s;
4131
4298
  const { clauses } = caseBlock;
4132
4299
  for (let i1 = 0, len3 = clauses.length; i1 < len3; i1++) {
@@ -4140,7 +4307,7 @@ function processPatternMatching(statements) {
4140
4307
  }
4141
4308
  let errors = false;
4142
4309
  let isPattern = false;
4143
- if (clauses.some(($3) => $3.type === "PatternClause")) {
4310
+ if (clauses.some(($4) => $4.type === "PatternClause")) {
4144
4311
  isPattern = true;
4145
4312
  for (let i2 = 0, len1 = clauses.length; i2 < len1; i2++) {
4146
4313
  const c = clauses[i2];
@@ -4178,7 +4345,7 @@ function processPatternMatching(statements) {
4178
4345
  }
4179
4346
  let { patterns, block } = c;
4180
4347
  let pattern = patterns[0];
4181
- const conditionExpression = flatJoin(patterns.map(($4) => getPatternConditions($4, ref)).map(($5) => flatJoin($5, " && ")), " || ");
4348
+ const conditionExpression = flatJoin(patterns.map(($5) => getPatternConditions($5, ref)).map(($6) => flatJoin($6, " && ")), " || ");
4182
4349
  const condition2 = makeNode({
4183
4350
  type: "ParenthesizedExpression",
4184
4351
  children: ["(", ...refAssignmentComma, conditionExpression, ")"],
@@ -4371,38 +4538,59 @@ function getPatternBlockPrefix(pattern, ref, decl = "const ", suffix) {
4371
4538
  }
4372
4539
  }
4373
4540
  let [splices, thisAssignments] = gatherBindingCode(pattern);
4374
- const patternBindings = nonMatcherBindings(pattern);
4541
+ const patternBindings2 = nonMatcherBindings(pattern);
4375
4542
  splices = splices.map((s) => [", ", nonMatcherBindings(s)]);
4376
- thisAssignments = thisAssignments.map(($6) => ["", $6, ";"]);
4377
- const duplicateDeclarations = aggregateDuplicateBindings([patternBindings, splices]);
4543
+ thisAssignments = thisAssignments.map(($7) => ["", $7, ";"]);
4544
+ const duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices]);
4378
4545
  return [
4379
4546
  ["", {
4380
4547
  type: "Declaration",
4381
- children: [decl, patternBindings, suffix, " = ", ref, ...splices],
4548
+ children: [decl, patternBindings2, suffix, " = ", ref, ...splices],
4382
4549
  names: [],
4383
4550
  bindings: []
4384
4551
  // avoid implicit return of any bindings
4385
4552
  }, ";"],
4386
4553
  ...thisAssignments,
4387
- ...duplicateDeclarations.map(($7) => ["", $7, ";"])
4554
+ ...duplicateDeclarations.map(($8) => ["", $8, ";"])
4388
4555
  ];
4389
4556
  }
4390
4557
  function elideMatchersFromArrayBindings(elements) {
4391
- return elements.map((el) => {
4392
- if (el.type === "BindingRestElement") {
4393
- return ["", el, void 0];
4394
- }
4395
- const { children: [ws, e, delim] } = el;
4396
- switch (e.type) {
4397
- case "Literal":
4398
- case "RegularExpressionLiteral":
4399
- case "StringLiteral":
4400
- case "PinPattern":
4401
- return delim;
4402
- default:
4403
- return [ws, nonMatcherBindings(e), delim];
4558
+ const results = [];
4559
+ for (let i5 = 0, len4 = elements.length; i5 < len4; i5++) {
4560
+ const element = elements[i5];
4561
+ switch (element.type) {
4562
+ case "BindingRestElement":
4563
+ case "ElisionElement": {
4564
+ results.push(element);
4565
+ break;
4566
+ }
4567
+ case "BindingElement": {
4568
+ switch (element.binding.type) {
4569
+ case "Literal":
4570
+ case "RegularExpressionLiteral":
4571
+ case "StringLiteral":
4572
+ case "PinPattern": {
4573
+ results.push(element.delim);
4574
+ break;
4575
+ }
4576
+ default: {
4577
+ const binding = nonMatcherBindings(element.binding);
4578
+ results.push(makeNode({
4579
+ ...element,
4580
+ binding,
4581
+ children: element.children.map((c) => {
4582
+ return c === element.binding ? binding : c;
4583
+ })
4584
+ }));
4585
+ }
4586
+ }
4587
+ ;
4588
+ break;
4589
+ }
4404
4590
  }
4405
- });
4591
+ }
4592
+ ;
4593
+ return results;
4406
4594
  }
4407
4595
  function elideMatchersFromPropertyBindings(properties) {
4408
4596
  return properties.map((p) => {
@@ -4410,6 +4598,10 @@ function elideMatchersFromPropertyBindings(properties) {
4410
4598
  case "BindingProperty": {
4411
4599
  const { children, name, value } = p;
4412
4600
  const [ws] = children;
4601
+ const shouldElide = name.type === "NumericLiteral" && !value?.name || name.type === "ComputedPropertyName" && value?.subtype === "NumericLiteral";
4602
+ if (shouldElide) {
4603
+ return;
4604
+ }
4413
4605
  switch (value && value.type) {
4414
4606
  case "ArrayBindingPattern":
4415
4607
  case "ObjectBindingPattern": {
@@ -4441,32 +4633,22 @@ function elideMatchersFromPropertyBindings(properties) {
4441
4633
  }
4442
4634
  function nonMatcherBindings(pattern) {
4443
4635
  switch (pattern.type) {
4444
- case "ArrayBindingPattern": {
4636
+ case "ArrayBindingPattern":
4637
+ case "PostRestBindingElements": {
4445
4638
  const elements = elideMatchersFromArrayBindings(pattern.elements);
4446
- return {
4639
+ return makeNode({
4447
4640
  ...pattern,
4448
4641
  elements,
4449
- children: pattern.children.map(($8) => $8 === pattern.elements ? elements : $8)
4450
- };
4451
- }
4452
- case "PostRestBindingElements": {
4453
- const els = elideMatchersFromArrayBindings(pattern.children[1]);
4454
- return {
4455
- ...pattern,
4456
- children: [
4457
- pattern.children[0],
4458
- els,
4459
- ...pattern.children.slice(2)
4460
- ]
4461
- };
4642
+ children: pattern.children.map(($9) => $9 === pattern.elements ? elements : $9)
4643
+ });
4462
4644
  }
4463
4645
  case "ObjectBindingPattern": {
4464
4646
  const properties = elideMatchersFromPropertyBindings(pattern.properties);
4465
- return {
4647
+ return makeNode({
4466
4648
  ...pattern,
4467
4649
  properties,
4468
- children: pattern.children.map(($9) => $9 === pattern.properties ? properties : $9)
4469
- };
4650
+ children: pattern.children.map(($10) => $10 === pattern.properties ? properties : $10)
4651
+ });
4470
4652
  }
4471
4653
  default: {
4472
4654
  return pattern;
@@ -4474,32 +4656,26 @@ function nonMatcherBindings(pattern) {
4474
4656
  }
4475
4657
  }
4476
4658
  function aggregateDuplicateBindings(bindings) {
4477
- const props = gatherRecursiveAll(bindings, ($10) => $10.type === "BindingProperty");
4478
- const arrayBindings = gatherRecursiveAll(bindings, ($11) => $11.type === "ArrayBindingPattern");
4479
- for (let i5 = 0, len4 = arrayBindings.length; i5 < len4; i5++) {
4480
- const { elements } = arrayBindings[i5];
4481
- for (let i6 = 0, len5 = elements.length; i6 < len5; i6++) {
4482
- const element = elements[i6];
4483
- if (Array.isArray(element)) {
4484
- const [, e] = element;
4485
- if (e.type === "Identifier") {
4486
- props.push(e);
4487
- } else if (e.type === "BindingRestElement") {
4488
- props.push(e);
4489
- }
4490
- }
4491
- }
4492
- }
4659
+ const props = gatherRecursiveAll(
4660
+ bindings,
4661
+ ($) => $.type === "BindingProperty" || // Don't deduplicate ...rest properties; user should do so manually
4662
+ // because ...rest can be named arbitrarily
4663
+ //$.type is "BindingRestProperty"
4664
+ $.type === "Identifier" && $.parent?.type === "BindingElement" || $.type === "BindingRestElement"
4665
+ );
4493
4666
  const declarations = [];
4494
4667
  const propsGroupedByName = /* @__PURE__ */ new Map();
4495
- for (let i7 = 0, len6 = props.length; i7 < len6; i7++) {
4496
- const p = props[i7];
4668
+ for (let i6 = 0, len5 = props.length; i6 < len5; i6++) {
4669
+ const p = props[i6];
4497
4670
  const { name, value } = p;
4498
4671
  let m1;
4499
4672
  if (m1 = value?.type, m1 === "ArrayBindingPattern" || m1 === "ObjectBindingPattern") {
4500
4673
  continue;
4501
4674
  }
4502
4675
  const key = value?.name || name?.name || name;
4676
+ if (key?.type === "NumericLiteral" || key?.type === "ComputedPropertyName") {
4677
+ continue;
4678
+ }
4503
4679
  if (propsGroupedByName.has(key)) {
4504
4680
  propsGroupedByName.get(key).push(p);
4505
4681
  } else {
@@ -4515,8 +4691,8 @@ function aggregateDuplicateBindings(bindings) {
4515
4691
  pos: 0,
4516
4692
  input: key
4517
4693
  })) {
4518
- for (let i8 = 0, len7 = shared.length; i8 < len7; i8++) {
4519
- const p = shared[i8];
4694
+ for (let i7 = 0, len6 = shared.length; i7 < len6; i7++) {
4695
+ const p = shared[i7];
4520
4696
  aliasBinding(p, makeRef(`_${key}`, key));
4521
4697
  }
4522
4698
  return;
@@ -5217,7 +5393,6 @@ function processUnaryNestedExpression(pre, args, post) {
5217
5393
 
5218
5394
  // source/parser/pipe.civet
5219
5395
  function constructInvocation(fn, arg) {
5220
- const fnArr = [fn.leadingComment, fn.expr, fn.trailingComment];
5221
5396
  let expr = fn.expr;
5222
5397
  while (expr.type === "ParenthesizedExpression") {
5223
5398
  expr = expr.expression;
@@ -5234,22 +5409,46 @@ function constructInvocation(fn, arg) {
5234
5409
  });
5235
5410
  }
5236
5411
  expr = fn.expr;
5237
- const lhs = makeLeftHandSideExpression(expr);
5412
+ let lhs = expr;
5413
+ if (!(lhs.type === "NewExpression")) {
5414
+ lhs = makeLeftHandSideExpression(lhs);
5415
+ }
5238
5416
  let comment = skipIfOnlyWS(fn.trailingComment);
5239
5417
  if (comment)
5240
- lhs.children.splice(2, 0, comment);
5418
+ lhs.children.push(comment);
5241
5419
  comment = skipIfOnlyWS(fn.leadingComment);
5242
5420
  if (comment)
5243
5421
  lhs.children.splice(1, 0, comment);
5244
5422
  switch (arg.type) {
5245
- case "CommaExpression":
5423
+ case "CommaExpression": {
5246
5424
  arg = makeLeftHandSideExpression(arg);
5247
5425
  break;
5426
+ }
5248
5427
  }
5249
- return {
5250
- type: "CallExpression",
5251
- children: [lhs, "(", arg, ")"]
5428
+ const args = [arg];
5429
+ const call = {
5430
+ type: "Call",
5431
+ args,
5432
+ children: ["(", args, ")"]
5252
5433
  };
5434
+ if (lhs.type === "NewExpression") {
5435
+ let { expression } = lhs;
5436
+ expression = {
5437
+ ...expression,
5438
+ type: "CallExpression",
5439
+ children: [...expression.children, call]
5440
+ };
5441
+ return {
5442
+ ...lhs,
5443
+ expression,
5444
+ children: lhs.children.map(($) => $ === lhs.expression ? expression : $)
5445
+ };
5446
+ } else {
5447
+ return {
5448
+ type: "CallExpression",
5449
+ children: [lhs, call]
5450
+ };
5451
+ }
5253
5452
  }
5254
5453
  function constructPipeStep(fn, arg, returning) {
5255
5454
  if (!returning) {
@@ -5296,21 +5495,24 @@ function processPipelineExpressions(statements) {
5296
5495
  let i = 0, l = body.length;
5297
5496
  const children = [ws];
5298
5497
  let usingRef = null;
5299
- for (i = 0; i < l; i++) {
5300
- const step = body[i];
5498
+ for (let i1 = 0, len3 = body.length; i1 < len3; i1++) {
5499
+ const i2 = i1;
5500
+ const step = body[i1];
5301
5501
  const [leadingComment, pipe, trailingComment, expr] = step;
5302
5502
  const returns = pipe.token === "||>";
5303
5503
  let ref, result, returning = returns ? arg : null;
5304
5504
  if (pipe.token === "|>=") {
5305
5505
  let initRef;
5306
- if (i === 0) {
5506
+ if (i2 === 0) {
5307
5507
  checkValidLHS(arg);
5308
5508
  outer:
5309
5509
  switch (arg.type) {
5310
- case "MemberExpression":
5311
- if (arg.children.length <= 2)
5510
+ case "MemberExpression": {
5511
+ if (arg.children.length <= 2) {
5312
5512
  break;
5313
- case "CallExpression":
5513
+ }
5514
+ }
5515
+ case "CallExpression": {
5314
5516
  const access = arg.children.pop();
5315
5517
  usingRef = makeRef();
5316
5518
  initRef = {
@@ -5322,6 +5524,7 @@ function processPipelineExpressions(statements) {
5322
5524
  children: [usingRef, access]
5323
5525
  };
5324
5526
  break;
5527
+ }
5325
5528
  }
5326
5529
  const lhs = [[
5327
5530
  [initRef],
@@ -5350,7 +5553,7 @@ function processPipelineExpressions(statements) {
5350
5553
  });
5351
5554
  }
5352
5555
  } else {
5353
- if (i === 0)
5556
+ if (i2 === 0)
5354
5557
  s.children = children;
5355
5558
  }
5356
5559
  if (returns && (ref = needsRef(arg))) {
@@ -5375,7 +5578,7 @@ function processPipelineExpressions(statements) {
5375
5578
  returning
5376
5579
  );
5377
5580
  if (result.type === "ReturnStatement") {
5378
- if (i < l - 1) {
5581
+ if (i2 < l - 1) {
5379
5582
  result.children.push({
5380
5583
  type: "Error",
5381
5584
  message: "Can't continue a pipeline after returning"
@@ -5403,7 +5606,7 @@ function processPipelineExpressions(statements) {
5403
5606
  };
5404
5607
  }
5405
5608
  children.push(arg);
5406
- if (!children.some(($) => $?.type === "ReturnStatement") && children.some(($1) => $1 === ",")) {
5609
+ if (!children.some(($1) => $1?.type === "ReturnStatement") && children.some(($2) => $2 === ",")) {
5407
5610
  const { parent } = s;
5408
5611
  const parenthesizedExpression = makeLeftHandSideExpression({ ...s });
5409
5612
  Object.assign(s, parenthesizedExpression, {
@@ -5689,7 +5892,8 @@ function processForInOf($0) {
5689
5892
  blockPrefix.push(["", {
5690
5893
  type: "Declaration",
5691
5894
  children: [declaration, " = ", trimFirstSpace(expRef2), "[", counterRef, "]"],
5692
- names: assignmentNames
5895
+ names: assignmentNames,
5896
+ implicitLift: true
5693
5897
  }, ";"]);
5694
5898
  declaration = {
5695
5899
  type: "Declaration",
@@ -6542,11 +6746,11 @@ function processCallMemberExpression(node) {
6542
6746
  if (glob?.type === "PropertyGlob") {
6543
6747
  let prefix = children.slice(0, i);
6544
6748
  const parts = [];
6545
- let refAssignmentComma;
6546
- if (prefix.length > 1) {
6547
- const ref = makeRef();
6548
- ({ refAssignmentComma } = makeRefAssignment(ref, prefix));
6549
- prefix = [ref];
6749
+ let ref;
6750
+ if (prefix.length > 1 && glob.object.properties.length > 1) {
6751
+ ref = makeRef();
6752
+ const { refAssignment } = makeRefAssignment(ref, prefix);
6753
+ prefix = [makeLeftHandSideExpression(refAssignment)];
6550
6754
  }
6551
6755
  prefix = prefix.concat(glob.dot);
6552
6756
  for (const part of glob.object.properties) {
@@ -6578,6 +6782,9 @@ function processCallMemberExpression(node) {
6578
6782
  }
6579
6783
  if (!suppressPrefix) {
6580
6784
  value = prefix.concat(trimFirstSpace(value));
6785
+ if (ref != null) {
6786
+ prefix = [ref].concat(glob.dot);
6787
+ }
6581
6788
  }
6582
6789
  if (wValue)
6583
6790
  value.unshift(wValue);
@@ -6588,7 +6795,8 @@ function processCallMemberExpression(node) {
6588
6795
  dots: part.dots,
6589
6796
  delim: part.delim,
6590
6797
  names: part.names,
6591
- children: part.children.slice(0, 2).concat(value, part.delim)
6798
+ children: part.children.slice(0, 2).concat(value, part.delim),
6799
+ usesRef: Boolean(ref)
6592
6800
  });
6593
6801
  } else {
6594
6802
  parts.push({
@@ -6605,12 +6813,13 @@ function processCallMemberExpression(node) {
6605
6813
  value,
6606
6814
  part.delim
6607
6815
  // comma delimiter
6608
- ]
6816
+ ],
6817
+ usesRef: Boolean(ref)
6609
6818
  });
6610
6819
  }
6611
6820
  }
6612
6821
  let ref2;
6613
- let object = {
6822
+ const object = {
6614
6823
  type: "ObjectExpression",
6615
6824
  children: [
6616
6825
  glob.object.children[0],
@@ -6621,13 +6830,6 @@ function processCallMemberExpression(node) {
6621
6830
  ],
6622
6831
  properties: parts
6623
6832
  };
6624
- if (refAssignmentComma) {
6625
- object = makeNode({
6626
- type: "ParenthesizedExpression",
6627
- children: ["(", ...refAssignmentComma, object, ")"],
6628
- expression: object
6629
- });
6630
- }
6631
6833
  if (i === children.length - 1)
6632
6834
  return object;
6633
6835
  return processCallMemberExpression({
@@ -6779,19 +6981,19 @@ function lastAccessInCallExpression(exp) {
6779
6981
  }
6780
6982
  function convertMethodToFunction(method) {
6781
6983
  const { signature, block } = method;
6782
- let { modifier, optional } = signature;
6783
- if (optional)
6984
+ const { async, modifier, optional } = signature;
6985
+ if (optional) {
6784
6986
  return;
6785
- if (modifier) {
6786
- if (modifier.get || modifier.set) {
6787
- return;
6788
- } else if (modifier.async) {
6789
- modifier = [modifier.children[0][0], " function ", ...modifier.children.slice(1)];
6790
- } else {
6791
- modifier = ["function ", ...modifier.children || []];
6987
+ }
6988
+ if (modifier?.get || modifier?.set) {
6989
+ return;
6990
+ }
6991
+ const func = ["function "];
6992
+ if (async != null) {
6993
+ func.unshift(async);
6994
+ if (async.length && !async[async.length - 1]?.length) {
6995
+ async.push(" ");
6792
6996
  }
6793
- } else {
6794
- modifier = "function ";
6795
6997
  }
6796
6998
  return {
6797
6999
  ...signature,
@@ -6799,7 +7001,7 @@ function convertMethodToFunction(method) {
6799
7001
  signature,
6800
7002
  type: "FunctionExpression",
6801
7003
  children: [
6802
- [modifier, ...signature.children.slice(1)],
7004
+ [...func, ...signature.children.slice(1)],
6803
7005
  block
6804
7006
  ],
6805
7007
  block
@@ -6837,40 +7039,54 @@ function convertNamedImportsToObject(node, pattern) {
6837
7039
  };
6838
7040
  }
6839
7041
  function convertObjectToJSXAttributes(obj) {
6840
- const { properties } = obj;
6841
7042
  const parts = [];
6842
7043
  const rest = [];
6843
- for (let i = 0; i < properties.length; i++) {
7044
+ let i4 = 0;
7045
+ for (const part of obj.properties) {
7046
+ const i = i4++;
7047
+ if (part.usesRef) {
7048
+ rest.push(part);
7049
+ continue;
7050
+ }
6844
7051
  if (i > 0)
6845
7052
  parts.push(" ");
6846
- const part = properties[i];
6847
7053
  switch (part.type) {
6848
- case "Identifier":
7054
+ case "Identifier": {
6849
7055
  parts.push([part.name, "={", part.name, "}"]);
6850
7056
  break;
6851
- case "Property":
7057
+ }
7058
+ case "Property": {
6852
7059
  if (part.name.type === "ComputedPropertyName") {
6853
7060
  rest.push(part);
6854
7061
  } else {
6855
7062
  parts.push([part.name, "={", trimFirstSpace(part.value), "}"]);
6856
7063
  }
7064
+ ;
6857
7065
  break;
6858
- case "SpreadProperty":
7066
+ }
7067
+ case "SpreadProperty": {
6859
7068
  parts.push(["{", part.dots, part.value, "}"]);
6860
7069
  break;
6861
- case "MethodDefinition":
7070
+ }
7071
+ case "MethodDefinition": {
6862
7072
  const func = convertMethodToFunction(part);
6863
7073
  if (func) {
6864
7074
  parts.push([part.name, "={", convertMethodToFunction(part), "}"]);
6865
7075
  } else {
6866
7076
  rest.push(part);
6867
7077
  }
7078
+ ;
6868
7079
  break;
6869
- default:
7080
+ }
7081
+ default: {
6870
7082
  throw new Error(`invalid object literal type in JSX attribute: ${part.type}`);
7083
+ }
6871
7084
  }
6872
7085
  }
6873
7086
  if (rest.length) {
7087
+ if (parts.length && parts[parts.length - 1] !== " ") {
7088
+ parts.push(" ");
7089
+ }
6874
7090
  parts.push(["{...{", ...rest, "}}"]);
6875
7091
  }
6876
7092
  return parts;
@@ -6899,7 +7115,8 @@ function makeGetterMethod(name, ws, value, returnType, block, kind = { token: "g
6899
7115
  block = {
6900
7116
  type: "BlockStatement",
6901
7117
  expressions,
6902
- children: ["{ ", expressions, " }"]
7118
+ children: ["{ ", expressions, " }"],
7119
+ bare: false
6903
7120
  };
6904
7121
  }
6905
7122
  if (autoReturn) {
@@ -6931,7 +7148,7 @@ function processBindingPatternLHS(lhs, tail) {
6931
7148
  tail.push(...splices.map((s) => [", ", s]), ...thisAssignments.map((a) => [", ", a]));
6932
7149
  }
6933
7150
  function processAssignments(statements) {
6934
- for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i4 = 0, len3 = ref7.length; i4 < len3; i4++) {
7151
+ for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len3 = ref7.length; i5 < len3; i5++) {
6935
7152
  let extractAssignment2 = function(lhs) {
6936
7153
  let expr = lhs;
6937
7154
  while (expr.type === "ParenthesizedExpression") {
@@ -6952,7 +7169,7 @@ function processAssignments(statements) {
6952
7169
  return;
6953
7170
  };
6954
7171
  var extractAssignment = extractAssignment2;
6955
- const exp = ref7[i4];
7172
+ const exp = ref7[i5];
6956
7173
  checkValidLHS(exp.assigned);
6957
7174
  const pre = [], post = [];
6958
7175
  let ref8;
@@ -6961,8 +7178,8 @@ function processAssignments(statements) {
6961
7178
  if (!exp.lhs) {
6962
7179
  continue;
6963
7180
  }
6964
- for (let ref9 = exp.lhs, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
6965
- const lhsPart = ref9[i5];
7181
+ for (let ref9 = exp.lhs, i6 = 0, len4 = ref9.length; i6 < len4; i6++) {
7182
+ const lhsPart = ref9[i6];
6966
7183
  let ref10;
6967
7184
  if (ref10 = extractAssignment2(lhsPart[1])) {
6968
7185
  const newLhs = ref10;
@@ -7006,8 +7223,8 @@ function processAssignments(statements) {
7006
7223
  }
7007
7224
  }
7008
7225
  }
7009
- for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i6 = 0, len5 = ref11.length; i6 < len5; i6++) {
7010
- const exp = ref11[i6];
7226
+ for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len5 = ref11.length; i7 < len5; i7++) {
7227
+ const exp = ref11[i7];
7011
7228
  if (!(exp.names === null)) {
7012
7229
  continue;
7013
7230
  }
@@ -7244,101 +7461,149 @@ function attachPostfixStatementAsExpression(exp, post) {
7244
7461
  }
7245
7462
  }
7246
7463
  function processTypes(node) {
7247
- return gatherRecursiveAll(node, (n) => n.type === "TypeUnary").forEach((unary) => {
7248
- if (!unary.suffix.length) {
7249
- return;
7250
- }
7251
- let ref16;
7252
- let m4;
7253
- if (m4 = (ref16 = unary.suffix)[ref16.length - 1], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
7254
- const { token } = m4;
7255
- let last;
7256
- let count = 0;
7257
- let ref17;
7258
- while (unary.suffix.length && (ref17 = unary.suffix)[ref17.length - 1]?.token === "?") {
7259
- last = unary.suffix.pop();
7260
- count++;
7261
- }
7262
- let ref18;
7263
- while (unary.suffix.length && (ref18 = unary.suffix)[ref18.length - 1]?.type === "NonNullAssertion") {
7264
- unary.suffix.pop();
7265
- }
7266
- let ref19;
7267
- if (unary.suffix.length || unary.prefix.length)
7268
- ref19 = unary;
7269
- else
7270
- ref19 = unary.t;
7271
- const t = ref19;
7272
- if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
7273
- if (count === 1) {
7274
- unary.suffix.push(last);
7275
- return;
7464
+ const results1 = [];
7465
+ for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len6 = ref16.length; i8 < len6; i8++) {
7466
+ const unary = ref16[i8];
7467
+ let suffixIndex = unary.suffix.length - 1;
7468
+ const results2 = [];
7469
+ while (suffixIndex >= 0) {
7470
+ const suffix = unary.suffix[suffixIndex];
7471
+ if (typeof suffix === "object" && suffix != null && "token" in suffix && suffix.token === "?") {
7472
+ const { token } = suffix;
7473
+ let count = 0;
7474
+ let m4;
7475
+ while (m4 = unary.suffix[suffixIndex], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
7476
+ unary.suffix.splice(suffixIndex--, 1);
7477
+ count++;
7276
7478
  }
7277
- replaceNode(unary, [
7278
- getTrimmingSpace(unary),
7279
- "(",
7280
- parenthesizeType(trimFirstSpace(t)),
7281
- " | null)",
7282
- last
7283
- ]);
7284
- } else {
7285
- replaceNode(unary, {
7286
- type: "TypeParenthesized",
7479
+ let m5;
7480
+ while (m5 = unary.suffix[suffixIndex], typeof m5 === "object" && m5 != null && "type" in m5 && m5.type === "NonNullAssertion") {
7481
+ unary.suffix.splice(suffixIndex--, 1);
7482
+ }
7483
+ const { parent, prefix } = unary;
7484
+ unary.prefix = [];
7485
+ unary.children = unary.children.filter((a1) => a1 !== prefix);
7486
+ const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
7487
+ const space = getTrimmingSpace(unary);
7488
+ let replace;
7489
+ if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
7490
+ if (count === 1) {
7491
+ unary.suffix.splice(suffixIndex + 1, 0, suffix);
7492
+ continue;
7493
+ }
7494
+ inplaceInsertTrimmingSpace(unary, "");
7495
+ const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
7496
+ replace = [
7497
+ space,
7498
+ "(",
7499
+ t,
7500
+ " | null)",
7501
+ suffix
7502
+ ];
7503
+ } else {
7504
+ inplaceInsertTrimmingSpace(unary, "");
7505
+ const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
7506
+ replace = makeNode({
7507
+ type: "TypeParenthesized",
7508
+ ts: true,
7509
+ children: [
7510
+ space,
7511
+ "(",
7512
+ t,
7513
+ count === 1 ? " | undefined" : " | undefined | null",
7514
+ ")"
7515
+ ]
7516
+ });
7517
+ }
7518
+ if (prefix.length || outer.length) {
7519
+ replace = makeNode({
7520
+ type: "TypeUnary",
7521
+ ts: true,
7522
+ t: replace,
7523
+ prefix,
7524
+ suffix: outer,
7525
+ children: [prefix, replace, outer]
7526
+ });
7527
+ }
7528
+ results2.push(replaceNode(unary, replace, parent));
7529
+ } else if (typeof suffix === "object" && suffix != null && "type" in suffix && suffix.type === "NonNullAssertion") {
7530
+ const { type } = suffix;
7531
+ let m6;
7532
+ while (m6 = unary.suffix[suffixIndex], typeof m6 === "object" && m6 != null && "type" in m6 && m6.type === "NonNullAssertion") {
7533
+ unary.suffix.splice(suffixIndex--, 1);
7534
+ }
7535
+ let m7;
7536
+ while (m7 = unary.suffix[suffixIndex], typeof m7 === "object" && m7 != null && "token" in m7 && m7.token === "?") {
7537
+ unary.suffix.splice(suffixIndex--, 1);
7538
+ }
7539
+ const { parent, prefix } = unary;
7540
+ unary.prefix = [];
7541
+ unary.children = unary.children.filter((a2) => a2 !== prefix);
7542
+ const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
7543
+ const space = getTrimmingSpace(unary);
7544
+ inplaceInsertTrimmingSpace(unary, "");
7545
+ let ref17;
7546
+ if (unary.suffix.length)
7547
+ ref17 = unary;
7548
+ else
7549
+ ref17 = unary.t;
7550
+ const t = ref17;
7551
+ const arg = makeNode({
7552
+ type: "TypeArgument",
7553
+ ts: true,
7554
+ t,
7555
+ children: [t]
7556
+ });
7557
+ const argArray = [arg];
7558
+ const args = makeNode({
7559
+ type: "TypeArguments",
7287
7560
  ts: true,
7561
+ args: argArray,
7562
+ children: ["<", argArray, ">"]
7563
+ });
7564
+ let replace = makeNode({
7565
+ type: "TypeIdentifier",
7566
+ raw: "NonNullable",
7567
+ args,
7288
7568
  children: [
7289
- getTrimmingSpace(unary),
7290
- "(",
7291
- parenthesizeType(trimFirstSpace(t)),
7292
- count === 1 ? " | undefined" : " | undefined | null",
7293
- ")"
7569
+ space,
7570
+ "NonNullable",
7571
+ args
7294
7572
  ]
7295
7573
  });
7574
+ if (prefix.length || outer.length) {
7575
+ replace = makeNode({
7576
+ type: "TypeUnary",
7577
+ ts: true,
7578
+ t: replace,
7579
+ prefix,
7580
+ suffix: outer,
7581
+ children: [prefix, replace, outer]
7582
+ });
7583
+ }
7584
+ results2.push(replaceNode(unary, replace, parent));
7585
+ } else {
7586
+ results2.push(suffixIndex--);
7296
7587
  }
7297
- } else if (typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "NonNullAssertion") {
7298
- const { type } = m4;
7299
- let ref20;
7300
- while (unary.suffix.length && (ref20 = unary.suffix)[ref20.length - 1]?.type === "NonNullAssertion") {
7301
- unary.suffix.pop();
7302
- }
7303
- let ref21;
7304
- while (unary.suffix.length && (ref21 = unary.suffix)[ref21.length - 1]?.token === "?") {
7305
- unary.suffix.pop();
7306
- }
7307
- const t = trimFirstSpace(
7308
- unary.suffix.length || unary.prefix.length ? unary : unary.t
7309
- );
7310
- const args = {
7311
- type: "TypeArguments",
7312
- ts: true,
7313
- types: [t],
7314
- children: ["<", t, ">"]
7315
- };
7316
- replaceNode(unary, {
7317
- type: "TypeIdentifier",
7318
- raw: "NonNullable",
7319
- args,
7320
- children: [
7321
- getTrimmingSpace(unary),
7322
- "NonNullable",
7323
- args
7324
- ]
7325
- });
7326
7588
  }
7327
- });
7589
+ results1.push(results2);
7590
+ }
7591
+ ;
7592
+ return results1;
7328
7593
  }
7329
7594
  function processStatementExpressions(statements) {
7330
- for (let ref22 = gatherRecursiveAll(statements, ($11) => $11.type === "StatementExpression"), i7 = 0, len6 = ref22.length; i7 < len6; i7++) {
7331
- const exp = ref22[i7];
7595
+ for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len7 = ref18.length; i9 < len7; i9++) {
7596
+ const exp = ref18[i9];
7332
7597
  const { maybe, statement } = exp;
7333
7598
  if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
7334
7599
  replaceNode(exp, statement);
7335
7600
  continue;
7336
7601
  }
7337
- let ref23;
7602
+ let ref19;
7338
7603
  switch (statement.type) {
7339
7604
  case "IfStatement": {
7340
- if (ref23 = expressionizeIfStatement(statement)) {
7341
- const expression = ref23;
7605
+ if (ref19 = expressionizeIfStatement(statement)) {
7606
+ const expression = ref19;
7342
7607
  replaceNode(statement, expression, exp);
7343
7608
  } else {
7344
7609
  replaceNode(statement, wrapIIFE([["", statement]]), exp);
@@ -7396,13 +7661,13 @@ function processNegativeIndexAccess(statements) {
7396
7661
  });
7397
7662
  }
7398
7663
  function processFinallyClauses(statements) {
7399
- for (let ref24 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i8 = 0, len7 = ref24.length; i8 < len7; i8++) {
7400
- let f = ref24[i8];
7401
- let ref25;
7402
- if (!((ref25 = blockContainingStatement(f)) && typeof ref25 === "object" && "block" in ref25 && "index" in ref25)) {
7664
+ for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len8 = ref20.length; i10 < len8; i10++) {
7665
+ let f = ref20[i10];
7666
+ let ref21;
7667
+ if (!((ref21 = blockContainingStatement(f)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21)) {
7403
7668
  throw new Error("finally clause must be inside try statement or block");
7404
7669
  }
7405
- const { block, index } = ref25;
7670
+ const { block, index } = ref21;
7406
7671
  const indent = block.expressions[index][0];
7407
7672
  const expressions = block.expressions.slice(index + 1);
7408
7673
  const t = makeNode({
@@ -7439,7 +7704,7 @@ function processProgram(root) {
7439
7704
  if (config2.iife || config2.repl) {
7440
7705
  rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
7441
7706
  const newExpressions = [["", rootIIFE]];
7442
- root.children = root.children.map(($12) => $12 === root.expressions ? newExpressions : $12);
7707
+ root.children = root.children.map(($13) => $13 === root.expressions ? newExpressions : $13);
7443
7708
  root.expressions = newExpressions;
7444
7709
  }
7445
7710
  addParentPointers(root);
@@ -7480,10 +7745,10 @@ async function processProgramAsync(root) {
7480
7745
  await processComptime(statements);
7481
7746
  }
7482
7747
  function processRepl(root, rootIIFE) {
7483
- const topBlock = gatherRecursive(rootIIFE, ($13) => $13.type === "BlockStatement")[0];
7748
+ const topBlock = gatherRecursive(rootIIFE, ($14) => $14.type === "BlockStatement")[0];
7484
7749
  let i = 0;
7485
- for (let ref26 = gatherRecursiveWithinFunction(topBlock, ($14) => $14.type === "Declaration"), i9 = 0, len8 = ref26.length; i9 < len8; i9++) {
7486
- const decl = ref26[i9];
7750
+ for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($15) => $15.type === "Declaration"), i11 = 0, len9 = ref22.length; i11 < len9; i11++) {
7751
+ const decl = ref22[i11];
7487
7752
  if (!decl.names?.length) {
7488
7753
  continue;
7489
7754
  }
@@ -7496,8 +7761,8 @@ function processRepl(root, rootIIFE) {
7496
7761
  root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]);
7497
7762
  }
7498
7763
  }
7499
- for (let ref27 = gatherRecursive(topBlock, ($15) => $15.type === "FunctionExpression"), i10 = 0, len9 = ref27.length; i10 < len9; i10++) {
7500
- const func = ref27[i10];
7764
+ for (let ref23 = gatherRecursive(topBlock, ($16) => $16.type === "FunctionExpression"), i12 = 0, len10 = ref23.length; i12 < len10; i12++) {
7765
+ const func = ref23[i12];
7501
7766
  if (func.name && func.parent?.type === "BlockStatement") {
7502
7767
  if (func.parent === topBlock) {
7503
7768
  replaceNode(func, void 0);
@@ -7509,17 +7774,17 @@ function processRepl(root, rootIIFE) {
7509
7774
  }
7510
7775
  }
7511
7776
  }
7512
- for (let ref28 = gatherRecursiveWithinFunction(topBlock, ($16) => $16.type === "ClassExpression"), i11 = 0, len10 = ref28.length; i11 < len10; i11++) {
7513
- const classExp = ref28[i11];
7514
- let m5;
7515
- 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)) {
7777
+ for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($17) => $17.type === "ClassExpression"), i13 = 0, len11 = ref24.length; i13 < len11; i13++) {
7778
+ const classExp = ref24[i13];
7779
+ let m8;
7780
+ 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)) {
7516
7781
  classExp.children.unshift(classExp.name, "=");
7517
7782
  root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]);
7518
7783
  }
7519
7784
  }
7520
7785
  }
7521
7786
  function populateRefs(statements) {
7522
- const refNodes = gatherRecursive(statements, ($17) => $17.type === "Ref");
7787
+ const refNodes = gatherRecursive(statements, ($18) => $18.type === "Ref");
7523
7788
  if (refNodes.length) {
7524
7789
  const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
7525
7790
  const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
@@ -7542,8 +7807,8 @@ function populateRefs(statements) {
7542
7807
  function processPlaceholders(statements) {
7543
7808
  const placeholderMap = /* @__PURE__ */ new Map();
7544
7809
  const liftedIfs = /* @__PURE__ */ new Set();
7545
- for (let ref29 = gatherRecursiveAll(statements, ($18) => $18.type === "Placeholder"), i12 = 0, len11 = ref29.length; i12 < len11; i12++) {
7546
- const exp = ref29[i12];
7810
+ for (let ref25 = gatherRecursiveAll(statements, ($19) => $19.type === "Placeholder"), i14 = 0, len12 = ref25.length; i14 < len12; i14++) {
7811
+ const exp = ref25[i14];
7547
7812
  let ancestor;
7548
7813
  if (exp.subtype === ".") {
7549
7814
  ({ ancestor } = findAncestor(
@@ -7551,8 +7816,8 @@ function processPlaceholders(statements) {
7551
7816
  ($) => $.type === "Call" && !$.parent?.implicit
7552
7817
  ));
7553
7818
  ancestor = ancestor?.parent;
7554
- let m6;
7555
- while (ancestor?.parent != null && (m6 = ancestor.parent.type, m6 === "UnaryExpression" || m6 === "NewExpression" || m6 === "AwaitExpression" || m6 === "ThrowStatement" || m6 === "StatementExpression")) {
7819
+ let m9;
7820
+ while (ancestor?.parent != null && (m9 = ancestor.parent.type, m9 === "UnaryExpression" || m9 === "NewExpression" || m9 === "AwaitExpression" || m9 === "ThrowStatement" || m9 === "StatementExpression")) {
7556
7821
  ancestor = ancestor.parent;
7557
7822
  }
7558
7823
  if (!ancestor) {
@@ -7564,15 +7829,21 @@ function processPlaceholders(statements) {
7564
7829
  }
7565
7830
  } else {
7566
7831
  let child;
7832
+ let implicitLift;
7567
7833
  ({ ancestor, child } = findAncestor(exp, (ancestor2, child2) => {
7834
+ const prevImplicitLift = implicitLift;
7835
+ ({ implicitLift } = ancestor2);
7836
+ if (prevImplicitLift) {
7837
+ return;
7838
+ }
7568
7839
  const { type } = ancestor2;
7569
7840
  if (type === "IfStatement") {
7570
7841
  liftedIfs.add(ancestor2);
7571
7842
  }
7572
- let m7;
7573
- let m8;
7843
+ let m10;
7844
+ let m11;
7574
7845
  return type === "Call" && !ancestor2.parent?.implicit || // Block, except for if/else blocks when condition already lifted
7575
- 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
7846
+ 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
7576
7847
  type === "Initializer" || // Right-hand side of assignment
7577
7848
  type === "AssignmentExpression" && findChildIndex(ancestor2, child2) === ancestor2.children.indexOf(ancestor2.expression) || type === "ReturnStatement" || type === "YieldExpression";
7578
7849
  }));
@@ -7646,11 +7917,11 @@ function processPlaceholders(statements) {
7646
7917
  for (const [ancestor, placeholders] of placeholderMap) {
7647
7918
  let ref = makeRef("$");
7648
7919
  let typeSuffix;
7649
- for (let i13 = 0, len12 = placeholders.length; i13 < len12; i13++) {
7650
- const placeholder = placeholders[i13];
7920
+ for (let i15 = 0, len13 = placeholders.length; i15 < len13; i15++) {
7921
+ const placeholder = placeholders[i15];
7651
7922
  typeSuffix ??= placeholder.typeSuffix;
7652
- let ref30;
7653
- replaceNode((ref30 = placeholder.children)[ref30.length - 1], ref);
7923
+ let ref26;
7924
+ (ref26 = placeholder.children)[ref26.length - 1] = ref;
7654
7925
  }
7655
7926
  const { parent } = ancestor;
7656
7927
  const body = maybeUnwrap(ancestor);
@@ -7671,16 +7942,16 @@ function processPlaceholders(statements) {
7671
7942
  }
7672
7943
  case "PipelineExpression": {
7673
7944
  const i = findChildIndex(parent, ancestor);
7674
- let ref31;
7945
+ let ref27;
7675
7946
  if (i === 1) {
7676
- ref31 = ancestor === parent.children[i];
7947
+ ref27 = ancestor === parent.children[i];
7677
7948
  } else if (i === 2) {
7678
- ref31 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
7949
+ ref27 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
7679
7950
  } else {
7680
- ref31 = void 0;
7951
+ ref27 = void 0;
7681
7952
  }
7682
7953
  ;
7683
- outer = ref31;
7954
+ outer = ref27;
7684
7955
  break;
7685
7956
  }
7686
7957
  case "AssignmentExpression":
@@ -7695,9 +7966,9 @@ function processPlaceholders(statements) {
7695
7966
  fnExp = makeLeftHandSideExpression(fnExp);
7696
7967
  }
7697
7968
  replaceNode(ancestor, fnExp, parent);
7698
- let ref32;
7699
- if (ref32 = getTrimmingSpace(body)) {
7700
- const ws = ref32;
7969
+ let ref28;
7970
+ if (ref28 = getTrimmingSpace(body)) {
7971
+ const ws = ref28;
7701
7972
  inplaceInsertTrimmingSpace(body, "");
7702
7973
  inplacePrepend(ws, fnExp);
7703
7974
  }
@@ -7742,8 +8013,8 @@ function reorderBindingRestProperty(props) {
7742
8013
  }
7743
8014
  ];
7744
8015
  }
7745
- let ref33;
7746
- if (Array.isArray(rest.delim) && (ref33 = rest.delim)[ref33.length - 1]?.token === ",") {
8016
+ let ref29;
8017
+ if (Array.isArray(rest.delim) && (ref29 = rest.delim)[ref29.length - 1]?.token === ",") {
7747
8018
  rest.delim = rest.delim.slice(0, -1);
7748
8019
  rest.children = [...rest.children.slice(0, -1), rest.delim];
7749
8020
  }
@@ -7840,11 +8111,7 @@ var grammar = {
7840
8111
  ApplicationStart,
7841
8112
  ForbiddenImplicitCalls,
7842
8113
  ReservedBinary,
7843
- ArgumentsWithTrailingMemberExpressions,
7844
- TrailingMemberExpressions,
7845
- IndentedTrailingMemberExpressions,
7846
- NestedTrailingMemberExpression,
7847
- AllowedTrailingMemberExpressions,
8114
+ ArgumentsWithTrailingCallExpressions,
7848
8115
  TrailingCallExpressions,
7849
8116
  IndentedTrailingCallExpressions,
7850
8117
  NestedTrailingCallExpression,
@@ -7944,6 +8211,7 @@ var grammar = {
7944
8211
  LeftHandSideExpression,
7945
8212
  CallExpression,
7946
8213
  CallExpressionRest,
8214
+ ExplicitCallExpressionRest,
7947
8215
  OptionalShorthand,
7948
8216
  OptionalDot,
7949
8217
  NonNullAssertion,
@@ -7959,6 +8227,7 @@ var grammar = {
7959
8227
  ImplicitAccessStart,
7960
8228
  PropertyAccessModifier,
7961
8229
  PropertyAccess,
8230
+ ExplicitPropertyGlob,
7962
8231
  PropertyGlob,
7963
8232
  PropertyBind,
7964
8233
  SuperProperty,
@@ -8226,8 +8495,8 @@ var grammar = {
8226
8495
  Debugger,
8227
8496
  MaybeNestedNonPipelineExpression,
8228
8497
  MaybeNestedPostfixedExpression,
8498
+ NestedPostfixedExpressionNoTrailing,
8229
8499
  MaybeNestedExpression,
8230
- NestedExpression,
8231
8500
  MaybeParenNestedExpression,
8232
8501
  ImportDeclaration,
8233
8502
  ImpliedImport,
@@ -8781,125 +9050,126 @@ var $L123 = (0, import_lib2.$L)("sum");
8781
9050
  var $L124 = (0, import_lib2.$L)("product");
8782
9051
  var $L125 = (0, import_lib2.$L)("min");
8783
9052
  var $L126 = (0, import_lib2.$L)("max");
8784
- var $L127 = (0, import_lib2.$L)("break");
8785
- var $L128 = (0, import_lib2.$L)("continue");
8786
- var $L129 = (0, import_lib2.$L)("debugger");
8787
- var $L130 = (0, import_lib2.$L)("require");
8788
- var $L131 = (0, import_lib2.$L)("with");
8789
- var $L132 = (0, import_lib2.$L)("assert");
8790
- var $L133 = (0, import_lib2.$L)(":=");
8791
- var $L134 = (0, import_lib2.$L)("\u2254");
8792
- var $L135 = (0, import_lib2.$L)(".=");
8793
- var $L136 = (0, import_lib2.$L)("::=");
8794
- var $L137 = (0, import_lib2.$L)("/*");
8795
- var $L138 = (0, import_lib2.$L)("*/");
8796
- var $L139 = (0, import_lib2.$L)("\\");
8797
- var $L140 = (0, import_lib2.$L)(")");
8798
- var $L141 = (0, import_lib2.$L)("abstract");
8799
- var $L142 = (0, import_lib2.$L)("as");
8800
- var $L143 = (0, import_lib2.$L)("@");
8801
- var $L144 = (0, import_lib2.$L)("@@");
8802
- var $L145 = (0, import_lib2.$L)("async");
8803
- var $L146 = (0, import_lib2.$L)("await");
8804
- var $L147 = (0, import_lib2.$L)("`");
8805
- var $L148 = (0, import_lib2.$L)("by");
8806
- var $L149 = (0, import_lib2.$L)("case");
8807
- var $L150 = (0, import_lib2.$L)("catch");
8808
- var $L151 = (0, import_lib2.$L)("class");
8809
- var $L152 = (0, import_lib2.$L)("#{");
8810
- var $L153 = (0, import_lib2.$L)("comptime");
8811
- var $L154 = (0, import_lib2.$L)("declare");
8812
- var $L155 = (0, import_lib2.$L)("default");
8813
- var $L156 = (0, import_lib2.$L)("delete");
8814
- var $L157 = (0, import_lib2.$L)("do");
8815
- var $L158 = (0, import_lib2.$L)("..");
8816
- var $L159 = (0, import_lib2.$L)("\u2025");
8817
- var $L160 = (0, import_lib2.$L)("...");
8818
- var $L161 = (0, import_lib2.$L)("\u2026");
8819
- var $L162 = (0, import_lib2.$L)("::");
8820
- var $L163 = (0, import_lib2.$L)('"');
8821
- var $L164 = (0, import_lib2.$L)("each");
8822
- var $L165 = (0, import_lib2.$L)("else");
8823
- var $L166 = (0, import_lib2.$L)("!");
8824
- var $L167 = (0, import_lib2.$L)("export");
8825
- var $L168 = (0, import_lib2.$L)("extends");
8826
- var $L169 = (0, import_lib2.$L)("finally");
8827
- var $L170 = (0, import_lib2.$L)("for");
8828
- var $L171 = (0, import_lib2.$L)("from");
8829
- var $L172 = (0, import_lib2.$L)("function");
8830
- var $L173 = (0, import_lib2.$L)("get");
8831
- var $L174 = (0, import_lib2.$L)("set");
8832
- var $L175 = (0, import_lib2.$L)("#");
8833
- var $L176 = (0, import_lib2.$L)("if");
8834
- var $L177 = (0, import_lib2.$L)("in");
8835
- var $L178 = (0, import_lib2.$L)("infer");
8836
- var $L179 = (0, import_lib2.$L)("let");
8837
- var $L180 = (0, import_lib2.$L)("const");
8838
- var $L181 = (0, import_lib2.$L)("is");
8839
- var $L182 = (0, import_lib2.$L)("var");
8840
- var $L183 = (0, import_lib2.$L)("like");
8841
- var $L184 = (0, import_lib2.$L)("loop");
8842
- var $L185 = (0, import_lib2.$L)("new");
8843
- var $L186 = (0, import_lib2.$L)("not");
8844
- var $L187 = (0, import_lib2.$L)("of");
8845
- var $L188 = (0, import_lib2.$L)("[");
8846
- var $L189 = (0, import_lib2.$L)("operator");
8847
- var $L190 = (0, import_lib2.$L)("override");
8848
- var $L191 = (0, import_lib2.$L)("own");
8849
- var $L192 = (0, import_lib2.$L)("public");
8850
- var $L193 = (0, import_lib2.$L)("private");
8851
- var $L194 = (0, import_lib2.$L)("protected");
8852
- var $L195 = (0, import_lib2.$L)("||>");
8853
- var $L196 = (0, import_lib2.$L)("|\u25B7");
8854
- var $L197 = (0, import_lib2.$L)("|>=");
8855
- var $L198 = (0, import_lib2.$L)("\u25B7=");
8856
- var $L199 = (0, import_lib2.$L)("|>");
8857
- var $L200 = (0, import_lib2.$L)("\u25B7");
8858
- var $L201 = (0, import_lib2.$L)("readonly");
8859
- var $L202 = (0, import_lib2.$L)("return");
8860
- var $L203 = (0, import_lib2.$L)("satisfies");
8861
- var $L204 = (0, import_lib2.$L)("'");
8862
- var $L205 = (0, import_lib2.$L)("static");
8863
- var $L206 = (0, import_lib2.$L)("${");
8864
- var $L207 = (0, import_lib2.$L)("super");
8865
- var $L208 = (0, import_lib2.$L)("switch");
8866
- var $L209 = (0, import_lib2.$L)("target");
8867
- var $L210 = (0, import_lib2.$L)("then");
8868
- var $L211 = (0, import_lib2.$L)("this");
8869
- var $L212 = (0, import_lib2.$L)("throw");
8870
- var $L213 = (0, import_lib2.$L)('"""');
8871
- var $L214 = (0, import_lib2.$L)("'''");
8872
- var $L215 = (0, import_lib2.$L)("///");
8873
- var $L216 = (0, import_lib2.$L)("```");
8874
- var $L217 = (0, import_lib2.$L)("try");
8875
- var $L218 = (0, import_lib2.$L)("typeof");
8876
- var $L219 = (0, import_lib2.$L)("undefined");
8877
- var $L220 = (0, import_lib2.$L)("unless");
8878
- var $L221 = (0, import_lib2.$L)("until");
8879
- var $L222 = (0, import_lib2.$L)("using");
8880
- var $L223 = (0, import_lib2.$L)("void");
8881
- var $L224 = (0, import_lib2.$L)("when");
8882
- var $L225 = (0, import_lib2.$L)("while");
8883
- var $L226 = (0, import_lib2.$L)("yield");
8884
- var $L227 = (0, import_lib2.$L)("/>");
8885
- var $L228 = (0, import_lib2.$L)("</");
8886
- var $L229 = (0, import_lib2.$L)("<>");
8887
- var $L230 = (0, import_lib2.$L)("</>");
8888
- var $L231 = (0, import_lib2.$L)("<!--");
8889
- var $L232 = (0, import_lib2.$L)("-->");
8890
- var $L233 = (0, import_lib2.$L)("type");
8891
- var $L234 = (0, import_lib2.$L)("enum");
8892
- var $L235 = (0, import_lib2.$L)("interface");
8893
- var $L236 = (0, import_lib2.$L)("global");
8894
- var $L237 = (0, import_lib2.$L)("module");
8895
- var $L238 = (0, import_lib2.$L)("namespace");
8896
- var $L239 = (0, import_lib2.$L)("asserts");
8897
- var $L240 = (0, import_lib2.$L)("keyof");
8898
- var $L241 = (0, import_lib2.$L)("???");
8899
- var $L242 = (0, import_lib2.$L)("unique");
8900
- var $L243 = (0, import_lib2.$L)("symbol");
8901
- var $L244 = (0, import_lib2.$L)("[]");
8902
- var $L245 = (0, import_lib2.$L)("civet");
9053
+ var $L127 = (0, import_lib2.$L)("join");
9054
+ var $L128 = (0, import_lib2.$L)("break");
9055
+ var $L129 = (0, import_lib2.$L)("continue");
9056
+ var $L130 = (0, import_lib2.$L)("debugger");
9057
+ var $L131 = (0, import_lib2.$L)("require");
9058
+ var $L132 = (0, import_lib2.$L)("with");
9059
+ var $L133 = (0, import_lib2.$L)("assert");
9060
+ var $L134 = (0, import_lib2.$L)(":=");
9061
+ var $L135 = (0, import_lib2.$L)("\u2254");
9062
+ var $L136 = (0, import_lib2.$L)(".=");
9063
+ var $L137 = (0, import_lib2.$L)("::=");
9064
+ var $L138 = (0, import_lib2.$L)("/*");
9065
+ var $L139 = (0, import_lib2.$L)("*/");
9066
+ var $L140 = (0, import_lib2.$L)("\\");
9067
+ var $L141 = (0, import_lib2.$L)(")");
9068
+ var $L142 = (0, import_lib2.$L)("abstract");
9069
+ var $L143 = (0, import_lib2.$L)("as");
9070
+ var $L144 = (0, import_lib2.$L)("@");
9071
+ var $L145 = (0, import_lib2.$L)("@@");
9072
+ var $L146 = (0, import_lib2.$L)("async");
9073
+ var $L147 = (0, import_lib2.$L)("await");
9074
+ var $L148 = (0, import_lib2.$L)("`");
9075
+ var $L149 = (0, import_lib2.$L)("by");
9076
+ var $L150 = (0, import_lib2.$L)("case");
9077
+ var $L151 = (0, import_lib2.$L)("catch");
9078
+ var $L152 = (0, import_lib2.$L)("class");
9079
+ var $L153 = (0, import_lib2.$L)("#{");
9080
+ var $L154 = (0, import_lib2.$L)("comptime");
9081
+ var $L155 = (0, import_lib2.$L)("declare");
9082
+ var $L156 = (0, import_lib2.$L)("default");
9083
+ var $L157 = (0, import_lib2.$L)("delete");
9084
+ var $L158 = (0, import_lib2.$L)("do");
9085
+ var $L159 = (0, import_lib2.$L)("..");
9086
+ var $L160 = (0, import_lib2.$L)("\u2025");
9087
+ var $L161 = (0, import_lib2.$L)("...");
9088
+ var $L162 = (0, import_lib2.$L)("\u2026");
9089
+ var $L163 = (0, import_lib2.$L)("::");
9090
+ var $L164 = (0, import_lib2.$L)('"');
9091
+ var $L165 = (0, import_lib2.$L)("each");
9092
+ var $L166 = (0, import_lib2.$L)("else");
9093
+ var $L167 = (0, import_lib2.$L)("!");
9094
+ var $L168 = (0, import_lib2.$L)("export");
9095
+ var $L169 = (0, import_lib2.$L)("extends");
9096
+ var $L170 = (0, import_lib2.$L)("finally");
9097
+ var $L171 = (0, import_lib2.$L)("for");
9098
+ var $L172 = (0, import_lib2.$L)("from");
9099
+ var $L173 = (0, import_lib2.$L)("function");
9100
+ var $L174 = (0, import_lib2.$L)("get");
9101
+ var $L175 = (0, import_lib2.$L)("set");
9102
+ var $L176 = (0, import_lib2.$L)("#");
9103
+ var $L177 = (0, import_lib2.$L)("if");
9104
+ var $L178 = (0, import_lib2.$L)("in");
9105
+ var $L179 = (0, import_lib2.$L)("infer");
9106
+ var $L180 = (0, import_lib2.$L)("let");
9107
+ var $L181 = (0, import_lib2.$L)("const");
9108
+ var $L182 = (0, import_lib2.$L)("is");
9109
+ var $L183 = (0, import_lib2.$L)("var");
9110
+ var $L184 = (0, import_lib2.$L)("like");
9111
+ var $L185 = (0, import_lib2.$L)("loop");
9112
+ var $L186 = (0, import_lib2.$L)("new");
9113
+ var $L187 = (0, import_lib2.$L)("not");
9114
+ var $L188 = (0, import_lib2.$L)("of");
9115
+ var $L189 = (0, import_lib2.$L)("[");
9116
+ var $L190 = (0, import_lib2.$L)("operator");
9117
+ var $L191 = (0, import_lib2.$L)("override");
9118
+ var $L192 = (0, import_lib2.$L)("own");
9119
+ var $L193 = (0, import_lib2.$L)("public");
9120
+ var $L194 = (0, import_lib2.$L)("private");
9121
+ var $L195 = (0, import_lib2.$L)("protected");
9122
+ var $L196 = (0, import_lib2.$L)("||>");
9123
+ var $L197 = (0, import_lib2.$L)("|\u25B7");
9124
+ var $L198 = (0, import_lib2.$L)("|>=");
9125
+ var $L199 = (0, import_lib2.$L)("\u25B7=");
9126
+ var $L200 = (0, import_lib2.$L)("|>");
9127
+ var $L201 = (0, import_lib2.$L)("\u25B7");
9128
+ var $L202 = (0, import_lib2.$L)("readonly");
9129
+ var $L203 = (0, import_lib2.$L)("return");
9130
+ var $L204 = (0, import_lib2.$L)("satisfies");
9131
+ var $L205 = (0, import_lib2.$L)("'");
9132
+ var $L206 = (0, import_lib2.$L)("static");
9133
+ var $L207 = (0, import_lib2.$L)("${");
9134
+ var $L208 = (0, import_lib2.$L)("super");
9135
+ var $L209 = (0, import_lib2.$L)("switch");
9136
+ var $L210 = (0, import_lib2.$L)("target");
9137
+ var $L211 = (0, import_lib2.$L)("then");
9138
+ var $L212 = (0, import_lib2.$L)("this");
9139
+ var $L213 = (0, import_lib2.$L)("throw");
9140
+ var $L214 = (0, import_lib2.$L)('"""');
9141
+ var $L215 = (0, import_lib2.$L)("'''");
9142
+ var $L216 = (0, import_lib2.$L)("///");
9143
+ var $L217 = (0, import_lib2.$L)("```");
9144
+ var $L218 = (0, import_lib2.$L)("try");
9145
+ var $L219 = (0, import_lib2.$L)("typeof");
9146
+ var $L220 = (0, import_lib2.$L)("undefined");
9147
+ var $L221 = (0, import_lib2.$L)("unless");
9148
+ var $L222 = (0, import_lib2.$L)("until");
9149
+ var $L223 = (0, import_lib2.$L)("using");
9150
+ var $L224 = (0, import_lib2.$L)("void");
9151
+ var $L225 = (0, import_lib2.$L)("when");
9152
+ var $L226 = (0, import_lib2.$L)("while");
9153
+ var $L227 = (0, import_lib2.$L)("yield");
9154
+ var $L228 = (0, import_lib2.$L)("/>");
9155
+ var $L229 = (0, import_lib2.$L)("</");
9156
+ var $L230 = (0, import_lib2.$L)("<>");
9157
+ var $L231 = (0, import_lib2.$L)("</>");
9158
+ var $L232 = (0, import_lib2.$L)("<!--");
9159
+ var $L233 = (0, import_lib2.$L)("-->");
9160
+ var $L234 = (0, import_lib2.$L)("type");
9161
+ var $L235 = (0, import_lib2.$L)("enum");
9162
+ var $L236 = (0, import_lib2.$L)("interface");
9163
+ var $L237 = (0, import_lib2.$L)("global");
9164
+ var $L238 = (0, import_lib2.$L)("module");
9165
+ var $L239 = (0, import_lib2.$L)("namespace");
9166
+ var $L240 = (0, import_lib2.$L)("asserts");
9167
+ var $L241 = (0, import_lib2.$L)("keyof");
9168
+ var $L242 = (0, import_lib2.$L)("???");
9169
+ var $L243 = (0, import_lib2.$L)("unique");
9170
+ var $L244 = (0, import_lib2.$L)("symbol");
9171
+ var $L245 = (0, import_lib2.$L)("[]");
9172
+ var $L246 = (0, import_lib2.$L)("civet");
8903
9173
  var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
8904
9174
  var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
8905
9175
  var $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
@@ -9198,7 +9468,7 @@ var ExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, Al
9198
9468
  function ExplicitArguments(ctx, state2) {
9199
9469
  return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitArguments", ExplicitArguments$0);
9200
9470
  }
9201
- 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)(IndentedTrailingMemberExpressions));
9471
+ 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));
9202
9472
  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))));
9203
9473
  var ApplicationStart$$ = [ApplicationStart$0, ApplicationStart$1];
9204
9474
  function ApplicationStart(ctx, state2) {
@@ -9231,52 +9501,16 @@ var ReservedBinary$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R2, "Rese
9231
9501
  function ReservedBinary(ctx, state2) {
9232
9502
  return (0, import_lib2.$EVENT)(ctx, state2, "ReservedBinary", ReservedBinary$0);
9233
9503
  }
9234
- var ArgumentsWithTrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, AllowedTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
9504
+ var ArgumentsWithTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
9235
9505
  var args = $1;
9236
9506
  var trailing = $2;
9237
- return [args, ...trailing];
9238
- });
9239
- function ArgumentsWithTrailingMemberExpressions(ctx, state2) {
9240
- return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingMemberExpressions", ArgumentsWithTrailingMemberExpressions$0);
9241
- }
9242
- var TrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(MemberExpressionRest), (0, import_lib2.$E)(IndentedTrailingMemberExpressions)), function($skip, $loc, $0, $1, $2) {
9243
- if (!$2)
9244
- return $1;
9245
- return [...$1, ...$2];
9246
- });
9247
- function TrailingMemberExpressions(ctx, state2) {
9248
- return (0, import_lib2.$EVENT)(ctx, state2, "TrailingMemberExpressions", TrailingMemberExpressions$0);
9249
- }
9250
- var IndentedTrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedTrailingMemberExpression), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
9251
- if (!$2.length)
9252
- return $skip;
9253
- return $2.flat();
9254
- });
9255
- var IndentedTrailingMemberExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingMemberExpression), function($skip, $loc, $0, $1) {
9256
- return $1.flat();
9507
+ return [args, ...trailing ?? []];
9257
9508
  });
9258
- var IndentedTrailingMemberExpressions$$ = [IndentedTrailingMemberExpressions$0, IndentedTrailingMemberExpressions$1];
9259
- function IndentedTrailingMemberExpressions(ctx, state2) {
9260
- return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingMemberExpressions", IndentedTrailingMemberExpressions$$);
9509
+ function ArgumentsWithTrailingCallExpressions(ctx, state2) {
9510
+ return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingCallExpressions", ArgumentsWithTrailingCallExpressions$0);
9261
9511
  }
9262
- var NestedTrailingMemberExpression$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, 'NestedTrailingMemberExpression "?"')), (0, import_lib2.$EXPECT)($L7, 'NestedTrailingMemberExpression "."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R3, "NestedTrailingMemberExpression /[0-9]/")))), (0, import_lib2.$P)(MemberExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
9263
- var ws = $1;
9264
- var rests = $3;
9265
- const [first, ...rest] = rests;
9266
- return [prepend(ws, first), ...rest];
9267
- });
9268
- function NestedTrailingMemberExpression(ctx, state2) {
9269
- return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingMemberExpression", NestedTrailingMemberExpression$0);
9270
- }
9271
- var AllowedTrailingMemberExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingMemberExpressions), function(value) {
9272
- return value[1];
9273
- });
9274
- var AllowedTrailingMemberExpressions$1 = (0, import_lib2.$Q)(MemberExpressionRest);
9275
- var AllowedTrailingMemberExpressions$$ = [AllowedTrailingMemberExpressions$0, AllowedTrailingMemberExpressions$1];
9276
- function AllowedTrailingMemberExpressions(ctx, state2) {
9277
- return (0, import_lib2.$EVENT_C)(ctx, state2, "AllowedTrailingMemberExpressions", AllowedTrailingMemberExpressions$$);
9278
- }
9279
- 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) {
9512
+ var TrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(ExplicitCallExpressionRest), (0, import_lib2.$E)(IndentedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
9513
+ $1 = $1.flat();
9280
9514
  if (!$1.length && !$2)
9281
9515
  return $skip;
9282
9516
  if (!$2)
@@ -9371,10 +9605,10 @@ var NestedArgumentList$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent,
9371
9605
  function NestedArgumentList(ctx, state2) {
9372
9606
  return (0, import_lib2.$EVENT)(ctx, state2, "NestedArgumentList", NestedArgumentList$0);
9373
9607
  }
9374
- var NestedArgument$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Nested, (0, import_lib2.$N)(Bullet), SingleLineArgumentExpressions, ParameterElementDelimiter), function($skip, $loc, $0, $1, $2, $3, $4) {
9375
- var indent = $1;
9376
- var args = $3;
9377
- var comma = $4;
9608
+ var NestedArgument$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedImplicitPropertyDefinition), Nested, (0, import_lib2.$N)(Bullet), SingleLineArgumentExpressions, ParameterElementDelimiter), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
9609
+ var indent = $2;
9610
+ var args = $4;
9611
+ var comma = $5;
9378
9612
  let [arg0, ...rest] = args;
9379
9613
  arg0 = prepend(indent, arg0);
9380
9614
  return [arg0, ...rest, comma];
@@ -10495,7 +10729,7 @@ var LeftHandSideExpression$$ = [LeftHandSideExpression$0, LeftHandSideExpression
10495
10729
  function LeftHandSideExpression(ctx, state2) {
10496
10730
  return (0, import_lib2.$EVENT_C)(ctx, state2, "LeftHandSideExpression", LeftHandSideExpression$$);
10497
10731
  }
10498
- 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) {
10732
+ 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) {
10499
10733
  var rest = $3;
10500
10734
  return processCallMemberExpression({
10501
10735
  type: "CallExpression",
@@ -10513,7 +10747,7 @@ var CallExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __,
10513
10747
  var imports = $5;
10514
10748
  return dynamizeImportDeclarationExpression([i, iws, imports, fws, from]);
10515
10749
  });
10516
- 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) {
10750
+ 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) {
10517
10751
  var rest = $3;
10518
10752
  return processCallMemberExpression({
10519
10753
  type: "CallExpression",
@@ -10548,7 +10782,7 @@ var CallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_l
10548
10782
  }
10549
10783
  return literal;
10550
10784
  });
10551
- var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
10785
+ var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingCallExpressions), function($skip, $loc, $0, $1, $2) {
10552
10786
  var optional = $1;
10553
10787
  var argsWithTrailing = $2;
10554
10788
  if (!optional)
@@ -10564,6 +10798,32 @@ var CallExpressionRest$$ = [CallExpressionRest$0, CallExpressionRest$1, CallExpr
10564
10798
  function CallExpressionRest(ctx, state2) {
10565
10799
  return (0, import_lib2.$EVENT_C)(ctx, state2, "CallExpressionRest", CallExpressionRest$$);
10566
10800
  }
10801
+ var ExplicitCallExpressionRest$0 = MemberExpressionRest;
10802
+ var ExplicitCallExpressionRest$1 = (0, import_lib2.$T)((0, import_lib2.$S)(TypeArguments, (0, import_lib2.$N)((0, import_lib2.$C)(IdentifierName, NumericLiteral))), function(value) {
10803
+ return value[0];
10804
+ });
10805
+ var ExplicitCallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R8, "ExplicitCallExpressionRest /(?=['\"`])/"), (0, import_lib2.$C)(TemplateLiteral, StringLiteral)), function($skip, $loc, $0, $1, $2) {
10806
+ var literal = $2;
10807
+ if (literal.type === "StringLiteral") {
10808
+ literal = "`" + literal.token.slice(1, -1).replace(/(`|\$\{)/g, "\\$1") + "`";
10809
+ }
10810
+ return literal;
10811
+ });
10812
+ var ExplicitCallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ExplicitArguments), function($skip, $loc, $0, $1, $2) {
10813
+ var optional = $1;
10814
+ var call = $2;
10815
+ if (!optional)
10816
+ return call;
10817
+ return {
10818
+ ...call,
10819
+ children: [optional, ...call.children],
10820
+ optional
10821
+ };
10822
+ });
10823
+ var ExplicitCallExpressionRest$$ = [ExplicitCallExpressionRest$0, ExplicitCallExpressionRest$1, ExplicitCallExpressionRest$2, ExplicitCallExpressionRest$3];
10824
+ function ExplicitCallExpressionRest(ctx, state2) {
10825
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "ExplicitCallExpressionRest", ExplicitCallExpressionRest$$);
10826
+ }
10567
10827
  var OptionalShorthand$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R9, "OptionalShorthand /(?=[\\/?])/"), (0, import_lib2.$Q)(InlineComment), QuestionMark, OptionalDot), function($skip, $loc, $0, $1, $2, $3, $4) {
10568
10828
  var comments = $2;
10569
10829
  var q = $3;
@@ -10915,6 +11175,12 @@ var PropertyAccess$$ = [PropertyAccess$0, PropertyAccess$1, PropertyAccess$2, Pr
10915
11175
  function PropertyAccess(ctx, state2) {
10916
11176
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PropertyAccess", PropertyAccess$$);
10917
11177
  }
11178
+ var ExplicitPropertyGlob$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(ExplicitAccessStart), PropertyGlob), function(value) {
11179
+ return value[1];
11180
+ });
11181
+ function ExplicitPropertyGlob(ctx, state2) {
11182
+ return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitPropertyGlob", ExplicitPropertyGlob$0);
11183
+ }
10918
11184
  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) {
10919
11185
  var dot = $1;
10920
11186
  var object = $3;
@@ -11195,7 +11461,8 @@ var NWBindingIdentifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(At, AtIdent
11195
11461
  return {
11196
11462
  type: "AtBinding",
11197
11463
  children: [ref],
11198
- ref
11464
+ ref,
11465
+ names: []
11199
11466
  };
11200
11467
  });
11201
11468
  var NWBindingIdentifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Hash, AtIdentifierRef), function($skip, $loc, $0, $1, $2) {
@@ -11204,7 +11471,8 @@ var NWBindingIdentifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Hash, AtIde
11204
11471
  return {
11205
11472
  type: "AtBinding",
11206
11473
  children: [ref],
11207
- ref
11474
+ ref,
11475
+ names: []
11208
11476
  };
11209
11477
  });
11210
11478
  var NWBindingIdentifier$2 = Identifier;
@@ -11527,19 +11795,13 @@ var BindingElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.
11527
11795
  var binding = $2;
11528
11796
  var typeSuffix = $3;
11529
11797
  var initializer = $4;
11530
- if (binding.children) {
11531
- binding = {
11532
- ...binding,
11533
- initializer,
11534
- children: [...binding.children, initializer]
11535
- };
11536
- }
11537
11798
  return {
11538
11799
  type: "BindingElement",
11539
11800
  names: binding.names,
11540
11801
  typeSuffix,
11541
11802
  binding,
11542
- children: [ws, binding]
11803
+ children: [ws, binding, initializer],
11804
+ initializer
11543
11805
  };
11544
11806
  });
11545
11807
  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) {
@@ -12243,11 +12505,9 @@ var SingleLineStatements$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidNewl
12243
12505
  const expressions = [...stmts];
12244
12506
  if (last)
12245
12507
  expressions.push(last);
12246
- const maybeComment = expressions.at(-1)?.[2]?.children?.[2]?.at(-1);
12247
- const hasTrailingComment = maybeComment?.type === "Comment" && maybeComment.token.startsWith("//");
12248
12508
  const children = [expressions];
12249
- if (hasTrailingComment)
12250
- children.push("\n");
12509
+ if (hasTrailingComment(expressions))
12510
+ children.push(["\n"]);
12251
12511
  return {
12252
12512
  type: "BlockStatement",
12253
12513
  expressions,
@@ -13328,52 +13588,23 @@ var MethodDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Abstract, __,
13328
13588
  abstract: true,
13329
13589
  signature,
13330
13590
  parameters: signature.parameters,
13591
+ async: signature.async,
13592
+ generator: signature.generator,
13331
13593
  ts: true
13332
13594
  };
13333
13595
  });
13334
- 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) {
13596
+ 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) {
13335
13597
  var signature = $1;
13336
13598
  var block = $3;
13337
- let children = $0;
13338
- let generatorPos = 0;
13339
- let { modifier } = signature;
13340
- if (hasAwait(block)) {
13341
- generatorPos++;
13342
- children = children.slice();
13343
- if (modifier?.get || modifier?.set) {
13344
- children.push({
13345
- type: "Error",
13346
- message: "Getters and setters cannot be async"
13347
- });
13348
- } else if (modifier?.async) {
13349
- } else {
13350
- children.unshift("async ");
13351
- modifier = { ...modifier, async: true };
13352
- signature = { ...signature, modifier };
13353
- }
13354
- }
13355
- if (hasYield(block)) {
13356
- if (children === $0)
13357
- children = children.slice();
13358
- if (modifier?.get || modifier?.set) {
13359
- children.push({
13360
- type: "Error",
13361
- message: "Getters and setters cannot be generators"
13362
- });
13363
- } else if (modifier?.generator) {
13364
- } else {
13365
- children.splice(generatorPos, 0, "*");
13366
- modifier = { ...modifier, generator: true };
13367
- signature = { ...signature, modifier };
13368
- }
13369
- }
13370
13599
  return {
13371
13600
  type: "MethodDefinition",
13372
- children,
13601
+ children: $0,
13373
13602
  name: signature.name,
13374
13603
  signature,
13375
13604
  block,
13376
- parameters: signature.parameters
13605
+ parameters: signature.parameters,
13606
+ async: signature.async,
13607
+ generator: signature.generator
13377
13608
  };
13378
13609
  });
13379
13610
  var MethodDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(GetOrSet, (0, import_lib2.$E)(_), ForbidIndentedApplication, (0, import_lib2.$E)((0, import_lib2.$S)(MemberBase, (0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(ReturnTypeSuffix))), RestoreIndentedApplication, (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
@@ -13456,36 +13687,38 @@ function MethodDefinition(ctx, state2) {
13456
13687
  }
13457
13688
  var MethodModifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(GetOrSet, (0, import_lib2.$E)(_), (0, import_lib2.$Y)(ClassElementName)), function($skip, $loc, $0, $1, $2, $3) {
13458
13689
  var kind = $1;
13690
+ var ws = $2;
13459
13691
  return {
13460
- type: "MethodModifier",
13461
- async: false,
13462
- generator: false,
13463
- get: kind.token === "get",
13464
- set: kind.token === "set",
13465
- children: $0
13466
- };
13467
- });
13468
- var MethodModifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$S)(Async, __), (0, import_lib2.$E)((0, import_lib2.$S)(Star, __))), function($skip, $loc, $0, $1, $2) {
13469
- return {
13470
- type: "MethodModifier",
13471
- async: true,
13472
- get: false,
13473
- set: false,
13474
- generator: !!$2,
13475
- children: $0
13692
+ // no async or generator, because getters and setters can't be
13693
+ modifier: {
13694
+ async: false,
13695
+ generator: false,
13696
+ get: kind.token === "get",
13697
+ set: kind.token === "set"
13698
+ },
13699
+ children: [kind, ws]
13476
13700
  };
13477
13701
  });
13478
- var MethodModifier$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(Star, __), function($skip, $loc, $0, $1, $2) {
13702
+ var MethodModifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Async, __)), (0, import_lib2.$E)((0, import_lib2.$S)(Star, __))), function($skip, $loc, $0, $1, $2) {
13703
+ var async = $1;
13704
+ var generator = $2;
13705
+ if (!async)
13706
+ async = [];
13707
+ if (!generator)
13708
+ generator = [];
13479
13709
  return {
13480
- type: "MethodModifier",
13481
- async: false,
13482
- get: false,
13483
- set: false,
13484
- generator: true,
13485
- children: $0
13710
+ async,
13711
+ generator,
13712
+ modifier: {
13713
+ async: !!async.length,
13714
+ get: false,
13715
+ set: false,
13716
+ generator: !!generator.length
13717
+ },
13718
+ children: [async, generator]
13486
13719
  };
13487
13720
  });
13488
- var MethodModifier$$ = [MethodModifier$0, MethodModifier$1, MethodModifier$2];
13721
+ var MethodModifier$$ = [MethodModifier$0, MethodModifier$1];
13489
13722
  function MethodModifier(ctx, state2) {
13490
13723
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MethodModifier", MethodModifier$$);
13491
13724
  }
@@ -13500,10 +13733,12 @@ var MethodSignature$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ConstructorShor
13500
13733
  parameters
13501
13734
  };
13502
13735
  });
13503
- var MethodSignature$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(MethodModifier), ClassElementName, (0, import_lib2.$E)(_), (0, import_lib2.$E)(QuestionMark), (0, import_lib2.$E)(_), NonEmptyParameters, (0, import_lib2.$E)(ReturnTypeSuffix)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
13736
+ var MethodSignature$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(MethodModifier, ClassElementName, (0, import_lib2.$E)(_), (0, import_lib2.$E)(QuestionMark), (0, import_lib2.$E)(_), NonEmptyParameters, (0, import_lib2.$E)(ReturnTypeSuffix)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
13504
13737
  var modifier = $1;
13505
13738
  var name = $2;
13739
+ var ws1 = $3;
13506
13740
  var optional = $4;
13741
+ var ws2 = $5;
13507
13742
  var parameters = $6;
13508
13743
  var returnType = $7;
13509
13744
  if (name.name) {
@@ -13512,14 +13747,15 @@ var MethodSignature$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2
13512
13747
  name = name.token.match(/^(?:"|')/) ? name.token.slice(1, -1) : name.token;
13513
13748
  }
13514
13749
  if (optional)
13515
- $0[3] = optional = { ...optional, ts: true };
13516
- modifier = modifier || {};
13750
+ optional = { ...optional, ts: true };
13517
13751
  return {
13518
13752
  type: "MethodSignature",
13519
- children: $0,
13753
+ children: [...modifier.children, name, ws1, optional, ws2, parameters, returnType],
13754
+ async: modifier.async,
13755
+ generator: modifier.generator,
13520
13756
  name,
13521
13757
  optional,
13522
- modifier,
13758
+ modifier: modifier.modifier,
13523
13759
  // get/set/async/generator
13524
13760
  returnType,
13525
13761
  parameters
@@ -14551,7 +14787,7 @@ var ForStatementControlWithReduction$$ = [ForStatementControlWithReduction$0, Fo
14551
14787
  function ForStatementControlWithReduction(ctx, state2) {
14552
14788
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ForStatementControlWithReduction", ForStatementControlWithReduction$$);
14553
14789
  }
14554
- 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) {
14790
+ 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) {
14555
14791
  var subtype = $1;
14556
14792
  var ws = $3;
14557
14793
  return {
@@ -15125,7 +15361,7 @@ var Condition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, Decl
15125
15361
  expression
15126
15362
  };
15127
15363
  });
15128
- 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) {
15364
+ 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) {
15129
15365
  var open = $2;
15130
15366
  var expression = $3;
15131
15367
  var close = $4;
@@ -15154,7 +15390,7 @@ var Condition$$ = [Condition$0, Condition$1, Condition$2, Condition$3, Condition
15154
15390
  function Condition(ctx, state2) {
15155
15391
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Condition", Condition$$);
15156
15392
  }
15157
- var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, Expression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
15393
+ var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, PostfixedExpression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
15158
15394
  var open = $1;
15159
15395
  var expression = $2;
15160
15396
  var close = $3;
@@ -15501,67 +15737,84 @@ var ThrowStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Throw, MaybeParen
15501
15737
  function ThrowStatement(ctx, state2) {
15502
15738
  return (0, import_lib2.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
15503
15739
  }
15504
- 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) {
15740
+ 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) {
15505
15741
  return { $loc, token: $1 };
15506
15742
  });
15507
15743
  function Break(ctx, state2) {
15508
15744
  return (0, import_lib2.$EVENT)(ctx, state2, "Break", Break$0);
15509
15745
  }
15510
- 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) {
15746
+ 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) {
15511
15747
  return { $loc, token: $1 };
15512
15748
  });
15513
15749
  function Continue(ctx, state2) {
15514
15750
  return (0, import_lib2.$EVENT)(ctx, state2, "Continue", Continue$0);
15515
15751
  }
15516
- 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) {
15752
+ 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) {
15517
15753
  return { $loc, token: $1 };
15518
15754
  });
15519
15755
  function Debugger(ctx, state2) {
15520
15756
  return (0, import_lib2.$EVENT)(ctx, state2, "Debugger", Debugger$0);
15521
15757
  }
15522
15758
  var MaybeNestedNonPipelineExpression$0 = NestedBulletedArray;
15523
- var MaybeNestedNonPipelineExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, NonPipelineExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15524
- if ($3)
15525
- return $3;
15526
- return $skip;
15759
+ var MaybeNestedNonPipelineExpression$1 = NestedImplicitObjectLiteral;
15760
+ var MaybeNestedNonPipelineExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, NonPipelineExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4) {
15761
+ var expression = $2;
15762
+ var trailing = $4;
15763
+ if (!expression)
15764
+ return $skip;
15765
+ if (!trailing)
15766
+ return expression;
15767
+ return [expression, trailing];
15527
15768
  });
15528
- var MaybeNestedNonPipelineExpression$2 = NonPipelineExpression;
15529
- var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1, MaybeNestedNonPipelineExpression$2];
15769
+ var MaybeNestedNonPipelineExpression$3 = NonPipelineExpression;
15770
+ var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1, MaybeNestedNonPipelineExpression$2, MaybeNestedNonPipelineExpression$3];
15530
15771
  function MaybeNestedNonPipelineExpression(ctx, state2) {
15531
15772
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedNonPipelineExpression", MaybeNestedNonPipelineExpression$$);
15532
15773
  }
15533
15774
  var MaybeNestedPostfixedExpression$0 = NestedBulletedArray;
15534
- var MaybeNestedPostfixedExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15535
- if ($3)
15536
- return $3;
15537
- return $skip;
15775
+ var MaybeNestedPostfixedExpression$1 = NestedImplicitObjectLiteral;
15776
+ var MaybeNestedPostfixedExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4) {
15777
+ var expression = $2;
15778
+ var trailing = $4;
15779
+ if (!expression)
15780
+ return $skip;
15781
+ if (!trailing)
15782
+ return expression;
15783
+ return [expression, trailing];
15538
15784
  });
15539
- var MaybeNestedPostfixedExpression$2 = PostfixedExpression;
15540
- var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1, MaybeNestedPostfixedExpression$2];
15785
+ var MaybeNestedPostfixedExpression$3 = PostfixedExpression;
15786
+ var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1, MaybeNestedPostfixedExpression$2, MaybeNestedPostfixedExpression$3];
15541
15787
  function MaybeNestedPostfixedExpression(ctx, state2) {
15542
15788
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedPostfixedExpression", MaybeNestedPostfixedExpression$$);
15543
15789
  }
15790
+ var NestedPostfixedExpressionNoTrailing$0 = NestedBulletedArray;
15791
+ var NestedPostfixedExpressionNoTrailing$1 = NestedImplicitObjectLiteral;
15792
+ var NestedPostfixedExpressionNoTrailing$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15793
+ var expression = $2;
15794
+ if (!expression)
15795
+ return $skip;
15796
+ return expression;
15797
+ });
15798
+ var NestedPostfixedExpressionNoTrailing$$ = [NestedPostfixedExpressionNoTrailing$0, NestedPostfixedExpressionNoTrailing$1, NestedPostfixedExpressionNoTrailing$2];
15799
+ function NestedPostfixedExpressionNoTrailing(ctx, state2) {
15800
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedPostfixedExpressionNoTrailing", NestedPostfixedExpressionNoTrailing$$);
15801
+ }
15544
15802
  var MaybeNestedExpression$0 = NestedBulletedArray;
15545
- var MaybeNestedExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15546
- if ($3)
15547
- return $3;
15548
- return $skip;
15803
+ var MaybeNestedExpression$1 = NestedImplicitObjectLiteral;
15804
+ var MaybeNestedExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4) {
15805
+ var expression = $2;
15806
+ var trailing = $4;
15807
+ if (!expression)
15808
+ return $skip;
15809
+ if (!trailing)
15810
+ return expression;
15811
+ return [expression, trailing];
15549
15812
  });
15550
- var MaybeNestedExpression$2 = Expression;
15551
- var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1, MaybeNestedExpression$2];
15813
+ var MaybeNestedExpression$3 = Expression;
15814
+ var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1, MaybeNestedExpression$2, MaybeNestedExpression$3];
15552
15815
  function MaybeNestedExpression(ctx, state2) {
15553
15816
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedExpression", MaybeNestedExpression$$);
15554
15817
  }
15555
- var NestedExpression$0 = NestedBulletedArray;
15556
- var NestedExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15557
- if ($3)
15558
- return $3;
15559
- return $skip;
15560
- });
15561
- var NestedExpression$$ = [NestedExpression$0, NestedExpression$1];
15562
- function NestedExpression(ctx, state2) {
15563
- return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedExpression", NestedExpression$$);
15564
- }
15565
15818
  var MaybeParenNestedExpression$0 = (0, import_lib2.$T)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement, NoBlock)), function(value) {
15566
15819
  return "";
15567
15820
  });
@@ -15571,7 +15824,7 @@ var MaybeParenNestedExpression$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, i
15571
15824
  var MaybeParenNestedExpression$2 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), (0, import_lib2.$C)(ArrayLiteral, ObjectLiteral)), function(value) {
15572
15825
  return value[1];
15573
15826
  });
15574
- var MaybeParenNestedExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertSpace, InsertOpenParen, PushIndent, (0, import_lib2.$S)(Nested, Expression), PopIndent, InsertNewline, InsertIndent, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15827
+ var MaybeParenNestedExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertSpace, InsertOpenParen, PushIndent, (0, import_lib2.$S)(Nested, Expression), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions), InsertNewline, InsertIndent, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {
15575
15828
  var exp = $5;
15576
15829
  if (!exp)
15577
15830
  return $skip;
@@ -15581,7 +15834,7 @@ var MaybeParenNestedExpression$$ = [MaybeParenNestedExpression$0, MaybeParenNest
15581
15834
  function MaybeParenNestedExpression(ctx, state2) {
15582
15835
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
15583
15836
  }
15584
- 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) {
15837
+ 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) {
15585
15838
  const imp = [
15586
15839
  { ...$1, ts: true },
15587
15840
  { ...$1, token: "const", js: true }
@@ -15771,7 +16024,7 @@ var ImpliedFrom$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImpliedF
15771
16024
  function ImpliedFrom(ctx, state2) {
15772
16025
  return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
15773
16026
  }
15774
- 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) {
16027
+ 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) {
15775
16028
  var keyword = $2;
15776
16029
  var object = $5;
15777
16030
  return {
@@ -16097,19 +16350,19 @@ var LexicalDeclaration$$ = [LexicalDeclaration$0, LexicalDeclaration$1];
16097
16350
  function LexicalDeclaration(ctx, state2) {
16098
16351
  return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
16099
16352
  }
16100
- 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) {
16353
+ 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) {
16101
16354
  return { $loc, token: "=", decl: "const " };
16102
16355
  });
16103
16356
  function ConstAssignment(ctx, state2) {
16104
16357
  return (0, import_lib2.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
16105
16358
  }
16106
- var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L135, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
16359
+ var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
16107
16360
  return { $loc, token: "=", decl: "let " };
16108
16361
  });
16109
16362
  function LetAssignment(ctx, state2) {
16110
16363
  return (0, import_lib2.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
16111
16364
  }
16112
- var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
16365
+ var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L137, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
16113
16366
  return { $loc, token: "=" };
16114
16367
  });
16115
16368
  function TypeAssignment(ctx, state2) {
@@ -16532,7 +16785,7 @@ var MultiLineComment$$ = [MultiLineComment$0, MultiLineComment$1];
16532
16785
  function MultiLineComment(ctx, state2) {
16533
16786
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
16534
16787
  }
16535
- 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) {
16788
+ 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) {
16536
16789
  return { type: "Comment", $loc, token: $1 };
16537
16790
  });
16538
16791
  function JSMultiLineComment(ctx, state2) {
@@ -16578,7 +16831,7 @@ function _(ctx, state2) {
16578
16831
  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) {
16579
16832
  return { $loc, token: $0 };
16580
16833
  });
16581
- var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L139, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
16834
+ var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
16582
16835
  return " ";
16583
16836
  });
16584
16837
  var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
@@ -16629,7 +16882,7 @@ var StatementDelimiter$$ = [StatementDelimiter$0, StatementDelimiter$1, Statemen
16629
16882
  function StatementDelimiter(ctx, state2) {
16630
16883
  return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
16631
16884
  }
16632
- 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 "]"'))));
16885
+ 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 "]"'))));
16633
16886
  function ClosingDelimiter(ctx, state2) {
16634
16887
  return (0, import_lib2.$EVENT)(ctx, state2, "ClosingDelimiter", ClosingDelimiter$0);
16635
16888
  }
@@ -16652,7 +16905,7 @@ var Loc$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Loc ""'), functi
16652
16905
  function Loc(ctx, state2) {
16653
16906
  return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
16654
16907
  }
16655
- 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) {
16908
+ 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) {
16656
16909
  return { $loc, token: $1, ts: true };
16657
16910
  });
16658
16911
  function Abstract(ctx, state2) {
@@ -16664,43 +16917,43 @@ var Ampersand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L117, 'Ampersan
16664
16917
  function Ampersand(ctx, state2) {
16665
16918
  return (0, import_lib2.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
16666
16919
  }
16667
- 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) {
16920
+ 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) {
16668
16921
  return { $loc, token: $1 };
16669
16922
  });
16670
16923
  function As(ctx, state2) {
16671
16924
  return (0, import_lib2.$EVENT)(ctx, state2, "As", As$0);
16672
16925
  }
16673
- var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L143, 'At "@"'), function($skip, $loc, $0, $1) {
16926
+ var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'At "@"'), function($skip, $loc, $0, $1) {
16674
16927
  return { $loc, token: $1 };
16675
16928
  });
16676
16929
  function At(ctx, state2) {
16677
16930
  return (0, import_lib2.$EVENT)(ctx, state2, "At", At$0);
16678
16931
  }
16679
- var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
16932
+ var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L145, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
16680
16933
  return { $loc, token: "@" };
16681
16934
  });
16682
16935
  function AtAt(ctx, state2) {
16683
16936
  return (0, import_lib2.$EVENT)(ctx, state2, "AtAt", AtAt$0);
16684
16937
  }
16685
- 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) {
16938
+ 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) {
16686
16939
  return { $loc, token: $1, type: "Async" };
16687
16940
  });
16688
16941
  function Async(ctx, state2) {
16689
16942
  return (0, import_lib2.$EVENT)(ctx, state2, "Async", Async$0);
16690
16943
  }
16691
- 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) {
16944
+ 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) {
16692
16945
  return { $loc, token: $1, type: "Await" };
16693
16946
  });
16694
16947
  function Await(ctx, state2) {
16695
16948
  return (0, import_lib2.$EVENT)(ctx, state2, "Await", Await$0);
16696
16949
  }
16697
- var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L147, 'Backtick "`"'), function($skip, $loc, $0, $1) {
16950
+ var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L148, 'Backtick "`"'), function($skip, $loc, $0, $1) {
16698
16951
  return { $loc, token: $1 };
16699
16952
  });
16700
16953
  function Backtick(ctx, state2) {
16701
16954
  return (0, import_lib2.$EVENT)(ctx, state2, "Backtick", Backtick$0);
16702
16955
  }
16703
- 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) {
16956
+ 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) {
16704
16957
  return { $loc, token: $1 };
16705
16958
  });
16706
16959
  function By(ctx, state2) {
@@ -16712,19 +16965,19 @@ var Caret$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L22, 'Caret "^"'),
16712
16965
  function Caret(ctx, state2) {
16713
16966
  return (0, import_lib2.$EVENT)(ctx, state2, "Caret", Caret$0);
16714
16967
  }
16715
- 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) {
16968
+ 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) {
16716
16969
  return { $loc, token: $1 };
16717
16970
  });
16718
16971
  function Case(ctx, state2) {
16719
16972
  return (0, import_lib2.$EVENT)(ctx, state2, "Case", Case$0);
16720
16973
  }
16721
- 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) {
16974
+ 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) {
16722
16975
  return { $loc, token: $1 };
16723
16976
  });
16724
16977
  function Catch(ctx, state2) {
16725
16978
  return (0, import_lib2.$EVENT)(ctx, state2, "Catch", Catch$0);
16726
16979
  }
16727
- 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) {
16980
+ 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) {
16728
16981
  return { $loc, token: $1 };
16729
16982
  });
16730
16983
  function Class(ctx, state2) {
@@ -16748,13 +17001,13 @@ var CloseBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L46, 'CloseB
16748
17001
  function CloseBracket(ctx, state2) {
16749
17002
  return (0, import_lib2.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
16750
17003
  }
16751
- var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L140, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
17004
+ var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L141, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
16752
17005
  return { $loc, token: $1 };
16753
17006
  });
16754
17007
  function CloseParen(ctx, state2) {
16755
17008
  return (0, import_lib2.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
16756
17009
  }
16757
- var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L152, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
17010
+ var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L153, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
16758
17011
  return { $loc, token: "${" };
16759
17012
  });
16760
17013
  function CoffeeSubstitutionStart(ctx, state2) {
@@ -16772,37 +17025,37 @@ var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L17, 'Comma ","'),
16772
17025
  function Comma(ctx, state2) {
16773
17026
  return (0, import_lib2.$EVENT)(ctx, state2, "Comma", Comma$0);
16774
17027
  }
16775
- 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) {
17028
+ 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) {
16776
17029
  return { $loc, token: $1 };
16777
17030
  });
16778
17031
  function Comptime(ctx, state2) {
16779
17032
  return (0, import_lib2.$EVENT)(ctx, state2, "Comptime", Comptime$0);
16780
17033
  }
16781
- var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L143, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
17034
+ var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
16782
17035
  return { $loc, token: "constructor" };
16783
17036
  });
16784
17037
  function ConstructorShorthand(ctx, state2) {
16785
17038
  return (0, import_lib2.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
16786
17039
  }
16787
- 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) {
17040
+ 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) {
16788
17041
  return { $loc, token: $1 };
16789
17042
  });
16790
17043
  function Declare(ctx, state2) {
16791
17044
  return (0, import_lib2.$EVENT)(ctx, state2, "Declare", Declare$0);
16792
17045
  }
16793
- 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) {
17046
+ 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) {
16794
17047
  return { $loc, token: $1 };
16795
17048
  });
16796
17049
  function Default(ctx, state2) {
16797
17050
  return (0, import_lib2.$EVENT)(ctx, state2, "Default", Default$0);
16798
17051
  }
16799
- 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) {
17052
+ 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) {
16800
17053
  return { $loc, token: $1 };
16801
17054
  });
16802
17055
  function Delete(ctx, state2) {
16803
17056
  return (0, import_lib2.$EVENT)(ctx, state2, "Delete", Delete$0);
16804
17057
  }
16805
- 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) {
17058
+ 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) {
16806
17059
  return { $loc, token: $1 };
16807
17060
  });
16808
17061
  function Do(ctx, state2) {
@@ -16822,20 +17075,20 @@ var Dot$$ = [Dot$0, Dot$1];
16822
17075
  function Dot(ctx, state2) {
16823
17076
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Dot", Dot$$);
16824
17077
  }
16825
- 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) {
17078
+ 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) {
16826
17079
  return { $loc, token: $1 };
16827
17080
  });
16828
- var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L159, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
17081
+ var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
16829
17082
  return { $loc, token: ".." };
16830
17083
  });
16831
17084
  var DotDot$$ = [DotDot$0, DotDot$1];
16832
17085
  function DotDot(ctx, state2) {
16833
17086
  return (0, import_lib2.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
16834
17087
  }
16835
- var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
17088
+ var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
16836
17089
  return { $loc, token: $1 };
16837
17090
  });
16838
- var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
17091
+ var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
16839
17092
  return { $loc, token: "..." };
16840
17093
  });
16841
17094
  var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
@@ -16848,31 +17101,31 @@ var InsertDotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Inse
16848
17101
  function InsertDotDotDot(ctx, state2) {
16849
17102
  return (0, import_lib2.$EVENT)(ctx, state2, "InsertDotDotDot", InsertDotDotDot$0);
16850
17103
  }
16851
- var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
17104
+ var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
16852
17105
  return { $loc, token: $1 };
16853
17106
  });
16854
17107
  function DoubleColon(ctx, state2) {
16855
17108
  return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
16856
17109
  }
16857
- var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
17110
+ var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
16858
17111
  return { $loc, token: ":" };
16859
17112
  });
16860
17113
  function DoubleColonAsColon(ctx, state2) {
16861
17114
  return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
16862
17115
  }
16863
- var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
17116
+ var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L164, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
16864
17117
  return { $loc, token: $1 };
16865
17118
  });
16866
17119
  function DoubleQuote(ctx, state2) {
16867
17120
  return (0, import_lib2.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
16868
17121
  }
16869
- 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) {
17122
+ 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) {
16870
17123
  return { $loc, token: $1 };
16871
17124
  });
16872
17125
  function Each(ctx, state2) {
16873
17126
  return (0, import_lib2.$EVENT)(ctx, state2, "Each", Each$0);
16874
17127
  }
16875
- 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) {
17128
+ 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) {
16876
17129
  return { $loc, token: $1 };
16877
17130
  });
16878
17131
  function Else(ctx, state2) {
@@ -16884,61 +17137,61 @@ var Equals$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L3, 'Equals "="'),
16884
17137
  function Equals(ctx, state2) {
16885
17138
  return (0, import_lib2.$EVENT)(ctx, state2, "Equals", Equals$0);
16886
17139
  }
16887
- var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L166, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
17140
+ var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L167, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
16888
17141
  return { $loc, token: $1 };
16889
17142
  });
16890
17143
  function ExclamationPoint(ctx, state2) {
16891
17144
  return (0, import_lib2.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
16892
17145
  }
16893
- 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) {
17146
+ 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) {
16894
17147
  return { $loc, token: $1 };
16895
17148
  });
16896
17149
  function Export(ctx, state2) {
16897
17150
  return (0, import_lib2.$EVENT)(ctx, state2, "Export", Export$0);
16898
17151
  }
16899
- 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) {
17152
+ 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) {
16900
17153
  return { $loc, token: $1 };
16901
17154
  });
16902
17155
  function Extends(ctx, state2) {
16903
17156
  return (0, import_lib2.$EVENT)(ctx, state2, "Extends", Extends$0);
16904
17157
  }
16905
- 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) {
17158
+ 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) {
16906
17159
  return { $loc, token: $1 };
16907
17160
  });
16908
17161
  function Finally(ctx, state2) {
16909
17162
  return (0, import_lib2.$EVENT)(ctx, state2, "Finally", Finally$0);
16910
17163
  }
16911
- 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) {
17164
+ 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) {
16912
17165
  return { $loc, token: $1 };
16913
17166
  });
16914
17167
  function For(ctx, state2) {
16915
17168
  return (0, import_lib2.$EVENT)(ctx, state2, "For", For$0);
16916
17169
  }
16917
- 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) {
17170
+ 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) {
16918
17171
  return { $loc, token: $1 };
16919
17172
  });
16920
17173
  function From(ctx, state2) {
16921
17174
  return (0, import_lib2.$EVENT)(ctx, state2, "From", From$0);
16922
17175
  }
16923
- 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) {
17176
+ 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) {
16924
17177
  return { $loc, token: $1 };
16925
17178
  });
16926
17179
  function Function2(ctx, state2) {
16927
17180
  return (0, import_lib2.$EVENT)(ctx, state2, "Function", Function$0);
16928
17181
  }
16929
- 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) {
17182
+ 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) {
16930
17183
  return { $loc, token: $1, type: "GetOrSet" };
16931
17184
  });
16932
17185
  function GetOrSet(ctx, state2) {
16933
17186
  return (0, import_lib2.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
16934
17187
  }
16935
- var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L175, 'Hash "#"'), function($skip, $loc, $0, $1) {
17188
+ var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L176, 'Hash "#"'), function($skip, $loc, $0, $1) {
16936
17189
  return { $loc, token: $1 };
16937
17190
  });
16938
17191
  function Hash(ctx, state2) {
16939
17192
  return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
16940
17193
  }
16941
- 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) {
17194
+ 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) {
16942
17195
  return { $loc, token: $1 };
16943
17196
  });
16944
17197
  function If(ctx, state2) {
@@ -16950,67 +17203,67 @@ var Import$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)
16950
17203
  function Import(ctx, state2) {
16951
17204
  return (0, import_lib2.$EVENT)(ctx, state2, "Import", Import$0);
16952
17205
  }
16953
- 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) {
17206
+ 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) {
16954
17207
  return { $loc, token: $1 };
16955
17208
  });
16956
17209
  function In(ctx, state2) {
16957
17210
  return (0, import_lib2.$EVENT)(ctx, state2, "In", In$0);
16958
17211
  }
16959
- 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) {
17212
+ 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) {
16960
17213
  return { $loc, token: $1 };
16961
17214
  });
16962
17215
  function Infer(ctx, state2) {
16963
17216
  return (0, import_lib2.$EVENT)(ctx, state2, "Infer", Infer$0);
16964
17217
  }
16965
- 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) {
17218
+ 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) {
16966
17219
  return { $loc, token: $1 };
16967
17220
  });
16968
17221
  function LetOrConst(ctx, state2) {
16969
17222
  return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
16970
17223
  }
16971
- 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) {
17224
+ 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) {
16972
17225
  return { $loc, token: $1 };
16973
17226
  });
16974
17227
  function Const(ctx, state2) {
16975
17228
  return (0, import_lib2.$EVENT)(ctx, state2, "Const", Const$0);
16976
17229
  }
16977
- 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) {
17230
+ 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) {
16978
17231
  return { $loc, token: $1 };
16979
17232
  });
16980
17233
  function Is(ctx, state2) {
16981
17234
  return (0, import_lib2.$EVENT)(ctx, state2, "Is", Is$0);
16982
17235
  }
16983
- 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) {
17236
+ 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) {
16984
17237
  return { $loc, token: $1 };
16985
17238
  });
16986
17239
  function LetOrConstOrVar(ctx, state2) {
16987
17240
  return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
16988
17241
  }
16989
- 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) {
17242
+ 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) {
16990
17243
  return { $loc, token: $1 };
16991
17244
  });
16992
17245
  function Like(ctx, state2) {
16993
17246
  return (0, import_lib2.$EVENT)(ctx, state2, "Like", Like$0);
16994
17247
  }
16995
- 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) {
17248
+ 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) {
16996
17249
  return { $loc, token: "while" };
16997
17250
  });
16998
17251
  function Loop(ctx, state2) {
16999
17252
  return (0, import_lib2.$EVENT)(ctx, state2, "Loop", Loop$0);
17000
17253
  }
17001
- 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) {
17254
+ 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) {
17002
17255
  return { $loc, token: $1 };
17003
17256
  });
17004
17257
  function New(ctx, state2) {
17005
17258
  return (0, import_lib2.$EVENT)(ctx, state2, "New", New$0);
17006
17259
  }
17007
- 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) {
17260
+ 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) {
17008
17261
  return { $loc, token: "!" };
17009
17262
  });
17010
17263
  function Not(ctx, state2) {
17011
17264
  return (0, import_lib2.$EVENT)(ctx, state2, "Not", Not$0);
17012
17265
  }
17013
- 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) {
17266
+ 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) {
17014
17267
  return { $loc, token: $1 };
17015
17268
  });
17016
17269
  function Of(ctx, state2) {
@@ -17028,7 +17281,7 @@ var OpenBrace$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L1, 'OpenBrace
17028
17281
  function OpenBrace(ctx, state2) {
17029
17282
  return (0, import_lib2.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
17030
17283
  }
17031
- var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L188, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
17284
+ var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L189, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
17032
17285
  return { $loc, token: $1 };
17033
17286
  });
17034
17287
  function OpenBracket(ctx, state2) {
@@ -17040,49 +17293,49 @@ var OpenParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L4, 'OpenParen
17040
17293
  function OpenParen(ctx, state2) {
17041
17294
  return (0, import_lib2.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
17042
17295
  }
17043
- 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) {
17296
+ 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) {
17044
17297
  return { $loc, token: $1 };
17045
17298
  });
17046
17299
  function Operator(ctx, state2) {
17047
17300
  return (0, import_lib2.$EVENT)(ctx, state2, "Operator", Operator$0);
17048
17301
  }
17049
- 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) {
17302
+ 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) {
17050
17303
  return { $loc, token: $1, ts: true };
17051
17304
  });
17052
17305
  function Override(ctx, state2) {
17053
17306
  return (0, import_lib2.$EVENT)(ctx, state2, "Override", Override$0);
17054
17307
  }
17055
- 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) {
17308
+ 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) {
17056
17309
  return { $loc, token: $1 };
17057
17310
  });
17058
17311
  function Own(ctx, state2) {
17059
17312
  return (0, import_lib2.$EVENT)(ctx, state2, "Own", Own$0);
17060
17313
  }
17061
- 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) {
17314
+ 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) {
17062
17315
  return { $loc, token: $1 };
17063
17316
  });
17064
17317
  function Public(ctx, state2) {
17065
17318
  return (0, import_lib2.$EVENT)(ctx, state2, "Public", Public$0);
17066
17319
  }
17067
- 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) {
17320
+ 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) {
17068
17321
  return { $loc, token: $1 };
17069
17322
  });
17070
17323
  function Private(ctx, state2) {
17071
17324
  return (0, import_lib2.$EVENT)(ctx, state2, "Private", Private$0);
17072
17325
  }
17073
- 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) {
17326
+ 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) {
17074
17327
  return { $loc, token: $1 };
17075
17328
  });
17076
17329
  function Protected(ctx, state2) {
17077
17330
  return (0, import_lib2.$EVENT)(ctx, state2, "Protected", Protected$0);
17078
17331
  }
17079
- 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) {
17332
+ 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) {
17080
17333
  return { $loc, token: "||>" };
17081
17334
  });
17082
- 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) {
17335
+ 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) {
17083
17336
  return { $loc, token: "|>=" };
17084
17337
  });
17085
- 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) {
17338
+ 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) {
17086
17339
  return { $loc, token: "|>" };
17087
17340
  });
17088
17341
  var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
@@ -17095,19 +17348,19 @@ var QuestionMark$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L6, 'Questio
17095
17348
  function QuestionMark(ctx, state2) {
17096
17349
  return (0, import_lib2.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
17097
17350
  }
17098
- 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) {
17351
+ 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) {
17099
17352
  return { $loc, token: $1, ts: true };
17100
17353
  });
17101
17354
  function Readonly(ctx, state2) {
17102
17355
  return (0, import_lib2.$EVENT)(ctx, state2, "Readonly", Readonly$0);
17103
17356
  }
17104
- 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) {
17357
+ 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) {
17105
17358
  return { $loc, token: $1 };
17106
17359
  });
17107
17360
  function Return(ctx, state2) {
17108
17361
  return (0, import_lib2.$EVENT)(ctx, state2, "Return", Return$0);
17109
17362
  }
17110
- 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) {
17363
+ 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) {
17111
17364
  return { $loc, token: $1 };
17112
17365
  });
17113
17366
  function Satisfies(ctx, state2) {
@@ -17119,7 +17372,7 @@ var Semicolon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L119, 'Semicolo
17119
17372
  function Semicolon(ctx, state2) {
17120
17373
  return (0, import_lib2.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
17121
17374
  }
17122
- var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L204, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
17375
+ var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L205, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
17123
17376
  return { $loc, token: $1 };
17124
17377
  });
17125
17378
  function SingleQuote(ctx, state2) {
@@ -17131,149 +17384,149 @@ var Star$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L75, 'Star "*"'), fu
17131
17384
  function Star(ctx, state2) {
17132
17385
  return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
17133
17386
  }
17134
- 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) {
17387
+ 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) {
17135
17388
  return { $loc, token: $1 };
17136
17389
  });
17137
- 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) {
17390
+ 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) {
17138
17391
  return { $loc, token: "static " };
17139
17392
  });
17140
17393
  var Static$$ = [Static$0, Static$1];
17141
17394
  function Static(ctx, state2) {
17142
17395
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Static", Static$$);
17143
17396
  }
17144
- var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L206, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
17397
+ var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L207, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
17145
17398
  return { $loc, token: $1 };
17146
17399
  });
17147
17400
  function SubstitutionStart(ctx, state2) {
17148
17401
  return (0, import_lib2.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
17149
17402
  }
17150
- 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) {
17403
+ 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) {
17151
17404
  return { $loc, token: $1 };
17152
17405
  });
17153
17406
  function Super(ctx, state2) {
17154
17407
  return (0, import_lib2.$EVENT)(ctx, state2, "Super", Super$0);
17155
17408
  }
17156
- 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) {
17409
+ 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) {
17157
17410
  return { $loc, token: $1 };
17158
17411
  });
17159
17412
  function Switch(ctx, state2) {
17160
17413
  return (0, import_lib2.$EVENT)(ctx, state2, "Switch", Switch$0);
17161
17414
  }
17162
- 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) {
17415
+ 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) {
17163
17416
  return { $loc, token: $1 };
17164
17417
  });
17165
17418
  function Target(ctx, state2) {
17166
17419
  return (0, import_lib2.$EVENT)(ctx, state2, "Target", Target$0);
17167
17420
  }
17168
- 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) {
17421
+ 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) {
17169
17422
  return { $loc, token: "" };
17170
17423
  });
17171
17424
  function Then(ctx, state2) {
17172
17425
  return (0, import_lib2.$EVENT)(ctx, state2, "Then", Then$0);
17173
17426
  }
17174
- 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) {
17427
+ 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) {
17175
17428
  return { $loc, token: $1 };
17176
17429
  });
17177
17430
  function This(ctx, state2) {
17178
17431
  return (0, import_lib2.$EVENT)(ctx, state2, "This", This$0);
17179
17432
  }
17180
- 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) {
17433
+ 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) {
17181
17434
  return { $loc, token: $1 };
17182
17435
  });
17183
17436
  function Throw(ctx, state2) {
17184
17437
  return (0, import_lib2.$EVENT)(ctx, state2, "Throw", Throw$0);
17185
17438
  }
17186
- var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L213, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
17439
+ var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
17187
17440
  return { $loc, token: "`" };
17188
17441
  });
17189
17442
  function TripleDoubleQuote(ctx, state2) {
17190
17443
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
17191
17444
  }
17192
- var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
17445
+ var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
17193
17446
  return { $loc, token: "`" };
17194
17447
  });
17195
17448
  function TripleSingleQuote(ctx, state2) {
17196
17449
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
17197
17450
  }
17198
- var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
17451
+ var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
17199
17452
  return { $loc, token: "/" };
17200
17453
  });
17201
17454
  function TripleSlash(ctx, state2) {
17202
17455
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
17203
17456
  }
17204
- var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
17457
+ var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L217, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
17205
17458
  return { $loc, token: "`" };
17206
17459
  });
17207
17460
  function TripleTick(ctx, state2) {
17208
17461
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
17209
17462
  }
17210
- 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) {
17463
+ 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) {
17211
17464
  return { $loc, token: $1 };
17212
17465
  });
17213
17466
  function Try(ctx, state2) {
17214
17467
  return (0, import_lib2.$EVENT)(ctx, state2, "Try", Try$0);
17215
17468
  }
17216
- 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) {
17469
+ 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) {
17217
17470
  return { $loc, token: $1 };
17218
17471
  });
17219
17472
  function Typeof(ctx, state2) {
17220
17473
  return (0, import_lib2.$EVENT)(ctx, state2, "Typeof", Typeof$0);
17221
17474
  }
17222
- 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) {
17475
+ 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) {
17223
17476
  return { $loc, token: $1 };
17224
17477
  });
17225
17478
  function Undefined(ctx, state2) {
17226
17479
  return (0, import_lib2.$EVENT)(ctx, state2, "Undefined", Undefined$0);
17227
17480
  }
17228
- 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) {
17481
+ 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) {
17229
17482
  return { $loc, token: $1, negated: true };
17230
17483
  });
17231
17484
  function Unless(ctx, state2) {
17232
17485
  return (0, import_lib2.$EVENT)(ctx, state2, "Unless", Unless$0);
17233
17486
  }
17234
- 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) {
17487
+ 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) {
17235
17488
  return { $loc, token: $1, negated: true };
17236
17489
  });
17237
17490
  function Until(ctx, state2) {
17238
17491
  return (0, import_lib2.$EVENT)(ctx, state2, "Until", Until$0);
17239
17492
  }
17240
- 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) {
17493
+ 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) {
17241
17494
  return { $loc, token: $1 };
17242
17495
  });
17243
17496
  function Using(ctx, state2) {
17244
17497
  return (0, import_lib2.$EVENT)(ctx, state2, "Using", Using$0);
17245
17498
  }
17246
- 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) {
17499
+ 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) {
17247
17500
  return { $loc, token: $1 };
17248
17501
  });
17249
17502
  function Var(ctx, state2) {
17250
17503
  return (0, import_lib2.$EVENT)(ctx, state2, "Var", Var$0);
17251
17504
  }
17252
- 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) {
17505
+ 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) {
17253
17506
  return { $loc, token: $1 };
17254
17507
  });
17255
17508
  function Void(ctx, state2) {
17256
17509
  return (0, import_lib2.$EVENT)(ctx, state2, "Void", Void$0);
17257
17510
  }
17258
- 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) {
17511
+ 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) {
17259
17512
  return { $loc, token: "case" };
17260
17513
  });
17261
17514
  function When(ctx, state2) {
17262
17515
  return (0, import_lib2.$EVENT)(ctx, state2, "When", When$0);
17263
17516
  }
17264
- 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) {
17517
+ 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) {
17265
17518
  return { $loc, token: $1 };
17266
17519
  });
17267
17520
  function While(ctx, state2) {
17268
17521
  return (0, import_lib2.$EVENT)(ctx, state2, "While", While$0);
17269
17522
  }
17270
- 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) {
17523
+ 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) {
17271
17524
  return { $loc, token: $1 };
17272
17525
  });
17273
17526
  function With(ctx, state2) {
17274
17527
  return (0, import_lib2.$EVENT)(ctx, state2, "With", With$0);
17275
17528
  }
17276
- 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) {
17529
+ 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) {
17277
17530
  return { $loc, token: $1, type: "Yield" };
17278
17531
  });
17279
17532
  function Yield(ctx, state2) {
@@ -17352,7 +17605,7 @@ var JSXElement$$ = [JSXElement$0, JSXElement$1, JSXElement$2];
17352
17605
  function JSXElement(ctx, state2) {
17353
17606
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
17354
17607
  }
17355
- 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) {
17608
+ 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) {
17356
17609
  return { type: "JSXElement", children: $0, tag: $2 };
17357
17610
  });
17358
17611
  function JSXSelfClosingElement(ctx, state2) {
@@ -17386,7 +17639,7 @@ var JSXOptionalClosingElement$$ = [JSXOptionalClosingElement$0, JSXOptionalClosi
17386
17639
  function JSXOptionalClosingElement(ctx, state2) {
17387
17640
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
17388
17641
  }
17389
- 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 ">"'));
17642
+ 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 ">"'));
17390
17643
  function JSXClosingElement(ctx, state2) {
17391
17644
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
17392
17645
  }
@@ -17407,7 +17660,7 @@ var JSXFragment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)
17407
17660
  ];
17408
17661
  return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
17409
17662
  });
17410
- 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) {
17663
+ 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) {
17411
17664
  var children = $3;
17412
17665
  $0 = $0.slice(1);
17413
17666
  return {
@@ -17420,7 +17673,7 @@ var JSXFragment$$ = [JSXFragment$0, JSXFragment$1];
17420
17673
  function JSXFragment(ctx, state2) {
17421
17674
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
17422
17675
  }
17423
- var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L229, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
17676
+ var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L230, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
17424
17677
  state.JSXTagStack.push("");
17425
17678
  return $1;
17426
17679
  });
@@ -17437,11 +17690,11 @@ var JSXOptionalClosingFragment$$ = [JSXOptionalClosingFragment$0, JSXOptionalClo
17437
17690
  function JSXOptionalClosingFragment(ctx, state2) {
17438
17691
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
17439
17692
  }
17440
- var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L230, 'JSXClosingFragment "</>"');
17693
+ var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L231, 'JSXClosingFragment "</>"');
17441
17694
  function JSXClosingFragment(ctx, state2) {
17442
17695
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
17443
17696
  }
17444
- 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) {
17697
+ 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) {
17445
17698
  return config.defaultElement;
17446
17699
  });
17447
17700
  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)))));
@@ -17622,7 +17875,7 @@ var JSXAttribute$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(Identifier, (0, im
17622
17875
  }
17623
17876
  return $skip;
17624
17877
  });
17625
- var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L175, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
17878
+ var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L176, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
17626
17879
  return [" ", "id=", $2];
17627
17880
  });
17628
17881
  var JSXAttribute$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
@@ -17663,17 +17916,13 @@ var JSXAttributeName$$ = [JSXAttributeName$0, JSXAttributeName$1];
17663
17916
  function JSXAttributeName(ctx, state2) {
17664
17917
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXAttributeName", JSXAttributeName$$);
17665
17918
  }
17666
- var JSXAttributeInitializer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeJSXEnabled), (0, import_lib2.$E)(Whitespace), Equals, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$Q)(NonNewlineWhitespace), EOL)), InsertInlineOpenBrace, PushIndent, (0, import_lib2.$E)(PostfixedExpression), PopIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
17919
+ var JSXAttributeInitializer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeJSXEnabled), (0, import_lib2.$E)(Whitespace), Equals, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$Q)(NonNewlineWhitespace), EOL)), InsertInlineOpenBrace, NestedPostfixedExpressionNoTrailing, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
17667
17920
  var ws1 = $2;
17668
17921
  var equals = $3;
17669
- var ws2 = $4;
17670
17922
  var open = $5;
17671
- var indent = $6;
17672
- var expression = $7;
17673
- var close = $9;
17674
- if (!expression)
17675
- return $skip;
17676
- return [ws1, equals, ws2, open, indent, expression, close];
17923
+ var expression = $6;
17924
+ var close = $7;
17925
+ return [ws1, equals, open, trimFirstSpace(expression), close];
17677
17926
  });
17678
17927
  var JSXAttributeInitializer$1 = (0, import_lib2.$S)((0, import_lib2.$E)(Whitespace), Equals, (0, import_lib2.$E)(Whitespace), JSXAttributeValue);
17679
17928
  var JSXAttributeInitializer$$ = [JSXAttributeInitializer$0, JSXAttributeInitializer$1];
@@ -17967,7 +18216,7 @@ var JSXChildGeneral$$ = [JSXChildGeneral$0, JSXChildGeneral$1, JSXChildGeneral$2
17967
18216
  function JSXChildGeneral(ctx, state2) {
17968
18217
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
17969
18218
  }
17970
- 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) {
18219
+ 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) {
17971
18220
  return ["{/*", $2, "*/}"];
17972
18221
  });
17973
18222
  function JSXComment(ctx, state2) {
@@ -18255,37 +18504,37 @@ var InterfaceExtendsTarget$0 = ImplementsTarget;
18255
18504
  function InterfaceExtendsTarget(ctx, state2) {
18256
18505
  return (0, import_lib2.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
18257
18506
  }
18258
- 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) {
18507
+ 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) {
18259
18508
  return { $loc, token: $1 };
18260
18509
  });
18261
18510
  function TypeKeyword(ctx, state2) {
18262
18511
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
18263
18512
  }
18264
- 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) {
18513
+ 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) {
18265
18514
  return { $loc, token: $1 };
18266
18515
  });
18267
18516
  function Enum(ctx, state2) {
18268
18517
  return (0, import_lib2.$EVENT)(ctx, state2, "Enum", Enum$0);
18269
18518
  }
18270
- 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) {
18519
+ 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) {
18271
18520
  return { $loc, token: $1 };
18272
18521
  });
18273
18522
  function Interface(ctx, state2) {
18274
18523
  return (0, import_lib2.$EVENT)(ctx, state2, "Interface", Interface$0);
18275
18524
  }
18276
- 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) {
18525
+ 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) {
18277
18526
  return { $loc, token: $1 };
18278
18527
  });
18279
18528
  function Global(ctx, state2) {
18280
18529
  return (0, import_lib2.$EVENT)(ctx, state2, "Global", Global$0);
18281
18530
  }
18282
- 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) {
18531
+ 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) {
18283
18532
  return { $loc, token: $1 };
18284
18533
  });
18285
18534
  function Module(ctx, state2) {
18286
18535
  return (0, import_lib2.$EVENT)(ctx, state2, "Module", Module$0);
18287
18536
  }
18288
- 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) {
18537
+ 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) {
18289
18538
  return { $loc, token: $1 };
18290
18539
  });
18291
18540
  function Namespace(ctx, state2) {
@@ -18599,7 +18848,7 @@ var ReturnTypeSuffix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib
18599
18848
  function ReturnTypeSuffix(ctx, state2) {
18600
18849
  return (0, import_lib2.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
18601
18850
  }
18602
- 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) {
18851
+ 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) {
18603
18852
  var asserts = $1;
18604
18853
  var t = $3;
18605
18854
  if (!t)
@@ -18700,8 +18949,8 @@ var TypeUnarySuffix$$ = [TypeUnarySuffix$0, TypeUnarySuffix$1, TypeUnarySuffix$2
18700
18949
  function TypeUnarySuffix(ctx, state2) {
18701
18950
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
18702
18951
  }
18703
- var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L240, 'TypeUnaryOp "keyof"'), NonIdContinue);
18704
- var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L201, 'TypeUnaryOp "readonly"'), NonIdContinue);
18952
+ var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L241, 'TypeUnaryOp "keyof"'), NonIdContinue);
18953
+ var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'TypeUnaryOp "readonly"'), NonIdContinue);
18705
18954
  var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
18706
18955
  function TypeUnaryOp(ctx, state2) {
18707
18956
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
@@ -18731,7 +18980,7 @@ var TypeIndexedAccess$$ = [TypeIndexedAccess$0, TypeIndexedAccess$1, TypeIndexed
18731
18980
  function TypeIndexedAccess(ctx, state2) {
18732
18981
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
18733
18982
  }
18734
- var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L241, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
18983
+ var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L242, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
18735
18984
  return { $loc, token: "unknown" };
18736
18985
  });
18737
18986
  function UnknownAlias(ctx, state2) {
@@ -19124,13 +19373,13 @@ var TypeLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EX
19124
19373
  return num;
19125
19374
  return $0;
19126
19375
  });
19127
- 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) {
19376
+ 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) {
19128
19377
  return { type: "VoidType", $loc, token: $1 };
19129
19378
  });
19130
- 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) {
19379
+ 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) {
19131
19380
  return { type: "UniqueSymbolType", children: $0 };
19132
19381
  });
19133
- var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L244, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
19382
+ var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L245, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
19134
19383
  return { $loc, token: "[]" };
19135
19384
  });
19136
19385
  var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
@@ -19149,7 +19398,7 @@ var InlineInterfacePropertyDelimiter$0 = (0, import_lib2.$C)((0, import_lib2.$S)
19149
19398
  var InlineInterfacePropertyDelimiter$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)(SameLineOrIndentedFurther, InlineBasicInterfaceProperty)), InsertComma), function(value) {
19150
19399
  return value[1];
19151
19400
  });
19152
- 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 "}"'))));
19401
+ 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 "}"'))));
19153
19402
  var InlineInterfacePropertyDelimiter$3 = (0, import_lib2.$Y)(EOS);
19154
19403
  var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
19155
19404
  function InlineInterfacePropertyDelimiter(ctx, state2) {
@@ -19215,14 +19464,17 @@ function TypeFunctionArrow(ctx, state2) {
19215
19464
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeFunctionArrow", TypeFunctionArrow$0);
19216
19465
  }
19217
19466
  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) {
19467
+ var open = $1;
19218
19468
  var args = $2;
19219
- args = args.flatMap(([ws, [arg, delim]]) => [prepend(ws, arg), delim]);
19469
+ var ws = $3;
19470
+ var close = $4;
19471
+ args = args.flatMap(([ws2, [arg, delim]]) => [prepend(ws2, arg), delim]);
19220
19472
  args.pop();
19221
19473
  return {
19222
19474
  type: "TypeArguments",
19223
19475
  ts: true,
19224
19476
  args,
19225
- children: $0
19477
+ children: [open, args, ws, close]
19226
19478
  };
19227
19479
  });
19228
19480
  function TypeArguments(ctx, state2) {
@@ -19388,7 +19640,7 @@ var CivetPrologue$$ = [CivetPrologue$0, CivetPrologue$1];
19388
19640
  function CivetPrologue(ctx, state2) {
19389
19641
  return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
19390
19642
  }
19391
- 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) {
19643
+ 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) {
19392
19644
  var options = $3;
19393
19645
  return {
19394
19646
  type: "CivetPrologue",