@danielx/civet 0.8.14 → 0.8.15
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 +10 -0
- package/dist/browser.js +135 -75
- package/dist/config.js +1 -7253
- package/dist/config.mjs +1 -7276
- package/dist/main.js +135 -75
- package/dist/main.mjs +135 -75
- package/package.json +1 -1
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
|
-
// node_modules
|
|
33
|
+
// node_modules/@danielx/hera/dist/machine.js
|
|
34
34
|
var require_machine = __commonJS({
|
|
35
|
-
"node_modules
|
|
35
|
+
"node_modules/@danielx/hera/dist/machine.js"(exports2, module2) {
|
|
36
36
|
"use strict";
|
|
37
37
|
var __defProp2 = Object.defineProperty;
|
|
38
38
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -810,18 +810,31 @@ function insertTrimmingSpace(target, c) {
|
|
|
810
810
|
if (target.length === 0) {
|
|
811
811
|
return c;
|
|
812
812
|
}
|
|
813
|
-
|
|
813
|
+
const results = [];
|
|
814
|
+
for (let i3 = 0, len3 = target.length; i3 < len3; i3++) {
|
|
815
|
+
const i = i3;
|
|
816
|
+
const e = target[i3];
|
|
814
817
|
if (i === 0) {
|
|
815
|
-
|
|
818
|
+
results.push(insertTrimmingSpace(e, c));
|
|
816
819
|
} else {
|
|
817
|
-
|
|
820
|
+
results.push(e);
|
|
818
821
|
}
|
|
819
|
-
}
|
|
822
|
+
}
|
|
823
|
+
;
|
|
824
|
+
return results;
|
|
820
825
|
} else if (isParent(target)) {
|
|
821
|
-
|
|
826
|
+
const oldChildren = target.children;
|
|
827
|
+
target = {
|
|
822
828
|
...target,
|
|
823
829
|
children: insertTrimmingSpace(target.children, c)
|
|
824
830
|
};
|
|
831
|
+
for (const key in target) {
|
|
832
|
+
const i = oldChildren.indexOf(target[key]);
|
|
833
|
+
if (i >= 0) {
|
|
834
|
+
target[key] = target.children[i];
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
return target;
|
|
825
838
|
} else if (isToken(target)) {
|
|
826
839
|
return {
|
|
827
840
|
...target,
|
|
@@ -996,8 +1009,8 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
|
|
|
996
1009
|
return void 0;
|
|
997
1010
|
}
|
|
998
1011
|
if (Array.isArray(node)) {
|
|
999
|
-
for (let
|
|
1000
|
-
const child = node[
|
|
1012
|
+
for (let i4 = 0, len4 = node.length; i4 < len4; i4++) {
|
|
1013
|
+
const child = node[i4];
|
|
1001
1014
|
if (skip(child)) {
|
|
1002
1015
|
continue;
|
|
1003
1016
|
}
|
|
@@ -1036,9 +1049,9 @@ function deepCopy(root) {
|
|
|
1036
1049
|
if (Array.isArray(node)) {
|
|
1037
1050
|
const array = new Array(node.length);
|
|
1038
1051
|
copied.set(node, array);
|
|
1039
|
-
for (let
|
|
1040
|
-
const i =
|
|
1041
|
-
const item = node[
|
|
1052
|
+
for (let i5 = 0, len5 = node.length; i5 < len5; i5++) {
|
|
1053
|
+
const i = i5;
|
|
1054
|
+
const item = node[i5];
|
|
1042
1055
|
array[i] = recurse(item);
|
|
1043
1056
|
}
|
|
1044
1057
|
} else if (node?.type === "Ref") {
|
|
@@ -1065,9 +1078,9 @@ function replaceNode(node, newNode, parent) {
|
|
|
1065
1078
|
throw new Error("replaceNode failed: node has no parent");
|
|
1066
1079
|
}
|
|
1067
1080
|
function recurse(children) {
|
|
1068
|
-
for (let
|
|
1069
|
-
const i =
|
|
1070
|
-
const child = children[
|
|
1081
|
+
for (let i6 = 0, len6 = children.length; i6 < len6; i6++) {
|
|
1082
|
+
const i = i6;
|
|
1083
|
+
const child = children[i6];
|
|
1071
1084
|
if (child === node) {
|
|
1072
1085
|
children[i] = newNode;
|
|
1073
1086
|
return true;
|
|
@@ -1104,9 +1117,9 @@ function replaceNodes(root, predicate, replacer) {
|
|
|
1104
1117
|
return root;
|
|
1105
1118
|
}
|
|
1106
1119
|
}
|
|
1107
|
-
for (let
|
|
1108
|
-
const i =
|
|
1109
|
-
const node = array[
|
|
1120
|
+
for (let i7 = 0, len7 = array.length; i7 < len7; i7++) {
|
|
1121
|
+
const i = i7;
|
|
1122
|
+
const node = array[i7];
|
|
1110
1123
|
if (!(node != null)) {
|
|
1111
1124
|
return;
|
|
1112
1125
|
}
|
|
@@ -1230,8 +1243,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1230
1243
|
return;
|
|
1231
1244
|
}
|
|
1232
1245
|
if (Array.isArray(node)) {
|
|
1233
|
-
for (let
|
|
1234
|
-
const child = node[
|
|
1246
|
+
for (let i8 = 0, len8 = node.length; i8 < len8; i8++) {
|
|
1247
|
+
const child = node[i8];
|
|
1235
1248
|
updateParentPointers(child, parent, depth);
|
|
1236
1249
|
}
|
|
1237
1250
|
return;
|
|
@@ -1241,8 +1254,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1241
1254
|
node.parent = parent;
|
|
1242
1255
|
}
|
|
1243
1256
|
if (depth && isParent(node)) {
|
|
1244
|
-
for (let ref5 = node.children,
|
|
1245
|
-
const child = ref5[
|
|
1257
|
+
for (let ref5 = node.children, i9 = 0, len9 = ref5.length; i9 < len9; i9++) {
|
|
1258
|
+
const child = ref5[i9];
|
|
1246
1259
|
updateParentPointers(child, node, depth - 1);
|
|
1247
1260
|
}
|
|
1248
1261
|
}
|
|
@@ -1418,9 +1431,9 @@ function wrapWithReturn(expression) {
|
|
|
1418
1431
|
}
|
|
1419
1432
|
function flatJoin(array, separator) {
|
|
1420
1433
|
const result = [];
|
|
1421
|
-
for (let
|
|
1422
|
-
const i =
|
|
1423
|
-
const items = array[
|
|
1434
|
+
for (let i10 = 0, len10 = array.length; i10 < len10; i10++) {
|
|
1435
|
+
const i = i10;
|
|
1436
|
+
const items = array[i10];
|
|
1424
1437
|
if (i) {
|
|
1425
1438
|
result.push(separator);
|
|
1426
1439
|
}
|
|
@@ -5595,9 +5608,12 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
5595
5608
|
ascDec = [", ", ascRef, " = ", startRef, " <= ", endRef];
|
|
5596
5609
|
}
|
|
5597
5610
|
let varAssign = [], varLetAssign = varAssign, varLet = varAssign, blockPrefix;
|
|
5598
|
-
let names = forDeclaration?.names;
|
|
5599
|
-
if (forDeclaration
|
|
5600
|
-
if (forDeclaration.
|
|
5611
|
+
let names = forDeclaration?.names ?? [];
|
|
5612
|
+
if (forDeclaration != null) {
|
|
5613
|
+
if (forDeclaration.type === "AssignmentExpression") {
|
|
5614
|
+
varAssign = varLetAssign = [forDeclaration, " = "];
|
|
5615
|
+
names = [];
|
|
5616
|
+
} else if (forDeclaration.decl === "let") {
|
|
5601
5617
|
const varName = forDeclaration.children.splice(1);
|
|
5602
5618
|
varAssign = [...trimFirstSpace(varName), " = "];
|
|
5603
5619
|
varLet = [",", ...varName, " = ", counterRef];
|
|
@@ -5607,14 +5623,6 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
5607
5623
|
["", [forDeclaration, " = ", value], ";"]
|
|
5608
5624
|
];
|
|
5609
5625
|
}
|
|
5610
|
-
} else if (forDeclaration) {
|
|
5611
|
-
assert.equal(
|
|
5612
|
-
forDeclaration.type,
|
|
5613
|
-
"AssignmentExpression",
|
|
5614
|
-
"Internal error: Coffee-style for loop must be an assignment expression"
|
|
5615
|
-
);
|
|
5616
|
-
varAssign = varLetAssign = [forDeclaration, " = "];
|
|
5617
|
-
names = [];
|
|
5618
5626
|
}
|
|
5619
5627
|
const declaration = {
|
|
5620
5628
|
type: "Declaration",
|
|
@@ -6134,7 +6142,8 @@ function addPostfixStatement(statement, ws, post) {
|
|
|
6134
6142
|
const block = makeNode({
|
|
6135
6143
|
type: "BlockStatement",
|
|
6136
6144
|
children: [" { ", expressions, " }"],
|
|
6137
|
-
expressions
|
|
6145
|
+
expressions,
|
|
6146
|
+
bare: false
|
|
6138
6147
|
});
|
|
6139
6148
|
const children = [...post.children, block];
|
|
6140
6149
|
if (!isWhitespaceOrEmpty(ws))
|
|
@@ -7833,9 +7842,12 @@ var grammar = {
|
|
|
7833
7842
|
ReservedBinary,
|
|
7834
7843
|
ArgumentsWithTrailingMemberExpressions,
|
|
7835
7844
|
TrailingMemberExpressions,
|
|
7836
|
-
|
|
7845
|
+
IndentedTrailingMemberExpressions,
|
|
7846
|
+
NestedTrailingMemberExpression,
|
|
7837
7847
|
AllowedTrailingMemberExpressions,
|
|
7838
7848
|
TrailingCallExpressions,
|
|
7849
|
+
IndentedTrailingCallExpressions,
|
|
7850
|
+
NestedTrailingCallExpression,
|
|
7839
7851
|
AllowedTrailingCallExpressions,
|
|
7840
7852
|
CommaDelimiter,
|
|
7841
7853
|
OptionalCommaDelimiter,
|
|
@@ -7893,6 +7905,7 @@ var grammar = {
|
|
|
7893
7905
|
PipelineHeadItem,
|
|
7894
7906
|
PipelineTailItem,
|
|
7895
7907
|
PrimaryExpression,
|
|
7908
|
+
OptimizedParenthesizedExpression,
|
|
7896
7909
|
ParenthesizedExpression,
|
|
7897
7910
|
Placeholder,
|
|
7898
7911
|
PlaceholderTypeSuffix,
|
|
@@ -9080,7 +9093,7 @@ var NestedExpressionizedStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((
|
|
|
9080
9093
|
return expression;
|
|
9081
9094
|
return {
|
|
9082
9095
|
type: "CallExpression",
|
|
9083
|
-
children: [expression, ...trailing
|
|
9096
|
+
children: [expression, ...trailing]
|
|
9084
9097
|
};
|
|
9085
9098
|
});
|
|
9086
9099
|
function NestedExpressionizedStatement(ctx, state2) {
|
|
@@ -9093,7 +9106,7 @@ var ExpressionizedStatementWithTrailingCallExpressions$0 = (0, import_lib2.$TS)(
|
|
|
9093
9106
|
type: "CallExpression",
|
|
9094
9107
|
children: [
|
|
9095
9108
|
makeLeftHandSideExpression($1),
|
|
9096
|
-
|
|
9109
|
+
...$2
|
|
9097
9110
|
]
|
|
9098
9111
|
};
|
|
9099
9112
|
});
|
|
@@ -9185,7 +9198,7 @@ var ExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, Al
|
|
|
9185
9198
|
function ExplicitArguments(ctx, state2) {
|
|
9186
9199
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitArguments", ExplicitArguments$0);
|
|
9187
9200
|
}
|
|
9188
|
-
var ApplicationStart$0 = (0, import_lib2.$S)(IndentedApplicationAllowed, (0, import_lib2.$Y)((0, import_lib2.$S)(IndentedFurther, (0, import_lib2.$N)(IdentifierBinaryOp), (0, import_lib2.$N)(ReservedBinary))), (0, import_lib2.$N)(
|
|
9201
|
+
var ApplicationStart$0 = (0, import_lib2.$S)(IndentedApplicationAllowed, (0, import_lib2.$Y)((0, import_lib2.$S)(IndentedFurther, (0, import_lib2.$N)(IdentifierBinaryOp), (0, import_lib2.$N)(ReservedBinary))), (0, import_lib2.$N)(IndentedTrailingMemberExpressions));
|
|
9189
9202
|
var ApplicationStart$1 = (0, import_lib2.$S)((0, import_lib2.$N)(EOS), (0, import_lib2.$Y)((0, import_lib2.$S)(_, (0, import_lib2.$C)(BracedApplicationAllowed, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L1, 'ApplicationStart "{"'))), (0, import_lib2.$N)(ForbiddenImplicitCalls))));
|
|
9190
9203
|
var ApplicationStart$$ = [ApplicationStart$0, ApplicationStart$1];
|
|
9191
9204
|
function ApplicationStart(ctx, state2) {
|
|
@@ -9226,19 +9239,34 @@ var ArgumentsWithTrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_l
|
|
|
9226
9239
|
function ArgumentsWithTrailingMemberExpressions(ctx, state2) {
|
|
9227
9240
|
return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingMemberExpressions", ArgumentsWithTrailingMemberExpressions$0);
|
|
9228
9241
|
}
|
|
9229
|
-
var TrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(MemberExpressionRest), (0, import_lib2.$
|
|
9242
|
+
var TrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(MemberExpressionRest), (0, import_lib2.$E)(IndentedTrailingMemberExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9243
|
+
if (!$2)
|
|
9244
|
+
return $1;
|
|
9230
9245
|
return [...$1, ...$2];
|
|
9231
9246
|
});
|
|
9232
9247
|
function TrailingMemberExpressions(ctx, state2) {
|
|
9233
9248
|
return (0, import_lib2.$EVENT)(ctx, state2, "TrailingMemberExpressions", TrailingMemberExpressions$0);
|
|
9234
9249
|
}
|
|
9235
|
-
var
|
|
9250
|
+
var IndentedTrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedTrailingMemberExpression), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
9251
|
+
if (!$2.length)
|
|
9252
|
+
return $skip;
|
|
9253
|
+
return $2.flat();
|
|
9254
|
+
});
|
|
9255
|
+
var IndentedTrailingMemberExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingMemberExpression), function($skip, $loc, $0, $1) {
|
|
9256
|
+
return $1.flat();
|
|
9257
|
+
});
|
|
9258
|
+
var IndentedTrailingMemberExpressions$$ = [IndentedTrailingMemberExpressions$0, IndentedTrailingMemberExpressions$1];
|
|
9259
|
+
function IndentedTrailingMemberExpressions(ctx, state2) {
|
|
9260
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingMemberExpressions", IndentedTrailingMemberExpressions$$);
|
|
9261
|
+
}
|
|
9262
|
+
var NestedTrailingMemberExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Nested, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$EXPECT)($L6, 'NestedTrailingMemberExpression "?"')), (0, import_lib2.$EXPECT)($L7, 'NestedTrailingMemberExpression "."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R3, "NestedTrailingMemberExpression /[0-9]/")))), (0, import_lib2.$P)(MemberExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
9236
9263
|
var ws = $1;
|
|
9237
|
-
var
|
|
9238
|
-
|
|
9264
|
+
var rests = $3;
|
|
9265
|
+
const [first, ...rest] = rests;
|
|
9266
|
+
return [prepend(ws, first), ...rest];
|
|
9239
9267
|
});
|
|
9240
|
-
function
|
|
9241
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "
|
|
9268
|
+
function NestedTrailingMemberExpression(ctx, state2) {
|
|
9269
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingMemberExpression", NestedTrailingMemberExpression$0);
|
|
9242
9270
|
}
|
|
9243
9271
|
var AllowedTrailingMemberExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingMemberExpressions), function(value) {
|
|
9244
9272
|
return value[1];
|
|
@@ -9248,10 +9276,37 @@ var AllowedTrailingMemberExpressions$$ = [AllowedTrailingMemberExpressions$0, Al
|
|
|
9248
9276
|
function AllowedTrailingMemberExpressions(ctx, state2) {
|
|
9249
9277
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "AllowedTrailingMemberExpressions", AllowedTrailingMemberExpressions$$);
|
|
9250
9278
|
}
|
|
9251
|
-
var TrailingCallExpressions$0 = (0, import_lib2.$
|
|
9279
|
+
var TrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(IndentedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
|
|
9280
|
+
if (!$1.length && !$2)
|
|
9281
|
+
return $skip;
|
|
9282
|
+
if (!$2)
|
|
9283
|
+
return $1;
|
|
9284
|
+
return [...$1, ...$2];
|
|
9285
|
+
});
|
|
9252
9286
|
function TrailingCallExpressions(ctx, state2) {
|
|
9253
9287
|
return (0, import_lib2.$EVENT)(ctx, state2, "TrailingCallExpressions", TrailingCallExpressions$0);
|
|
9254
9288
|
}
|
|
9289
|
+
var IndentedTrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$Q)(NestedTrailingCallExpression), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
9290
|
+
if (!$2.length)
|
|
9291
|
+
return $skip;
|
|
9292
|
+
return $2.flat();
|
|
9293
|
+
});
|
|
9294
|
+
var IndentedTrailingCallExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingCallExpression), function($skip, $loc, $0, $1) {
|
|
9295
|
+
return $1.flat();
|
|
9296
|
+
});
|
|
9297
|
+
var IndentedTrailingCallExpressions$$ = [IndentedTrailingCallExpressions$0, IndentedTrailingCallExpressions$1];
|
|
9298
|
+
function IndentedTrailingCallExpressions(ctx, state2) {
|
|
9299
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingCallExpressions", IndentedTrailingCallExpressions$$);
|
|
9300
|
+
}
|
|
9301
|
+
var NestedTrailingCallExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Nested, (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$EXPECT)($L6, 'NestedTrailingCallExpression "?"')), (0, import_lib2.$EXPECT)($L7, 'NestedTrailingCallExpression "."'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R3, "NestedTrailingCallExpression /[0-9]/")))), (0, import_lib2.$P)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
9302
|
+
var ws = $1;
|
|
9303
|
+
var rests = $3;
|
|
9304
|
+
const [first, ...rest] = rests.flat();
|
|
9305
|
+
return [prepend(ws, first), ...rest];
|
|
9306
|
+
});
|
|
9307
|
+
function NestedTrailingCallExpression(ctx, state2) {
|
|
9308
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingCallExpression", NestedTrailingCallExpression$0);
|
|
9309
|
+
}
|
|
9255
9310
|
var AllowedTrailingCallExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingCallExpressions), function(value) {
|
|
9256
9311
|
return value[1];
|
|
9257
9312
|
});
|
|
@@ -9855,7 +9910,7 @@ function PipelineExpressionBodySameLine(ctx, state2) {
|
|
|
9855
9910
|
return (0, import_lib2.$EVENT)(ctx, state2, "PipelineExpressionBodySameLine", PipelineExpressionBodySameLine$0);
|
|
9856
9911
|
}
|
|
9857
9912
|
var PipelineHeadItem$0 = NonPipelineExpression;
|
|
9858
|
-
var PipelineHeadItem$1 =
|
|
9913
|
+
var PipelineHeadItem$1 = OptimizedParenthesizedExpression;
|
|
9859
9914
|
var PipelineHeadItem$$ = [PipelineHeadItem$0, PipelineHeadItem$1];
|
|
9860
9915
|
function PipelineHeadItem(ctx, state2) {
|
|
9861
9916
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PipelineHeadItem", PipelineHeadItem$$);
|
|
@@ -9890,7 +9945,7 @@ var PrimaryExpression$5 = FunctionExpression;
|
|
|
9890
9945
|
var PrimaryExpression$6 = IdentifierReference;
|
|
9891
9946
|
var PrimaryExpression$7 = ClassExpression;
|
|
9892
9947
|
var PrimaryExpression$8 = RegularExpressionLiteral;
|
|
9893
|
-
var PrimaryExpression$9 =
|
|
9948
|
+
var PrimaryExpression$9 = OptimizedParenthesizedExpression;
|
|
9894
9949
|
var PrimaryExpression$10 = Placeholder;
|
|
9895
9950
|
var PrimaryExpression$11 = SymbolLiteral;
|
|
9896
9951
|
var PrimaryExpression$12 = JSXImplicitFragment;
|
|
@@ -9898,31 +9953,36 @@ var PrimaryExpression$$ = [PrimaryExpression$0, PrimaryExpression$1, PrimaryExpr
|
|
|
9898
9953
|
function PrimaryExpression(ctx, state2) {
|
|
9899
9954
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PrimaryExpression", PrimaryExpression$$);
|
|
9900
9955
|
}
|
|
9956
|
+
var OptimizedParenthesizedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ParenthesizedExpression), function($skip, $loc, $0, $1) {
|
|
9957
|
+
const { expression } = $1;
|
|
9958
|
+
switch (expression.type) {
|
|
9959
|
+
case "StatementExpression":
|
|
9960
|
+
if (expression.statement.type !== "IterationExpression")
|
|
9961
|
+
break;
|
|
9962
|
+
case "IterationExpression":
|
|
9963
|
+
return expression;
|
|
9964
|
+
}
|
|
9965
|
+
return $1;
|
|
9966
|
+
});
|
|
9967
|
+
function OptimizedParenthesizedExpression(ctx, state2) {
|
|
9968
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "OptimizedParenthesizedExpression", OptimizedParenthesizedExpression$0);
|
|
9969
|
+
}
|
|
9901
9970
|
var ParenthesizedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, AllowAll, (0, import_lib2.$E)((0, import_lib2.$S)(PostfixedCommaExpression, __, CloseParen)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
9902
9971
|
var open = $1;
|
|
9903
9972
|
if (!$3)
|
|
9904
9973
|
return $skip;
|
|
9905
|
-
const [
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9911
|
-
|
|
9912
|
-
case "ParenthesizedExpression":
|
|
9913
|
-
if (exp.implicit) {
|
|
9914
|
-
return {
|
|
9915
|
-
...exp,
|
|
9916
|
-
children: [open, exp.expression, ws, close],
|
|
9917
|
-
implicit: false
|
|
9918
|
-
};
|
|
9919
|
-
}
|
|
9920
|
-
break;
|
|
9974
|
+
const [expression, ws, close] = $3;
|
|
9975
|
+
if (expression.type === "ParenthesizedExpression" && expression.implicit) {
|
|
9976
|
+
return {
|
|
9977
|
+
...expression,
|
|
9978
|
+
children: [open, expression.expression, ws, close],
|
|
9979
|
+
implicit: false
|
|
9980
|
+
};
|
|
9921
9981
|
}
|
|
9922
9982
|
return {
|
|
9923
9983
|
type: "ParenthesizedExpression",
|
|
9924
|
-
children: [open,
|
|
9925
|
-
expression
|
|
9984
|
+
children: [open, expression, ws, close],
|
|
9985
|
+
expression
|
|
9926
9986
|
};
|
|
9927
9987
|
});
|
|
9928
9988
|
function ParenthesizedExpression(ctx, state2) {
|
|
@@ -10460,15 +10520,15 @@ var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.
|
|
|
10460
10520
|
children: [$1, ...$2, ...rest.flat()]
|
|
10461
10521
|
});
|
|
10462
10522
|
});
|
|
10463
|
-
var CallExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(MemberExpression,
|
|
10523
|
+
var CallExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(MemberExpression, (0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3) {
|
|
10464
10524
|
var member = $1;
|
|
10465
|
-
var
|
|
10466
|
-
var
|
|
10467
|
-
if (rest.length || trailing
|
|
10525
|
+
var rest = $2;
|
|
10526
|
+
var trailing = $3;
|
|
10527
|
+
if (rest.length || trailing) {
|
|
10468
10528
|
rest = rest.flat();
|
|
10469
10529
|
return processCallMemberExpression({
|
|
10470
10530
|
type: "CallExpression",
|
|
10471
|
-
children: [member, ...
|
|
10531
|
+
children: [member, ...rest, ...trailing ?? []]
|
|
10472
10532
|
});
|
|
10473
10533
|
}
|
|
10474
10534
|
return member;
|
|
@@ -17783,7 +17843,7 @@ var InlineJSXPrimaryExpression$5 = ArrayLiteral;
|
|
|
17783
17843
|
var InlineJSXPrimaryExpression$6 = BracedObjectLiteral;
|
|
17784
17844
|
var InlineJSXPrimaryExpression$7 = IdentifierReference;
|
|
17785
17845
|
var InlineJSXPrimaryExpression$8 = RegularExpressionLiteral;
|
|
17786
|
-
var InlineJSXPrimaryExpression$9 =
|
|
17846
|
+
var InlineJSXPrimaryExpression$9 = OptimizedParenthesizedExpression;
|
|
17787
17847
|
var InlineJSXPrimaryExpression$$ = [InlineJSXPrimaryExpression$0, InlineJSXPrimaryExpression$1, InlineJSXPrimaryExpression$2, InlineJSXPrimaryExpression$3, InlineJSXPrimaryExpression$4, InlineJSXPrimaryExpression$5, InlineJSXPrimaryExpression$6, InlineJSXPrimaryExpression$7, InlineJSXPrimaryExpression$8, InlineJSXPrimaryExpression$9];
|
|
17788
17848
|
function InlineJSXPrimaryExpression(ctx, state2) {
|
|
17789
17849
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "InlineJSXPrimaryExpression", InlineJSXPrimaryExpression$$);
|
|
@@ -18949,7 +19009,7 @@ var TypeBullet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(BulletIndent, (0, im
|
|
|
18949
19009
|
function TypeBullet(ctx, state2) {
|
|
18950
19010
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeBullet", TypeBullet$0);
|
|
18951
19011
|
}
|
|
18952
|
-
var TypeWithPostfix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(TypeConditional, (0, import_lib2.$E)((0, import_lib2.$S)(
|
|
19012
|
+
var TypeWithPostfix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(TypeConditional, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$E)(_), TypeIfClause))), function($skip, $loc, $0, $1, $2) {
|
|
18953
19013
|
var t = $1;
|
|
18954
19014
|
var postfix = $2;
|
|
18955
19015
|
if (!postfix)
|