@danielx/civet 0.4.19-pre.7 → 0.4.19-pre.9

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.
Files changed (3) hide show
  1. package/dist/browser.js +246 -205
  2. package/dist/main.js +246 -205
  3. package/package.json +1 -1
package/dist/browser.js CHANGED
@@ -489,6 +489,8 @@ var Civet = (() => {
489
489
  FunctionExpression,
490
490
  ThinArrowFunction,
491
491
  Arrow,
492
+ ExplicitBlock,
493
+ ImplicitNestedBlock,
492
494
  Block,
493
495
  ThenClause,
494
496
  BracedOrEmptyBlock,
@@ -814,38 +816,38 @@ var Civet = (() => {
814
816
  Reset,
815
817
  Init,
816
818
  Indent,
817
- TrackIndent,
819
+ TrackIndented,
818
820
  Samedent,
819
821
  IndentedFurther,
820
822
  PushIndent,
821
823
  PopIndent,
822
824
  Nested
823
825
  });
824
- var $L0 = $L("");
825
- var $L1 = $L("++");
826
- var $L2 = $L("--");
827
- var $L3 = $L("=>");
828
- var $L4 = $L("<");
829
- var $L5 = $L("extends");
830
- var $L6 = $L("this");
831
- var $L7 = $L("#");
832
- var $L8 = $L(".");
833
- var $L9 = $L("super");
834
- var $L10 = $L("import");
835
- var $L11 = $L("!");
836
- var $L12 = $L("::");
837
- var $L13 = $L("super[");
838
- var $L14 = $L("import.meta");
839
- var $L15 = $L(")");
840
- var $L16 = $L("->");
841
- var $L17 = $L("null");
842
- var $L18 = $L("true");
843
- var $L19 = $L("false");
844
- var $L20 = $L("yes");
845
- var $L21 = $L("on");
846
- var $L22 = $L("no");
847
- var $L23 = $L("off");
848
- var $L24 = $L(",");
826
+ var $L0 = $L(",");
827
+ var $L1 = $L("");
828
+ var $L2 = $L("++");
829
+ var $L3 = $L("--");
830
+ var $L4 = $L("=>");
831
+ var $L5 = $L("<");
832
+ var $L6 = $L("extends");
833
+ var $L7 = $L("this");
834
+ var $L8 = $L("#");
835
+ var $L9 = $L(".");
836
+ var $L10 = $L("super");
837
+ var $L11 = $L("import");
838
+ var $L12 = $L("!");
839
+ var $L13 = $L("::");
840
+ var $L14 = $L("super[");
841
+ var $L15 = $L("import.meta");
842
+ var $L16 = $L(")");
843
+ var $L17 = $L("->");
844
+ var $L18 = $L("null");
845
+ var $L19 = $L("true");
846
+ var $L20 = $L("false");
847
+ var $L21 = $L("yes");
848
+ var $L22 = $L("on");
849
+ var $L23 = $L("no");
850
+ var $L24 = $L("off");
849
851
  var $L25 = $L("]");
850
852
  var $L26 = $L("}");
851
853
  var $L27 = $L("**=");
@@ -1099,11 +1101,7 @@ var Civet = (() => {
1099
1101
  return Arguments$0(state) || Arguments$1(state);
1100
1102
  }
1101
1103
  }
1102
- var ArgumentsWithTrailingCallExpressions$0 = $TS($S(TrackIndent, $C($S(Arguments, $Q($S($Y(EOS), Samedent, $N(Backtick), CallExpressionRest)), PopIndent), PopIndent)), function($skip, $loc, $0, $1, $2) {
1103
- if (!$2)
1104
- return $skip;
1105
- return $2;
1106
- });
1104
+ var ArgumentsWithTrailingCallExpressions$0 = $S(Arguments, $Q($S(Samedent, $N(Backtick), CallExpressionRest)));
1107
1105
  function ArgumentsWithTrailingCallExpressions(state) {
1108
1106
  if (state.verbose)
1109
1107
  console.log("ENTER:", "ArgumentsWithTrailingCallExpressions");
@@ -1113,9 +1111,7 @@ var Civet = (() => {
1113
1111
  return ArgumentsWithTrailingCallExpressions$0(state);
1114
1112
  }
1115
1113
  }
1116
- var ArgumentList$0 = $T($S($Y(EOS), NestedArgumentList), function(value) {
1117
- return value[1];
1118
- });
1114
+ var ArgumentList$0 = NestedArgumentList;
1119
1115
  var ArgumentList$1 = InlineArgumentExpressions;
1120
1116
  function ArgumentList(state) {
1121
1117
  if (state.tokenize) {
@@ -1149,7 +1145,7 @@ var Civet = (() => {
1149
1145
  return NestedArgument$0(state);
1150
1146
  }
1151
1147
  }
1152
- var InlineArgumentExpressions$0 = $TS($S(ArgumentPart, $Q($S(__, Comma, $Q(TrailingComment), ArgumentPart))), function($skip, $loc, $0, $1, $2) {
1148
+ var InlineArgumentExpressions$0 = $TS($S($Q(TrailingComment), ArgumentPart, $Q($S(__, Comma, $Q(TrailingComment), $C(NestedObjectLiteral, ArgumentList)))), function($skip, $loc, $0, $1, $2, $3) {
1153
1149
  if ($2.length == 0)
1154
1150
  return $1;
1155
1151
  return $0;
@@ -1178,28 +1174,28 @@ var Civet = (() => {
1178
1174
  }
1179
1175
  }
1180
1176
  var ImplicitApplication$0 = $S(ApplicationStart, ArgumentList, InsertCloseParen);
1177
+ var ImplicitApplication$1 = $S(IndentedApplicationAllowed, InsertOpenParen, NestedObjectLiteral, $Q($S(__, $EXPECT($L0, fail, 'ImplicitApplication ","'), NestedObjectLiteral)), InsertCloseParen);
1181
1178
  function ImplicitApplication(state) {
1182
- if (state.verbose)
1183
- console.log("ENTER:", "ImplicitApplication");
1184
1179
  if (state.tokenize) {
1185
- return $TOKEN("ImplicitApplication", state, ImplicitApplication$0(state));
1180
+ return $TOKEN("ImplicitApplication", state, ImplicitApplication$0(state) || ImplicitApplication$1(state));
1186
1181
  } else {
1187
- return ImplicitApplication$0(state);
1182
+ return ImplicitApplication$0(state) || ImplicitApplication$1(state);
1188
1183
  }
1189
1184
  }
1190
1185
  var ApplicationStart$0 = $TS($S($N(EOS), _, $N(AdditionalReservedWords)), function($skip, $loc, $0, $1, $2, $3) {
1191
1186
  var spacing = $2;
1192
1187
  return module.insertTrimmingSpace(spacing, "(");
1193
1188
  });
1194
- var ApplicationStart$1 = $S(IndentedApplicationAllowed, $Y($S(EOS, NestedPropertyDefinitions)), InsertOpenParen);
1195
1189
  function ApplicationStart(state) {
1190
+ if (state.verbose)
1191
+ console.log("ENTER:", "ApplicationStart");
1196
1192
  if (state.tokenize) {
1197
- return $TOKEN("ApplicationStart", state, ApplicationStart$0(state) || ApplicationStart$1(state));
1193
+ return $TOKEN("ApplicationStart", state, ApplicationStart$0(state));
1198
1194
  } else {
1199
- return ApplicationStart$0(state) || ApplicationStart$1(state);
1195
+ return ApplicationStart$0(state);
1200
1196
  }
1201
1197
  }
1202
- var IndentedApplicationAllowed$0 = $TV($EXPECT($L0, fail, 'IndentedApplicationAllowed ""'), function($skip, $loc, $0, $1) {
1198
+ var IndentedApplicationAllowed$0 = $TV($EXPECT($L1, fail, 'IndentedApplicationAllowed ""'), function($skip, $loc, $0, $1) {
1203
1199
  if (module.suppressIndentedApplication)
1204
1200
  return $skip;
1205
1201
  return;
@@ -1324,7 +1320,7 @@ var Civet = (() => {
1324
1320
  return UpdateExpression$0(state) || UpdateExpression$1(state);
1325
1321
  }
1326
1322
  }
1327
- var UpdateExpressionSymbol$0 = $TV($C($EXPECT($L1, fail, 'UpdateExpressionSymbol "++"'), $EXPECT($L2, fail, 'UpdateExpressionSymbol "--"')), function($skip, $loc, $0, $1) {
1323
+ var UpdateExpressionSymbol$0 = $TV($C($EXPECT($L2, fail, 'UpdateExpressionSymbol "++"'), $EXPECT($L3, fail, 'UpdateExpressionSymbol "--"')), function($skip, $loc, $0, $1) {
1328
1324
  return { $loc, token: $1 };
1329
1325
  });
1330
1326
  function UpdateExpressionSymbol(state) {
@@ -1486,7 +1482,7 @@ var Civet = (() => {
1486
1482
  return ArrowFunctionTail$0(state) || ArrowFunctionTail$1(state);
1487
1483
  }
1488
1484
  }
1489
- var FatArrow$0 = $TS($S(__, $EXPECT($L3, fail, 'FatArrow "=>"')), function($skip, $loc, $0, $1, $2) {
1485
+ var FatArrow$0 = $TS($S(__, $EXPECT($L4, fail, 'FatArrow "=>"')), function($skip, $loc, $0, $1, $2) {
1490
1486
  var ws = $1;
1491
1487
  if (!ws.length)
1492
1488
  return " =>";
@@ -1501,14 +1497,8 @@ var Civet = (() => {
1501
1497
  return FatArrow$0(state);
1502
1498
  }
1503
1499
  }
1504
- var FatArrowBody$0 = $T($S(__, OpenBrace, EOS, NestedBlockStatements, __, CloseBrace), function(value) {
1505
- var exps = value[3];
1506
- return { "type": "BlockStatement", "expressions": exps, "children": value };
1507
- });
1508
- var FatArrowBody$1 = $T($S(InsertOpenBrace, EOS, NestedBlockStatements, InsertNewline, InsertIndent, InsertCloseBrace), function(value) {
1509
- var exps = value[2];
1510
- return { "type": "BlockStatement", "expressions": exps, "children": value };
1511
- });
1500
+ var FatArrowBody$0 = ExplicitBlock;
1501
+ var FatArrowBody$1 = ImplicitNestedBlock;
1512
1502
  var FatArrowBody$2 = AssignmentExpression;
1513
1503
  var FatArrowBody$3 = EmptyBlock;
1514
1504
  function FatArrowBody(state) {
@@ -1636,10 +1626,10 @@ var Civet = (() => {
1636
1626
  return ClassHeritage$0(state);
1637
1627
  }
1638
1628
  }
1639
- var ExtendsToken$0 = $TV($EXPECT($L4, fail, 'ExtendsToken "<"'), function($skip, $loc, $0, $1) {
1629
+ var ExtendsToken$0 = $TV($EXPECT($L5, fail, 'ExtendsToken "<"'), function($skip, $loc, $0, $1) {
1640
1630
  return { $loc, token: "extends" };
1641
1631
  });
1642
- var ExtendsToken$1 = $TV($EXPECT($L5, fail, 'ExtendsToken "extends"'), function($skip, $loc, $0, $1) {
1632
+ var ExtendsToken$1 = $TV($EXPECT($L6, fail, 'ExtendsToken "extends"'), function($skip, $loc, $0, $1) {
1643
1633
  return { $loc, token: $1 };
1644
1634
  });
1645
1635
  function ExtendsToken(state) {
@@ -1649,8 +1639,8 @@ var Civet = (() => {
1649
1639
  return ExtendsToken$0(state) || ExtendsToken$1(state);
1650
1640
  }
1651
1641
  }
1652
- var ClassBody$0 = $S(__, OpenBrace, $E($S(EOS, NestedClassElements)), __, CloseBrace);
1653
- var ClassBody$1 = $S(InsertOpenBrace, EOS, NestedClassElements, InsertNewline, InsertIndent, InsertCloseBrace);
1642
+ var ClassBody$0 = $S(__, OpenBrace, $E(NestedClassElements), __, CloseBrace);
1643
+ var ClassBody$1 = $S(InsertOpenBrace, NestedClassElements, InsertNewline, InsertIndent, InsertCloseBrace);
1654
1644
  function ClassBody(state) {
1655
1645
  if (state.tokenize) {
1656
1646
  return $TOKEN("ClassBody", state, ClassBody$0(state) || ClassBody$1(state));
@@ -1721,10 +1711,10 @@ var Civet = (() => {
1721
1711
  return FieldDefinition$0(state) || FieldDefinition$1(state) || FieldDefinition$2(state);
1722
1712
  }
1723
1713
  }
1724
- var This$0 = $TV($EXPECT($L6, fail, 'This "this"'), function($skip, $loc, $0, $1) {
1714
+ var This$0 = $TV($EXPECT($L7, fail, 'This "this"'), function($skip, $loc, $0, $1) {
1725
1715
  return { $loc, token: $1 };
1726
1716
  });
1727
- var This$1 = $TS($S(At, $S($E($EXPECT($L7, fail, 'This "#"')), IdentifierName)), function($skip, $loc, $0, $1, $2) {
1717
+ var This$1 = $TS($S(At, $S($E($EXPECT($L8, fail, 'This "#"')), IdentifierName)), function($skip, $loc, $0, $1, $2) {
1728
1718
  $1.token = "this.";
1729
1719
  return $0;
1730
1720
  });
@@ -1739,7 +1729,7 @@ var Civet = (() => {
1739
1729
  return This$0(state) || This$1(state) || This$2(state);
1740
1730
  }
1741
1731
  }
1742
- var LeftHandSideExpression$0 = $TS($S($Q($S(New, $N($EXPECT($L8, fail, 'LeftHandSideExpression "."')), __)), CallExpression), function($skip, $loc, $0, $1, $2) {
1732
+ var LeftHandSideExpression$0 = $TS($S($Q($S(New, $N($EXPECT($L9, fail, 'LeftHandSideExpression "."')), __)), CallExpression), function($skip, $loc, $0, $1, $2) {
1743
1733
  if ($1.length)
1744
1734
  return $0;
1745
1735
  return $2;
@@ -1753,8 +1743,8 @@ var Civet = (() => {
1753
1743
  return LeftHandSideExpression$0(state);
1754
1744
  }
1755
1745
  }
1756
- var CallExpression$0 = $S($EXPECT($L9, fail, 'CallExpression "super"'), ArgumentsWithTrailingCallExpressions);
1757
- var CallExpression$1 = $S($EXPECT($L10, fail, 'CallExpression "import"'), __, OpenParen, ExtendedExpression, __, CloseParen);
1746
+ var CallExpression$0 = $S($EXPECT($L10, fail, 'CallExpression "super"'), ArgumentsWithTrailingCallExpressions);
1747
+ var CallExpression$1 = $S($EXPECT($L11, fail, 'CallExpression "import"'), __, OpenParen, ExtendedExpression, __, CloseParen);
1758
1748
  var CallExpression$2 = $TS($S(MemberExpression, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2) {
1759
1749
  if ($2.length)
1760
1750
  return $0;
@@ -1787,7 +1777,7 @@ var Civet = (() => {
1787
1777
  return OptionalShorthand$0(state);
1788
1778
  }
1789
1779
  }
1790
- var NonNullAssertion$0 = $T($EXPECT($L11, fail, 'NonNullAssertion "!"'), function(value) {
1780
+ var NonNullAssertion$0 = $T($EXPECT($L12, fail, 'NonNullAssertion "!"'), function(value) {
1791
1781
  return { "ts": true, "children": value };
1792
1782
  });
1793
1783
  function NonNullAssertion(state) {
@@ -1837,7 +1827,7 @@ var Civet = (() => {
1837
1827
  $2.children.unshift($1[1]);
1838
1828
  return $2;
1839
1829
  });
1840
- var MemberExpressionRest$2 = $TS($S($E($S($Y(EOS), IndentedFurther)), $EXPECT($L12, fail, 'MemberExpressionRest "::"'), $E(IdentifierName)), function($skip, $loc, $0, $1, $2, $3) {
1830
+ var MemberExpressionRest$2 = $TS($S($E($S($Y(EOS), IndentedFurther)), $EXPECT($L13, fail, 'MemberExpressionRest "::"'), $E(IdentifierName)), function($skip, $loc, $0, $1, $2, $3) {
1841
1831
  var id = $3;
1842
1832
  if (id)
1843
1833
  return [".prototype.", id];
@@ -1911,7 +1901,7 @@ var Civet = (() => {
1911
1901
  return PropertyAccess$0(state);
1912
1902
  }
1913
1903
  }
1914
- var SuperProperty$0 = $S($EXPECT($L13, fail, 'SuperProperty "super["'), ExtendedExpression, __, CloseBracket);
1904
+ var SuperProperty$0 = $S($EXPECT($L14, fail, 'SuperProperty "super["'), ExtendedExpression, __, CloseBracket);
1915
1905
  function SuperProperty(state) {
1916
1906
  if (state.verbose)
1917
1907
  console.log("ENTER:", "SuperProperty");
@@ -1922,7 +1912,7 @@ var Civet = (() => {
1922
1912
  }
1923
1913
  }
1924
1914
  var MetaProperty$0 = $S(New, Dot, Target);
1925
- var MetaProperty$1 = $TV($EXPECT($L14, fail, 'MetaProperty "import.meta"'), function($skip, $loc, $0, $1) {
1915
+ var MetaProperty$1 = $TV($EXPECT($L15, fail, 'MetaProperty "import.meta"'), function($skip, $loc, $0, $1) {
1926
1916
  return { $loc, token: $1 };
1927
1917
  });
1928
1918
  function MetaProperty(state) {
@@ -1933,7 +1923,7 @@ var Civet = (() => {
1933
1923
  }
1934
1924
  }
1935
1925
  var Parameters$0 = NonEmptyParameters;
1936
- var Parameters$1 = $TV($EXPECT($L0, fail, 'Parameters ""'), function($skip, $loc, $0, $1) {
1926
+ var Parameters$1 = $TV($EXPECT($L1, fail, 'Parameters ""'), function($skip, $loc, $0, $1) {
1937
1927
  return {
1938
1928
  type: "Parameters",
1939
1929
  children: [{ $loc, token: "()" }],
@@ -1990,7 +1980,7 @@ var Civet = (() => {
1990
1980
  }
1991
1981
  }
1992
1982
  var ParameterElementDelimiter$0 = $S($Q(_), Comma);
1993
- var ParameterElementDelimiter$1 = $Y($S(__, $EXPECT($L15, fail, 'ParameterElementDelimiter ")"')));
1983
+ var ParameterElementDelimiter$1 = $Y($S(__, $EXPECT($L16, fail, 'ParameterElementDelimiter ")"')));
1994
1984
  var ParameterElementDelimiter$2 = $TV($Y(EOS), function($skip, $loc, $0, $1) {
1995
1985
  return { $loc, token: "," };
1996
1986
  });
@@ -2046,9 +2036,7 @@ var Civet = (() => {
2046
2036
  return ObjectBindingPattern$0(state);
2047
2037
  }
2048
2038
  }
2049
- var ObjectBindingPatternContent$0 = $T($S($Y(EOS), NestedBindingProperties), function(value) {
2050
- return value[1];
2051
- });
2039
+ var ObjectBindingPatternContent$0 = NestedBindingProperties;
2052
2040
  var ObjectBindingPatternContent$1 = $TS($S($Q(BindingProperty), $E($S(__, BindingRestProperty))), function($skip, $loc, $0, $1, $2) {
2053
2041
  var props = $1;
2054
2042
  var rest = $2;
@@ -2087,9 +2075,7 @@ var Civet = (() => {
2087
2075
  return ArrayBindingPattern$0(state);
2088
2076
  }
2089
2077
  }
2090
- var ArrayBindingPatternContent$0 = $T($S($Y(EOS), NestedBindingElements), function(value) {
2091
- return value[1];
2092
- });
2078
+ var ArrayBindingPatternContent$0 = NestedBindingElements;
2093
2079
  var ArrayBindingPatternContent$1 = $TS($S($Q($C(BindingElement, Elision)), $E($S(__, BindingRestElement))), function($skip, $loc, $0, $1, $2) {
2094
2080
  var props = $1;
2095
2081
  var rest = $2;
@@ -2392,7 +2378,7 @@ var Civet = (() => {
2392
2378
  return ThinArrowFunction$0(state);
2393
2379
  }
2394
2380
  }
2395
- var Arrow$0 = $TV($EXPECT($L16, fail, 'Arrow "->"'), function($skip, $loc, $0, $1) {
2381
+ var Arrow$0 = $TV($EXPECT($L17, fail, 'Arrow "->"'), function($skip, $loc, $0, $1) {
2396
2382
  return { $loc, token: $1 };
2397
2383
  });
2398
2384
  function Arrow(state) {
@@ -2404,14 +2390,40 @@ var Civet = (() => {
2404
2390
  return Arrow$0(state);
2405
2391
  }
2406
2392
  }
2407
- var Block$0 = $T($S(__, OpenBrace, EOS, NestedBlockStatements, __, CloseBrace), function(value) {
2408
- var exps = value[3];
2409
- return { "type": "BlockStatement", "expressions": exps, "children": value, "bare": false };
2393
+ var ExplicitBlock$0 = $TS($S(__, OpenBrace, NestedBlockStatements, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
2394
+ var block = $3;
2395
+ block.bare = false;
2396
+ block.children.unshift($1, $2);
2397
+ block.children.push($4, $5);
2398
+ return block;
2410
2399
  });
2411
- var Block$1 = $T($S(InsertOpenBrace, EOS, NestedBlockStatements, InsertNewline, InsertIndent, InsertCloseBrace), function(value) {
2412
- var exps = value[2];
2413
- return { "type": "BlockStatement", "expressions": exps, "children": value, "bare": false };
2400
+ function ExplicitBlock(state) {
2401
+ if (state.verbose)
2402
+ console.log("ENTER:", "ExplicitBlock");
2403
+ if (state.tokenize) {
2404
+ return $TOKEN("ExplicitBlock", state, ExplicitBlock$0(state));
2405
+ } else {
2406
+ return ExplicitBlock$0(state);
2407
+ }
2408
+ }
2409
+ var ImplicitNestedBlock$0 = $TS($S(InsertOpenBrace, NestedBlockStatements, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
2410
+ var block = $2;
2411
+ block.bare = false;
2412
+ block.children.unshift($1);
2413
+ block.children.push($3, $4, $5);
2414
+ return block;
2414
2415
  });
2416
+ function ImplicitNestedBlock(state) {
2417
+ if (state.verbose)
2418
+ console.log("ENTER:", "ImplicitNestedBlock");
2419
+ if (state.tokenize) {
2420
+ return $TOKEN("ImplicitNestedBlock", state, ImplicitNestedBlock$0(state));
2421
+ } else {
2422
+ return ImplicitNestedBlock$0(state);
2423
+ }
2424
+ }
2425
+ var Block$0 = ExplicitBlock;
2426
+ var Block$1 = ImplicitNestedBlock;
2415
2427
  var Block$2 = ThenClause;
2416
2428
  var Block$3 = $TS($S($Q(TrailingComment), Statement), function($skip, $loc, $0, $1, $2) {
2417
2429
  var ws = $1;
@@ -2461,7 +2473,7 @@ var Civet = (() => {
2461
2473
  }
2462
2474
  }
2463
2475
  var EmptyBlock$0 = $T($S(InsertOpenBrace, InsertCloseBrace), function(value) {
2464
- return { "type": "BlockStatement", "expressions": [], "children": value };
2476
+ return { "type": "BlockStatement", "expressions": [], "children": value, "bare": false };
2465
2477
  });
2466
2478
  function EmptyBlock(state) {
2467
2479
  if (state.verbose)
@@ -2472,14 +2484,14 @@ var Civet = (() => {
2472
2484
  return EmptyBlock$0(state);
2473
2485
  }
2474
2486
  }
2475
- var BracedBlock$0 = $T($S($Q(TrailingComment), OpenBrace, BracedContent, __, CloseBrace), function(value) {
2476
- var exps = value[2];
2477
- return { "type": "BlockStatement", "expressions": exps, "children": value };
2478
- });
2479
- var BracedBlock$1 = $T($S(InsertOpenBrace, EOS, NestedBlockStatements, InsertNewline, InsertIndent, InsertCloseBrace), function(value) {
2480
- var exps = value[2];
2481
- return { "type": "BlockStatement", "expressions": exps, "children": value };
2487
+ var BracedBlock$0 = $TS($S($Q(TrailingComment), OpenBrace, BracedContent, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
2488
+ var block = $3;
2489
+ block.bare = false;
2490
+ block.children.unshift($1, $2);
2491
+ block.children.push($4, $5);
2492
+ return block;
2482
2493
  });
2494
+ var BracedBlock$1 = ImplicitNestedBlock;
2483
2495
  var BracedBlock$2 = $TS($S(InsertOpenBrace, $Y(EOS), ObjectLiteral, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
2484
2496
  var s = $3;
2485
2497
  $0.splice(1, 1);
@@ -2489,8 +2501,8 @@ var Civet = (() => {
2489
2501
  children: $0
2490
2502
  };
2491
2503
  });
2492
- var BracedBlock$3 = $TS($S(InsertOpenBrace, $N(EOS), __, Statement, InsertSpace, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
2493
- var s = $4;
2504
+ var BracedBlock$3 = $TS($S(InsertOpenBrace, $N(EOS), $S(__, Statement), InsertSpace, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
2505
+ var s = $3;
2494
2506
  $0.splice(1, 1);
2495
2507
  return {
2496
2508
  type: "BlockStatement",
@@ -2505,10 +2517,16 @@ var Civet = (() => {
2505
2517
  return BracedBlock$0(state) || BracedBlock$1(state) || BracedBlock$2(state) || BracedBlock$3(state);
2506
2518
  }
2507
2519
  }
2508
- var BracedContent$0 = $T($S($Y(EOS), NestedBlockStatements), function(value) {
2509
- return value[1];
2520
+ var BracedContent$0 = NestedBlockStatements;
2521
+ var BracedContent$1 = $TS($S($Q(TrailingComment), Statement), function($skip, $loc, $0, $1, $2) {
2522
+ const expressions = [["", $2]];
2523
+ return {
2524
+ type: "BlockStatement",
2525
+ expressions,
2526
+ children: [$1, expressions],
2527
+ bare: true
2528
+ };
2510
2529
  });
2511
- var BracedContent$1 = $S($Q(TrailingComment), Statement);
2512
2530
  function BracedContent(state) {
2513
2531
  if (state.tokenize) {
2514
2532
  return $TOKEN("BracedContent", state, BracedContent$0(state) || BracedContent$1(state));
@@ -2520,7 +2538,16 @@ var Civet = (() => {
2520
2538
  var statements = $2;
2521
2539
  if (!statements.length)
2522
2540
  return $skip;
2523
- return statements;
2541
+ const first = statements[0];
2542
+ const ws = first[0];
2543
+ const indent = ws.pop();
2544
+ first[0] = indent;
2545
+ return {
2546
+ type: "BlockStatement",
2547
+ expressions: statements,
2548
+ children: [ws, statements],
2549
+ bare: true
2550
+ };
2524
2551
  });
2525
2552
  function NestedBlockStatements(state) {
2526
2553
  if (state.verbose)
@@ -2568,7 +2595,7 @@ var Civet = (() => {
2568
2595
  return LiteralContent$0(state) || LiteralContent$1(state) || LiteralContent$2(state) || LiteralContent$3(state);
2569
2596
  }
2570
2597
  }
2571
- var NullLiteral$0 = $TV($EXPECT($L17, fail, 'NullLiteral "null"'), function($skip, $loc, $0, $1) {
2598
+ var NullLiteral$0 = $TV($EXPECT($L18, fail, 'NullLiteral "null"'), function($skip, $loc, $0, $1) {
2572
2599
  return { $loc, token: $1 };
2573
2600
  });
2574
2601
  function NullLiteral(state) {
@@ -2583,7 +2610,7 @@ var Civet = (() => {
2583
2610
  var BooleanLiteral$0 = $T($S(CoffeeBooleansEnabled, CoffeeScriptBooleanLiteral), function(value) {
2584
2611
  return value[1];
2585
2612
  });
2586
- var BooleanLiteral$1 = $TS($S($C($EXPECT($L18, fail, 'BooleanLiteral "true"'), $EXPECT($L19, fail, 'BooleanLiteral "false"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
2613
+ var BooleanLiteral$1 = $TS($S($C($EXPECT($L19, fail, 'BooleanLiteral "true"'), $EXPECT($L20, fail, 'BooleanLiteral "false"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
2587
2614
  return { $loc, token: $1 };
2588
2615
  });
2589
2616
  function BooleanLiteral(state) {
@@ -2593,10 +2620,10 @@ var Civet = (() => {
2593
2620
  return BooleanLiteral$0(state) || BooleanLiteral$1(state);
2594
2621
  }
2595
2622
  }
2596
- var CoffeeScriptBooleanLiteral$0 = $TS($S($C($EXPECT($L20, fail, 'CoffeeScriptBooleanLiteral "yes"'), $EXPECT($L21, fail, 'CoffeeScriptBooleanLiteral "on"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
2623
+ var CoffeeScriptBooleanLiteral$0 = $TS($S($C($EXPECT($L21, fail, 'CoffeeScriptBooleanLiteral "yes"'), $EXPECT($L22, fail, 'CoffeeScriptBooleanLiteral "on"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
2597
2624
  return { $loc, token: "true" };
2598
2625
  });
2599
- var CoffeeScriptBooleanLiteral$1 = $TS($S($C($EXPECT($L22, fail, 'CoffeeScriptBooleanLiteral "no"'), $EXPECT($L23, fail, 'CoffeeScriptBooleanLiteral "off"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
2626
+ var CoffeeScriptBooleanLiteral$1 = $TS($S($C($EXPECT($L23, fail, 'CoffeeScriptBooleanLiteral "no"'), $EXPECT($L24, fail, 'CoffeeScriptBooleanLiteral "off"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
2600
2627
  return { $loc, token: "false" };
2601
2628
  });
2602
2629
  function CoffeeScriptBooleanLiteral(state) {
@@ -2606,7 +2633,7 @@ var Civet = (() => {
2606
2633
  return CoffeeScriptBooleanLiteral$0(state) || CoffeeScriptBooleanLiteral$1(state);
2607
2634
  }
2608
2635
  }
2609
- var Comma$0 = $TV($EXPECT($L24, fail, 'Comma ","'), function($skip, $loc, $0, $1) {
2636
+ var Comma$0 = $TV($EXPECT($L0, fail, 'Comma ","'), function($skip, $loc, $0, $1) {
2610
2637
  return { $loc, token: $1 };
2611
2638
  });
2612
2639
  function Comma(state) {
@@ -2904,9 +2931,7 @@ var Civet = (() => {
2904
2931
  return BracedObjectLiteral$0(state);
2905
2932
  }
2906
2933
  }
2907
- var BracedObjectLiteralContent$0 = $T($S($Y(EOS), NestedPropertyDefinitions), function(value) {
2908
- return value[1];
2909
- });
2934
+ var BracedObjectLiteralContent$0 = NestedPropertyDefinitions;
2910
2935
  var BracedObjectLiteralContent$1 = $TS($S(__, PropertyDefinitionList, $E($S(__, Comma))), function($skip, $loc, $0, $1, $2, $3) {
2911
2936
  if ($1.length) {
2912
2937
  $2.splice(0, 0, ...$1);
@@ -2923,12 +2948,12 @@ var Civet = (() => {
2923
2948
  return BracedObjectLiteralContent$0(state) || BracedObjectLiteralContent$1(state);
2924
2949
  }
2925
2950
  }
2926
- var NestedObjectLiteral$0 = $TS($S(InsertOpenBrace, $Y(EOS), NestedPropertyDefinitions, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
2927
- $3.unshift($1);
2928
- $3.push($4, $5, $6);
2951
+ var NestedObjectLiteral$0 = $TS($S(InsertOpenBrace, NestedPropertyDefinitions, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
2952
+ $2.unshift($1);
2953
+ $2.push($3, $4, $5);
2929
2954
  return {
2930
2955
  type: "ObjectExpression",
2931
- children: $3
2956
+ children: $2
2932
2957
  };
2933
2958
  });
2934
2959
  function NestedObjectLiteral(state) {
@@ -3150,7 +3175,7 @@ var Civet = (() => {
3150
3175
  return ClassElementName$0(state) || ClassElementName$1(state);
3151
3176
  }
3152
3177
  }
3153
- var PrivateIdentifier$0 = $TV($TEXT($S($EXPECT($L7, fail, 'PrivateIdentifier "#"'), IdentifierName)), function($skip, $loc, $0, $1) {
3178
+ var PrivateIdentifier$0 = $TV($TEXT($S($EXPECT($L8, fail, 'PrivateIdentifier "#"'), IdentifierName)), function($skip, $loc, $0, $1) {
3154
3179
  return {
3155
3180
  type: "Identifier",
3156
3181
  name: $0,
@@ -3231,7 +3256,7 @@ var Civet = (() => {
3231
3256
  var BinaryOpSymbol$6 = $EXPECT($L50, fail, 'BinaryOpSymbol "<="');
3232
3257
  var BinaryOpSymbol$7 = $EXPECT($L51, fail, 'BinaryOpSymbol ">="');
3233
3258
  var BinaryOpSymbol$8 = $EXPECT($L52, fail, 'BinaryOpSymbol "<<"');
3234
- var BinaryOpSymbol$9 = $EXPECT($L4, fail, 'BinaryOpSymbol "<"');
3259
+ var BinaryOpSymbol$9 = $EXPECT($L5, fail, 'BinaryOpSymbol "<"');
3235
3260
  var BinaryOpSymbol$10 = $EXPECT($L53, fail, 'BinaryOpSymbol ">>>"');
3236
3261
  var BinaryOpSymbol$11 = $EXPECT($L54, fail, 'BinaryOpSymbol ">>"');
3237
3262
  var BinaryOpSymbol$12 = $EXPECT($L55, fail, 'BinaryOpSymbol ">"');
@@ -3375,9 +3400,8 @@ var Civet = (() => {
3375
3400
  return EmptyStatement$0(state);
3376
3401
  }
3377
3402
  }
3378
- var BlockStatement$0 = $T($S(__, OpenBrace, EOS, NestedBlockStatements, __, CloseBrace, $N($S(__, $EXPECT($L43, fail, 'BlockStatement "="')))), function(value) {
3379
- var exps = value[3];
3380
- return { "type": "BlockStatement", "children": value, "expressions": exps };
3403
+ var BlockStatement$0 = $T($S(ExplicitBlock, $N($S(__, $EXPECT($L43, fail, 'BlockStatement "="')))), function(value) {
3404
+ return value[0];
3381
3405
  });
3382
3406
  function BlockStatement(state) {
3383
3407
  if (state.verbose)
@@ -3479,8 +3503,8 @@ var Civet = (() => {
3479
3503
  return UnlessExpression$0(state);
3480
3504
  }
3481
3505
  }
3482
- var ExpressionBlock$0 = $TS($S(InsertOpenParen, EOS, NestedBlockExpressions, InsertNewline, InsertIndent, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
3483
- var exps = $3;
3506
+ var ExpressionBlock$0 = $TS($S(InsertOpenParen, NestedBlockExpressions, InsertNewline, InsertIndent, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
3507
+ var exps = $2;
3484
3508
  exps[exps.length - 1].pop();
3485
3509
  return {
3486
3510
  type: "BlockExpressions",
@@ -3672,7 +3696,7 @@ var Civet = (() => {
3672
3696
  });
3673
3697
  var ForStatementControl$1 = $TS($S(CoffeeForLoopsEnabled, CoffeeForStatementParameters, $E(WhenCondition)), function($skip, $loc, $0, $1, $2, $3) {
3674
3698
  if ($3) {
3675
- const indent = "".padStart((module.currentIndent + 1) * 2);
3699
+ const indent = module.currentIndent.token + " ";
3676
3700
  module.insertTrimmingSpace($3, "");
3677
3701
  $2.blockPrefix.push([indent, {
3678
3702
  type: "IfStatement",
@@ -3710,7 +3734,7 @@ var Civet = (() => {
3710
3734
  var step = $8;
3711
3735
  var close = $9;
3712
3736
  let blockPrefix = [];
3713
- const indent = "".padStart((module.currentIndent + 1) * 2);
3737
+ const indent = module.currentIndent.token + " ";
3714
3738
  if (kind.token === "from") {
3715
3739
  if (step) {
3716
3740
  throw new Error("Can't use 'by' with 'from' in CoffeeScript for loops");
@@ -3723,7 +3747,7 @@ var Civet = (() => {
3723
3747
  module.insertTrimmingSpace(declaration, "");
3724
3748
  module.insertTrimmingSpace(exp, "");
3725
3749
  if (declaration.own) {
3726
- const indent2 = "".padStart((module.currentIndent + 1) * 2);
3750
+ const indent2 = module.currentIndent.token + " ";
3727
3751
  const hasPropRef = module.getHasPropRef();
3728
3752
  blockPrefix.push([indent2, "if (!", hasPropRef, ".call(", exp, ", ", declaration, ")) continue\n"]);
3729
3753
  }
@@ -4037,18 +4061,16 @@ var Civet = (() => {
4037
4061
  return SwitchExpression$0(state);
4038
4062
  }
4039
4063
  }
4040
- var CaseBlock$0 = $TS($S(__, OpenBrace, $Y(EOS), NestedCaseClauses, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
4041
- var clauses = $4;
4042
- $0.splice(2, 1);
4064
+ var CaseBlock$0 = $TS($S(__, OpenBrace, NestedCaseClauses, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4065
+ var clauses = $3;
4043
4066
  return {
4044
4067
  type: "CaseBlock",
4045
4068
  clauses,
4046
4069
  children: $0
4047
4070
  };
4048
4071
  });
4049
- var CaseBlock$1 = $TS($S($Y(EOS), InsertOpenBrace, NestedCaseClauses, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
4050
- var clauses = $3;
4051
- $0.shift();
4072
+ var CaseBlock$1 = $TS($S(InsertOpenBrace, NestedCaseClauses, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
4073
+ var clauses = $2;
4052
4074
  return {
4053
4075
  type: "CaseBlock",
4054
4076
  clauses,
@@ -4108,16 +4130,24 @@ var Civet = (() => {
4108
4130
  children: $0
4109
4131
  };
4110
4132
  });
4111
- var CaseClause$2 = $T($S(Default, ImpliedColon, $C(NestedBlockStatements, NoExpressions)), function(value) {
4112
- var exps = value[2];
4113
- return { "type": "DefaultClause", "expressions": exps, "children": value };
4133
+ var CaseClause$2 = $TS($S(Default, ImpliedColon, $C(NestedBlockStatements, NoExpressions)), function($skip, $loc, $0, $1, $2, $3) {
4134
+ var expressions = $3;
4135
+ if (expressions.expressions)
4136
+ expressions = expressions.expressions;
4137
+ return {
4138
+ type: "DefaultClause",
4139
+ expressions,
4140
+ children: $0
4141
+ };
4114
4142
  });
4115
4143
  var CaseClause$3 = $TS($S(Else, ImpliedColon, $C(NestedBlockStatements, $S($Q(TrailingComment), Statement))), function($skip, $loc, $0, $1, $2, $3) {
4116
- var exps = $3;
4144
+ var expressions = $3;
4117
4145
  $1.token = "default";
4146
+ if (expressions.expressions)
4147
+ expressions = expressions.expressions;
4118
4148
  return {
4119
4149
  type: "DefaultClause",
4120
- expressions: exps,
4150
+ expressions,
4121
4151
  children: $0
4122
4152
  };
4123
4153
  });
@@ -4147,7 +4177,7 @@ var Civet = (() => {
4147
4177
  return CaseExpressionList$0(state);
4148
4178
  }
4149
4179
  }
4150
- var NoExpressions$0 = $T($EXPECT($L0, fail, 'NoExpressions ""'), function(value) {
4180
+ var NoExpressions$0 = $T($EXPECT($L1, fail, 'NoExpressions ""'), function(value) {
4151
4181
  return [];
4152
4182
  });
4153
4183
  function NoExpressions(state) {
@@ -4160,7 +4190,7 @@ var Civet = (() => {
4160
4190
  }
4161
4191
  }
4162
4192
  var ImpliedColon$0 = $S(__, Colon);
4163
- var ImpliedColon$1 = $TV($EXPECT($L0, fail, 'ImpliedColon ""'), function($skip, $loc, $0, $1) {
4193
+ var ImpliedColon$1 = $TV($EXPECT($L1, fail, 'ImpliedColon ""'), function($skip, $loc, $0, $1) {
4164
4194
  return { $loc, token: ":" };
4165
4195
  });
4166
4196
  function ImpliedColon(state) {
@@ -4269,7 +4299,7 @@ var Civet = (() => {
4269
4299
  return ExpressionWithIndentedApplicationSuppressed$0(state);
4270
4300
  }
4271
4301
  }
4272
- var SuppressIndentedApplication$0 = $TV($EXPECT($L0, fail, 'SuppressIndentedApplication ""'), function($skip, $loc, $0, $1) {
4302
+ var SuppressIndentedApplication$0 = $TV($EXPECT($L1, fail, 'SuppressIndentedApplication ""'), function($skip, $loc, $0, $1) {
4273
4303
  module.suppressIndentedApplication = true;
4274
4304
  });
4275
4305
  function SuppressIndentedApplication(state) {
@@ -4379,7 +4409,7 @@ var Civet = (() => {
4379
4409
  return ImportDeclaration$0(state) || ImportDeclaration$1(state) || ImportDeclaration$2(state) || ImportDeclaration$3(state);
4380
4410
  }
4381
4411
  }
4382
- var ImpliedImport$0 = $TV($EXPECT($L0, fail, 'ImpliedImport ""'), function($skip, $loc, $0, $1) {
4412
+ var ImpliedImport$0 = $TV($EXPECT($L1, fail, 'ImpliedImport ""'), function($skip, $loc, $0, $1) {
4383
4413
  return { $loc, token: "import " };
4384
4414
  });
4385
4415
  function ImpliedImport(state) {
@@ -5237,7 +5267,7 @@ var Civet = (() => {
5237
5267
  return NonIdContinue$0(state);
5238
5268
  }
5239
5269
  }
5240
- var Loc$0 = $TV($EXPECT($L0, fail, 'Loc ""'), function($skip, $loc, $0, $1) {
5270
+ var Loc$0 = $TV($EXPECT($L1, fail, 'Loc ""'), function($skip, $loc, $0, $1) {
5241
5271
  return { $loc, token: "" };
5242
5272
  });
5243
5273
  function Loc(state) {
@@ -5393,7 +5423,7 @@ var Civet = (() => {
5393
5423
  return CloseBracket$0(state);
5394
5424
  }
5395
5425
  }
5396
- var CloseParen$0 = $TV($EXPECT($L15, fail, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
5426
+ var CloseParen$0 = $TV($EXPECT($L16, fail, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
5397
5427
  return { $loc, token: $1 };
5398
5428
  });
5399
5429
  function CloseParen(state) {
@@ -5477,7 +5507,7 @@ var Civet = (() => {
5477
5507
  return Do$0(state);
5478
5508
  }
5479
5509
  }
5480
- var Dot$0 = $TV($EXPECT($L8, fail, 'Dot "."'), function($skip, $loc, $0, $1) {
5510
+ var Dot$0 = $TV($EXPECT($L9, fail, 'Dot "."'), function($skip, $loc, $0, $1) {
5481
5511
  return { $loc, token: $1 };
5482
5512
  });
5483
5513
  function Dot(state) {
@@ -5621,7 +5651,7 @@ var Civet = (() => {
5621
5651
  return If$0(state);
5622
5652
  }
5623
5653
  }
5624
- var Import$0 = $TS($S($EXPECT($L10, fail, 'Import "import"'), $Y($EXPECT($R36, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
5654
+ var Import$0 = $TS($S($EXPECT($L11, fail, 'Import "import"'), $Y($EXPECT($R36, fail, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
5625
5655
  return { $loc, token: $1 };
5626
5656
  });
5627
5657
  function Import(state) {
@@ -6032,7 +6062,7 @@ var Civet = (() => {
6032
6062
  return JSXElement$0(state) || JSXElement$1(state);
6033
6063
  }
6034
6064
  }
6035
- var JSXSelfClosingElement$0 = $S($EXPECT($L4, fail, 'JSXSelfClosingElement "<"'), $TEXT(JSXElementName), $E(JSXAttributes), __, $EXPECT($L140, fail, 'JSXSelfClosingElement "/>"'));
6065
+ var JSXSelfClosingElement$0 = $S($EXPECT($L5, fail, 'JSXSelfClosingElement "<"'), $TEXT(JSXElementName), $E(JSXAttributes), __, $EXPECT($L140, fail, 'JSXSelfClosingElement "/>"'));
6036
6066
  function JSXSelfClosingElement(state) {
6037
6067
  if (state.verbose)
6038
6068
  console.log("ENTER:", "JSXSelfClosingElement");
@@ -6042,7 +6072,7 @@ var Civet = (() => {
6042
6072
  return JSXSelfClosingElement$0(state);
6043
6073
  }
6044
6074
  }
6045
- var JSXOpeningElement$0 = $S($EXPECT($L4, fail, 'JSXOpeningElement "<"'), $TEXT(JSXElementName), $E(JSXAttributes), __, $EXPECT($L55, fail, 'JSXOpeningElement ">"'));
6075
+ var JSXOpeningElement$0 = $S($EXPECT($L5, fail, 'JSXOpeningElement "<"'), $TEXT(JSXElementName), $E(JSXAttributes), __, $EXPECT($L55, fail, 'JSXOpeningElement ">"'));
6046
6076
  function JSXOpeningElement(state) {
6047
6077
  if (state.verbose)
6048
6078
  console.log("ENTER:", "JSXOpeningElement");
@@ -6246,9 +6276,9 @@ var Civet = (() => {
6246
6276
  return Namespace$0(state);
6247
6277
  }
6248
6278
  }
6249
- var InterfaceBlock$0 = $S(__, OpenBrace, EOS, NestedInterfaceProperties, __, CloseBrace);
6279
+ var InterfaceBlock$0 = $S(__, OpenBrace, NestedInterfaceProperties, __, CloseBrace);
6250
6280
  var InterfaceBlock$1 = $S(__, OpenBrace, $Q($S(__, InterfaceProperty)), __, CloseBrace);
6251
- var InterfaceBlock$2 = $S(InsertOpenBrace, EOS, NestedInterfaceProperties, InsertNewline, InsertIndent, InsertCloseBrace);
6281
+ var InterfaceBlock$2 = $S(InsertOpenBrace, NestedInterfaceProperties, InsertNewline, InsertIndent, InsertCloseBrace);
6252
6282
  function InterfaceBlock(state) {
6253
6283
  if (state.tokenize) {
6254
6284
  return $TOKEN("InterfaceBlock", state, InterfaceBlock$0(state) || InterfaceBlock$1(state) || InterfaceBlock$2(state));
@@ -6301,9 +6331,9 @@ var Civet = (() => {
6301
6331
  return InterfacePropertyDelimiter$0(state) || InterfacePropertyDelimiter$1(state) || InterfacePropertyDelimiter$2(state);
6302
6332
  }
6303
6333
  }
6304
- var NamespaceBlock$0 = $S(__, OpenBrace, EOS, NestedTypeDeclarations, __, CloseBrace);
6334
+ var NamespaceBlock$0 = $S(__, OpenBrace, NestedTypeDeclarations, __, CloseBrace);
6305
6335
  var NamespaceBlock$1 = $S(__, OpenBrace, $Q($S(__, TypeDeclaration, InterfacePropertyDelimiter)), __, CloseBrace);
6306
- var NamespaceBlock$2 = $S(InsertOpenBrace, EOS, NestedTypeDeclarations, InsertNewline, InsertIndent, InsertCloseBrace);
6336
+ var NamespaceBlock$2 = $S(InsertOpenBrace, NestedTypeDeclarations, InsertNewline, InsertIndent, InsertCloseBrace);
6307
6337
  function NamespaceBlock(state) {
6308
6338
  if (state.tokenize) {
6309
6339
  return $TOKEN("NamespaceBlock", state, NamespaceBlock$0(state) || NamespaceBlock$1(state) || NamespaceBlock$2(state));
@@ -6527,7 +6557,7 @@ var Civet = (() => {
6527
6557
  return NestedType$0(state);
6528
6558
  }
6529
6559
  }
6530
- var TypeConditional$0 = $TS($S(TypeBinary, $E($S(__, $EXPECT($L5, fail, 'TypeConditional "extends"'), Type, $E($S(__, QuestionMark, Type, __, Colon, Type))))), function($skip, $loc, $0, $1, $2) {
6560
+ var TypeConditional$0 = $TS($S(TypeBinary, $E($S(__, $EXPECT($L6, fail, 'TypeConditional "extends"'), Type, $E($S(__, QuestionMark, Type, __, Colon, Type))))), function($skip, $loc, $0, $1, $2) {
6531
6561
  if ($2)
6532
6562
  return $0;
6533
6563
  return $1;
@@ -6568,7 +6598,7 @@ var Civet = (() => {
6568
6598
  return TypeBinaryOp$0(state) || TypeBinaryOp$1(state);
6569
6599
  }
6570
6600
  }
6571
- var FunctionType$0 = $S(Parameters, __, $EXPECT($L3, fail, 'FunctionType "=>"'), Type);
6601
+ var FunctionType$0 = $S(Parameters, __, $EXPECT($L4, fail, 'FunctionType "=>"'), Type);
6572
6602
  function FunctionType(state) {
6573
6603
  if (state.verbose)
6574
6604
  console.log("ENTER:", "FunctionType");
@@ -6578,7 +6608,7 @@ var Civet = (() => {
6578
6608
  return FunctionType$0(state);
6579
6609
  }
6580
6610
  }
6581
- var TypeArguments$0 = $S(__, $EXPECT($L4, fail, 'TypeArguments "<"'), __, Type, $Q($S(__, Comma, __, Type)), $E($S(__, Comma)), __, $EXPECT($L55, fail, 'TypeArguments ">"'));
6611
+ var TypeArguments$0 = $S(__, $EXPECT($L5, fail, 'TypeArguments "<"'), __, Type, $Q($S(__, Comma, __, Type)), $E($S(__, Comma)), __, $EXPECT($L55, fail, 'TypeArguments ">"'));
6582
6612
  function TypeArguments(state) {
6583
6613
  if (state.verbose)
6584
6614
  console.log("ENTER:", "TypeArguments");
@@ -6588,7 +6618,7 @@ var Civet = (() => {
6588
6618
  return TypeArguments$0(state);
6589
6619
  }
6590
6620
  }
6591
- var TypeParameters$0 = $TS($S(__, $EXPECT($L4, fail, 'TypeParameters "<"'), __, Type, $Q($S(__, Comma, __, Type)), $E($S(__, Comma)), __, $EXPECT($L55, fail, 'TypeParameters ">"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
6621
+ var TypeParameters$0 = $TS($S(__, $EXPECT($L5, fail, 'TypeParameters "<"'), __, Type, $Q($S(__, Comma, __, Type)), $E($S(__, Comma)), __, $EXPECT($L55, fail, 'TypeParameters ">"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
6592
6622
  return { ts: true, children: $0 };
6593
6623
  });
6594
6624
  function TypeParameters(state) {
@@ -6610,7 +6640,7 @@ var Civet = (() => {
6610
6640
  return TypeParameter$0(state);
6611
6641
  }
6612
6642
  }
6613
- var TypeConstraint$0 = $S(__, $EXPECT($L5, fail, 'TypeConstraint "extends"'), Type);
6643
+ var TypeConstraint$0 = $S(__, $EXPECT($L6, fail, 'TypeConstraint "extends"'), Type);
6614
6644
  function TypeConstraint(state) {
6615
6645
  if (state.verbose)
6616
6646
  console.log("ENTER:", "TypeConstraint");
@@ -6736,7 +6766,7 @@ var Civet = (() => {
6736
6766
  return EOL$0(state);
6737
6767
  }
6738
6768
  }
6739
- var Debugger$0 = $TV($EXPECT($L0, fail, 'Debugger ""'), function($skip, $loc, $0, $1) {
6769
+ var Debugger$0 = $TV($EXPECT($L1, fail, 'Debugger ""'), function($skip, $loc, $0, $1) {
6740
6770
  debugger;
6741
6771
  });
6742
6772
  function Debugger(state) {
@@ -6748,7 +6778,7 @@ var Civet = (() => {
6748
6778
  return Debugger$0(state);
6749
6779
  }
6750
6780
  }
6751
- var InsertOpenParen$0 = $TV($EXPECT($L0, fail, 'InsertOpenParen ""'), function($skip, $loc, $0, $1) {
6781
+ var InsertOpenParen$0 = $TV($EXPECT($L1, fail, 'InsertOpenParen ""'), function($skip, $loc, $0, $1) {
6752
6782
  return { $loc, token: "(" };
6753
6783
  });
6754
6784
  function InsertOpenParen(state) {
@@ -6760,7 +6790,7 @@ var Civet = (() => {
6760
6790
  return InsertOpenParen$0(state);
6761
6791
  }
6762
6792
  }
6763
- var InsertCloseParen$0 = $TV($EXPECT($L0, fail, 'InsertCloseParen ""'), function($skip, $loc, $0, $1) {
6793
+ var InsertCloseParen$0 = $TV($EXPECT($L1, fail, 'InsertCloseParen ""'), function($skip, $loc, $0, $1) {
6764
6794
  return { $loc, token: ")" };
6765
6795
  });
6766
6796
  function InsertCloseParen(state) {
@@ -6772,7 +6802,7 @@ var Civet = (() => {
6772
6802
  return InsertCloseParen$0(state);
6773
6803
  }
6774
6804
  }
6775
- var InsertOpenBrace$0 = $TV($EXPECT($L0, fail, 'InsertOpenBrace ""'), function($skip, $loc, $0, $1) {
6805
+ var InsertOpenBrace$0 = $TV($EXPECT($L1, fail, 'InsertOpenBrace ""'), function($skip, $loc, $0, $1) {
6776
6806
  return [{ $loc, token: " " }, { $loc, token: "{" }];
6777
6807
  });
6778
6808
  function InsertOpenBrace(state) {
@@ -6784,7 +6814,7 @@ var Civet = (() => {
6784
6814
  return InsertOpenBrace$0(state);
6785
6815
  }
6786
6816
  }
6787
- var InsertCloseBrace$0 = $TV($EXPECT($L0, fail, 'InsertCloseBrace ""'), function($skip, $loc, $0, $1) {
6817
+ var InsertCloseBrace$0 = $TV($EXPECT($L1, fail, 'InsertCloseBrace ""'), function($skip, $loc, $0, $1) {
6788
6818
  return { $loc, token: "}" };
6789
6819
  });
6790
6820
  function InsertCloseBrace(state) {
@@ -6796,7 +6826,7 @@ var Civet = (() => {
6796
6826
  return InsertCloseBrace$0(state);
6797
6827
  }
6798
6828
  }
6799
- var InsertConst$0 = $TV($EXPECT($L0, fail, 'InsertConst ""'), function($skip, $loc, $0, $1) {
6829
+ var InsertConst$0 = $TV($EXPECT($L1, fail, 'InsertConst ""'), function($skip, $loc, $0, $1) {
6800
6830
  return { $loc, token: "const " };
6801
6831
  });
6802
6832
  function InsertConst(state) {
@@ -6808,7 +6838,7 @@ var Civet = (() => {
6808
6838
  return InsertConst$0(state);
6809
6839
  }
6810
6840
  }
6811
- var InsertReadonly$0 = $TV($EXPECT($L0, fail, 'InsertReadonly ""'), function($skip, $loc, $0, $1) {
6841
+ var InsertReadonly$0 = $TV($EXPECT($L1, fail, 'InsertReadonly ""'), function($skip, $loc, $0, $1) {
6812
6842
  return { ts: true, children: [{ $loc, token: "readonly " }] };
6813
6843
  });
6814
6844
  function InsertReadonly(state) {
@@ -6820,7 +6850,7 @@ var Civet = (() => {
6820
6850
  return InsertReadonly$0(state);
6821
6851
  }
6822
6852
  }
6823
- var InsertNewline$0 = $TV($EXPECT($L0, fail, 'InsertNewline ""'), function($skip, $loc, $0, $1) {
6853
+ var InsertNewline$0 = $TV($EXPECT($L1, fail, 'InsertNewline ""'), function($skip, $loc, $0, $1) {
6824
6854
  return "\n";
6825
6855
  });
6826
6856
  function InsertNewline(state) {
@@ -6832,8 +6862,8 @@ var Civet = (() => {
6832
6862
  return InsertNewline$0(state);
6833
6863
  }
6834
6864
  }
6835
- var InsertIndent$0 = $TV($EXPECT($L0, fail, 'InsertIndent ""'), function($skip, $loc, $0, $1) {
6836
- return "".padStart(module.currentIndent * 2);
6865
+ var InsertIndent$0 = $TV($EXPECT($L1, fail, 'InsertIndent ""'), function($skip, $loc, $0, $1) {
6866
+ return module.currentIndent.token;
6837
6867
  });
6838
6868
  function InsertIndent(state) {
6839
6869
  if (state.verbose)
@@ -6844,7 +6874,7 @@ var Civet = (() => {
6844
6874
  return InsertIndent$0(state);
6845
6875
  }
6846
6876
  }
6847
- var InsertSpace$0 = $TV($EXPECT($L0, fail, 'InsertSpace ""'), function($skip, $loc, $0, $1) {
6877
+ var InsertSpace$0 = $TV($EXPECT($L1, fail, 'InsertSpace ""'), function($skip, $loc, $0, $1) {
6848
6878
  return { $loc, token: " " };
6849
6879
  });
6850
6880
  function InsertSpace(state) {
@@ -6856,7 +6886,7 @@ var Civet = (() => {
6856
6886
  return InsertSpace$0(state);
6857
6887
  }
6858
6888
  }
6859
- var InsertDot$0 = $TV($EXPECT($L0, fail, 'InsertDot ""'), function($skip, $loc, $0, $1) {
6889
+ var InsertDot$0 = $TV($EXPECT($L1, fail, 'InsertDot ""'), function($skip, $loc, $0, $1) {
6860
6890
  return { $loc, token: "." };
6861
6891
  });
6862
6892
  function InsertDot(state) {
@@ -6868,7 +6898,7 @@ var Civet = (() => {
6868
6898
  return InsertDot$0(state);
6869
6899
  }
6870
6900
  }
6871
- var InsertBreak$0 = $TV($EXPECT($L0, fail, 'InsertBreak ""'), function($skip, $loc, $0, $1) {
6901
+ var InsertBreak$0 = $TV($EXPECT($L1, fail, 'InsertBreak ""'), function($skip, $loc, $0, $1) {
6872
6902
  return { $loc, token: ";break;" };
6873
6903
  });
6874
6904
  function InsertBreak(state) {
@@ -6880,7 +6910,7 @@ var Civet = (() => {
6880
6910
  return InsertBreak$0(state);
6881
6911
  }
6882
6912
  }
6883
- var CoffeeBinaryExistentialEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeBinaryExistentialEnabled ""'), function($skip, $loc, $0, $1) {
6913
+ var CoffeeBinaryExistentialEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeBinaryExistentialEnabled ""'), function($skip, $loc, $0, $1) {
6884
6914
  if (module.config.coffeeBinaryExistential)
6885
6915
  return;
6886
6916
  return $skip;
@@ -6894,7 +6924,7 @@ var Civet = (() => {
6894
6924
  return CoffeeBinaryExistentialEnabled$0(state);
6895
6925
  }
6896
6926
  }
6897
- var CoffeeBooleansEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeBooleansEnabled ""'), function($skip, $loc, $0, $1) {
6927
+ var CoffeeBooleansEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeBooleansEnabled ""'), function($skip, $loc, $0, $1) {
6898
6928
  if (module.config.coffeeBooleans)
6899
6929
  return;
6900
6930
  return $skip;
@@ -6908,7 +6938,7 @@ var Civet = (() => {
6908
6938
  return CoffeeBooleansEnabled$0(state);
6909
6939
  }
6910
6940
  }
6911
- var CoffeeClassesEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeClassesEnabled ""'), function($skip, $loc, $0, $1) {
6941
+ var CoffeeClassesEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeClassesEnabled ""'), function($skip, $loc, $0, $1) {
6912
6942
  if (module.config.coffeeClasses)
6913
6943
  return;
6914
6944
  return $skip;
@@ -6922,7 +6952,7 @@ var Civet = (() => {
6922
6952
  return CoffeeClassesEnabled$0(state);
6923
6953
  }
6924
6954
  }
6925
- var CoffeeCommentEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeCommentEnabled ""'), function($skip, $loc, $0, $1) {
6955
+ var CoffeeCommentEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeCommentEnabled ""'), function($skip, $loc, $0, $1) {
6926
6956
  if (module.config.coffeeComment)
6927
6957
  return;
6928
6958
  return $skip;
@@ -6936,7 +6966,7 @@ var Civet = (() => {
6936
6966
  return CoffeeCommentEnabled$0(state);
6937
6967
  }
6938
6968
  }
6939
- var CoffeeDoEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeDoEnabled ""'), function($skip, $loc, $0, $1) {
6969
+ var CoffeeDoEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeDoEnabled ""'), function($skip, $loc, $0, $1) {
6940
6970
  if (module.config.coffeeDo)
6941
6971
  return;
6942
6972
  return $skip;
@@ -6950,7 +6980,7 @@ var Civet = (() => {
6950
6980
  return CoffeeDoEnabled$0(state);
6951
6981
  }
6952
6982
  }
6953
- var CoffeeForLoopsEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeForLoopsEnabled ""'), function($skip, $loc, $0, $1) {
6983
+ var CoffeeForLoopsEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeForLoopsEnabled ""'), function($skip, $loc, $0, $1) {
6954
6984
  if (module.config.coffeeForLoops)
6955
6985
  return;
6956
6986
  return $skip;
@@ -6964,7 +6994,7 @@ var Civet = (() => {
6964
6994
  return CoffeeForLoopsEnabled$0(state);
6965
6995
  }
6966
6996
  }
6967
- var CoffeeInterpolationEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeInterpolationEnabled ""'), function($skip, $loc, $0, $1) {
6997
+ var CoffeeInterpolationEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeInterpolationEnabled ""'), function($skip, $loc, $0, $1) {
6968
6998
  if (module.config.coffeeInterpolation)
6969
6999
  return;
6970
7000
  return $skip;
@@ -6978,7 +7008,7 @@ var Civet = (() => {
6978
7008
  return CoffeeInterpolationEnabled$0(state);
6979
7009
  }
6980
7010
  }
6981
- var CoffeeIsntEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeIsntEnabled ""'), function($skip, $loc, $0, $1) {
7011
+ var CoffeeIsntEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeIsntEnabled ""'), function($skip, $loc, $0, $1) {
6982
7012
  if (module.config.coffeeIsnt)
6983
7013
  return;
6984
7014
  return $skip;
@@ -6992,7 +7022,7 @@ var Civet = (() => {
6992
7022
  return CoffeeIsntEnabled$0(state);
6993
7023
  }
6994
7024
  }
6995
- var CoffeeLineContinuationEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeLineContinuationEnabled ""'), function($skip, $loc, $0, $1) {
7025
+ var CoffeeLineContinuationEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeLineContinuationEnabled ""'), function($skip, $loc, $0, $1) {
6996
7026
  if (module.config.coffeeLineContinuation)
6997
7027
  return;
6998
7028
  return $skip;
@@ -7006,7 +7036,7 @@ var Civet = (() => {
7006
7036
  return CoffeeLineContinuationEnabled$0(state);
7007
7037
  }
7008
7038
  }
7009
- var CoffeeNotEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeNotEnabled ""'), function($skip, $loc, $0, $1) {
7039
+ var CoffeeNotEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeNotEnabled ""'), function($skip, $loc, $0, $1) {
7010
7040
  if (module.config.coffeeNot)
7011
7041
  return;
7012
7042
  return $skip;
@@ -7020,7 +7050,7 @@ var Civet = (() => {
7020
7050
  return CoffeeNotEnabled$0(state);
7021
7051
  }
7022
7052
  }
7023
- var CoffeeOfEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeeOfEnabled ""'), function($skip, $loc, $0, $1) {
7053
+ var CoffeeOfEnabled$0 = $TV($EXPECT($L1, fail, 'CoffeeOfEnabled ""'), function($skip, $loc, $0, $1) {
7024
7054
  if (module.config.coffeeOf)
7025
7055
  return;
7026
7056
  return $skip;
@@ -7034,9 +7064,21 @@ var Civet = (() => {
7034
7064
  return CoffeeOfEnabled$0(state);
7035
7065
  }
7036
7066
  }
7037
- var Reset$0 = $TV($EXPECT($L0, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
7038
- module.currentIndent = 0;
7039
- module.indentLevels = [0];
7067
+ var Reset$0 = $TV($EXPECT($L1, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
7068
+ module.indentLevels = [{
7069
+ level: 0,
7070
+ token: ""
7071
+ }];
7072
+ if (!module._init) {
7073
+ module._init = true;
7074
+ Object.defineProperties(module, {
7075
+ currentIndent: {
7076
+ get() {
7077
+ return module.indentLevels[module.indentLevels.length - 1];
7078
+ }
7079
+ }
7080
+ });
7081
+ }
7040
7082
  module.verbose = false;
7041
7083
  module.config = {
7042
7084
  autoVar: false,
@@ -7071,7 +7113,7 @@ var Civet = (() => {
7071
7113
  ts: true,
7072
7114
  children: [" as any"]
7073
7115
  };
7074
- module.prelude.push(["", "const ", indexOfRef, typeSuffix, " = [].indexOf", asAny, "\n"]);
7116
+ module.prelude.push(["", ["const ", indexOfRef, typeSuffix, " = [].indexOf", asAny, "\n"]]);
7075
7117
  return indexOfRef;
7076
7118
  };
7077
7119
  module.getHasPropRef = function() {
@@ -7089,7 +7131,7 @@ var Civet = (() => {
7089
7131
  ts: true,
7090
7132
  children: [" as any"]
7091
7133
  };
7092
- module.prelude.push(["", "const ", hasPropRef, typeSuffix, " = {}.hasOwnProperty", asAny, "\n"]);
7134
+ module.prelude.push(["", ["const ", hasPropRef, typeSuffix, " = {}.hasOwnProperty", asAny, "\n"]]);
7093
7135
  return hasPropRef;
7094
7136
  };
7095
7137
  Object.defineProperty(module.config, "coffeeCompat", {
@@ -7126,7 +7168,7 @@ var Civet = (() => {
7126
7168
  }
7127
7169
  });
7128
7170
  module.modifyString = function(str) {
7129
- return str.replace(/(?<!\\)(\\\\)*\n/g, "$1\\n");
7171
+ return str.replace(/(^.?|[^\\]{2})(\\\\)*\n/g, "$1$2\\n");
7130
7172
  };
7131
7173
  });
7132
7174
  function Reset(state) {
@@ -7138,7 +7180,7 @@ var Civet = (() => {
7138
7180
  return Reset$0(state);
7139
7181
  }
7140
7182
  }
7141
- var Init$0 = $TS($S($E(Shebang), $Q(DirectivePrologue), $EXPECT($L0, fail, 'Init ""')), function($skip, $loc, $0, $1, $2, $3) {
7183
+ var Init$0 = $TS($S($E(Shebang), $Q(DirectivePrologue), $EXPECT($L1, fail, 'Init ""')), function($skip, $loc, $0, $1, $2, $3) {
7142
7184
  var directives = $2;
7143
7185
  directives.forEach((directive) => {
7144
7186
  if (directive.type === "CivetPrologue") {
@@ -7648,7 +7690,9 @@ var Civet = (() => {
7648
7690
  scopes.pop();
7649
7691
  });
7650
7692
  if (varIds.length) {
7651
- const indent = statements[0][0];
7693
+ let indent = statements[0][0];
7694
+ if (Array.isArray(indent))
7695
+ indent = indent[indent.length - 1];
7652
7696
  statements.unshift([indent, "var ", varIds.join(", "), "\n"]);
7653
7697
  }
7654
7698
  }
@@ -7667,7 +7711,7 @@ var Civet = (() => {
7667
7711
  const level = $1.length;
7668
7712
  return {
7669
7713
  $loc,
7670
- token: "".padStart(level * 2),
7714
+ token: $1.join(""),
7671
7715
  level
7672
7716
  };
7673
7717
  });
@@ -7680,23 +7724,28 @@ var Civet = (() => {
7680
7724
  return Indent$0(state);
7681
7725
  }
7682
7726
  }
7683
- var TrackIndent$0 = $TV($EXPECT($L0, fail, 'TrackIndent ""'), function($skip, $loc, $0, $1) {
7684
- module.indentLevels.push(module.currentIndent);
7727
+ var TrackIndented$0 = $TV(Indent, function($skip, $loc, $0, $1) {
7728
+ var indent = $0;
7729
+ const { level } = indent;
7730
+ if (level <= module.currentIndent.level) {
7731
+ return $skip;
7732
+ }
7733
+ module.indentLevels.push(indent);
7685
7734
  });
7686
- function TrackIndent(state) {
7735
+ function TrackIndented(state) {
7687
7736
  if (state.verbose)
7688
- console.log("ENTER:", "TrackIndent");
7737
+ console.log("ENTER:", "TrackIndented");
7689
7738
  if (state.tokenize) {
7690
- return $TOKEN("TrackIndent", state, TrackIndent$0(state));
7739
+ return $TOKEN("TrackIndented", state, TrackIndented$0(state));
7691
7740
  } else {
7692
- return TrackIndent$0(state);
7741
+ return TrackIndented$0(state);
7693
7742
  }
7694
7743
  }
7695
- var Samedent$0 = $TS($S($E(EOS), Indent), function($skip, $loc, $0, $1, $2) {
7744
+ var Samedent$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
7696
7745
  var indent = $2;
7697
7746
  const { level } = indent;
7698
- const currentIndent = module.indentLevels[module.indentLevels.length - 1];
7699
- if (level === currentIndent) {
7747
+ const currentIndentLevel = module.currentIndent.level;
7748
+ if (level === currentIndentLevel) {
7700
7749
  return $0;
7701
7750
  }
7702
7751
  return $skip;
@@ -7710,11 +7759,11 @@ var Civet = (() => {
7710
7759
  return Samedent$0(state);
7711
7760
  }
7712
7761
  }
7713
- var IndentedFurther$0 = $TS($S($E(EOS), Indent), function($skip, $loc, $0, $1, $2) {
7762
+ var IndentedFurther$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
7714
7763
  var indent = $2;
7715
7764
  const { level } = indent;
7716
- const currentIndent = module.indentLevels[module.indentLevels.length - 1];
7717
- if (level > currentIndent) {
7765
+ const currentIndentLevel = module.currentIndent.level;
7766
+ if (level > currentIndentLevel) {
7718
7767
  return $0;
7719
7768
  }
7720
7769
  return $skip;
@@ -7728,13 +7777,7 @@ var Civet = (() => {
7728
7777
  return IndentedFurther$0(state);
7729
7778
  }
7730
7779
  }
7731
- var PushIndent$0 = $TV($EXPECT($L0, fail, 'PushIndent ""'), function($skip, $loc, $0, $1) {
7732
- module.currentIndent++;
7733
- if (module.verbose) {
7734
- console.log("pushing indent", module.currentIndent);
7735
- }
7736
- module.indentLevels.push(module.currentIndent);
7737
- });
7780
+ var PushIndent$0 = $Y($S(EOS, TrackIndented));
7738
7781
  function PushIndent(state) {
7739
7782
  if (state.verbose)
7740
7783
  console.log("ENTER:", "PushIndent");
@@ -7744,12 +7787,11 @@ var Civet = (() => {
7744
7787
  return PushIndent$0(state);
7745
7788
  }
7746
7789
  }
7747
- var PopIndent$0 = $TV($EXPECT($L0, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
7790
+ var PopIndent$0 = $TV($EXPECT($L1, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
7748
7791
  if (module.verbose) {
7749
7792
  console.log("popping indent", module.indentLevels[module.indentLevels.length - 1], "->", module.indentLevels[module.indentLevels.length - 2]);
7750
7793
  }
7751
7794
  module.indentLevels.pop();
7752
- module.currentIndent = module.indentLevels[module.indentLevels.length - 1];
7753
7795
  });
7754
7796
  function PopIndent(state) {
7755
7797
  if (state.verbose)
@@ -7760,16 +7802,15 @@ var Civet = (() => {
7760
7802
  return PopIndent$0(state);
7761
7803
  }
7762
7804
  }
7763
- var Nested$0 = $TS($S($E(EOS), Indent), function($skip, $loc, $0, $1, $2) {
7805
+ var Nested$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
7764
7806
  var eos = $1;
7765
7807
  var indent = $2;
7766
7808
  const { level } = indent;
7767
- const currentIndent = module.indentLevels[module.indentLevels.length - 1];
7809
+ const currentIndent = module.currentIndent;
7768
7810
  if (module.verbose) {
7769
- console.log("global indent", module.currentIndent);
7770
7811
  console.log("Indented", level, currentIndent);
7771
7812
  }
7772
- if (level !== currentIndent) {
7813
+ if (level !== currentIndent.level) {
7773
7814
  if (module.verbose) {
7774
7815
  console.log("skipped nested");
7775
7816
  }