@danielx/civet 0.5.56 → 0.5.58

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
@@ -521,6 +521,8 @@ ${input.slice(result.pos)}
521
521
  BindingPropertyList,
522
522
  ArrayBindingPattern,
523
523
  ArrayBindingPatternContent,
524
+ BindingElementList,
525
+ NestedBindingElementList,
524
526
  Elision,
525
527
  NestedBindingProperties,
526
528
  NestedBindingPropertyList,
@@ -531,9 +533,26 @@ ${input.slice(result.pos)}
531
533
  BindingElement,
532
534
  BindingRestElement,
533
535
  EmptyBindingPattern,
536
+ MatchingPattern,
537
+ ObjectMatchingPattern,
538
+ ObjectMatchingPatternContent,
539
+ NestedMatchingProperties,
540
+ MatchingPropertyList,
541
+ NestedMatchingPropertyList,
542
+ MatchingProperty,
543
+ MatchingRestProperty,
544
+ ArrayMatchingPattern,
545
+ ArrayMatchingPatternContent,
546
+ NestedMatchingElements,
547
+ MatchingElementList,
548
+ NestedMatchingElementList,
549
+ MatchingElement,
550
+ MatchingRestElement,
534
551
  FunctionDeclaration,
535
552
  FunctionSignature,
536
553
  FunctionExpression,
554
+ OperatorDeclaration,
555
+ OperatorSignature,
537
556
  AmpersandBlockRHS,
538
557
  AmpersandUnaryPrefix,
539
558
  ThinArrowFunction,
@@ -544,6 +563,7 @@ ${input.slice(result.pos)}
544
563
  ThenClause,
545
564
  BracedOrEmptyBlock,
546
565
  EmptyBlock,
566
+ EmptyBareBlock,
547
567
  BracedBlock,
548
568
  SingleLineStatements,
549
569
  BracedContent,
@@ -554,7 +574,6 @@ ${input.slice(result.pos)}
554
574
  NullLiteral,
555
575
  BooleanLiteral,
556
576
  CoffeeScriptBooleanLiteral,
557
- Comma,
558
577
  Identifier,
559
578
  IdentifierName,
560
579
  IdentifierReference,
@@ -641,7 +660,6 @@ ${input.slice(result.pos)}
641
660
  NestedCaseClause,
642
661
  CaseClause,
643
662
  CaseExpressionList,
644
- NoExpressions,
645
663
  ImpliedColon,
646
664
  TryStatement,
647
665
  TryExpression,
@@ -704,7 +722,6 @@ ${input.slice(result.pos)}
704
722
  IntegerLiteralKind,
705
723
  DecimalIntegerLiteral,
706
724
  StringLiteral,
707
- BasicStringLiteral,
708
725
  DoubleStringCharacters,
709
726
  SingleStringCharacters,
710
727
  TripleDoubleStringCharacters,
@@ -766,6 +783,7 @@ ${input.slice(result.pos)}
766
783
  CloseParen,
767
784
  CoffeeSubstitutionStart,
768
785
  Colon,
786
+ Comma,
769
787
  ConstructorShorthand,
770
788
  Declare,
771
789
  Default,
@@ -796,6 +814,7 @@ ${input.slice(result.pos)}
796
814
  OpenBrace,
797
815
  OpenBracket,
798
816
  OpenParen,
817
+ Operator,
799
818
  Public,
800
819
  Private,
801
820
  Protected,
@@ -937,6 +956,8 @@ ${input.slice(result.pos)}
937
956
  InsertOpenBrace,
938
957
  InsertInlineOpenBrace,
939
958
  InsertCloseBrace,
959
+ InsertOpenBracket,
960
+ InsertCloseBracket,
940
961
  InsertComma,
941
962
  InsertConst,
942
963
  InsertLet,
@@ -972,33 +993,33 @@ ${input.slice(result.pos)}
972
993
  Nested
973
994
  });
974
995
  var $L0 = $L("/ ");
975
- var $L1 = $L("?");
976
- var $L2 = $L(".");
977
- var $L3 = $L("++");
978
- var $L4 = $L("--");
979
- var $L5 = $L("=>");
980
- var $L6 = $L(" ");
981
- var $L7 = $L("implements");
982
- var $L8 = $L("<:");
983
- var $L9 = $L("#");
984
- var $L10 = $L("super");
985
- var $L11 = $L("import");
986
- var $L12 = $L("!");
987
- var $L13 = $L("-");
988
- var $L14 = $L("super[");
989
- var $L15 = $L("import.meta");
990
- var $L16 = $L("");
991
- var $L17 = $L(")");
992
- var $L18 = $L("->");
993
- var $L19 = $L("}");
994
- var $L20 = $L("null");
995
- var $L21 = $L("true");
996
- var $L22 = $L("false");
997
- var $L23 = $L("yes");
998
- var $L24 = $L("on");
999
- var $L25 = $L("no");
1000
- var $L26 = $L("off");
1001
- var $L27 = $L(",");
996
+ var $L1 = $L("(");
997
+ var $L2 = $L("?");
998
+ var $L3 = $L(".");
999
+ var $L4 = $L("++");
1000
+ var $L5 = $L("--");
1001
+ var $L6 = $L("=>");
1002
+ var $L7 = $L(" ");
1003
+ var $L8 = $L("implements");
1004
+ var $L9 = $L("<:");
1005
+ var $L10 = $L("#");
1006
+ var $L11 = $L("super");
1007
+ var $L12 = $L("import");
1008
+ var $L13 = $L("!");
1009
+ var $L14 = $L("-");
1010
+ var $L15 = $L("super[");
1011
+ var $L16 = $L("import.meta");
1012
+ var $L17 = $L("");
1013
+ var $L18 = $L(")");
1014
+ var $L19 = $L("->");
1015
+ var $L20 = $L("}");
1016
+ var $L21 = $L("null");
1017
+ var $L22 = $L("true");
1018
+ var $L23 = $L("false");
1019
+ var $L24 = $L("yes");
1020
+ var $L25 = $L("on");
1021
+ var $L26 = $L("no");
1022
+ var $L27 = $L("off");
1002
1023
  var $L28 = $L("=");
1003
1024
  var $L29 = $L(">");
1004
1025
  var $L30 = $L("]");
@@ -1021,32 +1042,32 @@ ${input.slice(result.pos)}
1021
1042
  var $L47 = $L("?=");
1022
1043
  var $L48 = $L("and=");
1023
1044
  var $L49 = $L("or=");
1024
- var $L50 = $L("**");
1025
- var $L51 = $L("*");
1026
- var $L52 = $L("/");
1027
- var $L53 = $L("%%");
1028
- var $L54 = $L("%");
1029
- var $L55 = $L("+");
1030
- var $L56 = $L("<=");
1031
- var $L57 = $L(">=");
1032
- var $L58 = $L("<?");
1033
- var $L59 = $L("!<?");
1034
- var $L60 = $L("<<");
1035
- var $L61 = $L(">>>");
1036
- var $L62 = $L(">>");
1037
- var $L63 = $L("!==");
1038
- var $L64 = $L("!=");
1039
- var $L65 = $L("isnt");
1040
- var $L66 = $L("===");
1041
- var $L67 = $L("==");
1042
- var $L68 = $L("and");
1043
- var $L69 = $L("&&");
1044
- var $L70 = $L("of");
1045
- var $L71 = $L("or");
1046
- var $L72 = $L("||");
1047
- var $L73 = $L("??");
1048
- var $L74 = $L("instanceof");
1049
- var $L75 = $L("not");
1045
+ var $L50 = $L("not");
1046
+ var $L51 = $L("**");
1047
+ var $L52 = $L("*");
1048
+ var $L53 = $L("/");
1049
+ var $L54 = $L("%%");
1050
+ var $L55 = $L("%");
1051
+ var $L56 = $L("+");
1052
+ var $L57 = $L("<=");
1053
+ var $L58 = $L(">=");
1054
+ var $L59 = $L("<?");
1055
+ var $L60 = $L("!<?");
1056
+ var $L61 = $L("<<");
1057
+ var $L62 = $L(">>>");
1058
+ var $L63 = $L(">>");
1059
+ var $L64 = $L("!==");
1060
+ var $L65 = $L("!=");
1061
+ var $L66 = $L("isnt");
1062
+ var $L67 = $L("===");
1063
+ var $L68 = $L("==");
1064
+ var $L69 = $L("and");
1065
+ var $L70 = $L("&&");
1066
+ var $L71 = $L("of");
1067
+ var $L72 = $L("or");
1068
+ var $L73 = $L("||");
1069
+ var $L74 = $L("??");
1070
+ var $L75 = $L("instanceof");
1050
1071
  var $L76 = $L("in");
1051
1072
  var $L77 = $L("is");
1052
1073
  var $L78 = $L("&");
@@ -1064,20 +1085,20 @@ ${input.slice(result.pos)}
1064
1085
  var $L90 = $L("/*");
1065
1086
  var $L91 = $L("*/");
1066
1087
  var $L92 = $L("\\");
1067
- var $L93 = $L("(");
1068
- var $L94 = $L("[");
1069
- var $L95 = $L("`");
1070
- var $L96 = $L("abstract");
1071
- var $L97 = $L("as");
1072
- var $L98 = $L("@");
1073
- var $L99 = $L("@@");
1074
- var $L100 = $L("async");
1075
- var $L101 = $L("await");
1076
- var $L102 = $L("by");
1077
- var $L103 = $L("case");
1078
- var $L104 = $L("catch");
1079
- var $L105 = $L("class");
1080
- var $L106 = $L("#{");
1088
+ var $L93 = $L("[");
1089
+ var $L94 = $L("`");
1090
+ var $L95 = $L("abstract");
1091
+ var $L96 = $L("as");
1092
+ var $L97 = $L("@");
1093
+ var $L98 = $L("@@");
1094
+ var $L99 = $L("async");
1095
+ var $L100 = $L("await");
1096
+ var $L101 = $L("by");
1097
+ var $L102 = $L("case");
1098
+ var $L103 = $L("catch");
1099
+ var $L104 = $L("class");
1100
+ var $L105 = $L("#{");
1101
+ var $L106 = $L(",");
1081
1102
  var $L107 = $L("declare");
1082
1103
  var $L108 = $L("default");
1083
1104
  var $L109 = $L("delete");
@@ -1101,48 +1122,49 @@ ${input.slice(result.pos)}
1101
1122
  var $L127 = $L("new");
1102
1123
  var $L128 = $L("<");
1103
1124
  var $L129 = $L("{");
