@danielx/civet 0.5.15 → 0.5.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -217,6 +217,11 @@ Things Added that CoffeeScript didn't
217
217
  (assuming they are not preceded by text); this is unambiguous because
218
218
  `>` isn't valid JSX text. For example, `<For> (item) => ...`
219
219
  (where function body can be indented).
220
+ - `#foo` shorthand for `id="foo"`;
221
+ also `#"foo bar"`, `` #`foo ${bar}` ``, `#{expr}`
222
+ - `.foo` shorthand for `class="foo"` (but must be at least one space after
223
+ tag name); also `.foo.bar`, `."foo bar"`, `` .`foo ${bar}` ``, `.{expr}`
224
+ - `"civet react"` flag uses `className` instead of `class`
220
225
  - Any braced object literal can be used as an attribute:
221
226
  `{foo}` → `foo={foo}`, `{foo: bar}` → `foo={bar}`,
222
227
  `{...foo}` remains as is; methods and getters/setters work too.
package/dist/browser.js CHANGED
@@ -780,6 +780,7 @@ ${input.slice(result.pos)}
780
780
  JSXIdentifierName,
781
781
  JSXAttributes,
782
782
  JSXAttribute,
783
+ JSXShorthandString,
783
784
  JSXAttributeName,
784
785
  JSXAttributeInitializer,
785
786
  JSXAttributeValue,
@@ -1099,14 +1100,15 @@ ${input.slice(result.pos)}
1099
1100
  var $R43 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
1100
1101
  var $R44 = $R(new RegExp("\\s", "suy"));
1101
1102
  var $R45 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
1102
- var $R46 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1103
- var $R47 = $R(new RegExp("[+-]?", "suy"));
1104
- var $R48 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1105
- var $R49 = $R(new RegExp("[\\t ]*", "suy"));
1106
- var $R50 = $R(new RegExp("[\\s]*", "suy"));
1107
- var $R51 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1108
- var $R52 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1109
- var $R53 = $R(new RegExp("[ \\t]*", "suy"));
1103
+ var $R46 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
1104
+ var $R47 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1105
+ var $R48 = $R(new RegExp("[+-]?", "suy"));
1106
+ var $R49 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1107
+ var $R50 = $R(new RegExp("[\\t ]*", "suy"));
1108
+ var $R51 = $R(new RegExp("[\\s]*", "suy"));
1109
+ var $R52 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1110
+ var $R53 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1111
+ var $R54 = $R(new RegExp("[ \\t]*", "suy"));
1110
1112
  var Program$0 = $TS($S(Reset, Init, __, $Q(TopLevelStatement), __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
1111
1113
  var statements = $4;
1112
1114
  module.processProgram(statements);
@@ -10907,7 +10909,7 @@ ${input.slice(result.pos)}
10907
10909
  }
10908
10910
  }
10909
10911
  var JSXElement$0 = JSXSelfClosingElement;
