@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/browser.js CHANGED
@@ -66,7 +66,7 @@ var Civet = (() => {
66
66
  $EVENT: () => $EVENT2,
67
67
  $EVENT_C: () => $EVENT_C2,
68
68
  $EXPECT: () => $EXPECT2,
69
- $L: () => $L246,
69
+ $L: () => $L247,
70
70
  $N: () => $N2,
71
71
  $P: () => $P2,
72
72
  $Q: () => $Q2,
@@ -91,7 +91,7 @@ var Civet = (() => {
91
91
  return result;
92
92
  };
93
93
  }
94
- function $L246(str) {
94
+ function $L247(str) {
95
95
  return function(_ctx, state2) {
96
96
  const { input, pos } = state2, { length } = str, end = pos + length;
97
97
  if (input.substring(pos, end) === str) {
@@ -545,6 +545,7 @@ ${body}`;
545
545
  hasAwait: () => hasAwait,
546
546
  hasExportDeclaration: () => hasExportDeclaration,
547
547
  hasImportDeclaration: () => hasImportDeclaration,
548
+ hasTrailingComment: () => hasTrailingComment,
548
549
  hasYield: () => hasYield,
549
550
  insertTrimmingSpace: () => insertTrimmingSpace,
550
551
  isComma: () => isComma,
@@ -770,6 +771,8 @@ ${body}`;
770
771
  if (!(node != null)) {
771
772
  return false;
772
773
  }
774
+ let ref3;
775
+ let ref4;
773
776
  switch (node.type) {
774
777
  case "ReturnStatement":
775
778
  case "ThrowStatement":
@@ -778,13 +781,30 @@ ${body}`;
778
781
  return true;
779
782
  }
780
783
  case "IfStatement": {
781
- return isExit(node.then) && isExit(node.else?.block);
784
+ return (
785
+ // `insertReturn` for IfStatement adds a return to children
786
+ // when there's no else block
787
+ (ref3 = node.children)[ref3.length - 1]?.type === "ReturnStatement" || (ref4 = node.children)[ref4.length - 1]?.[1]?.type === "ReturnStatement" || isExit(node.then) && isExit(node.else?.block)
788
+ );
789
+ }
790
+ case "PatternMatchingStatement": {
791
+ return isExit(node.children[0][1]);
792
+ }
793
+ case "SwitchStatement": {
794
+ return (
795
+ // Ensure exhaustive by requiring an else/default clause
796
+ node.caseBlock.clauses.some(($) => $.type === "DefaultClause") && // Every clause should exit
797
+ node.caseBlock.clauses.every(isExit)
798
+ );
799
+ }
800
+ case "TryStatement": {
801
+ return node.blocks.every(isExit);
782
802
  }
783
803
  case "BlockStatement": {
784
804
  return node.expressions.some((s) => isExit(s[1]));
785
805
  }
786
806
  case "IterationStatement": {
787
- return isLoopStatement(node) && gatherRecursiveWithinFunction(node.block, ($) => $.type === "BreakStatement").length === 0;
807
+ return isLoopStatement(node) && gatherRecursiveWithinFunction(node.block, ($1) => $1.type === "BreakStatement").length === 0;
788
808
  }
789
809
  default: {
790
810
  return false;
@@ -811,6 +831,22 @@ ${body}`;
811
831
  return children;
812
832
  }
813
833
  }
834
+ function hasTrailingComment(node) {
835
+ if (!(node != null)) {
836
+ return false;
837
+ }
838
+ if (node.type === "Comment") {
839
+ return true;
840
+ }
841
+ if (Array.isArray(node)) {
842
+ return hasTrailingComment(node[node.length - 1]);
843
+ }
844
+ if ("children" in node) {
845
+ let ref5;
846
+ return hasTrailingComment((ref5 = node.children)[ref5.length - 1]);
847
+ }
848
+ return false;
849
+ }
814
850
  function insertTrimmingSpace(target, c) {
815
851
  if (!(target != null)) {
816
852
  return target;
@@ -939,7 +975,7 @@ ${body}`;
939
975
  case "false":
940
976
  return false;
941
977
  }
942
- let ref3;
978
+ let ref6;
943
979
  switch (literal.subtype) {
944
980
  case "StringLiteral": {
945
981
  assert.equal(
@@ -955,8 +991,8 @@ ${body}`;
955
991
  return BigInt(raw.slice(0, -1));
956
992
  } else if (raw.match(/[\.eE]/)) {
957
993
  return parseFloat(raw);
958
- } else if ((ref3 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref3) && len(ref3, 2)) {
959
- const [, base] = ref3;
994
+ } else if ((ref6 = raw.match(/^[+-]?0(.)/)) && Array.isArray(ref6) && len(ref6, 2)) {
995
+ const [, base] = ref6;
960
996
  switch (base.toLowerCase()) {
961
997
  case "x":
962
998
  return parseInt(raw.replace(/0[xX]/, ""), 16);
@@ -1036,16 +1072,16 @@ ${body}`;
1036
1072
  return startsWithPredicate(node.children, predicate);
1037
1073
  }
1038
1074
  function hasAwait(exp) {
1039
- return gatherRecursiveWithinFunction(exp, ($1) => $1.type === "Await").length > 0;
1075
+ return gatherRecursiveWithinFunction(exp, ($2) => $2.type === "Await").length > 0;
1040
1076
  }
1041
1077
  function hasYield(exp) {
1042
- return gatherRecursiveWithinFunction(exp, ($2) => $2.type === "Yield").length > 0;
1078
+ return gatherRecursiveWithinFunction(exp, ($3) => $3.type === "Yield").length > 0;
1043
1079
  }
1044
1080
  function hasImportDeclaration(exp) {
1045
- return gatherRecursiveWithinFunction(exp, ($3) => $3.type === "ImportDeclaration").length > 0;
1081
+ return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ImportDeclaration").length > 0;
1046
1082
  }
1047
1083
  function hasExportDeclaration(exp) {
1048
- return gatherRecursiveWithinFunction(exp, ($4) => $4.type === "ExportDeclaration").length > 0;
1084
+ return gatherRecursiveWithinFunction(exp, ($5) => $5.type === "ExportDeclaration").length > 0;
1049
1085
  }
1050
1086
  function deepCopy(root) {
1051
1087
  const copied = /* @__PURE__ */ new Map();
@@ -1168,7 +1204,6 @@ ${body}`;
1168
1204
  "JSXElement",
1169
1205
  "JSXFragment",
1170
1206
  "Literal",
1171
- "NewExpression",
1172
1207
  "ParenthesizedExpression",
1173
1208
  "Ref",
1174
1209
  "Placeholder",
@@ -1190,7 +1225,10 @@ ${body}`;
1190
1225
  if (skipParens.has(expression.type)) {
1191
1226
  return expression;
1192
1227
  }
1193
- if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($5) => $5.type === "ObjectExpression")) {
1228
+ if (expression.type === "NewExpression" && expression.expression.children.some(($6) => $6?.type === "Call")) {
1229
+ return expression;
1230
+ }
1231
+ if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($7) => $7.type === "ObjectExpression")) {
1194
1232
  return expression;
1195
1233
  }
1196
1234
  }
@@ -1205,7 +1243,7 @@ ${body}`;
1205
1243
  });
1206
1244
  }
1207
1245
  function checkValidLHS(node) {
1208
- let ref4;
1246
+ let ref7;
1209
1247
  switch (node?.type) {
1210
1248
  case "UnaryExpression": {
1211
1249
  node.children.unshift({
@@ -1215,7 +1253,7 @@ ${body}`;
1215
1253
  return true;
1216
1254
  }
1217
1255
  case "CallExpression": {
1218
- const lastType = (ref4 = node.children)[ref4.length - 1]?.type;
1256
+ const lastType = (ref7 = node.children)[ref7.length - 1]?.type;
1219
1257
  switch (lastType) {
1220
1258
  case "PropertyAccess":
1221
1259
  case "SliceExpression":
@@ -1263,8 +1301,8 @@ ${body}`;
1263
1301
  node.parent = parent;
1264
1302
  }
1265
1303
  if (depth && isParent(node)) {
1266
- for (let ref5 = node.children, i9 = 0, len9 = ref5.length; i9 < len9; i9++) {
1267
- const child = ref5[i9];
1304
+ for (let ref8 = node.children, i9 = 0, len9 = ref8.length; i9 < len9; i9++) {
1305
+ const child = ref8[i9];
1268
1306
  updateParentPointers(child, node, depth - 1);
1269
1307
  }
1270
1308
  }
@@ -1312,11 +1350,11 @@ ${body}`;
1312
1350
  const wrap = suffix.type === "ReturnTypeAnnotation";
1313
1351
  spliceChild(suffix, suffix.t, 1, suffix.t = [
1314
1352
  getTrimmingSpace(suffix.t),
1315
- wrap && "(",
1353
+ wrap ? "(" : void 0,
1316
1354
  // TODO: avoid parens if unnecessary
1317
1355
  "undefined | ",
1318
- parenthesizeType(insertTrimmingSpace(suffix.t, "")),
1319
- wrap && ")"
1356
+ parenthesizeType(trimFirstSpace(suffix.t)),
1357
+ wrap ? ")" : void 0
1320
1358
  ]);
1321
1359
  }
1322
1360
  var typeNeedsNoParens = /* @__PURE__ */ new Set([
@@ -1330,7 +1368,11 @@ ${body}`;
1330
1368
  if (typeNeedsNoParens.has(type.type)) {
1331
1369
  return type;
1332
1370
  }
1333
- return ["(", type, ")"];
1371
+ return makeNode({
1372
+ type: "TypeParenthesized",
1373
+ ts: true,
1374
+ children: ["(", type, ")"]
1375
+ });
1334
1376
  }
1335
1377
  function wrapIIFE(expressions, asyncFlag, generator) {
1336
1378
  let awaitPrefix;
@@ -1401,8 +1443,8 @@ ${body}`;
1401
1443
  children.splice(1, 0, ".bind(this)");
1402
1444
  }
1403
1445
  if (gatherRecursiveWithinFunction(block, (a2) => typeof a2 === "object" && a2 != null && "token" in a2 && a2.token === "arguments").length) {
1404
- let ref6;
1405
- children[children.length - 1] = (ref6 = parameters.children)[ref6.length - 1] = "(arguments)";
1446
+ let ref9;
1447
+ children[children.length - 1] = (ref9 = parameters.children)[ref9.length - 1] = "(arguments)";
1406
1448
  }
1407
1449
  }
1408
1450
  let exp = makeNode({
@@ -1429,13 +1471,16 @@ ${body}`;
1429
1471
  }
1430
1472
  return exp;
1431
1473
  }
1432
- function wrapWithReturn(expression) {
1474
+ function wrapWithReturn(expression, parent = expression?.parent, semi = false) {
1433
1475
  const children = expression ? ["return ", expression] : ["return"];
1476
+ if (semi) {
1477
+ children.unshift(";");
1478
+ }
1434
1479
  return makeNode({
1435
1480
  type: "ReturnStatement",
1436
1481
  children,
1437
1482
  expression,
1438
- parent: expression?.parent
1483
+ parent
1439
1484
  });
1440
1485
  }
1441
1486
  function flatJoin(array, separator) {
@@ -1677,9 +1722,11 @@ ${body}`;
1677
1722
  if (l) {
1678
1723
  if (arrayElementHasTrailingComma(after[l - 1]))
1679
1724
  l++;
1725
+ const elements2 = trimFirstSpace(after);
1680
1726
  blockPrefix = {
1681
1727
  type: "PostRestBindingElements",
1682
- children: ["[", trimFirstSpace(after), "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
1728
+ elements: elements2,
1729
+ children: ["[", elements2, "] = ", restIdentifier, ".splice(-", l.toString(), ")"],
1683
1730
  names: after.flatMap((p) => p.names)
1684
1731
  };
1685
1732
  }
@@ -1717,13 +1764,14 @@ ${body}`;
1717
1764
  return;
1718
1765
  }
1719
1766
  if (opts?.injectParamProps && n.type === "Parameter" && n.accessModifier) {
1720
- n.names.forEach((id) => ({
1721
- push: thisAssignments2.push({
1767
+ for (let ref1 = n.names, i2 = 0, len1 = ref1.length; i2 < len1; i2++) {
1768
+ const id = ref1[i2];
1769
+ thisAssignments2.push({
1722
1770
  type: "AssignmentExpression",
1723
1771
  children: [`this.${id} = `, id],
1724
1772
  js: true
1725
- })
1726
- }));
1773
+ });
1774
+ }
1727
1775
  return;
1728
1776
  }
1729
1777
  const { blockPrefix } = n;
@@ -1735,8 +1783,8 @@ ${body}`;
1735
1783
  return [splices, thisAssignments];
1736
1784
  }
1737
1785
  function arrayElementHasTrailingComma(elementNode) {
1738
- let ref1;
1739
- const lastChild = (ref1 = elementNode.children)[ref1.length - 1];
1786
+ let ref2;
1787
+ const lastChild = (ref2 = elementNode.children)[ref2.length - 1];
1740
1788
  return lastChild && lastChild[lastChild.length - 1]?.token === ",";
1741
1789
  }
1742
1790
  function gatherBindingPatternTypeSuffix(pattern) {
@@ -1748,8 +1796,8 @@ ${body}`;
1748
1796
  case "ArrayBindingPattern": {
1749
1797
  {
1750
1798
  const results = [];
1751
- for (let ref2 = pattern.elements, i2 = 0, len1 = ref2.length; i2 < len1; i2++) {
1752
- const elem = ref2[i2];
1799
+ for (let ref3 = pattern.elements, i3 = 0, len22 = ref3.length; i3 < len22; i3++) {
1800
+ const elem = ref3[i3];
1753
1801
  let { typeSuffix } = elem;
1754
1802
  typeSuffix ??= elem.binding?.typeSuffix;
1755
1803
  if (typeSuffix) {
@@ -1787,8 +1835,8 @@ ${body}`;
1787
1835
  {
1788
1836
  let restType;
1789
1837
  const results1 = [];
1790
- for (let ref3 = pattern.properties, i3 = 0, len22 = ref3.length; i3 < len22; i3++) {
1791
- const prop = ref3[i3];
1838
+ for (let ref4 = pattern.properties, i4 = 0, len3 = ref4.length; i4 < len3; i4++) {
1839
+ const prop = ref4[i4];
1792
1840
  let { typeSuffix } = prop;
1793
1841
  typeSuffix ??= prop.value?.typeSuffix;
1794
1842
  if (typeSuffix) {
@@ -1955,8 +2003,14 @@ ${body}`;
1955
2003
  // [indent, statement]
1956
2004
  preludeVar,
1957
2005
  moduloRef,
1958
- ts(": (a: number, b: number) => number"),
1959
- " = (a, b) => (a % b + b) % b"
2006
+ " = ",
2007
+ ts("("),
2008
+ "(a",
2009
+ ts(": number"),
2010
+ ", b",
2011
+ ts(": number"),
2012
+ ") => (a % b + b) % b",
2013
+ ts(") as ((a: number, b: number) => number) & ((a: bigint, b: bigint) => bigint)")
1960
2014
  ], ";\n"]);
1961
2015
  },
1962
2016
  Falsy(FalsyRef) {
@@ -2029,7 +2083,7 @@ ${body}`;
2029
2083
  AutoPromise(ref) {
2030
2084
  state.prelude.push([
2031
2085
  "",
2032
- ts(["type ", ref, "<T> = T extends Promise<unknown> ? T : Promise<T>"]),
2086
+ ts(["type ", ref, "<T> = Promise<Awaited<T>>"]),
2033
2087
  ";\n"
2034
2088
  ]);
2035
2089
  },
@@ -2521,7 +2575,7 @@ ${js}`
2521
2575
  if (!Array.isArray(args)) {
2522
2576
  throw new Error("getTypeArguments could not find relevant array");
2523
2577
  }
2524
- return args.filter((a) => typeof a === "object" && a != null && "type" in a && a.type === "TypeArgument");
2578
+ return args.filter((a1) => typeof a1 === "object" && a1 != null && "type" in a1 && a1.type === "TypeArgument");
2525
2579
  }
2526
2580
  function isVoidType(t) {
2527
2581
  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";
@@ -2698,14 +2752,10 @@ ${js}`
2698
2752
  let ref1;
2699
2753
  if (!((ref1 = block.children)[ref1.length - 2]?.type === "ReturnStatement")) {
2700
2754
  let ref2;
2701
- const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]) || ";";
2755
+ const indent = getIndent((ref2 = block.expressions)[ref2.length - 1]);
2702
2756
  block.expressions.push([
2703
- [indent],
2704
- {
2705
- type: "ReturnStatement",
2706
- expression: ref,
2707
- children: ["return ", ref]
2708
- }
2757
+ indent,
2758
+ wrapWithReturn(ref, block, !indent)
2709
2759
  ]);
2710
2760
  }
2711
2761
  return true;
@@ -2717,34 +2767,103 @@ ${js}`
2717
2767
  const index = children.indexOf(pattern.elements);
2718
2768
  if (index < 0)
2719
2769
  throw new Error("failed to find elements in ArrayBindingPattern");
2720
- children[index] = pattern.elements.map((el) => {
2721
- const [ws, e, delim] = el.children;
2722
- return { ...el, children: [ws, patternAsValue(e), delim] };
2723
- });
2724
- return { ...pattern, children };
2770
+ const elements = children[index] = pattern.elements.map(patternAsValue);
2771
+ return { ...pattern, elements, children };
2725
2772
  }
2726
2773
  case "ObjectBindingPattern": {
2727
2774
  const children = [...pattern.children];
2728
2775
  const index = children.indexOf(pattern.properties);
2729
2776
  if (index < 0)
2730
2777
  throw new Error("failed to find properties in ArrayBindingPattern");
2731
- children[index] = pattern.properties.map(patternAsValue);
2732
- return { ...pattern, children };
2778
+ const properties = children[index] = pattern.properties.map(patternAsValue);
2779
+ return { ...pattern, properties, children };
2733
2780
  }
2734
- case "Identifier":
2735
2781
  case "BindingProperty": {
2736
- const children = [
2737
- // { name: value } = ... declares value, not name
2738
- pattern.value ?? pattern.name,
2739
- pattern.delim
2740
- ];
2741
- if (isWhitespaceOrEmpty(pattern.children[0])) {
2742
- children.unshift(pattern.children[0]);
2782
+ let children;
2783
+ if (pattern.value?.type === "Identifier") {
2784
+ children = [pattern.value, pattern.delim];
2785
+ if (isWhitespaceOrEmpty(pattern.children[0])) {
2786
+ children.unshift(pattern.children[0]);
2787
+ }
2788
+ } else {
2789
+ children = [...pattern.children];
2790
+ if (pattern.initializer != null) {
2791
+ const index = children.indexOf(pattern.initializer);
2792
+ assert.notEqual(index, -1, "failed to find initializer in BindingElement");
2793
+ children.splice(index, 1);
2794
+ }
2795
+ if (pattern.value != null) {
2796
+ children = children.map(($2) => $2 === pattern.value ? patternAsValue(pattern.value) : $2);
2797
+ }
2743
2798
  }
2744
2799
  return { ...pattern, children };
2745
2800
  }
2746
- default:
2801
+ case "AtBindingProperty": {
2802
+ const children = [...pattern.children];
2803
+ if (pattern.initializer != null) {
2804
+ const index = children.indexOf(pattern.initializer);
2805
+ assert.notEqual(index, -1, "failed to find initializer in AtBindingProperty");
2806
+ children.splice(index, 1);
2807
+ }
2808
+ return { ...pattern, children };
2809
+ }
2810
+ case "BindingElement": {
2811
+ const children = [...pattern.children];
2812
+ if (pattern.initializer != null) {
2813
+ const index2 = children.indexOf(pattern.initializer);
2814
+ assert.notEqual(index2, -1, "failed to find initializer in BindingElement");
2815
+ children.splice(index2, 1);
2816
+ }
2817
+ const index = children.indexOf(pattern.binding);
2818
+ assert.notEqual(index, -1, "failed to find binding in BindingElement");
2819
+ children[index] = patternAsValue(pattern.binding);
2820
+ return { ...pattern, children };
2821
+ }
2822
+ default: {
2747
2823
  return pattern;
2824
+ }
2825
+ }
2826
+ }
2827
+ function patternBindings(pattern) {
2828
+ const bindings = [];
2829
+ recurse(pattern);
2830
+ return bindings;
2831
+ function recurse(pattern2) {
2832
+ switch (pattern2.type) {
2833
+ case "ArrayBindingPattern": {
2834
+ for (let ref3 = pattern2.elements, i2 = 0, len1 = ref3.length; i2 < len1; i2++) {
2835
+ const element = ref3[i2];
2836
+ recurse(element);
2837
+ }
2838
+ ;
2839
+ break;
2840
+ }
2841
+ case "ObjectBindingPattern": {
2842
+ for (let ref4 = pattern2.properties, i3 = 0, len22 = ref4.length; i3 < len22; i3++) {
2843
+ const property = ref4[i3];
2844
+ recurse(property);
2845
+ }
2846
+ ;
2847
+ break;
2848
+ }
2849
+ case "BindingElement": {
2850
+ recurse(pattern2.binding);
2851
+ break;
2852
+ }
2853
+ case "BindingProperty": {
2854
+ recurse(pattern2.value ?? pattern2.name);
2855
+ break;
2856
+ }
2857
+ case "Binding": {
2858
+ recurse(pattern2.pattern);
2859
+ break;
2860
+ }
2861
+ case "Identifier":
2862
+ case "AtBinding": {
2863
+ bindings.push(pattern2);
2864
+ break;
2865
+ }
2866
+ }
2748
2867
  }
2749
2868
  }
2750
2869
  function assignResults(node, collect) {
@@ -2753,8 +2872,8 @@ ${js}`
2753
2872
  switch (node.type) {
2754
2873
  case "BlockStatement":
2755
2874
  if (node.expressions.length) {
2756
- let ref3;
2757
- assignResults((ref3 = node.expressions)[ref3.length - 1], collect);
2875
+ let ref5;
2876
+ assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
2758
2877
  } else {
2759
2878
  node.expressions.push(["", collect("void 0"), ";"]);
2760
2879
  }
@@ -2789,7 +2908,7 @@ ${js}`
2789
2908
  if (exp.type === "LabelledStatement") {
2790
2909
  exp = exp.statement;
2791
2910
  }
2792
- let ref4;
2911
+ let ref6;
2793
2912
  switch (exp.type) {
2794
2913
  case "BreakStatement":
2795
2914
  case "ContinueStatement":
@@ -2800,14 +2919,14 @@ ${js}`
2800
2919
  return;
2801
2920
  }
2802
2921
  case "Declaration": {
2803
- let ref5;
2922
+ let ref7;
2804
2923
  if (exp.bindings?.length) {
2805
- ref5 = patternAsValue((ref4 = exp.bindings)[ref4.length - 1].pattern);
2924
+ ref7 = patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern);
2806
2925
  } else {
2807
- ref5 = "void 0";
2926
+ ref7 = "void 0";
2808
2927
  }
2809
2928
  ;
2810
- const value = ref5;
2929
+ const value = ref7;
2811
2930
  exp.children.push([
2812
2931
  "",
2813
2932
  [";", collect(value)]
@@ -2855,11 +2974,17 @@ ${js}`
2855
2974
  return;
2856
2975
  }
2857
2976
  case "SwitchStatement": {
2858
- assignResults(exp.children[2], collect);
2977
+ for (let ref8 = exp.caseBlock.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
2978
+ const clause = ref8[i4];
2979
+ assignResults(clause, collect);
2980
+ }
2859
2981
  return;
2860
2982
  }
2861
2983
  case "TryStatement": {
2862
- exp.blocks.forEach((block) => assignResults(block, collect));
2984
+ for (let ref9 = exp.blocks, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
2985
+ const block = ref9[i5];
2986
+ assignResults(block, collect);
2987
+ }
2863
2988
  return;
2864
2989
  }
2865
2990
  }
@@ -2880,20 +3005,28 @@ ${js}`
2880
3005
  const last = node.expressions[node.expressions.length - 1];
2881
3006
  insertReturn(last);
2882
3007
  } else {
2883
- if (node.parent.type === "CatchClause") {
2884
- node.expressions.push(["return"]);
3008
+ let m1;
3009
+ if (m1 = node.parent?.type, m1 === "CatchClause" || m1 === "WhenClause") {
3010
+ node.expressions.push(["", wrapWithReturn(void 0, node)]);
2885
3011
  }
2886
3012
  }
2887
3013
  return;
2888
3014
  }
2889
3015
  case "WhenClause": {
2890
3016
  if (node.break) {
2891
- node.children.splice(node.children.indexOf(node.break), 1);
3017
+ const breakIndex = node.children.indexOf(node.break);
3018
+ assert.notEqual(breakIndex, -1, "Could not find break in when clause");
3019
+ node.children.splice(breakIndex, 1);
3020
+ node.break = void 0;
2892
3021
  }
2893
- if (node.block.expressions.length) {
2894
- insertReturn(node.block);
2895
- } else {
2896
- node.block.expressions.push(wrapWithReturn());
3022
+ insertReturn(node.block);
3023
+ if (!isExit(node.block)) {
3024
+ const comment = hasTrailingComment(node.block.expressions);
3025
+ let ref10;
3026
+ node.block.expressions.push([
3027
+ comment ? (ref10 = node.block.expressions)[ref10.length - 1][0] || "\n" : "",
3028
+ wrapWithReturn(void 0, node, !comment)
3029
+ ]);
2897
3030
  }
2898
3031
  return;
2899
3032
  }
@@ -2918,7 +3051,7 @@ ${js}`
2918
3051
  if (exp.type === "LabelledStatement") {
2919
3052
  exp = exp.statement;
2920
3053
  }
2921
- let ref6;
3054
+ let ref11;
2922
3055
  switch (exp.type) {
2923
3056
  case "BreakStatement":
2924
3057
  case "ContinueStatement":
@@ -2929,27 +3062,30 @@ ${js}`
2929
3062
  return;
2930
3063
  }
2931
3064
  case "Declaration": {
2932
- let ref7;
3065
+ let ref12;
2933
3066
  if (exp.bindings?.length) {
2934
- ref7 = [" ", patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern)];
3067
+ ref12 = [" ", patternAsValue((ref11 = exp.bindings)[ref11.length - 1].pattern)];
2935
3068
  } else {
2936
- ref7 = [];
3069
+ ref12 = [];
2937
3070
  }
2938
3071
  ;
2939
- const value = ref7;
3072
+ const value = ref12;
2940
3073
  const parent = outer.parent;
2941
3074
  const index = findChildIndex(parent?.expressions, outer);
2942
3075
  assert.notEqual(index, -1, "Could not find declaration in parent");
2943
- parent.expressions.splice(index + 1, 0, ["", {
2944
- type: "ReturnStatement",
2945
- expression: value,
2946
- children: [
2947
- !(parent.expressions[index][2] === ";") ? ";" : void 0,
2948
- "return",
2949
- value
2950
- ],
2951
- parent: exp
2952
- }]);
3076
+ parent.expressions.splice(index + 1, 0, [
3077
+ "",
3078
+ {
3079
+ type: "ReturnStatement",
3080
+ expression: value,
3081
+ children: [
3082
+ !(parent.expressions[index][2] === ";") ? ";" : void 0,
3083
+ "return",
3084
+ value
3085
+ ],
3086
+ parent: exp
3087
+ }
3088
+ ]);
2953
3089
  braceBlock(parent);
2954
3090
  return;
2955
3091
  }
@@ -2960,12 +3096,7 @@ ${js}`
2960
3096
  assert.notEqual(index, -1, "Could not find function declaration in parent");
2961
3097
  parent.expressions.splice(index + 1, 0, [
2962
3098
  "",
2963
- {
2964
- type: "ReturnStatement",
2965
- expression: exp.id,
2966
- children: [";return ", exp.id],
2967
- parent: exp
2968
- }
3099
+ wrapWithReturn(exp.id, exp, true)
2969
3100
  ]);
2970
3101
  braceBlock(parent);
2971
3102
  return;
@@ -2988,12 +3119,11 @@ ${js}`
2988
3119
  if (exp.else)
2989
3120
  insertReturn(exp.else.block);
2990
3121
  else
2991
- exp.children.push(["", {
2992
- type: "ReturnStatement",
2993
- // NOTE: add a prefixed semi-colon because the if block may not be braced
2994
- children: [";return"],
2995
- parent: exp
2996
- }]);
3122
+ exp.children.push([
3123
+ "",
3124
+ // NOTE: add a prefixed semicolon because the if block may not be braced
3125
+ wrapWithReturn(void 0, exp, true)
3126
+ ]);
2997
3127
  return;
2998
3128
  }
2999
3129
  case "PatternMatchingStatement": {
@@ -3001,30 +3131,30 @@ ${js}`
3001
3131
  return;
3002
3132
  }
3003
3133
  case "SwitchStatement": {
3004
- insertSwitchReturns(exp);
3134
+ for (let ref13 = exp.caseBlock.clauses, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
3135
+ const clause = ref13[i6];
3136
+ insertReturn(clause);
3137
+ }
3005
3138
  return;
3006
3139
  }
3007
3140
  case "TryStatement": {
3008
- exp.blocks.forEach((block) => insertReturn(block));
3141
+ for (let ref14 = exp.blocks, i7 = 0, len6 = ref14.length; i7 < len6; i7++) {
3142
+ const block = ref14[i7];
3143
+ insertReturn(block);
3144
+ }
3009
3145
  return;
3010
3146
  }
3011
3147
  }
3012
3148
  if (node[node.length - 1]?.type === "SemicolonDelimiter") {
3013
3149
  return;
3014
3150
  }
3015
- const returnStatement = wrapWithReturn(node[1]);
3016
- node.splice(1, 1, returnStatement);
3017
- }
3018
- function insertSwitchReturns(exp) {
3019
- exp.caseBlock.clauses.forEach((clause) => {
3020
- return insertReturn(clause);
3021
- });
3151
+ node[1] = wrapWithReturn(node[1]);
3022
3152
  }
3023
3153
  function processBreakContinueWith(statement) {
3024
3154
  let changed = false;
3025
3155
  for (const control of gatherRecursiveWithinFunction(
3026
3156
  statement.block,
3027
- ($2) => $2.type === "BreakStatement" || $2.type === "ContinueStatement"
3157
+ ($3) => $3.type === "BreakStatement" || $3.type === "ContinueStatement"
3028
3158
  )) {
3029
3159
  let controlName2 = function() {
3030
3160
  switch (control.type) {
@@ -3039,8 +3169,8 @@ ${js}`
3039
3169
  var controlName = controlName2;
3040
3170
  if (control.with) {
3041
3171
  if (control.label) {
3042
- let m1;
3043
- 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)) {
3172
+ let m2;
3173
+ 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)) {
3044
3174
  continue;
3045
3175
  }
3046
3176
  } else {
@@ -3059,7 +3189,7 @@ ${js}`
3059
3189
  )
3060
3190
  );
3061
3191
  updateParentPointers(control.with, control);
3062
- const i = control.children.findIndex(($3) => $3?.type === "Error");
3192
+ const i = control.children.findIndex(($4) => $4?.type === "Error");
3063
3193
  if (i >= 0) {
3064
3194
  control.children.splice(i, 1);
3065
3195
  }
@@ -3101,7 +3231,7 @@ ${js}`
3101
3231
  }
3102
3232
  const resultsRef = statement.resultsRef = makeRef("results");
3103
3233
  const declaration = iterationDeclaration(statement);
3104
- const { ancestor, child } = findAncestor(statement, ($4) => $4.type === "BlockStatement");
3234
+ const { ancestor, child } = findAncestor(statement, ($5) => $5.type === "BlockStatement");
3105
3235
  assert.notNull(ancestor, `Could not find block containing ${statement.type}`);
3106
3236
  const index = findChildIndex(ancestor.expressions, child);
3107
3237
  assert.notEqual(index, -1, `Could not find ${statement.type} in containing block`);
@@ -3154,6 +3284,9 @@ ${js}`
3154
3284
  case "product": {
3155
3285
  return "1";
3156
3286
  }
3287
+ case "join": {
3288
+ return '""';
3289
+ }
3157
3290
  default: {
3158
3291
  return "0";
3159
3292
  }
@@ -3198,7 +3331,8 @@ ${js}`
3198
3331
  case "count": {
3199
3332
  return ["if (", node, ") ++", resultsRef];
3200
3333
  }
3201
- case "sum": {
3334
+ case "sum":
3335
+ case "join": {
3202
3336
  return [resultsRef, " += ", node];
3203
3337
  }
3204
3338
  case "product": {
@@ -3223,9 +3357,9 @@ ${js}`
3223
3357
  }
3224
3358
  const reduction = statement.type === "ForStatement" && statement.reduction;
3225
3359
  function fillBlock(expression) {
3226
- let ref8;
3227
- let m2;
3228
- 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) {
3360
+ let ref15;
3361
+ let m3;
3362
+ 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) {
3229
3363
  block.expressions.pop();
3230
3364
  }
3231
3365
  block.expressions.push(expression);
@@ -3255,7 +3389,29 @@ ${js}`
3255
3389
  }
3256
3390
  }
3257
3391
  if (statement.type === "ForStatement" && statement.declaration?.type === "ForDeclaration") {
3258
- fillBlock(["", patternAsValue(statement.declaration.binding)]);
3392
+ if (reduction) {
3393
+ const bindings = patternBindings(statement.declaration.binding.pattern);
3394
+ if (bindings.length) {
3395
+ fillBlock(["", bindings[0]]);
3396
+ for (const binding of bindings.slice(1)) {
3397
+ binding.children.unshift({
3398
+ type: "Error",
3399
+ subtype: "Warning",
3400
+ message: "Ignored binding in reduction loop with implicit body"
3401
+ });
3402
+ }
3403
+ } else {
3404
+ fillBlock([
3405
+ "",
3406
+ {
3407
+ type: "Error",
3408
+ message: "Empty binding pattern in reduction loop with implicit body"
3409
+ }
3410
+ ]);
3411
+ }
3412
+ } else {
3413
+ fillBlock(["", patternAsValue(statement.declaration.binding.pattern)]);
3414
+ }
3259
3415
  block.empty = false;
3260
3416
  }
3261
3417
  return false;
@@ -3283,28 +3439,33 @@ ${js}`
3283
3439
  injectParamProps: isConstructor
3284
3440
  });
3285
3441
  if (isConstructor) {
3286
- const { ancestor } = findAncestor(f, ($5) => $5.type === "ClassExpression");
3442
+ const { ancestor } = findAncestor(f, ($6) => $6.type === "ClassExpression");
3287
3443
  if (ancestor != null) {
3288
- 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));
3444
+ 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));
3289
3445
  const classExpressions = ancestor.body.expressions;
3290
3446
  let index = findChildIndex(classExpressions, f);
3291
3447
  assert.notEqual(index, -1, "Could not find constructor in class");
3292
- let m3;
3293
- while (m3 = classExpressions[index - 1]?.[1], typeof m3 === "object" && m3 != null && "type" in m3 && m3.type === "MethodDefinition" && "name" in m3 && m3.name === "constructor") {
3448
+ let m4;
3449
+ while (m4 = classExpressions[index - 1]?.[1], typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "MethodDefinition" && "name" in m4 && m4.name === "constructor") {
3294
3450
  index--;
3295
3451
  }
3296
3452
  const fStatement = classExpressions[index];
3297
- for (let ref9 = gatherRecursive(parameters, ($9) => $9.type === "Parameter"), i2 = 0, len1 = ref9.length; i2 < len1; i2++) {
3298
- const parameter = ref9[i2];
3299
- if (!parameter.typeSuffix) {
3453
+ for (let ref16 = gatherRecursive(parameters, ($10) => $10.type === "Parameter"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
3454
+ const parameter = ref16[i8];
3455
+ const { accessModifier } = parameter;
3456
+ if (!(accessModifier || parameter.typeSuffix)) {
3300
3457
  continue;
3301
3458
  }
3302
- for (let ref10 = gatherRecursive(parameter, ($10) => $10.type === "AtBinding"), i3 = 0, len22 = ref10.length; i3 < len22; i3++) {
3303
- const binding = ref10[i3];
3459
+ for (let ref17 = gatherRecursive(parameter, ($11) => $11.type === "AtBinding"), i9 = 0, len8 = ref17.length; i9 < len8; i9++) {
3460
+ const binding = ref17[i9];
3304
3461
  const typeSuffix = binding.parent?.typeSuffix;
3305
- if (!typeSuffix) {
3462
+ if (!(accessModifier || typeSuffix)) {
3306
3463
  continue;
3307
3464
  }
3465
+ if (parameter.accessModifier) {
3466
+ replaceNode(parameter.accessModifier, void 0);
3467
+ parameter.accessModifier = void 0;
3468
+ }
3308
3469
  const id = binding.ref.id;
3309
3470
  if (fields.has(id)) {
3310
3471
  continue;
@@ -3313,7 +3474,7 @@ ${js}`
3313
3474
  type: "FieldDefinition",
3314
3475
  id,
3315
3476
  typeSuffix,
3316
- children: [id, typeSuffix]
3477
+ children: [accessModifier, id, typeSuffix]
3317
3478
  }, ";"]);
3318
3479
  fStatement[0] = "";
3319
3480
  }
@@ -3337,10 +3498,10 @@ ${js}`
3337
3498
  if (isConstructor) {
3338
3499
  const superCalls = gatherNodes(
3339
3500
  expressions,
3340
- (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"
3501
+ (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"
3341
3502
  );
3342
3503
  if (superCalls.length) {
3343
- const { child } = findAncestor(superCalls[0], (a3) => a3 === block);
3504
+ const { child } = findAncestor(superCalls[0], (a4) => a4 === block);
3344
3505
  const index = findChildIndex(expressions, child);
3345
3506
  if (index < 0) {
3346
3507
  throw new Error("Could not find super call within top-level expressions");
@@ -3355,21 +3516,33 @@ ${js}`
3355
3516
  function processSignature(f) {
3356
3517
  const { block, signature } = f;
3357
3518
  if (!f.async?.length && hasAwait(block)) {
3358
- f.async.push("async ");
3359
- signature.modifier.async = true;
3360
- }
3361
- if (!f.generator?.length && hasYield(block)) {
3362
- if (f.type === "ArrowFunction") {
3363
- gatherRecursiveWithinFunction(block, ($11) => $11.type === "YieldExpression").forEach((y) => {
3364
- const i = y.children.findIndex(($12) => $12.type === "Yield");
3365
- return y.children.splice(i + 1, 0, {
3519
+ if (f.async != null) {
3520
+ f.async.push("async ");
3521
+ signature.modifier.async = true;
3522
+ } else {
3523
+ for (let ref18 = gatherRecursiveWithinFunction(block, ($12) => $12.type === "Await"), i10 = 0, len9 = ref18.length; i10 < len9; i10++) {
3524
+ const a = ref18[i10];
3525
+ const i = findChildIndex(a.parent, a);
3526
+ a.parent.children.splice(i + 1, 0, {
3366
3527
  type: "Error",
3367
- message: "Can't use yield inside of => arrow function"
3528
+ message: `await invalid in ${signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
3368
3529
  });
3369
- });
3370
- } else {
3530
+ }
3531
+ }
3532
+ }
3533
+ if (!f.generator?.length && hasYield(block)) {
3534
+ if (f.generator != null) {
3371
3535
  f.generator.push("*");
3372
3536
  signature.modifier.generator = true;
3537
+ } else {
3538
+ for (let ref19 = gatherRecursiveWithinFunction(block, ($13) => $13.type === "YieldExpression"), i11 = 0, len10 = ref19.length; i11 < len10; i11++) {
3539
+ const y = ref19[i11];
3540
+ const i = y.children.findIndex(($14) => $14.type === "Yield");
3541
+ y.children.splice(i + 1, 0, {
3542
+ type: "Error",
3543
+ message: `yield invalid in ${f.type === "ArrowFunction" ? "=> arrow function" : signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
3544
+ });
3545
+ }
3373
3546
  }
3374
3547
  }
3375
3548
  if (signature.modifier.async && !signature.modifier.generator && signature.returnType && !isPromiseType(signature.returnType.t)) {
@@ -3377,21 +3550,15 @@ ${js}`
3377
3550
  }
3378
3551
  }
3379
3552
  function processFunctions(statements, config2) {
3380
- for (let ref11 = gatherRecursiveAll(statements, ($13) => $13.type === "FunctionExpression" || $13.type === "ArrowFunction"), i4 = 0, len3 = ref11.length; i4 < len3; i4++) {
3381
- const f = ref11[i4];
3382
- if (f.type === "FunctionExpression") {
3553
+ for (let ref20 = gatherRecursiveAll(statements, ($15) => $15.type === "FunctionExpression" || $15.type === "ArrowFunction" || $15.type === "MethodDefinition"), i12 = 0, len11 = ref20.length; i12 < len11; i12++) {
3554
+ const f = ref20[i12];
3555
+ if (f.type === "FunctionExpression" || f.type === "MethodDefinition") {
3383
3556
  implicitFunctionBlock(f);
3384
3557
  }
3385
3558
  processSignature(f);
3386
3559
  processParams(f);
3387
3560
  processReturn(f, config2.implicitReturns);
3388
3561
  }
3389
- for (let ref12 = gatherRecursiveAll(statements, ($14) => $14.type === "MethodDefinition"), i5 = 0, len4 = ref12.length; i5 < len4; i5++) {
3390
- const f = ref12[i5];
3391
- implicitFunctionBlock(f);
3392
- processParams(f);
3393
- processReturn(f, config2.implicitReturns);
3394
- }
3395
3562
  }
3396
3563
  function expressionizeIteration(exp) {
3397
3564
  let { async, generator, block, children, statement } = exp;
@@ -3440,9 +3607,9 @@ ${js}`
3440
3607
  }
3441
3608
  let done;
3442
3609
  if (!async) {
3443
- let ref13;
3444
- if ((ref13 = blockContainingStatement(exp)) && typeof ref13 === "object" && "block" in ref13 && "index" in ref13) {
3445
- const { block: parentBlock, index } = ref13;
3610
+ let ref21;
3611
+ if ((ref21 = blockContainingStatement(exp)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21) {
3612
+ const { block: parentBlock, index } = ref21;
3446
3613
  statements[0][0] = parentBlock.expressions[index][0];
3447
3614
  parentBlock.expressions.splice(index, index + 1 - index, ...statements);
3448
3615
  updateParentPointers(parentBlock);
@@ -3459,8 +3626,8 @@ ${js}`
3459
3626
  }
3460
3627
  }
3461
3628
  function processIterationExpressions(statements) {
3462
- for (let ref14 = gatherRecursiveAll(statements, ($15) => $15.type === "IterationExpression"), i6 = 0, len5 = ref14.length; i6 < len5; i6++) {
3463
- const s = ref14[i6];
3629
+ for (let ref22 = gatherRecursiveAll(statements, ($16) => $16.type === "IterationExpression"), i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
3630
+ const s = ref22[i13];
3464
3631
  expressionizeIteration(s);
3465
3632
  }
3466
3633
  }
@@ -3486,21 +3653,21 @@ ${js}`
3486
3653
  ...parameters,
3487
3654
  children: (() => {
3488
3655
  const results1 = [];
3489
- for (let ref15 = parameters.children, i7 = 0, len6 = ref15.length; i7 < len6; i7++) {
3490
- let parameter = ref15[i7];
3656
+ for (let ref23 = parameters.children, i14 = 0, len13 = ref23.length; i14 < len13; i14++) {
3657
+ let parameter = ref23[i14];
3491
3658
  if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
3492
- let ref16;
3493
- if (ref16 = parameter.initializer) {
3494
- const initializer = ref16;
3659
+ let ref24;
3660
+ if (ref24 = parameter.initializer) {
3661
+ const initializer = ref24;
3495
3662
  args.push(initializer.expression, parameter.delim);
3496
3663
  parameter = {
3497
3664
  ...parameter,
3498
3665
  initializer: void 0,
3499
- children: parameter.children.filter((a4) => a4 !== initializer)
3666
+ children: parameter.children.filter((a5) => a5 !== initializer)
3500
3667
  };
3501
3668
  } else {
3502
3669
  args.push(parameter.children.filter(
3503
- (a5) => a5 !== parameter.typeSuffix
3670
+ (a6) => a6 !== parameter.typeSuffix
3504
3671
  ));
3505
3672
  }
3506
3673
  }
@@ -3512,7 +3679,7 @@ ${js}`
3512
3679
  expression = {
3513
3680
  ...expression,
3514
3681
  parameters: newParameters,
3515
- children: expression.children.map(($16) => $16 === parameters ? newParameters : $16)
3682
+ children: expression.children.map(($17) => $17 === parameters ? newParameters : $17)
3516
3683
  };
3517
3684
  }
3518
3685
  return {
@@ -3534,7 +3701,7 @@ ${js}`
3534
3701
  ref = makeRef("$");
3535
3702
  inplacePrepend(ref, body);
3536
3703
  }
3537
- if (startsWithPredicate(body, ($17) => $17.type === "ObjectExpression")) {
3704
+ if (startsWithPredicate(body, ($18) => $18.type === "ObjectExpression")) {
3538
3705
  body = makeLeftHandSideExpression(body);
3539
3706
  }
3540
3707
  const parameters = makeNode({
@@ -3573,7 +3740,7 @@ ${js}`
3573
3740
  }
3574
3741
  if (gatherRecursiveWithinFunction(
3575
3742
  block,
3576
- (a6) => a6 === ref
3743
+ (a7) => a7 === ref
3577
3744
  ).length > 1) {
3578
3745
  fn.ampersandBlock = false;
3579
3746
  }
@@ -4140,7 +4307,7 @@ ${js}`
4140
4307
  // source/parser/pattern-matching.civet
4141
4308
  function processPatternTest(lhs, patterns) {
4142
4309
  const { ref, refAssignmentComma } = maybeRefAssignment(lhs, "m");
4143
- const conditionExpression = flatJoin(patterns.map(($) => getPatternConditions($, ref)).map(($1) => flatJoin($1, " && ")), " || ");
4310
+ const conditionExpression = flatJoin(patterns.map(($1) => getPatternConditions($1, ref)).map(($2) => flatJoin($2, " && ")), " || ");
4144
4311
  return makeLeftHandSideExpression(makeNode({
4145
4312
  type: "PatternTest",
4146
4313
  children: [
@@ -4150,7 +4317,7 @@ ${js}`
4150
4317
  }));
4151
4318
  }
4152
4319
  function processPatternMatching(statements) {
4153
- gatherRecursiveAll(statements, ($2) => $2.type === "SwitchStatement").forEach((s) => {
4320
+ gatherRecursiveAll(statements, ($3) => $3.type === "SwitchStatement").forEach((s) => {
4154
4321
  const { caseBlock } = s;
4155
4322
  const { clauses } = caseBlock;
4156
4323
  for (let i1 = 0, len3 = clauses.length; i1 < len3; i1++) {
@@ -4164,7 +4331,7 @@ ${js}`
4164
4331
  }
4165
4332
  let errors = false;
4166
4333
  let isPattern = false;
4167
- if (clauses.some(($3) => $3.type === "PatternClause")) {
4334
+ if (clauses.some(($4) => $4.type === "PatternClause")) {
4168
4335
  isPattern = true;
4169
4336
  for (let i2 = 0, len1 = clauses.length; i2 < len1; i2++) {
4170
4337
  const c = clauses[i2];
@@ -4202,7 +4369,7 @@ ${js}`
4202
4369
  }
4203
4370
  let { patterns, block } = c;
4204
4371
  let pattern = patterns[0];
4205
- const conditionExpression = flatJoin(patterns.map(($4) => getPatternConditions($4, ref)).map(($5) => flatJoin($5, " && ")), " || ");
4372
+ const conditionExpression = flatJoin(patterns.map(($5) => getPatternConditions($5, ref)).map(($6) => flatJoin($6, " && ")), " || ");
4206
4373
  const condition2 = makeNode({
4207
4374
  type: "ParenthesizedExpression",
4208
4375
  children: ["(", ...refAssignmentComma, conditionExpression, ")"],
@@ -4395,38 +4562,59 @@ ${js}`
4395
4562
  }
4396
4563
  }
4397
4564
  let [splices, thisAssignments] = gatherBindingCode(pattern);
4398
- const patternBindings = nonMatcherBindings(pattern);
4565
+ const patternBindings2 = nonMatcherBindings(pattern);
4399
4566
  splices = splices.map((s) => [", ", nonMatcherBindings(s)]);
4400
- thisAssignments = thisAssignments.map(($6) => ["", $6, ";"]);
4401
- const duplicateDeclarations = aggregateDuplicateBindings([patternBindings, splices]);
4567
+ thisAssignments = thisAssignments.map(($7) => ["", $7, ";"]);
4568
+ const duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices]);
4402
4569
  return [
4403
4570
  ["", {
4404
4571
  type: "Declaration",
4405
- children: [decl, patternBindings, suffix, " = ", ref, ...splices],
4572
+ children: [decl, patternBindings2, suffix, " = ", ref, ...splices],
4406
4573
  names: [],
4407
4574
  bindings: []
4408
4575
  // avoid implicit return of any bindings
4409
4576
  }, ";"],
4410
4577
  ...thisAssignments,
4411
- ...duplicateDeclarations.map(($7) => ["", $7, ";"])
4578
+ ...duplicateDeclarations.map(($8) => ["", $8, ";"])
4412
4579
  ];
4413
4580
  }
4414
4581
  function elideMatchersFromArrayBindings(elements) {
4415
- return elements.map((el) => {
4416
- if (el.type === "BindingRestElement") {
4417
- return ["", el, void 0];
4418
- }
4419
- const { children: [ws, e, delim] } = el;
4420
- switch (e.type) {
4421
- case "Literal":
4422
- case "RegularExpressionLiteral":
4423
- case "StringLiteral":
4424
- case "PinPattern":
4425
- return delim;
4426
- default:
4427
- return [ws, nonMatcherBindings(e), delim];
4582
+ const results = [];
4583
+ for (let i5 = 0, len4 = elements.length; i5 < len4; i5++) {
4584
+ const element = elements[i5];
4585
+ switch (element.type) {
4586
+ case "BindingRestElement":
4587
+ case "ElisionElement": {
4588
+ results.push(element);
4589
+ break;
4590
+ }
4591
+ case "BindingElement": {
4592
+ switch (element.binding.type) {
4593
+ case "Literal":
4594
+ case "RegularExpressionLiteral":
4595
+ case "StringLiteral":
4596
+ case "PinPattern": {
4597
+ results.push(element.delim);
4598
+ break;
4599
+ }
4600
+ default: {
4601
+ const binding = nonMatcherBindings(element.binding);
4602
+ results.push(makeNode({
4603
+ ...element,
4604
+ binding,
4605
+ children: element.children.map((c) => {
4606
+ return c === element.binding ? binding : c;
4607
+ })
4608
+ }));
4609
+ }
4610
+ }
4611
+ ;
4612
+ break;
4613
+ }
4428
4614
  }
4429
- });
4615
+ }
4616
+ ;
4617
+ return results;
4430
4618
  }
4431
4619
  function elideMatchersFromPropertyBindings(properties) {
4432
4620
  return properties.map((p) => {
@@ -4434,6 +4622,10 @@ ${js}`
4434
4622
  case "BindingProperty": {
4435
4623
  const { children, name, value } = p;
4436
4624
  const [ws] = children;
4625
+ const shouldElide = name.type === "NumericLiteral" && !value?.name || name.type === "ComputedPropertyName" && value?.subtype === "NumericLiteral";
4626
+ if (shouldElide) {
4627
+ return;
4628
+ }
4437
4629
  switch (value && value.type) {
4438
4630
  case "ArrayBindingPattern":
4439
4631
  case "ObjectBindingPattern": {
@@ -4465,32 +4657,22 @@ ${js}`
4465
4657
  }
4466
4658
  function nonMatcherBindings(pattern) {
4467
4659
  switch (pattern.type) {
4468
- case "ArrayBindingPattern": {
4660
+ case "ArrayBindingPattern":
4661
+ case "PostRestBindingElements": {
4469
4662
  const elements = elideMatchersFromArrayBindings(pattern.elements);
4470
- return {
4663
+ return makeNode({
4471
4664
  ...pattern,
4472
4665
  elements,
4473
- children: pattern.children.map(($8) => $8 === pattern.elements ? elements : $8)
4474
- };
4475
- }
4476
- case "PostRestBindingElements": {
4477
- const els = elideMatchersFromArrayBindings(pattern.children[1]);
4478
- return {
4479
- ...pattern,
4480
- children: [
4481
- pattern.children[0],
4482
- els,
4483
- ...pattern.children.slice(2)
4484
- ]
4485
- };
4666
+ children: pattern.children.map(($9) => $9 === pattern.elements ? elements : $9)
4667
+ });
4486
4668
  }
4487
4669
  case "ObjectBindingPattern": {
4488
4670
  const properties = elideMatchersFromPropertyBindings(pattern.properties);
4489
- return {
4671
+ return makeNode({
4490
4672
  ...pattern,
4491
4673
  properties,
4492
- children: pattern.children.map(($9) => $9 === pattern.properties ? properties : $9)
4493
- };
4674
+ children: pattern.children.map(($10) => $10 === pattern.properties ? properties : $10)
4675
+ });
4494
4676
  }
4495
4677
  default: {
4496
4678
  return pattern;
@@ -4498,32 +4680,26 @@ ${js}`
4498
4680
  }
4499
4681
  }
4500
4682
  function aggregateDuplicateBindings(bindings) {
4501
- const props = gatherRecursiveAll(bindings, ($10) => $10.type === "BindingProperty");
4502
- const arrayBindings = gatherRecursiveAll(bindings, ($11) => $11.type === "ArrayBindingPattern");
4503
- for (let i5 = 0, len4 = arrayBindings.length; i5 < len4; i5++) {
4504
- const { elements } = arrayBindings[i5];
4505
- for (let i6 = 0, len5 = elements.length; i6 < len5; i6++) {
4506
- const element = elements[i6];
4507
- if (Array.isArray(element)) {
4508
- const [, e] = element;
4509
- if (e.type === "Identifier") {
4510
- props.push(e);
4511
- } else if (e.type === "BindingRestElement") {
4512
- props.push(e);
4513
- }
4514
- }
4515
- }
4516
- }
4683
+ const props = gatherRecursiveAll(
4684
+ bindings,
4685
+ ($) => $.type === "BindingProperty" || // Don't deduplicate ...rest properties; user should do so manually
4686
+ // because ...rest can be named arbitrarily
4687
+ //$.type is "BindingRestProperty"
4688
+ $.type === "Identifier" && $.parent?.type === "BindingElement" || $.type === "BindingRestElement"
4689
+ );
4517
4690
  const declarations = [];
4518
4691
  const propsGroupedByName = /* @__PURE__ */ new Map();
4519
- for (let i7 = 0, len6 = props.length; i7 < len6; i7++) {
4520
- const p = props[i7];
4692
+ for (let i6 = 0, len5 = props.length; i6 < len5; i6++) {
4693
+ const p = props[i6];
4521
4694
  const { name, value } = p;
4522
4695
  let m1;
4523
4696
  if (m1 = value?.type, m1 === "ArrayBindingPattern" || m1 === "ObjectBindingPattern") {
4524
4697
  continue;
4525
4698
  }
4526
4699
  const key = value?.name || name?.name || name;
4700
+ if (key?.type === "NumericLiteral" || key?.type === "ComputedPropertyName") {
4701
+ continue;
4702
+ }
4527
4703
  if (propsGroupedByName.has(key)) {
4528
4704
  propsGroupedByName.get(key).push(p);
4529
4705
  } else {
@@ -4539,8 +4715,8 @@ ${js}`
4539
4715
  pos: 0,
4540
4716
  input: key
4541
4717
  })) {
4542
- for (let i8 = 0, len7 = shared.length; i8 < len7; i8++) {
4543
- const p = shared[i8];
4718
+ for (let i7 = 0, len6 = shared.length; i7 < len6; i7++) {
4719
+ const p = shared[i7];
4544
4720
  aliasBinding(p, makeRef(`_${key}`, key));
4545
4721
  }
4546
4722
  return;
@@ -5241,7 +5417,6 @@ ${js}`
5241
5417
 
5242
5418
  // source/parser/pipe.civet
5243
5419
  function constructInvocation(fn, arg) {
5244
- const fnArr = [fn.leadingComment, fn.expr, fn.trailingComment];
5245
5420
  let expr = fn.expr;
5246
5421
  while (expr.type === "ParenthesizedExpression") {
5247
5422
  expr = expr.expression;
@@ -5258,22 +5433,46 @@ ${js}`
5258
5433
  });
5259
5434
  }
5260
5435
  expr = fn.expr;
5261
- const lhs = makeLeftHandSideExpression(expr);
5436
+ let lhs = expr;
5437
+ if (!(lhs.type === "NewExpression")) {
5438
+ lhs = makeLeftHandSideExpression(lhs);
5439
+ }
5262
5440
  let comment = skipIfOnlyWS(fn.trailingComment);
5263
5441
  if (comment)
5264
- lhs.children.splice(2, 0, comment);
5442
+ lhs.children.push(comment);
5265
5443
  comment = skipIfOnlyWS(fn.leadingComment);
5266
5444
  if (comment)
5267
5445
  lhs.children.splice(1, 0, comment);
5268
5446
  switch (arg.type) {
5269
- case "CommaExpression":
5447
+ case "CommaExpression": {
5270
5448
  arg = makeLeftHandSideExpression(arg);
5271
5449
  break;
5450
+ }
5272
5451
  }
5273
- return {
5274
- type: "CallExpression",
5275
- children: [lhs, "(", arg, ")"]
5452
+ const args = [arg];
5453
+ const call = {
5454
+ type: "Call",
5455
+ args,
5456
+ children: ["(", args, ")"]
5276
5457
  };
5458
+ if (lhs.type === "NewExpression") {
5459
+ let { expression } = lhs;
5460
+ expression = {
5461
+ ...expression,
5462
+ type: "CallExpression",
5463
+ children: [...expression.children, call]
5464
+ };
5465
+ return {
5466
+ ...lhs,
5467
+ expression,
5468
+ children: lhs.children.map(($) => $ === lhs.expression ? expression : $)
5469
+ };
5470
+ } else {
5471
+ return {
5472
+ type: "CallExpression",
5473
+ children: [lhs, call]
5474
+ };
5475
+ }
5277
5476
  }
5278
5477
  function constructPipeStep(fn, arg, returning) {
5279
5478
  if (!returning) {
@@ -5320,21 +5519,24 @@ ${js}`
5320
5519
  let i = 0, l = body.length;
5321
5520
  const children = [ws];
5322
5521
  let usingRef = null;
5323
- for (i = 0; i < l; i++) {
5324
- const step = body[i];
5522
+ for (let i1 = 0, len3 = body.length; i1 < len3; i1++) {
5523
+ const i2 = i1;
5524
+ const step = body[i1];
5325
5525
  const [leadingComment, pipe, trailingComment, expr] = step;
5326
5526
  const returns = pipe.token === "||>";
5327
5527
  let ref, result, returning = returns ? arg : null;
5328
5528
  if (pipe.token === "|>=") {
5329
5529
  let initRef;
5330
- if (i === 0) {
5530
+ if (i2 === 0) {
5331
5531
  checkValidLHS(arg);
5332
5532
  outer:
5333
5533
  switch (arg.type) {
5334
- case "MemberExpression":
5335
- if (arg.children.length <= 2)
5534
+ case "MemberExpression": {
5535
+ if (arg.children.length <= 2) {
5336
5536
  break;
5337
- case "CallExpression":
5537
+ }
5538
+ }
5539
+ case "CallExpression": {
5338
5540
  const access = arg.children.pop();
5339
5541
  usingRef = makeRef();
5340
5542
  initRef = {
@@ -5346,6 +5548,7 @@ ${js}`
5346
5548
  children: [usingRef, access]
5347
5549
  };
5348
5550
  break;
5551
+ }
5349
5552
  }
5350
5553
  const lhs = [[
5351
5554
  [initRef],
@@ -5374,7 +5577,7 @@ ${js}`
5374
5577
  });
5375
5578
  }
5376
5579
  } else {
5377
- if (i === 0)
5580
+ if (i2 === 0)
5378
5581
  s.children = children;
5379
5582
  }
5380
5583
  if (returns && (ref = needsRef(arg))) {
@@ -5399,7 +5602,7 @@ ${js}`
5399
5602
  returning
5400
5603
  );
5401
5604
  if (result.type === "ReturnStatement") {
5402
- if (i < l - 1) {
5605
+ if (i2 < l - 1) {
5403
5606
  result.children.push({
5404
5607
  type: "Error",
5405
5608
  message: "Can't continue a pipeline after returning"
@@ -5427,7 +5630,7 @@ ${js}`
5427
5630
  };
5428
5631
  }
5429
5632
  children.push(arg);
5430
- if (!children.some(($) => $?.type === "ReturnStatement") && children.some(($1) => $1 === ",")) {
5633
+ if (!children.some(($1) => $1?.type === "ReturnStatement") && children.some(($2) => $2 === ",")) {
5431
5634
  const { parent } = s;
5432
5635
  const parenthesizedExpression = makeLeftHandSideExpression({ ...s });
5433
5636
  Object.assign(s, parenthesizedExpression, {
@@ -5713,7 +5916,8 @@ ${js}`
5713
5916
  blockPrefix.push(["", {
5714
5917
  type: "Declaration",
5715
5918
  children: [declaration, " = ", trimFirstSpace(expRef2), "[", counterRef, "]"],
5716
- names: assignmentNames
5919
+ names: assignmentNames,
5920
+ implicitLift: true
5717
5921
  }, ";"]);
5718
5922
  declaration = {
5719
5923
  type: "Declaration",
@@ -6566,11 +6770,11 @@ ${js}`
6566
6770
  if (glob?.type === "PropertyGlob") {
6567
6771
  let prefix = children.slice(0, i);
6568
6772
  const parts = [];
6569
- let refAssignmentComma;
6570
- if (prefix.length > 1) {
6571
- const ref = makeRef();
6572
- ({ refAssignmentComma } = makeRefAssignment(ref, prefix));
6573
- prefix = [ref];
6773
+ let ref;
6774
+ if (prefix.length > 1 && glob.object.properties.length > 1) {
6775
+ ref = makeRef();
6776
+ const { refAssignment } = makeRefAssignment(ref, prefix);
6777
+ prefix = [makeLeftHandSideExpression(refAssignment)];
6574
6778
  }
6575
6779
  prefix = prefix.concat(glob.dot);
6576
6780
  for (const part of glob.object.properties) {
@@ -6602,6 +6806,9 @@ ${js}`
6602
6806
  }
6603
6807
  if (!suppressPrefix) {
6604
6808
  value = prefix.concat(trimFirstSpace(value));
6809
+ if (ref != null) {
6810
+ prefix = [ref].concat(glob.dot);
6811
+ }
6605
6812
  }
6606
6813
  if (wValue)
6607
6814
  value.unshift(wValue);
@@ -6612,7 +6819,8 @@ ${js}`
6612
6819
  dots: part.dots,
6613
6820
  delim: part.delim,
6614
6821
  names: part.names,
6615
- children: part.children.slice(0, 2).concat(value, part.delim)
6822
+ children: part.children.slice(0, 2).concat(value, part.delim),
6823
+ usesRef: Boolean(ref)
6616
6824
  });
6617
6825
  } else {
6618
6826
  parts.push({
@@ -6629,12 +6837,13 @@ ${js}`
6629
6837
  value,
6630
6838
  part.delim
6631
6839
  // comma delimiter
6632
- ]
6840
+ ],
6841
+ usesRef: Boolean(ref)
6633
6842
  });
6634
6843
  }
6635
6844
  }
6636
6845
  let ref2;
6637
- let object = {
6846
+ const object = {
6638
6847
  type: "ObjectExpression",
6639
6848
  children: [
6640
6849
  glob.object.children[0],
@@ -6645,13 +6854,6 @@ ${js}`
6645
6854
  ],
6646
6855
  properties: parts
6647
6856
  };
6648
- if (refAssignmentComma) {
6649
- object = makeNode({
6650
- type: "ParenthesizedExpression",
6651
- children: ["(", ...refAssignmentComma, object, ")"],
6652
- expression: object
6653
- });
6654
- }
6655
6857
  if (i === children.length - 1)
6656
6858
  return object;
6657
6859
  return processCallMemberExpression({
@@ -6803,19 +7005,19 @@ ${js}`
6803
7005
  }
6804
7006
  function convertMethodToFunction(method) {
6805
7007
  const { signature, block } = method;
6806
- let { modifier, optional } = signature;
6807
- if (optional)
7008
+ const { async, modifier, optional } = signature;
7009
+ if (optional) {
6808
7010
  return;
6809
- if (modifier) {
6810
- if (modifier.get || modifier.set) {
6811
- return;
6812
- } else if (modifier.async) {
6813
- modifier = [modifier.children[0][0], " function ", ...modifier.children.slice(1)];
6814
- } else {
6815
- modifier = ["function ", ...modifier.children || []];
7011
+ }
7012
+ if (modifier?.get || modifier?.set) {
7013
+ return;
7014
+ }
7015
+ const func = ["function "];
7016
+ if (async != null) {
7017
+ func.unshift(async);
7018
+ if (async.length && !async[async.length - 1]?.length) {
7019
+ async.push(" ");
6816
7020
  }
6817
- } else {
6818
- modifier = "function ";
6819
7021
  }
6820
7022
  return {
6821
7023
  ...signature,
@@ -6823,7 +7025,7 @@ ${js}`
6823
7025
  signature,
6824
7026
  type: "FunctionExpression",
6825
7027
  children: [
6826
- [modifier, ...signature.children.slice(1)],
7028
+ [...func, ...signature.children.slice(1)],
6827
7029
  block
6828
7030
  ],
6829
7031
  block
@@ -6861,40 +7063,54 @@ ${js}`
6861
7063
  };
6862
7064
  }
6863
7065
  function convertObjectToJSXAttributes(obj) {
6864
- const { properties } = obj;
6865
7066
  const parts = [];
6866
7067
  const rest = [];
6867
- for (let i = 0; i < properties.length; i++) {
7068
+ let i4 = 0;
7069
+ for (const part of obj.properties) {
7070
+ const i = i4++;
7071
+ if (part.usesRef) {
7072
+ rest.push(part);
7073
+ continue;
7074
+ }
6868
7075
  if (i > 0)
6869
7076
  parts.push(" ");
6870
- const part = properties[i];
6871
7077
  switch (part.type) {
6872
- case "Identifier":
7078
+ case "Identifier": {
6873
7079
  parts.push([part.name, "={", part.name, "}"]);
6874
7080
  break;
6875
- case "Property":
7081
+ }
7082
+ case "Property": {
6876
7083
  if (part.name.type === "ComputedPropertyName") {
6877
7084
  rest.push(part);
6878
7085
  } else {
6879
7086
  parts.push([part.name, "={", trimFirstSpace(part.value), "}"]);
6880
7087
  }
7088
+ ;
6881
7089
  break;
6882
- case "SpreadProperty":
7090
+ }
7091
+ case "SpreadProperty": {
6883
7092
  parts.push(["{", part.dots, part.value, "}"]);
6884
7093
  break;
6885
- case "MethodDefinition":
7094
+ }
7095
+ case "MethodDefinition": {
6886
7096
  const func = convertMethodToFunction(part);
6887
7097
  if (func) {
6888
7098
  parts.push([part.name, "={", convertMethodToFunction(part), "}"]);
6889
7099
  } else {
6890
7100
  rest.push(part);
6891
7101
  }
7102
+ ;
6892
7103
  break;
6893
- default:
7104
+ }
7105
+ default: {
6894
7106
  throw new Error(`invalid object literal type in JSX attribute: ${part.type}`);
7107
+ }
6895
7108
  }
6896
7109
  }
6897
7110
  if (rest.length) {
7111
+ if (parts.length && parts[parts.length - 1] !== " ") {
7112
+ parts.push(" ");
7113
+ }
6898
7114
  parts.push(["{...{", ...rest, "}}"]);
6899
7115
  }
6900
7116
  return parts;
@@ -6923,7 +7139,8 @@ ${js}`
6923
7139
  block = {
6924
7140
  type: "BlockStatement",
6925
7141
  expressions,
6926
- children: ["{ ", expressions, " }"]
7142
+ children: ["{ ", expressions, " }"],
7143
+ bare: false
6927
7144
  };
6928
7145
  }
6929
7146
  if (autoReturn) {
@@ -6955,7 +7172,7 @@ ${js}`
6955
7172
  tail.push(...splices.map((s) => [", ", s]), ...thisAssignments.map((a) => [", ", a]));
6956
7173
  }
6957
7174
  function processAssignments(statements) {
6958
- for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i4 = 0, len3 = ref7.length; i4 < len3; i4++) {
7175
+ for (let ref7 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len3 = ref7.length; i5 < len3; i5++) {
6959
7176
  let extractAssignment2 = function(lhs) {
6960
7177
  let expr = lhs;
6961
7178
  while (expr.type === "ParenthesizedExpression") {
@@ -6976,7 +7193,7 @@ ${js}`
6976
7193
  return;
6977
7194
  };
6978
7195
  var extractAssignment = extractAssignment2;
6979
- const exp = ref7[i4];
7196
+ const exp = ref7[i5];
6980
7197
  checkValidLHS(exp.assigned);
6981
7198
  const pre = [], post = [];
6982
7199
  let ref8;
@@ -6985,8 +7202,8 @@ ${js}`
6985
7202
  if (!exp.lhs) {
6986
7203
  continue;
6987
7204
  }
6988
- for (let ref9 = exp.lhs, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
6989
- const lhsPart = ref9[i5];
7205
+ for (let ref9 = exp.lhs, i6 = 0, len4 = ref9.length; i6 < len4; i6++) {
7206
+ const lhsPart = ref9[i6];
6990
7207
  let ref10;
6991
7208
  if (ref10 = extractAssignment2(lhsPart[1])) {
6992
7209
  const newLhs = ref10;
@@ -7030,8 +7247,8 @@ ${js}`
7030
7247
  }
7031
7248
  }
7032
7249
  }
7033
- for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i6 = 0, len5 = ref11.length; i6 < len5; i6++) {
7034
- const exp = ref11[i6];
7250
+ for (let ref11 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len5 = ref11.length; i7 < len5; i7++) {
7251
+ const exp = ref11[i7];
7035
7252
  if (!(exp.names === null)) {
7036
7253
  continue;
7037
7254
  }
@@ -7268,101 +7485,149 @@ ${js}`
7268
7485
  }
7269
7486
  }
7270
7487
  function processTypes(node) {
7271
- return gatherRecursiveAll(node, (n) => n.type === "TypeUnary").forEach((unary) => {
7272
- if (!unary.suffix.length) {
7273
- return;
7274
- }
7275
- let ref16;
7276
- let m4;
7277
- if (m4 = (ref16 = unary.suffix)[ref16.length - 1], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
7278
- const { token } = m4;
7279
- let last;
7280
- let count = 0;
7281
- let ref17;
7282
- while (unary.suffix.length && (ref17 = unary.suffix)[ref17.length - 1]?.token === "?") {
7283
- last = unary.suffix.pop();
7284
- count++;
7285
- }
7286
- let ref18;
7287
- while (unary.suffix.length && (ref18 = unary.suffix)[ref18.length - 1]?.type === "NonNullAssertion") {
7288
- unary.suffix.pop();
7289
- }
7290
- let ref19;
7291
- if (unary.suffix.length || unary.prefix.length)
7292
- ref19 = unary;
7293
- else
7294
- ref19 = unary.t;
7295
- const t = ref19;
7296
- if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
7297
- if (count === 1) {
7298
- unary.suffix.push(last);
7299
- return;
7488
+ const results1 = [];
7489
+ for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len6 = ref16.length; i8 < len6; i8++) {
7490
+ const unary = ref16[i8];
7491
+ let suffixIndex = unary.suffix.length - 1;
7492
+ const results2 = [];
7493
+ while (suffixIndex >= 0) {
7494
+ const suffix = unary.suffix[suffixIndex];
7495
+ if (typeof suffix === "object" && suffix != null && "token" in suffix && suffix.token === "?") {
7496
+ const { token } = suffix;
7497
+ let count = 0;
7498
+ let m4;
7499
+ while (m4 = unary.suffix[suffixIndex], typeof m4 === "object" && m4 != null && "token" in m4 && m4.token === "?") {
7500
+ unary.suffix.splice(suffixIndex--, 1);
7501
+ count++;
7300
7502
  }
7301
- replaceNode(unary, [
7302
- getTrimmingSpace(unary),
7303
- "(",
7304
- parenthesizeType(trimFirstSpace(t)),
7305
- " | null)",
7306
- last
7307
- ]);
7308
- } else {
7309
- replaceNode(unary, {
7310
- type: "TypeParenthesized",
7503
+ let m5;
7504
+ while (m5 = unary.suffix[suffixIndex], typeof m5 === "object" && m5 != null && "type" in m5 && m5.type === "NonNullAssertion") {
7505
+ unary.suffix.splice(suffixIndex--, 1);
7506
+ }
7507
+ const { parent, prefix } = unary;
7508
+ unary.prefix = [];
7509
+ unary.children = unary.children.filter((a1) => a1 !== prefix);
7510
+ const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
7511
+ const space = getTrimmingSpace(unary);
7512
+ let replace;
7513
+ if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
7514
+ if (count === 1) {
7515
+ unary.suffix.splice(suffixIndex + 1, 0, suffix);
7516
+ continue;
7517
+ }
7518
+ inplaceInsertTrimmingSpace(unary, "");
7519
+ const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
7520
+ replace = [
7521
+ space,
7522
+ "(",
7523
+ t,
7524
+ " | null)",
7525
+ suffix
7526
+ ];
7527
+ } else {
7528
+ inplaceInsertTrimmingSpace(unary, "");
7529
+ const t = parenthesizeType(unary.suffix.length ? unary : unary.t);
7530
+ replace = makeNode({
7531
+ type: "TypeParenthesized",
7532
+ ts: true,
7533
+ children: [
7534
+ space,
7535
+ "(",
7536
+ t,
7537
+ count === 1 ? " | undefined" : " | undefined | null",
7538
+ ")"
7539
+ ]
7540
+ });
7541
+ }
7542
+ if (prefix.length || outer.length) {
7543
+ replace = makeNode({
7544
+ type: "TypeUnary",
7545
+ ts: true,
7546
+ t: replace,
7547
+ prefix,
7548
+ suffix: outer,
7549
+ children: [prefix, replace, outer]
7550
+ });
7551
+ }
7552
+ results2.push(replaceNode(unary, replace, parent));
7553
+ } else if (typeof suffix === "object" && suffix != null && "type" in suffix && suffix.type === "NonNullAssertion") {
7554
+ const { type } = suffix;
7555
+ let m6;
7556
+ while (m6 = unary.suffix[suffixIndex], typeof m6 === "object" && m6 != null && "type" in m6 && m6.type === "NonNullAssertion") {
7557
+ unary.suffix.splice(suffixIndex--, 1);
7558
+ }
7559
+ let m7;
7560
+ while (m7 = unary.suffix[suffixIndex], typeof m7 === "object" && m7 != null && "token" in m7 && m7.token === "?") {
7561
+ unary.suffix.splice(suffixIndex--, 1);
7562
+ }
7563
+ const { parent, prefix } = unary;
7564
+ unary.prefix = [];
7565
+ unary.children = unary.children.filter((a2) => a2 !== prefix);
7566
+ const outer = unary.suffix.splice(suffixIndex + 1, Infinity);
7567
+ const space = getTrimmingSpace(unary);
7568
+ inplaceInsertTrimmingSpace(unary, "");
7569
+ let ref17;
7570
+ if (unary.suffix.length)
7571
+ ref17 = unary;
7572
+ else
7573
+ ref17 = unary.t;
7574
+ const t = ref17;
7575
+ const arg = makeNode({
7576
+ type: "TypeArgument",
7577
+ ts: true,
7578
+ t,
7579
+ children: [t]
7580
+ });
7581
+ const argArray = [arg];
7582
+ const args = makeNode({
7583
+ type: "TypeArguments",
7311
7584
  ts: true,
7585
+ args: argArray,
7586
+ children: ["<", argArray, ">"]
7587
+ });
7588
+ let replace = makeNode({
7589
+ type: "TypeIdentifier",
7590
+ raw: "NonNullable",
7591
+ args,
7312
7592
  children: [
7313
- getTrimmingSpace(unary),
7314
- "(",
7315
- parenthesizeType(trimFirstSpace(t)),
7316
- count === 1 ? " | undefined" : " | undefined | null",
7317
- ")"
7593
+ space,
7594
+ "NonNullable",
7595
+ args
7318
7596
  ]
7319
7597
  });
7598
+ if (prefix.length || outer.length) {
7599
+ replace = makeNode({
7600
+ type: "TypeUnary",
7601
+ ts: true,
7602
+ t: replace,
7603
+ prefix,
7604
+ suffix: outer,
7605
+ children: [prefix, replace, outer]
7606
+ });
7607
+ }
7608
+ results2.push(replaceNode(unary, replace, parent));
7609
+ } else {
7610
+ results2.push(suffixIndex--);
7320
7611
  }
7321
- } else if (typeof m4 === "object" && m4 != null && "type" in m4 && m4.type === "NonNullAssertion") {
7322
- const { type } = m4;
7323
- let ref20;
7324
- while (unary.suffix.length && (ref20 = unary.suffix)[ref20.length - 1]?.type === "NonNullAssertion") {
7325
- unary.suffix.pop();
7326
- }
7327
- let ref21;
7328
- while (unary.suffix.length && (ref21 = unary.suffix)[ref21.length - 1]?.token === "?") {
7329
- unary.suffix.pop();
7330
- }
7331
- const t = trimFirstSpace(
7332
- unary.suffix.length || unary.prefix.length ? unary : unary.t
7333
- );
7334
- const args = {
7335
- type: "TypeArguments",
7336
- ts: true,
7337
- types: [t],
7338
- children: ["<", t, ">"]
7339
- };
7340
- replaceNode(unary, {
7341
- type: "TypeIdentifier",
7342
- raw: "NonNullable",
7343
- args,
7344
- children: [
7345
- getTrimmingSpace(unary),
7346
- "NonNullable",
7347
- args
7348
- ]
7349
- });
7350
7612
  }
7351
- });
7613
+ results1.push(results2);
7614
+ }
7615
+ ;
7616
+ return results1;
7352
7617
  }
7353
7618
  function processStatementExpressions(statements) {
7354
- for (let ref22 = gatherRecursiveAll(statements, ($11) => $11.type === "StatementExpression"), i7 = 0, len6 = ref22.length; i7 < len6; i7++) {
7355
- const exp = ref22[i7];
7619
+ for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len7 = ref18.length; i9 < len7; i9++) {
7620
+ const exp = ref18[i9];
7356
7621
  const { maybe, statement } = exp;
7357
7622
  if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
7358
7623
  replaceNode(exp, statement);
7359
7624
  continue;
7360
7625
  }
7361
- let ref23;
7626
+ let ref19;
7362
7627
  switch (statement.type) {
7363
7628
  case "IfStatement": {
7364
- if (ref23 = expressionizeIfStatement(statement)) {
7365
- const expression = ref23;
7629
+ if (ref19 = expressionizeIfStatement(statement)) {
7630
+ const expression = ref19;
7366
7631
  replaceNode(statement, expression, exp);
7367
7632
  } else {
7368
7633
  replaceNode(statement, wrapIIFE([["", statement]]), exp);
@@ -7420,13 +7685,13 @@ ${js}`
7420
7685
  });
7421
7686
  }
7422
7687
  function processFinallyClauses(statements) {
7423
- for (let ref24 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i8 = 0, len7 = ref24.length; i8 < len7; i8++) {
7424
- let f = ref24[i8];
7425
- let ref25;
7426
- if (!((ref25 = blockContainingStatement(f)) && typeof ref25 === "object" && "block" in ref25 && "index" in ref25)) {
7688
+ for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len8 = ref20.length; i10 < len8; i10++) {
7689
+ let f = ref20[i10];
7690
+ let ref21;
7691
+ if (!((ref21 = blockContainingStatement(f)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21)) {
7427
7692
  throw new Error("finally clause must be inside try statement or block");
7428
7693
  }
7429
- const { block, index } = ref25;
7694
+ const { block, index } = ref21;
7430
7695
  const indent = block.expressions[index][0];
7431
7696
  const expressions = block.expressions.slice(index + 1);
7432
7697
  const t = makeNode({
@@ -7463,7 +7728,7 @@ ${js}`
7463
7728
  if (config2.iife || config2.repl) {
7464
7729
  rootIIFE = wrapIIFE(root.expressions, root.topLevelAwait);
7465
7730
  const newExpressions = [["", rootIIFE]];
7466
- root.children = root.children.map(($12) => $12 === root.expressions ? newExpressions : $12);
7731
+ root.children = root.children.map(($13) => $13 === root.expressions ? newExpressions : $13);
7467
7732
  root.expressions = newExpressions;
7468
7733
  }
7469
7734
  addParentPointers(root);
@@ -7504,10 +7769,10 @@ ${js}`
7504
7769
  await processComptime(statements);
7505
7770
  }
7506
7771
  function processRepl(root, rootIIFE) {
7507
- const topBlock = gatherRecursive(rootIIFE, ($13) => $13.type === "BlockStatement")[0];
7772
+ const topBlock = gatherRecursive(rootIIFE, ($14) => $14.type === "BlockStatement")[0];
7508
7773
  let i = 0;
7509
- for (let ref26 = gatherRecursiveWithinFunction(topBlock, ($14) => $14.type === "Declaration"), i9 = 0, len8 = ref26.length; i9 < len8; i9++) {
7510
- const decl = ref26[i9];
7774
+ for (let ref22 = gatherRecursiveWithinFunction(topBlock, ($15) => $15.type === "Declaration"), i11 = 0, len9 = ref22.length; i11 < len9; i11++) {
7775
+ const decl = ref22[i11];
7511
7776
  if (!decl.names?.length) {
7512
7777
  continue;
7513
7778
  }
@@ -7520,8 +7785,8 @@ ${js}`
7520
7785
  root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]);
7521
7786
  }
7522
7787
  }
7523
- for (let ref27 = gatherRecursive(topBlock, ($15) => $15.type === "FunctionExpression"), i10 = 0, len9 = ref27.length; i10 < len9; i10++) {
7524
- const func = ref27[i10];
7788
+ for (let ref23 = gatherRecursive(topBlock, ($16) => $16.type === "FunctionExpression"), i12 = 0, len10 = ref23.length; i12 < len10; i12++) {
7789
+ const func = ref23[i12];
7525
7790
  if (func.name && func.parent?.type === "BlockStatement") {
7526
7791
  if (func.parent === topBlock) {
7527
7792
  replaceNode(func, void 0);
@@ -7533,17 +7798,17 @@ ${js}`
7533
7798
  }
7534
7799
  }
7535
7800
  }
7536
- for (let ref28 = gatherRecursiveWithinFunction(topBlock, ($16) => $16.type === "ClassExpression"), i11 = 0, len10 = ref28.length; i11 < len10; i11++) {
7537
- const classExp = ref28[i11];
7538
- let m5;
7539
- 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)) {
7801
+ for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($17) => $17.type === "ClassExpression"), i13 = 0, len11 = ref24.length; i13 < len11; i13++) {
7802
+ const classExp = ref24[i13];
7803
+ let m8;
7804
+ 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)) {
7540
7805
  classExp.children.unshift(classExp.name, "=");
7541
7806
  root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]);
7542
7807
  }
7543
7808
  }
7544
7809
  }
7545
7810
  function populateRefs(statements) {
7546
- const refNodes = gatherRecursive(statements, ($17) => $17.type === "Ref");
7811
+ const refNodes = gatherRecursive(statements, ($18) => $18.type === "Ref");
7547
7812
  if (refNodes.length) {
7548
7813
  const ids = gatherRecursive(statements, (s) => s.type === "Identifier");
7549
7814
  const names = new Set(ids.flatMap(({ names: names2 }) => names2 || []));
@@ -7566,8 +7831,8 @@ ${js}`
7566
7831
  function processPlaceholders(statements) {
7567
7832
  const placeholderMap = /* @__PURE__ */ new Map();
7568
7833
  const liftedIfs = /* @__PURE__ */ new Set();
7569
- for (let ref29 = gatherRecursiveAll(statements, ($18) => $18.type === "Placeholder"), i12 = 0, len11 = ref29.length; i12 < len11; i12++) {
7570
- const exp = ref29[i12];
7834
+ for (let ref25 = gatherRecursiveAll(statements, ($19) => $19.type === "Placeholder"), i14 = 0, len12 = ref25.length; i14 < len12; i14++) {
7835
+ const exp = ref25[i14];
7571
7836
  let ancestor;
7572
7837
  if (exp.subtype === ".") {
7573
7838
  ({ ancestor } = findAncestor(
@@ -7575,8 +7840,8 @@ ${js}`
7575
7840
  ($) => $.type === "Call" && !$.parent?.implicit
7576
7841
  ));
7577
7842
  ancestor = ancestor?.parent;
7578
- let m6;
7579
- while (ancestor?.parent != null && (m6 = ancestor.parent.type, m6 === "UnaryExpression" || m6 === "NewExpression" || m6 === "AwaitExpression" || m6 === "ThrowStatement" || m6 === "StatementExpression")) {
7843
+ let m9;
7844
+ while (ancestor?.parent != null && (m9 = ancestor.parent.type, m9 === "UnaryExpression" || m9 === "NewExpression" || m9 === "AwaitExpression" || m9 === "ThrowStatement" || m9 === "StatementExpression")) {
7580
7845
  ancestor = ancestor.parent;
7581
7846
  }
7582
7847
  if (!ancestor) {
@@ -7588,15 +7853,21 @@ ${js}`
7588
7853
  }
7589
7854
  } else {
7590
7855
  let child;
7856
+ let implicitLift;
7591
7857
  ({ ancestor, child } = findAncestor(exp, (ancestor2, child2) => {
7858
+ const prevImplicitLift = implicitLift;
7859
+ ({ implicitLift } = ancestor2);
7860
+ if (prevImplicitLift) {
7861
+ return;
7862
+ }
7592
7863
  const { type } = ancestor2;
7593
7864
  if (type === "IfStatement") {
7594
7865
  liftedIfs.add(ancestor2);
7595
7866
  }
7596
- let m7;
7597
- let m8;
7867
+ let m10;
7868
+ let m11;
7598
7869
  return type === "Call" && !ancestor2.parent?.implicit || // Block, except for if/else blocks when condition already lifted
7599
- 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
7870
+ 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
7600
7871
  type === "Initializer" || // Right-hand side of assignment
7601
7872
  type === "AssignmentExpression" && findChildIndex(ancestor2, child2) === ancestor2.children.indexOf(ancestor2.expression) || type === "ReturnStatement" || type === "YieldExpression";
7602
7873
  }));
@@ -7670,11 +7941,11 @@ ${js}`
7670
7941
  for (const [ancestor, placeholders] of placeholderMap) {
7671
7942
  let ref = makeRef("$");
7672
7943
  let typeSuffix;
7673
- for (let i13 = 0, len12 = placeholders.length; i13 < len12; i13++) {
7674
- const placeholder = placeholders[i13];
7944
+ for (let i15 = 0, len13 = placeholders.length; i15 < len13; i15++) {
7945
+ const placeholder = placeholders[i15];
7675
7946
  typeSuffix ??= placeholder.typeSuffix;
7676
- let ref30;
7677
- replaceNode((ref30 = placeholder.children)[ref30.length - 1], ref);
7947
+ let ref26;
7948
+ (ref26 = placeholder.children)[ref26.length - 1] = ref;
7678
7949
  }
7679
7950
  const { parent } = ancestor;
7680
7951
  const body = maybeUnwrap(ancestor);
@@ -7695,16 +7966,16 @@ ${js}`
7695
7966
  }
7696
7967
  case "PipelineExpression": {
7697
7968
  const i = findChildIndex(parent, ancestor);
7698
- let ref31;
7969
+ let ref27;
7699
7970
  if (i === 1) {
7700
- ref31 = ancestor === parent.children[i];
7971
+ ref27 = ancestor === parent.children[i];
7701
7972
  } else if (i === 2) {
7702
- ref31 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
7973
+ ref27 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3];
7703
7974
  } else {
7704
- ref31 = void 0;
7975
+ ref27 = void 0;
7705
7976
  }
7706
7977
  ;
7707
- outer = ref31;
7978
+ outer = ref27;
7708
7979
  break;
7709
7980
  }
7710
7981
  case "AssignmentExpression":
@@ -7719,9 +7990,9 @@ ${js}`
7719
7990
  fnExp = makeLeftHandSideExpression(fnExp);
7720
7991
  }
7721
7992
  replaceNode(ancestor, fnExp, parent);
7722
- let ref32;
7723
- if (ref32 = getTrimmingSpace(body)) {
7724
- const ws = ref32;
7993
+ let ref28;
7994
+ if (ref28 = getTrimmingSpace(body)) {
7995
+ const ws = ref28;
7725
7996
  inplaceInsertTrimmingSpace(body, "");
7726
7997
  inplacePrepend(ws, fnExp);
7727
7998
  }
@@ -7766,8 +8037,8 @@ ${js}`
7766
8037
  }
7767
8038
  ];
7768
8039
  }
7769
- let ref33;
7770
- if (Array.isArray(rest.delim) && (ref33 = rest.delim)[ref33.length - 1]?.token === ",") {
8040
+ let ref29;
8041
+ if (Array.isArray(rest.delim) && (ref29 = rest.delim)[ref29.length - 1]?.token === ",") {
7771
8042
  rest.delim = rest.delim.slice(0, -1);
7772
8043
  rest.children = [...rest.children.slice(0, -1), rest.delim];
7773
8044
  }
@@ -7864,11 +8135,7 @@ ${js}`
7864
8135
  ApplicationStart,
7865
8136
  ForbiddenImplicitCalls,
7866
8137
  ReservedBinary,
7867
- ArgumentsWithTrailingMemberExpressions,
7868
- TrailingMemberExpressions,
7869
- IndentedTrailingMemberExpressions,
7870
- NestedTrailingMemberExpression,
7871
- AllowedTrailingMemberExpressions,
8138
+ ArgumentsWithTrailingCallExpressions,
7872
8139
  TrailingCallExpressions,
7873
8140
  IndentedTrailingCallExpressions,
7874
8141
  NestedTrailingCallExpression,
@@ -7968,6 +8235,7 @@ ${js}`
7968
8235
  LeftHandSideExpression,
7969
8236
  CallExpression,
7970
8237
  CallExpressionRest,
8238
+ ExplicitCallExpressionRest,
7971
8239
  OptionalShorthand,
7972
8240
  OptionalDot,
7973
8241
  NonNullAssertion,
@@ -7983,6 +8251,7 @@ ${js}`
7983
8251
  ImplicitAccessStart,
7984
8252
  PropertyAccessModifier,
7985
8253
  PropertyAccess,
8254
+ ExplicitPropertyGlob,
7986
8255
  PropertyGlob,
7987
8256
  PropertyBind,
7988
8257
  SuperProperty,
@@ -8250,8 +8519,8 @@ ${js}`
8250
8519
  Debugger,
8251
8520
  MaybeNestedNonPipelineExpression,
8252
8521
  MaybeNestedPostfixedExpression,
8522
+ NestedPostfixedExpressionNoTrailing,
8253
8523
  MaybeNestedExpression,
8254
- NestedExpression,
8255
8524
  MaybeParenNestedExpression,
8256
8525
  ImportDeclaration,
8257
8526
  ImpliedImport,
@@ -8805,125 +9074,126 @@ ${js}`
8805
9074
  var $L124 = (0, import_lib2.$L)("product");
8806
9075
  var $L125 = (0, import_lib2.$L)("min");
8807
9076
  var $L126 = (0, import_lib2.$L)("max");
8808
- var $L127 = (0, import_lib2.$L)("break");
8809
- var $L128 = (0, import_lib2.$L)("continue");
8810
- var $L129 = (0, import_lib2.$L)("debugger");
8811
- var $L130 = (0, import_lib2.$L)("require");
8812
- var $L131 = (0, import_lib2.$L)("with");
8813
- var $L132 = (0, import_lib2.$L)("assert");
8814
- var $L133 = (0, import_lib2.$L)(":=");
8815
- var $L134 = (0, import_lib2.$L)("\u2254");
8816
- var $L135 = (0, import_lib2.$L)(".=");
8817
- var $L136 = (0, import_lib2.$L)("::=");
8818
- var $L137 = (0, import_lib2.$L)("/*");
8819
- var $L138 = (0, import_lib2.$L)("*/");
8820
- var $L139 = (0, import_lib2.$L)("\\");
8821
- var $L140 = (0, import_lib2.$L)(")");
8822
- var $L141 = (0, import_lib2.$L)("abstract");
8823
- var $L142 = (0, import_lib2.$L)("as");
8824
- var $L143 = (0, import_lib2.$L)("@");
8825
- var $L144 = (0, import_lib2.$L)("@@");
8826
- var $L145 = (0, import_lib2.$L)("async");
8827
- var $L146 = (0, import_lib2.$L)("await");
8828
- var $L147 = (0, import_lib2.$L)("`");
8829
- var $L148 = (0, import_lib2.$L)("by");
8830
- var $L149 = (0, import_lib2.$L)("case");
8831
- var $L150 = (0, import_lib2.$L)("catch");
8832
- var $L151 = (0, import_lib2.$L)("class");
8833
- var $L152 = (0, import_lib2.$L)("#{");
8834
- var $L153 = (0, import_lib2.$L)("comptime");
8835
- var $L154 = (0, import_lib2.$L)("declare");
8836
- var $L155 = (0, import_lib2.$L)("default");
8837
- var $L156 = (0, import_lib2.$L)("delete");
8838
- var $L157 = (0, import_lib2.$L)("do");
8839
- var $L158 = (0, import_lib2.$L)("..");
8840
- var $L159 = (0, import_lib2.$L)("\u2025");
8841
- var $L160 = (0, import_lib2.$L)("...");
8842
- var $L161 = (0, import_lib2.$L)("\u2026");
8843
- var $L162 = (0, import_lib2.$L)("::");
8844
- var $L163 = (0, import_lib2.$L)('"');
8845
- var $L164 = (0, import_lib2.$L)("each");
8846
- var $L165 = (0, import_lib2.$L)("else");
8847
- var $L166 = (0, import_lib2.$L)("!");
8848
- var $L167 = (0, import_lib2.$L)("export");
8849
- var $L168 = (0, import_lib2.$L)("extends");
8850
- var $L169 = (0, import_lib2.$L)("finally");
8851
- var $L170 = (0, import_lib2.$L)("for");
8852
- var $L171 = (0, import_lib2.$L)("from");
8853
- var $L172 = (0, import_lib2.$L)("function");
8854
- var $L173 = (0, import_lib2.$L)("get");
8855
- var $L174 = (0, import_lib2.$L)("set");
8856
- var $L175 = (0, import_lib2.$L)("#");
8857
- var $L176 = (0, import_lib2.$L)("if");
8858
- var $L177 = (0, import_lib2.$L)("in");
8859
- var $L178 = (0, import_lib2.$L)("infer");
8860
- var $L179 = (0, import_lib2.$L)("let");
8861
- var $L180 = (0, import_lib2.$L)("const");
8862
- var $L181 = (0, import_lib2.$L)("is");
8863
- var $L182 = (0, import_lib2.$L)("var");
8864
- var $L183 = (0, import_lib2.$L)("like");
8865
- var $L184 = (0, import_lib2.$L)("loop");
8866
- var $L185 = (0, import_lib2.$L)("new");
8867
- var $L186 = (0, import_lib2.$L)("not");
8868
- var $L187 = (0, import_lib2.$L)("of");
8869
- var $L188 = (0, import_lib2.$L)("[");
8870
- var $L189 = (0, import_lib2.$L)("operator");
8871
- var $L190 = (0, import_lib2.$L)("override");
8872
- var $L191 = (0, import_lib2.$L)("own");
8873
- var $L192 = (0, import_lib2.$L)("public");
8874
- var $L193 = (0, import_lib2.$L)("private");
8875
- var $L194 = (0, import_lib2.$L)("protected");
8876
- var $L195 = (0, import_lib2.$L)("||>");
8877
- var $L196 = (0, import_lib2.$L)("|\u25B7");
8878
- var $L197 = (0, import_lib2.$L)("|>=");
8879
- var $L198 = (0, import_lib2.$L)("\u25B7=");
8880
- var $L199 = (0, import_lib2.$L)("|>");
8881
- var $L200 = (0, import_lib2.$L)("\u25B7");
8882
- var $L201 = (0, import_lib2.$L)("readonly");
8883
- var $L202 = (0, import_lib2.$L)("return");
8884
- var $L203 = (0, import_lib2.$L)("satisfies");
8885
- var $L204 = (0, import_lib2.$L)("'");
8886
- var $L205 = (0, import_lib2.$L)("static");
8887
- var $L206 = (0, import_lib2.$L)("${");
8888
- var $L207 = (0, import_lib2.$L)("super");
8889
- var $L208 = (0, import_lib2.$L)("switch");
8890
- var $L209 = (0, import_lib2.$L)("target");
8891
- var $L210 = (0, import_lib2.$L)("then");
8892
- var $L211 = (0, import_lib2.$L)("this");
8893
- var $L212 = (0, import_lib2.$L)("throw");
8894
- var $L213 = (0, import_lib2.$L)('"""');
8895
- var $L214 = (0, import_lib2.$L)("'''");
8896
- var $L215 = (0, import_lib2.$L)("///");
8897
- var $L216 = (0, import_lib2.$L)("```");
8898
- var $L217 = (0, import_lib2.$L)("try");
8899
- var $L218 = (0, import_lib2.$L)("typeof");
8900
- var $L219 = (0, import_lib2.$L)("undefined");
8901
- var $L220 = (0, import_lib2.$L)("unless");
8902
- var $L221 = (0, import_lib2.$L)("until");
8903
- var $L222 = (0, import_lib2.$L)("using");
8904
- var $L223 = (0, import_lib2.$L)("void");
8905
- var $L224 = (0, import_lib2.$L)("when");
8906
- var $L225 = (0, import_lib2.$L)("while");
8907
- var $L226 = (0, import_lib2.$L)("yield");
8908
- var $L227 = (0, import_lib2.$L)("/>");
8909
- var $L228 = (0, import_lib2.$L)("</");
8910
- var $L229 = (0, import_lib2.$L)("<>");
8911
- var $L230 = (0, import_lib2.$L)("</>");
8912
- var $L231 = (0, import_lib2.$L)("<!--");
8913
- var $L232 = (0, import_lib2.$L)("-->");
8914
- var $L233 = (0, import_lib2.$L)("type");
8915
- var $L234 = (0, import_lib2.$L)("enum");
8916
- var $L235 = (0, import_lib2.$L)("interface");
8917
- var $L236 = (0, import_lib2.$L)("global");
8918
- var $L237 = (0, import_lib2.$L)("module");
8919
- var $L238 = (0, import_lib2.$L)("namespace");
8920
- var $L239 = (0, import_lib2.$L)("asserts");
8921
- var $L240 = (0, import_lib2.$L)("keyof");
8922
- var $L241 = (0, import_lib2.$L)("???");
8923
- var $L242 = (0, import_lib2.$L)("unique");
8924
- var $L243 = (0, import_lib2.$L)("symbol");
8925
- var $L244 = (0, import_lib2.$L)("[]");
8926
- var $L245 = (0, import_lib2.$L)("civet");
9077
+ var $L127 = (0, import_lib2.$L)("join");
9078
+ var $L128 = (0, import_lib2.$L)("break");
9079
+ var $L129 = (0, import_lib2.$L)("continue");
9080
+ var $L130 = (0, import_lib2.$L)("debugger");
9081
+ var $L131 = (0, import_lib2.$L)("require");
9082
+ var $L132 = (0, import_lib2.$L)("with");
9083
+ var $L133 = (0, import_lib2.$L)("assert");
9084
+ var $L134 = (0, import_lib2.$L)(":=");
9085
+ var $L135 = (0, import_lib2.$L)("\u2254");
9086
+ var $L136 = (0, import_lib2.$L)(".=");
9087
+ var $L137 = (0, import_lib2.$L)("::=");
9088
+ var $L138 = (0, import_lib2.$L)("/*");
9089
+ var $L139 = (0, import_lib2.$L)("*/");
9090
+ var $L140 = (0, import_lib2.$L)("\\");
9091
+ var $L141 = (0, import_lib2.$L)(")");
9092
+ var $L142 = (0, import_lib2.$L)("abstract");
9093
+ var $L143 = (0, import_lib2.$L)("as");
9094
+ var $L144 = (0, import_lib2.$L)("@");
9095
+ var $L145 = (0, import_lib2.$L)("@@");
9096
+ var $L146 = (0, import_lib2.$L)("async");
9097
+ var $L147 = (0, import_lib2.$L)("await");
9098
+ var $L148 = (0, import_lib2.$L)("`");
9099
+ var $L149 = (0, import_lib2.$L)("by");
9100
+ var $L150 = (0, import_lib2.$L)("case");
9101
+ var $L151 = (0, import_lib2.$L)("catch");
9102
+ var $L152 = (0, import_lib2.$L)("class");
9103
+ var $L153 = (0, import_lib2.$L)("#{");
9104
+ var $L154 = (0, import_lib2.$L)("comptime");
9105
+ var $L155 = (0, import_lib2.$L)("declare");
9106
+ var $L156 = (0, import_lib2.$L)("default");
9107
+ var $L157 = (0, import_lib2.$L)("delete");
9108
+ var $L158 = (0, import_lib2.$L)("do");
9109
+ var $L159 = (0, import_lib2.$L)("..");
9110
+ var $L160 = (0, import_lib2.$L)("\u2025");
9111
+ var $L161 = (0, import_lib2.$L)("...");
9112
+ var $L162 = (0, import_lib2.$L)("\u2026");
9113
+ var $L163 = (0, import_lib2.$L)("::");
9114
+ var $L164 = (0, import_lib2.$L)('"');
9115
+ var $L165 = (0, import_lib2.$L)("each");
9116
+ var $L166 = (0, import_lib2.$L)("else");
9117
+ var $L167 = (0, import_lib2.$L)("!");
9118
+ var $L168 = (0, import_lib2.$L)("export");
9119
+ var $L169 = (0, import_lib2.$L)("extends");
9120
+ var $L170 = (0, import_lib2.$L)("finally");
9121
+ var $L171 = (0, import_lib2.$L)("for");
9122
+ var $L172 = (0, import_lib2.$L)("from");
9123
+ var $L173 = (0, import_lib2.$L)("function");
9124
+ var $L174 = (0, import_lib2.$L)("get");
9125
+ var $L175 = (0, import_lib2.$L)("set");
9126
+ var $L176 = (0, import_lib2.$L)("#");
9127
+ var $L177 = (0, import_lib2.$L)("if");
9128
+ var $L178 = (0, import_lib2.$L)("in");
9129
+ var $L179 = (0, import_lib2.$L)("infer");
9130
+ var $L180 = (0, import_lib2.$L)("let");
9131
+ var $L181 = (0, import_lib2.$L)("const");
9132
+ var $L182 = (0, import_lib2.$L)("is");
9133
+ var $L183 = (0, import_lib2.$L)("var");
9134
+ var $L184 = (0, import_lib2.$L)("like");
9135
+ var $L185 = (0, import_lib2.$L)("loop");
9136
+ var $L186 = (0, import_lib2.$L)("new");
9137
+ var $L187 = (0, import_lib2.$L)("not");
9138
+ var $L188 = (0, import_lib2.$L)("of");
9139
+ var $L189 = (0, import_lib2.$L)("[");
9140
+ var $L190 = (0, import_lib2.$L)("operator");
9141
+ var $L191 = (0, import_lib2.$L)("override");
9142
+ var $L192 = (0, import_lib2.$L)("own");
9143
+ var $L193 = (0, import_lib2.$L)("public");
9144
+ var $L194 = (0, import_lib2.$L)("private");
9145
+ var $L195 = (0, import_lib2.$L)("protected");
9146
+ var $L196 = (0, import_lib2.$L)("||>");
9147
+ var $L197 = (0, import_lib2.$L)("|\u25B7");
9148
+ var $L198 = (0, import_lib2.$L)("|>=");
9149
+ var $L199 = (0, import_lib2.$L)("\u25B7=");
9150
+ var $L200 = (0, import_lib2.$L)("|>");
9151
+ var $L201 = (0, import_lib2.$L)("\u25B7");
9152
+ var $L202 = (0, import_lib2.$L)("readonly");
9153
+ var $L203 = (0, import_lib2.$L)("return");
9154
+ var $L204 = (0, import_lib2.$L)("satisfies");
9155
+ var $L205 = (0, import_lib2.$L)("'");
9156
+ var $L206 = (0, import_lib2.$L)("static");
9157
+ var $L207 = (0, import_lib2.$L)("${");
9158
+ var $L208 = (0, import_lib2.$L)("super");
9159
+ var $L209 = (0, import_lib2.$L)("switch");
9160
+ var $L210 = (0, import_lib2.$L)("target");
9161
+ var $L211 = (0, import_lib2.$L)("then");
9162
+ var $L212 = (0, import_lib2.$L)("this");
9163
+ var $L213 = (0, import_lib2.$L)("throw");
9164
+ var $L214 = (0, import_lib2.$L)('"""');
9165
+ var $L215 = (0, import_lib2.$L)("'''");
9166
+ var $L216 = (0, import_lib2.$L)("///");
9167
+ var $L217 = (0, import_lib2.$L)("```");
9168
+ var $L218 = (0, import_lib2.$L)("try");
9169
+ var $L219 = (0, import_lib2.$L)("typeof");
9170
+ var $L220 = (0, import_lib2.$L)("undefined");
9171
+ var $L221 = (0, import_lib2.$L)("unless");
9172
+ var $L222 = (0, import_lib2.$L)("until");
9173
+ var $L223 = (0, import_lib2.$L)("using");
9174
+ var $L224 = (0, import_lib2.$L)("void");
9175
+ var $L225 = (0, import_lib2.$L)("when");
9176
+ var $L226 = (0, import_lib2.$L)("while");
9177
+ var $L227 = (0, import_lib2.$L)("yield");
9178
+ var $L228 = (0, import_lib2.$L)("/>");
9179
+ var $L229 = (0, import_lib2.$L)("</");
9180
+ var $L230 = (0, import_lib2.$L)("<>");
9181
+ var $L231 = (0, import_lib2.$L)("</>");
9182
+ var $L232 = (0, import_lib2.$L)("<!--");
9183
+ var $L233 = (0, import_lib2.$L)("-->");
9184
+ var $L234 = (0, import_lib2.$L)("type");
9185
+ var $L235 = (0, import_lib2.$L)("enum");
9186
+ var $L236 = (0, import_lib2.$L)("interface");
9187
+ var $L237 = (0, import_lib2.$L)("global");
9188
+ var $L238 = (0, import_lib2.$L)("module");
9189
+ var $L239 = (0, import_lib2.$L)("namespace");
9190
+ var $L240 = (0, import_lib2.$L)("asserts");
9191
+ var $L241 = (0, import_lib2.$L)("keyof");
9192
+ var $L242 = (0, import_lib2.$L)("???");
9193
+ var $L243 = (0, import_lib2.$L)("unique");
9194
+ var $L244 = (0, import_lib2.$L)("symbol");
9195
+ var $L245 = (0, import_lib2.$L)("[]");
9196
+ var $L246 = (0, import_lib2.$L)("civet");
8927
9197
  var $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy"));
8928
9198
  var $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy"));
8929
9199
  var $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
@@ -9222,7 +9492,7 @@ ${js}`
9222
9492
  function ExplicitArguments(ctx, state2) {
9223
9493
  return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitArguments", ExplicitArguments$0);
9224
9494
  }
9225
- 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));
9495
+ 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));
9226
9496
  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))));
9227
9497
  var ApplicationStart$$ = [ApplicationStart$0, ApplicationStart$1];
9228
9498
  function ApplicationStart(ctx, state2) {
@@ -9255,52 +9525,16 @@ ${js}`
9255
9525
  function ReservedBinary(ctx, state2) {
9256
9526
  return (0, import_lib2.$EVENT)(ctx, state2, "ReservedBinary", ReservedBinary$0);
9257
9527
  }
9258
- var ArgumentsWithTrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, AllowedTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
9528
+ var ArgumentsWithTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Arguments, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
9259
9529
  var args = $1;
9260
9530
  var trailing = $2;
9261
- return [args, ...trailing];
9262
- });
9263
- function ArgumentsWithTrailingMemberExpressions(ctx, state2) {
9264
- return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingMemberExpressions", ArgumentsWithTrailingMemberExpressions$0);
9265
- }
9266
- 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) {
9267
- if (!$2)
9268
- return $1;
9269
- return [...$1, ...$2];
9270
- });
9271
- function TrailingMemberExpressions(ctx, state2) {
9272
- return (0, import_lib2.$EVENT)(ctx, state2, "TrailingMemberExpressions", TrailingMemberExpressions$0);
9273
- }
9274
- 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) {
9275
- if (!$2.length)
9276
- return $skip;
9277
- return $2.flat();
9278
- });
9279
- var IndentedTrailingMemberExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingMemberExpression), function($skip, $loc, $0, $1) {
9280
- return $1.flat();
9531
+ return [args, ...trailing ?? []];
9281
9532
  });
9282
- var IndentedTrailingMemberExpressions$$ = [IndentedTrailingMemberExpressions$0, IndentedTrailingMemberExpressions$1];
9283
- function IndentedTrailingMemberExpressions(ctx, state2) {
9284
- return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingMemberExpressions", IndentedTrailingMemberExpressions$$);
9533
+ function ArgumentsWithTrailingCallExpressions(ctx, state2) {
9534
+ return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingCallExpressions", ArgumentsWithTrailingCallExpressions$0);
9285
9535
  }
9286
- 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) {
9287
- var ws = $1;
9288
- var rests = $3;
9289
- const [first, ...rest] = rests;
9290
- return [prepend(ws, first), ...rest];
9291
- });
9292
- function NestedTrailingMemberExpression(ctx, state2) {
9293
- return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingMemberExpression", NestedTrailingMemberExpression$0);
9294
- }
9295
- var AllowedTrailingMemberExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingMemberExpressions), function(value) {
9296
- return value[1];
9297
- });
9298
- var AllowedTrailingMemberExpressions$1 = (0, import_lib2.$Q)(MemberExpressionRest);
9299
- var AllowedTrailingMemberExpressions$$ = [AllowedTrailingMemberExpressions$0, AllowedTrailingMemberExpressions$1];
9300
- function AllowedTrailingMemberExpressions(ctx, state2) {
9301
- return (0, import_lib2.$EVENT_C)(ctx, state2, "AllowedTrailingMemberExpressions", AllowedTrailingMemberExpressions$$);
9302
- }
9303
- 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) {
9536
+ 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) {
9537
+ $1 = $1.flat();
9304
9538
  if (!$1.length && !$2)
9305
9539
  return $skip;
9306
9540
  if (!$2)
@@ -9395,10 +9629,10 @@ ${js}`
9395
9629
  function NestedArgumentList(ctx, state2) {
9396
9630
  return (0, import_lib2.$EVENT)(ctx, state2, "NestedArgumentList", NestedArgumentList$0);
9397
9631
  }
9398
- 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) {
9399
- var indent = $1;
9400
- var args = $3;
9401
- var comma = $4;
9632
+ 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) {
9633
+ var indent = $2;
9634
+ var args = $4;
9635
+ var comma = $5;
9402
9636
  let [arg0, ...rest] = args;
9403
9637
  arg0 = prepend(indent, arg0);
9404
9638
  return [arg0, ...rest, comma];
@@ -10519,7 +10753,7 @@ ${js}`
10519
10753
  function LeftHandSideExpression(ctx, state2) {
10520
10754
  return (0, import_lib2.$EVENT_C)(ctx, state2, "LeftHandSideExpression", LeftHandSideExpression$$);
10521
10755
  }
10522
- 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) {
10756
+ 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) {
10523
10757
  var rest = $3;
10524
10758
  return processCallMemberExpression({
10525
10759
  type: "CallExpression",
@@ -10537,7 +10771,7 @@ ${js}`
10537
10771
  var imports = $5;
10538
10772
  return dynamizeImportDeclarationExpression([i, iws, imports, fws, from]);
10539
10773
  });
10540
- 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) {
10774
+ 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) {
10541
10775
  var rest = $3;
10542
10776
  return processCallMemberExpression({
10543
10777
  type: "CallExpression",
@@ -10572,7 +10806,7 @@ ${js}`
10572
10806
  }
10573
10807
  return literal;
10574
10808
  });
10575
- var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
10809
+ var CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingCallExpressions), function($skip, $loc, $0, $1, $2) {
10576
10810
  var optional = $1;
10577
10811
  var argsWithTrailing = $2;
10578
10812
  if (!optional)
@@ -10588,6 +10822,32 @@ ${js}`
10588
10822
  function CallExpressionRest(ctx, state2) {
10589
10823
  return (0, import_lib2.$EVENT_C)(ctx, state2, "CallExpressionRest", CallExpressionRest$$);
10590
10824
  }
10825
+ var ExplicitCallExpressionRest$0 = MemberExpressionRest;
10826
+ var ExplicitCallExpressionRest$1 = (0, import_lib2.$T)((0, import_lib2.$S)(TypeArguments, (0, import_lib2.$N)((0, import_lib2.$C)(IdentifierName, NumericLiteral))), function(value) {
10827
+ return value[0];
10828
+ });
10829
+ 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) {
10830
+ var literal = $2;
10831
+ if (literal.type === "StringLiteral") {
10832
+ literal = "`" + literal.token.slice(1, -1).replace(/(`|\$\{)/g, "\\$1") + "`";
10833
+ }
10834
+ return literal;
10835
+ });
10836
+ var ExplicitCallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ExplicitArguments), function($skip, $loc, $0, $1, $2) {
10837
+ var optional = $1;
10838
+ var call = $2;
10839
+ if (!optional)
10840
+ return call;
10841
+ return {
10842
+ ...call,
10843
+ children: [optional, ...call.children],
10844
+ optional
10845
+ };
10846
+ });
10847
+ var ExplicitCallExpressionRest$$ = [ExplicitCallExpressionRest$0, ExplicitCallExpressionRest$1, ExplicitCallExpressionRest$2, ExplicitCallExpressionRest$3];
10848
+ function ExplicitCallExpressionRest(ctx, state2) {
10849
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "ExplicitCallExpressionRest", ExplicitCallExpressionRest$$);
10850
+ }
10591
10851
  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) {
10592
10852
  var comments = $2;
10593
10853
  var q = $3;
@@ -10939,6 +11199,12 @@ ${js}`
10939
11199
  function PropertyAccess(ctx, state2) {
10940
11200
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PropertyAccess", PropertyAccess$$);
10941
11201
  }
11202
+ var ExplicitPropertyGlob$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(ExplicitAccessStart), PropertyGlob), function(value) {
11203
+ return value[1];
11204
+ });
11205
+ function ExplicitPropertyGlob(ctx, state2) {
11206
+ return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitPropertyGlob", ExplicitPropertyGlob$0);
11207
+ }
10942
11208
  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) {
10943
11209
  var dot = $1;
10944
11210
  var object = $3;
@@ -11219,7 +11485,8 @@ ${js}`
11219
11485
  return {
11220
11486
  type: "AtBinding",
11221
11487
  children: [ref],
11222
- ref
11488
+ ref,
11489
+ names: []
11223
11490
  };
11224
11491
  });
11225
11492
  var NWBindingIdentifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Hash, AtIdentifierRef), function($skip, $loc, $0, $1, $2) {
@@ -11228,7 +11495,8 @@ ${js}`
11228
11495
  return {
11229
11496
  type: "AtBinding",
11230
11497
  children: [ref],
11231
- ref
11498
+ ref,
11499
+ names: []
11232
11500
  };
11233
11501
  });
11234
11502
  var NWBindingIdentifier$2 = Identifier;
@@ -11551,19 +11819,13 @@ ${js}`
11551
11819
  var binding = $2;
11552
11820
  var typeSuffix = $3;
11553
11821
  var initializer = $4;
11554
- if (binding.children) {
11555
- binding = {
11556
- ...binding,
11557
- initializer,
11558
- children: [...binding.children, initializer]
11559
- };
11560
- }
11561
11822
  return {
11562
11823
  type: "BindingElement",
11563
11824
  names: binding.names,
11564
11825
  typeSuffix,
11565
11826
  binding,
11566
- children: [ws, binding]
11827
+ children: [ws, binding, initializer],
11828
+ initializer
11567
11829
  };
11568
11830
  });
11569
11831
  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) {
@@ -12267,11 +12529,9 @@ ${js}`
12267
12529
  const expressions = [...stmts];
12268
12530
  if (last)
12269
12531
  expressions.push(last);
12270
- const maybeComment = expressions.at(-1)?.[2]?.children?.[2]?.at(-1);
12271
- const hasTrailingComment = maybeComment?.type === "Comment" && maybeComment.token.startsWith("//");
12272
12532
  const children = [expressions];
12273
- if (hasTrailingComment)
12274
- children.push("\n");
12533
+ if (hasTrailingComment(expressions))
12534
+ children.push(["\n"]);
12275
12535
  return {
12276
12536
  type: "BlockStatement",
12277
12537
  expressions,
@@ -13352,52 +13612,23 @@ ${js}`
13352
13612
  abstract: true,
13353
13613
  signature,
13354
13614
  parameters: signature.parameters,
13615
+ async: signature.async,
13616
+ generator: signature.generator,
13355
13617
  ts: true
13356
13618
  };
13357
13619
  });
13358
- 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) {
13620
+ 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) {
13359
13621
  var signature = $1;
13360
13622
  var block = $3;
13361
- let children = $0;
13362
- let generatorPos = 0;
13363
- let { modifier } = signature;
13364
- if (hasAwait(block)) {
13365
- generatorPos++;
13366
- children = children.slice();
13367
- if (modifier?.get || modifier?.set) {
13368
- children.push({
13369
- type: "Error",
13370
- message: "Getters and setters cannot be async"
13371
- });
13372
- } else if (modifier?.async) {
13373
- } else {
13374
- children.unshift("async ");
13375
- modifier = { ...modifier, async: true };
13376
- signature = { ...signature, modifier };
13377
- }
13378
- }
13379
- if (hasYield(block)) {
13380
- if (children === $0)
13381
- children = children.slice();
13382
- if (modifier?.get || modifier?.set) {
13383
- children.push({
13384
- type: "Error",
13385
- message: "Getters and setters cannot be generators"
13386
- });
13387
- } else if (modifier?.generator) {
13388
- } else {
13389
- children.splice(generatorPos, 0, "*");
13390
- modifier = { ...modifier, generator: true };
13391
- signature = { ...signature, modifier };
13392
- }
13393
- }
13394
13623
  return {
13395
13624
  type: "MethodDefinition",
13396
- children,
13625
+ children: $0,
13397
13626
  name: signature.name,
13398
13627
  signature,
13399
13628
  block,
13400
- parameters: signature.parameters
13629
+ parameters: signature.parameters,
13630
+ async: signature.async,
13631
+ generator: signature.generator
13401
13632
  };
13402
13633
  });
13403
13634
  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) {
@@ -13480,36 +13711,38 @@ ${js}`
13480
13711
  }
13481
13712
  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) {
13482
13713
  var kind = $1;
13714
+ var ws = $2;
13483
13715
  return {
13484
- type: "MethodModifier",
13485
- async: false,
13486
- generator: false,
13487
- get: kind.token === "get",
13488
- set: kind.token === "set",
13489
- children: $0
13490
- };
13491
- });
13492
- 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) {
13493
- return {
13494
- type: "MethodModifier",
13495
- async: true,
13496
- get: false,
13497
- set: false,
13498
- generator: !!$2,
13499
- children: $0
13716
+ // no async or generator, because getters and setters can't be
13717
+ modifier: {
13718
+ async: false,
13719
+ generator: false,
13720
+ get: kind.token === "get",
13721
+ set: kind.token === "set"
13722
+ },
13723
+ children: [kind, ws]
13500
13724
  };
13501
13725
  });
13502
- var MethodModifier$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(Star, __), function($skip, $loc, $0, $1, $2) {
13726
+ 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) {
13727
+ var async = $1;
13728
+ var generator = $2;
13729
+ if (!async)
13730
+ async = [];
13731
+ if (!generator)
13732
+ generator = [];
13503
13733
  return {
13504
- type: "MethodModifier",
13505
- async: false,
13506
- get: false,
13507
- set: false,
13508
- generator: true,
13509
- children: $0
13734
+ async,
13735
+ generator,
13736
+ modifier: {
13737
+ async: !!async.length,
13738
+ get: false,
13739
+ set: false,
13740
+ generator: !!generator.length
13741
+ },
13742
+ children: [async, generator]
13510
13743
  };
13511
13744
  });
13512
- var MethodModifier$$ = [MethodModifier$0, MethodModifier$1, MethodModifier$2];
13745
+ var MethodModifier$$ = [MethodModifier$0, MethodModifier$1];
13513
13746
  function MethodModifier(ctx, state2) {
13514
13747
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MethodModifier", MethodModifier$$);
13515
13748
  }
@@ -13524,10 +13757,12 @@ ${js}`
13524
13757
  parameters
13525
13758
  };
13526
13759
  });
13527
- 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) {
13760
+ 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) {
13528
13761
  var modifier = $1;
13529
13762
  var name = $2;
13763
+ var ws1 = $3;
13530
13764
  var optional = $4;
13765
+ var ws2 = $5;
13531
13766
  var parameters = $6;
13532
13767
  var returnType = $7;
13533
13768
  if (name.name) {
@@ -13536,14 +13771,15 @@ ${js}`
13536
13771
  name = name.token.match(/^(?:"|')/) ? name.token.slice(1, -1) : name.token;
13537
13772
  }
13538
13773
  if (optional)
13539
- $0[3] = optional = { ...optional, ts: true };
13540
- modifier = modifier || {};
13774
+ optional = { ...optional, ts: true };
13541
13775
  return {
13542
13776
  type: "MethodSignature",
13543
- children: $0,
13777
+ children: [...modifier.children, name, ws1, optional, ws2, parameters, returnType],
13778
+ async: modifier.async,
13779
+ generator: modifier.generator,
13544
13780
  name,
13545
13781
  optional,
13546
- modifier,
13782
+ modifier: modifier.modifier,
13547
13783
  // get/set/async/generator
13548
13784
  returnType,
13549
13785
  parameters
@@ -14575,7 +14811,7 @@ ${js}`
14575
14811
  function ForStatementControlWithReduction(ctx, state2) {
14576
14812
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ForStatementControlWithReduction", ForStatementControlWithReduction$$);
14577
14813
  }
14578
- 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) {
14814
+ 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) {
14579
14815
  var subtype = $1;
14580
14816
  var ws = $3;
14581
14817
  return {
@@ -15149,7 +15385,7 @@ ${js}`
15149
15385
  expression
15150
15386
  };
15151
15387
  });
15152
- 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) {
15388
+ 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) {
15153
15389
  var open = $2;
15154
15390
  var expression = $3;
15155
15391
  var close = $4;
@@ -15178,7 +15414,7 @@ ${js}`
15178
15414
  function Condition(ctx, state2) {
15179
15415
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Condition", Condition$$);
15180
15416
  }
15181
- var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, Expression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
15417
+ var BoundedCondition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenParen, PostfixedExpression, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
15182
15418
  var open = $1;
15183
15419
  var expression = $2;
15184
15420
  var close = $3;
@@ -15525,67 +15761,84 @@ ${js}`
15525
15761
  function ThrowStatement(ctx, state2) {
15526
15762
  return (0, import_lib2.$EVENT)(ctx, state2, "ThrowStatement", ThrowStatement$0);
15527
15763
  }
15528
- 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) {
15764
+ 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) {
15529
15765
  return { $loc, token: $1 };
15530
15766
  });
15531
15767
  function Break(ctx, state2) {
15532
15768
  return (0, import_lib2.$EVENT)(ctx, state2, "Break", Break$0);
15533
15769
  }
15534
- 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) {
15770
+ 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) {
15535
15771
  return { $loc, token: $1 };
15536
15772
  });
15537
15773
  function Continue(ctx, state2) {
15538
15774
  return (0, import_lib2.$EVENT)(ctx, state2, "Continue", Continue$0);
15539
15775
  }
15540
- 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) {
15776
+ 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) {
15541
15777
  return { $loc, token: $1 };
15542
15778
  });
15543
15779
  function Debugger(ctx, state2) {
15544
15780
  return (0, import_lib2.$EVENT)(ctx, state2, "Debugger", Debugger$0);
15545
15781
  }
15546
15782
  var MaybeNestedNonPipelineExpression$0 = NestedBulletedArray;
15547
- 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) {
15548
- if ($3)
15549
- return $3;
15550
- return $skip;
15783
+ var MaybeNestedNonPipelineExpression$1 = NestedImplicitObjectLiteral;
15784
+ 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) {
15785
+ var expression = $2;
15786
+ var trailing = $4;
15787
+ if (!expression)
15788
+ return $skip;
15789
+ if (!trailing)
15790
+ return expression;
15791
+ return [expression, trailing];
15551
15792
  });
15552
- var MaybeNestedNonPipelineExpression$2 = NonPipelineExpression;
15553
- var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1, MaybeNestedNonPipelineExpression$2];
15793
+ var MaybeNestedNonPipelineExpression$3 = NonPipelineExpression;
15794
+ var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1, MaybeNestedNonPipelineExpression$2, MaybeNestedNonPipelineExpression$3];
15554
15795
  function MaybeNestedNonPipelineExpression(ctx, state2) {
15555
15796
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedNonPipelineExpression", MaybeNestedNonPipelineExpression$$);
15556
15797
  }
