@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.js CHANGED
@@ -450,6 +450,7 @@ ${input.slice(result.pos)}
450
450
  ArgumentPart,
451
451
  BinaryOpExpression,
452
452
  BinaryOpRHS,
453
+ RHS,
453
454
  ParenthesizedAssignment,
454
455
  UnaryExpression,
455
456
  UnaryPostfix,
@@ -562,10 +563,14 @@ ${input.slice(result.pos)}
562
563
  Block,
563
564
  ThenClause,
564
565
  BracedOrEmptyBlock,
566
+ NoPostfixBracedOrEmptyBlock,
565
567
  EmptyBlock,
566
568
  EmptyBareBlock,
567
569
  BracedBlock,
570
+ NoPostfixBracedBlock,
571
+ NonSingleBracedBlock,
568
572
  SingleLineStatements,
573
+ PostfixedSingleLineStatements,
569
574
  BracedContent,
570
575
  NestedBlockStatements,
571
576
  NestedBlockStatement,
@@ -621,6 +626,8 @@ ${input.slice(result.pos)}
621
626
  UnaryOp,
622
627
  ModuleItem,
623
628
  StatementListItem,
629
+ PostfixedStatement,
630
+ PostfixedExpression,
624
631
  PostfixStatement,
625
632
  Statement,
626
633
  EmptyStatement,
@@ -667,7 +674,7 @@ ${input.slice(result.pos)}
667
674
  TryExpression,
668
675
  CatchClause,
669
676
  CatchBind,
670
- Finally,
677
+ FinallyClause,
671
678
  CatchParameter,
672
679
  Condition,
673
680
  ExpressionWithIndentedApplicationSuppressed,
@@ -800,6 +807,7 @@ ${input.slice(result.pos)}
800
807
  Equals,
801
808
  Export,
802
809
  Extends,
810
+ Finally,
803
811
  For,
804
812
  From,
805
813
  Function,
@@ -934,6 +942,7 @@ ${input.slice(result.pos)}
934
942
  InlineInterfacePropertyDelimiter,
935
943
  TypeBinaryOp,
936
944
  FunctionType,
945
+ TypeArrowFunction,
937
946
  TypeArguments,
938
947
  TypeArgument,
939
948
  TypeArgumentDelimiter,
@@ -1077,41 +1086,41 @@ ${input.slice(result.pos)}
1077
1086
  var $L80 = $L("|");
1078
1087
  var $L81 = $L(";");
1079
1088
  var $L82 = $L("own");
1080
- var $L83 = $L("finally");
1081
- var $L84 = $L("break");
1082
- var $L85 = $L("continue");
1083
- var $L86 = $L("debugger");
1084
- var $L87 = $L("assert");
1085
- var $L88 = $L(":=");
1086
- var $L89 = $L(".=");
1087
- var $L90 = $L("/*");
1088
- var $L91 = $L("*/");
1089
- var $L92 = $L("\\");
1090
- var $L93 = $L("[");
1091
- var $L94 = $L("`");
1092
- var $L95 = $L("abstract");
1093
- var $L96 = $L("as");
1094
- var $L97 = $L("@");
1095
- var $L98 = $L("@@");
1096
- var $L99 = $L("async");
1097
- var $L100 = $L("await");
1098
- var $L101 = $L("by");
1099
- var $L102 = $L("case");
1100
- var $L103 = $L("catch");
1101
- var $L104 = $L("class");
1102
- var $L105 = $L("#{");
1103
- var $L106 = $L(",");
1104
- var $L107 = $L("declare");
1105
- var $L108 = $L("default");
1106
- var $L109 = $L("delete");
1107
- var $L110 = $L("do");
1108
- var $L111 = $L("..");
1109
- var $L112 = $L("...");
1110
- var $L113 = $L("::");
1111
- var $L114 = $L('"');
1112
- var $L115 = $L("else");
1113
- var $L116 = $L("export");
1114
- var $L117 = $L("extends");
1089
+ var $L83 = $L("break");
1090
+ var $L84 = $L("continue");
1091
+ var $L85 = $L("debugger");
1092
+ var $L86 = $L("assert");
1093
+ var $L87 = $L(":=");
1094
+ var $L88 = $L(".=");
1095
+ var $L89 = $L("/*");
1096
+ var $L90 = $L("*/");
1097
+ var $L91 = $L("\\");
1098
+ var $L92 = $L("[");
1099
+ var $L93 = $L("`");
1100
+ var $L94 = $L("abstract");
1101
+ var $L95 = $L("as");
1102
+ var $L96 = $L("@");
1103
+ var $L97 = $L("@@");
1104
+ var $L98 = $L("async");
1105
+ var $L99 = $L("await");
1106
+ var $L100 = $L("by");
1107
+ var $L101 = $L("case");
1108
+ var $L102 = $L("catch");
1109
+ var $L103 = $L("class");
1110
+ var $L104 = $L("#{");
1111
+ var $L105 = $L(",");
1112
+ var $L106 = $L("declare");
1113
+ var $L107 = $L("default");
1114
+ var $L108 = $L("delete");
1115
+ var $L109 = $L("do");
1116
+ var $L110 = $L("..");
1117
+ var $L111 = $L("...");
1118
+ var $L112 = $L("::");
1119
+ var $L113 = $L('"');
1120
+ var $L114 = $L("else");
1121
+ var $L115 = $L("export");
1122
+ var $L116 = $L("extends");
1123
+ var $L117 = $L("finally");
1115
1124
  var $L118 = $L("for");
1116
1125
  var $L119 = $L("from");
1117
1126
  var $L120 = $L("function");
@@ -1167,7 +1176,7 @@ ${input.slice(result.pos)}
1167
1176
  var $L170 = $L("infer");
1168
1177
  var $L171 = $L("[]");
1169
1178
  var $L172 = $L("civet");
