@danielx/civet 0.5.60 → 0.5.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.mjs CHANGED
@@ -448,6 +448,7 @@ ${input.slice(result.pos)}
448
448
  ArgumentPart,
449
449
  BinaryOpExpression,
450
450
  BinaryOpRHS,
451
+ RHS,
451
452
  ParenthesizedAssignment,
452
453
  UnaryExpression,
453
454
  UnaryPostfix,
@@ -560,10 +561,14 @@ ${input.slice(result.pos)}
560
561
  Block,
561
562
  ThenClause,
562
563
  BracedOrEmptyBlock,
564
+ NoPostfixBracedOrEmptyBlock,
563
565
  EmptyBlock,
564
566
  EmptyBareBlock,
565
567
  BracedBlock,
568
+ NoPostfixBracedBlock,
569
+ NonSingleBracedBlock,
566
570
  SingleLineStatements,
571
+ PostfixedSingleLineStatements,
567
572
  BracedContent,
568
573
  NestedBlockStatements,
569
574
  NestedBlockStatement,
@@ -619,6 +624,8 @@ ${input.slice(result.pos)}
619
624
  UnaryOp,
620
625
  ModuleItem,
621
626
  StatementListItem,
627
+ PostfixedStatement,
628
+ PostfixedExpression,
622
629
  PostfixStatement,
623
630
  Statement,
624
631
  EmptyStatement,
@@ -665,7 +672,7 @@ ${input.slice(result.pos)}
665
672
  TryExpression,
666
673
  CatchClause,
667
674
  CatchBind,
668
- Finally,
675
+ FinallyClause,
669
676
  CatchParameter,
670
677
  Condition,
671
678
  ExpressionWithIndentedApplicationSuppressed,
@@ -798,6 +805,7 @@ ${input.slice(result.pos)}
798
805
  Equals,
799
806
  Export,
800
807
  Extends,
808
+ Finally,
801
809
  For,
802
810
  From,
803
811
  Function,
@@ -932,6 +940,7 @@ ${input.slice(result.pos)}
932
940
  InlineInterfacePropertyDelimiter,
933
941
  TypeBinaryOp,
934
942
  FunctionType,
943
+ TypeArrowFunction,
935
944
  TypeArguments,
936
945
  TypeArgument,
937
946
  TypeArgumentDelimiter,
@@ -1075,41 +1084,41 @@ ${input.slice(result.pos)}
1075
1084
  var $L80 = $L("|");
1076
1085
  var $L81 = $L(";");
1077
1086
  var $L82 = $L("own");
1078
- var $L83 = $L("finally");
1079
- var $L84 = $L("break");
1080
- var $L85 = $L("continue");
1081
- var $L86 = $L("debugger");
1082
- var $L87 = $L("assert");
1083
- var $L88 = $L(":=");
1084
- var $L89 = $L(".=");
1085
- var $L90 = $L("/*");
1086
- var $L91 = $L("*/");
1087
- var $L92 = $L("\\");
1088
- var $L93 = $L("[");
1089
- var $L94 = $L("`");
1090
- var $L95 = $L("abstract");
1091
- var $L96 = $L("as");
1092
- var $L97 = $L("@");
1093
- var $L98 = $L("@@");
1094
- var $L99 = $L("async");
1095
- var $L100 = $L("await");
1096
- var $L101 = $L("by");
1097
- var $L102 = $L("case");
1098
- var $L103 = $L("catch");
1099
- var $L104 = $L("class");
1100
- var $L105 = $L("#{");
1101
- var $L106 = $L(",");
1102
- var $L107 = $L("declare");
1103
- var $L108 = $L("default");
1104
- var $L109 = $L("delete");
1105
- var $L110 = $L("do");
1106
- var $L111 = $L("..");
1107
- var $L112 = $L("...");
1108
- var $L113 = $L("::");
1109
- var $L114 = $L('"');
1110
- var $L115 = $L("else");
1111
- var $L116 = $L("export");
1112
- var $L117 = $L("extends");
1087
+ var $L83 = $L("break");
1088
+ var $L84 = $L("continue");
1089
+ var $L85 = $L("debugger");
1090
+ var $L86 = $L("assert");
1091
+ var $L87 = $L(":=");
1092
+ var $L88 = $L(".=");
1093
+ var $L89 = $L("/*");
1094
+ var $L90 = $L("*/");
1095
+ var $L91 = $L("\\");
1096
+ var $L92 = $L("[");
1097
+ var $L93 = $L("`");
1098
+ var $L94 = $L("abstract");
1099
+ var $L95 = $L("as");
1100
+ var $L96 = $L("@");
1101
+ var $L97 = $L("@@");
1102
+ var $L98 = $L("async");
1103
+ var $L99 = $L("await");
1104
+ var $L100 = $L("by");
1105
+ var $L101 = $L("case");
1106
+ var $L102 = $L("catch");
1107
+ var $L103 = $L("class");
1108
+ var $L104 = $L("#{");
1109
+ var $L105 = $L(",");
1110
+ var $L106 = $L("declare");
1111
+ var $L107 = $L("default");
1112
+ var $L108 = $L("delete");
1113
+ var $L109 = $L("do");
1114
+ var $L110 = $L("..");
1115
+ var $L111 = $L("...");
1116
+ var $L112 = $L("::");
1117
+ var $L113 = $L('"');
1118
+ var $L114 = $L("else");
1119
+ var $L115 = $L("export");
1120
+ var $L116 = $L("extends");
1121
+ var $L117 = $L("finally");
1113
1122
  var $L118 = $L("for");
1114
1123
  var $L119 = $L("from");
1115
1124
  var $L120 = $L("function");
@@ -1165,7 +1174,7 @@ ${input.slice(result.pos)}
1165
1174
  var $L170 = $L("infer");
1166
1175
  var $L171 = $L("[]");
1167
1176
  var $L172 = $L("civet");