1104
- var $L130 = $L("public");
1105
- var $L131 = $L("private");
1106
- var $L132 = $L("protected");
1107
- var $L133 = $L("|>");
1108
- var $L134 = $L("readonly");
1109
- var $L135 = $L("return");
1110
- var $L136 = $L("satisfies");
1111
- var $L137 = $L("'");
1112
- var $L138 = $L("static");
1113
- var $L139 = $L("${");
1114
- var $L140 = $L("switch");
1115
- var $L141 = $L("target");
1116
- var $L142 = $L("then");
1117
- var $L143 = $L("this");
1118
- var $L144 = $L("throw");
1119
- var $L145 = $L('"""');
1120
- var $L146 = $L("'''");
1121
- var $L147 = $L("///");
1122
- var $L148 = $L("```");
1123
- var $L149 = $L("try");
1124
- var $L150 = $L("typeof");
1125
- var $L151 = $L("unless");
1126
- var $L152 = $L("until");
1127
- var $L153 = $L("var");
1128
- var $L154 = $L("void");
1129
- var $L155 = $L("when");
1130
- var $L156 = $L("while");
1131
- var $L157 = $L("yield");
1132
- var $L158 = $L("/>");
1133
- var $L159 = $L("</");
1134
- var $L160 = $L("<>");
1135
- var $L161 = $L("</>");
1136
- var $L162 = $L("<!--");
1137
- var $L163 = $L("-->");
1138
- var $L164 = $L("type");
1139
- var $L165 = $L("interface");
1140
- var $L166 = $L("namespace");
1141
- var $L167 = $L("asserts");
1142
- var $L168 = $L("keyof");
1143
- var $L169 = $L("infer");
1144
- var $L170 = $L("[]");
1145
- var $L171 = $L("civet");
1125
+ var $L130 = $L("operator");
1126
+ var $L131 = $L("public");
1127
+ var $L132 = $L("private");
1128
+ var $L133 = $L("protected");
1129
+ var $L134 = $L("|>");
1130
+ var $L135 = $L("readonly");
1131
+ var $L136 = $L("return");
1132
+ var $L137 = $L("satisfies");
1133
+ var $L138 = $L("'");
1134
+ var $L139 = $L("static");
1135
+ var $L140 = $L("${");
1136
+ var $L141 = $L("switch");
1137
+ var $L142 = $L("target");
1138
+ var $L143 = $L("then");
1139
+ var $L144 = $L("this");
1140
+ var $L145 = $L("throw");
1141
+ var $L146 = $L('"""');
1142
+ var $L147 = $L("'''");
1143
+ var $L148 = $L("///");
1144
+ var $L149 = $L("```");
1145
+ var $L150 = $L("try");
1146
+ var $L151 = $L("typeof");
1147
+ var $L152 = $L("unless");
1148
+ var $L153 = $L("until");
1149
+ var $L154 = $L("var");
1150
+ var $L155 = $L("void");
1151
+ var $L156 = $L("when");
1152
+ var $L157 = $L("while");
1153
+ var $L158 = $L("yield");
1154
+ var $L159 = $L("/>");
1155
+ var $L160 = $L("</");
1156
+ var $L161 = $L("<>");
1157
+ var $L162 = $L("</>");
1158
+ var $L163 = $L("<!--");
1159
+ var $L164 = $L("-->");
1160
+ var $L165 = $L("type");
1161
+ var $L166 = $L("interface");
1162
+ var $L167 = $L("namespace");
1163
+ var $L168 = $L("asserts");
1164
+ var $L169 = $L("keyof");
1165
+ var $L170 = $L("infer");
1166
+ var $L171 = $L("[]");
1167
+ var $L172 = $L("civet");
1146
1168
  var $R0 = $R(new RegExp("(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
1147
1169
  var $R1 = $R(new RegExp("[0-9]", "suy"));
1148
1170
  var $R2 = $R(new RegExp("[&]", "suy"));
@@ -1185,25 +1207,26 @@ ${input.slice(result.pos)}
1185
1207
  var $R39 = $R(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy"));
1186
1208
  var $R40 = $R(new RegExp(".", "suy"));
1187
1209
  var $R41 = $R(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy"));
1188
- var $R42 = $R(new RegExp("###(?!#)", "suy"));
1189
- var $R43 = $R(new RegExp("[^\\r\\n]", "suy"));
1190
- var $R44 = $R(new RegExp("[ \\t]+", "suy"));
1191
- var $R45 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
1192
- var $R46 = $R(new RegExp("\\s", "suy"));
1193
- var $R47 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
1194
- var $R48 = $R(new RegExp("[\\s>]", "suy"));
1195
- var $R49 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
1196
- var $R50 = $R(new RegExp("[<>]", "suy"));
1197
- var $R51 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
1198
- var $R52 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1199
- var $R53 = $R(new RegExp("[+-]?", "suy"));
1200
- var $R54 = $R(new RegExp("[+-]", "suy"));
1201
- var $R55 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1202
- var $R56 = $R(new RegExp("[\\t ]*", "suy"));
1203
- var $R57 = $R(new RegExp("[\\s]*", "suy"));
1204
- var $R58 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1205
- var $R59 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1206
- var $R60 = $R(new RegExp("[ \\t]*", "suy"));
1210
+ var $R42 = $R(new RegExp("[^]*?###", "suy"));
1211
+ var $R43 = $R(new RegExp("###(?!#)", "suy"));
1212
+ var $R44 = $R(new RegExp("[^\\r\\n]", "suy"));
1213
+ var $R45 = $R(new RegExp("[ \\t]+", "suy"));
1214
+ var $R46 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
1215
+ var $R47 = $R(new RegExp("\\s", "suy"));
1216
+ var $R48 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
1217
+ var $R49 = $R(new RegExp("[\\s>]", "suy"));
1218
+ var $R50 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
1219
+ var $R51 = $R(new RegExp("[<>]", "suy"));
1220
+ var $R52 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
1221
+ var $R53 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1222
+ var $R54 = $R(new RegExp("[+-]?", "suy"));
1223
+ var $R55 = $R(new RegExp("[+-]", "suy"));
1224
+ var $R56 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1225
+ var $R57 = $R(new RegExp("[\\t ]*", "suy"));
1226
+ var $R58 = $R(new RegExp("[\\s]*", "suy"));
1227
+ var $R59 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1228
+ var $R60 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1229
+ var $R61 = $R(new RegExp("[ \\t]*", "suy"));
1207
1230
  var Program$0 = $TS($S(Reset, Init, __, $Q(TopLevelStatement), __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
1208
1231
  var statements = $4;
1209
1232
  module2.processProgram(statements);
@@ -1526,6 +1549,11 @@ ${input.slice(result.pos)}
1526
1549
  var ForbiddenImplicitCalls$0 = $R$0($EXPECT($R0, fail, "ForbiddenImplicitCalls /(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
1527
1550
  var ForbiddenImplicitCalls$1 = $EXPECT($L0, fail, 'ForbiddenImplicitCalls "/ "');
1528
1551
  var ForbiddenImplicitCalls$2 = AtAt;
1552
+ var ForbiddenImplicitCalls$3 = $TS($S(Identifier, $N($EXPECT($L1, fail, 'ForbiddenImplicitCalls "("'))), function($skip, $loc, $0, $1, $2) {
1553
+ if (module2.operators.has($1.name))
1554
+ return $1;
1555
+ return $skip;
1556
+ });
1529
1557
  function ForbiddenImplicitCalls(state) {
1530
1558
  let eventData;
1531
1559
  if (state.events) {
@@ -1537,12 +1565,12 @@ ${input.slice(result.pos)}
1537
1565
  }
1538
1566
  }
1539
1567
  if (state.tokenize) {
1540
- const result = $TOKEN("ForbiddenImplicitCalls", state, ForbiddenImplicitCalls$0(state) || ForbiddenImplicitCalls$1(state) || ForbiddenImplicitCalls$2(state));
1568
+ const result = $TOKEN("ForbiddenImplicitCalls", state, ForbiddenImplicitCalls$0(state) || ForbiddenImplicitCalls$1(state) || ForbiddenImplicitCalls$2(state) || ForbiddenImplicitCalls$3(state));
1541
1569
  if (state.events)
1542
1570
  state.events.exit?.("ForbiddenImplicitCalls", state, result, eventData);
1543
1571
  return result;
1544
1572
  } else {
1545
- const result = ForbiddenImplicitCalls$0(state) || ForbiddenImplicitCalls$1(state) || ForbiddenImplicitCalls$2(state);
1573
+ const result = ForbiddenImplicitCalls$0(state) || ForbiddenImplicitCalls$1(state) || ForbiddenImplicitCalls$2(state) || ForbiddenImplicitCalls$3(state);
1546
1574
  if (state.events)
1547
1575
  state.events.exit?.("ForbiddenImplicitCalls", state, result, eventData);
1548
1576
  return result;
@@ -1579,7 +1607,7 @@ ${input.slice(result.pos)}
1579
1607
  return result;
1580
1608
  }
1581
1609
  }
1582
- var TrailingMemberExpressions$0 = $TS($S($Q(MemberExpressionRest), $Q($S($C(Samedent, IndentedFurther), $Y($S($E($EXPECT($L1, fail, 'TrailingMemberExpressions "?"')), $EXPECT($L2, fail, 'TrailingMemberExpressions "."'), $N($EXPECT($R1, fail, "TrailingMemberExpressions /[0-9]/")))), MemberExpressionRest))), function($skip, $loc, $0, $1, $2) {
1610
+ var TrailingMemberExpressions$0 = $TS($S($Q(MemberExpressionRest), $Q($S($C(Samedent, IndentedFurther), $Y($S($E($EXPECT($L2, fail, 'TrailingMemberExpressions "?"')), $EXPECT($L3, fail, 'TrailingMemberExpressions "."'), $N($EXPECT($R1, fail, "TrailingMemberExpressions /[0-9]/")))), MemberExpressionRest))), function($skip, $loc, $0, $1, $2) {
1583
1611
  return $1.concat($2);
1584
1612
  });
1585
1613
  function TrailingMemberExpressions(state) {
@@ -1973,7 +2001,7 @@ ${input.slice(result.pos)}
1973
2001
  return result;
1974
2002
  }
1975
2003
  }
1976
- var UpdateExpressionSymbol$0 = $TV($C($EXPECT($L3, fail, 'UpdateExpressionSymbol "++"'), $EXPECT($L4, fail, 'UpdateExpressionSymbol "--"')), function($skip, $loc, $0, $1) {
2004
+ var UpdateExpressionSymbol$0 = $TV($C($EXPECT($L4, fail, 'UpdateExpressionSymbol "++"'), $EXPECT($L5, fail, 'UpdateExpressionSymbol "--"')), function($skip, $loc, $0, $1) {
1977
2005
  return { $loc, token: $1 };
1978
2006
  });
1979
2007
  function UpdateExpressionSymbol(state) {
@@ -2252,7 +2280,7 @@ ${input.slice(result.pos)}
2252
2280
  return result;
2253
2281
  }
2254
2282
  }
2255
- var FatArrow$0 = $TS($S(__, $EXPECT($L5, fail, 'FatArrow "=>"')), function($skip, $loc, $0, $1, $2) {
2283
+ var FatArrow$0 = $TS($S(__, $EXPECT($L6, fail, 'FatArrow "=>"')), function($skip, $loc, $0, $1, $2) {
2256
2284
  var ws = $1;
2257
2285
  if (!ws.length)
2258
2286
  return " =>";
@@ -2335,7 +2363,7 @@ ${input.slice(result.pos)}
2335
2363
  }
2336
2364
  }
2337
2365
  var TernaryRest$0 = NestedTernaryRest;
2338
- var TernaryRest$1 = $TS($S($N(CoffeeBinaryExistentialEnabled), $Y($EXPECT($L6, fail, 'TernaryRest " "')), $Q(TrailingComment), QuestionMark, ExtendedExpression, __, Colon, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
2366
+ var TernaryRest$1 = $TS($S($N(CoffeeBinaryExistentialEnabled), $Y($EXPECT($L7, fail, 'TernaryRest " "')), $Q(TrailingComment), QuestionMark, ExtendedExpression, __, Colon, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
2339
2367
  return $0.slice(2);
2340
2368
  });
2341
2369
  function TernaryRest(state) {
@@ -2510,13 +2538,13 @@ ${input.slice(result.pos)}
2510
2538
  }
2511
2539
  var PrimaryExpression$0 = ObjectLiteral;
2512
2540
  var PrimaryExpression$1 = ThisLiteral;
2513
- var PrimaryExpression$2 = Literal;
2514
- var PrimaryExpression$3 = ArrayLiteral;
2515
- var PrimaryExpression$4 = IdentifierReference;
2516
- var PrimaryExpression$5 = FunctionExpression;
2517
- var PrimaryExpression$6 = ClassExpression;
2518
- var PrimaryExpression$7 = RegularExpressionLiteral;
2519
- var PrimaryExpression$8 = TemplateLiteral;
2541
+ var PrimaryExpression$2 = TemplateLiteral;
2542
+ var PrimaryExpression$3 = Literal;
2543
+ var PrimaryExpression$4 = ArrayLiteral;
2544
+ var PrimaryExpression$5 = IdentifierReference;
2545
+ var PrimaryExpression$6 = FunctionExpression;
2546
+ var PrimaryExpression$7 = ClassExpression;
2547
+ var PrimaryExpression$8 = RegularExpressionLiteral;
2520
2548
  var PrimaryExpression$9 = ParenthesizedExpression;
2521
2549
  var PrimaryExpression$10 = JSXImplicitFragment;
2522
2550
  function PrimaryExpression(state) {
@@ -2549,8 +2577,8 @@ ${input.slice(result.pos)}
2549
2577
  }
2550
2578
  return {
2551
2579
  type: "ParenthesizedExpression",
2552
- expression: exp,
2553
- children: $0
2580
+ children: $0,
2581
+ expression: exp
2554
2582
  };
2555
2583
  });
2556
2584
  function ParenthesizedExpression(state) {
@@ -2695,7 +2723,7 @@ ${input.slice(result.pos)}
2695
2723
  return result;
2696
2724
  }
2697
2725
  }
2698
- var ExtendsToken$0 = $TS($S(Loc, __, OpenAngleBracket, $E($EXPECT($L6, fail, 'ExtendsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
2726
+ var ExtendsToken$0 = $TS($S(Loc, __, OpenAngleBracket, $E($EXPECT($L7, fail, 'ExtendsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
2699
2727
  var l = $1;
2700
2728
  var ws = $2;
2701
2729
  var lt = $3;
@@ -2789,7 +2817,7 @@ ${input.slice(result.pos)}
2789
2817
  return result;
2790
2818
  }
2791
2819
  }
2792
- var ImplementsToken$0 = $TS($S(Loc, __, ImplementsShorthand, $E($EXPECT($L6, fail, 'ImplementsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
2820
+ var ImplementsToken$0 = $TS($S(Loc, __, ImplementsShorthand, $E($EXPECT($L7, fail, 'ImplementsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
2793
2821
  var l = $1;
2794
2822
  var ws = $2;
2795
2823
  var token = $3;
@@ -2799,7 +2827,7 @@ ${input.slice(result.pos)}
2799
2827
  }
2800
2828
  return { children };
2801
2829
  });
2802
- var ImplementsToken$1 = $TS($S(__, $EXPECT($L7, fail, 'ImplementsToken "implements"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
2830
+ var ImplementsToken$1 = $TS($S(__, $EXPECT($L8, fail, 'ImplementsToken "implements"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
2803
2831
  $2 = { $loc, token: $2 };
2804
2832
  return [$1, $2];
2805
2833
  });
@@ -2825,7 +2853,7 @@ ${input.slice(result.pos)}
2825
2853
  return result;
2826
2854
  }
2827
2855
  }
2828
- var ImplementsShorthand$0 = $TV($EXPECT($L8, fail, 'ImplementsShorthand "<:"'), function($skip, $loc, $0, $1) {
2856
+ var ImplementsShorthand$0 = $TV($EXPECT($L9, fail, 'ImplementsShorthand "<:"'), function($skip, $loc, $0, $1) {
2829
2857
  return { $loc, token: "implements " };
2830
2858
  });
2831
2859
  function ImplementsShorthand(state) {
@@ -3076,7 +3104,7 @@ ${input.slice(result.pos)}
3076
3104
  }
3077
3105
  }
3078
3106
  var ThisLiteral$0 = This;
3079
- var ThisLiteral$1 = $TS($S(AtThis, $TEXT($S($E($EXPECT($L9, fail, 'ThisLiteral "#"')), IdentifierName))), function($skip, $loc, $0, $1, $2) {
3107
+ var ThisLiteral$1 = $TS($S(AtThis, $TEXT($S($E($EXPECT($L10, fail, 'ThisLiteral "#"')), IdentifierName))), function($skip, $loc, $0, $1, $2) {
3080
3108
  var at = $1;
3081
3109
  var id = $2;
3082
3110
  return [at, ".", id];
@@ -3130,7 +3158,7 @@ ${input.slice(result.pos)}
3130
3158
  return result;
3131
3159
  }
3132
3160
  }
3133
- var LeftHandSideExpression$0 = $TS($S($Q($S(New, $N($EXPECT($L2, fail, 'LeftHandSideExpression "."')), __)), CallExpression), function($skip, $loc, $0, $1, $2) {
3161
+ var LeftHandSideExpression$0 = $TS($S($Q($S(New, $N($EXPECT($L3, fail, 'LeftHandSideExpression "."')), __)), CallExpression), function($skip, $loc, $0, $1, $2) {
3134
3162
  if ($1.length)
3135
3163
  return $0;
3136
3164
  return $2;
@@ -3157,14 +3185,14 @@ ${input.slice(result.pos)}
3157
3185
  return result;
3158
3186
  }
3159
3187
  }
3160
- var CallExpression$0 = $TS($S($EXPECT($L10, fail, 'CallExpression "super"'), ArgumentsWithTrailingMemberExpressions, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
3188
+ var CallExpression$0 = $TS($S($EXPECT($L11, fail, 'CallExpression "super"'), ArgumentsWithTrailingMemberExpressions, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
3161
3189
  var rest = $3;
3162
3190
  return {
3163
3191
  type: "CallExpression",
3164
3192
  children: [$1, ...$2, ...rest.flat()]
3165
3193
  };
3166
3194
  });
3167
- var CallExpression$1 = $TS($S($EXPECT($L11, fail, 'CallExpression "import"'), ArgumentsWithTrailingMemberExpressions, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
3195
+ var CallExpression$1 = $TS($S($EXPECT($L12, fail, 'CallExpression "import"'), ArgumentsWithTrailingMemberExpressions, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
3168
3196
  var rest = $3;
3169
3197
  return {
3170
3198
  type: "CallExpression",
@@ -3263,7 +3291,7 @@ ${input.slice(result.pos)}
3263
3291
  return result;
3264
3292
  }
3265
3293
  }
3266
- var NonNullAssertion$0 = $T($EXPECT($L12, fail, 'NonNullAssertion "!"'), function(value) {
3294
+ var NonNullAssertion$0 = $T($EXPECT($L13, fail, 'NonNullAssertion "!"'), function(value) {
3267
3295
  return { "type": "NonNullAssertion", "ts": true, "children": value };
3268
3296
  });
3269
3297
  function NonNullAssertion(state) {
@@ -3378,7 +3406,7 @@ ${input.slice(result.pos)}
3378
3406
  children: $0
3379
3407
  };
3380
3408
  });
3381
- var MemberBracketContent$1 = $TS($S(Dot, $C(StringLiteral, TemplateLiteral)), function($skip, $loc, $0, $1, $2) {
3409
+ var MemberBracketContent$1 = $TS($S(Dot, $C(TemplateLiteral, StringLiteral)), function($skip, $loc, $0, $1, $2) {
3382
3410
  var dot = $1;
3383
3411
  var str = $2;
3384
3412
  return {
@@ -3402,7 +3430,7 @@ ${input.slice(result.pos)}
3402
3430
  ]
3403
3431
  };
3404
3432
  });
3405
- var MemberBracketContent$3 = $TS($S(Dot, $EXPECT($L13, fail, 'MemberBracketContent "-"'), IntegerLiteral), function($skip, $loc, $0, $1, $2, $3) {
3433
+ var MemberBracketContent$3 = $TS($S(Dot, $EXPECT($L14, fail, 'MemberBracketContent "-"'), IntegerLiteral), function($skip, $loc, $0, $1, $2, $3) {
3406
3434
  var dot = $1;
3407
3435
  var neg = $2;
3408
3436
  var num = $3;
@@ -3544,8 +3572,8 @@ ${input.slice(result.pos)}
3544
3572
  return result;
3545
3573
  }
3546
3574
  }
3547
- var SuperProperty$0 = $S($EXPECT($L14, fail, 'SuperProperty "super["'), ExtendedExpression, __, CloseBracket);
3548
- var SuperProperty$1 = $S($EXPECT($L10, fail, 'SuperProperty "super"'), $N($C(QuestionMark, NonNullAssertion)), PropertyAccess);
3575
+ var SuperProperty$0 = $S($EXPECT($L15, fail, 'SuperProperty "super["'), ExtendedExpression, __, CloseBracket);
3576
+ var SuperProperty$1 = $S($EXPECT($L11, fail, 'SuperProperty "super"'), $N($C(QuestionMark, NonNullAssertion)), PropertyAccess);
3549
3577
  function SuperProperty(state) {
3550
3578
  let eventData;
3551
3579
  if (state.events) {
@@ -3569,7 +3597,7 @@ ${input.slice(result.pos)}
3569
3597
  }
3570
3598
  }
3571
3599
  var MetaProperty$0 = $S(New, Dot, Target);
3572
- var MetaProperty$1 = $TS($S($EXPECT($L15, fail, 'MetaProperty "import.meta"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
3600
+ var MetaProperty$1 = $TS($S($EXPECT($L16, fail, 'MetaProperty "import.meta"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
3573
3601
  return { $loc, token: $1 };
3574
3602
  });
3575
3603
  function MetaProperty(state) {
@@ -3595,7 +3623,7 @@ ${input.slice(result.pos)}
3595
3623
  }
3596
3624
  }
3597
3625
  var Parameters$0 = NonEmptyParameters;
3598
- var Parameters$1 = $TV($EXPECT($L16, fail, 'Parameters ""'), function($skip, $loc, $0, $1) {
3626
+ var Parameters$1 = $TV($EXPECT($L17, fail, 'Parameters ""'), function($skip, $loc, $0, $1) {
3599
3627
  return {
3600
3628
  type: "Parameters",
3601
3629
  children: [{ $loc, token: "()" }],
@@ -3756,7 +3784,7 @@ ${input.slice(result.pos)}
3756
3784
  }
3757
3785
  }
3758
3786
  var ParameterElementDelimiter$0 = $S($Q(_), Comma);
3759
- var ParameterElementDelimiter$1 = $Y($S(__, $EXPECT($L17, fail, 'ParameterElementDelimiter ")"')));
3787
+ var ParameterElementDelimiter$1 = $Y($S(__, $EXPECT($L18, fail, 'ParameterElementDelimiter ")"')));
3760
3788
  var ParameterElementDelimiter$2 = $T($S($Y(EOS), InsertComma), function(value) {
3761
3789
  return value[1];
3762
3790
  });
@@ -3946,10 +3974,10 @@ ${input.slice(result.pos)}
3946
3974
  }
3947
3975
  var ObjectBindingPatternContent$0 = NestedBindingProperties;
3948
3976
  var ObjectBindingPatternContent$1 = $TV($E(BindingPropertyList), function($skip, $loc, $0, $1) {
3949
- var props = $0;
3950
- if (!props)
3977
+ var props2 = $0;
3978
+ if (!props2)
3951
3979
  return { children: [], names: [] };
3952
- return module2.reorderBindingRestProperty(props);
3980
+ return module2.reorderBindingRestProperty(props2);
3953
3981
  });
3954
3982
  function ObjectBindingPatternContent(state) {
3955
3983
  let eventData;
@@ -3974,8 +4002,8 @@ ${input.slice(result.pos)}
3974
4002
  }
3975
4003
  }
3976
4004
  var BindingPropertyList$0 = $TV($P($S(BindingProperty, ObjectPropertyDelimiter)), function($skip, $loc, $0, $1) {
3977
- var props = $0;
3978
- return props.map(([prop, delim]) => {
4005
+ var props2 = $0;
4006
+ return props2.map(([prop, delim]) => {
3979
4007
  return {
3980
4008
  ...prop,
3981
4009
  children: [...prop.children, delim]
@@ -4035,36 +4063,11 @@ ${input.slice(result.pos)}
4035
4063
  }
4036
4064
  }
4037
4065
  var ArrayBindingPatternContent$0 = NestedBindingElements;
4038
- var ArrayBindingPatternContent$1 = $TS($S($Q($C(BindingElement, Elision)), $E($S(BindingRestElement, ArrayElementDelimiter)), $Q($C(BindingElement, Elision))), function($skip, $loc, $0, $1, $2, $3) {
4039
- var props = $1;
4040
- var rest = $2;
4041
- var after = $3;
4042
- const names = props.flatMap((p) => p.names || []);
4043
- const children = [...props];
4044
- let blockPrefix;
4045
- if (rest) {
4046
- const [restBinding] = rest;
4047
- children.push(restBinding);
4048
- let restIdentifier;
4049
- if (restBinding.ref) {
4050
- restIdentifier = restBinding.ref;
4051
- } else {
4052
- restIdentifier = restBinding.names[0];
4053
- names.push(...restBinding.names);
4054
- }
4055
- if (after.length) {
4056
- const spliceRef = module2.getRef("splice");
4057
- blockPrefix = {
4058
- children: ["[", module2.insertTrimmingSpace(after, ""), "] = ", spliceRef, ".call(", restIdentifier, ", -", after.length.toString(), ")"],
4059
- names: after.flatMap((p) => p.names)
4060
- };
4061
- }
4062
- }
4063
- return {
4064
- names,
4065
- children,
4066
- blockPrefix
4067
- };
4066
+ var ArrayBindingPatternContent$1 = $TV($E(BindingElementList), function($skip, $loc, $0, $1) {
4067
+ var elements = $0;
4068
+ if (!elements)
4069
+ return { children: [], names: [] };
4070
+ return module2.adjustBindingElements(elements);
4068
4071
  });
4069
4072
  function ArrayBindingPatternContent(state) {
4070
4073
  let eventData;
@@ -4088,6 +4091,71 @@ ${input.slice(result.pos)}
4088
4091
  return result;
4089
4092
  }
4090
4093
  }
4094
+ var BindingElementList$0 = $TV($P($S(BindingElement, ArrayElementDelimiter)), function($skip, $loc, $0, $1) {
4095
+ var elements = $0;
4096
+ return elements.map(([element, delim]) => {
4097
+ return {
4098
+ ...element,
4099
+ children: [...element.children, delim]
4100
+ };
4101
+ });
4102
+ });
4103
+ function BindingElementList(state) {
4104
+ let eventData;
4105
+ if (state.events) {
4106
+ const result = state.events.enter?.("BindingElementList", state);
4107
+ if (result) {
4108
+ if (result.cache)
4109
+ return result.cache;
4110
+ eventData = result.data;
4111
+ }
4112
+ }
4113
+ if (state.tokenize) {
4114
+ const result = $TOKEN("BindingElementList", state, BindingElementList$0(state));
4115
+ if (state.events)
4116
+ state.events.exit?.("BindingElementList", state, result, eventData);
4117
+ return result;
4118
+ } else {
4119
+ const result = BindingElementList$0(state);
4120
+ if (state.events)
4121
+ state.events.exit?.("BindingElementList", state, result, eventData);
4122
+ return result;
4123
+ }
4124
+ }
4125
+ var NestedBindingElementList$0 = $TS($S(Nested, BindingElementList), function($skip, $loc, $0, $1, $2) {
4126
+ var ws = $1;
4127
+ var elements = $2;
4128
+ return elements.map((element, i) => {
4129
+ if (i > 0)
4130
+ return element;
4131
+ return {
4132
+ ...element,
4133
+ children: [ws, ...element.children]
4134
+ };
4135
+ });
4136
+ });
4137
+ function NestedBindingElementList(state) {
4138
+ let eventData;
4139
+ if (state.events) {
4140
+ const result = state.events.enter?.("NestedBindingElementList", state);
4141
+ if (result) {
4142
+ if (result.cache)
4143
+ return result.cache;
4144
+ eventData = result.data;
4145
+ }
4146
+ }
4147
+ if (state.tokenize) {
4148
+ const result = $TOKEN("NestedBindingElementList", state, NestedBindingElementList$0(state));
4149
+ if (state.events)
4150
+ state.events.exit?.("NestedBindingElementList", state, result, eventData);
4151
+ return result;
4152
+ } else {
4153
+ const result = NestedBindingElementList$0(state);
4154
+ if (state.events)
4155
+ state.events.exit?.("NestedBindingElementList", state, result, eventData);
4156
+ return result;
4157
+ }
4158
+ }
4091
4159
  var Elision$0 = $S(__, Comma);
4092
4160
  function Elision(state) {
4093
4161
  let eventData;
@@ -4112,11 +4180,10 @@ ${input.slice(result.pos)}
4112
4180
  }
4113
4181
  }
4114
4182
  var NestedBindingProperties$0 = $TS($S(PushIndent, $Q(NestedBindingPropertyList), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
4115
- var props = $2;
4116
- if (!props.length)
4183
+ var props2 = $2;
4184
+ if (!props2.length)
4117
4185
  return $skip;
4118
- props = props.flat();
4119
- return module2.reorderBindingRestProperty(props);
4186
+ return module2.reorderBindingRestProperty(props2.flat());
4120
4187
  });
4121
4188
  function NestedBindingProperties(state) {
4122
4189
  let eventData;
@@ -4142,8 +4209,8 @@ ${input.slice(result.pos)}
4142
4209
  }
4143
4210
  var NestedBindingPropertyList$0 = $TS($S(Nested, BindingPropertyList), function($skip, $loc, $0, $1, $2) {
4144
4211
  var ws = $1;
4145
- var props = $2;
4146
- return props.map((prop, i) => {
4212
+ var props2 = $2;
4213
+ return props2.map((prop, i) => {
4147
4214
  if (i > 0)
4148
4215
  return prop;
4149
4216
  return {
@@ -4261,37 +4328,11 @@ ${input.slice(result.pos)}
4261
4328
  return result;
4262
4329
  }
4263
4330
  }
4264
- var NestedBindingElements$0 = $TS($S(PushIndent, $Q(NestedBindingElement), $E($S(Nested, BindingRestElement, ArrayElementDelimiter)), $Q(NestedBindingElement), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4265
- var props = $2;
4266
- var rest = $3;
4267
- var after = $4;
4268
- if (!(props.length || rest))
4331
+ var NestedBindingElements$0 = $TS($S(PushIndent, $Q(NestedBindingElementList), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
4332
+ var elements = $2;
4333
+ if (!elements.length)
4269
4334
  return $skip;
4270
- const names = props.flatMap((p) => p.names), children = [...props];
4271
- let blockPrefix;
4272
- if (rest) {
4273
- const [, restBinding] = rest;
4274
- let restIdentifier;
4275
- if (restBinding.ref) {
4276
- restIdentifier = restBinding.binding.ref;
4277
- } else {
4278
- restIdentifier = restBinding.names[0];
4279
- }
4280
- if (after.length) {
4281
- const spliceRef = module2.getRef("splice");
4282
- blockPrefix = {
4283
- children: ["[", module2.insertTrimmingSpace(after, ""), "] = ", spliceRef, ".call(", restIdentifier, ", -", after.length.toString(), ")"],
4284
- names: after.flatMap((p) => p.names)
4285
- };
4286
- }
4287
- children.push(...rest);
4288
- names.push(...restBinding.names);
4289
- }
4290
- return {
4291
- children,
4292
- names,
4293
- blockPrefix
4294
- };
4335
+ return module2.adjustBindingElements(elements.flat());
4295
4336
  });
4296
4337
  function NestedBindingElements(state) {
4297
4338
  let eventData;
@@ -4323,10 +4364,498 @@ ${input.slice(result.pos)}
4323
4364
  children: [indent, ...element.children]
4324
4365
  };
4325
4366
  });
4326
- function NestedBindingElement(state) {
4367
+ function NestedBindingElement(state) {
4368
+ let eventData;
4369
+ if (state.events) {
4370
+ const result = state.events.enter?.("NestedBindingElement", state);
4371
+ if (result) {
4372
+ if (result.cache)
4373
+ return result.cache;
4374
+ eventData = result.data;
4375
+ }
4376
+ }
4377
+ if (state.tokenize) {
4378
+ const result = $TOKEN("NestedBindingElement", state, NestedBindingElement$0(state));
4379
+ if (state.events)
4380
+ state.events.exit?.("NestedBindingElement", state, result, eventData);
4381
+ return result;
4382
+ } else {
4383
+ const result = NestedBindingElement$0(state);
4384
+ if (state.events)
4385
+ state.events.exit?.("NestedBindingElement", state, result, eventData);
4386
+ return result;
4387
+ }
4388
+ }
4389
+ var BindingElement$0 = BindingRestElement;
4390
+ var BindingElement$1 = $TS($S($C(BindingIdentifier, BindingPattern), $E(Initializer)), function($skip, $loc, $0, $1, $2) {
4391
+ var binding = $1;
4392
+ return {
4393
+ names: binding.names,
4394
+ children: $0
4395
+ };
4396
+ });
4397
+ var BindingElement$2 = $TV($EXPECT($L17, fail, 'BindingElement ""'), function($skip, $loc, $0, $1) {
4398
+ return {
4399
+ type: "ElisionElement",
4400
+ children: [],
4401
+ names: []
4402
+ };
4403
+ });
4404
+ function BindingElement(state) {
4405
+ let eventData;
4406
+ if (state.events) {
4407
+ const result = state.events.enter?.("BindingElement", state);
4408
+ if (result) {
4409
+ if (result.cache)
4410
+ return result.cache;
4411
+ eventData = result.data;
4412
+ }
4413
+ }
4414
+ if (state.tokenize) {
4415
+ const result = $TOKEN("BindingElement", state, BindingElement$0(state) || BindingElement$1(state) || BindingElement$2(state));
4416
+ if (state.events)
4417
+ state.events.exit?.("BindingElement", state, result, eventData);
4418
+ return result;
4419
+ } else {
4420
+ const result = BindingElement$0(state) || BindingElement$1(state) || BindingElement$2(state);
4421
+ if (state.events)
4422
+ state.events.exit?.("BindingElement", state, result, eventData);
4423
+ return result;
4424
+ }
4425
+ }
4426
+ var BindingRestElement$0 = $TS($S($E(_), DotDotDot, $C(BindingIdentifier, BindingPattern, EmptyBindingPattern)), function($skip, $loc, $0, $1, $2, $3) {
4427
+ var ws = $1;
4428
+ var dots = $2;
4429
+ var binding = $3;
4430
+ return {
4431
+ ...binding,
4432
+ children: [...ws || [], dots, ...binding.children],
4433
+ rest: true
4434
+ };
4435
+ });
4436
+ var BindingRestElement$1 = $TS($S($E(_), $C(BindingIdentifier, BindingPattern), DotDotDot), function($skip, $loc, $0, $1, $2, $3) {
4437
+ var ws = $1;
4438
+ var binding = $2;
4439
+ var dots = $3;
4440
+ return {
4441
+ ...binding,
4442
+ children: [...ws || [], dots, ...binding.children],
4443
+ rest: true
4444
+ };
4445
+ });
4446
+ function BindingRestElement(state) {
4447
+ let eventData;
4448
+ if (state.events) {
4449
+ const result = state.events.enter?.("BindingRestElement", state);
4450
+ if (result) {
4451
+ if (result.cache)
4452
+ return result.cache;
4453
+ eventData = result.data;
4454
+ }
4455
+ }
4456
+ if (state.tokenize) {
4457
+ const result = $TOKEN("BindingRestElement", state, BindingRestElement$0(state) || BindingRestElement$1(state));
4458
+ if (state.events)
4459
+ state.events.exit?.("BindingRestElement", state, result, eventData);
4460
+ return result;
4461
+ } else {
4462
+ const result = BindingRestElement$0(state) || BindingRestElement$1(state);
4463
+ if (state.events)
4464
+ state.events.exit?.("BindingRestElement", state, result, eventData);
4465
+ return result;
4466
+ }
4467
+ }
4468
+ var EmptyBindingPattern$0 = $TV($EXPECT($L17, fail, 'EmptyBindingPattern ""'), function($skip, $loc, $0, $1) {
4469
+ const ref = {
4470
+ type: "Ref",
4471
+ base: "ref",
4472
+ id: "ref"
4473
+ };
4474
+ return {
4475
+ type: "EmptyBinding",
4476
+ children: [ref],
4477
+ names: [],
4478
+ ref
4479
+ };
4480
+ });
4481
+ function EmptyBindingPattern(state) {
4482
+ let eventData;
4483
+ if (state.events) {
4484
+ const result = state.events.enter?.("EmptyBindingPattern", state);
4485
+ if (result) {
4486
+ if (result.cache)
4487
+ return result.cache;
4488
+ eventData = result.data;
4489
+ }
4490
+ }
4491
+ if (state.tokenize) {
4492
+ const result = $TOKEN("EmptyBindingPattern", state, EmptyBindingPattern$0(state));
4493
+ if (state.events)
4494
+ state.events.exit?.("EmptyBindingPattern", state, result, eventData);
4495
+ return result;
4496
+ } else {
4497
+ const result = EmptyBindingPattern$0(state);
4498
+ if (state.events)
4499
+ state.events.exit?.("EmptyBindingPattern", state, result, eventData);
4500
+ return result;
4501
+ }
4502
+ }
4503
+ var MatchingPattern$0 = ObjectMatchingPattern;
4504
+ var MatchingPattern$1 = ArrayMatchingPattern;
4505
+ var MatchingPattern$2 = Literal;
4506
+ var MatchingPattern$3 = RegularExpressionLiteral;
4507
+ function MatchingPattern(state) {
4508
+ let eventData;
4509
+ if (state.events) {
4510
+ const result = state.events.enter?.("MatchingPattern", state);
4511
+ if (result) {
4512
+ if (result.cache)
4513
+ return result.cache;
4514
+ eventData = result.data;
4515
+ }
4516
+ }
4517
+ if (state.tokenize) {
4518
+ const result = $TOKEN("MatchingPattern", state, MatchingPattern$0(state) || MatchingPattern$1(state) || MatchingPattern$2(state) || MatchingPattern$3(state));
4519
+ if (state.events)
4520
+ state.events.exit?.("MatchingPattern", state, result, eventData);
4521
+ return result;
4522
+ } else {
4523
+ const result = MatchingPattern$0(state) || MatchingPattern$1(state) || MatchingPattern$2(state) || MatchingPattern$3(state);
4524
+ if (state.events)
4525
+ state.events.exit?.("MatchingPattern", state, result, eventData);
4526
+ return result;
4527
+ }
4528
+ }
4529
+ var ObjectMatchingPattern$0 = $TS($S($E(_), OpenBrace, ObjectMatchingPatternContent, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4530
+ var ws = $1;
4531
+ var open = $2;
4532
+ var properties = $3;
4533
+ var ws = $4;
4534
+ var close = $5;
4535
+ return {
4536
+ type: "ObjectMatchingPattern",
4537
+ children: [ws, open, ...properties.children, ...ws, close],
4538
+ properties: properties.children
4539
+ };
4540
+ });
4541
+ function ObjectMatchingPattern(state) {
4542
+ let eventData;
4543
+ if (state.events) {
4544
+ const result = state.events.enter?.("ObjectMatchingPattern", state);
4545
+ if (result) {
4546
+ if (result.cache)
4547
+ return result.cache;
4548
+ eventData = result.data;
4549
+ }
4550
+ }
4551
+ if (state.tokenize) {
4552
+ const result = $TOKEN("ObjectMatchingPattern", state, ObjectMatchingPattern$0(state));
4553
+ if (state.events)
4554
+ state.events.exit?.("ObjectMatchingPattern", state, result, eventData);
4555
+ return result;
4556
+ } else {
4557
+ const result = ObjectMatchingPattern$0(state);
4558
+ if (state.events)
4559
+ state.events.exit?.("ObjectMatchingPattern", state, result, eventData);
4560
+ return result;
4561
+ }
4562
+ }
4563
+ var ObjectMatchingPatternContent$0 = NestedMatchingProperties;
4564
+ var ObjectMatchingPatternContent$1 = $TV($E(MatchingPropertyList), function($skip, $loc, $0, $1) {
4565
+ var properties = $0;
4566
+ if (!properties)
4567
+ return { children: [], names: [] };
4568
+ return module2.reorderBindingRestProperty(properties);
4569
+ });
4570
+ function ObjectMatchingPatternContent(state) {
4571
+ let eventData;
4572
+ if (state.events) {
4573
+ const result = state.events.enter?.("ObjectMatchingPatternContent", state);
4574
+ if (result) {
4575
+ if (result.cache)
4576
+ return result.cache;
4577
+ eventData = result.data;
4578
+ }
4579
+ }
4580
+ if (state.tokenize) {
4581
+ const result = $TOKEN("ObjectMatchingPatternContent", state, ObjectMatchingPatternContent$0(state) || ObjectMatchingPatternContent$1(state));
4582
+ if (state.events)
4583
+ state.events.exit?.("ObjectMatchingPatternContent", state, result, eventData);
4584
+ return result;
4585
+ } else {
4586
+ const result = ObjectMatchingPatternContent$0(state) || ObjectMatchingPatternContent$1(state);
4587
+ if (state.events)
4588
+ state.events.exit?.("ObjectMatchingPatternContent", state, result, eventData);
4589
+ return result;
4590
+ }
4591
+ }
4592
+ var NestedMatchingProperties$0 = $TS($S(PushIndent, $Q(NestedMatchingPropertyList), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
4593
+ var properties = $2;
4594
+ if (!props.length)
4595
+ return $skip;
4596
+ return module2.reorderBindingRestProperty(props.flat());
4597
+ });
4598
+ function NestedMatchingProperties(state) {
4599
+ let eventData;
4600
+ if (state.events) {
4601
+ const result = state.events.enter?.("NestedMatchingProperties", state);
4602
+ if (result) {
4603
+ if (result.cache)
4604
+ return result.cache;
4605
+ eventData = result.data;
4606
+ }
4607
+ }
4608
+ if (state.tokenize) {
4609
+ const result = $TOKEN("NestedMatchingProperties", state, NestedMatchingProperties$0(state));
4610
+ if (state.events)
4611
+ state.events.exit?.("NestedMatchingProperties", state, result, eventData);
4612
+ return result;
4613
+ } else {
4614
+ const result = NestedMatchingProperties$0(state);
4615
+ if (state.events)
4616
+ state.events.exit?.("NestedMatchingProperties", state, result, eventData);
4617
+ return result;
4618
+ }
4619
+ }
4620
+ var MatchingPropertyList$0 = $TV($P($S(MatchingProperty, ObjectPropertyDelimiter)), function($skip, $loc, $0, $1) {
4621
+ var props2 = $0;
4622
+ return props2.map(([prop, delim]) => {
4623
+ return {
4624
+ ...prop,
4625
+ children: [...prop.children, delim]
4626
+ };
4627
+ });
4628
+ });
4629
+ function MatchingPropertyList(state) {
4630
+ let eventData;
4631
+ if (state.events) {
4632
+ const result = state.events.enter?.("MatchingPropertyList", state);
4633
+ if (result) {
4634
+ if (result.cache)
4635
+ return result.cache;
4636
+ eventData = result.data;
4637
+ }
4638
+ }
4639
+ if (state.tokenize) {
4640
+ const result = $TOKEN("MatchingPropertyList", state, MatchingPropertyList$0(state));
4641
+ if (state.events)
4642
+ state.events.exit?.("MatchingPropertyList", state, result, eventData);
4643
+ return result;
4644
+ } else {
4645
+ const result = MatchingPropertyList$0(state);
4646
+ if (state.events)
4647
+ state.events.exit?.("MatchingPropertyList", state, result, eventData);
4648
+ return result;
4649
+ }
4650
+ }
4651
+ var NestedMatchingPropertyList$0 = $TS($S(Nested, MatchingPropertyList), function($skip, $loc, $0, $1, $2) {
4652
+ var ws = $1;
4653
+ var props2 = $2;
4654
+ return props2.map((prop, i) => {
4655
+ if (i > 0)
4656
+ return prop;
4657
+ return {
4658
+ ...prop,
4659
+ children: [ws, ...prop.children]
4660
+ };
4661
+ });
4662
+ });
4663
+ function NestedMatchingPropertyList(state) {
4664
+ let eventData;
4665
+ if (state.events) {
4666
+ const result = state.events.enter?.("NestedMatchingPropertyList", state);
4667
+ if (result) {
4668
+ if (result.cache)
4669
+ return result.cache;
4670
+ eventData = result.data;
4671
+ }
4672
+ }
4673
+ if (state.tokenize) {
4674
+ const result = $TOKEN("NestedMatchingPropertyList", state, NestedMatchingPropertyList$0(state));
4675
+ if (state.events)
4676
+ state.events.exit?.("NestedMatchingPropertyList", state, result, eventData);
4677
+ return result;
4678
+ } else {
4679
+ const result = NestedMatchingPropertyList$0(state);
4680
+ if (state.events)
4681
+ state.events.exit?.("NestedMatchingPropertyList", state, result, eventData);
4682
+ return result;
4683
+ }
4684
+ }
4685
+ var MatchingProperty$0 = MatchingRestProperty;
4686
+ var MatchingProperty$1 = $TS($S($E(_), PropertyName, __, Colon, $E(_), $C(BindingIdentifier, MatchingPattern)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
4687
+ var name = $2;
4688
+ var match = $6;
4689
+ return {
4690
+ type: "BindingMatchProperty",
4691
+ name,
4692
+ match,
4693
+ children: $0
4694
+ };
4695
+ });
4696
+ var MatchingProperty$2 = $TS($S($E(_), BindingIdentifier), function($skip, $loc, $0, $1, $2) {
4697
+ var ws = $1;
4698
+ var b = $2;
4699
+ if (b.type === "AtBinding") {
4700
+ return {
4701
+ type: "AtBindingProperty",
4702
+ ref: b.ref,
4703
+ names: [],
4704
+ children: [ws, b]
4705
+ };
4706
+ }
4707
+ return {
4708
+ type: "BindingProperty",
4709
+ names: b.names,
4710
+ children: [ws, b],
4711
+ identifier: b
4712
+ };
4713
+ });
4714
+ function MatchingProperty(state) {
4715
+ let eventData;
4716
+ if (state.events) {
4717
+ const result = state.events.enter?.("MatchingProperty", state);
4718
+ if (result) {
4719
+ if (result.cache)
4720
+ return result.cache;
4721
+ eventData = result.data;
4722
+ }
4723
+ }
4724
+ if (state.tokenize) {
4725
+ const result = $TOKEN("MatchingProperty", state, MatchingProperty$0(state) || MatchingProperty$1(state) || MatchingProperty$2(state));
4726
+ if (state.events)
4727
+ state.events.exit?.("MatchingProperty", state, result, eventData);
4728
+ return result;
4729
+ } else {
4730
+ const result = MatchingProperty$0(state) || MatchingProperty$1(state) || MatchingProperty$2(state);
4731
+ if (state.events)
4732
+ state.events.exit?.("MatchingProperty", state, result, eventData);
4733
+ return result;
4734
+ }
4735
+ }
4736
+ var MatchingRestProperty$0 = BindingRestProperty;
4737
+ function MatchingRestProperty(state) {
4738
+ let eventData;
4739
+ if (state.events) {
4740
+ const result = state.events.enter?.("MatchingRestProperty", state);
4741
+ if (result) {
4742
+ if (result.cache)
4743
+ return result.cache;
4744
+ eventData = result.data;
4745
+ }
4746
+ }
4747
+ if (state.tokenize) {
4748
+ const result = $TOKEN("MatchingRestProperty", state, MatchingRestProperty$0(state));
4749
+ if (state.events)
4750
+ state.events.exit?.("MatchingRestProperty", state, result, eventData);
4751
+ return result;
4752
+ } else {
4753
+ const result = MatchingRestProperty$0(state);
4754
+ if (state.events)
4755
+ state.events.exit?.("MatchingRestProperty", state, result, eventData);
4756
+ return result;
4757
+ }
4758
+ }
4759
+ var ArrayMatchingPattern$0 = $TS($S($E(_), OpenBracket, ArrayMatchingPatternContent, __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4760
+ var ws = $1;
4761
+ var elements = $3;
4762
+ return {
4763
+ type: "ArrayMatchingPattern",
4764
+ children: $0,
4765
+ elements: elements.children,
4766
+ length: elements.length
4767
+ };
4768
+ });
4769
+ function ArrayMatchingPattern(state) {
4770
+ let eventData;
4771
+ if (state.events) {
4772
+ const result = state.events.enter?.("ArrayMatchingPattern", state);
4773
+ if (result) {
4774
+ if (result.cache)
4775
+ return result.cache;
4776
+ eventData = result.data;
4777
+ }
4778
+ }
4779
+ if (state.tokenize) {
4780
+ const result = $TOKEN("ArrayMatchingPattern", state, ArrayMatchingPattern$0(state));
4781
+ if (state.events)
4782
+ state.events.exit?.("ArrayMatchingPattern", state, result, eventData);
4783
+ return result;
4784
+ } else {
4785
+ const result = ArrayMatchingPattern$0(state);
4786
+ if (state.events)
4787
+ state.events.exit?.("ArrayMatchingPattern", state, result, eventData);
4788
+ return result;
4789
+ }
4790
+ }
4791
+ var ArrayMatchingPatternContent$0 = NestedMatchingElements;
4792
+ var ArrayMatchingPatternContent$1 = $TV($E(MatchingElementList), function($skip, $loc, $0, $1) {
4793
+ var elements = $0;
4794
+ if (!elements)
4795
+ return { children: [], names: [], length: 0 };
4796
+ return module2.adjustBindingElements(elements);
4797
+ });
4798
+ function ArrayMatchingPatternContent(state) {
4799
+ let eventData;
4800
+ if (state.events) {
4801
+ const result = state.events.enter?.("ArrayMatchingPatternContent", state);
4802
+ if (result) {
4803
+ if (result.cache)
4804
+ return result.cache;
4805
+ eventData = result.data;
4806
+ }
4807
+ }
4808
+ if (state.tokenize) {
4809
+ const result = $TOKEN("ArrayMatchingPatternContent", state, ArrayMatchingPatternContent$0(state) || ArrayMatchingPatternContent$1(state));
4810
+ if (state.events)
4811
+ state.events.exit?.("ArrayMatchingPatternContent", state, result, eventData);
4812
+ return result;
4813
+ } else {
4814
+ const result = ArrayMatchingPatternContent$0(state) || ArrayMatchingPatternContent$1(state);
4815
+ if (state.events)
4816
+ state.events.exit?.("ArrayMatchingPatternContent", state, result, eventData);
4817
+ return result;
4818
+ }
4819
+ }
4820
+ var NestedMatchingElements$0 = $TS($S(PushIndent, $Q(NestedMatchingElementList), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
4821
+ var elements = $2;
4822
+ return module2.adjustBindingElements(elements.flat());
4823
+ });
4824
+ function NestedMatchingElements(state) {
4825
+ let eventData;
4826
+ if (state.events) {
4827
+ const result = state.events.enter?.("NestedMatchingElements", state);
4828
+ if (result) {
4829
+ if (result.cache)
4830
+ return result.cache;
4831
+ eventData = result.data;
4832
+ }
4833
+ }
4834
+ if (state.tokenize) {
4835
+ const result = $TOKEN("NestedMatchingElements", state, NestedMatchingElements$0(state));
4836
+ if (state.events)
4837
+ state.events.exit?.("NestedMatchingElements", state, result, eventData);
4838
+ return result;
4839
+ } else {
4840
+ const result = NestedMatchingElements$0(state);
4841
+ if (state.events)
4842
+ state.events.exit?.("NestedMatchingElements", state, result, eventData);
4843
+ return result;
4844
+ }
4845
+ }
4846
+ var MatchingElementList$0 = $TV($P($S(MatchingElement, ArrayElementDelimiter)), function($skip, $loc, $0, $1) {
4847
+ var elements = $0;
4848
+ return elements.map(([element, delim]) => {
4849
+ return {
4850
+ ...element,
4851
+ children: [...element.children, delim]
4852
+ };
4853
+ });
4854
+ });
4855
+ function MatchingElementList(state) {
4327
4856
  let eventData;
4328
4857
  if (state.events) {
4329
- const result = state.events.enter?.("NestedBindingElement", state);
4858
+ const result = state.events.enter?.("MatchingElementList", state);
4330
4859
  if (result) {
4331
4860
  if (result.cache)
4332
4861
  return result.cache;
@@ -4334,28 +4863,33 @@ ${input.slice(result.pos)}
4334
4863
  }
4335
4864
  }
4336
4865
  if (state.tokenize) {
4337
- const result = $TOKEN("NestedBindingElement", state, NestedBindingElement$0(state));
4866
+ const result = $TOKEN("MatchingElementList", state, MatchingElementList$0(state));
4338
4867
  if (state.events)
4339
- state.events.exit?.("NestedBindingElement", state, result, eventData);
4868
+ state.events.exit?.("MatchingElementList", state, result, eventData);
4340
4869
  return result;
4341
4870
  } else {
4342
- const result = NestedBindingElement$0(state);
4871
+ const result = MatchingElementList$0(state);
4343
4872
  if (state.events)
4344
- state.events.exit?.("NestedBindingElement", state, result, eventData);
4873
+ state.events.exit?.("MatchingElementList", state, result, eventData);
4345
4874
  return result;
4346
4875
  }
4347
4876
  }
4348
- var BindingElement$0 = $TS($S($C(BindingIdentifier, BindingPattern), $E(Initializer), ArrayElementDelimiter), function($skip, $loc, $0, $1, $2, $3) {
4349
- var binding = $1;
4350
- return {
4351
- names: binding.names,
4352
- children: $0
4353
- };
4877
+ var NestedMatchingElementList$0 = $TS($S(Nested, MatchingElementList), function($skip, $loc, $0, $1, $2) {
4878
+ var ws = $1;
4879
+ var elements = $2;
4880
+ return elements.map((element, i) => {
4881
+ if (i > 0)
4882
+ return element;
4883
+ return {
4884
+ ...element,
4885
+ children: [ws, ...element.children]
4886
+ };
4887
+ });
4354
4888
  });
4355
- function BindingElement(state) {
4889
+ function NestedMatchingElementList(state) {
4356
4890
  let eventData;
4357
4891
  if (state.events) {
4358
- const result = state.events.enter?.("BindingElement", state);
4892
+ const result = state.events.enter?.("NestedMatchingElementList", state);
4359
4893
  if (result) {
4360
4894
  if (result.cache)
4361
4895
  return result.cache;
@@ -4363,39 +4897,61 @@ ${input.slice(result.pos)}
4363
4897
  }
4364
4898
  }
4365
4899
  if (state.tokenize) {
4366
- const result = $TOKEN("BindingElement", state, BindingElement$0(state));
4900
+ const result = $TOKEN("NestedMatchingElementList", state, NestedMatchingElementList$0(state));
4367
4901
  if (state.events)
4368
- state.events.exit?.("BindingElement", state, result, eventData);
4902
+ state.events.exit?.("NestedMatchingElementList", state, result, eventData);
4369
4903
  return result;
4370
4904
  } else {
4371
- const result = BindingElement$0(state);
4905
+ const result = NestedMatchingElementList$0(state);
4372
4906
  if (state.events)
4373
- state.events.exit?.("BindingElement", state, result, eventData);
4907
+ state.events.exit?.("NestedMatchingElementList", state, result, eventData);
4374
4908
  return result;
4375
4909
  }
4376
4910
  }
4377
- var BindingRestElement$0 = $TS($S(__, DotDotDot, $C(BindingIdentifier, BindingPattern, EmptyBindingPattern)), function($skip, $loc, $0, $1, $2, $3) {
4911
+ var MatchingElement$0 = MatchingRestElement;
4912
+ var MatchingElement$1 = $TS($S($E(_), BindingIdentifier, __, Colon, $E(_), $C(BindingIdentifier, MatchingPattern)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
4378
4913
  var ws = $1;
4379
- var dots = $2;
4380
- var binding = $3;
4914
+ var name = $2;
4915
+ var match = $6;
4916
+ let blockPrefix;
4917
+ switch (match.type) {
4918
+ case "ArrayMatchingPattern":
4919
+ case "ObjectMatchingPattern":
4920
+ blockPrefix = [match, " = ", name];
4921
+ break;
4922
+ default:
4923
+ break;
4924
+ }
4381
4925
  return {
4382
- ...binding,
4383
- children: [...ws, dots, ...binding.children]
4926
+ names: name.names,
4927
+ children: [ws, {
4928
+ type: "BindingMatchElement",
4929
+ name,
4930
+ match,
4931
+ children: [name],
4932
+ blockPrefix
4933
+ }]
4384
4934
  };
4385
4935
  });
4386
- var BindingRestElement$1 = $TS($S(__, $C(BindingIdentifier, BindingPattern), DotDotDot), function($skip, $loc, $0, $1, $2, $3) {
4936
+ var MatchingElement$2 = $TS($S($E(_), $C(BindingIdentifier, MatchingPattern)), function($skip, $loc, $0, $1, $2) {
4387
4937
  var ws = $1;
4388
4938
  var binding = $2;
4389
- var dots = $3;
4390
4939
  return {
4391
- ...binding,
4392
- children: [...ws, dots, ...binding.children]
4940
+ names: binding.names,
4941
+ children: [ws, binding]
4393
4942
  };
4394
4943
  });
4395
- function BindingRestElement(state) {
4944
+ var MatchingElement$3 = $TV($EXPECT($L17, fail, 'MatchingElement ""'), function($skip, $loc, $0, $1) {
4945
+ return {
4946
+ type: "ElisionElement",
4947
+ children: [],
4948
+ names: []
4949
+ };
4950
+ });
4951
+ function MatchingElement(state) {
4396
4952
  let eventData;
4397
4953
  if (state.events) {
4398
- const result = state.events.enter?.("BindingRestElement", state);
4954
+ const result = state.events.enter?.("MatchingElement", state);
4399
4955
  if (result) {
4400
4956
  if (result.cache)
4401
4957
  return result.cache;
@@ -4403,34 +4959,22 @@ ${input.slice(result.pos)}
4403
4959
  }
4404
4960
  }
4405
4961
  if (state.tokenize) {
4406
- const result = $TOKEN("BindingRestElement", state, BindingRestElement$0(state) || BindingRestElement$1(state));
4962
+ const result = $TOKEN("MatchingElement", state, MatchingElement$0(state) || MatchingElement$1(state) || MatchingElement$2(state) || MatchingElement$3(state));
4407
4963
  if (state.events)
4408
- state.events.exit?.("BindingRestElement", state, result, eventData);
4964
+ state.events.exit?.("MatchingElement", state, result, eventData);
4409
4965
  return result;
4410
4966
  } else {
4411
- const result = BindingRestElement$0(state) || BindingRestElement$1(state);
4967
+ const result = MatchingElement$0(state) || MatchingElement$1(state) || MatchingElement$2(state) || MatchingElement$3(state);
4412
4968
  if (state.events)
4413
- state.events.exit?.("BindingRestElement", state, result, eventData);
4969
+ state.events.exit?.("MatchingElement", state, result, eventData);
4414
4970
  return result;
4415
4971
  }
4416
4972
  }
4417
- var EmptyBindingPattern$0 = $TV($EXPECT($L16, fail, 'EmptyBindingPattern ""'), function($skip, $loc, $0, $1) {
4418
- const ref = {
4419
- type: "Ref",
4420
- base: "ref",
4421
- id: "ref"
4422
- };
4423
- return {
4424
- type: "EmptyBinding",
4425
- children: [ref],
4426
- names: [],
4427
- ref
4428
- };
4429
- });
4430
- function EmptyBindingPattern(state) {
4973
+ var MatchingRestElement$0 = BindingRestElement;
4974
+ function MatchingRestElement(state) {
4431
4975
  let eventData;
4432
4976
  if (state.events) {
4433
- const result = state.events.enter?.("EmptyBindingPattern", state);
4977
+ const result = state.events.enter?.("MatchingRestElement", state);
4434
4978
  if (result) {
4435
4979
  if (result.cache)
4436
4980
  return result.cache;
@@ -4438,14 +4982,14 @@ ${input.slice(result.pos)}
4438
4982
  }
4439
4983
  }
4440
4984
  if (state.tokenize) {
4441
- const result = $TOKEN("EmptyBindingPattern", state, EmptyBindingPattern$0(state));
4985
+ const result = $TOKEN("MatchingRestElement", state, MatchingRestElement$0(state));
4442
4986
  if (state.events)
4443
- state.events.exit?.("EmptyBindingPattern", state, result, eventData);
4987
+ state.events.exit?.("MatchingRestElement", state, result, eventData);
4444
4988
  return result;
4445
4989
  } else {
4446
- const result = EmptyBindingPattern$0(state);
4990
+ const result = MatchingRestElement$0(state);
4447
4991
  if (state.events)
4448
- state.events.exit?.("EmptyBindingPattern", state, result, eventData);
4992
+ state.events.exit?.("MatchingRestElement", state, result, eventData);
4449
4993
  return result;
4450
4994
  }
4451
4995
  }
@@ -4576,6 +5120,101 @@ ${input.slice(result.pos)}
4576
5120
  return result;
4577
5121
  }
4578
5122
  }
5123
+ var OperatorDeclaration$0 = $TS($S(Operator, _, LexicalDeclaration), function($skip, $loc, $0, $1, $2, $3) {
5124
+ var op = $1;
5125
+ var w = $2;
5126
+ var decl = $3;
5127
+ decl.names.forEach((name) => module2.operators.add(name));
5128
+ return [module2.insertTrimmingSpace(w, ""), decl];
5129
+ });
5130
+ var OperatorDeclaration$1 = $TS($S(OperatorSignature, BracedBlock), function($skip, $loc, $0, $1, $2) {
5131
+ var signature = $1;
5132
+ var block = $2;
5133
+ module2.operators.add(signature.id.name);
5134
+ return {
5135
+ ...signature,
5136
+ type: "FunctionExpression",
5137
+ children: [...signature.children, block],
5138
+ block,
5139
+ operator: true
5140
+ };
5141
+ });
5142
+ var OperatorDeclaration$2 = $TS($S(Operator, _, Identifier, $Q($S(CommaDelimiter, $E(_), Identifier))), function($skip, $loc, $0, $1, $2, $3, $4) {
5143
+ var op = $1;
5144
+ var w1 = $2;
5145
+ var id = $3;
5146
+ var ids = $4;
5147
+ module2.operators.add(id.name);
5148
+ ids.forEach(([, , id2]) => module2.operators.add(id2.name));
5149
+ return [];
5150
+ });
5151
+ function OperatorDeclaration(state) {
5152
+ let eventData;
5153
+ if (state.events) {
5154
+ const result = state.events.enter?.("OperatorDeclaration", state);
5155
+ if (result) {
5156
+ if (result.cache)
5157
+ return result.cache;
5158
+ eventData = result.data;
5159
+ }
5160
+ }
5161
+ if (state.tokenize) {
5162
+ const result = $TOKEN("OperatorDeclaration", state, OperatorDeclaration$0(state) || OperatorDeclaration$1(state) || OperatorDeclaration$2(state));
5163
+ if (state.events)
5164
+ state.events.exit?.("OperatorDeclaration", state, result, eventData);
5165
+ return result;
5166
+ } else {
5167
+ const result = OperatorDeclaration$0(state) || OperatorDeclaration$1(state) || OperatorDeclaration$2(state);
5168
+ if (state.events)
5169
+ state.events.exit?.("OperatorDeclaration", state, result, eventData);
5170
+ return result;
5171
+ }
5172
+ }
5173
+ var OperatorSignature$0 = $TS($S(Operator, $E($S(_, Function)), _, Identifier, $E(_), NonEmptyParameters, $E(ReturnTypeSuffix)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
5174
+ var op = $1;
5175
+ var func = $2;
5176
+ var w1 = $3;
5177
+ var id = $4;
5178
+ var w2 = $5;
5179
+ var parameters = $6;
5180
+ var suffix = $7;
5181
+ if (!func) {
5182
+ func = { $loc: op.$loc, token: "function" };
5183
+ } else {
5184
+ func = [module2.insertTrimmingSpace(func[0], ""), func[1]];
5185
+ }
5186
+ return {
5187
+ type: "FunctionSignature",
5188
+ id,
5189
+ parameters,
5190
+ returnType: suffix?.children?.[1]?.[0]?.[1]?.token,
5191
+ ts: false,
5192
+ block: null,
5193
+ children: [func, w1, id, w2, parameters, suffix]
5194
+ };
5195
+ });
5196
+ function OperatorSignature(state) {
5197
+ let eventData;
5198
+ if (state.events) {
5199
+ const result = state.events.enter?.("OperatorSignature", state);
5200
+ if (result) {
5201
+ if (result.cache)
5202
+ return result.cache;
5203
+ eventData = result.data;
5204
+ }
5205
+ }
5206
+ if (state.tokenize) {
5207
+ const result = $TOKEN("OperatorSignature", state, OperatorSignature$0(state));
5208
+ if (state.events)
5209
+ state.events.exit?.("OperatorSignature", state, result, eventData);
5210
+ return result;
5211
+ } else {
5212
+ const result = OperatorSignature$0(state);
5213
+ if (state.events)
5214
+ state.events.exit?.("OperatorSignature", state, result, eventData);
5215
+ return result;
5216
+ }
5217
+ }
4579
5218
  var AmpersandBlockRHS$0 = $TS($S($E($S($N(_), $P(CallExpressionRest))), $E($S($N($EXPECT($R2, fail, "AmpersandBlockRHS /[&]/")), $P(BinaryOpRHS)))), function($skip, $loc, $0, $1, $2) {
4580
5219
  var callExpRest = $1;
4581
5220
  var binopRHS = $2;
@@ -4690,7 +5329,7 @@ ${input.slice(result.pos)}
4690
5329
  return result;
4691
5330
  }
4692
5331
  }
4693
- var Arrow$0 = $TV($EXPECT($L18, fail, 'Arrow "->"'), function($skip, $loc, $0, $1) {
5332
+ var Arrow$0 = $TV($EXPECT($L19, fail, 'Arrow "->"'), function($skip, $loc, $0, $1) {
4694
5333
  return { $loc, token: $1 };
4695
5334
  });
4696
5335
  function Arrow(state) {
@@ -4900,6 +5539,37 @@ ${input.slice(result.pos)}
4900
5539
  return result;
4901
5540
  }
4902
5541
  }
5542
+ var EmptyBareBlock$0 = $TV($EXPECT($L17, fail, 'EmptyBareBlock ""'), function($skip, $loc, $0, $1) {
5543
+ const expressions = [];
5544
+ return {
5545
+ type: "BlockStatement",
5546
+ expressions,
5547
+ children: [expressions],
5548
+ bare: true
5549
+ };
5550
+ });
5551
+ function EmptyBareBlock(state) {
5552
+ let eventData;
5553
+ if (state.events) {
5554
+ const result = state.events.enter?.("EmptyBareBlock", state);
5555
+ if (result) {
5556
+ if (result.cache)
5557
+ return result.cache;
5558
+ eventData = result.data;
5559
+ }
5560
+ }
5561
+ if (state.tokenize) {
5562
+ const result = $TOKEN("EmptyBareBlock", state, EmptyBareBlock$0(state));
5563
+ if (state.events)
5564
+ state.events.exit?.("EmptyBareBlock", state, result, eventData);
5565
+ return result;
5566
+ } else {
5567
+ const result = EmptyBareBlock$0(state);
5568
+ if (state.events)
5569
+ state.events.exit?.("EmptyBareBlock", state, result, eventData);
5570
+ return result;
5571
+ }
5572
+ }
4903
5573
  var BracedBlock$0 = $TS($S($Q(TrailingComment), OpenBrace, BracedContent, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4904
5574
  var block = $3;
4905
5575
  return {
@@ -4998,7 +5668,7 @@ ${input.slice(result.pos)}
4998
5668
  children: [$1, expressions]
4999
5669
  };
5000
5670
  });
5001
- var BracedContent$2 = $TV($Y($S(__, $EXPECT($L19, fail, 'BracedContent "}"'))), function($skip, $loc, $0, $1) {
5671
+ var BracedContent$2 = $TV($Y($S(__, $EXPECT($L20, fail, 'BracedContent "}"'))), function($skip, $loc, $0, $1) {
5002
5672
  const expressions = [];
5003
5673
  return {
5004
5674
  type: "BlockStatement",
@@ -5143,7 +5813,7 @@ ${input.slice(result.pos)}
5143
5813
  return result;
5144
5814
  }
5145
5815
  }
5146
- var NullLiteral$0 = $TS($S($EXPECT($L20, fail, 'NullLiteral "null"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5816
+ var NullLiteral$0 = $TS($S($EXPECT($L21, fail, 'NullLiteral "null"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5147
5817
  return { $loc, token: $1 };
5148
5818
  });
5149
5819
  function NullLiteral(state) {
@@ -5171,7 +5841,7 @@ ${input.slice(result.pos)}
5171
5841
  var BooleanLiteral$0 = $T($S(CoffeeBooleansEnabled, CoffeeScriptBooleanLiteral), function(value) {
5172
5842
  return value[1];
5173
5843
  });
5174
- var BooleanLiteral$1 = $TS($S($C($EXPECT($L21, fail, 'BooleanLiteral "true"'), $EXPECT($L22, fail, 'BooleanLiteral "false"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5844
+ var BooleanLiteral$1 = $TS($S($C($EXPECT($L22, fail, 'BooleanLiteral "true"'), $EXPECT($L23, fail, 'BooleanLiteral "false"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5175
5845
  return { $loc, token: $1 };
5176
5846
  });
5177
5847
  function BooleanLiteral(state) {
@@ -5196,10 +5866,10 @@ ${input.slice(result.pos)}
5196
5866
  return result;
5197
5867
  }
5198
5868
  }
5199
- var CoffeeScriptBooleanLiteral$0 = $TS($S($C($EXPECT($L23, fail, 'CoffeeScriptBooleanLiteral "yes"'), $EXPECT($L24, fail, 'CoffeeScriptBooleanLiteral "on"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5869
+ var CoffeeScriptBooleanLiteral$0 = $TS($S($C($EXPECT($L24, fail, 'CoffeeScriptBooleanLiteral "yes"'), $EXPECT($L25, fail, 'CoffeeScriptBooleanLiteral "on"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5200
5870
  return { $loc, token: "true" };
5201
5871
  });
5202
- var CoffeeScriptBooleanLiteral$1 = $TS($S($C($EXPECT($L25, fail, 'CoffeeScriptBooleanLiteral "no"'), $EXPECT($L26, fail, 'CoffeeScriptBooleanLiteral "off"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5872
+ var CoffeeScriptBooleanLiteral$1 = $TS($S($C($EXPECT($L26, fail, 'CoffeeScriptBooleanLiteral "no"'), $EXPECT($L27, fail, 'CoffeeScriptBooleanLiteral "off"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5203
5873
  return { $loc, token: "false" };
5204
5874
  });
5205
5875
  function CoffeeScriptBooleanLiteral(state) {
@@ -5224,31 +5894,6 @@ ${input.slice(result.pos)}
5224
5894
  return result;
5225
5895
  }
5226
5896
  }
5227
- var Comma$0 = $TV($EXPECT($L27, fail, 'Comma ","'), function($skip, $loc, $0, $1) {
5228
- return { $loc, token: $1 };
5229
- });
5230
- function Comma(state) {
5231
- let eventData;
5232
- if (state.events) {
5233
- const result = state.events.enter?.("Comma", state);
5234
- if (result) {
5235
- if (result.cache)
5236
- return result.cache;
5237
- eventData = result.data;
5238
- }
5239
- }
5240
- if (state.tokenize) {
5241
- const result = $TOKEN("Comma", state, Comma$0(state));
5242
- if (state.events)
5243
- state.events.exit?.("Comma", state, result, eventData);
5244
- return result;
5245
- } else {
5246
- const result = Comma$0(state);
5247
- if (state.events)
5248
- state.events.exit?.("Comma", state, result, eventData);
5249
- return result;
5250
- }
5251
- }
5252
5897
  var Identifier$0 = $T($S($N(ReservedWord), IdentifierName), function(value) {
5253
5898
  return value[1];
5254
5899
  });
@@ -6028,7 +6673,7 @@ ${input.slice(result.pos)}
6028
6673
  var ImplicitInlineObjectPropertyDelimiter$1 = $T($S($Y($S($C(Samedent, $Q(_)), NamedProperty)), InsertComma), function(value) {
6029
6674
  return value[1];
6030
6675
  });
6031
- var ImplicitInlineObjectPropertyDelimiter$2 = $T($Y($S(__, $C($EXPECT($L31, fail, 'ImplicitInlineObjectPropertyDelimiter ":"'), $EXPECT($L17, fail, 'ImplicitInlineObjectPropertyDelimiter ")"'), $EXPECT($L30, fail, 'ImplicitInlineObjectPropertyDelimiter "]"'), $EXPECT($L19, fail, 'ImplicitInlineObjectPropertyDelimiter "}"'), ReservedWord))), function(value) {
6676
+ var ImplicitInlineObjectPropertyDelimiter$2 = $T($Y($S(__, $C($EXPECT($L31, fail, 'ImplicitInlineObjectPropertyDelimiter ":"'), $EXPECT($L18, fail, 'ImplicitInlineObjectPropertyDelimiter ")"'), $EXPECT($L30, fail, 'ImplicitInlineObjectPropertyDelimiter "]"'), $EXPECT($L20, fail, 'ImplicitInlineObjectPropertyDelimiter "}"'), ReservedWord))), function(value) {
6032
6677
  return "";
6033
6678
  });
6034
6679
  var ImplicitInlineObjectPropertyDelimiter$3 = $T($Y(EOS), function(value) {
@@ -6057,7 +6702,7 @@ ${input.slice(result.pos)}
6057
6702
  }
6058
6703
  }
6059
6704
  var ObjectPropertyDelimiter$0 = $S($Q(_), Comma);
6060
- var ObjectPropertyDelimiter$1 = $Y($S(__, $EXPECT($L19, fail, 'ObjectPropertyDelimiter "}"')));
6705
+ var ObjectPropertyDelimiter$1 = $Y($S(__, $EXPECT($L20, fail, 'ObjectPropertyDelimiter "}"')));
6061
6706
  var ObjectPropertyDelimiter$2 = $T($S($Y(EOS), InsertComma), function(value) {
6062
6707
  return value[1];
6063
6708
  });
@@ -6126,7 +6771,15 @@ ${input.slice(result.pos)}
6126
6771
  value
6127
6772
  };
6128
6773
  });
6129
- var PropertyDefinition$1 = $TS($S(__, $TEXT($EXPECT($R5, fail, "PropertyDefinition /[!+-]/")), IdentifierName), function($skip, $loc, $0, $1, $2, $3) {
6774
+ var PropertyDefinition$1 = $TS($S(__, NamedProperty), function($skip, $loc, $0, $1, $2) {
6775
+ var ws = $1;
6776
+ var prop = $2;
6777
+ return {
6778
+ ...prop,
6779
+ children: [...ws, ...prop.children]
6780
+ };
6781
+ });
6782
+ var PropertyDefinition$2 = $TS($S(__, $TEXT($EXPECT($R5, fail, "PropertyDefinition /[!+-]/")), PropertyName), function($skip, $loc, $0, $1, $2, $3) {
6130
6783
  var ws = $1;
6131
6784
  var toggle = $2;
6132
6785
  var id = $3;
@@ -6139,14 +6792,6 @@ ${input.slice(result.pos)}
6139
6792
  value
6140
6793
  };
6141
6794
  });
6142
- var PropertyDefinition$2 = $TS($S(__, NamedProperty), function($skip, $loc, $0, $1, $2) {
6143
- var ws = $1;
6144
- var prop = $2;
6145
- return {
6146
- ...prop,
6147
- children: [...ws, ...prop.children]
6148
- };
6149
- });
6150
6795
  var PropertyDefinition$3 = $TS($S(__, MethodDefinition), function($skip, $loc, $0, $1, $2) {
6151
6796
  var ws = $1;
6152
6797
  var def = $2;
@@ -6289,9 +6934,9 @@ ${input.slice(result.pos)}
6289
6934
  }
6290
6935
  }
6291
6936
  var PropertyName$0 = NumericLiteral;
6292
- var PropertyName$1 = StringLiteral;
6293
- var PropertyName$2 = IdentifierName;
6294
- var PropertyName$3 = ComputedPropertyName;
6937
+ var PropertyName$1 = ComputedPropertyName;
6938
+ var PropertyName$2 = StringLiteral;
6939
+ var PropertyName$3 = IdentifierName;
6295
6940
  function PropertyName(state) {
6296
6941
  let eventData;
6297
6942
  if (state.events) {
@@ -6315,6 +6960,24 @@ ${input.slice(result.pos)}
6315
6960
  }
6316
6961
  }
6317
6962
  var ComputedPropertyName$0 = $TS($S(OpenBracket, ExtendedExpression, __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
6963
+ var expression = $2;
6964
+ return {
6965
+ type: "ComputedPropertyName",
6966
+ children: $0,
6967
+ expression
6968
+ };
6969
+ });
6970
+ var ComputedPropertyName$1 = $TS($S(InsertOpenBracket, TemplateLiteral, InsertCloseBracket), function($skip, $loc, $0, $1, $2, $3) {
6971
+ var expression = $2;
6972
+ if ($2.type === "StringLiteral")
6973
+ return $2;
6974
+ return {
6975
+ type: "ComputedPropertyName",
6976
+ children: $0,
6977
+ expression
6978
+ };
6979
+ });
6980
+ var ComputedPropertyName$2 = $TS($S(InsertOpenBracket, $EXPECT($L14, fail, 'ComputedPropertyName "-"'), NumericLiteral, InsertCloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
6318
6981
  return {
6319
6982
  type: "ComputedPropertyName",
6320
6983
  children: $0
@@ -6331,12 +6994,12 @@ ${input.slice(result.pos)}
6331
6994
  }
6332
6995
  }
6333
6996
  if (state.tokenize) {
6334
- const result = $TOKEN("ComputedPropertyName", state, ComputedPropertyName$0(state));
6997
+ const result = $TOKEN("ComputedPropertyName", state, ComputedPropertyName$0(state) || ComputedPropertyName$1(state) || ComputedPropertyName$2(state));
6335
6998
  if (state.events)
6336
6999
  state.events.exit?.("ComputedPropertyName", state, result, eventData);
6337
7000
  return result;
6338
7001
  } else {
6339
- const result = ComputedPropertyName$0(state);
7002
+ const result = ComputedPropertyName$0(state) || ComputedPropertyName$1(state) || ComputedPropertyName$2(state);
6340
7003
  if (state.events)
6341
7004
  state.events.exit?.("ComputedPropertyName", state, result, eventData);
6342
7005
  return result;
@@ -6532,7 +7195,7 @@ ${input.slice(result.pos)}
6532
7195
  return result;
6533
7196
  }
6534
7197
  }
6535
- var PrivateIdentifier$0 = $TV($TEXT($S($EXPECT($L9, fail, 'PrivateIdentifier "#"'), IdentifierName)), function($skip, $loc, $0, $1) {
7198
+ var PrivateIdentifier$0 = $TV($TEXT($S($EXPECT($L10, fail, 'PrivateIdentifier "#"'), IdentifierName)), function($skip, $loc, $0, $1) {
6536
7199
  return {
6537
7200
  type: "Identifier",
6538
7201
  name: $0,
@@ -6675,6 +7338,25 @@ ${input.slice(result.pos)}
6675
7338
  return { $loc, token: $1 };
6676
7339
  return $1;
6677
7340
  });
7341
+ var BinaryOp$1 = $TV(Identifier, function($skip, $loc, $0, $1) {
7342
+ var id = $0;
7343
+ if (!module2.operators.has(id.name))
7344
+ return $skip;
7345
+ return {
7346
+ call: id,
7347
+ special: true
7348
+ };
7349
+ });
7350
+ var BinaryOp$2 = $TS($S($EXPECT($L50, fail, 'BinaryOp "not"'), NonIdContinue, __, Identifier), function($skip, $loc, $0, $1, $2, $3, $4) {
7351
+ var id = $4;
7352
+ if (!module2.operators.has(id.name))
7353
+ return $skip;
7354
+ return {
7355
+ call: id,
7356
+ special: true,
7357
+ negated: true
7358
+ };
7359
+ });
6678
7360
  function BinaryOp(state) {
6679
7361
  let eventData;
6680
7362
  if (state.events) {
@@ -6686,32 +7368,32 @@ ${input.slice(result.pos)}
6686
7368
  }
6687
7369
  }
6688
7370
  if (state.tokenize) {
6689
- const result = $TOKEN("BinaryOp", state, BinaryOp$0(state));
7371
+ const result = $TOKEN("BinaryOp", state, BinaryOp$0(state) || BinaryOp$1(state) || BinaryOp$2(state));
6690
7372
  if (state.events)
6691
7373
  state.events.exit?.("BinaryOp", state, result, eventData);
6692
7374
  return result;
6693
7375
  } else {
6694
- const result = BinaryOp$0(state);
7376
+ const result = BinaryOp$0(state) || BinaryOp$1(state) || BinaryOp$2(state);
6695
7377
  if (state.events)
6696
7378
  state.events.exit?.("BinaryOp", state, result, eventData);
6697
7379
  return result;
6698
7380
  }
6699
7381
  }
6700
- var BinaryOpSymbol$0 = $EXPECT($L50, fail, 'BinaryOpSymbol "**"');
6701
- var BinaryOpSymbol$1 = $EXPECT($L51, fail, 'BinaryOpSymbol "*"');
6702
- var BinaryOpSymbol$2 = $EXPECT($L52, fail, 'BinaryOpSymbol "/"');
6703
- var BinaryOpSymbol$3 = $TV($EXPECT($L53, fail, 'BinaryOpSymbol "%%"'), function($skip, $loc, $0, $1) {
7382
+ var BinaryOpSymbol$0 = $EXPECT($L51, fail, 'BinaryOpSymbol "**"');
7383
+ var BinaryOpSymbol$1 = $EXPECT($L52, fail, 'BinaryOpSymbol "*"');
7384
+ var BinaryOpSymbol$2 = $EXPECT($L53, fail, 'BinaryOpSymbol "/"');
7385
+ var BinaryOpSymbol$3 = $TV($EXPECT($L54, fail, 'BinaryOpSymbol "%%"'), function($skip, $loc, $0, $1) {
6704
7386
  return {
6705
7387
  call: module2.getRef("modulo"),
6706
7388
  special: true
6707
7389
  };
6708
7390
  });
6709
- var BinaryOpSymbol$4 = $EXPECT($L54, fail, 'BinaryOpSymbol "%"');
6710
- var BinaryOpSymbol$5 = $EXPECT($L55, fail, 'BinaryOpSymbol "+"');
6711
- var BinaryOpSymbol$6 = $EXPECT($L13, fail, 'BinaryOpSymbol "-"');
6712
- var BinaryOpSymbol$7 = $EXPECT($L56, fail, 'BinaryOpSymbol "<="');
6713
- var BinaryOpSymbol$8 = $EXPECT($L57, fail, 'BinaryOpSymbol ">="');
6714
- var BinaryOpSymbol$9 = $TV($EXPECT($L58, fail, 'BinaryOpSymbol "<?"'), function($skip, $loc, $0, $1) {
7391
+ var BinaryOpSymbol$4 = $EXPECT($L55, fail, 'BinaryOpSymbol "%"');
7392
+ var BinaryOpSymbol$5 = $EXPECT($L56, fail, 'BinaryOpSymbol "+"');
7393
+ var BinaryOpSymbol$6 = $EXPECT($L14, fail, 'BinaryOpSymbol "-"');
7394
+ var BinaryOpSymbol$7 = $EXPECT($L57, fail, 'BinaryOpSymbol "<="');
7395
+ var BinaryOpSymbol$8 = $EXPECT($L58, fail, 'BinaryOpSymbol ">="');
7396
+ var BinaryOpSymbol$9 = $TV($EXPECT($L59, fail, 'BinaryOpSymbol "<?"'), function($skip, $loc, $0, $1) {
6715
7397
  return {
6716
7398
  $loc,
6717
7399
  token: "instanceof",
@@ -6719,7 +7401,7 @@ ${input.slice(result.pos)}
6719
7401
  special: true
6720
7402
  };
6721
7403
  });
6722
- var BinaryOpSymbol$10 = $TV($EXPECT($L59, fail, 'BinaryOpSymbol "!<?"'), function($skip, $loc, $0, $1) {
7404
+ var BinaryOpSymbol$10 = $TV($EXPECT($L60, fail, 'BinaryOpSymbol "!<?"'), function($skip, $loc, $0, $1) {
6723
7405
  return {
6724
7406
  $loc,
6725
7407
  token: "instanceof",
@@ -6728,49 +7410,49 @@ ${input.slice(result.pos)}
6728
7410
  negated: true
6729
7411
  };
6730
7412
  });
6731
- var BinaryOpSymbol$11 = $EXPECT($L60, fail, 'BinaryOpSymbol "<<"');
7413
+ var BinaryOpSymbol$11 = $EXPECT($L61, fail, 'BinaryOpSymbol "<<"');
6732
7414
  var BinaryOpSymbol$12 = $TR($EXPECT($R6, fail, "BinaryOpSymbol /<(?!\\p{ID_Start}|[_$])/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
6733
7415
  return "<";
6734
7416
  });
6735
- var BinaryOpSymbol$13 = $EXPECT($L61, fail, 'BinaryOpSymbol ">>>"');
6736
- var BinaryOpSymbol$14 = $EXPECT($L62, fail, 'BinaryOpSymbol ">>"');
7417
+ var BinaryOpSymbol$13 = $EXPECT($L62, fail, 'BinaryOpSymbol ">>>"');
7418
+ var BinaryOpSymbol$14 = $EXPECT($L63, fail, 'BinaryOpSymbol ">>"');
6737
7419
  var BinaryOpSymbol$15 = $EXPECT($L29, fail, 'BinaryOpSymbol ">"');
6738
- var BinaryOpSymbol$16 = $EXPECT($L63, fail, 'BinaryOpSymbol "!=="');
6739
- var BinaryOpSymbol$17 = $TV($EXPECT($L64, fail, 'BinaryOpSymbol "!="'), function($skip, $loc, $0, $1) {
7420
+ var BinaryOpSymbol$16 = $EXPECT($L64, fail, 'BinaryOpSymbol "!=="');
7421
+ var BinaryOpSymbol$17 = $TV($EXPECT($L65, fail, 'BinaryOpSymbol "!="'), function($skip, $loc, $0, $1) {
6740
7422
  if (module2.config.coffeeEq)
6741
7423
  return "!==";
6742
7424
  return $1;
6743
7425
  });
6744
- var BinaryOpSymbol$18 = $TS($S($EXPECT($L65, fail, 'BinaryOpSymbol "isnt"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
7426
+ var BinaryOpSymbol$18 = $TS($S($EXPECT($L66, fail, 'BinaryOpSymbol "isnt"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
6745
7427
  if (module2.config.coffeeIsnt)
6746
7428
  return "!==";
6747
7429
  return $skip;
6748
7430
  });
6749
- var BinaryOpSymbol$19 = $EXPECT($L66, fail, 'BinaryOpSymbol "==="');
6750
- var BinaryOpSymbol$20 = $TV($EXPECT($L67, fail, 'BinaryOpSymbol "=="'), function($skip, $loc, $0, $1) {
7431
+ var BinaryOpSymbol$19 = $EXPECT($L67, fail, 'BinaryOpSymbol "==="');
7432
+ var BinaryOpSymbol$20 = $TV($EXPECT($L68, fail, 'BinaryOpSymbol "=="'), function($skip, $loc, $0, $1) {
6751
7433
  if (module2.config.coffeeEq)
6752
7434
  return "===";
6753
7435
  return $1;
6754
7436
  });
6755
- var BinaryOpSymbol$21 = $T($S($EXPECT($L68, fail, 'BinaryOpSymbol "and"'), NonIdContinue), function(value) {
7437
+ var BinaryOpSymbol$21 = $T($S($EXPECT($L69, fail, 'BinaryOpSymbol "and"'), NonIdContinue), function(value) {
6756
7438
  return "&&";
6757
7439
  });
6758
- var BinaryOpSymbol$22 = $EXPECT($L69, fail, 'BinaryOpSymbol "&&"');
6759
- var BinaryOpSymbol$23 = $T($S(CoffeeOfEnabled, $EXPECT($L70, fail, 'BinaryOpSymbol "of"'), NonIdContinue), function(value) {
7440
+ var BinaryOpSymbol$22 = $EXPECT($L70, fail, 'BinaryOpSymbol "&&"');
7441
+ var BinaryOpSymbol$23 = $T($S(CoffeeOfEnabled, $EXPECT($L71, fail, 'BinaryOpSymbol "of"'), NonIdContinue), function(value) {
6760
7442
  return "in";
6761
7443
  });
6762
- var BinaryOpSymbol$24 = $T($S($EXPECT($L71, fail, 'BinaryOpSymbol "or"'), NonIdContinue), function(value) {
7444
+ var BinaryOpSymbol$24 = $T($S($EXPECT($L72, fail, 'BinaryOpSymbol "or"'), NonIdContinue), function(value) {
6763
7445
  return "||";
6764
7446
  });
6765
- var BinaryOpSymbol$25 = $EXPECT($L72, fail, 'BinaryOpSymbol "||"');
6766
- var BinaryOpSymbol$26 = $EXPECT($L73, fail, 'BinaryOpSymbol "??"');
6767
- var BinaryOpSymbol$27 = $T($S(CoffeeBinaryExistentialEnabled, $EXPECT($L1, fail, 'BinaryOpSymbol "?"')), function(value) {
7447
+ var BinaryOpSymbol$25 = $EXPECT($L73, fail, 'BinaryOpSymbol "||"');
7448
+ var BinaryOpSymbol$26 = $EXPECT($L74, fail, 'BinaryOpSymbol "??"');
7449
+ var BinaryOpSymbol$27 = $T($S(CoffeeBinaryExistentialEnabled, $EXPECT($L2, fail, 'BinaryOpSymbol "?"')), function(value) {
6768
7450
  return "??";
6769
7451
  });
6770
- var BinaryOpSymbol$28 = $TS($S($EXPECT($L74, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
7452
+ var BinaryOpSymbol$28 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
6771
7453
  return $1;
6772
7454
  });
6773
- var BinaryOpSymbol$29 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7455
+ var BinaryOpSymbol$29 = $TS($S($EXPECT($L50, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L75, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
6774
7456
  return {
6775
7457
  $loc,
6776
7458
  token: "instanceof",
@@ -6779,7 +7461,7 @@ ${input.slice(result.pos)}
6779
7461
  negated: true
6780
7462
  };
6781
7463
  });
6782
- var BinaryOpSymbol$30 = $TV($C($S($N(CoffeeOfEnabled), $EXPECT($L75, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L76, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L75, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L70, fail, 'BinaryOpSymbol "of"'), NonIdContinue)), function($skip, $loc, $0, $1) {
7464
+ var BinaryOpSymbol$30 = $TV($C($S($N(CoffeeOfEnabled), $EXPECT($L50, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L76, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L50, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L71, fail, 'BinaryOpSymbol "of"'), NonIdContinue)), function($skip, $loc, $0, $1) {
6783
7465
  return {
6784
7466
  $loc,
6785
7467
  token: "in",
@@ -6804,7 +7486,7 @@ ${input.slice(result.pos)}
6804
7486
  special: true
6805
7487
  };
6806
7488
  });
6807
- var BinaryOpSymbol$33 = $TS($S($EXPECT($L77, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L75, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L76, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
7489
+ var BinaryOpSymbol$33 = $TS($S($EXPECT($L77, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L50, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L76, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
6808
7490
  return {
6809
7491
  method: "includes",
6810
7492
  relational: true,
@@ -6813,7 +7495,7 @@ ${input.slice(result.pos)}
6813
7495
  negated: true
6814
7496
  };
6815
7497
  });
6816
- var BinaryOpSymbol$34 = $TS($S(CoffeeOfEnabled, $EXPECT($L75, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L76, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
7498
+ var BinaryOpSymbol$34 = $TS($S(CoffeeOfEnabled, $EXPECT($L50, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L76, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
6817
7499
  return {
6818
7500
  call: [module2.getRef("indexOf"), ".call"],
6819
7501
  relational: true,
@@ -6822,7 +7504,7 @@ ${input.slice(result.pos)}
6822
7504
  special: true
6823
7505
  };
6824
7506
  });
6825
- var BinaryOpSymbol$35 = $TS($S($N(CoffeeNotEnabled), $EXPECT($L77, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L75, fail, 'BinaryOpSymbol "not"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
7507
+ var BinaryOpSymbol$35 = $TS($S($N(CoffeeNotEnabled), $EXPECT($L77, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L50, fail, 'BinaryOpSymbol "not"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
6826
7508
  if (module2.config.objectIs) {
6827
7509
  return {
6828
7510
  call: module2.getRef("is"),
@@ -6993,7 +7675,8 @@ ${input.slice(result.pos)}
6993
7675
  if ($1.type === "ObjectExpression") {
6994
7676
  return {
6995
7677
  type: "ParenthesizedExpression",
6996
- children: ["(", $1, ")"]
7678
+ children: ["(", $1, ")"],
7679
+ expression: $1
6997
7680
  };
6998
7681
  }
6999
7682
  return $1;
@@ -8182,6 +8865,7 @@ ${input.slice(result.pos)}
8182
8865
  return {
8183
8866
  type: "SwitchStatement",
8184
8867
  children: $0,
8868
+ expression: condition,
8185
8869
  caseBlock
8186
8870
  };
8187
8871
  });
@@ -8268,7 +8952,7 @@ ${input.slice(result.pos)}
8268
8952
  return result;
8269
8953
  }
8270
8954
  }
8271
- var CaseBlock$0 = $TS($S(__, OpenBrace, NestedCaseClauses, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8955
+ var CaseBlock$0 = $TS($S($E($C(Samedent, _)), OpenBrace, NestedCaseClauses, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8272
8956
  var clauses = $3;
8273
8957
  return {
8274
8958
  type: "CaseBlock",
@@ -8364,10 +9048,20 @@ ${input.slice(result.pos)}
8364
9048
  return result;
8365
9049
  }
8366
9050
  }
8367
- var CaseClause$0 = $T($S(Case, CaseExpressionList, $C(NestedBlockStatements, NoExpressions)), function(value) {
9051
+ var CaseClause$0 = $TS($S(MatchingPattern, $C(ThenClause, NestedBlockStatements, EmptyBareBlock)), function($skip, $loc, $0, $1, $2) {
9052
+ var pattern = $1;
9053
+ var block = $2;
9054
+ return {
9055
+ type: "PatternClause",
9056
+ children: $0,
9057
+ block,
9058
+ pattern
9059
+ };
9060
+ });
9061
+ var CaseClause$1 = $T($S(Case, CaseExpressionList, $C(NestedBlockStatements, EmptyBareBlock)), function(value) {
8368
9062
  return { "type": "CaseClause", "children": value };
8369
9063
  });
8370
- var CaseClause$1 = $TS($S(When, CaseExpressionList, InsertOpenBrace, $C(ThenClause, NestedBlockStatements, NoExpressions), InsertBreak, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
9064
+ var CaseClause$2 = $TS($S(When, CaseExpressionList, InsertOpenBrace, $C(ThenClause, NestedBlockStatements, EmptyBareBlock), InsertBreak, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
8371
9065
  var cases = $2;
8372
9066
  var block = $4;
8373
9067
  var b = $5;
@@ -8379,7 +9073,7 @@ ${input.slice(result.pos)}
8379
9073
  children: $0
8380
9074
  };
8381
9075
  });
8382
- var CaseClause$2 = $TS($S(Default, ImpliedColon, $C(NestedBlockStatements, NoExpressions)), function($skip, $loc, $0, $1, $2, $3) {
9076
+ var CaseClause$3 = $TS($S(Default, ImpliedColon, $C(NestedBlockStatements, EmptyBareBlock)), function($skip, $loc, $0, $1, $2, $3) {
8383
9077
  var block = $3;
8384
9078
  return {
8385
9079
  type: "DefaultClause",
@@ -8387,8 +9081,8 @@ ${input.slice(result.pos)}
8387
9081
  children: $0
8388
9082
  };
8389
9083
  });
8390
- var CaseClause$3 = $TS($S(Else, ImpliedColon, InsertOpenBrace, $C(NestedBlockStatements, SingleLineStatements), InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
8391
- var block = $4;
9084
+ var CaseClause$4 = $TS($S(Else, ImpliedColon, $C(ThenClause, BracedBlock, EmptyBlock)), function($skip, $loc, $0, $1, $2, $3) {
9085
+ var block = $3;
8392
9086
  $1.token = "default";
8393
9087
  return {
8394
9088
  type: "DefaultClause",
@@ -8407,12 +9101,12 @@ ${input.slice(result.pos)}
8407
9101
  }
8408
9102
  }
8409
9103
  if (state.tokenize) {
8410
- const result = $TOKEN("CaseClause", state, CaseClause$0(state) || CaseClause$1(state) || CaseClause$2(state) || CaseClause$3(state));
9104
+ const result = $TOKEN("CaseClause", state, CaseClause$0(state) || CaseClause$1(state) || CaseClause$2(state) || CaseClause$3(state) || CaseClause$4(state));
8411
9105
  if (state.events)
8412
9106
  state.events.exit?.("CaseClause", state, result, eventData);
8413
9107
  return result;
8414
9108
  } else {
8415
- const result = CaseClause$0(state) || CaseClause$1(state) || CaseClause$2(state) || CaseClause$3(state);
9109
+ const result = CaseClause$0(state) || CaseClause$1(state) || CaseClause$2(state) || CaseClause$3(state) || CaseClause$4(state);
8416
9110
  if (state.events)
8417
9111
  state.events.exit?.("CaseClause", state, result, eventData);
8418
9112
  return result;
@@ -8426,37 +9120,12 @@ ${input.slice(result.pos)}
8426
9120
  return ["case ", exp, col];
8427
9121
  });
8428
9122
  result.unshift($1);
8429
- return result;
8430
- });
8431
- function CaseExpressionList(state) {
8432
- let eventData;
8433
- if (state.events) {
8434
- const result = state.events.enter?.("CaseExpressionList", state);
8435
- if (result) {
8436
- if (result.cache)
8437
- return result.cache;
8438
- eventData = result.data;
8439
- }
8440
- }
8441
- if (state.tokenize) {
8442
- const result = $TOKEN("CaseExpressionList", state, CaseExpressionList$0(state));
8443
- if (state.events)
8444
- state.events.exit?.("CaseExpressionList", state, result, eventData);
8445
- return result;
8446
- } else {
8447
- const result = CaseExpressionList$0(state);
8448
- if (state.events)
8449
- state.events.exit?.("CaseExpressionList", state, result, eventData);
8450
- return result;
8451
- }
8452
- }
8453
- var NoExpressions$0 = $T($EXPECT($L16, fail, 'NoExpressions ""'), function(value) {
8454
- return [];
9123
+ return result;
8455
9124
  });
8456
- function NoExpressions(state) {
9125
+ function CaseExpressionList(state) {
8457
9126
  let eventData;
8458
9127
  if (state.events) {
8459
- const result = state.events.enter?.("NoExpressions", state);
9128
+ const result = state.events.enter?.("CaseExpressionList", state);
8460
9129
  if (result) {
8461
9130
  if (result.cache)
8462
9131
  return result.cache;
@@ -8464,19 +9133,19 @@ ${input.slice(result.pos)}
8464
9133
  }
8465
9134
  }
8466
9135
  if (state.tokenize) {
8467
- const result = $TOKEN("NoExpressions", state, NoExpressions$0(state));
9136
+ const result = $TOKEN("CaseExpressionList", state, CaseExpressionList$0(state));
8468
9137
  if (state.events)
8469
- state.events.exit?.("NoExpressions", state, result, eventData);
9138
+ state.events.exit?.("CaseExpressionList", state, result, eventData);
8470
9139
  return result;
8471
9140
  } else {
8472
- const result = NoExpressions$0(state);
9141
+ const result = CaseExpressionList$0(state);
8473
9142
  if (state.events)
8474
- state.events.exit?.("NoExpressions", state, result, eventData);
9143
+ state.events.exit?.("CaseExpressionList", state, result, eventData);
8475
9144
  return result;
8476
9145
  }
8477
9146
  }
8478
9147
  var ImpliedColon$0 = $S(__, Colon);
8479
- var ImpliedColon$1 = $TV($EXPECT($L16, fail, 'ImpliedColon ""'), function($skip, $loc, $0, $1) {
9148
+ var ImpliedColon$1 = $TV($EXPECT($L17, fail, 'ImpliedColon ""'), function($skip, $loc, $0, $1) {
8480
9149
  return { $loc, token: ":" };
8481
9150
  });
8482
9151
  function ImpliedColon(state) {
@@ -8668,13 +9337,15 @@ ${input.slice(result.pos)}
8668
9337
  });
8669
9338
  var Condition$1 = $TS($S(InsertOpenParen, ExpressionWithIndentedApplicationSuppressed, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
8670
9339
  var open = $1;
8671
- var exp = $2;
9340
+ var expression = $2;
8672
9341
  var close = $3;
8673
- if (exp.type === "ParenthesizedExpression")
8674
- return exp;
9342
+ if (expression.type === "ParenthesizedExpression")
9343
+ return expression;
9344
+ expression = module2.insertTrimmingSpace(expression, "");
8675
9345
  return {
8676
9346
  type: "ParenthesizedExpression",
8677
- children: [open, module2.insertTrimmingSpace(exp, ""), close]
9347
+ children: [open, expression, close],
9348
+ expression
8678
9349
  };
8679
9350
  });
8680
9351
  function Condition(state) {
@@ -8728,7 +9399,7 @@ ${input.slice(result.pos)}
8728
9399
  return result;
8729
9400
  }
8730
9401
  }
8731
- var SuppressIndentedApplication$0 = $TV($EXPECT($L16, fail, 'SuppressIndentedApplication ""'), function($skip, $loc, $0, $1) {
9402
+ var SuppressIndentedApplication$0 = $TV($EXPECT($L17, fail, 'SuppressIndentedApplication ""'), function($skip, $loc, $0, $1) {
8732
9403
  module2.suppressIndentedApplication = true;
8733
9404
  });
8734
9405
  function SuppressIndentedApplication(state) {
@@ -8753,7 +9424,7 @@ ${input.slice(result.pos)}
8753
9424
  return result;
8754
9425
  }
8755
9426
  }
8756
- var IndentedApplicationAllowed$0 = $TV($EXPECT($L16, fail, 'IndentedApplicationAllowed ""'), function($skip, $loc, $0, $1) {
9427
+ var IndentedApplicationAllowed$0 = $TV($EXPECT($L17, fail, 'IndentedApplicationAllowed ""'), function($skip, $loc, $0, $1) {
8757
9428
  if (module2.suppressIndentedApplication)
8758
9429
  return $skip;
8759
9430
  return;
@@ -8780,7 +9451,7 @@ ${input.slice(result.pos)}
8780
9451
  return result;
8781
9452
  }
8782
9453
  }
8783
- var SuppressTrailingMemberProperty$0 = $TV($EXPECT($L16, fail, 'SuppressTrailingMemberProperty ""'), function($skip, $loc, $0, $1) {
9454
+ var SuppressTrailingMemberProperty$0 = $TV($EXPECT($L17, fail, 'SuppressTrailingMemberProperty ""'), function($skip, $loc, $0, $1) {
8784
9455
  module2.suppressTrailingMemberProperty.push(true);
8785
9456
  });
8786
9457
  function SuppressTrailingMemberProperty(state) {
@@ -8805,7 +9476,7 @@ ${input.slice(result.pos)}
8805
9476
  return result;
8806
9477
  }
8807
9478
  }
8808
- var TrailingMemberPropertyAllowed$0 = $TV($EXPECT($L16, fail, 'TrailingMemberPropertyAllowed ""'), function($skip, $loc, $0, $1) {
9479
+ var TrailingMemberPropertyAllowed$0 = $TV($EXPECT($L17, fail, 'TrailingMemberPropertyAllowed ""'), function($skip, $loc, $0, $1) {
8809
9480
  if (module2.trailingMemberPropertySuppressed)
8810
9481
  return $skip;
8811
9482
  });
@@ -9019,7 +9690,7 @@ ${input.slice(result.pos)}
9019
9690
  return result;
9020
9691
  }
9021
9692
  }
9022
- var ImpliedImport$0 = $TV($EXPECT($L16, fail, 'ImpliedImport ""'), function($skip, $loc, $0, $1) {
9693
+ var ImpliedImport$0 = $TV($EXPECT($L17, fail, 'ImpliedImport ""'), function($skip, $loc, $0, $1) {
9023
9694
  return { $loc, token: "import " };
9024
9695
  });
9025
9696
  function ImpliedImport(state) {
@@ -9196,6 +9867,22 @@ ${input.slice(result.pos)}
9196
9867
  return $2;
9197
9868
  return { ts: true, children: $0, binding: $2.binding };
9198
9869
  });
9870
+ var TypeAndImportSpecifier$1 = $TS($S(__, Operator, ImportSpecifier), function($skip, $loc, $0, $1, $2, $3) {
9871
+ var ws = $1;
9872
+ var spec = $3;
9873
+ if (spec.binding.type !== "Identifier") {
9874
+ throw new Error("Expected identifier after `operator`");
9875
+ }
9876
+ module2.operators.add(spec.binding.name);
9877
+ return {
9878
+ ...spec,
9879
+ children: [
9880
+ ws,
9881
+ module2.insertTrimmingSpace(spec[0], ""),
9882
+ spec.children.slice(1)
9883
+ ]
9884
+ };
9885
+ });
9199
9886
  function TypeAndImportSpecifier(state) {
9200
9887
  let eventData;
9201
9888
  if (state.events) {
@@ -9207,12 +9894,12 @@ ${input.slice(result.pos)}
9207
9894
  }
9208
9895
  }
9209
9896
  if (state.tokenize) {
9210
- const result = $TOKEN("TypeAndImportSpecifier", state, TypeAndImportSpecifier$0(state));
9897
+ const result = $TOKEN("TypeAndImportSpecifier", state, TypeAndImportSpecifier$0(state) || TypeAndImportSpecifier$1(state));
9211
9898
  if (state.events)
9212
9899
  state.events.exit?.("TypeAndImportSpecifier", state, result, eventData);
9213
9900
  return result;
9214
9901
  } else {
9215
- const result = TypeAndImportSpecifier$0(state);
9902
+ const result = TypeAndImportSpecifier$0(state) || TypeAndImportSpecifier$1(state);
9216
9903
  if (state.events)
9217
9904
  state.events.exit?.("TypeAndImportSpecifier", state, result, eventData);
9218
9905
  return result;
@@ -9255,7 +9942,7 @@ ${input.slice(result.pos)}
9255
9942
  }
9256
9943
  }
9257
9944
  var ImportAsToken$0 = $S(__, As);
9258
- var ImportAsToken$1 = $TS($S(Loc, __, Colon, $E($EXPECT($L6, fail, 'ImportAsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
9945
+ var ImportAsToken$1 = $TS($S(Loc, __, Colon, $E($EXPECT($L7, fail, 'ImportAsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
9259
9946
  var l = $1;
9260
9947
  var ws = $2;
9261
9948
  var c = $3;
@@ -9342,7 +10029,7 @@ ${input.slice(result.pos)}
9342
10029
  return result;
9343
10030
  }
9344
10031
  }
9345
- var UnprocessedModuleSpecifier$0 = BasicStringLiteral;
10032
+ var UnprocessedModuleSpecifier$0 = StringLiteral;
9346
10033
  var UnprocessedModuleSpecifier$1 = UnquotedSpecifier;
9347
10034
  function UnprocessedModuleSpecifier(state) {
9348
10035
  let eventData;
@@ -9609,6 +10296,7 @@ ${input.slice(result.pos)}
9609
10296
  var Declaration$1 = ClassDeclaration;
9610
10297
  var Declaration$2 = LexicalDeclaration;
9611
10298
  var Declaration$3 = TypeDeclaration;
10299
+ var Declaration$4 = OperatorDeclaration;
9612
10300
  function Declaration(state) {
9613
10301
  let eventData;
9614
10302
  if (state.events) {
@@ -9620,12 +10308,12 @@ ${input.slice(result.pos)}
9620
10308
  }
9621
10309
  }
9622
10310
  if (state.tokenize) {
9623
- const result = $TOKEN("Declaration", state, Declaration$0(state) || Declaration$1(state) || Declaration$2(state) || Declaration$3(state));
10311
+ const result = $TOKEN("Declaration", state, Declaration$0(state) || Declaration$1(state) || Declaration$2(state) || Declaration$3(state) || Declaration$4(state));
9624
10312
  if (state.events)
9625
10313
  state.events.exit?.("Declaration", state, result, eventData);
9626
10314
  return result;
9627
10315
  } else {
9628
- const result = Declaration$0(state) || Declaration$1(state) || Declaration$2(state) || Declaration$3(state);
10316
+ const result = Declaration$0(state) || Declaration$1(state) || Declaration$2(state) || Declaration$3(state) || Declaration$4(state);
9629
10317
  if (state.events)
9630
10318
  state.events.exit?.("Declaration", state, result, eventData);
9631
10319
  return result;
@@ -10244,57 +10932,24 @@ ${input.slice(result.pos)}
10244
10932
  return result;
10245
10933
  }
10246
10934
  }
10247
- var StringLiteral$0 = $TS($S(TripleDoubleQuote, $Q($C(TripleDoubleStringCharacters, CoffeeStringSubstitution)), TripleDoubleQuote), function($skip, $loc, $0, $1, $2, $3) {
10248
- return module2.dedentBlockSubstitutions($0);
10249
- });
10250
- var StringLiteral$1 = $TS($S(TripleSingleQuote, TripleSingleStringCharacters, TripleSingleQuote), function($skip, $loc, $0, $1, $2, $3) {
10251
- var s = $1;
10252
- var str = $2;
10253
- var e = $3;
10254
- return [s, module2.dedentBlockString(str), e];
10255
- });
10256
- var StringLiteral$2 = CoffeeInterpolatedDoubleQuotedString;
10257
- var StringLiteral$3 = BasicStringLiteral;
10258
- function StringLiteral(state) {
10259
- let eventData;
10260
- if (state.events) {
10261
- const result = state.events.enter?.("StringLiteral", state);
10262
- if (result) {
10263
- if (result.cache)
10264
- return result.cache;
10265
- eventData = result.data;
10266
- }
10267
- }
10268
- if (state.tokenize) {
10269
- const result = $TOKEN("StringLiteral", state, StringLiteral$0(state) || StringLiteral$1(state) || StringLiteral$2(state) || StringLiteral$3(state));
10270
- if (state.events)
10271
- state.events.exit?.("StringLiteral", state, result, eventData);
10272
- return result;
10273
- } else {
10274
- const result = StringLiteral$0(state) || StringLiteral$1(state) || StringLiteral$2(state) || StringLiteral$3(state);
10275
- if (state.events)
10276
- state.events.exit?.("StringLiteral", state, result, eventData);
10277
- return result;
10278
- }
10279
- }
10280
- var BasicStringLiteral$0 = $TS($S(DoubleQuote, DoubleStringCharacters, DoubleQuote), function($skip, $loc, $0, $1, $2, $3) {
10935
+ var StringLiteral$0 = $TS($S(DoubleQuote, DoubleStringCharacters, DoubleQuote), function($skip, $loc, $0, $1, $2, $3) {
10281
10936
  var str = $2;
10282
10937
  return {
10283
10938
  token: `"${module2.modifyString(str.token)}"`,
10284
10939
  $loc
10285
10940
  };
10286
10941
  });
10287
- var BasicStringLiteral$1 = $TS($S(SingleQuote, SingleStringCharacters, SingleQuote), function($skip, $loc, $0, $1, $2, $3) {
10942
+ var StringLiteral$1 = $TS($S(SingleQuote, SingleStringCharacters, SingleQuote), function($skip, $loc, $0, $1, $2, $3) {
10288
10943
  var str = $2;
10289
10944
  return {
10290
10945
  token: `'${module2.modifyString(str.token)}'`,
10291
10946
  $loc
10292
10947
  };
10293
10948
  });
10294
- function BasicStringLiteral(state) {
10949
+ function StringLiteral(state) {
10295
10950
  let eventData;
10296
10951
  if (state.events) {
10297
- const result = state.events.enter?.("BasicStringLiteral", state);
10952
+ const result = state.events.enter?.("StringLiteral", state);
10298
10953
  if (result) {
10299
10954
  if (result.cache)
10300
10955
  return result.cache;
@@ -10302,14 +10957,14 @@ ${input.slice(result.pos)}
10302
10957
  }
10303
10958
  }
10304
10959
  if (state.tokenize) {
10305
- const result = $TOKEN("BasicStringLiteral", state, BasicStringLiteral$0(state) || BasicStringLiteral$1(state));
10960
+ const result = $TOKEN("StringLiteral", state, StringLiteral$0(state) || StringLiteral$1(state));
10306
10961
  if (state.events)
10307
- state.events.exit?.("BasicStringLiteral", state, result, eventData);
10962
+ state.events.exit?.("StringLiteral", state, result, eventData);
10308
10963
  return result;
10309
10964
  } else {
10310
- const result = BasicStringLiteral$0(state) || BasicStringLiteral$1(state);
10965
+ const result = StringLiteral$0(state) || StringLiteral$1(state);
10311
10966
  if (state.events)
10312
- state.events.exit?.("BasicStringLiteral", state, result, eventData);
10967
+ state.events.exit?.("StringLiteral", state, result, eventData);
10313
10968
  return result;
10314
10969
  }
10315
10970
  }
@@ -10442,6 +11097,7 @@ ${input.slice(result.pos)}
10442
11097
  var e = $4;
10443
11098
  if (parts.length === 0 || parts.length === 1 && parts[0].token != null) {
10444
11099
  return {
11100
+ type: "StringLiteral",
10445
11101
  token: parts.length ? `"${module2.modifyString(parts[0].token)}"` : '""',
10446
11102
  $loc
10447
11103
  };
@@ -10453,7 +11109,10 @@ ${input.slice(result.pos)}
10453
11109
  }
10454
11110
  });
10455
11111
  s.token = e.token = "`";
10456
- return [s, parts, e];
11112
+ return {
11113
+ type: "TemplateLiteral",
11114
+ children: [s, parts, e]
11115
+ };
10457
11116
  });
10458
11117
  function CoffeeInterpolatedDoubleQuotedString(state) {
10459
11118
  let eventData;
@@ -10503,8 +11162,8 @@ ${input.slice(result.pos)}
10503
11162
  }
10504
11163
  }
10505
11164
  var RegularExpressionLiteral$0 = HeregexLiteral;
10506
- var RegularExpressionLiteral$1 = $TV($TEXT($S($EXPECT($L52, fail, 'RegularExpressionLiteral "/"'), RegularExpressionBody, $EXPECT($L52, fail, 'RegularExpressionLiteral "/"'), RegularExpressionFlags)), function($skip, $loc, $0, $1) {
10507
- return { $loc, token: $1 };
11165
+ var RegularExpressionLiteral$1 = $TV($TEXT($S($EXPECT($L53, fail, 'RegularExpressionLiteral "/"'), RegularExpressionBody, $EXPECT($L53, fail, 'RegularExpressionLiteral "/"'), RegularExpressionFlags)), function($skip, $loc, $0, $1) {
11166
+ return { type: "RegularExpressionLiteral", $loc, token: $1 };
10508
11167
  });
10509
11168
  function RegularExpressionLiteral(state) {
10510
11169
  let eventData;
@@ -10604,7 +11263,10 @@ ${input.slice(result.pos)}
10604
11263
  result.push({ ...close, token: ")" });
10605
11264
  return result;
10606
11265
  }
10607
- return $0;
11266
+ return {
11267
+ type: "RegularExpressionLiteral",
11268
+ children: $0
11269
+ };
10608
11270
  });
10609
11271
  function HeregexLiteral(state) {
10610
11272
  let eventData;
@@ -10805,7 +11467,25 @@ ${input.slice(result.pos)}
10805
11467
  var TemplateLiteral$0 = $TS($S(TripleTick, $Q($C(TemplateBlockCharacters, TemplateSubstitution)), TripleTick), function($skip, $loc, $0, $1, $2, $3) {
10806
11468
  return module2.dedentBlockSubstitutions($0);
10807
11469
  });
10808
- var TemplateLiteral$1 = $S(Backtick, $Q($C(TemplateCharacters, TemplateSubstitution)), Backtick);
11470
+ var TemplateLiteral$1 = $TS($S(Backtick, $Q($C(TemplateCharacters, TemplateSubstitution)), Backtick), function($skip, $loc, $0, $1, $2, $3) {
11471
+ return {
11472
+ type: "TemplateLiteral",
11473
+ children: $0
11474
+ };
11475
+ });
11476
+ var TemplateLiteral$2 = $TS($S(TripleDoubleQuote, $Q($C(TripleDoubleStringCharacters, CoffeeStringSubstitution)), TripleDoubleQuote), function($skip, $loc, $0, $1, $2, $3) {
11477
+ return module2.dedentBlockSubstitutions($0);
11478
+ });
11479
+ var TemplateLiteral$3 = $TS($S(TripleSingleQuote, TripleSingleStringCharacters, TripleSingleQuote), function($skip, $loc, $0, $1, $2, $3) {
11480
+ var s = $1;
11481
+ var str = $2;
11482
+ var e = $3;
11483
+ return {
11484
+ type: "TemplateLiteral",
11485
+ children: [s, module2.dedentBlockString(str), e]
11486
+ };
11487
+ });
11488
+ var TemplateLiteral$4 = CoffeeInterpolatedDoubleQuotedString;
10809
11489
  function TemplateLiteral(state) {
10810
11490
  let eventData;
10811
11491
  if (state.events) {
@@ -10817,12 +11497,12 @@ ${input.slice(result.pos)}
10817
11497
  }
10818
11498
  }
10819
11499
  if (state.tokenize) {
10820
- const result = $TOKEN("TemplateLiteral", state, TemplateLiteral$0(state) || TemplateLiteral$1(state));
11500
+ const result = $TOKEN("TemplateLiteral", state, TemplateLiteral$0(state) || TemplateLiteral$1(state) || TemplateLiteral$2(state) || TemplateLiteral$3(state) || TemplateLiteral$4(state));
10821
11501
  if (state.events)
10822
11502
  state.events.exit?.("TemplateLiteral", state, result, eventData);
10823
11503
  return result;
10824
11504
  } else {
10825
- const result = TemplateLiteral$0(state) || TemplateLiteral$1(state);
11505
+ const result = TemplateLiteral$0(state) || TemplateLiteral$1(state) || TemplateLiteral$2(state) || TemplateLiteral$3(state) || TemplateLiteral$4(state);
10826
11506
  if (state.events)
10827
11507
  state.events.exit?.("TemplateLiteral", state, result, eventData);
10828
11508
  return result;
@@ -11075,7 +11755,8 @@ ${input.slice(result.pos)}
11075
11755
  return result;
11076
11756
  }
11077
11757
  }
11078
- var CoffeeMultiLineComment$0 = $TS($S(CoffeeHereCommentStart, $TEXT($Q($S($N($C(CoffeeHereCommentStart, $EXPECT($L91, fail, 'CoffeeMultiLineComment "*/"'))), $EXPECT($R40, fail, "CoffeeMultiLineComment /./")))), CoffeeHereCommentStart), function($skip, $loc, $0, $1, $2, $3) {
11758
+ var CoffeeMultiLineComment$0 = $TS($S(CoffeeHereCommentStart, $TEXT($EXPECT($R42, fail, "CoffeeMultiLineComment /[^]*?###/"))), function($skip, $loc, $0, $1, $2) {
11759
+ $2 = $2.slice(0, $2.length - 3).replace(/\*\//g, "* /");
11079
11760
  return { $loc, token: `/*${$2}*/` };
11080
11761
  });
11081
11762
  function CoffeeMultiLineComment(state) {
@@ -11100,7 +11781,7 @@ ${input.slice(result.pos)}
11100
11781
  return result;
11101
11782
  }
11102
11783
  }
11103
- var CoffeeHereCommentStart$0 = $R$0($EXPECT($R42, fail, "CoffeeHereCommentStart /###(?!#)/"));
11784
+ var CoffeeHereCommentStart$0 = $R$0($EXPECT($R43, fail, "CoffeeHereCommentStart /###(?!#)/"));
11104
11785
  function CoffeeHereCommentStart(state) {
11105
11786
  let eventData;
11106
11787
  if (state.events) {
@@ -11123,7 +11804,7 @@ ${input.slice(result.pos)}
11123
11804
  return result;
11124
11805
  }
11125
11806
  }
11126
- var InlineComment$0 = $TV($TEXT($S($EXPECT($L90, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L91, fail, 'InlineComment "*/"')), $EXPECT($R43, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L91, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
11807
+ var InlineComment$0 = $TV($TEXT($S($EXPECT($L90, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L91, fail, 'InlineComment "*/"')), $EXPECT($R44, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L91, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
11127
11808
  return { $loc, token: $1 };
11128
11809
  });
11129
11810
  function InlineComment(state) {
@@ -11219,7 +11900,7 @@ ${input.slice(result.pos)}
11219
11900
  return result;
11220
11901
  }
11221
11902
  }
11222
- var NonNewlineWhitespace$0 = $TR($EXPECT($R44, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11903
+ var NonNewlineWhitespace$0 = $TR($EXPECT($R45, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11223
11904
  return { $loc, token: $0 };
11224
11905
  });
11225
11906
  var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L92, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
@@ -11374,7 +12055,7 @@ ${input.slice(result.pos)}
11374
12055
  }
11375
12056
  }
11376
12057
  var StatementDelimiter$0 = SemicolonDelimiter;
11377
- var StatementDelimiter$1 = $S($Y($S(Samedent, $C($EXPECT($L93, fail, 'StatementDelimiter "("'), $EXPECT($L94, fail, 'StatementDelimiter "["'), $EXPECT($L95, fail, 'StatementDelimiter "`"'), $EXPECT($L55, fail, 'StatementDelimiter "+"'), $EXPECT($L13, fail, 'StatementDelimiter "-"'), $EXPECT($L51, fail, 'StatementDelimiter "*"'), $EXPECT($L52, fail, 'StatementDelimiter "/"'), ObjectLiteral))), InsertSemicolon);
12058
+ var StatementDelimiter$1 = $S($Y($S(Samedent, $C($EXPECT($L1, fail, 'StatementDelimiter "("'), $EXPECT($L93, fail, 'StatementDelimiter "["'), $EXPECT($L94, fail, 'StatementDelimiter "`"'), $EXPECT($L56, fail, 'StatementDelimiter "+"'), $EXPECT($L14, fail, 'StatementDelimiter "-"'), $EXPECT($L52, fail, 'StatementDelimiter "*"'), $EXPECT($L53, fail, 'StatementDelimiter "/"'), ObjectLiteral))), InsertSemicolon);
11378
12059
  var StatementDelimiter$2 = $Y(EOS);
11379
12060
  function StatementDelimiter(state) {
11380
12061
  let eventData;
@@ -11426,7 +12107,7 @@ ${input.slice(result.pos)}
11426
12107
  return result;
11427
12108
  }
11428
12109
  }
11429
- var NonIdContinue$0 = $R$0($EXPECT($R45, fail, "NonIdContinue /(?!\\p{ID_Continue})/"));
12110
+ var NonIdContinue$0 = $R$0($EXPECT($R46, fail, "NonIdContinue /(?!\\p{ID_Continue})/"));
11430
12111
  function NonIdContinue(state) {
11431
12112
  let eventData;
11432
12113
  if (state.events) {
@@ -11449,7 +12130,7 @@ ${input.slice(result.pos)}
11449
12130
  return result;
11450
12131
  }
11451
12132
  }
11452
- var Loc$0 = $TV($EXPECT($L16, fail, 'Loc ""'), function($skip, $loc, $0, $1) {
12133
+ var Loc$0 = $TV($EXPECT($L17, fail, 'Loc ""'), function($skip, $loc, $0, $1) {
11453
12134
  return { $loc, token: "" };
11454
12135
  });
11455
12136
  function Loc(state) {
@@ -11474,7 +12155,7 @@ ${input.slice(result.pos)}
11474
12155
  return result;
11475
12156
  }
11476
12157
  }
11477
- var Abstract$0 = $TV($TEXT($S($EXPECT($L96, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L6, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
12158
+ var Abstract$0 = $TV($TEXT($S($EXPECT($L95, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L7, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
11478
12159
  return { $loc, token: $1, ts: true };
11479
12160
  });
11480
12161
  function Abstract(state) {
@@ -11524,7 +12205,7 @@ ${input.slice(result.pos)}
11524
12205
  return result;
11525
12206
  }
11526
12207
  }
11527
- var As$0 = $TS($S($EXPECT($L97, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12208
+ var As$0 = $TS($S($EXPECT($L96, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11528
12209
  return { $loc, token: $1 };
11529
12210
  });
11530
12211
  function As(state) {
@@ -11549,7 +12230,7 @@ ${input.slice(result.pos)}
11549
12230
  return result;
11550
12231
  }
11551
12232
  }
11552
- var At$0 = $TV($EXPECT($L98, fail, 'At "@"'), function($skip, $loc, $0, $1) {
12233
+ var At$0 = $TV($EXPECT($L97, fail, 'At "@"'), function($skip, $loc, $0, $1) {
11553
12234
  return { $loc, token: $1 };
11554
12235
  });
11555
12236
  function At(state) {
@@ -11574,7 +12255,7 @@ ${input.slice(result.pos)}
11574
12255
  return result;
11575
12256
  }
11576
12257
  }
11577
- var AtAt$0 = $TV($EXPECT($L99, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
12258
+ var AtAt$0 = $TV($EXPECT($L98, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
11578
12259
  return { $loc, token: "@" };
11579
12260
  });
11580
12261
  function AtAt(state) {
@@ -11599,7 +12280,7 @@ ${input.slice(result.pos)}
11599
12280
  return result;
11600
12281
  }
11601
12282
  }
11602
- var Async$0 = $TS($S($EXPECT($L100, fail, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12283
+ var Async$0 = $TS($S($EXPECT($L99, fail, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11603
12284
  return { $loc, token: $1, type: "Async" };
11604
12285
  });
11605
12286
  function Async(state) {
@@ -11624,7 +12305,7 @@ ${input.slice(result.pos)}
11624
12305
  return result;
11625
12306
  }
11626
12307
  }
11627
- var Await$0 = $TS($S($EXPECT($L101, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12308
+ var Await$0 = $TS($S($EXPECT($L100, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11628
12309
  return { $loc, token: $1 };
11629
12310
  });
11630
12311
  function Await(state) {
@@ -11649,7 +12330,7 @@ ${input.slice(result.pos)}
11649
12330
  return result;
11650
12331
  }
11651
12332
  }
11652
- var Backtick$0 = $TV($EXPECT($L95, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
12333
+ var Backtick$0 = $TV($EXPECT($L94, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
11653
12334
  return { $loc, token: $1 };
11654
12335
  });
11655
12336
  function Backtick(state) {
@@ -11674,7 +12355,7 @@ ${input.slice(result.pos)}
11674
12355
  return result;
11675
12356
  }
11676
12357
  }
11677
- var By$0 = $TS($S($EXPECT($L102, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12358
+ var By$0 = $TS($S($EXPECT($L101, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11678
12359
  return { $loc, token: $1 };
11679
12360
  });
11680
12361
  function By(state) {
@@ -11699,7 +12380,7 @@ ${input.slice(result.pos)}
11699
12380
  return result;
11700
12381
  }
11701
12382
  }
11702
- var Case$0 = $TS($S($EXPECT($L103, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12383
+ var Case$0 = $TS($S($EXPECT($L102, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11703
12384
  return { $loc, token: $1 };
11704
12385
  });
11705
12386
  function Case(state) {
@@ -11724,7 +12405,7 @@ ${input.slice(result.pos)}
11724
12405
  return result;
11725
12406
  }
11726
12407
  }
11727
- var Catch$0 = $TS($S($EXPECT($L104, fail, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12408
+ var Catch$0 = $TS($S($EXPECT($L103, fail, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11728
12409
  return { $loc, token: $1 };
11729
12410
  });
11730
12411
  function Catch(state) {
@@ -11749,7 +12430,7 @@ ${input.slice(result.pos)}
11749
12430
  return result;
11750
12431
  }
11751
12432
  }
11752
- var Class$0 = $TS($S($EXPECT($L105, fail, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12433
+ var Class$0 = $TS($S($EXPECT($L104, fail, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11753
12434
  return { $loc, token: $1 };
11754
12435
  });
11755
12436
  function Class(state) {
@@ -11774,7 +12455,7 @@ ${input.slice(result.pos)}
11774
12455
  return result;
11775
12456
  }
11776
12457
  }
11777
- var CloseBrace$0 = $TV($EXPECT($L19, fail, 'CloseBrace "}"'), function($skip, $loc, $0, $1) {
12458
+ var CloseBrace$0 = $TV($EXPECT($L20, fail, 'CloseBrace "}"'), function($skip, $loc, $0, $1) {
11778
12459
  return { $loc, token: $1 };
11779
12460
  });
11780
12461
  function CloseBrace(state) {
@@ -11824,7 +12505,7 @@ ${input.slice(result.pos)}
11824
12505
  return result;
11825
12506
  }
11826
12507
  }
11827
- var CloseParen$0 = $TV($EXPECT($L17, fail, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
12508
+ var CloseParen$0 = $TV($EXPECT($L18, fail, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
11828
12509
  return { $loc, token: $1 };
11829
12510
  });
11830
12511
  function CloseParen(state) {
@@ -11849,7 +12530,7 @@ ${input.slice(result.pos)}
11849
12530
  return result;
11850
12531
  }
11851
12532
  }
11852
- var CoffeeSubstitutionStart$0 = $TV($EXPECT($L106, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
12533
+ var CoffeeSubstitutionStart$0 = $TV($EXPECT($L105, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
11853
12534
  return { $loc, token: "${" };
11854
12535
  });
11855
12536
  function CoffeeSubstitutionStart(state) {
@@ -11899,7 +12580,32 @@ ${input.slice(result.pos)}
11899
12580
  return result;
11900
12581
  }
11901
12582
  }
11902
- var ConstructorShorthand$0 = $TV($EXPECT($L98, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
12583
+ var Comma$0 = $TV($EXPECT($L106, fail, 'Comma ","'), function($skip, $loc, $0, $1) {
12584
+ return { $loc, token: $1 };
12585
+ });
12586
+ function Comma(state) {
12587
+ let eventData;
12588
+ if (state.events) {
12589
+ const result = state.events.enter?.("Comma", state);
12590
+ if (result) {
12591
+ if (result.cache)
12592
+ return result.cache;
12593
+ eventData = result.data;
12594
+ }
12595
+ }
12596
+ if (state.tokenize) {
12597
+ const result = $TOKEN("Comma", state, Comma$0(state));
12598
+ if (state.events)
12599
+ state.events.exit?.("Comma", state, result, eventData);
12600
+ return result;
12601
+ } else {
12602
+ const result = Comma$0(state);
12603
+ if (state.events)
12604
+ state.events.exit?.("Comma", state, result, eventData);
12605
+ return result;
12606
+ }
12607
+ }
12608
+ var ConstructorShorthand$0 = $TV($EXPECT($L97, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
11903
12609
  return { $loc, token: "constructor" };
11904
12610
  });
11905
12611
  function ConstructorShorthand(state) {
@@ -12024,7 +12730,7 @@ ${input.slice(result.pos)}
12024
12730
  return result;
12025
12731
  }
12026
12732
  }
12027
- var Dot$0 = $TV($EXPECT($L2, fail, 'Dot "."'), function($skip, $loc, $0, $1) {
12733
+ var Dot$0 = $TV($EXPECT($L3, fail, 'Dot "."'), function($skip, $loc, $0, $1) {
12028
12734
  return { $loc, token: $1 };
12029
12735
  });
12030
12736
  function Dot(state) {
@@ -12349,7 +13055,7 @@ ${input.slice(result.pos)}
12349
13055
  return result;
12350
13056
  }
12351
13057
  }
12352
- var If$0 = $TV($TEXT($S($EXPECT($L123, fail, 'If "if"'), NonIdContinue, $E($EXPECT($L6, fail, 'If " "')))), function($skip, $loc, $0, $1) {
13058
+ var If$0 = $TV($TEXT($S($EXPECT($L123, fail, 'If "if"'), NonIdContinue, $E($EXPECT($L7, fail, 'If " "')))), function($skip, $loc, $0, $1) {
12353
13059
  return { $loc, token: $1 };
12354
13060
  });
12355
13061
  function If(state) {
@@ -12374,7 +13080,7 @@ ${input.slice(result.pos)}
12374
13080
  return result;
12375
13081
  }
12376
13082
  }
12377
- var Import$0 = $TS($S($EXPECT($L11, fail, 'Import "import"'), $Y($EXPECT($R46, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
13083
+ var Import$0 = $TS($S($EXPECT($L12, fail, 'Import "import"'), $Y($EXPECT($R47, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
12378
13084
  return { $loc, token: $1 };
12379
13085
  });
12380
13086
  function Import(state) {
@@ -12499,7 +13205,7 @@ ${input.slice(result.pos)}
12499
13205
  return result;
12500
13206
  }
12501
13207
  }
12502
- var Not$0 = $TS($S(CoffeeNotEnabled, $EXPECT($L75, fail, 'Not "not"'), NonIdContinue, $E($EXPECT($L6, fail, 'Not " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
13208
+ var Not$0 = $TS($S(CoffeeNotEnabled, $EXPECT($L50, fail, 'Not "not"'), NonIdContinue, $E($EXPECT($L7, fail, 'Not " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
12503
13209
  return { $loc, token: "!" };
12504
13210
  });
12505
13211
  function Not(state) {
@@ -12524,7 +13230,7 @@ ${input.slice(result.pos)}
12524
13230
  return result;
12525
13231
  }
12526
13232
  }
12527
- var Of$0 = $TS($S($EXPECT($L70, fail, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13233
+ var Of$0 = $TS($S($EXPECT($L71, fail, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12528
13234
  return { $loc, token: $1 };
12529
13235
  });
12530
13236
  function Of(state) {
@@ -12599,7 +13305,7 @@ ${input.slice(result.pos)}
12599
13305
  return result;
12600
13306
  }
12601
13307
  }
12602
- var OpenBracket$0 = $TV($EXPECT($L94, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
13308
+ var OpenBracket$0 = $TV($EXPECT($L93, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
12603
13309
  return { $loc, token: $1 };
12604
13310
  });
12605
13311
  function OpenBracket(state) {
@@ -12624,7 +13330,7 @@ ${input.slice(result.pos)}
12624
13330
  return result;
12625
13331
  }
12626
13332
  }
12627
- var OpenParen$0 = $TV($EXPECT($L93, fail, 'OpenParen "("'), function($skip, $loc, $0, $1) {
13333
+ var OpenParen$0 = $TV($EXPECT($L1, fail, 'OpenParen "("'), function($skip, $loc, $0, $1) {
12628
13334
  return { $loc, token: $1 };
12629
13335
  });
12630
13336
  function OpenParen(state) {
@@ -12649,7 +13355,32 @@ ${input.slice(result.pos)}
12649
13355
  return result;
12650
13356
  }
12651
13357
  }
12652
- var Public$0 = $TS($S($EXPECT($L130, fail, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13358
+ var Operator$0 = $TS($S($EXPECT($L130, fail, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13359
+ return { $loc, token: $1 };
13360
+ });
13361
+ function Operator(state) {
13362
+ let eventData;
13363
+ if (state.events) {
13364
+ const result = state.events.enter?.("Operator", state);
13365
+ if (result) {
13366
+ if (result.cache)
13367
+ return result.cache;
13368
+ eventData = result.data;
13369
+ }
13370
+ }
13371
+ if (state.tokenize) {
13372
+ const result = $TOKEN("Operator", state, Operator$0(state));
13373
+ if (state.events)
13374
+ state.events.exit?.("Operator", state, result, eventData);
13375
+ return result;
13376
+ } else {
13377
+ const result = Operator$0(state);
13378
+ if (state.events)
13379
+ state.events.exit?.("Operator", state, result, eventData);
13380
+ return result;
13381
+ }
13382
+ }
13383
+ var Public$0 = $TS($S($EXPECT($L131, fail, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12653
13384
  return { $loc, token: $1 };
12654
13385
  });
12655
13386
  function Public(state) {
@@ -12674,7 +13405,7 @@ ${input.slice(result.pos)}
12674
13405
  return result;
12675
13406
  }
12676
13407
  }
12677
- var Private$0 = $TS($S($EXPECT($L131, fail, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13408
+ var Private$0 = $TS($S($EXPECT($L132, fail, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12678
13409
  return { $loc, token: $1 };
12679
13410
  });
12680
13411
  function Private(state) {
@@ -12699,7 +13430,7 @@ ${input.slice(result.pos)}
12699
13430
  return result;
12700
13431
  }
12701
13432
  }
12702
- var Protected$0 = $TS($S($EXPECT($L132, fail, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13433
+ var Protected$0 = $TS($S($EXPECT($L133, fail, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12703
13434
  return { $loc, token: $1 };
12704
13435
  });
12705
13436
  function Protected(state) {
@@ -12724,7 +13455,7 @@ ${input.slice(result.pos)}
12724
13455
  return result;
12725
13456
  }
12726
13457
  }
12727
- var Pipe$0 = $TV($EXPECT($L133, fail, 'Pipe "|>"'), function($skip, $loc, $0, $1) {
13458
+ var Pipe$0 = $TV($EXPECT($L134, fail, 'Pipe "|>"'), function($skip, $loc, $0, $1) {
12728
13459
  return { $loc, token: $1 };
12729
13460
  });
12730
13461
  function Pipe(state) {
@@ -12749,7 +13480,7 @@ ${input.slice(result.pos)}
12749
13480
  return result;
12750
13481
  }
12751
13482
  }
12752
- var QuestionMark$0 = $TV($EXPECT($L1, fail, 'QuestionMark "?"'), function($skip, $loc, $0, $1) {
13483
+ var QuestionMark$0 = $TV($EXPECT($L2, fail, 'QuestionMark "?"'), function($skip, $loc, $0, $1) {
12753
13484
  return { $loc, token: $1 };
12754
13485
  });
12755
13486
  function QuestionMark(state) {
@@ -12774,7 +13505,7 @@ ${input.slice(result.pos)}
12774
13505
  return result;
12775
13506
  }
12776
13507
  }
12777
- var Readonly$0 = $TS($S($EXPECT($L134, fail, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13508
+ var Readonly$0 = $TS($S($EXPECT($L135, fail, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12778
13509
  return { $loc, token: $1, ts: true };
12779
13510
  });
12780
13511
  function Readonly(state) {
@@ -12799,7 +13530,7 @@ ${input.slice(result.pos)}
12799
13530
  return result;
12800
13531
  }
12801
13532
  }
12802
- var Return$0 = $TS($S($EXPECT($L135, fail, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13533
+ var Return$0 = $TS($S($EXPECT($L136, fail, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12803
13534
  return { $loc, token: $1 };
12804
13535
  });
12805
13536
  function Return(state) {
@@ -12824,7 +13555,7 @@ ${input.slice(result.pos)}
12824
13555
  return result;
12825
13556
  }
12826
13557
  }
12827
- var Satisfies$0 = $TS($S($EXPECT($L136, fail, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13558
+ var Satisfies$0 = $TS($S($EXPECT($L137, fail, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12828
13559
  return { $loc, token: $1 };
12829
13560
  });
12830
13561
  function Satisfies(state) {
@@ -12874,7 +13605,7 @@ ${input.slice(result.pos)}
12874
13605
  return result;
12875
13606
  }
12876
13607
  }
12877
- var SingleQuote$0 = $TV($EXPECT($L137, fail, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
13608
+ var SingleQuote$0 = $TV($EXPECT($L138, fail, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
12878
13609
  return { $loc, token: $1 };
12879
13610
  });
12880
13611
  function SingleQuote(state) {
@@ -12899,7 +13630,7 @@ ${input.slice(result.pos)}
12899
13630
  return result;
12900
13631
  }
12901
13632
  }
12902
- var Star$0 = $TV($EXPECT($L51, fail, 'Star "*"'), function($skip, $loc, $0, $1) {
13633
+ var Star$0 = $TV($EXPECT($L52, fail, 'Star "*"'), function($skip, $loc, $0, $1) {
12903
13634
  return { $loc, token: $1 };
12904
13635
  });
12905
13636
  function Star(state) {
@@ -12924,10 +13655,10 @@ ${input.slice(result.pos)}
12924
13655
  return result;
12925
13656
  }
12926
13657
  }
12927
- var Static$0 = $TS($S($EXPECT($L138, fail, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13658
+ var Static$0 = $TS($S($EXPECT($L139, fail, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12928
13659
  return { $loc, token: $1 };
12929
13660
  });
12930
- var Static$1 = $TS($S($EXPECT($L98, fail, 'Static "@"'), $N($C($EXPECT($L93, fail, 'Static "("'), $EXPECT($L98, fail, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
13661
+ var Static$1 = $TS($S($EXPECT($L97, fail, 'Static "@"'), $N($C($EXPECT($L1, fail, 'Static "("'), $EXPECT($L97, fail, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
12931
13662
  return { $loc, token: "static " };
12932
13663
  });
12933
13664
  function Static(state) {
@@ -12952,7 +13683,7 @@ ${input.slice(result.pos)}
12952
13683
  return result;
12953
13684
  }
12954
13685
  }
12955
- var SubstitutionStart$0 = $TV($EXPECT($L139, fail, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
13686
+ var SubstitutionStart$0 = $TV($EXPECT($L140, fail, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
12956
13687
  return { $loc, token: $1 };
12957
13688
  });
12958
13689
  function SubstitutionStart(state) {
@@ -12977,7 +13708,7 @@ ${input.slice(result.pos)}
12977
13708
  return result;
12978
13709
  }
12979
13710
  }
12980
- var Switch$0 = $TS($S($EXPECT($L140, fail, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13711
+ var Switch$0 = $TS($S($EXPECT($L141, fail, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12981
13712
  return { $loc, token: $1 };
12982
13713
  });
12983
13714
  function Switch(state) {
@@ -13002,7 +13733,7 @@ ${input.slice(result.pos)}
13002
13733
  return result;
13003
13734
  }
13004
13735
  }
13005
- var Target$0 = $TS($S($EXPECT($L141, fail, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13736
+ var Target$0 = $TS($S($EXPECT($L142, fail, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13006
13737
  return { $loc, token: $1 };
13007
13738
  });
13008
13739
  function Target(state) {
@@ -13027,7 +13758,7 @@ ${input.slice(result.pos)}
13027
13758
  return result;
13028
13759
  }
13029
13760
  }
13030
- var Then$0 = $TS($S(__, $EXPECT($L142, fail, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
13761
+ var Then$0 = $TS($S(__, $EXPECT($L143, fail, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
13031
13762
  return { $loc, token: "" };
13032
13763
  });
13033
13764
  function Then(state) {
@@ -13052,7 +13783,7 @@ ${input.slice(result.pos)}
13052
13783
  return result;
13053
13784
  }
13054
13785
  }
13055
- var This$0 = $TS($S($EXPECT($L143, fail, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13786
+ var This$0 = $TS($S($EXPECT($L144, fail, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13056
13787
  return { $loc, token: $1 };
13057
13788
  });
13058
13789
  function This(state) {
@@ -13077,7 +13808,7 @@ ${input.slice(result.pos)}
13077
13808
  return result;
13078
13809
  }
13079
13810
  }
13080
- var Throw$0 = $TS($S($EXPECT($L144, fail, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13811
+ var Throw$0 = $TS($S($EXPECT($L145, fail, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13081
13812
  return { $loc, token: $1 };
13082
13813
  });
13083
13814
  function Throw(state) {
@@ -13102,7 +13833,7 @@ ${input.slice(result.pos)}
13102
13833
  return result;
13103
13834
  }
13104
13835
  }
13105
- var TripleDoubleQuote$0 = $TV($EXPECT($L145, fail, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
13836
+ var TripleDoubleQuote$0 = $TV($EXPECT($L146, fail, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
13106
13837
  return { $loc, token: "`" };
13107
13838
  });
13108
13839
  function TripleDoubleQuote(state) {
@@ -13127,7 +13858,7 @@ ${input.slice(result.pos)}
13127
13858
  return result;
13128
13859
  }
13129
13860
  }
13130
- var TripleSingleQuote$0 = $TV($EXPECT($L146, fail, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
13861
+ var TripleSingleQuote$0 = $TV($EXPECT($L147, fail, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
13131
13862
  return { $loc, token: "`" };
13132
13863
  });
13133
13864
  function TripleSingleQuote(state) {
@@ -13152,7 +13883,7 @@ ${input.slice(result.pos)}
13152
13883
  return result;
13153
13884
  }
13154
13885
  }
13155
- var TripleSlash$0 = $TV($EXPECT($L147, fail, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
13886
+ var TripleSlash$0 = $TV($EXPECT($L148, fail, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
13156
13887
  return { $loc, token: "/" };
13157
13888
  });
13158
13889
  function TripleSlash(state) {
@@ -13177,7 +13908,7 @@ ${input.slice(result.pos)}
13177
13908
  return result;
13178
13909
  }
13179
13910
  }
13180
- var TripleTick$0 = $TV($EXPECT($L148, fail, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
13911
+ var TripleTick$0 = $TV($EXPECT($L149, fail, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
13181
13912
  return { $loc, token: "`" };
13182
13913
  });
13183
13914
  function TripleTick(state) {
@@ -13202,7 +13933,7 @@ ${input.slice(result.pos)}
13202
13933
  return result;
13203
13934
  }
13204
13935
  }
13205
- var Try$0 = $TS($S($EXPECT($L149, fail, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13936
+ var Try$0 = $TS($S($EXPECT($L150, fail, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13206
13937
  return { $loc, token: $1 };
13207
13938
  });
13208
13939
  function Try(state) {
@@ -13227,7 +13958,7 @@ ${input.slice(result.pos)}
13227
13958
  return result;
13228
13959
  }
13229
13960
  }
13230
- var Typeof$0 = $TS($S($EXPECT($L150, fail, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13961
+ var Typeof$0 = $TS($S($EXPECT($L151, fail, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13231
13962
  return { $loc, token: $1 };
13232
13963
  });
13233
13964
  function Typeof(state) {
@@ -13252,7 +13983,7 @@ ${input.slice(result.pos)}
13252
13983
  return result;
13253
13984
  }
13254
13985
  }
13255
- var Unless$0 = $TS($S($EXPECT($L151, fail, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13986
+ var Unless$0 = $TS($S($EXPECT($L152, fail, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13256
13987
  return { $loc, token: $1 };
13257
13988
  });
13258
13989
  function Unless(state) {
@@ -13277,7 +14008,7 @@ ${input.slice(result.pos)}
13277
14008
  return result;
13278
14009
  }
13279
14010
  }
13280
- var Until$0 = $TS($S($EXPECT($L152, fail, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14011
+ var Until$0 = $TS($S($EXPECT($L153, fail, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13281
14012
  return { $loc, token: $1 };
13282
14013
  });
13283
14014
  function Until(state) {
@@ -13302,7 +14033,7 @@ ${input.slice(result.pos)}
13302
14033
  return result;
13303
14034
  }
13304
14035
  }
13305
- var Var$0 = $TS($S($EXPECT($L153, fail, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14036
+ var Var$0 = $TS($S($EXPECT($L154, fail, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13306
14037
  return { $loc, token: $1 };
13307
14038
  });
13308
14039
  function Var(state) {
@@ -13327,7 +14058,7 @@ ${input.slice(result.pos)}
13327
14058
  return result;
13328
14059
  }
13329
14060
  }
13330
- var Void$0 = $TS($S($EXPECT($L154, fail, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14061
+ var Void$0 = $TS($S($EXPECT($L155, fail, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13331
14062
  return { $loc, token: $1 };
13332
14063
  });
13333
14064
  function Void(state) {
@@ -13352,7 +14083,7 @@ ${input.slice(result.pos)}
13352
14083
  return result;
13353
14084
  }
13354
14085
  }
13355
- var When$0 = $TS($S($EXPECT($L155, fail, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14086
+ var When$0 = $TS($S($EXPECT($L156, fail, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13356
14087
  return { $loc, token: "case" };
13357
14088
  });
13358
14089
  function When(state) {
@@ -13377,7 +14108,7 @@ ${input.slice(result.pos)}
13377
14108
  return result;
13378
14109
  }
13379
14110
  }
13380
- var While$0 = $TS($S($EXPECT($L156, fail, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14111
+ var While$0 = $TS($S($EXPECT($L157, fail, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13381
14112
  return { $loc, token: $1 };
13382
14113
  });
13383
14114
  function While(state) {
@@ -13402,7 +14133,7 @@ ${input.slice(result.pos)}
13402
14133
  return result;
13403
14134
  }
13404
14135
  }
13405
- var Yield$0 = $TS($S($EXPECT($L157, fail, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14136
+ var Yield$0 = $TS($S($EXPECT($L158, fail, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13406
14137
  return { $loc, token: $1 };
13407
14138
  });
13408
14139
  function Yield(state) {
@@ -13548,7 +14279,7 @@ ${input.slice(result.pos)}
13548
14279
  return result;
13549
14280
  }
13550
14281
  }
13551
- var JSXSelfClosingElement$0 = $TS($S($EXPECT($L128, fail, 'JSXSelfClosingElement "<"'), $TEXT(JSXElementName), $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L158, fail, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
14282
+ var JSXSelfClosingElement$0 = $TS($S($EXPECT($L128, fail, 'JSXSelfClosingElement "<"'), $TEXT(JSXElementName), $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L159, fail, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
13552
14283
  return { type: "JSXElement", children: $0, tag: $2 };
13553
14284
  });
13554
14285
  function JSXSelfClosingElement(state) {
@@ -13628,7 +14359,7 @@ ${input.slice(result.pos)}
13628
14359
  return $skip;
13629
14360
  return $0;
13630
14361
  });
13631
- var JSXOptionalClosingElement$1 = $EXPECT($L16, fail, 'JSXOptionalClosingElement ""');
14362
+ var JSXOptionalClosingElement$1 = $EXPECT($L17, fail, 'JSXOptionalClosingElement ""');
13632
14363
  function JSXOptionalClosingElement(state) {
13633
14364
  let eventData;
13634
14365
  if (state.events) {
@@ -13651,7 +14382,7 @@ ${input.slice(result.pos)}
13651
14382
  return result;
13652
14383
  }
13653
14384
  }
13654
- var JSXClosingElement$0 = $S($EXPECT($L159, fail, 'JSXClosingElement "</"'), $E(Whitespace), $TEXT(JSXElementName), $E(Whitespace), $EXPECT($L29, fail, 'JSXClosingElement ">"'));
14385
+ var JSXClosingElement$0 = $S($EXPECT($L160, fail, 'JSXClosingElement "</"'), $E(Whitespace), $TEXT(JSXElementName), $E(Whitespace), $EXPECT($L29, fail, 'JSXClosingElement ">"'));
13655
14386
  function JSXClosingElement(state) {
13656
14387
  let eventData;
13657
14388
  if (state.events) {
@@ -13690,7 +14421,7 @@ ${input.slice(result.pos)}
13690
14421
  ];
13691
14422
  return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
13692
14423
  });
13693
- var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L160, fail, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
14424
+ var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L161, fail, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
13694
14425
  var children = $3;
13695
14426
  $0 = $0.slice(1);
13696
14427
  return {
@@ -13721,7 +14452,7 @@ ${input.slice(result.pos)}
13721
14452
  return result;
13722
14453
  }
13723
14454
  }
13724
- var PushJSXOpeningFragment$0 = $TV($EXPECT($L160, fail, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
14455
+ var PushJSXOpeningFragment$0 = $TV($EXPECT($L161, fail, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
13725
14456
  module2.JSXTagStack.push("");
13726
14457
  return $1;
13727
14458
  });
@@ -13752,7 +14483,7 @@ ${input.slice(result.pos)}
13752
14483
  return $skip;
13753
14484
  return $0;
13754
14485
  });
13755
- var JSXOptionalClosingFragment$1 = $EXPECT($L16, fail, 'JSXOptionalClosingFragment ""');
14486
+ var JSXOptionalClosingFragment$1 = $EXPECT($L17, fail, 'JSXOptionalClosingFragment ""');
13756
14487
  function JSXOptionalClosingFragment(state) {
13757
14488
  let eventData;
13758
14489
  if (state.events) {
@@ -13775,7 +14506,7 @@ ${input.slice(result.pos)}
13775
14506
  return result;
13776
14507
  }
13777
14508
  }
13778
- var JSXClosingFragment$0 = $EXPECT($L161, fail, 'JSXClosingFragment "</>"');
14509
+ var JSXClosingFragment$0 = $EXPECT($L162, fail, 'JSXClosingFragment "</>"');
13779
14510
  function JSXClosingFragment(state) {
13780
14511
  let eventData;
13781
14512
  if (state.events) {
@@ -13821,7 +14552,7 @@ ${input.slice(result.pos)}
13821
14552
  return result;
13822
14553
  }
13823
14554
  }
13824
- var JSXIdentifierName$0 = $R$0($EXPECT($R47, fail, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
14555
+ var JSXIdentifierName$0 = $R$0($EXPECT($R48, fail, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
13825
14556
  function JSXIdentifierName(state) {
13826
14557
  let eventData;
13827
14558
  if (state.events) {
@@ -14000,7 +14731,7 @@ ${input.slice(result.pos)}
14000
14731
  }
14001
14732
  });
14002
14733
  var JSXAttribute$2 = $S(InsertInlineOpenBrace, DotDotDot, InlineJSXAttributeValue, InsertCloseBrace, $Y(JSXAttributeSpace));
14003
- var JSXAttribute$3 = $TS($S($EXPECT($L9, fail, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
14734
+ var JSXAttribute$3 = $TS($S($EXPECT($L10, fail, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
14004
14735
  return [" ", "id=", $2];
14005
14736
  });
14006
14737
  var JSXAttribute$4 = $TS($S(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
@@ -14037,7 +14768,7 @@ ${input.slice(result.pos)}
14037
14768
  return result;
14038
14769
  }
14039
14770
  }
14040
- var JSXAttributeSpace$0 = $R$0($EXPECT($R48, fail, "JSXAttributeSpace /[\\s>]/"));
14771
+ var JSXAttributeSpace$0 = $R$0($EXPECT($R49, fail, "JSXAttributeSpace /[\\s>]/"));
14041
14772
  function JSXAttributeSpace(state) {
14042
14773
  let eventData;
14043
14774
  if (state.events) {
@@ -14060,19 +14791,13 @@ ${input.slice(result.pos)}
14060
14791
  return result;
14061
14792
  }
14062
14793
  }
14063
- var JSXShorthandString$0 = $TR($EXPECT($R49, fail, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14794
+ var JSXShorthandString$0 = $TR($EXPECT($R50, fail, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14064
14795
  return module2.quoteString($0);
14065
14796
  });
14066
- var JSXShorthandString$1 = $TS($S(StringLiteral), function($skip, $loc, $0, $1) {
14067
- if (module2.isTemplateLiteral($1)) {
14068
- return ["{", $1, "}"];
14069
- } else {
14070
- return $1;
14071
- }
14072
- });
14073
- var JSXShorthandString$2 = $TS($S(TemplateLiteral), function($skip, $loc, $0, $1) {
14797
+ var JSXShorthandString$1 = $TS($S(TemplateLiteral), function($skip, $loc, $0, $1) {
14074
14798
  return ["{", $1, "}"];
14075
14799
  });
14800
+ var JSXShorthandString$2 = StringLiteral;
14076
14801
  var JSXShorthandString$3 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
14077
14802
  function JSXShorthandString(state) {
14078
14803
  let eventData;
@@ -14143,15 +14868,16 @@ ${input.slice(result.pos)}
14143
14868
  return result;
14144
14869
  }
14145
14870
  }
14146
- var JSXAttributeValue$0 = $TS($S(StringLiteral), function($skip, $loc, $0, $1) {
14147
- if (module2.isTemplateLiteral($1))
14148
- return $skip;
14149
- return $1;
14871
+ var JSXAttributeValue$0 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
14872
+ var JSXAttributeValue$1 = JSXElement;
14873
+ var JSXAttributeValue$2 = JSXFragment;
14874
+ var JSXAttributeValue$3 = $TS($S(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3) {
14875
+ if ($2.children?.length === 1 && $2.children[0].type === "StringLiteral") {
14876
+ return $2.children[0];
14877
+ }
14878
+ return $0;
14150
14879
  });
14151
- var JSXAttributeValue$1 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
14152
- var JSXAttributeValue$2 = JSXElement;
14153
- var JSXAttributeValue$3 = JSXFragment;
14154
- var JSXAttributeValue$4 = $S(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace);
14880
+ var JSXAttributeValue$4 = StringLiteral;
14155
14881
  function JSXAttributeValue(state) {
14156
14882
  let eventData;
14157
14883
  if (state.events) {
@@ -14201,7 +14927,7 @@ ${input.slice(result.pos)}
14201
14927
  return result;
14202
14928
  }
14203
14929
  }
14204
- var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R50, fail, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, $C(ParenthesizedAssignment, InlineJSXUnaryExpression)), function($skip, $loc, $0, $1, $2, $3) {
14930
+ var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R51, fail, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, $C(ParenthesizedAssignment, InlineJSXUnaryExpression)), function($skip, $loc, $0, $1, $2, $3) {
14205
14931
  var op = $2;
14206
14932
  var rhs = $3;
14207
14933
  return [[], op, [], rhs];
@@ -14332,8 +15058,8 @@ ${input.slice(result.pos)}
14332
15058
  return result;
14333
15059
  }
14334
15060
  }
14335
- var InlineJSXCallExpression$0 = $S($EXPECT($L10, fail, 'InlineJSXCallExpression "super"'), ExplicitArguments);
14336
- var InlineJSXCallExpression$1 = $S($EXPECT($L11, fail, 'InlineJSXCallExpression "import"'), OpenParen, ExtendedExpression, __, CloseParen);
15061
+ var InlineJSXCallExpression$0 = $S($EXPECT($L11, fail, 'InlineJSXCallExpression "super"'), ExplicitArguments);
15062
+ var InlineJSXCallExpression$1 = $S($EXPECT($L12, fail, 'InlineJSXCallExpression "import"'), OpenParen, ExtendedExpression, __, CloseParen);
14337
15063
  var InlineJSXCallExpression$2 = $TS($S(InlineJSXMemberExpression, $Q(InlineJSXCallExpressionRest)), function($skip, $loc, $0, $1, $2) {
14338
15064
  if ($2.length)
14339
15065
  return $0;
@@ -14451,14 +15177,13 @@ ${input.slice(result.pos)}
14451
15177
  var InlineJSXPrimaryExpression$0 = NullLiteral;
14452
15178
  var InlineJSXPrimaryExpression$1 = BooleanLiteral;
14453
15179
  var InlineJSXPrimaryExpression$2 = NumericLiteral;
14454
- var InlineJSXPrimaryExpression$3 = StringLiteral;
15180
+ var InlineJSXPrimaryExpression$3 = TemplateLiteral;
14455
15181
  var InlineJSXPrimaryExpression$4 = ThisLiteral;
14456
15182
  var InlineJSXPrimaryExpression$5 = ArrayLiteral;
14457
15183
  var InlineJSXPrimaryExpression$6 = BracedObjectLiteral;
14458
15184
  var InlineJSXPrimaryExpression$7 = IdentifierReference;
14459
15185
  var InlineJSXPrimaryExpression$8 = RegularExpressionLiteral;
14460
- var InlineJSXPrimaryExpression$9 = TemplateLiteral;
14461
- var InlineJSXPrimaryExpression$10 = ParenthesizedExpression;
15186
+ var InlineJSXPrimaryExpression$9 = ParenthesizedExpression;
14462
15187
  function InlineJSXPrimaryExpression(state) {
14463
15188
  let eventData;
14464
15189
  if (state.events) {
@@ -14470,12 +15195,12 @@ ${input.slice(result.pos)}
14470
15195
  }
14471
15196
  }
14472
15197
  if (state.tokenize) {
14473
- const result = $TOKEN("InlineJSXPrimaryExpression", state, InlineJSXPrimaryExpression$0(state) || InlineJSXPrimaryExpression$1(state) || InlineJSXPrimaryExpression$2(state) || InlineJSXPrimaryExpression$3(state) || InlineJSXPrimaryExpression$4(state) || InlineJSXPrimaryExpression$5(state) || InlineJSXPrimaryExpression$6(state) || InlineJSXPrimaryExpression$7(state) || InlineJSXPrimaryExpression$8(state) || InlineJSXPrimaryExpression$9(state) || InlineJSXPrimaryExpression$10(state));
15198
+ const result = $TOKEN("InlineJSXPrimaryExpression", state, InlineJSXPrimaryExpression$0(state) || InlineJSXPrimaryExpression$1(state) || InlineJSXPrimaryExpression$2(state) || InlineJSXPrimaryExpression$3(state) || InlineJSXPrimaryExpression$4(state) || InlineJSXPrimaryExpression$5(state) || InlineJSXPrimaryExpression$6(state) || InlineJSXPrimaryExpression$7(state) || InlineJSXPrimaryExpression$8(state) || InlineJSXPrimaryExpression$9(state));
14474
15199
  if (state.events)
14475
15200
  state.events.exit?.("InlineJSXPrimaryExpression", state, result, eventData);
14476
15201
  return result;
14477
15202
  } else {
14478
- const result = InlineJSXPrimaryExpression$0(state) || InlineJSXPrimaryExpression$1(state) || InlineJSXPrimaryExpression$2(state) || InlineJSXPrimaryExpression$3(state) || InlineJSXPrimaryExpression$4(state) || InlineJSXPrimaryExpression$5(state) || InlineJSXPrimaryExpression$6(state) || InlineJSXPrimaryExpression$7(state) || InlineJSXPrimaryExpression$8(state) || InlineJSXPrimaryExpression$9(state) || InlineJSXPrimaryExpression$10(state);
15203
+ const result = InlineJSXPrimaryExpression$0(state) || InlineJSXPrimaryExpression$1(state) || InlineJSXPrimaryExpression$2(state) || InlineJSXPrimaryExpression$3(state) || InlineJSXPrimaryExpression$4(state) || InlineJSXPrimaryExpression$5(state) || InlineJSXPrimaryExpression$6(state) || InlineJSXPrimaryExpression$7(state) || InlineJSXPrimaryExpression$8(state) || InlineJSXPrimaryExpression$9(state);
14479
15204
  if (state.events)
14480
15205
  state.events.exit?.("InlineJSXPrimaryExpression", state, result, eventData);
14481
15206
  return result;
@@ -14548,7 +15273,7 @@ ${input.slice(result.pos)}
14548
15273
  }
14549
15274
  return $skip;
14550
15275
  });
14551
- var JSXNestedChildren$1 = $TV($Y($C(JSXEOS, $EXPECT($L19, fail, 'JSXNestedChildren "}"'), JSXClosingElement, JSXClosingFragment)), function($skip, $loc, $0, $1) {
15276
+ var JSXNestedChildren$1 = $TV($Y($C(JSXEOS, $EXPECT($L20, fail, 'JSXNestedChildren "}"'), JSXClosingElement, JSXClosingFragment)), function($skip, $loc, $0, $1) {
14552
15277
  return { children: [], jsxChildren: [] };
14553
15278
  });
14554
15279
  function JSXNestedChildren(state) {
@@ -14677,7 +15402,7 @@ ${input.slice(result.pos)}
14677
15402
  return result;
14678
15403
  }
14679
15404
  }
14680
- var JSXComment$0 = $TS($S($EXPECT($L162, fail, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L163, fail, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
15405
+ var JSXComment$0 = $TS($S($EXPECT($L163, fail, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L164, fail, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
14681
15406
  return ["{/*", $2, "*/}"];
14682
15407
  });
14683
15408
  function JSXComment(state) {
@@ -14702,7 +15427,7 @@ ${input.slice(result.pos)}
14702
15427
  return result;
14703
15428
  }
14704
15429
  }
14705
- var JSXCommentContent$0 = $TR($EXPECT($R51, fail, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15430
+ var JSXCommentContent$0 = $TR($EXPECT($R52, fail, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14706
15431
  return { $loc, token: $0.replace(/\*\//g, "* /") };
14707
15432
  });
14708
15433
  function JSXCommentContent(state) {
@@ -14727,7 +15452,7 @@ ${input.slice(result.pos)}
14727
15452
  return result;
14728
15453
  }
14729
15454
  }
14730
- var JSXText$0 = $TR($EXPECT($R52, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15455
+ var JSXText$0 = $TR($EXPECT($R53, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14731
15456
  return {
14732
15457
  type: "JSXText",
14733
15458
  token: $0,
@@ -14975,7 +15700,7 @@ ${input.slice(result.pos)}
14975
15700
  return result;
14976
15701
  }
14977
15702
  }
14978
- var TypeKeyword$0 = $S($EXPECT($L164, fail, 'TypeKeyword "type"'), NonIdContinue);
15703
+ var TypeKeyword$0 = $S($EXPECT($L165, fail, 'TypeKeyword "type"'), NonIdContinue);
14979
15704
  function TypeKeyword(state) {
14980
15705
  let eventData;
14981
15706
  if (state.events) {
@@ -14998,7 +15723,7 @@ ${input.slice(result.pos)}
14998
15723
  return result;
14999
15724
  }
15000
15725
  }
15001
- var Interface$0 = $S($EXPECT($L165, fail, 'Interface "interface"'), NonIdContinue);
15726
+ var Interface$0 = $S($EXPECT($L166, fail, 'Interface "interface"'), NonIdContinue);
15002
15727
  function Interface(state) {
15003
15728
  let eventData;
15004
15729
  if (state.events) {
@@ -15021,7 +15746,7 @@ ${input.slice(result.pos)}
15021
15746
  return result;
15022
15747
  }
15023
15748
  }
15024
- var Namespace$0 = $S($EXPECT($L166, fail, 'Namespace "namespace"'), NonIdContinue);
15749
+ var Namespace$0 = $S($EXPECT($L167, fail, 'Namespace "namespace"'), NonIdContinue);
15025
15750
  function Namespace(state) {
15026
15751
  let eventData;
15027
15752
  if (state.events) {
@@ -15070,9 +15795,9 @@ ${input.slice(result.pos)}
15070
15795
  }
15071
15796
  }
15072
15797
  var NestedInterfaceProperties$0 = $TS($S(PushIndent, $Q(NestedInterfaceProperty), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15073
- var props = $2;
15074
- if (props.length)
15075
- return props;
15798
+ var props2 = $2;
15799
+ if (props2.length)
15800
+ return props2;
15076
15801
  return $skip;
15077
15802
  });
15078
15803
  function NestedInterfaceProperties(state) {
@@ -15269,7 +15994,7 @@ ${input.slice(result.pos)}
15269
15994
  return result;
15270
15995
  }
15271
15996
  }
15272
- var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R53, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L134, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R54, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
15997
+ var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R54, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L135, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R55, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
15273
15998
  function TypeIndexSignature(state) {
15274
15999
  let eventData;
15275
16000
  if (state.events) {
@@ -15341,7 +16066,7 @@ ${input.slice(result.pos)}
15341
16066
  return result;
15342
16067
  }
15343
16068
  }
15344
- var ReturnTypeSuffix$0 = $TS($S(__, Colon, $E($S(__, $EXPECT($L167, fail, 'ReturnTypeSuffix "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2, $3, $4) {
16069
+ var ReturnTypeSuffix$0 = $TS($S(__, Colon, $E($S(__, $EXPECT($L168, fail, 'ReturnTypeSuffix "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2, $3, $4) {
15345
16070
  const children = [...$1, $2];
15346
16071
  if ($3)
15347
16072
  children.push($3);
@@ -15500,10 +16225,10 @@ ${input.slice(result.pos)}
15500
16225
  return result;
15501
16226
  }
15502
16227
  }
15503
- var TypeUnaryOp$0 = $S($EXPECT($L168, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
15504
- var TypeUnaryOp$1 = $S($EXPECT($L150, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
15505
- var TypeUnaryOp$2 = $S($EXPECT($L169, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
15506
- var TypeUnaryOp$3 = $S($EXPECT($L134, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
16228
+ var TypeUnaryOp$0 = $S($EXPECT($L169, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
16229
+ var TypeUnaryOp$1 = $S($EXPECT($L151, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
16230
+ var TypeUnaryOp$2 = $S($EXPECT($L170, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
16231
+ var TypeUnaryOp$3 = $S($EXPECT($L135, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
15507
16232
  function TypeUnaryOp(state) {
15508
16233
  let eventData;
15509
16234
  if (state.events) {
@@ -15579,8 +16304,8 @@ ${input.slice(result.pos)}
15579
16304
  return result;
15580
16305
  }
15581
16306
  }
15582
- var ImportType$0 = $S($EXPECT($L11, fail, 'ImportType "import"'), OpenParen, __, BasicStringLiteral, __, CloseParen, $E($S(Dot, IdentifierName)), $E(TypeArguments));
15583
- var ImportType$1 = $S($EXPECT($L11, fail, 'ImportType "import"'), InsertOpenParen, Trimmed_, BasicStringLiteral, InsertCloseParen);
16307
+ var ImportType$0 = $S($EXPECT($L12, fail, 'ImportType "import"'), OpenParen, __, StringLiteral, __, CloseParen, $E($S(Dot, IdentifierName)), $E(TypeArguments));
16308
+ var ImportType$1 = $S($EXPECT($L12, fail, 'ImportType "import"'), InsertOpenParen, Trimmed_, StringLiteral, InsertCloseParen);
15584
16309
  function ImportType(state) {
15585
16310
  let eventData;
15586
16311
  if (state.events) {
@@ -15728,12 +16453,12 @@ ${input.slice(result.pos)}
15728
16453
  return result;
15729
16454
  }
15730
16455
  }
15731
- var TypeLiteral$0 = Literal;
15732
- var TypeLiteral$1 = TemplateLiteral;
15733
- var TypeLiteral$2 = $TS($S($EXPECT($L154, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16456
+ var TypeLiteral$0 = TemplateLiteral;
16457
+ var TypeLiteral$1 = Literal;
16458
+ var TypeLiteral$2 = $TS($S($EXPECT($L155, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
15734
16459
  return { $loc, token: "void" };
15735
16460
  });
15736
- var TypeLiteral$3 = $TV($EXPECT($L170, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
16461
+ var TypeLiteral$3 = $TV($EXPECT($L171, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
15737
16462
  return { $loc, token: "[]" };
15738
16463
  });
15739
16464
  function TypeLiteral(state) {
@@ -15808,7 +16533,7 @@ ${input.slice(result.pos)}
15808
16533
  var InlineInterfacePropertyDelimiter$1 = $T($S($Y($S($C(IndentedFurther, $E(_)), InlineBasicInterfaceProperty)), InsertComma), function(value) {
15809
16534
  return value[1];
15810
16535
  });
15811
- var InlineInterfacePropertyDelimiter$2 = $Y($S(__, $C($EXPECT($L31, fail, 'InlineInterfacePropertyDelimiter ":"'), $EXPECT($L17, fail, 'InlineInterfacePropertyDelimiter ")"'), $EXPECT($L30, fail, 'InlineInterfacePropertyDelimiter "]"'), $EXPECT($L19, fail, 'InlineInterfacePropertyDelimiter "}"'))));
16536
+ var InlineInterfacePropertyDelimiter$2 = $Y($S(__, $C($EXPECT($L31, fail, 'InlineInterfacePropertyDelimiter ":"'), $EXPECT($L18, fail, 'InlineInterfacePropertyDelimiter ")"'), $EXPECT($L30, fail, 'InlineInterfacePropertyDelimiter "]"'), $EXPECT($L20, fail, 'InlineInterfacePropertyDelimiter "}"'))));
15812
16537
  var InlineInterfacePropertyDelimiter$3 = $Y(EOS);
15813
16538
  function InlineInterfacePropertyDelimiter(state) {
15814
16539
  let eventData;
@@ -15860,7 +16585,7 @@ ${input.slice(result.pos)}
15860
16585
  return result;
15861
16586
  }
15862
16587
  }
15863
- var FunctionType$0 = $TS($S(Parameters, __, $EXPECT($L5, fail, 'FunctionType "=>"'), $E(Type)), function($skip, $loc, $0, $1, $2, $3, $4) {
16588
+ var FunctionType$0 = $TS($S(Parameters, __, $EXPECT($L6, fail, 'FunctionType "=>"'), $E(Type)), function($skip, $loc, $0, $1, $2, $3, $4) {
15864
16589
  var type = $4;
15865
16590
  if (type) {
15866
16591
  return $0;
@@ -16112,7 +16837,7 @@ ${input.slice(result.pos)}
16112
16837
  return result;
16113
16838
  }
16114
16839
  }
16115
- var Shebang$0 = $S($R$0($EXPECT($R55, fail, "Shebang /#![^\\r\\n]*/")), EOL);
16840
+ var Shebang$0 = $S($R$0($EXPECT($R56, fail, "Shebang /#![^\\r\\n]*/")), EOL);
16116
16841
  function Shebang(state) {
16117
16842
  let eventData;
16118
16843
  if (state.events) {
@@ -16135,11 +16860,11 @@ ${input.slice(result.pos)}
16135
16860
  return result;
16136
16861
  }
16137
16862
  }
16138
- var CivetPrologue$0 = $T($S($EXPECT($R56, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(SimpleStatementDelimiter), $E(EOS)), function(value) {
16863
+ var CivetPrologue$0 = $T($S($EXPECT($R57, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(SimpleStatementDelimiter), $E(EOS)), function(value) {
16139
16864
  var content = value[2];
16140
16865
  return content;
16141
16866
  });
16142
- var CivetPrologue$1 = $T($S($EXPECT($R56, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(SimpleStatementDelimiter), $E(EOS)), function(value) {
16867
+ var CivetPrologue$1 = $T($S($EXPECT($R57, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(SimpleStatementDelimiter), $E(EOS)), function(value) {
16143
16868
  var content = value[2];
16144
16869
  return content;
16145
16870
  });
@@ -16165,7 +16890,7 @@ ${input.slice(result.pos)}
16165
16890
  return result;
16166
16891
  }
16167
16892
  }
16168
- var CivetPrologueContent$0 = $TS($S($EXPECT($L171, fail, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R57, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
16893
+ var CivetPrologueContent$0 = $TS($S($EXPECT($L172, fail, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R58, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
16169
16894
  var options = $3;
16170
16895
  return {
16171
16896
  type: "CivetPrologue",
@@ -16195,7 +16920,7 @@ ${input.slice(result.pos)}
16195
16920
  return result;
16196
16921
  }
16197
16922
  }
16198
- var CivetOption$0 = $TR($EXPECT($R58, fail, "CivetOption /\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
16923
+ var CivetOption$0 = $TR($EXPECT($R59, fail, "CivetOption /\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
16199
16924
  const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
16200
16925
  if (l)
16201
16926
  return l.toUpperCase();
@@ -16231,7 +16956,7 @@ ${input.slice(result.pos)}
16231
16956
  return result;
16232
16957
  }
16233
16958
  }
16234
- var UnknownPrologue$0 = $S($R$0($EXPECT($R56, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
16959
+ var UnknownPrologue$0 = $S($R$0($EXPECT($R57, fail, "UnknownPrologue /[\\t ]*/")), StringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
16235
16960
  function UnknownPrologue(state) {
16236
16961
  let eventData;
16237
16962
  if (state.events) {
@@ -16301,7 +17026,7 @@ ${input.slice(result.pos)}
16301
17026
  return result;
16302
17027
  }
16303
17028
  }
16304
- var EOL$0 = $TR($EXPECT($R59, fail, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
17029
+ var EOL$0 = $TR($EXPECT($R60, fail, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
16305
17030
  return { $loc, token: $0 };
16306
17031
  });
16307
17032
  function EOL(state) {
@@ -16326,7 +17051,7 @@ ${input.slice(result.pos)}
16326
17051
  return result;
16327
17052
  }
16328
17053
  }
16329
- var Debugger$0 = $TV($EXPECT($L16, fail, 'Debugger ""'), function($skip, $loc, $0, $1) {
17054
+ var Debugger$0 = $TV($EXPECT($L17, fail, 'Debugger ""'), function($skip, $loc, $0, $1) {
16330
17055
  debugger;
16331
17056
  });
16332
17057
  function Debugger(state) {
@@ -16351,7 +17076,7 @@ ${input.slice(result.pos)}
16351
17076
  return result;
16352
17077
  }
16353
17078
  }
16354
- var InsertSemicolon$0 = $TV($EXPECT($L16, fail, 'InsertSemicolon ""'), function($skip, $loc, $0, $1) {
17079
+ var InsertSemicolon$0 = $TV($EXPECT($L17, fail, 'InsertSemicolon ""'), function($skip, $loc, $0, $1) {
16355
17080
  return { $loc, token: ";" };
16356
17081
  });
16357
17082
  function InsertSemicolon(state) {
@@ -16376,7 +17101,7 @@ ${input.slice(result.pos)}
16376
17101
  return result;
16377
17102
  }
16378
17103
  }
16379
- var InsertOpenParen$0 = $TV($EXPECT($L16, fail, 'InsertOpenParen ""'), function($skip, $loc, $0, $1) {
17104
+ var InsertOpenParen$0 = $TV($EXPECT($L17, fail, 'InsertOpenParen ""'), function($skip, $loc, $0, $1) {
16380
17105
  return { $loc, token: "(" };
16381
17106
  });
16382
17107
  function InsertOpenParen(state) {
@@ -16401,7 +17126,7 @@ ${input.slice(result.pos)}
16401
17126
  return result;
16402
17127
  }
16403
17128
  }
16404
- var InsertCloseParen$0 = $TV($EXPECT($L16, fail, 'InsertCloseParen ""'), function($skip, $loc, $0, $1) {
17129
+ var InsertCloseParen$0 = $TV($EXPECT($L17, fail, 'InsertCloseParen ""'), function($skip, $loc, $0, $1) {
16405
17130
  return { $loc, token: ")" };
16406
17131
  });
16407
17132
  function InsertCloseParen(state) {
@@ -16426,7 +17151,7 @@ ${input.slice(result.pos)}
16426
17151
  return result;
16427
17152
  }
16428
17153
  }
16429
- var InsertOpenBrace$0 = $TV($EXPECT($L16, fail, 'InsertOpenBrace ""'), function($skip, $loc, $0, $1) {
17154
+ var InsertOpenBrace$0 = $TV($EXPECT($L17, fail, 'InsertOpenBrace ""'), function($skip, $loc, $0, $1) {
16430
17155
  return [{ $loc, token: " " }, { $loc, token: "{" }];
16431
17156
  });
16432
17157
  function InsertOpenBrace(state) {
@@ -16451,7 +17176,7 @@ ${input.slice(result.pos)}
16451
17176
  return result;
16452
17177
  }
16453
17178
  }
16454
- var InsertInlineOpenBrace$0 = $TV($EXPECT($L16, fail, 'InsertInlineOpenBrace ""'), function($skip, $loc, $0, $1) {
17179
+ var InsertInlineOpenBrace$0 = $TV($EXPECT($L17, fail, 'InsertInlineOpenBrace ""'), function($skip, $loc, $0, $1) {
16455
17180
  return { $loc, token: "{" };
16456
17181
  });
16457
17182
  function InsertInlineOpenBrace(state) {
@@ -16476,7 +17201,7 @@ ${input.slice(result.pos)}
16476
17201
  return result;
16477
17202
  }
16478
17203
  }
16479
- var InsertCloseBrace$0 = $TV($EXPECT($L16, fail, 'InsertCloseBrace ""'), function($skip, $loc, $0, $1) {
17204
+ var InsertCloseBrace$0 = $TV($EXPECT($L17, fail, 'InsertCloseBrace ""'), function($skip, $loc, $0, $1) {
16480
17205
  return { $loc, token: "}" };
16481
17206
  });
16482
17207
  function InsertCloseBrace(state) {
@@ -16501,7 +17226,57 @@ ${input.slice(result.pos)}
16501
17226
  return result;
16502
17227
  }
16503
17228
  }
16504
- var InsertComma$0 = $TV($EXPECT($L16, fail, 'InsertComma ""'), function($skip, $loc, $0, $1) {
17229
+ var InsertOpenBracket$0 = $TV($EXPECT($L17, fail, 'InsertOpenBracket ""'), function($skip, $loc, $0, $1) {
17230
+ return { $loc, token: "[" };
17231
+ });
17232
+ function InsertOpenBracket(state) {
17233
+ let eventData;
17234
+ if (state.events) {
17235
+ const result = state.events.enter?.("InsertOpenBracket", state);
17236
+ if (result) {
17237
+ if (result.cache)
17238
+ return result.cache;
17239
+ eventData = result.data;
17240
+ }
17241
+ }
17242
+ if (state.tokenize) {
17243
+ const result = $TOKEN("InsertOpenBracket", state, InsertOpenBracket$0(state));
17244
+ if (state.events)
17245
+ state.events.exit?.("InsertOpenBracket", state, result, eventData);
17246
+ return result;
17247
+ } else {
17248
+ const result = InsertOpenBracket$0(state);
17249
+ if (state.events)
17250
+ state.events.exit?.("InsertOpenBracket", state, result, eventData);
17251
+ return result;
17252
+ }
17253
+ }
17254
+ var InsertCloseBracket$0 = $TV($EXPECT($L17, fail, 'InsertCloseBracket ""'), function($skip, $loc, $0, $1) {
17255
+ return { $loc, token: "]" };
17256
+ });
17257
+ function InsertCloseBracket(state) {
17258
+ let eventData;
17259
+ if (state.events) {
17260
+ const result = state.events.enter?.("InsertCloseBracket", state);
17261
+ if (result) {
17262
+ if (result.cache)
17263
+ return result.cache;
17264
+ eventData = result.data;
17265
+ }
17266
+ }
17267
+ if (state.tokenize) {
17268
+ const result = $TOKEN("InsertCloseBracket", state, InsertCloseBracket$0(state));
17269
+ if (state.events)
17270
+ state.events.exit?.("InsertCloseBracket", state, result, eventData);
17271
+ return result;
17272
+ } else {
17273
+ const result = InsertCloseBracket$0(state);
17274
+ if (state.events)
17275
+ state.events.exit?.("InsertCloseBracket", state, result, eventData);
17276
+ return result;
17277
+ }
17278
+ }
17279
+ var InsertComma$0 = $TV($EXPECT($L17, fail, 'InsertComma ""'), function($skip, $loc, $0, $1) {
16505
17280
  return { $loc, token: "," };
16506
17281
  });
16507
17282
  function InsertComma(state) {
@@ -16526,7 +17301,7 @@ ${input.slice(result.pos)}
16526
17301
  return result;
16527
17302
  }
16528
17303
  }
16529
- var InsertConst$0 = $TV($EXPECT($L16, fail, 'InsertConst ""'), function($skip, $loc, $0, $1) {
17304
+ var InsertConst$0 = $TV($EXPECT($L17, fail, 'InsertConst ""'), function($skip, $loc, $0, $1) {
16530
17305
  return { $loc, token: "const " };
16531
17306
  });
16532
17307
  function InsertConst(state) {
@@ -16551,7 +17326,7 @@ ${input.slice(result.pos)}
16551
17326
  return result;
16552
17327
  }
16553
17328
  }
16554
- var InsertLet$0 = $TV($EXPECT($L16, fail, 'InsertLet ""'), function($skip, $loc, $0, $1) {
17329
+ var InsertLet$0 = $TV($EXPECT($L17, fail, 'InsertLet ""'), function($skip, $loc, $0, $1) {
16555
17330
  return { $loc, token: "let " };
16556
17331
  });
16557
17332
  function InsertLet(state) {
@@ -16576,7 +17351,7 @@ ${input.slice(result.pos)}
16576
17351
  return result;
16577
17352
  }
16578
17353
  }
16579
- var InsertReadonly$0 = $TV($EXPECT($L16, fail, 'InsertReadonly ""'), function($skip, $loc, $0, $1) {
17354
+ var InsertReadonly$0 = $TV($EXPECT($L17, fail, 'InsertReadonly ""'), function($skip, $loc, $0, $1) {
16580
17355
  return { ts: true, children: [{ $loc, token: "readonly " }] };
16581
17356
  });
16582
17357
  function InsertReadonly(state) {
@@ -16601,7 +17376,7 @@ ${input.slice(result.pos)}
16601
17376
  return result;
16602
17377
  }
16603
17378
  }
16604
- var InsertNewline$0 = $TV($EXPECT($L16, fail, 'InsertNewline ""'), function($skip, $loc, $0, $1) {
17379
+ var InsertNewline$0 = $TV($EXPECT($L17, fail, 'InsertNewline ""'), function($skip, $loc, $0, $1) {
16605
17380
  return "\n";
16606
17381
  });
16607
17382
  function InsertNewline(state) {
@@ -16626,7 +17401,7 @@ ${input.slice(result.pos)}
16626
17401
  return result;
16627
17402
  }
16628
17403
  }
16629
- var InsertIndent$0 = $TV($EXPECT($L16, fail, 'InsertIndent ""'), function($skip, $loc, $0, $1) {
17404
+ var InsertIndent$0 = $TV($EXPECT($L17, fail, 'InsertIndent ""'), function($skip, $loc, $0, $1) {
16630
17405
  return module2.currentIndent.token;
16631
17406
  });
16632
17407
  function InsertIndent(state) {
@@ -16651,7 +17426,7 @@ ${input.slice(result.pos)}
16651
17426
  return result;
16652
17427
  }
16653
17428
  }
16654
- var InsertSpace$0 = $TV($EXPECT($L16, fail, 'InsertSpace ""'), function($skip, $loc, $0, $1) {
17429
+ var InsertSpace$0 = $TV($EXPECT($L17, fail, 'InsertSpace ""'), function($skip, $loc, $0, $1) {
16655
17430
  return { $loc, token: " " };
16656
17431
  });
16657
17432
  function InsertSpace(state) {
@@ -16676,7 +17451,7 @@ ${input.slice(result.pos)}
16676
17451
  return result;
16677
17452
  }
16678
17453
  }
16679
- var InsertDot$0 = $TV($EXPECT($L16, fail, 'InsertDot ""'), function($skip, $loc, $0, $1) {
17454
+ var InsertDot$0 = $TV($EXPECT($L17, fail, 'InsertDot ""'), function($skip, $loc, $0, $1) {
16680
17455
  return { $loc, token: "." };
16681
17456
  });
16682
17457
  function InsertDot(state) {
@@ -16701,7 +17476,7 @@ ${input.slice(result.pos)}
16701
17476
  return result;
16702
17477
  }
16703
17478
  }
16704
- var InsertBreak$0 = $TV($EXPECT($L16, fail, 'InsertBreak ""'), function($skip, $loc, $0, $1) {
17479
+ var InsertBreak$0 = $TV($EXPECT($L17, fail, 'InsertBreak ""'), function($skip, $loc, $0, $1) {
16705
17480
  return { $loc, token: ";break;" };
16706
17481
  });
16707
17482
  function InsertBreak(state) {
@@ -16726,7 +17501,7 @@ ${input.slice(result.pos)}
16726
17501
  return result;
16727
17502
  }
16728
17503
  }
16729
- var InsertVar$0 = $TV($EXPECT($L16, fail, 'InsertVar ""'), function($skip, $loc, $0, $1) {
17504
+ var InsertVar$0 = $TV($EXPECT($L17, fail, 'InsertVar ""'), function($skip, $loc, $0, $1) {
16730
17505
  return { $loc, token: "var " };
16731
17506
  });
16732
17507
  function InsertVar(state) {
@@ -16751,7 +17526,7 @@ ${input.slice(result.pos)}
16751
17526
  return result;
16752
17527
  }
16753
17528
  }
16754
- var CoffeeBinaryExistentialEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeBinaryExistentialEnabled ""'), function($skip, $loc, $0, $1) {
17529
+ var CoffeeBinaryExistentialEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeBinaryExistentialEnabled ""'), function($skip, $loc, $0, $1) {
16755
17530
  if (module2.config.coffeeBinaryExistential)
16756
17531
  return;
16757
17532
  return $skip;
@@ -16778,7 +17553,7 @@ ${input.slice(result.pos)}
16778
17553
  return result;
16779
17554
  }
16780
17555
  }
16781
- var CoffeeBooleansEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeBooleansEnabled ""'), function($skip, $loc, $0, $1) {
17556
+ var CoffeeBooleansEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeBooleansEnabled ""'), function($skip, $loc, $0, $1) {
16782
17557
  if (module2.config.coffeeBooleans)
16783
17558
  return;
16784
17559
  return $skip;
@@ -16805,7 +17580,7 @@ ${input.slice(result.pos)}
16805
17580
  return result;
16806
17581
  }
16807
17582
  }
16808
- var CoffeeClassesEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeClassesEnabled ""'), function($skip, $loc, $0, $1) {
17583
+ var CoffeeClassesEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeClassesEnabled ""'), function($skip, $loc, $0, $1) {
16809
17584
  if (module2.config.coffeeClasses)
16810
17585
  return;
16811
17586
  return $skip;
@@ -16832,7 +17607,7 @@ ${input.slice(result.pos)}
16832
17607
  return result;
16833
17608
  }
16834
17609
  }
16835
- var CoffeeCommentEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeCommentEnabled ""'), function($skip, $loc, $0, $1) {
17610
+ var CoffeeCommentEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeCommentEnabled ""'), function($skip, $loc, $0, $1) {
16836
17611
  if (module2.config.coffeeComment)
16837
17612
  return;
16838
17613
  return $skip;
@@ -16859,7 +17634,7 @@ ${input.slice(result.pos)}
16859
17634
  return result;
16860
17635
  }
16861
17636
  }
16862
- var CoffeeDoEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeDoEnabled ""'), function($skip, $loc, $0, $1) {
17637
+ var CoffeeDoEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeDoEnabled ""'), function($skip, $loc, $0, $1) {
16863
17638
  if (module2.config.coffeeDo)
16864
17639
  return;
16865
17640
  return $skip;
@@ -16886,7 +17661,7 @@ ${input.slice(result.pos)}
16886
17661
  return result;
16887
17662
  }
16888
17663
  }
16889
- var CoffeeForLoopsEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeForLoopsEnabled ""'), function($skip, $loc, $0, $1) {
17664
+ var CoffeeForLoopsEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeForLoopsEnabled ""'), function($skip, $loc, $0, $1) {
16890
17665
  if (module2.config.coffeeForLoops)
16891
17666
  return;
16892
17667
  return $skip;
@@ -16913,7 +17688,7 @@ ${input.slice(result.pos)}
16913
17688
  return result;
16914
17689
  }
16915
17690
  }
16916
- var CoffeeInterpolationEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeInterpolationEnabled ""'), function($skip, $loc, $0, $1) {
17691
+ var CoffeeInterpolationEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeInterpolationEnabled ""'), function($skip, $loc, $0, $1) {
16917
17692
  if (module2.config.coffeeInterpolation)
16918
17693
  return;
16919
17694
  return $skip;
@@ -16940,7 +17715,7 @@ ${input.slice(result.pos)}
16940
17715
  return result;
16941
17716
  }
16942
17717
  }
16943
- var CoffeeIsntEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeIsntEnabled ""'), function($skip, $loc, $0, $1) {
17718
+ var CoffeeIsntEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeIsntEnabled ""'), function($skip, $loc, $0, $1) {
16944
17719
  if (module2.config.coffeeIsnt)
16945
17720
  return;
16946
17721
  return $skip;
@@ -16967,7 +17742,7 @@ ${input.slice(result.pos)}
16967
17742
  return result;
16968
17743
  }
16969
17744
  }
16970
- var CoffeeJSXEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeJSXEnabled ""'), function($skip, $loc, $0, $1) {
17745
+ var CoffeeJSXEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeJSXEnabled ""'), function($skip, $loc, $0, $1) {
16971
17746
  if (module2.config.coffeeJSX)
16972
17747
  return;
16973
17748
  return $skip;
@@ -16994,7 +17769,7 @@ ${input.slice(result.pos)}
16994
17769
  return result;
16995
17770
  }
16996
17771
  }
16997
- var CoffeeLineContinuationEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeLineContinuationEnabled ""'), function($skip, $loc, $0, $1) {
17772
+ var CoffeeLineContinuationEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeLineContinuationEnabled ""'), function($skip, $loc, $0, $1) {
16998
17773
  if (module2.config.coffeeLineContinuation)
16999
17774
  return;
17000
17775
  return $skip;
@@ -17021,7 +17796,7 @@ ${input.slice(result.pos)}
17021
17796
  return result;
17022
17797
  }
17023
17798
  }
17024
- var CoffeeNotEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeNotEnabled ""'), function($skip, $loc, $0, $1) {
17799
+ var CoffeeNotEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeNotEnabled ""'), function($skip, $loc, $0, $1) {
17025
17800
  if (module2.config.coffeeNot)
17026
17801
  return;
17027
17802
  return $skip;
@@ -17048,7 +17823,7 @@ ${input.slice(result.pos)}
17048
17823
  return result;
17049
17824
  }
17050
17825
  }
17051
- var CoffeeOfEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeOfEnabled ""'), function($skip, $loc, $0, $1) {
17826
+ var CoffeeOfEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeOfEnabled ""'), function($skip, $loc, $0, $1) {
17052
17827
  if (module2.config.coffeeOf)
17053
17828
  return;
17054
17829
  return $skip;
@@ -17075,7 +17850,7 @@ ${input.slice(result.pos)}
17075
17850
  return result;
17076
17851
  }
17077
17852
  }
17078
- var CoffeePrototypeEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeePrototypeEnabled ""'), function($skip, $loc, $0, $1) {
17853
+ var CoffeePrototypeEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeePrototypeEnabled ""'), function($skip, $loc, $0, $1) {
17079
17854
  if (module2.config.coffeePrototype)
17080
17855
  return;
17081
17856
  return $skip;
@@ -17102,7 +17877,7 @@ ${input.slice(result.pos)}
17102
17877
  return result;
17103
17878
  }
17104
17879
  }
17105
- var ObjectIsEnabled$0 = $TV($EXPECT($L16, fail, 'ObjectIsEnabled ""'), function($skip, $loc, $0, $1) {
17880
+ var ObjectIsEnabled$0 = $TV($EXPECT($L17, fail, 'ObjectIsEnabled ""'), function($skip, $loc, $0, $1) {
17106
17881
  if (module2.config.objectIs)
17107
17882
  return;
17108
17883
  return $skip;
@@ -17129,13 +17904,14 @@ ${input.slice(result.pos)}
17129
17904
  return result;
17130
17905
  }
17131
17906
  }
17132
- var Reset$0 = $TV($EXPECT($L16, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
17907
+ var Reset$0 = $TV($EXPECT($L17, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
17133
17908
  module2.indentLevels = [{
17134
17909
  level: 0,
17135
17910
  token: ""
17136
17911
  }];
17137
17912
  module2.suppressTrailingMemberProperty = [false];
17138
17913
  module2.JSXTagStack = [];
17914
+ module2.operators = /* @__PURE__ */ new Set();
17139
17915
  if (!module2._init) {
17140
17916
  module2._init = true;
17141
17917
  Object.defineProperties(module2, {
@@ -17399,7 +18175,7 @@ ${input.slice(result.pos)}
17399
18175
  return result;
17400
18176
  }
17401
18177
  }
17402
- var Init$0 = $TS($S($E(Shebang), $Q(DirectivePrologue), $EXPECT($L16, fail, 'Init ""')), function($skip, $loc, $0, $1, $2, $3) {
18178
+ var Init$0 = $TS($S($E(Shebang), $Q(DirectivePrologue), $EXPECT($L17, fail, 'Init ""')), function($skip, $loc, $0, $1, $2, $3) {
17403
18179
  var directives = $2;
17404
18180
  directives.forEach((directive) => {
17405
18181
  if (directive.type === "CivetPrologue") {
@@ -17609,11 +18385,11 @@ ${input.slice(result.pos)}
17609
18385
  return;
17610
18386
  case "WhenClause":
17611
18387
  node.children.splice(node.children.indexOf(node.break), 1);
17612
- if (node.block.length === 0) {
17613
- node.block.push(wrapWithReturn());
17614
- return;
18388
+ if (node.block.expressions.length) {
18389
+ insertReturn(node.block);
18390
+ } else {
18391
+ node.block.expressions.push(wrapWithReturn());
17615
18392
  }
17616
- insertReturn(node.block);
17617
18393
  return;
17618
18394
  case "DefaultClause":
17619
18395
  insertReturn(node.block);
@@ -17664,18 +18440,19 @@ ${input.slice(result.pos)}
17664
18440
  const returnStatement = wrapWithReturn(node[1]);
17665
18441
  node.splice(1, 1, returnStatement);
17666
18442
  }
17667
- module2.makeLeftHandSideExpression = function(exp) {
17668
- switch (exp.type) {
18443
+ module2.makeLeftHandSideExpression = function(expression) {
18444
+ switch (expression.type) {
17669
18445
  case "Identifier":
17670
18446
  case "Literal":
17671
18447
  case "CallExpression":
17672
18448
  case "MemberExpression":
17673
18449
  case "ParenthesizedExpression":
17674
- return exp;
18450
+ return expression;
17675
18451
  default:
17676
18452
  return {
17677
18453
  type: "ParenthesizedExpression",
17678
- children: ["(", exp, ")"]
18454
+ children: ["(", expression, ")"],
18455
+ expression
17679
18456
  };
17680
18457
  }
17681
18458
  };
@@ -17882,7 +18659,10 @@ ${input.slice(result.pos)}
17882
18659
  i++;
17883
18660
  }
17884
18661
  results.push(e);
17885
- return results;
18662
+ return {
18663
+ type: "TemplateLiteral",
18664
+ children: results
18665
+ };
17886
18666
  };
17887
18667
  module2.dedentBlockString = function({ $loc: $loc2, token: str }, spacing, trim = true) {
17888
18668
  if (spacing == null)
@@ -17902,11 +18682,67 @@ ${input.slice(result.pos)}
17902
18682
  token: str
17903
18683
  };
17904
18684
  };
17905
- module2.reorderBindingRestProperty = function(props) {
17906
- const names = props.flatMap((p) => p.names);
18685
+ module2.adjustBindingElements = function(elements) {
18686
+ const names = elements.flatMap((p) => p.names || []), { length } = elements;
18687
+ let blockPrefix, restIndex = -1, restCount = 0;
18688
+ elements.forEach(({ rest }, i) => {
18689
+ if (rest) {
18690
+ if (restIndex < 0)
18691
+ restIndex = i;
18692
+ restCount++;
18693
+ }
18694
+ });
18695
+ if (restCount === 0) {
18696
+ return {
18697
+ children: elements,
18698
+ names,
18699
+ blockPrefix,
18700
+ length
18701
+ };
18702
+ } else if (restCount === 1) {
18703
+ const rest = elements[restIndex];
18704
+ const after = elements.slice(restIndex + 1);
18705
+ let restIdentifier;
18706
+ if (rest.ref) {
18707
+ restIdentifier = rest.ref;
18708
+ } else {
18709
+ restIdentifier = rest.names[0];
18710
+ names.push(...rest.names);
18711
+ }
18712
+ if (after.length) {
18713
+ const spliceRef = module2.getRef("splice");
18714
+ blockPrefix = {
18715
+ type: "PostRestBindingElements",
18716
+ children: ["[", module2.insertTrimmingSpace(after, ""), "] = ", spliceRef, ".call(", restIdentifier, ", -", after.length.toString(), ")"],
18717
+ names: after.flatMap((p) => p.names)
18718
+ };
18719
+ }
18720
+ return {
18721
+ names,
18722
+ children: [...elements.slice(0, restIndex), {
18723
+ ...rest,
18724
+ children: rest.children.slice(0, -1)
18725
+ }],
18726
+ blockPrefix,
18727
+ length
18728
+ };
18729
+ }
18730
+ const err = {
18731
+ type: "Error",
18732
+ children: ["Multiple rest elements in array pattern"]
18733
+ };
18734
+ return {
18735
+ names,
18736
+ children: [...elements, err],
18737
+ blockPrefix,
18738
+ length
18739
+ };
18740
+ };
18741
+ module2.reorderBindingRestProperty = function(props2) {
18742
+ const names = props2.flatMap((p) => p.names);
17907
18743
  let restIndex = -1;
17908
18744
  let restCount = 0;
17909
- props.forEach(({ type }, i) => {
18745
+ props2.forEach(({ type }, i) => {
17910
18746
  if (type === "BindingRestProperty") {
17911
18747
  if (restIndex < 0)
17912
18748
  restIndex = i;
@@ -17914,21 +18750,20 @@ ${input.slice(result.pos)}
17914
18750
  }
17915
18751
  });
17916
18752
  if (restCount === 0) {
17917
- const children = [...props];
17918
18753
  return {
17919
- children,
18754
+ children: props2,
17920
18755
  names
17921
18756
  };
17922
18757
  } else if (restCount === 1) {
17923
- let after = props.slice(restIndex + 1);
17924
- let rest = props[restIndex];
17925
- props = props.slice(0, restIndex);
18758
+ let after = props2.slice(restIndex + 1);
18759
+ let rest = props2[restIndex];
18760
+ props2 = props2.slice(0, restIndex);
17926
18761
  if (after.length) {
17927
18762
  const [restDelim] = rest.children.slice(-1), lastAfterProp = after[after.length - 1], lastAfterChildren = lastAfterProp.children, [lastDelim] = lastAfterChildren.slice(-1);
17928
18763
  rest = { ...rest, children: [...rest.children.slice(0, -1), lastDelim] };
17929
18764
  after = [...after.slice(0, -1), { ...lastAfterProp, children: [...lastAfterChildren.slice(0, -1), restDelim] }];
17930
18765
  }
17931
- const children = [...props, ...after, rest];
18766
+ const children = [...props2, ...after, rest];
17932
18767
  return {
17933
18768
  children,
17934
18769
  names
@@ -18182,11 +19017,264 @@ ${input.slice(result.pos)}
18182
19017
  block
18183
19018
  };
18184
19019
  };
19020
+ function getPatternConditions(pattern, ref, conditions) {
19021
+ switch (pattern.type) {
19022
+ case "ArrayMatchingPattern": {
19023
+ const { elements, length } = pattern, hasRest = elements.some((e) => e.rest), comparator = hasRest ? " >= " : " === ", l = [comparator, (length - hasRest).toString()];
19024
+ conditions.push(
19025
+ ["Array.isArray(", ref, ")"],
19026
+ [ref, ".length", l]
19027
+ );
19028
+ elements.forEach(({ children: [, e] }, i) => {
19029
+ const subRef = [ref, "[", i.toString(), "]"];
19030
+ switch (e.type) {
19031
+ case "ArrayMatchingPattern":
19032
+ case "ObjectMatchingPattern":
19033
+ case "RegularExpressionLiteral":
19034
+ getPatternConditions(e, subRef, conditions);
19035
+ break;
19036
+ case "BindingMatchElement":
19037
+ getPatternConditions(e.match, subRef, conditions);
19038
+ break;
19039
+ }
19040
+ });
19041
+ const postRest = pattern.children.find((c) => c?.blockPrefix);
19042
+ if (postRest) {
19043
+ const postElements = postRest.blockPrefix.children[1], { length: postLength } = postElements;
19044
+ postElements.forEach(({ children: [, e] }, i) => {
19045
+ const subRef = [ref, "[", ref, ".length - ", (postLength + i).toString(), "]"];
19046
+ switch (e.type) {
19047
+ case "ArrayMatchingPattern":
19048
+ case "ObjectMatchingPattern":
19049
+ case "RegularExpressionLiteral":
19050
+ case "Literal":
19051
+ getPatternConditions(e, subRef, conditions);
19052
+ break;
19053
+ case "BindingMatchElement":
19054
+ getPatternConditions(e.match, subRef, conditions);
19055
+ break;
19056
+ }
19057
+ });
19058
+ }
19059
+ break;
19060
+ }
19061
+ case "ObjectMatchingPattern": {
19062
+ conditions.push(
19063
+ ["typeof ", ref, " === 'object'"],
19064
+ [ref, " != null"]
19065
+ );
19066
+ pattern.properties.forEach((p) => {
19067
+ switch (p.type) {
19068
+ case "BindingMatchProperty": {
19069
+ const { name, match } = p;
19070
+ let subRef;
19071
+ switch (name.type) {
19072
+ case "ComputedPropertyName":
19073
+ conditions.push([name.expression, " in ", ref]);
19074
+ subRef = [ref, name];
19075
+ break;
19076
+ case "Literal":
19077
+ case "StringLiteral":
19078
+ case void 0:
19079
+ conditions.push([name, " in ", ref]);
19080
+ subRef = [ref, "[", name, "]"];
19081
+ break;
19082
+ default:
19083
+ conditions.push(["'", name, "' in ", ref]);
19084
+ subRef = [ref, ".", name];
19085
+ }
19086
+ getPatternConditions(p.match, subRef, conditions);
19087
+ break;
19088
+ }
19089
+ case "BindingProperty":
19090
+ conditions.push(["'", p.identifier, "' in ", ref]);
19091
+ break;
19092
+ }
19093
+ });
19094
+ break;
19095
+ }
19096
+ case "RegularExpressionLiteral": {
19097
+ conditions.push(
19098
+ ["typeof ", ref, " === 'string'"],
19099
+ [pattern, ".test(", ref, ")"]
19100
+ );
19101
+ break;
19102
+ }
19103
+ default: {
19104
+ conditions.push([
19105
+ ref,
19106
+ " === ",
19107
+ pattern
19108
+ ]);
19109
+ }
19110
+ }
19111
+ }
19112
+ function elideMatchersFromArrayBindings(elements) {
19113
+ return elements.map(({ children: [ws, e, sep] }) => {
19114
+ switch (e.type) {
19115
+ case "Literal":
19116
+ case "RegularExpressionLiteral":
19117
+ case "StringLiteral":
19118
+ return sep;
19119
+ default:
19120
+ return [ws, nonMatcherBindings(e), sep];
19121
+ }
19122
+ });
19123
+ }
19124
+ function elideMatchersFromPropertyBindings(properties) {
19125
+ return properties.map((p) => {
19126
+ switch (p.type) {
19127
+ case "BindingMatchProperty": {
19128
+ const { children, name, match } = p;
19129
+ const [ws, , , , , , sep] = children;
19130
+ switch (match.type) {
19131
+ case "ArrayMatchingPattern":
19132
+ case "ObjectMatchingPattern":
19133
+ return {
19134
+ ...p,
19135
+ children: [ws, name, ": ", nonMatcherBindings(match)]
19136
+ };
19137
+ case "Identifier":
19138
+ switch (name.type) {
19139
+ case "ComputedPropertyName":
19140
+ case "Literal":
19141
+ case void 0:
19142
+ return {
19143
+ ...p,
19144
+ children: [ws, name, ": ", match, sep]
19145
+ };
19146
+ }
19147
+ case "Literal":
19148
+ case "RegularExpressionLiteral":
19149
+ case "StringLiteral":
19150
+ default:
19151
+ return {
19152
+ ...p,
19153
+ children: [ws, name, sep]
19154
+ };
19155
+ }
19156
+ }
19157
+ case "BindingProperty":
19158
+ case "BindingRestProperty":
19159
+ default:
19160
+ return p;
19161
+ }
19162
+ });
19163
+ }
19164
+ function nonMatcherBindings(pattern) {
19165
+ switch (pattern.type) {
19166
+ case "ArrayMatchingPattern":
19167
+ return ["[", elideMatchersFromArrayBindings(pattern.elements), "]"];
19168
+ case "PostRestBindingElements": {
19169
+ const els = elideMatchersFromArrayBindings(pattern.children[1]);
19170
+ return {
19171
+ ...pattern,
19172
+ children: [
19173
+ pattern.children[0],
19174
+ els,
19175
+ ...pattern.children.slice(2)
19176
+ ]
19177
+ };
19178
+ }
19179
+ case "ObjectMatchingPattern":
19180
+ return ["{", elideMatchersFromPropertyBindings(pattern.properties), "}"];
19181
+ default:
19182
+ return pattern;
19183
+ }
19184
+ }
19185
+ function processPatternMatching(statements) {
19186
+ gatherRecursiveAll(statements, (n) => n.type === "SwitchStatement").forEach((s) => {
19187
+ const { caseBlock } = s;
19188
+ const { clauses } = caseBlock;
19189
+ let errors = false;
19190
+ let isPattern = false;
19191
+ if (clauses.some((c) => c.type === "PatternClause")) {
19192
+ isPattern = true;
19193
+ clauses.forEach((c) => {
19194
+ if (!(c.type === "PatternClause" || c.type === "DefaultClause")) {
19195
+ errors = true;
19196
+ c.children.push({
19197
+ type: "Error",
19198
+ message: "Can't mix pattern matching and non-pattern matching clauses"
19199
+ });
19200
+ }
19201
+ });
19202
+ }
19203
+ if (errors || !isPattern)
19204
+ return;
19205
+ let { expression } = s;
19206
+ if (expression.type === "ParenthesizedExpression") {
19207
+ expression = expression.expression;
19208
+ }
19209
+ let ref;
19210
+ switch (expression.type) {
19211
+ case "Identifier":
19212
+ case "Literal":
19213
+ ref = expression;
19214
+ break;
19215
+ default:
19216
+ ref = {
19217
+ type: "Ref",
19218
+ base: "m",
19219
+ id: "m"
19220
+ };
19221
+ }
19222
+ let prev = [], root = prev;
19223
+ const l = clauses.length;
19224
+ clauses.forEach((c, i) => {
19225
+ if (c.type === "DefaultClause") {
19226
+ prev.push(c.block);
19227
+ return;
19228
+ }
19229
+ let { pattern, block } = c;
19230
+ const indent = block.expressions?.[0]?.[0] || "";
19231
+ const conditions = [];
19232
+ getPatternConditions(pattern, ref, conditions);
19233
+ const condition = {
19234
+ type: "ParenthesizedExpression",
19235
+ children: ["(", conditions.map((c2, i2) => {
19236
+ if (i2 === 0)
19237
+ return c2;
19238
+ return [" && ", ...c2];
19239
+ }), ")"],
19240
+ expression: conditions
19241
+ };
19242
+ const prefix = [];
19243
+ switch (pattern.type) {
19244
+ case "ArrayMatchingPattern":
19245
+ case "ObjectMatchingPattern": {
19246
+ let [splices, thisAssignments] = gatherBindingCode(pattern);
19247
+ splices = splices.map((s2) => [", ", nonMatcherBindings(s2)]);
19248
+ thisAssignments = thisAssignments.map((a) => [indent, a, ";\n"]);
19249
+ prefix.push([indent, "const ", nonMatcherBindings(pattern), " = ", ref, splices, ";\n"]);
19250
+ prefix.push(...thisAssignments);
19251
+ break;
19252
+ }
19253
+ }
19254
+ block.expressions.unshift(...prefix);
19255
+ const next = [];
19256
+ if (block.bare) {
19257
+ block.children.unshift(" {");
19258
+ block.children.push("}");
19259
+ block.bare = false;
19260
+ }
19261
+ const e = i < l - 1 ? ["\nelse "] : [];
19262
+ prev.push({
19263
+ type: "IfStatement",
19264
+ children: ["if", condition, block, ...e, next]
19265
+ });
19266
+ prev = next;
19267
+ });
19268
+ s.type = "PatternMatchingStatement";
19269
+ s.children = [root];
19270
+ });
19271
+ }
18185
19272
  module2.processProgram = function(statements) {
18186
19273
  processAssignments(statements);
18187
19274
  processFunctions(statements);
18188
19275
  processSwitchExpressions(statements);
18189
19276
  processTryExpressions(statements);
19277
+ processPatternMatching(statements);
18190
19278
  gatherRecursiveAll(statements, (n) => n.type === "IterationExpression").forEach((e) => expressionizeIteration(e));
18191
19279
  checkSpliceRef(statements);
18192
19280
  statements.unshift(...module2.prelude);
@@ -18433,7 +19521,7 @@ ${input.slice(result.pos)}
18433
19521
  return result;
18434
19522
  }
18435
19523
  }
18436
- var Indent$0 = $TR($EXPECT($R60, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
19524
+ var Indent$0 = $TR($EXPECT($R61, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
18437
19525
  let level;
18438
19526
  if (module2.config.tab) {
18439
19527
  const tabs = $0.match(/\t/g);
@@ -18588,7 +19676,7 @@ ${input.slice(result.pos)}
18588
19676
  return result;
18589
19677
  }
18590
19678
  }
18591
- var PopIndent$0 = $TV($EXPECT($L16, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
19679
+ var PopIndent$0 = $TV($EXPECT($L17, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
18592
19680
  if (module2.config.verbose) {
18593
19681
  console.log("popping indent", module2.indentLevels[module2.indentLevels.length - 1], "->", module2.indentLevels[module2.indentLevels.length - 2]);
18594
19682
  }
@@ -18694,6 +19782,13 @@ var generate_default = gen = function(node, options) {
18694
19782
  }).join("");
18695
19783
  }
18696
19784
  if (typeof node === "object") {
19785
+ if (node.type === "Error") {
19786
+ if (options.errors == null) {
19787
+ options.errors = [];
19788
+ }
19789
+ options.errors.push(node);
19790
+ return "";
19791
+ }
18697
19792
  if (options.js && node.ts) {
18698
19793
  return "";
18699
19794
  }
@@ -18710,13 +19805,17 @@ var generate_default = gen = function(node, options) {
18710
19805
  return token;
18711
19806
  }
18712
19807
  if (!node.children) {
19808
+ switch (node.type) {
19809
+ case "Ref":
19810
+ throw new Error(`Unpopulated ref ${JSON.stringify(node)}`);
19811
+ }
18713
19812
  debugger;
18714
- throw new Error("Unknown node", JSON.stringify(node));
19813
+ throw new Error(`Unknown node ${JSON.stringify(node)}`);
18715
19814
  }
18716
19815
  return gen(node.children, options);
18717
19816
  }
18718
19817
  debugger;
18719
- throw new Error("Unknown node", JSON.stringify(node));
19818
+ throw new Error(`Unknown node ${JSON.stringify(node)}`);
18720
19819
  };
18721
19820
  var prune = function(node) {
18722
19821
  var a;
@@ -19074,16 +20173,19 @@ remapPosition = function(position, sourcemapLines) {
19074
20173
  "civet coffeeCompat";
19075
20174
  var SourceMap2;
19076
20175
  var base64Encode2;
19077
- var defaultOptions;
19078
20176
  var makeCache;
19079
20177
  var parse;
19080
20178
  var uncacheable;
19081
20179
  ({ parse } = import_parser.default);
19082
20180
  ({ SourceMap: SourceMap2, base64Encode: base64Encode2 } = util_exports);
19083
- defaultOptions = {};
19084
20181
  uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "Declaration", "Debugger", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationSuppressed", "ExtendedExpression", "FatArrowBody", "FunctionDeclaration", "FunctionExpression", "HoistableDeclaration", "ImplicitArguments", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedApplicationAllowed", "IndentedFurther", "IndentedJSXChildExpression", "InlineObjectLiteral", "InsertIndent", "JSXChild", "JSXChildren", "JSXElement", "JSXFragment", "JSXImplicitFragment", "JSXMixedChildren", "JSXNested", "JSXNestedChildren", "JSXOptionalClosingElement", "JSXOptionalClosingFragment", "JSXTag", "LeftHandSideExpression", "MemberExpression", "MemberExpressionRest", "Nested", "NestedBindingElement", "NestedBindingElements", "NestedBlockExpression", "NestedBlockExpression", "NestedBlockStatement", "NestedBlockStatements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedObject", "NestedPropertyDefinitions", "NonSuppressedTrailingMemberExpressions", "ObjectLiteral", "PopIndent", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "Samedent", "ShortCircuitExpression", "SingleLineAssignmentExpression", "SingleLineComment", "SingleLineStatements", "SnugNamedProperty", "Statement", "StatementListItem", "SuppressIndentedApplication", "SuppressTrailingMemberProperty", "ThinArrowFunction", "TrackIndented", "TrailingMemberExpressions", "TrailingMemberPropertyAllowed", "TypedJSXElement", "TypedJSXFragment", "UnaryExpression", "UpdateExpression"]);
19085
- var compile = function(src, options = defaultOptions) {
19086
- var ast, code, events, filename, sm, srcMapJSON;
20182
+ var compile = function(src, options) {
20183
+ var ast, code, events, filename, ref, result, sm, srcMapJSON;
20184
+ if (!options) {
20185
+ options = {};
20186
+ } else {
20187
+ options = { ...options };
20188
+ }
19087
20189
  filename = options.filename || "unknown";
19088
20190
  if (filename.endsWith(".coffee") && !/^(#![^\r\n]*(\r\n|\n|\r))?\s*['"]civet/.test(src)) {
19089
20191
  src = `"civet coffeeCompat"; ${src}`;
@@ -19111,7 +20213,11 @@ ${"//#"} sourceMappingURL=data:application/json;base64,${base64Encode2(JSON.stri
19111
20213
  };
19112
20214
  }
19113
20215
  }
19114
- return generate_default(ast, options);
20216
+ result = generate_default(ast, options);
20217
+ if ((ref = options.errors) != null ? ref.length : void 0) {
20218
+ throw new Error(`Parse errors: ${options.errors.join("\n")} `);
20219
+ }
20220
+ return result;
19115
20221
  };
19116
20222
  makeCache = function() {
19117
20223
  var caches, events;