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