@danielx/civet 0.7.35 → 0.7.36

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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ This changelog is generated automatically by [`build/changelog.civet`](build/cha
4
4
  For each version of Civet, it lists and links to all incorporated PRs,
5
5
  as well as a full diff and commit list.
6
6
 
7
+ ## 0.7.36 (2024-10-09, [diff](https://github.com/DanielXMoore/Civet/compare/v0.7.35...v0.7.36), [commits](https://github.com/DanielXMoore/Civet/commits/v0.7.36))
8
+ * Binary operators continue arguments only if strictly indented [[#1438](https://github.com/DanielXMoore/Civet/pull/1438)]
9
+ * Forbid pipes in non-nested implicit arguments [[#1441](https://github.com/DanielXMoore/Civet/pull/1441)]
10
+
7
11
  ## 0.7.35 (2024-10-08, [diff](https://github.com/DanielXMoore/Civet/compare/v0.7.34...v0.7.35), [commits](https://github.com/DanielXMoore/Civet/commits/v0.7.35))
8
12
  * Stop implicitly returning final value from generators [[#1430](https://github.com/DanielXMoore/Civet/pull/1430)]
9
13
  * Prevent stray `await` on one line from pipeline expansion [[#1431](https://github.com/DanielXMoore/Civet/pull/1431)]
package/dist/browser.js CHANGED
@@ -38,9 +38,9 @@ var Civet = (() => {
38
38
  ));
39
39
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
40
40
 
41
- // node_modules/@danielx/hera/dist/machine.js
41
+ // node_modules/.pnpm/@danielx+hera@0.8.16/node_modules/@danielx/hera/dist/machine.js
42
42
  var require_machine = __commonJS({
43
- "node_modules/@danielx/hera/dist/machine.js"(exports, module) {
43
+ "node_modules/.pnpm/@danielx+hera@0.8.16/node_modules/@danielx/hera/dist/machine.js"(exports, module) {
44
44
  "use strict";
45
45
  var __defProp2 = Object.defineProperty;
46
46
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -2306,6 +2306,9 @@ ${body}`;
2306
2306
  function skipImplicitArguments(args) {
2307
2307
  if (args.length === 1) {
2308
2308
  let arg0 = args[0];
2309
+ if (arg0.type === "Argument") {
2310
+ arg0 = arg0.expression;
2311
+ }
2309
2312
  if (arg0.type === "StatementExpression") {
2310
2313
  arg0 = arg0.statement;
2311
2314
  }
@@ -6435,6 +6438,7 @@ ${js}`
6435
6438
  assert.equal(state2.forbidBracedApplication.length, 1, "forbidBracedApplication");
6436
6439
  assert.equal(state2.forbidClassImplicitCall.length, 1, "forbidClassImplicitCall");
6437
6440
  assert.equal(state2.forbidIndentedApplication.length, 1, "forbidIndentedApplication");
6441
+ assert.equal(state2.forbidNestedBinaryOp.length, 1, "forbidNestedBinaryOp");
6438
6442
  assert.equal(state2.forbidNewlineBinaryOp.length, 1, "forbidNewlineBinaryOp");
6439
6443
  assert.equal(state2.forbidTrailingMemberProperty.length, 1, "forbidTrailingMemberProperty");
6440
6444
  assert.equal(state2.JSXTagStack.length, 1, "JSXTagStack");
@@ -6608,6 +6612,10 @@ ${js}`
6608
6612
  let fnExp = makeAmpersandFunction({ ref, typeSuffix, body });
6609
6613
  let outer;
6610
6614
  switch (parent?.type) {
6615
+ case "Argument": {
6616
+ outer = ancestor === parent.expression;
6617
+ break;
6618
+ }
6611
6619
  case "Call": {
6612
6620
  outer = ancestor === parent.args[findChildIndex(parent.args, ancestor)];
6613
6621
  break;
@@ -6851,14 +6859,13 @@ ${js}`
6851
6859
  AllowedTrailingCallExpressions,
6852
6860
  CommaDelimiter,
6853
6861
  ArgumentList,
6854
- NonPipelineArgumentList,
6855
6862
  NestedArgumentList,
6856
6863
  NestedArgument,
6857
6864
  SingleLineArgumentExpressions,
6858
6865
  WArgumentPart,
6859
6866
  ArgumentPart,
6860
- NonPipelineArgumentPart,
6861
6867
  BinaryOpExpression,
6868
+ BinaryOpNotDedented,
6862
6869
  BinaryOpRHS,
6863
6870
  IsLike,
6864
6871
  WRHS,
@@ -6891,12 +6898,15 @@ ${js}`
6891
6898
  FatArrowToken,
6892
6899
  TrailingDeclaration,
6893
6900
  TrailingPipe,
6901
+ TrailingPostfix,
6894
6902
  FatArrowBody,
6895
6903
  ConditionalExpression,
6896
6904
  TernaryRest,
6897
6905
  NestedTernaryRest,
6898
6906
  ShortCircuitExpression,
6899
6907
  PipelineExpression,
6908
+ PipelineExpressionBody,
6909
+ PipelineExpressionBodySameLine,
6900
6910
  PipelineHeadItem,
6901
6911
  PipelineTailItem,
6902
6912
  PrimaryExpression,
@@ -7106,7 +7116,6 @@ ${js}`
7106
7116
  PostfixedNoCommaStatement,
7107
7117
  PostfixedExpression,
7108
7118
  PostfixedCommaExpression,
7109
- NonPipelinePostfixedExpression,
7110
7119
  PostfixStatement,
7111
7120
  _PostfixStatement,
7112
7121
  Statement,
@@ -7184,10 +7193,18 @@ ${js}`
7184
7193
  AllowTrailingMemberProperty,
7185
7194
  RestoreTrailingMemberProperty,
7186
7195
  TrailingMemberPropertyAllowed,
7196
+ AllowNestedBinaryOp,
7197
+ ForbidNestedBinaryOp,
7198
+ RestoreNestedBinaryOp,
7199
+ NestedBinaryOpAllowed,
7187
7200
  AllowNewlineBinaryOp,
7188
7201
  ForbidNewlineBinaryOp,
7189
7202
  RestoreNewlineBinaryOp,
7190
7203
  NewlineBinaryOpAllowed,
7204
+ AllowPipeline,
7205
+ ForbidPipeline,
7206
+ RestorePipeline,
7207
+ PipelineAllowed,
7191
7208
  AllowAll,
7192
7209
  RestoreAll,
7193
7210
  CommaExpressionStatement,
@@ -8136,11 +8153,13 @@ ${js}`
8136
8153
  function Arguments(ctx, state2) {
8137
8154
  return (0, import_lib3.$EVENT_C)(ctx, state2, "Arguments", Arguments$$);
8138
8155
  }
8139
- var ImplicitArguments$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(ApplicationStart, InsertOpenParen, (0, import_lib3.$E)(Trimmed_), NonPipelineArgumentList, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8156
+ var ImplicitArguments$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(ApplicationStart, InsertOpenParen, (0, import_lib3.$E)(Trimmed_), ForbidNestedBinaryOp, ForbidPipeline, (0, import_lib3.$E)(ArgumentList), RestorePipeline, RestoreNestedBinaryOp, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
8140
8157
  var open = $2;
8141
8158
  var ws = $3;
8142
- var args = $4;
8143
- var close = $5;
8159
+ var args = $6;
8160
+ var close = $9;
8161
+ if (!args)
8162
+ return $skip;
8144
8163
  if (skipImplicitArguments(args))
8145
8164
  return $skip;
8146
8165
  args = stripTrailingImplicitComma(args);
@@ -8253,33 +8272,7 @@ ${js}`
8253
8272
  function CommaDelimiter(ctx, state2) {
8254
8273
  return (0, import_lib3.$EVENT)(ctx, state2, "CommaDelimiter", CommaDelimiter$0);
8255
8274
  }
8256
- var ArgumentList$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(ArgumentPart, (0, import_lib3.$Q)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$N)(EOS), (0, import_lib3.$E)(_), ArgumentPart)), (0, import_lib3.$P)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$C)(NestedBulletedArray, NestedImplicitObjectLiteral, NestedArgumentList)))), function($skip, $loc, $0, $1, $2, $3) {
8257
- return [
8258
- $1,
8259
- ...$2.flatMap(([comma, eos, ws, arg]) => [comma, prepend(ws, arg)]),
8260
- ...$3.flatMap(
8261
- ([comma, args]) => Array.isArray(args) ? [comma, ...args] : [comma, args]
8262
- )
8263
- ];
8264
- });
8265
- var ArgumentList$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(NestedBulletedArray), function($skip, $loc, $0, $1) {
8266
- return [trimFirstSpace($1)];
8267
- });
8268
- var ArgumentList$2 = (0, import_lib3.$TS)((0, import_lib3.$S)(NestedImplicitObjectLiteral), function($skip, $loc, $0, $1) {
8269
- return [trimFirstSpace($1)];
8270
- });
8271
- var ArgumentList$3 = NestedArgumentList;
8272
- var ArgumentList$4 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$E)(_), ArgumentPart, (0, import_lib3.$Q)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$E)(_), ArgumentPart))), function($skip, $loc, $0, $1, $2, $3) {
8273
- return [
8274
- prepend($1, $2),
8275
- ...$3.flatMap(([comma, ws, arg]) => [comma, prepend(ws, arg)])
8276
- ];
8277
- });
8278
- var ArgumentList$$ = [ArgumentList$0, ArgumentList$1, ArgumentList$2, ArgumentList$3, ArgumentList$4];
8279
- function ArgumentList(ctx, state2) {
8280
- return (0, import_lib3.$EVENT_C)(ctx, state2, "ArgumentList", ArgumentList$$);
8281
- }
8282
- var NonPipelineArgumentList$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$N)(EOS), NonPipelineArgumentPart, (0, import_lib3.$Q)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$N)(EOS), (0, import_lib3.$E)(_), NonPipelineArgumentPart)), (0, import_lib3.$P)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$C)(NestedBulletedArray, NestedImplicitObjectLiteral, NestedArgumentList)))), function($skip, $loc, $0, $1, $2, $3, $4) {
8275
+ var ArgumentList$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$N)(EOS), ArgumentPart, (0, import_lib3.$Q)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$N)(EOS), (0, import_lib3.$E)(_), ArgumentPart)), (0, import_lib3.$P)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$C)(NestedBulletedArray, NestedImplicitObjectLiteral, NestedArgumentList)))), function($skip, $loc, $0, $1, $2, $3, $4) {
8283
8276
  return [
8284
8277
  $2,
8285
8278
  ...$3.flatMap(([comma, eos, ws, arg]) => [comma, prepend(ws, arg)]),
@@ -8288,7 +8281,7 @@ ${js}`
8288
8281
  )
8289
8282
  ];
8290
8283
  });
8291
- var NonPipelineArgumentList$1 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$C)(NestedBulletedArray, NestedImplicitObjectLiteral), (0, import_lib3.$Q)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$C)(NestedBulletedArray, NestedImplicitObjectLiteral, NestedArgumentList)))), function($skip, $loc, $0, $1, $2) {
8284
+ var ArgumentList$1 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$C)(NestedBulletedArray, NestedImplicitObjectLiteral), (0, import_lib3.$Q)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$C)(NestedBulletedArray, NestedImplicitObjectLiteral, NestedArgumentList)))), function($skip, $loc, $0, $1, $2) {
8292
8285
  return [
8293
8286
  trimFirstSpace($1),
8294
8287
  ...$2.flatMap(
@@ -8296,19 +8289,19 @@ ${js}`
8296
8289
  )
8297
8290
  ];
8298
8291
  });
8299
- var NonPipelineArgumentList$2 = NestedArgumentList;
8300
- var NonPipelineArgumentList$3 = (0, import_lib3.$TS)((0, import_lib3.$S)(NonPipelineArgumentPart, (0, import_lib3.$Q)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$E)(_), NonPipelineArgumentPart))), function($skip, $loc, $0, $1, $2) {
8292
+ var ArgumentList$2 = NestedArgumentList;
8293
+ var ArgumentList$3 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$E)(_), ArgumentPart, (0, import_lib3.$Q)((0, import_lib3.$S)(CommaDelimiter, (0, import_lib3.$E)(_), ArgumentPart))), function($skip, $loc, $0, $1, $2, $3) {
8301
8294
  return [
8302
- $1,
8303
- ...$2.flatMap(([comma, ws, arg]) => [comma, prepend(ws, arg)])
8295
+ prepend($1, $2),
8296
+ ...$3.flatMap(([comma, ws, arg]) => [comma, prepend(ws, arg)])
8304
8297
  ];
8305
8298
  });
8306
- var NonPipelineArgumentList$$ = [NonPipelineArgumentList$0, NonPipelineArgumentList$1, NonPipelineArgumentList$2, NonPipelineArgumentList$3];
8307
- function NonPipelineArgumentList(ctx, state2) {
8308
- return (0, import_lib3.$EVENT_C)(ctx, state2, "NonPipelineArgumentList", NonPipelineArgumentList$$);
8299
+ var ArgumentList$$ = [ArgumentList$0, ArgumentList$1, ArgumentList$2, ArgumentList$3];
8300
+ function ArgumentList(ctx, state2) {
8301
+ return (0, import_lib3.$EVENT_C)(ctx, state2, "ArgumentList", ArgumentList$$);
8309
8302
  }
8310
- var NestedArgumentList$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(PushIndent, (0, import_lib3.$Q)(NestedArgument), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
8311
- var args = $2;
8303
+ var NestedArgumentList$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(PushIndent, AllowPipeline, (0, import_lib3.$Q)(NestedArgument), RestorePipeline, PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8304
+ var args = $3;
8312
8305
  if (!args.length)
8313
8306
  return $skip;
8314
8307
  return args.flat();
@@ -8363,17 +8356,6 @@ ${js}`
8363
8356
  function ArgumentPart(ctx, state2) {
8364
8357
  return (0, import_lib3.$EVENT_C)(ctx, state2, "ArgumentPart", ArgumentPart$$);
8365
8358
  }
8366
- var NonPipelineArgumentPart$0 = (0, import_lib3.$S)(DotDotDot, NonPipelineExtendedExpression);
8367
- var NonPipelineArgumentPart$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(NonPipelineExtendedExpression, (0, import_lib3.$E)(DotDotDot)), function($skip, $loc, $0, $1, $2) {
8368
- if ($2) {
8369
- return [$2, $1];
8370
- }
8371
- return $1;
8372
- });
8373
- var NonPipelineArgumentPart$$ = [NonPipelineArgumentPart$0, NonPipelineArgumentPart$1];
8374
- function NonPipelineArgumentPart(ctx, state2) {
8375
- return (0, import_lib3.$EVENT_C)(ctx, state2, "NonPipelineArgumentPart", NonPipelineArgumentPart$$);
8376
- }
8377
8359
  var BinaryOpExpression$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(UnaryExpression, (0, import_lib3.$Q)(BinaryOpRHS)), function($skip, $loc, $0, $1, $2) {
8378
8360
  if (!$2.length)
8379
8361
  return $1;
@@ -8382,7 +8364,13 @@ ${js}`
8382
8364
  function BinaryOpExpression(ctx, state2) {
8383
8365
  return (0, import_lib3.$EVENT)(ctx, state2, "BinaryOpExpression", BinaryOpExpression$0);
8384
8366
  }
8385
- var BinaryOpRHS$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(NotDedented, IsLike, (0, import_lib3.$E)(_), PatternExpressionList), function($skip, $loc, $0, $1, $2, $3, $4) {
8367
+ var BinaryOpNotDedented$0 = (0, import_lib3.$T)((0, import_lib3.$S)((0, import_lib3.$C)(NestedBinaryOpAllowed, (0, import_lib3.$N)(Nested)), NotDedented), function(value) {
8368
+ return value[1];
8369
+ });
8370
+ function BinaryOpNotDedented(ctx, state2) {
8371
+ return (0, import_lib3.$EVENT)(ctx, state2, "BinaryOpNotDedented", BinaryOpNotDedented$0);
8372
+ }
8373
+ var BinaryOpRHS$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(BinaryOpNotDedented, IsLike, (0, import_lib3.$E)(_), PatternExpressionList), function($skip, $loc, $0, $1, $2, $3, $4) {
8386
8374
  var ws1 = $1;
8387
8375
  var op = $2;
8388
8376
  var ws2 = $3;
@@ -8745,7 +8733,11 @@ ${js}`
8745
8733
  function TrailingPipe(ctx, state2) {
8746
8734
  return (0, import_lib3.$EVENT)(ctx, state2, "TrailingPipe", TrailingPipe$0);
8747
8735
  }
8748
- var FatArrowBody$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$N)(EOS), (0, import_lib3.$N)((0, import_lib3.$S)((0, import_lib3.$E)(_), ExpressionizedStatement)), NonPipelinePostfixedExpression, (0, import_lib3.$N)(TrailingDeclaration), (0, import_lib3.$N)(TrailingPipe), (0, import_lib3.$N)(SemicolonDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8736
+ var TrailingPostfix$0 = (0, import_lib3.$S)((0, import_lib3.$E)(_), PostfixStatement);
8737
+ function TrailingPostfix(ctx, state2) {
8738
+ return (0, import_lib3.$EVENT)(ctx, state2, "TrailingPostfix", TrailingPostfix$0);
8739
+ }
8740
+ var FatArrowBody$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$N)(EOS), (0, import_lib3.$N)((0, import_lib3.$S)((0, import_lib3.$E)(_), ExpressionizedStatement)), NonPipelineExtendedExpression, (0, import_lib3.$N)(TrailingDeclaration), (0, import_lib3.$N)(TrailingPipe), (0, import_lib3.$N)(TrailingPostfix), (0, import_lib3.$N)(SemicolonDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
8749
8741
  var exp = $3;
8750
8742
  if (exp.type === "ObjectExpression") {
8751
8743
  exp = makeLeftHandSideExpression(exp);
@@ -8795,10 +8787,10 @@ ${js}`
8795
8787
  function ShortCircuitExpression(ctx, state2) {
8796
8788
  return (0, import_lib3.$EVENT)(ctx, state2, "ShortCircuitExpression", ShortCircuitExpression$0);
8797
8789
  }
8798
- var PipelineExpression$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$E)(_), PipelineHeadItem, (0, import_lib3.$P)((0, import_lib3.$S)(NotDedented, Pipe, __, PipelineTailItem))), function($skip, $loc, $0, $1, $2, $3) {
8799
- var ws = $1;
8800
- var head = $2;
8801
- var body = $3;
8790
+ var PipelineExpression$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(PipelineAllowed, (0, import_lib3.$E)(_), PipelineHeadItem, PipelineExpressionBody), function($skip, $loc, $0, $1, $2, $3, $4) {
8791
+ var ws = $2;
8792
+ var head = $3;
8793
+ var body = $4;
8802
8794
  if (head.type === "ArrowFunction" && head.ampersandBlock) {
8803
8795
  const expressions = [{
8804
8796
  type: "PipelineExpression",
@@ -8820,6 +8812,25 @@ ${js}`
8820
8812
  function PipelineExpression(ctx, state2) {
8821
8813
  return (0, import_lib3.$EVENT)(ctx, state2, "PipelineExpression", PipelineExpression$0);
8822
8814
  }
8815
+ var PipelineExpressionBody$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(PipelineExpressionBodySameLine, PushIndent, (0, import_lib3.$Q)((0, import_lib3.$S)((0, import_lib3.$S)(Nested, Pipe, __, PipelineTailItem), PipelineExpressionBodySameLine)), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4) {
8816
+ var first = $1;
8817
+ var rest = $3;
8818
+ if (!rest.length)
8819
+ return $skip;
8820
+ return [
8821
+ ...first,
8822
+ ...rest.map(([nested, line]) => [nested, ...line]).flat()
8823
+ ];
8824
+ });
8825
+ var PipelineExpressionBody$1 = (0, import_lib3.$P)((0, import_lib3.$S)(NotDedented, Pipe, __, PipelineTailItem));
8826
+ var PipelineExpressionBody$$ = [PipelineExpressionBody$0, PipelineExpressionBody$1];
8827
+ function PipelineExpressionBody(ctx, state2) {
8828
+ return (0, import_lib3.$EVENT_C)(ctx, state2, "PipelineExpressionBody", PipelineExpressionBody$$);
8829
+ }
8830
+ var PipelineExpressionBodySameLine$0 = (0, import_lib3.$Q)((0, import_lib3.$S)((0, import_lib3.$E)(_), Pipe, __, PipelineTailItem));
8831
+ function PipelineExpressionBodySameLine(ctx, state2) {
8832
+ return (0, import_lib3.$EVENT)(ctx, state2, "PipelineExpressionBodySameLine", PipelineExpressionBodySameLine$0);
8833
+ }
8823
8834
  var PipelineHeadItem$0 = NonPipelineExtendedExpression;
8824
8835
  var PipelineHeadItem$1 = ParenthesizedExpression;
8825
8836
  var PipelineHeadItem$$ = [PipelineHeadItem$0, PipelineHeadItem$1];
@@ -11493,10 +11504,10 @@ ${js}`
11493
11504
  function ArrayElementExpression(ctx, state2) {
11494
11505
  return (0, import_lib3.$EVENT_C)(ctx, state2, "ArrayElementExpression", ArrayElementExpression$$);
11495
11506
  }
11496
- var NestedBulletedArray$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$S)(InsertSpace, InsertOpenBracket), PushIndent, (0, import_lib3.$Q)(NestedArrayBullet), InsertCloseBracket, PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
11507
+ var NestedBulletedArray$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$S)(InsertSpace, InsertOpenBracket), PushIndent, AllowPipeline, (0, import_lib3.$Q)(NestedArrayBullet), RestorePipeline, InsertCloseBracket, PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
11497
11508
  var open = $1;
11498
- var content = $3;
11499
- var close = $4;
11509
+ var content = $4;
11510
+ var close = $6;
11500
11511
  if (!content.length)
11501
11512
  return $skip;
11502
11513
  content = content.flat();
@@ -11663,8 +11674,8 @@ ${js}`
11663
11674
  function BracedObjectLiteralContent(ctx, state2) {
11664
11675
  return (0, import_lib3.$EVENT_C)(ctx, state2, "BracedObjectLiteralContent", BracedObjectLiteralContent$$);
11665
11676
  }
11666
- var NestedImplicitObjectLiteral$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(InsertOpenBrace, PushIndent, (0, import_lib3.$E)(NestedImplicitPropertyDefinitions), PopIndent, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
11667
- var properties = $3;
11677
+ var NestedImplicitObjectLiteral$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(InsertOpenBrace, PushIndent, AllowPipeline, (0, import_lib3.$E)(NestedImplicitPropertyDefinitions), RestorePipeline, PopIndent, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11678
+ var properties = $4;
11668
11679
  if (!properties)
11669
11680
  return $skip;
11670
11681
  return {
@@ -12357,18 +12368,23 @@ ${js}`
12357
12368
  return (0, import_lib3.$EVENT_C)(ctx, state2, "CoffeeWordAssignmentOp", CoffeeWordAssignmentOp$$);
12358
12369
  }
12359
12370
  var NotDedentedBinaryOp$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$E)(IndentedFurther), (0, import_lib3.$E)(_), BinaryOp), function($skip, $loc, $0, $1, $2, $3) {
12371
+ var ws1 = $1;
12372
+ var ws2 = $2;
12373
+ var op = $3;
12360
12374
  const ws = [];
12361
- if ($1)
12362
- ws.push(...$1);
12363
- if ($2)
12364
- ws.push(...$2);
12365
- return [ws, $3];
12375
+ if (ws1)
12376
+ ws.push(...ws1);
12377
+ if (ws2)
12378
+ ws.push(...ws2);
12379
+ return [ws, op];
12366
12380
  });
12367
- var NotDedentedBinaryOp$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(Nested, (0, import_lib3.$E)(_), (0, import_lib3.$N)(Identifier), (0, import_lib3.$C)((0, import_lib3.$N)((0, import_lib3.$EXPECT)($L75, 'NotDedentedBinaryOp "*"')), (0, import_lib3.$N)(ImportDeclaration)), BinaryOp), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12368
- var op = $5;
12369
- const ws = [...$1];
12370
- if ($2)
12371
- ws.push(...$2);
12381
+ var NotDedentedBinaryOp$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(NestedBinaryOpAllowed, Nested, (0, import_lib3.$E)(_), (0, import_lib3.$N)(Identifier), (0, import_lib3.$C)((0, import_lib3.$N)((0, import_lib3.$EXPECT)($L75, 'NotDedentedBinaryOp "*"')), (0, import_lib3.$N)(ImportDeclaration)), BinaryOp), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12382
+ var ws1 = $2;
12383
+ var ws2 = $3;
12384
+ var op = $6;
12385
+ const ws = [...ws1];
12386
+ if (ws2)
12387
+ ws.push(...ws2);
12372
12388
  return [ws, op];
12373
12389
  });
12374
12390
  var NotDedentedBinaryOp$$ = [NotDedentedBinaryOp$0, NotDedentedBinaryOp$1];
@@ -12796,16 +12812,6 @@ ${js}`
12796
12812
  function PostfixedCommaExpression(ctx, state2) {
12797
12813
  return (0, import_lib3.$EVENT)(ctx, state2, "PostfixedCommaExpression", PostfixedCommaExpression$0);
12798
12814
  }
12799
- var NonPipelinePostfixedExpression$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(NonPipelineExtendedExpression, (0, import_lib3.$E)((0, import_lib3.$S)((0, import_lib3.$E)(_), PostfixStatement))), function($skip, $loc, $0, $1, $2) {
12800
- var expression = $1;
12801
- var post = $2;
12802
- if (post)
12803
- return attachPostfixStatementAsExpression(expression, post);
12804
- return expression;
12805
- });
12806
- function NonPipelinePostfixedExpression(ctx, state2) {
12807
- return (0, import_lib3.$EVENT)(ctx, state2, "NonPipelinePostfixedExpression", NonPipelinePostfixedExpression$0);
12808
- }
12809
12815
  var PostfixStatement$0 = (0, import_lib3.$T)((0, import_lib3.$S)((0, import_lib3.$EXPECT)($R29, "PostfixStatement /(?=for|if|loop|unless|until|while)/"), _PostfixStatement), function(value) {
12810
12816
  return value[1];
12811
12817
  });
@@ -13895,6 +13901,34 @@ ${js}`
13895
13901
  function TrailingMemberPropertyAllowed(ctx, state2) {
13896
13902
  return (0, import_lib3.$EVENT)(ctx, state2, "TrailingMemberPropertyAllowed", TrailingMemberPropertyAllowed$0);
13897
13903
  }
13904
+ var AllowNestedBinaryOp$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'AllowNestedBinaryOp ""'), function($skip, $loc, $0, $1) {
13905
+ state.forbidNestedBinaryOp.push(false);
13906
+ });
13907
+ function AllowNestedBinaryOp(ctx, state2) {
13908
+ return (0, import_lib3.$EVENT)(ctx, state2, "AllowNestedBinaryOp", AllowNestedBinaryOp$0);
13909
+ }
13910
+ var ForbidNestedBinaryOp$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'ForbidNestedBinaryOp ""'), function($skip, $loc, $0, $1) {
13911
+ state.forbidNestedBinaryOp.push(true);
13912
+ });
13913
+ function ForbidNestedBinaryOp(ctx, state2) {
13914
+ return (0, import_lib3.$EVENT)(ctx, state2, "ForbidNestedBinaryOp", ForbidNestedBinaryOp$0);
13915
+ }
13916
+ var RestoreNestedBinaryOp$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'RestoreNestedBinaryOp ""'), function($skip, $loc, $0, $1) {
13917
+ state.forbidNestedBinaryOp.pop();
13918
+ });
13919
+ function RestoreNestedBinaryOp(ctx, state2) {
13920
+ return (0, import_lib3.$EVENT)(ctx, state2, "RestoreNestedBinaryOp", RestoreNestedBinaryOp$0);
13921
+ }
13922
+ var NestedBinaryOpAllowed$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'NestedBinaryOpAllowed ""'), function($skip, $loc, $0, $1) {
13923
+ if (config.verbose) {
13924
+ console.log("forbidNestedBinaryOp:", state.forbidNestedBinaryOp);
13925
+ }
13926
+ if (state.nestedBinaryOpForbidden)
13927
+ return $skip;
13928
+ });
13929
+ function NestedBinaryOpAllowed(ctx, state2) {
13930
+ return (0, import_lib3.$EVENT)(ctx, state2, "NestedBinaryOpAllowed", NestedBinaryOpAllowed$0);
13931
+ }
13898
13932
  var AllowNewlineBinaryOp$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'AllowNewlineBinaryOp ""'), function($skip, $loc, $0, $1) {
13899
13933
  state.forbidNewlineBinaryOp.push(false);
13900
13934
  });
@@ -13923,11 +13957,39 @@ ${js}`
13923
13957
  function NewlineBinaryOpAllowed(ctx, state2) {
13924
13958
  return (0, import_lib3.$EVENT)(ctx, state2, "NewlineBinaryOpAllowed", NewlineBinaryOpAllowed$0);
13925
13959
  }
13926
- var AllowAll$0 = (0, import_lib3.$S)(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication, AllowClassImplicitCall, AllowNewlineBinaryOp);
13960
+ var AllowPipeline$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'AllowPipeline ""'), function($skip, $loc, $0, $1) {
13961
+ state.forbidPipeline.push(false);
13962
+ });
13963
+ function AllowPipeline(ctx, state2) {
13964
+ return (0, import_lib3.$EVENT)(ctx, state2, "AllowPipeline", AllowPipeline$0);
13965
+ }
13966
+ var ForbidPipeline$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'ForbidPipeline ""'), function($skip, $loc, $0, $1) {
13967
+ state.forbidPipeline.push(true);
13968
+ });
13969
+ function ForbidPipeline(ctx, state2) {
13970
+ return (0, import_lib3.$EVENT)(ctx, state2, "ForbidPipeline", ForbidPipeline$0);
13971
+ }
13972
+ var RestorePipeline$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'RestorePipeline ""'), function($skip, $loc, $0, $1) {
13973
+ state.forbidPipeline.pop();
13974
+ });
13975
+ function RestorePipeline(ctx, state2) {
13976
+ return (0, import_lib3.$EVENT)(ctx, state2, "RestorePipeline", RestorePipeline$0);
13977
+ }
13978
+ var PipelineAllowed$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'PipelineAllowed ""'), function($skip, $loc, $0, $1) {
13979
+ if (config.verbose) {
13980
+ console.log("forbidPipeline:", state.forbidPipeline);
13981
+ }
13982
+ if (state.pipelineForbidden)
13983
+ return $skip;
13984
+ });
13985
+ function PipelineAllowed(ctx, state2) {
13986
+ return (0, import_lib3.$EVENT)(ctx, state2, "PipelineAllowed", PipelineAllowed$0);
13987
+ }
13988
+ var AllowAll$0 = (0, import_lib3.$S)(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication, AllowClassImplicitCall, AllowNestedBinaryOp, AllowNewlineBinaryOp, AllowPipeline);
13927
13989
  function AllowAll(ctx, state2) {
13928
13990
  return (0, import_lib3.$EVENT)(ctx, state2, "AllowAll", AllowAll$0);
13929
13991
  }