1170
- var $R0 = $R(new RegExp("(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
1179
+ var $R0 = $R(new RegExp("(as|for|while|until|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
1171
1180
  var $R1 = $R(new RegExp("[0-9]", "suy"));
1172
1181
  var $R2 = $R(new RegExp("[&]", "suy"));
1173
1182
  var $R3 = $R(new RegExp("[!~+-]+", "suy"));
@@ -1548,7 +1557,7 @@ ${input.slice(result.pos)}
1548
1557
  return result;
1549
1558
  }
1550
1559
  }
1551
- var ForbiddenImplicitCalls$0 = $R$0($EXPECT($R0, fail, "ForbiddenImplicitCalls /(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
1560
+ var ForbiddenImplicitCalls$0 = $R$0($EXPECT($R0, fail, "ForbiddenImplicitCalls /(as|for|while|until|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
1552
1561
  var ForbiddenImplicitCalls$1 = $EXPECT($L0, fail, 'ForbiddenImplicitCalls "/ "');
1553
1562
  var ForbiddenImplicitCalls$2 = AtAt;
1554
1563
  var ForbiddenImplicitCalls$3 = $S(Identifier, $EXPECT($L1, fail, 'ForbiddenImplicitCalls "="'), Whitespace);
@@ -1867,7 +1876,12 @@ ${input.slice(result.pos)}
1867
1876
  return result;
1868
1877
  }
1869
1878
  }
1870
- var BinaryOpRHS$0 = $S(__, BinaryOp, __, $C(ParenthesizedAssignment, UnaryExpression, ExpressionizedStatement));
1879
+ var BinaryOpRHS$0 = $TS($S(BinaryOp, RHS), function($skip, $loc, $0, $1, $2) {
1880
+ var op = $1;
1881
+ var rhs = $2;
1882
+ return [[], op, [], rhs];
1883
+ });
1884
+ var BinaryOpRHS$1 = $S(__, BinaryOp, $C(_, $S(EOS, __)), RHS);
1871
1885
  function BinaryOpRHS(state) {
1872
1886
  let eventData;
1873
1887
  if (state.events) {
@@ -1879,17 +1893,42 @@ ${input.slice(result.pos)}
1879
1893
  }
1880
1894
  }
1881
1895
  if (state.tokenize) {
1882
- const result = $TOKEN("BinaryOpRHS", state, BinaryOpRHS$0(state));
1896
+ const result = $TOKEN("BinaryOpRHS", state, BinaryOpRHS$0(state) || BinaryOpRHS$1(state));
1883
1897
  if (state.events)
1884
1898
  state.events.exit?.("BinaryOpRHS", state, result, eventData);
1885
1899
  return result;
1886
1900
  } else {
1887
- const result = BinaryOpRHS$0(state);
1901
+ const result = BinaryOpRHS$0(state) || BinaryOpRHS$1(state);
1888
1902
  if (state.events)
1889
1903
  state.events.exit?.("BinaryOpRHS", state, result, eventData);
1890
1904
  return result;
1891
1905
  }
1892
1906
  }
1907
+ var RHS$0 = ParenthesizedAssignment;
1908
+ var RHS$1 = UnaryExpression;
1909
+ var RHS$2 = ExpressionizedStatement;
1910
+ function RHS(state) {
1911
+ let eventData;
1912
+ if (state.events) {
1913
+ const result = state.events.enter?.("RHS", state);
1914
+ if (result) {
1915
+ if (result.cache)
1916
+ return result.cache;
1917
+ eventData = result.data;
1918
+ }
1919
+ }
1920
+ if (state.tokenize) {
1921
+ const result = $TOKEN("RHS", state, RHS$0(state) || RHS$1(state) || RHS$2(state));
1922
+ if (state.events)
1923
+ state.events.exit?.("RHS", state, result, eventData);
1924
+ return result;
1925
+ } else {
1926
+ const result = RHS$0(state) || RHS$1(state) || RHS$2(state);
1927
+ if (state.events)
1928
+ state.events.exit?.("RHS", state, result, eventData);
1929
+ return result;
1930
+ }
1931
+ }
1893
1932
  var ParenthesizedAssignment$0 = $S(InsertOpenParen, ActualAssignment, InsertCloseParen);
1894
1933
  function ParenthesizedAssignment(state) {
1895
1934
  let eventData;
@@ -2313,10 +2352,11 @@ ${input.slice(result.pos)}
2313
2352
  return result;
2314
2353
  }
2315
2354
  }
2316
- var FatArrowBody$0 = ExplicitBlock;
2317
- var FatArrowBody$1 = ImplicitNestedBlock;
2318
- var FatArrowBody$2 = AssignmentExpression;
2319
- var FatArrowBody$3 = EmptyBlock;
2355
+ var FatArrowBody$0 = $T($S($N(EOS), PostfixedExpression, $N(SemicolonDelimiter)), function(value) {
2356
+ var exp = value[1];
2357
+ return exp;
2358
+ });
2359
+ var FatArrowBody$1 = BracedOrEmptyBlock;
2320
2360
  function FatArrowBody(state) {
2321
2361
  let eventData;
2322
2362
  if (state.events) {
@@ -2328,12 +2368,12 @@ ${input.slice(result.pos)}
2328
2368
  }
2329
2369
  }
2330
2370
  if (state.tokenize) {
2331
- const result = $TOKEN("FatArrowBody", state, FatArrowBody$0(state) || FatArrowBody$1(state) || FatArrowBody$2(state) || FatArrowBody$3(state));
2371
+ const result = $TOKEN("FatArrowBody", state, FatArrowBody$0(state) || FatArrowBody$1(state));
2332
2372
  if (state.events)
2333
2373
  state.events.exit?.("FatArrowBody", state, result, eventData);
2334
2374
  return result;
2335
2375
  } else {
2336
- const result = FatArrowBody$0(state) || FatArrowBody$1(state) || FatArrowBody$2(state) || FatArrowBody$3(state);
2376
+ const result = FatArrowBody$0(state) || FatArrowBody$1(state);
2337
2377
  if (state.events)
2338
2378
  state.events.exit?.("FatArrowBody", state, result, eventData);
2339
2379
  return result;
@@ -2574,11 +2614,11 @@ ${input.slice(result.pos)}
2574
2614
  return result;
2575
2615
  }
2576
2616
  }
2577
- var ParenthesizedExpression$0 = $TS($S(OpenParen, ExtendedExpression, $E($S($Q(TrailingComment), PostfixStatement)), __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
2617
+ var ParenthesizedExpression$0 = $TS($S(OpenParen, PostfixedExpression, __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4) {
2578
2618
  var exp = $2;
2579
- var post = $3;
2580
- if (post) {
2581
- return module2.attachPostfixStatementAsExpression(exp, post);
2619
+ switch (exp.type) {
2620
+ case "IterationExpression":
2621
+ return $2;
2582
2622
  }
2583
2623
  return {
2584
2624
  type: "ParenthesizedExpression",
@@ -3240,7 +3280,12 @@ ${input.slice(result.pos)}
3240
3280
  }
3241
3281
  }
3242
3282
  var CallExpressionRest$0 = MemberExpressionRest;
3243
- var CallExpressionRest$1 = TemplateLiteral;
3283
+ var CallExpressionRest$1 = $TV($C(TemplateLiteral, StringLiteral), function($skip, $loc, $0, $1) {
3284
+ if ($1.type === "StringLiteral") {
3285
+ return "`" + $1.token.slice(1, -1).replace(/(`|\$\{)/g, "\\$1") + "`";
3286
+ }
3287
+ return $1;
3288
+ });
3244
3289
  var CallExpressionRest$2 = $TS($S($E($C(OptionalShorthand, NonNullAssertion)), ArgumentsWithTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
3245
3290
  if (!$1)
3246
3291
  return $2;
@@ -3388,7 +3433,7 @@ ${input.slice(result.pos)}
3388
3433
  return result;
3389
3434
  }
3390
3435
  }
3391
- var MemberBracketContent$0 = $TS($S(OpenBracket, $C(SliceParameters, ExtendedExpression), __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
3436
+ var MemberBracketContent$0 = $TS($S(OpenBracket, $C(SliceParameters, PostfixedExpression), __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
3392
3437
  var open = $1;
3393
3438
  var exp = $2;
3394
3439
  var ws = $3;
@@ -3577,7 +3622,7 @@ ${input.slice(result.pos)}
3577
3622
  return result;
3578
3623
  }
3579
3624
  }
3580
- var SuperProperty$0 = $S($EXPECT($L16, fail, 'SuperProperty "super["'), ExtendedExpression, __, CloseBracket);
3625
+ var SuperProperty$0 = $S($EXPECT($L16, fail, 'SuperProperty "super["'), PostfixedExpression, __, CloseBracket);
3581
3626
  var SuperProperty$1 = $S($EXPECT($L12, fail, 'SuperProperty "super"'), $N($C(QuestionMark, NonNullAssertion)), PropertyAccess);
3582
3627
  function SuperProperty(state) {
3583
3628
  let eventData;
@@ -4998,7 +5043,11 @@ ${input.slice(result.pos)}
4998
5043
  return result;
4999
5044
  }
5000
5045
  }
5001
- var FunctionDeclaration$0 = FunctionExpression;
5046
+ var FunctionDeclaration$0 = $TS($S(FunctionExpression), function($skip, $loc, $0, $1) {
5047
+ if ($1.id)
5048
+ return $1;
5049
+ return module2.makeLeftHandSideExpression($1);
5050
+ });
5002
5051
  function FunctionDeclaration(state) {
5003
5052
  let eventData;
5004
5053
  if (state.events) {
@@ -5512,6 +5561,30 @@ ${input.slice(result.pos)}
5512
5561
  return result;
5513
5562
  }
5514
5563
  }
5564
+ var NoPostfixBracedOrEmptyBlock$0 = NoPostfixBracedBlock;
5565
+ var NoPostfixBracedOrEmptyBlock$1 = EmptyBlock;
5566
+ function NoPostfixBracedOrEmptyBlock(state) {
5567
+ let eventData;
5568
+ if (state.events) {
5569
+ const result = state.events.enter?.("NoPostfixBracedOrEmptyBlock", state);
5570
+ if (result) {
5571
+ if (result.cache)
5572
+ return result.cache;
5573
+ eventData = result.data;
5574
+ }
5575
+ }
5576
+ if (state.tokenize) {
5577
+ const result = $TOKEN("NoPostfixBracedOrEmptyBlock", state, NoPostfixBracedOrEmptyBlock$0(state) || NoPostfixBracedOrEmptyBlock$1(state));
5578
+ if (state.events)
5579
+ state.events.exit?.("NoPostfixBracedOrEmptyBlock", state, result, eventData);
5580
+ return result;
5581
+ } else {
5582
+ const result = NoPostfixBracedOrEmptyBlock$0(state) || NoPostfixBracedOrEmptyBlock$1(state);
5583
+ if (state.events)
5584
+ state.events.exit?.("NoPostfixBracedOrEmptyBlock", state, result, eventData);
5585
+ return result;
5586
+ }
5587
+ }
5515
5588
  var EmptyBlock$0 = $TS($S(InsertOpenBrace, InsertCloseBrace), function($skip, $loc, $0, $1, $2) {
5516
5589
  const expressions = [];
5517
5590
  return {
@@ -5575,26 +5648,44 @@ ${input.slice(result.pos)}
5575
5648
  return result;
5576
5649
  }
5577
5650
  }
5578
- var BracedBlock$0 = $TS($S($Q(TrailingComment), OpenBrace, BracedContent, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5579
- var block = $3;
5580
- return {
5581
- type: "BlockStatement",
5582
- expressions: block.expressions,
5583
- children: [$1, $2, ...block.children, $4, $5],
5584
- bare: false
5585
- };
5586
- return block;
5587
- });
5588
- var BracedBlock$1 = ImplicitNestedBlock;
5589
- var BracedBlock$2 = $TS($S(InsertOpenBrace, $Y(EOS), ObjectLiteral, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
5651
+ var BracedBlock$0 = NonSingleBracedBlock;
5652
+ var BracedBlock$1 = $TS($S(InsertOpenBrace, $N(EOS), PostfixedSingleLineStatements, InsertSpace, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5653
+ var o = $1;
5590
5654
  var s = $3;
5655
+ var ws = $4;
5656
+ var c = $5;
5657
+ if (!s.children.length)
5658
+ return $skip;
5591
5659
  return {
5592
5660
  type: "BlockStatement",
5593
- expressions: [s],
5594
- children: [$1, s, $3]
5661
+ expressions: s.expressions,
5662
+ children: [o, s.children, ws, c]
5595
5663
  };
5596
5664
  });
5597
- var BracedBlock$3 = $TS($S(InsertOpenBrace, $N(EOS), SingleLineStatements, InsertSpace, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5665
+ function BracedBlock(state) {
5666
+ let eventData;
5667
+ if (state.events) {
5668
+ const result = state.events.enter?.("BracedBlock", state);
5669
+ if (result) {
5670
+ if (result.cache)
5671
+ return result.cache;
5672
+ eventData = result.data;
5673
+ }
5674
+ }
5675
+ if (state.tokenize) {
5676
+ const result = $TOKEN("BracedBlock", state, BracedBlock$0(state) || BracedBlock$1(state));
5677
+ if (state.events)
5678
+ state.events.exit?.("BracedBlock", state, result, eventData);
5679
+ return result;
5680
+ } else {
5681
+ const result = BracedBlock$0(state) || BracedBlock$1(state);
5682
+ if (state.events)
5683
+ state.events.exit?.("BracedBlock", state, result, eventData);
5684
+ return result;
5685
+ }
5686
+ }
5687
+ var NoPostfixBracedBlock$0 = NonSingleBracedBlock;
5688
+ var NoPostfixBracedBlock$1 = $TS($S(InsertOpenBrace, $N(EOS), SingleLineStatements, InsertSpace, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5598
5689
  var o = $1;
5599
5690
  var s = $3;
5600
5691
  var ws = $4;
@@ -5607,10 +5698,10 @@ ${input.slice(result.pos)}
5607
5698
  children: [o, s.children, ws, c]
5608
5699
  };
5609
5700
  });
5610
- function BracedBlock(state) {
5701
+ function NoPostfixBracedBlock(state) {
5611
5702
  let eventData;
5612
5703
  if (state.events) {
5613
- const result = state.events.enter?.("BracedBlock", state);
5704
+ const result = state.events.enter?.("NoPostfixBracedBlock", state);
5614
5705
  if (result) {
5615
5706
  if (result.cache)
5616
5707
  return result.cache;
@@ -5618,14 +5709,55 @@ ${input.slice(result.pos)}
5618
5709
  }
5619
5710
  }
5620
5711
  if (state.tokenize) {
5621
- const result = $TOKEN("BracedBlock", state, BracedBlock$0(state) || BracedBlock$1(state) || BracedBlock$2(state) || BracedBlock$3(state));
5712
+ const result = $TOKEN("NoPostfixBracedBlock", state, NoPostfixBracedBlock$0(state) || NoPostfixBracedBlock$1(state));
5622
5713
  if (state.events)
5623
- state.events.exit?.("BracedBlock", state, result, eventData);
5714
+ state.events.exit?.("NoPostfixBracedBlock", state, result, eventData);
5624
5715
  return result;
5625
5716
  } else {
5626
- const result = BracedBlock$0(state) || BracedBlock$1(state) || BracedBlock$2(state) || BracedBlock$3(state);
5717
+ const result = NoPostfixBracedBlock$0(state) || NoPostfixBracedBlock$1(state);
5627
5718
  if (state.events)
5628
- state.events.exit?.("BracedBlock", state, result, eventData);
5719
+ state.events.exit?.("NoPostfixBracedBlock", state, result, eventData);
5720
+ return result;
5721
+ }
5722
+ }
5723
+ var NonSingleBracedBlock$0 = $TS($S($Q(TrailingComment), OpenBrace, BracedContent, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5724
+ var block = $3;
5725
+ return {
5726
+ type: "BlockStatement",
5727
+ expressions: block.expressions,
5728
+ children: [$1, $2, ...block.children, $4, $5],
5729
+ bare: false
5730
+ };
5731
+ return block;
5732
+ });
5733
+ var NonSingleBracedBlock$1 = ImplicitNestedBlock;
5734
+ var NonSingleBracedBlock$2 = $TS($S(InsertOpenBrace, $Y(EOS), ObjectLiteral, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4) {
5735
+ var s = $3;
5736
+ return {
5737
+ type: "BlockStatement",
5738
+ expressions: [s],
5739
+ children: [$1, s, $3]
5740
+ };
5741
+ });
5742
+ function NonSingleBracedBlock(state) {
5743
+ let eventData;
5744
+ if (state.events) {
5745
+ const result = state.events.enter?.("NonSingleBracedBlock", state);
5746
+ if (result) {
5747
+ if (result.cache)
5748
+ return result.cache;
5749
+ eventData = result.data;
5750
+ }
5751
+ }
5752
+ if (state.tokenize) {
5753
+ const result = $TOKEN("NonSingleBracedBlock", state, NonSingleBracedBlock$0(state) || NonSingleBracedBlock$1(state) || NonSingleBracedBlock$2(state));
5754
+ if (state.events)
5755
+ state.events.exit?.("NonSingleBracedBlock", state, result, eventData);
5756
+ return result;
5757
+ } else {
5758
+ const result = NonSingleBracedBlock$0(state) || NonSingleBracedBlock$1(state) || NonSingleBracedBlock$2(state);
5759
+ if (state.events)
5760
+ state.events.exit?.("NonSingleBracedBlock", state, result, eventData);
5629
5761
  return result;
5630
5762
  }
5631
5763
  }
@@ -5664,6 +5796,41 @@ ${input.slice(result.pos)}
5664
5796
  return result;
5665
5797
  }
5666
5798
  }
5799
+ 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) {
5800
+ var stmts = $1;
5801
+ var last = $2;
5802
+ const children = [...stmts];
5803
+ if (last)
5804
+ children.push(last);
5805
+ return {
5806
+ type: "BlockStatement",
5807
+ expressions: children,
5808
+ children,
5809
+ bare: true
5810
+ };
5811
+ });
5812
+ function PostfixedSingleLineStatements(state) {
5813
+ let eventData;
5814
+ if (state.events) {
5815
+ const result = state.events.enter?.("PostfixedSingleLineStatements", state);
5816
+ if (result) {
5817
+ if (result.cache)
5818
+ return result.cache;
5819
+ eventData = result.data;
5820
+ }
5821
+ }
5822
+ if (state.tokenize) {
5823
+ const result = $TOKEN("PostfixedSingleLineStatements", state, PostfixedSingleLineStatements$0(state));
5824
+ if (state.events)
5825
+ state.events.exit?.("PostfixedSingleLineStatements", state, result, eventData);
5826
+ return result;
5827
+ } else {
5828
+ const result = PostfixedSingleLineStatements$0(state);
5829
+ if (state.events)
5830
+ state.events.exit?.("PostfixedSingleLineStatements", state, result, eventData);
5831
+ return result;
5832
+ }
5833
+ }
5667
5834
  var BracedContent$0 = NestedBlockStatements;
5668
5835
  var BracedContent$1 = $TS($S($Q(TrailingComment), Statement), function($skip, $loc, $0, $1, $2) {
5669
5836
  const expressions = [["", $2]];
@@ -6964,7 +7131,7 @@ ${input.slice(result.pos)}
6964
7131
  return result;
6965
7132
  }
6966
7133
  }
6967
- var ComputedPropertyName$0 = $TS($S(OpenBracket, ExtendedExpression, __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
7134
+ var ComputedPropertyName$0 = $TS($S(OpenBracket, PostfixedExpression, __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
6968
7135
  var expression = $2;
6969
7136
  return {
6970
7137
  type: "ComputedPropertyName",
@@ -7508,7 +7675,12 @@ ${input.slice(result.pos)}
7508
7675
  return "??";
7509
7676
  });
7510
7677
  var BinaryOpSymbol$28 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "instanceof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
7511
- return $1;
7678
+ return {
7679
+ $loc,
7680
+ token: $1,
7681
+ relational: true,
7682
+ special: true
7683
+ };
7512
7684
  });
7513
7685
  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) {
7514
7686
  return {
@@ -7666,13 +7838,7 @@ ${input.slice(result.pos)}
7666
7838
  }
7667
7839
  }
7668
7840
  var StatementListItem$0 = Declaration;
7669
- var StatementListItem$1 = $TS($S(Statement, $E($S($Q(TrailingComment), PostfixStatement))), function($skip, $loc, $0, $1, $2) {
7670
- var statement = $1;
7671
- var post = $2;
7672
- if (post)
7673
- return module2.addPostfixStatement(statement, ...post);
7674
- return statement;
7675
- });
7841
+ var StatementListItem$1 = PostfixedStatement;
7676
7842
  function StatementListItem(state) {
7677
7843
  let eventData;
7678
7844
  if (state.events) {
@@ -7695,6 +7861,64 @@ ${input.slice(result.pos)}
7695
7861
  return result;
7696
7862
  }
7697
7863
  }
7864
+ var PostfixedStatement$0 = $TS($S(Statement, $E($S($Q(TrailingComment), PostfixStatement))), function($skip, $loc, $0, $1, $2) {
7865
+ var statement = $1;
7866
+ var post = $2;
7867
+ if (post)
7868
+ return module2.addPostfixStatement(statement, ...post);
7869
+ return statement;
7870
+ });
7871
+ function PostfixedStatement(state) {
7872
+ let eventData;
7873
+ if (state.events) {
7874
+ const result = state.events.enter?.("PostfixedStatement", state);
7875
+ if (result) {
7876
+ if (result.cache)
7877
+ return result.cache;
7878
+ eventData = result.data;
7879
+ }
7880
+ }
7881
+ if (state.tokenize) {
7882
+ const result = $TOKEN("PostfixedStatement", state, PostfixedStatement$0(state));
7883
+ if (state.events)
7884
+ state.events.exit?.("PostfixedStatement", state, result, eventData);
7885
+ return result;
7886
+ } else {
7887
+ const result = PostfixedStatement$0(state);
7888
+ if (state.events)
7889
+ state.events.exit?.("PostfixedStatement", state, result, eventData);
7890
+ return result;
7891
+ }
7892
+ }
7893
+ var PostfixedExpression$0 = $TS($S(ExtendedExpression, $E($S($Q(TrailingComment), PostfixStatement))), function($skip, $loc, $0, $1, $2) {
7894
+ var expression = $1;
7895
+ var post = $2;
7896
+ if (post)
7897
+ return module2.attachPostfixStatementAsExpression(expression, post);
7898
+ return expression;
7899
+ });
7900
+ function PostfixedExpression(state) {
7901
+ let eventData;
7902
+ if (state.events) {
7903
+ const result = state.events.enter?.("PostfixedExpression", state);
7904
+ if (result) {
7905
+ if (result.cache)
7906
+ return result.cache;
7907
+ eventData = result.data;
7908
+ }
7909
+ }
7910
+ if (state.tokenize) {
7911
+ const result = $TOKEN("PostfixedExpression", state, PostfixedExpression$0(state));
7912
+ if (state.events)
7913
+ state.events.exit?.("PostfixedExpression", state, result, eventData);
7914
+ return result;
7915
+ } else {
7916
+ const result = PostfixedExpression$0(state);
7917
+ if (state.events)
7918
+ state.events.exit?.("PostfixedExpression", state, result, eventData);
7919
+ return result;
7920
+ }
7921
+ }
7698
7922
  var PostfixStatement$0 = ForClause;
7699
7923
  var PostfixStatement$1 = IfClause;
7700
7924
  var PostfixStatement$2 = LoopClause;
@@ -7730,12 +7954,8 @@ ${input.slice(result.pos)}
7730
7954
  var Statement$5 = TryStatement;
7731
7955
  var Statement$6 = EmptyStatement;
7732
7956
  var Statement$7 = $TS($S(ExpressionStatement), function($skip, $loc, $0, $1) {
7733
- if ($1.type === "ObjectExpression") {
7734
- return {
7735
- type: "ParenthesizedExpression",
7736
- children: ["(", $1, ")"],
7737
- expression: $1
7738
- };
7957
+ if ($1.type === "ObjectExpression" || $1.type === "FunctionExpression" && !$1.id) {
7958
+ return module2.makeLeftHandSideExpression($1);
7739
7959
  }
7740
7960
  return $1;
7741
7961
  });
@@ -7823,6 +8043,8 @@ ${input.slice(result.pos)}
7823
8043
  children.push(e);
7824
8044
  return {
7825
8045
  type: "IfStatement",
8046
+ then: block,
8047
+ else: e,
7826
8048
  children
7827
8049
  };
7828
8050
  });
@@ -7900,7 +8122,7 @@ ${input.slice(result.pos)}
7900
8122
  var UnlessClause$0 = $TS($S(Unless, Condition), function($skip, $loc, $0, $1, $2) {
7901
8123
  var kind = $1;
7902
8124
  var condition = $2;
7903
- kind.token = "if";
8125
+ kind = { ...kind, token: "if" };
7904
8126
  return {
7905
8127
  type: "IfStatement",
7906
8128
  children: [kind, ["(!", condition, ")"]]
@@ -8129,16 +8351,7 @@ ${input.slice(result.pos)}
8129
8351
  return result;
8130
8352
  }
8131
8353
  }
8132
- var NestedBlockExpression$0 = $TS($S(Nested, ExtendedExpression, $E($S($Q(TrailingComment), PostfixStatement)), ExpressionDelimiter), function($skip, $loc, $0, $1, $2, $3, $4) {
8133
- var ws = $1;
8134
- var exp = $2;
8135
- var post = $3;
8136
- var d = $4;
8137
- if (post) {
8138
- return [ws, module2.attachPostfixStatementAsExpression(exp, post), d];
8139
- }
8140
- return [ws, exp, d];
8141
- });
8354
+ var NestedBlockExpression$0 = $S(Nested, PostfixedExpression, ExpressionDelimiter);
8142
8355
  function NestedBlockExpression(state) {
8143
8356
  let eventData;
8144
8357
  if (state.events) {
@@ -8274,7 +8487,7 @@ ${input.slice(result.pos)}
8274
8487
  return result;
8275
8488
  }
8276
8489
  }
8277
- var DoWhileStatement$0 = $T($S(Do, BracedBlock, __, WhileClause), function(value) {
8490
+ var DoWhileStatement$0 = $T($S(Do, NoPostfixBracedBlock, __, WhileClause), function(value) {
8278
8491
  var block = value[1];
8279
8492
  return { "type": "IterationStatement", "children": value, "block": block };
8280
8493
  });
@@ -8442,9 +8655,11 @@ ${input.slice(result.pos)}
8442
8655
  var ForStatementControl$1 = $TS($S(CoffeeForLoopsEnabled, CoffeeForStatementParameters, $E(WhenCondition)), function($skip, $loc, $0, $1, $2, $3) {
8443
8656
  if ($3) {
8444
8657
  const indent = module2.currentIndent.token + " ";
8658
+ const block = "continue\n";
8445
8659
  $2.blockPrefix.push([indent, {
8446
8660
  type: "IfStatement",
8447
- children: ["if (!(", module2.insertTrimmingSpace($3, ""), ")) continue\n"]
8661
+ then: block,
8662
+ children: ["if (!(", module2.insertTrimmingSpace($3, ""), ")) ", block]
8448
8663
  }]);
8449
8664
  }
8450
8665
  return $2;
@@ -9228,7 +9443,7 @@ ${input.slice(result.pos)}
9228
9443
  return result;
9229
9444
  }
9230
9445
  }
9231
- var TryStatement$0 = $TS($S(Try, BracedBlock, $E(CatchClause), $E(Finally)), function($skip, $loc, $0, $1, $2, $3, $4) {
9446
+ var TryStatement$0 = $TS($S(Try, NoPostfixBracedOrEmptyBlock, $E(CatchClause), $E(FinallyClause)), function($skip, $loc, $0, $1, $2, $3, $4) {
9232
9447
  var t = $1;
9233
9448
  var b = $2;
9234
9449
  var c = $3;
@@ -9296,7 +9511,7 @@ ${input.slice(result.pos)}
9296
9511
  return result;
9297
9512
  }
9298
9513
  }
9299
- var CatchClause$0 = $S(__, Catch, $E(CatchBind), BracedBlock);
9514
+ var CatchClause$0 = $S($C(Samedent, _), Catch, $E(CatchBind), $C(ThenClause, BracedOrEmptyBlock));
9300
9515
  function CatchClause(state) {
9301
9516
  let eventData;
9302
9517
  if (state.events) {
@@ -9319,8 +9534,8 @@ ${input.slice(result.pos)}
9319
9534
  return result;
9320
9535
  }
9321
9536
  }
9322
- var CatchBind$0 = $S(__, OpenParen, __, CatchParameter, __, CloseParen);
9323
- var CatchBind$1 = $S($N(EOS), $Q(TrailingComment), InsertOpenParen, CatchParameter, InsertCloseParen);
9537
+ var CatchBind$0 = $S($E(_), OpenParen, __, CatchParameter, __, CloseParen);
9538
+ var CatchBind$1 = $S(_, InsertOpenParen, CatchParameter, InsertCloseParen);
9324
9539
  function CatchBind(state) {
9325
9540
  let eventData;
9326
9541
  if (state.events) {
@@ -9343,11 +9558,11 @@ ${input.slice(result.pos)}
9343
9558
  return result;
9344
9559
  }
9345
9560
  }
9346
- var Finally$0 = $S(__, $EXPECT($L83, fail, 'Finally "finally"'), NonIdContinue, BracedBlock);
9347
- function Finally(state) {
9561
+ var FinallyClause$0 = $S($C(Samedent, _), Finally, $C(ThenClause, BracedOrEmptyBlock));
9562
+ function FinallyClause(state) {
9348
9563
  let eventData;
9349
9564
  if (state.events) {
9350
- const result = state.events.enter?.("Finally", state);
9565
+ const result = state.events.enter?.("FinallyClause", state);
9351
9566
  if (result) {
9352
9567
  if (result.cache)
9353
9568
  return result.cache;
@@ -9355,14 +9570,14 @@ ${input.slice(result.pos)}
9355
9570
  }
9356
9571
  }
9357
9572
  if (state.tokenize) {
9358
- const result = $TOKEN("Finally", state, Finally$0(state));
9573
+ const result = $TOKEN("FinallyClause", state, FinallyClause$0(state));
9359
9574
  if (state.events)
9360
- state.events.exit?.("Finally", state, result, eventData);
9575
+ state.events.exit?.("FinallyClause", state, result, eventData);
9361
9576
  return result;
9362
9577
  } else {
9363
- const result = Finally$0(state);
9578
+ const result = FinallyClause$0(state);
9364
9579
  if (state.events)
9365
- state.events.exit?.("Finally", state, result, eventData);
9580
+ state.events.exit?.("FinallyClause", state, result, eventData);
9366
9581
  return result;
9367
9582
  }
9368
9583
  }
@@ -9583,13 +9798,13 @@ ${input.slice(result.pos)}
9583
9798
  return result;
9584
9799
  }
9585
9800
  }
9586
- var KeywordStatement$0 = $T($S($EXPECT($L84, fail, 'KeywordStatement "break"'), NonIdContinue), function(value) {
9801
+ var KeywordStatement$0 = $T($S($EXPECT($L83, fail, 'KeywordStatement "break"'), NonIdContinue), function(value) {
9587
9802
  return { "type": "BreakStatement", "children": value };
9588
9803
  });
9589
- var KeywordStatement$1 = $T($S($EXPECT($L85, fail, 'KeywordStatement "continue"'), NonIdContinue), function(value) {
9804
+ var KeywordStatement$1 = $T($S($EXPECT($L84, fail, 'KeywordStatement "continue"'), NonIdContinue), function(value) {
9590
9805
  return { "type": "ContinueStatement", "children": value };
9591
9806
  });
9592
- var KeywordStatement$2 = $T($S($EXPECT($L86, fail, 'KeywordStatement "debugger"'), NonIdContinue), function(value) {
9807
+ var KeywordStatement$2 = $T($S($EXPECT($L85, fail, 'KeywordStatement "debugger"'), NonIdContinue), function(value) {
9593
9808
  return { "type": "DebuggerStatement", "children": value };
9594
9809
  });
9595
9810
  var KeywordStatement$3 = $T($S(Return, $E(MaybeNestedExpression)), function(value) {
@@ -9620,7 +9835,7 @@ ${input.slice(result.pos)}
9620
9835
  return result;
9621
9836
  }
9622
9837
  }
9623
- var DebuggerExpression$0 = $TS($S($EXPECT($L86, fail, 'DebuggerExpression "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9838
+ var DebuggerExpression$0 = $TS($S($EXPECT($L85, fail, 'DebuggerExpression "debugger"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
9624
9839
  return {
9625
9840
  type: "DebuggerExpression",
9626
9841
  children: ["(()=>{", $1, "})()"]
@@ -9897,7 +10112,7 @@ ${input.slice(result.pos)}
9897
10112
  return result;
9898
10113
  }
9899
10114
  }
9900
- var ImportAssertion$0 = $S($E(_), $EXPECT($L87, fail, 'ImportAssertion "assert"'), NonIdContinue, $E(_), ObjectLiteral);
10115
+ var ImportAssertion$0 = $S($E(_), $EXPECT($L86, fail, 'ImportAssertion "assert"'), NonIdContinue, $E(_), ObjectLiteral);
9901
10116
  function ImportAssertion(state) {
9902
10117
  let eventData;
9903
10118
  if (state.events) {
@@ -10501,7 +10716,7 @@ ${input.slice(result.pos)}
10501
10716
  return result;
10502
10717
  }
10503
10718
  }
10504
- var ConstAssignment$0 = $TV($EXPECT($L88, fail, 'ConstAssignment ":="'), function($skip, $loc, $0, $1) {
10719
+ var ConstAssignment$0 = $TV($EXPECT($L87, fail, 'ConstAssignment ":="'), function($skip, $loc, $0, $1) {
10505
10720
  return { $loc, token: "=" };
10506
10721
  });
10507
10722
  function ConstAssignment(state) {
@@ -10526,7 +10741,7 @@ ${input.slice(result.pos)}
10526
10741
  return result;
10527
10742
  }
10528
10743
  }
10529
- var LetAssignment$0 = $TV($EXPECT($L89, fail, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
10744
+ var LetAssignment$0 = $TV($EXPECT($L88, fail, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
10530
10745
  return { $loc, token: "=" };
10531
10746
  });
10532
10747
  function LetAssignment(state) {
@@ -10724,7 +10939,7 @@ ${input.slice(result.pos)}
10724
10939
  }
10725
10940
  }
10726
10941
  var NumericLiteral$0 = $TS($S(NumericLiteralKind), function($skip, $loc, $0, $1) {
10727
- return { $loc, token: $1 };
10942
+ return { type: "NumericLiteral", $loc, token: $1 };
10728
10943
  });
10729
10944
  function NumericLiteral(state) {
10730
10945
  let eventData;
@@ -10995,6 +11210,7 @@ ${input.slice(result.pos)}
10995
11210
  var StringLiteral$0 = $TS($S(DoubleQuote, DoubleStringCharacters, DoubleQuote), function($skip, $loc, $0, $1, $2, $3) {
10996
11211
  var str = $2;
10997
11212
  return {
11213
+ type: "StringLiteral",
10998
11214
  token: `"${module2.modifyString(str.token)}"`,
10999
11215
  $loc
11000
11216
  };
@@ -11002,6 +11218,7 @@ ${input.slice(result.pos)}
11002
11218
  var StringLiteral$1 = $TS($S(SingleQuote, SingleStringCharacters, SingleQuote), function($skip, $loc, $0, $1, $2, $3) {
11003
11219
  var str = $2;
11004
11220
  return {
11221
+ type: "StringLiteral",
11005
11222
  token: `'${module2.modifyString(str.token)}'`,
11006
11223
  $loc
11007
11224
  };
@@ -11128,7 +11345,7 @@ ${input.slice(result.pos)}
11128
11345
  return result;
11129
11346
  }
11130
11347
  }
11131
- var CoffeeStringSubstitution$0 = $S(CoffeeSubstitutionStart, ExtendedExpression, __, CloseBrace);
11348
+ var CoffeeStringSubstitution$0 = $S(CoffeeSubstitutionStart, PostfixedExpression, __, CloseBrace);
11132
11349
  function CoffeeStringSubstitution(state) {
11133
11350
  let eventData;
11134
11351
  if (state.events) {
@@ -11568,7 +11785,7 @@ ${input.slice(result.pos)}
11568
11785
  return result;
11569
11786
  }
11570
11787
  }
11571
- var TemplateSubstitution$0 = $S(SubstitutionStart, ExtendedExpression, __, CloseBrace);
11788
+ var TemplateSubstitution$0 = $S(SubstitutionStart, PostfixedExpression, __, CloseBrace);
11572
11789
  function TemplateSubstitution(state) {
11573
11790
  let eventData;
11574
11791
  if (state.events) {
@@ -11765,7 +11982,7 @@ ${input.slice(result.pos)}
11765
11982
  return result;
11766
11983
  }
11767
11984
  }
11768
- 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) {
11985
+ 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) {
11769
11986
  return { $loc, token: $1 };
11770
11987
  });
11771
11988
  function JSMultiLineComment(state) {
@@ -11864,7 +12081,7 @@ ${input.slice(result.pos)}
11864
12081
  return result;
11865
12082
  }
11866
12083
  }
11867
- 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) {
12084
+ 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) {
11868
12085
  return { $loc, token: $1 };
11869
12086
  });
11870
12087
  function InlineComment(state) {
@@ -11963,7 +12180,7 @@ ${input.slice(result.pos)}
11963
12180
  var NonNewlineWhitespace$0 = $TR($EXPECT($R45, fail, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11964
12181
  return { $loc, token: $0 };
11965
12182
  });
11966
- var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L92, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
12183
+ var NonNewlineWhitespace$1 = $T($S(CoffeeLineContinuationEnabled, $EXPECT($L91, fail, 'NonNewlineWhitespace "\\\\\\\\"'), EOL), function(value) {
11967
12184
  return "";
11968
12185
  });
11969
12186
  function NonNewlineWhitespace(state) {
@@ -12115,7 +12332,7 @@ ${input.slice(result.pos)}
12115
12332
  }
12116
12333
  }
12117
12334
  var StatementDelimiter$0 = SemicolonDelimiter;
12118
- 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);
12335
+ 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);
12119
12336
  var StatementDelimiter$2 = $Y(EOS);
12120
12337
  function StatementDelimiter(state) {
12121
12338
  let eventData;
@@ -12215,7 +12432,7 @@ ${input.slice(result.pos)}
12215
12432
  return result;
12216
12433
  }
12217
12434
  }
12218
- var Abstract$0 = $TV($TEXT($S($EXPECT($L95, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L8, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
12435
+ var Abstract$0 = $TV($TEXT($S($EXPECT($L94, fail, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L8, fail, 'Abstract " "')))), function($skip, $loc, $0, $1) {
12219
12436
  return { $loc, token: $1, ts: true };
12220
12437
  });
12221
12438
  function Abstract(state) {
@@ -12265,7 +12482,7 @@ ${input.slice(result.pos)}
12265
12482
  return result;
12266
12483
  }
12267
12484
  }
12268
- var As$0 = $TS($S($EXPECT($L96, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12485
+ var As$0 = $TS($S($EXPECT($L95, fail, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12269
12486
  return { $loc, token: $1 };
12270
12487
  });
12271
12488
  function As(state) {
@@ -12290,7 +12507,7 @@ ${input.slice(result.pos)}
12290
12507
  return result;
12291
12508
  }
12292
12509
  }
12293
- var At$0 = $TV($EXPECT($L97, fail, 'At "@"'), function($skip, $loc, $0, $1) {
12510
+ var At$0 = $TV($EXPECT($L96, fail, 'At "@"'), function($skip, $loc, $0, $1) {
12294
12511
  return { $loc, token: $1 };
12295
12512
  });
12296
12513
  function At(state) {
@@ -12315,7 +12532,7 @@ ${input.slice(result.pos)}
12315
12532
  return result;
12316
12533
  }
12317
12534
  }
12318
- var AtAt$0 = $TV($EXPECT($L98, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
12535
+ var AtAt$0 = $TV($EXPECT($L97, fail, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
12319
12536
  return { $loc, token: "@" };
12320
12537
  });
12321
12538
  function AtAt(state) {
@@ -12340,7 +12557,7 @@ ${input.slice(result.pos)}
12340
12557
  return result;
12341
12558
  }
12342
12559
  }
12343
- var Async$0 = $TS($S($EXPECT($L99, fail, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12560
+ var Async$0 = $TS($S($EXPECT($L98, fail, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12344
12561
  return { $loc, token: $1, type: "Async" };
12345
12562
  });
12346
12563
  function Async(state) {
@@ -12365,7 +12582,7 @@ ${input.slice(result.pos)}
12365
12582
  return result;
12366
12583
  }
12367
12584
  }
12368
- var Await$0 = $TS($S($EXPECT($L100, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12585
+ var Await$0 = $TS($S($EXPECT($L99, fail, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12369
12586
  return { $loc, token: $1 };
12370
12587
  });
12371
12588
  function Await(state) {
@@ -12390,7 +12607,7 @@ ${input.slice(result.pos)}
12390
12607
  return result;
12391
12608
  }
12392
12609
  }
12393
- var Backtick$0 = $TV($EXPECT($L94, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
12610
+ var Backtick$0 = $TV($EXPECT($L93, fail, 'Backtick "`"'), function($skip, $loc, $0, $1) {
12394
12611
  return { $loc, token: $1 };
12395
12612
  });
12396
12613
  function Backtick(state) {
@@ -12415,7 +12632,7 @@ ${input.slice(result.pos)}
12415
12632
  return result;
12416
12633
  }
12417
12634
  }
12418
- var By$0 = $TS($S($EXPECT($L101, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12635
+ var By$0 = $TS($S($EXPECT($L100, fail, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12419
12636
  return { $loc, token: $1 };
12420
12637
  });
12421
12638
  function By(state) {
@@ -12440,7 +12657,7 @@ ${input.slice(result.pos)}
12440
12657
  return result;
12441
12658
  }
12442
12659
  }
12443
- var Case$0 = $TS($S($EXPECT($L102, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12660
+ var Case$0 = $TS($S($EXPECT($L101, fail, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12444
12661
  return { $loc, token: $1 };
12445
12662
  });
12446
12663
  function Case(state) {
@@ -12465,7 +12682,7 @@ ${input.slice(result.pos)}
12465
12682
  return result;
12466
12683
  }
12467
12684
  }
12468
- var Catch$0 = $TS($S($EXPECT($L103, fail, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12685
+ var Catch$0 = $TS($S($EXPECT($L102, fail, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12469
12686
  return { $loc, token: $1 };
12470
12687
  });
12471
12688
  function Catch(state) {
@@ -12490,7 +12707,7 @@ ${input.slice(result.pos)}
12490
12707
  return result;
12491
12708
  }
12492
12709
  }
12493
- var Class$0 = $TS($S($EXPECT($L104, fail, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12710
+ var Class$0 = $TS($S($EXPECT($L103, fail, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12494
12711
  return { $loc, token: $1 };
12495
12712
  });
12496
12713
  function Class(state) {
@@ -12590,7 +12807,7 @@ ${input.slice(result.pos)}
12590
12807
  return result;
12591
12808
  }
12592
12809
  }
12593
- var CoffeeSubstitutionStart$0 = $TV($EXPECT($L105, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
12810
+ var CoffeeSubstitutionStart$0 = $TV($EXPECT($L104, fail, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
12594
12811
  return { $loc, token: "${" };
12595
12812
  });
12596
12813
  function CoffeeSubstitutionStart(state) {
@@ -12640,7 +12857,7 @@ ${input.slice(result.pos)}
12640
12857
  return result;
12641
12858
  }
12642
12859
  }
12643
- var Comma$0 = $TV($EXPECT($L106, fail, 'Comma ","'), function($skip, $loc, $0, $1) {
12860
+ var Comma$0 = $TV($EXPECT($L105, fail, 'Comma ","'), function($skip, $loc, $0, $1) {
12644
12861
  return { $loc, token: $1 };
12645
12862
  });
12646
12863
  function Comma(state) {
@@ -12665,7 +12882,7 @@ ${input.slice(result.pos)}
12665
12882
  return result;
12666
12883
  }
12667
12884
  }
12668
- var ConstructorShorthand$0 = $TV($EXPECT($L97, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
12885
+ var ConstructorShorthand$0 = $TV($EXPECT($L96, fail, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
12669
12886
  return { $loc, token: "constructor" };
12670
12887
  });
12671
12888
  function ConstructorShorthand(state) {
@@ -12690,7 +12907,7 @@ ${input.slice(result.pos)}
12690
12907
  return result;
12691
12908
  }
12692
12909
  }
12693
- var Declare$0 = $TS($S($EXPECT($L107, fail, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12910
+ var Declare$0 = $TS($S($EXPECT($L106, fail, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12694
12911
  return { $loc, token: $1 };
12695
12912
  });
12696
12913
  function Declare(state) {
@@ -12715,7 +12932,7 @@ ${input.slice(result.pos)}
12715
12932
  return result;
12716
12933
  }
12717
12934
  }
12718
- var Default$0 = $TS($S($EXPECT($L108, fail, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12935
+ var Default$0 = $TS($S($EXPECT($L107, fail, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12719
12936
  return { $loc, token: $1 };
12720
12937
  });
12721
12938
  function Default(state) {
@@ -12740,7 +12957,7 @@ ${input.slice(result.pos)}
12740
12957
  return result;
12741
12958
  }
12742
12959
  }
12743
- var Delete$0 = $TS($S($EXPECT($L109, fail, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12960
+ var Delete$0 = $TS($S($EXPECT($L108, fail, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12744
12961
  return { $loc, token: $1 };
12745
12962
  });
12746
12963
  function Delete(state) {
@@ -12765,7 +12982,7 @@ ${input.slice(result.pos)}
12765
12982
  return result;
12766
12983
  }
12767
12984
  }
12768
- var Do$0 = $TS($S($EXPECT($L110, fail, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12985
+ var Do$0 = $TS($S($EXPECT($L109, fail, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12769
12986
  return { $loc, token: $1 };
12770
12987
  });
12771
12988
  function Do(state) {
@@ -12815,7 +13032,7 @@ ${input.slice(result.pos)}
12815
13032
  return result;
12816
13033
  }
12817
13034
  }
12818
- var DotDot$0 = $TV($EXPECT($L111, fail, 'DotDot ".."'), function($skip, $loc, $0, $1) {
13035
+ var DotDot$0 = $TV($EXPECT($L110, fail, 'DotDot ".."'), function($skip, $loc, $0, $1) {
12819
13036
  return { $loc, token: $1 };
12820
13037
  });
12821
13038
  function DotDot(state) {
@@ -12840,7 +13057,7 @@ ${input.slice(result.pos)}
12840
13057
  return result;
12841
13058
  }
12842
13059
  }
12843
- var DotDotDot$0 = $TV($EXPECT($L112, fail, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
13060
+ var DotDotDot$0 = $TV($EXPECT($L111, fail, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
12844
13061
  return { $loc, token: $1 };
12845
13062
  });
12846
13063
  function DotDotDot(state) {
@@ -12865,7 +13082,7 @@ ${input.slice(result.pos)}
12865
13082
  return result;
12866
13083
  }
12867
13084
  }
12868
- var DoubleColon$0 = $TV($EXPECT($L113, fail, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
13085
+ var DoubleColon$0 = $TV($EXPECT($L112, fail, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
12869
13086
  return { $loc, token: $1 };
12870
13087
  });
12871
13088
  function DoubleColon(state) {
@@ -12890,7 +13107,7 @@ ${input.slice(result.pos)}
12890
13107
  return result;
12891
13108
  }
12892
13109
  }
12893
- var DoubleQuote$0 = $TV($EXPECT($L114, fail, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
13110
+ var DoubleQuote$0 = $TV($EXPECT($L113, fail, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
12894
13111
  return { $loc, token: $1 };
12895
13112
  });
12896
13113
  function DoubleQuote(state) {
@@ -12915,7 +13132,7 @@ ${input.slice(result.pos)}
12915
13132
  return result;
12916
13133
  }
12917
13134
  }
12918
- var Else$0 = $TS($S($EXPECT($L115, fail, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13135
+ var Else$0 = $TS($S($EXPECT($L114, fail, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12919
13136
  return { $loc, token: $1 };
12920
13137
  });
12921
13138
  function Else(state) {
@@ -12965,7 +13182,7 @@ ${input.slice(result.pos)}
12965
13182
  return result;
12966
13183
  }
12967
13184
  }
12968
- var Export$0 = $TS($S($EXPECT($L116, fail, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13185
+ var Export$0 = $TS($S($EXPECT($L115, fail, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12969
13186
  return { $loc, token: $1 };
12970
13187
  });
12971
13188
  function Export(state) {
@@ -12990,7 +13207,7 @@ ${input.slice(result.pos)}
12990
13207
  return result;
12991
13208
  }
12992
13209
  }
12993
- var Extends$0 = $TS($S($EXPECT($L117, fail, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13210
+ var Extends$0 = $TS($S($EXPECT($L116, fail, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12994
13211
  return { $loc, token: $1 };
12995
13212
  });
12996
13213
  function Extends(state) {
@@ -13015,6 +13232,31 @@ ${input.slice(result.pos)}
13015
13232
  return result;
13016
13233
  }
13017
13234
  }
13235
+ var Finally$0 = $TS($S($EXPECT($L117, fail, 'Finally "finally"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13236
+ return { $loc, token: $1 };
13237
+ });
13238
+ function Finally(state) {
13239
+ let eventData;
13240
+ if (state.events) {
13241
+ const result = state.events.enter?.("Finally", state);
13242
+ if (result) {
13243
+ if (result.cache)
13244
+ return result.cache;
13245
+ eventData = result.data;
13246
+ }
13247
+ }
13248
+ if (state.tokenize) {
13249
+ const result = $TOKEN("Finally", state, Finally$0(state));
13250
+ if (state.events)
13251
+ state.events.exit?.("Finally", state, result, eventData);
13252
+ return result;
13253
+ } else {
13254
+ const result = Finally$0(state);
13255
+ if (state.events)
13256
+ state.events.exit?.("Finally", state, result, eventData);
13257
+ return result;
13258
+ }
13259
+ }
13018
13260
  var For$0 = $TS($S($EXPECT($L118, fail, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13019
13261
  return { $loc, token: $1 };
13020
13262
  });
@@ -13365,7 +13607,7 @@ ${input.slice(result.pos)}
13365
13607
  return result;
13366
13608
  }
13367
13609
  }
13368
- var OpenBracket$0 = $TV($EXPECT($L93, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
13610
+ var OpenBracket$0 = $TV($EXPECT($L92, fail, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
13369
13611
  return { $loc, token: $1 };
13370
13612
  });
13371
13613
  function OpenBracket(state) {
@@ -13718,7 +13960,7 @@ ${input.slice(result.pos)}
13718
13960
  var Static$0 = $TS($S($EXPECT($L139, fail, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13719
13961
  return { $loc, token: $1 };
13720
13962
  });
13721
- 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) {
13963
+ 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) {
13722
13964
  return { $loc, token: "static " };
13723
13965
  });
13724
13966
  function Static(state) {
@@ -14858,7 +15100,7 @@ ${input.slice(result.pos)}
14858
15100
  return ["{", $1, "}"];
14859
15101
  });
14860
15102
  var JSXShorthandString$2 = StringLiteral;
14861
- var JSXShorthandString$3 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
15103
+ var JSXShorthandString$3 = $S(OpenBrace, PostfixedExpression, $E(Whitespace), CloseBrace);
14862
15104
  function JSXShorthandString(state) {
14863
15105
  let eventData;
14864
15106
  if (state.events) {
@@ -14928,7 +15170,7 @@ ${input.slice(result.pos)}
14928
15170
  return result;
14929
15171
  }
14930
15172
  }
14931
- var JSXAttributeValue$0 = $S(OpenBrace, ExtendedExpression, $E(Whitespace), CloseBrace);
15173
+ var JSXAttributeValue$0 = $S(OpenBrace, PostfixedExpression, $E(Whitespace), CloseBrace);
14932
15174
  var JSXAttributeValue$1 = JSXElement;
14933
15175
  var JSXAttributeValue$2 = JSXFragment;
14934
15176
  var JSXAttributeValue$3 = $TS($S(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3) {
@@ -15119,7 +15361,7 @@ ${input.slice(result.pos)}
15119
15361
  }
15120
15362
  }
15121
15363
  var InlineJSXCallExpression$0 = $S($EXPECT($L12, fail, 'InlineJSXCallExpression "super"'), ExplicitArguments);
15122
- var InlineJSXCallExpression$1 = $S($EXPECT($L13, fail, 'InlineJSXCallExpression "import"'), OpenParen, ExtendedExpression, __, CloseParen);
15364
+ var InlineJSXCallExpression$1 = $S($EXPECT($L13, fail, 'InlineJSXCallExpression "import"'), OpenParen, PostfixedExpression, __, CloseParen);
15123
15365
  var InlineJSXCallExpression$2 = $TS($S(InlineJSXMemberExpression, $Q(InlineJSXCallExpressionRest)), function($skip, $loc, $0, $1, $2) {
15124
15366
  if ($2.length)
15125
15367
  return $0;
@@ -15541,7 +15783,7 @@ ${input.slice(result.pos)}
15541
15783
  return result;
15542
15784
  }
15543
15785
  }
15544
- var JSXChildExpression$0 = $S($E(Whitespace), $E($S(DotDotDot, $E(Whitespace))), ExtendedExpression);
15786
+ var JSXChildExpression$0 = $S($E(Whitespace), $E($S(DotDotDot, $E(Whitespace))), PostfixedExpression);
15545
15787
  function JSXChildExpression(state) {
15546
15788
  let eventData;
15547
15789
  if (state.events) {
@@ -16486,7 +16728,7 @@ ${input.slice(result.pos)}
16486
16728
  return result;
16487
16729
  }
16488
16730
  }
16489
- 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) {
16731
+ 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) {
16490
16732
  if ($2)
16491
16733
  return $0;
16492
16734
  return $1;
@@ -16645,7 +16887,7 @@ ${input.slice(result.pos)}
16645
16887
  return result;
16646
16888
  }
16647
16889
  }
16648
- var FunctionType$0 = $TS($S(Parameters, __, $EXPECT($L7, fail, 'FunctionType "=>"'), $E(Type)), function($skip, $loc, $0, $1, $2, $3, $4) {
16890
+ var FunctionType$0 = $TS($S(Parameters, __, TypeArrowFunction, $E(Type)), function($skip, $loc, $0, $1, $2, $3, $4) {
16649
16891
  var type = $4;
16650
16892
  if (type) {
16651
16893
  return $0;
@@ -16674,6 +16916,34 @@ ${input.slice(result.pos)}
16674
16916
  return result;
16675
16917
  }
16676
16918
  }
16919
+ var TypeArrowFunction$0 = $TV($EXPECT($L7, fail, 'TypeArrowFunction "=>"'), function($skip, $loc, $0, $1) {
16920
+ return { $loc, token: "=>" };
16921
+ });
16922
+ var TypeArrowFunction$1 = $TV($EXPECT($L20, fail, 'TypeArrowFunction "->"'), function($skip, $loc, $0, $1) {
16923
+ return { $loc, token: "=>" };
16924
+ });
16925
+ function TypeArrowFunction(state) {
16926
+ let eventData;
16927
+ if (state.events) {
16928
+ const result = state.events.enter?.("TypeArrowFunction", state);
16929
+ if (result) {
16930
+ if (result.cache)
16931
+ return result.cache;
16932
+ eventData = result.data;
16933
+ }
16934
+ }
16935
+ if (state.tokenize) {
16936
+ const result = $TOKEN("TypeArrowFunction", state, TypeArrowFunction$0(state) || TypeArrowFunction$1(state));
16937
+ if (state.events)
16938
+ state.events.exit?.("TypeArrowFunction", state, result, eventData);
16939
+ return result;
16940
+ } else {
16941
+ const result = TypeArrowFunction$0(state) || TypeArrowFunction$1(state);
16942
+ if (state.events)
16943
+ state.events.exit?.("TypeArrowFunction", state, result, eventData);
16944
+ return result;
16945
+ }
16946
+ }
16677
16947
  var TypeArguments$0 = $TS($S($EXPECT($L128, fail, 'TypeArguments "<"'), $P(TypeArgument), __, $EXPECT($L29, fail, 'TypeArguments ">"')), function($skip, $loc, $0, $1, $2, $3, $4) {
16678
16948
  return { ts: true, children: $0 };
16679
16949
  });
@@ -16799,7 +17069,7 @@ ${input.slice(result.pos)}
16799
17069
  return result;
16800
17070
  }
16801
17071
  }
16802
- var TypeConstraint$0 = $S(__, $EXPECT($L117, fail, 'TypeConstraint "extends"'), NonIdContinue, Type);
17072
+ var TypeConstraint$0 = $S(__, $EXPECT($L116, fail, 'TypeConstraint "extends"'), NonIdContinue, Type);
16803
17073
  function TypeConstraint(state) {
16804
17074
  let eventData;
16805
17075
  if (state.events) {
@@ -18330,10 +18600,11 @@ ${input.slice(result.pos)}
18330
18600
  children.push(block);
18331
18601
  if (!module2.isWhitespaceOrEmpty(ws))
18332
18602
  children.push(ws);
18333
- return Object.assign({}, post, {
18334
- children,
18335
- block
18336
- });
18603
+ post = { ...post, children, block };
18604
+ if (post.type === "IfStatement") {
18605
+ post.then = block;
18606
+ }
18607
+ return post;
18337
18608
  };
18338
18609
  function expressionizeIteration(exp) {
18339
18610
  const resultsRef = {
@@ -18406,9 +18677,9 @@ ${input.slice(result.pos)}
18406
18677
  insertPush(exp.expressions[exp.expressions.length - 1], ref);
18407
18678
  return;
18408
18679
  case "IfStatement":
18409
- insertPush(exp.children[2], ref);
18410
- if (exp.children[3])
18411
- insertPush(exp.children[3][2], ref);
18680
+ insertPush(exp.then, ref);
18681
+ if (exp.else)
18682
+ insertPush(exp.else[2], ref);
18412
18683
  else
18413
18684
  exp.children.push([" else {\n", indent, ref, ".push(undefined)\n", indent, "}"]);
18414
18685
  return;
@@ -18464,7 +18735,9 @@ ${input.slice(result.pos)}
18464
18735
  }
18465
18736
  if (!Array.isArray(node))
18466
18737
  return;
18467
- const [, exp] = node;
18738
+ const [, exp, semi] = node;
18739
+ if (semi?.type === "SemicolonDelimiter")
18740
+ return;
18468
18741
  let indent = node[0];
18469
18742
  if (Array.isArray(indent))
18470
18743
  indent = indent[indent.length - 1];
@@ -18487,9 +18760,9 @@ ${input.slice(result.pos)}
18487
18760
  insertReturn(exp.expressions[exp.expressions.length - 1]);
18488
18761
  return;
18489
18762
  case "IfStatement":
18490
- insertReturn(exp.children[2]);
18491
- if (exp.children[3])
18492
- insertReturn(exp.children[3][2]);
18763
+ insertReturn(exp.then);
18764
+ if (exp.else)
18765
+ insertReturn(exp.else[2]);
18493
18766
  else
18494
18767
  exp.children.push(["\n", indent, wrapWithReturn()]);
18495
18768
  return;
@@ -18550,6 +18823,14 @@ ${input.slice(result.pos)}
18550
18823
  const op = expandedOps[i];
18551
18824
  if (op.special) {
18552
18825
  let [a, wsOp, op2, wsB, b] = expandedOps.slice(i - 2, i + 3);
18826
+ if (op2.token === "instanceof" && b.type === "Literal" && b.children?.[0]?.type === "StringLiteral") {
18827
+ a = ["typeof ", module2.makeLeftHandSideExpression(a)];
18828
+ if (op2.negated) {
18829
+ op2 = { ...op2, token: "!==", negated: false };
18830
+ } else {
18831
+ op2 = { ...op2, token: "===" };
18832
+ }
18833
+ }
18553
18834
  if (op2.asConst) {
18554
18835
  a = module2.makeAsConst(a);
18555
18836
  b = module2.makeAsConst(b);
@@ -18590,7 +18871,7 @@ ${input.slice(result.pos)}
18590
18871
  return expandedOps;
18591
18872
  };
18592
18873
  module2.expandChainedComparisons = function([first, binops]) {
18593
- const relationalOps = ["==", "===", "!=", "!==", "<", "<=", ">", ">=", "in", "instanceof"];
18874
+ const relationalOps = ["==", "===", "!=", "!==", "<", "<=", ">", ">=", "in"];
18594
18875
  const lowerPrecedenceOps = ["??", "&&", "||", "&", "|", "^"];
18595
18876
  let results = [];
18596
18877
  let i = 0;
@@ -19151,7 +19432,7 @@ ${input.slice(result.pos)}
19151
19432
  break;
19152
19433
  case "Literal":
19153
19434
  case "StringLiteral":
19154
- case void 0:
19435
+ case "NumericLiteral":
19155
19436
  conditions.push([name, " in ", ref]);
19156
19437
  subRef = [ref, "[", name, "]"];
19157
19438
  break;
@@ -19214,7 +19495,8 @@ ${input.slice(result.pos)}
19214
19495
  switch (name.type) {
19215
19496
  case "ComputedPropertyName":
19216
19497
  case "Literal":
19217
- case void 0:
19498
+ case "StringLiteral":
19499
+ case "NumericLiteral":
19218
19500
  return {
19219
19501
  ...p,
19220
19502
  children: [ws, name, ": ", match, sep]
@@ -19337,7 +19619,9 @@ ${input.slice(result.pos)}
19337
19619
  const e = i < l - 1 ? ["\nelse "] : [];
19338
19620
  prev.push({
19339
19621
  type: "IfStatement",
19340
- children: ["if", condition, block, ...e, next]
19622
+ children: ["if", condition, block, ...e, next],
19623
+ then: block,
19624
+ else: e
19341
19625
  });
19342
19626
  prev = next;
19343
19627
  });
@@ -20254,7 +20538,7 @@ var parse;
20254
20538
  var uncacheable;
20255
20539
  ({ parse } = import_parser.default);
20256
20540
  ({ SourceMap: SourceMap2, base64Encode: base64Encode2 } = util_exports);
20257
- 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"]);
20541
+ 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"]);
20258
20542
  var compile = function(src, options) {
20259
20543
  var ast, code, events, filename, ref, result, sm, srcMapJSON;
20260
20544
  if (!options) {