@danielx/civet 0.6.18 → 0.6.20

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
@@ -156,15 +156,8 @@ var require_lib = __commonJS({
156
156
  }
157
157
  }
158
158
  function arrayElementHasTrailingComma(elementNode) {
159
- const { children } = elementNode, { length } = children;
160
- const lastChild = children[length - 1];
161
- if (lastChild) {
162
- const l2 = lastChild.length;
163
- if (lastChild[l2 - 1]?.token === ",") {
164
- return true;
165
- }
166
- }
167
- return false;
159
+ const lastChild = elementNode.children.at(-1);
160
+ return lastChild && lastChild[lastChild.length - 1]?.token === ",";
168
161
  }
169
162
  var assert = {
170
163
  equal(a, b, msg) {
@@ -591,7 +584,15 @@ var require_lib = __commonJS({
591
584
  case "EmptyStatement":
592
585
  case "ReturnStatement":
593
586
  case "ThrowStatement":
587
+ return;
594
588
  case "Declaration":
589
+ exp.children.push(["", [
590
+ ";",
591
+ ref,
592
+ ".push(",
593
+ patternAsValue(exp.bindings.at(-1).pattern),
594
+ ")"
595
+ ]]);
595
596
  return;
596
597
  case "ForStatement":
597
598
  case "IterationStatement":
@@ -844,6 +845,39 @@ var require_lib = __commonJS({
844
845
  const indent = expressions[index][0];
845
846
  expressions.splice(index, 0, [indent, dec, ";"]);
846
847
  }
848
+ function patternAsValue(pattern) {
849
+ switch (pattern.type) {
850
+ case "ArrayBindingPattern": {
851
+ const children = [...pattern.children];
852
+ const index = children.indexOf(pattern.elements);
853
+ if (index < 0)
854
+ throw new Error("failed to find elements in ArrayBindingPattern");
855
+ children[index] = pattern.elements.map((el) => {
856
+ const [ws, e, delim] = el.children;
857
+ return { ...el, children: [ws, patternAsValue(e), delim] };
858
+ });
859
+ return { ...pattern, children };
860
+ }
861
+ case "ObjectBindingPattern": {
862
+ const children = [...pattern.children];
863
+ const index = children.indexOf(pattern.properties);
864
+ if (index < 0)
865
+ throw new Error("failed to find properties in ArrayBindingPattern");
866
+ children[index] = pattern.properties.map(patternAsValue);
867
+ return { ...pattern, children };
868
+ }
869
+ case "Identifier":
870
+ case "BindingProperty": {
871
+ const children = [pattern.name, pattern.delim];
872
+ if (isWhitespaceOrEmpty(pattern.children[0])) {
873
+ children.unshift(pattern.children[0]);
874
+ }
875
+ return { ...pattern, children };
876
+ }
877
+ default:
878
+ return pattern;
879
+ }
880
+ }
847
881
  function insertReturn(node) {
848
882
  if (!node)
849
883
  return;
@@ -885,7 +919,12 @@ var require_lib = __commonJS({
885
919
  case "EmptyStatement":
886
920
  case "ReturnStatement":
887
921
  case "ThrowStatement":
922
+ return;
888
923
  case "Declaration":
924
+ exp.children.push(["", {
925
+ type: "ReturnStatement",
926
+ children: [";return ", patternAsValue(exp.bindings.at(-1).pattern)]
927
+ }]);
889
928
  return;
890
929
  case "ForStatement":
891
930
  case "IterationStatement":
@@ -1300,72 +1339,59 @@ var require_lib = __commonJS({
1300
1339
  children: [s, parts, e]
1301
1340
  };
1302
1341
  }
1303
- function processConstAssignmentDeclaration(c, id, suffix, ws, ca, e) {
1304
- c = {
1305
- ...c,
1342
+ function processAssignmentDeclaration(decl, id, suffix, ws, assign, e) {
1343
+ decl = {
1344
+ ...decl,
1306
1345
  $loc: {
1307
- pos: ca.$loc.pos - 1,
1308
- length: ca.$loc.length + 1
1346
+ pos: assign.$loc.pos - 1,
1347
+ length: assign.$loc.length + 1
1309
1348
  }
1310
1349
  };
1311
- let exp;
1312
- if (e.type === "FunctionExpression") {
1313
- exp = e;
1314
- } else {
1315
- exp = e[1];
1316
- }
1317
- if (exp?.children?.[0]?.token?.match(/^\s+$/))
1318
- exp.children.shift();
1319
- if (id.type === "Identifier" && exp?.type === "FunctionExpression" && !exp.id) {
1320
- const i = exp.children.findIndex((c2) => c2?.token === "function") + 1;
1321
- exp = {
1322
- ...exp,
1323
- children: [...exp.children.slice(0, i), " ", id, suffix, ws, ...exp.children.slice(i)]
1324
- };
1325
- return {
1326
- type: "Declaration",
1327
- children: [exp],
1328
- names: id.names
1329
- };
1350
+ if (decl.token.startsWith("const")) {
1351
+ let exp;
1352
+ if (e.type === "FunctionExpression") {
1353
+ exp = e;
1354
+ } else {
1355
+ exp = e[1];
1356
+ }
1357
+ if (exp?.children?.[0]?.token?.match(/^\s+$/))
1358
+ exp.children.shift();
1359
+ if (id.type === "Identifier" && exp?.type === "FunctionExpression" && !exp.id) {
1360
+ const i = exp.children.findIndex((c) => c?.token === "function") + 1;
1361
+ exp = {
1362
+ ...exp,
1363
+ children: [...exp.children.slice(0, i), " ", id, suffix, ws, ...exp.children.slice(i)]
1364
+ };
1365
+ return {
1366
+ type: "Declaration",
1367
+ decl,
1368
+ children: [exp],
1369
+ names: id.names
1370
+ };
1371
+ }
1330
1372
  }
1331
1373
  let [splices, thisAssignments] = gatherBindingCode(id);
1332
1374
  splices = splices.map((s) => [", ", s]);
1333
1375
  thisAssignments = thisAssignments.map((a) => ["", a, ";"]);
1334
- const binding = [c, id, suffix, ...ws];
1335
- const initializer = [ca, e];
1336
- const children = [binding, initializer];
1337
- return {
1338
- type: "Declaration",
1339
- names: id.names,
1340
- children,
1341
- binding,
1376
+ const initializer = [ws, assign, e];
1377
+ const binding = {
1378
+ type: "Binding",
1379
+ pattern: id,
1342
1380
  initializer,
1343
1381
  splices,
1344
- thisAssignments
1345
- };
1346
- }
1347
- function processLetAssignmentDeclaration(l, id, suffix, ws, la, e) {
1348
- l = {
1349
- ...l,
1350
- $loc: {
1351
- pos: la.$loc.pos - 1,
1352
- length: la.$loc.length + 1
1353
- }
1382
+ suffix,
1383
+ thisAssignments,
1384
+ children: [id, suffix, initializer]
1354
1385
  };
1355
- let [splices, thisAssignments] = gatherBindingCode(id);
1356
- splices = splices.map((s) => [", ", s]);
1357
- thisAssignments = thisAssignments.map((a) => ["", a, ";"]);
1358
- const binding = [l, id, suffix, ...ws];
1359
- const initializer = [la, e];
1360
- const children = [binding, initializer];
1386
+ const children = [decl, binding];
1361
1387
  return {
1362
1388
  type: "Declaration",
1363
1389
  names: id.names,
1364
- children,
1365
- binding,
1366
- initializer,
1390
+ decl,
1391
+ bindings: [binding],
1367
1392
  splices,
1368
- thisAssignments
1393
+ thisAssignments,
1394
+ children
1369
1395
  };
1370
1396
  }
1371
1397
  function implicitFunctionBlock(f) {
@@ -1576,9 +1602,9 @@ var require_lib = __commonJS({
1576
1602
  const subRef = [ref, "[", i.toString(), "]"];
1577
1603
  getPatternConditions(e, subRef, conditions);
1578
1604
  });
1579
- const postRest = pattern.children.find((c) => c?.blockPrefix);
1580
- if (postRest) {
1581
- const postElements = postRest.blockPrefix.children[1], { length: postLength } = postElements;
1605
+ const { blockPrefix } = pattern;
1606
+ if (blockPrefix) {
1607
+ const postElements = blockPrefix.children[1], { length: postLength } = postElements;
1582
1608
  postElements.forEach(({ children: [, e] }, i) => {
1583
1609
  const subRef = [ref, "[", ref, ".length - ", (postLength + i).toString(), "]"];
1584
1610
  getPatternConditions(e, subRef, conditions);
@@ -1665,15 +1691,15 @@ var require_lib = __commonJS({
1665
1691
  if (el.type === "BindingRestElement") {
1666
1692
  return ["", el, void 0];
1667
1693
  }
1668
- const { children: [ws, e, sep] } = el;
1694
+ const { children: [ws, e, delim] } = el;
1669
1695
  switch (e.type) {
1670
1696
  case "Literal":
1671
1697
  case "RegularExpressionLiteral":
1672
1698
  case "StringLiteral":
1673
1699
  case "PinPattern":
1674
- return sep;
1700
+ return delim;
1675
1701
  default:
1676
- return [ws, nonMatcherBindings(e), sep];
1702
+ return [ws, nonMatcherBindings(e), delim];
1677
1703
  }
1678
1704
  });
1679
1705
  }
@@ -1683,13 +1709,12 @@ var require_lib = __commonJS({
1683
1709
  case "BindingProperty": {
1684
1710
  const { children, name, value } = p;
1685
1711
  const [ws] = children;
1686
- const sep = children[children.length - 1];
1687
1712
  switch (value && value.type) {
1688
1713
  case "ArrayBindingPattern":
1689
1714
  case "ObjectBindingPattern":
1690
1715
  return {
1691
1716
  ...p,
1692
- children: [ws, name, ": ", nonMatcherBindings(value)]
1717
+ children: [ws, name, ": ", nonMatcherBindings(value), p.delim]
1693
1718
  };
1694
1719
  case "Identifier":
1695
1720
  return p;
@@ -1699,7 +1724,7 @@ var require_lib = __commonJS({
1699
1724
  default:
1700
1725
  return {
1701
1726
  ...p,
1702
- children: [ws, name, sep]
1727
+ children: [ws, name, p.delim]
1703
1728
  };
1704
1729
  }
1705
1730
  }
@@ -2039,10 +2064,11 @@ var require_lib = __commonJS({
2039
2064
  });
2040
2065
  }
2041
2066
  function processProgram(root, config, m, ReservedWord) {
2067
+ assert.equal(m.forbidBracedApplication.length, 1, "forbidBracedApplication");
2042
2068
  assert.equal(m.forbidClassImplicitCall.length, 1, "forbidClassImplicitCall");
2043
2069
  assert.equal(m.forbidIndentedApplication.length, 1, "forbidIndentedApplication");
2070
+ assert.equal(m.forbidNewlineBinaryOp.length, 1, "forbidNewlineBinaryOp");
2044
2071
  assert.equal(m.forbidTrailingMemberProperty.length, 1, "forbidTrailingMemberProperty");
2045
- assert.equal(m.forbidMultiLineImplicitObjectLiteral.length, 1, "forbidMultiLineImplicitObjectLiteral");
2046
2072
  assert.equal(m.JSXTagStack.length, 0, "JSXTagStack should be empty");
2047
2073
  addParentPointers(root);
2048
2074
  const { expressions: statements } = root;
@@ -2369,9 +2395,20 @@ var require_lib = __commonJS({
2369
2395
  let rest = props[restIndex];
2370
2396
  props = props.slice(0, restIndex);
2371
2397
  if (after.length) {
2372
- const [restDelim] = rest.children.slice(-1), lastAfterProp = after[after.length - 1], lastAfterChildren = lastAfterProp.children, [lastDelim] = lastAfterChildren.slice(-1);
2373
- rest = { ...rest, children: [...rest.children.slice(0, -1), lastDelim] };
2374
- after = [...after.slice(0, -1), { ...lastAfterProp, children: [...lastAfterChildren.slice(0, -1), restDelim] }];
2398
+ const { delim: restDelim } = rest, lastAfterProp = after[after.length - 1], { delim: lastDelim, children: lastAfterChildren } = lastAfterProp;
2399
+ rest = {
2400
+ ...rest,
2401
+ delim: lastDelim,
2402
+ children: [...rest.children.slice(0, -1), lastDelim]
2403
+ };
2404
+ after = [
2405
+ ...after.slice(0, -1),
2406
+ {
2407
+ ...lastAfterProp,
2408
+ delim: restDelim,
2409
+ children: [...lastAfterChildren.slice(0, -1), restDelim]
2410
+ }
2411
+ ];
2375
2412
  }
2376
2413
  const children = [...props, ...after, rest];
2377
2414
  return {
@@ -2551,8 +2588,7 @@ var require_lib = __commonJS({
2551
2588
  processBinaryOpExpression,
2552
2589
  processCallMemberExpression,
2553
2590
  processCoffeeInterpolation,
2554
- processConstAssignmentDeclaration,
2555
- processLetAssignmentDeclaration,
2591
+ processAssignmentDeclaration,
2556
2592
  processParams,
2557
2593
  processProgram,
2558
2594
  processReturnValue,
@@ -3093,7 +3129,6 @@ ${input.slice(result.pos)}
3093
3129
  BindingProperty,
3094
3130
  BindingRestProperty,
3095
3131
  NestedBindingElements,
3096
- NestedBindingElement,
3097
3132
  BindingElement,
3098
3133
  BindingRestElement,
3099
3134
  EmptyBindingPattern,
@@ -3157,10 +3192,8 @@ ${input.slice(result.pos)}
3157
3192
  InlineObjectLiteral,
3158
3193
  ImplicitInlineObjectPropertyDelimiter,
3159
3194
  ObjectPropertyDelimiter,
3160
- PropertyDefinitionList,
3161
3195
  PropertyDefinition,
3162
3196
  NamedProperty,
3163
- ImplicitNamedProperty,
3164
3197
  SnugNamedProperty,
3165
3198
  PropertyName,
3166
3199
  ComputedPropertyName,
@@ -3266,10 +3299,6 @@ ${input.slice(result.pos)}
3266
3299
  AllowTrailingMemberProperty,
3267
3300
  RestoreTrailingMemberProperty,
3268
3301
  TrailingMemberPropertyAllowed,
3269
- ForbidMultiLineImplicitObjectLiteral,
3270
- AllowMultiLineImplicitObjectLiteral,
3271
- RestoreMultiLineImplicitObjectLiteral,
3272
- MultiLineImplicitObjectLiteralAllowed,
3273
3302
  AllowNewlineBinaryOp,
3274
3303
  ForbidNewlineBinaryOp,
3275
3304
  RestoreNewlineBinaryOp,
@@ -3315,7 +3344,6 @@ ${input.slice(result.pos)}
3315
3344
  Initializer,
3316
3345
  VariableStatement,
3317
3346
  VariableDeclarationList,
3318
- VariableDeclaration,
3319
3347
  NumericLiteral,
3320
3348
  NumericLiteralKind,
3321
3349
  DecimalBigIntegerLiteral,
@@ -3504,6 +3532,7 @@ ${input.slice(result.pos)}
3504
3532
  NestedJSXChildExpression,
3505
3533
  TypeDeclaration,
3506
3534
  TypeDeclarationRest,
3535
+ OptionalEquals,
3507
3536
  TypeLexicalDeclaration,
3508
3537
  TypeDeclarationBinding,
3509
3538
  InterfaceExtendsClause,
@@ -3592,6 +3621,7 @@ ${input.slice(result.pos)}
3592
3621
  InsertOpenBracket,
3593
3622
  InsertCloseBracket,
3594
3623
  InsertComma,
3624
+ InsertSpaceEquals,
3595
3625
  InsertConst,
3596
3626
  InsertLet,
3597
3627
  InsertReadonly,
@@ -3619,13 +3649,13 @@ ${input.slice(result.pos)}
3619
3649
  Init,
3620
3650
  Indent,
3621
3651
  TrackIndented,
3622
- Samedent,
3623
- IndentedFurther,
3624
- NotDedented,
3625
- Dedented,
3626
3652
  PushIndent,
3627
3653
  PopIndent,
3628
- Nested
3654
+ Nested,
3655
+ IndentedFurther,
3656
+ IndentedAtLeast,
3657
+ NotDedented,
3658
+ Dedented
3629
3659
  });
3630
3660
  var $L0 = $L("");
3631
3661
  var $L1 = $L("{");
@@ -4469,7 +4499,7 @@ ${input.slice(result.pos)}
4469
4499
  return result;
4470
4500
  }
4471
4501
  }
4472
- var TrailingMemberExpressions$0 = $TS($S($Q(MemberExpressionRest), $Q($S($C(Samedent, IndentedFurther), $Y($S($E($EXPECT($L5, fail, 'TrailingMemberExpressions "?"')), $EXPECT($L6, fail, 'TrailingMemberExpressions "."'), $N($EXPECT($R1, fail, "TrailingMemberExpressions /[0-9]/")))), MemberExpressionRest))), function($skip, $loc, $0, $1, $2) {
4502
+ var TrailingMemberExpressions$0 = $TS($S($Q(MemberExpressionRest), $Q($S(IndentedAtLeast, $Y($S($E($EXPECT($L5, fail, 'TrailingMemberExpressions "?"')), $EXPECT($L6, fail, 'TrailingMemberExpressions "."'), $N($EXPECT($R1, fail, "TrailingMemberExpressions /[0-9]/")))), MemberExpressionRest))), function($skip, $loc, $0, $1, $2) {
4473
4503
  return $1.concat($2);
4474
4504
  });
4475
4505
  function TrailingMemberExpressions(state) {
@@ -4520,7 +4550,7 @@ ${input.slice(result.pos)}
4520
4550
  return result;
4521
4551
  }
4522
4552
  }
4523
- var TrailingCallExpressions$0 = $P($S($C(Samedent, IndentedFurther), $Y($S($E($EXPECT($L5, fail, 'TrailingCallExpressions "?"')), $EXPECT($L6, fail, 'TrailingCallExpressions "."'), $N($R$0($EXPECT($R1, fail, "TrailingCallExpressions /[0-9]/"))))), $P(CallExpressionRest)));
4553
+ var TrailingCallExpressions$0 = $P($S(IndentedAtLeast, $Y($S($E($EXPECT($L5, fail, 'TrailingCallExpressions "?"')), $EXPECT($L6, fail, 'TrailingCallExpressions "."'), $N($R$0($EXPECT($R1, fail, "TrailingCallExpressions /[0-9]/"))))), $P(CallExpressionRest)));
4524
4554
  function TrailingCallExpressions(state) {
4525
4555
  let eventData;
4526
4556
  if (state.events) {
@@ -4568,7 +4598,7 @@ ${input.slice(result.pos)}
4568
4598
  return result;
4569
4599
  }
4570
4600
  }
4571
- var CommaDelimiter$0 = $S($E($C(Samedent, IndentedFurther)), $Q(_), Comma);
4601
+ var CommaDelimiter$0 = $S(NotDedented, Comma);
4572
4602
  function CommaDelimiter(state) {
4573
4603
  let eventData;
4574
4604
  if (state.events) {
@@ -7341,7 +7371,7 @@ ${input.slice(result.pos)}
7341
7371
  var c = $3;
7342
7372
  return {
7343
7373
  type: "ObjectBindingPattern",
7344
- children: $0,
7374
+ children: [$1, $2, c.children, $4, $5],
7345
7375
  names: c.names,
7346
7376
  properties: c.children
7347
7377
  };
@@ -7402,6 +7432,7 @@ ${input.slice(result.pos)}
7402
7432
  return props.map(([prop, delim]) => {
7403
7433
  return {
7404
7434
  ...prop,
7435
+ delim,
7405
7436
  children: [...prop.children, delim]
7406
7437
  };
7407
7438
  });
@@ -7431,11 +7462,10 @@ ${input.slice(result.pos)}
7431
7462
  var ArrayBindingPattern$0 = $TS($S($E(_), OpenBracket, ArrayBindingPatternContent, __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7432
7463
  var c = $3;
7433
7464
  return {
7465
+ ...c,
7434
7466
  type: "ArrayBindingPattern",
7435
- children: $0,
7436
- names: c.names,
7437
7467
  elements: c.children,
7438
- length: c.length
7468
+ children: [$1, $2, c.children, $4, $5]
7439
7469
  };
7440
7470
  });
7441
7471
  function ArrayBindingPattern(state) {
@@ -7521,14 +7551,14 @@ ${input.slice(result.pos)}
7521
7551
  }
7522
7552
  }
7523
7553
  var NestedBindingElementList$0 = $TS($S(Nested, BindingElementList), function($skip, $loc, $0, $1, $2) {
7524
- var ws = $1;
7554
+ var indent = $1;
7525
7555
  var elements = $2;
7526
7556
  return elements.map((element, i) => {
7527
7557
  if (i > 0)
7528
7558
  return element;
7529
7559
  return {
7530
7560
  ...element,
7531
- children: [ws, ...element.children]
7561
+ children: [indent, ...element.children.slice(1)]
7532
7562
  };
7533
7563
  });
7534
7564
  });
@@ -7643,13 +7673,13 @@ ${input.slice(result.pos)}
7643
7673
  var BindingProperty$1 = $TS($S($E(_), PropertyName, $E(_), Colon, $E(_), $C(BindingIdentifier, BindingPattern), $E(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
7644
7674
  var name = $2;
7645
7675
  var value = $6;
7646
- var init = $7;
7676
+ var initializer = $7;
7647
7677
  return {
7648
7678
  type: "BindingProperty",
7649
7679
  children: $0,
7650
7680
  name,
7651
7681
  value,
7652
- init,
7682
+ initializer,
7653
7683
  names: value.names
7654
7684
  };
7655
7685
  });
@@ -7657,14 +7687,14 @@ ${input.slice(result.pos)}
7657
7687
  var ws = $1;
7658
7688
  var pin = $2;
7659
7689
  var binding = $3;
7660
- var init = $4;
7690
+ var initializer = $4;
7661
7691
  if (binding.type === "AtBinding") {
7662
7692
  return {
7663
7693
  type: "AtBindingProperty",
7664
7694
  children: $0,
7665
7695
  binding,
7666
7696
  ref: binding.ref,
7667
- init,
7697
+ initializer,
7668
7698
  names: []
7669
7699
  };
7670
7700
  }
@@ -7684,7 +7714,7 @@ ${input.slice(result.pos)}
7684
7714
  children: $0,
7685
7715
  name: binding,
7686
7716
  value: void 0,
7687
- init,
7717
+ initializer,
7688
7718
  names: binding.names,
7689
7719
  identifier: binding
7690
7720
  };
@@ -7781,36 +7811,6 @@ ${input.slice(result.pos)}
7781
7811
  return result;
7782
7812
  }
7783
7813
  }
7784
- var NestedBindingElement$0 = $TS($S(Nested, BindingElement), function($skip, $loc, $0, $1, $2) {
7785
- var indent = $1;
7786
- var element = $2;
7787
- return {
7788
- ...element,
7789
- children: [indent, ...element.children]
7790
- };
7791
- });
7792
- function NestedBindingElement(state) {
7793
- let eventData;
7794
- if (state.events) {
7795
- const result = state.events.enter?.("NestedBindingElement", state);
7796
- if (result) {
7797
- if (result.cache)
7798
- return result.cache;
7799
- eventData = result.data;
7800
- }
7801
- }
7802
- if (state.tokenize) {
7803
- const result = $TOKEN("NestedBindingElement", state, NestedBindingElement$0(state));
7804
- if (state.events)
7805
- state.events.exit?.("NestedBindingElement", state, result, eventData);
7806
- return result;
7807
- } else {
7808
- const result = NestedBindingElement$0(state);
7809
- if (state.events)
7810
- state.events.exit?.("NestedBindingElement", state, result, eventData);
7811
- return result;
7812
- }
7813
- }
7814
7814
  var BindingElement$0 = BindingRestElement;
7815
7815
  var BindingElement$1 = $TS($S($E(_), $C(BindingIdentifier, BindingPattern), $E(Initializer)), function($skip, $loc, $0, $1, $2, $3) {
7816
7816
  var ws = $1;
@@ -7819,6 +7819,7 @@ ${input.slice(result.pos)}
7819
7819
  if (binding.children) {
7820
7820
  binding = {
7821
7821
  ...binding,
7822
+ initializer,
7822
7823
  children: [...binding.children, initializer]
7823
7824
  };
7824
7825
  }
@@ -7864,7 +7865,7 @@ ${input.slice(result.pos)}
7864
7865
  var binding = $3;
7865
7866
  return {
7866
7867
  type: "BindingRestElement",
7867
- children: [...ws || [], dots, binding],
7868
+ children: [ws, [dots, binding]],
7868
7869
  binding,
7869
7870
  name: binding.name,
7870
7871
  names: binding.names,
@@ -8753,7 +8754,7 @@ ${input.slice(result.pos)}
8753
8754
  var s = $3;
8754
8755
  var ws = $4;
8755
8756
  var c = $5;
8756
- if (!s.children.length)
8757
+ if (!s.expressions.length)
8757
8758
  return $skip;
8758
8759
  return {
8759
8760
  type: "BlockStatement",
@@ -8828,16 +8829,16 @@ ${input.slice(result.pos)}
8828
8829
  return result;
8829
8830
  }
8830
8831
  }
8831
- var SingleLineStatements$0 = $TS($S($Q($S($S($E(_), $N(EOS)), Statement, SemicolonDelimiter)), $E($S($S($E(_), $N(EOS)), Statement, $E(SemicolonDelimiter)))), function($skip, $loc, $0, $1, $2) {
8832
- var stmts = $1;
8833
- var last = $2;
8834
- const children = [...stmts];
8832
+ var SingleLineStatements$0 = $TS($S(ForbidNewlineBinaryOp, $Q($S($S($E(_), $N(EOS)), Statement, SemicolonDelimiter)), $E($S($S($E(_), $N(EOS)), Statement, $E(SemicolonDelimiter))), RestoreNewlineBinaryOp), function($skip, $loc, $0, $1, $2, $3, $4) {
8833
+ var stmts = $2;
8834
+ var last = $3;
8835
+ const expressions = [...stmts];
8835
8836
  if (last)
8836
- children.push(last);
8837
+ expressions.push(last);
8837
8838
  return {
8838
8839
  type: "BlockStatement",
8839
- expressions: children,
8840
- children,
8840
+ expressions,
8841
+ children: [expressions],
8841
8842
  bare: true
8842
8843
  };
8843
8844
  });
@@ -9293,9 +9294,7 @@ ${input.slice(result.pos)}
9293
9294
  } else {
9294
9295
  children = [open, content, ...ws, close];
9295
9296
  }
9296
- const names = children.flatMap((c) => {
9297
- return c.names || [];
9298
- });
9297
+ const names = children.flatMap((c) => c?.names || []);
9299
9298
  return {
9300
9299
  type: "ArrayExpression",
9301
9300
  children,
@@ -9411,17 +9410,17 @@ ${input.slice(result.pos)}
9411
9410
  }
9412
9411
  }
9413
9412
  var ArrayLiteralContent$0 = RangeExpression;
9414
- var ArrayLiteralContent$1 = $S(NestedImplicitObjectLiteral, $Q($S(__, Comma, NestedImplicitObjectLiteral)));
9415
- var ArrayLiteralContent$2 = NestedElementList;
9416
- var ArrayLiteralContent$3 = $TS($S(ElementListWithIndentedApplicationForbidden, InsertComma, $E(NestedElementList)), function($skip, $loc, $0, $1, $2, $3) {
9413
+ var ArrayLiteralContent$1 = $S(NestedElementList, $Y($S(__, CloseBracket)));
9414
+ var ArrayLiteralContent$2 = $TS($S(ElementListWithIndentedApplicationForbidden, ArrayElementDelimiter, $E(NestedElementList), $Y($S(__, CloseBracket))), function($skip, $loc, $0, $1, $2, $3, $4) {
9417
9415
  var list = $1;
9418
- var comma = $2;
9416
+ var delimiter = $2;
9419
9417
  var nested = $3;
9420
- if (nested) {
9421
- return [...list, comma, ...nested];
9422
- } else {
9418
+ if (!nested)
9423
9419
  return list;
9424
- }
9420
+ return [...list, delimiter, ...nested];
9421
+ });
9422
+ var ArrayLiteralContent$3 = $TV($Q($S(__, ElementListWithIndentedApplicationForbidden, ArrayElementDelimiter)), function($skip, $loc, $0, $1) {
9423
+ return $1.flat();
9425
9424
  });
9426
9425
  function ArrayLiteralContent(state) {
9427
9426
  let eventData;
@@ -9569,9 +9568,9 @@ ${input.slice(result.pos)}
9569
9568
  return result;
9570
9569
  }
9571
9570
  }
9572
- var ElementList$0 = $TS($S(ArrayElementExpression, $Q(ElementListRest)), function($skip, $loc, $0, $1, $2) {
9573
- var first = $1;
9574
- var rest = $2;
9571
+ var ElementList$0 = $TS($S($N(EOS), ArrayElementExpression, $Q(ElementListRest)), function($skip, $loc, $0, $1, $2, $3) {
9572
+ var first = $2;
9573
+ var rest = $3;
9575
9574
  if (rest.length) {
9576
9575
  return [{
9577
9576
  ...first,
@@ -9608,7 +9607,7 @@ ${input.slice(result.pos)}
9608
9607
  return result;
9609
9608
  }
9610
9609
  }
9611
- var ElementListRest$0 = $S($S(__, Comma), ArrayElementExpression);
9610
+ var ElementListRest$0 = $S($S($E(_), Comma, $N(EOS)), ArrayElementExpression);
9612
9611
  function ElementListRest(state) {
9613
9612
  let eventData;
9614
9613
  if (state.events) {
@@ -9723,26 +9722,16 @@ ${input.slice(result.pos)}
9723
9722
  return result;
9724
9723
  }
9725
9724
  }
9726
- var BracedObjectLiteral$0 = $TS($S(OpenBrace, AllowAll, $E($S($E(BracedObjectLiteralContent), __, CloseBrace)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
9725
+ var BracedObjectLiteral$0 = $TS($S(OpenBrace, AllowAll, $E($S(BracedObjectLiteralContent, __, CloseBrace)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
9727
9726
  var open = $1;
9728
9727
  if (!$3)
9729
9728
  return $skip;
9730
9729
  const [properties, ...close] = $3;
9731
- if (properties) {
9732
- const children = [open, ...properties, close];
9733
- return {
9734
- type: "ObjectExpression",
9735
- children,
9736
- names: children.flatMap((c) => {
9737
- return c.names || [];
9738
- }),
9739
- properties
9740
- };
9741
- }
9742
9730
  return {
9743
9731
  type: "ObjectExpression",
9744
- children: [open, close],
9745
- names: []
9732
+ children: [open, properties, close],
9733
+ names: properties.flatMap((c) => c.names || []),
9734
+ properties
9746
9735
  };
9747
9736
  });
9748
9737
  function BracedObjectLiteral(state) {
@@ -9767,8 +9756,33 @@ ${input.slice(result.pos)}
9767
9756
  return result;
9768
9757
  }
9769
9758
  }
9770
- var BracedObjectLiteralContent$0 = NestedPropertyDefinitions;
9771
- var BracedObjectLiteralContent$1 = PropertyDefinitionList;
9759
+ var BracedObjectLiteralContent$0 = $TS($S($Q($S(PropertyDefinition, ObjectPropertyDelimiter)), $E(NestedPropertyDefinitions)), function($skip, $loc, $0, $1, $2) {
9760
+ var line = $1;
9761
+ var nested = $2;
9762
+ line = line.flatMap(([prop, delim]) => {
9763
+ prop = Array.isArray(prop) ? prop : [prop];
9764
+ let last = prop[prop.length - 1];
9765
+ last = {
9766
+ ...last,
9767
+ delim,
9768
+ children: [...last.children, delim]
9769
+ };
9770
+ return [...prop.slice(0, prop.length - 1), last];
9771
+ });
9772
+ return line.concat(nested || []);
9773
+ });
9774
+ var BracedObjectLiteralContent$1 = $TV($P($S(__, PropertyDefinition, ObjectPropertyDelimiter)), function($skip, $loc, $0, $1) {
9775
+ return $0.flatMap(([ws, prop, delim]) => {
9776
+ prop = Array.isArray(prop) ? prop : [prop];
9777
+ let last = prop[prop.length - 1];
9778
+ last = {
9779
+ ...last,
9780
+ delim,
9781
+ children: [ws, ...last.children.slice(1), delim]
9782
+ };
9783
+ return [...prop.slice(0, prop.length - 1), last];
9784
+ });
9785
+ });
9772
9786
  function BracedObjectLiteralContent(state) {
9773
9787
  let eventData;
9774
9788
  if (state.events) {
@@ -9792,9 +9806,11 @@ ${input.slice(result.pos)}
9792
9806
  }
9793
9807
  }
9794
9808
  var NestedImplicitObjectLiteral$0 = $TS($S(InsertOpenBrace, NestedImplicitPropertyDefinitions, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
9809
+ var properties = $2;
9795
9810
  return {
9796
9811
  type: "ObjectExpression",
9797
- children: [$1, ...$2, $3, $4, $5]
9812
+ properties,
9813
+ children: $0
9798
9814
  };
9799
9815
  });
9800
9816
  function NestedImplicitObjectLiteral(state) {
@@ -9847,7 +9863,7 @@ ${input.slice(result.pos)}
9847
9863
  return result;
9848
9864
  }
9849
9865
  }
9850
- var NestedImplicitPropertyDefinition$0 = $TS($S(Nested, ImplicitNamedProperty, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
9866
+ var NestedImplicitPropertyDefinition$0 = $TS($S(Nested, NamedProperty, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
9851
9867
  var ws = $1;
9852
9868
  var prop = $2;
9853
9869
  var delimiter = $3;
@@ -9950,7 +9966,7 @@ ${input.slice(result.pos)}
9950
9966
  return result;
9951
9967
  }
9952
9968
  }
9953
- var InlineObjectLiteral$0 = $TS($S(InsertInlineOpenBrace, SnugNamedProperty, $Q($S(ImplicitInlineObjectPropertyDelimiter, ImplicitNamedProperty)), $E($S($E(_), Comma, $Y(Dedented))), InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
9969
+ var InlineObjectLiteral$0 = $TS($S(InsertInlineOpenBrace, SnugNamedProperty, $Q($S(ImplicitInlineObjectPropertyDelimiter, NamedProperty)), $E($S($E(_), Comma, $Y(Dedented))), InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
9954
9970
  var open = $1;
9955
9971
  var first = $2;
9956
9972
  var rest = $3;
@@ -9984,7 +10000,7 @@ ${input.slice(result.pos)}
9984
10000
  }
9985
10001
  }
9986
10002
  var ImplicitInlineObjectPropertyDelimiter$0 = $S($E(_), Comma, $C(NotDedented, $E(_)));
9987
- var ImplicitInlineObjectPropertyDelimiter$1 = $T($S($Y($S(Samedent, ImplicitNamedProperty)), InsertComma, $C(Samedent, $E(_))), function(value) {
10003
+ var ImplicitInlineObjectPropertyDelimiter$1 = $T($S($Y($S(Nested, NamedProperty)), InsertComma, $C(Nested, $E(_))), function(value) {
9988
10004
  return [value[1], value[2]];
9989
10005
  });
9990
10006
  function ImplicitInlineObjectPropertyDelimiter(state) {
@@ -10036,41 +10052,7 @@ ${input.slice(result.pos)}
10036
10052
  return result;
10037
10053
  }
10038
10054
  }
10039
- var PropertyDefinitionList$0 = $TV($P($S(PropertyDefinition, ObjectPropertyDelimiter)), function($skip, $loc, $0, $1) {
10040
- return $0.flatMap(([prop, delim]) => {
10041
- prop = Array.isArray(prop) ? prop : [prop];
10042
- let last = prop[prop.length - 1];
10043
- last = {
10044
- ...last,
10045
- delim,
10046
- children: [...last.children, delim]
10047
- };
10048
- return [...prop.slice(0, prop.length - 1), last];
10049
- });
10050
- });
10051
- function PropertyDefinitionList(state) {
10052
- let eventData;
10053
- if (state.events) {
10054
- const result = state.events.enter?.("PropertyDefinitionList", state);
10055
- if (result) {
10056
- if (result.cache)
10057
- return result.cache;
10058
- eventData = result.data;
10059
- }
10060
- }
10061
- if (state.tokenize) {
10062
- const result = $TOKEN("PropertyDefinitionList", state, PropertyDefinitionList$0(state));
10063
- if (state.events)
10064
- state.events.exit?.("PropertyDefinitionList", state, result, eventData);
10065
- return result;
10066
- } else {
10067
- const result = PropertyDefinitionList$0(state);
10068
- if (state.events)
10069
- state.events.exit?.("PropertyDefinitionList", state, result, eventData);
10070
- return result;
10071
- }
10072
- }
10073
- var PropertyDefinition$0 = $TS($S(__, AtThis, IdentifierReference), function($skip, $loc, $0, $1, $2, $3) {
10055
+ var PropertyDefinition$0 = $TS($S($E(_), AtThis, IdentifierReference), function($skip, $loc, $0, $1, $2, $3) {
10074
10056
  var ws = $1;
10075
10057
  var at = $2;
10076
10058
  var id = $3;
@@ -10083,7 +10065,7 @@ ${input.slice(result.pos)}
10083
10065
  value
10084
10066
  };
10085
10067
  });
10086
- var PropertyDefinition$1 = $TS($S(__, NamedProperty), function($skip, $loc, $0, $1, $2) {
10068
+ var PropertyDefinition$1 = $TS($S($E(_), NamedProperty), function($skip, $loc, $0, $1, $2) {
10087
10069
  var ws = $1;
10088
10070
  var prop = $2;
10089
10071
  return {
@@ -10091,7 +10073,7 @@ ${input.slice(result.pos)}
10091
10073
  children: [ws, ...prop.children]
10092
10074
  };
10093
10075
  });
10094
- var PropertyDefinition$2 = $TS($S(__, $TEXT($EXPECT($R6, fail, "PropertyDefinition /[!+-]/")), PropertyName), function($skip, $loc, $0, $1, $2, $3) {
10076
+ var PropertyDefinition$2 = $TS($S($E(_), $TEXT($EXPECT($R6, fail, "PropertyDefinition /[!+-]/")), PropertyName), function($skip, $loc, $0, $1, $2, $3) {
10095
10077
  var ws = $1;
10096
10078
  var toggle = $2;
10097
10079
  var id = $3;
@@ -10104,7 +10086,7 @@ ${input.slice(result.pos)}
10104
10086
  value
10105
10087
  };
10106
10088
  });
10107
- var PropertyDefinition$3 = $TS($S(__, MethodDefinition), function($skip, $loc, $0, $1, $2) {
10089
+ var PropertyDefinition$3 = $TS($S($E(_), MethodDefinition), function($skip, $loc, $0, $1, $2) {
10108
10090
  var ws = $1;
10109
10091
  var def = $2;
10110
10092
  if (!def.block || def.block.empty)
@@ -10114,7 +10096,7 @@ ${input.slice(result.pos)}
10114
10096
  children: [ws, ...def.children]
10115
10097
  };
10116
10098
  });
10117
- var PropertyDefinition$4 = $TS($S(__, DotDotDot, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
10099
+ var PropertyDefinition$4 = $TS($S($E(_), DotDotDot, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
10118
10100
  var ws = $1;
10119
10101
  var dots = $2;
10120
10102
  var exp = $3;
@@ -10126,9 +10108,9 @@ ${input.slice(result.pos)}
10126
10108
  value: exp
10127
10109
  };
10128
10110
  });
10129
- var PropertyDefinition$5 = $TS($S(__, CallExpression), function($skip, $loc, $0, $1, $2) {
10111
+ var PropertyDefinition$5 = $TS($S($E(_), $N(EOS), CallExpression), function($skip, $loc, $0, $1, $2, $3) {
10130
10112
  var ws = $1;
10131
- var value = $2;
10113
+ var value = $3;
10132
10114
  switch (value.type) {
10133
10115
  case "Identifier":
10134
10116
  return { ...value, children: [ws, ...value.children] };
@@ -10249,41 +10231,8 @@ ${input.slice(result.pos)}
10249
10231
  return result;
10250
10232
  }
10251
10233
  }
10252
- var ImplicitNamedProperty$0 = $TS($S(PropertyName, $E(_), Colon, $C(MultiLineImplicitObjectLiteralAllowed, $N(EOS)), ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
10253
- var name = $1;
10254
- var exp = $5;
10255
- return {
10256
- type: "Property",
10257
- children: $0,
10258
- name,
10259
- names: exp.names || [],
10260
- value: exp
10261
- };
10262
- });
10263
- function ImplicitNamedProperty(state) {
10264
- let eventData;
10265
- if (state.events) {
10266
- const result = state.events.enter?.("ImplicitNamedProperty", state);
10267
- if (result) {
10268
- if (result.cache)
10269
- return result.cache;
10270
- eventData = result.data;
10271
- }
10272
- }
10273
- if (state.tokenize) {
10274
- const result = $TOKEN("ImplicitNamedProperty", state, ImplicitNamedProperty$0(state));
10275
- if (state.events)
10276
- state.events.exit?.("ImplicitNamedProperty", state, result, eventData);
10277
- return result;
10278
- } else {
10279
- const result = ImplicitNamedProperty$0(state);
10280
- if (state.events)
10281
- state.events.exit?.("ImplicitNamedProperty", state, result, eventData);
10282
- return result;
10283
- }
10284
- }
10285
- var SnugNamedProperty$0 = $TS($S(PropertyName, Colon, $C(MultiLineImplicitObjectLiteralAllowed, $N(EOS)), ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
10286
- var exp = $4;
10234
+ var SnugNamedProperty$0 = $TS($S(PropertyName, Colon, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
10235
+ var exp = $3;
10287
10236
  return {
10288
10237
  type: "Property",
10289
10238
  children: $0,
@@ -10859,7 +10808,7 @@ ${input.slice(result.pos)}
10859
10808
  ws.push(...$2);
10860
10809
  return [ws, $3];
10861
10810
  });
10862
- var NotDedentedBinaryOp$1 = $TS($S(Samedent, $E(_), $N(Identifier), BinaryOp), function($skip, $loc, $0, $1, $2, $3, $4) {
10811
+ var NotDedentedBinaryOp$1 = $TS($S(Nested, $E(_), $N(Identifier), BinaryOp), function($skip, $loc, $0, $1, $2, $3, $4) {
10863
10812
  const ws = [...$1];
10864
10813
  if ($2)
10865
10814
  ws.push(...$2);
@@ -11647,7 +11596,7 @@ ${input.slice(result.pos)}
11647
11596
  return result;
11648
11597
  }
11649
11598
  }
11650
- var ElseClause$0 = $S(Samedent, Else, Block);
11599
+ var ElseClause$0 = $S(Nested, Else, Block);
11651
11600
  var ElseClause$1 = $S($E(_), Else, Block);
11652
11601
  function ElseClause(state) {
11653
11602
  let eventData;
@@ -11791,7 +11740,7 @@ ${input.slice(result.pos)}
11791
11740
  return result;
11792
11741
  }
11793
11742
  }
11794
- var ElseExpressionClause$0 = $TS($S($C($S(Samedent, Else), $S($E(_), Else)), ElseExpressionBlock), function($skip, $loc, $0, $1, $2) {
11743
+ var ElseExpressionClause$0 = $TS($S($C($S(Nested, Else), $S($E(_), Else)), ElseExpressionBlock), function($skip, $loc, $0, $1, $2) {
11795
11744
  return [...$1, $2];
11796
11745
  });
11797
11746
  function ElseExpressionClause(state) {
@@ -12895,7 +12844,7 @@ ${input.slice(result.pos)}
12895
12844
  return result;
12896
12845
  }
12897
12846
  }
12898
- var CaseBlock$0 = $TS($S($E($C(Samedent, _)), OpenBrace, NestedCaseClauses, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12847
+ var CaseBlock$0 = $TS($S($E($C(Nested, _)), OpenBrace, NestedCaseClauses, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12899
12848
  var clauses = $3;
12900
12849
  return {
12901
12850
  type: "CaseBlock",
@@ -13112,11 +13061,9 @@ ${input.slice(result.pos)}
13112
13061
  return result;
13113
13062
  }
13114
13063
  }
13115
- var CaseExpressionList$0 = $TS($S(ForbidMultiLineImplicitObjectLiteral, $E($S($E(_), CaseExpression, InsertColon)), $Q($S(__, Comma, CaseExpression, InsertColon)), RestoreMultiLineImplicitObjectLiteral), function($skip, $loc, $0, $1, $2, $3, $4) {
13116
- var first = $2;
13117
- var rest = $3;
13118
- if (!first)
13119
- return $skip;
13064
+ var CaseExpressionList$0 = $TS($S($S($E(_), CaseExpression, InsertColon), $Q($S(__, Comma, CaseExpression, InsertColon))), function($skip, $loc, $0, $1, $2) {
13065
+ var first = $1;
13066
+ var rest = $2;
13120
13067
  const result = rest.map(([ws, _comma, exp, col]) => {
13121
13068
  exp = insertTrimmingSpace(exp, "");
13122
13069
  if (ws.length)
@@ -13309,7 +13256,7 @@ ${input.slice(result.pos)}
13309
13256
  return result;
13310
13257
  }
13311
13258
  }
13312
- var CatchClause$0 = $TS($S($C(Samedent, _), Catch, $E(CatchBind), $C(ThenClause, BracedOrEmptyBlock)), function($skip, $loc, $0, $1, $2, $3, $4) {
13259
+ var CatchClause$0 = $TS($S($C(Nested, _), Catch, $E(CatchBind), $C(ThenClause, BracedOrEmptyBlock)), function($skip, $loc, $0, $1, $2, $3, $4) {
13313
13260
  var block = $4;
13314
13261
  return {
13315
13262
  type: "CatchClause",
@@ -13363,7 +13310,7 @@ ${input.slice(result.pos)}
13363
13310
  return result;
13364
13311
  }
13365
13312
  }
13366
- var FinallyClause$0 = $S($C(Samedent, _), Finally, $C(ThenClause, BracedOrEmptyBlock));
13313
+ var FinallyClause$0 = $S($C(Nested, _), Finally, $C(ThenClause, BracedOrEmptyBlock));
13367
13314
  function FinallyClause(state) {
13368
13315
  let eventData;
13369
13316
  if (state.events) {
@@ -13475,17 +13422,19 @@ ${input.slice(result.pos)}
13475
13422
  type: "Ref",
13476
13423
  base: "ref"
13477
13424
  };
13478
- const { binding, initializer, splices, thisAssignments } = dec;
13425
+ const { decl, bindings } = dec;
13426
+ const binding = bindings[0];
13427
+ const { pattern, suffix, initializer, splices, thisAssignments } = binding;
13479
13428
  const initCondition = {
13480
13429
  type: "AssignmentExpression",
13481
- children: [ref, " ", initializer],
13430
+ children: [ref, initializer],
13482
13431
  hoistDec: {
13483
13432
  type: "Declaration",
13484
- children: ["let ", ref],
13433
+ children: ["let ", ref, suffix],
13485
13434
  names: []
13486
13435
  },
13487
13436
  blockPrefix: [
13488
- ["", [binding, "= ", ref, ...splices], ";"],
13437
+ ["", [decl, pattern, suffix, " = ", ref, ...splices], ";"],
13489
13438
  ...thisAssignments
13490
13439
  ]
13491
13440
  };
@@ -13985,110 +13934,6 @@ ${input.slice(result.pos)}
13985
13934
  return result;
13986
13935
  }
13987
13936
  }
13988
- var ForbidMultiLineImplicitObjectLiteral$0 = $TV($EXPECT($L0, fail, 'ForbidMultiLineImplicitObjectLiteral ""'), function($skip, $loc, $0, $1) {
13989
- module2.forbidMultiLineImplicitObjectLiteral.push(true);
13990
- });
13991
- function ForbidMultiLineImplicitObjectLiteral(state) {
13992
- let eventData;
13993
- if (state.events) {
13994
- const result = state.events.enter?.("ForbidMultiLineImplicitObjectLiteral", state);
13995
- if (result) {
13996
- if (result.cache)
13997
- return result.cache;
13998
- eventData = result.data;
13999
- }
14000
- }
14001
- if (state.tokenize) {
14002
- const result = $TOKEN("ForbidMultiLineImplicitObjectLiteral", state, ForbidMultiLineImplicitObjectLiteral$0(state));
14003
- if (state.events)
14004
- state.events.exit?.("ForbidMultiLineImplicitObjectLiteral", state, result, eventData);
14005
- return result;
14006
- } else {
14007
- const result = ForbidMultiLineImplicitObjectLiteral$0(state);
14008
- if (state.events)
14009
- state.events.exit?.("ForbidMultiLineImplicitObjectLiteral", state, result, eventData);
14010
- return result;
14011
- }
14012
- }
14013
- var AllowMultiLineImplicitObjectLiteral$0 = $TV($EXPECT($L0, fail, 'AllowMultiLineImplicitObjectLiteral ""'), function($skip, $loc, $0, $1) {
14014
- module2.forbidMultiLineImplicitObjectLiteral.push(false);
14015
- });
14016
- function AllowMultiLineImplicitObjectLiteral(state) {
14017
- let eventData;
14018
- if (state.events) {
14019
- const result = state.events.enter?.("AllowMultiLineImplicitObjectLiteral", state);
14020
- if (result) {
14021
- if (result.cache)
14022
- return result.cache;
14023
- eventData = result.data;
14024
- }
14025
- }
14026
- if (state.tokenize) {
14027
- const result = $TOKEN("AllowMultiLineImplicitObjectLiteral", state, AllowMultiLineImplicitObjectLiteral$0(state));
14028
- if (state.events)
14029
- state.events.exit?.("AllowMultiLineImplicitObjectLiteral", state, result, eventData);
14030
- return result;
14031
- } else {
14032
- const result = AllowMultiLineImplicitObjectLiteral$0(state);
14033
- if (state.events)
14034
- state.events.exit?.("AllowMultiLineImplicitObjectLiteral", state, result, eventData);
14035
- return result;
14036
- }
14037
- }
14038
- var RestoreMultiLineImplicitObjectLiteral$0 = $TV($EXPECT($L0, fail, 'RestoreMultiLineImplicitObjectLiteral ""'), function($skip, $loc, $0, $1) {
14039
- module2.forbidMultiLineImplicitObjectLiteral.pop();
14040
- });
14041
- function RestoreMultiLineImplicitObjectLiteral(state) {
14042
- let eventData;
14043
- if (state.events) {
14044
- const result = state.events.enter?.("RestoreMultiLineImplicitObjectLiteral", state);
14045
- if (result) {
14046
- if (result.cache)
14047
- return result.cache;
14048
- eventData = result.data;
14049
- }
14050
- }
14051
- if (state.tokenize) {
14052
- const result = $TOKEN("RestoreMultiLineImplicitObjectLiteral", state, RestoreMultiLineImplicitObjectLiteral$0(state));
14053
- if (state.events)
14054
- state.events.exit?.("RestoreMultiLineImplicitObjectLiteral", state, result, eventData);
14055
- return result;
14056
- } else {
14057
- const result = RestoreMultiLineImplicitObjectLiteral$0(state);
14058
- if (state.events)
14059
- state.events.exit?.("RestoreMultiLineImplicitObjectLiteral", state, result, eventData);
14060
- return result;
14061
- }
14062
- }
14063
- var MultiLineImplicitObjectLiteralAllowed$0 = $TV($EXPECT($L0, fail, 'MultiLineImplicitObjectLiteralAllowed ""'), function($skip, $loc, $0, $1) {
14064
- if (module2.config.verbose) {
14065
- console.log("forbidMultiLineImplicitObjectLiteral:", module2.forbidMultiLineImplicitObjectLiteral);
14066
- }
14067
- if (module2.multiLineImplicitObjectLiteralForbidden)
14068
- return $skip;
14069
- });
14070
- function MultiLineImplicitObjectLiteralAllowed(state) {
14071
- let eventData;
14072
- if (state.events) {
14073
- const result = state.events.enter?.("MultiLineImplicitObjectLiteralAllowed", state);
14074
- if (result) {
14075
- if (result.cache)
14076
- return result.cache;
14077
- eventData = result.data;
14078
- }
14079
- }
14080
- if (state.tokenize) {
14081
- const result = $TOKEN("MultiLineImplicitObjectLiteralAllowed", state, MultiLineImplicitObjectLiteralAllowed$0(state));
14082
- if (state.events)
14083
- state.events.exit?.("MultiLineImplicitObjectLiteralAllowed", state, result, eventData);
14084
- return result;
14085
- } else {
14086
- const result = MultiLineImplicitObjectLiteralAllowed$0(state);
14087
- if (state.events)
14088
- state.events.exit?.("MultiLineImplicitObjectLiteralAllowed", state, result, eventData);
14089
- return result;
14090
- }
14091
- }
14092
13937
  var AllowNewlineBinaryOp$0 = $TV($EXPECT($L0, fail, 'AllowNewlineBinaryOp ""'), function($skip, $loc, $0, $1) {
14093
13938
  module2.forbidNewlineBinaryOp.push(false);
14094
13939
  });
@@ -14193,7 +14038,7 @@ ${input.slice(result.pos)}
14193
14038
  return result;
14194
14039
  }
14195
14040
  }
14196
- var AllowAll$0 = $S(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication, AllowMultiLineImplicitObjectLiteral, AllowClassImplicitCall, AllowNewlineBinaryOp);
14041
+ var AllowAll$0 = $S(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication, AllowClassImplicitCall, AllowNewlineBinaryOp);
14197
14042
  function AllowAll(state) {
14198
14043
  let eventData;
14199
14044
  if (state.events) {
@@ -14216,7 +14061,7 @@ ${input.slice(result.pos)}
14216
14061
  return result;
14217
14062
  }
14218
14063
  }
14219
- var RestoreAll$0 = $S(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication, RestoreMultiLineImplicitObjectLiteral, RestoreClassImplicitCall, RestoreNewlineBinaryOp);
14064
+ var RestoreAll$0 = $S(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication, RestoreClassImplicitCall, RestoreNewlineBinaryOp);
14220
14065
  function RestoreAll(state) {
14221
14066
  let eventData;
14222
14067
  if (state.events) {
@@ -15184,26 +15029,23 @@ ${input.slice(result.pos)}
15184
15029
  return result;
15185
15030
  }
15186
15031
  }
15187
- var LexicalDeclaration$0 = $TS($S(LetOrConst, LexicalBinding, $Q($S(__, Comma, LexicalBinding))), function($skip, $loc, $0, $1, $2, $3) {
15188
- var d = $1;
15032
+ var LexicalDeclaration$0 = $TS($S(LetOrConst, LexicalBinding, $Q($S(__, Comma, __, LexicalBinding))), function($skip, $loc, $0, $1, $2, $3) {
15033
+ var decl = $1;
15189
15034
  var binding = $2;
15190
15035
  var tail = $3;
15191
- const { splices, thisAssignments } = binding;
15036
+ const bindings = [binding].concat(tail.map(([, , , b]) => b));
15192
15037
  return {
15193
15038
  type: "Declaration",
15194
15039
  children: $0,
15195
- names: [...binding.names].concat(tail.flatMap(([, , b]) => b.names)),
15196
- binding: {
15197
- ...binding.binding,
15198
- children: [d, ...binding.binding.children]
15199
- },
15200
- initializer: binding.initializer,
15201
- splices,
15202
- thisAssignments
15040
+ names: bindings.flatMap((b) => b.names),
15041
+ bindings,
15042
+ decl,
15043
+ splices: bindings.flatMap((b) => b.splices),
15044
+ thisAssignments: bindings.flatMap((b) => b.thisAssignments)
15203
15045
  };
15204
15046
  });
15205
15047
  var LexicalDeclaration$1 = $TS($S(InsertConst, $C(BindingPattern, BindingIdentifier), $E(TypeSuffix), __, ConstAssignment, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
15206
- return processConstAssignmentDeclaration(...$0);
15048
+ return processAssignmentDeclaration(...$0);
15207
15049
  });
15208
15050
  var LexicalDeclaration$2 = $TS($S(InsertLet, $C(BindingPattern, BindingIdentifier), $E(TypeSuffix), __, LetAssignment, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
15209
15051
  var l = $1;
@@ -15212,7 +15054,7 @@ ${input.slice(result.pos)}
15212
15054
  var ws = $4;
15213
15055
  var la = $5;
15214
15056
  var e = $6;
15215
- return processLetAssignmentDeclaration(...$0);
15057
+ return processAssignmentDeclaration(...$0);
15216
15058
  });
15217
15059
  function LexicalDeclaration(state) {
15218
15060
  let eventData;
@@ -15286,48 +15128,32 @@ ${input.slice(result.pos)}
15286
15128
  return result;
15287
15129
  }
15288
15130
  }
15289
- var LexicalBinding$0 = $TS($S(BindingPattern, $E(TypeSuffix), $E(_), Initializer), function($skip, $loc, $0, $1, $2, $3, $4) {
15290
- var binding = $1;
15131
+ var LexicalBinding$0 = $TS($S(BindingPattern, $E(TypeSuffix), Initializer), function($skip, $loc, $0, $1, $2, $3) {
15132
+ var pattern = $1;
15291
15133
  var suffix = $2;
15292
- var ws = $3;
15293
- var initializer = $4;
15294
- const bindingChildren = [...binding.children];
15295
- if (suffix)
15296
- bindingChildren.push(suffix);
15297
- if (ws)
15298
- bindingChildren.push(...ws);
15299
- binding = {
15300
- ...binding,
15301
- children: bindingChildren
15302
- };
15303
- const [splices, thisAssignments] = gatherBindingCode(binding.children);
15134
+ var initializer = $3;
15135
+ const [splices, thisAssignments] = gatherBindingCode(pattern);
15304
15136
  return {
15305
- children: [binding, initializer],
15306
- names: binding.names,
15307
- binding,
15137
+ type: "Binding",
15138
+ children: $0,
15139
+ names: pattern.names,
15140
+ pattern,
15141
+ suffix,
15308
15142
  initializer,
15309
15143
  splices: splices.map((s) => [",", s]),
15310
15144
  thisAssignments: thisAssignments.map((s) => ["", s, ";"])
15311
15145
  };
15312
15146
  });
15313
- var LexicalBinding$1 = $TS($S(BindingIdentifier, $E(TypeSuffix), $E(_), $E(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4) {
15314
- var binding = $1;
15147
+ var LexicalBinding$1 = $TS($S(BindingIdentifier, $E(TypeSuffix), $E(Initializer)), function($skip, $loc, $0, $1, $2, $3) {
15148
+ var pattern = $1;
15315
15149
  var suffix = $2;
15316
- var ws = $3;
15317
- var initializer = $4;
15318
- const bindingChildren = [...binding.children];
15319
- if (suffix)
15320
- bindingChildren.push(suffix);
15321
- if (ws)
15322
- bindingChildren.push(...ws);
15323
- binding = {
15324
- ...binding,
15325
- children: bindingChildren
15326
- };
15150
+ var initializer = $3;
15327
15151
  return {
15328
- children: [binding, initializer],
15329
- names: binding.names,
15330
- binding,
15152
+ type: "Binding",
15153
+ children: $0,
15154
+ names: pattern.names,
15155
+ pattern,
15156
+ suffix,
15331
15157
  initializer,
15332
15158
  splices: [],
15333
15159
  thisAssignments: []
@@ -15379,9 +15205,10 @@ ${input.slice(result.pos)}
15379
15205
  }
15380
15206
  }
15381
15207
  var VariableStatement$0 = $TS($S(Var, __, VariableDeclarationList), function($skip, $loc, $0, $1, $2, $3) {
15382
- return Object.assign({}, $3, {
15208
+ return {
15209
+ ...$3,
15383
15210
  children: [$1, ...$2, ...$3.children]
15384
- });
15211
+ };
15385
15212
  });
15386
15213
  function VariableStatement(state) {
15387
15214
  let eventData;
@@ -15405,18 +15232,15 @@ ${input.slice(result.pos)}
15405
15232
  return result;
15406
15233
  }
15407
15234
  }
15408
- var VariableDeclarationList$0 = $TS($S(VariableDeclaration, $Q($S(__, Comma, __, VariableDeclaration))), function($skip, $loc, $0, $1, $2) {
15409
- let children;
15410
- if ($2.length) {
15411
- children = [$1, ...$2];
15412
- } else {
15413
- children = [$1];
15414
- }
15415
- const names = children.flatMap((c) => c.names || []);
15235
+ var VariableDeclarationList$0 = $TS($S(LexicalBinding, $Q($S(__, Comma, __, LexicalBinding))), function($skip, $loc, $0, $1, $2) {
15236
+ var binding = $1;
15237
+ var tail = $2;
15238
+ const bindings = [binding].concat(tail.map(([, , , b]) => b));
15416
15239
  return {
15417
15240
  type: "Declaration",
15418
- children,
15419
- names
15241
+ children: [binding, ...tail],
15242
+ bindings,
15243
+ names: bindings.flatMap((b) => b.names)
15420
15244
  };
15421
15245
  });
15422
15246
  function VariableDeclarationList(state) {
@@ -15441,49 +15265,6 @@ ${input.slice(result.pos)}
15441
15265
  return result;
15442
15266
  }
15443
15267
  }
15444
- var VariableDeclaration$0 = $TS($S(BindingPattern, $E(TypeSuffix), Initializer), function($skip, $loc, $0, $1, $2, $3) {
15445
- const children = [...$1.children];
15446
- if ($2)
15447
- children.push($2);
15448
- children.push($3);
15449
- return {
15450
- children,
15451
- names: $1.names
15452
- };
15453
- });
15454
- var VariableDeclaration$1 = $TS($S(BindingIdentifier, $E(TypeSuffix), $E(Initializer)), function($skip, $loc, $0, $1, $2, $3) {
15455
- const children = [...$1.children];
15456
- if ($2)
15457
- children.push($2);
15458
- if ($3)
15459
- children.push($3);
15460
- return {
15461
- children,
15462
- names: $1.names
15463
- };
15464
- });
15465
- function VariableDeclaration(state) {
15466
- let eventData;
15467
- if (state.events) {
15468
- const result = state.events.enter?.("VariableDeclaration", state);
15469
- if (result) {
15470
- if (result.cache)
15471
- return result.cache;
15472
- eventData = result.data;
15473
- }
15474
- }
15475
- if (state.tokenize) {
15476
- const result = $TOKEN("VariableDeclaration", state, VariableDeclaration$0(state) || VariableDeclaration$1(state));
15477
- if (state.events)
15478
- state.events.exit?.("VariableDeclaration", state, result, eventData);
15479
- return result;
15480
- } else {
15481
- const result = VariableDeclaration$0(state) || VariableDeclaration$1(state);
15482
- if (state.events)
15483
- state.events.exit?.("VariableDeclaration", state, result, eventData);
15484
- return result;
15485
- }
15486
- }
15487
15268
  var NumericLiteral$0 = $TS($S(NumericLiteralKind), function($skip, $loc, $0, $1) {
15488
15269
  return { type: "NumericLiteral", $loc, token: $1 };
15489
15270
  });
@@ -16883,7 +16664,7 @@ ${input.slice(result.pos)}
16883
16664
  }
16884
16665
  }
16885
16666
  var StatementDelimiter$0 = SemicolonDelimiter;
16886
- var StatementDelimiter$1 = $S($Y($S(Samedent, $C($EXPECT($L4, fail, 'StatementDelimiter "("'), $EXPECT($L114, fail, 'StatementDelimiter "["'), $EXPECT($L115, fail, 'StatementDelimiter "`"'), $EXPECT($L59, fail, 'StatementDelimiter "+"'), $EXPECT($L20, fail, 'StatementDelimiter "-"'), $EXPECT($L55, fail, 'StatementDelimiter "*"'), $EXPECT($L56, fail, 'StatementDelimiter "/"'), ObjectLiteral, Arrow, FatArrow, $S(Function, $E($S($E(_), Star)), $E(_), $EXPECT($L4, fail, 'StatementDelimiter "("'))))), InsertSemicolon);
16667
+ var StatementDelimiter$1 = $S($Y($S(Nested, $C($EXPECT($L4, fail, 'StatementDelimiter "("'), $EXPECT($L114, fail, 'StatementDelimiter "["'), $EXPECT($L115, fail, 'StatementDelimiter "`"'), $EXPECT($L59, fail, 'StatementDelimiter "+"'), $EXPECT($L20, fail, 'StatementDelimiter "-"'), $EXPECT($L55, fail, 'StatementDelimiter "*"'), $EXPECT($L56, fail, 'StatementDelimiter "/"'), ObjectLiteral, Arrow, FatArrow, $S(Function, $E($S($E(_), Star)), $E(_), $EXPECT($L4, fail, 'StatementDelimiter "("'))))), InsertSemicolon);
16887
16668
  var StatementDelimiter$2 = $Y(EOS);
16888
16669
  function StatementDelimiter(state) {
16889
16670
  let eventData;
@@ -19104,7 +18885,7 @@ ${input.slice(result.pos)}
19104
18885
  return result;
19105
18886
  }
19106
18887
  }
19107
- var JSXImplicitFragment$0 = $TS($S(JSXTag, $Q($S(Samedent, JSXTag))), function($skip, $loc, $0, $1, $2) {
18888
+ var JSXImplicitFragment$0 = $TS($S(JSXTag, $Q($S(Nested, JSXTag))), function($skip, $loc, $0, $1, $2) {
19108
18889
  const jsx = $2.length === 0 ? $1 : {
19109
18890
  type: "JSXFragment",
19110
18891
  children: [
@@ -20624,7 +20405,7 @@ ${input.slice(result.pos)}
20624
20405
  return result;
20625
20406
  }
20626
20407
  }
20627
- var TypeDeclarationRest$0 = $S(TypeKeyword, $E(_), IdentifierName, $E(TypeParameters), __, Equals, $C($S($E(_), Type), $S(__, Type)));
20408
+ var TypeDeclarationRest$0 = $S(TypeKeyword, $E(_), IdentifierName, $E(TypeParameters), OptionalEquals, $C($S($E(_), Type), $S(__, Type)));
20628
20409
  var TypeDeclarationRest$1 = $S(Interface, $E(_), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock);
20629
20410
  var TypeDeclarationRest$2 = $S(Namespace, $E(_), IdentifierName, ModuleBlock);
20630
20411
  var TypeDeclarationRest$3 = FunctionSignature;
@@ -20650,6 +20431,32 @@ ${input.slice(result.pos)}
20650
20431
  return result;
20651
20432
  }
20652
20433
  }
20434
+ var OptionalEquals$0 = $S(__, Equals);
20435
+ var OptionalEquals$1 = $T($S($Y(IndentedFurther), InsertSpaceEquals), function(value) {
20436
+ return value[1];
20437
+ });
20438
+ function OptionalEquals(state) {
20439
+ let eventData;
20440
+ if (state.events) {
20441
+ const result = state.events.enter?.("OptionalEquals", state);
20442
+ if (result) {
20443
+ if (result.cache)
20444
+ return result.cache;
20445
+ eventData = result.data;
20446
+ }
20447
+ }
20448
+ if (state.tokenize) {
20449
+ const result = $TOKEN("OptionalEquals", state, OptionalEquals$0(state) || OptionalEquals$1(state));
20450
+ if (state.events)
20451
+ state.events.exit?.("OptionalEquals", state, result, eventData);
20452
+ return result;
20453
+ } else {
20454
+ const result = OptionalEquals$0(state) || OptionalEquals$1(state);
20455
+ if (state.events)
20456
+ state.events.exit?.("OptionalEquals", state, result, eventData);
20457
+ return result;
20458
+ }
20459
+ }
20653
20460
  var TypeLexicalDeclaration$0 = $S(__, LetOrConstOrVar, TypeDeclarationBinding, $Q($S(CommaDelimiter, __, TypeDeclarationBinding)));
20654
20461
  var TypeLexicalDeclaration$1 = $S(__, EnumDeclaration);
20655
20462
  var TypeLexicalDeclaration$2 = ClassSignature;
@@ -21244,9 +21051,9 @@ ${input.slice(result.pos)}
21244
21051
  ["let ", id, " = {};\n"],
21245
21052
  ...block.properties.map((property, i) => {
21246
21053
  let init, isString;
21247
- if (property.init) {
21054
+ if (property.initializer) {
21248
21055
  init = replaceNodes(
21249
- deepCopy(property.init),
21056
+ deepCopy(property.initializer),
21250
21057
  (n) => n.type === "Identifier" && names.has(n.name),
21251
21058
  (n) => [id, '["', n.name, '"]']
21252
21059
  );
@@ -21409,11 +21216,11 @@ ${input.slice(result.pos)}
21409
21216
  }
21410
21217
  var EnumProperty$0 = $TS($S(Identifier, $E($S(__, Equals, ExtendedExpression)), ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
21411
21218
  var name = $1;
21412
- var init = $2;
21219
+ var initializer = $2;
21413
21220
  return {
21414
21221
  type: "EnumProperty",
21415
21222
  name,
21416
- init,
21223
+ initializer,
21417
21224
  children: $0
21418
21225
  };
21419
21226
  });
@@ -21797,10 +21604,10 @@ ${input.slice(result.pos)}
21797
21604
  return result;
21798
21605
  }
21799
21606
  }
21800
- var TypePrimary$0 = InterfaceBlock;
21801
- var TypePrimary$1 = $S($E(_), FunctionType);
21802
- var TypePrimary$2 = $S($E(_), InlineInterfaceLiteral);
21803
- var TypePrimary$3 = $S($E(_), TypeTuple);
21607
+ var TypePrimary$0 = $S($E(_), TypeTuple);
21608
+ var TypePrimary$1 = InterfaceBlock;
21609
+ var TypePrimary$2 = $S($E(_), FunctionType);
21610
+ var TypePrimary$3 = $S($E(_), InlineInterfaceLiteral);
21804
21611
  var TypePrimary$4 = $S($E(_), ImportType);
21805
21612
  var TypePrimary$5 = $TS($S($E(_), TypeLiteral), function($skip, $loc, $0, $1, $2) {
21806
21613
  var t = $2;
@@ -21913,25 +21720,34 @@ ${input.slice(result.pos)}
21913
21720
  return result;
21914
21721
  }
21915
21722
  }
21916
- var TypeElement$0 = $TS($S(__, IdentifierName, $E(_), DotDotDot, $S(__, $E($S(QuestionMark, $E(_))), Colon, __), Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
21723
+ var TypeElement$0 = $TS($S(__, $E($S(DotDotDot, __)), IdentifierName, $E($S($E(_), DotDotDot)), $S(__, $E($S(QuestionMark, $E(_))), Colon, __), Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
21917
21724
  var ws = $1;
21918
- var name = $2;
21919
- var space = $3;
21920
- var dots = $4;
21725
+ var dots1 = $2;
21726
+ var name = $3;
21727
+ var dots2 = $4;
21921
21728
  var colon = $5;
21922
21729
  var type = $6;
21923
- return [ws, dots, space, name, colon, type];
21730
+ let dots = dots1 || dots2 && [dots2[1], dots2[0]];
21731
+ if (dots1 && dots2) {
21732
+ dots = [dots, {
21733
+ type: "Error",
21734
+ message: "... both before and after identifier"
21735
+ }];
21736
+ }
21737
+ return [ws, dots, name, colon, type];
21924
21738
  });
21925
- var TypeElement$1 = $TS($S(Type, $E(_), DotDotDot), function($skip, $loc, $0, $1, $2, $3) {
21739
+ var TypeElement$1 = $S(__, DotDotDot, __, Type);
21740
+ var TypeElement$2 = $TS($S(Type, $E($S($E(_), DotDotDot))), function($skip, $loc, $0, $1, $2) {
21926
21741
  var type = $1;
21927
- var space = $2;
21928
- var dots = $3;
21742
+ var spaceDots = $2;
21743
+ if (!spaceDots)
21744
+ return type;
21745
+ const [space, dots] = spaceDots;
21929
21746
  const ws = getTrimmingSpace(type);
21930
21747
  if (!ws)
21931
21748
  return [dots, space, type];
21932
21749
  return [ws, dots, space, insertTrimmingSpace(type, "")];
21933
21750
  });
21934
- var TypeElement$2 = $S($E($S(__, DotDotDot)), $E($S(__, IdentifierName, __, $E($S(QuestionMark, $E(_))), Colon, __)), Type);
21935
21751
  function TypeElement(state) {
21936
21752
  let eventData;
21937
21753
  if (state.events) {
@@ -23034,6 +22850,31 @@ ${input.slice(result.pos)}
23034
22850
  return result;
23035
22851
  }
23036
22852
  }
22853
+ var InsertSpaceEquals$0 = $TV($EXPECT($L0, fail, 'InsertSpaceEquals ""'), function($skip, $loc, $0, $1) {
22854
+ return { $loc, token: " =" };
22855
+ });
22856
+ function InsertSpaceEquals(state) {
22857
+ let eventData;
22858
+ if (state.events) {
22859
+ const result = state.events.enter?.("InsertSpaceEquals", state);
22860
+ if (result) {
22861
+ if (result.cache)
22862
+ return result.cache;
22863
+ eventData = result.data;
22864
+ }
22865
+ }
22866
+ if (state.tokenize) {
22867
+ const result = $TOKEN("InsertSpaceEquals", state, InsertSpaceEquals$0(state));
22868
+ if (state.events)
22869
+ state.events.exit?.("InsertSpaceEquals", state, result, eventData);
22870
+ return result;
22871
+ } else {
22872
+ const result = InsertSpaceEquals$0(state);
22873
+ if (state.events)
22874
+ state.events.exit?.("InsertSpaceEquals", state, result, eventData);
22875
+ return result;
22876
+ }
22877
+ }
23037
22878
  var InsertConst$0 = $TV($EXPECT($L0, fail, 'InsertConst ""'), function($skip, $loc, $0, $1) {
23038
22879
  return { $loc, token: "const " };
23039
22880
  });
@@ -23646,7 +23487,6 @@ ${input.slice(result.pos)}
23646
23487
  module2.forbidIndentedApplication = [false];
23647
23488
  module2.forbidBracedApplication = [false];
23648
23489
  module2.forbidTrailingMemberProperty = [false];
23649
- module2.forbidMultiLineImplicitObjectLiteral = [false];
23650
23490
  module2.forbidNewlineBinaryOp = [false];
23651
23491
  module2.JSXTagStack = [];
23652
23492
  module2.operators = /* @__PURE__ */ new Set();
@@ -23683,12 +23523,6 @@ ${input.slice(result.pos)}
23683
23523
  return s[s.length - 1];
23684
23524
  }
23685
23525
  },
23686
- multiLineImplicitObjectLiteralForbidden: {
23687
- get() {
23688
- const { forbidMultiLineImplicitObjectLiteral: s } = module2;
23689
- return s[s.length - 1];
23690
- }
23691
- },
23692
23526
  newlineBinaryOpForbidden: {
23693
23527
  get() {
23694
23528
  const { forbidNewlineBinaryOp: s } = module2;
@@ -23991,19 +23825,11 @@ ${input.slice(result.pos)}
23991
23825
  return result;
23992
23826
  }
23993
23827
  }
23994
- var Samedent$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
23995
- var indent = $2;
23996
- const { level } = indent;
23997
- const currentIndentLevel = module2.currentIndent.level;
23998
- if (level === currentIndentLevel) {
23999
- return $0;
24000
- }
24001
- return $skip;
24002
- });
24003
- function Samedent(state) {
23828
+ var PushIndent$0 = $Y($S(EOS, TrackIndented));
23829
+ function PushIndent(state) {
24004
23830
  let eventData;
24005
23831
  if (state.events) {
24006
- const result = state.events.enter?.("Samedent", state);
23832
+ const result = state.events.enter?.("PushIndent", state);
24007
23833
  if (result) {
24008
23834
  if (result.cache)
24009
23835
  return result.cache;
@@ -24011,30 +23837,27 @@ ${input.slice(result.pos)}
24011
23837
  }
24012
23838
  }
24013
23839
  if (state.tokenize) {
24014
- const result = $TOKEN("Samedent", state, Samedent$0(state));
23840
+ const result = $TOKEN("PushIndent", state, PushIndent$0(state));
24015
23841
  if (state.events)
24016
- state.events.exit?.("Samedent", state, result, eventData);
23842
+ state.events.exit?.("PushIndent", state, result, eventData);
24017
23843
  return result;
24018
23844
  } else {
24019
- const result = Samedent$0(state);
23845
+ const result = PushIndent$0(state);
24020
23846
  if (state.events)
24021
- state.events.exit?.("Samedent", state, result, eventData);
23847
+ state.events.exit?.("PushIndent", state, result, eventData);
24022
23848
  return result;
24023
23849
  }
24024
23850
  }
24025
- var IndentedFurther$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
24026
- var indent = $2;
24027
- const { level } = indent;
24028
- const currentIndentLevel = module2.currentIndent.level;
24029
- if (level > currentIndentLevel) {
24030
- return $0;
23851
+ var PopIndent$0 = $TV($EXPECT($L0, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
23852
+ if (module2.config.verbose) {
23853
+ console.log("popping indent", module2.indentLevels[module2.indentLevels.length - 1], "->", module2.indentLevels[module2.indentLevels.length - 2]);
24031
23854
  }
24032
- return $skip;
23855
+ module2.indentLevels.pop();
24033
23856
  });
24034
- function IndentedFurther(state) {
23857
+ function PopIndent(state) {
24035
23858
  let eventData;
24036
23859
  if (state.events) {
24037
- const result = state.events.enter?.("IndentedFurther", state);
23860
+ const result = state.events.enter?.("PopIndent", state);
24038
23861
  if (result) {
24039
23862
  if (result.cache)
24040
23863
  return result.cache;
@@ -24042,29 +23865,30 @@ ${input.slice(result.pos)}
24042
23865
  }
24043
23866
  }
24044
23867
  if (state.tokenize) {
24045
- const result = $TOKEN("IndentedFurther", state, IndentedFurther$0(state));
23868
+ const result = $TOKEN("PopIndent", state, PopIndent$0(state));
24046
23869
  if (state.events)
24047
- state.events.exit?.("IndentedFurther", state, result, eventData);
23870
+ state.events.exit?.("PopIndent", state, result, eventData);
24048
23871
  return result;
24049
23872
  } else {
24050
- const result = IndentedFurther$0(state);
23873
+ const result = PopIndent$0(state);
24051
23874
  if (state.events)
24052
- state.events.exit?.("IndentedFurther", state, result, eventData);
23875
+ state.events.exit?.("PopIndent", state, result, eventData);
24053
23876
  return result;
24054
23877
  }
24055
23878
  }
24056
- var NotDedented$0 = $TS($S($E($C(Samedent, IndentedFurther)), $E(_)), function($skip, $loc, $0, $1, $2) {
24057
- const ws = [];
24058
- if ($1)
24059
- ws.push(...$1);
24060
- if ($2)
24061
- ws.push(...$2);
24062
- return ws.flat(Infinity).filter(Boolean);
23879
+ var Nested$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
23880
+ var indent = $2;
23881
+ if (indent.level === module2.currentIndent.level)
23882
+ return $0;
23883
+ if (module2.config.verbose) {
23884
+ console.log(`failing Nested: ${indent.level} does not match current indent level ${module2.currentIndent.level}`);
23885
+ }
23886
+ return $skip;
24063
23887
  });
24064
- function NotDedented(state) {
23888
+ function Nested(state) {
24065
23889
  let eventData;
24066
23890
  if (state.events) {
24067
- const result = state.events.enter?.("NotDedented", state);
23891
+ const result = state.events.enter?.("Nested", state);
24068
23892
  if (result) {
24069
23893
  if (result.cache)
24070
23894
  return result.cache;
@@ -24072,24 +23896,27 @@ ${input.slice(result.pos)}
24072
23896
  }
24073
23897
  }
24074
23898
  if (state.tokenize) {
24075
- const result = $TOKEN("NotDedented", state, NotDedented$0(state));
23899
+ const result = $TOKEN("Nested", state, Nested$0(state));
24076
23900
  if (state.events)
24077
- state.events.exit?.("NotDedented", state, result, eventData);
23901
+ state.events.exit?.("Nested", state, result, eventData);
24078
23902
  return result;
24079
23903
  } else {
24080
- const result = NotDedented$0(state);
23904
+ const result = Nested$0(state);
24081
23905
  if (state.events)
24082
- state.events.exit?.("NotDedented", state, result, eventData);
23906
+ state.events.exit?.("Nested", state, result, eventData);
24083
23907
  return result;
24084
23908
  }
24085
23909
  }
24086
- var Dedented$0 = $T($S($N($C(Samedent, IndentedFurther)), EOS), function(value) {
24087
- return value[1];
23910
+ var IndentedFurther$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
23911
+ var indent = $2;
23912
+ if (indent.level > module2.currentIndent.level)
23913
+ return $0;
23914
+ return $skip;
24088
23915
  });
24089
- function Dedented(state) {
23916
+ function IndentedFurther(state) {
24090
23917
  let eventData;
24091
23918
  if (state.events) {
24092
- const result = state.events.enter?.("Dedented", state);
23919
+ const result = state.events.enter?.("IndentedFurther", state);
24093
23920
  if (result) {
24094
23921
  if (result.cache)
24095
23922
  return result.cache;
@@ -24097,22 +23924,27 @@ ${input.slice(result.pos)}
24097
23924
  }
24098
23925
  }
24099
23926
  if (state.tokenize) {
24100
- const result = $TOKEN("Dedented", state, Dedented$0(state));
23927
+ const result = $TOKEN("IndentedFurther", state, IndentedFurther$0(state));
24101
23928
  if (state.events)
24102
- state.events.exit?.("Dedented", state, result, eventData);
23929
+ state.events.exit?.("IndentedFurther", state, result, eventData);
24103
23930
  return result;
24104
23931
  } else {
24105
- const result = Dedented$0(state);
23932
+ const result = IndentedFurther$0(state);
24106
23933
  if (state.events)
24107
- state.events.exit?.("Dedented", state, result, eventData);
23934
+ state.events.exit?.("IndentedFurther", state, result, eventData);
24108
23935
  return result;
24109
23936
  }
24110
23937
  }
24111
- var PushIndent$0 = $Y($S(EOS, TrackIndented));
24112
- function PushIndent(state) {
23938
+ var IndentedAtLeast$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
23939
+ var indent = $2;
23940
+ if (indent.level >= module2.currentIndent.level)
23941
+ return $0;
23942
+ return $skip;
23943
+ });
23944
+ function IndentedAtLeast(state) {
24113
23945
  let eventData;
24114
23946
  if (state.events) {
24115
- const result = state.events.enter?.("PushIndent", state);
23947
+ const result = state.events.enter?.("IndentedAtLeast", state);
24116
23948
  if (result) {
24117
23949
  if (result.cache)
24118
23950
  return result.cache;
@@ -24120,27 +23952,29 @@ ${input.slice(result.pos)}
24120
23952
  }
24121
23953
  }
24122
23954
  if (state.tokenize) {
24123
- const result = $TOKEN("PushIndent", state, PushIndent$0(state));
23955
+ const result = $TOKEN("IndentedAtLeast", state, IndentedAtLeast$0(state));
24124
23956
  if (state.events)
24125
- state.events.exit?.("PushIndent", state, result, eventData);
23957
+ state.events.exit?.("IndentedAtLeast", state, result, eventData);
24126
23958
  return result;
24127
23959
  } else {
24128
- const result = PushIndent$0(state);
23960
+ const result = IndentedAtLeast$0(state);
24129
23961
  if (state.events)
24130
- state.events.exit?.("PushIndent", state, result, eventData);
23962
+ state.events.exit?.("IndentedAtLeast", state, result, eventData);
24131
23963
  return result;
24132
23964
  }
24133
23965
  }
24134
- var PopIndent$0 = $TV($EXPECT($L0, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
24135
- if (module2.config.verbose) {
24136
- console.log("popping indent", module2.indentLevels[module2.indentLevels.length - 1], "->", module2.indentLevels[module2.indentLevels.length - 2]);
24137
- }
24138
- module2.indentLevels.pop();
23966
+ var NotDedented$0 = $TS($S($E(IndentedAtLeast), $E(_)), function($skip, $loc, $0, $1, $2) {
23967
+ const ws = [];
23968
+ if ($1)
23969
+ ws.push(...$1);
23970
+ if ($2)
23971
+ ws.push(...$2);
23972
+ return ws.flat(Infinity).filter(Boolean);
24139
23973
  });
24140
- function PopIndent(state) {
23974
+ function NotDedented(state) {
24141
23975
  let eventData;
24142
23976
  if (state.events) {
24143
- const result = state.events.enter?.("PopIndent", state);
23977
+ const result = state.events.enter?.("NotDedented", state);
24144
23978
  if (result) {
24145
23979
  if (result.cache)
24146
23980
  return result.cache;
@@ -24148,37 +23982,24 @@ ${input.slice(result.pos)}
24148
23982
  }
24149
23983
  }
24150
23984
  if (state.tokenize) {
24151
- const result = $TOKEN("PopIndent", state, PopIndent$0(state));
23985
+ const result = $TOKEN("NotDedented", state, NotDedented$0(state));
24152
23986
  if (state.events)
24153
- state.events.exit?.("PopIndent", state, result, eventData);
23987
+ state.events.exit?.("NotDedented", state, result, eventData);
24154
23988
  return result;
24155
23989
  } else {
24156
- const result = PopIndent$0(state);
23990
+ const result = NotDedented$0(state);
24157
23991
  if (state.events)
24158
- state.events.exit?.("PopIndent", state, result, eventData);
23992
+ state.events.exit?.("NotDedented", state, result, eventData);
24159
23993
  return result;
24160
23994
  }
24161
23995
  }
24162
- var Nested$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
24163
- var eos = $1;
24164
- var indent = $2;
24165
- const { level } = indent;
24166
- const currentIndent = module2.currentIndent;
24167
- if (module2.config.verbose) {
24168
- console.log("Indented", level, currentIndent);
24169
- }
24170
- if (level !== currentIndent.level) {
24171
- if (module2.config.verbose) {
24172
- console.log("skipped nested");
24173
- }
24174
- return $skip;
24175
- }
24176
- return $0;
23996
+ var Dedented$0 = $T($S($N(IndentedAtLeast), EOS), function(value) {
23997
+ return value[1];
24177
23998
  });
24178
- function Nested(state) {
23999
+ function Dedented(state) {
24179
24000
  let eventData;
24180
24001
  if (state.events) {
24181
- const result = state.events.enter?.("Nested", state);
24002
+ const result = state.events.enter?.("Dedented", state);
24182
24003
  if (result) {
24183
24004
  if (result.cache)
24184
24005
  return result.cache;
@@ -24186,14 +24007,14 @@ ${input.slice(result.pos)}
24186
24007
  }
24187
24008
  }
24188
24009
  if (state.tokenize) {
24189
- const result = $TOKEN("Nested", state, Nested$0(state));
24010
+ const result = $TOKEN("Dedented", state, Dedented$0(state));
24190
24011
  if (state.events)
24191
- state.events.exit?.("Nested", state, result, eventData);
24012
+ state.events.exit?.("Dedented", state, result, eventData);
24192
24013
  return result;
24193
24014
  } else {
24194
- const result = Nested$0(state);
24015
+ const result = Dedented$0(state);
24195
24016
  if (state.events)
24196
- state.events.exit?.("Nested", state, result, eventData);
24017
+ state.events.exit?.("Dedented", state, result, eventData);
24197
24018
  return result;
24198
24019
  }
24199
24020
  }
@@ -24226,8 +24047,7 @@ ${input.slice(result.pos)}
24226
24047
  processBinaryOpExpression,
24227
24048
  processCallMemberExpression,
24228
24049
  processCoffeeInterpolation,
24229
- processConstAssignmentDeclaration,
24230
- processLetAssignmentDeclaration,
24050
+ processAssignmentDeclaration,
24231
24051
  processProgram,
24232
24052
  processUnaryExpression,
24233
24053
  quoteString,
@@ -24672,7 +24492,7 @@ var parse;
24672
24492
  var uncacheable;
24673
24493
  ({ parse } = import_parser.default);
24674
24494
  ({ SourceMap: SourceMap2 } = util_exports);
24675
- uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "AllowAll", "AllowClassImplicitCall", "AllowBracedApplication", "AllowIndentedApplication", "AllowMultiLineImplicitObjectLiteral", "AllowNewlineBinaryOp", "AllowTrailingMemberProperty", "AllowedTrailingMemberExpressions", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedApplicationAllowed", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "ClassImplicitCallForbidden", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "ConditionFragment", "Declaration", "Debugger", "Dedented", "ElementListWithIndentedApplicationForbidden", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationForbidden", "ExpressionWithObjectApplicationForbidden", "ExtendedExpression", "FatArrowBody", "ForbidClassImplicitCall", "ForbidBracedApplication", "ForbidIndentedApplication", "ForbidMultiLineImplicitObjectLiteral", "ForbidNewlineBinaryOp", "ForbidTrailingMemberProperty", "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", "NestedClassSignatureElement", "NestedClassSignatureElements", "NestedDeclareElement", "NestedDeclareElements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedModuleItem", "NestedModuleItems", "NestedNonAssignmentExtendedExpression", "NestedObject", "NestedPropertyDefinitions", "NewlineBinaryOpAllowed", "NonPipelineAssignmentExpression", "NonPipelineExtendedExpression", "NonPipelinePostfixedExpression", "NonSingleBracedBlock", "NotDedented", "ObjectLiteral", "PatternExpressionList", "PopIndent", "PopJSXStack", "PostfixedExpression", "PostfixedStatement", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "RestoreAll", "RestoreClassImplicitCall", "RestoreMultiLineImplicitObjectLiteral", "RestoreBracedApplication", "RestoreIndentedApplication", "RestoreTrailingMemberProperty", "RestoreNewlineBinaryOp", "RHS", "Samedent", "ShortCircuitExpression", "SingleLineAssignmentExpression", "SingleLineBinaryOpRHS", "SingleLineComment", "SingleLineStatements", "SnugNamedProperty", "Statement", "StatementListItem", "SuffixedExpression", "SuffixedStatement", "ThinArrowFunction", "TrackIndented", "TrailingMemberExpressions", "TrailingMemberPropertyAllowed", "TypedJSXElement", "TypedJSXFragment", "UnaryExpression", "UpdateExpression"]);
24495
+ uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "AllowAll", "AllowClassImplicitCall", "AllowBracedApplication", "AllowIndentedApplication", "AllowMultiLineImplicitObjectLiteral", "AllowNewlineBinaryOp", "AllowTrailingMemberProperty", "AllowedTrailingMemberExpressions", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedApplicationAllowed", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "ClassImplicitCallForbidden", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "ConditionFragment", "Declaration", "Debugger", "Dedented", "ElementListWithIndentedApplicationForbidden", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationForbidden", "ExpressionWithObjectApplicationForbidden", "ExtendedExpression", "FatArrowBody", "ForbidClassImplicitCall", "ForbidBracedApplication", "ForbidIndentedApplication", "ForbidMultiLineImplicitObjectLiteral", "ForbidNewlineBinaryOp", "ForbidTrailingMemberProperty", "FunctionDeclaration", "FunctionExpression", "HoistableDeclaration", "ImplicitArguments", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedApplicationAllowed", "IndentedAtLeast", "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", "NestedClassSignatureElement", "NestedClassSignatureElements", "NestedDeclareElement", "NestedDeclareElements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedModuleItem", "NestedModuleItems", "NestedNonAssignmentExtendedExpression", "NestedObject", "NestedPropertyDefinitions", "NewlineBinaryOpAllowed", "NonPipelineArgumentPart", "NonPipelineArgumentList", "NonPipelineAssignmentExpression", "NonPipelineExtendedExpression", "NonPipelinePostfixedExpression", "NonSingleBracedBlock", "NotDedented", "ObjectLiteral", "PatternExpressionList", "PopIndent", "PopJSXStack", "PostfixedExpression", "PostfixedStatement", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "RestoreAll", "RestoreClassImplicitCall", "RestoreMultiLineImplicitObjectLiteral", "RestoreBracedApplication", "RestoreIndentedApplication", "RestoreTrailingMemberProperty", "RestoreNewlineBinaryOp", "RHS", "ShortCircuitExpression", "SingleLineAssignmentExpression", "SingleLineBinaryOpRHS", "SingleLineComment", "SingleLineStatements", "SnugNamedProperty", "Statement", "StatementListItem", "SuffixedExpression", "SuffixedStatement", "ThinArrowFunction", "TrackIndented", "TrailingMemberExpressions", "TrailingMemberPropertyAllowed", "TypedJSXElement", "TypedJSXFragment", "UnaryExpression", "UpdateExpression"]);
24676
24496
  var compile = function(src, options) {
24677
24497
  var ast, code, events, filename, ref, result, sm;
24678
24498
  if (!options) {