@danielx/civet 0.4.19-pre.13 → 0.4.19-pre.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -515,6 +515,7 @@ ${input.slice(result.pos)}
515
515
  NestedPropertyDefinitions,
516
516
  NestedPropertyDefinition,
517
517
  InlineObjectLiteral,
518
+ ImplicitInlineObjectPropertyDelimiter,
518
519
  ObjectPropertyDelimiter,
519
520
  PropertyDefinitionList,
520
521
  PropertyDefinition,
@@ -815,7 +816,6 @@ ${input.slice(result.pos)}
815
816
  CoffeeLineContinuationEnabled,
816
817
  CoffeeNotEnabled,
817
818
  CoffeeOfEnabled,
818
- CoffeeWordAssignmentEnabled,
819
819
  Reset,
820
820
  Init,
821
821
  Indent,
@@ -852,81 +852,81 @@ ${input.slice(result.pos)}
852
852
  var $L23 = $L("off");
853
853
  var $L24 = $L(",");
854
854
  var $L25 = $L("]");
855
- var $L26 = $L("}");
856
- var $L27 = $L("**=");
857
- var $L28 = $L("*=");
858
- var $L29 = $L("/=");
859
- var $L30 = $L("%=");
860
- var $L31 = $L("+=");
861
- var $L32 = $L("-=");
862
- var $L33 = $L("<<=");
863
- var $L34 = $L(">>>=");
864
- var $L35 = $L(">>=");
865
- var $L36 = $L("&&=");
866
- var $L37 = $L("&=");
867
- var $L38 = $L("^=");
868
- var $L39 = $L("||=");
869
- var $L40 = $L("|=");
870
- var $L41 = $L("??=");
871
- var $L42 = $L("?=");
872
- var $L43 = $L("=");
873
- var $L44 = $L("and=");
874
- var $L45 = $L("or=");
875
- var $L46 = $L("**");
876
- var $L47 = $L("*");
877
- var $L48 = $L("/");
878
- var $L49 = $L("%");
879
- var $L50 = $L("+");
880
- var $L51 = $L("-");
881
- var $L52 = $L("<=");
882
- var $L53 = $L(">=");
883
- var $L54 = $L("<<");
884
- var $L55 = $L(">>>");
885
- var $L56 = $L(">>");
886
- var $L57 = $L(">");
887
- var $L58 = $L("!==");
888
- var $L59 = $L("!=");
889
- var $L60 = $L("isnt");
890
- var $L61 = $L("is");
891
- var $L62 = $L("===");
892
- var $L63 = $L("==");
893
- var $L64 = $L("and");
894
- var $L65 = $L("&&");
895
- var $L66 = $L("of");
896
- var $L67 = $L("or");
897
- var $L68 = $L("||");
898
- var $L69 = $L("??");
899
- var $L70 = $L("?");
900
- var $L71 = $L("instanceof");
901
- var $L72 = $L("in");
902
- var $L73 = $L("not");
903
- var $L74 = $L("&");
904
- var $L75 = $L("^");
905
- var $L76 = $L("|");
906
- var $L77 = $L(";");
907
- var $L78 = $L("own");
908
- var $L79 = $L("finally");
909
- var $L80 = $L("break");
910
- var $L81 = $L("continue");
911
- var $L82 = $L("debugger");
912
- var $L83 = $L("import type");
913
- var $L84 = $L("default");
914
- var $L85 = $L(":=");
915
- var $L86 = $L("/*");
916
- var $L87 = $L("*/");
917
- var $L88 = $L("###");
918
- var $L89 = $L("\\");
919
- var $L90 = $L("as");
920
- var $L91 = $L("@");
921
- var $L92 = $L("async");
922
- var $L93 = $L("await");
923
- var $L94 = $L("`");
924
- var $L95 = $L("by");
925
- var $L96 = $L("case");
926
- var $L97 = $L("catch");
927
- var $L98 = $L("class");
928
- var $L99 = $L("#{");
929
- var $L100 = $L(":");
855
+ var $L26 = $L(":");
856
+ var $L27 = $L("}");
857
+ var $L28 = $L("**=");
858
+ var $L29 = $L("*=");
859
+ var $L30 = $L("/=");
860
+ var $L31 = $L("%=");
861
+ var $L32 = $L("+=");
862
+ var $L33 = $L("-=");
863
+ var $L34 = $L("<<=");
864
+ var $L35 = $L(">>>=");
865
+ var $L36 = $L(">>=");
866
+ var $L37 = $L("&&=");
867
+ var $L38 = $L("&=");
868
+ var $L39 = $L("^=");
869
+ var $L40 = $L("||=");
870
+ var $L41 = $L("|=");
871
+ var $L42 = $L("??=");
872
+ var $L43 = $L("?=");
873
+ var $L44 = $L("=");
874
+ var $L45 = $L("and=");
875
+ var $L46 = $L("or=");
876
+ var $L47 = $L("**");
877
+ var $L48 = $L("*");
878
+ var $L49 = $L("/");
879
+ var $L50 = $L("%");
880
+ var $L51 = $L("+");
881
+ var $L52 = $L("-");
882
+ var $L53 = $L("<=");
883
+ var $L54 = $L(">=");
884
+ var $L55 = $L("<<");
885
+ var $L56 = $L(">>>");
886
+ var $L57 = $L(">>");
887
+ var $L58 = $L(">");
888
+ var $L59 = $L("!==");
889
+ var $L60 = $L("!=");
890
+ var $L61 = $L("isnt");
891
+ var $L62 = $L("is");
892
+ var $L63 = $L("===");
893
+ var $L64 = $L("==");
894
+ var $L65 = $L("and");
895
+ var $L66 = $L("&&");
896
+ var $L67 = $L("of");
897
+ var $L68 = $L("or");
898
+ var $L69 = $L("||");
899
+ var $L70 = $L("??");
900
+ var $L71 = $L("?");
901
+ var $L72 = $L("instanceof");
902
+ var $L73 = $L("in");
903
+ var $L74 = $L("not");
904
+ var $L75 = $L("&");
905
+ var $L76 = $L("^");
906
+ var $L77 = $L("|");
907
+ var $L78 = $L(";");
908
+ var $L79 = $L("own");
909
+ var $L80 = $L("finally");
910
+ var $L81 = $L("break");
911
+ var $L82 = $L("continue");
912
+ var $L83 = $L("debugger");
913
+ var $L84 = $L("import type");
914
+ var $L85 = $L("default");
915
+ var $L86 = $L(":=");
916
+ var $L87 = $L("/*");
917
+ var $L88 = $L("*/");
918
+ var $L89 = $L("###");
919
+ var $L90 = $L("\\");
920
+ var $L91 = $L("as");
921
+ var $L92 = $L("@");
922
+ var $L93 = $L("async");
923
+ var $L94 = $L("await");
924
+ var $L95 = $L("`");
925
+ var $L96 = $L("by");
926
+ var $L97 = $L("case");
927
+ var $L98 = $L("catch");
928
+ var $L99 = $L("class");
929
+ var $L100 = $L("#{");
930
930
  var $L101 = $L("delete");
931
931
  var $L102 = $L("do");
932
932
  var $L103 = $L("..");
@@ -1018,7 +1018,7 @@ ${input.slice(result.pos)}
1018
1018
  var $R30 = $R(new RegExp("(?:on|off|yes|no)(?!\\p{ID_Continue})", "suy"));
