@danielx/civet 0.5.56 → 0.5.57

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.mjs CHANGED
@@ -519,6 +519,8 @@ ${input.slice(result.pos)}
519
519
  BindingPropertyList,
520
520
  ArrayBindingPattern,
521
521
  ArrayBindingPatternContent,
522
+ BindingElementList,
523
+ NestedBindingElementList,
522
524
  Elision,
523
525
  NestedBindingProperties,
524
526
  NestedBindingPropertyList,
@@ -529,9 +531,26 @@ ${input.slice(result.pos)}
529
531
  BindingElement,
530
532
  BindingRestElement,
531
533
  EmptyBindingPattern,
534
+ MatchingPattern,
535
+ ObjectMatchingPattern,
536
+ ObjectMatchingPatternContent,
537
+ NestedMatchingProperties,
538
+ MatchingPropertyList,
539
+ NestedMatchingPropertyList,
540
+ MatchingProperty,
541
+ MatchingRestProperty,
542
+ ArrayMatchingPattern,
543
+ ArrayMatchingPatternContent,
544
+ NestedMatchingElements,
545
+ MatchingElementList,
546
+ NestedMatchingElementList,
547
+ MatchingElement,
548
+ MatchingRestElement,
532
549
  FunctionDeclaration,
533
550
  FunctionSignature,
534
551
  FunctionExpression,
552
+ OperatorDeclaration,
553
+ OperatorSignature,
535
554
  AmpersandBlockRHS,
536
555
  AmpersandUnaryPrefix,
537
556
  ThinArrowFunction,
@@ -542,6 +561,7 @@ ${input.slice(result.pos)}
542
561
  ThenClause,
543
562
  BracedOrEmptyBlock,
544
563
  EmptyBlock,
564
+ EmptyBareBlock,
545
565
  BracedBlock,
546
566
  SingleLineStatements,
547
567
  BracedContent,
@@ -552,7 +572,6 @@ ${input.slice(result.pos)}
552
572
  NullLiteral,
553
573
  BooleanLiteral,
554
574
  CoffeeScriptBooleanLiteral,
555
- Comma,
556
575
  Identifier,
557
576
  IdentifierName,
558
577
  IdentifierReference,
@@ -639,7 +658,6 @@ ${input.slice(result.pos)}
639
658
  NestedCaseClause,
640
659
  CaseClause,
641
660
  CaseExpressionList,
642
- NoExpressions,
643
661
  ImpliedColon,
644
662
  TryStatement,
645
663
  TryExpression,
@@ -702,7 +720,6 @@ ${input.slice(result.pos)}
702
720
  IntegerLiteralKind,
703
721
  DecimalIntegerLiteral,
704
722
  StringLiteral,
705
- BasicStringLiteral,
706
723
  DoubleStringCharacters,
707
724
  SingleStringCharacters,
708
725
  TripleDoubleStringCharacters,
@@ -764,6 +781,7 @@ ${input.slice(result.pos)}
764
781
  CloseParen,
765
782
  CoffeeSubstitutionStart,
766
783
  Colon,
784
+ Comma,
767
785
  ConstructorShorthand,
768
786
  Declare,
769
787
  Default,
@@ -794,6 +812,7 @@ ${input.slice(result.pos)}
794
812
  OpenBrace,
795
813
  OpenBracket,
796
814
  OpenParen,
815
+ Operator,
797
816
  Public,
798
817
  Private,
799
818
  Protected,
@@ -935,6 +954,8 @@ ${input.slice(result.pos)}
935
954
  InsertOpenBrace,
936
955
  InsertInlineOpenBrace,
937
956
  InsertCloseBrace,
957
+ InsertOpenBracket,
958
+ InsertCloseBracket,
938
959
  InsertComma,
939
960
  InsertConst,
940
961
  InsertLet,
@@ -970,33 +991,33 @@ ${input.slice(result.pos)}
970
991
  Nested
971
992
  });
972
993
  var $L0 = $L("/ ");
973
- var $L1 = $L("?");
974
- var $L2 = $L(".");
975
- var $L3 = $L("++");
976
- var $L4 = $L("--");
977
- var $L5 = $L("=>");
978
- var $L6 = $L(" ");
979
- var $L7 = $L("implements");
980
- var $L8 = $L("<:");
981
- var $L9 = $L("#");
982
- var $L10 = $L("super");
983
- var $L11 = $L("import");
984
- var $L12 = $L("!");
985
- var $L13 = $L("-");
986
- var $L14 = $L("super[");
987
- var $L15 = $L("import.meta");
988
- var $L16 = $L("");
989
- var $L17 = $L(")");
990
- var $L18 = $L("->");
991
- var $L19 = $L("}");
992
- var $L20 = $L("null");
993
- var $L21 = $L("true");
994
- var $L22 = $L("false");
995
- var $L23 = $L("yes");
996
- var $L24 = $L("on");
997
- var $L25 = $L("no");
998
- var $L26 = $L("off");
999
- var $L27 = $L(",");
994
+ var $L1 = $L("(");
995
+ var $L2 = $L("?");
996
+ var $L3 = $L(".");
997
+ var $L4 = $L("++");
998
+ var $L5 = $L("--");
999
+ var $L6 = $L("=>");
1000
+ var $L7 = $L(" ");
1001
+ var $L8 = $L("implements");
1002
+ var $L9 = $L("<:");
1003
+ var $L10 = $L("#");
1004
+ var $L11 = $L("super");
1005
+ var $L12 = $L("import");
1006
+ var $L13 = $L("!");
1007
+ var $L14 = $L("-");
1008
+ var $L15 = $L("super[");
1009
+ var $L16 = $L("import.meta");
1010
+ var $L17 = $L("");
1011
+ var $L18 = $L(")");
1012
+ var $L19 = $L("->");
1013
+ var $L20 = $L("}");
1014
+ var $L21 = $L("null");
1015
+ var $L22 = $L("true");
1016
+ var $L23 = $L("false");
1017
+ var $L24 = $L("yes");
1018
+ var $L25 = $L("on");
1019
+ var $L26 = $L("no");
1020
+ var $L27 = $L("off");
1000
1021
  var $L28 = $L("=");
1001
1022
  var $L29 = $L(">");
1002
1023
  var $L30 = $L("]");
@@ -1019,32 +1040,32 @@ ${input.slice(result.pos)}
1019
1040
  var $L47 = $L("?=");
1020
1041
  var $L48 = $L("and=");
1021
1042
  var $L49 = $L("or=");
1022
- var $L50 = $L("**");
1023
- var $L51 = $L("*");
1024
- var $L52 = $L("/");
1025
- var $L53 = $L("%%");
1026
- var $L54 = $L("%");
1027
- var $L55 = $L("+");
1028
- var $L56 = $L("<=");
1029
- var $L57 = $L(">=");
1030
- var $L58 = $L("<?");
1031
- var $L59 = $L("!<?");
1032
- var $L60 = $L("<<");
1033
- var $L61 = $L(">>>");
1034
- var $L62 = $L(">>");
1035
- var $L63 = $L("!==");
1036
- var $L64 = $L("!=");
1037
- var $L65 = $L("isnt");
1038
- var $L66 = $L("===");
1039
- var $L67 = $L("==");
1040
- var $L68 = $L("and");
1041
- var $L69 = $L("&&");
1042
- var $L70 = $L("of");
1043
- var $L71 = $L("or");
1044
- var $L72 = $L("||");
1045
- var $L73 = $L("??");
1046
- var $L74 = $L("instanceof");
1047
- var $L75 = $L("not");
1043
+ var $L50 = $L("not");
1044
+ var $L51 = $L("**");
1045
+ var $L52 = $L("*");
1046
+ var $L53 = $L("/");
1047
+ var $L54 = $L("%%");
1048
+ var $L55 = $L("%");
1049
+ var $L56 = $L("+");
1050
+ var $L57 = $L("<=");
1051
+ var $L58 = $L(">=");
1052
+ var $L59 = $L("<?");
1053
+ var $L60 = $L("!<?");
1054
+ var $L61 = $L("<<");
1055
+ var $L62 = $L(">>>");
1056
+ var $L63 = $L(">>");
1057
+ var $L64 = $L("!==");
1058
+ var $L65 = $L("!=");
1059
+ var $L66 = $L("isnt");
1060
+ var $L67 = $L("===");
1061
+ var $L68 = $L("==");
1062
+ var $L69 = $L("and");
1063
+ var $L70 = $L("&&");
1064
+ var $L71 = $L("of");
1065
+ var $L72 = $L("or");
1066
+ var $L73 = $L("||");
1067
+ var $L74 = $L("??");
1068
+ var $L75 = $L("instanceof");
1048
1069
  var $L76 = $L("in");
1049
1070
  var $L77 = $L("is");
1050
1071
  var $L78 = $L("&");
@@ -1062,20 +1083,20 @@ ${input.slice(result.pos)}
1062
1083
  var $L90 = $L("/*");
1063
1084
  var $L91 = $L("*/");
1064
1085
  var $L92 = $L("\\");
1065
- var $L93 = $L("(");
1066
- var $L94 = $L("[");
1067
- var $L95 = $L("`");
1068
- var $L96 = $L("abstract");
1069
- var $L97 = $L("as");
1070
- var $L98 = $L("@");
1071
- var $L99 = $L("@@");
1072
- var $L100 = $L("async");
1073
- var $L101 = $L("await");
1074
- var $L102 = $L("by");
1075
- var $L103 = $L("case");
1076
- var $L104 = $L("catch");
1077
- var $L105 = $L("class");
1078
- var $L106 = $L("#{");
1086
+ var $L93 = $L("[");
1087
+ var $L94 = $L("`");
1088
+ var $L95 = $L("abstract");
1089
+ var $L96 = $L("as");
1090
+ var $L97 = $L("@");
1091
+ var $L98 = $L("@@");
1092
+ var $L99 = $L("async");
1093
+ var $L100 = $L("await");
1094
+ var $L101 = $L("by");
1095
+ var $L102 = $L("case");
1096
+ var $L103 = $L("catch");
1097
+ var $L104 = $L("class");
1098
+ var $L105 = $L("#{");
1099
+ var $L106 = $L(",");
1079
1100
  var $L107 = $L("declare");
1080
1101
  var $L108 = $L("default");
1081
1102
  var $L109 = $L("delete");
@@ -1099,48 +1120,49 @@ ${input.slice(result.pos)}
1099
1120
  var $L127 = $L("new");
1100
1121
  var $L128 = $L("<");
1101
1122
  var $L129 = $L("{");