15557
15798
  var MaybeNestedPostfixedExpression$0 = NestedBulletedArray;
15558
- 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) {
15559
- if ($3)
15560
- return $3;
15561
- return $skip;
15799
+ var MaybeNestedPostfixedExpression$1 = NestedImplicitObjectLiteral;
15800
+ 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) {
15801
+ var expression = $2;
15802
+ var trailing = $4;
15803
+ if (!expression)
15804
+ return $skip;
15805
+ if (!trailing)
15806
+ return expression;
15807
+ return [expression, trailing];
15562
15808
  });
15563
- var MaybeNestedPostfixedExpression$2 = PostfixedExpression;
15564
- var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1, MaybeNestedPostfixedExpression$2];
15809
+ var MaybeNestedPostfixedExpression$3 = PostfixedExpression;
15810
+ var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1, MaybeNestedPostfixedExpression$2, MaybeNestedPostfixedExpression$3];
15565
15811
  function MaybeNestedPostfixedExpression(ctx, state2) {
15566
15812
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedPostfixedExpression", MaybeNestedPostfixedExpression$$);
15567
15813
  }
15814
+ var NestedPostfixedExpressionNoTrailing$0 = NestedBulletedArray;
15815
+ var NestedPostfixedExpressionNoTrailing$1 = NestedImplicitObjectLiteral;
15816
+ 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) {
15817
+ var expression = $2;
15818
+ if (!expression)
15819
+ return $skip;
15820
+ return expression;
15821
+ });
15822
+ var NestedPostfixedExpressionNoTrailing$$ = [NestedPostfixedExpressionNoTrailing$0, NestedPostfixedExpressionNoTrailing$1, NestedPostfixedExpressionNoTrailing$2];
15823
+ function NestedPostfixedExpressionNoTrailing(ctx, state2) {
15824
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedPostfixedExpressionNoTrailing", NestedPostfixedExpressionNoTrailing$$);
15825
+ }
15568
15826
  var MaybeNestedExpression$0 = NestedBulletedArray;