1019
1019
  var $R31 = $R(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy"));
1020
1020
  var $R32 = $R(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy"));
1021
- var $R33 = $R(new RegExp("(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|loop|new|null|or|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy"));
1021
+ var $R33 = $R(new RegExp("(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy"));
1022
1022
  var $R34 = $R(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy"));
1023
1023
  var $R35 = $R(new RegExp(".", "suy"));
1024
1024
  var $R36 = $R(new RegExp("#(?!##)([^\\r\\n]*)", "suy"));
@@ -1079,12 +1079,18 @@ ${input.slice(result.pos)}
1079
1079
  return result;
1080
1080
  }
1081
1081
  }
1082
- var ExtendedExpression$0 = $TS($S(__, ExpressionizedStatement), function($skip, $loc, $0, $1, $2) {
1082
+ var ExtendedExpression$0 = $TS($S($Y(EOS), PushIndent, $E($S(Nested, ExpressionizedStatement)), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4) {
1083
+ var expression = $3;
1084
+ if (expression)
1085
+ return expression;
1086
+ return $skip;
1087
+ });
1088
+ var ExtendedExpression$1 = $TS($S(__, ExpressionizedStatement), function($skip, $loc, $0, $1, $2) {
1083
1089
  return Object.assign({}, $2, {
1084
1090
  children: [...$1, ...$2.children]
1085
1091
  });
1086
1092
  });
1087
- var ExtendedExpression$1 = AssignmentExpression;
1093
+ var ExtendedExpression$2 = AssignmentExpression;
1088
1094
  function ExtendedExpression(state) {
1089
1095
  if (state.events) {
1090
1096
  const result = state.events.enter?.("ExtendedExpression", state);
@@ -1092,12 +1098,12 @@ ${input.slice(result.pos)}
1092
1098
  return result.cache;
1093
1099
  }
1094
1100
  if (state.tokenize) {
1095
- const result = $TOKEN("ExtendedExpression", state, ExtendedExpression$0(state) || ExtendedExpression$1(state));
1101
+ const result = $TOKEN("ExtendedExpression", state, ExtendedExpression$0(state) || ExtendedExpression$1(state) || ExtendedExpression$2(state));
1096
1102
  if (state.events)
1097
1103
  state.events.exit?.("ExtendedExpression", state, result);
1098
1104
  return result;
1099
1105
  } else {
1100
- const result = ExtendedExpression$0(state) || ExtendedExpression$1(state);
1106
+ const result = ExtendedExpression$0(state) || ExtendedExpression$1(state) || ExtendedExpression$2(state);
1101
1107
  if (state.events)
1102
1108
  state.events.exit?.("ExtendedExpression", state, result);
1103
1109
  return result;
@@ -1604,56 +1610,10 @@ ${input.slice(result.pos)}
1604
1610
  }
1605
1611
  }
1606
1612
  var ActualAssignment$0 = $TS($S($P($S(__, LeftHandSideExpression, __, AssignmentOp)), ExtendedExpression), function($skip, $loc, $0, $1, $2) {
1607
- let tail = [], i = 0, len = $1.length;
1608
- while (i < len) {
1609
- const lastAssignment = $1[i++];
1610
- const [, lhs, , op] = lastAssignment;
1611
- if (op.token !== "=")
1612
- continue;
1613
- if (lhs.type === "ObjectExpression") {
1614
- lhs.children.splice(0, 0, "(");
1615
- tail.push(")");
1616
- break;
1617
- }
1618
- }
1619
- i = len - 1;
1620
- while (i >= 0) {
1621
- const lastAssignment = $1[i];
1622
- if (lastAssignment[3].token === "=") {
1623
- const lhs = lastAssignment[1];
1624
- if (Array.isArray(lhs) && lhs.length > 1) {
1625
- const props = lhs[lhs.length - 1];
1626
- if (Array.isArray(props)) {
1627
- const lastProp = props[props.length - 1];
1628
- if (lastProp.type === "SliceExpression") {
1629
- const { start, end, children: c } = lastProp;
1630
- c[0].token = ".splice(";
1631
- c[1] = start;
1632
- c[2] = ", ";
1633
- if (end)
1634
- c[3] = [end, " - ", start];
1635
- else
1636
- c[3] = ["1/0"];
1637
- c[4] = [", ...", $2];
1638
- c[5] = ")";
1639
- lastAssignment.pop();
1640
- if (module2.isWhitespaceOrEmpty(lastAssignment[2]))
1641
- lastAssignment.pop();
1642
- if ($1.length > 1) {
1643
- throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
1644
- }
1645
- return $1;
1646
- }
1647
- }
1648
- }
1649
- }
1650
- i--;
1651
- }
1652
- const names = $1.flatMap(([, l]) => l.names || []);
1653
1613
  return {
1654
1614
  type: "AssignmentExpression",
1655
- children: [...$0, ...tail],
1656
- names
1615
+ children: $0,
1616
+ names: null
1657
1617
  };
1658
1618
  });
1659
1619
  function ActualAssignment(state) {
@@ -2793,14 +2753,16 @@ ${input.slice(result.pos)}
2793
2753
  }
2794
2754
  }
2795
2755
  var ObjectBindingPatternContent$0 = NestedBindingProperties;
2796
- var ObjectBindingPatternContent$1 = $TS($S($Q(BindingProperty), $E($S(__, BindingRestProperty))), function($skip, $loc, $0, $1, $2) {
2756
+ var ObjectBindingPatternContent$1 = $TS($S($Q(BindingProperty), $E(BindingRestProperty), $Q(BindingProperty)), function($skip, $loc, $0, $1, $2, $3) {
2797
2757
  var props = $1;
2798
2758
  var rest = $2;
2759
+ var after = $3;
2799
2760
  const names = props.flatMap((p) => p.names);
2800
2761
  const children = [...props];
2801
2762
  if (rest) {
2802
- children.push(...rest);
2803
- names.push(...rest[1].names);
2763
+ [rest, after] = module2.reorderBindingRestProperty(rest, after);
2764
+ children.push(...after, rest);
2765
+ names.push(...after.flatMap((p) => p.names), ...rest.names);
2804
2766
  }
2805
2767
  return {
2806
2768
  names,
@@ -2902,16 +2864,18 @@ ${input.slice(result.pos)}
2902
2864
  return result;
2903
2865
  }
2904
2866
  }
2905
- var NestedBindingProperties$0 = $TS($S(PushIndent, $Q(NestedBindingProperty), $E(NestedBindingRestProperty), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4) {
2867
+ var NestedBindingProperties$0 = $TS($S(PushIndent, $Q(NestedBindingProperty), $E(NestedBindingRestProperty), $Q(NestedBindingProperty), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
2906
2868
  var props = $2;
2907
2869
  var rest = $3;
2870
+ var after = $4;
2908
2871
  if (!(props.length || rest))
2909
2872
  return $skip;
2910
2873
  const names = props.flatMap((p) => p.names);
2911
2874
  const children = [...props];
2912
2875
  if (rest) {
2913
- children.push(rest);
2914
- names.push(...rest.names);
2876
+ [rest, after] = module2.reorderBindingRestProperty(rest, after);
2877
+ children.push(...after, rest);
2878
+ names.push(...after.flatMap((p) => p.names), ...rest.names);
2915
2879
  }
2916
2880
  return {
2917
2881
  children,
@@ -2936,7 +2900,14 @@ ${input.slice(result.pos)}
2936
2900
  return result;
2937
2901
  }
2938
2902
  }
2939
- var NestedBindingProperty$0 = $S(Nested, BindingProperty);
2903
+ var NestedBindingProperty$0 = $TS($S(Nested, BindingProperty), function($skip, $loc, $0, $1, $2) {
2904
+ var indent = $1;
2905
+ var prop = $2;
2906
+ return {
2907
+ ...prop,
2908
+ children: [...indent, ...prop.children]
2909
+ };
2910
+ });
2940
2911
  function NestedBindingProperty(state) {
2941
2912
  if (state.events) {
2942
2913
  const result = state.events.enter?.("NestedBindingProperty", state);
@@ -3021,12 +2992,14 @@ ${input.slice(result.pos)}
3021
2992
  return result;
3022
2993
  }
3023
2994
  }
3024
- var BindingRestProperty$0 = $TS($S(DotDotDot, BindingIdentifier), function($skip, $loc, $0, $1, $2) {
3025
- var d = $1;
3026
- var id = $2;
2995
+ var BindingRestProperty$0 = $TS($S(__, DotDotDot, BindingIdentifier, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3, $4) {
2996
+ var ws = $1;
2997
+ var d = $2;
2998
+ var id = $3;
2999
+ var delimiter = $4;
3027
3000
  return {
3028
3001
  ...id,
3029
- children: [d, ...id.children]
3002
+ children: [...ws, d, ...id.children, delimiter]
3030
3003
  };
3031
3004
  });
3032
3005
  function BindingRestProperty(state) {
@@ -3084,9 +3057,10 @@ ${input.slice(result.pos)}
3084
3057
  var NestedBindingElement$0 = $TS($S(Nested, BindingElement), function($skip, $loc, $0, $1, $2) {
3085
3058
  var indent = $1;
3086
3059
  var element = $2;
3087
- return Object.assign({}, element, {
3060
+ return {
3061
+ ...element,
3088
3062
  children: [indent, ...element.children]
3089
- });
3063
+ };
3090
3064
  });
3091
3065
  function NestedBindingElement(state) {
3092
3066
  if (state.events) {
@@ -4098,13 +4072,27 @@ ${input.slice(result.pos)}
4098
4072
  var exp = $1;
4099
4073
  var ws = $2;
4100
4074
  var dots = $3;
4101
- return [...ws, dots, exp];
4075
+ return {
4076
+ type: "SpreadElement",
4077
+ children: [...ws, dots, exp],
4078
+ names: exp.names
4079
+ };
4102
4080
  });
4103
- var ArrayElementExpression$1 = $TV($E($S($E($S(DotDotDot, __)), ExtendedExpression)), function($skip, $loc, $0, $1) {
4104
- if ($1 && !$1[0]) {
4105
- return $1[1];
4081
+ var ArrayElementExpression$1 = $TS($S($E($S($E($S(DotDotDot, __)), ExtendedExpression)), $Y(ArrayElementDelimiter)), function($skip, $loc, $0, $1, $2) {
4082
+ var expMaybeSpread = $1;
4083
+ if (expMaybeSpread) {
4084
+ const [spread, exp] = expMaybeSpread;
4085
+ if (!spread) {
4086
+ return exp;
4087
+ } else {
4088
+ return {
4089
+ type: "SpreadElement",
4090
+ children: [...spread, exp],
4091
+ names: exp.names
4092
+ };
4093
+ }
4106
4094
  }
4107
- return $1;
4095
+ return void 0;
4108
4096
  });
4109
4097
  function ArrayElementExpression(state) {
4110
4098
  if (state.events) {
@@ -4145,9 +4133,12 @@ ${input.slice(result.pos)}
4145
4133
  return result;
4146
4134
  }
4147
4135
  }
4148
- var BracedObjectLiteral$0 = $TS($S(OpenBrace, $E(BracedObjectLiteralContent), __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
4149
- if ($2) {
4150
- const children = [$1, ...$2, ...$3, $4];
4136
+ var BracedObjectLiteral$0 = $TS($S(OpenBrace, $E(BracedObjectLiteralContent), $S(__, CloseBrace)), function($skip, $loc, $0, $1, $2, $3) {
4137
+ var open = $1;
4138
+ var content = $2;
4139
+ var close = $3;
4140
+ if (content) {
4141
+ const children = [open, ...content, close];
4151
4142
  return {
4152
4143
  type: "ObjectExpression",
4153
4144
  children,
@@ -4158,7 +4149,7 @@ ${input.slice(result.pos)}
4158
4149
  }
4159
4150
  return {
4160
4151
  type: "ObjectExpression",
4161
- children: [$1, ...$3, $4],
4152
+ children: [open, close],
4162
4153
  names: []
4163
4154
  };
4164
4155
  });
@@ -4181,13 +4172,7 @@ ${input.slice(result.pos)}
4181
4172
  }
4182
4173
  }
4183
4174
  var BracedObjectLiteralContent$0 = NestedPropertyDefinitions;
4184
- var BracedObjectLiteralContent$1 = $TS($S(__, PropertyDefinitionList, $E($S(__, Comma))), function($skip, $loc, $0, $1, $2, $3) {
4185
- const result = [...$1, ...$2];
4186
- if ($3) {
4187
- result.push(...$3[0], $3[1]);
4188
- }
4189
- return result;
4190
- });
4175
+ var BracedObjectLiteralContent$1 = PropertyDefinitionList;
4191
4176
  function BracedObjectLiteralContent(state) {
4192
4177
  if (state.events) {
4193
4178
  const result = state.events.enter?.("BracedObjectLiteralContent", state);
@@ -4255,11 +4240,13 @@ ${input.slice(result.pos)}
4255
4240
  }
4256
4241
  }
4257
4242
  var NestedImplicitPropertyDefinition$0 = $TS($S(Nested, NamedProperty, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
4258
- const result = [...$1, $2];
4259
- if ($3) {
4260
- result.push($3);
4261
- }
4262
- return result;
4243
+ var ws = $1;
4244
+ var prop = $2;
4245
+ var delimiter = $3;
4246
+ return {
4247
+ ...prop,
4248
+ children: [...ws, ...prop.children, delimiter]
4249
+ };
4263
4250
  });
4264
4251
  function NestedImplicitPropertyDefinition(state) {
4265
4252
  if (state.events) {
@@ -4304,11 +4291,13 @@ ${input.slice(result.pos)}
4304
4291
  }
4305
4292
  }
4306
4293
  var NestedPropertyDefinition$0 = $TS($S(Nested, PropertyDefinition, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
4307
- const result = [...$1, $2];
4308
- if ($3) {
4309
- result.push($3);
4310
- }
4311
- return result;
4294
+ var ws = $1;
4295
+ var prop = $2;
4296
+ var delimiter = $3;
4297
+ return {
4298
+ ...prop,
4299
+ children: [...ws, ...prop.children, delimiter]
4300
+ };
4312
4301
  });
4313
4302
  function NestedPropertyDefinition(state) {
4314
4303
  if (state.events) {
@@ -4328,8 +4317,10 @@ ${input.slice(result.pos)}
4328
4317
  return result;
4329
4318
  }
4330
4319
  }
4331
- var InlineObjectLiteral$0 = $TS($S(InsertOpenBrace, SnugNamedProperty, $Q($S($Q(TrailingComment), Comma, __, NamedProperty)), InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
4332
- return [$1[1], $2, ...$3.flat(), $4];
4320
+ var InlineObjectLiteral$0 = $TS($S(InsertOpenBrace, SnugNamedProperty, ImplicitInlineObjectPropertyDelimiter, $Q($S(NamedProperty, ImplicitInlineObjectPropertyDelimiter)), InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4321
+ var open = $1;
4322
+ var close = $5;
4323
+ return [open[1], $2, $3, ...$4, close];
4333
4324
  });
4334
4325
  function InlineObjectLiteral(state) {
4335
4326
  if (state.events) {
@@ -4349,8 +4340,35 @@ ${input.slice(result.pos)}
4349
4340
  return result;
4350
4341
  }
4351
4342
  }
4343
+ var ImplicitInlineObjectPropertyDelimiter$0 = $T($Y($S(EOS, NamedProperty)), function(value) {
4344
+ return ",";
4345
+ });
4346
+ var ImplicitInlineObjectPropertyDelimiter$1 = $T($Y($S(__, $EXPECT($L26, fail, 'ImplicitInlineObjectPropertyDelimiter ":"'))), function(value) {
4347
+ return "";
4348
+ });
4349
+ var ImplicitInlineObjectPropertyDelimiter$2 = $T($Y(EOS), function(value) {
4350
+ return "";
4351
+ });
4352
+ function ImplicitInlineObjectPropertyDelimiter(state) {
4353
+ if (state.events) {
4354
+ const result = state.events.enter?.("ImplicitInlineObjectPropertyDelimiter", state);
4355
+ if (result)
4356
+ return result.cache;
4357
+ }
4358
+ if (state.tokenize) {
4359
+ const result = $TOKEN("ImplicitInlineObjectPropertyDelimiter", state, ImplicitInlineObjectPropertyDelimiter$0(state) || ImplicitInlineObjectPropertyDelimiter$1(state) || ImplicitInlineObjectPropertyDelimiter$2(state));
4360
+ if (state.events)
4361
+ state.events.exit?.("ImplicitInlineObjectPropertyDelimiter", state, result);
4362
+ return result;
4363
+ } else {
4364
+ const result = ImplicitInlineObjectPropertyDelimiter$0(state) || ImplicitInlineObjectPropertyDelimiter$1(state) || ImplicitInlineObjectPropertyDelimiter$2(state);
4365
+ if (state.events)
4366
+ state.events.exit?.("ImplicitInlineObjectPropertyDelimiter", state, result);
4367
+ return result;
4368
+ }
4369
+ }
4352
4370
  var ObjectPropertyDelimiter$0 = $S($Q(_), Comma);
4353
- var ObjectPropertyDelimiter$1 = $Y($S(__, $EXPECT($L26, fail, 'ObjectPropertyDelimiter "}"')));
4371
+ var ObjectPropertyDelimiter$1 = $Y($S(__, $EXPECT($L27, fail, 'ObjectPropertyDelimiter "}"')));
4354
4372
  var ObjectPropertyDelimiter$2 = $TV($Y(EOS), function($skip, $loc, $0, $1) {
4355
4373
  return { $loc, token: "," };
4356
4374
  });
@@ -4372,14 +4390,13 @@ ${input.slice(result.pos)}
4372
4390
  return result;
4373
4391
  }
4374
4392
  }
4375
- var PropertyDefinitionList$0 = $TS($S(PropertyDefinition, $Q($S(ObjectPropertyDelimiter, __, PropertyDefinition))), function($skip, $loc, $0, $1, $2) {
4376
- if ($2.length) {
4377
- return [].concat($1 || [], ...$2);
4378
- }
4379
- if ($1) {
4380
- return [].concat($1);
4381
- }
4382
- return [];
4393
+ var PropertyDefinitionList$0 = $TV($P($S(PropertyDefinition, ObjectPropertyDelimiter)), function($skip, $loc, $0, $1) {
4394
+ return $0.map(([prop, delim]) => {
4395
+ return {
4396
+ ...prop,
4397
+ children: [...prop.children, delim]
4398
+ };
4399
+ });
4383
4400
  });
4384
4401
  function PropertyDefinitionList(state) {
4385
4402
  if (state.events) {
@@ -4399,19 +4416,33 @@ ${input.slice(result.pos)}
4399
4416
  return result;
4400
4417
  }
4401
4418
  }
4402
- var PropertyDefinition$0 = $TS($S(At, IdentifierReference, $Y(ObjectPropertyDelimiter)), function($skip, $loc, $0, $1, $2, $3) {
4403
- var at = $1;
4404
- var id = $2;
4419
+ var PropertyDefinition$0 = $TS($S(__, At, IdentifierReference), function($skip, $loc, $0, $1, $2, $3) {
4420
+ var ws = $1;
4421
+ var at = $2;
4422
+ var id = $3;
4405
4423
  return {
4406
4424
  type: "Property",
4407
- children: [id, ": ", { ...at, token: "this." }, id],
4425
+ children: [...ws, id, ": ", { ...at, token: "this." }, id],
4408
4426
  names: id.names
4409
4427
  };
4410
4428
  });
4411
4429
  var PropertyDefinition$1 = NamedProperty;
4412
4430
  var PropertyDefinition$2 = MethodDefinition;
4413
- var PropertyDefinition$3 = $S(DotDotDot, ExtendedExpression);
4414
- var PropertyDefinition$4 = IdentifierReference;
4431
+ var PropertyDefinition$3 = $TS($S(__, DotDotDot, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
4432
+ var ws = $1;
4433
+ var dots = $2;
4434
+ var exp = $3;
4435
+ return {
4436
+ type: "SpreadProperty",
4437
+ children: [...ws, dots, exp],
4438
+ names: exp.names
4439
+ };
4440
+ });
4441
+ var PropertyDefinition$4 = $TS($S(__, IdentifierReference), function($skip, $loc, $0, $1, $2) {
4442
+ var ws = $1;
4443
+ var id = $2;
4444
+ return { ...id, children: [...ws, ...id.children] };
4445
+ });
4415
4446
  function PropertyDefinition(state) {
4416
4447
  if (state.events) {
4417
4448
  const result = state.events.enter?.("PropertyDefinition", state);
@@ -4430,8 +4461,8 @@ ${input.slice(result.pos)}
4430
4461
  return result;
4431
4462
  }
4432
4463
  }
4433
- var NamedProperty$0 = $TS($S(PropertyName, __, Colon, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
4434
- var exp = $4;
4464
+ var NamedProperty$0 = $TS($S(__, PropertyName, __, Colon, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4465
+ var exp = $5;
4435
4466
  return {
4436
4467
  type: "Property",
4437
4468
  children: $0,
@@ -4670,27 +4701,27 @@ ${input.slice(result.pos)}
4670
4701
  return result;
4671
4702
  }
4672
4703
  }
4673
- var AssignmentOpSymbol$0 = $EXPECT($L27, fail, 'AssignmentOpSymbol "**="');
4674
- var AssignmentOpSymbol$1 = $EXPECT($L28, fail, 'AssignmentOpSymbol "*="');
4675
- var AssignmentOpSymbol$2 = $EXPECT($L29, fail, 'AssignmentOpSymbol "/="');
4676
- var AssignmentOpSymbol$3 = $EXPECT($L30, fail, 'AssignmentOpSymbol "%="');
4677
- var AssignmentOpSymbol$4 = $EXPECT($L31, fail, 'AssignmentOpSymbol "+="');
4678
- var AssignmentOpSymbol$5 = $EXPECT($L32, fail, 'AssignmentOpSymbol "-="');
4679
- var AssignmentOpSymbol$6 = $EXPECT($L33, fail, 'AssignmentOpSymbol "<<="');
4680
- var AssignmentOpSymbol$7 = $EXPECT($L34, fail, 'AssignmentOpSymbol ">>>="');
4681
- var AssignmentOpSymbol$8 = $EXPECT($L35, fail, 'AssignmentOpSymbol ">>="');
4682
- var AssignmentOpSymbol$9 = $EXPECT($L36, fail, 'AssignmentOpSymbol "&&="');
4683
- var AssignmentOpSymbol$10 = $EXPECT($L37, fail, 'AssignmentOpSymbol "&="');
4684
- var AssignmentOpSymbol$11 = $EXPECT($L38, fail, 'AssignmentOpSymbol "^="');
4685
- var AssignmentOpSymbol$12 = $EXPECT($L39, fail, 'AssignmentOpSymbol "||="');
4686
- var AssignmentOpSymbol$13 = $EXPECT($L40, fail, 'AssignmentOpSymbol "|="');
4687
- var AssignmentOpSymbol$14 = $EXPECT($L41, fail, 'AssignmentOpSymbol "??="');
4688
- var AssignmentOpSymbol$15 = $T($EXPECT($L42, fail, 'AssignmentOpSymbol "?="'), function(value) {
4704
+ var AssignmentOpSymbol$0 = $EXPECT($L28, fail, 'AssignmentOpSymbol "**="');
4705
+ var AssignmentOpSymbol$1 = $EXPECT($L29, fail, 'AssignmentOpSymbol "*="');
4706
+ var AssignmentOpSymbol$2 = $EXPECT($L30, fail, 'AssignmentOpSymbol "/="');
4707
+ var AssignmentOpSymbol$3 = $EXPECT($L31, fail, 'AssignmentOpSymbol "%="');
4708
+ var AssignmentOpSymbol$4 = $EXPECT($L32, fail, 'AssignmentOpSymbol "+="');
4709
+ var AssignmentOpSymbol$5 = $EXPECT($L33, fail, 'AssignmentOpSymbol "-="');
4710
+ var AssignmentOpSymbol$6 = $EXPECT($L34, fail, 'AssignmentOpSymbol "<<="');
4711
+ var AssignmentOpSymbol$7 = $EXPECT($L35, fail, 'AssignmentOpSymbol ">>>="');
4712
+ var AssignmentOpSymbol$8 = $EXPECT($L36, fail, 'AssignmentOpSymbol ">>="');
4713
+ var AssignmentOpSymbol$9 = $EXPECT($L37, fail, 'AssignmentOpSymbol "&&="');
4714
+ var AssignmentOpSymbol$10 = $EXPECT($L38, fail, 'AssignmentOpSymbol "&="');
4715
+ var AssignmentOpSymbol$11 = $EXPECT($L39, fail, 'AssignmentOpSymbol "^="');
4716
+ var AssignmentOpSymbol$12 = $EXPECT($L40, fail, 'AssignmentOpSymbol "||="');
4717
+ var AssignmentOpSymbol$13 = $EXPECT($L41, fail, 'AssignmentOpSymbol "|="');
4718
+ var AssignmentOpSymbol$14 = $EXPECT($L42, fail, 'AssignmentOpSymbol "??="');
4719
+ var AssignmentOpSymbol$15 = $T($EXPECT($L43, fail, 'AssignmentOpSymbol "?="'), function(value) {
4689
4720
  return "??=";
4690
4721
  });
4691
- var AssignmentOpSymbol$16 = $EXPECT($L43, fail, 'AssignmentOpSymbol "="');
4692
- var AssignmentOpSymbol$17 = $T($S(CoffeeWordAssignmentEnabled, CoffeeWordAssignmentOp), function(value) {
4693
- return value[1];
4722
+ var AssignmentOpSymbol$16 = $EXPECT($L44, fail, 'AssignmentOpSymbol "="');
4723
+ var AssignmentOpSymbol$17 = $T($S(CoffeeWordAssignmentOp), function(value) {
4724
+ return value[0];
4694
4725
  });
4695
4726
  function AssignmentOpSymbol(state) {
4696
4727
  if (state.events) {
@@ -4710,10 +4741,10 @@ ${input.slice(result.pos)}
4710
4741
  return result;
4711
4742
  }
4712
4743
  }
4713
- var CoffeeWordAssignmentOp$0 = $T($EXPECT($L44, fail, 'CoffeeWordAssignmentOp "and="'), function(value) {
4744
+ var CoffeeWordAssignmentOp$0 = $T($EXPECT($L45, fail, 'CoffeeWordAssignmentOp "and="'), function(value) {
4714
4745
  return "&&=";
4715
4746
  });
4716
- var CoffeeWordAssignmentOp$1 = $T($EXPECT($L45, fail, 'CoffeeWordAssignmentOp "or="'), function(value) {
4747
+ var CoffeeWordAssignmentOp$1 = $T($EXPECT($L46, fail, 'CoffeeWordAssignmentOp "or="'), function(value) {
4717
4748
  return "||=";
4718
4749
  });
4719
4750
  function CoffeeWordAssignmentOp(state) {
@@ -4757,75 +4788,75 @@ ${input.slice(result.pos)}
4757
4788
  return result;
4758
4789
  }
4759
4790
  }
4760
- var BinaryOpSymbol$0 = $EXPECT($L46, fail, 'BinaryOpSymbol "**"');
4761
- var BinaryOpSymbol$1 = $EXPECT($L47, fail, 'BinaryOpSymbol "*"');
4762
- var BinaryOpSymbol$2 = $EXPECT($L48, fail, 'BinaryOpSymbol "/"');
4763
- var BinaryOpSymbol$3 = $EXPECT($L49, fail, 'BinaryOpSymbol "%"');
4764
- var BinaryOpSymbol$4 = $EXPECT($L50, fail, 'BinaryOpSymbol "+"');
4765
- var BinaryOpSymbol$5 = $EXPECT($L51, fail, 'BinaryOpSymbol "-"');
4766
- var BinaryOpSymbol$6 = $EXPECT($L52, fail, 'BinaryOpSymbol "<="');
4767
- var BinaryOpSymbol$7 = $EXPECT($L53, fail, 'BinaryOpSymbol ">="');
4768
- var BinaryOpSymbol$8 = $EXPECT($L54, fail, 'BinaryOpSymbol "<<"');
4791
+ var BinaryOpSymbol$0 = $EXPECT($L47, fail, 'BinaryOpSymbol "**"');
4792
+ var BinaryOpSymbol$1 = $EXPECT($L48, fail, 'BinaryOpSymbol "*"');
4793
+ var BinaryOpSymbol$2 = $EXPECT($L49, fail, 'BinaryOpSymbol "/"');
4794
+ var BinaryOpSymbol$3 = $EXPECT($L50, fail, 'BinaryOpSymbol "%"');
4795
+ var BinaryOpSymbol$4 = $EXPECT($L51, fail, 'BinaryOpSymbol "+"');
4796
+ var BinaryOpSymbol$5 = $EXPECT($L52, fail, 'BinaryOpSymbol "-"');
4797
+ var BinaryOpSymbol$6 = $EXPECT($L53, fail, 'BinaryOpSymbol "<="');
4798
+ var BinaryOpSymbol$7 = $EXPECT($L54, fail, 'BinaryOpSymbol ">="');
4799
+ var BinaryOpSymbol$8 = $EXPECT($L55, fail, 'BinaryOpSymbol "<<"');
4769
4800
  var BinaryOpSymbol$9 = $EXPECT($L4, fail, 'BinaryOpSymbol "<"');
4770
- var BinaryOpSymbol$10 = $EXPECT($L55, fail, 'BinaryOpSymbol ">>>"');
4771
- var BinaryOpSymbol$11 = $EXPECT($L56, fail, 'BinaryOpSymbol ">>"');
4772
- var BinaryOpSymbol$12 = $EXPECT($L57, fail, 'BinaryOpSymbol ">"');
4773
- var BinaryOpSymbol$13 = $EXPECT($L58, fail, 'BinaryOpSymbol "!=="');
4774
- var BinaryOpSymbol$14 = $TV($EXPECT($L59, fail, 'BinaryOpSymbol "!="'), function($skip, $loc, $0, $1) {
4801
+ var BinaryOpSymbol$10 = $EXPECT($L56, fail, 'BinaryOpSymbol ">>>"');
4802
+ var BinaryOpSymbol$11 = $EXPECT($L57, fail, 'BinaryOpSymbol ">>"');
4803
+ var BinaryOpSymbol$12 = $EXPECT($L58, fail, 'BinaryOpSymbol ">"');
4804
+ var BinaryOpSymbol$13 = $EXPECT($L59, fail, 'BinaryOpSymbol "!=="');
4805
+ var BinaryOpSymbol$14 = $TV($EXPECT($L60, fail, 'BinaryOpSymbol "!="'), function($skip, $loc, $0, $1) {
4775
4806
  if (module2.config.coffeeEq)
4776
4807
  return "!==";
4777
4808
  return $1;
4778
4809
  });
4779
- var BinaryOpSymbol$15 = $TS($S($EXPECT($L60, fail, 'BinaryOpSymbol "isnt"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
4810
+ var BinaryOpSymbol$15 = $TS($S($EXPECT($L61, fail, 'BinaryOpSymbol "isnt"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
4780
4811
  if (module2.config.coffeeIsnt)
4781
4812
  return "!==";
4782
4813
  return $skip;
4783
4814
  });
4784
- var BinaryOpSymbol$16 = $T($S($EXPECT($L61, fail, 'BinaryOpSymbol "is"'), NonIdContinue), function(value) {
4815
+ var BinaryOpSymbol$16 = $T($S($EXPECT($L62, fail, 'BinaryOpSymbol "is"'), NonIdContinue), function(value) {
4785
4816
  return "===";
4786
4817
  });
4787
- var BinaryOpSymbol$17 = $EXPECT($L62, fail, 'BinaryOpSymbol "==="');
4788
- var BinaryOpSymbol$18 = $TV($EXPECT($L63, fail, 'BinaryOpSymbol "=="'), function($skip, $loc, $0, $1) {
4818
+ var BinaryOpSymbol$17 = $EXPECT($L63, fail, 'BinaryOpSymbol "==="');
4819
+ var BinaryOpSymbol$18 = $TV($EXPECT($L64, fail, 'BinaryOpSymbol "=="'), function($skip, $loc, $0, $1) {
4789
4820
  if (module2.config.coffeeEq)
4790
4821
  return "===";
4791
4822
  return $1;
4792
4823
  });
4793
- var BinaryOpSymbol$19 = $T($S($EXPECT($L64, fail, 'BinaryOpSymbol "and"'), NonIdContinue), function(value) {
4824
+ var BinaryOpSymbol$19 = $T($S($EXPECT($L65, fail, 'BinaryOpSymbol "and"'), NonIdContinue), function(value) {
4794
4825
  return "&&";
4795
4826
  });
4796
- var BinaryOpSymbol$20 = $EXPECT($L65, fail, 'BinaryOpSymbol "&&"');
4797
- var BinaryOpSymbol$21 = $T($S(CoffeeOfEnabled, $EXPECT($L66, fail, 'BinaryOpSymbol "of"'), NonIdContinue), function(value) {
4827
+ var BinaryOpSymbol$20 = $EXPECT($L66, fail, 'BinaryOpSymbol "&&"');
4828
+ var BinaryOpSymbol$21 = $T($S(CoffeeOfEnabled, $EXPECT($L67, fail, 'BinaryOpSymbol "of"'), NonIdContinue), function(value) {
4798
4829
  return "in";
4799
4830
  });
4800
- var BinaryOpSymbol$22 = $T($S($EXPECT($L67, fail, 'BinaryOpSymbol "or"'), NonIdContinue), function(value) {
4831
+ var BinaryOpSymbol$22 = $T($S($EXPECT($L68, fail, 'BinaryOpSymbol "or"'), NonIdContinue), function(value) {
4801
4832
  return "||";
4802
4833
  });
4803
- var BinaryOpSymbol$23 = $EXPECT($L68, fail, 'BinaryOpSymbol "||"');
4804
- var BinaryOpSymbol$24 = $EXPECT($L69, fail, 'BinaryOpSymbol "??"');
4805
- var BinaryOpSymbol$25 = $T($S(CoffeeBinaryExistentialEnabled, $EXPECT($L70, fail, 'BinaryOpSymbol "?"')), function(value) {
4834
+ var BinaryOpSymbol$23 = $EXPECT($L69, fail, 'BinaryOpSymbol "||"');
4835
+ var BinaryOpSymbol$24 = $EXPECT($L70, fail, 'BinaryOpSymbol "??"');
4836
+ var BinaryOpSymbol$25 = $T($S(CoffeeBinaryExistentialEnabled, $EXPECT($L71, fail, 'BinaryOpSymbol "?"')), function(value) {
4806
4837
  return "??";
4807
4838
  });
4808
- var BinaryOpSymbol$26 = $TS($S($EXPECT($L71, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
4839
+ var BinaryOpSymbol$26 = $TS($S($EXPECT($L72, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
4809
4840
  return $1;
4810
4841
  });
4811
- var BinaryOpSymbol$27 = $TS($S(CoffeeOfEnabled, $EXPECT($L72, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
4842
+ var BinaryOpSymbol$27 = $TS($S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
4812
4843
  return {
4813
4844
  ref: module2.getIndexOfRef(),
4814
4845
  suffix: " >= 0"
4815
4846
  };
4816
4847
  });
4817
- var BinaryOpSymbol$28 = $TS($S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L72, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
4848
+ var BinaryOpSymbol$28 = $TS($S(CoffeeOfEnabled, $EXPECT($L74, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
4818
4849
  return {
4819
4850
  ref: module2.getIndexOfRef(),
4820
4851
  suffix: " < 0"
4821
4852
  };
4822
4853
  });
4823
- var BinaryOpSymbol$29 = $TS($S($EXPECT($L72, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
4854
+ var BinaryOpSymbol$29 = $TS($S($EXPECT($L73, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
4824
4855
  return $1;
4825
4856
  });
4826
- var BinaryOpSymbol$30 = $EXPECT($L74, fail, 'BinaryOpSymbol "&"');
4827
- var BinaryOpSymbol$31 = $EXPECT($L75, fail, 'BinaryOpSymbol "^"');
4828
- var BinaryOpSymbol$32 = $EXPECT($L76, fail, 'BinaryOpSymbol "|"');
4857
+ var BinaryOpSymbol$30 = $EXPECT($L75, fail, 'BinaryOpSymbol "&"');
4858
+ var BinaryOpSymbol$31 = $EXPECT($L76, fail, 'BinaryOpSymbol "^"');
4859
+ var BinaryOpSymbol$32 = $EXPECT($L77, fail, 'BinaryOpSymbol "|"');
4829
4860
  function BinaryOpSymbol(state) {
4830
4861
  if (state.events) {
4831
4862
  const result = state.events.enter?.("BinaryOpSymbol", state);
@@ -4964,7 +4995,7 @@ ${input.slice(result.pos)}
4964
4995
  return result;
4965
4996
  }
4966
4997
  }
4967
- var EmptyStatement$0 = $T($S($Q(TrailingComment), $Y($EXPECT($L77, fail, 'EmptyStatement ";"'))), function(value) {
4998
+ var EmptyStatement$0 = $T($S($Q(TrailingComment), $Y($EXPECT($L78, fail, 'EmptyStatement ";"'))), function(value) {
4968
4999
  return { "type": "EmptyStatement", "children": value[0] };
4969
5000
  });
4970
5001
  function EmptyStatement(state) {
@@ -4985,7 +5016,7 @@ ${input.slice(result.pos)}
4985
5016
  return result;
4986
5017
  }
4987
5018
  }
4988
- var BlockStatement$0 = $T($S(ExplicitBlock, $N($S(__, $EXPECT($L43, fail, 'BlockStatement "="')))), function(value) {
5019
+ var BlockStatement$0 = $T($S(ExplicitBlock, $N($S(__, $EXPECT($L44, fail, 'BlockStatement "="')))), function(value) {
4989
5020
  return value[0];
4990
5021
  });
4991
5022
  function BlockStatement(state) {
@@ -5177,6 +5208,14 @@ ${input.slice(result.pos)}
5177
5208
  }
5178
5209
  var ExpressionBlock$0 = $TS($S(InsertOpenParen, NestedBlockExpressions, InsertNewline, InsertIndent, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5179
5210
  var exps = $2;
5211
+ if (exps.length === 1) {
5212
+ let [ws, exp] = exps[0];
5213
+ switch (exp.type) {
5214
+ case "Identifier":
5215
+ case "Literal":
5216
+ return [ws, exp];
5217
+ }
5218
+ }
5180
5219
  exps = exps.map((e, i) => {
5181
5220
  if (i === exps.length - 1) {
5182
5221
  return e.slice(0, -1);
@@ -5210,6 +5249,14 @@ ${input.slice(result.pos)}
5210
5249
  }
5211
5250
  var ElseExpressionBlock$0 = $TS($S(InsertOpenParen, NestedBlockExpressions, InsertNewline, InsertIndent, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5212
5251
  var exps = $2;
5252
+ if (exps.length === 1) {
5253
+ let [ws, exp] = exps[0];
5254
+ switch (exp.type) {
5255
+ case "Identifier":
5256
+ case "Literal":
5257
+ return [ws, exp];
5258
+ }
5259
+ }
5213
5260
  exps = exps.map((e, i) => {
5214
5261
  if (i === exps.length - 1) {
5215
5262
  return e.slice(0, -1);
@@ -5762,7 +5809,7 @@ ${input.slice(result.pos)}
5762
5809
  return result;
5763
5810
  }
5764
5811
  }
5765
- var CoffeeForDeclaration$0 = $TS($S($E($S(__, $EXPECT($L78, fail, 'CoffeeForDeclaration "own"'))), ForBinding), function($skip, $loc, $0, $1, $2) {
5812
+ var CoffeeForDeclaration$0 = $TS($S($E($S(__, $EXPECT($L79, fail, 'CoffeeForDeclaration "own"'))), ForBinding), function($skip, $loc, $0, $1, $2) {
5766
5813
  var own = $1;
5767
5814
  var binding = $2;
5768
5815
  if (own) {
@@ -6299,7 +6346,7 @@ ${input.slice(result.pos)}
6299
6346
  return result;
6300
6347
  }
6301
6348
  }
6302
- var Finally$0 = $S(__, $EXPECT($L79, fail, 'Finally "finally"'), BracedBlock);
6349
+ var Finally$0 = $S(__, $EXPECT($L80, fail, 'Finally "finally"'), BracedBlock);
6303
6350
  function Finally(state) {
6304
6351
  if (state.events) {
6305
6352
  const result = state.events.enter?.("Finally", state);
@@ -6389,13 +6436,13 @@ ${input.slice(result.pos)}
6389
6436
  return result;
6390
6437
  }
6391
6438
  }
6392
- var KeywordStatement$0 = $T($S($EXPECT($L80, fail, 'KeywordStatement "break"'), NonIdContinue), function(value) {
6439
+ var KeywordStatement$0 = $T($S($EXPECT($L81, fail, 'KeywordStatement "break"'), NonIdContinue), function(value) {
6393
6440
  return { "type": "BreakStatement", "children": value };
6394
6441
  });
6395
- var KeywordStatement$1 = $T($S($EXPECT($L81, fail, 'KeywordStatement "continue"'), NonIdContinue), function(value) {
6442
+ var KeywordStatement$1 = $T($S($EXPECT($L82, fail, 'KeywordStatement "continue"'), NonIdContinue), function(value) {
6396
6443
  return { "type": "ContinueStatement", "children": value };
6397
6444
  });
6398
- var KeywordStatement$2 = $T($S($EXPECT($L82, fail, 'KeywordStatement "debugger"'), NonIdContinue), function(value) {
6445
+ var KeywordStatement$2 = $T($S($EXPECT($L83, fail, 'KeywordStatement "debugger"'), NonIdContinue), function(value) {
6399
6446
  return { "type": "DebuggerStatement", "children": value };
6400
6447
  });
6401
6448
  var KeywordStatement$3 = $T($S(Return, $E(MaybeNestedExpression)), function(value) {
@@ -6422,7 +6469,7 @@ ${input.slice(result.pos)}
6422
6469
  return result;
6423
6470
  }
6424
6471
  }
6425
- var DebuggerExpression$0 = $TS($S($EXPECT($L82, fail, 'DebuggerExpression "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
6472
+ var DebuggerExpression$0 = $TS($S($EXPECT($L83, fail, 'DebuggerExpression "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
6426
6473
  return {
6427
6474
  type: "DebuggerExpression",
6428
6475
  children: ["(()=>{", $1, "})()"]
@@ -6494,7 +6541,7 @@ ${input.slice(result.pos)}
6494
6541
  return result;
6495
6542
  }
6496
6543
  }
6497
- var ImportDeclaration$0 = $T($S($EXPECT($L83, fail, 'ImportDeclaration "import type"'), NonIdContinue, __, ImportClause, __, FromClause), function(value) {
6544
+ var ImportDeclaration$0 = $T($S($EXPECT($L84, fail, 'ImportDeclaration "import type"'), NonIdContinue, __, ImportClause, __, FromClause), function(value) {
6498
6545
  return { "ts": true, "children": value };
6499
6546
  });
6500
6547
  var ImportDeclaration$1 = $S(Import, __, ImportClause, __, FromClause);
@@ -6794,7 +6841,7 @@ ${input.slice(result.pos)}
6794
6841
  return result;
6795
6842
  }
6796
6843
  }
6797
- var ExportDeclaration$0 = $S(Export, __, $EXPECT($L84, fail, 'ExportDeclaration "default"'), NonIdContinue, __, $C(HoistableDeclaration, ClassDeclaration, ExtendedExpression));
6844
+ var ExportDeclaration$0 = $S(Export, __, $EXPECT($L85, fail, 'ExportDeclaration "default"'), NonIdContinue, __, $C(HoistableDeclaration, ClassDeclaration, ExtendedExpression));
6798
6845
  var ExportDeclaration$1 = $S(Export, __, ExportFromClause, __, FromClause);
6799
6846
  var ExportDeclaration$2 = $S(Export, __, $C(NamedExports, VariableStatement, Declaration));
6800
6847
  function ExportDeclaration(state) {
@@ -6979,7 +7026,7 @@ ${input.slice(result.pos)}
6979
7026
  return result;
6980
7027
  }
6981
7028
  }
6982
- var ConstAssignment$0 = $TV($EXPECT($L85, fail, 'ConstAssignment ":="'), function($skip, $loc, $0, $1) {
7029
+ var ConstAssignment$0 = $TV($EXPECT($L86, fail, 'ConstAssignment ":="'), function($skip, $loc, $0, $1) {
6983
7030
  return { $loc, token: "=" };
6984
7031
  });
6985
7032
  function ConstAssignment(state) {
@@ -7538,7 +7585,7 @@ ${input.slice(result.pos)}
7538
7585
  }
7539
7586
  }
7540
7587
  var RegularExpressionLiteral$0 = HeregexLiteral;
7541
- var RegularExpressionLiteral$1 = $TV($TEXT($S($EXPECT($L48, fail, 'RegularExpressionLiteral "/"'), RegularExpressionBody, $EXPECT($L48, fail, 'RegularExpressionLiteral "/"'), RegularExpressionFlags)), function($skip, $loc, $0, $1) {
7588
+ var RegularExpressionLiteral$1 = $TV($TEXT($S($EXPECT($L49, fail, 'RegularExpressionLiteral "/"'), RegularExpressionBody, $EXPECT($L49, fail, 'RegularExpressionLiteral "/"'), RegularExpressionFlags)), function($skip, $loc, $0, $1) {
7542
7589
  return { $loc, token: $1 };
7543
7590
  });
7544
7591
  function RegularExpressionLiteral(state) {
@@ -7883,7 +7930,7 @@ ${input.slice(result.pos)}
7883
7930
  var ReservedWord$0 = $S(CoffeeBooleansEnabled, $R$0($EXPECT($R30, fail, "ReservedWord /(?:on|off|yes|no)(?!\\p{ID_Continue})/")));
7884
7931
  var ReservedWord$1 = $S(CoffeeIsntEnabled, $R$0($EXPECT($R31, fail, "ReservedWord /(?:isnt)(?!\\p{ID_Continue})/")));
7885
7932
  var ReservedWord$2 = $S(CoffeeForLoopsEnabled, $R$0($EXPECT($R32, fail, "ReservedWord /(?:by)(?!\\p{ID_Continue})/")));
7886
- var ReservedWord$3 = $R$0($EXPECT($R33, fail, "ReservedWord /(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|loop|new|null|or|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})/"));
7933
+ var ReservedWord$3 = $R$0($EXPECT($R33, fail, "ReservedWord /(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})/"));
7887
7934
  function ReservedWord(state) {
7888
7935
  if (state.events) {
7889
7936
  const result = state.events.enter?.("ReservedWord", state);
@@ -7983,7 +8030,7 @@ ${input.slice(result.pos)}
7983
8030
  return result;
7984
8031
  }
7985
8032
  }
7986
- var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($L86, fail, 'JSMultiLineComment "/*"'), $Q($S($N($EXPECT($L87, fail, 'JSMultiLineComment "*/"')), $EXPECT($R35, fail, "JSMultiLineComment /./"))), $EXPECT($L87, fail, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
8033
+ var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($L87, fail, 'JSMultiLineComment "/*"'), $Q($S($N($EXPECT($L88, fail, 'JSMultiLineComment "*/"')), $EXPECT($R35, fail, "JSMultiLineComment /./"))), $EXPECT($L88, fail, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
7987
8034
  return { $loc, token: $1 };
7988
8035
  });
7989
8036
  function JSMultiLineComment(state) {
@@ -8025,7 +8072,7 @@ ${input.slice(result.pos)}
8025
8072
  return result;
8026
8073
  }
8027
8074
  }
8028
- var CoffeeMultiLineComment$0 = $TS($S($EXPECT($L88, fail, 'CoffeeMultiLineComment "###"'), $TEXT($Q($S($N($C($EXPECT($L88, fail, 'CoffeeMultiLineComment "###"'), $EXPECT($L87, fail, 'CoffeeMultiLineComment "*/"'))), $EXPECT($R35, fail, "CoffeeMultiLineComment /./")))), $EXPECT($L88, fail, 'CoffeeMultiLineComment "###"')), function($skip, $loc, $0, $1, $2, $3) {
8075
+ var CoffeeMultiLineComment$0 = $TS($S($EXPECT($L89, fail, 'CoffeeMultiLineComment "###"'), $TEXT($Q($S($N($C($EXPECT($L89, fail, 'CoffeeMultiLineComment "###"'), $EXPECT($L88, fail, 'CoffeeMultiLineComment "*/"'))), $EXPECT($R35, fail, "CoffeeMultiLineComment /./")))), $EXPECT($L89, fail, 'CoffeeMultiLineComment "###"')), function($skip, $loc, $0, $1, $2, $3) {
8029
8076
  return { $loc, token: `/*${$2}*/` };
8030
8077
  });
8031
8078
  function CoffeeMultiLineComment(state) {
@@ -8046,7 +8093,7 @@ ${input.slice(result.pos)}
8046
8093
  return result;
8047
8094
  }
8048
8095
  }
8049
- var InlineComment$0 = $TV($TEXT($S($EXPECT($L86, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L87, fail, 'InlineComment "*/"')), $EXPECT($R37, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L87, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
8096
+ var InlineComment$0 = $TV($TEXT($S($EXPECT($L87, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L88, fail, 'InlineComment "*/"')), $EXPECT($R37, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L88, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
8050
8097
  return { $loc, token: $1 };
8051
8098
  });
8052
8099
  function InlineComment(state) {
@@ -8129,7 +8176,7 @@ ${input.slice(result.pos)}
8129
8176
  var NonNewlineWhitespace$0 = $TR($EXPECT($R38, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8130
8177
  return { $loc, token: $0 };
8131
8178
  });
8132
- var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L89, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
8179
+ var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L90, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
8133
8180
  return "";
8134
8181
  });
8135
8182
  function NonNewlineWhitespace(state) {
@@ -8275,7 +8322,7 @@ ${input.slice(result.pos)}
8275
8322
  return result;
8276
8323
  }
8277
8324
  }
8278
- var Ampersand$0 = $TV($EXPECT($L74, fail, 'Ampersand "&"'), function($skip, $loc, $0, $1) {
8325
+ var Ampersand$0 = $TV($EXPECT($L75, fail, 'Ampersand "&"'), function($skip, $loc, $0, $1) {
8279
8326
  return { $loc, token: $1 };
8280
8327
  });
8281
8328
  function Ampersand(state) {
@@ -8296,7 +8343,7 @@ ${input.slice(result.pos)}
8296
8343
  return result;
8297
8344
  }
8298
8345
  }
8299
- var As$0 = $TS($S($EXPECT($L90, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
8346
+ var As$0 = $TS($S($EXPECT($L91, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
8300
8347
  return { $loc, token: $1 };
8301
8348
  });
8302
8349
  function As(state) {
@@ -8317,7 +8364,7 @@ ${input.slice(result.pos)}
8317
8364
  return result;
8318
8365
  }
8319
8366
  }
8320
- var At$0 = $TV($EXPECT($L91, fail, 'At "@"'), function($skip, $loc, $0, $1) {
8367
+ var At$0 = $TV($EXPECT($L92, fail, 'At "@"'), function($skip, $loc, $0, $1) {
8321
8368
  return { $loc, token: $1 };
8322
8369
  });
8323
8370
  function At(state) {
@@ -8338,7 +8385,7 @@ ${input.slice(result.pos)}
8338
8385
  return result;
8339
8386
  }
8340
8387
  }
8341
- var Async$0 = $TV($EXPECT($L92, fail, 'Async "async"'), function($skip, $loc, $0, $1) {
8388
+ var Async$0 = $TV($EXPECT($L93, fail, 'Async "async"'), function($skip, $loc, $0, $1) {
8342
8389
  return { $loc, token: $1 };
8343
8390
  });
8344
8391
  function Async(state) {
@@ -8359,7 +8406,7 @@ ${input.slice(result.pos)}
8359
8406
  return result;
8360
8407
  }
8361
8408
  }
8362
- var Await$0 = $TS($S($EXPECT($L93, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
8409
+ var Await$0 = $TS($S($EXPECT($L94, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
8363
8410
  return { $loc, token: $1 };
8364
8411
  });
8365
8412
  function Await(state) {
@@ -8380,7 +8427,7 @@ ${input.slice(result.pos)}
8380
8427
  return result;
8381
8428
  }
8382
8429
  }
8383
- var Backtick$0 = $TV($EXPECT($L94, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
8430
+ var Backtick$0 = $TV($EXPECT($L95, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
8384
8431
  return { $loc, token: $1 };
8385
8432
  });
8386
8433
  function Backtick(state) {
@@ -8401,7 +8448,7 @@ ${input.slice(result.pos)}
8401
8448
  return result;
8402
8449
  }
8403
8450
  }
8404
- var By$0 = $TS($S($EXPECT($L95, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
8451
+ var By$0 = $TS($S($EXPECT($L96, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
8405
8452
  return { $loc, token: $1 };
8406
8453
  });
8407
8454
  function By(state) {
@@ -8422,7 +8469,7 @@ ${input.slice(result.pos)}
8422
8469
  return result;
8423
8470
  }
8424
8471
  }
8425
- var Case$0 = $TS($S($EXPECT($L96, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
8472
+ var Case$0 = $TS($S($EXPECT($L97, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
8426
8473
  return { $loc, token: $1 };
8427
8474
  });
8428
8475
  function Case(state) {
@@ -8443,7 +8490,7 @@ ${input.slice(result.pos)}
8443
8490
  return result;
8444
8491
  }
8445
8492
  }
8446
- var Catch$0 = $TV($EXPECT($L97, fail, 'Catch "catch"'), function($skip, $loc, $0, $1) {
8493
+ var Catch$0 = $TV($EXPECT($L98, fail, 'Catch "catch"'), function($skip, $loc, $0, $1) {
8447
8494
  return { $loc, token: $1 };
8448
8495
  });
8449
8496
  function Catch(state) {
@@ -8464,7 +8511,7 @@ ${input.slice(result.pos)}
8464
8511
  return result;
8465
8512
  }
8466
8513
  }
8467
- var Class$0 = $TV($EXPECT($L98, fail, 'Class "class"'), function($skip, $loc, $0, $1) {
8514
+ var Class$0 = $TV($EXPECT($L99, fail, 'Class "class"'), function($skip, $loc, $0, $1) {
8468
8515
  return { $loc, token: $1 };
8469
8516
  });
8470
8517
  function Class(state) {
@@ -8485,7 +8532,7 @@ ${input.slice(result.pos)}
8485
8532
  return result;
8486
8533
  }
8487
8534
  }
8488
- var CloseBrace$0 = $TV($EXPECT($L26, fail, 'CloseBrace "}"'), function($skip, $loc, $0, $1) {
8535
+ var CloseBrace$0 = $TV($EXPECT($L27, fail, 'CloseBrace "}"'), function($skip, $loc, $0, $1) {
8489
8536
  return { $loc, token: $1 };
8490
8537
  });
8491
8538
  function CloseBrace(state) {
@@ -8548,7 +8595,7 @@ ${input.slice(result.pos)}
8548
8595
  return result;
8549
8596
  }
8550
8597
  }
8551
- var CoffeeSubstitutionStart$0 = $TV($EXPECT($L99, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
8598
+ var CoffeeSubstitutionStart$0 = $TV($EXPECT($L100, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
8552
8599
  return { $loc, token: "${" };
8553
8600
  });
8554
8601
  function CoffeeSubstitutionStart(state) {
@@ -8569,7 +8616,7 @@ ${input.slice(result.pos)}
8569
8616
  return result;
8570
8617
  }
8571
8618
  }
8572
- var Colon$0 = $TV($EXPECT($L100, fail, 'Colon ":"'), function($skip, $loc, $0, $1) {
8619
+ var Colon$0 = $TV($EXPECT($L26, fail, 'Colon ":"'), function($skip, $loc, $0, $1) {
8573
8620
  return { $loc, token: $1 };
8574
8621
  });
8575
8622
  function Colon(state) {
@@ -8590,7 +8637,7 @@ ${input.slice(result.pos)}
8590
8637
  return result;
8591
8638
  }
8592
8639
  }
8593
- var ConstructorShorthand$0 = $TV($EXPECT($L91, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
8640
+ var ConstructorShorthand$0 = $TV($EXPECT($L92, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
8594
8641
  return { $loc, token: "constructor" };
8595
8642
  });
8596
8643
  function ConstructorShorthand(state) {
@@ -8611,7 +8658,7 @@ ${input.slice(result.pos)}
8611
8658
  return result;
8612
8659
  }
8613
8660
  }
8614
- var Default$0 = $TS($S($EXPECT($L84, fail, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
8661
+ var Default$0 = $TS($S($EXPECT($L85, fail, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
8615
8662
  return { $loc, token: $1 };
8616
8663
  });
8617
8664
  function Default(state) {
@@ -8800,7 +8847,7 @@ ${input.slice(result.pos)}
8800
8847
  return result;
8801
8848
  }
8802
8849
  }
8803
- var Equals$0 = $TV($EXPECT($L43, fail, 'Equals "="'), function($skip, $loc, $0, $1) {
8850
+ var Equals$0 = $TV($EXPECT($L44, fail, 'Equals "="'), function($skip, $loc, $0, $1) {
8804
8851
  return { $loc, token: $1 };
8805
8852
  });
8806
8853
  function Equals(state) {
@@ -8968,7 +9015,7 @@ ${input.slice(result.pos)}
8968
9015
  return result;
8969
9016
  }
8970
9017
  }
8971
- var In$0 = $TV($EXPECT($L72, fail, 'In "in"'), function($skip, $loc, $0, $1) {
9018
+ var In$0 = $TV($EXPECT($L73, fail, 'In "in"'), function($skip, $loc, $0, $1) {
8972
9019
  return { $loc, token: $1 };
8973
9020
  });
8974
9021
  function In(state) {
@@ -9052,7 +9099,7 @@ ${input.slice(result.pos)}
9052
9099
  return result;
9053
9100
  }
9054
9101
  }
9055
- var Not$0 = $TS($S(CoffeeNotEnabled, $EXPECT($L73, fail, 'Not "not"'), NonIdContinue, $E($EXPECT($L3, fail, 'Not " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
9102
+ var Not$0 = $TS($S(CoffeeNotEnabled, $EXPECT($L74, fail, 'Not "not"'), NonIdContinue, $E($EXPECT($L3, fail, 'Not " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
9056
9103
  return { $loc, token: "!" };
9057
9104
  });
9058
9105
  function Not(state) {
@@ -9073,7 +9120,7 @@ ${input.slice(result.pos)}
9073
9120
  return result;
9074
9121
  }
9075
9122
  }
9076
- var Of$0 = $TV($EXPECT($L66, fail, 'Of "of"'), function($skip, $loc, $0, $1) {
9123
+ var Of$0 = $TV($EXPECT($L67, fail, 'Of "of"'), function($skip, $loc, $0, $1) {
9077
9124
  return { $loc, token: $1 };
9078
9125
  });
9079
9126
  function Of(state) {
@@ -9157,7 +9204,7 @@ ${input.slice(result.pos)}
9157
9204
  return result;
9158
9205
  }
9159
9206
  }
9160
- var QuestionMark$0 = $TV($EXPECT($L70, fail, 'QuestionMark "?"'), function($skip, $loc, $0, $1) {
9207
+ var QuestionMark$0 = $TV($EXPECT($L71, fail, 'QuestionMark "?"'), function($skip, $loc, $0, $1) {
9161
9208
  return { $loc, token: $1 };
9162
9209
  });
9163
9210
  function QuestionMark(state) {
@@ -9199,7 +9246,7 @@ ${input.slice(result.pos)}
9199
9246
  return result;
9200
9247
  }
9201
9248
  }
9202
- var Semicolon$0 = $TV($EXPECT($L77, fail, 'Semicolon ";"'), function($skip, $loc, $0, $1) {
9249
+ var Semicolon$0 = $TV($EXPECT($L78, fail, 'Semicolon ";"'), function($skip, $loc, $0, $1) {
9203
9250
  return { $loc, token: $1 };
9204
9251
  });
9205
9252
  function Semicolon(state) {
@@ -9241,7 +9288,7 @@ ${input.slice(result.pos)}
9241
9288
  return result;
9242
9289
  }
9243
9290
  }
9244
- var Star$0 = $TV($EXPECT($L47, fail, 'Star "*"'), function($skip, $loc, $0, $1) {
9291
+ var Star$0 = $TV($EXPECT($L48, fail, 'Star "*"'), function($skip, $loc, $0, $1) {
9245
9292
  return { $loc, token: $1 };
9246
9293
  });
9247
9294
  function Star(state) {
@@ -9265,7 +9312,7 @@ ${input.slice(result.pos)}
9265
9312
  var Static$0 = $TV($EXPECT($L124, fail, 'Static "static"'), function($skip, $loc, $0, $1) {
9266
9313
  return { $loc, token: $1 };
9267
9314
  });
9268
- var Static$1 = $TS($S($EXPECT($L91, fail, 'Static "@"'), $N($EXPECT($L121, fail, 'Static "("'))), function($skip, $loc, $0, $1, $2) {
9315
+ var Static$1 = $TS($S($EXPECT($L92, fail, 'Static "@"'), $N($EXPECT($L121, fail, 'Static "("'))), function($skip, $loc, $0, $1, $2) {
9269
9316
  return { $loc, token: "static " };
9270
9317
  });
9271
9318
  function Static(state) {
@@ -9708,7 +9755,7 @@ ${input.slice(result.pos)}
9708
9755
  return result;
9709
9756
  }
9710
9757
  }
9711
- var JSXOpeningElement$0 = $S($EXPECT($L4, fail, 'JSXOpeningElement "<"'), $TEXT(JSXElementName), $E(JSXAttributes), __, $EXPECT($L57, fail, 'JSXOpeningElement ">"'));
9758
+ var JSXOpeningElement$0 = $S($EXPECT($L4, fail, 'JSXOpeningElement "<"'), $TEXT(JSXElementName), $E(JSXAttributes), __, $EXPECT($L58, fail, 'JSXOpeningElement ">"'));
9712
9759
  function JSXOpeningElement(state) {
9713
9760
  if (state.events) {
9714
9761
  const result = state.events.enter?.("JSXOpeningElement", state);
@@ -9727,7 +9774,7 @@ ${input.slice(result.pos)}
9727
9774
  return result;
9728
9775
  }
9729
9776
  }
9730
- var JSXClosingElement$0 = $S($EXPECT($L144, fail, 'JSXClosingElement "</"'), __, $TEXT(JSXElementName), __, $EXPECT($L57, fail, 'JSXClosingElement ">"'));
9777
+ var JSXClosingElement$0 = $S($EXPECT($L144, fail, 'JSXClosingElement "</"'), __, $TEXT(JSXElementName), __, $EXPECT($L58, fail, 'JSXClosingElement ">"'));
9731
9778
  function JSXClosingElement(state) {
9732
9779
  if (state.events) {
9733
9780
  const result = state.events.enter?.("JSXClosingElement", state);
@@ -10361,7 +10408,7 @@ ${input.slice(result.pos)}
10361
10408
  return result;
10362
10409
  }
10363
10410
  }
10364
- var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($L61, fail, 'TypePredicate "is"'), NonIdContinue, Type))), function($skip, $loc, $0, $1, $2) {
10411
+ var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($L62, fail, 'TypePredicate "is"'), NonIdContinue, Type))), function($skip, $loc, $0, $1, $2) {
10365
10412
  if (!$2)
10366
10413
  return $1;
10367
10414
  return $0;
@@ -10661,10 +10708,10 @@ ${input.slice(result.pos)}
10661
10708
  return result;
10662
10709
  }
10663
10710
  }
10664
- var TypeBinaryOp$0 = $TV($EXPECT($L76, fail, 'TypeBinaryOp "|"'), function($skip, $loc, $0, $1) {
10711
+ var TypeBinaryOp$0 = $TV($EXPECT($L77, fail, 'TypeBinaryOp "|"'), function($skip, $loc, $0, $1) {
10665
10712
  return { $loc, token: "|" };
10666
10713
  });
10667
- var TypeBinaryOp$1 = $TV($EXPECT($L74, fail, 'TypeBinaryOp "&"'), function($skip, $loc, $0, $1) {
10714
+ var TypeBinaryOp$1 = $TV($EXPECT($L75, fail, 'TypeBinaryOp "&"'), function($skip, $loc, $0, $1) {
10668
10715
  return { $loc, token: "&" };
10669
10716
  });
10670
10717
  function TypeBinaryOp(state) {
@@ -10704,7 +10751,7 @@ ${input.slice(result.pos)}
10704
10751
  return result;
10705
10752
  }
10706
10753
  }
10707
- var TypeArguments$0 = $S(__, $EXPECT($L4, fail, 'TypeArguments "<"'), __, Type, $Q($S(__, Comma, __, Type)), $E($S(__, Comma)), __, $EXPECT($L57, fail, 'TypeArguments ">"'));
10754
+ var TypeArguments$0 = $S(__, $EXPECT($L4, fail, 'TypeArguments "<"'), __, Type, $Q($S(__, Comma, __, Type)), $E($S(__, Comma)), __, $EXPECT($L58, fail, 'TypeArguments ">"'));
10708
10755
  function TypeArguments(state) {
10709
10756
  if (state.events) {
10710
10757
  const result = state.events.enter?.("TypeArguments", state);
@@ -10723,7 +10770,7 @@ ${input.slice(result.pos)}
10723
10770
  return result;
10724
10771
  }
10725
10772
  }
10726
- var TypeParameters$0 = $TS($S(__, $EXPECT($L4, fail, 'TypeParameters "<"'), __, Type, $Q($S(__, Comma, __, Type)), $E($S(__, Comma)), __, $EXPECT($L57, fail, 'TypeParameters ">"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
10773
+ var TypeParameters$0 = $TS($S(__, $EXPECT($L4, fail, 'TypeParameters "<"'), __, Type, $Q($S(__, Comma, __, Type)), $E($S(__, Comma)), __, $EXPECT($L58, fail, 'TypeParameters ">"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
10727
10774
  return { ts: true, children: $0 };
10728
10775
  });
10729
10776
  function TypeParameters(state) {
@@ -10783,8 +10830,8 @@ ${input.slice(result.pos)}
10783
10830
  }
10784
10831
  }
10785
10832
  var TypeParameterDelimiter$0 = $S($Q(_), Comma);
10786
- var TypeParameterDelimiter$1 = $Y($S($Q(_), $EXPECT($L57, fail, 'TypeParameterDelimiter ">"')));
10787
- var TypeParameterDelimiter$2 = $TV($Y($S(__, $EXPECT($L57, fail, 'TypeParameterDelimiter ">"'))), function($skip, $loc, $0, $1) {
10833
+ var TypeParameterDelimiter$1 = $Y($S($Q(_), $EXPECT($L58, fail, 'TypeParameterDelimiter ">"')));
10834
+ var TypeParameterDelimiter$2 = $TV($Y($S(__, $EXPECT($L58, fail, 'TypeParameterDelimiter ">"'))), function($skip, $loc, $0, $1) {
10788
10835
  return { $loc, token: "," };
10789
10836
  });
10790
10837
  var TypeParameterDelimiter$3 = $TV($Y(EOS), function($skip, $loc, $0, $1) {
@@ -11490,29 +11537,6 @@ ${input.slice(result.pos)}
11490
11537
  return result;
11491
11538
  }
11492
11539
  }
11493
- var CoffeeWordAssignmentEnabled$0 = $TV($EXPECT($L14, fail, 'CoffeeWordAssignmentEnabled ""'), function($skip, $loc, $0, $1) {
11494
- if (module2.config.coffeeWordAssignment)
11495
- return;
11496
- return $skip;
11497
- });
11498
- function CoffeeWordAssignmentEnabled(state) {
11499
- if (state.events) {
11500
- const result = state.events.enter?.("CoffeeWordAssignmentEnabled", state);
11501
- if (result)
11502
- return result.cache;
11503
- }
11504
- if (state.tokenize) {
11505
- const result = $TOKEN("CoffeeWordAssignmentEnabled", state, CoffeeWordAssignmentEnabled$0(state));
11506
- if (state.events)
11507
- state.events.exit?.("CoffeeWordAssignmentEnabled", state, result);
11508
- return result;
11509
- } else {
11510
- const result = CoffeeWordAssignmentEnabled$0(state);
11511
- if (state.events)
11512
- state.events.exit?.("CoffeeWordAssignmentEnabled", state, result);
11513
- return result;
11514
- }
11515
- }
11516
11540
  var Reset$0 = $TV($EXPECT($L14, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
11517
11541
  module2.indentLevels = [{
11518
11542
  level: 0,
@@ -11543,7 +11567,6 @@ ${input.slice(result.pos)}
11543
11567
  coffeeLineContinuation: false,
11544
11568
  coffeeNot: false,
11545
11569
  coffeeOf: false,
11546
- coffeeWordAssignment: false,
11547
11570
  implicitReturns: true
11548
11571
  };
11549
11572
  let indexOfRef, hasPropRef;
@@ -11600,7 +11623,6 @@ ${input.slice(result.pos)}
11600
11623
  this.coffeeLineContinuation = true;
11601
11624
  this.coffeeNot = true;
11602
11625
  this.coffeeOf = true;
11603
- this.coffeeWordAssignment = true;
11604
11626
  } else {
11605
11627
  this.autoVar = false;
11606
11628
  this.coffeeBinaryExistential = false;
@@ -11615,7 +11637,6 @@ ${input.slice(result.pos)}
11615
11637
  this.coffeeLineContinuation = false;
11616
11638
  this.coffeeNot = false;
11617
11639
  this.coffeeOf = false;
11618
- this.coffeeWordAssignment = false;
11619
11640
  }
11620
11641
  }
11621
11642
  });
@@ -11650,11 +11671,11 @@ ${input.slice(result.pos)}
11650
11671
  });
11651
11672
  module2.expressionizeIfClause = function(clause, b, e) {
11652
11673
  const children = clause.children.slice(1);
11653
- children.push("?", b, ":");
11674
+ children.push("?", b);
11654
11675
  if (e) {
11655
- children.push(e[0], ...e.slice(2));
11676
+ children.push(e[0], ":", ...e.slice(2));
11656
11677
  } else {
11657
- children.push("void 0");
11678
+ children.push(":void 0");
11658
11679
  }
11659
11680
  return {
11660
11681
  type: "IfExpression",
@@ -12031,6 +12052,14 @@ ${input.slice(result.pos)}
12031
12052
  token: str
12032
12053
  };
12033
12054
  };
12055
+ module2.reorderBindingRestProperty = function(rest, after) {
12056
+ if (after.length) {
12057
+ const [restDelim] = rest.children.slice(-1), lastAfterProp = after[after.length - 1], lastAfterChildren = lastAfterProp.children, [lastDelim] = lastAfterChildren.slice(-1);
12058
+ rest = { ...rest, children: [...rest.children.slice(0, -1), lastDelim] };
12059
+ after = [...after.slice(0, -1), { ...lastAfterProp, children: [...lastAfterChildren.slice(0, -1), restDelim] }];
12060
+ }
12061
+ return [rest, after];
12062
+ };
12034
12063
  function gatherNodes(node, predicate) {
12035
12064
  if (node == null)
12036
12065
  return [];
@@ -12139,7 +12168,79 @@ ${input.slice(result.pos)}
12139
12168
  });
12140
12169
  }
12141
12170
  }
12171
+ function processAssignments(statements) {
12172
+ gatherRecursiveAll(statements, (n) => n.type === "AssignmentExpression" && n.names === null).forEach((exp) => {
12173
+ let $02 = exp.children, [$12, $22] = $02, tail = [], i = 0, len = $12.length;
12174
+ let wrapped = false;
12175
+ while (i < len) {
12176
+ const lastAssignment = $12[i++];
12177
+ const [, lhs, , op] = lastAssignment;
12178
+ if (op.token !== "=")
12179
+ continue;
12180
+ if (lhs.type === "ObjectExpression") {
12181
+ const spreadIndex = lhs.children.findIndex((child) => child.type === "SpreadProperty"), hasSpread = spreadIndex >= 0;
12182
+ if (hasSpread) {
12183
+ const len2 = lhs.children.length, after = lhs.children.splice(spreadIndex + 1, len2 - spreadIndex - 2);
12184
+ if (after.length) {
12185
+ if (after.some((child) => child.type === "SpreadProperty")) {
12186
+ throw new Error("Cannot have multiple spread properties in object destructuring");
12187
+ }
12188
+ debugger;
12189
+ const lastAfterChildren = after[after.length - 1].children, afterDelimiter = lastAfterChildren.pop(), spread = lhs.children[spreadIndex], spreadDelimiter = spread.children.pop();
12190
+ spread.children.push(afterDelimiter);
12191
+ lastAfterChildren.push(spreadDelimiter);
12192
+ lhs.children.splice(spreadIndex, 0, ...after);
12193
+ }
12194
+ }
12195
+ if (!wrapped) {
12196
+ wrapped = true;
12197
+ lhs.children.splice(0, 0, "(");
12198
+ tail.push(")");
12199
+ }
12200
+ }
12201
+ }
12202
+ i = len - 1;
12203
+ while (i >= 0) {
12204
+ const lastAssignment = $12[i];
12205
+ if (lastAssignment[3].token === "=") {
12206
+ const lhs = lastAssignment[1];
12207
+ if (Array.isArray(lhs) && lhs.length > 1) {
12208
+ const props = lhs[lhs.length - 1];
12209
+ if (Array.isArray(props)) {
12210
+ const lastProp = props[props.length - 1];
12211
+ if (lastProp.type === "SliceExpression") {
12212
+ const { start, end, children: c } = lastProp;
12213
+ c[0].token = ".splice(";
12214
+ c[1] = start;
12215
+ c[2] = ", ";
12216
+ if (end)
12217
+ c[3] = [end, " - ", start];
12218
+ else
12219
+ c[3] = ["1/0"];
12220
+ c[4] = [", ...", $22];
12221
+ c[5] = ")";
12222
+ lastAssignment.pop();
12223
+ if (module2.isWhitespaceOrEmpty(lastAssignment[2]))
12224
+ lastAssignment.pop();
12225
+ if ($12.length > 1) {
12226
+ throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
12227
+ }
12228
+ exp.children = [$12];
12229
+ exp.names = [];
12230
+ return;
12231
+ }
12232
+ }
12233
+ }
12234
+ }
12235
+ i--;
12236
+ }
12237
+ const names = $12.flatMap(([, l]) => l.names || []);
12238
+ exp.children = [$12, $22, ...tail];
12239
+ exp.names = names;
12240
+ });
12241
+ }
12142
12242
  module2.processProgram = function(statements) {
12243
+ processAssignments(statements);
12143
12244
  processFunctions(statements);
12144
12245
  processSwitchExpressions(statements);
12145
12246
  gatherRecursiveAll(statements, (n) => n.type === "IterationExpression").forEach((e) => expressionizeIteration(e));
@@ -12952,6 +13053,7 @@ makeCache = function() {
12952
13053
  case "AssignmentExpression":
12953
13054
  case "ExtendedExpression":
12954
13055
  case "Expression":
13056
+ case "MemberExpressionRest":
12955
13057
  case "ElseClause":
12956
13058
  case "CoffeeCommentEnabled":
12957
13059
  case "SingleLineComment":