13930
- var RestoreAll$0 = (0, import_lib3.$S)(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication, RestoreClassImplicitCall, RestoreNewlineBinaryOp);
13992
+ var RestoreAll$0 = (0, import_lib3.$S)(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication, RestoreClassImplicitCall, RestoreNestedBinaryOp, RestoreNewlineBinaryOp, RestorePipeline);
13931
13993
  function RestoreAll(ctx, state2) {
13932
13994
  return (0, import_lib3.$EVENT)(ctx, state2, "RestoreAll", RestoreAll$0);
13933
13995
  }
@@ -18097,7 +18159,9 @@ ${js}`
18097
18159
  state.forbidIndentedApplication = [false];
18098
18160
  state.forbidBracedApplication = [false];
18099
18161
  state.forbidTrailingMemberProperty = [false];
18162
+ state.forbidNestedBinaryOp = [false];
18100
18163
  state.forbidNewlineBinaryOp = [false];
18164
+ state.forbidPipeline = [false];
18101
18165
  state.JSXTagStack = [void 0];
18102
18166
  state.operators = /* @__PURE__ */ new Map();
18103
18167
  state.helperRefs = {};
@@ -18368,12 +18432,24 @@ ${js}`
18368
18432
  return s[s.length - 1];
18369
18433
  }
