@danielx/civet 0.4.27 → 0.4.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -4,6 +4,85 @@ var __commonJS = (cb, mod) => function __require() {
4
4
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
5
5
  };
6
6
 
7
+ // source/generate.coffee
8
+ var require_generate = __commonJS({
9
+ "source/generate.coffee"(exports2, module2) {
10
+ "civet coffeeCompat";
11
+ var gen2;
12
+ var prune2;
13
+ gen2 = function(node, options) {
14
+ var $loc, token;
15
+ if (node === null || node === void 0) {
16
+ return "";
17
+ }
18
+ if (typeof node === "string") {
19
+ if (options != null) {
20
+ if (typeof options.updateSourceMap === "function") {
21
+ options.updateSourceMap(node);
22
+ }
23
+ }
24
+ return node;
25
+ }
26
+ if (Array.isArray(node)) {
27
+ return node.map(function(child) {
28
+ return gen2(child, options);
29
+ }).join("");
30
+ }
31
+ if (typeof node === "object") {
32
+ if (options.js && node.ts) {
33
+ return "";
34
+ }
35
+ if (node.$loc != null) {
36
+ ({ token, $loc } = node);
37
+ if (options != null) {
38
+ if (typeof options.updateSourceMap === "function") {
39
+ options.updateSourceMap(token, $loc.pos);
40
+ }
41
+ }
42
+ return token;
43
+ }
44
+ if (!node.children) {
45
+ debugger;
46
+ throw new Error("Unknown node", JSON.stringify(node));
47
+ }
48
+ return gen2(node.children, options);
49
+ }
50
+ debugger;
51
+ throw new Error("Unknown node", JSON.stringify(node));
52
+ };
53
+ module2.exports = gen2;
54
+ prune2 = function(node) {
55
+ var a;
56
+ if (node === null || node === void 0) {
57
+ return;
58
+ }
59
+ if (node.length === 0) {
60
+ return;
61
+ }
62
+ if (Array.isArray(node)) {
63
+ a = node.map(function(n) {
64
+ return prune2(n);
65
+ }).filter(function(n) {
66
+ return !!n;
67
+ });
68
+ if (a.length > 1) {
69
+ return a;
70
+ }
71
+ if (a.length === 1) {
72
+ return a[0];
73
+ }
74
+ return;
75
+ }
76
+ if (node.children != null) {
77
+ node.children = prune2(node.children) || [];
78
+ return node;
79
+ }
80
+ return node;
81
+ };
82
+ gen2.prune = prune2;
83
+ }
84
+ });
85
+
7
86
  // source/parser.hera