15569
- 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) {
15570
- if ($3)
15571
- return $3;
15572
- return $skip;
15827
+ var MaybeNestedExpression$1 = NestedImplicitObjectLiteral;
15828
+ 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) {
15829
+ var expression = $2;
15830
+ var trailing = $4;
15831
+ if (!expression)
15832
+ return $skip;
15833
+ if (!trailing)
15834
+ return expression;
15835
+ return [expression, trailing];
15573
15836
  });
15574
- var MaybeNestedExpression$2 = Expression;
15575
- var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1, MaybeNestedExpression$2];
15837
+ var MaybeNestedExpression$3 = Expression;
15838
+ var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1, MaybeNestedExpression$2, MaybeNestedExpression$3];
15576
15839
  function MaybeNestedExpression(ctx, state2) {
15577
15840
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedExpression", MaybeNestedExpression$$);
15578
15841
  }
15579
- var NestedExpression$0 = NestedBulletedArray;
15580
- 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) {
15581
- if ($3)
15582
- return $3;
15583
- return $skip;
15584
- });
15585
- var NestedExpression$$ = [NestedExpression$0, NestedExpression$1];
15586
- function NestedExpression(ctx, state2) {
15587
- return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedExpression", NestedExpression$$);
15588
- }
15589
15842
  var MaybeParenNestedExpression$0 = (0, import_lib2.$T)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement, NoBlock)), function(value) {
15590
15843
  return "";
15591
15844
  });