18370
18434
  },
18435
+ nestedBinaryOpForbidden: {
18436
+ get() {
18437
+ const { forbidNestedBinaryOp: s } = state;
18438
+ return s[s.length - 1];
18439
+ }
18440
+ },
18371
18441
  newlineBinaryOpForbidden: {
18372
18442
  get() {
18373
18443
  const { forbidNewlineBinaryOp: s } = state;
18374
18444
  return s[s.length - 1];
18375
18445
  }
18376
18446
  },
18447
+ pipelineForbidden: {
18448
+ get() {
18449
+ const { forbidPipeline: s } = state;
18450
+ return s[s.length - 1];
18451
+ }
18452
+ },
18377
18453
  currentJSXTag: {
18378
18454
  get() {
18379
18455
  const { JSXTagStack: s } = state;
@@ -18382,12 +18458,12 @@ ${js}`
18382
18458
  }
18383
18459
  });
18384
18460
  function getStateKey() {
18385
- const stateInt = state.currentIndent.level % 256 << 8 | state.classImplicitCallForbidden << 7 | state.indentedApplicationForbidden << 6 | state.bracedApplicationForbidden << 5 | state.trailingMemberPropertyForbidden << 4 | state.newlineBinaryOpForbidden << 3 | // This is slightly different than the rest of the state,
18461
+ const stateInt = state.currentIndent.level % 256 << 8 | state.classImplicitCallForbidden << 7 | state.indentedApplicationForbidden << 6 | state.bracedApplicationForbidden << 5 | state.trailingMemberPropertyForbidden << 4 | state.nestedBinaryOpForbidden << 3 | state.newlineBinaryOpForbidden << 2 | state.pipelineForbidden << 1 | // This is slightly different than the rest of the state,
18386
18462
  // since it is affected by the directive prologue and may be hit
18387
18463
  // by the EOL rule early in the parse. Later if we wanted to
18388
18464
  // allow block scoping of the compat directives we would need to
18389
18465
  // add them all here.
18390
- config.coffeeComment << 2;
18466
+ config.coffeeComment << 0;
18391
18467
  return [stateInt, state.currentJSXTag];
18392
18468
  }
18393
18469
  function parseProgram(input, options) {
@@ -18787,21 +18863,27 @@ ${js}`
18787
18863
  "AllowBracedApplication",
18788
18864
  "AllowIndentedApplication",
18789
18865
  "AllowMultiLineImplicitObjectLiteral",
18866
+ "AllowNestedBinaryOp",
18790
18867
  "AllowNewlineBinaryOp",
18791
18868
  "AllowTrailingMemberProperty",
18869
+ "AllowPipeline",
18792
18870
  "ForbidClassImplicitCall",
18793
18871
  "ForbidBracedApplication",
18794
18872
  "ForbidIndentedApplication",
18795
18873
  "ForbidMultiLineImplicitObjectLiteral",
18874
+ "ForbidNestedBinaryOp",
18796
18875
  "ForbidNewlineBinaryOp",
18797
18876
  "ForbidTrailingMemberProperty",
18877
+ "ForbidPipeline",
18798
18878
  "RestoreAll",
18799
18879
  "RestoreClassImplicitCall",
18800
18880
  "RestoreMultiLineImplicitObjectLiteral",
18801
18881
  "RestoreBracedApplication",
18802
18882
  "RestoreIndentedApplication",
18803
18883
  "RestoreTrailingMemberProperty",
18804
- "RestoreNewlineBinaryOp"
18884
+ "RestoreNestedBinaryOp",
18885
+ "RestoreNewlineBinaryOp",
18886
+ "RestorePipeline"
18805
18887
  ]);
