@danielx/civet 0.5.75 → 0.5.76

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
@@ -5472,26 +5472,27 @@ ${input.slice(result.pos)}
5472
5472
  var rhs = $3;
5473
5473
  if (!prefix && !rhs)
5474
5474
  return $skip;
5475
+ let body, ref;
5475
5476
  if (!rhs) {
5476
- const ref2 = {
5477
+ ref = {
5477
5478
  type: "Ref",
5478
5479
  base: "$",
5479
5480
  id: "$"
5480
5481
  };
5481
- return {
5482
- type: "ArrowFunction",
5483
- children: [ref2, " => ", prefix, ref2],
5484
- ampersandBlock: true
5485
- };
5482
+ body = [prefix, ref];
5483
+ } else {
5484
+ ({ ref } = rhs);
5485
+ body = [prefix, rhs];
5486
5486
  }
5487
- const { ref } = rhs;
5488
- const children = [ref, " => ", prefix, rhs];
5489
- if (module.hasAwait(rhs)) {
5487
+ const children = [ref, " => ", ...body];
5488
+ if (module.hasAwait(body)) {
5490
5489
  children.unshift("async ");
5491
5490
  }
5492
5491
  return {
5493
5492
  type: "ArrowFunction",
5494
5493
  children,
5494
+ ref,
5495
+ body,
5495
5496
  ampersandBlock: true
5496
5497
  };
5497
5498
  });
@@ -21542,12 +21543,12 @@ ${input.slice(result.pos)}
21542
21543
  module.constructInvocation = function(fn, arg) {
21543
21544
  const fnArr = [fn.leadingComment, fn.expr, fn.trailingComment];
21544
21545
  if (fn.expr.ampersandBlock) {
21545
- const [ref, , prefix, rhs] = fn.expr.children;
21546
+ const { ref, body } = fn.expr;
21546
21547
  ref.type = "PipedExpression";
21547
21548
  ref.children = [module.makeLeftHandSideExpression(arg)];
21548
21549
  return {
21549
21550
  type: "UnwrappedExpression",
21550
- children: [module.skipIfOnlyWS(fn.leadingComment), prefix, rhs, module.skipIfOnlyWS(fn.trailingComment)]
21551
+ children: [module.skipIfOnlyWS(fn.leadingComment), ...body, module.skipIfOnlyWS(fn.trailingComment)]
21551
21552
  };
21552
21553
  }
21553
21554
  const lhs = module.makeLeftHandSideExpression(fn.expr);
package/dist/main.js CHANGED
@@ -5471,26 +5471,27 @@ ${input.slice(result.pos)}
5471
5471
  var rhs = $3;
5472
5472
  if (!prefix && !rhs)
5473
5473
  return $skip;
5474
+ let body, ref;
5474
5475
  if (!rhs) {
5475
- const ref2 = {
5476
+ ref = {
5476
5477
  type: "Ref",
5477
5478
  base: "$",
5478
5479
  id: "$"
5479
5480
  };
5480
- return {
5481
- type: "ArrowFunction",
5482
- children: [ref2, " => ", prefix, ref2],
5483
- ampersandBlock: true
5484
- };
5481
+ body = [prefix, ref];
5482
+ } else {
5483
+ ({ ref } = rhs);
5484
+ body = [prefix, rhs];
5485
5485
  }
5486
- const { ref } = rhs;
5487
- const children = [ref, " => ", prefix, rhs];
5488
- if (module2.hasAwait(rhs)) {
5486
+ const children = [ref, " => ", ...body];
5487
+ if (module2.hasAwait(body)) {
5489
5488
  children.unshift("async ");
5490
5489
  }
5491
5490
  return {
5492
5491
  type: "ArrowFunction",
5493
5492
  children,
5493
+ ref,
5494
+ body,
5494
5495
  ampersandBlock: true
5495
5496
  };
5496
5497
  });
@@ -21541,12 +21542,12 @@ ${input.slice(result.pos)}
21541
21542
  module2.constructInvocation = function(fn, arg) {
21542
21543
  const fnArr = [fn.leadingComment, fn.expr, fn.trailingComment];
21543
21544
  if (fn.expr.ampersandBlock) {
21544
- const [ref, , prefix, rhs] = fn.expr.children;
21545
+ const { ref, body } = fn.expr;
21545
21546
  ref.type = "PipedExpression";
21546
21547
  ref.children = [module2.makeLeftHandSideExpression(arg)];
21547
21548
  return {
21548
21549
  type: "UnwrappedExpression",
21549
- children: [module2.skipIfOnlyWS(fn.leadingComment), prefix, rhs, module2.skipIfOnlyWS(fn.trailingComment)]
21550
+ children: [module2.skipIfOnlyWS(fn.leadingComment), ...body, module2.skipIfOnlyWS(fn.trailingComment)]
21550
21551
  };
21551
21552
  }
21552
21553
  const lhs = module2.makeLeftHandSideExpression(fn.expr);
package/dist/main.mjs CHANGED
@@ -5469,26 +5469,27 @@ ${input.slice(result.pos)}
5469
5469
  var rhs = $3;
5470
5470
  if (!prefix && !rhs)
5471
5471
  return $skip;
5472
+ let body, ref;
5472
5473
  if (!rhs) {
5473
- const ref2 = {
5474
+ ref = {
5474
5475
  type: "Ref",
5475
5476
  base: "$",
5476
5477
  id: "$"
5477
5478
  };
5478
- return {
5479
- type: "ArrowFunction",
5480
- children: [ref2, " => ", prefix, ref2],
5481
- ampersandBlock: true
5482
- };
5479
+ body = [prefix, ref];
5480
+ } else {
5481
+ ({ ref } = rhs);
5482
+ body = [prefix, rhs];
5483
5483
  }
5484
- const { ref } = rhs;
5485
- const children = [ref, " => ", prefix, rhs];
5486
- if (module.hasAwait(rhs)) {
5484
+ const children = [ref, " => ", ...body];
5485
+ if (module.hasAwait(body)) {
5487
5486
  children.unshift("async ");
5488
5487
  }
5489
5488
  return {
5490
5489
  type: "ArrowFunction",
5491
5490
  children,
5491
+ ref,
5492
+ body,
5492
5493
  ampersandBlock: true
5493
5494
  };
5494
5495
  });
@@ -21539,12 +21540,12 @@ ${input.slice(result.pos)}
21539
21540
  module.constructInvocation = function(fn, arg) {
21540
21541
  const fnArr = [fn.leadingComment, fn.expr, fn.trailingComment];
21541
21542
  if (fn.expr.ampersandBlock) {
21542
- const [ref, , prefix, rhs] = fn.expr.children;
21543
+ const { ref, body } = fn.expr;
21543
21544
  ref.type = "PipedExpression";
21544
21545
  ref.children = [module.makeLeftHandSideExpression(arg)];
21545
21546
  return {
21546
21547
  type: "UnwrappedExpression",
21547
- children: [module.skipIfOnlyWS(fn.leadingComment), prefix, rhs, module.skipIfOnlyWS(fn.trailingComment)]
21548
+ children: [module.skipIfOnlyWS(fn.leadingComment), ...body, module.skipIfOnlyWS(fn.trailingComment)]
21548
21549
  };
21549
21550
  }
21550
21551
  const lhs = module.makeLeftHandSideExpression(fn.expr);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielx/civet",
3
- "version": "0.5.75",
3
+ "version": "0.5.76",
4
4
  "description": "CoffeeScript style syntax for TypeScript",
5
5
  "main": "dist/main.js",
6
6
  "module": "dist/main.mjs",