@@ -15595,7 +15848,7 @@ ${js}`
15595
15848
  var MaybeParenNestedExpression$2 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), (0, import_lib2.$C)(ArrayLiteral, ObjectLiteral)), function(value) {
15596
15849
  return value[1];
15597
15850
  });
15598
- 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) {
15851
+ 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) {
15599
15852
  var exp = $5;
15600
15853
  if (!exp)
15601
15854
  return $skip;
@@ -15605,7 +15858,7 @@ ${js}`
15605
15858
  function MaybeParenNestedExpression(ctx, state2) {
15606
15859
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeParenNestedExpression", MaybeParenNestedExpression$$);
15607
15860
  }
15608
- 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) {
15861
+ 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) {
15609
15862
  const imp = [
15610
15863
  { ...$1, ts: true },
15611
15864
  { ...$1, token: "const", js: true }
@@ -15795,7 +16048,7 @@ ${js}`
15795
16048
  function ImpliedFrom(ctx, state2) {
15796
16049
  return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
15797
16050
  }
15798
- 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) {
16051
+ 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) {
15799
16052
  var keyword = $2;
15800
16053
  var object = $5;
15801
16054
  return {
@@ -16121,19 +16374,19 @@ ${js}`
16121
16374
  function LexicalDeclaration(ctx, state2) {
16122
16375
  return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalDeclaration", LexicalDeclaration$$);
16123
16376
  }
16124
- 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) {
16377
+ 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) {
16125
16378
  return { $loc, token: "=", decl: "const " };
16126
16379
  });