8
87
  var require_parser = __commonJS({
9
88
  "source/parser.hera"(exports2, module2) {
@@ -757,6 +836,7 @@ ${input.slice(result.pos)}
757
836
  JSXAttributeInitializer,
758
837
  JSXAttributeValue,
759
838
  JSXChildren,
839
+ JSXNestedChildren,
760
840
  JSXChild,
761
841
  JSXText,
762
842
  JSXChildExpression,
@@ -1003,57 +1083,58 @@ ${input.slice(result.pos)}
1003
1083
  var $R1 = $R(new RegExp("[&]", "suy"));
1004
1084
  var $R2 = $R(new RegExp("[!~+-]+", "suy"));
1005
1085
  var $R3 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
1006
- var $R4 = $R(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
1007
- var $R5 = $R(new RegExp("(?=[\\s\\)])", "suy"));
1008
- var $R6 = $R(new RegExp('[^;"\\s]+', "suy"));
1009
- var $R7 = $R(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)n", "suy"));
1010
- var $R8 = $R(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))", "suy"));
1011
- var $R9 = $R(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?", "suy"));
1012
- var $R10 = $R(new RegExp("(?:\\.[0-9](?:_[0-9]|[0-9])*)", "suy"));
1013
- var $R11 = $R(new RegExp("(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)", "suy"));
1014
- var $R12 = $R(new RegExp("0[bB][01](?:[01]|_[01])*n?", "suy"));
1015
- var $R13 = $R(new RegExp("0[oO][0-7](?:[0-7]|_[0-7])*n?", "suy"));
1016
- var $R14 = $R(new RegExp("0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?", "suy"));
1017
- var $R15 = $R(new RegExp('(?:\\\\.|[^"])*', "suy"));
1018
- var $R16 = $R(new RegExp("(?:\\\\.|[^'])*", "suy"));
1019
- var $R17 = $R(new RegExp('(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+', "suy"));
1020
- var $R18 = $R(new RegExp("(?:'(?!'')|\\\\.|[^'])*", "suy"));
1021
- var $R19 = $R(new RegExp('(?:\\\\.|#(?!\\{)|[^"#])+', "suy"));
1022
- var $R20 = $R(new RegExp("(?:\\\\.|[^\\]])*", "suy"));
1023
- var $R21 = $R(new RegExp("(?:\\\\.)", "suy"));
1024
- var $R22 = $R(new RegExp("[\\s]+", "suy"));
1025
- var $R23 = $R(new RegExp("\\/(?!\\/\\/)", "suy"));
1026
- var $R24 = $R(new RegExp("[^\\/\\s#\\\\]+", "suy"));
1027
- var $R25 = $R(new RegExp("[*\\/\\r\\n]", "suy"));
1028
- var $R26 = $R(new RegExp("(?:\\\\.|[^\\/\\r\\n])+", "suy"));
1029
- var $R27 = $R(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
1030
- var $R28 = $R(new RegExp("(?:\\$(?!\\{)|\\\\.|[^$`])+", "suy"));
1031
- var $R29 = $R(new RegExp("(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+", "suy"));
1032
- var $R30 = $R(new RegExp("(?:on|off|yes|no)(?!\\p{ID_Continue})", "suy"));
1033
- var $R31 = $R(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy"));
1034
- var $R32 = $R(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy"));
1035
- var $R33 = $R(new RegExp("(?:of)(?!\\p{ID_Continue})", "suy"));
1036
- var $R34 = $R(new RegExp("(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy"));
1037
- var $R35 = $R(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy"));
1038
- var $R36 = $R(new RegExp(".", "suy"));
1039
- var $R37 = $R(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy"));
1040
- var $R38 = $R(new RegExp("###(?!#)", "suy"));
1041
- var $R39 = $R(new RegExp("[^\\r\\n]", "suy"));
1042
- var $R40 = $R(new RegExp("[ \\t]+", "suy"));
1043
- var $R41 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
1044
- var $R42 = $R(new RegExp("\\s", "suy"));
1045
- var $R43 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
1046
- var $R44 = $R(new RegExp('"[^"]*"', "suy"));
1047
- var $R45 = $R(new RegExp("'[^']*'", "suy"));
1048
- var $R46 = $R(new RegExp("[^{}<>]+", "suy"));
1049
- var $R47 = $R(new RegExp("[+-]?", "suy"));
1050
- var $R48 = $R(new RegExp("[+-]", "suy"));
1051
- var $R49 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1052
- var $R50 = $R(new RegExp("[\\t ]*", "suy"));
1053
- var $R51 = $R(new RegExp("[\\s]*", "suy"));
1054
- var $R52 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1055
- var $R53 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1056
- var $R54 = $R(new RegExp("[ \\t]*", "suy"));
1086
+ var $R4 = $R(new RegExp("<(?!\\p{ID_Start}|[_$])", "suy"));
1087
+ var $R5 = $R(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
1088
+ var $R6 = $R(new RegExp("(?=[\\s\\)])", "suy"));
1089
+ var $R7 = $R(new RegExp('[^;"\\s]+', "suy"));
1090
+ var $R8 = $R(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)n", "suy"));
1091
+ var $R9 = $R(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))", "suy"));
1092
+ var $R10 = $R(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?", "suy"));
1093
+ var $R11 = $R(new RegExp("(?:\\.[0-9](?:_[0-9]|[0-9])*)", "suy"));
1094
+ var $R12 = $R(new RegExp("(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)", "suy"));
1095
+ var $R13 = $R(new RegExp("0[bB][01](?:[01]|_[01])*n?", "suy"));
1096
+ var $R14 = $R(new RegExp("0[oO][0-7](?:[0-7]|_[0-7])*n?", "suy"));
1097
+ var $R15 = $R(new RegExp("0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?", "suy"));
1098
+ var $R16 = $R(new RegExp('(?:\\\\.|[^"])*', "suy"));
1099
+ var $R17 = $R(new RegExp("(?:\\\\.|[^'])*", "suy"));
1100
+ var $R18 = $R(new RegExp('(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+', "suy"));
1101
+ var $R19 = $R(new RegExp("(?:'(?!'')|\\\\.|[^'])*", "suy"));
1102
+ var $R20 = $R(new RegExp('(?:\\\\.|#(?!\\{)|[^"#])+', "suy"));
1103
+ var $R21 = $R(new RegExp("(?:\\\\.|[^\\]])*", "suy"));
1104
+ var $R22 = $R(new RegExp("(?:\\\\.)", "suy"));
1105
+ var $R23 = $R(new RegExp("[\\s]+", "suy"));
1106
+ var $R24 = $R(new RegExp("\\/(?!\\/\\/)", "suy"));
1107
+ var $R25 = $R(new RegExp("[^\\/\\s#\\\\]+", "suy"));
1108
+ var $R26 = $R(new RegExp("[*\\/\\r\\n]", "suy"));
1109
+ var $R27 = $R(new RegExp("(?:\\\\.|[^\\/\\r\\n])+", "suy"));
1110
+ var $R28 = $R(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
1111
+ var $R29 = $R(new RegExp("(?:\\$(?!\\{)|\\\\.|[^$`])+", "suy"));
1112
+ var $R30 = $R(new RegExp("(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+", "suy"));
1113
+ var $R31 = $R(new RegExp("(?:on|off|yes|no)(?!\\p{ID_Continue})", "suy"));
1114
+ var $R32 = $R(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy"));
1115
+ var $R33 = $R(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy"));
1116
+ var $R34 = $R(new RegExp("(?:of)(?!\\p{ID_Continue})", "suy"));
1117
+ var $R35 = $R(new RegExp("(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy"));
1118
+ var $R36 = $R(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy"));
1119
+ var $R37 = $R(new RegExp(".", "suy"));
1120
+ var $R38 = $R(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy"));
1121
+ var $R39 = $R(new RegExp("###(?!#)", "suy"));
1122
+ var $R40 = $R(new RegExp("[^\\r\\n]", "suy"));
1123
+ var $R41 = $R(new RegExp("[ \\t]+", "suy"));
1124
+ var $R42 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
1125
+ var $R43 = $R(new RegExp("\\s", "suy"));
1126
+ var $R44 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
1127
+ var $R45 = $R(new RegExp('"[^"]*"', "suy"));
1128
+ var $R46 = $R(new RegExp("'[^']*'", "suy"));
1129
+ var $R47 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1130
+ var $R48 = $R(new RegExp("[+-]?", "suy"));
1131
+ var $R49 = $R(new RegExp("[+-]", "suy"));
1132
+ var $R50 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1133
+ var $R51 = $R(new RegExp("[\\t ]*", "suy"));
1134
+ var $R52 = $R(new RegExp("[\\s]*", "suy"));
1135
+ var $R53 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1136
+ var $R54 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1137
+ var $R55 = $R(new RegExp("[ \\t]*", "suy"));
1057
1138
  var Program$0 = $TS($S(Reset, Init, __, $Q(TopLevelStatement), __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
1058
1139
  var statements = $4;
1059
1140
  module2.processProgram(statements);
@@ -4698,7 +4779,14 @@ ${input.slice(result.pos)}
4698
4779
  };
4699
4780
  });
4700
4781
  var PropertyDefinition$1 = NamedProperty;
4701
- var PropertyDefinition$2 = MethodDefinition;
4782
+ var PropertyDefinition$2 = $TS($S(__, MethodDefinition), function($skip, $loc, $0, $1, $2) {
4783
+ var ws = $1;
4784
+ var def = $2;
4785
+ return {
4786
+ ...def,
4787
+ children: [...ws, ...def.children]
4788
+ };
4789
+ });
4702
4790
  var PropertyDefinition$3 = $TS($S(__, DotDotDot, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
4703
4791
  var ws = $1;
4704
4792
  var dots = $2;
@@ -5113,7 +5201,9 @@ ${input.slice(result.pos)}
5113
5201
  var BinaryOpSymbol$6 = $EXPECT($L53, fail, 'BinaryOpSymbol "<="');
5114
5202
  var BinaryOpSymbol$7 = $EXPECT($L54, fail, 'BinaryOpSymbol ">="');
5115
5203
  var BinaryOpSymbol$8 = $EXPECT($L55, fail, 'BinaryOpSymbol "<<"');
5116
- var BinaryOpSymbol$9 = $EXPECT($L5, fail, 'BinaryOpSymbol "<"');
5204
+ var BinaryOpSymbol$9 = $TR($EXPECT($R4, fail, "BinaryOpSymbol /<(?!\\p{ID_Start}|[_$])/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
5205
+ return "<";
5206
+ });
5117
5207
  var BinaryOpSymbol$10 = $EXPECT($L56, fail, 'BinaryOpSymbol ">>>"');
5118
5208
  var BinaryOpSymbol$11 = $EXPECT($L57, fail, 'BinaryOpSymbol ">>"');
5119
5209
  var BinaryOpSymbol$12 = $EXPECT($L25, fail, 'BinaryOpSymbol ">"');
@@ -5207,7 +5297,7 @@ ${input.slice(result.pos)}
5207
5297
  return result;
5208
5298
  }
5209
5299
  }
5210
- var UnaryOp$0 = $TR($EXPECT($R4, fail, "UnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
5300
+ var UnaryOp$0 = $TR($EXPECT($R5, fail, "UnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
5211
5301
  return { $loc, token: $0 };
5212
5302
  });
5213
5303
  var UnaryOp$1 = $S($C(Await, Delete, Void, Typeof), __);
@@ -6285,7 +6375,7 @@ ${input.slice(result.pos)}
6285
6375
  names: binding.names
6286
6376
  };
6287
6377
  });
6288
- var ForDeclaration$1 = $TS($S(InsertConst, ForBinding, $EXPECT($R5, fail, "ForDeclaration /(?=[\\s\\)])/")), function($skip, $loc, $0, $1, $2, $3) {
6378
+ var ForDeclaration$1 = $TS($S(InsertConst, ForBinding, $EXPECT($R6, fail, "ForDeclaration /(?=[\\s\\)])/")), function($skip, $loc, $0, $1, $2, $3) {
6289
6379
  var c = $1;
6290
6380
  var binding = $2;
6291
6381
  return {
@@ -6516,10 +6606,15 @@ ${input.slice(result.pos)}
6516
6606
  var expressions = value[2];
6517
6607
  return { "type": "CaseClause", "cases": cases, "expressions": expressions, "children": value };
6518
6608
  });
6519
- var CaseClause$1 = $TS($S(When, CaseExpressionList, InsertOpenBrace, $C(ThenClause, NestedBlockStatements), InsertBreak, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
6609
+ var CaseClause$1 = $TS($S(When, CaseExpressionList, InsertOpenBrace, $E($C(ThenClause, NestedBlockStatements)), InsertBreak, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
6520
6610
  var cases = $2;
6521
6611
  var expressions = $4;
6522
6612
  var b = $5;
6613
+ let children = $0;
6614
+ if (!expressions) {
6615
+ expressions = [];
6616
+ children = children.map((c, i) => i === 3 ? expressions : c);
6617
+ }
6523
6618
  if (expressions.expressions) {
6524
6619
  expressions = expressions.expressions;
6525
6620
  }
@@ -6528,7 +6623,7 @@ ${input.slice(result.pos)}
6528
6623
  cases,
6529
6624
  expressions,
6530
6625
  break: b,
6531
- children: $0
6626
+ children
6532
6627
  };
6533
6628
  });
6534
6629
  var CaseClause$2 = $TS($S(Default, ImpliedColon, $C(NestedBlockStatements, NoExpressions)), function($skip, $loc, $0, $1, $2, $3) {
@@ -6934,9 +7029,10 @@ ${input.slice(result.pos)}
6934
7029
  var MaybeNestedExpression$0 = $TS($S($N(EOS), ExtendedExpression), function($skip, $loc, $0, $1, $2) {
6935
7030
  return $2;
6936
7031
  });
6937
- var MaybeNestedExpression$1 = $T($S($Y(EOS), ObjectLiteral), function(value) {
6938
- return value[1];
7032
+ var MaybeNestedExpression$1 = $TS($S($Y(EOS), ObjectLiteral), function($skip, $loc, $0, $1, $2) {
7033
+ return $2;
6939
7034
  });
7035
+ var MaybeNestedExpression$2 = $S($Y(EOS), InsertSpace, InsertOpenParen, PushIndent, Nested, ExtendedExpression, PopIndent, InsertNewline, InsertIndent, InsertCloseParen);
6940
7036
  function MaybeNestedExpression(state) {
6941
7037
  if (state.events) {
6942
7038
  const result = state.events.enter?.("MaybeNestedExpression", state);
@@ -6944,12 +7040,12 @@ ${input.slice(result.pos)}
6944
7040
  return result.cache;
6945
7041
  }
6946
7042
  if (state.tokenize) {
6947
- const result = $TOKEN("MaybeNestedExpression", state, MaybeNestedExpression$0(state) || MaybeNestedExpression$1(state));
7043
+ const result = $TOKEN("MaybeNestedExpression", state, MaybeNestedExpression$0(state) || MaybeNestedExpression$1(state) || MaybeNestedExpression$2(state));
6948
7044
  if (state.events)
6949
7045
  state.events.exit?.("MaybeNestedExpression", state, result);
6950
7046
  return result;
6951
7047
  } else {
6952
- const result = MaybeNestedExpression$0(state) || MaybeNestedExpression$1(state);
7048
+ const result = MaybeNestedExpression$0(state) || MaybeNestedExpression$1(state) || MaybeNestedExpression$2(state);
6953
7049
  if (state.events)
6954
7050
  state.events.exit?.("MaybeNestedExpression", state, result);
6955
7051
  return result;
@@ -7214,7 +7310,7 @@ ${input.slice(result.pos)}
7214
7310
  return result;
7215
7311
  }
7216
7312
  }
7217
- var UnquotedSpecifier$0 = $TV($EXPECT($R6, fail, 'UnquotedSpecifier /[^;"\\s]+/'), function($skip, $loc, $0, $1) {
7313
+ var UnquotedSpecifier$0 = $TV($EXPECT($R7, fail, 'UnquotedSpecifier /[^;"\\s]+/'), function($skip, $loc, $0, $1) {
7218
7314
  var spec = $0;
7219
7315
  return { $loc, token: `"${spec}"` };
7220
7316
  });
@@ -7706,7 +7802,7 @@ ${input.slice(result.pos)}
7706
7802
  return result;
7707
7803
  }
7708
7804
  }
7709
- var DecimalBigIntegerLiteral$0 = $R$0($EXPECT($R7, fail, "DecimalBigIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)n/"));
7805
+ var DecimalBigIntegerLiteral$0 = $R$0($EXPECT($R8, fail, "DecimalBigIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)n/"));
7710
7806
  function DecimalBigIntegerLiteral(state) {
7711
7807
  if (state.events) {
7712
7808
  const result = state.events.enter?.("DecimalBigIntegerLiteral", state);
@@ -7725,11 +7821,11 @@ ${input.slice(result.pos)}
7725
7821
  return result;
7726
7822
  }
7727
7823
  }
7728
- var DecimalLiteral$0 = $TV($TEXT($EXPECT($R8, fail, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))/")), function($skip, $loc, $0, $1) {
7824
+ var DecimalLiteral$0 = $TV($TEXT($EXPECT($R9, fail, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))/")), function($skip, $loc, $0, $1) {
7729
7825
  return $1 + ".";
7730
7826
  });
7731
- var DecimalLiteral$1 = $TEXT($S($EXPECT($R9, fail, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?/"), $E(ExponentPart)));
7732
- var DecimalLiteral$2 = $TEXT($S($EXPECT($R10, fail, "DecimalLiteral /(?:\\.[0-9](?:_[0-9]|[0-9])*)/"), $E(ExponentPart)));
7827
+ var DecimalLiteral$1 = $TEXT($S($EXPECT($R10, fail, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?/"), $E(ExponentPart)));
7828
+ var DecimalLiteral$2 = $TEXT($S($EXPECT($R11, fail, "DecimalLiteral /(?:\\.[0-9](?:_[0-9]|[0-9])*)/"), $E(ExponentPart)));
7733
7829
  function DecimalLiteral(state) {
7734
7830
  if (state.events) {
7735
7831
  const result = state.events.enter?.("DecimalLiteral", state);
@@ -7748,7 +7844,7 @@ ${input.slice(result.pos)}
7748
7844
  return result;
7749
7845
  }
7750
7846
  }
7751
- var ExponentPart$0 = $R$0($EXPECT($R11, fail, "ExponentPart /(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)/"));
7847
+ var ExponentPart$0 = $R$0($EXPECT($R12, fail, "ExponentPart /(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)/"));
7752
7848
  function ExponentPart(state) {
7753
7849
  if (state.events) {
7754
7850
  const result = state.events.enter?.("ExponentPart", state);
@@ -7767,7 +7863,7 @@ ${input.slice(result.pos)}
7767
7863
  return result;
7768
7864
  }
7769
7865
  }
7770
- var BinaryIntegerLiteral$0 = $R$0($EXPECT($R12, fail, "BinaryIntegerLiteral /0[bB][01](?:[01]|_[01])*n?/"));
7866
+ var BinaryIntegerLiteral$0 = $R$0($EXPECT($R13, fail, "BinaryIntegerLiteral /0[bB][01](?:[01]|_[01])*n?/"));
7771
7867
  function BinaryIntegerLiteral(state) {
7772
7868
  if (state.events) {
7773
7869
  const result = state.events.enter?.("BinaryIntegerLiteral", state);
@@ -7786,7 +7882,7 @@ ${input.slice(result.pos)}
7786
7882
  return result;
7787
7883
  }
7788
7884
  }
7789
- var OctalIntegerLiteral$0 = $R$0($EXPECT($R13, fail, "OctalIntegerLiteral /0[oO][0-7](?:[0-7]|_[0-7])*n?/"));
7885
+ var OctalIntegerLiteral$0 = $R$0($EXPECT($R14, fail, "OctalIntegerLiteral /0[oO][0-7](?:[0-7]|_[0-7])*n?/"));
7790
7886
  function OctalIntegerLiteral(state) {
7791
7887
  if (state.events) {
7792
7888
  const result = state.events.enter?.("OctalIntegerLiteral", state);
@@ -7805,7 +7901,7 @@ ${input.slice(result.pos)}
7805
7901
  return result;
7806
7902
  }
7807
7903
  }
7808
- var HexLiteral$0 = $R$0($EXPECT($R14, fail, "HexLiteral /0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?/"));
7904
+ var HexLiteral$0 = $R$0($EXPECT($R15, fail, "HexLiteral /0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?/"));
7809
7905
  function HexLiteral(state) {
7810
7906
  if (state.events) {
7811
7907
  const result = state.events.enter?.("HexLiteral", state);
@@ -7885,7 +7981,7 @@ ${input.slice(result.pos)}
7885
7981
  return result;
7886
7982
  }
7887
7983
  }
7888
- var DoubleStringCharacters$0 = $TR($EXPECT($R15, fail, 'DoubleStringCharacters /(?:\\\\.|[^"])*/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
7984
+ var DoubleStringCharacters$0 = $TR($EXPECT($R16, fail, 'DoubleStringCharacters /(?:\\\\.|[^"])*/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
7889
7985
  return { $loc, token: $0 };
7890
7986
  });
7891
7987
  function DoubleStringCharacters(state) {
@@ -7906,7 +8002,7 @@ ${input.slice(result.pos)}
7906
8002
  return result;
7907
8003
  }
7908
8004
  }
7909
- var SingleStringCharacters$0 = $TR($EXPECT($R16, fail, "SingleStringCharacters /(?:\\\\.|[^'])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8005
+ var SingleStringCharacters$0 = $TR($EXPECT($R17, fail, "SingleStringCharacters /(?:\\\\.|[^'])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
7910
8006
  return { $loc, token: $0 };
7911
8007
  });
7912
8008
  function SingleStringCharacters(state) {
@@ -7927,7 +8023,7 @@ ${input.slice(result.pos)}
7927
8023
  return result;
7928
8024
  }
7929
8025
  }
7930
- var TripleDoubleStringCharacters$0 = $TR($EXPECT($R17, fail, 'TripleDoubleStringCharacters /(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8026
+ var TripleDoubleStringCharacters$0 = $TR($EXPECT($R18, fail, 'TripleDoubleStringCharacters /(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
7931
8027
  return { $loc, token: $0 };
7932
8028
  });
7933
8029
  function TripleDoubleStringCharacters(state) {
@@ -7948,7 +8044,7 @@ ${input.slice(result.pos)}
7948
8044
  return result;
7949
8045
  }
7950
8046
  }
7951
- var TripleSingleStringCharacters$0 = $TR($EXPECT($R18, fail, "TripleSingleStringCharacters /(?:'(?!'')|\\\\.|[^'])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8047
+ var TripleSingleStringCharacters$0 = $TR($EXPECT($R19, fail, "TripleSingleStringCharacters /(?:'(?!'')|\\\\.|[^'])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
7952
8048
  return { $loc, token: $0 };
7953
8049
  });
7954
8050
  function TripleSingleStringCharacters(state) {
@@ -8026,7 +8122,7 @@ ${input.slice(result.pos)}
8026
8122
  return result;
8027
8123
  }
8028
8124
  }
8029
- var CoffeeDoubleQuotedStringCharacters$0 = $TR($EXPECT($R19, fail, 'CoffeeDoubleQuotedStringCharacters /(?:\\\\.|#(?!\\{)|[^"#])+/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8125
+ var CoffeeDoubleQuotedStringCharacters$0 = $TR($EXPECT($R20, fail, 'CoffeeDoubleQuotedStringCharacters /(?:\\\\.|#(?!\\{)|[^"#])+/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8030
8126
  return { $loc, token: $0 };
8031
8127
  });
8032
8128
  function CoffeeDoubleQuotedStringCharacters(state) {
@@ -8090,7 +8186,7 @@ ${input.slice(result.pos)}
8090
8186
  return result;
8091
8187
  }
8092
8188
  }
8093
- var RegularExpressionClassCharacters$0 = $TR($EXPECT($R20, fail, "RegularExpressionClassCharacters /(?:\\\\.|[^\\]])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8189
+ var RegularExpressionClassCharacters$0 = $TR($EXPECT($R21, fail, "RegularExpressionClassCharacters /(?:\\\\.|[^\\]])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8094
8190
  return { $loc, token: $0 };
8095
8191
  });
8096
8192
  function RegularExpressionClassCharacters(state) {
@@ -8185,7 +8281,7 @@ ${input.slice(result.pos)}
8185
8281
  var HeregexPart$2 = $T($S(TemplateSubstitution), function(value) {
8186
8282
  return { "type": "Substitution", "children": value[0] };
8187
8283
  });
8188
- var HeregexPart$3 = $TR($EXPECT($R21, fail, "HeregexPart /(?:\\\\.)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8284
+ var HeregexPart$3 = $TR($EXPECT($R22, fail, "HeregexPart /(?:\\\\.)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8189
8285
  let token = $0;
8190
8286
  switch ($0[1]) {
8191
8287
  case "\n":
@@ -8203,13 +8299,13 @@ ${input.slice(result.pos)}
8203
8299
  var HeregexPart$4 = $TS($S(HeregexComment), function($skip, $loc, $0, $1) {
8204
8300
  return { $loc, token: "" };
8205
8301
  });
8206
- var HeregexPart$5 = $TR($EXPECT($R22, fail, "HeregexPart /[\\s]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8302
+ var HeregexPart$5 = $TR($EXPECT($R23, fail, "HeregexPart /[\\s]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8207
8303
  return { $loc, token: "" };
8208
8304
  });
8209
- var HeregexPart$6 = $TR($EXPECT($R23, fail, "HeregexPart /\\/(?!\\/\\/)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8305
+ var HeregexPart$6 = $TR($EXPECT($R24, fail, "HeregexPart /\\/(?!\\/\\/)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8210
8306
  return { $loc, token: "\\/" };
8211
8307
  });
8212
- var HeregexPart$7 = $TR($EXPECT($R24, fail, "HeregexPart /[^\\/\\s#\\\\]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8308
+ var HeregexPart$7 = $TR($EXPECT($R25, fail, "HeregexPart /[^\\/\\s#\\\\]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8213
8309
  return { $loc, token: $0 };
8214
8310
  });
8215
8311
  function HeregexPart(state) {
@@ -8250,7 +8346,7 @@ ${input.slice(result.pos)}
8250
8346
  return result;
8251
8347
  }
8252
8348
  }
8253
- var RegularExpressionBody$0 = $S($N($R$0($EXPECT($R25, fail, "RegularExpressionBody /[*\\/\\r\\n]/"))), $Q(RegExpCharacter));
8349
+ var RegularExpressionBody$0 = $S($N($R$0($EXPECT($R26, fail, "RegularExpressionBody /[*\\/\\r\\n]/"))), $Q(RegExpCharacter));
8254
8350
  function RegularExpressionBody(state) {
8255
8351
  if (state.events) {
8256
8352
  const result = state.events.enter?.("RegularExpressionBody", state);
@@ -8269,7 +8365,7 @@ ${input.slice(result.pos)}
8269
8365
  return result;
8270
8366
  }
8271
8367
  }
8272
- var RegExpCharacter$0 = $R$0($EXPECT($R26, fail, "RegExpCharacter /(?:\\\\.|[^\\/\\r\\n])+/"));
8368
+ var RegExpCharacter$0 = $R$0($EXPECT($R27, fail, "RegExpCharacter /(?:\\\\.|[^\\/\\r\\n])+/"));
8273
8369
  function RegExpCharacter(state) {
8274
8370
  if (state.events) {
8275
8371
  const result = state.events.enter?.("RegExpCharacter", state);
@@ -8288,7 +8384,7 @@ ${input.slice(result.pos)}
8288
8384
  return result;
8289
8385
  }
8290
8386
  }
8291
- var RegularExpressionFlags$0 = $R$0($EXPECT($R27, fail, "RegularExpressionFlags /(?:\\p{ID_Continue}|[\\u200C\\u200D$])*/"));
8387
+ var RegularExpressionFlags$0 = $R$0($EXPECT($R28, fail, "RegularExpressionFlags /(?:\\p{ID_Continue}|[\\u200C\\u200D$])*/"));
8292
8388
  function RegularExpressionFlags(state) {
8293
8389
  if (state.events) {
8294
8390
  const result = state.events.enter?.("RegularExpressionFlags", state);
@@ -8348,7 +8444,7 @@ ${input.slice(result.pos)}
8348
8444
  return result;
8349
8445
  }
8350
8446
  }
8351
- var TemplateCharacters$0 = $TR($EXPECT($R28, fail, "TemplateCharacters /(?:\\$(?!\\{)|\\\\.|[^$`])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8447
+ var TemplateCharacters$0 = $TR($EXPECT($R29, fail, "TemplateCharacters /(?:\\$(?!\\{)|\\\\.|[^$`])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8352
8448
  return { $loc, token: $0 };
8353
8449
  });
8354
8450
  function TemplateCharacters(state) {
@@ -8369,7 +8465,7 @@ ${input.slice(result.pos)}
8369
8465
  return result;
8370
8466
  }
8371
8467
  }
8372
- var TemplateBlockCharacters$0 = $TR($EXPECT($R29, fail, "TemplateBlockCharacters /(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8468
+ var TemplateBlockCharacters$0 = $TR($EXPECT($R30, fail, "TemplateBlockCharacters /(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8373
8469
  return { $loc, token: $0 };
8374
8470
  });
8375
8471
  function TemplateBlockCharacters(state) {
@@ -8390,11 +8486,11 @@ ${input.slice(result.pos)}
8390
8486
  return result;
8391
8487
  }
8392
8488
  }
8393
- var ReservedWord$0 = $S(CoffeeBooleansEnabled, $R$0($EXPECT($R30, fail, "ReservedWord /(?:on|off|yes|no)(?!\\p{ID_Continue})/")));
8394
- var ReservedWord$1 = $S(CoffeeIsntEnabled, $R$0($EXPECT($R31, fail, "ReservedWord /(?:isnt)(?!\\p{ID_Continue})/")));
8395
- var ReservedWord$2 = $S(CoffeeForLoopsEnabled, $R$0($EXPECT($R32, fail, "ReservedWord /(?:by)(?!\\p{ID_Continue})/")));
8396
- var ReservedWord$3 = $S(CoffeeOfEnabled, $R$0($EXPECT($R33, fail, "ReservedWord /(?:of)(?!\\p{ID_Continue})/")));
8397
- var ReservedWord$4 = $R$0($EXPECT($R34, fail, "ReservedWord /(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})/"));
8489
+ var ReservedWord$0 = $S(CoffeeBooleansEnabled, $R$0($EXPECT($R31, fail, "ReservedWord /(?:on|off|yes|no)(?!\\p{ID_Continue})/")));
8490
+ var ReservedWord$1 = $S(CoffeeIsntEnabled, $R$0($EXPECT($R32, fail, "ReservedWord /(?:isnt)(?!\\p{ID_Continue})/")));
8491
+ var ReservedWord$2 = $S(CoffeeForLoopsEnabled, $R$0($EXPECT($R33, fail, "ReservedWord /(?:by)(?!\\p{ID_Continue})/")));
8492
+ var ReservedWord$3 = $S(CoffeeOfEnabled, $R$0($EXPECT($R34, fail, "ReservedWord /(?:of)(?!\\p{ID_Continue})/")));
8493
+ var ReservedWord$4 = $R$0($EXPECT($R35, fail, "ReservedWord /(?:and|as|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|null|or|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})/"));
8398
8494
  function ReservedWord(state) {
8399
8495
  if (state.events) {
8400
8496
  const result = state.events.enter?.("ReservedWord", state);
@@ -8453,7 +8549,7 @@ ${input.slice(result.pos)}
8453
8549
  return result;
8454
8550
  }
8455
8551
  }
8456
- var JSSingleLineComment$0 = $TR($EXPECT($R35, fail, "JSSingleLineComment /\\/\\/(?!\\/)[^\\r\\n]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8552
+ var JSSingleLineComment$0 = $TR($EXPECT($R36, fail, "JSSingleLineComment /\\/\\/(?!\\/)[^\\r\\n]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8457
8553
  return { $loc, token: $0 };
8458
8554
  });
8459
8555
  function JSSingleLineComment(state) {
@@ -8494,7 +8590,7 @@ ${input.slice(result.pos)}
8494
8590
  return result;
8495
8591
  }
8496
8592
  }
8497
- var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($L86, fail, 'JSMultiLineComment "/*"'), $Q($S($N($EXPECT($L87, fail, 'JSMultiLineComment "*/"')), $EXPECT($R36, fail, "JSMultiLineComment /./"))), $EXPECT($L87, fail, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
8593
+ var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($L86, fail, 'JSMultiLineComment "/*"'), $Q($S($N($EXPECT($L87, fail, 'JSMultiLineComment "*/"')), $EXPECT($R37, fail, "JSMultiLineComment /./"))), $EXPECT($L87, fail, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
8498
8594
  return { $loc, token: $1 };
8499
8595
  });
8500
8596
  function JSMultiLineComment(state) {
@@ -8515,7 +8611,7 @@ ${input.slice(result.pos)}
8515
8611
  return result;
8516
8612
  }
8517
8613
  }
8518
- var CoffeeSingleLineComment$0 = $TR($EXPECT($R37, fail, "CoffeeSingleLineComment /#(?!##(?!#))([^\\r\\n]*)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8614
+ var CoffeeSingleLineComment$0 = $TR($EXPECT($R38, fail, "CoffeeSingleLineComment /#(?!##(?!#))([^\\r\\n]*)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8519
8615
  return { $loc, token: `//${$1}` };
8520
8616
  });
8521
8617
  function CoffeeSingleLineComment(state) {
@@ -8536,7 +8632,7 @@ ${input.slice(result.pos)}
8536
8632
  return result;
8537
8633
  }
8538
8634
  }
8539
- var CoffeeMultiLineComment$0 = $TS($S(CoffeeHereCommentStart, $TEXT($Q($S($N($C(CoffeeHereCommentStart, $EXPECT($L87, fail, 'CoffeeMultiLineComment "*/"'))), $EXPECT($R36, fail, "CoffeeMultiLineComment /./")))), CoffeeHereCommentStart), function($skip, $loc, $0, $1, $2, $3) {
8635
+ var CoffeeMultiLineComment$0 = $TS($S(CoffeeHereCommentStart, $TEXT($Q($S($N($C(CoffeeHereCommentStart, $EXPECT($L87, fail, 'CoffeeMultiLineComment "*/"'))), $EXPECT($R37, fail, "CoffeeMultiLineComment /./")))), CoffeeHereCommentStart), function($skip, $loc, $0, $1, $2, $3) {
8540
8636
  return { $loc, token: `/*${$2}*/` };
8541
8637
  });
8542
8638
  function CoffeeMultiLineComment(state) {
@@ -8557,7 +8653,7 @@ ${input.slice(result.pos)}
8557
8653
  return result;
8558
8654
  }
8559
8655
  }
8560
- var CoffeeHereCommentStart$0 = $R$0($EXPECT($R38, fail, "CoffeeHereCommentStart /###(?!#)/"));
8656
+ var CoffeeHereCommentStart$0 = $R$0($EXPECT($R39, fail, "CoffeeHereCommentStart /###(?!#)/"));
8561
8657
  function CoffeeHereCommentStart(state) {
8562
8658
  if (state.events) {
8563
8659
  const result = state.events.enter?.("CoffeeHereCommentStart", state);
@@ -8576,7 +8672,7 @@ ${input.slice(result.pos)}
8576
8672
  return result;
8577
8673
  }
8578
8674
  }
8579
- var InlineComment$0 = $TV($TEXT($S($EXPECT($L86, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L87, fail, 'InlineComment "*/"')), $EXPECT($R39, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L87, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
8675
+ var InlineComment$0 = $TV($TEXT($S($EXPECT($L86, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L87, fail, 'InlineComment "*/"')), $EXPECT($R40, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L87, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
8580
8676
  return { $loc, token: $1 };
8581
8677
  });
8582
8678
  function InlineComment(state) {
@@ -8656,7 +8752,7 @@ ${input.slice(result.pos)}
8656
8752
  return result;
8657
8753
  }
8658
8754
  }
8659
- var NonNewlineWhitespace$0 = $TR($EXPECT($R40, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8755
+ var NonNewlineWhitespace$0 = $TR($EXPECT($R41, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8660
8756
  return { $loc, token: $0 };
8661
8757
  });
8662
8758
  var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L88, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
@@ -8699,7 +8795,7 @@ ${input.slice(result.pos)}
8699
8795
  return result;
8700
8796
  }
8701
8797
  }
8702
- var Whitespace$0 = $TR($EXPECT($R22, fail, "Whitespace /[\\s]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8798
+ var Whitespace$0 = $TR($EXPECT($R23, fail, "Whitespace /[\\s]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8703
8799
  return { $loc, token: $0 };
8704
8800
  });
8705
8801
  function Whitespace(state) {
@@ -8765,7 +8861,7 @@ ${input.slice(result.pos)}
8765
8861
  return result;
8766
8862
  }
8767
8863
  }
8768
- var NonIdContinue$0 = $R$0($EXPECT($R41, fail, "NonIdContinue /(?!\\p{ID_Continue})/"));
8864
+ var NonIdContinue$0 = $R$0($EXPECT($R42, fail, "NonIdContinue /(?!\\p{ID_Continue})/"));
8769
8865
  function NonIdContinue(state) {
8770
8866
  if (state.events) {
8771
8867
  const result = state.events.enter?.("NonIdContinue", state);
@@ -9498,7 +9594,7 @@ ${input.slice(result.pos)}
9498
9594
  return result;
9499
9595
  }
9500
9596
  }
9501
- var Import$0 = $TS($S($EXPECT($L10, fail, 'Import "import"'), $Y($EXPECT($R42, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
9597
+ var Import$0 = $TS($S($EXPECT($L10, fail, 'Import "import"'), $Y($EXPECT($R43, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
9502
9598
  return { $loc, token: $1 };
9503
9599
  });
9504
9600
  function Import(state) {
@@ -10237,12 +10333,24 @@ ${input.slice(result.pos)}
10237
10333
  }
10238
10334
  }
10239
10335
  var JSXElement$0 = JSXSelfClosingElement;
10240
- var JSXElement$1 = $TS($S(JSXOpeningElement, $Q(JSXChildren), __, JSXClosingElement), function($skip, $loc, $0, $1, $2, $3, $4) {
10241
- if ($1[1] !== $4[2]) {
10242
- throw new Error(`mismatched closing tags at ${JSON.stringify($loc)}`);
10243
- }
10336
+ var JSXElement$1 = $TS($S(JSXOpeningElement, $E(JSXChildren), __, JSXClosingElement), function($skip, $loc, $0, $1, $2, $3, $4) {
10337
+ if ($1[1] !== $4[2])
10338
+ return $skip;
10244
10339
  return $0;
10245
10340
  });
10341
+ var JSXElement$2 = $TS($S(JSXOpeningElement, $Q($C(_, JSXChild)), JSXNestedChildren, InsertNewline, InsertIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
10342
+ var open = $1;
10343
+ var c1 = $2;
10344
+ var c2 = $3;
10345
+ if (c1.length || c2.length) {
10346
+ return [...$0, ["</", open[1], ">"]];
10347
+ } else {
10348
+ return [open.slice(0, -1), " />"];
10349
+ }
10350
+ });
10351
+ var JSXElement$3 = $TS($S(JSXOpeningElement), function($skip, $loc, $0, $1) {
10352
+ throw new Error(`could not parse JSX element "${require_generate()($0)}" at pos ${$loc.pos}`);
10353
+ });
10246
10354
  function JSXElement(state) {
10247
10355
  if (state.events) {
10248
10356
  const result = state.events.enter?.("JSXElement", state);
@@ -10250,12 +10358,12 @@ ${input.slice(result.pos)}
10250
10358
  return result.cache;
10251
10359
  }
10252
10360
  if (state.tokenize) {
10253
- const result = $TOKEN("JSXElement", state, JSXElement$0(state) || JSXElement$1(state));
10361
+ const result = $TOKEN("JSXElement", state, JSXElement$0(state) || JSXElement$1(state) || JSXElement$2(state) || JSXElement$3(state));
10254
10362
  if (state.events)
10255
10363
  state.events.exit?.("JSXElement", state, result);
10256
10364
  return result;
10257
10365
  } else {
10258
- const result = JSXElement$0(state) || JSXElement$1(state);
10366
+ const result = JSXElement$0(state) || JSXElement$1(state) || JSXElement$2(state) || JSXElement$3(state);
10259
10367
  if (state.events)
10260
10368
  state.events.exit?.("JSXElement", state, result);
10261
10369
  return result;
@@ -10319,6 +10427,9 @@ ${input.slice(result.pos)}
10319
10427
  }
10320
10428
  }
10321
10429
  var JSXFragment$0 = $S($EXPECT($L145, fail, 'JSXFragment "<>"'), $E(JSXChildren), $EXPECT($L146, fail, 'JSXFragment "</>"'));
10430
+ var JSXFragment$1 = $TS($S($EXPECT($L145, fail, 'JSXFragment "<>"'), JSXNestedChildren, InsertNewline, InsertIndent), function($skip, $loc, $0, $1, $2, $3, $4) {
10431
+ return [...$0, "</>"];
10432
+ });
10322
10433
  function JSXFragment(state) {
10323
10434
  if (state.events) {
10324
10435
  const result = state.events.enter?.("JSXFragment", state);
@@ -10326,12 +10437,12 @@ ${input.slice(result.pos)}
10326
10437
  return result.cache;
10327
10438
  }
10328
10439
  if (state.tokenize) {
10329
- const result = $TOKEN("JSXFragment", state, JSXFragment$0(state));
10440
+ const result = $TOKEN("JSXFragment", state, JSXFragment$0(state) || JSXFragment$1(state));
10330
10441
  if (state.events)
10331
10442
  state.events.exit?.("JSXFragment", state, result);
10332
10443
  return result;
10333
10444
  } else {
10334
- const result = JSXFragment$0(state);
10445
+ const result = JSXFragment$0(state) || JSXFragment$1(state);
10335
10446
  if (state.events)
10336
10447
  state.events.exit?.("JSXFragment", state, result);
10337
10448
  return result;
@@ -10356,7 +10467,7 @@ ${input.slice(result.pos)}
10356
10467
  return result;
10357
10468
  }
10358
10469
  }
10359
- var JSXIdentifierName$0 = $R$0($EXPECT($R43, fail, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
10470
+ var JSXIdentifierName$0 = $R$0($EXPECT($R44, fail, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
10360
10471
  function JSXIdentifierName(state) {
10361
10472
  if (state.events) {
10362
10473
  const result = state.events.enter?.("JSXIdentifierName", state);
@@ -10452,8 +10563,8 @@ ${input.slice(result.pos)}
10452
10563
  return result;
10453
10564
  }
10454
10565
  }
10455
- var JSXAttributeValue$0 = $R$0($EXPECT($R44, fail, 'JSXAttributeValue /"[^"]*"/'));
10456
- var JSXAttributeValue$1 = $R$0($EXPECT($R45, fail, "JSXAttributeValue /'[^']*'/"));
10566
+ var JSXAttributeValue$0 = $R$0($EXPECT($R45, fail, 'JSXAttributeValue /"[^"]*"/'));
10567
+ var JSXAttributeValue$1 = $R$0($EXPECT($R46, fail, "JSXAttributeValue /'[^']*'/"));
10457
10568
  var JSXAttributeValue$2 = $S(OpenBrace, ExtendedExpression, __, CloseBrace);
10458
10569
  var JSXAttributeValue$3 = JSXElement;
10459
10570
  var JSXAttributeValue$4 = JSXFragment;
@@ -10494,6 +10605,32 @@ ${input.slice(result.pos)}
10494
10605
  return result;
10495
10606
  }
10496
10607
  }
10608
+ var JSXNestedChildren$0 = $TS($S(PushIndent, $Q($S(Nested, $P(JSXChild))), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
10609
+ if ($2.length)
10610
+ return $2;
10611
+ return $skip;
10612
+ });
10613
+ var JSXNestedChildren$1 = $TV($Y(EOS), function($skip, $loc, $0, $1) {
10614
+ return [];
10615
+ });
10616
+ function JSXNestedChildren(state) {
10617
+ if (state.events) {
10618
+ const result = state.events.enter?.("JSXNestedChildren", state);
10619
+ if (result)
10620
+ return result.cache;
10621
+ }
10622
+ if (state.tokenize) {
10623
+ const result = $TOKEN("JSXNestedChildren", state, JSXNestedChildren$0(state) || JSXNestedChildren$1(state));
10624
+ if (state.events)
10625
+ state.events.exit?.("JSXNestedChildren", state, result);
10626
+ return result;
10627
+ } else {
10628
+ const result = JSXNestedChildren$0(state) || JSXNestedChildren$1(state);
10629
+ if (state.events)
10630
+ state.events.exit?.("JSXNestedChildren", state, result);
10631
+ return result;
10632
+ }
10633
+ }
10497
10634
  var JSXChild$0 = JSXText;
10498
10635
  var JSXChild$1 = JSXElement;
10499
10636
  var JSXChild$2 = JSXFragment;
@@ -10516,7 +10653,7 @@ ${input.slice(result.pos)}
10516
10653
  return result;
10517
10654
  }
10518
10655
  }
10519
- var JSXText$0 = $R$0($EXPECT($R46, fail, "JSXText /[^{}<>]+/"));
10656
+ var JSXText$0 = $R$0($EXPECT($R47, fail, "JSXText /[^{}<>\\r\\n]+/"));
10520
10657
  function JSXText(state) {
10521
10658
  if (state.events) {
10522
10659
  const result = state.events.enter?.("JSXText", state);
@@ -10844,7 +10981,7 @@ ${input.slice(result.pos)}
10844
10981
  return result;
10845
10982
  }
10846
10983
  }
10847
- var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R47, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L151, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R48, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
10984
+ var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R48, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L151, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R49, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
10848
10985
  function TypeIndexSignature(state) {
10849
10986
  if (state.events) {
10850
10987
  const result = state.events.enter?.("TypeIndexSignature", state);
@@ -11382,7 +11519,7 @@ ${input.slice(result.pos)}
11382
11519
  return result;
11383
11520
  }
11384
11521
  }
11385
- var Shebang$0 = $S($R$0($EXPECT($R49, fail, "Shebang /#![^\\r\\n]*/")), EOL);
11522
+ var Shebang$0 = $S($R$0($EXPECT($R50, fail, "Shebang /#![^\\r\\n]*/")), EOL);
11386
11523
  function Shebang(state) {
11387
11524
  if (state.events) {
11388
11525
  const result = state.events.enter?.("Shebang", state);
@@ -11401,11 +11538,11 @@ ${input.slice(result.pos)}
11401
11538
  return result;
11402
11539
  }
11403
11540
  }
11404
- var CivetPrologue$0 = $T($S($EXPECT($R50, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
11541
+ var CivetPrologue$0 = $T($S($EXPECT($R51, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
11405
11542
  var content = value[2];
11406
11543
  return content;
11407
11544
  });
11408
- var CivetPrologue$1 = $T($S($EXPECT($R50, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
11545
+ var CivetPrologue$1 = $T($S($EXPECT($R51, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
11409
11546
  var content = value[2];
11410
11547
  return content;
11411
11548
  });
@@ -11427,7 +11564,7 @@ ${input.slice(result.pos)}
11427
11564
  return result;
11428
11565
  }
11429
11566
  }
11430
- var CivetPrologueContent$0 = $TS($S($EXPECT($L156, fail, 'CivetPrologueContent "civet"'), $Q(CivetOption), $EXPECT($R51, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3) {
11567
+ var CivetPrologueContent$0 = $TS($S($EXPECT($L156, fail, 'CivetPrologueContent "civet"'), $Q(CivetOption), $EXPECT($R52, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3) {
11431
11568
  var options = $2;
11432
11569
  return {
11433
11570
  type: "CivetPrologue",
@@ -11453,7 +11590,7 @@ ${input.slice(result.pos)}
11453
11590
  return result;
11454
11591
  }
11455
11592
  }
11456
- var CivetOption$0 = $TR($EXPECT($R52, 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) {
11593
+ 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) {
11457
11594
  const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
11458
11595
  if (l)
11459
11596
  return l.toUpperCase();
@@ -11485,7 +11622,7 @@ ${input.slice(result.pos)}
11485
11622
  return result;
11486
11623
  }
11487
11624
  }
11488
- var UnknownPrologue$0 = $S($R$0($EXPECT($R50, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(StatementDelimiter), EOS);
11625
+ var UnknownPrologue$0 = $S($R$0($EXPECT($R51, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(StatementDelimiter), EOS);
11489
11626
  function UnknownPrologue(state) {
11490
11627
  if (state.events) {
11491
11628
  const result = state.events.enter?.("UnknownPrologue", state);
@@ -11543,7 +11680,7 @@ ${input.slice(result.pos)}
11543
11680
  return result;
11544
11681
  }
11545
11682
  }
11546
- var EOL$0 = $TR($EXPECT($R53, fail, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11683
+ 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) {
11547
11684
  return { $loc, token: $0 };
11548
11685
  });
11549
11686
  function EOL(state) {
@@ -12126,8 +12263,7 @@ ${input.slice(result.pos)}
12126
12263
  }
12127
12264
  });
12128
12265
  }
12129
- module2.verbose = false;
12130
- module2.config = {
12266
+ module2.config = parse2.config = {
12131
12267
  autoVar: false,
12132
12268
  coffeeBinaryExistential: false,
12133
12269
  coffeeBooleans: false,
@@ -12142,7 +12278,8 @@ ${input.slice(result.pos)}
12142
12278
  coffeeNot: false,
12143
12279
  coffeeOf: false,
12144
12280
  implicitReturns: true,
12145
- tab: void 0
12281
+ tab: void 0,
12282
+ verbose: false
12146
12283
  };
12147
12284
  let indexOfRef, hasPropRef, spliceRef;
12148
12285
  const asAny = {
@@ -12421,6 +12558,10 @@ ${input.slice(result.pos)}
12421
12558
  return;
12422
12559
  case "WhenClause":
12423
12560
  node.children.splice(node.children.indexOf(node.break), 1);
12561
+ if (node.expressions.length === 0) {
12562
+ node.expressions.push("return");
12563
+ return;
12564
+ }
12424
12565
  insertReturn(node.expressions[node.expressions.length - 1]);
12425
12566
  return;
12426
12567
  case "DefaultClause":
@@ -13015,7 +13156,7 @@ ${input.slice(result.pos)}
13015
13156
  return result;
13016
13157
  }
13017
13158
  }
13018
- var Indent$0 = $TR($EXPECT($R54, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13159
+ var Indent$0 = $TR($EXPECT($R55, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13019
13160
  let level;
13020
13161
  if (module2.config.tab) {
13021
13162
  const tabs = $0.match(/\t/g);
@@ -13054,6 +13195,9 @@ ${input.slice(result.pos)}
13054
13195
  if (level <= module2.currentIndent.level) {
13055
13196
  return $skip;
13056
13197
  }
13198
+ if (module2.config.verbose) {
13199
+ console.log("pushing indent", indent);
13200
+ }
13057
13201
  module2.indentLevels.push(indent);
13058
13202
  });
13059
13203
  function TrackIndented(state) {
@@ -13148,7 +13292,7 @@ ${input.slice(result.pos)}
13148
13292
  }
13149
13293
  }
13150
13294
  var PopIndent$0 = $TV($EXPECT($L0, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
13151
- if (module2.verbose) {
13295
+ if (module2.config.verbose) {
13152
13296
  console.log("popping indent", module2.indentLevels[module2.indentLevels.length - 1], "->", module2.indentLevels[module2.indentLevels.length - 2]);
13153
13297
  }
13154
13298
  module2.indentLevels.pop();
@@ -13176,11 +13320,11 @@ ${input.slice(result.pos)}
13176
13320
  var indent = $2;
13177
13321
  const { level } = indent;
13178
13322
  const currentIndent = module2.currentIndent;
13179
- if (module2.verbose) {
13323
+ if (module2.config.verbose) {
13180
13324
  console.log("Indented", level, currentIndent);
13181
13325
  }
13182
13326
  if (level !== currentIndent.level) {
13183
- if (module2.verbose) {
13327
+ if (module2.config.verbose) {
13184
13328
  console.log("skipped nested");
13185
13329
  }
13186
13330
  return $skip;
@@ -13210,85 +13354,6 @@ ${input.slice(result.pos)}
13210
13354
  }
13211
13355
  });
13212
13356
 
13213
- // source/generate.coffee
13214
- var require_generate = __commonJS({
13215
- "source/generate.coffee"(exports2, module2) {
13216
- "civet coffeeCompat";
13217
- var gen2;
13218
- var prune2;
13219
- gen2 = function(node, options) {
13220
- var $loc, token;
13221
- if (node === null || node === void 0) {
13222
- return "";
13223
- }
13224
- if (typeof node === "string") {
13225
- if (options != null) {
13226
- if (typeof options.updateSourceMap === "function") {
13227
- options.updateSourceMap(node);
13228
- }
13229
- }
13230
- return node;
13231
- }
13232
- if (Array.isArray(node)) {
13233
- return node.map(function(child) {
13234
- return gen2(child, options);
13235
- }).join("");
13236
- }
13237
- if (typeof node === "object") {
13238
- if (options.js && node.ts) {
13239
- return "";
13240
- }
13241
- if (node.$loc != null) {
13242
- ({ token, $loc } = node);
13243
- if (options != null) {
13244
- if (typeof options.updateSourceMap === "function") {
13245
- options.updateSourceMap(token, $loc.pos);
13246
- }
13247
- }
13248
- return token;
13249
- }
13250
- if (!node.children) {
13251
- debugger;
13252
- throw new Error("Unknown node", JSON.stringify(node));
13253
- }
13254
- return gen2(node.children, options);
13255
- }
13256
- debugger;
13257
- throw new Error("Unknown node", JSON.stringify(node));
13258
- };
13259
- module2.exports = gen2;
13260
- prune2 = function(node) {
13261
- var a;
13262
- if (node === null || node === void 0) {
13263
- return;
13264
- }
13265
- if (node.length === 0) {
13266
- return;
13267
- }
13268
- if (Array.isArray(node)) {
13269
- a = node.map(function(n) {
13270
- return prune2(n);
13271
- }).filter(function(n) {
13272
- return !!n;
13273
- });
13274
- if (a.length > 1) {
13275
- return a;
13276
- }
13277
- if (a.length === 1) {
13278
- return a[0];
13279
- }
13280
- return;
13281
- }
13282
- if (node.children != null) {
13283
- node.children = prune2(node.children) || [];
13284
- return node;
13285
- }
13286
- return node;
13287
- };
13288
- gen2.prune = prune2;
13289
- }
13290
- });
13291
-
13292
13357
  // source/util.coffee
13293
13358
  var require_util = __commonJS({
13294
13359
  "source/util.coffee"(exports2, module2) {
@@ -13708,7 +13773,13 @@ makeCache = function() {
13708
13773
  case "NestedImplicitObjectLiteral":
13709
13774
  case "NestedImplicitPropertyDefinitions":
13710
13775
  case "NestedBlockStatement":
13776
+ case "NestedElement":
13777
+ case "NestedElementList":
13778
+ case "NestedBindingElement":
13779
+ case "NestedBindingElements":
13711
13780
  case "NestedInterfaceProperty":
13781
+ case "MemberExpression":
13782
+ case "PrimaryExpression":
13712
13783
  case "IndentedApplicationAllowed":
13713
13784
  case "ExpressionWithIndentedApplicationSuppressed":
13714
13785
  case "SuppressIndentedApplication":
@@ -13721,6 +13792,11 @@ makeCache = function() {
13721
13792
  case "CoffeeCommentEnabled":
13722
13793
  case "SingleLineComment":
13723
13794
  case "Debugger":
13795
+ case "JSXElement":
13796
+ case "JSXChild":
13797
+ case "JSXChildren":
13798
+ case "JSXFragment":
13799
+ case "JSXNestedChildren":
13724
13800
  break;
13725
13801
  default:
13726
13802
  cache = /* @__PURE__ */ new Map();
@@ -13734,6 +13810,9 @@ makeCache = function() {
13734
13810
  cache.set(state.pos, result);
13735
13811
  }
13736
13812
  }
13813
+ if (parse.config.verbose && result) {
13814
+ console.log(`Parsed ${JSON.stringify(state.input.slice(state.pos, result.pos))} [pos ${state.pos}-${result.pos}] as ${ruleName}`);
13815
+ }
13737
13816
  }
13738
13817
  };
13739
13818
  return events;