@danielx/civet 0.7.2 → 0.7.3
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 +45 -35
- package/dist/main.js +45 -35
- package/dist/main.mjs +45 -35
- package/package.json +1 -1
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
|
-
//
|
|
41
|
+
// ../Hera/dist/machine.js
|
|
42
42
|
var require_machine = __commonJS({
|
|
43
|
-
"
|
|
43
|
+
"../Hera/dist/machine.js"(exports, module) {
|
|
44
44
|
"use strict";
|
|
45
45
|
var __defProp2 = Object.defineProperty;
|
|
46
46
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -2842,21 +2842,9 @@ ${input.slice(result.pos)}
|
|
|
2842
2842
|
const { children, name, value } = p;
|
|
2843
2843
|
const [ws] = children;
|
|
2844
2844
|
switch (value && value.type) {
|
|
2845
|
-
case "ArrayBindingPattern":
|
|
2846
|
-
let bindings = nonMatcherBindings(value);
|
|
2847
|
-
if (!bindings.length) {
|
|
2848
|
-
bindings = void 0;
|
|
2849
|
-
}
|
|
2850
|
-
return {
|
|
2851
|
-
...p,
|
|
2852
|
-
children: [ws, name, bindings && ": ", bindings, p.delim]
|
|
2853
|
-
};
|
|
2854
|
-
}
|
|
2845
|
+
case "ArrayBindingPattern":
|
|
2855
2846
|
case "ObjectBindingPattern": {
|
|
2856
|
-
|
|
2857
|
-
if (!bindings.properties.length) {
|
|
2858
|
-
bindings = void 0;
|
|
2859
|
-
}
|
|
2847
|
+
const bindings = nonMatcherBindings(value);
|
|
2860
2848
|
return {
|
|
2861
2849
|
...p,
|
|
2862
2850
|
children: [ws, name, bindings && ": ", bindings, p.delim]
|
|
@@ -4080,19 +4068,17 @@ ${input.slice(result.pos)}
|
|
|
4080
4068
|
}
|
|
4081
4069
|
var generate_default = gen;
|
|
4082
4070
|
function prune(node) {
|
|
4083
|
-
if (node
|
|
4071
|
+
if (!(node != null)) {
|
|
4084
4072
|
return;
|
|
4085
4073
|
}
|
|
4086
|
-
if (node.length === 0) {
|
|
4074
|
+
if (typeof node === "string" && node.length === 0) {
|
|
4087
4075
|
return;
|
|
4088
4076
|
}
|
|
4089
4077
|
if (node.parent != null) {
|
|
4090
4078
|
delete node.parent;
|
|
4091
4079
|
}
|
|
4092
4080
|
if (Array.isArray(node)) {
|
|
4093
|
-
const a = node.map(
|
|
4094
|
-
return prune(n);
|
|
4095
|
-
}).filter(($) => !!$);
|
|
4081
|
+
const a = node.map(prune).filter(($) => $);
|
|
4096
4082
|
if (a.length > 1) {
|
|
4097
4083
|
return a;
|
|
4098
4084
|
}
|
|
@@ -5810,6 +5796,7 @@ ${input.slice(result.pos)}
|
|
|
5810
5796
|
NonPipelineArgumentPart,
|
|
5811
5797
|
BinaryOpExpression,
|
|
5812
5798
|
BinaryOpRHS,
|
|
5799
|
+
IsLike,
|
|
5813
5800
|
WRHS,
|
|
5814
5801
|
SingleLineBinaryOpRHS,
|
|
5815
5802
|
RHS,
|
|
@@ -7225,22 +7212,12 @@ ${input.slice(result.pos)}
|
|
|
7225
7212
|
function BinaryOpExpression(ctx, state2) {
|
|
7226
7213
|
return (0, import_lib2.$EVENT)(ctx, state2, "BinaryOpExpression", BinaryOpExpression$0);
|
|
7227
7214
|
}
|
|
7228
|
-
var BinaryOpRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$E)(_), IndentedFurther, Nested),
|
|
7215
|
+
var BinaryOpRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$E)(_), IndentedFurther, Nested), IsLike, (0, import_lib2.$E)(_), PatternExpressionList), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
7229
7216
|
var ws1 = $1;
|
|
7230
7217
|
var op = $2;
|
|
7231
7218
|
var ws2 = $3;
|
|
7232
7219
|
var patterns = $4;
|
|
7233
|
-
return [
|
|
7234
|
-
ws1,
|
|
7235
|
-
{
|
|
7236
|
-
type: "PatternTest",
|
|
7237
|
-
children: op,
|
|
7238
|
-
special: true,
|
|
7239
|
-
negated: !!op[2]
|
|
7240
|
-
},
|
|
7241
|
-
ws2,
|
|
7242
|
-
patterns
|
|
7243
|
-
];
|
|
7220
|
+
return [ws1, op, ws2, patterns];
|
|
7244
7221
|
});
|
|
7245
7222
|
var BinaryOpRHS$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(BinaryOp, RHS), function($skip, $loc, $0, $1, $2) {
|
|
7246
7223
|
var op = $1;
|
|
@@ -7259,6 +7236,18 @@ ${input.slice(result.pos)}
|
|
|
7259
7236
|
function BinaryOpRHS(ctx, state2) {
|
|
7260
7237
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "BinaryOpRHS", BinaryOpRHS$$);
|
|
7261
7238
|
}
|
|
7239
|
+
var IsLike$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Is, (0, import_lib2.$E)(_), (0, import_lib2.$E)((0, import_lib2.$S)(Not, (0, import_lib2.$E)(_))), Like), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
7240
|
+
var not = $3;
|
|
7241
|
+
return {
|
|
7242
|
+
type: "PatternTest",
|
|
7243
|
+
children: $0,
|
|
7244
|
+
special: true,
|
|
7245
|
+
negated: !!not
|
|
7246
|
+
};
|
|
7247
|
+
});
|
|
7248
|
+
function IsLike(ctx, state2) {
|
|
7249
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "IsLike", IsLike$0);
|
|
7250
|
+
}
|
|
7262
7251
|
var WRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, RHS)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
7263
7252
|
var wrhs = $2;
|
|
7264
7253
|
if (!wrhs)
|
|
@@ -9275,7 +9264,28 @@ ${input.slice(result.pos)}
|
|
|
9275
9264
|
expression: fn
|
|
9276
9265
|
};
|
|
9277
9266
|
});
|
|
9278
|
-
var FunctionExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __,
|
|
9267
|
+
var FunctionExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __, IsLike, __, PatternExpressionList, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
9268
|
+
var open = $1;
|
|
9269
|
+
var ws1 = $2;
|
|
9270
|
+
var op = $3;
|
|
9271
|
+
var ws2 = $4;
|
|
9272
|
+
var rhs = $5;
|
|
9273
|
+
var close = $6;
|
|
9274
|
+
const refA = makeRef("a");
|
|
9275
|
+
const fn = makeAmpersandFunction({
|
|
9276
|
+
ref: refA,
|
|
9277
|
+
body: processBinaryOpExpression([refA, [
|
|
9278
|
+
[ws1, op, ws2, rhs]
|
|
9279
|
+
// BinaryOpRHS
|
|
9280
|
+
]])
|
|
9281
|
+
});
|
|
9282
|
+
return {
|
|
9283
|
+
type: "ParenthesizedExpression",
|
|
9284
|
+
children: [open, fn, close],
|
|
9285
|
+
expression: fn
|
|
9286
|
+
};
|
|
9287
|
+
});
|
|
9288
|
+
var FunctionExpression$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R13, "FunctionExpression /\\+\\+|--|[\\+\\-&]\\S/")), BinaryOp, __, NonPipelineAssignmentExpression, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
|
|
9279
9289
|
var open = $1;
|
|
9280
9290
|
var ws1 = $2;
|
|
9281
9291
|
var op = $4;
|
|
@@ -9296,7 +9306,7 @@ ${input.slice(result.pos)}
|
|
|
9296
9306
|
expression: fn
|
|
9297
9307
|
};
|
|
9298
9308
|
});
|
|
9299
|
-
var FunctionExpression$$ = [FunctionExpression$0, FunctionExpression$1, FunctionExpression$2, FunctionExpression$3, FunctionExpression$4];
|
|
9309
|
+
var FunctionExpression$$ = [FunctionExpression$0, FunctionExpression$1, FunctionExpression$2, FunctionExpression$3, FunctionExpression$4, FunctionExpression$5];
|
|
9300
9310
|
function FunctionExpression(ctx, state2) {
|
|
9301
9311
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "FunctionExpression", FunctionExpression$$);
|
|
9302
9312
|
}
|
package/dist/main.js
CHANGED
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
//
|
|
33
|
+
// ../Hera/dist/machine.js
|
|
34
34
|
var require_machine = __commonJS({
|
|
35
|
-
"
|
|
35
|
+
"../Hera/dist/machine.js"(exports2, module2) {
|
|
36
36
|
"use strict";
|
|
37
37
|
var __defProp2 = Object.defineProperty;
|
|
38
38
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -2835,21 +2835,9 @@ function elideMatchersFromPropertyBindings(properties) {
|
|
|
2835
2835
|
const { children, name, value } = p;
|
|
2836
2836
|
const [ws] = children;
|
|
2837
2837
|
switch (value && value.type) {
|
|
2838
|
-
case "ArrayBindingPattern":
|
|
2839
|
-
let bindings = nonMatcherBindings(value);
|
|
2840
|
-
if (!bindings.length) {
|
|
2841
|
-
bindings = void 0;
|
|
2842
|
-
}
|
|
2843
|
-
return {
|
|
2844
|
-
...p,
|
|
2845
|
-
children: [ws, name, bindings && ": ", bindings, p.delim]
|
|
2846
|
-
};
|
|
2847
|
-
}
|
|
2838
|
+
case "ArrayBindingPattern":
|
|
2848
2839
|
case "ObjectBindingPattern": {
|
|
2849
|
-
|
|
2850
|
-
if (!bindings.properties.length) {
|
|
2851
|
-
bindings = void 0;
|
|
2852
|
-
}
|
|
2840
|
+
const bindings = nonMatcherBindings(value);
|
|
2853
2841
|
return {
|
|
2854
2842
|
...p,
|
|
2855
2843
|
children: [ws, name, bindings && ": ", bindings, p.delim]
|
|
@@ -4073,19 +4061,17 @@ function gen(node, options) {
|
|
|
4073
4061
|
}
|
|
4074
4062
|
var generate_default = gen;
|
|
4075
4063
|
function prune(node) {
|
|
4076
|
-
if (node
|
|
4064
|
+
if (!(node != null)) {
|
|
4077
4065
|
return;
|
|
4078
4066
|
}
|
|
4079
|
-
if (node.length === 0) {
|
|
4067
|
+
if (typeof node === "string" && node.length === 0) {
|
|
4080
4068
|
return;
|
|
4081
4069
|
}
|
|
4082
4070
|
if (node.parent != null) {
|
|
4083
4071
|
delete node.parent;
|
|
4084
4072
|
}
|
|
4085
4073
|
if (Array.isArray(node)) {
|
|
4086
|
-
const a = node.map(
|
|
4087
|
-
return prune(n);
|
|
4088
|
-
}).filter(($) => !!$);
|
|
4074
|
+
const a = node.map(prune).filter(($) => $);
|
|
4089
4075
|
if (a.length > 1) {
|
|
4090
4076
|
return a;
|
|
4091
4077
|
}
|
|
@@ -5803,6 +5789,7 @@ var grammar = {
|
|
|
5803
5789
|
NonPipelineArgumentPart,
|
|
5804
5790
|
BinaryOpExpression,
|
|
5805
5791
|
BinaryOpRHS,
|
|
5792
|
+
IsLike,
|
|
5806
5793
|
WRHS,
|
|
5807
5794
|
SingleLineBinaryOpRHS,
|
|
5808
5795
|
RHS,
|
|
@@ -7218,22 +7205,12 @@ var BinaryOpExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(UnaryExpress
|
|
|
7218
7205
|
function BinaryOpExpression(ctx, state2) {
|
|
7219
7206
|
return (0, import_lib2.$EVENT)(ctx, state2, "BinaryOpExpression", BinaryOpExpression$0);
|
|
7220
7207
|
}
|
|
7221
|
-
var BinaryOpRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$E)(_), IndentedFurther, Nested),
|
|
7208
|
+
var BinaryOpRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$E)(_), IndentedFurther, Nested), IsLike, (0, import_lib2.$E)(_), PatternExpressionList), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
7222
7209
|
var ws1 = $1;
|
|
7223
7210
|
var op = $2;
|
|
7224
7211
|
var ws2 = $3;
|
|
7225
7212
|
var patterns = $4;
|
|
7226
|
-
return [
|
|
7227
|
-
ws1,
|
|
7228
|
-
{
|
|
7229
|
-
type: "PatternTest",
|
|
7230
|
-
children: op,
|
|
7231
|
-
special: true,
|
|
7232
|
-
negated: !!op[2]
|
|
7233
|
-
},
|
|
7234
|
-
ws2,
|
|
7235
|
-
patterns
|
|
7236
|
-
];
|
|
7213
|
+
return [ws1, op, ws2, patterns];
|
|
7237
7214
|
});
|
|
7238
7215
|
var BinaryOpRHS$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(BinaryOp, RHS), function($skip, $loc, $0, $1, $2) {
|
|
7239
7216
|
var op = $1;
|
|
@@ -7252,6 +7229,18 @@ var BinaryOpRHS$$ = [BinaryOpRHS$0, BinaryOpRHS$1, BinaryOpRHS$2, BinaryOpRHS$3]
|
|
|
7252
7229
|
function BinaryOpRHS(ctx, state2) {
|
|
7253
7230
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "BinaryOpRHS", BinaryOpRHS$$);
|
|
7254
7231
|
}
|
|
7232
|
+
var IsLike$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Is, (0, import_lib2.$E)(_), (0, import_lib2.$E)((0, import_lib2.$S)(Not, (0, import_lib2.$E)(_))), Like), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
7233
|
+
var not = $3;
|
|
7234
|
+
return {
|
|
7235
|
+
type: "PatternTest",
|
|
7236
|
+
children: $0,
|
|
7237
|
+
special: true,
|
|
7238
|
+
negated: !!not
|
|
7239
|
+
};
|
|
7240
|
+
});
|
|
7241
|
+
function IsLike(ctx, state2) {
|
|
7242
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "IsLike", IsLike$0);
|
|
7243
|
+
}
|
|
7255
7244
|
var WRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, RHS)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
7256
7245
|
var wrhs = $2;
|
|
7257
7246
|
if (!wrhs)
|
|
@@ -9268,7 +9257,28 @@ var FunctionExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, (
|
|
|
9268
9257
|
expression: fn
|
|
9269
9258
|
};
|
|
9270
9259
|
});
|
|
9271
|
-
var FunctionExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __,
|
|
9260
|
+
var FunctionExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __, IsLike, __, PatternExpressionList, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
9261
|
+
var open = $1;
|
|
9262
|
+
var ws1 = $2;
|
|
9263
|
+
var op = $3;
|
|
9264
|
+
var ws2 = $4;
|
|
9265
|
+
var rhs = $5;
|
|
9266
|
+
var close = $6;
|
|
9267
|
+
const refA = makeRef("a");
|
|
9268
|
+
const fn = makeAmpersandFunction({
|
|
9269
|
+
ref: refA,
|
|
9270
|
+
body: processBinaryOpExpression([refA, [
|
|
9271
|
+
[ws1, op, ws2, rhs]
|
|
9272
|
+
// BinaryOpRHS
|
|
9273
|
+
]])
|
|
9274
|
+
});
|
|
9275
|
+
return {
|
|
9276
|
+
type: "ParenthesizedExpression",
|
|
9277
|
+
children: [open, fn, close],
|
|
9278
|
+
expression: fn
|
|
9279
|
+
};
|
|
9280
|
+
});
|
|
9281
|
+
var FunctionExpression$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R13, "FunctionExpression /\\+\\+|--|[\\+\\-&]\\S/")), BinaryOp, __, NonPipelineAssignmentExpression, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
|
|
9272
9282
|
var open = $1;
|
|
9273
9283
|
var ws1 = $2;
|
|
9274
9284
|
var op = $4;
|
|
@@ -9289,7 +9299,7 @@ var FunctionExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, _
|
|
|
9289
9299
|
expression: fn
|
|
9290
9300
|
};
|
|
9291
9301
|
});
|
|
9292
|
-
var FunctionExpression$$ = [FunctionExpression$0, FunctionExpression$1, FunctionExpression$2, FunctionExpression$3, FunctionExpression$4];
|
|
9302
|
+
var FunctionExpression$$ = [FunctionExpression$0, FunctionExpression$1, FunctionExpression$2, FunctionExpression$3, FunctionExpression$4, FunctionExpression$5];
|
|
9293
9303
|
function FunctionExpression(ctx, state2) {
|
|
9294
9304
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "FunctionExpression", FunctionExpression$$);
|
|
9295
9305
|
}
|
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
|
-
//
|
|
31
|
+
// ../Hera/dist/machine.js
|
|
32
32
|
var require_machine = __commonJS({
|
|
33
|
-
"
|
|
33
|
+
"../Hera/dist/machine.js"(exports, module) {
|
|
34
34
|
"use strict";
|
|
35
35
|
var __defProp2 = Object.defineProperty;
|
|
36
36
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -2819,21 +2819,9 @@ function elideMatchersFromPropertyBindings(properties) {
|
|
|
2819
2819
|
const { children, name, value } = p;
|
|
2820
2820
|
const [ws] = children;
|
|
2821
2821
|
switch (value && value.type) {
|
|
2822
|
-
case "ArrayBindingPattern":
|
|
2823
|
-
let bindings = nonMatcherBindings(value);
|
|
2824
|
-
if (!bindings.length) {
|
|
2825
|
-
bindings = void 0;
|
|
2826
|
-
}
|
|
2827
|
-
return {
|
|
2828
|
-
...p,
|
|
2829
|
-
children: [ws, name, bindings && ": ", bindings, p.delim]
|
|
2830
|
-
};
|
|
2831
|
-
}
|
|
2822
|
+
case "ArrayBindingPattern":
|
|
2832
2823
|
case "ObjectBindingPattern": {
|
|
2833
|
-
|
|
2834
|
-
if (!bindings.properties.length) {
|
|
2835
|
-
bindings = void 0;
|
|
2836
|
-
}
|
|
2824
|
+
const bindings = nonMatcherBindings(value);
|
|
2837
2825
|
return {
|
|
2838
2826
|
...p,
|
|
2839
2827
|
children: [ws, name, bindings && ": ", bindings, p.delim]
|
|
@@ -4057,19 +4045,17 @@ function gen(node, options) {
|
|
|
4057
4045
|
}
|
|
4058
4046
|
var generate_default = gen;
|
|
4059
4047
|
function prune(node) {
|
|
4060
|
-
if (node
|
|
4048
|
+
if (!(node != null)) {
|
|
4061
4049
|
return;
|
|
4062
4050
|
}
|
|
4063
|
-
if (node.length === 0) {
|
|
4051
|
+
if (typeof node === "string" && node.length === 0) {
|
|
4064
4052
|
return;
|
|
4065
4053
|
}
|
|
4066
4054
|
if (node.parent != null) {
|
|
4067
4055
|
delete node.parent;
|
|
4068
4056
|
}
|
|
4069
4057
|
if (Array.isArray(node)) {
|
|
4070
|
-
const a = node.map(
|
|
4071
|
-
return prune(n);
|
|
4072
|
-
}).filter(($) => !!$);
|
|
4058
|
+
const a = node.map(prune).filter(($) => $);
|
|
4073
4059
|
if (a.length > 1) {
|
|
4074
4060
|
return a;
|
|
4075
4061
|
}
|
|
@@ -5787,6 +5773,7 @@ var grammar = {
|
|
|
5787
5773
|
NonPipelineArgumentPart,
|
|
5788
5774
|
BinaryOpExpression,
|
|
5789
5775
|
BinaryOpRHS,
|
|
5776
|
+
IsLike,
|
|
5790
5777
|
WRHS,
|
|
5791
5778
|
SingleLineBinaryOpRHS,
|
|
5792
5779
|
RHS,
|
|
@@ -7202,22 +7189,12 @@ var BinaryOpExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(UnaryExpress
|
|
|
7202
7189
|
function BinaryOpExpression(ctx, state2) {
|
|
7203
7190
|
return (0, import_lib2.$EVENT)(ctx, state2, "BinaryOpExpression", BinaryOpExpression$0);
|
|
7204
7191
|
}
|
|
7205
|
-
var BinaryOpRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$E)(_), IndentedFurther, Nested),
|
|
7192
|
+
var BinaryOpRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$E)(_), IndentedFurther, Nested), IsLike, (0, import_lib2.$E)(_), PatternExpressionList), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
7206
7193
|
var ws1 = $1;
|
|
7207
7194
|
var op = $2;
|
|
7208
7195
|
var ws2 = $3;
|
|
7209
7196
|
var patterns = $4;
|
|
7210
|
-
return [
|
|
7211
|
-
ws1,
|
|
7212
|
-
{
|
|
7213
|
-
type: "PatternTest",
|
|
7214
|
-
children: op,
|
|
7215
|
-
special: true,
|
|
7216
|
-
negated: !!op[2]
|
|
7217
|
-
},
|
|
7218
|
-
ws2,
|
|
7219
|
-
patterns
|
|
7220
|
-
];
|
|
7197
|
+
return [ws1, op, ws2, patterns];
|
|
7221
7198
|
});
|
|
7222
7199
|
var BinaryOpRHS$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(BinaryOp, RHS), function($skip, $loc, $0, $1, $2) {
|
|
7223
7200
|
var op = $1;
|
|
@@ -7236,6 +7213,18 @@ var BinaryOpRHS$$ = [BinaryOpRHS$0, BinaryOpRHS$1, BinaryOpRHS$2, BinaryOpRHS$3]
|
|
|
7236
7213
|
function BinaryOpRHS(ctx, state2) {
|
|
7237
7214
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "BinaryOpRHS", BinaryOpRHS$$);
|
|
7238
7215
|
}
|
|
7216
|
+
var IsLike$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Is, (0, import_lib2.$E)(_), (0, import_lib2.$E)((0, import_lib2.$S)(Not, (0, import_lib2.$E)(_))), Like), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
7217
|
+
var not = $3;
|
|
7218
|
+
return {
|
|
7219
|
+
type: "PatternTest",
|
|
7220
|
+
children: $0,
|
|
7221
|
+
special: true,
|
|
7222
|
+
negated: !!not
|
|
7223
|
+
};
|
|
7224
|
+
});
|
|
7225
|
+
function IsLike(ctx, state2) {
|
|
7226
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "IsLike", IsLike$0);
|
|
7227
|
+
}
|
|
7239
7228
|
var WRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, RHS)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
7240
7229
|
var wrhs = $2;
|
|
7241
7230
|
if (!wrhs)
|
|
@@ -9252,7 +9241,28 @@ var FunctionExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, (
|
|
|
9252
9241
|
expression: fn
|
|
9253
9242
|
};
|
|
9254
9243
|
});
|
|
9255
|
-
var FunctionExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __,
|
|
9244
|
+
var FunctionExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __, IsLike, __, PatternExpressionList, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
9245
|
+
var open = $1;
|
|
9246
|
+
var ws1 = $2;
|
|
9247
|
+
var op = $3;
|
|
9248
|
+
var ws2 = $4;
|
|
9249
|
+
var rhs = $5;
|
|
9250
|
+
var close = $6;
|
|
9251
|
+
const refA = makeRef("a");
|
|
9252
|
+
const fn = makeAmpersandFunction({
|
|
9253
|
+
ref: refA,
|
|
9254
|
+
body: processBinaryOpExpression([refA, [
|
|
9255
|
+
[ws1, op, ws2, rhs]
|
|
9256
|
+
// BinaryOpRHS
|
|
9257
|
+
]])
|
|
9258
|
+
});
|
|
9259
|
+
return {
|
|
9260
|
+
type: "ParenthesizedExpression",
|
|
9261
|
+
children: [open, fn, close],
|
|
9262
|
+
expression: fn
|
|
9263
|
+
};
|
|
9264
|
+
});
|
|
9265
|
+
var FunctionExpression$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R13, "FunctionExpression /\\+\\+|--|[\\+\\-&]\\S/")), BinaryOp, __, NonPipelineAssignmentExpression, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
|
|
9256
9266
|
var open = $1;
|
|
9257
9267
|
var ws1 = $2;
|
|
9258
9268
|
var op = $4;
|
|
@@ -9273,7 +9283,7 @@ var FunctionExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, _
|
|
|
9273
9283
|
expression: fn
|
|
9274
9284
|
};
|
|
9275
9285
|
});
|
|
9276
|
-
var FunctionExpression$$ = [FunctionExpression$0, FunctionExpression$1, FunctionExpression$2, FunctionExpression$3, FunctionExpression$4];
|
|
9286
|
+
var FunctionExpression$$ = [FunctionExpression$0, FunctionExpression$1, FunctionExpression$2, FunctionExpression$3, FunctionExpression$4, FunctionExpression$5];
|
|
9277
9287
|
function FunctionExpression(ctx, state2) {
|
|
9278
9288
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "FunctionExpression", FunctionExpression$$);
|
|
9279
9289
|
}
|