@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 +4 -0
- package/dist/browser.js +179 -94
- package/dist/config.js +7182 -1
- package/dist/config.mjs +7205 -1
- package/dist/main.js +179 -94
- package/dist/main.mjs +179 -94
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -28,9 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
mod
|
|
29
29
|
));
|
|
30
30
|
|
|
31
|
-
// node_modules/@danielx/hera/dist/machine.js
|
|
31
|
+
// node_modules/.pnpm/@danielx+hera@0.8.16/node_modules/@danielx/hera/dist/machine.js
|
|
32
32
|
var require_machine = __commonJS({
|
|
33
|
-
"node_modules/@danielx/hera/dist/machine.js"(exports, module) {
|
|
33
|
+
"node_modules/.pnpm/@danielx+hera@0.8.16/node_modules/@danielx/hera/dist/machine.js"(exports, module) {
|
|
34
34
|
"use strict";
|
|
35
35
|
var __defProp2 = Object.defineProperty;
|
|
36
36
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -2277,6 +2277,9 @@ function expressionizeIteration(exp) {
|
|
|
2277
2277
|
function skipImplicitArguments(args) {
|
|
2278
2278
|
if (args.length === 1) {
|
|
2279
2279
|
let arg0 = args[0];
|
|
2280
|
+
if (arg0.type === "Argument") {
|
|
2281
|
+
arg0 = arg0.expression;
|
|
2282
|
+
}
|
|
2280
2283
|
if (arg0.type === "StatementExpression") {
|
|
2281
2284
|
arg0 = arg0.statement;
|
|
2282
2285
|
}
|
|
@@ -6391,6 +6394,7 @@ function processProgram(root) {
|
|
|
6391
6394
|
assert.equal(state2.forbidBracedApplication.length, 1, "forbidBracedApplication");
|
|
6392
6395
|
assert.equal(state2.forbidClassImplicitCall.length, 1, "forbidClassImplicitCall");
|
|
6393
6396
|
assert.equal(state2.forbidIndentedApplication.length, 1, "forbidIndentedApplication");
|
|
6397
|
+
assert.equal(state2.forbidNestedBinaryOp.length, 1, "forbidNestedBinaryOp");
|
|
6394
6398
|
assert.equal(state2.forbidNewlineBinaryOp.length, 1, "forbidNewlineBinaryOp");
|
|
6395
6399
|
assert.equal(state2.forbidTrailingMemberProperty.length, 1, "forbidTrailingMemberProperty");
|
|
6396
6400
|
assert.equal(state2.JSXTagStack.length, 1, "JSXTagStack");
|
|
@@ -6564,6 +6568,10 @@ function processPlaceholders(statements) {
|
|
|
6564
6568
|
let fnExp = makeAmpersandFunction({ ref, typeSuffix, body });
|
|
6565
6569
|
let outer;
|
|
6566
6570
|
switch (parent?.type) {
|
|
6571
|
+
case "Argument": {
|
|
6572
|
+
outer = ancestor === parent.expression;
|
|
6573
|
+
break;
|
|
6574
|
+
}
|
|
6567
6575
|
case "Call": {
|
|
6568
6576
|
outer = ancestor === parent.args[findChildIndex(parent.args, ancestor)];
|
|
6569
6577
|
break;
|
|
@@ -6807,14 +6815,13 @@ var grammar = {
|
|
|
6807
6815
|
AllowedTrailingCallExpressions,
|
|
6808
6816
|
CommaDelimiter,
|
|
6809
6817
|
ArgumentList,
|
|
6810
|
-
NonPipelineArgumentList,
|
|
6811
6818
|
NestedArgumentList,
|
|
6812
6819
|
NestedArgument,
|
|
6813
6820
|
SingleLineArgumentExpressions,
|
|
6814
6821
|
WArgumentPart,
|
|
6815
6822
|
ArgumentPart,
|
|
6816
|
-
NonPipelineArgumentPart,
|
|
6817
6823
|
BinaryOpExpression,
|
|
6824
|
+
BinaryOpNotDedented,
|
|
6818
6825
|
BinaryOpRHS,
|
|
6819
6826
|
IsLike,
|
|
6820
6827
|
WRHS,
|
|
@@ -6847,12 +6854,15 @@ var grammar = {
|
|
|
6847
6854
|
FatArrowToken,
|
|
6848
6855
|
TrailingDeclaration,
|
|
6849
6856
|
TrailingPipe,
|
|
6857
|
+
TrailingPostfix,
|
|
6850
6858
|
FatArrowBody,
|
|
6851
6859
|
ConditionalExpression,
|
|
6852
6860
|
TernaryRest,
|
|
6853
6861
|
NestedTernaryRest,
|
|
6854
6862
|
ShortCircuitExpression,
|
|
6855
6863
|
PipelineExpression,
|
|
6864
|
+
PipelineExpressionBody,
|
|
6865
|
+
PipelineExpressionBodySameLine,
|
|
6856
6866
|
PipelineHeadItem,
|
|
6857
6867
|
PipelineTailItem,
|
|
6858
6868
|
PrimaryExpression,
|
|
@@ -7062,7 +7072,6 @@ var grammar = {
|
|
|
7062
7072
|
PostfixedNoCommaStatement,
|
|
7063
7073
|
PostfixedExpression,
|
|
7064
7074
|
PostfixedCommaExpression,
|
|
7065
|
-
NonPipelinePostfixedExpression,
|
|
7066
7075
|
PostfixStatement,
|
|
7067
7076
|
_PostfixStatement,
|
|
7068
7077
|
Statement,
|
|
@@ -7140,10 +7149,18 @@ var grammar = {
|
|
|
7140
7149
|
AllowTrailingMemberProperty,
|
|
7141
7150
|
RestoreTrailingMemberProperty,
|
|
7142
7151
|
TrailingMemberPropertyAllowed,
|
|
7152
|
+
AllowNestedBinaryOp,
|
|
7153
|
+
ForbidNestedBinaryOp,
|
|
7154
|
+
RestoreNestedBinaryOp,
|
|
7155
|
+
NestedBinaryOpAllowed,
|
|
7143
7156
|
AllowNewlineBinaryOp,
|
|
7144
7157
|
ForbidNewlineBinaryOp,
|
|
7145
7158
|
RestoreNewlineBinaryOp,
|
|
7146
7159
|
NewlineBinaryOpAllowed,
|
|
7160
|
+
AllowPipeline,
|
|
7161
|
+
ForbidPipeline,
|
|
7162
|
+
RestorePipeline,
|
|
7163
|
+
PipelineAllowed,
|
|
7147
7164
|
AllowAll,
|
|
7148
7165
|
RestoreAll,
|
|
7149
7166
|
CommaExpressionStatement,
|
|
@@ -8092,11 +8109,13 @@ var Arguments$$ = [Arguments$0, Arguments$1];
|
|
|
8092
8109
|
function Arguments(ctx, state2) {
|
|
8093
8110
|
return (0, import_lib3.$EVENT_C)(ctx, state2, "Arguments", Arguments$$);
|
|
8094
8111
|
}
|
|
8095
|
-
var ImplicitArguments$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(ApplicationStart, InsertOpenParen, (0, import_lib3.$E)(Trimmed_),
|
|
8112
|
+
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) {
|
|
8096
8113
|
var open = $2;
|
|
8097
8114
|
var ws = $3;
|
|
8098
|
-
var args = $
|
|
8099
|
-
var close = $
|
|
8115
|
+
var args = $6;
|
|
8116
|
+
var close = $9;
|
|
8117
|
+
if (!args)
|
|
8118
|
+
return $skip;
|
|
8100
8119
|
if (skipImplicitArguments(args))
|
|
8101
8120
|
return $skip;
|
|
8102
8121
|
args = stripTrailingImplicitComma(args);
|
|
@@ -8209,33 +8228,7 @@ var CommaDelimiter$0 = (0, import_lib3.$S)(NotDedented, Comma);
|
|
|
8209
8228
|
function CommaDelimiter(ctx, state2) {
|
|
8210
8229
|
return (0, import_lib3.$EVENT)(ctx, state2, "CommaDelimiter", CommaDelimiter$0);
|
|
8211
8230
|
}
|
|
8212
|
-
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) {
|
|
8213
|
-
return [
|
|
8214
|
-
$1,
|
|
8215
|
-
...$2.flatMap(([comma, eos, ws, arg]) => [comma, prepend(ws, arg)]),
|
|
8216
|
-
...$3.flatMap(
|
|
8217
|
-
([comma, args]) => Array.isArray(args) ? [comma, ...args] : [comma, args]
|
|
8218
|
-
)
|
|
8219
|
-
];
|
|
8220
|
-
});
|
|
8221
|
-
var ArgumentList$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(NestedBulletedArray), function($skip, $loc, $0, $1) {
|
|
8222
|
-
return [trimFirstSpace($1)];
|
|
8223
|
-
});
|
|
8224
|
-
var ArgumentList$2 = (0, import_lib3.$TS)((0, import_lib3.$S)(NestedImplicitObjectLiteral), function($skip, $loc, $0, $1) {
|
|
8225
|
-
return [trimFirstSpace($1)];
|
|
8226
|
-
});
|
|
8227
|
-
var ArgumentList$3 = NestedArgumentList;
|
|
8228
|
-
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) {
|
|
8229
|
-
return [
|
|
8230
|
-
prepend($1, $2),
|
|
8231
|
-
...$3.flatMap(([comma, ws, arg]) => [comma, prepend(ws, arg)])
|
|
8232
|
-
];
|
|
8233
|
-
});
|
|
8234
|
-
var ArgumentList$$ = [ArgumentList$0, ArgumentList$1, ArgumentList$2, ArgumentList$3, ArgumentList$4];
|
|
8235
|
-
function ArgumentList(ctx, state2) {
|
|
8236
|
-
return (0, import_lib3.$EVENT_C)(ctx, state2, "ArgumentList", ArgumentList$$);
|
|
8237
|
-
}
|
|
8238
|
-
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) {
|
|
8231
|
+
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) {
|
|
8239
8232
|
return [
|
|
8240
8233
|
$2,
|
|
8241
8234
|
...$3.flatMap(([comma, eos, ws, arg]) => [comma, prepend(ws, arg)]),
|
|
@@ -8244,7 +8237,7 @@ var NonPipelineArgumentList$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, imp
|
|
|
8244
8237
|
)
|
|
8245
8238
|
];
|
|
8246
8239
|
});
|
|
8247
|
-
var
|
|
8240
|
+
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) {
|
|
8248
8241
|
return [
|
|
8249
8242
|
trimFirstSpace($1),
|
|
8250
8243
|
...$2.flatMap(
|
|
@@ -8252,19 +8245,19 @@ var NonPipelineArgumentList$1 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, imp
|
|
|
8252
8245
|
)
|
|
8253
8246
|
];
|
|
8254
8247
|
});
|
|
8255
|
-
var
|
|
8256
|
-
var
|
|
8248
|
+
var ArgumentList$2 = NestedArgumentList;
|
|
8249
|
+
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) {
|
|
8257
8250
|
return [
|
|
8258
|
-
$1,
|
|
8259
|
-
...$
|
|
8251
|
+
prepend($1, $2),
|
|
8252
|
+
...$3.flatMap(([comma, ws, arg]) => [comma, prepend(ws, arg)])
|
|
8260
8253
|
];
|
|
8261
8254
|
});
|
|
8262
|
-
var
|
|
8263
|
-
function
|
|
8264
|
-
return (0, import_lib3.$EVENT_C)(ctx, state2, "
|
|
8255
|
+
var ArgumentList$$ = [ArgumentList$0, ArgumentList$1, ArgumentList$2, ArgumentList$3];
|
|
8256
|
+
function ArgumentList(ctx, state2) {
|
|
8257
|
+
return (0, import_lib3.$EVENT_C)(ctx, state2, "ArgumentList", ArgumentList$$);
|
|
8265
8258
|
}
|
|
8266
|
-
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) {
|
|
8267
|
-
var args = $
|
|
8259
|
+
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) {
|
|
8260
|
+
var args = $3;
|
|
8268
8261
|
if (!args.length)
|
|
8269
8262
|
return $skip;
|
|
8270
8263
|
return args.flat();
|
|
@@ -8319,17 +8312,6 @@ var ArgumentPart$$ = [ArgumentPart$0, ArgumentPart$1];
|
|
|
8319
8312
|
function ArgumentPart(ctx, state2) {
|
|
8320
8313
|
return (0, import_lib3.$EVENT_C)(ctx, state2, "ArgumentPart", ArgumentPart$$);
|
|
8321
8314
|
}
|
|
8322
|
-
var NonPipelineArgumentPart$0 = (0, import_lib3.$S)(DotDotDot, NonPipelineExtendedExpression);
|
|
8323
|
-
var NonPipelineArgumentPart$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(NonPipelineExtendedExpression, (0, import_lib3.$E)(DotDotDot)), function($skip, $loc, $0, $1, $2) {
|
|
8324
|
-
if ($2) {
|
|
8325
|
-
return [$2, $1];
|
|
8326
|
-
}
|
|
8327
|
-
return $1;
|
|
8328
|
-
});
|
|
8329
|
-
var NonPipelineArgumentPart$$ = [NonPipelineArgumentPart$0, NonPipelineArgumentPart$1];
|
|
8330
|
-
function NonPipelineArgumentPart(ctx, state2) {
|
|
8331
|
-
return (0, import_lib3.$EVENT_C)(ctx, state2, "NonPipelineArgumentPart", NonPipelineArgumentPart$$);
|
|
8332
|
-
}
|
|
8333
8315
|
var BinaryOpExpression$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(UnaryExpression, (0, import_lib3.$Q)(BinaryOpRHS)), function($skip, $loc, $0, $1, $2) {
|
|
8334
8316
|
if (!$2.length)
|
|
8335
8317
|
return $1;
|
|
@@ -8338,7 +8320,13 @@ var BinaryOpExpression$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(UnaryExpress
|
|
|
8338
8320
|
function BinaryOpExpression(ctx, state2) {
|
|
8339
8321
|
return (0, import_lib3.$EVENT)(ctx, state2, "BinaryOpExpression", BinaryOpExpression$0);
|
|
8340
8322
|
}
|
|
8341
|
-
var
|
|
8323
|
+
var BinaryOpNotDedented$0 = (0, import_lib3.$T)((0, import_lib3.$S)((0, import_lib3.$C)(NestedBinaryOpAllowed, (0, import_lib3.$N)(Nested)), NotDedented), function(value) {
|
|
8324
|
+
return value[1];
|
|
8325
|
+
});
|
|
8326
|
+
function BinaryOpNotDedented(ctx, state2) {
|
|
8327
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "BinaryOpNotDedented", BinaryOpNotDedented$0);
|
|
8328
|
+
}
|
|
8329
|
+
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) {
|
|
8342
8330
|
var ws1 = $1;
|
|
8343
8331
|
var op = $2;
|
|
8344
8332
|
var ws2 = $3;
|
|
@@ -8701,7 +8689,11 @@ var TrailingPipe$0 = (0, import_lib3.$S)((0, import_lib3.$E)(_), Pipe);
|
|
|
8701
8689
|
function TrailingPipe(ctx, state2) {
|
|
8702
8690
|
return (0, import_lib3.$EVENT)(ctx, state2, "TrailingPipe", TrailingPipe$0);
|
|
8703
8691
|
}
|
|
8704
|
-
var
|
|
8692
|
+
var TrailingPostfix$0 = (0, import_lib3.$S)((0, import_lib3.$E)(_), PostfixStatement);
|
|
8693
|
+
function TrailingPostfix(ctx, state2) {
|
|
8694
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "TrailingPostfix", TrailingPostfix$0);
|
|
8695
|
+
}
|
|
8696
|
+
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) {
|
|
8705
8697
|
var exp = $3;
|
|
8706
8698
|
if (exp.type === "ObjectExpression") {
|
|
8707
8699
|
exp = makeLeftHandSideExpression(exp);
|
|
@@ -8751,10 +8743,10 @@ var ShortCircuitExpression$0 = BinaryOpExpression;
|
|
|
8751
8743
|
function ShortCircuitExpression(ctx, state2) {
|
|
8752
8744
|
return (0, import_lib3.$EVENT)(ctx, state2, "ShortCircuitExpression", ShortCircuitExpression$0);
|
|
8753
8745
|
}
|
|
8754
|
-
var PipelineExpression$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_lib3.$E)(_), PipelineHeadItem,
|
|
8755
|
-
var ws = $
|
|
8756
|
-
var head = $
|
|
8757
|
-
var body = $
|
|
8746
|
+
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) {
|
|
8747
|
+
var ws = $2;
|
|
8748
|
+
var head = $3;
|
|
8749
|
+
var body = $4;
|
|
8758
8750
|
if (head.type === "ArrowFunction" && head.ampersandBlock) {
|
|
8759
8751
|
const expressions = [{
|
|
8760
8752
|
type: "PipelineExpression",
|
|
@@ -8776,6 +8768,25 @@ var PipelineExpression$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_l
|
|
|
8776
8768
|
function PipelineExpression(ctx, state2) {
|
|
8777
8769
|
return (0, import_lib3.$EVENT)(ctx, state2, "PipelineExpression", PipelineExpression$0);
|
|
8778
8770
|
}
|
|
8771
|
+
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) {
|
|
8772
|
+
var first = $1;
|
|
8773
|
+
var rest = $3;
|
|
8774
|
+
if (!rest.length)
|
|
8775
|
+
return $skip;
|
|
8776
|
+
return [
|
|
8777
|
+
...first,
|
|
8778
|
+
...rest.map(([nested, line]) => [nested, ...line]).flat()
|
|
8779
|
+
];
|
|
8780
|
+
});
|
|
8781
|
+
var PipelineExpressionBody$1 = (0, import_lib3.$P)((0, import_lib3.$S)(NotDedented, Pipe, __, PipelineTailItem));
|
|
8782
|
+
var PipelineExpressionBody$$ = [PipelineExpressionBody$0, PipelineExpressionBody$1];
|
|
8783
|
+
function PipelineExpressionBody(ctx, state2) {
|
|
8784
|
+
return (0, import_lib3.$EVENT_C)(ctx, state2, "PipelineExpressionBody", PipelineExpressionBody$$);
|
|
8785
|
+
}
|
|
8786
|
+
var PipelineExpressionBodySameLine$0 = (0, import_lib3.$Q)((0, import_lib3.$S)((0, import_lib3.$E)(_), Pipe, __, PipelineTailItem));
|
|
8787
|
+
function PipelineExpressionBodySameLine(ctx, state2) {
|
|
8788
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "PipelineExpressionBodySameLine", PipelineExpressionBodySameLine$0);
|
|
8789
|
+
}
|
|
8779
8790
|
var PipelineHeadItem$0 = NonPipelineExtendedExpression;
|
|
8780
8791
|
var PipelineHeadItem$1 = ParenthesizedExpression;
|
|
8781
8792
|
var PipelineHeadItem$$ = [PipelineHeadItem$0, PipelineHeadItem$1];
|
|
@@ -11449,10 +11460,10 @@ var ArrayElementExpression$$ = [ArrayElementExpression$0, ArrayElementExpression
|
|
|
11449
11460
|
function ArrayElementExpression(ctx, state2) {
|
|
11450
11461
|
return (0, import_lib3.$EVENT_C)(ctx, state2, "ArrayElementExpression", ArrayElementExpression$$);
|
|
11451
11462
|
}
|
|
11452
|
-
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) {
|
|
11463
|
+
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) {
|
|
11453
11464
|
var open = $1;
|
|
11454
|
-
var content = $
|
|
11455
|
-
var close = $
|
|
11465
|
+
var content = $4;
|
|
11466
|
+
var close = $6;
|
|
11456
11467
|
if (!content.length)
|
|
11457
11468
|
return $skip;
|
|
11458
11469
|
content = content.flat();
|
|
@@ -11619,8 +11630,8 @@ var BracedObjectLiteralContent$$ = [BracedObjectLiteralContent$0, BracedObjectLi
|
|
|
11619
11630
|
function BracedObjectLiteralContent(ctx, state2) {
|
|
11620
11631
|
return (0, import_lib3.$EVENT_C)(ctx, state2, "BracedObjectLiteralContent", BracedObjectLiteralContent$$);
|
|
11621
11632
|
}
|
|
11622
|
-
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) {
|
|
11623
|
-
var properties = $
|
|
11633
|
+
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) {
|
|
11634
|
+
var properties = $4;
|
|
11624
11635
|
if (!properties)
|
|
11625
11636
|
return $skip;
|
|
11626
11637
|
return {
|
|
@@ -12313,18 +12324,23 @@ function CoffeeWordAssignmentOp(ctx, state2) {
|
|
|
12313
12324
|
return (0, import_lib3.$EVENT_C)(ctx, state2, "CoffeeWordAssignmentOp", CoffeeWordAssignmentOp$$);
|
|
12314
12325
|
}
|
|
12315
12326
|
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) {
|
|
12327
|
+
var ws1 = $1;
|
|
12328
|
+
var ws2 = $2;
|
|
12329
|
+
var op = $3;
|
|
12316
12330
|
const ws = [];
|
|
12317
|
-
if (
|
|
12318
|
-
ws.push(
|
|
12319
|
-
if (
|
|
12320
|
-
ws.push(
|
|
12321
|
-
return [ws,
|
|
12331
|
+
if (ws1)
|
|
12332
|
+
ws.push(...ws1);
|
|
12333
|
+
if (ws2)
|
|
12334
|
+
ws.push(...ws2);
|
|
12335
|
+
return [ws, op];
|
|
12322
12336
|
});
|
|
12323
|
-
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) {
|
|
12324
|
-
var
|
|
12325
|
-
|
|
12326
|
-
|
|
12327
|
-
|
|
12337
|
+
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) {
|
|
12338
|
+
var ws1 = $2;
|
|
12339
|
+
var ws2 = $3;
|
|
12340
|
+
var op = $6;
|
|
12341
|
+
const ws = [...ws1];
|
|
12342
|
+
if (ws2)
|
|
12343
|
+
ws.push(...ws2);
|
|
12328
12344
|
return [ws, op];
|
|
12329
12345
|
});
|
|
12330
12346
|
var NotDedentedBinaryOp$$ = [NotDedentedBinaryOp$0, NotDedentedBinaryOp$1];
|
|
@@ -12752,16 +12768,6 @@ var PostfixedCommaExpression$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(Postfi
|
|
|
12752
12768
|
function PostfixedCommaExpression(ctx, state2) {
|
|
12753
12769
|
return (0, import_lib3.$EVENT)(ctx, state2, "PostfixedCommaExpression", PostfixedCommaExpression$0);
|
|
12754
12770
|
}
|
|
12755
|
-
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) {
|
|
12756
|
-
var expression = $1;
|
|
12757
|
-
var post = $2;
|
|
12758
|
-
if (post)
|
|
12759
|
-
return attachPostfixStatementAsExpression(expression, post);
|
|
12760
|
-
return expression;
|
|
12761
|
-
});
|
|
12762
|
-
function NonPipelinePostfixedExpression(ctx, state2) {
|
|
12763
|
-
return (0, import_lib3.$EVENT)(ctx, state2, "NonPipelinePostfixedExpression", NonPipelinePostfixedExpression$0);
|
|
12764
|
-
}
|
|
12765
12771
|
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) {
|
|
12766
12772
|
return value[1];
|
|
12767
12773
|
});
|
|
@@ -13851,6 +13857,34 @@ var TrailingMemberPropertyAllowed$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPE
|
|
|
13851
13857
|
function TrailingMemberPropertyAllowed(ctx, state2) {
|
|
13852
13858
|
return (0, import_lib3.$EVENT)(ctx, state2, "TrailingMemberPropertyAllowed", TrailingMemberPropertyAllowed$0);
|
|
13853
13859
|
}
|
|
13860
|
+
var AllowNestedBinaryOp$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'AllowNestedBinaryOp ""'), function($skip, $loc, $0, $1) {
|
|
13861
|
+
state.forbidNestedBinaryOp.push(false);
|
|
13862
|
+
});
|
|
13863
|
+
function AllowNestedBinaryOp(ctx, state2) {
|
|
13864
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "AllowNestedBinaryOp", AllowNestedBinaryOp$0);
|
|
13865
|
+
}
|
|
13866
|
+
var ForbidNestedBinaryOp$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'ForbidNestedBinaryOp ""'), function($skip, $loc, $0, $1) {
|
|
13867
|
+
state.forbidNestedBinaryOp.push(true);
|
|
13868
|
+
});
|
|
13869
|
+
function ForbidNestedBinaryOp(ctx, state2) {
|
|
13870
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "ForbidNestedBinaryOp", ForbidNestedBinaryOp$0);
|
|
13871
|
+
}
|
|
13872
|
+
var RestoreNestedBinaryOp$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'RestoreNestedBinaryOp ""'), function($skip, $loc, $0, $1) {
|
|
13873
|
+
state.forbidNestedBinaryOp.pop();
|
|
13874
|
+
});
|
|
13875
|
+
function RestoreNestedBinaryOp(ctx, state2) {
|
|
13876
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "RestoreNestedBinaryOp", RestoreNestedBinaryOp$0);
|
|
13877
|
+
}
|
|
13878
|
+
var NestedBinaryOpAllowed$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'NestedBinaryOpAllowed ""'), function($skip, $loc, $0, $1) {
|
|
13879
|
+
if (config.verbose) {
|
|
13880
|
+
console.log("forbidNestedBinaryOp:", state.forbidNestedBinaryOp);
|
|
13881
|
+
}
|
|
13882
|
+
if (state.nestedBinaryOpForbidden)
|
|
13883
|
+
return $skip;
|
|
13884
|
+
});
|
|
13885
|
+
function NestedBinaryOpAllowed(ctx, state2) {
|
|
13886
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "NestedBinaryOpAllowed", NestedBinaryOpAllowed$0);
|
|
13887
|
+
}
|
|
13854
13888
|
var AllowNewlineBinaryOp$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'AllowNewlineBinaryOp ""'), function($skip, $loc, $0, $1) {
|
|
13855
13889
|
state.forbidNewlineBinaryOp.push(false);
|
|
13856
13890
|
});
|
|
@@ -13879,11 +13913,39 @@ var NewlineBinaryOpAllowed$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0
|
|
|
13879
13913
|
function NewlineBinaryOpAllowed(ctx, state2) {
|
|
13880
13914
|
return (0, import_lib3.$EVENT)(ctx, state2, "NewlineBinaryOpAllowed", NewlineBinaryOpAllowed$0);
|
|
13881
13915
|
}
|
|
13882
|
-
var
|
|
13916
|
+
var AllowPipeline$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'AllowPipeline ""'), function($skip, $loc, $0, $1) {
|
|
13917
|
+
state.forbidPipeline.push(false);
|
|
13918
|
+
});
|
|
13919
|
+
function AllowPipeline(ctx, state2) {
|
|
13920
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "AllowPipeline", AllowPipeline$0);
|
|
13921
|
+
}
|
|
13922
|
+
var ForbidPipeline$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'ForbidPipeline ""'), function($skip, $loc, $0, $1) {
|
|
13923
|
+
state.forbidPipeline.push(true);
|
|
13924
|
+
});
|
|
13925
|
+
function ForbidPipeline(ctx, state2) {
|
|
13926
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "ForbidPipeline", ForbidPipeline$0);
|
|
13927
|
+
}
|
|
13928
|
+
var RestorePipeline$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'RestorePipeline ""'), function($skip, $loc, $0, $1) {
|
|
13929
|
+
state.forbidPipeline.pop();
|
|
13930
|
+
});
|
|
13931
|
+
function RestorePipeline(ctx, state2) {
|
|
13932
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "RestorePipeline", RestorePipeline$0);
|
|
13933
|
+
}
|
|
13934
|
+
var PipelineAllowed$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'PipelineAllowed ""'), function($skip, $loc, $0, $1) {
|
|
13935
|
+
if (config.verbose) {
|
|
13936
|
+
console.log("forbidPipeline:", state.forbidPipeline);
|
|
13937
|
+
}
|
|
13938
|
+
if (state.pipelineForbidden)
|
|
13939
|
+
return $skip;
|
|
13940
|
+
});
|
|
13941
|
+
function PipelineAllowed(ctx, state2) {
|
|
13942
|
+
return (0, import_lib3.$EVENT)(ctx, state2, "PipelineAllowed", PipelineAllowed$0);
|
|
13943
|
+
}
|
|
13944
|
+
var AllowAll$0 = (0, import_lib3.$S)(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication, AllowClassImplicitCall, AllowNestedBinaryOp, AllowNewlineBinaryOp, AllowPipeline);
|
|
13883
13945
|
function AllowAll(ctx, state2) {
|
|
13884
13946
|
return (0, import_lib3.$EVENT)(ctx, state2, "AllowAll", AllowAll$0);
|
|
13885
13947
|
}
|
|
13886
|
-
var RestoreAll$0 = (0, import_lib3.$S)(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication, RestoreClassImplicitCall, RestoreNewlineBinaryOp);
|
|
13948
|
+
var RestoreAll$0 = (0, import_lib3.$S)(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication, RestoreClassImplicitCall, RestoreNestedBinaryOp, RestoreNewlineBinaryOp, RestorePipeline);
|
|
13887
13949
|
function RestoreAll(ctx, state2) {
|
|
13888
13950
|
return (0, import_lib3.$EVENT)(ctx, state2, "RestoreAll", RestoreAll$0);
|
|
13889
13951
|
}
|
|
@@ -18053,7 +18115,9 @@ var Reset$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'Reset ""'), fu
|
|
|
18053
18115
|
state.forbidIndentedApplication = [false];
|
|
18054
18116
|
state.forbidBracedApplication = [false];
|
|
18055
18117
|
state.forbidTrailingMemberProperty = [false];
|
|
18118
|
+
state.forbidNestedBinaryOp = [false];
|
|
18056
18119
|
state.forbidNewlineBinaryOp = [false];
|
|
18120
|
+
state.forbidPipeline = [false];
|
|
18057
18121
|
state.JSXTagStack = [void 0];
|
|
18058
18122
|
state.operators = /* @__PURE__ */ new Map();
|
|
18059
18123
|
state.helperRefs = {};
|
|
@@ -18324,12 +18388,24 @@ Object.defineProperties(state, {
|
|
|
18324
18388
|
return s[s.length - 1];
|
|
18325
18389
|
}
|
|
18326
18390
|
},
|
|
18391
|
+
nestedBinaryOpForbidden: {
|
|
18392
|
+
get() {
|
|
18393
|
+
const { forbidNestedBinaryOp: s } = state;
|
|
18394
|
+
return s[s.length - 1];
|
|
18395
|
+
}
|
|
18396
|
+
},
|
|
18327
18397
|
newlineBinaryOpForbidden: {
|
|
18328
18398
|
get() {
|
|
18329
18399
|
const { forbidNewlineBinaryOp: s } = state;
|
|
18330
18400
|
return s[s.length - 1];
|
|
18331
18401
|
}
|
|
18332
18402
|
},
|
|
18403
|
+
pipelineForbidden: {
|
|
18404
|
+
get() {
|
|
18405
|
+
const { forbidPipeline: s } = state;
|
|
18406
|
+
return s[s.length - 1];
|
|
18407
|
+
}
|
|
18408
|
+
},
|
|
18333
18409
|
currentJSXTag: {
|
|
18334
18410
|
get() {
|
|
18335
18411
|
const { JSXTagStack: s } = state;
|
|
@@ -18338,12 +18414,12 @@ Object.defineProperties(state, {
|
|
|
18338
18414
|
}
|
|
18339
18415
|
});
|
|
18340
18416
|
function getStateKey() {
|
|
18341
|
-
const stateInt = state.currentIndent.level % 256 << 8 | state.classImplicitCallForbidden << 7 | state.indentedApplicationForbidden << 6 | state.bracedApplicationForbidden << 5 | state.trailingMemberPropertyForbidden << 4 | state.
|
|
18417
|
+
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,
|
|
18342
18418
|
// since it is affected by the directive prologue and may be hit
|
|
18343
18419
|
// by the EOL rule early in the parse. Later if we wanted to
|
|
18344
18420
|
// allow block scoping of the compat directives we would need to
|
|
18345
18421
|
// add them all here.
|
|
18346
|
-
config.coffeeComment <<
|
|
18422
|
+
config.coffeeComment << 0;
|
|
18347
18423
|
return [stateInt, state.currentJSXTag];
|
|
18348
18424
|
}
|
|
18349
18425
|
function parseProgram(input, options) {
|
|
@@ -18743,21 +18819,27 @@ var uncacheable = /* @__PURE__ */ new Set([
|
|
|
18743
18819
|
"AllowBracedApplication",
|
|
18744
18820
|
"AllowIndentedApplication",
|
|
18745
18821
|
"AllowMultiLineImplicitObjectLiteral",
|
|
18822
|
+
"AllowNestedBinaryOp",
|
|
18746
18823
|
"AllowNewlineBinaryOp",
|
|
18747
18824
|
"AllowTrailingMemberProperty",
|
|
18825
|
+
"AllowPipeline",
|
|
18748
18826
|
"ForbidClassImplicitCall",
|
|
18749
18827
|
"ForbidBracedApplication",
|
|
18750
18828
|
"ForbidIndentedApplication",
|
|
18751
18829
|
"ForbidMultiLineImplicitObjectLiteral",
|
|
18830
|
+
"ForbidNestedBinaryOp",
|
|
18752
18831
|
"ForbidNewlineBinaryOp",
|
|
18753
18832
|
"ForbidTrailingMemberProperty",
|
|
18833
|
+
"ForbidPipeline",
|
|
18754
18834
|
"RestoreAll",
|
|
18755
18835
|
"RestoreClassImplicitCall",
|
|
18756
18836
|
"RestoreMultiLineImplicitObjectLiteral",
|
|
18757
18837
|
"RestoreBracedApplication",
|
|
18758
18838
|
"RestoreIndentedApplication",
|
|
18759
18839
|
"RestoreTrailingMemberProperty",
|
|
18760
|
-
"
|
|
18840
|
+
"RestoreNestedBinaryOp",
|
|
18841
|
+
"RestoreNewlineBinaryOp",
|
|
18842
|
+
"RestorePipeline"
|
|
18761
18843
|
]);
|
|
18762
18844
|
function compile(src, options) {
|
|
18763
18845
|
if (!options) {
|
|
@@ -18902,13 +18984,16 @@ var makeCache = function({ hits, trace } = {}) {
|
|
|
18902
18984
|
};
|
|
18903
18985
|
}
|
|
18904
18986
|
if (trace) {
|
|
18905
|
-
logs.push("".padStart(stack.length * 2, " ") + ruleName + ":" + state2.pos + "
|
|
18987
|
+
logs.push("".padStart(stack.length * 2, " ") + ruleName + ":" + state2.pos + "{");
|
|
18906
18988
|
stack.push(ruleName);
|
|
18907
18989
|
}
|
|
18908
18990
|
return;
|
|
18909
18991
|
},
|
|
18910
18992
|
exit: function(ruleName, state2, result) {
|
|
18911
18993
|
if (uncacheable.has(ruleName)) {
|
|
18994
|
+
if (trace) {
|
|
18995
|
+
logs.push("".padStart(stack.length * 2, " ") + ruleName + ":" + state2.pos + "\u26A0\uFE0F " + (result ? "\u2705" : "\u274C"));
|
|
18996
|
+
}
|
|
18912
18997
|
return;
|
|
18913
18998
|
}
|
|
18914
18999
|
const [stateKey, tagKey] = getStateKey();
|
|
@@ -18922,7 +19007,7 @@ var makeCache = function({ hits, trace } = {}) {
|
|
|
18922
19007
|
}
|
|
18923
19008
|
if (trace) {
|
|
18924
19009
|
stack.pop();
|
|
18925
|
-
logs.push("".padStart(stack.length * 2, " ") + ruleName + ":" + state2.pos + " " + (result ? "\u2705" : "\u274C"));
|
|
19010
|
+
logs.push("".padStart(stack.length * 2, " ") + ruleName + ":" + state2.pos + "} " + (result ? "\u2705" : "\u274C"));
|
|
18926
19011
|
}
|
|
18927
19012
|
return;
|
|
18928
19013
|
}
|