10910
- var JSXElement$1 = $TS($S(JSXOpeningElement, $E(JSXChildren), __, JSXClosingElement), function($skip, $loc, $0, $1, $2, $3, $4) {
10912
+ var JSXElement$1 = $TS($S(JSXOpeningElement, $E(JSXChildren), $E(Whitespace), JSXClosingElement), function($skip, $loc, $0, $1, $2, $3, $4) {
10911
10913
  if ($1[1] !== $4[2])
10912
10914
  return $skip;
10913
10915
  return { type: "JSXElement", children: $0 };
@@ -10942,7 +10944,7 @@ ${input.slice(result.pos)}
10942
10944
  return result;
10943
10945
  }
10944
10946
  }
10945
- var JSXSelfClosingElement$0 = $TS($S($EXPECT($L5, fail, 'JSXSelfClosingElement "<"'), $TEXT(JSXElementName), $E(CompactTypeArguments), $E(JSXAttributes), __, $EXPECT($L153, fail, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
10947
+ 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) {
10946
10948
  return { type: "JSXElement", children: $0 };
10947
10949
  });
10948
10950
  function JSXSelfClosingElement(state) {
@@ -10963,7 +10965,7 @@ ${input.slice(result.pos)}
10963
10965
  return result;
10964
10966
  }
10965
10967
  }
10966
- var JSXOpeningElement$0 = $S($EXPECT($L5, fail, 'JSXOpeningElement "<"'), $TEXT(JSXElementName), $E(CompactTypeArguments), $E(JSXAttributes), __, $EXPECT($L27, fail, 'JSXOpeningElement ">"'));
10968
+ var JSXOpeningElement$0 = $S($EXPECT($L5, fail, 'JSXOpeningElement "<"'), $TEXT(JSXElementName), $E(CompactTypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L27, fail, 'JSXOpeningElement ">"'));
10967
10969
  function JSXOpeningElement(state) {
10968
10970
  if (state.events) {
10969
10971
  const result = state.events.enter?.("JSXOpeningElement", state);
@@ -10982,7 +10984,7 @@ ${input.slice(result.pos)}
10982
10984
  return result;
10983
10985
  }
10984
10986
  }
10985
- var JSXClosingElement$0 = $S($EXPECT($L154, fail, 'JSXClosingElement "</"'), __, $TEXT(JSXElementName), __, $EXPECT($L27, fail, 'JSXClosingElement ">"'));
10987
+ var JSXClosingElement$0 = $S($EXPECT($L154, fail, 'JSXClosingElement "</"'), $E(Whitespace), $TEXT(JSXElementName), $E(Whitespace), $EXPECT($L27, fail, 'JSXClosingElement ">"'));
10986
10988
  function JSXClosingElement(state) {
10987
10989
  if (state.events) {
10988
10990
  const result = state.events.enter?.("JSXClosingElement", state);
@@ -11027,7 +11029,7 @@ ${input.slice(result.pos)}
11027
11029
  return result;
11028
11030
  }
11029
11031
  }
11030
- var JSXFragment$0 = $TS($S($EXPECT($L155, fail, 'JSXFragment "<>"'), $E(JSXChildren), __, $EXPECT($L156, fail, 'JSXFragment "</>"')), function($skip, $loc, $0, $1, $2, $3, $4) {
11032
+ 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) {
11031
11033
  if ($2) {
11032
11034
  return { type: "JSXFragment", children: $0, jsxChildren: $2.jsxChildren };
11033
11035
  } else {
@@ -11093,7 +11095,62 @@ ${input.slice(result.pos)}
11093
11095
  return result;
11094
11096
  }
11095
11097
  }
11096
- var JSXAttributes$0 = $Q($S(__, JSXAttribute));
11098
+ var JSXAttributes$0 = $TV($Q($S($E(Whitespace), JSXAttribute)), function($skip, $loc, $0, $1) {
11099
+ const classes = [];
11100
+ let attrs = $0.filter((pair) => {
11101
+ const [, attr] = pair;
11102
+ if (attr.type === "JSXClass") {
11103
+ classes.push(attr.class);
11104
+ return false;
11105
+ }
11106
+ return true;
11107
+ });
11108
+ if (classes.length) {
11109
+ let braced = function(c) {
11110
+ return c[0] === "{" || c[0]?.token === "{";
11111
+ }, parseClass = function(c) {
11112
+ c = c.token || c;
11113
+ if (c.startsWith("'")) {
11114
+ c = '"' + c.slice(1, -1).replace(/\\*"/g, (m) => m.length % 2 == 0 ? m : "\\" + m) + '"';
11115
+ }
11116
+ return JSON.parse(c);
11117
+ };
11118
+ let className = module.config.react ? "className" : "class";
11119
+ attrs = attrs.filter((pair) => {
11120
+ const [, attr] = pair;
11121
+ if ((attr[0][0] === "class" || attr[0][0] === "className") && !attr[0][1]) {
11122
+ className = attr[0][0];
11123
+ classes.push(attr[1][attr[1].length - 1]);
11124
+ return false;
11125
+ }
11126
+ return true;
11127
+ });
11128
+ let classValue;
11129
+ if (classes.some(braced)) {
11130
+ classValue = ["{`"];
11131
+ classes.forEach((c, i) => {
11132
+ if (i > 0)
11133
+ classValue.push(" ");
11134
+ if (braced(c)) {
11135
+ classValue.push("$", c);
11136
+ } else {
11137
+ classValue.push(parseClass(c));
11138
+ }
11139
+ });
11140
+ classValue.push("`}");
11141
+ } else {
11142
+ classValue = JSON.stringify(classes.map(parseClass).join(" "));
11143
+ }
11144
+ attrs.splice(0, 0, [" ", [className, ["=", classValue]]]);
11145
+ }
11146
+ return attrs.map((pair) => {
11147
+ const [space, attr] = pair;
11148
+ if (space && attr[0] === " ") {
11149
+ pair = [space, attr.slice(1)];
11150
+ }
11151
+ return pair;
11152
+ });
11153
+ });
11097
11154
  function JSXAttributes(state) {
11098
11155
  if (state.events) {
11099
11156
  const result = state.events.enter?.("JSXAttributes", state);
@@ -11168,6 +11225,15 @@ ${input.slice(result.pos)}
11168
11225
  }
11169
11226
  });
11170
11227
  var JSXAttribute$2 = $S(InsertInlineOpenBrace, DotDotDot, InlineJSXAttributeValue, InsertCloseBrace);
11228
+ var JSXAttribute$3 = $TS($S($EXPECT($L8, fail, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
11229
+ return [" ", "id=", $2];
11230
+ });
11231
+ var JSXAttribute$4 = $TS($S(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
11232
+ return {
11233
+ type: "JSXClass",
11234
+ class: $2
11235
+ };
11236
+ });
11171
11237
  function JSXAttribute(state) {
11172
11238
  if (state.events) {
11173
11239
  const result = state.events.enter?.("JSXAttribute", state);
@@ -11175,17 +11241,49 @@ ${input.slice(result.pos)}
11175
11241
  return result.cache;
11176
11242
  }
11177
11243
  if (state.tokenize) {
11178
- const result = $TOKEN("JSXAttribute", state, JSXAttribute$0(state) || JSXAttribute$1(state) || JSXAttribute$2(state));
11244
+ const result = $TOKEN("JSXAttribute", state, JSXAttribute$0(state) || JSXAttribute$1(state) || JSXAttribute$2(state) || JSXAttribute$3(state) || JSXAttribute$4(state));
11179
11245
  if (state.events)
11180
11246
  state.events.exit?.("JSXAttribute", state, result);
11181
11247
  return result;
11182
11248
  } else {
11183
- const result = JSXAttribute$0(state) || JSXAttribute$1(state) || JSXAttribute$2(state);
11249
+ const result = JSXAttribute$0(state) || JSXAttribute$1(state) || JSXAttribute$2(state) || JSXAttribute$3(state) || JSXAttribute$4(state);
11184
11250
  if (state.events)
11185
11251
  state.events.exit?.("JSXAttribute", state, result);
11186
11252
  return result;
11187
11253
  }
11188
11254
  }
11255
+ var JSXShorthandString$0 = $TR($EXPECT($R46, fail, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11256
+ return module.quoteString($0);
11257
+ });
11258
+ var JSXShorthandString$1 = $TS($S(StringLiteral), function($skip, $loc, $0, $1) {
11259
+ if (module.isTemplateLiteral($1)) {
11260
+ return ["{", $1, "}"];
11261
+ } else {
11262
+ return $1;
11263
+ }
11264
+ });
11265
+ var JSXShorthandString$2 = $TS($S(TemplateLiteral), function($skip, $loc, $0, $1) {
11266
+ return ["{", $1, "}"];
11267
+ });
11268
+ var JSXShorthandString$3 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
11269
+ function JSXShorthandString(state) {
11270
+ if (state.events) {
11271
+ const result = state.events.enter?.("JSXShorthandString", state);
11272
+ if (result)
11273
+ return result.cache;
11274
+ }
11275
+ if (state.tokenize) {
11276
+ const result = $TOKEN("JSXShorthandString", state, JSXShorthandString$0(state) || JSXShorthandString$1(state) || JSXShorthandString$2(state) || JSXShorthandString$3(state));
11277
+ if (state.events)
11278
+ state.events.exit?.("JSXShorthandString", state, result);
11279
+ return result;
11280
+ } else {
11281
+ const result = JSXShorthandString$0(state) || JSXShorthandString$1(state) || JSXShorthandString$2(state) || JSXShorthandString$3(state);
11282
+ if (state.events)
11283
+ state.events.exit?.("JSXShorthandString", state, result);
11284
+ return result;
11285
+ }
11286
+ }
11189
11287
  var JSXAttributeName$0 = $S(JSXIdentifierName, $E($S(Colon, JSXIdentifierName)));
11190
11288
  var JSXAttributeName$1 = ComputedPropertyName;
11191
11289
  function JSXAttributeName(state) {
@@ -11206,7 +11304,7 @@ ${input.slice(result.pos)}
11206
11304
  return result;
11207
11305
  }
11208
11306
  }
11209
- var JSXAttributeInitializer$0 = $S(__, Equals, __, JSXAttributeValue);
11307
+ var JSXAttributeInitializer$0 = $S($E(Whitespace), Equals, $E(Whitespace), JSXAttributeValue);
11210
11308
  function JSXAttributeInitializer(state) {
11211
11309
  if (state.events) {
11212
11310
  const result = state.events.enter?.("JSXAttributeInitializer", state);
@@ -11230,7 +11328,7 @@ ${input.slice(result.pos)}
11230
11328
  return $skip;
11231
11329
  return $1;
11232
11330
  });
11233
- var JSXAttributeValue$1 = $S(OpenBrace, ExtendedExpression, __, CloseBrace);
11331
+ var JSXAttributeValue$1 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
11234
11332
  var JSXAttributeValue$2 = JSXElement;
11235
11333
  var JSXAttributeValue$3 = JSXFragment;
11236
11334
  var JSXAttributeValue$4 = $S(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace);
@@ -11630,7 +11728,7 @@ ${input.slice(result.pos)}
11630
11728
  return result;
11631
11729
  }
11632
11730
  }
11633
- var JSXText$0 = $TR($EXPECT($R46, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11731
+ var JSXText$0 = $TR($EXPECT($R47, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11634
11732
  return {
11635
11733
  type: "JSXText",
11636
11734
  token: $0,
@@ -11655,7 +11753,7 @@ ${input.slice(result.pos)}
11655
11753
  return result;
11656
11754
  }
11657
11755
  }
11658
- var JSXChildExpression$0 = $S(__, $E($S(DotDotDot, __)), ExtendedExpression);
11756
+ var JSXChildExpression$0 = $S($E(Whitespace), $E($S(DotDotDot, $E(Whitespace))), ExtendedExpression);
11659
11757
  function JSXChildExpression(state) {
11660
11758
  if (state.events) {
11661
11759
  const result = state.events.enter?.("JSXChildExpression", state);
@@ -11964,7 +12062,7 @@ ${input.slice(result.pos)}
11964
12062
  return result;
11965
12063
  }
11966
12064
  }
11967
- var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R47, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L129, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R4, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
12065
+ var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R48, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L129, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R4, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
11968
12066
  function TypeIndexSignature(state) {
11969
12067
  if (state.events) {
11970
12068
  const result = state.events.enter?.("TypeIndexSignature", state);
@@ -12566,7 +12664,7 @@ ${input.slice(result.pos)}
12566
12664
  return result;
12567
12665
  }
12568
12666
  }
12569
- var Shebang$0 = $S($R$0($EXPECT($R48, fail, "Shebang /#![^\\r\\n]*/")), EOL);
12667
+ var Shebang$0 = $S($R$0($EXPECT($R49, fail, "Shebang /#![^\\r\\n]*/")), EOL);
12570
12668
  function Shebang(state) {
12571
12669
  if (state.events) {
12572
12670
  const result = state.events.enter?.("Shebang", state);
@@ -12585,11 +12683,11 @@ ${input.slice(result.pos)}
12585
12683
  return result;
12586
12684
  }
12587
12685
  }
12588
- var CivetPrologue$0 = $T($S($EXPECT($R49, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
12686
+ var CivetPrologue$0 = $T($S($EXPECT($R50, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
12589
12687
  var content = value[2];
12590
12688
  return content;
12591
12689
  });
12592
- var CivetPrologue$1 = $T($S($EXPECT($R49, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
12690
+ var CivetPrologue$1 = $T($S($EXPECT($R50, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
12593
12691
  var content = value[2];
12594
12692
  return content;
12595
12693
  });
@@ -12611,7 +12709,7 @@ ${input.slice(result.pos)}
12611
12709
  return result;
12612
12710
  }
12613
12711
  }
12614
- var CivetPrologueContent$0 = $TS($S($EXPECT($L165, fail, 'CivetPrologueContent "civet"'), $Q(CivetOption), $EXPECT($R50, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3) {
12712
+ var CivetPrologueContent$0 = $TS($S($EXPECT($L165, fail, 'CivetPrologueContent "civet"'), $Q(CivetOption), $EXPECT($R51, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3) {
12615
12713
  var options = $2;
12616
12714
  return {
12617
12715
  type: "CivetPrologue",
@@ -12637,7 +12735,7 @@ ${input.slice(result.pos)}
12637
12735
  return result;
12638
12736
  }
12639
12737
  }
12640
- var CivetOption$0 = $TR($EXPECT($R51, 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) {
12738
+ 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) {
12641
12739
  const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
12642
12740
  if (l)
12643
12741
  return l.toUpperCase();
@@ -12669,7 +12767,7 @@ ${input.slice(result.pos)}
12669
12767
  return result;
12670
12768
  }
12671
12769
  }
12672
- var UnknownPrologue$0 = $S($R$0($EXPECT($R49, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(StatementDelimiter), EOS);
12770
+ var UnknownPrologue$0 = $S($R$0($EXPECT($R50, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(StatementDelimiter), EOS);
12673
12771
  function UnknownPrologue(state) {
12674
12772
  if (state.events) {
12675
12773
  const result = state.events.enter?.("UnknownPrologue", state);
@@ -12727,7 +12825,7 @@ ${input.slice(result.pos)}
12727
12825
  return result;
12728
12826
  }
12729
12827
  }
12730
- var EOL$0 = $TR($EXPECT($R52, fail, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
12828
+ 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) {
12731
12829
  return { $loc, token: $0 };
12732
12830
  });
12733
12831
  function EOL(state) {
@@ -13368,6 +13466,7 @@ ${input.slice(result.pos)}
13368
13466
  coffeeNot: false,
13369
13467
  coffeeOf: false,
13370
13468
  implicitReturns: true,
13469
+ react: false,
13371
13470
  solid: false,
13372
13471
  client: false,
13373
13472
  server: false,
@@ -13525,6 +13624,14 @@ ${input.slice(result.pos)}
13525
13624
  module.modifyString = function(str) {
13526
13625
  return str.replace(/(^.?|[^\\]{2})(\\\\)*\n/g, "$1$2\\n");
13527
13626
  };
13627
+ module.quoteString = function(str) {
13628
+ str = str.replace(/\\/g, "\\\\");
13629
+ if (str.includes('"') && !str.includes("'")) {
13630
+ return "'" + str.replace(/'/g, "\\'") + "'";
13631
+ } else {
13632
+ return '"' + str.replace(/"/g, '\\"') + '"';
13633
+ }
13634
+ };
13528
13635
  });
13529
13636
  function Reset(state) {
13530
13637
  if (state.events) {
@@ -14503,7 +14610,7 @@ ${input.slice(result.pos)}
14503
14610
  return result;
14504
14611
  }
14505
14612
  }
14506
- var Indent$0 = $TR($EXPECT($R53, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14613
+ var Indent$0 = $TR($EXPECT($R54, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14507
14614
  let level;
14508
14615
  if (module.config.tab) {
14509
14616
  const tabs = $0.match(/\t/g);
package/dist/main.js CHANGED
@@ -779,6 +779,7 @@ ${input.slice(result.pos)}
779
779
  JSXIdentifierName,
780
780
  JSXAttributes,
781
781
  JSXAttribute,
782
+ JSXShorthandString,
782
783
  JSXAttributeName,
783
784
  JSXAttributeInitializer,
784
785
  JSXAttributeValue,
@@ -1098,14 +1099,15 @@ ${input.slice(result.pos)}
1098
1099
  var $R43 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
1099
1100
  var $R44 = $R(new RegExp("\\s", "suy"));
1100
1101
  var $R45 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
1101
- var $R46 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1102
- var $R47 = $R(new RegExp("[+-]?", "suy"));
1103
- var $R48 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1104
- var $R49 = $R(new RegExp("[\\t ]*", "suy"));
1105
- var $R50 = $R(new RegExp("[\\s]*", "suy"));
1106
- var $R51 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1107
- var $R52 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1108
- var $R53 = $R(new RegExp("[ \\t]*", "suy"));
1102
+ var $R46 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
1103
+ var $R47 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
1104
+ var $R48 = $R(new RegExp("[+-]?", "suy"));
1105
+ var $R49 = $R(new RegExp("#![^\\r\\n]*", "suy"));
1106
+ var $R50 = $R(new RegExp("[\\t ]*", "suy"));
1107
+ var $R51 = $R(new RegExp("[\\s]*", "suy"));
1108
+ var $R52 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
1109
+ var $R53 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
1110
+ var $R54 = $R(new RegExp("[ \\t]*", "suy"));
1109
1111
  var Program$0 = $TS($S(Reset, Init, __, $Q(TopLevelStatement), __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
1110
1112
  var statements = $4;
1111
1113
  module2.processProgram(statements);
@@ -10906,7 +10908,7 @@ ${input.slice(result.pos)}
10906
10908
  }
10907
10909
  }
10908
10910
  var JSXElement$0 = JSXSelfClosingElement;
10909
- var JSXElement$1 = $TS($S(JSXOpeningElement, $E(JSXChildren), __, JSXClosingElement), function($skip, $loc, $0, $1, $2, $3, $4) {
10911
+ var JSXElement$1 = $TS($S(JSXOpeningElement, $E(JSXChildren), $E(Whitespace), JSXClosingElement), function($skip, $loc, $0, $1, $2, $3, $4) {
10910
10912
  if ($1[1] !== $4[2])
10911
10913
  return $skip;
10912
10914
  return { type: "JSXElement", children: $0 };
@@ -10941,7 +10943,7 @@ ${input.slice(result.pos)}
10941
10943
  return result;
10942
10944
  }
10943
10945
  }
10944
- var JSXSelfClosingElement$0 = $TS($S($EXPECT($L5, fail, 'JSXSelfClosingElement "<"'), $TEXT(JSXElementName), $E(CompactTypeArguments), $E(JSXAttributes), __, $EXPECT($L153, fail, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
10946
+ 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) {
10945
10947
  return { type: "JSXElement", children: $0 };
10946
10948
  });
10947
10949
  function JSXSelfClosingElement(state) {
@@ -10962,7 +10964,7 @@ ${input.slice(result.pos)}
10962
10964
  return result;
10963
10965
  }
10964
10966
  }
10965
- var JSXOpeningElement$0 = $S($EXPECT($L5, fail, 'JSXOpeningElement "<"'), $TEXT(JSXElementName), $E(CompactTypeArguments), $E(JSXAttributes), __, $EXPECT($L27, fail, 'JSXOpeningElement ">"'));
10967
+ var JSXOpeningElement$0 = $S($EXPECT($L5, fail, 'JSXOpeningElement "<"'), $TEXT(JSXElementName), $E(CompactTypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L27, fail, 'JSXOpeningElement ">"'));
10966
10968
  function JSXOpeningElement(state) {
10967
10969
  if (state.events) {
10968
10970
  const result = state.events.enter?.("JSXOpeningElement", state);
@@ -10981,7 +10983,7 @@ ${input.slice(result.pos)}
10981
10983
  return result;
10982
10984
  }
10983
10985
  }
10984
- var JSXClosingElement$0 = $S($EXPECT($L154, fail, 'JSXClosingElement "</"'), __, $TEXT(JSXElementName), __, $EXPECT($L27, fail, 'JSXClosingElement ">"'));
10986
+ var JSXClosingElement$0 = $S($EXPECT($L154, fail, 'JSXClosingElement "</"'), $E(Whitespace), $TEXT(JSXElementName), $E(Whitespace), $EXPECT($L27, fail, 'JSXClosingElement ">"'));
10985
10987
  function JSXClosingElement(state) {
10986
10988
  if (state.events) {
10987
10989
  const result = state.events.enter?.("JSXClosingElement", state);
@@ -11026,7 +11028,7 @@ ${input.slice(result.pos)}
11026
11028
  return result;
11027
11029
  }
11028
11030
  }
11029
- var JSXFragment$0 = $TS($S($EXPECT($L155, fail, 'JSXFragment "<>"'), $E(JSXChildren), __, $EXPECT($L156, fail, 'JSXFragment "</>"')), function($skip, $loc, $0, $1, $2, $3, $4) {
11031
+ 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) {
11030
11032
  if ($2) {
11031
11033
  return { type: "JSXFragment", children: $0, jsxChildren: $2.jsxChildren };
11032
11034
  } else {
@@ -11092,7 +11094,62 @@ ${input.slice(result.pos)}
11092
11094
  return result;
11093
11095
  }
11094
11096
  }
11095
- var JSXAttributes$0 = $Q($S(__, JSXAttribute));
11097
+ var JSXAttributes$0 = $TV($Q($S($E(Whitespace), JSXAttribute)), function($skip, $loc, $0, $1) {
11098
+ const classes = [];
11099
+ let attrs = $0.filter((pair) => {
11100
+ const [, attr] = pair;
11101
+ if (attr.type === "JSXClass") {
11102
+ classes.push(attr.class);
11103
+ return false;
11104
+ }
11105
+ return true;
11106
+ });
11107
+ if (classes.length) {
11108
+ let braced = function(c) {
11109
+ return c[0] === "{" || c[0]?.token === "{";
11110
+ }, parseClass = function(c) {
11111
+ c = c.token || c;
11112
+ if (c.startsWith("'")) {
11113
+ c = '"' + c.slice(1, -1).replace(/\\*"/g, (m) => m.length % 2 == 0 ? m : "\\" + m) + '"';
11114
+ }
11115
+ return JSON.parse(c);
11116
+ };
11117
+ let className = module2.config.react ? "className" : "class";
11118
+ attrs = attrs.filter((pair) => {
11119
+ const [, attr] = pair;
11120
+ if ((attr[0][0] === "class" || attr[0][0] === "className") && !attr[0][1]) {
11121
+ className = attr[0][0];
11122
+ classes.push(attr[1][attr[1].length - 1]);
11123
+ return false;
11124
+ }
11125
+ return true;
11126
+ });
11127
+ let classValue;
11128
+ if (classes.some(braced)) {
11129
+ classValue = ["{`"];
11130
+ classes.forEach((c, i) => {
11131
+ if (i > 0)
11132
+ classValue.push(" ");
11133
+ if (braced(c)) {
11134
+ classValue.push("$", c);
11135
+ } else {
11136
+ classValue.push(parseClass(c));
11137
+ }
11138
+ });
11139
+ classValue.push("`}");
11140
+ } else {
11141
+ classValue = JSON.stringify(classes.map(parseClass).join(" "));
11142
+ }
11143
+ attrs.splice(0, 0, [" ", [className, ["=", classValue]]]);
11144
+ }
11145
+ return attrs.map((pair) => {
11146
+ const [space, attr] = pair;
11147
+ if (space && attr[0] === " ") {
11148
+ pair = [space, attr.slice(1)];
11149
+ }
11150
+ return pair;
11151
+ });
11152
+ });
11096
11153
  function JSXAttributes(state) {
11097
11154
  if (state.events) {
11098
11155
  const result = state.events.enter?.("JSXAttributes", state);
@@ -11167,6 +11224,15 @@ ${input.slice(result.pos)}
11167
11224
  }
11168
11225
  });
11169
11226
  var JSXAttribute$2 = $S(InsertInlineOpenBrace, DotDotDot, InlineJSXAttributeValue, InsertCloseBrace);
11227
+ var JSXAttribute$3 = $TS($S($EXPECT($L8, fail, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
11228
+ return [" ", "id=", $2];
11229
+ });
11230
+ var JSXAttribute$4 = $TS($S(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
11231
+ return {
11232
+ type: "JSXClass",
11233
+ class: $2
11234
+ };
11235
+ });
11170
11236
  function JSXAttribute(state) {
11171
11237
  if (state.events) {
11172
11238
  const result = state.events.enter?.("JSXAttribute", state);
@@ -11174,17 +11240,49 @@ ${input.slice(result.pos)}
11174
11240
  return result.cache;
11175
11241
  }
11176
11242
  if (state.tokenize) {
11177
- const result = $TOKEN("JSXAttribute", state, JSXAttribute$0(state) || JSXAttribute$1(state) || JSXAttribute$2(state));
11243
+ const result = $TOKEN("JSXAttribute", state, JSXAttribute$0(state) || JSXAttribute$1(state) || JSXAttribute$2(state) || JSXAttribute$3(state) || JSXAttribute$4(state));
11178
11244
  if (state.events)
11179
11245
  state.events.exit?.("JSXAttribute", state, result);
11180
11246
  return result;
11181
11247
  } else {
11182
- const result = JSXAttribute$0(state) || JSXAttribute$1(state) || JSXAttribute$2(state);
11248
+ const result = JSXAttribute$0(state) || JSXAttribute$1(state) || JSXAttribute$2(state) || JSXAttribute$3(state) || JSXAttribute$4(state);
11183
11249
  if (state.events)
11184
11250
  state.events.exit?.("JSXAttribute", state, result);
11185
11251
  return result;
11186
11252
  }
11187
11253
  }
11254
+ var JSXShorthandString$0 = $TR($EXPECT($R46, fail, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11255
+ return module2.quoteString($0);
11256
+ });
11257
+ var JSXShorthandString$1 = $TS($S(StringLiteral), function($skip, $loc, $0, $1) {
11258
+ if (module2.isTemplateLiteral($1)) {
11259
+ return ["{", $1, "}"];
11260
+ } else {
11261
+ return $1;
11262
+ }
11263
+ });
11264
+ var JSXShorthandString$2 = $TS($S(TemplateLiteral), function($skip, $loc, $0, $1) {
11265
+ return ["{", $1, "}"];
11266
+ });
11267
+ var JSXShorthandString$3 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
11268
+ function JSXShorthandString(state) {
11269
+ if (state.events) {
11270
+ const result = state.events.enter?.("JSXShorthandString", state);
11271
+ if (result)
11272
+ return result.cache;
11273
+ }
11274
+ if (state.tokenize) {
11275
+ const result = $TOKEN("JSXShorthandString", state, JSXShorthandString$0(state) || JSXShorthandString$1(state) || JSXShorthandString$2(state) || JSXShorthandString$3(state));
11276
+ if (state.events)
11277
+ state.events.exit?.("JSXShorthandString", state, result);
11278
+ return result;
11279
+ } else {
11280
+ const result = JSXShorthandString$0(state) || JSXShorthandString$1(state) || JSXShorthandString$2(state) || JSXShorthandString$3(state);
11281
+ if (state.events)
11282
+ state.events.exit?.("JSXShorthandString", state, result);
11283
+ return result;
11284
+ }
11285
+ }
11188
11286
  var JSXAttributeName$0 = $S(JSXIdentifierName, $E($S(Colon, JSXIdentifierName)));
11189
11287
  var JSXAttributeName$1 = ComputedPropertyName;
11190
11288
  function JSXAttributeName(state) {
@@ -11205,7 +11303,7 @@ ${input.slice(result.pos)}
11205
11303
  return result;
11206
11304
  }
11207
11305
  }
11208
- var JSXAttributeInitializer$0 = $S(__, Equals, __, JSXAttributeValue);
11306
+ var JSXAttributeInitializer$0 = $S($E(Whitespace), Equals, $E(Whitespace), JSXAttributeValue);
11209
11307
  function JSXAttributeInitializer(state) {
11210
11308
  if (state.events) {
11211
11309
  const result = state.events.enter?.("JSXAttributeInitializer", state);
@@ -11229,7 +11327,7 @@ ${input.slice(result.pos)}
11229
11327
  return $skip;
11230
11328
  return $1;
11231
11329
  });
11232
- var JSXAttributeValue$1 = $S(OpenBrace, ExtendedExpression, __, CloseBrace);
11330
+ var JSXAttributeValue$1 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
11233
11331
  var JSXAttributeValue$2 = JSXElement;
11234
11332
  var JSXAttributeValue$3 = JSXFragment;
11235
11333
  var JSXAttributeValue$4 = $S(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace);
@@ -11629,7 +11727,7 @@ ${input.slice(result.pos)}
11629
11727
  return result;
11630
11728
  }
11631
11729
  }
11632
- var JSXText$0 = $TR($EXPECT($R46, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11730
+ var JSXText$0 = $TR($EXPECT($R47, fail, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11633
11731
  return {
11634
11732
  type: "JSXText",
11635
11733
  token: $0,
@@ -11654,7 +11752,7 @@ ${input.slice(result.pos)}
11654
11752
  return result;
11655
11753
  }
11656
11754
  }
11657
- var JSXChildExpression$0 = $S(__, $E($S(DotDotDot, __)), ExtendedExpression);
11755
+ var JSXChildExpression$0 = $S($E(Whitespace), $E($S(DotDotDot, $E(Whitespace))), ExtendedExpression);
11658
11756
  function JSXChildExpression(state) {
11659
11757
  if (state.events) {
11660
11758
  const result = state.events.enter?.("JSXChildExpression", state);
@@ -11963,7 +12061,7 @@ ${input.slice(result.pos)}
11963
12061
  return result;
11964
12062
  }
11965
12063
  }
11966
- var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R47, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L129, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R4, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
12064
+ var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R48, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L129, fail, 'TypeIndexSignature "readonly"'), __)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R4, fail, "TypeIndexSignature /[+-]/")), QuestionMark)));
11967
12065
  function TypeIndexSignature(state) {
11968
12066
  if (state.events) {
11969
12067
  const result = state.events.enter?.("TypeIndexSignature", state);
@@ -12565,7 +12663,7 @@ ${input.slice(result.pos)}
12565
12663
  return result;
12566
12664
  }
12567
12665
  }
12568
- var Shebang$0 = $S($R$0($EXPECT($R48, fail, "Shebang /#![^\\r\\n]*/")), EOL);
12666
+ var Shebang$0 = $S($R$0($EXPECT($R49, fail, "Shebang /#![^\\r\\n]*/")), EOL);
12569
12667
  function Shebang(state) {
12570
12668
  if (state.events) {
12571
12669
  const result = state.events.enter?.("Shebang", state);
@@ -12584,11 +12682,11 @@ ${input.slice(result.pos)}
12584
12682
  return result;
12585
12683
  }
12586
12684
  }
12587
- var CivetPrologue$0 = $T($S($EXPECT($R49, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
12685
+ var CivetPrologue$0 = $T($S($EXPECT($R50, fail, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
12588
12686
  var content = value[2];
12589
12687
  return content;
12590
12688
  });
12591
- var CivetPrologue$1 = $T($S($EXPECT($R49, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
12689
+ var CivetPrologue$1 = $T($S($EXPECT($R50, fail, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, $TEXT(StatementDelimiter), EOS), function(value) {
12592
12690
  var content = value[2];
12593
12691
  return content;
12594
12692
  });
@@ -12610,7 +12708,7 @@ ${input.slice(result.pos)}
12610
12708
  return result;
12611
12709
  }
12612
12710
  }
12613
- var CivetPrologueContent$0 = $TS($S($EXPECT($L165, fail, 'CivetPrologueContent "civet"'), $Q(CivetOption), $EXPECT($R50, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3) {
12711
+ var CivetPrologueContent$0 = $TS($S($EXPECT($L165, fail, 'CivetPrologueContent "civet"'), $Q(CivetOption), $EXPECT($R51, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3) {
12614
12712
  var options = $2;
12615
12713
  return {
12616
12714
  type: "CivetPrologue",
@@ -12636,7 +12734,7 @@ ${input.slice(result.pos)}
12636
12734
  return result;
12637
12735
  }
12638
12736
  }
12639
- var CivetOption$0 = $TR($EXPECT($R51, 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) {
12737
+ 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) {
12640
12738
  const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
12641
12739
  if (l)
12642
12740
  return l.toUpperCase();
@@ -12668,7 +12766,7 @@ ${input.slice(result.pos)}
12668
12766
  return result;
12669
12767
  }
12670
12768
  }
12671
- var UnknownPrologue$0 = $S($R$0($EXPECT($R49, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(StatementDelimiter), EOS);
12769
+ var UnknownPrologue$0 = $S($R$0($EXPECT($R50, fail, "UnknownPrologue /[\\t ]*/")), BasicStringLiteral, $TEXT(StatementDelimiter), EOS);
12672
12770
  function UnknownPrologue(state) {
12673
12771
  if (state.events) {
12674
12772
  const result = state.events.enter?.("UnknownPrologue", state);
@@ -12726,7 +12824,7 @@ ${input.slice(result.pos)}
12726
12824
  return result;
12727
12825
  }
12728
12826
  }
12729
- var EOL$0 = $TR($EXPECT($R52, fail, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
12827
+ 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) {
12730
12828
  return { $loc, token: $0 };
12731
12829
  });
12732
12830
  function EOL(state) {
@@ -13367,6 +13465,7 @@ ${input.slice(result.pos)}
13367
13465
  coffeeNot: false,
13368
13466
  coffeeOf: false,
13369
13467
  implicitReturns: true,
13468
+ react: false,
13370
13469
  solid: false,
13371
13470
  client: false,
13372
13471
  server: false,
@@ -13524,6 +13623,14 @@ ${input.slice(result.pos)}
13524
13623
  module2.modifyString = function(str) {
13525
13624
  return str.replace(/(^.?|[^\\]{2})(\\\\)*\n/g, "$1$2\\n");
13526
13625
  };
13626
+ module2.quoteString = function(str) {
13627
+ str = str.replace(/\\/g, "\\\\");
13628
+ if (str.includes('"') && !str.includes("'")) {
13629
+ return "'" + str.replace(/'/g, "\\'") + "'";
13630
+ } else {
13631
+ return '"' + str.replace(/"/g, '\\"') + '"';
13632
+ }
13633
+ };
13527
13634
  });
13528
13635
  function Reset(state) {
13529
13636
  if (state.events) {
@@ -14502,7 +14609,7 @@ ${input.slice(result.pos)}
14502
14609
  return result;
14503
14610
  }
14504
14611
  }
14505
- var Indent$0 = $TR($EXPECT($R53, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14612
+ var Indent$0 = $TR($EXPECT($R54, fail, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14506
14613
  let level;
14507
14614
  if (module2.config.tab) {
14508
14615
  const tabs = $0.match(/\t/g);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielx/civet",
3
- "version": "0.5.15",
3
+ "version": "0.5.16",
4
4
  "description": "CoffeeScript style syntax for TypeScript",
5
5
  "main": "dist/main.js",
6
6
  "exports": {