@danielx/civet 0.5.23 → 0.5.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.js CHANGED
@@ -1,9 +1,31 @@
1
1
  "use strict";
2
2
  var Civet = (() => {
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
9
  var __commonJS = (cb, mod) => function __require() {
5
10
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
6
11
  };
12
+ var __export = (target, all) => {
13
+ for (var name in all)
14
+ __defProp(target, name, { get: all[name], enumerable: true });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from))
19
+ if (!__hasOwnProp.call(to, key) && key !== except)
20
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7
29
 
8
30
  // source/parser.hera
9
31
  var require_parser = __commonJS({
@@ -11,9 +33,9 @@ var Civet = (() => {
11
33
  "use strict";
12
34
  Object.defineProperty(exports, "__esModule", { value: true });
13
35
  exports.parserState = exports.$R$0 = exports.$TV = exports.$TS = exports.$TR = exports.$T = exports.$Y = exports.$N = exports.$TOKEN = exports.$TEXT = exports.$P = exports.$Q = exports.$E = exports.$S = exports.$C = exports.$R = exports.$L = exports.$EXPECT = void 0;
14
- function $EXPECT(parser, fail2, expectation) {
36
+ function $EXPECT(parser2, fail2, expectation) {
15
37
  return function(state) {
16
- const result = parser(state);
38
+ const result = parser2(state);
17
39
  if (result)
18
40
  return result;
19
41
  const { pos } = state;
@@ -226,9 +248,9 @@ var Civet = (() => {
226
248
  };
227
249
  }
228
250
  exports.$Y = $Y;
229
- function $T(parser, fn) {
251
+ function $T(parser2, fn) {
230
252
  return function(state) {
231
- const result = parser(state);
253
+ const result = parser2(state);
232
254
  if (!result)
233
255
  return;
234
256
  if (state.tokenize)
@@ -240,9 +262,9 @@ var Civet = (() => {
240
262
  };
241
263
  }
242
264
  exports.$T = $T;
243
- function $TR(parser, fn) {
265
+ function $TR(parser2, fn) {
244
266
  return function(state) {
245
- const result = parser(state);
267
+ const result = parser2(state);
246
268
  if (!result)
247
269
  return;
248
270
  if (state.tokenize)
@@ -257,9 +279,9 @@ var Civet = (() => {
257
279
  };
258
280
  }
259
281
  exports.$TR = $TR;
260
- function $TS(parser, fn) {
282
+ function $TS(parser2, fn) {
261
283
  return function(state) {
262
- const result = parser(state);
284
+ const result = parser2(state);
263
285
  if (!result)
264
286
  return;
265
287
  if (state.tokenize)
@@ -274,9 +296,9 @@ var Civet = (() => {
274
296
  };
275
297
  }
276
298
  exports.$TS = $TS;
277
- function $TV(parser, fn) {
299
+ function $TV(parser2, fn) {
278
300
  return function(state) {
279
- const result = parser(state);
301
+ const result = parser2(state);
280
302
  if (!result)
281
303
  return;
282
304
  if (state.tokenize)
@@ -291,9 +313,9 @@ var Civet = (() => {
291
313
  };
292
314
  }
293
315
  exports.$TV = $TV;
294
- function $R$0(parser) {
316
+ function $R$0(parser2) {
295
317
  return function(state) {
296
- const result = parser(state);
318
+ const result = parser2(state);
297
319
  if (!result)
298
320
  return;
299
321
  const value = result.value[0];
@@ -374,14 +396,14 @@ ${input.slice(result.pos)}
374
396
  parse: (input, options = {}) => {
375
397
  if (typeof input !== "string")
376
398
  throw new Error("Input must be a string");
377
- const parser = options.startRule != null ? grammar[options.startRule] : Object.values(grammar)[0];
378
- if (!parser)
399
+ const parser2 = options.startRule != null ? grammar[options.startRule] : Object.values(grammar)[0];
400
+ if (!parser2)
379
401
  throw new Error("Could not find rule with name '#{opts.startRule}'");
380
402
  const filename = options.filename || "<anonymous>";
381
403
  failIndex = 0;
382
404
  maxFailPos = 0;
383
405
  failExpected.length = 0;
384
- return validate(input, parser({
406
+ return validate(input, parser2({
385
407
  input,
386
408
  pos: 0,
387
409
  tokenize: options.tokenize || false,
@@ -393,7 +415,7 @@ ${input.slice(result.pos)}
393
415
  };
394
416
  }
395
417
  exports.parserState = parserState;
396
- var { parse } = parserState({
418
+ var { parse: parse2 } = parserState({
397
419
  Program,
398
420
  TopLevelStatement,
399
421
  ExtendedExpression,
@@ -805,6 +827,8 @@ ${input.slice(result.pos)}
805
827
  JSXCommentContent,
806
828
  JSXText,
807
829
  JSXChildExpression,
830
+ IndentedJSXChildExpression,
831
+ NestedJSXChildExpression,
808
832
  TypeDeclaration,
809
833
  TypeDeclarationModifier,
810
834
  TypeDeclarationRest,
@@ -943,18 +967,18 @@ ${input.slice(result.pos)}
943
967
  var $L48 = $L("**");
944
968
  var $L49 = $L("*");
945
969
  var $L50 = $L("/");
946
- var $L51 = $L("%");
947
- var $L52 = $L("+");
948
- var $L53 = $L("-");
949
- var $L54 = $L("<=");
950
- var $L55 = $L(">=");
951
- var $L56 = $L("<<");
952
- var $L57 = $L(">>>");
953
- var $L58 = $L(">>");
954
- var $L59 = $L("!==");
955
- var $L60 = $L("!=");
956
- var $L61 = $L("isnt");
957
- var $L62 = $L("is");
970
+ var $L51 = $L("%%");
971
+ var $L52 = $L("%");
972
+ var $L53 = $L("+");
973
+ var $L54 = $L("-");
974
+ var $L55 = $L("<=");
975
+ var $L56 = $L(">=");
976
+ var $L57 = $L("<<");
977
+ var $L58 = $L(">>>");
978
+ var $L59 = $L(">>");
979
+ var $L60 = $L("!==");
980
+ var $L61 = $L("!=");
981
+ var $L62 = $L("isnt");
958
982
  var $L63 = $L("===");
959
983
  var $L64 = $L("==");
960
984
  var $L65 = $L("and");
@@ -967,99 +991,100 @@ ${input.slice(result.pos)}
967
991
  var $L72 = $L("instanceof");
968
992
  var $L73 = $L("not");
969
993
  var $L74 = $L("in");
970
- var $L75 = $L("&");
971
- var $L76 = $L("^");
972
- var $L77 = $L("|");
973
- var $L78 = $L(";");
974
- var $L79 = $L("own");
975
- var $L80 = $L("finally");
976
- var $L81 = $L("break");
977
- var $L82 = $L("continue");
978
- var $L83 = $L("debugger");
979
- var $L84 = $L("import type");
980
- var $L85 = $L("default");
981
- var $L86 = $L(":=");
982
- var $L87 = $L("::=");
983
- var $L88 = $L(".=");
984
- var $L89 = $L("/*");
985
- var $L90 = $L("*/");
986
- var $L91 = $L("\\");
987
- var $L92 = $L("abstract");
988
- var $L93 = $L("as");
989
- var $L94 = $L("@");
990
- var $L95 = $L("@@");
991
- var $L96 = $L("async");
992
- var $L97 = $L("await");
993
- var $L98 = $L("`");
994
- var $L99 = $L("by");
995
- var $L100 = $L("case");
996
- var $L101 = $L("catch");
997
- var $L102 = $L("class");
998
- var $L103 = $L("#{");
999
- var $L104 = $L("delete");
1000
- var $L105 = $L("do");
1001
- var $L106 = $L("..");
1002
- var $L107 = $L("...");
1003
- var $L108 = $L("::");
1004
- var $L109 = $L('"');
1005
- var $L110 = $L("else");
1006
- var $L111 = $L("export");
1007
- var $L112 = $L("for");
1008
- var $L113 = $L("from");
1009
- var $L114 = $L("function");
1010
- var $L115 = $L("get");
1011
- var $L116 = $L("set");
1012
- var $L117 = $L("if");
1013
- var $L118 = $L("let");
1014
- var $L119 = $L("const");
1015
- var $L120 = $L("loop");
1016
- var $L121 = $L("new");
1017
- var $L122 = $L("{");
1018
- var $L123 = $L("[");
1019
- var $L124 = $L("(");
1020
- var $L125 = $L("public");
1021
- var $L126 = $L("private");
1022
- var $L127 = $L("protected");
1023
- var $L128 = $L("|>");
1024
- var $L129 = $L("readonly");
1025
- var $L130 = $L("return");
1026
- var $L131 = $L("satisfies");
1027
- var $L132 = $L("'");
1028
- var $L133 = $L("static");
1029
- var $L134 = $L("${");
1030
- var $L135 = $L("switch");
1031
- var $L136 = $L("target");
1032
- var $L137 = $L("then");
1033
- var $L138 = $L("this");
1034
- var $L139 = $L("throw");
1035
- var $L140 = $L('"""');
1036
- var $L141 = $L("'''");
1037
- var $L142 = $L("///");
1038
- var $L143 = $L("```");
1039
- var $L144 = $L("try");
1040
- var $L145 = $L("typeof");
1041
- var $L146 = $L("unless");
1042
- var $L147 = $L("until");
1043
- var $L148 = $L("var");
1044
- var $L149 = $L("void");
1045
- var $L150 = $L("when");
1046
- var $L151 = $L("while");
1047
- var $L152 = $L("yield");
1048
- var $L153 = $L("/>");
1049
- var $L154 = $L("</");
1050
- var $L155 = $L("<>");
1051
- var $L156 = $L("</>");
1052
- var $L157 = $L("<!--");
1053
- var $L158 = $L("-->");
1054
- var $L159 = $L("declare");
1055
- var $L160 = $L("type");
1056
- var $L161 = $L("interface");
1057
- var $L162 = $L("namespace");
1058
- var $L163 = $L("asserts");
1059
- var $L164 = $L("keyof");
1060
- var $L165 = $L("infer");
1061
- var $L166 = $L("[]");
1062
- var $L167 = $L("civet");
994
+ var $L75 = $L("is");
995
+ var $L76 = $L("&");
996
+ var $L77 = $L("^");
997
+ var $L78 = $L("|");
998
+ var $L79 = $L(";");
999
+ var $L80 = $L("own");
1000
+ var $L81 = $L("finally");
1001
+ var $L82 = $L("break");
1002
+ var $L83 = $L("continue");
1003
+ var $L84 = $L("debugger");
1004
+ var $L85 = $L("import type");
1005
+ var $L86 = $L("default");
1006
+ var $L87 = $L(":=");
1007
+ var $L88 = $L("::=");
1008
+ var $L89 = $L(".=");
1009
+ var $L90 = $L("/*");
1010
+ var $L91 = $L("*/");
1011
+ var $L92 = $L("\\");
1012
+ var $L93 = $L("abstract");
1013
+ var $L94 = $L("as");
1014
+ var $L95 = $L("@");
1015
+ var $L96 = $L("@@");
1016
+ var $L97 = $L("async");
1017
+ var $L98 = $L("await");
1018
+ var $L99 = $L("`");
1019
+ var $L100 = $L("by");
1020
+ var $L101 = $L("case");
1021
+ var $L102 = $L("catch");
1022
+ var $L103 = $L("class");
1023
+ var $L104 = $L("#{");
1024
+ var $L105 = $L("delete");
1025
+ var $L106 = $L("do");
1026
+ var $L107 = $L("..");
1027
+ var $L108 = $L("...");
1028
+ var $L109 = $L("::");
1029
+ var $L110 = $L('"');
1030
+ var $L111 = $L("else");
1031
+ var $L112 = $L("export");
1032
+ var $L113 = $L("for");
1033
+ var $L114 = $L("from");
1034
+ var $L115 = $L("function");
1035
+ var $L116 = $L("get");
1036
+ var $L117 = $L("set");
1037
+ var $L118 = $L("if");
1038
+ var $L119 = $L("let");
1039
+ var $L120 = $L("const");
1040
+ var $L121 = $L("loop");
1041
+ var $L122 = $L("new");
1042
+ var $L123 = $L("{");
1043
+ var $L124 = $L("[");
1044
+ var $L125 = $L("(");
1045
+ var $L126 = $L("public");
1046
+ var $L127 = $L("private");
1047
+ var $L128 = $L("protected");
1048
+ var $L129 = $L("|>");
1049
+ var $L130 = $L("readonly");
1050
+ var $L131 = $L("return");
1051
+ var $L132 = $L("satisfies");
1052
+ var $L133 = $L("'");
1053
+ var $L134 = $L("static");
1054
+ var $L135 = $L("${");
1055
+ var $L136 = $L("switch");
1056
+ var $L137 = $L("target");
1057
+ var $L138 = $L("then");
1058
+ var $L139 = $L("this");
1059
+ var $L140 = $L("throw");
1060
+ var $L141 = $L('"""');
1061
+ var $L142 = $L("'''");
1062
+ var $L143 = $L("///");
1063
+ var $L144 = $L("```");
1064
+ var $L145 = $L("try");
1065
+ var $L146 = $L("typeof");
1066
+ var $L147 = $L("unless");
1067
+ var $L148 = $L("until");
1068
+ var $L149 = $L("var");
1069
+ var $L150 = $L("void");
1070
+ var $L151 = $L("when");
1071
+ var $L152 = $L("while");
1072
+ var $L153 = $L("yield");
1073
+ var $L154 = $L("/>");
1074
+ var $L155 = $L("</");
1075
+ var $L156 = $L("<>");
1076
+ var $L157 = $L("</>");
1077
+ var $L158 = $L("<!--");
1078
+ var $L159 = $L("-->");
1079
+ var $L160 = $L("declare");
1080
+ var $L161 = $L("type");
1081
+ var $L162 = $L("interface");
1082
+ var $L163 = $L("namespace");
1083
+ var $L164 = $L("asserts");
1084
+ var $L165 = $L("keyof");
1085
+ var $L166 = $L("infer");
1086
+ var $L167 = $L("[]");
1087
+ var $L168 = $L("civet");
1063
1088
  var $R0 = $R(new RegExp("(for|of|then|when)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
1064
1089
  var $R1 = $R(new RegExp("[&]", "suy"));
1065
1090
  var $R2 = $R(new RegExp("[!~+-]+", "suy"));
@@ -1096,26 +1121,27 @@ ${input.slice(result.pos)}
1096
1121
  var $R33 = $R(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy"));
1097
1122
  var $R34 = $R(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy"));
1098
1123
  var $R35 = $R(new RegExp("(?:of)(?!\\p{ID_Continue})", "suy"));
1099
- var $R36 = $R(new RegExp("(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|private|protected|public|return|satisfies|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy"));
1100
- var $R37 = $R(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy"));
1101
- var $R38 = $R(new RegExp(".", "suy"));
1102
- var $R39 = $R(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy"));
1103
- var $R40 = $R(new RegExp("###(?!#)", "suy"));
1104
- var $R41 = $R(new RegExp("[^\\r\\n]", "suy"));
1105
- var $R42 = $R(new RegExp("[ \\t]+", "suy"));
1106
- var $R43 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
1107
- var $R44 = $R(new RegExp("\\s", "suy"));
1108
- var $R45 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
1109
- var $R46 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
1110
- var $R47 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
1111
- var $R48 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1112
- var $R49 = $R(new RegExp("[+-]?", "suy"));
1113
- var $R50 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1114
- var $R51 = $R(new RegExp("[\\t ]*", "suy"));
1115
- var $R52 = $R(new RegExp("[\\s]*", "suy"));
1116
- var $R53 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1117
- var $R54 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1118
- var $R55 = $R(new RegExp("[ \\t]*", "suy"));
1124
+ var $R36 = $R(new RegExp("(?:not)(?!\\p{ID_Continue})", "suy"));
1125
+ var $R37 = $R(new RegExp("(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|private|protected|public|return|satisfies|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy"));
1126
+ var $R38 = $R(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy"));
1127
+ var $R39 = $R(new RegExp(".", "suy"));
1128
+ var $R40 = $R(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy"));
1129
+ var $R41 = $R(new RegExp("###(?!#)", "suy"));
1130
+ var $R42 = $R(new RegExp("[^\\r\\n]", "suy"));
1131
+ var $R43 = $R(new RegExp("[ \\t]+", "suy"));
1132
+ var $R44 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
1133
+ var $R45 = $R(new RegExp("\\s", "suy"));
1134
+ var $R46 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
1135
+ var $R47 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
1136
+ var $R48 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
1137
+ var $R49 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1138
+ var $R50 = $R(new RegExp("[+-]?", "suy"));
1139
+ var $R51 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1140
+ var $R52 = $R(new RegExp("[\\t ]*", "suy"));
1141
+ var $R53 = $R(new RegExp("[\\s]*", "suy"));
1142
+ var $R54 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1143
+ var $R55 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1144
+ var $R56 = $R(new RegExp("[ \\t]*", "suy"));
1119
1145
  var Program$0 = $TS($S(Reset, Init, __, $Q(TopLevelStatement), __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
1120
1146
  var statements = $4;
1121
1147
  module.processProgram(statements);
@@ -2289,7 +2315,7 @@ ${input.slice(result.pos)}
2289
2315
  var ExtendsToken$0 = $TV($EXPECT($L5, fail, 'ExtendsToken "<"'), function($skip, $loc, $0, $1) {
2290
2316
  return { $loc, token: "extends" };
2291
2317
  });
2292
- var ExtendsToken$1 = $TV($EXPECT($L6, fail, 'ExtendsToken "extends"'), function($skip, $loc, $0, $1) {
2318
+ var ExtendsToken$1 = $TS($S($EXPECT($L6, fail, 'ExtendsToken "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
2293
2319
  return { $loc, token: $1 };
2294
2320
  });
2295
2321
  function ExtendsToken(state) {
@@ -2310,7 +2336,14 @@ ${input.slice(result.pos)}
2310
2336
  return result;
2311
2337
  }
2312
2338
  }
2313
- var ExtendsTarget$0 = $S(LeftHandSideExpression, $E(TypeArguments));
2339
+ var ExtendsTarget$0 = $TS($S(ExpressionWithIndentedApplicationSuppressed, $E(TypeArguments)), function($skip, $loc, $0, $1, $2) {
2340
+ var exp = $1;
2341
+ var ta = $2;
2342
+ exp = module.makeLeftHandSideExpression(exp);
2343
+ if (ta)
2344
+ return [exp, ta];
2345
+ return exp;
2346
+ });
2314
2347
  function ExtendsTarget(state) {
2315
2348
  if (state.events) {
2316
2349
  const result = state.events.enter?.("ExtendsTarget", state);
@@ -2353,7 +2386,7 @@ ${input.slice(result.pos)}
2353
2386
  return result;
2354
2387
  }
2355
2388
  }
2356
- var ImplementsToken$0 = $TV($EXPECT($L7, fail, 'ImplementsToken "implements"'), function($skip, $loc, $0, $1) {
2389
+ var ImplementsToken$0 = $TS($S($EXPECT($L7, fail, 'ImplementsToken "implements"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
2357
2390
  return { $loc, token: $1 };
2358
2391
  });
2359
2392
  function ImplementsToken(state) {
@@ -2617,10 +2650,19 @@ ${input.slice(result.pos)}
2617
2650
  }
2618
2651
  }
2619
2652
  var CallExpression$0 = $S($EXPECT($L10, fail, 'CallExpression "super"'), ArgumentsWithTrailingCallExpressions, $Q(CallExpressionRest));
2620
- var CallExpression$1 = $S($EXPECT($L11, fail, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, $Q(CallExpressionRest));
2653
+ var CallExpression$1 = $TS($S($EXPECT($L11, fail, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
2654
+ return {
2655
+ type: "CallExpression",
2656
+ children: $0
2657
+ };
2658
+ });
2621
2659
  var CallExpression$2 = $TS($S(MemberExpression, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2) {
2622
- if ($2.length)
2623
- return $0;
2660
+ if ($2.length) {
2661
+ return {
2662
+ type: "CallExpression",
2663
+ children: [$1].concat($2)
2664
+ };
2665
+ }
2624
2666
  return $1;
2625
2667
  });
2626
2668
  function CallExpression(state) {
@@ -2723,8 +2765,13 @@ ${input.slice(result.pos)}
2723
2765
  }
2724
2766
  }
2725
2767
  var MemberExpression$0 = $TS($S(PrimaryExpression, $Q(MemberExpressionRest)), function($skip, $loc, $0, $1, $2) {
2726
- if ($2.length)
2727
- return $0;
2768
+ var rest = $2;
2769
+ if (rest.length) {
2770
+ return {
2771
+ type: "MemberExpression",
2772
+ children: [$1].concat(rest)
2773
+ };
2774
+ }
2728
2775
  return $1;
2729
2776
  });
2730
2777
  var MemberExpression$1 = SuperProperty;
@@ -2943,7 +2990,7 @@ ${input.slice(result.pos)}
2943
2990
  }
2944
2991
  }
2945
2992
  var MetaProperty$0 = $S(New, Dot, Target);
2946
- var MetaProperty$1 = $TV($EXPECT($L14, fail, 'MetaProperty "import.meta"'), function($skip, $loc, $0, $1) {
2993
+ var MetaProperty$1 = $TS($S($EXPECT($L14, fail, 'MetaProperty "import.meta"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
2947
2994
  return { $loc, token: $1 };
2948
2995
  });
2949
2996
  function MetaProperty(state) {
@@ -5590,32 +5637,35 @@ ${input.slice(result.pos)}
5590
5637
  var BinaryOpSymbol$0 = $EXPECT($L48, fail, 'BinaryOpSymbol "**"');
5591
5638
  var BinaryOpSymbol$1 = $EXPECT($L49, fail, 'BinaryOpSymbol "*"');
5592
5639
  var BinaryOpSymbol$2 = $EXPECT($L50, fail, 'BinaryOpSymbol "/"');
5593
- var BinaryOpSymbol$3 = $EXPECT($L51, fail, 'BinaryOpSymbol "%"');
5594
- var BinaryOpSymbol$4 = $EXPECT($L52, fail, 'BinaryOpSymbol "+"');
5595
- var BinaryOpSymbol$5 = $EXPECT($L53, fail, 'BinaryOpSymbol "-"');
5596
- var BinaryOpSymbol$6 = $EXPECT($L54, fail, 'BinaryOpSymbol "<="');
5597
- var BinaryOpSymbol$7 = $EXPECT($L55, fail, 'BinaryOpSymbol ">="');
5598
- var BinaryOpSymbol$8 = $EXPECT($L56, fail, 'BinaryOpSymbol "<<"');
5599
- var BinaryOpSymbol$9 = $TR($EXPECT($R5, fail, "BinaryOpSymbol /<(?!\\p{ID_Start}|[_$])/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
5640
+ var BinaryOpSymbol$3 = $TV($EXPECT($L51, fail, 'BinaryOpSymbol "%%"'), function($skip, $loc, $0, $1) {
5641
+ return {
5642
+ call: module.getRef("modulo"),
5643
+ special: true
5644
+ };
5645
+ });
5646
+ var BinaryOpSymbol$4 = $EXPECT($L52, fail, 'BinaryOpSymbol "%"');
5647
+ var BinaryOpSymbol$5 = $EXPECT($L53, fail, 'BinaryOpSymbol "+"');
5648
+ var BinaryOpSymbol$6 = $EXPECT($L54, fail, 'BinaryOpSymbol "-"');
5649
+ var BinaryOpSymbol$7 = $EXPECT($L55, fail, 'BinaryOpSymbol "<="');
5650
+ var BinaryOpSymbol$8 = $EXPECT($L56, fail, 'BinaryOpSymbol ">="');
5651
+ var BinaryOpSymbol$9 = $EXPECT($L57, fail, 'BinaryOpSymbol "<<"');
5652
+ var BinaryOpSymbol$10 = $TR($EXPECT($R5, fail, "BinaryOpSymbol /<(?!\\p{ID_Start}|[_$])/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
5600
5653
  return "<";
5601
5654
  });
5602
- var BinaryOpSymbol$10 = $EXPECT($L57, fail, 'BinaryOpSymbol ">>>"');
5603
- var BinaryOpSymbol$11 = $EXPECT($L58, fail, 'BinaryOpSymbol ">>"');
5604
- var BinaryOpSymbol$12 = $EXPECT($L27, fail, 'BinaryOpSymbol ">"');
5605
- var BinaryOpSymbol$13 = $EXPECT($L59, fail, 'BinaryOpSymbol "!=="');
5606
- var BinaryOpSymbol$14 = $TV($EXPECT($L60, fail, 'BinaryOpSymbol "!="'), function($skip, $loc, $0, $1) {
5655
+ var BinaryOpSymbol$11 = $EXPECT($L58, fail, 'BinaryOpSymbol ">>>"');
5656
+ var BinaryOpSymbol$12 = $EXPECT($L59, fail, 'BinaryOpSymbol ">>"');
5657
+ var BinaryOpSymbol$13 = $EXPECT($L27, fail, 'BinaryOpSymbol ">"');
5658
+ var BinaryOpSymbol$14 = $EXPECT($L60, fail, 'BinaryOpSymbol "!=="');
5659
+ var BinaryOpSymbol$15 = $TV($EXPECT($L61, fail, 'BinaryOpSymbol "!="'), function($skip, $loc, $0, $1) {
5607
5660
  if (module.config.coffeeEq)
5608
5661
  return "!==";
5609
5662
  return $1;
5610
5663
  });
5611
- var BinaryOpSymbol$15 = $TS($S($EXPECT($L61, fail, 'BinaryOpSymbol "isnt"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5664
+ var BinaryOpSymbol$16 = $TS($S($EXPECT($L62, fail, 'BinaryOpSymbol "isnt"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5612
5665
  if (module.config.coffeeIsnt)
5613
5666
  return "!==";
5614
5667
  return $skip;
5615
5668
  });
5616
- var BinaryOpSymbol$16 = $T($S($EXPECT($L62, fail, 'BinaryOpSymbol "is"'), NonIdContinue), function(value) {
5617
- return "===";
5618
- });
5619
5669
  var BinaryOpSymbol$17 = $EXPECT($L63, fail, 'BinaryOpSymbol "==="');
5620
5670
  var BinaryOpSymbol$18 = $TV($EXPECT($L64, fail, 'BinaryOpSymbol "=="'), function($skip, $loc, $0, $1) {
5621
5671
  if (module.config.coffeeEq)
@@ -5647,33 +5697,43 @@ ${input.slice(result.pos)}
5647
5697
  special: true
5648
5698
  };
5649
5699
  });
5650
- var BinaryOpSymbol$28 = $TS($S(CoffeeNotEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L67, fail, 'BinaryOpSymbol "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
5700
+ var BinaryOpSymbol$28 = $TV($C($S($N(CoffeeOfEnabled), $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L67, fail, 'BinaryOpSymbol "of"'), NonIdContinue)), function($skip, $loc, $0, $1) {
5651
5701
  return {
5652
5702
  $loc,
5653
5703
  token: "in",
5654
5704
  special: true
5655
5705
  };
5656
5706
  });
5657
- var BinaryOpSymbol$29 = $TS($S(CoffeeOfEnabled, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
5707
+ var BinaryOpSymbol$29 = $TV($C($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue)), function($skip, $loc, $0, $1) {
5658
5708
  return {
5659
- ref: module.getRef("indexOf"),
5709
+ call: [module.getRef("indexOf"), ".call"],
5710
+ relational: true,
5711
+ reversed: true,
5660
5712
  suffix: " >= 0",
5661
5713
  special: true
5662
5714
  };
5663
5715
  });
5664
- var BinaryOpSymbol$30 = $TS($S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
5716
+ var BinaryOpSymbol$30 = $TV($C($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue)), function($skip, $loc, $0, $1) {
5665
5717
  return {
5666
- ref: module.getRef("indexOf"),
5718
+ call: [module.getRef("indexOf"), ".call"],
5719
+ relational: true,
5720
+ reversed: true,
5667
5721
  suffix: " < 0",
5668
5722
  special: true
5669
5723
  };
5670
5724
  });
5671
- var BinaryOpSymbol$31 = $TS($S($EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5725
+ var BinaryOpSymbol$31 = $T($S($N(CoffeeNotEnabled), $EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue), function(value) {
5726
+ return "!==";
5727
+ });
5728
+ var BinaryOpSymbol$32 = $T($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue), function(value) {
5729
+ return "===";
5730
+ });
5731
+ var BinaryOpSymbol$33 = $TS($S($EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
5672
5732
  return $1;
5673
5733
  });
5674
- var BinaryOpSymbol$32 = $EXPECT($L75, fail, 'BinaryOpSymbol "&"');
5675
- var BinaryOpSymbol$33 = $EXPECT($L76, fail, 'BinaryOpSymbol "^"');
5676
- var BinaryOpSymbol$34 = $EXPECT($L77, fail, 'BinaryOpSymbol "|"');
5734
+ var BinaryOpSymbol$34 = $EXPECT($L76, fail, 'BinaryOpSymbol "&"');
5735
+ var BinaryOpSymbol$35 = $EXPECT($L77, fail, 'BinaryOpSymbol "^"');
5736
+ var BinaryOpSymbol$36 = $EXPECT($L78, fail, 'BinaryOpSymbol "|"');
5677
5737
  function BinaryOpSymbol(state) {
5678
5738
  if (state.events) {
5679
5739
  const result = state.events.enter?.("BinaryOpSymbol", state);
@@ -5681,12 +5741,12 @@ ${input.slice(result.pos)}
5681
5741
  return result.cache;
5682
5742
  }
5683
5743
  if (state.tokenize) {
5684
- const result = $TOKEN("BinaryOpSymbol", state, BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state));
5744
+ const result = $TOKEN("BinaryOpSymbol", state, BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state));
5685
5745
  if (state.events)
5686
5746
  state.events.exit?.("BinaryOpSymbol", state, result);
5687
5747
  return result;
5688
5748
  } else {
5689
- const result = BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state);
5749
+ const result = BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state);
5690
5750
  if (state.events)
5691
5751
  state.events.exit?.("BinaryOpSymbol", state, result);
5692
5752
  return result;
@@ -5812,7 +5872,7 @@ ${input.slice(result.pos)}
5812
5872
  return result;
5813
5873
  }
5814
5874
  }
5815
- var EmptyStatement$0 = $T($S($Q(TrailingComment), $Y($EXPECT($L78, fail, 'EmptyStatement ";"'))), function(value) {
5875
+ var EmptyStatement$0 = $T($S($Q(TrailingComment), $Y($EXPECT($L79, fail, 'EmptyStatement ";"'))), function(value) {
5816
5876
  return { "type": "EmptyStatement", "children": value[0] };
5817
5877
  });
5818
5878
  function EmptyStatement(state) {
@@ -6084,7 +6144,7 @@ ${input.slice(result.pos)}
6084
6144
  children: [$1, exps, $3, $4, $5]
6085
6145
  };
6086
6146
  });
6087
- var ElseExpressionBlock$1 = $T($S($N(EOS), ExtendedExpression), function(value) {
6147
+ var ElseExpressionBlock$1 = $T($S($N(EOS), ExpressionWithIndentedApplicationSuppressed), function(value) {
6088
6148
  return value[1];
6089
6149
  });
6090
6150
  function ElseExpressionBlock(state) {
@@ -6658,7 +6718,7 @@ ${input.slice(result.pos)}
6658
6718
  return result;
6659
6719
  }
6660
6720
  }
6661
- var CoffeeForDeclaration$0 = $TS($S($E($S(__, $EXPECT($L79, fail, 'CoffeeForDeclaration "own"'))), ForBinding), function($skip, $loc, $0, $1, $2) {
6721
+ var CoffeeForDeclaration$0 = $TS($S($E($S(__, $EXPECT($L80, fail, 'CoffeeForDeclaration "own"'), NonIdContinue)), ForBinding), function($skip, $loc, $0, $1, $2) {
6662
6722
  var own = $1;
6663
6723
  var binding = $2;
6664
6724
  if (own) {
@@ -7202,7 +7262,7 @@ ${input.slice(result.pos)}
7202
7262
  return result;
7203
7263
  }
7204
7264
  }
7205
- var Finally$0 = $S(__, $EXPECT($L80, fail, 'Finally "finally"'), BracedBlock);
7265
+ var Finally$0 = $S(__, $EXPECT($L81, fail, 'Finally "finally"'), NonIdContinue, BracedBlock);
7206
7266
  function Finally(state) {
7207
7267
  if (state.events) {
7208
7268
  const result = state.events.enter?.("Finally", state);
@@ -7338,13 +7398,13 @@ ${input.slice(result.pos)}
7338
7398
  return result;
7339
7399
  }
7340
7400
  }
7341
- var KeywordStatement$0 = $T($S($EXPECT($L81, fail, 'KeywordStatement "break"'), NonIdContinue), function(value) {
7401
+ var KeywordStatement$0 = $T($S($EXPECT($L82, fail, 'KeywordStatement "break"'), NonIdContinue), function(value) {
7342
7402
  return { "type": "BreakStatement", "children": value };
7343
7403
  });
7344
- var KeywordStatement$1 = $T($S($EXPECT($L82, fail, 'KeywordStatement "continue"'), NonIdContinue), function(value) {
7404
+ var KeywordStatement$1 = $T($S($EXPECT($L83, fail, 'KeywordStatement "continue"'), NonIdContinue), function(value) {
7345
7405
  return { "type": "ContinueStatement", "children": value };
7346
7406
  });
7347
- var KeywordStatement$2 = $T($S($EXPECT($L83, fail, 'KeywordStatement "debugger"'), NonIdContinue), function(value) {
7407
+ var KeywordStatement$2 = $T($S($EXPECT($L84, fail, 'KeywordStatement "debugger"'), NonIdContinue), function(value) {
7348
7408
  return { "type": "DebuggerStatement", "children": value };
7349
7409
  });
7350
7410
  var KeywordStatement$3 = $T($S(Return, $E(MaybeNestedExpression)), function(value) {
@@ -7371,7 +7431,7 @@ ${input.slice(result.pos)}
7371
7431
  return result;
7372
7432
  }
7373
7433
  }
7374
- var DebuggerExpression$0 = $TS($S($EXPECT($L83, fail, 'DebuggerExpression "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
7434
+ var DebuggerExpression$0 = $TS($S($EXPECT($L84, fail, 'DebuggerExpression "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
7375
7435
  return {
7376
7436
  type: "DebuggerExpression",
7377
7437
  children: ["(()=>{", $1, "})()"]
@@ -7444,7 +7504,7 @@ ${input.slice(result.pos)}
7444
7504
  return result;
7445
7505
  }
7446
7506
  }
7447
- var ImportDeclaration$0 = $T($S($EXPECT($L84, fail, 'ImportDeclaration "import type"'), NonIdContinue, __, ImportClause, __, FromClause), function(value) {
7507
+ var ImportDeclaration$0 = $T($S($EXPECT($L85, fail, 'ImportDeclaration "import type"'), NonIdContinue, __, ImportClause, __, FromClause), function(value) {
7448
7508
  return { "ts": true, "children": value };
7449
7509
  });
7450
7510
  var ImportDeclaration$1 = $S(Import, __, ImportClause, __, FromClause);
@@ -7744,7 +7804,7 @@ ${input.slice(result.pos)}
7744
7804
  return result;
7745
7805
  }
7746
7806
  }
7747
- var ExportDeclaration$0 = $S(Export, __, $EXPECT($L85, fail, 'ExportDeclaration "default"'), NonIdContinue, __, $C(HoistableDeclaration, ClassDeclaration, ExtendedExpression));
7807
+ var ExportDeclaration$0 = $S(Export, __, $EXPECT($L86, fail, 'ExportDeclaration "default"'), NonIdContinue, __, $C(HoistableDeclaration, ClassDeclaration, ExtendedExpression));
7748
7808
  var ExportDeclaration$1 = $S(Export, __, ExportFromClause, __, FromClause);
7749
7809
  var ExportDeclaration$2 = $S(Export, __, $C(Declaration, NamedExports, VariableStatement, ExportVarDec));
7750
7810
  function ExportDeclaration(state) {
@@ -7847,7 +7907,7 @@ ${input.slice(result.pos)}
7847
7907
  return result;
7848
7908
  }
7849
7909
  }
7850
- var ImplicitExportSpecifier$0 = $S($N($EXPECT($L85, fail, 'ImplicitExportSpecifier "default"')), ModuleExportName, $E($S(__, As, __, ModuleExportName)), $C($Y($S(__, From)), ImplicitInlineObjectPropertyDelimiter));
7910
+ var ImplicitExportSpecifier$0 = $S($N($EXPECT($L86, fail, 'ImplicitExportSpecifier "default"')), ModuleExportName, $E($S(__, As, __, ModuleExportName)), $C($Y($S(__, From)), ImplicitInlineObjectPropertyDelimiter));
7851
7911
  function ImplicitExportSpecifier(state) {
7852
7912
  if (state.events) {
7853
7913
  const result = state.events.enter?.("ImplicitExportSpecifier", state);
@@ -8002,7 +8062,7 @@ ${input.slice(result.pos)}
8002
8062
  return result;
8003
8063
  }
8004
8064
  }
8005
- var ConstAssignment$0 = $TV($EXPECT($L86, fail, 'ConstAssignment ":="'), function($skip, $loc, $0, $1) {
8065
+ var ConstAssignment$0 = $TV($EXPECT($L87, fail, 'ConstAssignment ":="'), function($skip, $loc, $0, $1) {
8006
8066
  return { $loc, token: "=" };
8007
8067
  });
8008
8068
  function ConstAssignment(state) {
@@ -8023,10 +8083,10 @@ ${input.slice(result.pos)}
8023
8083
  return result;
8024
8084
  }
8025
8085
  }
8026
- var LetAssignment$0 = $TV($EXPECT($L87, fail, 'LetAssignment "::="'), function($skip, $loc, $0, $1) {
8086
+ var LetAssignment$0 = $TV($EXPECT($L88, fail, 'LetAssignment "::="'), function($skip, $loc, $0, $1) {
8027
8087
  return { $loc, token: "=" };
8028
8088
  });
8029
- var LetAssignment$1 = $TV($EXPECT($L88, fail, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
8089
+ var LetAssignment$1 = $TV($EXPECT($L89, fail, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
8030
8090
  return { $loc, token: "=" };
8031
8091
  });
8032
8092
  function LetAssignment(state) {
@@ -8930,7 +8990,9 @@ ${input.slice(result.pos)}
8930
8990
  var ReservedWord$1 = $S(CoffeeIsntEnabled, $R$0($EXPECT($R33, fail, "ReservedWord /(?:isnt)(?!\\p{ID_Continue})/")));
8931
8991
  var ReservedWord$2 = $S(CoffeeForLoopsEnabled, $R$0($EXPECT($R34, fail, "ReservedWord /(?:by)(?!\\p{ID_Continue})/")));
8932
8992
  var ReservedWord$3 = $S(CoffeeOfEnabled, $R$0($EXPECT($R35, fail, "ReservedWord /(?:of)(?!\\p{ID_Continue})/")));
8933
- var ReservedWord$4 = $R$0($EXPECT($R36, fail, "ReservedWord /(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|private|protected|public|return|satisfies|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})/"));
8993
+ var ReservedWord$4 = $S(CoffeeNotEnabled, $R$0($EXPECT($R36, fail, "ReservedWord /(?:not)(?!\\p{ID_Continue})/")));
8994
+ var ReservedWord$5 = $S($EXPECT($L73, fail, 'ReservedWord "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'ReservedWord "in"'), NonIdContinue);
8995
+ var ReservedWord$6 = $R$0($EXPECT($R37, fail, "ReservedWord /(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|private|protected|public|return|satisfies|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})/"));
8934
8996
  function ReservedWord(state) {
8935
8997
  if (state.events) {
8936
8998
  const result = state.events.enter?.("ReservedWord", state);
@@ -8938,12 +9000,12 @@ ${input.slice(result.pos)}
8938
9000
  return result.cache;
8939
9001
  }
8940
9002
  if (state.tokenize) {
8941
- const result = $TOKEN("ReservedWord", state, ReservedWord$0(state) || ReservedWord$1(state) || ReservedWord$2(state) || ReservedWord$3(state) || ReservedWord$4(state));
9003
+ const result = $TOKEN("ReservedWord", state, ReservedWord$0(state) || ReservedWord$1(state) || ReservedWord$2(state) || ReservedWord$3(state) || ReservedWord$4(state) || ReservedWord$5(state) || ReservedWord$6(state));
8942
9004
  if (state.events)
8943
9005
  state.events.exit?.("ReservedWord", state, result);
8944
9006
  return result;
8945
9007
  } else {
8946
- const result = ReservedWord$0(state) || ReservedWord$1(state) || ReservedWord$2(state) || ReservedWord$3(state) || ReservedWord$4(state);
9008
+ const result = ReservedWord$0(state) || ReservedWord$1(state) || ReservedWord$2(state) || ReservedWord$3(state) || ReservedWord$4(state) || ReservedWord$5(state) || ReservedWord$6(state);
8947
9009
  if (state.events)
8948
9010
  state.events.exit?.("ReservedWord", state, result);
8949
9011
  return result;
@@ -8989,7 +9051,7 @@ ${input.slice(result.pos)}
8989
9051
  return result;
8990
9052
  }
8991
9053
  }
8992
- var JSSingleLineComment$0 = $TR($EXPECT($R37, fail, "JSSingleLineComment /\\/\\/(?!\\/)[^\\r\\n]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
9054
+ var JSSingleLineComment$0 = $TR($EXPECT($R38, fail, "JSSingleLineComment /\\/\\/(?!\\/)[^\\r\\n]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8993
9055
  return { $loc, token: $0 };
8994
9056
  });
8995
9057
  function JSSingleLineComment(state) {
@@ -9030,7 +9092,7 @@ ${input.slice(result.pos)}
9030
9092
  return result;
9031
9093
  }
9032
9094
  }
9033
- var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($L89, fail, 'JSMultiLineComment "/*"'), $Q($S($N($EXPECT($L90, fail, 'JSMultiLineComment "*/"')), $EXPECT($R38, fail, "JSMultiLineComment /./"))), $EXPECT($L90, fail, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
9095
+ var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($L90, fail, 'JSMultiLineComment "/*"'), $Q($S($N($EXPECT($L91, fail, 'JSMultiLineComment "*/"')), $EXPECT($R39, fail, "JSMultiLineComment /./"))), $EXPECT($L91, fail, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
9034
9096
  return { $loc, token: $1 };
9035
9097
  });
9036
9098
  function JSMultiLineComment(state) {
@@ -9051,7 +9113,7 @@ ${input.slice(result.pos)}
9051
9113
  return result;
9052
9114
  }
9053
9115
  }
9054
- var CoffeeSingleLineComment$0 = $TR($EXPECT($R39, fail, "CoffeeSingleLineComment /#(?!##(?!#))([^\\r\\n]*)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
9116
+ var CoffeeSingleLineComment$0 = $TR($EXPECT($R40, fail, "CoffeeSingleLineComment /#(?!##(?!#))([^\\r\\n]*)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
9055
9117
  return { $loc, token: `//${$1}` };
9056
9118
  });
9057
9119
  function CoffeeSingleLineComment(state) {
@@ -9072,7 +9134,7 @@ ${input.slice(result.pos)}
9072
9134
  return result;
9073
9135
  }
9074
9136
  }
9075
- var CoffeeMultiLineComment$0 = $TS($S(CoffeeHereCommentStart, $TEXT($Q($S($N($C(CoffeeHereCommentStart, $EXPECT($L90, fail, 'CoffeeMultiLineComment "*/"'))), $EXPECT($R38, fail, "CoffeeMultiLineComment /./")))), CoffeeHereCommentStart), function($skip, $loc, $0, $1, $2, $3) {
9137
+ var CoffeeMultiLineComment$0 = $TS($S(CoffeeHereCommentStart, $TEXT($Q($S($N($C(CoffeeHereCommentStart, $EXPECT($L91, fail, 'CoffeeMultiLineComment "*/"'))), $EXPECT($R39, fail, "CoffeeMultiLineComment /./")))), CoffeeHereCommentStart), function($skip, $loc, $0, $1, $2, $3) {
9076
9138
  return { $loc, token: `/*${$2}*/` };
9077
9139
  });
9078
9140
  function CoffeeMultiLineComment(state) {
@@ -9093,7 +9155,7 @@ ${input.slice(result.pos)}
9093
9155
  return result;
9094
9156
  }
9095
9157
  }
9096
- var CoffeeHereCommentStart$0 = $R$0($EXPECT($R40, fail, "CoffeeHereCommentStart /###(?!#)/"));
9158
+ var CoffeeHereCommentStart$0 = $R$0($EXPECT($R41, fail, "CoffeeHereCommentStart /###(?!#)/"));
9097
9159
  function CoffeeHereCommentStart(state) {
9098
9160
  if (state.events) {
9099
9161
  const result = state.events.enter?.("CoffeeHereCommentStart", state);
@@ -9112,7 +9174,7 @@ ${input.slice(result.pos)}
9112
9174
  return result;
9113
9175
  }
9114
9176
  }
9115
- var InlineComment$0 = $TV($TEXT($S($EXPECT($L89, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L90, fail, 'InlineComment "*/"')), $EXPECT($R41, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L90, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
9177
+ var InlineComment$0 = $TV($TEXT($S($EXPECT($L90, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L91, fail, 'InlineComment "*/"')), $EXPECT($R42, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L91, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
9116
9178
  return { $loc, token: $1 };
9117
9179
  });
9118
9180
  function InlineComment(state) {
@@ -9192,10 +9254,10 @@ ${input.slice(result.pos)}
9192
9254
  return result;
9193
9255
  }
9194
9256
  }
9195
- var NonNewlineWhitespace$0 = $TR($EXPECT($R42, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
9257
+ var NonNewlineWhitespace$0 = $TR($EXPECT($R43, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
9196
9258
  return { $loc, token: $0 };
9197
9259
  });
9198
- var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L91, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
9260
+ var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L92, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
9199
9261
  return "";
9200
9262
  });
9201
9263
  function NonNewlineWhitespace(state) {
@@ -9324,7 +9386,7 @@ ${input.slice(result.pos)}
9324
9386
  return result;
9325
9387
  }
9326
9388
  }
9327
- var NonIdContinue$0 = $R$0($EXPECT($R43, fail, "NonIdContinue /(?!\\p{ID_Continue})/"));
9389
+ var NonIdContinue$0 = $R$0($EXPECT($R44, fail, "NonIdContinue /(?!\\p{ID_Continue})/"));
9328
9390
  function NonIdContinue(state) {
9329
9391
  if (state.events) {
9330
9392
  const result = state.events.enter?.("NonIdContinue", state);
@@ -9364,7 +9426,7 @@ ${input.slice(result.pos)}
9364
9426
  return result;
9365
9427
  }
9366
9428
  }
9367
- var Abstract$0 = $TV($TEXT($S($EXPECT($L92, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L4, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
9429
+ var Abstract$0 = $TV($TEXT($S($EXPECT($L93, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L4, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
9368
9430
  return { $loc, token: $1, ts: true };
9369
9431
  });
9370
9432
  function Abstract(state) {
@@ -9385,7 +9447,7 @@ ${input.slice(result.pos)}
9385
9447
  return result;
9386
9448
  }
9387
9449
  }
9388
- var Ampersand$0 = $TV($EXPECT($L75, fail, 'Ampersand "&"'), function($skip, $loc, $0, $1) {
9450
+ var Ampersand$0 = $TV($EXPECT($L76, fail, 'Ampersand "&"'), function($skip, $loc, $0, $1) {
9389
9451
  return { $loc, token: $1 };
9390
9452
  });
9391
9453
  function Ampersand(state) {
@@ -9406,7 +9468,7 @@ ${input.slice(result.pos)}
9406
9468
  return result;
9407
9469
  }
9408
9470
  }
9409
- var As$0 = $TS($S($EXPECT($L93, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9471
+ var As$0 = $TS($S($EXPECT($L94, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9410
9472
  return { $loc, token: $1 };
9411
9473
  });
9412
9474
  function As(state) {
@@ -9427,7 +9489,7 @@ ${input.slice(result.pos)}
9427
9489
  return result;
9428
9490
  }
9429
9491
  }
9430
- var At$0 = $TV($EXPECT($L94, fail, 'At "@"'), function($skip, $loc, $0, $1) {
9492
+ var At$0 = $TV($EXPECT($L95, fail, 'At "@"'), function($skip, $loc, $0, $1) {
9431
9493
  return { $loc, token: $1 };
9432
9494
  });
9433
9495
  function At(state) {
@@ -9448,7 +9510,7 @@ ${input.slice(result.pos)}
9448
9510
  return result;
9449
9511
  }
9450
9512
  }
9451
- var AtAt$0 = $TV($EXPECT($L95, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
9513
+ var AtAt$0 = $TV($EXPECT($L96, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
9452
9514
  return { $loc, token: "@" };
9453
9515
  });
9454
9516
  function AtAt(state) {
@@ -9469,7 +9531,7 @@ ${input.slice(result.pos)}
9469
9531
  return result;
9470
9532
  }
9471
9533
  }
9472
- var Async$0 = $TV($EXPECT($L96, fail, 'Async "async"'), function($skip, $loc, $0, $1) {
9534
+ var Async$0 = $TS($S($EXPECT($L97, fail, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9473
9535
  return { $loc, token: $1, type: "Async" };
9474
9536
  });
9475
9537
  function Async(state) {
@@ -9490,7 +9552,7 @@ ${input.slice(result.pos)}
9490
9552
  return result;
9491
9553
  }
9492
9554
  }
9493
- var Await$0 = $TS($S($EXPECT($L97, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9555
+ var Await$0 = $TS($S($EXPECT($L98, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9494
9556
  return { $loc, token: $1 };
9495
9557
  });
9496
9558
  function Await(state) {
@@ -9511,7 +9573,7 @@ ${input.slice(result.pos)}
9511
9573
  return result;
9512
9574
  }
9513
9575
  }
9514
- var Backtick$0 = $TV($EXPECT($L98, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
9576
+ var Backtick$0 = $TV($EXPECT($L99, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
9515
9577
  return { $loc, token: $1 };
9516
9578
  });
9517
9579
  function Backtick(state) {
@@ -9532,7 +9594,7 @@ ${input.slice(result.pos)}
9532
9594
  return result;
9533
9595
  }
9534
9596
  }
9535
- var By$0 = $TS($S($EXPECT($L99, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9597
+ var By$0 = $TS($S($EXPECT($L100, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9536
9598
  return { $loc, token: $1 };
9537
9599
  });
9538
9600
  function By(state) {
@@ -9553,7 +9615,7 @@ ${input.slice(result.pos)}
9553
9615
  return result;
9554
9616
  }
9555
9617
  }
9556
- var Case$0 = $TS($S($EXPECT($L100, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9618
+ var Case$0 = $TS($S($EXPECT($L101, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9557
9619
  return { $loc, token: $1 };
9558
9620
  });
9559
9621
  function Case(state) {
@@ -9574,7 +9636,7 @@ ${input.slice(result.pos)}
9574
9636
  return result;
9575
9637
  }
9576
9638
  }
9577
- var Catch$0 = $TV($EXPECT($L101, fail, 'Catch "catch"'), function($skip, $loc, $0, $1) {
9639
+ var Catch$0 = $TS($S($EXPECT($L102, fail, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9578
9640
  return { $loc, token: $1 };
9579
9641
  });
9580
9642
  function Catch(state) {
@@ -9595,7 +9657,7 @@ ${input.slice(result.pos)}
9595
9657
  return result;
9596
9658
  }
9597
9659
  }
9598
- var Class$0 = $TV($EXPECT($L102, fail, 'Class "class"'), function($skip, $loc, $0, $1) {
9660
+ var Class$0 = $TS($S($EXPECT($L103, fail, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9599
9661
  return { $loc, token: $1 };
9600
9662
  });
9601
9663
  function Class(state) {
@@ -9679,7 +9741,7 @@ ${input.slice(result.pos)}
9679
9741
  return result;
9680
9742
  }
9681
9743
  }
9682
- var CoffeeSubstitutionStart$0 = $TV($EXPECT($L103, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
9744
+ var CoffeeSubstitutionStart$0 = $TV($EXPECT($L104, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
9683
9745
  return { $loc, token: "${" };
9684
9746
  });
9685
9747
  function CoffeeSubstitutionStart(state) {
@@ -9721,7 +9783,7 @@ ${input.slice(result.pos)}
9721
9783
  return result;
9722
9784
  }
9723
9785
  }
9724
- var ConstructorShorthand$0 = $TV($EXPECT($L94, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
9786
+ var ConstructorShorthand$0 = $TV($EXPECT($L95, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
9725
9787
  return { $loc, token: "constructor" };
9726
9788
  });
9727
9789
  function ConstructorShorthand(state) {
@@ -9742,7 +9804,7 @@ ${input.slice(result.pos)}
9742
9804
  return result;
9743
9805
  }
9744
9806
  }
9745
- var Default$0 = $TS($S($EXPECT($L85, fail, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9807
+ var Default$0 = $TS($S($EXPECT($L86, fail, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9746
9808
  return { $loc, token: $1 };
9747
9809
  });
9748
9810
  function Default(state) {
@@ -9763,7 +9825,7 @@ ${input.slice(result.pos)}
9763
9825
  return result;
9764
9826
  }
9765
9827
  }
9766
- var Delete$0 = $TS($S($EXPECT($L104, fail, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9828
+ var Delete$0 = $TS($S($EXPECT($L105, fail, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9767
9829
  return { $loc, token: $1 };
9768
9830
  });
9769
9831
  function Delete(state) {
@@ -9784,7 +9846,7 @@ ${input.slice(result.pos)}
9784
9846
  return result;
9785
9847
  }
9786
9848
  }
9787
- var Do$0 = $TS($S($EXPECT($L105, fail, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9849
+ var Do$0 = $TS($S($EXPECT($L106, fail, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9788
9850
  return { $loc, token: $1 };
9789
9851
  });
9790
9852
  function Do(state) {
@@ -9826,7 +9888,7 @@ ${input.slice(result.pos)}
9826
9888
  return result;
9827
9889
  }
9828
9890
  }
9829
- var DotDot$0 = $TV($EXPECT($L106, fail, 'DotDot ".."'), function($skip, $loc, $0, $1) {
9891
+ var DotDot$0 = $TV($EXPECT($L107, fail, 'DotDot ".."'), function($skip, $loc, $0, $1) {
9830
9892
  return { $loc, token: $1 };
9831
9893
  });
9832
9894
  function DotDot(state) {
@@ -9847,7 +9909,7 @@ ${input.slice(result.pos)}
9847
9909
  return result;
9848
9910
  }
9849
9911
  }
9850
- var DotDotDot$0 = $TV($EXPECT($L107, fail, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
9912
+ var DotDotDot$0 = $TV($EXPECT($L108, fail, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
9851
9913
  return { $loc, token: $1 };
9852
9914
  });
9853
9915
  function DotDotDot(state) {
@@ -9868,7 +9930,7 @@ ${input.slice(result.pos)}
9868
9930
  return result;
9869
9931
  }
9870
9932
  }
9871
- var DoubleColon$0 = $TV($EXPECT($L108, fail, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
9933
+ var DoubleColon$0 = $TV($EXPECT($L109, fail, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
9872
9934
  return { $loc, token: $1 };
9873
9935
  });
9874
9936
  function DoubleColon(state) {
@@ -9889,7 +9951,7 @@ ${input.slice(result.pos)}
9889
9951
  return result;
9890
9952
  }
9891
9953
  }
9892
- var DoubleQuote$0 = $TV($EXPECT($L109, fail, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
9954
+ var DoubleQuote$0 = $TV($EXPECT($L110, fail, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
9893
9955
  return { $loc, token: $1 };
9894
9956
  });
9895
9957
  function DoubleQuote(state) {
@@ -9910,7 +9972,7 @@ ${input.slice(result.pos)}
9910
9972
  return result;
9911
9973
  }
9912
9974
  }
9913
- var Else$0 = $TV($EXPECT($L110, fail, 'Else "else"'), function($skip, $loc, $0, $1) {
9975
+ var Else$0 = $TS($S($EXPECT($L111, fail, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9914
9976
  return { $loc, token: $1 };
9915
9977
  });
9916
9978
  function Else(state) {
@@ -9952,7 +10014,7 @@ ${input.slice(result.pos)}
9952
10014
  return result;
9953
10015
  }
9954
10016
  }
9955
- var Export$0 = $TS($S($EXPECT($L111, fail, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10017
+ var Export$0 = $TS($S($EXPECT($L112, fail, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9956
10018
  return { $loc, token: $1 };
9957
10019
  });
9958
10020
  function Export(state) {
@@ -9973,7 +10035,7 @@ ${input.slice(result.pos)}
9973
10035
  return result;
9974
10036
  }
9975
10037
  }
9976
- var For$0 = $TS($S($EXPECT($L112, fail, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10038
+ var For$0 = $TS($S($EXPECT($L113, fail, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9977
10039
  return { $loc, token: $1 };
9978
10040
  });
9979
10041
  function For(state) {
@@ -9994,7 +10056,7 @@ ${input.slice(result.pos)}
9994
10056
  return result;
9995
10057
  }
9996
10058
  }
9997
- var From$0 = $TS($S($EXPECT($L113, fail, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10059
+ var From$0 = $TS($S($EXPECT($L114, fail, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9998
10060
  return { $loc, token: $1 };
9999
10061
  });
10000
10062
  function From(state) {
@@ -10015,7 +10077,7 @@ ${input.slice(result.pos)}
10015
10077
  return result;
10016
10078
  }
10017
10079
  }
10018
- var Function$0 = $TV($EXPECT($L114, fail, 'Function "function"'), function($skip, $loc, $0, $1) {
10080
+ var Function$0 = $TS($S($EXPECT($L115, fail, 'Function "function"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10019
10081
  return { $loc, token: $1 };
10020
10082
  });
10021
10083
  function Function(state) {
@@ -10036,7 +10098,7 @@ ${input.slice(result.pos)}
10036
10098
  return result;
10037
10099
  }
10038
10100
  }
10039
- var GetOrSet$0 = $TS($S($C($EXPECT($L115, fail, 'GetOrSet "get"'), $EXPECT($L116, fail, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10101
+ var GetOrSet$0 = $TS($S($C($EXPECT($L116, fail, 'GetOrSet "get"'), $EXPECT($L117, fail, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10040
10102
  return { $loc, token: $1, type: "GetOrSet" };
10041
10103
  });
10042
10104
  function GetOrSet(state) {
@@ -10057,7 +10119,7 @@ ${input.slice(result.pos)}
10057
10119
  return result;
10058
10120
  }
10059
10121
  }
10060
- var If$0 = $TV($TEXT($S($EXPECT($L117, fail, 'If "if"'), $E($EXPECT($L4, fail, 'If " "')))), function($skip, $loc, $0, $1) {
10122
+ var If$0 = $TV($TEXT($S($EXPECT($L118, fail, 'If "if"'), NonIdContinue, $E($EXPECT($L4, fail, 'If " "')))), function($skip, $loc, $0, $1) {
10061
10123
  return { $loc, token: $1 };
10062
10124
  });
10063
10125
  function If(state) {
@@ -10078,7 +10140,7 @@ ${input.slice(result.pos)}
10078
10140
  return result;
10079
10141
  }
10080
10142
  }
10081
- var Import$0 = $TS($S($EXPECT($L11, fail, 'Import "import"'), $Y($EXPECT($R44, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
10143
+ var Import$0 = $TS($S($EXPECT($L11, fail, 'Import "import"'), $Y($EXPECT($R45, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
10082
10144
  return { $loc, token: $1 };
10083
10145
  });
10084
10146
  function Import(state) {
@@ -10099,7 +10161,7 @@ ${input.slice(result.pos)}
10099
10161
  return result;
10100
10162
  }
10101
10163
  }
10102
- var In$0 = $TV($EXPECT($L74, fail, 'In "in"'), function($skip, $loc, $0, $1) {
10164
+ var In$0 = $TS($S($EXPECT($L74, fail, 'In "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10103
10165
  return { $loc, token: $1 };
10104
10166
  });
10105
10167
  function In(state) {
@@ -10120,7 +10182,7 @@ ${input.slice(result.pos)}
10120
10182
  return result;
10121
10183
  }
10122
10184
  }
10123
- var LetOrConst$0 = $TS($S($C($EXPECT($L118, fail, 'LetOrConst "let"'), $EXPECT($L119, fail, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10185
+ var LetOrConst$0 = $TS($S($C($EXPECT($L119, fail, 'LetOrConst "let"'), $EXPECT($L120, fail, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10124
10186
  return { $loc, token: $1 };
10125
10187
  });
10126
10188
  function LetOrConst(state) {
@@ -10141,7 +10203,7 @@ ${input.slice(result.pos)}
10141
10203
  return result;
10142
10204
  }
10143
10205
  }
10144
- var Loop$0 = $TS($S($EXPECT($L120, fail, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10206
+ var Loop$0 = $TS($S($EXPECT($L121, fail, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10145
10207
  return { $loc, token: "while(true)" };
10146
10208
  });
10147
10209
  function Loop(state) {
@@ -10162,7 +10224,7 @@ ${input.slice(result.pos)}
10162
10224
  return result;
10163
10225
  }
10164
10226
  }
10165
- var New$0 = $TS($S($EXPECT($L121, fail, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10227
+ var New$0 = $TS($S($EXPECT($L122, fail, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10166
10228
  return { $loc, token: $1 };
10167
10229
  });
10168
10230
  function New(state) {
@@ -10204,7 +10266,7 @@ ${input.slice(result.pos)}
10204
10266
  return result;
10205
10267
  }
10206
10268
  }
10207
- var Of$0 = $TV($EXPECT($L67, fail, 'Of "of"'), function($skip, $loc, $0, $1) {
10269
+ var Of$0 = $TS($S($EXPECT($L67, fail, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10208
10270
  return { $loc, token: $1 };
10209
10271
  });
10210
10272
  function Of(state) {
@@ -10225,7 +10287,7 @@ ${input.slice(result.pos)}
10225
10287
  return result;
10226
10288
  }
10227
10289
  }
10228
- var OpenBrace$0 = $TV($EXPECT($L122, fail, 'OpenBrace "{"'), function($skip, $loc, $0, $1) {
10290
+ var OpenBrace$0 = $TV($EXPECT($L123, fail, 'OpenBrace "{"'), function($skip, $loc, $0, $1) {
10229
10291
  return { $loc, token: $1 };
10230
10292
  });
10231
10293
  function OpenBrace(state) {
@@ -10246,7 +10308,7 @@ ${input.slice(result.pos)}
10246
10308
  return result;
10247
10309
  }
10248
10310
  }
10249
- var OpenBracket$0 = $TV($EXPECT($L123, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
10311
+ var OpenBracket$0 = $TV($EXPECT($L124, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
10250
10312
  return { $loc, token: $1 };
10251
10313
  });
10252
10314
  function OpenBracket(state) {
@@ -10267,7 +10329,7 @@ ${input.slice(result.pos)}
10267
10329
  return result;
10268
10330
  }
10269
10331
  }
10270
- var OpenParen$0 = $TV($EXPECT($L124, fail, 'OpenParen "("'), function($skip, $loc, $0, $1) {
10332
+ var OpenParen$0 = $TV($EXPECT($L125, fail, 'OpenParen "("'), function($skip, $loc, $0, $1) {
10271
10333
  return { $loc, token: $1 };
10272
10334
  });
10273
10335
  function OpenParen(state) {
@@ -10288,7 +10350,7 @@ ${input.slice(result.pos)}
10288
10350
  return result;
10289
10351
  }
10290
10352
  }
10291
- var Public$0 = $TS($S($EXPECT($L125, fail, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10353
+ var Public$0 = $TS($S($EXPECT($L126, fail, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10292
10354
  return { $loc, token: $1 };
10293
10355
  });
10294
10356
  function Public(state) {
@@ -10309,7 +10371,7 @@ ${input.slice(result.pos)}
10309
10371
  return result;
10310
10372
  }
10311
10373
  }
10312
- var Private$0 = $TS($S($EXPECT($L126, fail, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10374
+ var Private$0 = $TS($S($EXPECT($L127, fail, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10313
10375
  return { $loc, token: $1 };
10314
10376
  });
10315
10377
  function Private(state) {
@@ -10330,7 +10392,7 @@ ${input.slice(result.pos)}
10330
10392
  return result;
10331
10393
  }
10332
10394
  }
10333
- var Protected$0 = $TS($S($EXPECT($L127, fail, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10395
+ var Protected$0 = $TS($S($EXPECT($L128, fail, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10334
10396
  return { $loc, token: $1 };
10335
10397
  });
10336
10398
  function Protected(state) {
@@ -10351,7 +10413,7 @@ ${input.slice(result.pos)}
10351
10413
  return result;
10352
10414
  }
10353
10415
  }
10354
- var Pipe$0 = $TV($EXPECT($L128, fail, 'Pipe "|>"'), function($skip, $loc, $0, $1) {
10416
+ var Pipe$0 = $TV($EXPECT($L129, fail, 'Pipe "|>"'), function($skip, $loc, $0, $1) {
10355
10417
  return { $loc, token: $1 };
10356
10418
  });
10357
10419
  function Pipe(state) {
@@ -10393,7 +10455,7 @@ ${input.slice(result.pos)}
10393
10455
  return result;
10394
10456
  }
10395
10457
  }
10396
- var Readonly$0 = $TS($S($EXPECT($L129, fail, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10458
+ var Readonly$0 = $TS($S($EXPECT($L130, fail, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10397
10459
  return { $loc, token: $1, ts: true };
10398
10460
  });
10399
10461
  function Readonly(state) {
@@ -10414,7 +10476,7 @@ ${input.slice(result.pos)}
10414
10476
  return result;
10415
10477
  }
10416
10478
  }
10417
- var Return$0 = $TS($S($EXPECT($L130, fail, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10479
+ var Return$0 = $TS($S($EXPECT($L131, fail, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10418
10480
  return { $loc, token: $1 };
10419
10481
  });
10420
10482
  function Return(state) {
@@ -10435,7 +10497,7 @@ ${input.slice(result.pos)}
10435
10497
  return result;
10436
10498
  }
10437
10499
  }
10438
- var Satisfies$0 = $TS($S($EXPECT($L131, fail, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10500
+ var Satisfies$0 = $TS($S($EXPECT($L132, fail, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10439
10501
  return { $loc, token: $1 };
10440
10502
  });
10441
10503
  function Satisfies(state) {
@@ -10456,7 +10518,7 @@ ${input.slice(result.pos)}
10456
10518
  return result;
10457
10519
  }
10458
10520
  }
10459
- var Semicolon$0 = $TV($EXPECT($L78, fail, 'Semicolon ";"'), function($skip, $loc, $0, $1) {
10521
+ var Semicolon$0 = $TV($EXPECT($L79, fail, 'Semicolon ";"'), function($skip, $loc, $0, $1) {
10460
10522
  return { $loc, token: $1 };
10461
10523
  });
10462
10524
  function Semicolon(state) {
@@ -10477,7 +10539,7 @@ ${input.slice(result.pos)}
10477
10539
  return result;
10478
10540
  }
10479
10541
  }
10480
- var SingleQuote$0 = $TV($EXPECT($L132, fail, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
10542
+ var SingleQuote$0 = $TV($EXPECT($L133, fail, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
10481
10543
  return { $loc, token: $1 };
10482
10544
  });
10483
10545
  function SingleQuote(state) {
@@ -10519,10 +10581,10 @@ ${input.slice(result.pos)}
10519
10581
  return result;
10520
10582
  }
10521
10583
  }
10522
- var Static$0 = $TV($EXPECT($L133, fail, 'Static "static"'), function($skip, $loc, $0, $1) {
10584
+ var Static$0 = $TS($S($EXPECT($L134, fail, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10523
10585
  return { $loc, token: $1 };
10524
10586
  });
10525
- var Static$1 = $TS($S($EXPECT($L94, fail, 'Static "@"'), $N($C($EXPECT($L124, fail, 'Static "("'), $EXPECT($L94, fail, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
10587
+ var Static$1 = $TS($S($EXPECT($L95, fail, 'Static "@"'), $N($C($EXPECT($L125, fail, 'Static "("'), $EXPECT($L95, fail, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
10526
10588
  return { $loc, token: "static " };
10527
10589
  });
10528
10590
  function Static(state) {
@@ -10543,7 +10605,7 @@ ${input.slice(result.pos)}
10543
10605
  return result;
10544
10606
  }
10545
10607
  }
10546
- var SubstitutionStart$0 = $TV($EXPECT($L134, fail, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
10608
+ var SubstitutionStart$0 = $TV($EXPECT($L135, fail, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
10547
10609
  return { $loc, token: $1 };
10548
10610
  });
10549
10611
  function SubstitutionStart(state) {
@@ -10564,7 +10626,7 @@ ${input.slice(result.pos)}
10564
10626
  return result;
10565
10627
  }
10566
10628
  }
10567
- var Switch$0 = $TS($S($EXPECT($L135, fail, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10629
+ var Switch$0 = $TS($S($EXPECT($L136, fail, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10568
10630
  return { $loc, token: $1 };
10569
10631
  });
10570
10632
  function Switch(state) {
@@ -10585,7 +10647,7 @@ ${input.slice(result.pos)}
10585
10647
  return result;
10586
10648
  }
10587
10649
  }
10588
- var Target$0 = $TS($S($EXPECT($L136, fail, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10650
+ var Target$0 = $TS($S($EXPECT($L137, fail, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10589
10651
  return { $loc, token: $1 };
10590
10652
  });
10591
10653
  function Target(state) {
@@ -10606,7 +10668,7 @@ ${input.slice(result.pos)}
10606
10668
  return result;
10607
10669
  }
10608
10670
  }
10609
- var Then$0 = $TS($S(__, $EXPECT($L137, fail, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
10671
+ var Then$0 = $TS($S(__, $EXPECT($L138, fail, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
10610
10672
  return { $loc, token: "" };
10611
10673
  });
10612
10674
  function Then(state) {
@@ -10627,7 +10689,7 @@ ${input.slice(result.pos)}
10627
10689
  return result;
10628
10690
  }
10629
10691
  }
10630
- var This$0 = $TS($S($EXPECT($L138, fail, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10692
+ var This$0 = $TS($S($EXPECT($L139, fail, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10631
10693
  return { $loc, token: $1 };
10632
10694
  });
10633
10695
  function This(state) {
@@ -10648,7 +10710,7 @@ ${input.slice(result.pos)}
10648
10710
  return result;
10649
10711
  }
10650
10712
  }
10651
- var Throw$0 = $TS($S($EXPECT($L139, fail, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10713
+ var Throw$0 = $TS($S($EXPECT($L140, fail, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10652
10714
  return { $loc, token: $1 };
10653
10715
  });
10654
10716
  function Throw(state) {
@@ -10669,7 +10731,7 @@ ${input.slice(result.pos)}
10669
10731
  return result;
10670
10732
  }
10671
10733
  }
10672
- var TripleDoubleQuote$0 = $TV($EXPECT($L140, fail, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
10734
+ var TripleDoubleQuote$0 = $TV($EXPECT($L141, fail, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
10673
10735
  return { $loc, token: "`" };
10674
10736
  });
10675
10737
  function TripleDoubleQuote(state) {
@@ -10690,7 +10752,7 @@ ${input.slice(result.pos)}
10690
10752
  return result;
10691
10753
  }
10692
10754
  }
10693
- var TripleSingleQuote$0 = $TV($EXPECT($L141, fail, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
10755
+ var TripleSingleQuote$0 = $TV($EXPECT($L142, fail, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
10694
10756
  return { $loc, token: "`" };
10695
10757
  });
10696
10758
  function TripleSingleQuote(state) {
@@ -10711,7 +10773,7 @@ ${input.slice(result.pos)}
10711
10773
  return result;
10712
10774
  }
10713
10775
  }
10714
- var TripleSlash$0 = $TV($EXPECT($L142, fail, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
10776
+ var TripleSlash$0 = $TV($EXPECT($L143, fail, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
10715
10777
  return { $loc, token: "/" };
10716
10778
  });
10717
10779
  function TripleSlash(state) {
@@ -10732,7 +10794,7 @@ ${input.slice(result.pos)}
10732
10794
  return result;
10733
10795
  }
10734
10796
  }
10735
- var TripleTick$0 = $TV($EXPECT($L143, fail, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
10797
+ var TripleTick$0 = $TV($EXPECT($L144, fail, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
10736
10798
  return { $loc, token: "`" };
10737
10799
  });
10738
10800
  function TripleTick(state) {
@@ -10753,7 +10815,7 @@ ${input.slice(result.pos)}
10753
10815
  return result;
10754
10816
  }
10755
10817
  }
10756
- var Try$0 = $TS($S($EXPECT($L144, fail, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10818
+ var Try$0 = $TS($S($EXPECT($L145, fail, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10757
10819
  return { $loc, token: $1 };
10758
10820
  });
10759
10821
  function Try(state) {
@@ -10774,7 +10836,7 @@ ${input.slice(result.pos)}
10774
10836
  return result;
10775
10837
  }
10776
10838
  }
10777
- var Typeof$0 = $TS($S($EXPECT($L145, fail, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10839
+ var Typeof$0 = $TS($S($EXPECT($L146, fail, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10778
10840
  return { $loc, token: $1 };
10779
10841
  });
10780
10842
  function Typeof(state) {
@@ -10795,7 +10857,7 @@ ${input.slice(result.pos)}
10795
10857
  return result;
10796
10858
  }
10797
10859
  }
10798
- var Unless$0 = $TS($S($EXPECT($L146, fail, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10860
+ var Unless$0 = $TS($S($EXPECT($L147, fail, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10799
10861
  return { $loc, token: $1 };
10800
10862
  });
10801
10863
  function Unless(state) {
@@ -10816,7 +10878,7 @@ ${input.slice(result.pos)}
10816
10878
  return result;
10817
10879
  }
10818
10880
  }
10819
- var Until$0 = $TS($S($EXPECT($L147, fail, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10881
+ var Until$0 = $TS($S($EXPECT($L148, fail, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10820
10882
  return { $loc, token: $1 };
10821
10883
  });
10822
10884
  function Until(state) {
@@ -10837,7 +10899,7 @@ ${input.slice(result.pos)}
10837
10899
  return result;
10838
10900
  }
10839
10901
  }
10840
- var Var$0 = $TS($S($EXPECT($L148, fail, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10902
+ var Var$0 = $TS($S($EXPECT($L149, fail, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10841
10903
  return { $loc, token: $1 };
10842
10904
  });
10843
10905
  function Var(state) {
@@ -10858,7 +10920,7 @@ ${input.slice(result.pos)}
10858
10920
  return result;
10859
10921
  }
10860
10922
  }
10861
- var Void$0 = $TS($S($EXPECT($L149, fail, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10923
+ var Void$0 = $TS($S($EXPECT($L150, fail, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10862
10924
  return { $loc, token: $1 };
10863
10925
  });
10864
10926
  function Void(state) {
@@ -10879,7 +10941,7 @@ ${input.slice(result.pos)}
10879
10941
  return result;
10880
10942
  }
10881
10943
  }
10882
- var When$0 = $TS($S($EXPECT($L150, fail, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10944
+ var When$0 = $TS($S($EXPECT($L151, fail, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10883
10945
  return { $loc, token: "case" };
10884
10946
  });
10885
10947
  function When(state) {
@@ -10900,7 +10962,7 @@ ${input.slice(result.pos)}
10900
10962
  return result;
10901
10963
  }
10902
10964
  }
10903
- var While$0 = $TS($S($EXPECT($L151, fail, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10965
+ var While$0 = $TS($S($EXPECT($L152, fail, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10904
10966
  return { $loc, token: $1 };
10905
10967
  });
10906
10968
  function While(state) {
@@ -10921,7 +10983,7 @@ ${input.slice(result.pos)}
10921
10983
  return result;
10922
10984
  }
10923
10985
  }
10924
- var Yield$0 = $TS($S($EXPECT($L152, fail, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10986
+ var Yield$0 = $TS($S($EXPECT($L153, fail, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
10925
10987
  return { $loc, token: $1 };
10926
10988
  });
10927
10989
  function Yield(state) {
@@ -11004,7 +11066,7 @@ ${input.slice(result.pos)}
11004
11066
  return result;
11005
11067
  }
11006
11068
  }
11007
- var JSXSelfClosingElement$0 = $TS($S($EXPECT($L5, fail, 'JSXSelfClosingElement "<"'), $TEXT(JSXElementName), $E(CompactTypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L153, fail, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
11069
+ var JSXSelfClosingElement$0 = $TS($S($EXPECT($L5, fail, 'JSXSelfClosingElement "<"'), $TEXT(JSXElementName), $E(CompactTypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L154, fail, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
11008
11070
  return { type: "JSXElement", children: $0 };
11009
11071
  });
11010
11072
  function JSXSelfClosingElement(state) {
@@ -11044,7 +11106,7 @@ ${input.slice(result.pos)}
11044
11106
  return result;
11045
11107
  }
11046
11108
  }
11047
- var JSXClosingElement$0 = $S($EXPECT($L154, fail, 'JSXClosingElement "</"'), $E(Whitespace), $TEXT(JSXElementName), $E(Whitespace), $EXPECT($L27, fail, 'JSXClosingElement ">"'));
11109
+ var JSXClosingElement$0 = $S($EXPECT($L155, fail, 'JSXClosingElement "</"'), $E(Whitespace), $TEXT(JSXElementName), $E(Whitespace), $EXPECT($L27, fail, 'JSXClosingElement ">"'));
11048
11110
  function JSXClosingElement(state) {
11049
11111
  if (state.events) {
11050
11112
  const result = state.events.enter?.("JSXClosingElement", state);
@@ -11089,14 +11151,14 @@ ${input.slice(result.pos)}
11089
11151
  return result;
11090
11152
  }
11091
11153
  }
11092
- var JSXFragment$0 = $TS($S($EXPECT($L155, fail, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), $EXPECT($L156, fail, 'JSXFragment "</>"')), function($skip, $loc, $0, $1, $2, $3, $4) {
11154
+ var JSXFragment$0 = $TS($S($EXPECT($L156, fail, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), $EXPECT($L157, fail, 'JSXFragment "</>"')), function($skip, $loc, $0, $1, $2, $3, $4) {
11093
11155
  if ($2) {
11094
11156
  return { type: "JSXFragment", children: $0, jsxChildren: $2.jsxChildren };
11095
11157
  } else {
11096
11158
  return { type: "JSXFragment", children: $0, jsxChildren: [] };
11097
11159
  }
11098
11160
  });
11099
- var JSXFragment$1 = $TS($S($EXPECT($L155, fail, 'JSXFragment "<>"'), JSXMixedChildren, InsertNewline, InsertIndent), function($skip, $loc, $0, $1, $2, $3, $4) {
11161
+ var JSXFragment$1 = $TS($S($EXPECT($L156, fail, 'JSXFragment "<>"'), JSXMixedChildren, InsertNewline, InsertIndent), function($skip, $loc, $0, $1, $2, $3, $4) {
11100
11162
  return { type: "JSXFragment", children: [...$0, "</>"], jsxChildren: $2.jsxChildren };
11101
11163
  });
11102
11164
  function JSXFragment(state) {
@@ -11136,7 +11198,7 @@ ${input.slice(result.pos)}
11136
11198
  return result;
11137
11199
  }
11138
11200
  }
11139
- var JSXIdentifierName$0 = $R$0($EXPECT($R45, fail, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
11201
+ var JSXIdentifierName$0 = $R$0($EXPECT($R46, fail, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
11140
11202
  function JSXIdentifierName(state) {
11141
11203
  if (state.events) {
11142
11204
  const result = state.events.enter?.("JSXIdentifierName", state);
@@ -11334,7 +11396,7 @@ ${input.slice(result.pos)}
11334
11396
  return result;
11335
11397
  }
11336
11398
  }
11337
- var JSXShorthandString$0 = $TR($EXPECT($R46, fail, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11399
+ var JSXShorthandString$0 = $TR($EXPECT($R47, fail, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11338
11400
  return module.quoteString($0);
11339
11401
  });
11340
11402
  var JSXShorthandString$1 = $TS($S(StringLiteral), function($skip, $loc, $0, $1) {
@@ -11776,7 +11838,7 @@ ${input.slice(result.pos)}
11776
11838
  var JSXChild$0 = JSXElement;
11777
11839
  var JSXChild$1 = JSXFragment;
11778
11840
  var JSXChild$2 = JSXComment;
11779
- var JSXChild$3 = $TS($S(OpenBrace, $E(JSXChildExpression), __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
11841
+ var JSXChild$3 = $TS($S(OpenBrace, IndentedJSXChildExpression, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
11780
11842
  var expression = $2;
11781
11843
  return {
11782
11844
  type: "JSXChildExpression",
@@ -11784,7 +11846,7 @@ ${input.slice(result.pos)}
11784
11846
  expression
11785
11847
  };
11786
11848
  });
11787
- var JSXChild$4 = $TS($S(InsertInlineOpenBrace, ArrowFunction, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3) {
11849
+ var JSXChild$4 = $TS($S(OpenBrace, $E(JSXChildExpression), __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
11788
11850
  var expression = $2;
11789
11851
  return {
11790
11852
  type: "JSXChildExpression",
@@ -11792,7 +11854,15 @@ ${input.slice(result.pos)}
11792
11854
  expression
11793
11855
  };
11794
11856
  });
11795
- var JSXChild$5 = JSXText;
11857
+ var JSXChild$5 = $TS($S(InsertInlineOpenBrace, ArrowFunction, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3) {
11858
+ var expression = $2;
11859
+ return {
11860
+ type: "JSXChildExpression",
11861
+ children: $0,
11862
+ expression
11863
+ };
11864
+ });
11865
+ var JSXChild$6 = JSXText;
11796
11866
  function JSXChild(state) {
11797
11867
  if (state.events) {
11798
11868
  const result = state.events.enter?.("JSXChild", state);
@@ -11800,18 +11870,18 @@ ${input.slice(result.pos)}
11800
11870
  return result.cache;
11801
11871
  }
11802
11872
  if (state.tokenize) {
11803
- const result = $TOKEN("JSXChild", state, JSXChild$0(state) || JSXChild$1(state) || JSXChild$2(state) || JSXChild$3(state) || JSXChild$4(state) || JSXChild$5(state));
11873
+ const result = $TOKEN("JSXChild", state, JSXChild$0(state) || JSXChild$1(state) || JSXChild$2(state) || JSXChild$3(state) || JSXChild$4(state) || JSXChild$5(state) || JSXChild$6(state));
11804
11874
  if (state.events)
11805
11875
  state.events.exit?.("JSXChild", state, result);
11806
11876
  return result;
11807
11877
  } else {
11808
- const result = JSXChild$0(state) || JSXChild$1(state) || JSXChild$2(state) || JSXChild$3(state) || JSXChild$4(state) || JSXChild$5(state);
11878
+ const result = JSXChild$0(state) || JSXChild$1(state) || JSXChild$2(state) || JSXChild$3(state) || JSXChild$4(state) || JSXChild$5(state) || JSXChild$6(state);
11809
11879
  if (state.events)
11810
11880
  state.events.exit?.("JSXChild", state, result);
11811
11881
  return result;
11812
11882
  }
11813
11883
  }
11814
- var JSXComment$0 = $TS($S($EXPECT($L157, fail, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L158, fail, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
11884
+ var JSXComment$0 = $TS($S($EXPECT($L158, fail, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L159, fail, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
11815
11885
  return ["{/*", $2, "*/}"];
11816
11886
  });
11817
11887
  function JSXComment(state) {
@@ -11832,7 +11902,7 @@ ${input.slice(result.pos)}
11832
11902
  return result;
11833
11903
  }
11834
11904
  }
11835
- var JSXCommentContent$0 = $TR($EXPECT($R47, fail, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11905
+ var JSXCommentContent$0 = $TR($EXPECT($R48, fail, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11836
11906
  return { $loc, token: $0.replace(/\*\//g, "* /") };
11837
11907
  });
11838
11908
  function JSXCommentContent(state) {
@@ -11853,7 +11923,7 @@ ${input.slice(result.pos)}
11853
11923
  return result;
11854
11924
  }
11855
11925
  }
11856
- var JSXText$0 = $TR($EXPECT($R48, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11926
+ var JSXText$0 = $TR($EXPECT($R49, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11857
11927
  return {
11858
11928
  type: "JSXText",
11859
11929
  token: $0,
@@ -11897,6 +11967,48 @@ ${input.slice(result.pos)}
11897
11967
  return result;
11898
11968
  }
11899
11969
  }
11970
+ var IndentedJSXChildExpression$0 = $TS($S(PushIndent, $E(NestedJSXChildExpression), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
11971
+ if (!$2)
11972
+ return $skip;
11973
+ return $2;
11974
+ });
11975
+ function IndentedJSXChildExpression(state) {
11976
+ if (state.events) {
11977
+ const result = state.events.enter?.("IndentedJSXChildExpression", state);
11978
+ if (result)
11979
+ return result.cache;
11980
+ }
11981
+ if (state.tokenize) {
11982
+ const result = $TOKEN("IndentedJSXChildExpression", state, IndentedJSXChildExpression$0(state));
11983
+ if (state.events)
11984
+ state.events.exit?.("IndentedJSXChildExpression", state, result);
11985
+ return result;
11986
+ } else {
11987
+ const result = IndentedJSXChildExpression$0(state);
11988
+ if (state.events)
11989
+ state.events.exit?.("IndentedJSXChildExpression", state, result);
11990
+ return result;
11991
+ }
11992
+ }
11993
+ var NestedJSXChildExpression$0 = $S(Nested, JSXChildExpression);
11994
+ function NestedJSXChildExpression(state) {
11995
+ if (state.events) {
11996
+ const result = state.events.enter?.("NestedJSXChildExpression", state);
11997
+ if (result)
11998
+ return result.cache;
11999
+ }
12000
+ if (state.tokenize) {
12001
+ const result = $TOKEN("NestedJSXChildExpression", state, NestedJSXChildExpression$0(state));
12002
+ if (state.events)
12003
+ state.events.exit?.("NestedJSXChildExpression", state, result);
12004
+ return result;
12005
+ } else {
12006
+ const result = NestedJSXChildExpression$0(state);
12007
+ if (state.events)
12008
+ state.events.exit?.("NestedJSXChildExpression", state, result);
12009
+ return result;
12010
+ }
12011
+ }
11900
12012
  var TypeDeclaration$0 = $T($S($Q($S(TypeDeclarationModifier, $Q(TrailingComment))), TypeDeclarationRest), function(value) {
11901
12013
  return { "ts": true, "children": value };
11902
12014
  });
@@ -11918,7 +12030,7 @@ ${input.slice(result.pos)}
11918
12030
  return result;
11919
12031
  }
11920
12032
  }
11921
- var TypeDeclarationModifier$0 = $S($EXPECT($L159, fail, 'TypeDeclarationModifier "declare"'), NonIdContinue);
12033
+ var TypeDeclarationModifier$0 = $S($EXPECT($L160, fail, 'TypeDeclarationModifier "declare"'), NonIdContinue);
11922
12034
  var TypeDeclarationModifier$1 = Export;
11923
12035
  function TypeDeclarationModifier(state) {
11924
12036
  if (state.events) {
@@ -11960,7 +12072,7 @@ ${input.slice(result.pos)}
11960
12072
  return result;
11961
12073
  }
11962
12074
  }
11963
- var TypeKeyword$0 = $S($EXPECT($L160, fail, 'TypeKeyword "type"'), NonIdContinue);
12075
+ var TypeKeyword$0 = $S($EXPECT($L161, fail, 'TypeKeyword "type"'), NonIdContinue);
11964
12076
  function TypeKeyword(state) {
11965
12077
  if (state.events) {
11966
12078
  const result = state.events.enter?.("TypeKeyword", state);
@@ -11979,7 +12091,7 @@ ${input.slice(result.pos)}
11979
12091
  return result;
11980
12092
  }
11981
12093
  }
11982
- var Interface$0 = $S($EXPECT($L161, fail, 'Interface "interface"'), NonIdContinue);
12094
+ var Interface$0 = $S($EXPECT($L162, fail, 'Interface "interface"'), NonIdContinue);
11983
12095
  function Interface(state) {
11984
12096
  if (state.events) {
11985
12097
  const result = state.events.enter?.("Interface", state);
@@ -11998,7 +12110,7 @@ ${input.slice(result.pos)}
11998
12110
  return result;
11999
12111
  }
12000
12112
  }
12001
- var Namespace$0 = $S($EXPECT($L162, fail, 'Namespace "namespace"'), NonIdContinue);
12113
+ var Namespace$0 = $S($EXPECT($L163, fail, 'Namespace "namespace"'), NonIdContinue);
12002
12114
  function Namespace(state) {
12003
12115
  if (state.events) {
12004
12116
  const result = state.events.enter?.("Namespace", state);
@@ -12187,7 +12299,7 @@ ${input.slice(result.pos)}
12187
12299
  return result;
12188
12300
  }
12189
12301
  }
12190
- var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R49, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L129, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R4, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
12302
+ var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R50, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L130, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R4, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
12191
12303
  function TypeIndexSignature(state) {
12192
12304
  if (state.events) {
12193
12305
  const result = state.events.enter?.("TypeIndexSignature", state);
@@ -12247,7 +12359,7 @@ ${input.slice(result.pos)}
12247
12359
  return result;
12248
12360
  }
12249
12361
  }
12250
- var ReturnTypeSuffix$0 = $TS($S(__, Colon, $E($S(__, $EXPECT($L163, fail, 'ReturnTypeSuffix "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2, $3, $4) {
12362
+ var ReturnTypeSuffix$0 = $TS($S(__, Colon, $E($S(__, $EXPECT($L164, fail, 'ReturnTypeSuffix "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2, $3, $4) {
12251
12363
  const children = [...$1, $2];
12252
12364
  if ($3)
12253
12365
  children.push($3);
@@ -12276,7 +12388,7 @@ ${input.slice(result.pos)}
12276
12388
  return result;
12277
12389
  }
12278
12390
  }
12279
- var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($L62, fail, 'TypePredicate "is"'), NonIdContinue, Type))), function($skip, $loc, $0, $1, $2) {
12391
+ var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($L75, fail, 'TypePredicate "is"'), NonIdContinue, Type))), function($skip, $loc, $0, $1, $2) {
12280
12392
  if (!$2)
12281
12393
  return $1;
12282
12394
  return $0;
@@ -12382,10 +12494,10 @@ ${input.slice(result.pos)}
12382
12494
  return result;
12383
12495
  }
12384
12496
  }
12385
- var TypeUnaryOp$0 = $EXPECT($L164, fail, 'TypeUnaryOp "keyof"');
12386
- var TypeUnaryOp$1 = $EXPECT($L145, fail, 'TypeUnaryOp "typeof"');
12387
- var TypeUnaryOp$2 = $EXPECT($L165, fail, 'TypeUnaryOp "infer"');
12388
- var TypeUnaryOp$3 = $EXPECT($L129, fail, 'TypeUnaryOp "readonly"');
12497
+ var TypeUnaryOp$0 = $S($EXPECT($L165, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
12498
+ var TypeUnaryOp$1 = $S($EXPECT($L146, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
12499
+ var TypeUnaryOp$2 = $S($EXPECT($L166, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
12500
+ var TypeUnaryOp$3 = $S($EXPECT($L130, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
12389
12501
  function TypeUnaryOp(state) {
12390
12502
  if (state.events) {
12391
12503
  const result = state.events.enter?.("TypeUnaryOp", state);
@@ -12529,7 +12641,7 @@ ${input.slice(result.pos)}
12529
12641
  return result;
12530
12642
  }
12531
12643
  }
12532
- var TypeConditional$0 = $TS($S(TypeBinary, $E($S(__, $EXPECT($L6, fail, 'TypeConditional "extends"'), Type, $E($S(__, QuestionMark, Type, __, Colon, Type))))), function($skip, $loc, $0, $1, $2) {
12644
+ var TypeConditional$0 = $TS($S(TypeBinary, $E($S(__, $EXPECT($L6, fail, 'TypeConditional "extends"'), NonIdContinue, Type, $E($S(__, QuestionMark, Type, __, Colon, Type))))), function($skip, $loc, $0, $1, $2) {
12533
12645
  if ($2)
12534
12646
  return $0;
12535
12647
  return $1;
@@ -12554,10 +12666,10 @@ ${input.slice(result.pos)}
12554
12666
  }
12555
12667
  var TypeLiteral$0 = Literal;
12556
12668
  var TypeLiteral$1 = TemplateLiteral;
12557
- var TypeLiteral$2 = $TV($EXPECT($L149, fail, 'TypeLiteral "void"'), function($skip, $loc, $0, $1) {
12669
+ var TypeLiteral$2 = $TS($S($EXPECT($L150, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12558
12670
  return { $loc, token: "void" };
12559
12671
  });
12560
- var TypeLiteral$3 = $TV($EXPECT($L166, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
12672
+ var TypeLiteral$3 = $TV($EXPECT($L167, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
12561
12673
  return { $loc, token: "[]" };
12562
12674
  });
12563
12675
  function TypeLiteral(state) {
@@ -12578,10 +12690,10 @@ ${input.slice(result.pos)}
12578
12690
  return result;
12579
12691
  }
12580
12692
  }
12581
- var TypeBinaryOp$0 = $TV($EXPECT($L77, fail, 'TypeBinaryOp "|"'), function($skip, $loc, $0, $1) {
12693
+ var TypeBinaryOp$0 = $TV($EXPECT($L78, fail, 'TypeBinaryOp "|"'), function($skip, $loc, $0, $1) {
12582
12694
  return { $loc, token: "|" };
12583
12695
  });
12584
- var TypeBinaryOp$1 = $TV($EXPECT($L75, fail, 'TypeBinaryOp "&"'), function($skip, $loc, $0, $1) {
12696
+ var TypeBinaryOp$1 = $TV($EXPECT($L76, fail, 'TypeBinaryOp "&"'), function($skip, $loc, $0, $1) {
12585
12697
  return { $loc, token: "&" };
12586
12698
  });
12587
12699
  function TypeBinaryOp(state) {
@@ -12747,7 +12859,7 @@ ${input.slice(result.pos)}
12747
12859
  return result;
12748
12860
  }
12749
12861
  }
12750
- var TypeConstraint$0 = $S(__, $EXPECT($L6, fail, 'TypeConstraint "extends"'), Type);
12862
+ var TypeConstraint$0 = $S(__, $EXPECT($L6, fail, 'TypeConstraint "extends"'), NonIdContinue, Type);
12751
12863
  function TypeConstraint(state) {
12752
12864
  if (state.events) {
12753
12865
  const result = state.events.enter?.("TypeConstraint", state);
@@ -12789,7 +12901,7 @@ ${input.slice(result.pos)}
12789
12901
  return result;
12790
12902
  }
12791
12903
  }
12792
- var Shebang$0 = $S($R$0($EXPECT($R50, fail, "Shebang /#![^\\r\\n]*/")), EOL);
12904
+ var Shebang$0 = $S($R$0($EXPECT($R51, fail, "Shebang /#![^\\r\\n]*/")), EOL);
12793
12905
  function Shebang(state) {
12794
12906
  if (state.events) {
12795
12907
  const result = state.events.enter?.("Shebang", state);
@@ -12808,11 +12920,11 @@ ${input.slice(result.pos)}
12808
12920
  return result;
12809
12921
  }
12810
12922
  }
12811
- var CivetPrologue$0 = $T($S($EXPECT($R51, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(StatementDelimiter), $E(EOS)), function(value) {
12923
+ var CivetPrologue$0 = $T($S($EXPECT($R52, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(StatementDelimiter), $E(EOS)), function(value) {
12812
12924
  var content = value[2];
12813
12925
  return content;
12814
12926
  });
12815
- var CivetPrologue$1 = $T($S($EXPECT($R51, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(StatementDelimiter), $E(EOS)), function(value) {
12927
+ var CivetPrologue$1 = $T($S($EXPECT($R52, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(StatementDelimiter), $E(EOS)), function(value) {
12816
12928
  var content = value[2];
12817
12929
  return content;
12818
12930
  });
@@ -12834,8 +12946,8 @@ ${input.slice(result.pos)}
12834
12946
  return result;
12835
12947
  }
12836
12948
  }
12837
- var CivetPrologueContent$0 = $TS($S($EXPECT($L167, fail, 'CivetPrologueContent "civet"'), $Q(CivetOption), $EXPECT($R52, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3) {
12838
- var options = $2;
12949
+ var CivetPrologueContent$0 = $TS($S($EXPECT($L168, fail, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R53, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
12950
+ var options = $3;
12839
12951
  return {
12840
12952
  type: "CivetPrologue",
12841
12953
  children: [],
@@ -12860,7 +12972,7 @@ ${input.slice(result.pos)}
12860
12972
  return result;
12861
12973
  }
12862
12974
  }
12863
- var CivetOption$0 = $TR($EXPECT($R53, 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) {
12975
+ var CivetOption$0 = $TR($EXPECT($R54, 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) {
12864
12976
  const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
12865
12977
  if (l)
12866
12978
  return l.toUpperCase();
@@ -12892,7 +13004,7 @@ ${input.slice(result.pos)}
12892
13004
  return result;
12893
13005
  }
12894
13006
  }
12895
- var UnknownPrologue$0 = $S($R$0($EXPECT($R51, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(StatementDelimiter), EOS);
13007
+ var UnknownPrologue$0 = $S($R$0($EXPECT($R52, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(StatementDelimiter), EOS);
12896
13008
  function UnknownPrologue(state) {
12897
13009
  if (state.events) {
12898
13010
  const result = state.events.enter?.("UnknownPrologue", state);
@@ -12950,7 +13062,7 @@ ${input.slice(result.pos)}
12950
13062
  return result;
12951
13063
  }
12952
13064
  }
12953
- var EOL$0 = $TR($EXPECT($R54, fail, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13065
+ var EOL$0 = $TR($EXPECT($R55, fail, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
12954
13066
  return { $loc, token: $0 };
12955
13067
  });
12956
13068
  function EOL(state) {
@@ -13575,7 +13687,7 @@ ${input.slice(result.pos)}
13575
13687
  }
13576
13688
  });
13577
13689
  }
13578
- module.config = parse.config = {
13690
+ module.config = parse2.config = {
13579
13691
  autoVar: false,
13580
13692
  autoLet: false,
13581
13693
  coffeeBinaryExistential: false,
@@ -13618,6 +13730,13 @@ ${input.slice(result.pos)}
13618
13730
  };
13619
13731
  module.prelude.push(["", ["const ", hasPropRef, typeSuffix, " = {}.hasOwnProperty", module.asAny, "\n"]]);
13620
13732
  },
13733
+ modulo(moduloRef) {
13734
+ const typeSuffix = {
13735
+ ts: true,
13736
+ children: [": (a: number, b: number) => number"]
13737
+ };
13738
+ module.prelude.push(["", ["const ", moduloRef, typeSuffix, " = (a, b) => (a % b + b) % b", "\n"]]);
13739
+ },
13621
13740
  JSX(jsxRef) {
13622
13741
  module.prelude.push({
13623
13742
  ts: true,
@@ -14055,6 +14174,21 @@ ${input.slice(result.pos)}
14055
14174
  return;
14056
14175
  node.splice(1, 0, "return ");
14057
14176
  }
14177
+ module.makeLeftHandSideExpression = function(exp) {
14178
+ switch (exp.type) {
14179
+ case "Identifier":
14180
+ case "Literal":
14181
+ case "CallExpression":
14182
+ case "MemberExpression":
14183
+ case "ParenthesizedExpression":
14184
+ return exp;
14185
+ default:
14186
+ return {
14187
+ type: "ParenthesizedExpression",
14188
+ children: ["(", exp, ")"]
14189
+ };
14190
+ }
14191
+ };
14058
14192
  module.isWhitespaceOrEmpty = function(node) {
14059
14193
  if (!node)
14060
14194
  return true;
@@ -14083,10 +14217,14 @@ ${input.slice(result.pos)}
14083
14217
  if (op.special) {
14084
14218
  let [a, wsOp, op2, wsB, b] = expandedOps.slice(i - 2, i + 3);
14085
14219
  let children;
14086
- if (op2.ref) {
14220
+ if (op2.call) {
14087
14221
  wsOp = module.insertTrimmingSpace(wsOp, "");
14088
- wsB = module.insertTrimmingSpace(wsB, "");
14089
- children = [wsOp, op2.ref, ".call(", wsB, b, ", ", a, ")", op2.suffix];
14222
+ if (op2.reversed) {
14223
+ wsB = module.insertTrimmingSpace(wsB, "");
14224
+ children = [wsOp, op2.call, "(", wsB, b, ", ", a, ")", op2.suffix];
14225
+ } else {
14226
+ children = [wsOp, op2.call, "(", a, ",", wsB, b, ")", op2.suffix];
14227
+ }
14090
14228
  } else if (op2.token === "instanceof" || op2.token === "in") {
14091
14229
  children = ["!(", a, wsOp, op2, wsB, b, ")"];
14092
14230
  } else {
@@ -14111,7 +14249,7 @@ ${input.slice(result.pos)}
14111
14249
  let chains = [];
14112
14250
  while (i < l) {
14113
14251
  const [, op] = binops[i];
14114
- if (relationalOps.includes(op.token) || op.ref) {
14252
+ if (relationalOps.includes(op.token) || op.relational) {
14115
14253
  chains.push(i);
14116
14254
  } else if (lowerPrecedenceOps.includes(op.token)) {
14117
14255
  processChains();
@@ -14419,31 +14557,29 @@ ${input.slice(result.pos)}
14419
14557
  const lastAssignment = $12[i];
14420
14558
  if (lastAssignment[3].token === "=") {
14421
14559
  const lhs = lastAssignment[1];
14422
- if (Array.isArray(lhs) && lhs.length > 1) {
14423
- const props = lhs[lhs.length - 1];
14424
- if (Array.isArray(props)) {
14425
- const lastProp = props[props.length - 1];
14426
- if (lastProp.type === "SliceExpression") {
14427
- const { start, end, children: c } = lastProp;
14428
- c[0].token = ".splice(";
14429
- c[1] = start;
14430
- c[2] = ", ";
14431
- if (end)
14432
- c[3] = [end, " - ", start];
14433
- else
14434
- c[3] = ["1/0"];
14435
- c[4] = [", ...", $22];
14436
- c[5] = ")";
14560
+ if (lhs.type === "MemberExpression") {
14561
+ const members = lhs.children;
14562
+ const lastMember = members[members.length - 1];
14563
+ if (lastMember.type === "SliceExpression") {
14564
+ const { start, end, children: c } = lastMember;
14565
+ c[0].token = ".splice(";
14566
+ c[1] = start;
14567
+ c[2] = ", ";
14568
+ if (end)
14569
+ c[3] = [end, " - ", start];
14570
+ else
14571
+ c[3] = ["1/0"];
14572
+ c[4] = [", ...", $22];
14573
+ c[5] = ")";
14574
+ lastAssignment.pop();
14575
+ if (module.isWhitespaceOrEmpty(lastAssignment[2]))
14437
14576
  lastAssignment.pop();
14438
- if (module.isWhitespaceOrEmpty(lastAssignment[2]))
14439
- lastAssignment.pop();
14440
- if ($12.length > 1) {
14441
- throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
14442
- }
14443
- exp.children = [$12];
14444
- exp.names = [];
14445
- return;
14577
+ if ($12.length > 1) {
14578
+ throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
14446
14579
  }
14580
+ exp.children = [$12];
14581
+ exp.names = [];
14582
+ return;
14447
14583
  }
14448
14584
  } else if (lhs.type === "ObjectBindingPattern" || lhs.type === "ArrayBindingPattern") {
14449
14585
  processBindingPatternLHS(lhs, tail);
@@ -14741,7 +14877,7 @@ ${input.slice(result.pos)}
14741
14877
  return result;
14742
14878
  }
14743
14879
  }
14744
- var Indent$0 = $TR($EXPECT($R55, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14880
+ var Indent$0 = $TR($EXPECT($R56, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14745
14881
  let level;
14746
14882
  if (module.config.tab) {
14747
14883
  const tabs = $0.match(/\t/g);
@@ -14934,511 +15070,500 @@ ${input.slice(result.pos)}
14934
15070
  return result;
14935
15071
  }
14936
15072
  }
14937
- exports.parse = parse;
14938
- exports.default = { parse };
15073
+ exports.parse = parse2;
15074
+ exports.default = { parse: parse2 };
14939
15075
  }
14940
15076
  });
14941
15077
 
15078
+ // source/main.coffee
15079
+ var main_exports = {};
15080
+ __export(main_exports, {
15081
+ compile: () => compile,
15082
+ default: () => main_default,
15083
+ generate: () => generate_default,
15084
+ parse: () => parse,
15085
+ util: () => util_exports
15086
+ });
15087
+ var import_parser = __toESM(require_parser());
15088
+
14942
15089
  // source/generate.coffee
14943
- var require_generate = __commonJS({
14944
- "source/generate.coffee"(exports, module) {
14945
- "civet coffeeCompat";
14946
- var gen;
14947
- var prune;
14948
- gen = function(node, options) {
14949
- var $loc, token;
14950
- if (node === null || node === void 0) {
14951
- return "";
14952
- }
14953
- if (typeof node === "string") {
14954
- if (options != null) {
14955
- if (typeof options.updateSourceMap === "function") {
14956
- options.updateSourceMap(node);
14957
- }
14958
- }
14959
- return node;
14960
- }
14961
- if (Array.isArray(node)) {
14962
- return node.map(function(child) {
14963
- return gen(child, options);
14964
- }).join("");
15090
+ "civet coffeeCompat";
15091
+ var gen;
15092
+ var generate_default = gen = function(node, options) {
15093
+ var $loc, token;
15094
+ if (node === null || node === void 0) {
15095
+ return "";
15096
+ }
15097
+ if (typeof node === "string") {
15098
+ if (options != null) {
15099
+ if (typeof options.updateSourceMap === "function") {
15100
+ options.updateSourceMap(node);
14965
15101
  }
14966
- if (typeof node === "object") {
14967
- if (options.js && node.ts) {
14968
- return "";
14969
- }
14970
- if (!options.js && node.js) {
14971
- return "";
14972
- }
14973
- if (node.$loc != null) {
14974
- ({ token, $loc } = node);
14975
- if (options != null) {
14976
- if (typeof options.updateSourceMap === "function") {
14977
- options.updateSourceMap(token, $loc.pos);
14978
- }
14979
- }
14980
- return token;
14981
- }
14982
- if (!node.children) {
14983
- debugger;
14984
- throw new Error("Unknown node", JSON.stringify(node));
15102
+ }
15103
+ return node;
15104
+ }
15105
+ if (Array.isArray(node)) {
15106
+ return node.map(function(child) {
15107
+ return gen(child, options);
15108
+ }).join("");
15109
+ }
15110
+ if (typeof node === "object") {
15111
+ if (options.js && node.ts) {
15112
+ return "";
15113
+ }
15114
+ if (!options.js && node.js) {
15115
+ return "";
15116
+ }
15117
+ if (node.$loc != null) {
15118
+ ({ token, $loc } = node);
15119
+ if (options != null) {
15120
+ if (typeof options.updateSourceMap === "function") {
15121
+ options.updateSourceMap(token, $loc.pos);
14985
15122
  }
14986
- return gen(node.children, options);
14987
15123
  }
15124
+ return token;
15125
+ }
15126
+ if (!node.children) {
14988
15127
  debugger;
14989
15128
  throw new Error("Unknown node", JSON.stringify(node));
14990
- };
14991
- module.exports = gen;
14992
- prune = function(node) {
14993
- var a;
14994
- if (node === null || node === void 0) {
14995
- return;
14996
- }
14997
- if (node.length === 0) {
14998
- return;
14999
- }
15000
- if (Array.isArray(node)) {
15001
- a = node.map(function(n) {
15002
- return prune(n);
15003
- }).filter(function(n) {
15004
- return !!n;
15005
- });
15006
- if (a.length > 1) {
15007
- return a;
15008
- }
15009
- if (a.length === 1) {
15010
- return a[0];
15011
- }
15012
- return;
15013
- }
15014
- if (node.children != null) {
15015
- node.children = prune(node.children) || [];
15016
- return node;
15017
- }
15018
- return node;
15019
- };
15020
- gen.prune = prune;
15129
+ }
15130
+ return gen(node.children, options);
15021
15131
  }
15022
- });
15132
+ debugger;
15133
+ throw new Error("Unknown node", JSON.stringify(node));
15134
+ };
15135
+ var prune = function(node) {
15136
+ var a;
15137
+ if (node === null || node === void 0) {
15138
+ return;
15139
+ }
15140
+ if (node.length === 0) {
15141
+ return;
15142
+ }
15143
+ if (Array.isArray(node)) {
15144
+ a = node.map(function(n) {
15145
+ return prune(n);
15146
+ }).filter(function(n) {
15147
+ return !!n;
15148
+ });
15149
+ if (a.length > 1) {
15150
+ return a;
15151
+ }
15152
+ if (a.length === 1) {
15153
+ return a[0];
15154
+ }
15155
+ return;
15156
+ }
15157
+ if (node.children != null) {
15158
+ node.children = prune(node.children) || [];
15159
+ return node;
15160
+ }
15161
+ return node;
15162
+ };
15023
15163
 
15024
15164
  // source/util.coffee
15025
- var require_util = __commonJS({
15026
- "source/util.coffee"(exports, module) {
15027
- "use strict";
15028
- "civet coffeeCompat";
15029
- var BASE64_CHARS;
15030
- var SourceMap;
15031
- var VLQ_CONTINUATION_BIT;
15032
- var VLQ_SHIFT;
15033
- var VLQ_VALUE_MASK;
15034
- var base64Encode;
15035
- var decodeError;
15036
- var decodeVLQ;
15037
- var encodeBase64;
15038
- var encodeVlq;
15039
- var locationTable;
15040
- var lookupLineColumn;
15041
- var prettySourceExcerpt;
15042
- var remapPosition;
15043
- var smRegexp;
15044
- var vlqChars;
15045
- var vlqTable;
15046
- locationTable = function(input) {
15047
- var line, lines, linesRe, pos, result;
15048
- linesRe = /([^\r\n]*)(\r\n|\r|\n|$)/y;
15049
- lines = [];
15050
- line = 0;
15051
- pos = 0;
15052
- while (result = linesRe.exec(input)) {
15053
- pos += result[0].length;
15054
- lines[line++] = pos;
15055
- if (pos === input.length) {
15056
- break;
15057
- }
15058
- }
15059
- return lines;
15060
- };
15061
- lookupLineColumn = function(table, pos) {
15062
- var l, prevEnd;
15063
- l = 0;
15064
- prevEnd = 0;
15065
- while (table[l] <= pos) {
15066
- prevEnd = table[l++];
15067
- }
15068
- return [l, pos - prevEnd];
15069
- };
15070
- SourceMap = function(sourceString) {
15071
- var EOL, sm, srcTable;
15072
- srcTable = locationTable(sourceString);
15073
- sm = {
15074
- lines: [[]],
15075
- lineNum: 0,
15076
- colOffset: 0,
15077
- srcTable
15078
- };
15079
- EOL = /\r?\n|\r/;
15080
- return {
15081
- data: sm,
15082
- source: function() {
15083
- return sourceString;
15084
- },
15085
- renderMappings: function() {
15086
- var lastSourceColumn, lastSourceLine;
15087
- lastSourceLine = 0;
15088
- lastSourceColumn = 0;
15089
- return sm.lines.map(function(line) {
15090
- return line.map(function(entry) {
15091
- var colDelta, lineDelta, sourceFileIndex, srcCol, srcLine;
15092
- if (entry.length === 4) {
15093
- [colDelta, sourceFileIndex, srcLine, srcCol] = entry;
15094
- lineDelta = srcLine - lastSourceLine;
15095
- colDelta = srcCol - lastSourceColumn;
15096
- lastSourceLine = srcLine;
15097
- lastSourceColumn = srcCol;
15098
- return `${encodeVlq(entry[0])}${encodeVlq(sourceFileIndex)}${encodeVlq(lineDelta)}${encodeVlq(colDelta)}`;
15099
- } else {
15100
- return encodeVlq(entry[0]);
15101
- }
15102
- }).join(",");
15103
- }).join(";");
15104
- },
15105
- json: function(srcFileName, outFileName) {
15106
- return {
15107
- version: 3,
15108
- file: outFileName,
15109
- sources: [srcFileName],
15110
- mappings: this.renderMappings(),
15111
- names: [],
15112
- sourcesContent: [sourceString]
15113
- };
15114
- },
15115
- updateSourceMap: function(outputStr, inputPos) {
15116
- var outLines, srcCol, srcLine;
15117
- outLines = outputStr.split(EOL);
15118
- if (inputPos != null) {
15119
- [srcLine, srcCol] = lookupLineColumn(srcTable, inputPos);
15120
- }
15121
- outLines.forEach(function(line, i) {
15122
- var l;
15123
- if (i > 0) {
15124
- sm.lineNum++;
15125
- sm.colOffset = 0;
15126
- sm.lines[sm.lineNum] = [];
15127
- srcCol = 0;
15128
- }
15129
- l = sm.colOffset;
15130
- sm.colOffset = line.length;
15131
- if (inputPos != null) {
15132
- return sm.lines[sm.lineNum].push([l, 0, srcLine + i, srcCol]);
15133
- } else if (l !== 0) {
15134
- return sm.lines[sm.lineNum].push([l]);
15135
- }
15136
- });
15137
- }
15138
- };
15139
- };
15140
- SourceMap.parseWithLines = function(base64encodedJSONstr) {
15141
- var json, lines, sourceColumn, sourceLine;
15142
- json = JSON.parse(Buffer.from(base64encodedJSONstr, "base64").toString("utf8"));
15143
- sourceLine = 0;
15144
- sourceColumn = 0;
15145
- lines = json.mappings.split(";").map(function(line) {
15146
- if (line.length === 0) {
15147
- return [];
15148
- }
15149
- return line.split(",").map(function(entry) {
15150
- var result;
15151
- result = decodeVLQ(entry);
15152
- switch (result.length) {
15153
- case 1:
15154
- return [result[0]];
15155
- case 4:
15156
- return [result[0], result[1], sourceLine += result[2], sourceColumn += result[3]];
15157
- case 5:
15158
- return [result[0], result[1], sourceLine += result[2], sourceColumn += result[3], result[4]];
15159
- default:
15160
- throw new Error("Unknown source map entry", result);
15161
- }
15162
- });
15163
- });
15164
- json.lines = lines;
15165
- return json;
15166
- };
15167
- smRegexp = /\n\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,([+a-zA-Z0-9\/]*=?=?)$/;
15168
- SourceMap.remap = function(codeWithSourceMap, upstreamMap, sourcePath, targetPath) {
15169
- var codeWithoutSourceMap, composedLines, newSourceMap, parsed, remappedCodeWithSourceMap, remappedSourceMapJSON, sourceMapText;
15170
- sourceMapText = codeWithSourceMap.match(smRegexp);
15171
- if (sourceMapText) {
15172
- parsed = SourceMap.parseWithLines(sourceMapText[1]);
15173
- } else {
15174
- console.warn("No source map found in code");
15175
- return codeWithSourceMap;
15176
- }
15177
- composedLines = SourceMap.composeLines(upstreamMap.data.lines, parsed.lines);
15178
- upstreamMap.data.lines = composedLines;
15179
- remappedSourceMapJSON = upstreamMap.json(sourcePath, targetPath);
15180
- codeWithoutSourceMap = codeWithSourceMap.replace(smRegexp, "");
15181
- newSourceMap = `${"sourceMapping"}URL=data:application/json;charset=utf-8;base64,${base64Encode(JSON.stringify(remappedSourceMapJSON))}`;
15182
- remappedCodeWithSourceMap = `${codeWithoutSourceMap}
15183
- //# ${newSourceMap}`;
15184
- return remappedCodeWithSourceMap;
15185
- };
15186
- SourceMap.composeLines = function(upstreamMapping, lines) {
15187
- return lines.map(function(line, l) {
15165
+ var util_exports = {};
15166
+ __export(util_exports, {
15167
+ SourceMap: () => SourceMap,
15168
+ base64Encode: () => base64Encode,
15169
+ locationTable: () => locationTable,
15170
+ lookupLineColumn: () => lookupLineColumn
15171
+ });
15172
+ "civet coffeeCompat";
15173
+ var BASE64_CHARS;
15174
+ var VLQ_CONTINUATION_BIT;
15175
+ var VLQ_SHIFT;
15176
+ var VLQ_VALUE_MASK;
15177
+ var decodeError;
15178
+ var decodeVLQ;
15179
+ var encodeBase64;
15180
+ var encodeVlq;
15181
+ var prettySourceExcerpt;
15182
+ var remapPosition;
15183
+ var smRegexp;
15184
+ var vlqChars;
15185
+ var vlqTable;
15186
+ var locationTable = function(input) {
15187
+ var line, lines, linesRe, pos, result;
15188
+ linesRe = /([^\r\n]*)(\r\n|\r|\n|$)/y;
15189
+ lines = [];
15190
+ line = 0;
15191
+ pos = 0;
15192
+ while (result = linesRe.exec(input)) {
15193
+ pos += result[0].length;
15194
+ lines[line++] = pos;
15195
+ if (pos === input.length) {
15196
+ break;
15197
+ }
15198
+ }
15199
+ return lines;
15200
+ };
15201
+ var lookupLineColumn = function(table, pos) {
15202
+ var l, prevEnd;
15203
+ l = 0;
15204
+ prevEnd = 0;
15205
+ while (table[l] <= pos) {
15206
+ prevEnd = table[l++];
15207
+ }
15208
+ return [l, pos - prevEnd];
15209
+ };
15210
+ var SourceMap = function(sourceString) {
15211
+ var EOL, sm, srcTable;
15212
+ srcTable = locationTable(sourceString);
15213
+ sm = {
15214
+ lines: [[]],
15215
+ lineNum: 0,
15216
+ colOffset: 0,
15217
+ srcTable
15218
+ };
15219
+ EOL = /\r?\n|\r/;
15220
+ return {
15221
+ data: sm,
15222
+ source: function() {
15223
+ return sourceString;
15224
+ },
15225
+ renderMappings: function() {
15226
+ var lastSourceColumn, lastSourceLine;
15227
+ lastSourceLine = 0;
15228
+ lastSourceColumn = 0;
15229
+ return sm.lines.map(function(line) {
15188
15230
  return line.map(function(entry) {
15189
- var colDelta, sourceFileIndex, srcCol, srcLine, srcPos, upstreamCol, upstreamLine;
15190
- if (entry.length === 1) {
15191
- return entry;
15192
- }
15193
- [colDelta, sourceFileIndex, srcLine, srcCol] = entry;
15194
- srcPos = remapPosition([srcLine, srcCol], upstreamMapping);
15195
- if (!srcPos) {
15196
- return [entry[0]];
15197
- }
15198
- [upstreamLine, upstreamCol] = srcPos;
15231
+ var colDelta, lineDelta, sourceFileIndex, srcCol, srcLine;
15199
15232
  if (entry.length === 4) {
15200
- return [colDelta, sourceFileIndex, upstreamLine, upstreamCol];
15201
- }
15202
- return [colDelta, sourceFileIndex, upstreamLine, upstreamCol, entry[4]];
15203
- });
15204
- });
15205
- };
15206
- prettySourceExcerpt = function(source, location, length) {
15207
- var colNum, i, j, line, lineNum, lineNumStr, lines, ref, ref1;
15208
- lines = source.split(/\r?\n|\r/);
15209
- lineNum = location.line;
15210
- colNum = location.column;
15211
- for (i = j = ref = lineNum - 2, ref1 = lineNum + 2; ref <= ref1 ? j <= ref1 : j >= ref1; i = ref <= ref1 ? ++j : --j) {
15212
- if (i < 0 || i >= lines.length) {
15213
- continue;
15214
- }
15215
- line = lines[i];
15216
- lineNumStr = (i + 1).toString();
15217
- while (lineNumStr.length < 4) {
15218
- lineNumStr = " " + lineNumStr;
15219
- }
15220
- if (i === lineNum) {
15221
- console.log(`${lineNumStr}: ${line}`);
15222
- console.log(" ".repeat(lineNumStr.length + 2 + colNum) + "^".repeat(length));
15223
- } else {
15224
- console.log(`${lineNumStr}: ${line}`);
15225
- }
15226
- }
15227
- };
15228
- VLQ_SHIFT = 5;
15229
- VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT;
15230
- VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1;
15231
- encodeVlq = function(value) {
15232
- var answer, nextChunk, signBit, valueToEncode;
15233
- answer = "";
15234
- signBit = value < 0 ? 1 : 0;
15235
- valueToEncode = (Math.abs(value) << 1) + signBit;
15236
- while (valueToEncode || !answer) {
15237
- nextChunk = valueToEncode & VLQ_VALUE_MASK;
15238
- valueToEncode = valueToEncode >> VLQ_SHIFT;
15239
- if (valueToEncode) {
15240
- nextChunk |= VLQ_CONTINUATION_BIT;
15241
- }
15242
- answer += encodeBase64(nextChunk);
15243
- }
15244
- return answer;
15245
- };
15246
- BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
15247
- encodeBase64 = function(value) {
15248
- return BASE64_CHARS[value] || function() {
15249
- throw new Error(`Cannot Base64 encode value: ${value}`);
15250
- }();
15251
- };
15252
- base64Encode = function(src) {
15253
- return Buffer.from(src).toString("base64");
15254
- };
15255
- module.exports = { base64Encode, locationTable, lookupLineColumn, SourceMap };
15256
- vlqTable = new Uint8Array(128);
15257
- vlqChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
15258
- (function() {
15259
- var i, l, results;
15260
- i = 0;
15261
- l = vlqTable.length;
15262
- while (i < l) {
15263
- vlqTable[i] = 255;
15264
- i++;
15265
- }
15266
- i = 0;
15267
- l = vlqChars.length;
15268
- results = [];
15269
- while (i < l) {
15270
- vlqTable[vlqChars.charCodeAt(i)] = i;
15271
- results.push(i++);
15272
- }
15273
- return results;
15274
- })();
15275
- decodeError = function(message) {
15276
- throw new Error(message);
15277
- };
15278
- decodeVLQ = function(mapping) {
15279
- var c, i, index, l, result, shift, v, vlq;
15280
- i = 0;
15281
- l = mapping.length;
15282
- result = [];
15283
- while (i < l) {
15284
- shift = 0;
15285
- vlq = 0;
15286
- while (true) {
15287
- if (i >= l) {
15288
- decodeError("Unexpected early end of mapping data");
15289
- }
15290
- c = mapping.charCodeAt(i);
15291
- if ((c & 127) !== c) {
15292
- decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`);
15293
- }
15294
- index = vlqTable[c & 127];
15295
- if (index === 255) {
15296
- decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`);
15297
- }
15298
- i++;
15299
- vlq |= (index & 31) << shift;
15300
- shift += 5;
15301
- if ((index & 32) === 0) {
15302
- break;
15233
+ [colDelta, sourceFileIndex, srcLine, srcCol] = entry;
15234
+ lineDelta = srcLine - lastSourceLine;
15235
+ colDelta = srcCol - lastSourceColumn;
15236
+ lastSourceLine = srcLine;
15237
+ lastSourceColumn = srcCol;
15238
+ return `${encodeVlq(entry[0])}${encodeVlq(sourceFileIndex)}${encodeVlq(lineDelta)}${encodeVlq(colDelta)}`;
15239
+ } else {
15240
+ return encodeVlq(entry[0]);
15303
15241
  }
15242
+ }).join(",");
15243
+ }).join(";");
15244
+ },
15245
+ json: function(srcFileName, outFileName) {
15246
+ return {
15247
+ version: 3,
15248
+ file: outFileName,
15249
+ sources: [srcFileName],
15250
+ mappings: this.renderMappings(),
15251
+ names: [],
15252
+ sourcesContent: [sourceString]
15253
+ };
15254
+ },
15255
+ updateSourceMap: function(outputStr, inputPos) {
15256
+ var outLines, srcCol, srcLine;
15257
+ outLines = outputStr.split(EOL);
15258
+ if (inputPos != null) {
15259
+ [srcLine, srcCol] = lookupLineColumn(srcTable, inputPos);
15260
+ }
15261
+ outLines.forEach(function(line, i) {
15262
+ var l;
15263
+ if (i > 0) {
15264
+ sm.lineNum++;
15265
+ sm.colOffset = 0;
15266
+ sm.lines[sm.lineNum] = [];
15267
+ srcCol = 0;
15304
15268
  }
15305
- if (vlq & 1) {
15306
- v = -(vlq >> 1);
15307
- } else {
15308
- v = vlq >> 1;
15269
+ l = sm.colOffset;
15270
+ sm.colOffset = line.length;
15271
+ if (inputPos != null) {
15272
+ return sm.lines[sm.lineNum].push([l, 0, srcLine + i, srcCol]);
15273
+ } else if (l !== 0) {
15274
+ return sm.lines[sm.lineNum].push([l]);
15309
15275
  }
15310
- result.push(v);
15276
+ });
15277
+ }
15278
+ };
15279
+ };
15280
+ SourceMap.parseWithLines = function(base64encodedJSONstr) {
15281
+ var json, lines, sourceColumn, sourceLine;
15282
+ json = JSON.parse(Buffer.from(base64encodedJSONstr, "base64").toString("utf8"));
15283
+ sourceLine = 0;
15284
+ sourceColumn = 0;
15285
+ lines = json.mappings.split(";").map(function(line) {
15286
+ if (line.length === 0) {
15287
+ return [];
15288
+ }
15289
+ return line.split(",").map(function(entry) {
15290
+ var result;
15291
+ result = decodeVLQ(entry);
15292
+ switch (result.length) {
15293
+ case 1:
15294
+ return [result[0]];
15295
+ case 4:
15296
+ return [result[0], result[1], sourceLine += result[2], sourceColumn += result[3]];
15297
+ case 5:
15298
+ return [result[0], result[1], sourceLine += result[2], sourceColumn += result[3], result[4]];
15299
+ default:
15300
+ throw new Error("Unknown source map entry", result);
15311
15301
  }
15312
- return result;
15313
- };
15314
- remapPosition = function(position, sourcemapLines) {
15315
- var character, i, l, lastMapping, lastMappingPosition, line, mapping, p, textLine;
15316
- [line, character] = position;
15317
- textLine = sourcemapLines[line];
15318
- if (!(textLine != null ? textLine.length : void 0)) {
15319
- return void 0;
15320
- }
15321
- i = 0;
15322
- p = 0;
15323
- l = textLine.length;
15324
- lastMapping = void 0;
15325
- lastMappingPosition = 0;
15326
- while (i < l) {
15327
- mapping = textLine[i];
15328
- p += mapping[0];
15329
- if (mapping.length === 4) {
15330
- lastMapping = mapping;
15331
- lastMappingPosition = p;
15332
- }
15333
- if (p >= character) {
15334
- break;
15335
- }
15336
- i++;
15302
+ });
15303
+ });
15304
+ json.lines = lines;
15305
+ return json;
15306
+ };
15307
+ smRegexp = /\n\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,([+a-zA-Z0-9\/]*=?=?)$/;
15308
+ SourceMap.remap = function(codeWithSourceMap, upstreamMap, sourcePath, targetPath) {
15309
+ var codeWithoutSourceMap, composedLines, newSourceMap, parsed, remappedCodeWithSourceMap, remappedSourceMapJSON, sourceMapText;
15310
+ sourceMapText = codeWithSourceMap.match(smRegexp);
15311
+ if (sourceMapText) {
15312
+ parsed = SourceMap.parseWithLines(sourceMapText[1]);
15313
+ } else {
15314
+ console.warn("No source map found in code");
15315
+ return codeWithSourceMap;
15316
+ }
15317
+ composedLines = SourceMap.composeLines(upstreamMap.data.lines, parsed.lines);
15318
+ upstreamMap.data.lines = composedLines;
15319
+ remappedSourceMapJSON = upstreamMap.json(sourcePath, targetPath);
15320
+ codeWithoutSourceMap = codeWithSourceMap.replace(smRegexp, "");
15321
+ newSourceMap = `${"sourceMapping"}URL=data:application/json;charset=utf-8;base64,${base64Encode(JSON.stringify(remappedSourceMapJSON))}`;
15322
+ remappedCodeWithSourceMap = `${codeWithoutSourceMap}
15323
+ //# ${newSourceMap}`;
15324
+ return remappedCodeWithSourceMap;
15325
+ };
15326
+ SourceMap.composeLines = function(upstreamMapping, lines) {
15327
+ return lines.map(function(line, l) {
15328
+ return line.map(function(entry) {
15329
+ var colDelta, sourceFileIndex, srcCol, srcLine, srcPos, upstreamCol, upstreamLine;
15330
+ if (entry.length === 1) {
15331
+ return entry;
15337
15332
  }
15338
- if (character - lastMappingPosition !== 0) {
15339
- return void 0;
15333
+ [colDelta, sourceFileIndex, srcLine, srcCol] = entry;
15334
+ srcPos = remapPosition([srcLine, srcCol], upstreamMapping);
15335
+ if (!srcPos) {
15336
+ return [entry[0]];
15340
15337
  }
15341
- if (lastMapping) {
15342
- return [lastMapping[2], lastMapping[3]];
15343
- } else {
15344
- return void 0;
15338
+ [upstreamLine, upstreamCol] = srcPos;
15339
+ if (entry.length === 4) {
15340
+ return [colDelta, sourceFileIndex, upstreamLine, upstreamCol];
15345
15341
  }
15346
- };
15342
+ return [colDelta, sourceFileIndex, upstreamLine, upstreamCol, entry[4]];
15343
+ });
15344
+ });
15345
+ };
15346
+ prettySourceExcerpt = function(source, location, length) {
15347
+ var colNum, i, j, line, lineNum, lineNumStr, lines, ref, ref1;
15348
+ lines = source.split(/\r?\n|\r/);
15349
+ lineNum = location.line;
15350
+ colNum = location.column;
15351
+ for (i = j = ref = lineNum - 2, ref1 = lineNum + 2; ref <= ref1 ? j <= ref1 : j >= ref1; i = ref <= ref1 ? ++j : --j) {
15352
+ if (i < 0 || i >= lines.length) {
15353
+ continue;
15354
+ }
15355
+ line = lines[i];
15356
+ lineNumStr = (i + 1).toString();
15357
+ while (lineNumStr.length < 4) {
15358
+ lineNumStr = " " + lineNumStr;
15359
+ }
15360
+ if (i === lineNum) {
15361
+ console.log(`${lineNumStr}: ${line}`);
15362
+ console.log(" ".repeat(lineNumStr.length + 2 + colNum) + "^".repeat(length));
15363
+ } else {
15364
+ console.log(`${lineNumStr}: ${line}`);
15365
+ }
15347
15366
  }
15348
- });
15367
+ };
15368
+ VLQ_SHIFT = 5;
15369
+ VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT;
15370
+ VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1;
15371
+ encodeVlq = function(value) {
15372
+ var answer, nextChunk, signBit, valueToEncode;
15373
+ answer = "";
15374
+ signBit = value < 0 ? 1 : 0;
15375
+ valueToEncode = (Math.abs(value) << 1) + signBit;
15376
+ while (valueToEncode || !answer) {
15377
+ nextChunk = valueToEncode & VLQ_VALUE_MASK;
15378
+ valueToEncode = valueToEncode >> VLQ_SHIFT;
15379
+ if (valueToEncode) {
15380
+ nextChunk |= VLQ_CONTINUATION_BIT;
15381
+ }
15382
+ answer += encodeBase64(nextChunk);
15383
+ }
15384
+ return answer;
15385
+ };
15386
+ BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
15387
+ encodeBase64 = function(value) {
15388
+ return BASE64_CHARS[value] || function() {
15389
+ throw new Error(`Cannot Base64 encode value: ${value}`);
15390
+ }();
15391
+ };
15392
+ var base64Encode = function(src) {
15393
+ return Buffer.from(src).toString("base64");
15394
+ };
15395
+ vlqTable = new Uint8Array(128);
15396
+ vlqChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
15397
+ (function() {
15398
+ var i, l, results;
15399
+ i = 0;
15400
+ l = vlqTable.length;
15401
+ while (i < l) {
15402
+ vlqTable[i] = 255;
15403
+ i++;
15404
+ }
15405
+ i = 0;
15406
+ l = vlqChars.length;
15407
+ results = [];
15408
+ while (i < l) {
15409
+ vlqTable[vlqChars.charCodeAt(i)] = i;
15410
+ results.push(i++);
15411
+ }
15412
+ return results;
15413
+ })();
15414
+ decodeError = function(message) {
15415
+ throw new Error(message);
15416
+ };
15417
+ decodeVLQ = function(mapping) {
15418
+ var c, i, index, l, result, shift, v, vlq;
15419
+ i = 0;
15420
+ l = mapping.length;
15421
+ result = [];
15422
+ while (i < l) {
15423
+ shift = 0;
15424
+ vlq = 0;
15425
+ while (true) {
15426
+ if (i >= l) {
15427
+ decodeError("Unexpected early end of mapping data");
15428
+ }
15429
+ c = mapping.charCodeAt(i);
15430
+ if ((c & 127) !== c) {
15431
+ decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`);
15432
+ }
15433
+ index = vlqTable[c & 127];
15434
+ if (index === 255) {
15435
+ decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`);
15436
+ }
15437
+ i++;
15438
+ vlq |= (index & 31) << shift;
15439
+ shift += 5;
15440
+ if ((index & 32) === 0) {
15441
+ break;
15442
+ }
15443
+ }
15444
+ if (vlq & 1) {
15445
+ v = -(vlq >> 1);
15446
+ } else {
15447
+ v = vlq >> 1;
15448
+ }
15449
+ result.push(v);
15450
+ }
15451
+ return result;
15452
+ };
15453
+ remapPosition = function(position, sourcemapLines) {
15454
+ var character, i, l, lastMapping, lastMappingPosition, line, mapping, p, textLine;
15455
+ [line, character] = position;
15456
+ textLine = sourcemapLines[line];
15457
+ if (!(textLine != null ? textLine.length : void 0)) {
15458
+ return void 0;
15459
+ }
15460
+ i = 0;
15461
+ p = 0;
15462
+ l = textLine.length;
15463
+ lastMapping = void 0;
15464
+ lastMappingPosition = 0;
15465
+ while (i < l) {
15466
+ mapping = textLine[i];
15467
+ p += mapping[0];
15468
+ if (mapping.length === 4) {
15469
+ lastMapping = mapping;
15470
+ lastMappingPosition = p;
15471
+ }
15472
+ if (p >= character) {
15473
+ break;
15474
+ }
15475
+ i++;
15476
+ }
15477
+ if (character - lastMappingPosition !== 0) {
15478
+ return void 0;
15479
+ }
15480
+ if (lastMapping) {
15481
+ return [lastMapping[2], lastMapping[3]];
15482
+ } else {
15483
+ return void 0;
15484
+ }
15485
+ };
15349
15486
 
15350
15487
  // source/main.coffee
15351
- var require_main = __commonJS({
15352
- "source/main.coffee"(exports, module) {
15353
- "civet coffeeCompat";
15354
- var SourceMap;
15355
- var base64Encode;
15356
- var defaultOptions;
15357
- var gen;
15358
- var makeCache;
15359
- var parse;
15360
- var prune;
15361
- var uncacheable;
15362
- var util;
15363
- ({ parse } = require_parser());
15364
- ({ prune } = gen = require_generate());
15365
- ({ SourceMap, base64Encode } = util = require_util());
15366
- defaultOptions = {};
15367
- uncacheable = /* @__PURE__ */ new Set(["TrackIndented", "Samedent", "IndentedFurther", "PushIndent", "PopIndent", "Nested", "InsertIndent", "Arguments", "ArgumentsWithTrailingCallExpressions", "ApplicationStart", "CallExpression", "CallExpressionRest", "LeftHandSideExpression", "ActualAssignment", "UpdateExpression", "UnaryExpression", "BinaryOpExpression", "BinaryOpRHS", "ConditionalExpression", "ShortCircuitExpression", "InlineObjectLiteral", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "ObjectLiteral", "NestedObject", "NestedImplicitObjectLiteral", "BracedObjectLiteralContent", "NestedPropertyDefinitions", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedBlockStatement", "NestedElement", "NestedElementList", "NestedBindingElement", "NestedBindingElements", "NestedInterfaceProperty", "MemberExpression", "PrimaryExpression", "IndentedApplicationAllowed", "ExpressionWithIndentedApplicationSuppressed", "SuppressIndentedApplication", "AssignmentExpressionTail", "AssignmentExpression", "ExtendedExpression", "Expression", "MemberExpressionRest", "ElseClause", "CoffeeCommentEnabled", "SingleLineComment", "Debugger", "JSXElement", "TypedJSXElement", "JSXFragment", "TypedJSXFragment", "JSXChild", "JSXChildren", "JSXNestedChildren", "JSXMixedChildren"]);
15368
- module.exports = {
15369
- parse,
15370
- compile: function(src, options = defaultOptions) {
15371
- var ast, code, events, filename, sm, srcMapJSON;
15372
- filename = options.filename || "unknown";
15373
- if (filename.endsWith(".coffee") && !/^(#![^\r\n]*(\r\n|\n|\r))?\s*['"]civet/.test(src)) {
15374
- src = `"civet coffeeCompat"; ${src}`;
15375
- }
15376
- if (!options.noCache) {
15377
- events = makeCache();
15378
- }
15379
- ast = prune(parse(src, { filename, events }));
15380
- if (options.ast) {
15381
- return ast;
15382
- }
15383
- if (options.sourceMap || options.inlineMap) {
15384
- sm = SourceMap(src);
15385
- options.updateSourceMap = sm.updateSourceMap;
15386
- code = gen(ast, options);
15387
- if (options.inlineMap) {
15388
- srcMapJSON = sm.json(filename, "");
15389
- return `${code}
15390
- ${"//#"} sourceMappingURL=data:application/json;base64,${base64Encode(JSON.stringify(srcMapJSON))}
15488
+ "civet coffeeCompat";
15489
+ var SourceMap2;
15490
+ var base64Encode2;
15491
+ var defaultOptions;
15492
+ var makeCache;
15493
+ var parse;
15494
+ var uncacheable;
15495
+ ({ parse } = import_parser.default);
15496
+ ({ SourceMap: SourceMap2, base64Encode: base64Encode2 } = util_exports);
15497
+ defaultOptions = {};
15498
+ uncacheable = /* @__PURE__ */ new Set(["TrackIndented", "Samedent", "IndentedFurther", "PushIndent", "PopIndent", "Nested", "InsertIndent", "Arguments", "ArgumentsWithTrailingCallExpressions", "ApplicationStart", "CallExpression", "CallExpressionRest", "LeftHandSideExpression", "ActualAssignment", "UpdateExpression", "UnaryExpression", "BinaryOpExpression", "BinaryOpRHS", "ConditionalExpression", "ShortCircuitExpression", "InlineObjectLiteral", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedJSXChildExpression", "NestedJSXChildExpression", "ObjectLiteral", "NestedObject", "NestedImplicitObjectLiteral", "BracedObjectLiteralContent", "NestedPropertyDefinitions", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedBlockStatement", "NestedElement", "NestedElementList", "NestedBindingElement", "NestedBindingElements", "NestedInterfaceProperty", "MemberExpression", "PrimaryExpression", "IndentedApplicationAllowed", "ExpressionWithIndentedApplicationSuppressed", "SuppressIndentedApplication", "AssignmentExpressionTail", "AssignmentExpression", "ExtendedExpression", "Expression", "MemberExpressionRest", "ElseClause", "CoffeeCommentEnabled", "SingleLineComment", "Debugger", "JSXElement", "TypedJSXElement", "JSXFragment", "TypedJSXFragment", "JSXChild", "JSXChildren", "JSXNestedChildren", "JSXMixedChildren"]);
15499
+ var compile = function(src, options = defaultOptions) {
15500
+ var ast, code, events, filename, sm, srcMapJSON;
15501
+ filename = options.filename || "unknown";
15502
+ if (filename.endsWith(".coffee") && !/^(#![^\r\n]*(\r\n|\n|\r))?\s*['"]civet/.test(src)) {
15503
+ src = `"civet coffeeCompat"; ${src}`;
15504
+ }
15505
+ if (!options.noCache) {
15506
+ events = makeCache();
15507
+ }
15508
+ ast = prune(parse(src, { filename, events }));
15509
+ if (options.ast) {
15510
+ return ast;
15511
+ }
15512
+ if (options.sourceMap || options.inlineMap) {
15513
+ sm = SourceMap2(src);
15514
+ options.updateSourceMap = sm.updateSourceMap;
15515
+ code = generate_default(ast, options);
15516
+ if (options.inlineMap) {
15517
+ srcMapJSON = sm.json(filename, "");
15518
+ return `${code}
15519
+ ${"//#"} sourceMappingURL=data:application/json;base64,${base64Encode2(JSON.stringify(srcMapJSON))}
15391
15520
  `;
15392
- } else {
15393
- return {
15394
- code,
15395
- sourceMap: sm
15396
- };
15397
- }
15398
- }
15399
- return gen(ast, options);
15400
- },
15401
- generate: gen,
15402
- util
15403
- };
15404
- makeCache = function() {
15405
- var caches, events;
15406
- caches = /* @__PURE__ */ new Map();
15407
- events = {
15408
- enter: function(ruleName, state) {
15409
- var cache, result;
15410
- cache = caches.get(ruleName);
15411
- if (cache) {
15412
- if (cache.has(state.pos)) {
15413
- result = cache.get(state.pos);
15414
- return {
15415
- cache: result ? { ...result } : void 0
15416
- };
15417
- }
15418
- }
15419
- },
15420
- exit: function(ruleName, state, result) {
15421
- var cache;
15422
- cache = caches.get(ruleName);
15423
- if (!cache && !uncacheable.has(ruleName)) {
15424
- cache = /* @__PURE__ */ new Map();
15425
- caches.set(ruleName, cache);
15426
- }
15427
- if (cache) {
15428
- if (result) {
15429
- cache.set(state.pos, { ...result });
15430
- } else {
15431
- cache.set(state.pos, result);
15432
- }
15433
- }
15434
- if (parse.config.verbose && result) {
15435
- console.log(`Parsed ${JSON.stringify(state.input.slice(state.pos, result.pos))} [pos ${state.pos}-${result.pos}] as ${ruleName}`);
15436
- }
15437
- }
15521
+ } else {
15522
+ return {
15523
+ code,
15524
+ sourceMap: sm
15438
15525
  };
15439
- return events;
15440
- };
15526
+ }
15441
15527
  }
15442
- });
15443
- return require_main();
15528
+ return generate_default(ast, options);
15529
+ };
15530
+ makeCache = function() {
15531
+ var caches, events;
15532
+ caches = /* @__PURE__ */ new Map();
15533
+ events = {
15534
+ enter: function(ruleName, state) {
15535
+ var cache, result;
15536
+ cache = caches.get(ruleName);
15537
+ if (cache) {
15538
+ if (cache.has(state.pos)) {
15539
+ result = cache.get(state.pos);
15540
+ return {
15541
+ cache: result ? { ...result } : void 0
15542
+ };
15543
+ }
15544
+ }
15545
+ },
15546
+ exit: function(ruleName, state, result) {
15547
+ var cache;
15548
+ cache = caches.get(ruleName);
15549
+ if (!cache && !uncacheable.has(ruleName)) {
15550
+ cache = /* @__PURE__ */ new Map();
15551
+ caches.set(ruleName, cache);
15552
+ }
15553
+ if (cache) {
15554
+ if (result) {
15555
+ cache.set(state.pos, { ...result });
15556
+ } else {
15557
+ cache.set(state.pos, result);
15558
+ }
15559
+ }
15560
+ if (parse.config.verbose && result) {
15561
+ console.log(`Parsed ${JSON.stringify(state.input.slice(state.pos, result.pos))} [pos ${state.pos}-${result.pos}] as ${ruleName}`);
15562
+ }
15563
+ }
15564
+ };
15565
+ return events;
15566
+ };
15567
+ var main_default = { parse, generate: generate_default, util: util_exports, compile };
15568
+ return __toCommonJS(main_exports);
15444
15569
  })();