@danielx/civet 0.8.16 → 0.8.17

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/browser.js CHANGED
@@ -1204,7 +1204,6 @@ ${body}`;
1204
1204
  "JSXElement",
1205
1205
  "JSXFragment",
1206
1206
  "Literal",
1207
- "NewExpression",
1208
1207
  "ParenthesizedExpression",
1209
1208
  "Ref",
1210
1209
  "Placeholder",
@@ -1226,7 +1225,10 @@ ${body}`;
1226
1225
  if (skipParens.has(expression.type)) {
1227
1226
  return expression;
1228
1227
  }
1229
- if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($6) => $6.type === "ObjectExpression")) {
1228
+ if (expression.type === "NewExpression" && expression.expression.children.some(($6) => $6?.type === "Call")) {
1229
+ return expression;
1230
+ }
1231
+ if (expression.type === "MemberExpression" && !startsWithPredicate(expression, ($7) => $7.type === "ObjectExpression")) {
1230
1232
  return expression;
1231
1233
  }
1232
1234
  }
@@ -1762,13 +1764,14 @@ ${body}`;
1762
1764
  return;
1763
1765
  }
1764
1766
  if (opts?.injectParamProps && n.type === "Parameter" && n.accessModifier) {
1765
- n.names.forEach((id) => ({
1766
- push: thisAssignments2.push({
1767
+ for (let ref1 = n.names, i2 = 0, len1 = ref1.length; i2 < len1; i2++) {
1768
+ const id = ref1[i2];
1769
+ thisAssignments2.push({
1767
1770
  type: "AssignmentExpression",
1768
1771
  children: [`this.${id} = `, id],
1769
1772
  js: true
1770
- })
1771
- }));
1773
+ });
1774
+ }
1772
1775
  return;
1773
1776
  }
1774
1777
  const { blockPrefix } = n;
@@ -1780,8 +1783,8 @@ ${body}`;
1780
1783
  return [splices, thisAssignments];
1781
1784
  }
1782
1785
  function arrayElementHasTrailingComma(elementNode) {
1783
- let ref1;
1784
- const lastChild = (ref1 = elementNode.children)[ref1.length - 1];
1786
+ let ref2;
1787
+ const lastChild = (ref2 = elementNode.children)[ref2.length - 1];
1785
1788
  return lastChild && lastChild[lastChild.length - 1]?.token === ",";
1786
1789
  }
