@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.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
|
|
31
|
+
// node_modules/@danielx/hera/dist/machine.js
|
|
32
32
|
var require_machine = __commonJS({
|
|
33
|
-
"node_modules
|
|
33
|
+
"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;
|
|
@@ -790,18 +790,31 @@ function insertTrimmingSpace(target, c) {
|
|
|
790
790
|
if (target.length === 0) {
|
|
791
791
|
return c;
|
|
792
792
|
}
|
|
793
|
-
|
|
793
|
+
const results = [];
|
|
794
|
+
for (let i3 = 0, len3 = target.length; i3 < len3; i3++) {
|
|
795
|
+
const i = i3;
|
|
796
|
+
const e = target[i3];
|
|
794
797
|
if (i === 0) {
|
|
795
|
-
|
|
798
|
+
results.push(insertTrimmingSpace(e, c));
|
|
796
799
|
} else {
|
|
797
|
-
|
|
800
|
+
results.push(e);
|
|
798
801
|
}
|
|
799
|
-
}
|
|
802
|
+
}
|
|
803
|
+
;
|
|
804
|
+
return results;
|
|
800
805
|
} else if (isParent(target)) {
|
|
801
|
-
|
|
806
|
+
const oldChildren = target.children;
|
|
807
|
+
target = {
|
|
802
808
|
...target,
|
|
803
809
|
children: insertTrimmingSpace(target.children, c)
|
|
804
810
|
};
|
|
811
|
+
for (const key in target) {
|
|
812
|
+
const i = oldChildren.indexOf(target[key]);
|
|
813
|
+
if (i >= 0) {
|
|
814
|
+
target[key] = target.children[i];
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
return target;
|
|
805
818
|
} else if (isToken(target)) {
|
|
806
819
|
return {
|
|
807
820
|
...target,
|
|
@@ -976,8 +989,8 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
|
|
|
976
989
|
return void 0;
|
|
977
990
|
}
|
|
978
991
|
if (Array.isArray(node)) {
|
|
979
|
-
for (let
|
|
980
|
-
const child = node[
|
|
992
|
+
for (let i4 = 0, len4 = node.length; i4 < len4; i4++) {
|
|
993
|
+
const child = node[i4];
|
|
981
994
|
if (skip(child)) {
|
|
982
995
|
continue;
|
|
983
996
|
}
|
|
@@ -1016,9 +1029,9 @@ function deepCopy(root) {
|
|
|
1016
1029
|
if (Array.isArray(node)) {
|
|
1017
1030
|
const array = new Array(node.length);
|
|
1018
1031
|
copied.set(node, array);
|
|
1019
|
-
for (let
|
|
1020
|
-
const i =
|
|
1021
|
-
const item = node[
|
|
1032
|
+
for (let i5 = 0, len5 = node.length; i5 < len5; i5++) {
|
|
1033
|
+
const i = i5;
|
|
1034
|
+
const item = node[i5];
|
|
1022
1035
|
array[i] = recurse(item);
|
|
1023
1036
|
}
|
|
1024
1037
|
} else if (node?.type === "Ref") {
|
|
@@ -1045,9 +1058,9 @@ function replaceNode(node, newNode, parent) {
|
|
|
1045
1058
|
throw new Error("replaceNode failed: node has no parent");
|
|
1046
1059
|
}
|
|
1047
1060
|
function recurse(children) {
|
|
1048
|
-
for (let
|
|
1049
|
-
const i =
|
|
1050
|
-
const child = children[
|
|
1061
|
+
for (let i6 = 0, len6 = children.length; i6 < len6; i6++) {
|
|
1062
|
+
const i = i6;
|
|
1063
|
+
const child = children[i6];
|
|
1051
1064
|
if (child === node) {
|
|
1052
1065
|
children[i] = newNode;
|
|
1053
1066
|
return true;
|
|
@@ -1084,9 +1097,9 @@ function replaceNodes(root, predicate, replacer) {
|
|
|
1084
1097
|
return root;
|
|
1085
1098
|
}
|
|
1086
1099
|
}
|
|
1087
|
-
for (let
|
|
1088
|
-
const i =
|
|
1089
|
-
const node = array[
|
|
1100
|
+
for (let i7 = 0, len7 = array.length; i7 < len7; i7++) {
|
|
1101
|
+
const i = i7;
|
|
1102
|
+
const node = array[i7];
|
|
1090
1103
|
if (!(node != null)) {
|
|
1091
1104
|
return;
|
|
1092
1105
|
}
|
|
@@ -1210,8 +1223,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1210
1223
|
return;
|
|
1211
1224
|
}
|
|
1212
1225
|
if (Array.isArray(node)) {
|
|
1213
|
-
for (let
|
|
1214
|
-
const child = node[
|
|
1226
|
+
for (let i8 = 0, len8 = node.length; i8 < len8; i8++) {
|
|
1227
|
+
const child = node[i8];
|
|
1215
1228
|
updateParentPointers(child, parent, depth);
|
|
1216
1229
|
}
|
|
1217
1230
|
return;
|
|
@@ -1221,8 +1234,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1221
1234
|
node.parent = parent;
|
|
1222
1235
|
}
|
|
1223
1236
|
if (depth && isParent(node)) {
|
|
1224
|
-
for (let ref5 = node.children,
|
|
1225
|
-
const child = ref5[
|
|
1237
|
+
for (let ref5 = node.children, i9 = 0, len9 = ref5.length; i9 < len9; i9++) {
|
|
1238
|
+
const child = ref5[i9];
|
|
1226
1239
|
updateParentPointers(child, node, depth - 1);
|
|
1227
1240
|
}
|
|
1228
1241
|
}
|
|
@@ -1398,9 +1411,9 @@ function wrapWithReturn(expression) {
|
|
|
1398
1411
|
}
|
|
1399
1412
|
function flatJoin(array, separator) {
|
|
1400
1413
|
const result = [];
|
|
1401
|
-
for (let
|
|
1402
|
-
const i =
|
|
1403
|
-
const items = array[
|
|
1414
|
+
for (let i10 = 0, len10 = array.length; i10 < len10; i10++) {
|
|
1415
|
+
const i = i10;
|
|
1416
|
+
const items = array[i10];
|
|
1404
1417
|
if (i) {
|
|
1405
1418
|
result.push(separator);
|
|
1406
1419
|
}
|
|
@@ -5575,9 +5588,12 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
5575
5588
|
ascDec = [", ", ascRef, " = ", startRef, " <= ", endRef];
|
|
5576
5589
|
}
|
|
5577
5590
|
let varAssign = [], varLetAssign = varAssign, varLet = varAssign, blockPrefix;
|
|
5578
|
-
let names = forDeclaration?.names;
|
|
5579
|
-
if (forDeclaration
|
|
5580
|
-
if (forDeclaration.
|
|
5591
|
+
let names = forDeclaration?.names ?? [];
|
|
5592
|
+
if (forDeclaration != null) {
|
|
5593
|
+
if (forDeclaration.type === "AssignmentExpression") {
|
|
5594
|
+
varAssign = varLetAssign = [forDeclaration, " = "];
|
|
5595
|
+
names = [];
|
|
5596
|
+
} else if (forDeclaration.decl === "let") {
|
|
5581
5597
|
const varName = forDeclaration.children.splice(1);
|
|
5582
5598
|
varAssign = [...trimFirstSpace(varName), " = "];
|
|
5583
5599
|
varLet = [",", ...varName, " = ", counterRef];
|
|
@@ -5587,14 +5603,6 @@ function forRange(open, forDeclaration, range, stepExp, close) {
|
|
|
5587
5603
|
["", [forDeclaration, " = ", value], ";"]
|
|
5588
5604
|
];
|
|
5589
5605
|
}
|
|
5590
|
-
} else if (forDeclaration) {
|
|
5591
|
-
assert.equal(
|
|
5592
|
-
forDeclaration.type,
|
|
5593
|
-
"AssignmentExpression",
|
|
5594
|
-
"Internal error: Coffee-style for loop must be an assignment expression"
|
|
5595
|
-
);
|
|
5596
|
-
varAssign = varLetAssign = [forDeclaration, " = "];
|
|
5597
|
-
names = [];
|
|
5598
5606
|
}
|
|
5599
5607
|
const declaration = {
|
|
5600
5608
|
type: "Declaration",
|
|
@@ -6114,7 +6122,8 @@ function addPostfixStatement(statement, ws, post) {
|
|
|
6114
6122
|
const block = makeNode({
|
|
6115
6123
|
type: "BlockStatement",
|
|
6116
6124
|
children: [" { ", expressions, " }"],
|
|
6117
|
-
expressions
|
|
6125
|
+
expressions,
|
|
6126
|
+
bare: false
|
|
6118
6127
|
});
|
|
6119
6128
|
const children = [...post.children, block];
|
|
6120
6129
|
if (!isWhitespaceOrEmpty(ws))
|
|
@@ -7813,9 +7822,12 @@ var grammar = {
|
|
|
7813
7822
|
ReservedBinary,
|
|
7814
7823
|
ArgumentsWithTrailingMemberExpressions,
|
|
7815
7824
|
TrailingMemberExpressions,
|
|
7816
|
-
|
|
7825
|
+
IndentedTrailingMemberExpressions,
|
|
7826
|
+
NestedTrailingMemberExpression,
|
|
7817
7827
|
AllowedTrailingMemberExpressions,
|
|
7818
7828
|
TrailingCallExpressions,
|
|
7829
|
+
IndentedTrailingCallExpressions,
|
|
7830
|
+
NestedTrailingCallExpression,
|
|
7819
7831
|
AllowedTrailingCallExpressions,
|
|
7820
7832
|
CommaDelimiter,
|
|
7821
7833
|
OptionalCommaDelimiter,
|
|
@@ -7873,6 +7885,7 @@ var grammar = {
|
|
|
7873
7885
|
PipelineHeadItem,
|
|
7874
7886
|
PipelineTailItem,
|
|
7875
7887
|
PrimaryExpression,
|
|
7888
|
+
OptimizedParenthesizedExpression,
|
|
7876
7889
|
ParenthesizedExpression,
|
|
7877
7890
|
Placeholder,
|
|
7878
7891
|
PlaceholderTypeSuffix,
|
|
@@ -9060,7 +9073,7 @@ var NestedExpressionizedStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((
|
|
|
9060
9073
|
return expression;
|
|
9061
9074
|
return {
|
|
9062
9075
|
type: "CallExpression",
|
|
9063
|
-
children: [expression, ...trailing
|
|
9076
|
+
children: [expression, ...trailing]
|
|
9064
9077
|
};
|
|
9065
9078
|
});
|
|
9066
9079
|
function NestedExpressionizedStatement(ctx, state2) {
|
|
@@ -9073,7 +9086,7 @@ var ExpressionizedStatementWithTrailingCallExpressions$0 = (0, import_lib2.$TS)(
|
|
|
9073
9086
|
type: "CallExpression",
|
|
9074
9087
|
children: [
|
|
9075
9088
|
makeLeftHandSideExpression($1),
|
|
9076
|
-
|
|
9089
|
+
...$2
|
|
9077
9090
|
]
|
|
9078
9091
|
};
|
|
9079
9092
|
});
|
|
@@ -9165,7 +9178,7 @@ var ExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, Al
|
|
|
9165
9178
|
function ExplicitArguments(ctx, state2) {
|
|
9166
9179
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExplicitArguments", ExplicitArguments$0);
|
|
9167
9180
|
}
|
|
9168
|
-
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)(
|
|
9181
|
+
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));
|
|
9169
9182
|
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))));
|
|
9170
9183
|
var ApplicationStart$$ = [ApplicationStart$0, ApplicationStart$1];
|
|
9171
9184
|
function ApplicationStart(ctx, state2) {
|
|
@@ -9206,19 +9219,34 @@ var ArgumentsWithTrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_l
|
|
|
9206
9219
|
function ArgumentsWithTrailingMemberExpressions(ctx, state2) {
|
|
9207
9220
|
return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingMemberExpressions", ArgumentsWithTrailingMemberExpressions$0);
|
|
9208
9221
|
}
|
|
9209
|
-
var TrailingMemberExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(MemberExpressionRest), (0, import_lib2.$
|
|
9222
|
+
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) {
|
|
9223
|
+
if (!$2)
|
|
9224
|
+
return $1;
|
|
9210
9225
|
return [...$1, ...$2];
|
|
9211
9226
|
});
|
|
9212
9227
|
function TrailingMemberExpressions(ctx, state2) {
|
|
9213
9228
|
return (0, import_lib2.$EVENT)(ctx, state2, "TrailingMemberExpressions", TrailingMemberExpressions$0);
|
|
9214
9229
|
}
|
|
9215
|
-
var
|
|
9230
|
+
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) {
|
|
9231
|
+
if (!$2.length)
|
|
9232
|
+
return $skip;
|
|
9233
|
+
return $2.flat();
|
|
9234
|
+
});
|
|
9235
|
+
var IndentedTrailingMemberExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingMemberExpression), function($skip, $loc, $0, $1) {
|
|
9236
|
+
return $1.flat();
|
|
9237
|
+
});
|
|
9238
|
+
var IndentedTrailingMemberExpressions$$ = [IndentedTrailingMemberExpressions$0, IndentedTrailingMemberExpressions$1];
|
|
9239
|
+
function IndentedTrailingMemberExpressions(ctx, state2) {
|
|
9240
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingMemberExpressions", IndentedTrailingMemberExpressions$$);
|
|
9241
|
+
}
|
|
9242
|
+
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) {
|
|
9216
9243
|
var ws = $1;
|
|
9217
|
-
var
|
|
9218
|
-
|
|
9244
|
+
var rests = $3;
|
|
9245
|
+
const [first, ...rest] = rests;
|
|
9246
|
+
return [prepend(ws, first), ...rest];
|
|
9219
9247
|
});
|
|
9220
|
-
function
|
|
9221
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "
|
|
9248
|
+
function NestedTrailingMemberExpression(ctx, state2) {
|
|
9249
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingMemberExpression", NestedTrailingMemberExpression$0);
|
|
9222
9250
|
}
|
|
9223
9251
|
var AllowedTrailingMemberExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingMemberExpressions), function(value) {
|
|
9224
9252
|
return value[1];
|
|
@@ -9228,10 +9256,37 @@ var AllowedTrailingMemberExpressions$$ = [AllowedTrailingMemberExpressions$0, Al
|
|
|
9228
9256
|
function AllowedTrailingMemberExpressions(ctx, state2) {
|
|
9229
9257
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "AllowedTrailingMemberExpressions", AllowedTrailingMemberExpressions$$);
|
|
9230
9258
|
}
|
|
9231
|
-
var TrailingCallExpressions$0 = (0, import_lib2.$
|
|
9259
|
+
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) {
|
|
9260
|
+
if (!$1.length && !$2)
|
|
9261
|
+
return $skip;
|
|
9262
|
+
if (!$2)
|
|
9263
|
+
return $1;
|
|
9264
|
+
return [...$1, ...$2];
|
|
9265
|
+
});
|
|
9232
9266
|
function TrailingCallExpressions(ctx, state2) {
|
|
9233
9267
|
return (0, import_lib2.$EVENT)(ctx, state2, "TrailingCallExpressions", TrailingCallExpressions$0);
|
|
9234
9268
|
}
|
|
9269
|
+
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) {
|
|
9270
|
+
if (!$2.length)
|
|
9271
|
+
return $skip;
|
|
9272
|
+
return $2.flat();
|
|
9273
|
+
});
|
|
9274
|
+
var IndentedTrailingCallExpressions$1 = (0, import_lib2.$TV)((0, import_lib2.$P)(NestedTrailingCallExpression), function($skip, $loc, $0, $1) {
|
|
9275
|
+
return $1.flat();
|
|
9276
|
+
});
|
|
9277
|
+
var IndentedTrailingCallExpressions$$ = [IndentedTrailingCallExpressions$0, IndentedTrailingCallExpressions$1];
|
|
9278
|
+
function IndentedTrailingCallExpressions(ctx, state2) {
|
|
9279
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "IndentedTrailingCallExpressions", IndentedTrailingCallExpressions$$);
|
|
9280
|
+
}
|
|
9281
|
+
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) {
|
|
9282
|
+
var ws = $1;
|
|
9283
|
+
var rests = $3;
|
|
9284
|
+
const [first, ...rest] = rests.flat();
|
|
9285
|
+
return [prepend(ws, first), ...rest];
|
|
9286
|
+
});
|
|
9287
|
+
function NestedTrailingCallExpression(ctx, state2) {
|
|
9288
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "NestedTrailingCallExpression", NestedTrailingCallExpression$0);
|
|
9289
|
+
}
|
|
9235
9290
|
var AllowedTrailingCallExpressions$0 = (0, import_lib2.$T)((0, import_lib2.$S)(TrailingMemberPropertyAllowed, TrailingCallExpressions), function(value) {
|
|
9236
9291
|
return value[1];
|
|
9237
9292
|
});
|
|
@@ -9835,7 +9890,7 @@ function PipelineExpressionBodySameLine(ctx, state2) {
|
|
|
9835
9890
|
return (0, import_lib2.$EVENT)(ctx, state2, "PipelineExpressionBodySameLine", PipelineExpressionBodySameLine$0);
|
|
9836
9891
|
}
|
|
9837
9892
|
var PipelineHeadItem$0 = NonPipelineExpression;
|
|
9838
|
-
var PipelineHeadItem$1 =
|
|
9893
|
+
var PipelineHeadItem$1 = OptimizedParenthesizedExpression;
|
|
9839
9894
|
var PipelineHeadItem$$ = [PipelineHeadItem$0, PipelineHeadItem$1];
|
|
9840
9895
|
function PipelineHeadItem(ctx, state2) {
|
|
9841
9896
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PipelineHeadItem", PipelineHeadItem$$);
|
|
@@ -9870,7 +9925,7 @@ var PrimaryExpression$5 = FunctionExpression;
|
|
|
9870
9925
|
var PrimaryExpression$6 = IdentifierReference;
|
|
9871
9926
|
var PrimaryExpression$7 = ClassExpression;
|
|
9872
9927
|
var PrimaryExpression$8 = RegularExpressionLiteral;
|
|
9873
|
-
var PrimaryExpression$9 =
|
|
9928
|
+
var PrimaryExpression$9 = OptimizedParenthesizedExpression;
|
|
9874
9929
|
var PrimaryExpression$10 = Placeholder;
|
|
9875
9930
|
var PrimaryExpression$11 = SymbolLiteral;
|
|
9876
9931
|
var PrimaryExpression$12 = JSXImplicitFragment;
|
|
@@ -9878,31 +9933,36 @@ var PrimaryExpression$$ = [PrimaryExpression$0, PrimaryExpression$1, PrimaryExpr
|
|
|
9878
9933
|
function PrimaryExpression(ctx, state2) {
|
|
9879
9934
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "PrimaryExpression", PrimaryExpression$$);
|
|
9880
9935
|
}
|
|
9936
|
+
var OptimizedParenthesizedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ParenthesizedExpression), function($skip, $loc, $0, $1) {
|
|
9937
|
+
const { expression } = $1;
|
|
9938
|
+
switch (expression.type) {
|
|
9939
|
+
case "StatementExpression":
|
|
9940
|
+
if (expression.statement.type !== "IterationExpression")
|
|
9941
|
+
break;
|
|
9942
|
+
case "IterationExpression":
|
|
9943
|
+
return expression;
|
|
9944
|
+
}
|
|
9945
|
+
return $1;
|
|
9946
|
+
});
|
|
9947
|
+
function OptimizedParenthesizedExpression(ctx, state2) {
|
|
9948
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "OptimizedParenthesizedExpression", OptimizedParenthesizedExpression$0);
|
|
9949
|
+
}
|
|
9881
9950
|
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) {
|
|
9882
9951
|
var open = $1;
|
|
9883
9952
|
if (!$3)
|
|
9884
9953
|
return $skip;
|
|
9885
|
-
const [
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
case "ParenthesizedExpression":
|
|
9893
|
-
if (exp.implicit) {
|
|
9894
|
-
return {
|
|
9895
|
-
...exp,
|
|
9896
|
-
children: [open, exp.expression, ws, close],
|
|
9897
|
-
implicit: false
|
|
9898
|
-
};
|
|
9899
|
-
}
|
|
9900
|
-
break;
|
|
9954
|
+
const [expression, ws, close] = $3;
|
|
9955
|
+
if (expression.type === "ParenthesizedExpression" && expression.implicit) {
|
|
9956
|
+
return {
|
|
9957
|
+
...expression,
|
|
9958
|
+
children: [open, expression.expression, ws, close],
|
|
9959
|
+
implicit: false
|
|
9960
|
+
};
|
|
9901
9961
|
}
|
|
9902
9962
|
return {
|
|
9903
9963
|
type: "ParenthesizedExpression",
|
|
9904
|
-
children: [open,
|
|
9905
|
-
expression
|
|
9964
|
+
children: [open, expression, ws, close],
|
|
9965
|
+
expression
|
|
9906
9966
|
};
|
|
9907
9967
|
});
|
|
9908
9968
|
function ParenthesizedExpression(ctx, state2) {
|
|
@@ -10440,15 +10500,15 @@ var CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.
|
|
|
10440
10500
|
children: [$1, ...$2, ...rest.flat()]
|
|
10441
10501
|
});
|
|
10442
10502
|
});
|
|
10443
|
-
var CallExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(MemberExpression,
|
|
10503
|
+
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) {
|
|
10444
10504
|
var member = $1;
|
|
10445
|
-
var
|
|
10446
|
-
var
|
|
10447
|
-
if (rest.length || trailing
|
|
10505
|
+
var rest = $2;
|
|
10506
|
+
var trailing = $3;
|
|
10507
|
+
if (rest.length || trailing) {
|
|
10448
10508
|
rest = rest.flat();
|
|
10449
10509
|
return processCallMemberExpression({
|
|
10450
10510
|
type: "CallExpression",
|
|
10451
|
-
children: [member, ...
|
|
10511
|
+
children: [member, ...rest, ...trailing ?? []]
|
|
10452
10512
|
});
|
|
10453
10513
|
}
|
|
10454
10514
|
return member;
|
|
@@ -17763,7 +17823,7 @@ var InlineJSXPrimaryExpression$5 = ArrayLiteral;
|
|
|
17763
17823
|
var InlineJSXPrimaryExpression$6 = BracedObjectLiteral;
|
|
17764
17824
|
var InlineJSXPrimaryExpression$7 = IdentifierReference;
|
|
17765
17825
|
var InlineJSXPrimaryExpression$8 = RegularExpressionLiteral;
|
|
17766
|
-
var InlineJSXPrimaryExpression$9 =
|
|
17826
|
+
var InlineJSXPrimaryExpression$9 = OptimizedParenthesizedExpression;
|
|
17767
17827
|
var InlineJSXPrimaryExpression$$ = [InlineJSXPrimaryExpression$0, InlineJSXPrimaryExpression$1, InlineJSXPrimaryExpression$2, InlineJSXPrimaryExpression$3, InlineJSXPrimaryExpression$4, InlineJSXPrimaryExpression$5, InlineJSXPrimaryExpression$6, InlineJSXPrimaryExpression$7, InlineJSXPrimaryExpression$8, InlineJSXPrimaryExpression$9];
|
|
17768
17828
|
function InlineJSXPrimaryExpression(ctx, state2) {
|
|
17769
17829
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "InlineJSXPrimaryExpression", InlineJSXPrimaryExpression$$);
|
|
@@ -18929,7 +18989,7 @@ var TypeBullet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(BulletIndent, (0, im
|
|
|
18929
18989
|
function TypeBullet(ctx, state2) {
|
|
18930
18990
|
return (0, import_lib2.$EVENT)(ctx, state2, "TypeBullet", TypeBullet$0);
|
|
18931
18991
|
}
|
|
18932
|
-
var TypeWithPostfix$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(TypeConditional, (0, import_lib2.$E)((0, import_lib2.$S)(
|
|
18992
|
+
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) {
|
|
18933
18993
|
var t = $1;
|
|
18934
18994
|
var postfix = $2;
|
|
18935
18995
|
if (!postfix)
|