16127
16380
  function ConstAssignment(ctx, state2) {
16128
16381
  return (0, import_lib2.$EVENT)(ctx, state2, "ConstAssignment", ConstAssignment$0);
16129
16382
  }
16130
- var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L135, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
16383
+ var LetAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
16131
16384
  return { $loc, token: "=", decl: "let " };
16132
16385
  });
16133
16386
  function LetAssignment(ctx, state2) {
16134
16387
  return (0, import_lib2.$EVENT)(ctx, state2, "LetAssignment", LetAssignment$0);
16135
16388
  }
16136
- var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L136, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
16389
+ var TypeAssignment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L137, 'TypeAssignment "::="'), function($skip, $loc, $0, $1) {
16137
16390
  return { $loc, token: "=" };
16138
16391
  });
16139
16392
  function TypeAssignment(ctx, state2) {
@@ -16556,7 +16809,7 @@ ${js}`
16556
16809
  function MultiLineComment(ctx, state2) {
16557
16810
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
16558
16811
  }
16559
- 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) {
16812
+ 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) {
16560
16813
  return { type: "Comment", $loc, token: $1 };
16561
16814
  });
16562
16815
  function JSMultiLineComment(ctx, state2) {
@@ -16602,7 +16855,7 @@ ${js}`
16602
16855
  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) {
16603
16856
  return { $loc, token: $0 };
16604
16857
  });