18806
18888
  function compile(src, options) {
18807
18889
  if (!options) {
@@ -18946,13 +19028,16 @@ ${counts}`;
18946
19028
  };
18947
19029
  }
18948
19030
  if (trace) {
18949
- logs.push("".padStart(stack.length * 2, " ") + ruleName + ":" + state2.pos + "\u2192");
19031
+ logs.push("".padStart(stack.length * 2, " ") + ruleName + ":" + state2.pos + "{");
18950
19032
  stack.push(ruleName);
18951
19033
  }
18952
19034
  return;
18953
19035
  },
18954
19036
  exit: function(ruleName, state2, result) {
18955
19037
  if (uncacheable.has(ruleName)) {
19038
+ if (trace) {
19039
+ logs.push("".padStart(stack.length * 2, " ") + ruleName + ":" + state2.pos + "\u26A0\uFE0F " + (result ? "\u2705" : "\u274C"));
19040
+ }
18956
19041
  return;
18957
19042
  }
18958
19043
  const [stateKey, tagKey] = getStateKey();
@@ -18966,7 +19051,7 @@ ${counts}`;
18966
19051
  }
18967
19052
  if (trace) {
18968
19053
  stack.pop();
18969
- logs.push("".padStart(stack.length * 2, " ") + ruleName + ":" + state2.pos + " " + (result ? "\u2705" : "\u274C"));
19054
+ logs.push("".padStart(stack.length * 2, " ") + ruleName + ":" + state2.pos + "} " + (result ? "\u2705" : "\u274C"));
18970
19055
  }
18971
19056
  return;
18972
19057
  }