1102
- var $L130 = $L("public");
1103
- var $L131 = $L("private");
1104
- var $L132 = $L("protected");
1105
- var $L133 = $L("|>");
1106
- var $L134 = $L("readonly");
1107
- var $L135 = $L("return");
1108
- var $L136 = $L("satisfies");
1109
- var $L137 = $L("'");
1110
- var $L138 = $L("static");
1111
- var $L139 = $L("${");
1112
- var $L140 = $L("switch");
1113
- var $L141 = $L("target");
1114
- var $L142 = $L("then");
1115
- var $L143 = $L("this");
1116
- var $L144 = $L("throw");
1117
- var $L145 = $L('"""');
1118
- var $L146 = $L("'''");
1119
- var $L147 = $L("///");
1120
- var $L148 = $L("```");
1121
- var $L149 = $L("try");
1122
- var $L150 = $L("typeof");
1123
- var $L151 = $L("unless");
1124
- var $L152 = $L("until");
1125
- var $L153 = $L("var");
1126
- var $L154 = $L("void");
1127
- var $L155 = $L("when");
1128
- var $L156 = $L("while");
1129
- var $L157 = $L("yield");
1130
- var $L158 = $L("/>");
1131
- var $L159 = $L("</");
1132
- var $L160 = $L("<>");
1133
- var $L161 = $L("</>");
1134
- var $L162 = $L("<!--");
1135
- var $L163 = $L("-->");
1136
- var $L164 = $L("type");
1137
- var $L165 = $L("interface");
1138
- var $L166 = $L("namespace");
1139
- var $L167 = $L("asserts");
1140
- var $L168 = $L("keyof");
1141
- var $L169 = $L("infer");
1142
- var $L170 = $L("[]");
1143
- var $L171 = $L("civet");
1123
+ var $L130 = $L("operator");
1124
+ var $L131 = $L("public");
1125
+ var $L132 = $L("private");
1126
+ var $L133 = $L("protected");
1127
+ var $L134 = $L("|>");
1128
+ var $L135 = $L("readonly");
1129
+ var $L136 = $L("return");
1130
+ var $L137 = $L("satisfies");
1131
+ var $L138 = $L("'");
1132
+ var $L139 = $L("static");
1133
+ var $L140 = $L("${");
1134
+ var $L141 = $L("switch");
1135
+ var $L142 = $L("target");
1136
+ var $L143 = $L("then");
1137
+ var $L144 = $L("this");
1138
+ var $L145 = $L("throw");
1139
+ var $L146 = $L('"""');
1140
+ var $L147 = $L("'''");
1141
+ var $L148 = $L("///");
1142
+ var $L149 = $L("```");
1143
+ var $L150 = $L("try");
1144
+ var $L151 = $L("typeof");
1145
+ var $L152 = $L("unless");
1146
+ var $L153 = $L("until");
1147
+ var $L154 = $L("var");
1148
+ var $L155 = $L("void");
1149
+ var $L156 = $L("when");
1150
+ var $L157 = $L("while");
1151
+ var $L158 = $L("yield");
1152
+ var $L159 = $L("/>");
1153
+ var $L160 = $L("</");
1154
+ var $L161 = $L("<>");
1155
+ var $L162 = $L("</>");
1156
+ var $L163 = $L("<!--");
1157
+ var $L164 = $L("-->");
1158
+ var $L165 = $L("type");
1159
+ var $L166 = $L("interface");
1160
+ var $L167 = $L("namespace");
1161
+ var $L168 = $L("asserts");
1162
+ var $L169 = $L("keyof");
1163
+ var $L170 = $L("infer");
1164
+ var $L171 = $L("[]");
1165
+ var $L172 = $L("civet");
1144
1166
  var $R0 = $R(new RegExp("(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
1145
1167
  var $R1 = $R(new RegExp("[0-9]", "suy"));
1146
1168
  var $R2 = $R(new RegExp("[&]", "suy"));
@@ -1183,25 +1205,26 @@ ${input.slice(result.pos)}
1183
1205
  var $R39 = $R(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy"));
1184
1206
  var $R40 = $R(new RegExp(".", "suy"));
1185
1207
  var $R41 = $R(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy"));
1186
- var $R42 = $R(new RegExp("###(?!#)", "suy"));
1187
- var $R43 = $R(new RegExp("[^\\r\\n]", "suy"));
1188
- var $R44 = $R(new RegExp("[ \\t]+", "suy"));
1189
- var $R45 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
1190
- var $R46 = $R(new RegExp("\\s", "suy"));
1191
- var $R47 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
1192
- var $R48 = $R(new RegExp("[\\s>]", "suy"));
1193
- var $R49 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
1194
- var $R50 = $R(new RegExp("[<>]", "suy"));
1195
- var $R51 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
1196
- var $R52 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1197
- var $R53 = $R(new RegExp("[+-]?", "suy"));
1198
- var $R54 = $R(new RegExp("[+-]", "suy"));
1199
- var $R55 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1200
- var $R56 = $R(new RegExp("[\\t ]*", "suy"));
1201
- var $R57 = $R(new RegExp("[\\s]*", "suy"));
1202
- var $R58 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1203
- var $R59 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1204
- var $R60 = $R(new RegExp("[ \\t]*", "suy"));
1208
+ var $R42 = $R(new RegExp("[^]*?###", "suy"));
1209
+ var $R43 = $R(new RegExp("###(?!#)", "suy"));
1210
+ var $R44 = $R(new RegExp("[^\\r\\n]", "suy"));
1211
+ var $R45 = $R(new RegExp("[ \\t]+", "suy"));
1212
+ var $R46 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
1213
+ var $R47 = $R(new RegExp("\\s", "suy"));
1214
+ var $R48 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
1215
+ var $R49 = $R(new RegExp("[\\s>]", "suy"));
1216
+ var $R50 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
1217
+ var $R51 = $R(new RegExp("[<>]", "suy"));
1218
+ var $R52 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
1219
+ var $R53 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1220
+ var $R54 = $R(new RegExp("[+-]?", "suy"));
1221
+ var $R55 = $R(new RegExp("[+-]", "suy"));
1222
+ var $R56 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1223
+ var $R57 = $R(new RegExp("[\\t ]*", "suy"));
1224
+ var $R58 = $R(new RegExp("[\\s]*", "suy"));
1225
+ var $R59 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1226
+ var $R60 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1227
+ var $R61 = $R(new RegExp("[ \\t]*", "suy"));
1205
1228
  var Program$0 = $TS($S(Reset, Init, __, $Q(TopLevelStatement), __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
1206
1229
  var statements = $4;
1207
1230
  module.processProgram(statements);
@@ -1524,6 +1547,11 @@ ${input.slice(result.pos)}
1524
1547
  var ForbiddenImplicitCalls$0 = $R$0($EXPECT($R0, fail, "ForbiddenImplicitCalls /(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
1525
1548
  var ForbiddenImplicitCalls$1 = $EXPECT($L0, fail, 'ForbiddenImplicitCalls "/ "');
1526
1549
  var ForbiddenImplicitCalls$2 = AtAt;
1550
+ var ForbiddenImplicitCalls$3 = $TS($S(Identifier, $N($EXPECT($L1, fail, 'ForbiddenImplicitCalls "("'))), function($skip, $loc, $0, $1, $2) {
1551
+ if (module.operators.has($1.name))
1552
+ return $1;
1553
+ return $skip;
1554
+ });
1527
1555
  function ForbiddenImplicitCalls(state) {
1528
1556
  let eventData;
1529
1557
  if (state.events) {
@@ -1535,12 +1563,12 @@ ${input.slice(result.pos)}
1535
1563
  }
1536
1564
  }
1537
1565
  if (state.tokenize) {
1538
- const result = $TOKEN("ForbiddenImplicitCalls", state, ForbiddenImplicitCalls$0(state) || ForbiddenImplicitCalls$1(state) || ForbiddenImplicitCalls$2(state));
1566
+ const result = $TOKEN("ForbiddenImplicitCalls", state, ForbiddenImplicitCalls$0(state) || ForbiddenImplicitCalls$1(state) || ForbiddenImplicitCalls$2(state) || ForbiddenImplicitCalls$3(state));
1539
1567
  if (state.events)
1540
1568
  state.events.exit?.("ForbiddenImplicitCalls", state, result, eventData);
1541
1569
  return result;
1542
1570
  } else {
1543
- const result = ForbiddenImplicitCalls$0(state) || ForbiddenImplicitCalls$1(state) || ForbiddenImplicitCalls$2(state);
1571
+ const result = ForbiddenImplicitCalls$0(state) || ForbiddenImplicitCalls$1(state) || ForbiddenImplicitCalls$2(state) || ForbiddenImplicitCalls$3(state);
1544
1572
  if (state.events)
1545
1573
  state.events.exit?.("ForbiddenImplicitCalls", state, result, eventData);
1546
1574
  return result;
@@ -1577,7 +1605,7 @@ ${input.slice(result.pos)}
1577
1605
  return result;
1578
1606
  }
1579
1607
  }
1580
- 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) {
1608
+ 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) {
1581
1609
  return $1.concat($2);
1582
1610
  });
1583
1611
  function TrailingMemberExpressions(state) {
@@ -1971,7 +1999,7 @@ ${input.slice(result.pos)}
1971
1999
  return result;
1972
2000
  }
1973
2001
  }
1974
- var UpdateExpressionSymbol$0 = $TV($C($EXPECT($L3, fail, 'UpdateExpressionSymbol "++"'), $EXPECT($L4, fail, 'UpdateExpressionSymbol "--"')), function($skip, $loc, $0, $1) {
2002
+ var UpdateExpressionSymbol$0 = $TV($C($EXPECT($L4, fail, 'UpdateExpressionSymbol "++"'), $EXPECT($L5, fail, 'UpdateExpressionSymbol "--"')), function($skip, $loc, $0, $1) {
1975
2003
  return { $loc, token: $1 };
1976
2004
  });
1977
2005
  function UpdateExpressionSymbol(state) {
@@ -2250,7 +2278,7 @@ ${input.slice(result.pos)}
2250
2278
  return result;
2251
2279
  }
2252
2280
  }
2253
- var FatArrow$0 = $TS($S(__, $EXPECT($L5, fail, 'FatArrow "=>"')), function($skip, $loc, $0, $1, $2) {
2281
+ var FatArrow$0 = $TS($S(__, $EXPECT($L6, fail, 'FatArrow "=>"')), function($skip, $loc, $0, $1, $2) {
2254
2282
  var ws = $1;
2255
2283
  if (!ws.length)
2256
2284
  return " =>";
@@ -2333,7 +2361,7 @@ ${input.slice(result.pos)}
2333
2361
  }
2334
2362
  }
2335
2363
  var TernaryRest$0 = NestedTernaryRest;
2336
- 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) {
2364
+ 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) {
2337
2365
  return $0.slice(2);
2338
2366
  });
2339
2367
  function TernaryRest(state) {
@@ -2508,13 +2536,13 @@ ${input.slice(result.pos)}
2508
2536
  }
2509
2537
  var PrimaryExpression$0 = ObjectLiteral;
2510
2538
  var PrimaryExpression$1 = ThisLiteral;
2511
- var PrimaryExpression$2 = Literal;
2512
- var PrimaryExpression$3 = ArrayLiteral;
2513
- var PrimaryExpression$4 = IdentifierReference;
2514
- var PrimaryExpression$5 = FunctionExpression;
2515
- var PrimaryExpression$6 = ClassExpression;
2516
- var PrimaryExpression$7 = RegularExpressionLiteral;
2517
- var PrimaryExpression$8 = TemplateLiteral;
2539
+ var PrimaryExpression$2 = TemplateLiteral;
2540
+ var PrimaryExpression$3 = Literal;
2541
+ var PrimaryExpression$4 = ArrayLiteral;
2542
+ var PrimaryExpression$5 = IdentifierReference;
2543
+ var PrimaryExpression$6 = FunctionExpression;
2544
+ var PrimaryExpression$7 = ClassExpression;
2545
+ var PrimaryExpression$8 = RegularExpressionLiteral;
2518
2546
  var PrimaryExpression$9 = ParenthesizedExpression;
2519
2547
  var PrimaryExpression$10 = JSXImplicitFragment;
2520
2548
  function PrimaryExpression(state) {
@@ -2547,8 +2575,8 @@ ${input.slice(result.pos)}
2547
2575
  }
2548
2576
  return {
2549
2577
  type: "ParenthesizedExpression",
2550
- expression: exp,
2551
- children: $0
2578
+ children: $0,
2579
+ expression: exp
2552
2580
  };
2553
2581
  });
2554
2582
  function ParenthesizedExpression(state) {
@@ -2693,7 +2721,7 @@ ${input.slice(result.pos)}
2693
2721
  return result;
2694
2722
  }
2695
2723
  }
2696
- var ExtendsToken$0 = $TS($S(Loc, __, OpenAngleBracket, $E($EXPECT($L6, fail, 'ExtendsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
2724
+ var ExtendsToken$0 = $TS($S(Loc, __, OpenAngleBracket, $E($EXPECT($L7, fail, 'ExtendsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
2697
2725
  var l = $1;
2698
2726
  var ws = $2;
2699
2727
  var lt = $3;
@@ -2787,7 +2815,7 @@ ${input.slice(result.pos)}
2787
2815
  return result;
2788
2816
  }
2789
2817
  }
2790
- var ImplementsToken$0 = $TS($S(Loc, __, ImplementsShorthand, $E($EXPECT($L6, fail, 'ImplementsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
2818
+ var ImplementsToken$0 = $TS($S(Loc, __, ImplementsShorthand, $E($EXPECT($L7, fail, 'ImplementsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
2791
2819
  var l = $1;
2792
2820
  var ws = $2;
2793
2821
  var token = $3;
@@ -2797,7 +2825,7 @@ ${input.slice(result.pos)}
2797
2825
  }
2798
2826
  return { children };
2799
2827
  });
2800
- var ImplementsToken$1 = $TS($S(__, $EXPECT($L7, fail, 'ImplementsToken "implements"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
2828
+ var ImplementsToken$1 = $TS($S(__, $EXPECT($L8, fail, 'ImplementsToken "implements"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
2801
2829
  $2 = { $loc, token: $2 };
2802
2830
  return [$1, $2];
2803
2831
  });
@@ -2823,7 +2851,7 @@ ${input.slice(result.pos)}
2823
2851
  return result;
2824
2852
  }
2825
2853
  }
2826
- var ImplementsShorthand$0 = $TV($EXPECT($L8, fail, 'ImplementsShorthand "<:"'), function($skip, $loc, $0, $1) {
2854
+ var ImplementsShorthand$0 = $TV($EXPECT($L9, fail, 'ImplementsShorthand "<:"'), function($skip, $loc, $0, $1) {
2827
2855
  return { $loc, token: "implements " };
2828
2856
  });
2829
2857
  function ImplementsShorthand(state) {
@@ -3074,7 +3102,7 @@ ${input.slice(result.pos)}
3074
3102
  }
3075
3103
  }
3076
3104
  var ThisLiteral$0 = This;
3077
- var ThisLiteral$1 = $TS($S(AtThis, $TEXT($S($E($EXPECT($L9, fail, 'ThisLiteral "#"')), IdentifierName))), function($skip, $loc, $0, $1, $2) {
3105
+ var ThisLiteral$1 = $TS($S(AtThis, $TEXT($S($E($EXPECT($L10, fail, 'ThisLiteral "#"')), IdentifierName))), function($skip, $loc, $0, $1, $2) {
3078
3106
  var at = $1;
3079
3107
  var id = $2;
3080
3108
  return [at, ".", id];
@@ -3128,7 +3156,7 @@ ${input.slice(result.pos)}
3128
3156
  return result;
3129
3157
  }
3130
3158
  }
3131
- var LeftHandSideExpression$0 = $TS($S($Q($S(New, $N($EXPECT($L2, fail, 'LeftHandSideExpression "."')), __)), CallExpression), function($skip, $loc, $0, $1, $2) {
3159
+ var LeftHandSideExpression$0 = $TS($S($Q($S(New, $N($EXPECT($L3, fail, 'LeftHandSideExpression "."')), __)), CallExpression), function($skip, $loc, $0, $1, $2) {
3132
3160
  if ($1.length)
3133
3161
  return $0;
3134
3162
  return $2;
@@ -3155,14 +3183,14 @@ ${input.slice(result.pos)}
3155
3183
  return result;
3156
3184
  }
3157
3185
  }
3158
- var CallExpression$0 = $TS($S($EXPECT($L10, fail, 'CallExpression "super"'), ArgumentsWithTrailingMemberExpressions, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
3186
+ var CallExpression$0 = $TS($S($EXPECT($L11, fail, 'CallExpression "super"'), ArgumentsWithTrailingMemberExpressions, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
3159
3187
  var rest = $3;
3160
3188
  return {
3161
3189
  type: "CallExpression",
3162
3190
  children: [$1, ...$2, ...rest.flat()]
3163
3191
  };
3164
3192
  });
3165
- var CallExpression$1 = $TS($S($EXPECT($L11, fail, 'CallExpression "import"'), ArgumentsWithTrailingMemberExpressions, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
3193
+ var CallExpression$1 = $TS($S($EXPECT($L12, fail, 'CallExpression "import"'), ArgumentsWithTrailingMemberExpressions, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
3166
3194
  var rest = $3;
3167
3195
  return {
3168
3196
  type: "CallExpression",
@@ -3261,7 +3289,7 @@ ${input.slice(result.pos)}
3261
3289
  return result;
3262
3290
  }
3263
3291
  }
3264
- var NonNullAssertion$0 = $T($EXPECT($L12, fail, 'NonNullAssertion "!"'), function(value) {
3292
+ var NonNullAssertion$0 = $T($EXPECT($L13, fail, 'NonNullAssertion "!"'), function(value) {
3265
3293
  return { "type": "NonNullAssertion", "ts": true, "children": value };
3266
3294
  });
3267
3295
  function NonNullAssertion(state) {
@@ -3376,7 +3404,7 @@ ${input.slice(result.pos)}
3376
3404
  children: $0
3377
3405
  };
3378
3406
  });
3379
- var MemberBracketContent$1 = $TS($S(Dot, $C(StringLiteral, TemplateLiteral)), function($skip, $loc, $0, $1, $2) {
3407
+ var MemberBracketContent$1 = $TS($S(Dot, $C(TemplateLiteral, StringLiteral)), function($skip, $loc, $0, $1, $2) {
3380
3408
  var dot = $1;
3381
3409
  var str = $2;
3382
3410
  return {
@@ -3400,7 +3428,7 @@ ${input.slice(result.pos)}
3400
3428
  ]
3401
3429
  };
3402
3430
  });
3403
- var MemberBracketContent$3 = $TS($S(Dot, $EXPECT($L13, fail, 'MemberBracketContent "-"'), IntegerLiteral), function($skip, $loc, $0, $1, $2, $3) {
3431
+ var MemberBracketContent$3 = $TS($S(Dot, $EXPECT($L14, fail, 'MemberBracketContent "-"'), IntegerLiteral), function($skip, $loc, $0, $1, $2, $3) {
3404
3432
  var dot = $1;
3405
3433
  var neg = $2;
3406
3434
  var num = $3;
@@ -3542,8 +3570,8 @@ ${input.slice(result.pos)}
3542
3570
  return result;
3543
3571
  }
3544
3572
  }
3545
- var SuperProperty$0 = $S($EXPECT($L14, fail, 'SuperProperty "super["'), ExtendedExpression, __, CloseBracket);
3546
- var SuperProperty$1 = $S($EXPECT($L10, fail, 'SuperProperty "super"'), $N($C(QuestionMark, NonNullAssertion)), PropertyAccess);
3573
+ var SuperProperty$0 = $S($EXPECT($L15, fail, 'SuperProperty "super["'), ExtendedExpression, __, CloseBracket);
3574
+ var SuperProperty$1 = $S($EXPECT($L11, fail, 'SuperProperty "super"'), $N($C(QuestionMark, NonNullAssertion)), PropertyAccess);
3547
3575
  function SuperProperty(state) {
3548
3576
  let eventData;
3549
3577
  if (state.events) {
@@ -3567,7 +3595,7 @@ ${input.slice(result.pos)}
3567
3595
  }
3568
3596
  }
3569
3597
  var MetaProperty$0 = $S(New, Dot, Target);
3570
- var MetaProperty$1 = $TS($S($EXPECT($L15, fail, 'MetaProperty "import.meta"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
3598
+ var MetaProperty$1 = $TS($S($EXPECT($L16, fail, 'MetaProperty "import.meta"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
3571
3599
  return { $loc, token: $1 };
3572
3600
  });
3573
3601
  function MetaProperty(state) {
@@ -3593,7 +3621,7 @@ ${input.slice(result.pos)}
3593
3621
  }
3594
3622
  }
3595
3623
  var Parameters$0 = NonEmptyParameters;
3596
- var Parameters$1 = $TV($EXPECT($L16, fail, 'Parameters ""'), function($skip, $loc, $0, $1) {
3624
+ var Parameters$1 = $TV($EXPECT($L17, fail, 'Parameters ""'), function($skip, $loc, $0, $1) {
3597
3625
  return {
3598
3626
  type: "Parameters",
3599
3627
  children: [{ $loc, token: "()" }],
@@ -3754,7 +3782,7 @@ ${input.slice(result.pos)}
3754
3782
  }
3755
3783
  }
3756
3784
  var ParameterElementDelimiter$0 = $S($Q(_), Comma);
3757
- var ParameterElementDelimiter$1 = $Y($S(__, $EXPECT($L17, fail, 'ParameterElementDelimiter ")"')));
3785
+ var ParameterElementDelimiter$1 = $Y($S(__, $EXPECT($L18, fail, 'ParameterElementDelimiter ")"')));
3758
3786
  var ParameterElementDelimiter$2 = $T($S($Y(EOS), InsertComma), function(value) {
3759
3787
  return value[1];
3760
3788
  });
@@ -3944,10 +3972,10 @@ ${input.slice(result.pos)}
3944
3972
  }
3945
3973
  var ObjectBindingPatternContent$0 = NestedBindingProperties;
3946
3974
  var ObjectBindingPatternContent$1 = $TV($E(BindingPropertyList), function($skip, $loc, $0, $1) {
3947
- var props = $0;
3948
- if (!props)
3975
+ var props2 = $0;
3976
+ if (!props2)
3949
3977
  return { children: [], names: [] };
3950
- return module.reorderBindingRestProperty(props);
3978
+ return module.reorderBindingRestProperty(props2);
3951
3979
  });
3952
3980
  function ObjectBindingPatternContent(state) {
3953
3981
  let eventData;
@@ -3972,8 +4000,8 @@ ${input.slice(result.pos)}
3972
4000
  }
3973
4001
  }
3974
4002
  var BindingPropertyList$0 = $TV($P($S(BindingProperty, ObjectPropertyDelimiter)), function($skip, $loc, $0, $1) {
3975
- var props = $0;
3976
- return props.map(([prop, delim]) => {
4003
+ var props2 = $0;
4004
+ return props2.map(([prop, delim]) => {
3977
4005
  return {
3978
4006
  ...prop,
3979
4007
  children: [...prop.children, delim]
@@ -4033,36 +4061,11 @@ ${input.slice(result.pos)}
4033
4061
  }
4034
4062
  }
4035
4063
  var ArrayBindingPatternContent$0 = NestedBindingElements;
4036
- var ArrayBindingPatternContent$1 = $TS($S($Q($C(BindingElement, Elision)), $E($S(BindingRestElement, ArrayElementDelimiter)), $Q($C(BindingElement, Elision))), function($skip, $loc, $0, $1, $2, $3) {
4037
- var props = $1;
4038
- var rest = $2;
4039
- var after = $3;
4040
- const names = props.flatMap((p) => p.names || []);
4041
- const children = [...props];
4042
- let blockPrefix;
4043
- if (rest) {
4044
- const [restBinding] = rest;
4045
- children.push(restBinding);
4046
- let restIdentifier;
4047
- if (restBinding.ref) {
4048
- restIdentifier = restBinding.ref;
4049
- } else {
4050
- restIdentifier = restBinding.names[0];
4051
- names.push(...restBinding.names);
4052
- }
4053
- if (after.length) {
4054
- const spliceRef = module.getRef("splice");
4055
- blockPrefix = {
4056
- children: ["[", module.insertTrimmingSpace(after, ""), "] = ", spliceRef, ".call(", restIdentifier, ", -", after.length.toString(), ")"],
4057
- names: after.flatMap((p) => p.names)
4058
- };
4059
- }
4060
- }
4061
- return {
4062
- names,
4063
- children,
4064
- blockPrefix
4065
- };
4064
+ var ArrayBindingPatternContent$1 = $TV($E(BindingElementList), function($skip, $loc, $0, $1) {
4065
+ var elements = $0;
4066
+ if (!elements)
4067
+ return { children: [], names: [] };
4068
+ return module.adjustBindingElements(elements);
4066
4069
  });
4067
4070
  function ArrayBindingPatternContent(state) {
4068
4071
  let eventData;
@@ -4086,6 +4089,71 @@ ${input.slice(result.pos)}
4086
4089
  return result;
4087
4090
  }
4088
4091
  }
4092
+ var BindingElementList$0 = $TV($P($S(BindingElement, ArrayElementDelimiter)), function($skip, $loc, $0, $1) {
4093
+ var elements = $0;
4094
+ return elements.map(([element, delim]) => {
4095
+ return {
4096
+ ...element,
4097
+ children: [...element.children, delim]
4098
+ };
4099
+ });
4100
+ });
4101
+ function BindingElementList(state) {
4102
+ let eventData;
4103
+ if (state.events) {
4104
+ const result = state.events.enter?.("BindingElementList", state);
4105
+ if (result) {
4106
+ if (result.cache)
4107
+ return result.cache;
4108
+ eventData = result.data;
4109
+ }
4110
+ }
4111
+ if (state.tokenize) {
4112
+ const result = $TOKEN("BindingElementList", state, BindingElementList$0(state));
4113
+ if (state.events)
4114
+ state.events.exit?.("BindingElementList", state, result, eventData);
4115
+ return result;
4116
+ } else {
4117
+ const result = BindingElementList$0(state);
4118
+ if (state.events)
4119
+ state.events.exit?.("BindingElementList", state, result, eventData);
4120
+ return result;
4121
+ }
4122
+ }
4123
+ var NestedBindingElementList$0 = $TS($S(Nested, BindingElementList), function($skip, $loc, $0, $1, $2) {
4124
+ var ws = $1;
4125
+ var elements = $2;
4126
+ return elements.map((element, i) => {
4127
+ if (i > 0)
4128
+ return element;
4129
+ return {
4130
+ ...element,
4131
+ children: [ws, ...element.children]
4132
+ };
4133
+ });
4134
+ });
4135
+ function NestedBindingElementList(state) {
4136
+ let eventData;
4137
+ if (state.events) {
4138
+ const result = state.events.enter?.("NestedBindingElementList", state);
4139
+ if (result) {
4140
+ if (result.cache)
4141
+ return result.cache;
4142
+ eventData = result.data;
4143
+ }
4144
+ }
4145
+ if (state.tokenize) {
4146
+ const result = $TOKEN("NestedBindingElementList", state, NestedBindingElementList$0(state));
4147
+ if (state.events)
4148
+ state.events.exit?.("NestedBindingElementList", state, result, eventData);
4149
+ return result;
4150
+ } else {
4151
+ const result = NestedBindingElementList$0(state);
4152
+ if (state.events)
4153
+ state.events.exit?.("NestedBindingElementList", state, result, eventData);
4154
+ return result;
4155
+ }
4156
+ }
4089
4157
  var Elision$0 = $S(__, Comma);
4090
4158
  function Elision(state) {
4091
4159
  let eventData;
@@ -4110,11 +4178,10 @@ ${input.slice(result.pos)}
4110
4178
  }
4111
4179
  }
4112
4180
  var NestedBindingProperties$0 = $TS($S(PushIndent, $Q(NestedBindingPropertyList), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
4113
- var props = $2;
4114
- if (!props.length)
4181
+ var props2 = $2;
4182
+ if (!props2.length)
4115
4183
  return $skip;
4116
- props = props.flat();
4117
- return module.reorderBindingRestProperty(props);
4184
+ return module.reorderBindingRestProperty(props2.flat());
4118
4185
  });
4119
4186
  function NestedBindingProperties(state) {
4120
4187
  let eventData;
@@ -4140,8 +4207,8 @@ ${input.slice(result.pos)}
4140
4207
  }
4141
4208
  var NestedBindingPropertyList$0 = $TS($S(Nested, BindingPropertyList), function($skip, $loc, $0, $1, $2) {
4142
4209
  var ws = $1;
4143
- var props = $2;
4144
- return props.map((prop, i) => {
4210
+ var props2 = $2;
4211
+ return props2.map((prop, i) => {
4145
4212
  if (i > 0)
4146
4213
  return prop;
4147
4214
  return {
@@ -4259,37 +4326,11 @@ ${input.slice(result.pos)}
4259
4326
  return result;
4260
4327
  }
4261
4328
  }
4262
- 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) {
4263
- var props = $2;
4264
- var rest = $3;
4265
- var after = $4;
4266
- if (!(props.length || rest))
4329
+ var NestedBindingElements$0 = $TS($S(PushIndent, $Q(NestedBindingElementList), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
4330
+ var elements = $2;
4331
+ if (!elements.length)
4267
4332
  return $skip;
4268
- const names = props.flatMap((p) => p.names), children = [...props];
4269
- let blockPrefix;
4270
- if (rest) {
4271
- const [, restBinding] = rest;
4272
- let restIdentifier;
4273
- if (restBinding.ref) {
4274
- restIdentifier = restBinding.binding.ref;
4275
- } else {
4276
- restIdentifier = restBinding.names[0];
4277
- }
4278
- if (after.length) {
4279
- const spliceRef = module.getRef("splice");
4280
- blockPrefix = {
4281
- children: ["[", module.insertTrimmingSpace(after, ""), "] = ", spliceRef, ".call(", restIdentifier, ", -", after.length.toString(), ")"],
4282
- names: after.flatMap((p) => p.names)
4283
- };
4284
- }
4285
- children.push(...rest);
4286
- names.push(...restBinding.names);
4287
- }
4288
- return {
4289
- children,
4290
- names,
4291
- blockPrefix
4292
- };
4333
+ return module.adjustBindingElements(elements.flat());
4293
4334
  });
4294
4335
  function NestedBindingElements(state) {
4295
4336
  let eventData;
@@ -4321,10 +4362,498 @@ ${input.slice(result.pos)}
4321
4362
  children: [indent, ...element.children]
4322
4363
  };
4323
4364
  });
4324
- function NestedBindingElement(state) {
4365
+ function NestedBindingElement(state) {
4366
+ let eventData;
4367
+ if (state.events) {
4368
+ const result = state.events.enter?.("NestedBindingElement", state);
4369
+ if (result) {
4370
+ if (result.cache)
4371
+ return result.cache;
4372
+ eventData = result.data;
4373
+ }
4374
+ }
4375
+ if (state.tokenize) {
4376
+ const result = $TOKEN("NestedBindingElement", state, NestedBindingElement$0(state));
4377
+ if (state.events)
4378
+ state.events.exit?.("NestedBindingElement", state, result, eventData);
4379
+ return result;
4380
+ } else {
4381
+ const result = NestedBindingElement$0(state);
4382
+ if (state.events)
4383
+ state.events.exit?.("NestedBindingElement", state, result, eventData);
4384
+ return result;
4385
+ }
4386
+ }
4387
+ var BindingElement$0 = BindingRestElement;
4388
+ var BindingElement$1 = $TS($S($C(BindingIdentifier, BindingPattern), $E(Initializer)), function($skip, $loc, $0, $1, $2) {
4389
+ var binding = $1;
4390
+ return {
4391
+ names: binding.names,
4392
+ children: $0
4393
+ };
4394
+ });
4395
+ var BindingElement$2 = $TV($EXPECT($L17, fail, 'BindingElement ""'), function($skip, $loc, $0, $1) {
4396
+ return {
4397
+ type: "ElisionElement",
4398
+ children: [],
4399
+ names: []
4400
+ };
4401
+ });
4402
+ function BindingElement(state) {
4403
+ let eventData;
4404
+ if (state.events) {
4405
+ const result = state.events.enter?.("BindingElement", state);
4406
+ if (result) {
4407
+ if (result.cache)
4408
+ return result.cache;
4409
+ eventData = result.data;
4410
+ }
4411
+ }
4412
+ if (state.tokenize) {
4413
+ const result = $TOKEN("BindingElement", state, BindingElement$0(state) || BindingElement$1(state) || BindingElement$2(state));
4414
+ if (state.events)
4415
+ state.events.exit?.("BindingElement", state, result, eventData);
4416
+ return result;
4417
+ } else {
4418
+ const result = BindingElement$0(state) || BindingElement$1(state) || BindingElement$2(state);
4419
+ if (state.events)
4420
+ state.events.exit?.("BindingElement", state, result, eventData);
4421
+ return result;
4422
+ }
4423
+ }
4424
+ var BindingRestElement$0 = $TS($S($E(_), DotDotDot, $C(BindingIdentifier, BindingPattern, EmptyBindingPattern)), function($skip, $loc, $0, $1, $2, $3) {
4425
+ var ws = $1;
4426
+ var dots = $2;
4427
+ var binding = $3;
4428
+ return {
4429
+ ...binding,
4430
+ children: [...ws || [], dots, ...binding.children],
4431
+ rest: true
4432
+ };
4433
+ });
4434
+ var BindingRestElement$1 = $TS($S($E(_), $C(BindingIdentifier, BindingPattern), DotDotDot), function($skip, $loc, $0, $1, $2, $3) {
4435
+ var ws = $1;
4436
+ var binding = $2;
4437
+ var dots = $3;
4438
+ return {
4439
+ ...binding,
4440
+ children: [...ws || [], dots, ...binding.children],
4441
+ rest: true
4442
+ };
4443
+ });
4444
+ function BindingRestElement(state) {
4445
+ let eventData;
4446
+ if (state.events) {
4447
+ const result = state.events.enter?.("BindingRestElement", state);
4448
+ if (result) {
4449
+ if (result.cache)
4450
+ return result.cache;
4451
+ eventData = result.data;
4452
+ }
4453
+ }
4454
+ if (state.tokenize) {
4455
+ const result = $TOKEN("BindingRestElement", state, BindingRestElement$0(state) || BindingRestElement$1(state));
4456
+ if (state.events)
4457
+ state.events.exit?.("BindingRestElement", state, result, eventData);
4458
+ return result;
4459
+ } else {
4460
+ const result = BindingRestElement$0(state) || BindingRestElement$1(state);
4461
+ if (state.events)
4462
+ state.events.exit?.("BindingRestElement", state, result, eventData);
4463
+ return result;
4464
+ }
4465
+ }
4466
+ var EmptyBindingPattern$0 = $TV($EXPECT($L17, fail, 'EmptyBindingPattern ""'), function($skip, $loc, $0, $1) {
4467
+ const ref = {
4468
+ type: "Ref",
4469
+ base: "ref",
4470
+ id: "ref"
4471
+ };
4472
+ return {
4473
+ type: "EmptyBinding",
4474
+ children: [ref],
4475
+ names: [],
4476
+ ref
4477
+ };
4478
+ });
4479
+ function EmptyBindingPattern(state) {
4480
+ let eventData;
4481
+ if (state.events) {
4482
+ const result = state.events.enter?.("EmptyBindingPattern", state);
4483
+ if (result) {
4484
+ if (result.cache)
4485
+ return result.cache;
4486
+ eventData = result.data;
4487
+ }
4488
+ }
4489
+ if (state.tokenize) {
4490
+ const result = $TOKEN("EmptyBindingPattern", state, EmptyBindingPattern$0(state));
4491
+ if (state.events)
4492
+ state.events.exit?.("EmptyBindingPattern", state, result, eventData);
4493
+ return result;
4494
+ } else {
4495
+ const result = EmptyBindingPattern$0(state);
4496
+ if (state.events)
4497
+ state.events.exit?.("EmptyBindingPattern", state, result, eventData);
4498
+ return result;
4499
+ }
4500
+ }
4501
+ var MatchingPattern$0 = ObjectMatchingPattern;
4502
+ var MatchingPattern$1 = ArrayMatchingPattern;
4503
+ var MatchingPattern$2 = Literal;
4504
+ var MatchingPattern$3 = RegularExpressionLiteral;
4505
+ function MatchingPattern(state) {
4506
+ let eventData;
4507
+ if (state.events) {
4508
+ const result = state.events.enter?.("MatchingPattern", state);
4509
+ if (result) {
4510
+ if (result.cache)
4511
+ return result.cache;
4512
+ eventData = result.data;
4513
+ }
4514
+ }
4515
+ if (state.tokenize) {
4516
+ const result = $TOKEN("MatchingPattern", state, MatchingPattern$0(state) || MatchingPattern$1(state) || MatchingPattern$2(state) || MatchingPattern$3(state));
4517
+ if (state.events)
4518
+ state.events.exit?.("MatchingPattern", state, result, eventData);
4519
+ return result;
4520
+ } else {
4521
+ const result = MatchingPattern$0(state) || MatchingPattern$1(state) || MatchingPattern$2(state) || MatchingPattern$3(state);
4522
+ if (state.events)
4523
+ state.events.exit?.("MatchingPattern", state, result, eventData);
4524
+ return result;
4525
+ }
4526
+ }
4527
+ var ObjectMatchingPattern$0 = $TS($S($E(_), OpenBrace, ObjectMatchingPatternContent, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4528
+ var ws = $1;
4529
+ var open = $2;
4530
+ var properties = $3;
4531
+ var ws = $4;
4532
+ var close = $5;
4533
+ return {
4534
+ type: "ObjectMatchingPattern",
4535
+ children: [ws, open, ...properties.children, ...ws, close],
4536
+ properties: properties.children
4537
+ };
4538
+ });
4539
+ function ObjectMatchingPattern(state) {
4540
+ let eventData;
4541
+ if (state.events) {
4542
+ const result = state.events.enter?.("ObjectMatchingPattern", state);
4543
+ if (result) {
4544
+ if (result.cache)
4545
+ return result.cache;
4546
+ eventData = result.data;
4547
+ }
4548
+ }
4549
+ if (state.tokenize) {
4550
+ const result = $TOKEN("ObjectMatchingPattern", state, ObjectMatchingPattern$0(state));
4551
+ if (state.events)
4552
+ state.events.exit?.("ObjectMatchingPattern", state, result, eventData);
4553
+ return result;
4554
+ } else {
4555
+ const result = ObjectMatchingPattern$0(state);
4556
+ if (state.events)
4557
+ state.events.exit?.("ObjectMatchingPattern", state, result, eventData);
4558
+ return result;
4559
+ }
4560
+ }
4561
+ var ObjectMatchingPatternContent$0 = NestedMatchingProperties;
4562
+ var ObjectMatchingPatternContent$1 = $TV($E(MatchingPropertyList), function($skip, $loc, $0, $1) {
4563
+ var properties = $0;
4564
+ if (!properties)
4565
+ return { children: [], names: [] };
4566
+ return module.reorderBindingRestProperty(properties);
4567
+ });
4568
+ function ObjectMatchingPatternContent(state) {
4569
+ let eventData;
4570
+ if (state.events) {
4571
+ const result = state.events.enter?.("ObjectMatchingPatternContent", state);
4572
+ if (result) {
4573
+ if (result.cache)
4574
+ return result.cache;
4575
+ eventData = result.data;
4576
+ }
4577
+ }
4578
+ if (state.tokenize) {
4579
+ const result = $TOKEN("ObjectMatchingPatternContent", state, ObjectMatchingPatternContent$0(state) || ObjectMatchingPatternContent$1(state));
4580
+ if (state.events)
4581
+ state.events.exit?.("ObjectMatchingPatternContent", state, result, eventData);
4582
+ return result;
4583
+ } else {
4584
+ const result = ObjectMatchingPatternContent$0(state) || ObjectMatchingPatternContent$1(state);
4585
+ if (state.events)
4586
+ state.events.exit?.("ObjectMatchingPatternContent", state, result, eventData);
4587
+ return result;
4588
+ }
4589
+ }
4590
+ var NestedMatchingProperties$0 = $TS($S(PushIndent, $Q(NestedMatchingPropertyList), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
4591
+ var properties = $2;
4592
+ if (!props.length)
4593
+ return $skip;
4594
+ return module.reorderBindingRestProperty(props.flat());
4595
+ });
4596
+ function NestedMatchingProperties(state) {
4597
+ let eventData;
4598
+ if (state.events) {
4599
+ const result = state.events.enter?.("NestedMatchingProperties", state);
4600
+ if (result) {
4601
+ if (result.cache)
4602
+ return result.cache;
4603
+ eventData = result.data;
4604
+ }
4605
+ }
4606
+ if (state.tokenize) {
4607
+ const result = $TOKEN("NestedMatchingProperties", state, NestedMatchingProperties$0(state));
4608
+ if (state.events)
4609
+ state.events.exit?.("NestedMatchingProperties", state, result, eventData);
4610
+ return result;
4611
+ } else {
4612
+ const result = NestedMatchingProperties$0(state);
4613
+ if (state.events)
4614
+ state.events.exit?.("NestedMatchingProperties", state, result, eventData);
4615
+ return result;
4616
+ }
4617
+ }
4618
+ var MatchingPropertyList$0 = $TV($P($S(MatchingProperty, ObjectPropertyDelimiter)), function($skip, $loc, $0, $1) {
4619
+ var props2 = $0;
4620
+ return props2.map(([prop, delim]) => {
4621
+ return {
4622
+ ...prop,
4623
+ children: [...prop.children, delim]
4624
+ };
4625
+ });
4626
+ });
4627
+ function MatchingPropertyList(state) {
4628
+ let eventData;
4629
+ if (state.events) {
4630
+ const result = state.events.enter?.("MatchingPropertyList", state);
4631
+ if (result) {
4632
+ if (result.cache)
4633
+ return result.cache;
4634
+ eventData = result.data;
4635
+ }
4636
+ }
4637
+ if (state.tokenize) {
4638
+ const result = $TOKEN("MatchingPropertyList", state, MatchingPropertyList$0(state));
4639
+ if (state.events)
4640
+ state.events.exit?.("MatchingPropertyList", state, result, eventData);
4641
+ return result;
4642
+ } else {
4643
+ const result = MatchingPropertyList$0(state);
4644
+ if (state.events)
4645
+ state.events.exit?.("MatchingPropertyList", state, result, eventData);
4646
+ return result;
4647
+ }
4648
+ }
4649
+ var NestedMatchingPropertyList$0 = $TS($S(Nested, MatchingPropertyList), function($skip, $loc, $0, $1, $2) {
4650
+ var ws = $1;
4651
+ var props2 = $2;
4652
+ return props2.map((prop, i) => {
4653
+ if (i > 0)
4654
+ return prop;
4655
+ return {
4656
+ ...prop,
4657
+ children: [ws, ...prop.children]
4658
+ };
4659
+ });
4660
+ });
4661
+ function NestedMatchingPropertyList(state) {
4662
+ let eventData;
4663
+ if (state.events) {
4664
+ const result = state.events.enter?.("NestedMatchingPropertyList", state);
4665
+ if (result) {
4666
+ if (result.cache)
4667
+ return result.cache;
4668
+ eventData = result.data;
4669
+ }
4670
+ }
4671
+ if (state.tokenize) {
4672
+ const result = $TOKEN("NestedMatchingPropertyList", state, NestedMatchingPropertyList$0(state));
4673
+ if (state.events)
4674
+ state.events.exit?.("NestedMatchingPropertyList", state, result, eventData);
4675
+ return result;
4676
+ } else {
4677
+ const result = NestedMatchingPropertyList$0(state);
4678
+ if (state.events)
4679
+ state.events.exit?.("NestedMatchingPropertyList", state, result, eventData);
4680
+ return result;
4681
+ }
4682
+ }
4683
+ var MatchingProperty$0 = MatchingRestProperty;
4684
+ var MatchingProperty$1 = $TS($S($E(_), PropertyName, __, Colon, $E(_), $C(BindingIdentifier, MatchingPattern)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
4685
+ var name = $2;
4686
+ var match = $6;
4687
+ return {
4688
+ type: "BindingMatchProperty",
4689
+ name,
4690
+ match,
4691
+ children: $0
4692
+ };
4693
+ });
4694
+ var MatchingProperty$2 = $TS($S($E(_), BindingIdentifier), function($skip, $loc, $0, $1, $2) {
4695
+ var ws = $1;
4696
+ var b = $2;
4697
+ if (b.type === "AtBinding") {
4698
+ return {
4699
+ type: "AtBindingProperty",
4700
+ ref: b.ref,
4701
+ names: [],
4702
+ children: [ws, b]
4703
+ };
4704
+ }
4705
+ return {
4706
+ type: "BindingProperty",
4707
+ names: b.names,
4708
+ children: [ws, b],
4709
+ identifier: b
4710
+ };
4711
+ });
4712
+ function MatchingProperty(state) {
4713
+ let eventData;
4714
+ if (state.events) {
4715
+ const result = state.events.enter?.("MatchingProperty", state);
4716
+ if (result) {
4717
+ if (result.cache)
4718
+ return result.cache;
4719
+ eventData = result.data;
4720
+ }
4721
+ }
4722
+ if (state.tokenize) {
4723
+ const result = $TOKEN("MatchingProperty", state, MatchingProperty$0(state) || MatchingProperty$1(state) || MatchingProperty$2(state));
4724
+ if (state.events)
4725
+ state.events.exit?.("MatchingProperty", state, result, eventData);
4726
+ return result;
4727
+ } else {
4728
+ const result = MatchingProperty$0(state) || MatchingProperty$1(state) || MatchingProperty$2(state);
4729
+ if (state.events)
4730
+ state.events.exit?.("MatchingProperty", state, result, eventData);
4731
+ return result;
4732
+ }
4733
+ }
4734
+ var MatchingRestProperty$0 = BindingRestProperty;
4735
+ function MatchingRestProperty(state) {
4736
+ let eventData;
4737
+ if (state.events) {
4738
+ const result = state.events.enter?.("MatchingRestProperty", state);
4739
+ if (result) {
4740
+ if (result.cache)
4741
+ return result.cache;
4742
+ eventData = result.data;
4743
+ }
4744
+ }
4745
+ if (state.tokenize) {
4746
+ const result = $TOKEN("MatchingRestProperty", state, MatchingRestProperty$0(state));
4747
+ if (state.events)
4748
+ state.events.exit?.("MatchingRestProperty", state, result, eventData);
4749
+ return result;
4750
+ } else {
4751
+ const result = MatchingRestProperty$0(state);
4752
+ if (state.events)
4753
+ state.events.exit?.("MatchingRestProperty", state, result, eventData);
4754
+ return result;
4755
+ }
4756
+ }
4757
+ var ArrayMatchingPattern$0 = $TS($S($E(_), OpenBracket, ArrayMatchingPatternContent, __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4758
+ var ws = $1;
4759
+ var elements = $3;
4760
+ return {
4761
+ type: "ArrayMatchingPattern",
4762
+ children: $0,
4763
+ elements: elements.children,
4764
+ length: elements.length
4765
+ };
4766
+ });
4767
+ function ArrayMatchingPattern(state) {
4768
+ let eventData;
4769
+ if (state.events) {
4770
+ const result = state.events.enter?.("ArrayMatchingPattern", state);
4771
+ if (result) {
4772
+ if (result.cache)
4773
+ return result.cache;
4774
+ eventData = result.data;
4775
+ }
4776
+ }
4777
+ if (state.tokenize) {
4778
+ const result = $TOKEN("ArrayMatchingPattern", state, ArrayMatchingPattern$0(state));
4779
+ if (state.events)
4780
+ state.events.exit?.("ArrayMatchingPattern", state, result, eventData);
4781
+ return result;
4782
+ } else {
4783
+ const result = ArrayMatchingPattern$0(state);
4784
+ if (state.events)
4785
+ state.events.exit?.("ArrayMatchingPattern", state, result, eventData);
4786
+ return result;
4787
+ }
4788
+ }
4789
+ var ArrayMatchingPatternContent$0 = NestedMatchingElements;
4790
+ var ArrayMatchingPatternContent$1 = $TV($E(MatchingElementList), function($skip, $loc, $0, $1) {
4791
+ var elements = $0;
4792
+ if (!elements)
4793
+ return { children: [], names: [], length: 0 };
4794
+ return module.adjustBindingElements(elements);
4795
+ });
4796
+ function ArrayMatchingPatternContent(state) {
4797
+ let eventData;
4798
+ if (state.events) {
4799
+ const result = state.events.enter?.("ArrayMatchingPatternContent", state);
4800
+ if (result) {
4801
+ if (result.cache)
4802
+ return result.cache;
4803
+ eventData = result.data;
4804
+ }
4805
+ }
4806
+ if (state.tokenize) {
4807
+ const result = $TOKEN("ArrayMatchingPatternContent", state, ArrayMatchingPatternContent$0(state) || ArrayMatchingPatternContent$1(state));
4808
+ if (state.events)
4809
+ state.events.exit?.("ArrayMatchingPatternContent", state, result, eventData);
4810
+ return result;
4811
+ } else {
4812
+ const result = ArrayMatchingPatternContent$0(state) || ArrayMatchingPatternContent$1(state);
4813
+ if (state.events)
4814
+ state.events.exit?.("ArrayMatchingPatternContent", state, result, eventData);
4815
+ return result;
4816
+ }
4817
+ }
4818
+ var NestedMatchingElements$0 = $TS($S(PushIndent, $Q(NestedMatchingElementList), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
4819
+ var elements = $2;
4820
+ return module.adjustBindingElements(elements.flat());
4821
+ });
4822
+ function NestedMatchingElements(state) {
4823
+ let eventData;
4824
+ if (state.events) {
4825
+ const result = state.events.enter?.("NestedMatchingElements", state);
4826
+ if (result) {
4827
+ if (result.cache)
4828
+ return result.cache;
4829
+ eventData = result.data;
4830
+ }
4831
+ }
4832
+ if (state.tokenize) {
4833
+ const result = $TOKEN("NestedMatchingElements", state, NestedMatchingElements$0(state));
4834
+ if (state.events)
4835
+ state.events.exit?.("NestedMatchingElements", state, result, eventData);
4836
+ return result;
4837
+ } else {
4838
+ const result = NestedMatchingElements$0(state);
4839
+ if (state.events)
4840
+ state.events.exit?.("NestedMatchingElements", state, result, eventData);
4841
+ return result;
4842
+ }
4843
+ }
4844
+ var MatchingElementList$0 = $TV($P($S(MatchingElement, ArrayElementDelimiter)), function($skip, $loc, $0, $1) {
4845
+ var elements = $0;
4846
+ return elements.map(([element, delim]) => {
4847
+ return {
4848
+ ...element,
4849
+ children: [...element.children, delim]
4850
+ };
4851
+ });
4852
+ });
4853
+ function MatchingElementList(state) {
4325
4854
  let eventData;
4326
4855
  if (state.events) {
4327
- const result = state.events.enter?.("NestedBindingElement", state);
4856
+ const result = state.events.enter?.("MatchingElementList", state);
4328
4857
  if (result) {
4329
4858
  if (result.cache)
4330
4859
  return result.cache;
@@ -4332,28 +4861,33 @@ ${input.slice(result.pos)}
4332
4861
  }
4333
4862
  }
4334
4863
  if (state.tokenize) {
4335
- const result = $TOKEN("NestedBindingElement", state, NestedBindingElement$0(state));
4864
+ const result = $TOKEN("MatchingElementList", state, MatchingElementList$0(state));
4336
4865
  if (state.events)
4337
- state.events.exit?.("NestedBindingElement", state, result, eventData);
4866
+ state.events.exit?.("MatchingElementList", state, result, eventData);
4338
4867
  return result;
4339
4868
  } else {
4340
- const result = NestedBindingElement$0(state);
4869
+ const result = MatchingElementList$0(state);
4341
4870
  if (state.events)
4342
- state.events.exit?.("NestedBindingElement", state, result, eventData);
4871
+ state.events.exit?.("MatchingElementList", state, result, eventData);
4343
4872
  return result;
4344
4873
  }
4345
4874
  }
4346
- var BindingElement$0 = $TS($S($C(BindingIdentifier, BindingPattern), $E(Initializer), ArrayElementDelimiter), function($skip, $loc, $0, $1, $2, $3) {
4347
- var binding = $1;
4348
- return {
4349
- names: binding.names,
4350
- children: $0
4351
- };
4875
+ var NestedMatchingElementList$0 = $TS($S(Nested, MatchingElementList), function($skip, $loc, $0, $1, $2) {
4876
+ var ws = $1;
4877
+ var elements = $2;
4878
+ return elements.map((element, i) => {
4879
+ if (i > 0)
4880
+ return element;
4881
+ return {
4882
+ ...element,
4883
+ children: [ws, ...element.children]
4884
+ };
4885
+ });
4352
4886
  });
4353
- function BindingElement(state) {
4887
+ function NestedMatchingElementList(state) {
4354
4888
  let eventData;
4355
4889
  if (state.events) {
4356
- const result = state.events.enter?.("BindingElement", state);
4890
+ const result = state.events.enter?.("NestedMatchingElementList", state);
4357
4891
  if (result) {
4358
4892
  if (result.cache)
4359
4893
  return result.cache;
@@ -4361,39 +4895,61 @@ ${input.slice(result.pos)}
4361
4895
  }
4362
4896
  }
4363
4897
  if (state.tokenize) {
4364
- const result = $TOKEN("BindingElement", state, BindingElement$0(state));
4898
+ const result = $TOKEN("NestedMatchingElementList", state, NestedMatchingElementList$0(state));
4365
4899
  if (state.events)
4366
- state.events.exit?.("BindingElement", state, result, eventData);
4900
+ state.events.exit?.("NestedMatchingElementList", state, result, eventData);
4367
4901
  return result;
4368
4902
  } else {
4369
- const result = BindingElement$0(state);
4903
+ const result = NestedMatchingElementList$0(state);
4370
4904
  if (state.events)
4371
- state.events.exit?.("BindingElement", state, result, eventData);
4905
+ state.events.exit?.("NestedMatchingElementList", state, result, eventData);
4372
4906
  return result;
4373
4907
  }
4374
4908
  }
4375
- var BindingRestElement$0 = $TS($S(__, DotDotDot, $C(BindingIdentifier, BindingPattern, EmptyBindingPattern)), function($skip, $loc, $0, $1, $2, $3) {
4909
+ var MatchingElement$0 = MatchingRestElement;
4910
+ var MatchingElement$1 = $TS($S($E(_), BindingIdentifier, __, Colon, $E(_), $C(BindingIdentifier, MatchingPattern)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
4376
4911
  var ws = $1;
4377
- var dots = $2;
4378
- var binding = $3;
4912
+ var name = $2;
4913
+ var match = $6;
4914
+ let blockPrefix;
4915
+ switch (match.type) {
4916
+ case "ArrayMatchingPattern":
4917
+ case "ObjectMatchingPattern":
4918
+ blockPrefix = [match, " = ", name];
4919
+ break;
4920
+ default:
4921
+ break;
4922
+ }
4379
4923
  return {
4380
- ...binding,
4381
- children: [...ws, dots, ...binding.children]
4924
+ names: name.names,
4925
+ children: [ws, {
4926
+ type: "BindingMatchElement",
4927
+ name,
4928
+ match,
4929
+ children: [name],
4930
+ blockPrefix
4931
+ }]
4382
4932
  };
4383
4933
  });
4384
- var BindingRestElement$1 = $TS($S(__, $C(BindingIdentifier, BindingPattern), DotDotDot), function($skip, $loc, $0, $1, $2, $3) {
4934
+ var MatchingElement$2 = $TS($S($E(_), $C(BindingIdentifier, MatchingPattern)), function($skip, $loc, $0, $1, $2) {
4385
4935
  var ws = $1;
4386
4936
  var binding = $2;
4387
- var dots = $3;
4388
4937
  return {
4389
- ...binding,
4390
- children: [...ws, dots, ...binding.children]
4938
+ names: binding.names,
4939
+ children: [ws, binding]
4391
4940
  };
4392
4941
  });
4393
- function BindingRestElement(state) {
4942
+ var MatchingElement$3 = $TV($EXPECT($L17, fail, 'MatchingElement ""'), function($skip, $loc, $0, $1) {
4943
+ return {
4944
+ type: "ElisionElement",
4945
+ children: [],
4946
+ names: []
4947
+ };
4948
+ });
4949
+ function MatchingElement(state) {
4394
4950
  let eventData;
4395
4951
  if (state.events) {
4396
- const result = state.events.enter?.("BindingRestElement", state);
4952
+ const result = state.events.enter?.("MatchingElement", state);
4397
4953
  if (result) {
4398
4954
  if (result.cache)
4399
4955
  return result.cache;
@@ -4401,34 +4957,22 @@ ${input.slice(result.pos)}
4401
4957
  }
4402
4958
  }
4403
4959
  if (state.tokenize) {
4404
- const result = $TOKEN("BindingRestElement", state, BindingRestElement$0(state) || BindingRestElement$1(state));
4960
+ const result = $TOKEN("MatchingElement", state, MatchingElement$0(state) || MatchingElement$1(state) || MatchingElement$2(state) || MatchingElement$3(state));
4405
4961
  if (state.events)
4406
- state.events.exit?.("BindingRestElement", state, result, eventData);
4962
+ state.events.exit?.("MatchingElement", state, result, eventData);
4407
4963
  return result;
4408
4964
  } else {
4409
- const result = BindingRestElement$0(state) || BindingRestElement$1(state);
4965
+ const result = MatchingElement$0(state) || MatchingElement$1(state) || MatchingElement$2(state) || MatchingElement$3(state);
4410
4966
  if (state.events)
4411
- state.events.exit?.("BindingRestElement", state, result, eventData);
4967
+ state.events.exit?.("MatchingElement", state, result, eventData);
4412
4968
  return result;
4413
4969
  }
4414
4970
  }
4415
- var EmptyBindingPattern$0 = $TV($EXPECT($L16, fail, 'EmptyBindingPattern ""'), function($skip, $loc, $0, $1) {
4416
- const ref = {
4417
- type: "Ref",
4418
- base: "ref",
4419
- id: "ref"
4420
- };
4421
- return {
4422
- type: "EmptyBinding",
4423
- children: [ref],
4424
- names: [],
4425
- ref
4426
- };
4427
- });
4428
- function EmptyBindingPattern(state) {
4971
+ var MatchingRestElement$0 = BindingRestElement;
4972
+ function MatchingRestElement(state) {
4429
4973
  let eventData;
4430
4974
  if (state.events) {
4431
- const result = state.events.enter?.("EmptyBindingPattern", state);
4975
+ const result = state.events.enter?.("MatchingRestElement", state);
4432
4976
  if (result) {
4433
4977
  if (result.cache)
4434
4978
  return result.cache;
@@ -4436,14 +4980,14 @@ ${input.slice(result.pos)}
4436
4980
  }
4437
4981
  }
4438
4982
  if (state.tokenize) {
4439
- const result = $TOKEN("EmptyBindingPattern", state, EmptyBindingPattern$0(state));
4983
+ const result = $TOKEN("MatchingRestElement", state, MatchingRestElement$0(state));
4440
4984
  if (state.events)
4441
- state.events.exit?.("EmptyBindingPattern", state, result, eventData);
4985
+ state.events.exit?.("MatchingRestElement", state, result, eventData);
4442
4986
  return result;
4443
4987
  } else {
4444
- const result = EmptyBindingPattern$0(state);
4988
+ const result = MatchingRestElement$0(state);
4445
4989
  if (state.events)
4446
- state.events.exit?.("EmptyBindingPattern", state, result, eventData);
4990
+ state.events.exit?.("MatchingRestElement", state, result, eventData);
4447
4991
  return result;
4448
4992
  }
4449
4993
  }
@@ -4574,6 +5118,101 @@ ${input.slice(result.pos)}
4574
5118
  return result;
4575
5119
  }
4576
5120
  }
5121
+ var OperatorDeclaration$0 = $TS($S(Operator, _, LexicalDeclaration), function($skip, $loc, $0, $1, $2, $3) {
5122
+ var op = $1;
5123
+ var w = $2;
5124
+ var decl = $3;
5125
+ decl.names.forEach((name) => module.operators.add(name));
5126
+ return [module.insertTrimmingSpace(w, ""), decl];
5127
+ });
5128
+ var OperatorDeclaration$1 = $TS($S(OperatorSignature, BracedBlock), function($skip, $loc, $0, $1, $2) {
5129
+ var signature = $1;
5130
+ var block = $2;
5131
+ module.operators.add(signature.id.name);
5132
+ return {
5133
+ ...signature,
5134
+ type: "FunctionExpression",
5135
+ children: [...signature.children, block],
5136
+ block,
5137
+ operator: true
5138
+ };
5139
+ });
5140
+ var OperatorDeclaration$2 = $TS($S(Operator, _, Identifier, $Q($S(CommaDelimiter, $E(_), Identifier))), function($skip, $loc, $0, $1, $2, $3, $4) {
5141
+ var op = $1;
5142
+ var w1 = $2;
5143
+ var id = $3;
5144
+ var ids = $4;
5145
+ module.operators.add(id.name);
5146
+ ids.forEach(([, , id2]) => module.operators.add(id2.name));
5147
+ return [];
5148
+ });
5149
+ function OperatorDeclaration(state) {
5150
+ let eventData;
5151
+ if (state.events) {
5152
+ const result = state.events.enter?.("OperatorDeclaration", state);
5153
+ if (result) {
5154
+ if (result.cache)
5155
+ return result.cache;
5156
+ eventData = result.data;
5157
+ }
5158
+ }
5159
+ if (state.tokenize) {
5160
+ const result = $TOKEN("OperatorDeclaration", state, OperatorDeclaration$0(state) || OperatorDeclaration$1(state) || OperatorDeclaration$2(state));
5161
+ if (state.events)
5162
+ state.events.exit?.("OperatorDeclaration", state, result, eventData);
5163
+ return result;
5164
+ } else {
5165
+ const result = OperatorDeclaration$0(state) || OperatorDeclaration$1(state) || OperatorDeclaration$2(state);
5166
+ if (state.events)
5167
+ state.events.exit?.("OperatorDeclaration", state, result, eventData);
5168
+ return result;
5169
+ }
5170
+ }
5171
+ 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) {
5172
+ var op = $1;
5173
+ var func = $2;
5174
+ var w1 = $3;
5175
+ var id = $4;
5176
+ var w2 = $5;
5177
+ var parameters = $6;
5178
+ var suffix = $7;
5179
+ if (!func) {
5180
+ func = { $loc: op.$loc, token: "function" };
5181
+ } else {
5182
+ func = [module.insertTrimmingSpace(func[0], ""), func[1]];
5183
+ }
5184
+ return {
5185
+ type: "FunctionSignature",
5186
+ id,
5187
+ parameters,
5188
+ returnType: suffix?.children?.[1]?.[0]?.[1]?.token,
5189
+ ts: false,
5190
+ block: null,
5191
+ children: [func, w1, id, w2, parameters, suffix]
5192
+ };
5193
+ });
5194
+ function OperatorSignature(state) {
5195
+ let eventData;
5196
+ if (state.events) {
5197
+ const result = state.events.enter?.("OperatorSignature", state);
5198
+ if (result) {
5199
+ if (result.cache)
5200
+ return result.cache;
5201
+ eventData = result.data;
5202
+ }
5203
+ }
5204
+ if (state.tokenize) {
5205
+ const result = $TOKEN("OperatorSignature", state, OperatorSignature$0(state));
5206
+ if (state.events)
5207
+ state.events.exit?.("OperatorSignature", state, result, eventData);
5208
+ return result;
5209
+ } else {
5210
+ const result = OperatorSignature$0(state);
5211
+ if (state.events)
5212
+ state.events.exit?.("OperatorSignature", state, result, eventData);
5213
+ return result;
5214
+ }
5215
+ }
4577
5216
  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) {
4578
5217
  var callExpRest = $1;
4579
5218
  var binopRHS = $2;
@@ -4688,7 +5327,7 @@ ${input.slice(result.pos)}
4688
5327
  return result;
4689
5328
  }
4690
5329
  }
4691
- var Arrow$0 = $TV($EXPECT($L18, fail, 'Arrow "->"'), function($skip, $loc, $0, $1) {
5330
+ var Arrow$0 = $TV($EXPECT($L19, fail, 'Arrow "->"'), function($skip, $loc, $0, $1) {
4692
5331
  return { $loc, token: $1 };
4693
5332
  });
4694
5333
  function Arrow(state) {
@@ -4898,6 +5537,37 @@ ${input.slice(result.pos)}
4898
5537
  return result;
4899
5538
  }
4900
5539
  }
5540
+ var EmptyBareBlock$0 = $TV($EXPECT($L17, fail, 'EmptyBareBlock ""'), function($skip, $loc, $0, $1) {
5541
+ const expressions = [];
5542
+ return {
5543
+ type: "BlockStatement",
5544
+ expressions,
5545
+ children: [expressions],
5546
+ bare: true
5547
+ };
5548
+ });
5549
+ function EmptyBareBlock(state) {
5550
+ let eventData;
5551
+ if (state.events) {
5552
+ const result = state.events.enter?.("EmptyBareBlock", state);
5553
+ if (result) {
5554
+ if (result.cache)
5555
+ return result.cache;
5556
+ eventData = result.data;
5557
+ }
5558
+ }
5559
+ if (state.tokenize) {
5560
+ const result = $TOKEN("EmptyBareBlock", state, EmptyBareBlock$0(state));
5561
+ if (state.events)
5562
+ state.events.exit?.("EmptyBareBlock", state, result, eventData);
5563
+ return result;
5564
+ } else {
5565
+ const result = EmptyBareBlock$0(state);
5566
+ if (state.events)
5567
+ state.events.exit?.("EmptyBareBlock", state, result, eventData);
5568
+ return result;
5569
+ }
5570
+ }
4901
5571
  var BracedBlock$0 = $TS($S($Q(TrailingComment), OpenBrace, BracedContent, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4902
5572
  var block = $3;
4903
5573
  return {
@@ -4996,7 +5666,7 @@ ${input.slice(result.pos)}
4996
5666
  children: [$1, expressions]
4997
5667
  };
4998
5668
  });
4999
- var BracedContent$2 = $TV($Y($S(__, $EXPECT($L19, fail, 'BracedContent "}"'))), function($skip, $loc, $0, $1) {
5669
+ var BracedContent$2 = $TV($Y($S(__, $EXPECT($L20, fail, 'BracedContent "}"'))), function($skip, $loc, $0, $1) {
5000
5670
  const expressions = [];
5001
5671
  return {
5002
5672
  type: "BlockStatement",
@@ -5141,7 +5811,7 @@ ${input.slice(result.pos)}
5141
5811
  return result;
5142
5812
  }
5143
5813
  }
5144
- var NullLiteral$0 = $TS($S($EXPECT($L20, fail, 'NullLiteral "null"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5814
+ var NullLiteral$0 = $TS($S($EXPECT($L21, fail, 'NullLiteral "null"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5145
5815
  return { $loc, token: $1 };
5146
5816
  });
5147
5817
  function NullLiteral(state) {
@@ -5169,7 +5839,7 @@ ${input.slice(result.pos)}
5169
5839
  var BooleanLiteral$0 = $T($S(CoffeeBooleansEnabled, CoffeeScriptBooleanLiteral), function(value) {
5170
5840
  return value[1];
5171
5841
  });
5172
- var BooleanLiteral$1 = $TS($S($C($EXPECT($L21, fail, 'BooleanLiteral "true"'), $EXPECT($L22, fail, 'BooleanLiteral "false"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5842
+ var BooleanLiteral$1 = $TS($S($C($EXPECT($L22, fail, 'BooleanLiteral "true"'), $EXPECT($L23, fail, 'BooleanLiteral "false"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5173
5843
  return { $loc, token: $1 };
5174
5844
  });
5175
5845
  function BooleanLiteral(state) {
@@ -5194,10 +5864,10 @@ ${input.slice(result.pos)}
5194
5864
  return result;
5195
5865
  }
5196
5866
  }
5197
- var CoffeeScriptBooleanLiteral$0 = $TS($S($C($EXPECT($L23, fail, 'CoffeeScriptBooleanLiteral "yes"'), $EXPECT($L24, fail, 'CoffeeScriptBooleanLiteral "on"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5867
+ var CoffeeScriptBooleanLiteral$0 = $TS($S($C($EXPECT($L24, fail, 'CoffeeScriptBooleanLiteral "yes"'), $EXPECT($L25, fail, 'CoffeeScriptBooleanLiteral "on"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5198
5868
  return { $loc, token: "true" };
5199
5869
  });
5200
- var CoffeeScriptBooleanLiteral$1 = $TS($S($C($EXPECT($L25, fail, 'CoffeeScriptBooleanLiteral "no"'), $EXPECT($L26, fail, 'CoffeeScriptBooleanLiteral "off"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5870
+ var CoffeeScriptBooleanLiteral$1 = $TS($S($C($EXPECT($L26, fail, 'CoffeeScriptBooleanLiteral "no"'), $EXPECT($L27, fail, 'CoffeeScriptBooleanLiteral "off"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5201
5871
  return { $loc, token: "false" };
5202
5872
  });
5203
5873
  function CoffeeScriptBooleanLiteral(state) {
@@ -5222,31 +5892,6 @@ ${input.slice(result.pos)}
5222
5892
  return result;
5223
5893
  }
5224
5894
  }
5225
- var Comma$0 = $TV($EXPECT($L27, fail, 'Comma ","'), function($skip, $loc, $0, $1) {
5226
- return { $loc, token: $1 };
5227
- });
5228
- function Comma(state) {
5229
- let eventData;
5230
- if (state.events) {
5231
- const result = state.events.enter?.("Comma", state);
5232
- if (result) {
5233
- if (result.cache)
5234
- return result.cache;
5235
- eventData = result.data;
5236
- }
5237
- }
5238
- if (state.tokenize) {
5239
- const result = $TOKEN("Comma", state, Comma$0(state));
5240
- if (state.events)
5241
- state.events.exit?.("Comma", state, result, eventData);
5242
- return result;
5243
- } else {
5244
- const result = Comma$0(state);
5245
- if (state.events)
5246
- state.events.exit?.("Comma", state, result, eventData);
5247
- return result;
5248
- }
5249
- }
5250
5895
  var Identifier$0 = $T($S($N(ReservedWord), IdentifierName), function(value) {
5251
5896
  return value[1];
5252
5897
  });
@@ -6026,7 +6671,7 @@ ${input.slice(result.pos)}
6026
6671
  var ImplicitInlineObjectPropertyDelimiter$1 = $T($S($Y($S($C(Samedent, $Q(_)), NamedProperty)), InsertComma), function(value) {
6027
6672
  return value[1];
6028
6673
  });
6029
- 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) {
6674
+ 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) {
6030
6675
  return "";
6031
6676
  });
6032
6677
  var ImplicitInlineObjectPropertyDelimiter$3 = $T($Y(EOS), function(value) {
@@ -6055,7 +6700,7 @@ ${input.slice(result.pos)}
6055
6700
  }
6056
6701
  }
6057
6702
  var ObjectPropertyDelimiter$0 = $S($Q(_), Comma);
6058
- var ObjectPropertyDelimiter$1 = $Y($S(__, $EXPECT($L19, fail, 'ObjectPropertyDelimiter "}"')));
6703
+ var ObjectPropertyDelimiter$1 = $Y($S(__, $EXPECT($L20, fail, 'ObjectPropertyDelimiter "}"')));
6059
6704
  var ObjectPropertyDelimiter$2 = $T($S($Y(EOS), InsertComma), function(value) {
6060
6705
  return value[1];
6061
6706
  });
@@ -6124,7 +6769,15 @@ ${input.slice(result.pos)}
6124
6769
  value
6125
6770
  };
6126
6771
  });
6127
- var PropertyDefinition$1 = $TS($S(__, $TEXT($EXPECT($R5, fail, "PropertyDefinition /[!+-]/")), IdentifierName), function($skip, $loc, $0, $1, $2, $3) {
6772
+ var PropertyDefinition$1 = $TS($S(__, NamedProperty), function($skip, $loc, $0, $1, $2) {
6773
+ var ws = $1;
6774
+ var prop = $2;
6775
+ return {
6776
+ ...prop,
6777
+ children: [...ws, ...prop.children]
6778
+ };
6779
+ });
6780
+ var PropertyDefinition$2 = $TS($S(__, $TEXT($EXPECT($R5, fail, "PropertyDefinition /[!+-]/")), PropertyName), function($skip, $loc, $0, $1, $2, $3) {
6128
6781
  var ws = $1;
6129
6782
  var toggle = $2;
6130
6783
  var id = $3;
@@ -6137,14 +6790,6 @@ ${input.slice(result.pos)}
6137
6790
  value
6138
6791
  };
6139
6792
  });
6140
- var PropertyDefinition$2 = $TS($S(__, NamedProperty), function($skip, $loc, $0, $1, $2) {
6141
- var ws = $1;
6142
- var prop = $2;
6143
- return {
6144
- ...prop,
6145
- children: [...ws, ...prop.children]
6146
- };
6147
- });
6148
6793
  var PropertyDefinition$3 = $TS($S(__, MethodDefinition), function($skip, $loc, $0, $1, $2) {
6149
6794
  var ws = $1;
6150
6795
  var def = $2;
@@ -6287,9 +6932,9 @@ ${input.slice(result.pos)}
6287
6932
  }
6288
6933
  }
6289
6934
  var PropertyName$0 = NumericLiteral;
6290
- var PropertyName$1 = StringLiteral;
6291
- var PropertyName$2 = IdentifierName;
6292
- var PropertyName$3 = ComputedPropertyName;
6935
+ var PropertyName$1 = ComputedPropertyName;
6936
+ var PropertyName$2 = StringLiteral;
6937
+ var PropertyName$3 = IdentifierName;
6293
6938
  function PropertyName(state) {
6294
6939
  let eventData;
6295
6940
  if (state.events) {
@@ -6313,6 +6958,24 @@ ${input.slice(result.pos)}
6313
6958
  }
6314
6959
  }
6315
6960
  var ComputedPropertyName$0 = $TS($S(OpenBracket, ExtendedExpression, __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
6961
+ var expression = $2;
6962
+ return {
6963
+ type: "ComputedPropertyName",
6964
+ children: $0,
6965
+ expression
6966
+ };
6967
+ });
6968
+ var ComputedPropertyName$1 = $TS($S(InsertOpenBracket, TemplateLiteral, InsertCloseBracket), function($skip, $loc, $0, $1, $2, $3) {
6969
+ var expression = $2;
6970
+ if ($2.type === "StringLiteral")
6971
+ return $2;
6972
+ return {
6973
+ type: "ComputedPropertyName",
6974
+ children: $0,
6975
+ expression
6976
+ };
6977
+ });
6978
+ var ComputedPropertyName$2 = $TS($S(InsertOpenBracket, $EXPECT($L14, fail, 'ComputedPropertyName "-"'), NumericLiteral, InsertCloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
6316
6979
  return {
6317
6980
  type: "ComputedPropertyName",
6318
6981
  children: $0
@@ -6329,12 +6992,12 @@ ${input.slice(result.pos)}
6329
6992
  }
6330
6993
  }
6331
6994
  if (state.tokenize) {
6332
- const result = $TOKEN("ComputedPropertyName", state, ComputedPropertyName$0(state));
6995
+ const result = $TOKEN("ComputedPropertyName", state, ComputedPropertyName$0(state) || ComputedPropertyName$1(state) || ComputedPropertyName$2(state));
6333
6996
  if (state.events)
6334
6997
  state.events.exit?.("ComputedPropertyName", state, result, eventData);
6335
6998
  return result;
6336
6999
  } else {
6337
- const result = ComputedPropertyName$0(state);
7000
+ const result = ComputedPropertyName$0(state) || ComputedPropertyName$1(state) || ComputedPropertyName$2(state);
6338
7001
  if (state.events)
6339
7002
  state.events.exit?.("ComputedPropertyName", state, result, eventData);
6340
7003
  return result;
@@ -6530,7 +7193,7 @@ ${input.slice(result.pos)}
6530
7193
  return result;
6531
7194
  }
6532
7195
  }
6533
- var PrivateIdentifier$0 = $TV($TEXT($S($EXPECT($L9, fail, 'PrivateIdentifier "#"'), IdentifierName)), function($skip, $loc, $0, $1) {
7196
+ var PrivateIdentifier$0 = $TV($TEXT($S($EXPECT($L10, fail, 'PrivateIdentifier "#"'), IdentifierName)), function($skip, $loc, $0, $1) {
6534
7197
  return {
6535
7198
  type: "Identifier",
6536
7199
  name: $0,
@@ -6673,6 +7336,25 @@ ${input.slice(result.pos)}
6673
7336
  return { $loc, token: $1 };
6674
7337
  return $1;
6675
7338
  });
7339
+ var BinaryOp$1 = $TV(Identifier, function($skip, $loc, $0, $1) {
7340
+ var id = $0;
7341
+ if (!module.operators.has(id.name))
7342
+ return $skip;
7343
+ return {
7344
+ call: id,
7345
+ special: true
7346
+ };
7347
+ });
7348
+ var BinaryOp$2 = $TS($S($EXPECT($L50, fail, 'BinaryOp "not"'), NonIdContinue, __, Identifier), function($skip, $loc, $0, $1, $2, $3, $4) {
7349
+ var id = $4;
7350
+ if (!module.operators.has(id.name))
7351
+ return $skip;
7352
+ return {
7353
+ call: id,
7354
+ special: true,
7355
+ negated: true
7356
+ };
7357
+ });
6676
7358
  function BinaryOp(state) {
6677
7359
  let eventData;
6678
7360
  if (state.events) {
@@ -6684,32 +7366,32 @@ ${input.slice(result.pos)}
6684
7366
  }
6685
7367
  }
6686
7368
  if (state.tokenize) {
6687
- const result = $TOKEN("BinaryOp", state, BinaryOp$0(state));
7369
+ const result = $TOKEN("BinaryOp", state, BinaryOp$0(state) || BinaryOp$1(state) || BinaryOp$2(state));
6688
7370
  if (state.events)
6689
7371
  state.events.exit?.("BinaryOp", state, result, eventData);
6690
7372
  return result;
6691
7373
  } else {
6692
- const result = BinaryOp$0(state);
7374
+ const result = BinaryOp$0(state) || BinaryOp$1(state) || BinaryOp$2(state);
6693
7375
  if (state.events)
6694
7376
  state.events.exit?.("BinaryOp", state, result, eventData);
6695
7377
  return result;
6696
7378
  }
6697
7379
  }
6698
- var BinaryOpSymbol$0 = $EXPECT($L50, fail, 'BinaryOpSymbol "**"');
6699
- var BinaryOpSymbol$1 = $EXPECT($L51, fail, 'BinaryOpSymbol "*"');
6700
- var BinaryOpSymbol$2 = $EXPECT($L52, fail, 'BinaryOpSymbol "/"');
6701
- var BinaryOpSymbol$3 = $TV($EXPECT($L53, fail, 'BinaryOpSymbol "%%"'), function($skip, $loc, $0, $1) {
7380
+ var BinaryOpSymbol$0 = $EXPECT($L51, fail, 'BinaryOpSymbol "**"');
7381
+ var BinaryOpSymbol$1 = $EXPECT($L52, fail, 'BinaryOpSymbol "*"');
7382
+ var BinaryOpSymbol$2 = $EXPECT($L53, fail, 'BinaryOpSymbol "/"');
7383
+ var BinaryOpSymbol$3 = $TV($EXPECT($L54, fail, 'BinaryOpSymbol "%%"'), function($skip, $loc, $0, $1) {
6702
7384
  return {
6703
7385
  call: module.getRef("modulo"),
6704
7386
  special: true
6705
7387
  };
6706
7388
  });
6707
- var BinaryOpSymbol$4 = $EXPECT($L54, fail, 'BinaryOpSymbol "%"');
6708
- var BinaryOpSymbol$5 = $EXPECT($L55, fail, 'BinaryOpSymbol "+"');
6709
- var BinaryOpSymbol$6 = $EXPECT($L13, fail, 'BinaryOpSymbol "-"');
6710
- var BinaryOpSymbol$7 = $EXPECT($L56, fail, 'BinaryOpSymbol "<="');
6711
- var BinaryOpSymbol$8 = $EXPECT($L57, fail, 'BinaryOpSymbol ">="');
6712
- var BinaryOpSymbol$9 = $TV($EXPECT($L58, fail, 'BinaryOpSymbol "<?"'), function($skip, $loc, $0, $1) {
7389
+ var BinaryOpSymbol$4 = $EXPECT($L55, fail, 'BinaryOpSymbol "%"');
7390
+ var BinaryOpSymbol$5 = $EXPECT($L56, fail, 'BinaryOpSymbol "+"');
7391
+ var BinaryOpSymbol$6 = $EXPECT($L14, fail, 'BinaryOpSymbol "-"');
7392
+ var BinaryOpSymbol$7 = $EXPECT($L57, fail, 'BinaryOpSymbol "<="');
7393
+ var BinaryOpSymbol$8 = $EXPECT($L58, fail, 'BinaryOpSymbol ">="');
7394
+ var BinaryOpSymbol$9 = $TV($EXPECT($L59, fail, 'BinaryOpSymbol "<?"'), function($skip, $loc, $0, $1) {
6713
7395
  return {
6714
7396
  $loc,
6715
7397
  token: "instanceof",
@@ -6717,7 +7399,7 @@ ${input.slice(result.pos)}
6717
7399
  special: true
6718
7400
  };
6719
7401
  });
6720
- var BinaryOpSymbol$10 = $TV($EXPECT($L59, fail, 'BinaryOpSymbol "!<?"'), function($skip, $loc, $0, $1) {
7402
+ var BinaryOpSymbol$10 = $TV($EXPECT($L60, fail, 'BinaryOpSymbol "!<?"'), function($skip, $loc, $0, $1) {
6721
7403
  return {
6722
7404
  $loc,
6723
7405
  token: "instanceof",
@@ -6726,49 +7408,49 @@ ${input.slice(result.pos)}
6726
7408
  negated: true
6727
7409
  };
6728
7410
  });
6729
- var BinaryOpSymbol$11 = $EXPECT($L60, fail, 'BinaryOpSymbol "<<"');
7411
+ var BinaryOpSymbol$11 = $EXPECT($L61, fail, 'BinaryOpSymbol "<<"');
6730
7412
  var BinaryOpSymbol$12 = $TR($EXPECT($R6, fail, "BinaryOpSymbol /<(?!\\p{ID_Start}|[_$])/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
6731
7413
  return "<";
6732
7414
  });
6733
- var BinaryOpSymbol$13 = $EXPECT($L61, fail, 'BinaryOpSymbol ">>>"');
6734
- var BinaryOpSymbol$14 = $EXPECT($L62, fail, 'BinaryOpSymbol ">>"');
7415
+ var BinaryOpSymbol$13 = $EXPECT($L62, fail, 'BinaryOpSymbol ">>>"');
7416
+ var BinaryOpSymbol$14 = $EXPECT($L63, fail, 'BinaryOpSymbol ">>"');
6735
7417
  var BinaryOpSymbol$15 = $EXPECT($L29, fail, 'BinaryOpSymbol ">"');
6736
- var BinaryOpSymbol$16 = $EXPECT($L63, fail, 'BinaryOpSymbol "!=="');
6737
- var BinaryOpSymbol$17 = $TV($EXPECT($L64, fail, 'BinaryOpSymbol "!="'), function($skip, $loc, $0, $1) {
7418
+ var BinaryOpSymbol$16 = $EXPECT($L64, fail, 'BinaryOpSymbol "!=="');
7419
+ var BinaryOpSymbol$17 = $TV($EXPECT($L65, fail, 'BinaryOpSymbol "!="'), function($skip, $loc, $0, $1) {
6738
7420
  if (module.config.coffeeEq)
6739
7421
  return "!==";
6740
7422
  return $1;
6741
7423
  });
6742
- var BinaryOpSymbol$18 = $TS($S($EXPECT($L65, fail, 'BinaryOpSymbol "isnt"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
7424
+ var BinaryOpSymbol$18 = $TS($S($EXPECT($L66, fail, 'BinaryOpSymbol "isnt"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
6743
7425
  if (module.config.coffeeIsnt)
6744
7426
  return "!==";
6745
7427
  return $skip;
6746
7428
  });
6747
- var BinaryOpSymbol$19 = $EXPECT($L66, fail, 'BinaryOpSymbol "==="');
6748
- var BinaryOpSymbol$20 = $TV($EXPECT($L67, fail, 'BinaryOpSymbol "=="'), function($skip, $loc, $0, $1) {
7429
+ var BinaryOpSymbol$19 = $EXPECT($L67, fail, 'BinaryOpSymbol "==="');
7430
+ var BinaryOpSymbol$20 = $TV($EXPECT($L68, fail, 'BinaryOpSymbol "=="'), function($skip, $loc, $0, $1) {
6749
7431
  if (module.config.coffeeEq)
6750
7432
  return "===";
6751
7433
  return $1;
6752
7434
  });
6753
- var BinaryOpSymbol$21 = $T($S($EXPECT($L68, fail, 'BinaryOpSymbol "and"'), NonIdContinue), function(value) {
7435
+ var BinaryOpSymbol$21 = $T($S($EXPECT($L69, fail, 'BinaryOpSymbol "and"'), NonIdContinue), function(value) {
6754
7436
  return "&&";
6755
7437
  });
6756
- var BinaryOpSymbol$22 = $EXPECT($L69, fail, 'BinaryOpSymbol "&&"');
6757
- var BinaryOpSymbol$23 = $T($S(CoffeeOfEnabled, $EXPECT($L70, fail, 'BinaryOpSymbol "of"'), NonIdContinue), function(value) {
7438
+ var BinaryOpSymbol$22 = $EXPECT($L70, fail, 'BinaryOpSymbol "&&"');
7439
+ var BinaryOpSymbol$23 = $T($S(CoffeeOfEnabled, $EXPECT($L71, fail, 'BinaryOpSymbol "of"'), NonIdContinue), function(value) {
6758
7440
  return "in";
6759
7441
  });
6760
- var BinaryOpSymbol$24 = $T($S($EXPECT($L71, fail, 'BinaryOpSymbol "or"'), NonIdContinue), function(value) {
7442
+ var BinaryOpSymbol$24 = $T($S($EXPECT($L72, fail, 'BinaryOpSymbol "or"'), NonIdContinue), function(value) {
6761
7443
  return "||";
6762
7444
  });
6763
- var BinaryOpSymbol$25 = $EXPECT($L72, fail, 'BinaryOpSymbol "||"');
6764
- var BinaryOpSymbol$26 = $EXPECT($L73, fail, 'BinaryOpSymbol "??"');
6765
- var BinaryOpSymbol$27 = $T($S(CoffeeBinaryExistentialEnabled, $EXPECT($L1, fail, 'BinaryOpSymbol "?"')), function(value) {
7445
+ var BinaryOpSymbol$25 = $EXPECT($L73, fail, 'BinaryOpSymbol "||"');
7446
+ var BinaryOpSymbol$26 = $EXPECT($L74, fail, 'BinaryOpSymbol "??"');
7447
+ var BinaryOpSymbol$27 = $T($S(CoffeeBinaryExistentialEnabled, $EXPECT($L2, fail, 'BinaryOpSymbol "?"')), function(value) {
6766
7448
  return "??";
6767
7449
  });
6768
- var BinaryOpSymbol$28 = $TS($S($EXPECT($L74, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
7450
+ var BinaryOpSymbol$28 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
6769
7451
  return $1;
6770
7452
  });
6771
- 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) {
7453
+ 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) {
6772
7454
  return {
6773
7455
  $loc,
6774
7456
  token: "instanceof",
@@ -6777,7 +7459,7 @@ ${input.slice(result.pos)}
6777
7459
  negated: true
6778
7460
  };
6779
7461
  });
6780
- 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) {
7462
+ 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) {
6781
7463
  return {
6782
7464
  $loc,
6783
7465
  token: "in",
@@ -6802,7 +7484,7 @@ ${input.slice(result.pos)}
6802
7484
  special: true
6803
7485
  };
6804
7486
  });
6805
- 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) {
7487
+ 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) {
6806
7488
  return {
6807
7489
  method: "includes",
6808
7490
  relational: true,
@@ -6811,7 +7493,7 @@ ${input.slice(result.pos)}
6811
7493
  negated: true
6812
7494
  };
6813
7495
  });
6814
- 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) {
7496
+ 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) {
6815
7497
  return {
6816
7498
  call: [module.getRef("indexOf"), ".call"],
6817
7499
  relational: true,
@@ -6820,7 +7502,7 @@ ${input.slice(result.pos)}
6820
7502
  special: true
6821
7503
  };
6822
7504
  });
6823
- 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) {
7505
+ 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) {
6824
7506
  if (module.config.objectIs) {
6825
7507
  return {
6826
7508
  call: module.getRef("is"),
@@ -6991,7 +7673,8 @@ ${input.slice(result.pos)}
6991
7673
  if ($1.type === "ObjectExpression") {
6992
7674
  return {
6993
7675
  type: "ParenthesizedExpression",
6994
- children: ["(", $1, ")"]
7676
+ children: ["(", $1, ")"],
7677
+ expression: $1
6995
7678
  };
6996
7679
  }
6997
7680
  return $1;
@@ -8180,6 +8863,7 @@ ${input.slice(result.pos)}
8180
8863
  return {
8181
8864
  type: "SwitchStatement",
8182
8865
  children: $0,
8866
+ expression: condition,
8183
8867
  caseBlock
8184
8868
  };
8185
8869
  });
@@ -8266,7 +8950,7 @@ ${input.slice(result.pos)}
8266
8950
  return result;
8267
8951
  }
8268
8952
  }
8269
- var CaseBlock$0 = $TS($S(__, OpenBrace, NestedCaseClauses, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8953
+ var CaseBlock$0 = $TS($S($E($C(Samedent, _)), OpenBrace, NestedCaseClauses, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8270
8954
  var clauses = $3;
8271
8955
  return {
8272
8956
  type: "CaseBlock",
@@ -8362,10 +9046,20 @@ ${input.slice(result.pos)}
8362
9046
  return result;
8363
9047
  }
8364
9048
  }
8365
- var CaseClause$0 = $T($S(Case, CaseExpressionList, $C(NestedBlockStatements, NoExpressions)), function(value) {
9049
+ var CaseClause$0 = $TS($S(MatchingPattern, $C(ThenClause, NestedBlockStatements, EmptyBareBlock)), function($skip, $loc, $0, $1, $2) {
9050
+ var pattern = $1;
9051
+ var block = $2;
9052
+ return {
9053
+ type: "PatternClause",
9054
+ children: $0,
9055
+ block,
9056
+ pattern
9057
+ };
9058
+ });
9059
+ var CaseClause$1 = $T($S(Case, CaseExpressionList, $C(NestedBlockStatements, EmptyBareBlock)), function(value) {
8366
9060
  return { "type": "CaseClause", "children": value };
8367
9061
  });
8368
- 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) {
9062
+ 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) {
8369
9063
  var cases = $2;
8370
9064
  var block = $4;
8371
9065
  var b = $5;
@@ -8377,7 +9071,7 @@ ${input.slice(result.pos)}
8377
9071
  children: $0
8378
9072
  };
8379
9073
  });
8380
- var CaseClause$2 = $TS($S(Default, ImpliedColon, $C(NestedBlockStatements, NoExpressions)), function($skip, $loc, $0, $1, $2, $3) {
9074
+ var CaseClause$3 = $TS($S(Default, ImpliedColon, $C(NestedBlockStatements, EmptyBareBlock)), function($skip, $loc, $0, $1, $2, $3) {
8381
9075
  var block = $3;
8382
9076
  return {
8383
9077
  type: "DefaultClause",
@@ -8385,7 +9079,7 @@ ${input.slice(result.pos)}
8385
9079
  children: $0
8386
9080
  };
8387
9081
  });
8388
- 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) {
9082
+ var CaseClause$4 = $TS($S(Else, ImpliedColon, InsertOpenBrace, $C(NestedBlockStatements, SingleLineStatements), InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
8389
9083
  var block = $4;
8390
9084
  $1.token = "default";
8391
9085
  return {
@@ -8405,12 +9099,12 @@ ${input.slice(result.pos)}
8405
9099
  }
8406
9100
  }
8407
9101
  if (state.tokenize) {
8408
- const result = $TOKEN("CaseClause", state, CaseClause$0(state) || CaseClause$1(state) || CaseClause$2(state) || CaseClause$3(state));
9102
+ const result = $TOKEN("CaseClause", state, CaseClause$0(state) || CaseClause$1(state) || CaseClause$2(state) || CaseClause$3(state) || CaseClause$4(state));
8409
9103
  if (state.events)
8410
9104
  state.events.exit?.("CaseClause", state, result, eventData);
8411
9105
  return result;
8412
9106
  } else {
8413
- const result = CaseClause$0(state) || CaseClause$1(state) || CaseClause$2(state) || CaseClause$3(state);
9107
+ const result = CaseClause$0(state) || CaseClause$1(state) || CaseClause$2(state) || CaseClause$3(state) || CaseClause$4(state);
8414
9108
  if (state.events)
8415
9109
  state.events.exit?.("CaseClause", state, result, eventData);
8416
9110
  return result;
@@ -8422,39 +9116,14 @@ ${input.slice(result.pos)}
8422
9116
  if (ws.length)
8423
9117
  return [module.insertTrimmingSpace("case ", ws), exp, col];
8424
9118
  return ["case ", exp, col];
8425
- });
8426
- result.unshift($1);
8427
- return result;
8428
- });
8429
- function CaseExpressionList(state) {
8430
- let eventData;
8431
- if (state.events) {
8432
- const result = state.events.enter?.("CaseExpressionList", state);
8433
- if (result) {
8434
- if (result.cache)
8435
- return result.cache;
8436
- eventData = result.data;
8437
- }
8438
- }
8439
- if (state.tokenize) {
8440
- const result = $TOKEN("CaseExpressionList", state, CaseExpressionList$0(state));
8441
- if (state.events)
8442
- state.events.exit?.("CaseExpressionList", state, result, eventData);
8443
- return result;
8444
- } else {
8445
- const result = CaseExpressionList$0(state);
8446
- if (state.events)
8447
- state.events.exit?.("CaseExpressionList", state, result, eventData);
8448
- return result;
8449
- }
8450
- }
8451
- var NoExpressions$0 = $T($EXPECT($L16, fail, 'NoExpressions ""'), function(value) {
8452
- return [];
9119
+ });
9120
+ result.unshift($1);
9121
+ return result;
8453
9122
  });
8454
- function NoExpressions(state) {
9123
+ function CaseExpressionList(state) {
8455
9124
  let eventData;
8456
9125
  if (state.events) {
8457
- const result = state.events.enter?.("NoExpressions", state);
9126
+ const result = state.events.enter?.("CaseExpressionList", state);
8458
9127
  if (result) {
8459
9128
  if (result.cache)
8460
9129
  return result.cache;
@@ -8462,19 +9131,19 @@ ${input.slice(result.pos)}
8462
9131
  }
8463
9132
  }
8464
9133
  if (state.tokenize) {
8465
- const result = $TOKEN("NoExpressions", state, NoExpressions$0(state));
9134
+ const result = $TOKEN("CaseExpressionList", state, CaseExpressionList$0(state));
8466
9135
  if (state.events)
8467
- state.events.exit?.("NoExpressions", state, result, eventData);
9136
+ state.events.exit?.("CaseExpressionList", state, result, eventData);
8468
9137
  return result;
8469
9138
  } else {
8470
- const result = NoExpressions$0(state);
9139
+ const result = CaseExpressionList$0(state);
8471
9140
  if (state.events)
8472
- state.events.exit?.("NoExpressions", state, result, eventData);
9141
+ state.events.exit?.("CaseExpressionList", state, result, eventData);
8473
9142
  return result;
8474
9143
  }
8475
9144
  }
8476
9145
  var ImpliedColon$0 = $S(__, Colon);
8477
- var ImpliedColon$1 = $TV($EXPECT($L16, fail, 'ImpliedColon ""'), function($skip, $loc, $0, $1) {
9146
+ var ImpliedColon$1 = $TV($EXPECT($L17, fail, 'ImpliedColon ""'), function($skip, $loc, $0, $1) {
8478
9147
  return { $loc, token: ":" };
8479
9148
  });
8480
9149
  function ImpliedColon(state) {
@@ -8666,13 +9335,15 @@ ${input.slice(result.pos)}
8666
9335
  });
8667
9336
  var Condition$1 = $TS($S(InsertOpenParen, ExpressionWithIndentedApplicationSuppressed, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3) {
8668
9337
  var open = $1;
8669
- var exp = $2;
9338
+ var expression = $2;
8670
9339
  var close = $3;
8671
- if (exp.type === "ParenthesizedExpression")
8672
- return exp;
9340
+ if (expression.type === "ParenthesizedExpression")
9341
+ return expression;
9342
+ expression = module.insertTrimmingSpace(expression, "");
8673
9343
  return {
8674
9344
  type: "ParenthesizedExpression",
8675
- children: [open, module.insertTrimmingSpace(exp, ""), close]
9345
+ children: [open, expression, close],
9346
+ expression
8676
9347
  };
8677
9348
  });
8678
9349
  function Condition(state) {
@@ -8726,7 +9397,7 @@ ${input.slice(result.pos)}
8726
9397
  return result;
8727
9398
  }
8728
9399
  }
8729
- var SuppressIndentedApplication$0 = $TV($EXPECT($L16, fail, 'SuppressIndentedApplication ""'), function($skip, $loc, $0, $1) {
9400
+ var SuppressIndentedApplication$0 = $TV($EXPECT($L17, fail, 'SuppressIndentedApplication ""'), function($skip, $loc, $0, $1) {
8730
9401
  module.suppressIndentedApplication = true;
8731
9402
  });
8732
9403
  function SuppressIndentedApplication(state) {
@@ -8751,7 +9422,7 @@ ${input.slice(result.pos)}
8751
9422
  return result;
8752
9423
  }
8753
9424
  }
8754
- var IndentedApplicationAllowed$0 = $TV($EXPECT($L16, fail, 'IndentedApplicationAllowed ""'), function($skip, $loc, $0, $1) {
9425
+ var IndentedApplicationAllowed$0 = $TV($EXPECT($L17, fail, 'IndentedApplicationAllowed ""'), function($skip, $loc, $0, $1) {
8755
9426
  if (module.suppressIndentedApplication)
8756
9427
  return $skip;
8757
9428
  return;
@@ -8778,7 +9449,7 @@ ${input.slice(result.pos)}
8778
9449
  return result;
8779
9450
  }
8780
9451
  }
8781
- var SuppressTrailingMemberProperty$0 = $TV($EXPECT($L16, fail, 'SuppressTrailingMemberProperty ""'), function($skip, $loc, $0, $1) {
9452
+ var SuppressTrailingMemberProperty$0 = $TV($EXPECT($L17, fail, 'SuppressTrailingMemberProperty ""'), function($skip, $loc, $0, $1) {
8782
9453
  module.suppressTrailingMemberProperty.push(true);
8783
9454
  });
8784
9455
  function SuppressTrailingMemberProperty(state) {
@@ -8803,7 +9474,7 @@ ${input.slice(result.pos)}
8803
9474
  return result;
8804
9475
  }
8805
9476
  }
8806
- var TrailingMemberPropertyAllowed$0 = $TV($EXPECT($L16, fail, 'TrailingMemberPropertyAllowed ""'), function($skip, $loc, $0, $1) {
9477
+ var TrailingMemberPropertyAllowed$0 = $TV($EXPECT($L17, fail, 'TrailingMemberPropertyAllowed ""'), function($skip, $loc, $0, $1) {
8807
9478
  if (module.trailingMemberPropertySuppressed)
8808
9479
  return $skip;
8809
9480
  });
@@ -9017,7 +9688,7 @@ ${input.slice(result.pos)}
9017
9688
  return result;
9018
9689
  }
9019
9690
  }
9020
- var ImpliedImport$0 = $TV($EXPECT($L16, fail, 'ImpliedImport ""'), function($skip, $loc, $0, $1) {
9691
+ var ImpliedImport$0 = $TV($EXPECT($L17, fail, 'ImpliedImport ""'), function($skip, $loc, $0, $1) {
9021
9692
  return { $loc, token: "import " };
9022
9693
  });
9023
9694
  function ImpliedImport(state) {
@@ -9194,6 +9865,22 @@ ${input.slice(result.pos)}
9194
9865
  return $2;
9195
9866
  return { ts: true, children: $0, binding: $2.binding };
9196
9867
  });
9868
+ var TypeAndImportSpecifier$1 = $TS($S(__, Operator, ImportSpecifier), function($skip, $loc, $0, $1, $2, $3) {
9869
+ var ws = $1;
9870
+ var spec = $3;
9871
+ if (spec.binding.type !== "Identifier") {
9872
+ throw new Error("Expected identifier after `operator`");
9873
+ }
9874
+ module.operators.add(spec.binding.name);
9875
+ return {
9876
+ ...spec,
9877
+ children: [
9878
+ ws,
9879
+ module.insertTrimmingSpace(spec[0], ""),
9880
+ spec.children.slice(1)
9881
+ ]
9882
+ };
9883
+ });
9197
9884
  function TypeAndImportSpecifier(state) {
9198
9885
  let eventData;
9199
9886
  if (state.events) {
@@ -9205,12 +9892,12 @@ ${input.slice(result.pos)}
9205
9892
  }
9206
9893
  }
9207
9894
  if (state.tokenize) {
9208
- const result = $TOKEN("TypeAndImportSpecifier", state, TypeAndImportSpecifier$0(state));
9895
+ const result = $TOKEN("TypeAndImportSpecifier", state, TypeAndImportSpecifier$0(state) || TypeAndImportSpecifier$1(state));
9209
9896
  if (state.events)
9210
9897
  state.events.exit?.("TypeAndImportSpecifier", state, result, eventData);
9211
9898
  return result;
9212
9899
  } else {
9213
- const result = TypeAndImportSpecifier$0(state);
9900
+ const result = TypeAndImportSpecifier$0(state) || TypeAndImportSpecifier$1(state);
9214
9901
  if (state.events)
9215
9902
  state.events.exit?.("TypeAndImportSpecifier", state, result, eventData);
9216
9903
  return result;
@@ -9253,7 +9940,7 @@ ${input.slice(result.pos)}
9253
9940
  }
9254
9941
  }
9255
9942
  var ImportAsToken$0 = $S(__, As);
9256
- var ImportAsToken$1 = $TS($S(Loc, __, Colon, $E($EXPECT($L6, fail, 'ImportAsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
9943
+ var ImportAsToken$1 = $TS($S(Loc, __, Colon, $E($EXPECT($L7, fail, 'ImportAsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
9257
9944
  var l = $1;
9258
9945
  var ws = $2;
9259
9946
  var c = $3;
@@ -9340,7 +10027,7 @@ ${input.slice(result.pos)}
9340
10027
  return result;
9341
10028
  }
9342
10029
  }
9343
- var UnprocessedModuleSpecifier$0 = BasicStringLiteral;
10030
+ var UnprocessedModuleSpecifier$0 = StringLiteral;
9344
10031
  var UnprocessedModuleSpecifier$1 = UnquotedSpecifier;
9345
10032
  function UnprocessedModuleSpecifier(state) {
9346
10033
  let eventData;
@@ -9607,6 +10294,7 @@ ${input.slice(result.pos)}
9607
10294
  var Declaration$1 = ClassDeclaration;
9608
10295
  var Declaration$2 = LexicalDeclaration;
9609
10296
  var Declaration$3 = TypeDeclaration;
10297
+ var Declaration$4 = OperatorDeclaration;
9610
10298
  function Declaration(state) {
9611
10299
  let eventData;
9612
10300
  if (state.events) {
@@ -9618,12 +10306,12 @@ ${input.slice(result.pos)}
9618
10306
  }
9619
10307
  }
9620
10308
  if (state.tokenize) {
9621
- const result = $TOKEN("Declaration", state, Declaration$0(state) || Declaration$1(state) || Declaration$2(state) || Declaration$3(state));
10309
+ const result = $TOKEN("Declaration", state, Declaration$0(state) || Declaration$1(state) || Declaration$2(state) || Declaration$3(state) || Declaration$4(state));
9622
10310
  if (state.events)
9623
10311
  state.events.exit?.("Declaration", state, result, eventData);
9624
10312
  return result;
9625
10313
  } else {
9626
- const result = Declaration$0(state) || Declaration$1(state) || Declaration$2(state) || Declaration$3(state);
10314
+ const result = Declaration$0(state) || Declaration$1(state) || Declaration$2(state) || Declaration$3(state) || Declaration$4(state);
9627
10315
  if (state.events)
9628
10316
  state.events.exit?.("Declaration", state, result, eventData);
9629
10317
  return result;
@@ -10242,57 +10930,24 @@ ${input.slice(result.pos)}
10242
10930
  return result;
10243
10931
  }
10244
10932
  }
10245
- var StringLiteral$0 = $TS($S(TripleDoubleQuote, $Q($C(TripleDoubleStringCharacters, CoffeeStringSubstitution)), TripleDoubleQuote), function($skip, $loc, $0, $1, $2, $3) {
10246
- return module.dedentBlockSubstitutions($0);
10247
- });
10248
- var StringLiteral$1 = $TS($S(TripleSingleQuote, TripleSingleStringCharacters, TripleSingleQuote), function($skip, $loc, $0, $1, $2, $3) {
10249
- var s = $1;
10250
- var str = $2;
10251
- var e = $3;
10252
- return [s, module.dedentBlockString(str), e];
10253
- });
10254
- var StringLiteral$2 = CoffeeInterpolatedDoubleQuotedString;
10255
- var StringLiteral$3 = BasicStringLiteral;
10256
- function StringLiteral(state) {
10257
- let eventData;
10258
- if (state.events) {
10259
- const result = state.events.enter?.("StringLiteral", state);
10260
- if (result) {
10261
- if (result.cache)
10262
- return result.cache;
10263
- eventData = result.data;
10264
- }
10265
- }
10266
- if (state.tokenize) {
10267
- const result = $TOKEN("StringLiteral", state, StringLiteral$0(state) || StringLiteral$1(state) || StringLiteral$2(state) || StringLiteral$3(state));
10268
- if (state.events)
10269
- state.events.exit?.("StringLiteral", state, result, eventData);
10270
- return result;
10271
- } else {
10272
- const result = StringLiteral$0(state) || StringLiteral$1(state) || StringLiteral$2(state) || StringLiteral$3(state);
10273
- if (state.events)
10274
- state.events.exit?.("StringLiteral", state, result, eventData);
10275
- return result;
10276
- }
10277
- }
10278
- var BasicStringLiteral$0 = $TS($S(DoubleQuote, DoubleStringCharacters, DoubleQuote), function($skip, $loc, $0, $1, $2, $3) {
10933
+ var StringLiteral$0 = $TS($S(DoubleQuote, DoubleStringCharacters, DoubleQuote), function($skip, $loc, $0, $1, $2, $3) {
10279
10934
  var str = $2;
10280
10935
  return {
10281
10936
  token: `"${module.modifyString(str.token)}"`,
10282
10937
  $loc
10283
10938
  };
10284
10939
  });
10285
- var BasicStringLiteral$1 = $TS($S(SingleQuote, SingleStringCharacters, SingleQuote), function($skip, $loc, $0, $1, $2, $3) {
10940
+ var StringLiteral$1 = $TS($S(SingleQuote, SingleStringCharacters, SingleQuote), function($skip, $loc, $0, $1, $2, $3) {
10286
10941
  var str = $2;
10287
10942
  return {
10288
10943
  token: `'${module.modifyString(str.token)}'`,
10289
10944
  $loc
10290
10945
  };
10291
10946
  });
10292
- function BasicStringLiteral(state) {
10947
+ function StringLiteral(state) {
10293
10948
  let eventData;
10294
10949
  if (state.events) {
10295
- const result = state.events.enter?.("BasicStringLiteral", state);
10950
+ const result = state.events.enter?.("StringLiteral", state);
10296
10951
  if (result) {
10297
10952
  if (result.cache)
10298
10953
  return result.cache;
@@ -10300,14 +10955,14 @@ ${input.slice(result.pos)}
10300
10955
  }
10301
10956
  }
10302
10957
  if (state.tokenize) {
10303
- const result = $TOKEN("BasicStringLiteral", state, BasicStringLiteral$0(state) || BasicStringLiteral$1(state));
10958
+ const result = $TOKEN("StringLiteral", state, StringLiteral$0(state) || StringLiteral$1(state));
10304
10959
  if (state.events)
10305
- state.events.exit?.("BasicStringLiteral", state, result, eventData);
10960
+ state.events.exit?.("StringLiteral", state, result, eventData);
10306
10961
  return result;
10307
10962
  } else {
10308
- const result = BasicStringLiteral$0(state) || BasicStringLiteral$1(state);
10963
+ const result = StringLiteral$0(state) || StringLiteral$1(state);
10309
10964
  if (state.events)
10310
- state.events.exit?.("BasicStringLiteral", state, result, eventData);
10965
+ state.events.exit?.("StringLiteral", state, result, eventData);
10311
10966
  return result;
10312
10967
  }
10313
10968
  }
@@ -10440,6 +11095,7 @@ ${input.slice(result.pos)}
10440
11095
  var e = $4;
10441
11096
  if (parts.length === 0 || parts.length === 1 && parts[0].token != null) {
10442
11097
  return {
11098
+ type: "StringLiteral",
10443
11099
  token: parts.length ? `"${module.modifyString(parts[0].token)}"` : '""',
10444
11100
  $loc
10445
11101
  };
@@ -10451,7 +11107,10 @@ ${input.slice(result.pos)}
10451
11107
  }
10452
11108
  });
10453
11109
  s.token = e.token = "`";
10454
- return [s, parts, e];
11110
+ return {
11111
+ type: "TemplateLiteral",
11112
+ children: [s, parts, e]
11113
+ };
10455
11114
  });
10456
11115
  function CoffeeInterpolatedDoubleQuotedString(state) {
10457
11116
  let eventData;
@@ -10501,8 +11160,8 @@ ${input.slice(result.pos)}
10501
11160
  }
10502
11161
  }
10503
11162
  var RegularExpressionLiteral$0 = HeregexLiteral;
10504
- var RegularExpressionLiteral$1 = $TV($TEXT($S($EXPECT($L52, fail, 'RegularExpressionLiteral "/"'), RegularExpressionBody, $EXPECT($L52, fail, 'RegularExpressionLiteral "/"'), RegularExpressionFlags)), function($skip, $loc, $0, $1) {
10505
- return { $loc, token: $1 };
11163
+ var RegularExpressionLiteral$1 = $TV($TEXT($S($EXPECT($L53, fail, 'RegularExpressionLiteral "/"'), RegularExpressionBody, $EXPECT($L53, fail, 'RegularExpressionLiteral "/"'), RegularExpressionFlags)), function($skip, $loc, $0, $1) {
11164
+ return { type: "RegularExpressionLiteral", $loc, token: $1 };
10506
11165
  });
10507
11166
  function RegularExpressionLiteral(state) {
10508
11167
  let eventData;
@@ -10602,7 +11261,10 @@ ${input.slice(result.pos)}
10602
11261
  result.push({ ...close, token: ")" });
10603
11262
  return result;
10604
11263
  }
10605
- return $0;
11264
+ return {
11265
+ type: "RegularExpressionLiteral",
11266
+ children: $0
11267
+ };
10606
11268
  });
10607
11269
  function HeregexLiteral(state) {
10608
11270
  let eventData;
@@ -10803,7 +11465,25 @@ ${input.slice(result.pos)}
10803
11465
  var TemplateLiteral$0 = $TS($S(TripleTick, $Q($C(TemplateBlockCharacters, TemplateSubstitution)), TripleTick), function($skip, $loc, $0, $1, $2, $3) {
10804
11466
  return module.dedentBlockSubstitutions($0);
10805
11467
  });
10806
- var TemplateLiteral$1 = $S(Backtick, $Q($C(TemplateCharacters, TemplateSubstitution)), Backtick);
11468
+ var TemplateLiteral$1 = $TS($S(Backtick, $Q($C(TemplateCharacters, TemplateSubstitution)), Backtick), function($skip, $loc, $0, $1, $2, $3) {
11469
+ return {
11470
+ type: "TemplateLiteral",
11471
+ children: $0
11472
+ };
11473
+ });
11474
+ var TemplateLiteral$2 = $TS($S(TripleDoubleQuote, $Q($C(TripleDoubleStringCharacters, CoffeeStringSubstitution)), TripleDoubleQuote), function($skip, $loc, $0, $1, $2, $3) {
11475
+ return module.dedentBlockSubstitutions($0);
11476
+ });
11477
+ var TemplateLiteral$3 = $TS($S(TripleSingleQuote, TripleSingleStringCharacters, TripleSingleQuote), function($skip, $loc, $0, $1, $2, $3) {
11478
+ var s = $1;
11479
+ var str = $2;
11480
+ var e = $3;
11481
+ return {
11482
+ type: "TemplateLiteral",
11483
+ children: [s, module.dedentBlockString(str), e]
11484
+ };
11485
+ });
11486
+ var TemplateLiteral$4 = CoffeeInterpolatedDoubleQuotedString;
10807
11487
  function TemplateLiteral(state) {
10808
11488
  let eventData;
10809
11489
  if (state.events) {
@@ -10815,12 +11495,12 @@ ${input.slice(result.pos)}
10815
11495
  }
10816
11496
  }
10817
11497
  if (state.tokenize) {
10818
- const result = $TOKEN("TemplateLiteral", state, TemplateLiteral$0(state) || TemplateLiteral$1(state));
11498
+ const result = $TOKEN("TemplateLiteral", state, TemplateLiteral$0(state) || TemplateLiteral$1(state) || TemplateLiteral$2(state) || TemplateLiteral$3(state) || TemplateLiteral$4(state));
10819
11499
  if (state.events)
10820
11500
  state.events.exit?.("TemplateLiteral", state, result, eventData);
10821
11501
  return result;
10822
11502
  } else {
10823
- const result = TemplateLiteral$0(state) || TemplateLiteral$1(state);
11503
+ const result = TemplateLiteral$0(state) || TemplateLiteral$1(state) || TemplateLiteral$2(state) || TemplateLiteral$3(state) || TemplateLiteral$4(state);
10824
11504
  if (state.events)
10825
11505
  state.events.exit?.("TemplateLiteral", state, result, eventData);
10826
11506
  return result;
@@ -11073,7 +11753,8 @@ ${input.slice(result.pos)}
11073
11753
  return result;
11074
11754
  }
11075
11755
  }
11076
- 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) {
11756
+ var CoffeeMultiLineComment$0 = $TS($S(CoffeeHereCommentStart, $TEXT($EXPECT($R42, fail, "CoffeeMultiLineComment /[^]*?###/"))), function($skip, $loc, $0, $1, $2) {
11757
+ $2 = $2.slice(0, $2.length - 3).replace(/\*\//g, "* /");
11077
11758
  return { $loc, token: `/*${$2}*/` };
11078
11759
  });
11079
11760
  function CoffeeMultiLineComment(state) {
@@ -11098,7 +11779,7 @@ ${input.slice(result.pos)}
11098
11779
  return result;
11099
11780
  }
11100
11781
  }
11101
- var CoffeeHereCommentStart$0 = $R$0($EXPECT($R42, fail, "CoffeeHereCommentStart /###(?!#)/"));
11782
+ var CoffeeHereCommentStart$0 = $R$0($EXPECT($R43, fail, "CoffeeHereCommentStart /###(?!#)/"));
11102
11783
  function CoffeeHereCommentStart(state) {
11103
11784
  let eventData;
11104
11785
  if (state.events) {
@@ -11121,7 +11802,7 @@ ${input.slice(result.pos)}
11121
11802
  return result;
11122
11803
  }
11123
11804
  }
11124
- 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) {
11805
+ 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) {
11125
11806
  return { $loc, token: $1 };
11126
11807
  });
11127
11808
  function InlineComment(state) {
@@ -11217,7 +11898,7 @@ ${input.slice(result.pos)}
11217
11898
  return result;
11218
11899
  }
11219
11900
  }
11220
- var NonNewlineWhitespace$0 = $TR($EXPECT($R44, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11901
+ var NonNewlineWhitespace$0 = $TR($EXPECT($R45, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11221
11902
  return { $loc, token: $0 };
11222
11903
  });
11223
11904
  var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L92, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
@@ -11372,7 +12053,7 @@ ${input.slice(result.pos)}
11372
12053
  }
11373
12054
  }
11374
12055
  var StatementDelimiter$0 = SemicolonDelimiter;
11375
- 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);
12056
+ 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);
11376
12057
  var StatementDelimiter$2 = $Y(EOS);
11377
12058
  function StatementDelimiter(state) {
11378
12059
  let eventData;
@@ -11424,7 +12105,7 @@ ${input.slice(result.pos)}
11424
12105
  return result;
11425
12106
  }
11426
12107
  }
11427
- var NonIdContinue$0 = $R$0($EXPECT($R45, fail, "NonIdContinue /(?!\\p{ID_Continue})/"));
12108
+ var NonIdContinue$0 = $R$0($EXPECT($R46, fail, "NonIdContinue /(?!\\p{ID_Continue})/"));
11428
12109
  function NonIdContinue(state) {
11429
12110
  let eventData;
11430
12111
  if (state.events) {
@@ -11447,7 +12128,7 @@ ${input.slice(result.pos)}
11447
12128
  return result;
11448
12129
  }
11449
12130
  }
11450
- var Loc$0 = $TV($EXPECT($L16, fail, 'Loc ""'), function($skip, $loc, $0, $1) {
12131
+ var Loc$0 = $TV($EXPECT($L17, fail, 'Loc ""'), function($skip, $loc, $0, $1) {
11451
12132
  return { $loc, token: "" };
11452
12133
  });
11453
12134
  function Loc(state) {
@@ -11472,7 +12153,7 @@ ${input.slice(result.pos)}
11472
12153
  return result;
11473
12154
  }
11474
12155
  }
11475
- var Abstract$0 = $TV($TEXT($S($EXPECT($L96, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L6, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
12156
+ var Abstract$0 = $TV($TEXT($S($EXPECT($L95, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L7, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
11476
12157
  return { $loc, token: $1, ts: true };
11477
12158
  });
11478
12159
  function Abstract(state) {
@@ -11522,7 +12203,7 @@ ${input.slice(result.pos)}
11522
12203
  return result;
11523
12204
  }
11524
12205
  }
11525
- var As$0 = $TS($S($EXPECT($L97, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12206
+ var As$0 = $TS($S($EXPECT($L96, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11526
12207
  return { $loc, token: $1 };
11527
12208
  });
11528
12209
  function As(state) {
@@ -11547,7 +12228,7 @@ ${input.slice(result.pos)}
11547
12228
  return result;
11548
12229
  }
11549
12230
  }
11550
- var At$0 = $TV($EXPECT($L98, fail, 'At "@"'), function($skip, $loc, $0, $1) {
12231
+ var At$0 = $TV($EXPECT($L97, fail, 'At "@"'), function($skip, $loc, $0, $1) {
11551
12232
  return { $loc, token: $1 };
11552
12233
  });
11553
12234
  function At(state) {
@@ -11572,7 +12253,7 @@ ${input.slice(result.pos)}
11572
12253
  return result;
11573
12254
  }
11574
12255
  }
11575
- var AtAt$0 = $TV($EXPECT($L99, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
12256
+ var AtAt$0 = $TV($EXPECT($L98, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
11576
12257
  return { $loc, token: "@" };
11577
12258
  });
11578
12259
  function AtAt(state) {
@@ -11597,7 +12278,7 @@ ${input.slice(result.pos)}
11597
12278
  return result;
11598
12279
  }
11599
12280
  }
11600
- var Async$0 = $TS($S($EXPECT($L100, fail, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12281
+ var Async$0 = $TS($S($EXPECT($L99, fail, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11601
12282
  return { $loc, token: $1, type: "Async" };
11602
12283
  });
11603
12284
  function Async(state) {
@@ -11622,7 +12303,7 @@ ${input.slice(result.pos)}
11622
12303
  return result;
11623
12304
  }
11624
12305
  }
11625
- var Await$0 = $TS($S($EXPECT($L101, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12306
+ var Await$0 = $TS($S($EXPECT($L100, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11626
12307
  return { $loc, token: $1 };
11627
12308
  });
11628
12309
  function Await(state) {
@@ -11647,7 +12328,7 @@ ${input.slice(result.pos)}
11647
12328
  return result;
11648
12329
  }
11649
12330
  }
11650
- var Backtick$0 = $TV($EXPECT($L95, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
12331
+ var Backtick$0 = $TV($EXPECT($L94, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
11651
12332
  return { $loc, token: $1 };
11652
12333
  });
11653
12334
  function Backtick(state) {
@@ -11672,7 +12353,7 @@ ${input.slice(result.pos)}
11672
12353
  return result;
11673
12354
  }
11674
12355
  }
11675
- var By$0 = $TS($S($EXPECT($L102, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12356
+ var By$0 = $TS($S($EXPECT($L101, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11676
12357
  return { $loc, token: $1 };
11677
12358
  });
11678
12359
  function By(state) {
@@ -11697,7 +12378,7 @@ ${input.slice(result.pos)}
11697
12378
  return result;
11698
12379
  }
11699
12380
  }
11700
- var Case$0 = $TS($S($EXPECT($L103, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12381
+ var Case$0 = $TS($S($EXPECT($L102, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11701
12382
  return { $loc, token: $1 };
11702
12383
  });
11703
12384
  function Case(state) {
@@ -11722,7 +12403,7 @@ ${input.slice(result.pos)}
11722
12403
  return result;
11723
12404
  }
11724
12405
  }
11725
- var Catch$0 = $TS($S($EXPECT($L104, fail, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12406
+ var Catch$0 = $TS($S($EXPECT($L103, fail, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11726
12407
  return { $loc, token: $1 };
11727
12408
  });
11728
12409
  function Catch(state) {
@@ -11747,7 +12428,7 @@ ${input.slice(result.pos)}
11747
12428
  return result;
11748
12429
  }
11749
12430
  }
11750
- var Class$0 = $TS($S($EXPECT($L105, fail, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12431
+ var Class$0 = $TS($S($EXPECT($L104, fail, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11751
12432
  return { $loc, token: $1 };
11752
12433
  });
11753
12434
  function Class(state) {
@@ -11772,7 +12453,7 @@ ${input.slice(result.pos)}
11772
12453
  return result;
11773
12454
  }
11774
12455
  }
11775
- var CloseBrace$0 = $TV($EXPECT($L19, fail, 'CloseBrace "}"'), function($skip, $loc, $0, $1) {
12456
+ var CloseBrace$0 = $TV($EXPECT($L20, fail, 'CloseBrace "}"'), function($skip, $loc, $0, $1) {
11776
12457
  return { $loc, token: $1 };
11777
12458
  });
11778
12459
  function CloseBrace(state) {
@@ -11822,7 +12503,7 @@ ${input.slice(result.pos)}
11822
12503
  return result;
11823
12504
  }
11824
12505
  }
11825
- var CloseParen$0 = $TV($EXPECT($L17, fail, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
12506
+ var CloseParen$0 = $TV($EXPECT($L18, fail, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
11826
12507
  return { $loc, token: $1 };
11827
12508
  });
11828
12509
  function CloseParen(state) {
@@ -11847,7 +12528,7 @@ ${input.slice(result.pos)}
11847
12528
  return result;
11848
12529
  }
11849
12530
  }
11850
- var CoffeeSubstitutionStart$0 = $TV($EXPECT($L106, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
12531
+ var CoffeeSubstitutionStart$0 = $TV($EXPECT($L105, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
11851
12532
  return { $loc, token: "${" };
11852
12533
  });
11853
12534
  function CoffeeSubstitutionStart(state) {
@@ -11897,7 +12578,32 @@ ${input.slice(result.pos)}
11897
12578
  return result;
11898
12579
  }
11899
12580
  }
11900
- var ConstructorShorthand$0 = $TV($EXPECT($L98, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
12581
+ var Comma$0 = $TV($EXPECT($L106, fail, 'Comma ","'), function($skip, $loc, $0, $1) {
12582
+ return { $loc, token: $1 };
12583
+ });
12584
+ function Comma(state) {
12585
+ let eventData;
12586
+ if (state.events) {
12587
+ const result = state.events.enter?.("Comma", state);
12588
+ if (result) {
12589
+ if (result.cache)
12590
+ return result.cache;
12591
+ eventData = result.data;
12592
+ }
12593
+ }
12594
+ if (state.tokenize) {
12595
+ const result = $TOKEN("Comma", state, Comma$0(state));
12596
+ if (state.events)
12597
+ state.events.exit?.("Comma", state, result, eventData);
12598
+ return result;
12599
+ } else {
12600
+ const result = Comma$0(state);
12601
+ if (state.events)
12602
+ state.events.exit?.("Comma", state, result, eventData);
12603
+ return result;
12604
+ }
12605
+ }
12606
+ var ConstructorShorthand$0 = $TV($EXPECT($L97, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
11901
12607
  return { $loc, token: "constructor" };
11902
12608
  });
11903
12609
  function ConstructorShorthand(state) {
@@ -12022,7 +12728,7 @@ ${input.slice(result.pos)}
12022
12728
  return result;
12023
12729
  }
12024
12730
  }
12025
- var Dot$0 = $TV($EXPECT($L2, fail, 'Dot "."'), function($skip, $loc, $0, $1) {
12731
+ var Dot$0 = $TV($EXPECT($L3, fail, 'Dot "."'), function($skip, $loc, $0, $1) {
12026
12732
  return { $loc, token: $1 };
12027
12733
  });
12028
12734
  function Dot(state) {
@@ -12347,7 +13053,7 @@ ${input.slice(result.pos)}
12347
13053
  return result;
12348
13054
  }
12349
13055
  }
12350
- var If$0 = $TV($TEXT($S($EXPECT($L123, fail, 'If "if"'), NonIdContinue, $E($EXPECT($L6, fail, 'If " "')))), function($skip, $loc, $0, $1) {
13056
+ var If$0 = $TV($TEXT($S($EXPECT($L123, fail, 'If "if"'), NonIdContinue, $E($EXPECT($L7, fail, 'If " "')))), function($skip, $loc, $0, $1) {
12351
13057
  return { $loc, token: $1 };
12352
13058
  });
12353
13059
  function If(state) {
@@ -12372,7 +13078,7 @@ ${input.slice(result.pos)}
12372
13078
  return result;
12373
13079
  }
12374
13080
  }
12375
- var Import$0 = $TS($S($EXPECT($L11, fail, 'Import "import"'), $Y($EXPECT($R46, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
13081
+ var Import$0 = $TS($S($EXPECT($L12, fail, 'Import "import"'), $Y($EXPECT($R47, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
12376
13082
  return { $loc, token: $1 };
12377
13083
  });
12378
13084
  function Import(state) {
@@ -12497,7 +13203,7 @@ ${input.slice(result.pos)}
12497
13203
  return result;
12498
13204
  }
12499
13205
  }
12500
- 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) {
13206
+ 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) {
12501
13207
  return { $loc, token: "!" };
12502
13208
  });
12503
13209
  function Not(state) {
@@ -12522,7 +13228,7 @@ ${input.slice(result.pos)}
12522
13228
  return result;
12523
13229
  }
12524
13230
  }
12525
- var Of$0 = $TS($S($EXPECT($L70, fail, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13231
+ var Of$0 = $TS($S($EXPECT($L71, fail, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12526
13232
  return { $loc, token: $1 };
12527
13233
  });
12528
13234
  function Of(state) {
@@ -12597,7 +13303,7 @@ ${input.slice(result.pos)}
12597
13303
  return result;
12598
13304
  }
12599
13305
  }
12600
- var OpenBracket$0 = $TV($EXPECT($L94, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
13306
+ var OpenBracket$0 = $TV($EXPECT($L93, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
12601
13307
  return { $loc, token: $1 };
12602
13308
  });
12603
13309
  function OpenBracket(state) {
@@ -12622,7 +13328,7 @@ ${input.slice(result.pos)}
12622
13328
  return result;
12623
13329
  }
12624
13330
  }
12625
- var OpenParen$0 = $TV($EXPECT($L93, fail, 'OpenParen "("'), function($skip, $loc, $0, $1) {
13331
+ var OpenParen$0 = $TV($EXPECT($L1, fail, 'OpenParen "("'), function($skip, $loc, $0, $1) {
12626
13332
  return { $loc, token: $1 };
12627
13333
  });
12628
13334
  function OpenParen(state) {
@@ -12647,7 +13353,32 @@ ${input.slice(result.pos)}
12647
13353
  return result;
12648
13354
  }
12649
13355
  }
12650
- var Public$0 = $TS($S($EXPECT($L130, fail, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13356
+ var Operator$0 = $TS($S($EXPECT($L130, fail, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13357
+ return { $loc, token: $1 };
13358
+ });
13359
+ function Operator(state) {
13360
+ let eventData;
13361
+ if (state.events) {
13362
+ const result = state.events.enter?.("Operator", state);
13363
+ if (result) {
13364
+ if (result.cache)
13365
+ return result.cache;
13366
+ eventData = result.data;
13367
+ }
13368
+ }
13369
+ if (state.tokenize) {
13370
+ const result = $TOKEN("Operator", state, Operator$0(state));
13371
+ if (state.events)
13372
+ state.events.exit?.("Operator", state, result, eventData);
13373
+ return result;
13374
+ } else {
13375
+ const result = Operator$0(state);
13376
+ if (state.events)
13377
+ state.events.exit?.("Operator", state, result, eventData);
13378
+ return result;
13379
+ }
13380
+ }
13381
+ var Public$0 = $TS($S($EXPECT($L131, fail, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12651
13382
  return { $loc, token: $1 };
12652
13383
  });
12653
13384
  function Public(state) {
@@ -12672,7 +13403,7 @@ ${input.slice(result.pos)}
12672
13403
  return result;
12673
13404
  }
12674
13405
  }
12675
- var Private$0 = $TS($S($EXPECT($L131, fail, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13406
+ var Private$0 = $TS($S($EXPECT($L132, fail, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12676
13407
  return { $loc, token: $1 };
12677
13408
  });
12678
13409
  function Private(state) {
@@ -12697,7 +13428,7 @@ ${input.slice(result.pos)}
12697
13428
  return result;
12698
13429
  }
12699
13430
  }
12700
- var Protected$0 = $TS($S($EXPECT($L132, fail, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13431
+ var Protected$0 = $TS($S($EXPECT($L133, fail, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12701
13432
  return { $loc, token: $1 };
12702
13433
  });
12703
13434
  function Protected(state) {
@@ -12722,7 +13453,7 @@ ${input.slice(result.pos)}
12722
13453
  return result;
12723
13454
  }
12724
13455
  }
12725
- var Pipe$0 = $TV($EXPECT($L133, fail, 'Pipe "|>"'), function($skip, $loc, $0, $1) {
13456
+ var Pipe$0 = $TV($EXPECT($L134, fail, 'Pipe "|>"'), function($skip, $loc, $0, $1) {
12726
13457
  return { $loc, token: $1 };
12727
13458
  });
12728
13459
  function Pipe(state) {
@@ -12747,7 +13478,7 @@ ${input.slice(result.pos)}
12747
13478
  return result;
12748
13479
  }
12749
13480
  }
12750
- var QuestionMark$0 = $TV($EXPECT($L1, fail, 'QuestionMark "?"'), function($skip, $loc, $0, $1) {
13481
+ var QuestionMark$0 = $TV($EXPECT($L2, fail, 'QuestionMark "?"'), function($skip, $loc, $0, $1) {
12751
13482
  return { $loc, token: $1 };
12752
13483
  });
12753
13484
  function QuestionMark(state) {
@@ -12772,7 +13503,7 @@ ${input.slice(result.pos)}
12772
13503
  return result;
12773
13504
  }
12774
13505
  }
12775
- var Readonly$0 = $TS($S($EXPECT($L134, fail, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13506
+ var Readonly$0 = $TS($S($EXPECT($L135, fail, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12776
13507
  return { $loc, token: $1, ts: true };
12777
13508
  });
12778
13509
  function Readonly(state) {
@@ -12797,7 +13528,7 @@ ${input.slice(result.pos)}
12797
13528
  return result;
12798
13529
  }
12799
13530
  }
12800
- var Return$0 = $TS($S($EXPECT($L135, fail, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13531
+ var Return$0 = $TS($S($EXPECT($L136, fail, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12801
13532
  return { $loc, token: $1 };
12802
13533
  });
12803
13534
  function Return(state) {
@@ -12822,7 +13553,7 @@ ${input.slice(result.pos)}
12822
13553
  return result;
12823
13554
  }
12824
13555
  }
12825
- var Satisfies$0 = $TS($S($EXPECT($L136, fail, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13556
+ var Satisfies$0 = $TS($S($EXPECT($L137, fail, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12826
13557
  return { $loc, token: $1 };
12827
13558
  });
12828
13559
  function Satisfies(state) {
@@ -12872,7 +13603,7 @@ ${input.slice(result.pos)}
12872
13603
  return result;
12873
13604
  }
12874
13605
  }
12875
- var SingleQuote$0 = $TV($EXPECT($L137, fail, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
13606
+ var SingleQuote$0 = $TV($EXPECT($L138, fail, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
12876
13607
  return { $loc, token: $1 };
12877
13608
  });
12878
13609
  function SingleQuote(state) {
@@ -12897,7 +13628,7 @@ ${input.slice(result.pos)}
12897
13628
  return result;
12898
13629
  }
12899
13630
  }
12900
- var Star$0 = $TV($EXPECT($L51, fail, 'Star "*"'), function($skip, $loc, $0, $1) {
13631
+ var Star$0 = $TV($EXPECT($L52, fail, 'Star "*"'), function($skip, $loc, $0, $1) {
12901
13632
  return { $loc, token: $1 };
12902
13633
  });
12903
13634
  function Star(state) {
@@ -12922,10 +13653,10 @@ ${input.slice(result.pos)}
12922
13653
  return result;
12923
13654
  }
12924
13655
  }
12925
- var Static$0 = $TS($S($EXPECT($L138, fail, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13656
+ var Static$0 = $TS($S($EXPECT($L139, fail, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12926
13657
  return { $loc, token: $1 };
12927
13658
  });
12928
- 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) {
13659
+ 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) {
12929
13660
  return { $loc, token: "static " };
12930
13661
  });
12931
13662
  function Static(state) {
@@ -12950,7 +13681,7 @@ ${input.slice(result.pos)}
12950
13681
  return result;
12951
13682
  }
12952
13683
  }
12953
- var SubstitutionStart$0 = $TV($EXPECT($L139, fail, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
13684
+ var SubstitutionStart$0 = $TV($EXPECT($L140, fail, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
12954
13685
  return { $loc, token: $1 };
12955
13686
  });
12956
13687
  function SubstitutionStart(state) {
@@ -12975,7 +13706,7 @@ ${input.slice(result.pos)}
12975
13706
  return result;
12976
13707
  }
12977
13708
  }
12978
- var Switch$0 = $TS($S($EXPECT($L140, fail, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13709
+ var Switch$0 = $TS($S($EXPECT($L141, fail, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12979
13710
  return { $loc, token: $1 };
12980
13711
  });
12981
13712
  function Switch(state) {
@@ -13000,7 +13731,7 @@ ${input.slice(result.pos)}
13000
13731
  return result;
13001
13732
  }
13002
13733
  }
13003
- var Target$0 = $TS($S($EXPECT($L141, fail, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13734
+ var Target$0 = $TS($S($EXPECT($L142, fail, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13004
13735
  return { $loc, token: $1 };
13005
13736
  });
13006
13737
  function Target(state) {
@@ -13025,7 +13756,7 @@ ${input.slice(result.pos)}
13025
13756
  return result;
13026
13757
  }
13027
13758
  }
13028
- var Then$0 = $TS($S(__, $EXPECT($L142, fail, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
13759
+ var Then$0 = $TS($S(__, $EXPECT($L143, fail, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
13029
13760
  return { $loc, token: "" };
13030
13761
  });
13031
13762
  function Then(state) {
@@ -13050,7 +13781,7 @@ ${input.slice(result.pos)}
13050
13781
  return result;
13051
13782
  }
13052
13783
  }
13053
- var This$0 = $TS($S($EXPECT($L143, fail, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13784
+ var This$0 = $TS($S($EXPECT($L144, fail, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13054
13785
  return { $loc, token: $1 };
13055
13786
  });
13056
13787
  function This(state) {
@@ -13075,7 +13806,7 @@ ${input.slice(result.pos)}
13075
13806
  return result;
13076
13807
  }
13077
13808
  }
13078
- var Throw$0 = $TS($S($EXPECT($L144, fail, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13809
+ var Throw$0 = $TS($S($EXPECT($L145, fail, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13079
13810
  return { $loc, token: $1 };
13080
13811
  });
13081
13812
  function Throw(state) {
@@ -13100,7 +13831,7 @@ ${input.slice(result.pos)}
13100
13831
  return result;
13101
13832
  }
13102
13833
  }
13103
- var TripleDoubleQuote$0 = $TV($EXPECT($L145, fail, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
13834
+ var TripleDoubleQuote$0 = $TV($EXPECT($L146, fail, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
13104
13835
  return { $loc, token: "`" };
13105
13836
  });
13106
13837
  function TripleDoubleQuote(state) {
@@ -13125,7 +13856,7 @@ ${input.slice(result.pos)}
13125
13856
  return result;
13126
13857
  }
13127
13858
  }
13128
- var TripleSingleQuote$0 = $TV($EXPECT($L146, fail, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
13859
+ var TripleSingleQuote$0 = $TV($EXPECT($L147, fail, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
13129
13860
  return { $loc, token: "`" };
13130
13861
  });
13131
13862
  function TripleSingleQuote(state) {
@@ -13150,7 +13881,7 @@ ${input.slice(result.pos)}
13150
13881
  return result;
13151
13882
  }
13152
13883
  }
13153
- var TripleSlash$0 = $TV($EXPECT($L147, fail, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
13884
+ var TripleSlash$0 = $TV($EXPECT($L148, fail, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
13154
13885
  return { $loc, token: "/" };
13155
13886
  });
13156
13887
  function TripleSlash(state) {
@@ -13175,7 +13906,7 @@ ${input.slice(result.pos)}
13175
13906
  return result;
13176
13907
  }
13177
13908
  }
13178
- var TripleTick$0 = $TV($EXPECT($L148, fail, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
13909
+ var TripleTick$0 = $TV($EXPECT($L149, fail, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
13179
13910
  return { $loc, token: "`" };
13180
13911
  });
13181
13912
  function TripleTick(state) {
@@ -13200,7 +13931,7 @@ ${input.slice(result.pos)}
13200
13931
  return result;
13201
13932
  }
13202
13933
  }
13203
- var Try$0 = $TS($S($EXPECT($L149, fail, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13934
+ var Try$0 = $TS($S($EXPECT($L150, fail, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13204
13935
  return { $loc, token: $1 };
13205
13936
  });
13206
13937
  function Try(state) {
@@ -13225,7 +13956,7 @@ ${input.slice(result.pos)}
13225
13956
  return result;
13226
13957
  }
13227
13958
  }
13228
- var Typeof$0 = $TS($S($EXPECT($L150, fail, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13959
+ var Typeof$0 = $TS($S($EXPECT($L151, fail, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13229
13960
  return { $loc, token: $1 };
13230
13961
  });
13231
13962
  function Typeof(state) {
@@ -13250,7 +13981,7 @@ ${input.slice(result.pos)}
13250
13981
  return result;
13251
13982
  }
13252
13983
  }
13253
- var Unless$0 = $TS($S($EXPECT($L151, fail, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13984
+ var Unless$0 = $TS($S($EXPECT($L152, fail, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13254
13985
  return { $loc, token: $1 };
13255
13986
  });
13256
13987
  function Unless(state) {
@@ -13275,7 +14006,7 @@ ${input.slice(result.pos)}
13275
14006
  return result;
13276
14007
  }
13277
14008
  }
13278
- var Until$0 = $TS($S($EXPECT($L152, fail, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14009
+ var Until$0 = $TS($S($EXPECT($L153, fail, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13279
14010
  return { $loc, token: $1 };
13280
14011
  });
13281
14012
  function Until(state) {
@@ -13300,7 +14031,7 @@ ${input.slice(result.pos)}
13300
14031
  return result;
13301
14032
  }
13302
14033
  }
13303
- var Var$0 = $TS($S($EXPECT($L153, fail, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14034
+ var Var$0 = $TS($S($EXPECT($L154, fail, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13304
14035
  return { $loc, token: $1 };
13305
14036
  });
13306
14037
  function Var(state) {
@@ -13325,7 +14056,7 @@ ${input.slice(result.pos)}
13325
14056
  return result;
13326
14057
  }
13327
14058
  }
13328
- var Void$0 = $TS($S($EXPECT($L154, fail, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14059
+ var Void$0 = $TS($S($EXPECT($L155, fail, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13329
14060
  return { $loc, token: $1 };
13330
14061
  });
13331
14062
  function Void(state) {
@@ -13350,7 +14081,7 @@ ${input.slice(result.pos)}
13350
14081
  return result;
13351
14082
  }
13352
14083
  }
13353
- var When$0 = $TS($S($EXPECT($L155, fail, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14084
+ var When$0 = $TS($S($EXPECT($L156, fail, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13354
14085
  return { $loc, token: "case" };
13355
14086
  });
13356
14087
  function When(state) {
@@ -13375,7 +14106,7 @@ ${input.slice(result.pos)}
13375
14106
  return result;
13376
14107
  }
13377
14108
  }
13378
- var While$0 = $TS($S($EXPECT($L156, fail, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14109
+ var While$0 = $TS($S($EXPECT($L157, fail, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13379
14110
  return { $loc, token: $1 };
13380
14111
  });
13381
14112
  function While(state) {
@@ -13400,7 +14131,7 @@ ${input.slice(result.pos)}
13400
14131
  return result;
13401
14132
  }
13402
14133
  }
13403
- var Yield$0 = $TS($S($EXPECT($L157, fail, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14134
+ var Yield$0 = $TS($S($EXPECT($L158, fail, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13404
14135
  return { $loc, token: $1 };
13405
14136
  });
13406
14137
  function Yield(state) {
@@ -13546,7 +14277,7 @@ ${input.slice(result.pos)}
13546
14277
  return result;
13547
14278
  }
13548
14279
  }
13549
- 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) {
14280
+ 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) {
13550
14281
  return { type: "JSXElement", children: $0, tag: $2 };
13551
14282
  });
13552
14283
  function JSXSelfClosingElement(state) {
@@ -13626,7 +14357,7 @@ ${input.slice(result.pos)}
13626
14357
  return $skip;
13627
14358
  return $0;
13628
14359
  });
13629
- var JSXOptionalClosingElement$1 = $EXPECT($L16, fail, 'JSXOptionalClosingElement ""');
14360
+ var JSXOptionalClosingElement$1 = $EXPECT($L17, fail, 'JSXOptionalClosingElement ""');
13630
14361
  function JSXOptionalClosingElement(state) {
13631
14362
  let eventData;
13632
14363
  if (state.events) {
@@ -13649,7 +14380,7 @@ ${input.slice(result.pos)}
13649
14380
  return result;
13650
14381
  }
13651
14382
  }
13652
- var JSXClosingElement$0 = $S($EXPECT($L159, fail, 'JSXClosingElement "</"'), $E(Whitespace), $TEXT(JSXElementName), $E(Whitespace), $EXPECT($L29, fail, 'JSXClosingElement ">"'));
14383
+ var JSXClosingElement$0 = $S($EXPECT($L160, fail, 'JSXClosingElement "</"'), $E(Whitespace), $TEXT(JSXElementName), $E(Whitespace), $EXPECT($L29, fail, 'JSXClosingElement ">"'));
13653
14384
  function JSXClosingElement(state) {
13654
14385
  let eventData;
13655
14386
  if (state.events) {
@@ -13688,7 +14419,7 @@ ${input.slice(result.pos)}
13688
14419
  ];
13689
14420
  return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
13690
14421
  });
13691
- var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L160, fail, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
14422
+ var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L161, fail, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
13692
14423
  var children = $3;
13693
14424
  $0 = $0.slice(1);
13694
14425
  return {
@@ -13719,7 +14450,7 @@ ${input.slice(result.pos)}
13719
14450
  return result;
13720
14451
  }
13721
14452
  }
13722
- var PushJSXOpeningFragment$0 = $TV($EXPECT($L160, fail, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
14453
+ var PushJSXOpeningFragment$0 = $TV($EXPECT($L161, fail, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
13723
14454
  module.JSXTagStack.push("");
13724
14455
  return $1;
13725
14456
  });
@@ -13750,7 +14481,7 @@ ${input.slice(result.pos)}
13750
14481
  return $skip;
13751
14482
  return $0;
13752
14483
  });
13753
- var JSXOptionalClosingFragment$1 = $EXPECT($L16, fail, 'JSXOptionalClosingFragment ""');
14484
+ var JSXOptionalClosingFragment$1 = $EXPECT($L17, fail, 'JSXOptionalClosingFragment ""');
13754
14485
  function JSXOptionalClosingFragment(state) {
13755
14486
  let eventData;
13756
14487
  if (state.events) {
@@ -13773,7 +14504,7 @@ ${input.slice(result.pos)}
13773
14504
  return result;
13774
14505
  }
13775
14506
  }
13776
- var JSXClosingFragment$0 = $EXPECT($L161, fail, 'JSXClosingFragment "</>"');
14507
+ var JSXClosingFragment$0 = $EXPECT($L162, fail, 'JSXClosingFragment "</>"');
13777
14508
  function JSXClosingFragment(state) {
13778
14509
  let eventData;
13779
14510
  if (state.events) {
@@ -13819,7 +14550,7 @@ ${input.slice(result.pos)}
13819
14550
  return result;
13820
14551
  }
13821
14552
  }
13822
- var JSXIdentifierName$0 = $R$0($EXPECT($R47, fail, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
14553
+ var JSXIdentifierName$0 = $R$0($EXPECT($R48, fail, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
13823
14554
  function JSXIdentifierName(state) {
13824
14555
  let eventData;
13825
14556
  if (state.events) {
@@ -13998,7 +14729,7 @@ ${input.slice(result.pos)}
13998
14729
  }
13999
14730
  });
14000
14731
  var JSXAttribute$2 = $S(InsertInlineOpenBrace, DotDotDot, InlineJSXAttributeValue, InsertCloseBrace, $Y(JSXAttributeSpace));
14001
- var JSXAttribute$3 = $TS($S($EXPECT($L9, fail, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
14732
+ var JSXAttribute$3 = $TS($S($EXPECT($L10, fail, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
14002
14733
  return [" ", "id=", $2];
14003
14734
  });
14004
14735
  var JSXAttribute$4 = $TS($S(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
@@ -14035,7 +14766,7 @@ ${input.slice(result.pos)}
14035
14766
  return result;
14036
14767
  }
14037
14768
  }
14038
- var JSXAttributeSpace$0 = $R$0($EXPECT($R48, fail, "JSXAttributeSpace /[\\s>]/"));
14769
+ var JSXAttributeSpace$0 = $R$0($EXPECT($R49, fail, "JSXAttributeSpace /[\\s>]/"));
14039
14770
  function JSXAttributeSpace(state) {
14040
14771
  let eventData;
14041
14772
  if (state.events) {
@@ -14058,19 +14789,13 @@ ${input.slice(result.pos)}
14058
14789
  return result;
14059
14790
  }
14060
14791
  }
14061
- var JSXShorthandString$0 = $TR($EXPECT($R49, fail, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14792
+ var JSXShorthandString$0 = $TR($EXPECT($R50, fail, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14062
14793
  return module.quoteString($0);
14063
14794
  });
14064
- var JSXShorthandString$1 = $TS($S(StringLiteral), function($skip, $loc, $0, $1) {
14065
- if (module.isTemplateLiteral($1)) {
14066
- return ["{", $1, "}"];
14067
- } else {
14068
- return $1;
14069
- }
14070
- });
14071
- var JSXShorthandString$2 = $TS($S(TemplateLiteral), function($skip, $loc, $0, $1) {
14795
+ var JSXShorthandString$1 = $TS($S(TemplateLiteral), function($skip, $loc, $0, $1) {
14072
14796
  return ["{", $1, "}"];
14073
14797
  });
14798
+ var JSXShorthandString$2 = StringLiteral;
14074
14799
  var JSXShorthandString$3 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
14075
14800
  function JSXShorthandString(state) {
14076
14801
  let eventData;
@@ -14141,15 +14866,16 @@ ${input.slice(result.pos)}
14141
14866
  return result;
14142
14867
  }
14143
14868
  }
14144
- var JSXAttributeValue$0 = $TS($S(StringLiteral), function($skip, $loc, $0, $1) {
14145
- if (module.isTemplateLiteral($1))
14146
- return $skip;
14147
- return $1;
14869
+ var JSXAttributeValue$0 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
14870
+ var JSXAttributeValue$1 = JSXElement;
14871
+ var JSXAttributeValue$2 = JSXFragment;
14872
+ var JSXAttributeValue$3 = $TS($S(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3) {
14873
+ if ($2.children?.length === 1 && $2.children[0].type === "StringLiteral") {
14874
+ return $2.children[0];
14875
+ }
14876
+ return $0;
14148
14877
  });
14149
- var JSXAttributeValue$1 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
14150
- var JSXAttributeValue$2 = JSXElement;
14151
- var JSXAttributeValue$3 = JSXFragment;
14152
- var JSXAttributeValue$4 = $S(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace);
14878
+ var JSXAttributeValue$4 = StringLiteral;
14153
14879
  function JSXAttributeValue(state) {
14154
14880
  let eventData;
14155
14881
  if (state.events) {
@@ -14199,7 +14925,7 @@ ${input.slice(result.pos)}
14199
14925
  return result;
14200
14926
  }
14201
14927
  }
14202
- var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R50, fail, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, $C(ParenthesizedAssignment, InlineJSXUnaryExpression)), function($skip, $loc, $0, $1, $2, $3) {
14928
+ var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R51, fail, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, $C(ParenthesizedAssignment, InlineJSXUnaryExpression)), function($skip, $loc, $0, $1, $2, $3) {
14203
14929
  var op = $2;
14204
14930
  var rhs = $3;
14205
14931
  return [[], op, [], rhs];
@@ -14330,8 +15056,8 @@ ${input.slice(result.pos)}
14330
15056
  return result;
14331
15057
  }
14332
15058
  }
14333
- var InlineJSXCallExpression$0 = $S($EXPECT($L10, fail, 'InlineJSXCallExpression "super"'), ExplicitArguments);
14334
- var InlineJSXCallExpression$1 = $S($EXPECT($L11, fail, 'InlineJSXCallExpression "import"'), OpenParen, ExtendedExpression, __, CloseParen);
15059
+ var InlineJSXCallExpression$0 = $S($EXPECT($L11, fail, 'InlineJSXCallExpression "super"'), ExplicitArguments);
15060
+ var InlineJSXCallExpression$1 = $S($EXPECT($L12, fail, 'InlineJSXCallExpression "import"'), OpenParen, ExtendedExpression, __, CloseParen);
14335
15061
  var InlineJSXCallExpression$2 = $TS($S(InlineJSXMemberExpression, $Q(InlineJSXCallExpressionRest)), function($skip, $loc, $0, $1, $2) {
14336
15062
  if ($2.length)
14337
15063
  return $0;
@@ -14449,14 +15175,13 @@ ${input.slice(result.pos)}
14449
15175
  var InlineJSXPrimaryExpression$0 = NullLiteral;
14450
15176
  var InlineJSXPrimaryExpression$1 = BooleanLiteral;
14451
15177
  var InlineJSXPrimaryExpression$2 = NumericLiteral;
14452
- var InlineJSXPrimaryExpression$3 = StringLiteral;
15178
+ var InlineJSXPrimaryExpression$3 = TemplateLiteral;
14453
15179
  var InlineJSXPrimaryExpression$4 = ThisLiteral;
14454
15180
  var InlineJSXPrimaryExpression$5 = ArrayLiteral;
14455
15181
  var InlineJSXPrimaryExpression$6 = BracedObjectLiteral;
14456
15182
  var InlineJSXPrimaryExpression$7 = IdentifierReference;
14457
15183
  var InlineJSXPrimaryExpression$8 = RegularExpressionLiteral;
14458
- var InlineJSXPrimaryExpression$9 = TemplateLiteral;
14459
- var InlineJSXPrimaryExpression$10 = ParenthesizedExpression;
15184
+ var InlineJSXPrimaryExpression$9 = ParenthesizedExpression;
14460
15185
  function InlineJSXPrimaryExpression(state) {
14461
15186
  let eventData;
14462
15187
  if (state.events) {
@@ -14468,12 +15193,12 @@ ${input.slice(result.pos)}
14468
15193
  }
14469
15194
  }
14470
15195
  if (state.tokenize) {
14471
- 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));
15196
+ 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));
14472
15197
  if (state.events)
14473
15198
  state.events.exit?.("InlineJSXPrimaryExpression", state, result, eventData);
14474
15199
  return result;
14475
15200
  } else {
14476
- 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);
15201
+ 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);
14477
15202
  if (state.events)
14478
15203
  state.events.exit?.("InlineJSXPrimaryExpression", state, result, eventData);
14479
15204
  return result;
@@ -14546,7 +15271,7 @@ ${input.slice(result.pos)}
14546
15271
  }
14547
15272
  return $skip;
14548
15273
  });
14549
- var JSXNestedChildren$1 = $TV($Y($C(JSXEOS, $EXPECT($L19, fail, 'JSXNestedChildren "}"'), JSXClosingElement, JSXClosingFragment)), function($skip, $loc, $0, $1) {
15274
+ var JSXNestedChildren$1 = $TV($Y($C(JSXEOS, $EXPECT($L20, fail, 'JSXNestedChildren "}"'), JSXClosingElement, JSXClosingFragment)), function($skip, $loc, $0, $1) {
14550
15275
  return { children: [], jsxChildren: [] };
14551
15276
  });
14552
15277
  function JSXNestedChildren(state) {
@@ -14675,7 +15400,7 @@ ${input.slice(result.pos)}
14675
15400
  return result;
14676
15401
  }
14677
15402
  }
14678
- var JSXComment$0 = $TS($S($EXPECT($L162, fail, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L163, fail, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
15403
+ var JSXComment$0 = $TS($S($EXPECT($L163, fail, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L164, fail, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
14679
15404
  return ["{/*", $2, "*/}"];
14680
15405
  });
14681
15406
  function JSXComment(state) {
@@ -14700,7 +15425,7 @@ ${input.slice(result.pos)}
14700
15425
  return result;
14701
15426
  }
14702
15427
  }
14703
- var JSXCommentContent$0 = $TR($EXPECT($R51, fail, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15428
+ var JSXCommentContent$0 = $TR($EXPECT($R52, fail, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14704
15429
  return { $loc, token: $0.replace(/\*\//g, "* /") };
14705
15430
  });
14706
15431
  function JSXCommentContent(state) {
@@ -14725,7 +15450,7 @@ ${input.slice(result.pos)}
14725
15450
  return result;
14726
15451
  }
14727
15452
  }
14728
- var JSXText$0 = $TR($EXPECT($R52, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15453
+ var JSXText$0 = $TR($EXPECT($R53, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14729
15454
  return {
14730
15455
  type: "JSXText",
14731
15456
  token: $0,
@@ -14973,7 +15698,7 @@ ${input.slice(result.pos)}
14973
15698
  return result;
14974
15699
  }
14975
15700
  }
14976
- var TypeKeyword$0 = $S($EXPECT($L164, fail, 'TypeKeyword "type"'), NonIdContinue);
15701
+ var TypeKeyword$0 = $S($EXPECT($L165, fail, 'TypeKeyword "type"'), NonIdContinue);
14977
15702
  function TypeKeyword(state) {
14978
15703
  let eventData;
14979
15704
  if (state.events) {
@@ -14996,7 +15721,7 @@ ${input.slice(result.pos)}
14996
15721
  return result;
14997
15722
  }
14998
15723
  }
14999
- var Interface$0 = $S($EXPECT($L165, fail, 'Interface "interface"'), NonIdContinue);
15724
+ var Interface$0 = $S($EXPECT($L166, fail, 'Interface "interface"'), NonIdContinue);
15000
15725
  function Interface(state) {
15001
15726
  let eventData;
15002
15727
  if (state.events) {
@@ -15019,7 +15744,7 @@ ${input.slice(result.pos)}
15019
15744
  return result;
15020
15745
  }
15021
15746
  }
15022
- var Namespace$0 = $S($EXPECT($L166, fail, 'Namespace "namespace"'), NonIdContinue);
15747
+ var Namespace$0 = $S($EXPECT($L167, fail, 'Namespace "namespace"'), NonIdContinue);
15023
15748
  function Namespace(state) {
15024
15749
  let eventData;
15025
15750
  if (state.events) {
@@ -15068,9 +15793,9 @@ ${input.slice(result.pos)}
15068
15793
  }
15069
15794
  }
15070
15795
  var NestedInterfaceProperties$0 = $TS($S(PushIndent, $Q(NestedInterfaceProperty), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15071
- var props = $2;
15072
- if (props.length)
15073
- return props;
15796
+ var props2 = $2;
15797
+ if (props2.length)
15798
+ return props2;
15074
15799
  return $skip;
15075
15800
  });
15076
15801
  function NestedInterfaceProperties(state) {
@@ -15267,7 +15992,7 @@ ${input.slice(result.pos)}
15267
15992
  return result;
15268
15993
  }
15269
15994
  }
15270
- 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)));
15995
+ 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)));
15271
15996
  function TypeIndexSignature(state) {
15272
15997
  let eventData;
15273
15998
  if (state.events) {
@@ -15339,7 +16064,7 @@ ${input.slice(result.pos)}
15339
16064
  return result;
15340
16065
  }
15341
16066
  }
15342
- var ReturnTypeSuffix$0 = $TS($S(__, Colon, $E($S(__, $EXPECT($L167, fail, 'ReturnTypeSuffix "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2, $3, $4) {
16067
+ var ReturnTypeSuffix$0 = $TS($S(__, Colon, $E($S(__, $EXPECT($L168, fail, 'ReturnTypeSuffix "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2, $3, $4) {
15343
16068
  const children = [...$1, $2];
15344
16069
  if ($3)
15345
16070
  children.push($3);
@@ -15498,10 +16223,10 @@ ${input.slice(result.pos)}
15498
16223
  return result;
15499
16224
  }
15500
16225
  }
15501
- var TypeUnaryOp$0 = $S($EXPECT($L168, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
15502
- var TypeUnaryOp$1 = $S($EXPECT($L150, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
15503
- var TypeUnaryOp$2 = $S($EXPECT($L169, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
15504
- var TypeUnaryOp$3 = $S($EXPECT($L134, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
16226
+ var TypeUnaryOp$0 = $S($EXPECT($L169, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
16227
+ var TypeUnaryOp$1 = $S($EXPECT($L151, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
16228
+ var TypeUnaryOp$2 = $S($EXPECT($L170, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
16229
+ var TypeUnaryOp$3 = $S($EXPECT($L135, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
15505
16230
  function TypeUnaryOp(state) {
15506
16231
  let eventData;
15507
16232
  if (state.events) {
@@ -15577,8 +16302,8 @@ ${input.slice(result.pos)}
15577
16302
  return result;
15578
16303
  }
15579
16304
  }
15580
- var ImportType$0 = $S($EXPECT($L11, fail, 'ImportType "import"'), OpenParen, __, BasicStringLiteral, __, CloseParen, $E($S(Dot, IdentifierName)), $E(TypeArguments));
15581
- var ImportType$1 = $S($EXPECT($L11, fail, 'ImportType "import"'), InsertOpenParen, Trimmed_, BasicStringLiteral, InsertCloseParen);
16305
+ var ImportType$0 = $S($EXPECT($L12, fail, 'ImportType "import"'), OpenParen, __, StringLiteral, __, CloseParen, $E($S(Dot, IdentifierName)), $E(TypeArguments));
16306
+ var ImportType$1 = $S($EXPECT($L12, fail, 'ImportType "import"'), InsertOpenParen, Trimmed_, StringLiteral, InsertCloseParen);
15582
16307
  function ImportType(state) {
15583
16308
  let eventData;
15584
16309
  if (state.events) {
@@ -15726,12 +16451,12 @@ ${input.slice(result.pos)}
15726
16451
  return result;
15727
16452
  }
15728
16453
  }
15729
- var TypeLiteral$0 = Literal;
15730
- var TypeLiteral$1 = TemplateLiteral;
15731
- var TypeLiteral$2 = $TS($S($EXPECT($L154, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
16454
+ var TypeLiteral$0 = TemplateLiteral;
16455
+ var TypeLiteral$1 = Literal;
16456
+ var TypeLiteral$2 = $TS($S($EXPECT($L155, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
15732
16457
  return { $loc, token: "void" };
15733
16458
  });
15734
- var TypeLiteral$3 = $TV($EXPECT($L170, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
16459
+ var TypeLiteral$3 = $TV($EXPECT($L171, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
15735
16460
  return { $loc, token: "[]" };
15736
16461
  });
15737
16462
  function TypeLiteral(state) {
@@ -15806,7 +16531,7 @@ ${input.slice(result.pos)}
15806
16531
  var InlineInterfacePropertyDelimiter$1 = $T($S($Y($S($C(IndentedFurther, $E(_)), InlineBasicInterfaceProperty)), InsertComma), function(value) {
15807
16532
  return value[1];
15808
16533
  });
15809
- var InlineInterfacePropertyDelimiter$2 = $Y($S(__, $C($EXPECT($L31, fail, 'InlineInterfacePropertyDelimiter ":"'), $EXPECT($L17, fail, 'InlineInterfacePropertyDelimiter ")"'), $EXPECT($L30, fail, 'InlineInterfacePropertyDelimiter "]"'), $EXPECT($L19, fail, 'InlineInterfacePropertyDelimiter "}"'))));
16534
+ var InlineInterfacePropertyDelimiter$2 = $Y($S(__, $C($EXPECT($L31, fail, 'InlineInterfacePropertyDelimiter ":"'), $EXPECT($L18, fail, 'InlineInterfacePropertyDelimiter ")"'), $EXPECT($L30, fail, 'InlineInterfacePropertyDelimiter "]"'), $EXPECT($L20, fail, 'InlineInterfacePropertyDelimiter "}"'))));
15810
16535
  var InlineInterfacePropertyDelimiter$3 = $Y(EOS);
15811
16536
  function InlineInterfacePropertyDelimiter(state) {
15812
16537
  let eventData;
@@ -15858,7 +16583,7 @@ ${input.slice(result.pos)}
15858
16583
  return result;
15859
16584
  }
15860
16585
  }
15861
- var FunctionType$0 = $TS($S(Parameters, __, $EXPECT($L5, fail, 'FunctionType "=>"'), $E(Type)), function($skip, $loc, $0, $1, $2, $3, $4) {
16586
+ var FunctionType$0 = $TS($S(Parameters, __, $EXPECT($L6, fail, 'FunctionType "=>"'), $E(Type)), function($skip, $loc, $0, $1, $2, $3, $4) {
15862
16587
  var type = $4;
15863
16588
  if (type) {
15864
16589
  return $0;
@@ -16110,7 +16835,7 @@ ${input.slice(result.pos)}
16110
16835
  return result;
16111
16836
  }
16112
16837
  }
16113
- var Shebang$0 = $S($R$0($EXPECT($R55, fail, "Shebang /#![^\\r\\n]*/")), EOL);
16838
+ var Shebang$0 = $S($R$0($EXPECT($R56, fail, "Shebang /#![^\\r\\n]*/")), EOL);
16114
16839
  function Shebang(state) {
16115
16840
  let eventData;
16116
16841
  if (state.events) {
@@ -16133,11 +16858,11 @@ ${input.slice(result.pos)}
16133
16858
  return result;
16134
16859
  }
16135
16860
  }
16136
- var CivetPrologue$0 = $T($S($EXPECT($R56, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(SimpleStatementDelimiter), $E(EOS)), function(value) {
16861
+ var CivetPrologue$0 = $T($S($EXPECT($R57, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(SimpleStatementDelimiter), $E(EOS)), function(value) {
16137
16862
  var content = value[2];
16138
16863
  return content;
16139
16864
  });
16140
- var CivetPrologue$1 = $T($S($EXPECT($R56, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(SimpleStatementDelimiter), $E(EOS)), function(value) {
16865
+ var CivetPrologue$1 = $T($S($EXPECT($R57, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(SimpleStatementDelimiter), $E(EOS)), function(value) {
16141
16866
  var content = value[2];
16142
16867
  return content;
16143
16868
  });
@@ -16163,7 +16888,7 @@ ${input.slice(result.pos)}
16163
16888
  return result;
16164
16889
  }
16165
16890
  }
16166
- 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) {
16891
+ 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) {
16167
16892
  var options = $3;
16168
16893
  return {
16169
16894
  type: "CivetPrologue",
@@ -16193,7 +16918,7 @@ ${input.slice(result.pos)}
16193
16918
  return result;
16194
16919
  }
16195
16920
  }
16196
- 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) {
16921
+ 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) {
16197
16922
  const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
16198
16923
  if (l)
16199
16924
  return l.toUpperCase();
@@ -16229,7 +16954,7 @@ ${input.slice(result.pos)}
16229
16954
  return result;
16230
16955
  }
16231
16956
  }
16232
- var UnknownPrologue$0 = $S($R$0($EXPECT($R56, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
16957
+ var UnknownPrologue$0 = $S($R$0($EXPECT($R57, fail, "UnknownPrologue /[\\t ]*/")), StringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
16233
16958
  function UnknownPrologue(state) {
16234
16959
  let eventData;
16235
16960
  if (state.events) {
@@ -16299,7 +17024,7 @@ ${input.slice(result.pos)}
16299
17024
  return result;
16300
17025
  }
16301
17026
  }
16302
- 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) {
17027
+ 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) {
16303
17028
  return { $loc, token: $0 };
16304
17029
  });
16305
17030
  function EOL(state) {
@@ -16324,7 +17049,7 @@ ${input.slice(result.pos)}
16324
17049
  return result;
16325
17050
  }
16326
17051
  }
16327
- var Debugger$0 = $TV($EXPECT($L16, fail, 'Debugger ""'), function($skip, $loc, $0, $1) {
17052
+ var Debugger$0 = $TV($EXPECT($L17, fail, 'Debugger ""'), function($skip, $loc, $0, $1) {
16328
17053
  debugger;
16329
17054
  });
16330
17055
  function Debugger(state) {
@@ -16349,7 +17074,7 @@ ${input.slice(result.pos)}
16349
17074
  return result;
16350
17075
  }
16351
17076
  }
16352
- var InsertSemicolon$0 = $TV($EXPECT($L16, fail, 'InsertSemicolon ""'), function($skip, $loc, $0, $1) {
17077
+ var InsertSemicolon$0 = $TV($EXPECT($L17, fail, 'InsertSemicolon ""'), function($skip, $loc, $0, $1) {
16353
17078
  return { $loc, token: ";" };
16354
17079
  });
16355
17080
  function InsertSemicolon(state) {
@@ -16374,7 +17099,7 @@ ${input.slice(result.pos)}
16374
17099
  return result;
16375
17100
  }
16376
17101
  }
16377
- var InsertOpenParen$0 = $TV($EXPECT($L16, fail, 'InsertOpenParen ""'), function($skip, $loc, $0, $1) {
17102
+ var InsertOpenParen$0 = $TV($EXPECT($L17, fail, 'InsertOpenParen ""'), function($skip, $loc, $0, $1) {
16378
17103
  return { $loc, token: "(" };
16379
17104
  });
16380
17105
  function InsertOpenParen(state) {
@@ -16399,7 +17124,7 @@ ${input.slice(result.pos)}
16399
17124
  return result;
16400
17125
  }
16401
17126
  }
16402
- var InsertCloseParen$0 = $TV($EXPECT($L16, fail, 'InsertCloseParen ""'), function($skip, $loc, $0, $1) {
17127
+ var InsertCloseParen$0 = $TV($EXPECT($L17, fail, 'InsertCloseParen ""'), function($skip, $loc, $0, $1) {
16403
17128
  return { $loc, token: ")" };
16404
17129
  });
16405
17130
  function InsertCloseParen(state) {
@@ -16424,7 +17149,7 @@ ${input.slice(result.pos)}
16424
17149
  return result;
16425
17150
  }
16426
17151
  }
16427
- var InsertOpenBrace$0 = $TV($EXPECT($L16, fail, 'InsertOpenBrace ""'), function($skip, $loc, $0, $1) {
17152
+ var InsertOpenBrace$0 = $TV($EXPECT($L17, fail, 'InsertOpenBrace ""'), function($skip, $loc, $0, $1) {
16428
17153
  return [{ $loc, token: " " }, { $loc, token: "{" }];
16429
17154
  });
16430
17155
  function InsertOpenBrace(state) {
@@ -16449,7 +17174,7 @@ ${input.slice(result.pos)}
16449
17174
  return result;
16450
17175
  }
16451
17176
  }
16452
- var InsertInlineOpenBrace$0 = $TV($EXPECT($L16, fail, 'InsertInlineOpenBrace ""'), function($skip, $loc, $0, $1) {
17177
+ var InsertInlineOpenBrace$0 = $TV($EXPECT($L17, fail, 'InsertInlineOpenBrace ""'), function($skip, $loc, $0, $1) {
16453
17178
  return { $loc, token: "{" };
16454
17179
  });
16455
17180
  function InsertInlineOpenBrace(state) {
@@ -16474,7 +17199,7 @@ ${input.slice(result.pos)}
16474
17199
  return result;
16475
17200
  }
16476
17201
  }
16477
- var InsertCloseBrace$0 = $TV($EXPECT($L16, fail, 'InsertCloseBrace ""'), function($skip, $loc, $0, $1) {
17202
+ var InsertCloseBrace$0 = $TV($EXPECT($L17, fail, 'InsertCloseBrace ""'), function($skip, $loc, $0, $1) {
16478
17203
  return { $loc, token: "}" };
16479
17204
  });
16480
17205
  function InsertCloseBrace(state) {
@@ -16499,7 +17224,57 @@ ${input.slice(result.pos)}
16499
17224
  return result;
16500
17225
  }
16501
17226
  }
16502
- var InsertComma$0 = $TV($EXPECT($L16, fail, 'InsertComma ""'), function($skip, $loc, $0, $1) {
17227
+ var InsertOpenBracket$0 = $TV($EXPECT($L17, fail, 'InsertOpenBracket ""'), function($skip, $loc, $0, $1) {
17228
+ return { $loc, token: "[" };
17229
+ });
17230
+ function InsertOpenBracket(state) {
17231
+ let eventData;
17232
+ if (state.events) {
17233
+ const result = state.events.enter?.("InsertOpenBracket", state);
17234
+ if (result) {
17235
+ if (result.cache)
17236
+ return result.cache;
17237
+ eventData = result.data;
17238
+ }
17239
+ }
17240
+ if (state.tokenize) {
17241
+ const result = $TOKEN("InsertOpenBracket", state, InsertOpenBracket$0(state));
17242
+ if (state.events)
17243
+ state.events.exit?.("InsertOpenBracket", state, result, eventData);
17244
+ return result;
17245
+ } else {
17246
+ const result = InsertOpenBracket$0(state);
17247
+ if (state.events)
17248
+ state.events.exit?.("InsertOpenBracket", state, result, eventData);
17249
+ return result;
17250
+ }
17251
+ }
17252
+ var InsertCloseBracket$0 = $TV($EXPECT($L17, fail, 'InsertCloseBracket ""'), function($skip, $loc, $0, $1) {
17253
+ return { $loc, token: "]" };
17254
+ });
17255
+ function InsertCloseBracket(state) {
17256
+ let eventData;
17257
+ if (state.events) {
17258
+ const result = state.events.enter?.("InsertCloseBracket", state);
17259
+ if (result) {
17260
+ if (result.cache)
17261
+ return result.cache;
17262
+ eventData = result.data;
17263
+ }
17264
+ }
17265
+ if (state.tokenize) {
17266
+ const result = $TOKEN("InsertCloseBracket", state, InsertCloseBracket$0(state));
17267
+ if (state.events)
17268
+ state.events.exit?.("InsertCloseBracket", state, result, eventData);
17269
+ return result;
17270
+ } else {
17271
+ const result = InsertCloseBracket$0(state);
17272
+ if (state.events)
17273
+ state.events.exit?.("InsertCloseBracket", state, result, eventData);
17274
+ return result;
17275
+ }
17276
+ }
17277
+ var InsertComma$0 = $TV($EXPECT($L17, fail, 'InsertComma ""'), function($skip, $loc, $0, $1) {
16503
17278
  return { $loc, token: "," };
16504
17279
  });
16505
17280
  function InsertComma(state) {
@@ -16524,7 +17299,7 @@ ${input.slice(result.pos)}
16524
17299
  return result;
16525
17300
  }
16526
17301
  }
16527
- var InsertConst$0 = $TV($EXPECT($L16, fail, 'InsertConst ""'), function($skip, $loc, $0, $1) {
17302
+ var InsertConst$0 = $TV($EXPECT($L17, fail, 'InsertConst ""'), function($skip, $loc, $0, $1) {
16528
17303
  return { $loc, token: "const " };
16529
17304
  });
16530
17305
  function InsertConst(state) {
@@ -16549,7 +17324,7 @@ ${input.slice(result.pos)}
16549
17324
  return result;
16550
17325
  }
16551
17326
  }
16552
- var InsertLet$0 = $TV($EXPECT($L16, fail, 'InsertLet ""'), function($skip, $loc, $0, $1) {
17327
+ var InsertLet$0 = $TV($EXPECT($L17, fail, 'InsertLet ""'), function($skip, $loc, $0, $1) {
16553
17328
  return { $loc, token: "let " };
16554
17329
  });
16555
17330
  function InsertLet(state) {
@@ -16574,7 +17349,7 @@ ${input.slice(result.pos)}
16574
17349
  return result;
16575
17350
  }
16576
17351
  }
16577
- var InsertReadonly$0 = $TV($EXPECT($L16, fail, 'InsertReadonly ""'), function($skip, $loc, $0, $1) {
17352
+ var InsertReadonly$0 = $TV($EXPECT($L17, fail, 'InsertReadonly ""'), function($skip, $loc, $0, $1) {
16578
17353
  return { ts: true, children: [{ $loc, token: "readonly " }] };
16579
17354
  });
16580
17355
  function InsertReadonly(state) {
@@ -16599,7 +17374,7 @@ ${input.slice(result.pos)}
16599
17374
  return result;
16600
17375
  }
16601
17376
  }
16602
- var InsertNewline$0 = $TV($EXPECT($L16, fail, 'InsertNewline ""'), function($skip, $loc, $0, $1) {
17377
+ var InsertNewline$0 = $TV($EXPECT($L17, fail, 'InsertNewline ""'), function($skip, $loc, $0, $1) {
16603
17378
  return "\n";
16604
17379
  });
16605
17380
  function InsertNewline(state) {
@@ -16624,7 +17399,7 @@ ${input.slice(result.pos)}
16624
17399
  return result;
16625
17400
  }
16626
17401
  }
16627
- var InsertIndent$0 = $TV($EXPECT($L16, fail, 'InsertIndent ""'), function($skip, $loc, $0, $1) {
17402
+ var InsertIndent$0 = $TV($EXPECT($L17, fail, 'InsertIndent ""'), function($skip, $loc, $0, $1) {
16628
17403
  return module.currentIndent.token;
16629
17404
  });
16630
17405
  function InsertIndent(state) {
@@ -16649,7 +17424,7 @@ ${input.slice(result.pos)}
16649
17424
  return result;
16650
17425
  }
16651
17426
  }
16652
- var InsertSpace$0 = $TV($EXPECT($L16, fail, 'InsertSpace ""'), function($skip, $loc, $0, $1) {
17427
+ var InsertSpace$0 = $TV($EXPECT($L17, fail, 'InsertSpace ""'), function($skip, $loc, $0, $1) {
16653
17428
  return { $loc, token: " " };
16654
17429
  });
16655
17430
  function InsertSpace(state) {
@@ -16674,7 +17449,7 @@ ${input.slice(result.pos)}
16674
17449
  return result;
16675
17450
  }
16676
17451
  }
16677
- var InsertDot$0 = $TV($EXPECT($L16, fail, 'InsertDot ""'), function($skip, $loc, $0, $1) {
17452
+ var InsertDot$0 = $TV($EXPECT($L17, fail, 'InsertDot ""'), function($skip, $loc, $0, $1) {
16678
17453
  return { $loc, token: "." };
16679
17454
  });
16680
17455
  function InsertDot(state) {
@@ -16699,7 +17474,7 @@ ${input.slice(result.pos)}
16699
17474
  return result;
16700
17475
  }
16701
17476
  }
16702
- var InsertBreak$0 = $TV($EXPECT($L16, fail, 'InsertBreak ""'), function($skip, $loc, $0, $1) {
17477
+ var InsertBreak$0 = $TV($EXPECT($L17, fail, 'InsertBreak ""'), function($skip, $loc, $0, $1) {
16703
17478
  return { $loc, token: ";break;" };
16704
17479
  });
16705
17480
  function InsertBreak(state) {
@@ -16724,7 +17499,7 @@ ${input.slice(result.pos)}
16724
17499
  return result;
16725
17500
  }
16726
17501
  }
16727
- var InsertVar$0 = $TV($EXPECT($L16, fail, 'InsertVar ""'), function($skip, $loc, $0, $1) {
17502
+ var InsertVar$0 = $TV($EXPECT($L17, fail, 'InsertVar ""'), function($skip, $loc, $0, $1) {
16728
17503
  return { $loc, token: "var " };
16729
17504
  });
16730
17505
  function InsertVar(state) {
@@ -16749,7 +17524,7 @@ ${input.slice(result.pos)}
16749
17524
  return result;
16750
17525
  }
16751
17526
  }
16752
- var CoffeeBinaryExistentialEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeBinaryExistentialEnabled ""'), function($skip, $loc, $0, $1) {
17527
+ var CoffeeBinaryExistentialEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeBinaryExistentialEnabled ""'), function($skip, $loc, $0, $1) {
16753
17528
  if (module.config.coffeeBinaryExistential)
16754
17529
  return;
16755
17530
  return $skip;
@@ -16776,7 +17551,7 @@ ${input.slice(result.pos)}
16776
17551
  return result;
16777
17552
  }
16778
17553
  }
16779
- var CoffeeBooleansEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeBooleansEnabled ""'), function($skip, $loc, $0, $1) {
17554
+ var CoffeeBooleansEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeBooleansEnabled ""'), function($skip, $loc, $0, $1) {
16780
17555
  if (module.config.coffeeBooleans)
16781
17556
  return;
16782
17557
  return $skip;
@@ -16803,7 +17578,7 @@ ${input.slice(result.pos)}
16803
17578
  return result;
16804
17579
  }
16805
17580
  }
16806
- var CoffeeClassesEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeClassesEnabled ""'), function($skip, $loc, $0, $1) {
17581
+ var CoffeeClassesEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeClassesEnabled ""'), function($skip, $loc, $0, $1) {
16807
17582
  if (module.config.coffeeClasses)
16808
17583
  return;
16809
17584
  return $skip;
@@ -16830,7 +17605,7 @@ ${input.slice(result.pos)}
16830
17605
  return result;
16831
17606
  }
16832
17607
  }
16833
- var CoffeeCommentEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeCommentEnabled ""'), function($skip, $loc, $0, $1) {
17608
+ var CoffeeCommentEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeCommentEnabled ""'), function($skip, $loc, $0, $1) {
16834
17609
  if (module.config.coffeeComment)
16835
17610
  return;
16836
17611
  return $skip;
@@ -16857,7 +17632,7 @@ ${input.slice(result.pos)}
16857
17632
  return result;
16858
17633
  }
16859
17634
  }
16860
- var CoffeeDoEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeDoEnabled ""'), function($skip, $loc, $0, $1) {
17635
+ var CoffeeDoEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeDoEnabled ""'), function($skip, $loc, $0, $1) {
16861
17636
  if (module.config.coffeeDo)
16862
17637
  return;
16863
17638
  return $skip;
@@ -16884,7 +17659,7 @@ ${input.slice(result.pos)}
16884
17659
  return result;
16885
17660
  }
16886
17661
  }
16887
- var CoffeeForLoopsEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeForLoopsEnabled ""'), function($skip, $loc, $0, $1) {
17662
+ var CoffeeForLoopsEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeForLoopsEnabled ""'), function($skip, $loc, $0, $1) {
16888
17663
  if (module.config.coffeeForLoops)
16889
17664
  return;
16890
17665
  return $skip;
@@ -16911,7 +17686,7 @@ ${input.slice(result.pos)}
16911
17686
  return result;
16912
17687
  }
16913
17688
  }
16914
- var CoffeeInterpolationEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeInterpolationEnabled ""'), function($skip, $loc, $0, $1) {
17689
+ var CoffeeInterpolationEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeInterpolationEnabled ""'), function($skip, $loc, $0, $1) {
16915
17690
  if (module.config.coffeeInterpolation)
16916
17691
  return;
16917
17692
  return $skip;
@@ -16938,7 +17713,7 @@ ${input.slice(result.pos)}
16938
17713
  return result;
16939
17714
  }
16940
17715
  }
16941
- var CoffeeIsntEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeIsntEnabled ""'), function($skip, $loc, $0, $1) {
17716
+ var CoffeeIsntEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeIsntEnabled ""'), function($skip, $loc, $0, $1) {
16942
17717
  if (module.config.coffeeIsnt)
16943
17718
  return;
16944
17719
  return $skip;
@@ -16965,7 +17740,7 @@ ${input.slice(result.pos)}
16965
17740
  return result;
16966
17741
  }
16967
17742
  }
16968
- var CoffeeJSXEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeJSXEnabled ""'), function($skip, $loc, $0, $1) {
17743
+ var CoffeeJSXEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeJSXEnabled ""'), function($skip, $loc, $0, $1) {
16969
17744
  if (module.config.coffeeJSX)
16970
17745
  return;
16971
17746
  return $skip;
@@ -16992,7 +17767,7 @@ ${input.slice(result.pos)}
16992
17767
  return result;
16993
17768
  }
16994
17769
  }
16995
- var CoffeeLineContinuationEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeLineContinuationEnabled ""'), function($skip, $loc, $0, $1) {
17770
+ var CoffeeLineContinuationEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeLineContinuationEnabled ""'), function($skip, $loc, $0, $1) {
16996
17771
  if (module.config.coffeeLineContinuation)
16997
17772
  return;
16998
17773
  return $skip;
@@ -17019,7 +17794,7 @@ ${input.slice(result.pos)}
17019
17794
  return result;
17020
17795
  }
17021
17796
  }
17022
- var CoffeeNotEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeNotEnabled ""'), function($skip, $loc, $0, $1) {
17797
+ var CoffeeNotEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeNotEnabled ""'), function($skip, $loc, $0, $1) {
17023
17798
  if (module.config.coffeeNot)
17024
17799
  return;
17025
17800
  return $skip;
@@ -17046,7 +17821,7 @@ ${input.slice(result.pos)}
17046
17821
  return result;
17047
17822
  }
17048
17823
  }
17049
- var CoffeeOfEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeeOfEnabled ""'), function($skip, $loc, $0, $1) {
17824
+ var CoffeeOfEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeeOfEnabled ""'), function($skip, $loc, $0, $1) {
17050
17825
  if (module.config.coffeeOf)
17051
17826
  return;
17052
17827
  return $skip;
@@ -17073,7 +17848,7 @@ ${input.slice(result.pos)}
17073
17848
  return result;
17074
17849
  }
17075
17850
  }
17076
- var CoffeePrototypeEnabled$0 = $TV($EXPECT($L16, fail, 'CoffeePrototypeEnabled ""'), function($skip, $loc, $0, $1) {
17851
+ var CoffeePrototypeEnabled$0 = $TV($EXPECT($L17, fail, 'CoffeePrototypeEnabled ""'), function($skip, $loc, $0, $1) {
17077
17852
  if (module.config.coffeePrototype)
17078
17853
  return;
17079
17854
  return $skip;
@@ -17100,7 +17875,7 @@ ${input.slice(result.pos)}
17100
17875
  return result;
17101
17876
  }
17102
17877
  }
17103
- var ObjectIsEnabled$0 = $TV($EXPECT($L16, fail, 'ObjectIsEnabled ""'), function($skip, $loc, $0, $1) {
17878
+ var ObjectIsEnabled$0 = $TV($EXPECT($L17, fail, 'ObjectIsEnabled ""'), function($skip, $loc, $0, $1) {
17104
17879
  if (module.config.objectIs)
17105
17880
  return;
17106
17881
  return $skip;
@@ -17127,13 +17902,14 @@ ${input.slice(result.pos)}
17127
17902
  return result;
17128
17903
  }
17129
17904
  }
17130
- var Reset$0 = $TV($EXPECT($L16, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
17905
+ var Reset$0 = $TV($EXPECT($L17, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
17131
17906
  module.indentLevels = [{
17132
17907
  level: 0,
17133
17908
  token: ""
17134
17909
  }];
17135
17910
  module.suppressTrailingMemberProperty = [false];
17136
17911
  module.JSXTagStack = [];
17912
+ module.operators = /* @__PURE__ */ new Set();
17137
17913
  if (!module._init) {
17138
17914
  module._init = true;
17139
17915
  Object.defineProperties(module, {
@@ -17397,7 +18173,7 @@ ${input.slice(result.pos)}
17397
18173
  return result;
17398
18174
  }
17399
18175
  }
17400
- var Init$0 = $TS($S($E(Shebang), $Q(DirectivePrologue), $EXPECT($L16, fail, 'Init ""')), function($skip, $loc, $0, $1, $2, $3) {
18176
+ var Init$0 = $TS($S($E(Shebang), $Q(DirectivePrologue), $EXPECT($L17, fail, 'Init ""')), function($skip, $loc, $0, $1, $2, $3) {
17401
18177
  var directives = $2;
17402
18178
  directives.forEach((directive) => {
17403
18179
  if (directive.type === "CivetPrologue") {
@@ -17607,11 +18383,11 @@ ${input.slice(result.pos)}
17607
18383
  return;
17608
18384
  case "WhenClause":
17609
18385
  node.children.splice(node.children.indexOf(node.break), 1);
17610
- if (node.block.length === 0) {
17611
- node.block.push(wrapWithReturn());
17612
- return;
18386
+ if (node.block.expressions.length) {
18387
+ insertReturn(node.block);
18388
+ } else {
18389
+ node.block.expressions.push(wrapWithReturn());
17613
18390
  }
17614
- insertReturn(node.block);
17615
18391
  return;
17616
18392
  case "DefaultClause":
17617
18393
  insertReturn(node.block);
@@ -17662,18 +18438,19 @@ ${input.slice(result.pos)}
17662
18438
  const returnStatement = wrapWithReturn(node[1]);
17663
18439
  node.splice(1, 1, returnStatement);
17664
18440
  }
17665
- module.makeLeftHandSideExpression = function(exp) {
17666
- switch (exp.type) {
18441
+ module.makeLeftHandSideExpression = function(expression) {
18442
+ switch (expression.type) {
17667
18443
  case "Identifier":
17668
18444
  case "Literal":
17669
18445
  case "CallExpression":
17670
18446
  case "MemberExpression":
17671
18447
  case "ParenthesizedExpression":
17672
- return exp;
18448
+ return expression;
17673
18449
  default:
17674
18450
  return {
17675
18451
  type: "ParenthesizedExpression",
17676
- children: ["(", exp, ")"]
18452
+ children: ["(", expression, ")"],
18453
+ expression
17677
18454
  };
17678
18455
  }
17679
18456
  };
@@ -17880,7 +18657,10 @@ ${input.slice(result.pos)}
17880
18657
  i++;
17881
18658
  }
17882
18659
  results.push(e);
17883
- return results;
18660
+ return {
18661
+ type: "TemplateLiteral",
18662
+ children: results
18663
+ };
17884
18664
  };
17885
18665
  module.dedentBlockString = function({ $loc: $loc2, token: str }, spacing, trim = true) {
17886
18666
  if (spacing == null)
@@ -17900,11 +18680,67 @@ ${input.slice(result.pos)}
17900
18680
  token: str
17901
18681
  };
17902
18682
  };
17903
- module.reorderBindingRestProperty = function(props) {
17904
- const names = props.flatMap((p) => p.names);
18683
+ module.adjustBindingElements = function(elements) {
18684
+ const names = elements.flatMap((p) => p.names || []), { length } = elements;
18685
+ let blockPrefix, restIndex = -1, restCount = 0;
18686
+ elements.forEach(({ rest }, i) => {
18687
+ if (rest) {
18688
+ if (restIndex < 0)
18689
+ restIndex = i;
18690
+ restCount++;
18691
+ }
18692
+ });
18693
+ if (restCount === 0) {
18694
+ return {
18695
+ children: elements,
18696
+ names,
18697
+ blockPrefix,
18698
+ length
18699
+ };
18700
+ } else if (restCount === 1) {
18701
+ const rest = elements[restIndex];
18702
+ const after = elements.slice(restIndex + 1);
18703
+ let restIdentifier;
18704
+ if (rest.ref) {
18705
+ restIdentifier = rest.ref;
18706
+ } else {
18707
+ restIdentifier = rest.names[0];
18708
+ names.push(...rest.names);
18709
+ }
18710
+ if (after.length) {
18711
+ const spliceRef = module.getRef("splice");
18712
+ blockPrefix = {
18713
+ type: "PostRestBindingElements",
18714
+ children: ["[", module.insertTrimmingSpace(after, ""), "] = ", spliceRef, ".call(", restIdentifier, ", -", after.length.toString(), ")"],
18715
+ names: after.flatMap((p) => p.names)
18716
+ };
18717
+ }
18718
+ return {
18719
+ names,
18720
+ children: [...elements.slice(0, restIndex), {
18721
+ ...rest,
18722
+ children: rest.children.slice(0, -1)
18723
+ }],
18724
+ blockPrefix,
18725
+ length
18726
+ };
18727
+ }
18728
+ const err = {
18729
+ type: "Error",
18730
+ children: ["Multiple rest elements in array pattern"]
18731
+ };
18732
+ return {
18733
+ names,
18734
+ children: [...elements, err],
18735
+ blockPrefix,
18736
+ length
18737
+ };
18738
+ };
18739
+ module.reorderBindingRestProperty = function(props2) {
18740
+ const names = props2.flatMap((p) => p.names);
17905
18741
  let restIndex = -1;
17906
18742
  let restCount = 0;
17907
- props.forEach(({ type }, i) => {
18743
+ props2.forEach(({ type }, i) => {
17908
18744
  if (type === "BindingRestProperty") {
17909
18745
  if (restIndex < 0)
17910
18746
  restIndex = i;
@@ -17912,21 +18748,20 @@ ${input.slice(result.pos)}
17912
18748
  }
17913
18749
  });
17914
18750
  if (restCount === 0) {
17915
- const children = [...props];
17916
18751
  return {
17917
- children,
18752
+ children: props2,
17918
18753
  names
17919
18754
  };
17920
18755
  } else if (restCount === 1) {
17921
- let after = props.slice(restIndex + 1);
17922
- let rest = props[restIndex];
17923
- props = props.slice(0, restIndex);
18756
+ let after = props2.slice(restIndex + 1);
18757
+ let rest = props2[restIndex];
18758
+ props2 = props2.slice(0, restIndex);
17924
18759
  if (after.length) {
17925
18760
  const [restDelim] = rest.children.slice(-1), lastAfterProp = after[after.length - 1], lastAfterChildren = lastAfterProp.children, [lastDelim] = lastAfterChildren.slice(-1);
17926
18761
  rest = { ...rest, children: [...rest.children.slice(0, -1), lastDelim] };
17927
18762
  after = [...after.slice(0, -1), { ...lastAfterProp, children: [...lastAfterChildren.slice(0, -1), restDelim] }];
17928
18763
  }
17929
- const children = [...props, ...after, rest];
18764
+ const children = [...props2, ...after, rest];
17930
18765
  return {
17931
18766
  children,
17932
18767
  names
@@ -18180,11 +19015,260 @@ ${input.slice(result.pos)}
18180
19015
  block
18181
19016
  };
18182
19017
  };
19018
+ function getPatternConditions(pattern, ref, conditions) {
19019
+ switch (pattern.type) {
19020
+ case "ArrayMatchingPattern": {
19021
+ const { elements, length } = pattern, hasRest = elements.some((e) => e.rest), comparator = hasRest ? " >= " : " === ", l = [comparator, (length - hasRest).toString()];
19022
+ conditions.push(
19023
+ ["Array.isArray(", ref, ")"],
19024
+ [ref, ".length", l]
19025
+ );
19026
+ elements.forEach(({ children: [, e] }, i) => {
19027
+ const subRef = [ref, "[", i.toString(), "]"];
19028
+ switch (e.type) {
19029
+ case "ArrayMatchingPattern":
19030
+ case "ObjectMatchingPattern":
19031
+ case "RegularExpressionLiteral":
19032
+ getPatternConditions(e, subRef, conditions);
19033
+ break;
19034
+ case "BindingMatchElement":
19035
+ getPatternConditions(e.match, subRef, conditions);
19036
+ break;
19037
+ }
19038
+ });
19039
+ const postRest = pattern.children.find((c) => c?.blockPrefix);
19040
+ if (postRest) {
19041
+ const postElements = postRest.blockPrefix.children[1], { length: postLength } = postElements;
19042
+ postElements.forEach(({ children: [, e] }, i) => {
19043
+ const subRef = [ref, "[", ref, ".length - ", (postLength + i).toString(), "]"];
19044
+ switch (e.type) {
19045
+ case "ArrayMatchingPattern":
19046
+ case "ObjectMatchingPattern":
19047
+ case "RegularExpressionLiteral":
19048
+ case "Literal":
19049
+ getPatternConditions(e, subRef, conditions);
19050
+ break;
19051
+ case "BindingMatchElement":
19052
+ getPatternConditions(e.match, subRef, conditions);
19053
+ break;
19054
+ }
19055
+ });
19056
+ }
19057
+ break;
19058
+ }
19059
+ case "ObjectMatchingPattern": {
19060
+ conditions.push(
19061
+ ["typeof ", ref, " === 'object'"],
19062
+ [ref, " != null"]
19063
+ );
19064
+ pattern.properties.forEach((p) => {
19065
+ switch (p.type) {
19066
+ case "BindingMatchProperty": {
19067
+ const { name, match } = p;
19068
+ let subRef;
19069
+ switch (name.type) {
19070
+ case "ComputedPropertyName":
19071
+ conditions.push([name.expression, " in ", ref]);
19072
+ subRef = [ref, name];
19073
+ break;
19074
+ case "Literal":
19075
+ case "StringLiteral":
19076
+ case void 0:
19077
+ conditions.push([name, " in ", ref]);
19078
+ subRef = [ref, "[", name, "]"];
19079
+ break;
19080
+ default:
19081
+ conditions.push(["'", name, "' in ", ref]);
19082
+ subRef = [ref, ".", name];
19083
+ }
19084
+ getPatternConditions(p.match, subRef, conditions);
19085
+ break;
19086
+ }
19087
+ case "BindingProperty":
19088
+ conditions.push(["'", p.identifier, "' in ", ref]);
19089
+ break;
19090
+ }
19091
+ });
19092
+ break;
19093
+ }
19094
+ case "RegularExpressionLiteral": {
19095
+ conditions.push(
19096
+ ["typeof ", ref, " === 'string'"],
19097
+ [pattern, ".test(", ref, ")"]
19098
+ );
19099
+ break;
19100
+ }
19101
+ default: {
19102
+ conditions.push([
19103
+ ref,
19104
+ " === ",
19105
+ pattern
19106
+ ]);
19107
+ }
19108
+ }
19109
+ }
19110
+ function elideMatchersFromArrayBindings(elements) {
19111
+ return elements.map(({ children: [ws, e, sep] }) => {
19112
+ switch (e.type) {
19113
+ case "Literal":
19114
+ case "RegularExpressionLiteral":
19115
+ case "StringLiteral":
19116
+ return sep;
19117
+ default:
19118
+ return [ws, nonMatcherBindings(e), sep];
19119
+ }
19120
+ });
19121
+ }
19122
+ function elideMatchersFromPropertyBindings(properties) {
19123
+ return properties.map((p) => {
19124
+ switch (p.type) {
19125
+ case "BindingMatchProperty": {
19126
+ const { children, name, match } = p;
19127
+ const [ws, , , , , , sep] = children;
19128
+ switch (match.type) {
19129
+ case "ArrayMatchingPattern":
19130
+ case "ObjectMatchingPattern":
19131
+ return {
19132
+ ...p,
19133
+ children: [ws, name, ": ", nonMatcherBindings(match)]
19134
+ };
19135
+ case "Identifier":
19136
+ switch (name.type) {
19137
+ case "ComputedPropertyName":
19138
+ case "Literal":
19139
+ case void 0:
19140
+ return {
19141
+ ...p,
19142
+ children: [ws, name, ": ", match, sep]
19143
+ };
19144
+ }
19145
+ case "Literal":
19146
+ case "RegularExpressionLiteral":
19147
+ case "StringLiteral":
19148
+ default:
19149
+ return {
19150
+ ...p,
19151
+ children: [ws, name, sep]
19152
+ };
19153
+ }
19154
+ }
19155
+ case "BindingProperty":
19156
+ case "BindingRestProperty":
19157
+ default:
19158
+ return p;
19159
+ }
19160
+ });
19161
+ }
19162
+ function nonMatcherBindings(pattern) {
19163
+ switch (pattern.type) {
19164
+ case "ArrayMatchingPattern":
19165
+ return ["[", elideMatchersFromArrayBindings(pattern.elements), "]"];
19166
+ case "PostRestBindingElements": {
19167
+ const els = elideMatchersFromArrayBindings(pattern.children[1]);
19168
+ return {
19169
+ ...pattern,
19170
+ children: [
19171
+ pattern.children[0],
19172
+ els,
19173
+ ...pattern.children.slice(2)
19174
+ ]
19175
+ };
19176
+ }
19177
+ case "ObjectMatchingPattern":
19178
+ return ["{", elideMatchersFromPropertyBindings(pattern.properties), "}"];
19179
+ default:
19180
+ return pattern;
19181
+ }
19182
+ }
19183
+ function processPatternMatching(statements) {
19184
+ gatherRecursiveAll(statements, (n) => n.type === "SwitchStatement").forEach((s) => {
19185
+ const { caseBlock } = s;
19186
+ const { clauses } = caseBlock;
19187
+ let errors = false;
19188
+ let isPattern = false;
19189
+ if (clauses.some((c) => c.type === "PatternClause")) {
19190
+ isPattern = true;
19191
+ clauses.forEach((c) => {
19192
+ if (!(c.type === "PatternClause" || c.type === "DefaultClause")) {
19193
+ errors = true;
19194
+ c.children.push({
19195
+ type: "Error",
19196
+ message: "Can't mix pattern matching and non-pattern matching clauses"
19197
+ });
19198
+ }
19199
+ });
19200
+ }
19201
+ if (errors || !isPattern)
19202
+ return;
19203
+ let { expression } = s;
19204
+ if (expression.type === "ParenthesizedExpression") {
19205
+ expression = expression.expression;
19206
+ }
19207
+ let ref;
19208
+ switch (expression.type) {
19209
+ case "Identifier":
19210
+ case "Literal":
19211
+ ref = expression;
19212
+ break;
19213
+ default:
19214
+ ref = {
19215
+ type: "Ref",
19216
+ base: "m",
19217
+ id: "m"
19218
+ };
19219
+ }
19220
+ let prev = [], root = prev;
19221
+ const l = clauses.length;
19222
+ clauses.forEach((c, i) => {
19223
+ let { pattern, block } = c;
19224
+ const indent = block.expressions[0][0];
19225
+ const conditions = [];
19226
+ getPatternConditions(pattern, ref, conditions);
19227
+ const condition = {
19228
+ type: "ParenthesizedExpression",
19229
+ children: ["(", conditions.map((c2, i2) => {
19230
+ if (i2 === 0)
19231
+ return c2;
19232
+ return [" && ", ...c2];
19233
+ }), ")"],
19234
+ expression: conditions
19235
+ };
19236
+ const prefix = [];
19237
+ switch (pattern.type) {
19238
+ case "ArrayMatchingPattern":
19239
+ case "ObjectMatchingPattern": {
19240
+ let [splices, thisAssignments] = gatherBindingCode(pattern);
19241
+ splices = splices.map((s2) => [", ", nonMatcherBindings(s2)]);
19242
+ thisAssignments = thisAssignments.map((a) => [indent, a, ";\n"]);
19243
+ prefix.push([indent, "const ", nonMatcherBindings(pattern), " = ", ref, splices, ";\n"]);
19244
+ prefix.push(...thisAssignments);
19245
+ break;
19246
+ }
19247
+ }
19248
+ block.expressions.unshift(...prefix);
19249
+ const next = [];
19250
+ if (block.bare) {
19251
+ block.children.unshift(" {");
19252
+ block.children.push("}");
19253
+ block.bare = false;
19254
+ }
19255
+ const e = i < l - 1 ? ["\nelse "] : [];
19256
+ prev.push({
19257
+ type: "IfStatement",
19258
+ children: ["if", condition, block, ...e, next]
19259
+ });
19260
+ prev = next;
19261
+ });
19262
+ s.type = "PatternMatchingStatement";
19263
+ s.children = [root];
19264
+ });
19265
+ }
18183
19266
  module.processProgram = function(statements) {
18184
19267
  processAssignments(statements);
18185
19268
  processFunctions(statements);
18186
19269
  processSwitchExpressions(statements);
18187
19270
  processTryExpressions(statements);
19271
+ processPatternMatching(statements);
18188
19272
  gatherRecursiveAll(statements, (n) => n.type === "IterationExpression").forEach((e) => expressionizeIteration(e));
18189
19273
  checkSpliceRef(statements);
18190
19274
  statements.unshift(...module.prelude);
@@ -18431,7 +19515,7 @@ ${input.slice(result.pos)}
18431
19515
  return result;
18432
19516
  }
18433
19517
  }
18434
- var Indent$0 = $TR($EXPECT($R60, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
19518
+ var Indent$0 = $TR($EXPECT($R61, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
18435
19519
  let level;
18436
19520
  if (module.config.tab) {
18437
19521
  const tabs = $0.match(/\t/g);
@@ -18586,7 +19670,7 @@ ${input.slice(result.pos)}
18586
19670
  return result;
18587
19671
  }
18588
19672
  }
18589
- var PopIndent$0 = $TV($EXPECT($L16, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
19673
+ var PopIndent$0 = $TV($EXPECT($L17, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
18590
19674
  if (module.config.verbose) {
18591
19675
  console.log("popping indent", module.indentLevels[module.indentLevels.length - 1], "->", module.indentLevels[module.indentLevels.length - 2]);
18592
19676
  }
@@ -18682,6 +19766,13 @@ var generate_default = gen = function(node, options) {
18682
19766
  }).join("");
18683
19767
  }
18684
19768
  if (typeof node === "object") {
19769
+ if (node.type === "Error") {
19770
+ if (options.errors == null) {
19771
+ options.errors = [];
19772
+ }
19773
+ options.errors.push(node);
19774
+ return "";
19775
+ }
18685
19776
  if (options.js && node.ts) {
18686
19777
  return "";
18687
19778
  }
@@ -18698,13 +19789,17 @@ var generate_default = gen = function(node, options) {
18698
19789
  return token;
18699
19790
  }
18700
19791
  if (!node.children) {
19792
+ switch (node.type) {
19793
+ case "Ref":
19794
+ throw new Error(`Unpopulated ref ${JSON.stringify(node)}`);
19795
+ }
18701
19796
  debugger;
18702
- throw new Error("Unknown node", JSON.stringify(node));
19797
+ throw new Error(`Unknown node ${JSON.stringify(node)}`);
18703
19798
  }
18704
19799
  return gen(node.children, options);
18705
19800
  }
18706
19801
  debugger;
18707
- throw new Error("Unknown node", JSON.stringify(node));
19802
+ throw new Error(`Unknown node ${JSON.stringify(node)}`);
18708
19803
  };
18709
19804
  var prune = function(node) {
18710
19805
  var a;
@@ -19062,16 +20157,19 @@ remapPosition = function(position, sourcemapLines) {
19062
20157
  "civet coffeeCompat";
19063
20158
  var SourceMap2;
19064
20159
  var base64Encode2;
19065
- var defaultOptions;
19066
20160
  var makeCache;
19067
20161
  var parse;
19068
20162
  var uncacheable;
19069
20163
  ({ parse } = import_parser.default);
19070
20164
  ({ SourceMap: SourceMap2, base64Encode: base64Encode2 } = util_exports);
19071
- defaultOptions = {};
19072
20165
  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"]);
19073
- var compile = function(src, options = defaultOptions) {
19074
- var ast, code, events, filename, sm, srcMapJSON;
20166
+ var compile = function(src, options) {
20167
+ var ast, code, events, filename, ref, result, sm, srcMapJSON;
20168
+ if (!options) {
20169
+ options = {};
20170
+ } else {
20171
+ options = { ...options };
20172
+ }
19075
20173
  filename = options.filename || "unknown";
19076
20174
  if (filename.endsWith(".coffee") && !/^(#![^\r\n]*(\r\n|\n|\r))?\s*['"]civet/.test(src)) {
19077
20175
  src = `"civet coffeeCompat"; ${src}`;
@@ -19099,7 +20197,11 @@ ${"//#"} sourceMappingURL=data:application/json;base64,${base64Encode2(JSON.stri
19099
20197
  };
19100
20198
  }
19101
20199
  }
19102
- return generate_default(ast, options);
20200
+ result = generate_default(ast, options);
20201
+ if ((ref = options.errors) != null ? ref.length : void 0) {
20202
+ throw new Error(`Parse errors: ${options.errors.join("\n")} `);
20203
+ }
20204
+ return result;
19103
20205
  };
19104
20206
  makeCache = function() {
19105
20207
  var caches, events;