16605
- var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L139, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
16858
+ var NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
16606
16859
  return " ";
16607
16860
  });
16608
16861
  var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
@@ -16653,7 +16906,7 @@ ${js}`
16653
16906
  function StatementDelimiter(ctx, state2) {
16654
16907
  return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementDelimiter", StatementDelimiter$$);
16655
16908
  }
16656
- 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 "]"'))));
16909
+ 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 "]"'))));
16657
16910
  function ClosingDelimiter(ctx, state2) {
16658
16911
  return (0, import_lib2.$EVENT)(ctx, state2, "ClosingDelimiter", ClosingDelimiter$0);
16659
16912
  }
@@ -16676,7 +16929,7 @@ ${js}`
16676
16929
  function Loc(ctx, state2) {
16677
16930
  return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
16678
16931
  }
16679
- 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) {
16932
+ 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) {
16680
16933
  return { $loc, token: $1, ts: true };
16681
16934
  });
16682
16935
  function Abstract(ctx, state2) {
@@ -16688,43 +16941,43 @@ ${js}`
16688
16941
  function Ampersand(ctx, state2) {
16689
16942
  return (0, import_lib2.$EVENT)(ctx, state2, "Ampersand", Ampersand$0);
16690
16943
  }
16691
- 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) {
16944
+ 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) {
16692
16945
  return { $loc, token: $1 };
16693
16946
  });
16694
16947
  function As(ctx, state2) {
16695
16948
  return (0, import_lib2.$EVENT)(ctx, state2, "As", As$0);
16696
16949
  }
16697
- var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L143, 'At "@"'), function($skip, $loc, $0, $1) {
16950
+ var At$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'At "@"'), function($skip, $loc, $0, $1) {
16698
16951
  return { $loc, token: $1 };
16699
16952
  });
16700
16953
  function At(ctx, state2) {
16701
16954
  return (0, import_lib2.$EVENT)(ctx, state2, "At", At$0);
16702
16955
  }
16703
- var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
16956
+ var AtAt$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L145, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
16704
16957
  return { $loc, token: "@" };
16705
16958
  });
16706
16959
  function AtAt(ctx, state2) {
16707
16960
  return (0, import_lib2.$EVENT)(ctx, state2, "AtAt", AtAt$0);
16708
16961
  }
16709
- 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) {
16962
+ 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) {
16710
16963
  return { $loc, token: $1, type: "Async" };
16711
16964
  });
16712
16965
  function Async(ctx, state2) {
16713
16966
  return (0, import_lib2.$EVENT)(ctx, state2, "Async", Async$0);
16714
16967
  }
16715
- 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) {
16968
+ 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) {
16716
16969
  return { $loc, token: $1, type: "Await" };
16717
16970
  });
16718
16971
  function Await(ctx, state2) {
16719
16972
  return (0, import_lib2.$EVENT)(ctx, state2, "Await", Await$0);
16720
16973
  }
16721
- var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L147, 'Backtick "`"'), function($skip, $loc, $0, $1) {
16974
+ var Backtick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L148, 'Backtick "`"'), function($skip, $loc, $0, $1) {
16722
16975
  return { $loc, token: $1 };
16723
16976
  });