1168
- var $R0 = $R(new RegExp("(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
1177
+ var $R0 = $R(new RegExp("(as|for|while|until|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
1169
1178
  var $R1 = $R(new RegExp("[0-9]", "suy"));
1170
1179
  var $R2 = $R(new RegExp("[&]", "suy"));
1171
1180
  var $R3 = $R(new RegExp("[!~+-]+", "suy"));
@@ -1546,7 +1555,7 @@ ${input.slice(result.pos)}
1546
1555
  return result;
1547
1556
  }
1548
1557
  }
1549
- var ForbiddenImplicitCalls$0 = $R$0($EXPECT($R0, fail, "ForbiddenImplicitCalls /(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
1558
+ var ForbiddenImplicitCalls$0 = $R$0($EXPECT($R0, fail, "ForbiddenImplicitCalls /(as|for|while|until|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
1550
1559
  var ForbiddenImplicitCalls$1 = $EXPECT($L0, fail, 'ForbiddenImplicitCalls "/ "');
1551
1560
  var ForbiddenImplicitCalls$2 = AtAt;
1552
1561
  var ForbiddenImplicitCalls$3 = $S(Identifier, $EXPECT($L1, fail, 'ForbiddenImplicitCalls "="'), Whitespace);
@@ -1865,7 +1874,12 @@ ${input.slice(result.pos)}
1865
1874
  return result;
1866
1875
  }
1867
1876
  }
1868
- var BinaryOpRHS$0 = $S(__, BinaryOp, __, $C(ParenthesizedAssignment, UnaryExpression, ExpressionizedStatement));
1877
+ var BinaryOpRHS$0 = $TS($S(BinaryOp, RHS), function($skip, $loc, $0, $1, $2) {
1878
+ var op = $1;
1879
+ var rhs = $2;
1880
+ return [[], op, [], rhs];
1881
+ });
1882
+ var BinaryOpRHS$1 = $S(__, BinaryOp, $C(_, $S(EOS, __)), RHS);
1869
1883
  function BinaryOpRHS(state) {
1870
1884
  let eventData;
1871
1885
  if (state.events) {
@@ -1877,17 +1891,42 @@ ${input.slice(result.pos)}
1877
1891
  }
1878
1892
  }
1879
1893
  if (state.tokenize) {
1880
- const result = $TOKEN("BinaryOpRHS", state, BinaryOpRHS$0(state));
1894
+ const result = $TOKEN("BinaryOpRHS", state, BinaryOpRHS$0(state) || BinaryOpRHS$1(state));
1881
1895
  if (state.events)
1882
1896
  state.events.exit?.("BinaryOpRHS", state, result, eventData);
1883
1897
  return result;
1884
1898
  } else {
1885
- const result = BinaryOpRHS$0(state);
1899
+ const result = BinaryOpRHS$0(state) || BinaryOpRHS$1(state);
1886
1900
  if (state.events)
1887
1901
  state.events.exit?.("BinaryOpRHS", state, result, eventData);
1888
1902
  return result;
1889
1903
  }
1890
1904
  }
1905
+ var RHS$0 = ParenthesizedAssignment;
1906
+ var RHS$1 = UnaryExpression;
1907
+ var RHS$2 = ExpressionizedStatement;
1908
+ function RHS(state) {
1909
+ let eventData;
1910
+ if (state.events) {
1911
+ const result = state.events.enter?.("RHS", state);
1912
+ if (result) {
1913
+ if (result.cache)
1914
+ return result.cache;
1915
+ eventData = result.data;
1916
+ }
1917
+ }
1918
+ if (state.tokenize) {
1919
+ const result = $TOKEN("RHS", state, RHS$0(state) || RHS$1(state) || RHS$2(state));
1920
+ if (state.events)
1921
+ state.events.exit?.("RHS", state, result, eventData);
1922
+ return result;
1923
+ } else {
1924
+ const result = RHS$0(state) || RHS$1(state) || RHS$2(state);
1925
+ if (state.events)
1926
+ state.events.exit?.("RHS", state, result, eventData);
1927
+ return result;
1928
+ }
1929
+ }
1891
1930
  var ParenthesizedAssignment$0 = $S(InsertOpenParen, ActualAssignment, InsertCloseParen);
1892
1931
  function ParenthesizedAssignment(state) {
1893
1932
  let eventData;
@@ -2311,10 +2350,11 @@ ${input.slice(result.pos)}
2311
2350
  return result;
2312
2351
  }
2313
2352
  }
2314
- var FatArrowBody$0 = ExplicitBlock;
2315
- var FatArrowBody$1 = ImplicitNestedBlock;
2316
- var FatArrowBody$2 = AssignmentExpression;
2317
- var FatArrowBody$3 = EmptyBlock;
2353
+ var FatArrowBody$0 = $T($S($N(EOS), PostfixedExpression, $N(SemicolonDelimiter)), function(value) {
2354
+ var exp = value[1];
2355
+ return exp;
2356
+ });
2357
+ var FatArrowBody$1 = BracedOrEmptyBlock;
2318
2358
  function FatArrowBody(state) {
2319
2359
  let eventData;
2320
2360
  if (state.events) {
@@ -2326,12 +2366,12 @@ ${input.slice(result.pos)}
2326
2366
  }
2327
2367
  }
2328
2368
  if (state.tokenize) {
2329
- const result = $TOKEN("FatArrowBody", state, FatArrowBody$0(state) || FatArrowBody$1(state) || FatArrowBody$2(state) || FatArrowBody$3(state));
2369
+ const result = $TOKEN("FatArrowBody", state, FatArrowBody$0(state) || FatArrowBody$1(state));
2330
2370
  if (state.events)
2331
2371
  state.events.exit?.("FatArrowBody", state, result, eventData);
2332
2372
  return result;
2333
2373
  } else {
2334
- const result = FatArrowBody$0(state) || FatArrowBody$1(state) || FatArrowBody$2(state) || FatArrowBody$3(state);
2374
+ const result = FatArrowBody$0(state) || FatArrowBody$1(state);
2335
2375
  if (state.events)
2336
2376
  state.events.exit?.("FatArrowBody", state, result, eventData);
2337
2377
  return result;
@@ -2572,11 +2612,11 @@ ${input.slice(result.pos)}
2572
2612
  return result;
2573
2613
  }
2574
2614
  }
2575
- var ParenthesizedExpression$0 = $TS($S(OpenParen, ExtendedExpression, $E($S($Q(TrailingComment), PostfixStatement)), __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
2615
+ var ParenthesizedExpression$0 = $TS($S(OpenParen, PostfixedExpression, __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4) {
2576
2616
  var exp = $2;
2577
- var post = $3;
2578
- if (post) {
2579
- return module.attachPostfixStatementAsExpression(exp, post);
2617
+ switch (exp.type) {
2618
+ case "IterationExpression":
2619
+ return $2;
2580
2620
  }
2581
2621
  return {
2582
2622
  type: "ParenthesizedExpression",
@@ -3238,7 +3278,12 @@ ${input.slice(result.pos)}
3238
3278
  }
3239
3279
  }
3240
3280
  var CallExpressionRest$0 = MemberExpressionRest;
3241
- var CallExpressionRest$1 = TemplateLiteral;
3281
+ var CallExpressionRest$1 = $TV($C(TemplateLiteral, StringLiteral), function($skip, $loc, $0, $1) {
3282
+ if ($1.type === "StringLiteral") {
3283
+ return "`" + $1.token.slice(1, -1).replace(/(`|\$\{)/g, "\\$1") + "`";
3284
+ }
3285
+ return $1;
3286
+ });
3242
3287
  var CallExpressionRest$2 = $TS($S($E($C(OptionalShorthand, NonNullAssertion)), ArgumentsWithTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
3243
3288
  if (!$1)
3244
3289
  return $2;
@@ -3386,7 +3431,7 @@ ${input.slice(result.pos)}
3386
3431
  return result;
3387
3432
  }
3388
3433
  }
3389
- var MemberBracketContent$0 = $TS($S(OpenBracket, $C(SliceParameters, ExtendedExpression), __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
3434
+ var MemberBracketContent$0 = $TS($S(OpenBracket, $C(SliceParameters, PostfixedExpression), __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
3390
3435
  var open = $1;
3391
3436
  var exp = $2;
3392
3437
  var ws = $3;
@@ -3575,7 +3620,7 @@ ${input.slice(result.pos)}
3575
3620
  return result;
3576
3621
  }
3577
3622
  }
3578
- var SuperProperty$0 = $S($EXPECT($L16, fail, 'SuperProperty "super["'), ExtendedExpression, __, CloseBracket);
3623
+ var SuperProperty$0 = $S($EXPECT($L16, fail, 'SuperProperty "super["'), PostfixedExpression, __, CloseBracket);
3579
3624
  var SuperProperty$1 = $S($EXPECT($L12, fail, 'SuperProperty "super"'), $N($C(QuestionMark, NonNullAssertion)), PropertyAccess);
3580
3625
  function SuperProperty(state) {
3581
3626
  let eventData;
@@ -4996,7 +5041,11 @@ ${input.slice(result.pos)}
4996
5041
  return result;
4997
5042
  }
4998
5043
  }
4999
- var FunctionDeclaration$0 = FunctionExpression;
5044
+ var FunctionDeclaration$0 = $TS($S(FunctionExpression), function($skip, $loc, $0, $1) {
5045
+ if ($1.id)
5046
+ return $1;
5047
+ return module.makeLeftHandSideExpression($1);
5048
+ });
5000
5049
  function FunctionDeclaration(state) {
5001
5050
  let eventData;
5002
5051
  if (state.events) {
@@ -5510,6 +5559,30 @@ ${input.slice(result.pos)}
5510
5559
  return result;
5511
5560
  }
5512
5561
  }
5562
+ var NoPostfixBracedOrEmptyBlock$0 = NoPostfixBracedBlock;
5563
+ var NoPostfixBracedOrEmptyBlock$1 = EmptyBlock;
5564
+ function NoPostfixBracedOrEmptyBlock(state) {
5565
+ let eventData;
5566
+ if (state.events) {
5567
+ const result = state.events.enter?.("NoPostfixBracedOrEmptyBlock", state);
5568
+ if (result) {
5569
+ if (result.cache)
5570
+ return result.cache;
5571
+ eventData = result.data;
5572
+ }
5573
+ }
5574
+ if (state.tokenize) {
5575
+ const result = $TOKEN("NoPostfixBracedOrEmptyBlock", state, NoPostfixBracedOrEmptyBlock$0(state) || NoPostfixBracedOrEmptyBlock$1(state));
5576
+ if (state.events)
5577
+ state.events.exit?.("NoPostfixBracedOrEmptyBlock", state, result, eventData);
5578
+ return result;
5579
+ } else {
5580
+ const result = NoPostfixBracedOrEmptyBlock$0(state) || NoPostfixBracedOrEmptyBlock$1(state);
5581
+ if (state.events)
5582
+ state.events.exit?.("NoPostfixBracedOrEmptyBlock", state, result, eventData);
5583
+ return result;
5584
+ }
5585
+ }
5513
5586
  var EmptyBlock$0 = $TS($S(InsertOpenBrace, InsertCloseBrace), function($skip, $loc, $0, $1, $2) {
5514
5587
  const expressions = [];
5515
5588
  return {
@@ -5573,26 +5646,44 @@ ${input.slice(result.pos)}
5573
5646
  return result;
5574
5647
  }
5575
5648
  }
5576
- var BracedBlock$0 = $TS($S($Q(TrailingComment), OpenBrace, BracedContent, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5577
- var block = $3;
5578
- return {
5579
- type: "BlockStatement",
5580
- expressions: block.expressions,
5581
- children: [$1, $2, ...block.children, $4, $5],
5582
- bare: false
5583
- };
5584
- return block;
5585
- });
5586
- var BracedBlock$1 = ImplicitNestedBlock;
5587
- var BracedBlock$2 = $TS($S(InsertOpenBrace, $Y(EOS), ObjectLiteral, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
5649
+ var BracedBlock$0 = NonSingleBracedBlock;
5650
+ var BracedBlock$1 = $TS($S(InsertOpenBrace, $N(EOS), PostfixedSingleLineStatements, InsertSpace, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5651
+ var o = $1;
5588
5652
  var s = $3;
5653
+ var ws = $4;
5654
+ var c = $5;
5655
+ if (!s.children.length)
5656
+ return $skip;
5589
5657
  return {
5590
5658
  type: "BlockStatement",
5591
- expressions: [s],
5592
- children: [$1, s, $3]
5659
+ expressions: s.expressions,
5660
+ children: [o, s.children, ws, c]
5593
5661
  };
5594
5662
  });
5595
- var BracedBlock$3 = $TS($S(InsertOpenBrace, $N(EOS), SingleLineStatements, InsertSpace, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5663
+ function BracedBlock(state) {
5664
+ let eventData;
5665
+ if (state.events) {
5666
+ const result = state.events.enter?.("BracedBlock", state);
5667
+ if (result) {
5668
+ if (result.cache)
5669
+ return result.cache;
5670
+ eventData = result.data;
5671
+ }
5672
+ }
5673
+ if (state.tokenize) {
5674
+ const result = $TOKEN("BracedBlock", state, BracedBlock$0(state) || BracedBlock$1(state));
5675
+ if (state.events)
5676
+ state.events.exit?.("BracedBlock", state, result, eventData);
5677
+ return result;
5678
+ } else {
5679
+ const result = BracedBlock$0(state) || BracedBlock$1(state);
5680
+ if (state.events)
5681
+ state.events.exit?.("BracedBlock", state, result, eventData);
5682
+ return result;
5683
+ }
5684
+ }
5685
+ var NoPostfixBracedBlock$0 = NonSingleBracedBlock;
5686
+ var NoPostfixBracedBlock$1 = $TS($S(InsertOpenBrace, $N(EOS), SingleLineStatements, InsertSpace, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5596
5687
  var o = $1;
5597
5688
  var s = $3;
5598
5689
  var ws = $4;
@@ -5605,10 +5696,10 @@ ${input.slice(result.pos)}
5605
5696
  children: [o, s.children, ws, c]
5606
5697
  };
5607
5698
  });
5608
- function BracedBlock(state) {
5699
+ function NoPostfixBracedBlock(state) {
5609
5700
  let eventData;
5610
5701
  if (state.events) {
5611
- const result = state.events.enter?.("BracedBlock", state);
5702
+ const result = state.events.enter?.("NoPostfixBracedBlock", state);
5612
5703
  if (result) {
5613
5704
  if (result.cache)
5614
5705
  return result.cache;
@@ -5616,14 +5707,55 @@ ${input.slice(result.pos)}
5616
5707
  }
5617
5708
  }
5618
5709
  if (state.tokenize) {
5619
- const result = $TOKEN("BracedBlock", state, BracedBlock$0(state) || BracedBlock$1(state) || BracedBlock$2(state) || BracedBlock$3(state));
5710
+ const result = $TOKEN("NoPostfixBracedBlock", state, NoPostfixBracedBlock$0(state) || NoPostfixBracedBlock$1(state));
5620
5711
  if (state.events)
5621
- state.events.exit?.("BracedBlock", state, result, eventData);
5712
+ state.events.exit?.("NoPostfixBracedBlock", state, result, eventData);
5622
5713
  return result;
5623
5714
  } else {
5624
- const result = BracedBlock$0(state) || BracedBlock$1(state) || BracedBlock$2(state) || BracedBlock$3(state);
5715
+ const result = NoPostfixBracedBlock$0(state) || NoPostfixBracedBlock$1(state);
5625
5716
  if (state.events)
5626
- state.events.exit?.("BracedBlock", state, result, eventData);
5717
+ state.events.exit?.("NoPostfixBracedBlock", state, result, eventData);
5718
+ return result;
5719
+ }
5720
+ }
5721
+ var NonSingleBracedBlock$0 = $TS($S($Q(TrailingComment), OpenBrace, BracedContent, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5722
+ var block = $3;
5723
+ return {
5724
+ type: "BlockStatement",
5725
+ expressions: block.expressions,
5726
+ children: [$1, $2, ...block.children, $4, $5],
5727
+ bare: false
5728
+ };
5729
+ return block;
5730
+ });
5731
+ var NonSingleBracedBlock$1 = ImplicitNestedBlock;
5732
+ var NonSingleBracedBlock$2 = $TS($S(InsertOpenBrace, $Y(EOS), ObjectLiteral, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
5733
+ var s = $3;
5734
+ return {
5735
+ type: "BlockStatement",
5736
+ expressions: [s],
5737
+ children: [$1, s, $3]
5738
+ };
5739
+ });
5740
+ function NonSingleBracedBlock(state) {
5741
+ let eventData;
5742
+ if (state.events) {
5743
+ const result = state.events.enter?.("NonSingleBracedBlock", state);
5744
+ if (result) {
5745
+ if (result.cache)
5746
+ return result.cache;
5747
+ eventData = result.data;
5748
+ }
5749
+ }
5750
+ if (state.tokenize) {
5751
+ const result = $TOKEN("NonSingleBracedBlock", state, NonSingleBracedBlock$0(state) || NonSingleBracedBlock$1(state) || NonSingleBracedBlock$2(state));
5752
+ if (state.events)
5753
+ state.events.exit?.("NonSingleBracedBlock", state, result, eventData);
5754
+ return result;
5755
+ } else {
5756
+ const result = NonSingleBracedBlock$0(state) || NonSingleBracedBlock$1(state) || NonSingleBracedBlock$2(state);
5757
+ if (state.events)
5758
+ state.events.exit?.("NonSingleBracedBlock", state, result, eventData);
5627
5759
  return result;
5628
5760
  }
5629
5761
  }
@@ -5662,6 +5794,41 @@ ${input.slice(result.pos)}
5662
5794
  return result;
5663
5795
  }
5664
5796
  }
5797
+ var PostfixedSingleLineStatements$0 = $TS($S($Q($S($S($E(_), $N(EOS)), PostfixedStatement, SemicolonDelimiter)), $E($S($S($E(_), $N(EOS)), PostfixedStatement, $E(SemicolonDelimiter)))), function($skip, $loc, $0, $1, $2) {
5798
+ var stmts = $1;
5799
+ var last = $2;
5800
+ const children = [...stmts];
5801
+ if (last)
5802
+ children.push(last);
5803
+ return {
5804
+ type: "BlockStatement",
5805
+ expressions: children,
5806
+ children,
5807
+ bare: true
5808
+ };
5809
+ });
5810
+ function PostfixedSingleLineStatements(state) {
5811
+ let eventData;
5812
+ if (state.events) {
5813
+ const result = state.events.enter?.("PostfixedSingleLineStatements", state);
5814
+ if (result) {
5815
+ if (result.cache)
5816
+ return result.cache;
5817
+ eventData = result.data;
5818
+ }
5819
+ }
5820
+ if (state.tokenize) {
5821
+ const result = $TOKEN("PostfixedSingleLineStatements", state, PostfixedSingleLineStatements$0(state));
5822
+ if (state.events)
5823
+ state.events.exit?.("PostfixedSingleLineStatements", state, result, eventData);
5824
+ return result;
5825
+ } else {
5826
+ const result = PostfixedSingleLineStatements$0(state);
5827
+ if (state.events)
5828
+ state.events.exit?.("PostfixedSingleLineStatements", state, result, eventData);
5829
+ return result;
5830
+ }
5831
+ }
5665
5832
  var BracedContent$0 = NestedBlockStatements;
5666
5833
  var BracedContent$1 = $TS($S($Q(TrailingComment), Statement), function($skip, $loc, $0, $1, $2) {
5667
5834
  const expressions = [["", $2]];
@@ -6962,7 +7129,7 @@ ${input.slice(result.pos)}
6962
7129
  return result;
6963
7130
  }
6964
7131
  }
6965
- var ComputedPropertyName$0 = $TS($S(OpenBracket, ExtendedExpression, __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
7132
+ var ComputedPropertyName$0 = $TS($S(OpenBracket, PostfixedExpression, __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
6966
7133
  var expression = $2;
6967
7134
  return {
6968
7135
  type: "ComputedPropertyName",
@@ -7506,7 +7673,12 @@ ${input.slice(result.pos)}
7506
7673
  return "??";
7507
7674
  });
7508
7675
  var BinaryOpSymbol$28 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
7509
- return $1;
7676
+ return {
7677
+ $loc,
7678
+ token: $1,
7679
+ relational: true,
7680
+ special: true
7681
+ };
7510
7682
  });
7511
7683
  var BinaryOpSymbol$29 = $TS($S($EXPECT($L50, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L75, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7512
7684
  return {
@@ -7664,13 +7836,7 @@ ${input.slice(result.pos)}
7664
7836
  }
7665
7837
  }
7666
7838
  var StatementListItem$0 = Declaration;
7667
- var StatementListItem$1 = $TS($S(Statement, $E($S($Q(TrailingComment), PostfixStatement))), function($skip, $loc, $0, $1, $2) {
7668
- var statement = $1;
7669
- var post = $2;
7670
- if (post)
7671
- return module.addPostfixStatement(statement, ...post);
7672
- return statement;
7673
- });
7839
+ var StatementListItem$1 = PostfixedStatement;
7674
7840
  function StatementListItem(state) {
7675
7841
  let eventData;
7676
7842
  if (state.events) {
@@ -7693,6 +7859,64 @@ ${input.slice(result.pos)}
7693
7859
  return result;
7694
7860
  }
7695
7861
  }
7862
+ var PostfixedStatement$0 = $TS($S(Statement, $E($S($Q(TrailingComment), PostfixStatement))), function($skip, $loc, $0, $1, $2) {
7863
+ var statement = $1;
7864
+ var post = $2;
7865
+ if (post)
7866
+ return module.addPostfixStatement(statement, ...post);
7867
+ return statement;
7868
+ });
7869
+ function PostfixedStatement(state) {
7870
+ let eventData;
7871
+ if (state.events) {
7872
+ const result = state.events.enter?.("PostfixedStatement", state);
7873
+ if (result) {
7874
+ if (result.cache)
7875
+ return result.cache;
7876
+ eventData = result.data;
7877
+ }
7878
+ }
7879
+ if (state.tokenize) {
7880
+ const result = $TOKEN("PostfixedStatement", state, PostfixedStatement$0(state));
7881
+ if (state.events)
7882
+ state.events.exit?.("PostfixedStatement", state, result, eventData);
7883
+ return result;
7884
+ } else {
7885
+ const result = PostfixedStatement$0(state);
7886
+ if (state.events)
7887
+ state.events.exit?.("PostfixedStatement", state, result, eventData);
7888
+ return result;
7889
+ }
7890
+ }
7891
+ var PostfixedExpression$0 = $TS($S(ExtendedExpression, $E($S($Q(TrailingComment), PostfixStatement))), function($skip, $loc, $0, $1, $2) {
7892
+ var expression = $1;
7893
+ var post = $2;
7894
+ if (post)
7895
+ return module.attachPostfixStatementAsExpression(expression, post);
7896
+ return expression;
7897
+ });
7898
+ function PostfixedExpression(state) {
7899
+ let eventData;
7900
+ if (state.events) {
7901
+ const result = state.events.enter?.("PostfixedExpression", state);
7902
+ if (result) {
7903
+ if (result.cache)
7904
+ return result.cache;
7905
+ eventData = result.data;
7906
+ }
7907
+ }
7908
+ if (state.tokenize) {
7909
+ const result = $TOKEN("PostfixedExpression", state, PostfixedExpression$0(state));
7910
+ if (state.events)
7911
+ state.events.exit?.("PostfixedExpression", state, result, eventData);
7912
+ return result;
7913
+ } else {
7914
+ const result = PostfixedExpression$0(state);
7915
+ if (state.events)
7916
+ state.events.exit?.("PostfixedExpression", state, result, eventData);
7917
+ return result;
7918
+ }
7919
+ }
7696
7920
  var PostfixStatement$0 = ForClause;
7697
7921
  var PostfixStatement$1 = IfClause;
7698
7922
  var PostfixStatement$2 = LoopClause;
@@ -7728,12 +7952,8 @@ ${input.slice(result.pos)}
7728
7952
  var Statement$5 = TryStatement;
7729
7953
  var Statement$6 = EmptyStatement;
7730
7954
  var Statement$7 = $TS($S(ExpressionStatement), function($skip, $loc, $0, $1) {
7731
- if ($1.type === "ObjectExpression") {
7732
- return {
7733
- type: "ParenthesizedExpression",
7734
- children: ["(", $1, ")"],
7735
- expression: $1
7736
- };
7955
+ if ($1.type === "ObjectExpression" || $1.type === "FunctionExpression" && !$1.id) {
7956
+ return module.makeLeftHandSideExpression($1);
7737
7957
  }
7738
7958
  return $1;
7739
7959
  });
@@ -7821,6 +8041,8 @@ ${input.slice(result.pos)}
7821
8041
  children.push(e);
7822
8042
  return {
7823
8043
  type: "IfStatement",
8044
+ then: block,
8045
+ else: e,
7824
8046
  children
7825
8047
  };
7826
8048
  });
@@ -7898,7 +8120,7 @@ ${input.slice(result.pos)}
7898
8120
  var UnlessClause$0 = $TS($S(Unless, Condition), function($skip, $loc, $0, $1, $2) {
7899
8121
  var kind = $1;
7900
8122
  var condition = $2;
7901
- kind.token = "if";
8123
+ kind = { ...kind, token: "if" };
7902
8124
  return {
7903
8125
  type: "IfStatement",
7904
8126
  children: [kind, ["(!", condition, ")"]]
@@ -8127,16 +8349,7 @@ ${input.slice(result.pos)}
8127
8349
  return result;
8128
8350
  }
8129
8351
  }
8130
- var NestedBlockExpression$0 = $TS($S(Nested, ExtendedExpression, $E($S($Q(TrailingComment), PostfixStatement)), ExpressionDelimiter), function($skip, $loc, $0, $1, $2, $3, $4) {
8131
- var ws = $1;
8132
- var exp = $2;
8133
- var post = $3;
8134
- var d = $4;
8135
- if (post) {
8136
- return [ws, module.attachPostfixStatementAsExpression(exp, post), d];
8137
- }
8138
- return [ws, exp, d];
8139
- });
8352
+ var NestedBlockExpression$0 = $S(Nested, PostfixedExpression, ExpressionDelimiter);
8140
8353
  function NestedBlockExpression(state) {
8141
8354
  let eventData;
8142
8355
  if (state.events) {
@@ -8272,7 +8485,7 @@ ${input.slice(result.pos)}
8272
8485
  return result;
8273
8486
  }
8274
8487
  }
8275
- var DoWhileStatement$0 = $T($S(Do, BracedBlock, __, WhileClause), function(value) {
8488
+ var DoWhileStatement$0 = $T($S(Do, NoPostfixBracedBlock, __, WhileClause), function(value) {
8276
8489
  var block = value[1];
8277
8490
  return { "type": "IterationStatement", "children": value, "block": block };
8278
8491
  });
@@ -8440,9 +8653,11 @@ ${input.slice(result.pos)}
8440
8653
  var ForStatementControl$1 = $TS($S(CoffeeForLoopsEnabled, CoffeeForStatementParameters, $E(WhenCondition)), function($skip, $loc, $0, $1, $2, $3) {
8441
8654
  if ($3) {
8442
8655
  const indent = module.currentIndent.token + " ";
8656
+ const block = "continue\n";
8443
8657
  $2.blockPrefix.push([indent, {
8444
8658
  type: "IfStatement",
8445
- children: ["if (!(", module.insertTrimmingSpace($3, ""), ")) continue\n"]
8659
+ then: block,
8660
+ children: ["if (!(", module.insertTrimmingSpace($3, ""), ")) ", block]
8446
8661
  }]);
8447
8662
  }
8448
8663
  return $2;
@@ -9226,7 +9441,7 @@ ${input.slice(result.pos)}
9226
9441
  return result;
9227
9442
  }
9228
9443
  }
9229
- var TryStatement$0 = $TS($S(Try, BracedBlock, $E(CatchClause), $E(Finally)), function($skip, $loc, $0, $1, $2, $3, $4) {
9444
+ var TryStatement$0 = $TS($S(Try, NoPostfixBracedOrEmptyBlock, $E(CatchClause), $E(FinallyClause)), function($skip, $loc, $0, $1, $2, $3, $4) {
9230
9445
  var t = $1;
9231
9446
  var b = $2;
9232
9447
  var c = $3;
@@ -9294,7 +9509,7 @@ ${input.slice(result.pos)}
9294
9509
  return result;
9295
9510
  }
9296
9511
  }
9297
- var CatchClause$0 = $S(__, Catch, $E(CatchBind), BracedBlock);
9512
+ var CatchClause$0 = $S($C(Samedent, _), Catch, $E(CatchBind), $C(ThenClause, BracedOrEmptyBlock));
9298
9513
  function CatchClause(state) {
9299
9514
  let eventData;
9300
9515
  if (state.events) {
@@ -9317,8 +9532,8 @@ ${input.slice(result.pos)}
9317
9532
  return result;
9318
9533
  }
9319
9534
  }
9320
- var CatchBind$0 = $S(__, OpenParen, __, CatchParameter, __, CloseParen);
9321
- var CatchBind$1 = $S($N(EOS), $Q(TrailingComment), InsertOpenParen, CatchParameter, InsertCloseParen);
9535
+ var CatchBind$0 = $S($E(_), OpenParen, __, CatchParameter, __, CloseParen);
9536
+ var CatchBind$1 = $S(_, InsertOpenParen, CatchParameter, InsertCloseParen);
9322
9537
  function CatchBind(state) {
9323
9538
  let eventData;
9324
9539
  if (state.events) {
@@ -9341,11 +9556,11 @@ ${input.slice(result.pos)}
9341
9556
  return result;
9342
9557
  }
9343
9558
  }
9344
- var Finally$0 = $S(__, $EXPECT($L83, fail, 'Finally "finally"'), NonIdContinue, BracedBlock);
9345
- function Finally(state) {
9559
+ var FinallyClause$0 = $S($C(Samedent, _), Finally, $C(ThenClause, BracedOrEmptyBlock));
9560
+ function FinallyClause(state) {
9346
9561
  let eventData;
9347
9562
  if (state.events) {
9348
- const result = state.events.enter?.("Finally", state);
9563
+ const result = state.events.enter?.("FinallyClause", state);
9349
9564
  if (result) {
9350
9565
  if (result.cache)
9351
9566
  return result.cache;
@@ -9353,14 +9568,14 @@ ${input.slice(result.pos)}
9353
9568
  }
9354
9569
  }
9355
9570
  if (state.tokenize) {
9356
- const result = $TOKEN("Finally", state, Finally$0(state));
9571
+ const result = $TOKEN("FinallyClause", state, FinallyClause$0(state));
9357
9572
  if (state.events)
9358
- state.events.exit?.("Finally", state, result, eventData);
9573
+ state.events.exit?.("FinallyClause", state, result, eventData);
9359
9574
  return result;
9360
9575
  } else {
9361
- const result = Finally$0(state);
9576
+ const result = FinallyClause$0(state);
9362
9577
  if (state.events)
9363
- state.events.exit?.("Finally", state, result, eventData);
9578
+ state.events.exit?.("FinallyClause", state, result, eventData);
9364
9579
  return result;
9365
9580
  }
9366
9581
  }
@@ -9581,13 +9796,13 @@ ${input.slice(result.pos)}
9581
9796
  return result;
9582
9797
  }
9583
9798
  }
9584
- var KeywordStatement$0 = $T($S($EXPECT($L84, fail, 'KeywordStatement "break"'), NonIdContinue), function(value) {
9799
+ var KeywordStatement$0 = $T($S($EXPECT($L83, fail, 'KeywordStatement "break"'), NonIdContinue), function(value) {
9585
9800
  return { "type": "BreakStatement", "children": value };
9586
9801
  });
9587
- var KeywordStatement$1 = $T($S($EXPECT($L85, fail, 'KeywordStatement "continue"'), NonIdContinue), function(value) {
9802
+ var KeywordStatement$1 = $T($S($EXPECT($L84, fail, 'KeywordStatement "continue"'), NonIdContinue), function(value) {
9588
9803
  return { "type": "ContinueStatement", "children": value };
9589
9804
  });
9590
- var KeywordStatement$2 = $T($S($EXPECT($L86, fail, 'KeywordStatement "debugger"'), NonIdContinue), function(value) {
9805
+ var KeywordStatement$2 = $T($S($EXPECT($L85, fail, 'KeywordStatement "debugger"'), NonIdContinue), function(value) {
9591
9806
  return { "type": "DebuggerStatement", "children": value };
9592
9807
  });
9593
9808
  var KeywordStatement$3 = $T($S(Return, $E(MaybeNestedExpression)), function(value) {
@@ -9618,7 +9833,7 @@ ${input.slice(result.pos)}
9618
9833
  return result;
9619
9834
  }
9620
9835
  }
9621
- var DebuggerExpression$0 = $TS($S($EXPECT($L86, fail, 'DebuggerExpression "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9836
+ var DebuggerExpression$0 = $TS($S($EXPECT($L85, fail, 'DebuggerExpression "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9622
9837
  return {
9623
9838
  type: "DebuggerExpression",
9624
9839
  children: ["(()=>{", $1, "})()"]
@@ -9895,7 +10110,7 @@ ${input.slice(result.pos)}
9895
10110
  return result;
9896
10111
  }
9897
10112
  }
9898
- var ImportAssertion$0 = $S($E(_), $EXPECT($L87, fail, 'ImportAssertion "assert"'), NonIdContinue, $E(_), ObjectLiteral);
10113
+ var ImportAssertion$0 = $S($E(_), $EXPECT($L86, fail, 'ImportAssertion "assert"'), NonIdContinue, $E(_), ObjectLiteral);
9899
10114
  function ImportAssertion(state) {
9900
10115
  let eventData;
9901
10116
  if (state.events) {
@@ -10499,7 +10714,7 @@ ${input.slice(result.pos)}
10499
10714
  return result;
10500
10715
  }
10501
10716
  }
10502
- var ConstAssignment$0 = $TV($EXPECT($L88, fail, 'ConstAssignment ":="'), function($skip, $loc, $0, $1) {
10717
+ var ConstAssignment$0 = $TV($EXPECT($L87, fail, 'ConstAssignment ":="'), function($skip, $loc, $0, $1) {
10503
10718
  return { $loc, token: "=" };
10504
10719
  });
10505
10720
  function ConstAssignment(state) {
@@ -10524,7 +10739,7 @@ ${input.slice(result.pos)}
10524
10739
  return result;
10525
10740
  }
10526
10741
  }
10527
- var LetAssignment$0 = $TV($EXPECT($L89, fail, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
10742
+ var LetAssignment$0 = $TV($EXPECT($L88, fail, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
10528
10743
  return { $loc, token: "=" };
10529
10744
  });
10530
10745
  function LetAssignment(state) {
@@ -10722,7 +10937,7 @@ ${input.slice(result.pos)}
10722
10937
  }
10723
10938
  }
10724
10939
  var NumericLiteral$0 = $TS($S(NumericLiteralKind), function($skip, $loc, $0, $1) {
10725
- return { $loc, token: $1 };
10940
+ return { type: "NumericLiteral", $loc, token: $1 };
10726
10941
  });
10727
10942
  function NumericLiteral(state) {
10728
10943
  let eventData;
@@ -10993,6 +11208,7 @@ ${input.slice(result.pos)}
10993
11208
  var StringLiteral$0 = $TS($S(DoubleQuote, DoubleStringCharacters, DoubleQuote), function($skip, $loc, $0, $1, $2, $3) {
10994
11209
  var str = $2;
10995
11210
  return {
11211
+ type: "StringLiteral",
10996
11212
  token: `"${module.modifyString(str.token)}"`,
10997
11213
  $loc
10998
11214
  };
@@ -11000,6 +11216,7 @@ ${input.slice(result.pos)}
11000
11216
  var StringLiteral$1 = $TS($S(SingleQuote, SingleStringCharacters, SingleQuote), function($skip, $loc, $0, $1, $2, $3) {
11001
11217
  var str = $2;
11002
11218
  return {
11219
+ type: "StringLiteral",
11003
11220
  token: `'${module.modifyString(str.token)}'`,
11004
11221
  $loc
11005
11222
  };
@@ -11126,7 +11343,7 @@ ${input.slice(result.pos)}
11126
11343
  return result;
11127
11344
  }
11128
11345
  }
11129
- var CoffeeStringSubstitution$0 = $S(CoffeeSubstitutionStart, ExtendedExpression, __, CloseBrace);
11346
+ var CoffeeStringSubstitution$0 = $S(CoffeeSubstitutionStart, PostfixedExpression, __, CloseBrace);
11130
11347
  function CoffeeStringSubstitution(state) {
11131
11348
  let eventData;
11132
11349
  if (state.events) {
@@ -11566,7 +11783,7 @@ ${input.slice(result.pos)}
11566
11783
  return result;
11567
11784
  }
11568
11785
  }
11569
- var TemplateSubstitution$0 = $S(SubstitutionStart, ExtendedExpression, __, CloseBrace);
11786
+ var TemplateSubstitution$0 = $S(SubstitutionStart, PostfixedExpression, __, CloseBrace);
11570
11787
  function TemplateSubstitution(state) {
11571
11788
  let eventData;
11572
11789
  if (state.events) {
@@ -11763,7 +11980,7 @@ ${input.slice(result.pos)}
11763
11980
  return result;
11764
11981
  }
11765
11982
  }
11766
- var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($L90, fail, 'JSMultiLineComment "/*"'), $Q($S($N($EXPECT($L91, fail, 'JSMultiLineComment "*/"')), $EXPECT($R40, fail, "JSMultiLineComment /./"))), $EXPECT($L91, fail, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
11983
+ var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($L89, fail, 'JSMultiLineComment "/*"'), $Q($S($N($EXPECT($L90, fail, 'JSMultiLineComment "*/"')), $EXPECT($R40, fail, "JSMultiLineComment /./"))), $EXPECT($L90, fail, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
11767
11984
  return { $loc, token: $1 };
11768
11985
  });
11769
11986
  function JSMultiLineComment(state) {
@@ -11862,7 +12079,7 @@ ${input.slice(result.pos)}
11862
12079
  return result;
11863
12080
  }
11864
12081
  }
11865
- var InlineComment$0 = $TV($TEXT($S($EXPECT($L90, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L91, fail, 'InlineComment "*/"')), $EXPECT($R44, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L91, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
12082
+ var InlineComment$0 = $TV($TEXT($S($EXPECT($L89, fail, 'InlineComment "/*"'), $TEXT($Q($S($N($EXPECT($L90, fail, 'InlineComment "*/"')), $EXPECT($R44, fail, "InlineComment /[^\\r\\n]/")))), $EXPECT($L90, fail, 'InlineComment "*/"'))), function($skip, $loc, $0, $1) {
11866
12083
  return { $loc, token: $1 };
11867
12084
  });
11868
12085
  function InlineComment(state) {
@@ -11961,7 +12178,7 @@ ${input.slice(result.pos)}
11961
12178
  var NonNewlineWhitespace$0 = $TR($EXPECT($R45, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11962
12179
  return { $loc, token: $0 };
11963
12180
  });
11964
- var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L92, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
12181
+ var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L91, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
11965
12182
  return "";
11966
12183
  });
11967
12184
  function NonNewlineWhitespace(state) {
@@ -12113,7 +12330,7 @@ ${input.slice(result.pos)}
12113
12330
  }
12114
12331
  }
12115
12332
  var StatementDelimiter$0 = SemicolonDelimiter;
12116
- var StatementDelimiter$1 = $S($Y($S(Samedent, $C($EXPECT($L2, fail, 'StatementDelimiter "("'), $EXPECT($L93, fail, 'StatementDelimiter "["'), $EXPECT($L94, fail, 'StatementDelimiter "`"'), $EXPECT($L56, fail, 'StatementDelimiter "+"'), $EXPECT($L15, fail, 'StatementDelimiter "-"'), $EXPECT($L52, fail, 'StatementDelimiter "*"'), $EXPECT($L53, fail, 'StatementDelimiter "/"'), ObjectLiteral))), InsertSemicolon);
12333
+ var StatementDelimiter$1 = $S($Y($S(Samedent, $C($EXPECT($L2, fail, 'StatementDelimiter "("'), $EXPECT($L92, fail, 'StatementDelimiter "["'), $EXPECT($L93, fail, 'StatementDelimiter "`"'), $EXPECT($L56, fail, 'StatementDelimiter "+"'), $EXPECT($L15, fail, 'StatementDelimiter "-"'), $EXPECT($L52, fail, 'StatementDelimiter "*"'), $EXPECT($L53, fail, 'StatementDelimiter "/"'), ObjectLiteral, Arrow, $S(Function, $E($S($E(_), Star)), $E(_), $EXPECT($L2, fail, 'StatementDelimiter "("'))))), InsertSemicolon);
12117
12334
  var StatementDelimiter$2 = $Y(EOS);
12118
12335
  function StatementDelimiter(state) {
12119
12336
  let eventData;
@@ -12213,7 +12430,7 @@ ${input.slice(result.pos)}
12213
12430
  return result;
12214
12431
  }
12215
12432
  }
12216
- var Abstract$0 = $TV($TEXT($S($EXPECT($L95, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L8, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
12433
+ var Abstract$0 = $TV($TEXT($S($EXPECT($L94, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L8, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
12217
12434
  return { $loc, token: $1, ts: true };
12218
12435
  });
12219
12436
  function Abstract(state) {
@@ -12263,7 +12480,7 @@ ${input.slice(result.pos)}
12263
12480
  return result;
12264
12481
  }
12265
12482
  }
12266
- var As$0 = $TS($S($EXPECT($L96, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12483
+ var As$0 = $TS($S($EXPECT($L95, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12267
12484
  return { $loc, token: $1 };
12268
12485
  });
12269
12486
  function As(state) {
@@ -12288,7 +12505,7 @@ ${input.slice(result.pos)}
12288
12505
  return result;
12289
12506
  }
12290
12507
  }
12291
- var At$0 = $TV($EXPECT($L97, fail, 'At "@"'), function($skip, $loc, $0, $1) {
12508
+ var At$0 = $TV($EXPECT($L96, fail, 'At "@"'), function($skip, $loc, $0, $1) {
12292
12509
  return { $loc, token: $1 };
12293
12510
  });
12294
12511
  function At(state) {
@@ -12313,7 +12530,7 @@ ${input.slice(result.pos)}
12313
12530
  return result;
12314
12531
  }
12315
12532
  }
12316
- var AtAt$0 = $TV($EXPECT($L98, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
12533
+ var AtAt$0 = $TV($EXPECT($L97, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
12317
12534
  return { $loc, token: "@" };
12318
12535
  });
12319
12536
  function AtAt(state) {
@@ -12338,7 +12555,7 @@ ${input.slice(result.pos)}
12338
12555
  return result;
12339
12556
  }
12340
12557
  }
12341
- var Async$0 = $TS($S($EXPECT($L99, fail, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12558
+ var Async$0 = $TS($S($EXPECT($L98, fail, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12342
12559
  return { $loc, token: $1, type: "Async" };
12343
12560
  });
12344
12561
  function Async(state) {
@@ -12363,7 +12580,7 @@ ${input.slice(result.pos)}
12363
12580
  return result;
12364
12581
  }
12365
12582
  }
12366
- var Await$0 = $TS($S($EXPECT($L100, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12583
+ var Await$0 = $TS($S($EXPECT($L99, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12367
12584
  return { $loc, token: $1 };
12368
12585
  });
12369
12586
  function Await(state) {
@@ -12388,7 +12605,7 @@ ${input.slice(result.pos)}
12388
12605
  return result;
12389
12606
  }
12390
12607
  }
12391
- var Backtick$0 = $TV($EXPECT($L94, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
12608
+ var Backtick$0 = $TV($EXPECT($L93, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
12392
12609
  return { $loc, token: $1 };
12393
12610
  });
12394
12611
  function Backtick(state) {
@@ -12413,7 +12630,7 @@ ${input.slice(result.pos)}
12413
12630
  return result;
12414
12631
  }
12415
12632
  }
12416
- var By$0 = $TS($S($EXPECT($L101, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12633
+ var By$0 = $TS($S($EXPECT($L100, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12417
12634
  return { $loc, token: $1 };
12418
12635
  });
12419
12636
  function By(state) {
@@ -12438,7 +12655,7 @@ ${input.slice(result.pos)}
12438
12655
  return result;
12439
12656
  }
12440
12657
  }
12441
- var Case$0 = $TS($S($EXPECT($L102, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12658
+ var Case$0 = $TS($S($EXPECT($L101, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12442
12659
  return { $loc, token: $1 };
12443
12660
  });
12444
12661
  function Case(state) {
@@ -12463,7 +12680,7 @@ ${input.slice(result.pos)}
12463
12680
  return result;
12464
12681
  }
12465
12682
  }
12466
- var Catch$0 = $TS($S($EXPECT($L103, fail, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12683
+ var Catch$0 = $TS($S($EXPECT($L102, fail, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12467
12684
  return { $loc, token: $1 };
12468
12685
  });
12469
12686
  function Catch(state) {
@@ -12488,7 +12705,7 @@ ${input.slice(result.pos)}
12488
12705
  return result;
12489
12706
  }
12490
12707
  }
12491
- var Class$0 = $TS($S($EXPECT($L104, fail, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12708
+ var Class$0 = $TS($S($EXPECT($L103, fail, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12492
12709
  return { $loc, token: $1 };
12493
12710
  });
12494
12711
  function Class(state) {
@@ -12588,7 +12805,7 @@ ${input.slice(result.pos)}
12588
12805
  return result;
12589
12806
  }
12590
12807
  }
12591
- var CoffeeSubstitutionStart$0 = $TV($EXPECT($L105, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
12808
+ var CoffeeSubstitutionStart$0 = $TV($EXPECT($L104, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
12592
12809
  return { $loc, token: "${" };
12593
12810
  });
12594
12811
  function CoffeeSubstitutionStart(state) {
@@ -12638,7 +12855,7 @@ ${input.slice(result.pos)}
12638
12855
  return result;
12639
12856
  }
12640
12857
  }
12641
- var Comma$0 = $TV($EXPECT($L106, fail, 'Comma ","'), function($skip, $loc, $0, $1) {
12858
+ var Comma$0 = $TV($EXPECT($L105, fail, 'Comma ","'), function($skip, $loc, $0, $1) {
12642
12859
  return { $loc, token: $1 };
12643
12860
  });
12644
12861
  function Comma(state) {
@@ -12663,7 +12880,7 @@ ${input.slice(result.pos)}
12663
12880
  return result;
12664
12881
  }
12665
12882
  }
12666
- var ConstructorShorthand$0 = $TV($EXPECT($L97, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
12883
+ var ConstructorShorthand$0 = $TV($EXPECT($L96, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
12667
12884
  return { $loc, token: "constructor" };
12668
12885
  });
12669
12886
  function ConstructorShorthand(state) {
@@ -12688,7 +12905,7 @@ ${input.slice(result.pos)}
12688
12905
  return result;
12689
12906
  }
12690
12907
  }
12691
- var Declare$0 = $TS($S($EXPECT($L107, fail, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12908
+ var Declare$0 = $TS($S($EXPECT($L106, fail, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12692
12909
  return { $loc, token: $1 };
12693
12910
  });
12694
12911
  function Declare(state) {
@@ -12713,7 +12930,7 @@ ${input.slice(result.pos)}
12713
12930
  return result;
12714
12931
  }
12715
12932
  }
12716
- var Default$0 = $TS($S($EXPECT($L108, fail, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12933
+ var Default$0 = $TS($S($EXPECT($L107, fail, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12717
12934
  return { $loc, token: $1 };
12718
12935
  });
12719
12936
  function Default(state) {
@@ -12738,7 +12955,7 @@ ${input.slice(result.pos)}
12738
12955
  return result;
12739
12956
  }
12740
12957
  }
12741
- var Delete$0 = $TS($S($EXPECT($L109, fail, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12958
+ var Delete$0 = $TS($S($EXPECT($L108, fail, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12742
12959
  return { $loc, token: $1 };
12743
12960
  });
12744
12961
  function Delete(state) {
@@ -12763,7 +12980,7 @@ ${input.slice(result.pos)}
12763
12980
  return result;
12764
12981
  }
12765
12982
  }
12766
- var Do$0 = $TS($S($EXPECT($L110, fail, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12983
+ var Do$0 = $TS($S($EXPECT($L109, fail, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12767
12984
  return { $loc, token: $1 };
12768
12985
  });
12769
12986
  function Do(state) {
@@ -12813,7 +13030,7 @@ ${input.slice(result.pos)}
12813
13030
  return result;
12814
13031
  }
12815
13032
  }
12816
- var DotDot$0 = $TV($EXPECT($L111, fail, 'DotDot ".."'), function($skip, $loc, $0, $1) {
13033
+ var DotDot$0 = $TV($EXPECT($L110, fail, 'DotDot ".."'), function($skip, $loc, $0, $1) {
12817
13034
  return { $loc, token: $1 };
12818
13035
  });
12819
13036
  function DotDot(state) {
@@ -12838,7 +13055,7 @@ ${input.slice(result.pos)}
12838
13055
  return result;
12839
13056
  }
12840
13057
  }
12841
- var DotDotDot$0 = $TV($EXPECT($L112, fail, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
13058
+ var DotDotDot$0 = $TV($EXPECT($L111, fail, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
12842
13059
  return { $loc, token: $1 };
12843
13060
  });
12844
13061
  function DotDotDot(state) {
@@ -12863,7 +13080,7 @@ ${input.slice(result.pos)}
12863
13080
  return result;
12864
13081
  }
12865
13082
  }
12866
- var DoubleColon$0 = $TV($EXPECT($L113, fail, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
13083
+ var DoubleColon$0 = $TV($EXPECT($L112, fail, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
12867
13084
  return { $loc, token: $1 };
12868
13085
  });
12869
13086
  function DoubleColon(state) {
@@ -12888,7 +13105,7 @@ ${input.slice(result.pos)}
12888
13105
  return result;
12889
13106
  }
12890
13107
  }
12891
- var DoubleQuote$0 = $TV($EXPECT($L114, fail, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
13108
+ var DoubleQuote$0 = $TV($EXPECT($L113, fail, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
12892
13109
  return { $loc, token: $1 };
12893
13110
  });
12894
13111
  function DoubleQuote(state) {
@@ -12913,7 +13130,7 @@ ${input.slice(result.pos)}
12913
13130
  return result;
12914
13131
  }
12915
13132
  }
12916
- var Else$0 = $TS($S($EXPECT($L115, fail, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13133
+ var Else$0 = $TS($S($EXPECT($L114, fail, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12917
13134
  return { $loc, token: $1 };
12918
13135
  });
12919
13136
  function Else(state) {
@@ -12963,7 +13180,7 @@ ${input.slice(result.pos)}
12963
13180
  return result;
12964
13181
  }
12965
13182
  }
12966
- var Export$0 = $TS($S($EXPECT($L116, fail, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13183
+ var Export$0 = $TS($S($EXPECT($L115, fail, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12967
13184
  return { $loc, token: $1 };
12968
13185
  });
12969
13186
  function Export(state) {
@@ -12988,7 +13205,7 @@ ${input.slice(result.pos)}
12988
13205
  return result;
12989
13206
  }
12990
13207
  }
12991
- var Extends$0 = $TS($S($EXPECT($L117, fail, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13208
+ var Extends$0 = $TS($S($EXPECT($L116, fail, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12992
13209
  return { $loc, token: $1 };
12993
13210
  });
12994
13211
  function Extends(state) {
@@ -13013,6 +13230,31 @@ ${input.slice(result.pos)}
13013
13230
  return result;
13014
13231
  }
13015
13232
  }
13233
+ var Finally$0 = $TS($S($EXPECT($L117, fail, 'Finally "finally"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13234
+ return { $loc, token: $1 };
13235
+ });
13236
+ function Finally(state) {
13237
+ let eventData;
13238
+ if (state.events) {
13239
+ const result = state.events.enter?.("Finally", state);
13240
+ if (result) {
13241
+ if (result.cache)
13242
+ return result.cache;
13243
+ eventData = result.data;
13244
+ }
13245
+ }
13246
+ if (state.tokenize) {
13247
+ const result = $TOKEN("Finally", state, Finally$0(state));
13248
+ if (state.events)
13249
+ state.events.exit?.("Finally", state, result, eventData);
13250
+ return result;
13251
+ } else {
13252
+ const result = Finally$0(state);
13253
+ if (state.events)
13254
+ state.events.exit?.("Finally", state, result, eventData);
13255
+ return result;
13256
+ }
13257
+ }
13016
13258
  var For$0 = $TS($S($EXPECT($L118, fail, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13017
13259
  return { $loc, token: $1 };
13018
13260
  });
@@ -13363,7 +13605,7 @@ ${input.slice(result.pos)}
13363
13605
  return result;
13364
13606
  }
13365
13607
  }
13366
- var OpenBracket$0 = $TV($EXPECT($L93, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
13608
+ var OpenBracket$0 = $TV($EXPECT($L92, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
13367
13609
  return { $loc, token: $1 };
13368
13610
  });
13369
13611
  function OpenBracket(state) {
@@ -13716,7 +13958,7 @@ ${input.slice(result.pos)}
13716
13958
  var Static$0 = $TS($S($EXPECT($L139, fail, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13717
13959
  return { $loc, token: $1 };
13718
13960
  });
13719
- var Static$1 = $TS($S($EXPECT($L97, fail, 'Static "@"'), $N($C($EXPECT($L2, fail, 'Static "("'), $EXPECT($L97, fail, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
13961
+ var Static$1 = $TS($S($EXPECT($L96, fail, 'Static "@"'), $N($C($EXPECT($L2, fail, 'Static "("'), $EXPECT($L96, fail, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
13720
13962
  return { $loc, token: "static " };
13721
13963
  });
13722
13964
  function Static(state) {
@@ -14856,7 +15098,7 @@ ${input.slice(result.pos)}
14856
15098
  return ["{", $1, "}"];
14857
15099
  });
14858
15100
  var JSXShorthandString$2 = StringLiteral;
14859
- var JSXShorthandString$3 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
15101
+ var JSXShorthandString$3 = $S(OpenBrace, PostfixedExpression, $E(Whitespace), CloseBrace);
14860
15102
  function JSXShorthandString(state) {
14861
15103
  let eventData;
14862
15104
  if (state.events) {
@@ -14926,7 +15168,7 @@ ${input.slice(result.pos)}
14926
15168
  return result;
14927
15169
  }
14928
15170
  }
14929
- var JSXAttributeValue$0 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
15171
+ var JSXAttributeValue$0 = $S(OpenBrace, PostfixedExpression, $E(Whitespace), CloseBrace);
14930
15172
  var JSXAttributeValue$1 = JSXElement;
14931
15173
  var JSXAttributeValue$2 = JSXFragment;
14932
15174
  var JSXAttributeValue$3 = $TS($S(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3) {
@@ -15117,7 +15359,7 @@ ${input.slice(result.pos)}
15117
15359
  }
15118
15360
  }
15119
15361
  var InlineJSXCallExpression$0 = $S($EXPECT($L12, fail, 'InlineJSXCallExpression "super"'), ExplicitArguments);
15120
- var InlineJSXCallExpression$1 = $S($EXPECT($L13, fail, 'InlineJSXCallExpression "import"'), OpenParen, ExtendedExpression, __, CloseParen);
15362
+ var InlineJSXCallExpression$1 = $S($EXPECT($L13, fail, 'InlineJSXCallExpression "import"'), OpenParen, PostfixedExpression, __, CloseParen);
15121
15363
  var InlineJSXCallExpression$2 = $TS($S(InlineJSXMemberExpression, $Q(InlineJSXCallExpressionRest)), function($skip, $loc, $0, $1, $2) {
15122
15364
  if ($2.length)
15123
15365
  return $0;
@@ -15539,7 +15781,7 @@ ${input.slice(result.pos)}
15539
15781
  return result;
15540
15782
  }
15541
15783
  }
15542
- var JSXChildExpression$0 = $S($E(Whitespace), $E($S(DotDotDot, $E(Whitespace))), ExtendedExpression);
15784
+ var JSXChildExpression$0 = $S($E(Whitespace), $E($S(DotDotDot, $E(Whitespace))), PostfixedExpression);
15543
15785
  function JSXChildExpression(state) {
15544
15786
  let eventData;
15545
15787
  if (state.events) {
@@ -16484,7 +16726,7 @@ ${input.slice(result.pos)}
16484
16726
  return result;
16485
16727
  }
16486
16728
  }
16487
- var TypeConditional$0 = $TS($S(TypeBinary, $E($S(__, $EXPECT($L117, fail, 'TypeConditional "extends"'), NonIdContinue, Type, $E($S(__, QuestionMark, Type, __, Colon, Type))))), function($skip, $loc, $0, $1, $2) {
16729
+ var TypeConditional$0 = $TS($S(TypeBinary, $E($S(__, $EXPECT($L116, fail, 'TypeConditional "extends"'), NonIdContinue, Type, $E($S(__, QuestionMark, Type, __, Colon, Type))))), function($skip, $loc, $0, $1, $2) {
16488
16730
  if ($2)
16489
16731
  return $0;
16490
16732
  return $1;
@@ -16643,7 +16885,7 @@ ${input.slice(result.pos)}
16643
16885
  return result;
16644
16886
  }
16645
16887
  }
16646
- var FunctionType$0 = $TS($S(Parameters, __, $EXPECT($L7, fail, 'FunctionType "=>"'), $E(Type)), function($skip, $loc, $0, $1, $2, $3, $4) {
16888
+ var FunctionType$0 = $TS($S(Parameters, __, TypeArrowFunction, $E(Type)), function($skip, $loc, $0, $1, $2, $3, $4) {
16647
16889
  var type = $4;
16648
16890
  if (type) {
16649
16891
  return $0;
@@ -16672,6 +16914,34 @@ ${input.slice(result.pos)}
16672
16914
  return result;
16673
16915
  }
16674
16916
  }
16917
+ var TypeArrowFunction$0 = $TV($EXPECT($L7, fail, 'TypeArrowFunction "=>"'), function($skip, $loc, $0, $1) {
16918
+ return { $loc, token: "=>" };
16919
+ });
16920
+ var TypeArrowFunction$1 = $TV($EXPECT($L20, fail, 'TypeArrowFunction "->"'), function($skip, $loc, $0, $1) {
16921
+ return { $loc, token: "=>" };
16922
+ });
16923
+ function TypeArrowFunction(state) {
16924
+ let eventData;
16925
+ if (state.events) {
16926
+ const result = state.events.enter?.("TypeArrowFunction", state);
16927
+ if (result) {
16928
+ if (result.cache)
16929
+ return result.cache;
16930
+ eventData = result.data;
16931
+ }
16932
+ }
16933
+ if (state.tokenize) {
16934
+ const result = $TOKEN("TypeArrowFunction", state, TypeArrowFunction$0(state) || TypeArrowFunction$1(state));
16935
+ if (state.events)
16936
+ state.events.exit?.("TypeArrowFunction", state, result, eventData);
16937
+ return result;
16938
+ } else {
16939
+ const result = TypeArrowFunction$0(state) || TypeArrowFunction$1(state);
16940
+ if (state.events)
16941
+ state.events.exit?.("TypeArrowFunction", state, result, eventData);
16942
+ return result;
16943
+ }
16944
+ }
16675
16945
  var TypeArguments$0 = $TS($S($EXPECT($L128, fail, 'TypeArguments "<"'), $P(TypeArgument), __, $EXPECT($L29, fail, 'TypeArguments ">"')), function($skip, $loc, $0, $1, $2, $3, $4) {
16676
16946
  return { ts: true, children: $0 };
16677
16947
  });
@@ -16797,7 +17067,7 @@ ${input.slice(result.pos)}
16797
17067
  return result;
16798
17068
  }
16799
17069
  }
16800
- var TypeConstraint$0 = $S(__, $EXPECT($L117, fail, 'TypeConstraint "extends"'), NonIdContinue, Type);
17070
+ var TypeConstraint$0 = $S(__, $EXPECT($L116, fail, 'TypeConstraint "extends"'), NonIdContinue, Type);
16801
17071
  function TypeConstraint(state) {
16802
17072
  let eventData;
16803
17073
  if (state.events) {
@@ -18328,10 +18598,11 @@ ${input.slice(result.pos)}
18328
18598
  children.push(block);
18329
18599
  if (!module.isWhitespaceOrEmpty(ws))
18330
18600
  children.push(ws);
18331
- return Object.assign({}, post, {
18332
- children,
18333
- block
18334
- });
18601
+ post = { ...post, children, block };
18602
+ if (post.type === "IfStatement") {
18603
+ post.then = block;
18604
+ }
18605
+ return post;
18335
18606
  };
18336
18607
  function expressionizeIteration(exp) {
18337
18608
  const resultsRef = {
@@ -18404,9 +18675,9 @@ ${input.slice(result.pos)}
18404
18675
  insertPush(exp.expressions[exp.expressions.length - 1], ref);
18405
18676
  return;
18406
18677
  case "IfStatement":
18407
- insertPush(exp.children[2], ref);
18408
- if (exp.children[3])
18409
- insertPush(exp.children[3][2], ref);
18678
+ insertPush(exp.then, ref);
18679
+ if (exp.else)
18680
+ insertPush(exp.else[2], ref);
18410
18681
  else
18411
18682
  exp.children.push([" else {\n", indent, ref, ".push(undefined)\n", indent, "}"]);
18412
18683
  return;
@@ -18462,7 +18733,9 @@ ${input.slice(result.pos)}
18462
18733
  }
18463
18734
  if (!Array.isArray(node))
18464
18735
  return;
18465
- const [, exp] = node;
18736
+ const [, exp, semi] = node;
18737
+ if (semi?.type === "SemicolonDelimiter")
18738
+ return;
18466
18739
  let indent = node[0];
18467
18740
  if (Array.isArray(indent))
18468
18741
  indent = indent[indent.length - 1];
@@ -18485,9 +18758,9 @@ ${input.slice(result.pos)}
18485
18758
  insertReturn(exp.expressions[exp.expressions.length - 1]);
18486
18759
  return;
18487
18760
  case "IfStatement":
18488
- insertReturn(exp.children[2]);
18489
- if (exp.children[3])
18490
- insertReturn(exp.children[3][2]);
18761
+ insertReturn(exp.then);
18762
+ if (exp.else)
18763
+ insertReturn(exp.else[2]);
18491
18764
  else
18492
18765
  exp.children.push(["\n", indent, wrapWithReturn()]);
18493
18766
  return;
@@ -18548,6 +18821,14 @@ ${input.slice(result.pos)}
18548
18821
  const op = expandedOps[i];
18549
18822
  if (op.special) {
18550
18823
  let [a, wsOp, op2, wsB, b] = expandedOps.slice(i - 2, i + 3);
18824
+ if (op2.token === "instanceof" && b.type === "Literal" && b.children?.[0]?.type === "StringLiteral") {
18825
+ a = ["typeof ", module.makeLeftHandSideExpression(a)];
18826
+ if (op2.negated) {
18827
+ op2 = { ...op2, token: "!==", negated: false };
18828
+ } else {
18829
+ op2 = { ...op2, token: "===" };
18830
+ }
18831
+ }
18551
18832
  if (op2.asConst) {
18552
18833
  a = module.makeAsConst(a);
18553
18834
  b = module.makeAsConst(b);
@@ -18588,7 +18869,7 @@ ${input.slice(result.pos)}
18588
18869
  return expandedOps;
18589
18870
  };
18590
18871
  module.expandChainedComparisons = function([first, binops]) {
18591
- const relationalOps = ["==", "===", "!=", "!==", "<", "<=", ">", ">=", "in", "instanceof"];
18872
+ const relationalOps = ["==", "===", "!=", "!==", "<", "<=", ">", ">=", "in"];
18592
18873
  const lowerPrecedenceOps = ["??", "&&", "||", "&", "|", "^"];
18593
18874
  let results = [];
18594
18875
  let i = 0;
@@ -19149,7 +19430,7 @@ ${input.slice(result.pos)}
19149
19430
  break;
19150
19431
  case "Literal":
19151
19432
  case "StringLiteral":
19152
- case void 0:
19433
+ case "NumericLiteral":
19153
19434
  conditions.push([name, " in ", ref]);
19154
19435
  subRef = [ref, "[", name, "]"];
19155
19436
  break;
@@ -19212,7 +19493,8 @@ ${input.slice(result.pos)}
19212
19493
  switch (name.type) {
19213
19494
  case "ComputedPropertyName":
19214
19495
  case "Literal":
19215
- case void 0:
19496
+ case "StringLiteral":
19497
+ case "NumericLiteral":
19216
19498
  return {
19217
19499
  ...p,
19218
19500
  children: [ws, name, ": ", match, sep]
@@ -19335,7 +19617,9 @@ ${input.slice(result.pos)}
19335
19617
  const e = i < l - 1 ? ["\nelse "] : [];
19336
19618
  prev.push({
19337
19619
  type: "IfStatement",
19338
- children: ["if", condition, block, ...e, next]
19620
+ children: ["if", condition, block, ...e, next],
19621
+ then: block,
19622
+ else: e
19339
19623
  });
19340
19624
  prev = next;
19341
19625
  });
@@ -20242,7 +20526,7 @@ var parse;
20242
20526
  var uncacheable;
20243
20527
  ({ parse } = import_parser.default);
20244
20528
  ({ SourceMap: SourceMap2, base64Encode: base64Encode2 } = util_exports);
20245
- uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "Declaration", "Debugger", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationSuppressed", "ExtendedExpression", "FatArrowBody", "FunctionDeclaration", "FunctionExpression", "HoistableDeclaration", "ImplicitArguments", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedApplicationAllowed", "IndentedFurther", "IndentedJSXChildExpression", "InlineObjectLiteral", "InsertIndent", "JSXChild", "JSXChildren", "JSXElement", "JSXFragment", "JSXImplicitFragment", "JSXMixedChildren", "JSXNested", "JSXNestedChildren", "JSXOptionalClosingElement", "JSXOptionalClosingFragment", "JSXTag", "LeftHandSideExpression", "MemberExpression", "MemberExpressionRest", "Nested", "NestedBindingElement", "NestedBindingElements", "NestedBlockExpression", "NestedBlockExpression", "NestedBlockStatement", "NestedBlockStatements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedObject", "NestedPropertyDefinitions", "NonSuppressedTrailingMemberExpressions", "ObjectLiteral", "PopIndent", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "Samedent", "ShortCircuitExpression", "SingleLineAssignmentExpression", "SingleLineComment", "SingleLineStatements", "SnugNamedProperty", "Statement", "StatementListItem", "SuppressIndentedApplication", "SuppressTrailingMemberProperty", "ThinArrowFunction", "TrackIndented", "TrailingMemberExpressions", "TrailingMemberPropertyAllowed", "TypedJSXElement", "TypedJSXFragment", "UnaryExpression", "UpdateExpression"]);
20529
+ uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "Declaration", "Debugger", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationSuppressed", "ExtendedExpression", "FatArrowBody", "FunctionDeclaration", "FunctionExpression", "HoistableDeclaration", "ImplicitArguments", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedApplicationAllowed", "IndentedFurther", "IndentedJSXChildExpression", "InlineObjectLiteral", "InsertIndent", "JSXChild", "JSXChildren", "JSXElement", "JSXFragment", "JSXImplicitFragment", "JSXMixedChildren", "JSXNested", "JSXNestedChildren", "JSXOptionalClosingElement", "JSXOptionalClosingFragment", "JSXTag", "LeftHandSideExpression", "MemberExpression", "MemberExpressionRest", "Nested", "NestedBindingElement", "NestedBindingElements", "NestedBlockExpression", "NestedBlockExpression", "NestedBlockStatement", "NestedBlockStatements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedObject", "NestedPropertyDefinitions", "NonSingleBracedBlock", "NonSuppressedTrailingMemberExpressions", "ObjectLiteral", "PopIndent", "PostfixedExpression", "PostfixedStatement", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "RHS", "Samedent", "ShortCircuitExpression", "SingleLineAssignmentExpression", "SingleLineComment", "SingleLineStatements", "SnugNamedProperty", "Statement", "StatementListItem", "SuffixedExpression", "SuffixedStatement", "SuppressIndentedApplication", "SuppressTrailingMemberProperty", "ThinArrowFunction", "TrackIndented", "TrailingMemberExpressions", "TrailingMemberPropertyAllowed", "TypedJSXElement", "TypedJSXFragment", "UnaryExpression", "UpdateExpression"]);
20246
20530
  var compile = function(src, options) {
20247
20531
  var ast, code, events, filename, ref, result, sm, srcMapJSON;
20248
20532
  if (!options) {