1787
1790
  function gatherBindingPatternTypeSuffix(pattern) {
@@ -1793,8 +1796,8 @@ ${body}`;
1793
1796
  case "ArrayBindingPattern": {
1794
1797
  {
1795
1798
  const results = [];
1796
- for (let ref2 = pattern.elements, i2 = 0, len1 = ref2.length; i2 < len1; i2++) {
1797
- const elem = ref2[i2];
1799
+ for (let ref3 = pattern.elements, i3 = 0, len22 = ref3.length; i3 < len22; i3++) {
1800
+ const elem = ref3[i3];
1798
1801
  let { typeSuffix } = elem;
1799
1802
  typeSuffix ??= elem.binding?.typeSuffix;
1800
1803
  if (typeSuffix) {
@@ -1832,8 +1835,8 @@ ${body}`;
1832
1835
  {
1833
1836
  let restType;
1834
1837
  const results1 = [];
1835
- for (let ref3 = pattern.properties, i3 = 0, len22 = ref3.length; i3 < len22; i3++) {
1836
- const prop = ref3[i3];
1838
+ for (let ref4 = pattern.properties, i4 = 0, len3 = ref4.length; i4 < len3; i4++) {
1839
+ const prop = ref4[i4];
1837
1840
  let { typeSuffix } = prop;
1838
1841
  typeSuffix ??= prop.value?.typeSuffix;
1839
1842
  if (typeSuffix) {
@@ -2000,8 +2003,14 @@ ${body}`;
2000
2003
  // [indent, statement]
2001
2004
  preludeVar,
2002
2005
  moduloRef,
2003
- ts(": (a: number, b: number) => number"),
2004
- " = (a, b) => (a % b + b) % b"
2006
+ " = ",
2007
+ ts("("),
2008
+ "(a",
2009
+ ts(": number"),
2010
+ ", b",
2011
+ ts(": number"),
2012
+ ") => (a % b + b) % b",
2013
+ ts(") as ((a: number, b: number) => number) & ((a: bigint, b: bigint) => bigint)")
2005
2014
  ], ";\n"]);
2006
2015
  },
2007
2016
  Falsy(FalsyRef) {
@@ -2566,7 +2575,7 @@ ${js}`
2566
2575
  if (!Array.isArray(args)) {
2567
2576
  throw new Error("getTypeArguments could not find relevant array");
2568
2577
  }
2569
- return args.filter((a) => typeof a === "object" && a != null && "type" in a && a.type === "TypeArgument");
2578
+ return args.filter((a1) => typeof a1 === "object" && a1 != null && "type" in a1 && a1.type === "TypeArgument");
2570
2579
  }
2571
2580
  function isVoidType(t) {
2572
2581
  return typeof t === "object" && t != null && "type" in t && t.type === "TypeLiteral" && "t" in t && typeof t.t === "object" && t.t != null && "type" in t.t && t.t.type === "VoidType";
@@ -3432,7 +3441,7 @@ ${js}`
3432
3441
  if (isConstructor) {
3433
3442
  const { ancestor } = findAncestor(f, ($6) => $6.type === "ClassExpression");
3434
3443
  if (ancestor != null) {
3435
- const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($7) => $7.type === "FieldDefinition").map(($8) => $8.id).filter((a1) => typeof a1 === "object" && a1 != null && "type" in a1 && a1.type === "Identifier").map(($9) => $9.name));
3444
+ const fields = new Set(gatherRecursiveWithinFunction(ancestor, ($7) => $7.type === "FieldDefinition").map(($8) => $8.id).filter((a2) => typeof a2 === "object" && a2 != null && "type" in a2 && a2.type === "Identifier").map(($9) => $9.name));
3436
3445
  const classExpressions = ancestor.body.expressions;
3437
3446
  let index = findChildIndex(classExpressions, f);
3438
3447
  assert.notEqual(index, -1, "Could not find constructor in class");
@@ -3443,15 +3452,20 @@ ${js}`
3443
3452
  const fStatement = classExpressions[index];
3444
3453
  for (let ref16 = gatherRecursive(parameters, ($10) => $10.type === "Parameter"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
3445
3454
  const parameter = ref16[i8];
3446
- if (!parameter.typeSuffix) {
3455
+ const { accessModifier } = parameter;
3456
+ if (!(accessModifier || parameter.typeSuffix)) {
3447
3457
  continue;
3448
3458
  }
3449
3459
  for (let ref17 = gatherRecursive(parameter, ($11) => $11.type === "AtBinding"), i9 = 0, len8 = ref17.length; i9 < len8; i9++) {
3450
3460
  const binding = ref17[i9];
3451
3461
  const typeSuffix = binding.parent?.typeSuffix;
3452
- if (!typeSuffix) {
3462
+ if (!(accessModifier || typeSuffix)) {
3453
3463
  continue;
3454
3464
  }
3465
+ if (parameter.accessModifier) {
3466
+ replaceNode(parameter.accessModifier, void 0);
3467
+ parameter.accessModifier = void 0;
3468
+ }
3455
3469
  const id = binding.ref.id;
3456
3470
  if (fields.has(id)) {
3457
3471
  continue;
@@ -3460,7 +3474,7 @@ ${js}`
3460
3474
  type: "FieldDefinition",
3461
3475
  id,
3462
3476
  typeSuffix,
3463
- children: [id, typeSuffix]
3477
+ children: [accessModifier, id, typeSuffix]
3464
3478
  }, ";"]);
3465
3479
  fStatement[0] = "";
3466
3480
  }
@@ -3484,10 +3498,10 @@ ${js}`
3484
3498
  if (isConstructor) {
3485
3499
  const superCalls = gatherNodes(
3486
3500
  expressions,
3487
- (a2) => typeof a2 === "object" && a2 != null && "type" in a2 && a2.type === "CallExpression" && "children" in a2 && Array.isArray(a2.children) && a2.children.length >= 1 && typeof a2.children[0] === "object" && a2.children[0] != null && "token" in a2.children[0] && a2.children[0].token === "super"
3501
+ (a3) => typeof a3 === "object" && a3 != null && "type" in a3 && a3.type === "CallExpression" && "children" in a3 && Array.isArray(a3.children) && a3.children.length >= 1 && typeof a3.children[0] === "object" && a3.children[0] != null && "token" in a3.children[0] && a3.children[0].token === "super"
3488
3502
  );
3489
3503
  if (superCalls.length) {
3490
- const { child } = findAncestor(superCalls[0], (a3) => a3 === block);
3504
+ const { child } = findAncestor(superCalls[0], (a4) => a4 === block);
3491
3505
  const index = findChildIndex(expressions, child);
3492
3506
  if (index < 0) {
3493
3507
  throw new Error("Could not find super call within top-level expressions");
@@ -3502,21 +3516,33 @@ ${js}`
3502
3516
  function processSignature(f) {
3503
3517
  const { block, signature } = f;
3504
3518
  if (!f.async?.length && hasAwait(block)) {
3505
- f.async.push("async ");
3506
- signature.modifier.async = true;
3507
- }
3508
- if (!f.generator?.length && hasYield(block)) {
3509
- if (f.type === "ArrowFunction") {
3510
- gatherRecursiveWithinFunction(block, ($12) => $12.type === "YieldExpression").forEach((y) => {
3511
- const i = y.children.findIndex(($13) => $13.type === "Yield");
3512
- return y.children.splice(i + 1, 0, {
3519
+ if (f.async != null) {
3520
+ f.async.push("async ");
3521
+ signature.modifier.async = true;
3522
+ } else {
3523
+ for (let ref18 = gatherRecursiveWithinFunction(block, ($12) => $12.type === "Await"), i10 = 0, len9 = ref18.length; i10 < len9; i10++) {
3524
+ const a = ref18[i10];
3525
+ const i = findChildIndex(a.parent, a);
3526
+ a.parent.children.splice(i + 1, 0, {
3513
3527
  type: "Error",
3514
- message: "Can't use yield inside of => arrow function"
3528
+ message: `await invalid in ${signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
3515
3529
  });
3516
- });
3517
- } else {
3530
+ }
3531
+ }
3532
+ }
3533
+ if (!f.generator?.length && hasYield(block)) {
3534
+ if (f.generator != null) {
3518
3535
  f.generator.push("*");
3519
3536
  signature.modifier.generator = true;
3537
+ } else {
3538
+ for (let ref19 = gatherRecursiveWithinFunction(block, ($13) => $13.type === "YieldExpression"), i11 = 0, len10 = ref19.length; i11 < len10; i11++) {
3539
+ const y = ref19[i11];
3540
+ const i = y.children.findIndex(($14) => $14.type === "Yield");
3541
+ y.children.splice(i + 1, 0, {
3542
+ type: "Error",
3543
+ message: `yield invalid in ${f.type === "ArrowFunction" ? "=> arrow function" : signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
3544
+ });
3545
+ }
3520
3546
  }
3521
3547
  }
3522
3548
  if (signature.modifier.async && !signature.modifier.generator && signature.returnType && !isPromiseType(signature.returnType.t)) {
@@ -3524,21 +3550,15 @@ ${js}`
3524
3550
  }
3525
3551
  }
3526
3552
  function processFunctions(statements, config2) {
3527
- for (let ref18 = gatherRecursiveAll(statements, ($14) => $14.type === "FunctionExpression" || $14.type === "ArrowFunction"), i10 = 0, len9 = ref18.length; i10 < len9; i10++) {
3528
- const f = ref18[i10];
3529
- if (f.type === "FunctionExpression") {
3553
+ for (let ref20 = gatherRecursiveAll(statements, ($15) => $15.type === "FunctionExpression" || $15.type === "ArrowFunction" || $15.type === "MethodDefinition"), i12 = 0, len11 = ref20.length; i12 < len11; i12++) {
3554
+ const f = ref20[i12];
3555
+ if (f.type === "FunctionExpression" || f.type === "MethodDefinition") {
3530
3556
  implicitFunctionBlock(f);
3531
3557
  }
3532
3558
  processSignature(f);
3533
3559
  processParams(f);
3534
3560
  processReturn(f, config2.implicitReturns);
3535
3561
  }
3536
- for (let ref19 = gatherRecursiveAll(statements, ($15) => $15.type === "MethodDefinition"), i11 = 0, len10 = ref19.length; i11 < len10; i11++) {
3537
- const f = ref19[i11];
3538
- implicitFunctionBlock(f);
3539
- processParams(f);
3540
- processReturn(f, config2.implicitReturns);
3541
- }
3542
3562
  }
3543
3563
  function expressionizeIteration(exp) {
3544
3564
  let { async, generator, block, children, statement } = exp;
@@ -3587,9 +3607,9 @@ ${js}`
3587
3607
  }
3588
3608
  let done;
3589
3609
  if (!async) {
3590
- let ref20;
3591
- if ((ref20 = blockContainingStatement(exp)) && typeof ref20 === "object" && "block" in ref20 && "index" in ref20) {
3592
- const { block: parentBlock, index } = ref20;
3610
+ let ref21;
3611
+ if ((ref21 = blockContainingStatement(exp)) && typeof ref21 === "object" && "block" in ref21 && "index" in ref21) {
3612
+ const { block: parentBlock, index } = ref21;
3593
3613
  statements[0][0] = parentBlock.expressions[index][0];
3594
3614
  parentBlock.expressions.splice(index, index + 1 - index, ...statements);
3595
3615
  updateParentPointers(parentBlock);
@@ -3606,8 +3626,8 @@ ${js}`
3606
3626
  }
3607
3627
  }
3608
3628
  function processIterationExpressions(statements) {
3609
- for (let ref21 = gatherRecursiveAll(statements, ($16) => $16.type === "IterationExpression"), i12 = 0, len11 = ref21.length; i12 < len11; i12++) {
3610
- const s = ref21[i12];
3629
+ for (let ref22 = gatherRecursiveAll(statements, ($16) => $16.type === "IterationExpression"), i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
3630
+ const s = ref22[i13];
3611
3631
  expressionizeIteration(s);
3612
3632
  }
3613
3633
  }
@@ -3633,21 +3653,21 @@ ${js}`
3633
3653
  ...parameters,
3634
3654
  children: (() => {
3635
3655
  const results1 = [];
3636
- for (let ref22 = parameters.children, i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
3637
- let parameter = ref22[i13];
3656
+ for (let ref23 = parameters.children, i14 = 0, len13 = ref23.length; i14 < len13; i14++) {
3657
+ let parameter = ref23[i14];
3638
3658
  if (typeof parameter === "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
3639
- let ref23;
3640
- if (ref23 = parameter.initializer) {
3641
- const initializer = ref23;
3659
+ let ref24;
3660
+ if (ref24 = parameter.initializer) {
3661
+ const initializer = ref24;
3642
3662
  args.push(initializer.expression, parameter.delim);
3643
3663
  parameter = {
3644
3664
  ...parameter,
3645
3665
  initializer: void 0,
3646
- children: parameter.children.filter((a4) => a4 !== initializer)
3666
+ children: parameter.children.filter((a5) => a5 !== initializer)
3647
3667
  };
3648
3668
  } else {
3649
3669
  args.push(parameter.children.filter(
3650
- (a5) => a5 !== parameter.typeSuffix
3670
+ (a6) => a6 !== parameter.typeSuffix
3651
3671
  ));
3652
3672
  }
3653
3673
  }
@@ -3720,7 +3740,7 @@ ${js}`
3720
3740
  }
3721
3741
  if (gatherRecursiveWithinFunction(
3722
3742
  block,
3723
- (a6) => a6 === ref
3743
+ (a7) => a7 === ref
3724
3744
  ).length > 1) {
3725
3745
  fn.ampersandBlock = false;
3726
3746
  }
@@ -5397,7 +5417,6 @@ ${js}`
5397
5417
 
5398
5418
  // source/parser/pipe.civet
5399
5419
  function constructInvocation(fn, arg) {
5400
- const fnArr = [fn.leadingComment, fn.expr, fn.trailingComment];
5401
5420
  let expr = fn.expr;
5402
5421
  while (expr.type === "ParenthesizedExpression") {
5403
5422
  expr = expr.expression;
@@ -5414,22 +5433,46 @@ ${js}`
5414
5433
  });
5415
5434
  }
5416
5435
  expr = fn.expr;
5417
- const lhs = makeLeftHandSideExpression(expr);
5436
+ let lhs = expr;
5437
+ if (!(lhs.type === "NewExpression")) {
5438
+ lhs = makeLeftHandSideExpression(lhs);
5439
+ }
5418
5440
  let comment = skipIfOnlyWS(fn.trailingComment);
5419
5441
  if (comment)
5420
- lhs.children.splice(2, 0, comment);
5442
+ lhs.children.push(comment);
5421
5443
  comment = skipIfOnlyWS(fn.leadingComment);
5422
5444
  if (comment)
5423
5445
  lhs.children.splice(1, 0, comment);
5424
5446
  switch (arg.type) {
5425
- case "CommaExpression":
5447
+ case "CommaExpression": {
5426
5448
  arg = makeLeftHandSideExpression(arg);
5427
5449
  break;
5450
+ }
5428
5451
  }
5429
- return {
5430
- type: "CallExpression",
5431
- children: [lhs, "(", arg, ")"]
5452
+ const args = [arg];
5453
+ const call = {
5454
+ type: "Call",
5455
+ args,
5456
+ children: ["(", args, ")"]
5432
5457
  };
5458
+ if (lhs.type === "NewExpression") {
5459
+ let { expression } = lhs;
5460
+ expression = {
5461
+ ...expression,
5462
+ type: "CallExpression",
5463
+ children: [...expression.children, call]
5464
+ };
5465
+ return {
5466
+ ...lhs,
5467
+ expression,
5468
+ children: lhs.children.map(($) => $ === lhs.expression ? expression : $)
5469
+ };
5470
+ } else {
5471
+ return {
5472
+ type: "CallExpression",
5473
+ children: [lhs, call]
5474
+ };
5475
+ }
5433
5476
  }
5434
5477
  function constructPipeStep(fn, arg, returning) {
5435
5478
  if (!returning) {
@@ -5476,21 +5519,24 @@ ${js}`
5476
5519
  let i = 0, l = body.length;
5477
5520
  const children = [ws];
5478
5521
  let usingRef = null;
5479
- for (i = 0; i < l; i++) {
5480
- const step = body[i];
5522
+ for (let i1 = 0, len3 = body.length; i1 < len3; i1++) {
5523
+ const i2 = i1;
5524
+ const step = body[i1];
5481
5525
  const [leadingComment, pipe, trailingComment, expr] = step;
5482
5526
  const returns = pipe.token === "||>";
5483
5527
  let ref, result, returning = returns ? arg : null;
5484
5528
  if (pipe.token === "|>=") {
5485
5529
  let initRef;
5486
- if (i === 0) {
5530
+ if (i2 === 0) {
5487
5531
  checkValidLHS(arg);
5488
5532
  outer:
5489
5533
  switch (arg.type) {
5490
- case "MemberExpression":
5491
- if (arg.children.length <= 2)
5534
+ case "MemberExpression": {
5535
+ if (arg.children.length <= 2) {
5492
5536
  break;
5493
- case "CallExpression":
5537
+ }
5538
+ }
5539
+ case "CallExpression": {
5494
5540
  const access = arg.children.pop();
5495
5541
  usingRef = makeRef();
5496
5542
  initRef = {
@@ -5502,6 +5548,7 @@ ${js}`
5502
5548
  children: [usingRef, access]
5503
5549
  };
5504
5550
  break;
5551
+ }
5505
5552
  }
5506
5553
  const lhs = [[
5507
5554
  [initRef],
@@ -5530,7 +5577,7 @@ ${js}`
5530
5577
  });
5531
5578
  }
5532
5579
  } else {
5533
- if (i === 0)
5580
+ if (i2 === 0)
5534
5581
  s.children = children;
5535
5582
  }
5536
5583
  if (returns && (ref = needsRef(arg))) {
@@ -5555,7 +5602,7 @@ ${js}`
5555
5602
  returning
5556
5603
  );
5557
5604
  if (result.type === "ReturnStatement") {
5558
- if (i < l - 1) {
5605
+ if (i2 < l - 1) {
5559
5606
  result.children.push({
5560
5607
  type: "Error",
5561
5608
  message: "Can't continue a pipeline after returning"
@@ -5583,7 +5630,7 @@ ${js}`
5583
5630
  };
5584
5631
  }
5585
5632
  children.push(arg);
5586
- if (!children.some(($) => $?.type === "ReturnStatement") && children.some(($1) => $1 === ",")) {
5633
+ if (!children.some(($1) => $1?.type === "ReturnStatement") && children.some(($2) => $2 === ",")) {
5587
5634
  const { parent } = s;
5588
5635
  const parenthesizedExpression = makeLeftHandSideExpression({ ...s });
5589
5636
  Object.assign(s, parenthesizedExpression, {
@@ -5869,7 +5916,8 @@ ${js}`
5869
5916
  blockPrefix.push(["", {
5870
5917
  type: "Declaration",
5871
5918
  children: [declaration, " = ", trimFirstSpace(expRef2), "[", counterRef, "]"],
5872
- names: assignmentNames
5919
+ names: assignmentNames,
5920
+ implicitLift: true
5873
5921
  }, ";"]);
5874
5922
  declaration = {
5875
5923
  type: "Declaration",
@@ -6957,19 +7005,19 @@ ${js}`
6957
7005
  }
6958
7006
  function convertMethodToFunction(method) {
6959
7007
  const { signature, block } = method;
6960
- let { modifier, optional } = signature;
6961
- if (optional)
7008
+ const { async, modifier, optional } = signature;
7009
+ if (optional) {
6962
7010
  return;
6963
- if (modifier) {
6964
- if (modifier.get || modifier.set) {
6965
- return;
6966
- } else if (modifier.async) {
6967
- modifier = [modifier.children[0][0], " function ", ...modifier.children.slice(1)];
6968
- } else {
6969
- modifier = ["function ", ...modifier.children || []];
7011
+ }
7012
+ if (modifier?.get || modifier?.set) {
7013
+ return;
7014
+ }
7015
+ const func = ["function "];
7016
+ if (async != null) {
7017
+ func.unshift(async);
7018
+ if (async.length && !async[async.length - 1]?.length) {
7019
+ async.push(" ");
6970
7020
  }
6971
- } else {
6972
- modifier = "function ";
6973
7021
  }
6974
7022
  return {
6975
7023
  ...signature,
@@ -6977,7 +7025,7 @@ ${js}`
6977
7025
  signature,
6978
7026
  type: "FunctionExpression",
6979
7027
  children: [
6980
- [modifier, ...signature.children.slice(1)],
7028
+ [...func, ...signature.children.slice(1)],
6981
7029
  block
6982
7030
  ],
6983
7031
  block
@@ -7091,7 +7139,8 @@ ${js}`
7091
7139
  block = {
7092
7140
  type: "BlockStatement",
7093
7141
  expressions,
7094
- children: ["{ ", expressions, " }"]
7142
+ children: ["{ ", expressions, " }"],
7143
+ bare: false
7095
7144
  };
7096
7145
  }
7097
7146
  if (autoReturn) {
@@ -7804,7 +7853,13 @@ ${js}`
7804
7853
  }
7805
7854
  } else {
7806
7855
  let child;
7856
+ let implicitLift;
7807
7857
  ({ ancestor, child } = findAncestor(exp, (ancestor2, child2) => {
7858
+ const prevImplicitLift = implicitLift;
7859
+ ({ implicitLift } = ancestor2);
7860
+ if (prevImplicitLift) {
7861
+ return;
7862
+ }
7808
7863
  const { type } = ancestor2;
7809
7864
  if (type === "IfStatement") {
7810
7865
  liftedIfs.add(ancestor2);
@@ -7890,7 +7945,7 @@ ${js}`
7890
7945
  const placeholder = placeholders[i15];
7891
7946
  typeSuffix ??= placeholder.typeSuffix;
7892
7947
  let ref26;
7893
- replaceNode((ref26 = placeholder.children)[ref26.length - 1], ref);
7948
+ (ref26 = placeholder.children)[ref26.length - 1] = ref;
7894
7949
  }
7895
7950
  const { parent } = ancestor;
7896
7951
  const body = maybeUnwrap(ancestor);
@@ -8180,6 +8235,7 @@ ${js}`
8180
8235
  LeftHandSideExpression,
8181
8236
  CallExpression,
8182
8237
  CallExpressionRest,
8238
+ ExplicitCallExpressionRest,
8183
8239
  OptionalShorthand,
8184
8240
  OptionalDot,
8185
8241
  NonNullAssertion,
@@ -8463,8 +8519,8 @@ ${js}`
8463
8519
  Debugger,
8464
8520
  MaybeNestedNonPipelineExpression,
8465
8521
  MaybeNestedPostfixedExpression,
8522
+ NestedPostfixedExpressionNoTrailing,
8466
8523
  MaybeNestedExpression,
8467
- NestedExpression,
8468
8524
  MaybeParenNestedExpression,
8469
8525
  ImportDeclaration,
8470
8526
  ImpliedImport,
@@ -9477,7 +9533,7 @@ ${js}`
9477
9533
  function ArgumentsWithTrailingCallExpressions(ctx, state2) {
9478
9534
  return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingCallExpressions", ArgumentsWithTrailingCallExpressions$0);
9479
9535
  }
9480
- var TrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(IndentedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
9536
+ var TrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(ExplicitCallExpressionRest), (0, import_lib2.$E)(IndentedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
9481
9537
  $1 = $1.flat();
9482
9538
  if (!$1.length && !$2)
9483
9539
  return $skip;
@@ -9573,10 +9629,10 @@ ${js}`
9573
9629
  function NestedArgumentList(ctx, state2) {
9574
9630
  return (0, import_lib2.$EVENT)(ctx, state2, "NestedArgumentList", NestedArgumentList$0);
9575
9631
  }
9576
- var NestedArgument$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Nested, (0, import_lib2.$N)(Bullet), SingleLineArgumentExpressions, ParameterElementDelimiter), function($skip, $loc, $0, $1, $2, $3, $4) {
9577
- var indent = $1;
9578
- var args = $3;
9579
- var comma = $4;
9632
+ var NestedArgument$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedImplicitPropertyDefinition), Nested, (0, import_lib2.$N)(Bullet), SingleLineArgumentExpressions, ParameterElementDelimiter), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
9633
+ var indent = $2;
9634
+ var args = $4;
9635
+ var comma = $5;
9580
9636
  let [arg0, ...rest] = args;
9581
9637
  arg0 = prepend(indent, arg0);
9582
9638
  return [arg0, ...rest, comma];
@@ -10766,6 +10822,32 @@ ${js}`
10766
10822
  function CallExpressionRest(ctx, state2) {
10767
10823
  return (0, import_lib2.$EVENT_C)(ctx, state2, "CallExpressionRest", CallExpressionRest$$);
10768
10824
  }
10825
+ var ExplicitCallExpressionRest$0 = MemberExpressionRest;
10826
+ var ExplicitCallExpressionRest$1 = (0, import_lib2.$T)((0, import_lib2.$S)(TypeArguments, (0, import_lib2.$N)((0, import_lib2.$C)(IdentifierName, NumericLiteral))), function(value) {
10827
+ return value[0];
10828
+ });
10829
+ var ExplicitCallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R8, "ExplicitCallExpressionRest /(?=['\"`])/"), (0, import_lib2.$C)(TemplateLiteral, StringLiteral)), function($skip, $loc, $0, $1, $2) {
10830
+ var literal = $2;
10831
+ if (literal.type === "StringLiteral") {
10832
+ literal = "`" + literal.token.slice(1, -1).replace(/(`|\$\{)/g, "\\$1") + "`";
10833
+ }
10834
+ return literal;
10835
+ });
10836
+ var ExplicitCallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ExplicitArguments), function($skip, $loc, $0, $1, $2) {
10837
+ var optional = $1;
10838
+ var call = $2;
10839
+ if (!optional)
10840
+ return call;
10841
+ return {
10842
+ ...call,
10843
+ children: [optional, ...call.children],
10844
+ optional
10845
+ };
10846
+ });
10847
+ var ExplicitCallExpressionRest$$ = [ExplicitCallExpressionRest$0, ExplicitCallExpressionRest$1, ExplicitCallExpressionRest$2, ExplicitCallExpressionRest$3];
10848
+ function ExplicitCallExpressionRest(ctx, state2) {
10849
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "ExplicitCallExpressionRest", ExplicitCallExpressionRest$$);
10850
+ }
10769
10851
  var OptionalShorthand$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R9, "OptionalShorthand /(?=[\\/?])/"), (0, import_lib2.$Q)(InlineComment), QuestionMark, OptionalDot), function($skip, $loc, $0, $1, $2, $3, $4) {
10770
10852
  var comments = $2;
10771
10853
  var q = $3;
@@ -11403,7 +11485,8 @@ ${js}`
11403
11485
  return {
11404
11486
  type: "AtBinding",
11405
11487
  children: [ref],
11406
- ref
11488
+ ref,
11489
+ names: []
11407
11490
  };
11408
11491
  });
11409
11492
  var NWBindingIdentifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Hash, AtIdentifierRef), function($skip, $loc, $0, $1, $2) {
@@ -11412,7 +11495,8 @@ ${js}`
11412
11495
  return {
11413
11496
  type: "AtBinding",
11414
11497
  children: [ref],
11415
- ref
11498
+ ref,
11499
+ names: []
11416
11500
  };
11417
11501
  });
11418
11502
  var NWBindingIdentifier$2 = Identifier;
@@ -13528,52 +13612,23 @@ ${js}`
13528
13612
  abstract: true,
13529
13613
  signature,
13530
13614
  parameters: signature.parameters,
13615
+ async: signature.async,
13616
+ generator: signature.generator,
13531
13617
  ts: true
13532
13618
  };
13533
13619
  });
13534
13620
  var MethodDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(MethodSignature, (0, import_lib2.$N)((0, import_lib2.$C)(PropertyAccess, ExplicitPropertyGlob, UnaryPostfix, NonNullAssertion)), (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3) {
13535
13621
  var signature = $1;
13536
13622
  var block = $3;
13537
- let children = $0;
13538
- let generatorPos = 0;
13539
- let { modifier } = signature;
13540
- if (hasAwait(block)) {
13541
- generatorPos++;
13542
- children = children.slice();
13543
- if (modifier?.get || modifier?.set) {
13544
- children.push({
13545
- type: "Error",
13546
- message: "Getters and setters cannot be async"
13547
- });
13548
- } else if (modifier?.async) {
13549
- } else {
13550
- children.unshift("async ");
13551
- modifier = { ...modifier, async: true };
13552
- signature = { ...signature, modifier };
13553
- }
13554
- }
13555
- if (hasYield(block)) {
13556
- if (children === $0)
13557
- children = children.slice();
13558
- if (modifier?.get || modifier?.set) {
13559
- children.push({
13560
- type: "Error",
13561
- message: "Getters and setters cannot be generators"
13562
- });
13563
- } else if (modifier?.generator) {
13564
- } else {
13565
- children.splice(generatorPos, 0, "*");
13566
- modifier = { ...modifier, generator: true };
13567
- signature = { ...signature, modifier };
13568
- }
13569
- }
13570
13623
  return {
13571
13624
  type: "MethodDefinition",
13572
- children,
13625
+ children: $0,
13573
13626
  name: signature.name,
13574
13627
  signature,
13575
13628
  block,
13576
- parameters: signature.parameters
13629
+ parameters: signature.parameters,
13630
+ async: signature.async,
13631
+ generator: signature.generator
13577
13632
  };
13578
13633
  });
13579
13634
  var MethodDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(GetOrSet, (0, import_lib2.$E)(_), ForbidIndentedApplication, (0, import_lib2.$E)((0, import_lib2.$S)(MemberBase, (0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(ReturnTypeSuffix))), RestoreIndentedApplication, (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
@@ -13656,36 +13711,38 @@ ${js}`
13656
13711
  }
13657
13712
  var MethodModifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(GetOrSet, (0, import_lib2.$E)(_), (0, import_lib2.$Y)(ClassElementName)), function($skip, $loc, $0, $1, $2, $3) {
13658
13713
  var kind = $1;
13714
+ var ws = $2;
13659
13715
  return {
13660
- type: "MethodModifier",
13661
- async: false,
13662
- generator: false,
13663
- get: kind.token === "get",
13664
- set: kind.token === "set",
13665
- children: $0
13666
- };
13667
- });
13668
- var MethodModifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$S)(Async, __), (0, import_lib2.$E)((0, import_lib2.$S)(Star, __))), function($skip, $loc, $0, $1, $2) {
13669
- return {
13670
- type: "MethodModifier",
13671
- async: true,
13672
- get: false,
13673
- set: false,
13674
- generator: !!$2,
13675
- children: $0
13716
+ // no async or generator, because getters and setters can't be
13717
+ modifier: {
13718
+ async: false,
13719
+ generator: false,
13720
+ get: kind.token === "get",
13721
+ set: kind.token === "set"
13722
+ },
13723
+ children: [kind, ws]
13676
13724
  };
13677
13725
  });
13678
- var MethodModifier$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(Star, __), function($skip, $loc, $0, $1, $2) {
13726
+ var MethodModifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Async, __)), (0, import_lib2.$E)((0, import_lib2.$S)(Star, __))), function($skip, $loc, $0, $1, $2) {
13727
+ var async = $1;
13728
+ var generator = $2;
13729
+ if (!async)
13730
+ async = [];
13731
+ if (!generator)
13732
+ generator = [];
13679
13733
  return {
13680
- type: "MethodModifier",
13681
- async: false,
13682
- get: false,
13683
- set: false,
13684
- generator: true,
13685
- children: $0
13734
+ async,
13735
+ generator,
13736
+ modifier: {
13737
+ async: !!async.length,
13738
+ get: false,
13739
+ set: false,
13740
+ generator: !!generator.length
13741
+ },
13742
+ children: [async, generator]
13686
13743
  };
13687
13744
  });
13688
- var MethodModifier$$ = [MethodModifier$0, MethodModifier$1, MethodModifier$2];
13745
+ var MethodModifier$$ = [MethodModifier$0, MethodModifier$1];
13689
13746
  function MethodModifier(ctx, state2) {
13690
13747
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MethodModifier", MethodModifier$$);
13691
13748
  }
@@ -13700,10 +13757,12 @@ ${js}`
13700
13757
  parameters
13701
13758
  };
13702
13759
  });
13703
- var MethodSignature$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(MethodModifier), ClassElementName, (0, import_lib2.$E)(_), (0, import_lib2.$E)(QuestionMark), (0, import_lib2.$E)(_), NonEmptyParameters, (0, import_lib2.$E)(ReturnTypeSuffix)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
13760
+ var MethodSignature$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(MethodModifier, ClassElementName, (0, import_lib2.$E)(_), (0, import_lib2.$E)(QuestionMark), (0, import_lib2.$E)(_), NonEmptyParameters, (0, import_lib2.$E)(ReturnTypeSuffix)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
13704
13761
  var modifier = $1;
13705
13762
  var name = $2;
13763
+ var ws1 = $3;
13706
13764
  var optional = $4;
13765
+ var ws2 = $5;
13707
13766
  var parameters = $6;
13708
13767
  var returnType = $7;
13709
13768
  if (name.name) {
@@ -13712,14 +13771,15 @@ ${js}`
13712
13771
  name = name.token.match(/^(?:"|')/) ? name.token.slice(1, -1) : name.token;
13713
13772
  }
13714
13773
  if (optional)
13715
- $0[3] = optional = { ...optional, ts: true };
13716
- modifier = modifier || {};
13774
+ optional = { ...optional, ts: true };
13717
13775
  return {
13718
13776
  type: "MethodSignature",
13719
- children: $0,
13777
+ children: [...modifier.children, name, ws1, optional, ws2, parameters, returnType],
13778
+ async: modifier.async,
13779
+ generator: modifier.generator,
13720
13780
  name,
13721
13781
  optional,
13722
- modifier,
13782
+ modifier: modifier.modifier,
13723
13783
  // get/set/async/generator
13724
13784
  returnType,
13725
13785
  parameters
@@ -15720,48 +15780,65 @@ ${js}`
15720
15780
  return (0, import_lib2.$EVENT)(ctx, state2, "Debugger", Debugger$0);
15721
15781
  }
15722
15782
  var MaybeNestedNonPipelineExpression$0 = NestedBulletedArray;
15723
- var MaybeNestedNonPipelineExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, NonPipelineExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15724
- if ($3)
15725
- return $3;
15726
- return $skip;
15783
+ var MaybeNestedNonPipelineExpression$1 = NestedImplicitObjectLiteral;
15784
+ var MaybeNestedNonPipelineExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, NonPipelineExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4) {
15785
+ var expression = $2;
15786
+ var trailing = $4;
15787
+ if (!expression)
15788
+ return $skip;
15789
+ if (!trailing)
15790
+ return expression;
15791
+ return [expression, trailing];
15727
15792
  });
15728
- var MaybeNestedNonPipelineExpression$2 = NonPipelineExpression;
15729
- var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1, MaybeNestedNonPipelineExpression$2];
15793
+ var MaybeNestedNonPipelineExpression$3 = NonPipelineExpression;
15794
+ var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1, MaybeNestedNonPipelineExpression$2, MaybeNestedNonPipelineExpression$3];
15730
15795
  function MaybeNestedNonPipelineExpression(ctx, state2) {
15731
15796
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedNonPipelineExpression", MaybeNestedNonPipelineExpression$$);
15732
15797
  }
15733
15798
  var MaybeNestedPostfixedExpression$0 = NestedBulletedArray;
15734
- var MaybeNestedPostfixedExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15735
- if ($3)
15736
- return $3;
15737
- return $skip;
15799
+ var MaybeNestedPostfixedExpression$1 = NestedImplicitObjectLiteral;
15800
+ var MaybeNestedPostfixedExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4) {
15801
+ var expression = $2;
15802
+ var trailing = $4;
15803
+ if (!expression)
15804
+ return $skip;
15805
+ if (!trailing)
15806
+ return expression;
15807
+ return [expression, trailing];
15738
15808
  });
15739
- var MaybeNestedPostfixedExpression$2 = PostfixedExpression;
15740
- var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1, MaybeNestedPostfixedExpression$2];
15809
+ var MaybeNestedPostfixedExpression$3 = PostfixedExpression;
15810
+ var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1, MaybeNestedPostfixedExpression$2, MaybeNestedPostfixedExpression$3];
15741
15811
  function MaybeNestedPostfixedExpression(ctx, state2) {
15742
15812
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedPostfixedExpression", MaybeNestedPostfixedExpression$$);
15743
15813
  }
15814
+ var NestedPostfixedExpressionNoTrailing$0 = NestedBulletedArray;
15815
+ var NestedPostfixedExpressionNoTrailing$1 = NestedImplicitObjectLiteral;
15816
+ var NestedPostfixedExpressionNoTrailing$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15817
+ var expression = $2;
15818
+ if (!expression)
15819
+ return $skip;
15820
+ return expression;
15821
+ });
15822
+ var NestedPostfixedExpressionNoTrailing$$ = [NestedPostfixedExpressionNoTrailing$0, NestedPostfixedExpressionNoTrailing$1, NestedPostfixedExpressionNoTrailing$2];
15823
+ function NestedPostfixedExpressionNoTrailing(ctx, state2) {
15824
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedPostfixedExpressionNoTrailing", NestedPostfixedExpressionNoTrailing$$);
15825
+ }
15744
15826
  var MaybeNestedExpression$0 = NestedBulletedArray;
15745
- var MaybeNestedExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15746
- if ($3)
15747
- return $3;
15748
- return $skip;
15827
+ var MaybeNestedExpression$1 = NestedImplicitObjectLiteral;
15828
+ var MaybeNestedExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4) {
15829
+ var expression = $2;
15830
+ var trailing = $4;
15831
+ if (!expression)
15832
+ return $skip;
15833
+ if (!trailing)
15834
+ return expression;
15835
+ return [expression, trailing];
15749
15836
  });
15750
- var MaybeNestedExpression$2 = Expression;
15751
- var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1, MaybeNestedExpression$2];
15837
+ var MaybeNestedExpression$3 = Expression;
15838
+ var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1, MaybeNestedExpression$2, MaybeNestedExpression$3];
15752
15839
  function MaybeNestedExpression(ctx, state2) {
15753
15840
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedExpression", MaybeNestedExpression$$);
15754
15841
  }
15755
- var NestedExpression$0 = NestedBulletedArray;
15756
- var NestedExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15757
- if ($3)
15758
- return $3;
15759
- return $skip;
15760
- });
15761
- var NestedExpression$$ = [NestedExpression$0, NestedExpression$1];
15762
- function NestedExpression(ctx, state2) {
15763
- return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedExpression", NestedExpression$$);
15764
- }
15765
15842
  var MaybeParenNestedExpression$0 = (0, import_lib2.$T)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement, NoBlock)), function(value) {
15766
15843
  return "";
15767
15844
  });
@@ -15771,7 +15848,7 @@ ${js}`
15771
15848
  var MaybeParenNestedExpression$2 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), (0, import_lib2.$C)(ArrayLiteral, ObjectLiteral)), function(value) {
15772
15849
  return value[1];
15773
15850
  });
15774
- var MaybeParenNestedExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertSpace, InsertOpenParen, PushIndent, (0, import_lib2.$S)(Nested, Expression), PopIndent, InsertNewline, InsertIndent, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15851
+ var MaybeParenNestedExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertSpace, InsertOpenParen, PushIndent, (0, import_lib2.$S)(Nested, Expression), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions), InsertNewline, InsertIndent, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {
15775
15852
  var exp = $5;
15776
15853
  if (!exp)
15777
15854
  return $skip;
@@ -17863,17 +17940,13 @@ ${js}`
17863
17940
  function JSXAttributeName(ctx, state2) {
17864
17941
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXAttributeName", JSXAttributeName$$);
17865
17942
  }
17866
- var JSXAttributeInitializer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeJSXEnabled), (0, import_lib2.$E)(Whitespace), Equals, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$Q)(NonNewlineWhitespace), EOL)), InsertInlineOpenBrace, PushIndent, (0, import_lib2.$E)(PostfixedExpression), PopIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
17943
+ var JSXAttributeInitializer$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeJSXEnabled), (0, import_lib2.$E)(Whitespace), Equals, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$Q)(NonNewlineWhitespace), EOL)), InsertInlineOpenBrace, NestedPostfixedExpressionNoTrailing, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
17867
17944
  var ws1 = $2;
17868
17945
  var equals = $3;
17869
- var ws2 = $4;
17870
17946
  var open = $5;
17871
- var indent = $6;
17872
- var expression = $7;
17873
- var close = $9;
17874
- if (!expression)
17875
- return $skip;
17876
- return [ws1, equals, ws2, open, indent, expression, close];
17947
+ var expression = $6;
17948
+ var close = $7;
17949
+ return [ws1, equals, open, trimFirstSpace(expression), close];
17877
17950
  });
17878
17951
  var JSXAttributeInitializer$1 = (0, import_lib2.$S)((0, import_lib2.$E)(Whitespace), Equals, (0, import_lib2.$E)(Whitespace), JSXAttributeValue);
17879
17952
  var JSXAttributeInitializer$$ = [JSXAttributeInitializer$0, JSXAttributeInitializer$1];