16724
16977
  function Backtick(ctx, state2) {
16725
16978
  return (0, import_lib2.$EVENT)(ctx, state2, "Backtick", Backtick$0);
16726
16979
  }
16727
- 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) {
16980
+ 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) {
16728
16981
  return { $loc, token: $1 };
16729
16982
  });
16730
16983
  function By(ctx, state2) {
@@ -16736,19 +16989,19 @@ ${js}`
16736
16989
  function Caret(ctx, state2) {
16737
16990
  return (0, import_lib2.$EVENT)(ctx, state2, "Caret", Caret$0);
16738
16991
  }
16739
- 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) {
16992
+ 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) {
16740
16993
  return { $loc, token: $1 };
16741
16994
  });
16742
16995
  function Case(ctx, state2) {
16743
16996
  return (0, import_lib2.$EVENT)(ctx, state2, "Case", Case$0);
16744
16997
  }
16745
- 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) {
16998
+ 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) {
16746
16999
  return { $loc, token: $1 };
16747
17000
  });
16748
17001
  function Catch(ctx, state2) {
16749
17002
  return (0, import_lib2.$EVENT)(ctx, state2, "Catch", Catch$0);
16750
17003
  }
16751
- 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) {
17004
+ 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) {
16752
17005
  return { $loc, token: $1 };
16753
17006
  });
16754
17007
  function Class(ctx, state2) {
@@ -16772,13 +17025,13 @@ ${js}`
16772
17025
  function CloseBracket(ctx, state2) {
16773
17026
  return (0, import_lib2.$EVENT)(ctx, state2, "CloseBracket", CloseBracket$0);
16774
17027
  }
16775
- var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L140, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
17028
+ var CloseParen$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L141, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
16776
17029
  return { $loc, token: $1 };
16777
17030
  });
16778
17031
  function CloseParen(ctx, state2) {
16779
17032
  return (0, import_lib2.$EVENT)(ctx, state2, "CloseParen", CloseParen$0);
16780
17033
  }
16781
- var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L152, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
17034
+ var CoffeeSubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L153, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
16782
17035
  return { $loc, token: "${" };
16783
17036
  });
16784
17037
  function CoffeeSubstitutionStart(ctx, state2) {
@@ -16796,37 +17049,37 @@ ${js}`
16796
17049
  function Comma(ctx, state2) {
16797
17050
  return (0, import_lib2.$EVENT)(ctx, state2, "Comma", Comma$0);
16798
17051
  }
16799
- 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) {
17052
+ 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) {
16800
17053
  return { $loc, token: $1 };
16801
17054
  });
16802
17055
  function Comptime(ctx, state2) {
16803
17056
  return (0, import_lib2.$EVENT)(ctx, state2, "Comptime", Comptime$0);
16804
17057
  }
16805
- var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L143, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
17058
+ var ConstructorShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L144, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
16806
17059
  return { $loc, token: "constructor" };
16807
17060
  });
16808
17061
  function ConstructorShorthand(ctx, state2) {
16809
17062
  return (0, import_lib2.$EVENT)(ctx, state2, "ConstructorShorthand", ConstructorShorthand$0);
16810
17063
  }
16811
- 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) {
17064
+ 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) {
16812
17065
  return { $loc, token: $1 };
16813
17066
  });
16814
17067
  function Declare(ctx, state2) {
16815
17068
  return (0, import_lib2.$EVENT)(ctx, state2, "Declare", Declare$0);
16816
17069
  }
16817
- 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) {
17070
+ 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) {
16818
17071
  return { $loc, token: $1 };
16819
17072
  });
16820
17073
  function Default(ctx, state2) {
16821
17074
  return (0, import_lib2.$EVENT)(ctx, state2, "Default", Default$0);
16822
17075
  }
16823
- 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) {
17076
+ 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) {
16824
17077
  return { $loc, token: $1 };
16825
17078
  });
16826
17079
  function Delete(ctx, state2) {
16827
17080
  return (0, import_lib2.$EVENT)(ctx, state2, "Delete", Delete$0);
16828
17081
  }
16829
- 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) {
17082
+ 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) {
16830
17083
  return { $loc, token: $1 };
16831
17084
  });
16832
17085
  function Do(ctx, state2) {
@@ -16846,20 +17099,20 @@ ${js}`
16846
17099
  function Dot(ctx, state2) {
16847
17100
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Dot", Dot$$);
16848
17101
  }
16849
- 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) {
17102
+ 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) {
16850
17103
  return { $loc, token: $1 };
16851
17104
  });
16852
- var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L159, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
17105
+ var DotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
16853
17106
  return { $loc, token: ".." };
16854
17107
  });
16855
17108
  var DotDot$$ = [DotDot$0, DotDot$1];
16856
17109
  function DotDot(ctx, state2) {
16857
17110
  return (0, import_lib2.$EVENT_C)(ctx, state2, "DotDot", DotDot$$);
16858
17111
  }
16859
- var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L160, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
17112
+ var DotDotDot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
16860
17113
  return { $loc, token: $1 };
16861
17114
  });
16862
- var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L161, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
17115
+ var DotDotDot$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
16863
17116
  return { $loc, token: "..." };
16864
17117
  });
16865
17118
  var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
@@ -16872,31 +17125,31 @@ ${js}`
16872
17125
  function InsertDotDotDot(ctx, state2) {
16873
17126
  return (0, import_lib2.$EVENT)(ctx, state2, "InsertDotDotDot", InsertDotDotDot$0);
16874
17127
  }
16875
- var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
17128
+ var DoubleColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
16876
17129
  return { $loc, token: $1 };
16877
17130
  });
16878
17131
  function DoubleColon(ctx, state2) {
16879
17132
  return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColon", DoubleColon$0);
16880
17133
  }
16881
- var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L162, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
17134
+ var DoubleColonAsColon$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleColonAsColon "::"'), function($skip, $loc, $0, $1) {
16882
17135
  return { $loc, token: ":" };
16883
17136
  });
16884
17137
  function DoubleColonAsColon(ctx, state2) {
16885
17138
  return (0, import_lib2.$EVENT)(ctx, state2, "DoubleColonAsColon", DoubleColonAsColon$0);
16886
17139
  }
16887
- var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L163, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
17140
+ var DoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L164, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
16888
17141
  return { $loc, token: $1 };
16889
17142
  });
16890
17143
  function DoubleQuote(ctx, state2) {
16891
17144
  return (0, import_lib2.$EVENT)(ctx, state2, "DoubleQuote", DoubleQuote$0);
16892
17145
  }
16893
- 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) {
17146
+ 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) {
16894
17147
  return { $loc, token: $1 };
16895
17148
  });
16896
17149
  function Each(ctx, state2) {
16897
17150
  return (0, import_lib2.$EVENT)(ctx, state2, "Each", Each$0);
16898
17151
  }
16899
- 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) {
17152
+ 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) {
16900
17153
  return { $loc, token: $1 };
16901
17154
  });
16902
17155
  function Else(ctx, state2) {
@@ -16908,61 +17161,61 @@ ${js}`
16908
17161
  function Equals(ctx, state2) {
16909
17162
  return (0, import_lib2.$EVENT)(ctx, state2, "Equals", Equals$0);
16910
17163
  }
16911
- var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L166, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
17164
+ var ExclamationPoint$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L167, 'ExclamationPoint "!"'), function($skip, $loc, $0, $1) {
16912
17165
  return { $loc, token: $1 };
16913
17166
  });
16914
17167
  function ExclamationPoint(ctx, state2) {
16915
17168
  return (0, import_lib2.$EVENT)(ctx, state2, "ExclamationPoint", ExclamationPoint$0);
16916
17169
  }
16917
- 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) {
17170
+ 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) {
16918
17171
  return { $loc, token: $1 };
16919
17172
  });
16920
17173
  function Export(ctx, state2) {
16921
17174
  return (0, import_lib2.$EVENT)(ctx, state2, "Export", Export$0);
16922
17175
  }
16923
- 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) {
17176
+ 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) {
16924
17177
  return { $loc, token: $1 };
16925
17178
  });
16926
17179
  function Extends(ctx, state2) {
16927
17180
  return (0, import_lib2.$EVENT)(ctx, state2, "Extends", Extends$0);
16928
17181
  }
16929
- 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) {
17182
+ 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) {
16930
17183
  return { $loc, token: $1 };
16931
17184
  });
16932
17185
  function Finally(ctx, state2) {
16933
17186
  return (0, import_lib2.$EVENT)(ctx, state2, "Finally", Finally$0);
16934
17187
  }
16935
- 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) {
17188
+ 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) {
16936
17189
  return { $loc, token: $1 };
16937
17190
  });
16938
17191
  function For(ctx, state2) {
16939
17192
  return (0, import_lib2.$EVENT)(ctx, state2, "For", For$0);
16940
17193
  }
16941
- 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) {
17194
+ 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) {
16942
17195
  return { $loc, token: $1 };
16943
17196
  });
16944
17197
  function From(ctx, state2) {
16945
17198
  return (0, import_lib2.$EVENT)(ctx, state2, "From", From$0);
16946
17199
  }
16947
- 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) {
17200
+ 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) {
16948
17201
  return { $loc, token: $1 };
16949
17202
  });
16950
17203
  function Function2(ctx, state2) {
16951
17204
  return (0, import_lib2.$EVENT)(ctx, state2, "Function", Function$0);
16952
17205
  }
16953
- 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) {
17206
+ 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) {
16954
17207
  return { $loc, token: $1, type: "GetOrSet" };
16955
17208
  });
16956
17209
  function GetOrSet(ctx, state2) {
16957
17210
  return (0, import_lib2.$EVENT)(ctx, state2, "GetOrSet", GetOrSet$0);
16958
17211
  }
16959
- var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L175, 'Hash "#"'), function($skip, $loc, $0, $1) {
17212
+ var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L176, 'Hash "#"'), function($skip, $loc, $0, $1) {
16960
17213
  return { $loc, token: $1 };
16961
17214
  });
16962
17215
  function Hash(ctx, state2) {
16963
17216
  return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
16964
17217
  }
16965
- 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) {
17218
+ 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) {
16966
17219
  return { $loc, token: $1 };
16967
17220
  });
16968
17221
  function If(ctx, state2) {
@@ -16974,67 +17227,67 @@ ${js}`
16974
17227
  function Import(ctx, state2) {
16975
17228
  return (0, import_lib2.$EVENT)(ctx, state2, "Import", Import$0);
16976
17229
  }
16977
- 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) {
17230
+ 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) {
16978
17231
  return { $loc, token: $1 };
16979
17232
  });
16980
17233
  function In(ctx, state2) {
16981
17234
  return (0, import_lib2.$EVENT)(ctx, state2, "In", In$0);
16982
17235
  }
16983
- 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) {
17236
+ 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) {
16984
17237
  return { $loc, token: $1 };
16985
17238
  });
16986
17239
  function Infer(ctx, state2) {
16987
17240
  return (0, import_lib2.$EVENT)(ctx, state2, "Infer", Infer$0);
16988
17241
  }
16989
- 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) {
17242
+ 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) {
16990
17243
  return { $loc, token: $1 };
16991
17244
  });
16992
17245
  function LetOrConst(ctx, state2) {
16993
17246
  return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConst", LetOrConst$0);
16994
17247
  }
16995
- 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) {
17248
+ 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) {
16996
17249
  return { $loc, token: $1 };
16997
17250
  });
16998
17251
  function Const(ctx, state2) {
16999
17252
  return (0, import_lib2.$EVENT)(ctx, state2, "Const", Const$0);
17000
17253
  }
17001
- 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) {
17254
+ 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) {
17002
17255
  return { $loc, token: $1 };
17003
17256
  });
17004
17257
  function Is(ctx, state2) {
17005
17258
  return (0, import_lib2.$EVENT)(ctx, state2, "Is", Is$0);
17006
17259
  }
17007
- 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) {
17260
+ 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) {
17008
17261
  return { $loc, token: $1 };
17009
17262
  });
17010
17263
  function LetOrConstOrVar(ctx, state2) {
17011
17264
  return (0, import_lib2.$EVENT)(ctx, state2, "LetOrConstOrVar", LetOrConstOrVar$0);
17012
17265
  }
17013
- 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) {
17266
+ 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) {
17014
17267
  return { $loc, token: $1 };
17015
17268
  });
17016
17269
  function Like(ctx, state2) {
17017
17270
  return (0, import_lib2.$EVENT)(ctx, state2, "Like", Like$0);
17018
17271
  }
17019
- 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) {
17272
+ 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) {
17020
17273
  return { $loc, token: "while" };
17021
17274
  });
17022
17275
  function Loop(ctx, state2) {
17023
17276
  return (0, import_lib2.$EVENT)(ctx, state2, "Loop", Loop$0);
17024
17277
  }
17025
- 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) {
17278
+ 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) {
17026
17279
  return { $loc, token: $1 };
17027
17280
  });
17028
17281
  function New(ctx, state2) {
17029
17282
  return (0, import_lib2.$EVENT)(ctx, state2, "New", New$0);
17030
17283
  }
17031
- 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) {
17284
+ 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) {
17032
17285
  return { $loc, token: "!" };
17033
17286
  });
17034
17287
  function Not(ctx, state2) {
17035
17288
  return (0, import_lib2.$EVENT)(ctx, state2, "Not", Not$0);
17036
17289
  }
17037
- 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) {
17290
+ 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) {
17038
17291
  return { $loc, token: $1 };
17039
17292
  });
17040
17293
  function Of(ctx, state2) {
@@ -17052,7 +17305,7 @@ ${js}`
17052
17305
  function OpenBrace(ctx, state2) {
17053
17306
  return (0, import_lib2.$EVENT)(ctx, state2, "OpenBrace", OpenBrace$0);
17054
17307
  }
17055
- var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L188, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
17308
+ var OpenBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L189, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
17056
17309
  return { $loc, token: $1 };
17057
17310
  });
