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