17058
17311
  function OpenBracket(ctx, state2) {
@@ -17064,49 +17317,49 @@ ${js}`
17064
17317
  function OpenParen(ctx, state2) {
17065
17318
  return (0, import_lib2.$EVENT)(ctx, state2, "OpenParen", OpenParen$0);
17066
17319
  }
17067
- 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) {
17320
+ 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) {
17068
17321
  return { $loc, token: $1 };
17069
17322
  });
17070
17323
  function Operator(ctx, state2) {
17071
17324
  return (0, import_lib2.$EVENT)(ctx, state2, "Operator", Operator$0);
17072
17325
  }
17073
- 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) {
17326
+ 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) {
17074
17327
  return { $loc, token: $1, ts: true };
17075
17328
  });
17076
17329
  function Override(ctx, state2) {
17077
17330
  return (0, import_lib2.$EVENT)(ctx, state2, "Override", Override$0);
17078
17331
  }
17079
- 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) {
17332
+ 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) {
17080
17333
  return { $loc, token: $1 };
17081
17334
  });
17082
17335
  function Own(ctx, state2) {
17083
17336
  return (0, import_lib2.$EVENT)(ctx, state2, "Own", Own$0);
17084
17337
  }
17085
- 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) {
17338
+ 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) {
17086
17339
  return { $loc, token: $1 };
17087
17340
  });
17088
17341
  function Public(ctx, state2) {
17089
17342
  return (0, import_lib2.$EVENT)(ctx, state2, "Public", Public$0);
17090
17343
  }
17091
- 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) {
17344
+ 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) {
17092
17345
  return { $loc, token: $1 };
17093
17346
  });
17094
17347
  function Private(ctx, state2) {
17095
17348
  return (0, import_lib2.$EVENT)(ctx, state2, "Private", Private$0);
17096
17349
  }
17097
- 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) {
17350
+ 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) {
17098
17351
  return { $loc, token: $1 };
17099
17352
  });
17100
17353
  function Protected(ctx, state2) {
17101
17354
  return (0, import_lib2.$EVENT)(ctx, state2, "Protected", Protected$0);
17102
17355
  }
17103
- 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) {
17356
+ 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) {
17104
17357
  return { $loc, token: "||>" };
17105
17358
  });
17106
- 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) {
17359
+ 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) {
17107
17360
  return { $loc, token: "|>=" };
17108
17361
  });
17109
- 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) {
17362
+ 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) {
17110
17363
  return { $loc, token: "|>" };
17111
17364
  });
17112
17365
  var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
@@ -17119,19 +17372,19 @@ ${js}`
17119
17372
  function QuestionMark(ctx, state2) {
17120
17373
  return (0, import_lib2.$EVENT)(ctx, state2, "QuestionMark", QuestionMark$0);
17121
17374
  }
17122
- 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) {
17375
+ 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) {
17123
17376
  return { $loc, token: $1, ts: true };
17124
17377
  });
17125
17378
  function Readonly(ctx, state2) {
17126
17379
  return (0, import_lib2.$EVENT)(ctx, state2, "Readonly", Readonly$0);
17127
17380
  }
17128
- 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) {
17381
+ 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) {
17129
17382
  return { $loc, token: $1 };
17130
17383
  });
17131
17384
  function Return(ctx, state2) {
17132
17385
  return (0, import_lib2.$EVENT)(ctx, state2, "Return", Return$0);
17133
17386
  }
17134
- 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) {
17387
+ 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) {
17135
17388
  return { $loc, token: $1 };
17136
17389
  });
17137
17390
  function Satisfies(ctx, state2) {
@@ -17143,7 +17396,7 @@ ${js}`
17143
17396
  function Semicolon(ctx, state2) {
17144
17397
  return (0, import_lib2.$EVENT)(ctx, state2, "Semicolon", Semicolon$0);
17145
17398
  }
17146
- var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L204, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
17399
+ var SingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L205, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
17147
17400
  return { $loc, token: $1 };
17148
17401
  });
17149
17402
  function SingleQuote(ctx, state2) {
@@ -17155,149 +17408,149 @@ ${js}`
17155
17408
  function Star(ctx, state2) {
17156
17409
  return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
17157
17410
  }
17158
- 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) {
17411
+ 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) {
17159
17412
  return { $loc, token: $1 };
17160
17413
  });
17161
- 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) {
17414
+ 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) {
17162
17415
  return { $loc, token: "static " };
17163
17416
  });
17164
17417
  var Static$$ = [Static$0, Static$1];
17165
17418
  function Static(ctx, state2) {
17166
17419
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Static", Static$$);
17167
17420
  }
17168
- var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L206, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
17421
+ var SubstitutionStart$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L207, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
17169
17422
  return { $loc, token: $1 };
17170
17423
  });
17171
17424
  function SubstitutionStart(ctx, state2) {
17172
17425
  return (0, import_lib2.$EVENT)(ctx, state2, "SubstitutionStart", SubstitutionStart$0);
17173
17426
  }
17174
- 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) {
17427
+ 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) {
17175
17428
  return { $loc, token: $1 };
17176
17429
  });
17177
17430
  function Super(ctx, state2) {
17178
17431
  return (0, import_lib2.$EVENT)(ctx, state2, "Super", Super$0);
17179
17432
  }
17180
- 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) {
17433
+ 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) {
17181
17434
  return { $loc, token: $1 };
17182
17435
  });
17183
17436
  function Switch(ctx, state2) {
17184
17437
  return (0, import_lib2.$EVENT)(ctx, state2, "Switch", Switch$0);
17185
17438
  }
17186
- 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) {
17439
+ 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) {
17187
17440
  return { $loc, token: $1 };
17188
17441
  });
17189
17442
  function Target(ctx, state2) {
17190
17443
  return (0, import_lib2.$EVENT)(ctx, state2, "Target", Target$0);
17191
17444
  }
17192
- 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) {
17445
+ 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) {
17193
17446
  return { $loc, token: "" };
17194
17447
  });
17195
17448
  function Then(ctx, state2) {
17196
17449
  return (0, import_lib2.$EVENT)(ctx, state2, "Then", Then$0);
17197
17450
  }
17198
- 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) {
17451
+ 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) {
17199
17452
  return { $loc, token: $1 };
17200
17453
  });
17201
17454
  function This(ctx, state2) {
17202
17455
  return (0, import_lib2.$EVENT)(ctx, state2, "This", This$0);
17203
17456
  }
17204
- 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) {
17457
+ 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) {
17205
17458
  return { $loc, token: $1 };
17206
17459
  });
17207
17460
  function Throw(ctx, state2) {
17208
17461
  return (0, import_lib2.$EVENT)(ctx, state2, "Throw", Throw$0);
17209
17462
  }
17210
- var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L213, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
17463
+ var TripleDoubleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
17211
17464
  return { $loc, token: "`" };
17212
17465
  });
17213
17466
  function TripleDoubleQuote(ctx, state2) {
17214
17467
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleQuote", TripleDoubleQuote$0);
17215
17468
  }
17216
- var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L214, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
17469
+ var TripleSingleQuote$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
17217
17470
  return { $loc, token: "`" };
17218
17471
  });
17219
17472
  function TripleSingleQuote(ctx, state2) {
17220
17473
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleSingleQuote", TripleSingleQuote$0);
17221
17474
  }
17222
- var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L215, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
17475
+ var TripleSlash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
17223
17476
  return { $loc, token: "/" };
17224
17477
  });
17225
17478
  function TripleSlash(ctx, state2) {
17226
17479
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlash", TripleSlash$0);
17227
17480
  }
17228
- var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L216, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
17481
+ var TripleTick$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L217, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
17229
17482
  return { $loc, token: "`" };
17230
17483
  });
17231
17484
  function TripleTick(ctx, state2) {
17232
17485
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleTick", TripleTick$0);
17233
17486
  }
17234
- 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) {
17487
+ 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) {
17235
17488
  return { $loc, token: $1 };
17236
17489
  });
17237
17490
  function Try(ctx, state2) {
17238
17491
  return (0, import_lib2.$EVENT)(ctx, state2, "Try", Try$0);
17239
17492
  }
17240
- 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) {
17493
+ 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) {
17241
17494
  return { $loc, token: $1 };
17242
17495
  });
17243
17496
  function Typeof(ctx, state2) {
17244
17497
  return (0, import_lib2.$EVENT)(ctx, state2, "Typeof", Typeof$0);
17245
17498
  }
17246
- 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) {
17499
+ 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) {
17247
17500
  return { $loc, token: $1 };
17248
17501
  });
17249
17502
  function Undefined(ctx, state2) {
17250
17503
  return (0, import_lib2.$EVENT)(ctx, state2, "Undefined", Undefined$0);
17251
17504
  }
17252
- 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) {
17505
+ 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) {
17253
17506
  return { $loc, token: $1, negated: true };
17254
17507
  });
17255
17508
  function Unless(ctx, state2) {
17256
17509
  return (0, import_lib2.$EVENT)(ctx, state2, "Unless", Unless$0);
17257
17510
  }
17258
- 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) {
17511
+ 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) {
17259
17512
  return { $loc, token: $1, negated: true };
17260
17513
  });
17261
17514
  function Until(ctx, state2) {
17262
17515
  return (0, import_lib2.$EVENT)(ctx, state2, "Until", Until$0);
17263
17516
  }
17264
- 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) {
17517
+ 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) {
17265
17518
  return { $loc, token: $1 };
17266
17519
  });
17267
17520
  function Using(ctx, state2) {
17268
17521
  return (0, import_lib2.$EVENT)(ctx, state2, "Using", Using$0);
17269
17522
  }
17270
- 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) {
17523
+ 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) {
17271
17524
  return { $loc, token: $1 };
17272
17525
  });
17273
17526
  function Var(ctx, state2) {
17274
17527
  return (0, import_lib2.$EVENT)(ctx, state2, "Var", Var$0);
17275
17528
  }
17276
- 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) {
17529
+ 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) {
17277
17530
  return { $loc, token: $1 };
17278
17531
  });
17279
17532
  function Void(ctx, state2) {
17280
17533
  return (0, import_lib2.$EVENT)(ctx, state2, "Void", Void$0);
17281
17534
  }
17282
- 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) {
17535
+ 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) {
17283
17536
  return { $loc, token: "case" };
17284
17537
  });
17285
17538
  function When(ctx, state2) {
17286
17539
  return (0, import_lib2.$EVENT)(ctx, state2, "When", When$0);
17287
17540
  }
17288
- 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) {
17541
+ 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) {
17289
17542
  return { $loc, token: $1 };
17290
17543
  });
17291
17544
  function While(ctx, state2) {
17292
17545
  return (0, import_lib2.$EVENT)(ctx, state2, "While", While$0);
17293
17546
  }
17294
- 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) {
17547
+ 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) {
17295
17548
  return { $loc, token: $1 };
17296
17549
  });
17297
17550
  function With(ctx, state2) {
17298
17551
  return (0, import_lib2.$EVENT)(ctx, state2, "With", With$0);
17299
17552
  }
17300
- 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) {
17553
+ 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) {
17301
17554
  return { $loc, token: $1, type: "Yield" };
17302
17555
  });
17303
17556
  function Yield(ctx, state2) {
@@ -17376,7 +17629,7 @@ ${js}`
17376
17629
  function JSXElement(ctx, state2) {
17377
17630
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
17378
17631
  }
17379
- 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) {
17632
+ 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) {
17380
17633
  return { type: "JSXElement", children: $0, tag: $2 };
17381
17634
  });
17382
17635
  function JSXSelfClosingElement(ctx, state2) {
@@ -17410,7 +17663,7 @@ ${js}`
17410
17663
  function JSXOptionalClosingElement(ctx, state2) {
17411
17664
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
17412
17665
  }
17413
- 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 ">"'));
17666
+ 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 ">"'));
17414
17667
  function JSXClosingElement(ctx, state2) {
17415
17668
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingElement", JSXClosingElement$0);
17416
17669
  }
@@ -17431,7 +17684,7 @@ ${js}`
17431
17684
  ];
17432
17685
  return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
17433
17686
  });
17434
- 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) {
17687
+ 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) {
17435
17688
  var children = $3;
17436
17689
  $0 = $0.slice(1);
17437
17690
  return {
@@ -17444,7 +17697,7 @@ ${js}`
17444
17697
  function JSXFragment(ctx, state2) {
17445
17698
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXFragment", JSXFragment$$);
17446
17699
  }
17447
- var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L229, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
17700
+ var PushJSXOpeningFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L230, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
17448
17701
  state.JSXTagStack.push("");
17449
17702
  return $1;
17450
17703
  });
@@ -17461,11 +17714,11 @@ ${js}`
17461
17714
  function JSXOptionalClosingFragment(ctx, state2) {
17462
17715
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
17463
17716
  }
17464
- var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L230, 'JSXClosingFragment "</>"');
17717
+ var JSXClosingFragment$0 = (0, import_lib2.$EXPECT)($L231, 'JSXClosingFragment "</>"');
17465
17718
  function JSXClosingFragment(ctx, state2) {
17466
17719
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXClosingFragment", JSXClosingFragment$0);
17467
17720
  }
17468
- 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) {
17721
+ 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) {
17469
17722
  return config.defaultElement;
17470
17723
  });
17471
17724
  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)))));
@@ -17646,7 +17899,7 @@ ${js}`
17646
17899
  }
17647
17900
  return $skip;
17648
17901
  });
17649
- var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L175, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
17902
+ var JSXAttribute$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L176, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
17650
17903
  return [" ", "id=", $2];
17651
17904
  });
17652
17905
  var JSXAttribute$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
@@ -17687,17 +17940,13 @@ ${js}`
17687
17940
  function JSXAttributeName(ctx, state2) {
17688
17941
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXAttributeName", JSXAttributeName$$);
17689
17942
  }
17690
- 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) {
17943
+ 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) {
17691
17944
  var ws1 = $2;
17692
17945
  var equals = $3;
17693
- var ws2 = $4;
17694
17946
  var open = $5;
17695
- var indent = $6;
17696
- var expression = $7;
17697
- var close = $9;
17698
- if (!expression)
17699
- return $skip;
17700
- return [ws1, equals, ws2, open, indent, expression, close];
17947
+ var expression = $6;
17948
+ var close = $7;
17949
+ return [ws1, equals, open, trimFirstSpace(expression), close];
17701
17950
  });
17702
17951
  var JSXAttributeInitializer$1 = (0, import_lib2.$S)((0, import_lib2.$E)(Whitespace), Equals, (0, import_lib2.$E)(Whitespace), JSXAttributeValue);
17703
17952
  var JSXAttributeInitializer$$ = [JSXAttributeInitializer$0, JSXAttributeInitializer$1];
@@ -17991,7 +18240,7 @@ ${js}`
17991
18240
  function JSXChildGeneral(ctx, state2) {
17992
18241
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXChildGeneral", JSXChildGeneral$$);
17993
18242
  }
17994
- 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) {
18243
+ 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) {
17995
18244
  return ["{/*", $2, "*/}"];
17996
18245
  });
17997
18246
  function JSXComment(ctx, state2) {
@@ -18279,37 +18528,37 @@ ${js}`
18279
18528
  function InterfaceExtendsTarget(ctx, state2) {
18280
18529
  return (0, import_lib2.$EVENT)(ctx, state2, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
18281
18530
  }
18282
- 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) {
18531
+ 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) {
18283
18532
  return { $loc, token: $1 };
18284
18533
  });
18285
18534
  function TypeKeyword(ctx, state2) {
18286
18535
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeKeyword", TypeKeyword$0);
18287
18536
  }
18288
- 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) {
18537
+ 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) {
18289
18538
  return { $loc, token: $1 };
18290
18539
  });
18291
18540
  function Enum(ctx, state2) {
18292
18541
  return (0, import_lib2.$EVENT)(ctx, state2, "Enum", Enum$0);
18293
18542
  }
18294
- 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) {
18543
+ 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) {
18295
18544
  return { $loc, token: $1 };
18296
18545
  });
18297
18546
  function Interface(ctx, state2) {
18298
18547
  return (0, import_lib2.$EVENT)(ctx, state2, "Interface", Interface$0);
18299
18548
  }
18300
- 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) {
18549
+ 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) {
18301
18550
  return { $loc, token: $1 };
18302
18551
  });
18303
18552
  function Global(ctx, state2) {
18304
18553
  return (0, import_lib2.$EVENT)(ctx, state2, "Global", Global$0);
18305
18554
  }
18306
- 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) {
18555
+ 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) {
18307
18556
  return { $loc, token: $1 };
18308
18557
  });
18309
18558
  function Module(ctx, state2) {
18310
18559
  return (0, import_lib2.$EVENT)(ctx, state2, "Module", Module$0);
18311
18560
  }
18312
- 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) {
18561
+ 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) {
18313
18562
  return { $loc, token: $1 };
18314
18563
  });
18315
18564
  function Namespace(ctx, state2) {
@@ -18623,7 +18872,7 @@ ${js}`
18623
18872
  function ReturnTypeSuffix(ctx, state2) {
18624
18873
  return (0, import_lib2.$EVENT)(ctx, state2, "ReturnTypeSuffix", ReturnTypeSuffix$0);
18625
18874
  }
18626
- 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) {
18875
+ 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) {
18627
18876
  var asserts = $1;
18628
18877
  var t = $3;
18629
18878
  if (!t)
@@ -18724,8 +18973,8 @@ ${js}`
18724
18973
  function TypeUnarySuffix(ctx, state2) {
18725
18974
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnarySuffix", TypeUnarySuffix$$);
18726
18975
  }
18727
- var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L240, 'TypeUnaryOp "keyof"'), NonIdContinue);
18728
- var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L201, 'TypeUnaryOp "readonly"'), NonIdContinue);
18976
+ var TypeUnaryOp$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L241, 'TypeUnaryOp "keyof"'), NonIdContinue);
18977
+ var TypeUnaryOp$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L202, 'TypeUnaryOp "readonly"'), NonIdContinue);
18729
18978
  var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
18730
18979
  function TypeUnaryOp(ctx, state2) {
18731
18980
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeUnaryOp", TypeUnaryOp$$);
@@ -18755,7 +19004,7 @@ ${js}`
18755
19004
  function TypeIndexedAccess(ctx, state2) {
18756
19005
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIndexedAccess", TypeIndexedAccess$$);
18757
19006
  }
18758
- var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L241, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
19007
+ var UnknownAlias$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L242, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
18759
19008
  return { $loc, token: "unknown" };
18760
19009
  });
18761
19010
  function UnknownAlias(ctx, state2) {
@@ -19148,13 +19397,13 @@ ${js}`
19148
19397
  return num;
19149
19398
  return $0;
19150
19399
  });
19151
- 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) {
19400
+ 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) {
19152
19401
  return { type: "VoidType", $loc, token: $1 };
19153
19402
  });
19154
- 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) {
19403
+ 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) {
19155
19404
  return { type: "UniqueSymbolType", children: $0 };
19156
19405
  });
19157
- var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L244, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
19406
+ var TypeLiteral$5 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L245, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
19158
19407
  return { $loc, token: "[]" };
19159
19408
  });
19160
19409
  var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4, TypeLiteral$5];
@@ -19173,7 +19422,7 @@ ${js}`
19173
19422
  var InlineInterfacePropertyDelimiter$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)(SameLineOrIndentedFurther, InlineBasicInterfaceProperty)), InsertComma), function(value) {
19174
19423
  return value[1];
19175
19424
  });
19176
- 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 "}"'))));
19425
+ 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 "}"'))));
19177
19426
  var InlineInterfacePropertyDelimiter$3 = (0, import_lib2.$Y)(EOS);
19178
19427
  var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
19179
19428
  function InlineInterfacePropertyDelimiter(ctx, state2) {
@@ -19239,14 +19488,17 @@ ${js}`
19239
19488
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeFunctionArrow", TypeFunctionArrow$0);
19240
19489
  }
19241
19490
  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) {
19491
+ var open = $1;
19242
19492
  var args = $2;
19243
- args = args.flatMap(([ws, [arg, delim]]) => [prepend(ws, arg), delim]);
19493
+ var ws = $3;
19494
+ var close = $4;
19495
+ args = args.flatMap(([ws2, [arg, delim]]) => [prepend(ws2, arg), delim]);
19244
19496
  args.pop();
19245
19497
  return {
19246
19498
  type: "TypeArguments",
19247
19499
  ts: true,
19248
19500
  args,
19249
- children: $0
19501
+ children: [open, args, ws, close]
19250
19502
  };
19251
19503
  });
19252
19504
  function TypeArguments(ctx, state2) {
@@ -19412,7 +19664,7 @@ ${js}`
19412
19664
  function CivetPrologue(ctx, state2) {
19413
19665
  return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
19414
19666
  }
19415
- 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) {
19667
+ 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) {
19416
19668
  var options = $3;
19417
19669
  return {
19418
19670
  type: "CivetPrologue",