@danielx/civet 0.9.6 → 0.10.0
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 +18 -0
- package/dist/browser.js +161 -111
- package/dist/main.js +204 -138
- package/dist/main.mjs +204 -138
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -514,12 +514,14 @@ __export(lib_civet_exports, {
|
|
|
514
514
|
attachPostfixStatementAsExpression: () => attachPostfixStatementAsExpression,
|
|
515
515
|
blockWithPrefix: () => blockWithPrefix,
|
|
516
516
|
braceBlock: () => braceBlock,
|
|
517
|
+
bracedBlock: () => bracedBlock,
|
|
517
518
|
convertNamedImportsToObject: () => convertNamedImportsToObject,
|
|
518
519
|
convertObjectToJSXAttributes: () => convertObjectToJSXAttributes,
|
|
519
520
|
convertWithClause: () => convertWithClause,
|
|
520
521
|
dedentBlockString: () => dedentBlockString,
|
|
521
522
|
dedentBlockSubstitutions: () => dedentBlockSubstitutions,
|
|
522
523
|
deepCopy: () => deepCopy,
|
|
524
|
+
duplicateBlock: () => duplicateBlock,
|
|
523
525
|
dynamizeImportDeclaration: () => dynamizeImportDeclaration,
|
|
524
526
|
dynamizeImportDeclarationExpression: () => dynamizeImportDeclarationExpression,
|
|
525
527
|
expressionizeTypeIf: () => expressionizeTypeIf,
|
|
@@ -776,9 +778,49 @@ function isExit(node) {
|
|
|
776
778
|
}
|
|
777
779
|
case "SwitchStatement": {
|
|
778
780
|
return (
|
|
779
|
-
//
|
|
780
|
-
|
|
781
|
-
|
|
781
|
+
// Every clause should exit, or continue to next clause
|
|
782
|
+
(() => {
|
|
783
|
+
let results = true;
|
|
784
|
+
for (const clause of node.caseBlock.clauses) {
|
|
785
|
+
let m1;
|
|
786
|
+
if (m1 = clause.type, m1 === "CaseClause" || m1 === "WhenClause" || m1 === "DefaultClause") {
|
|
787
|
+
if (!(!(clause.type === "WhenClause" && clause.break) && !gatherRecursiveWithinFunction(clause.block, ($) => $.type === "BreakStatement").length)) {
|
|
788
|
+
results = false;
|
|
789
|
+
break;
|
|
790
|
+
}
|
|
791
|
+
} else {
|
|
792
|
+
if (!isExit(clause.block)) {
|
|
793
|
+
results = false;
|
|
794
|
+
break;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
return results;
|
|
799
|
+
})() && // Ensure exhaustive by requiring an else/default clause
|
|
800
|
+
(() => {
|
|
801
|
+
let results1 = false;
|
|
802
|
+
let i3 = 0;
|
|
803
|
+
for (const clause of node.caseBlock.clauses) {
|
|
804
|
+
const i = i3++;
|
|
805
|
+
if (clause.type === "DefaultClause" && // Require default clause to exit or continue to next clause
|
|
806
|
+
// (checked above) and eventually reach an exiting clause
|
|
807
|
+
(() => {
|
|
808
|
+
let results2 = false;
|
|
809
|
+
for (const later of node.caseBlock.clauses.slice(i)) {
|
|
810
|
+
let m2;
|
|
811
|
+
if ((m2 = later.type, m2 === "CaseClause" || m2 === "WhenClause" || m2 === "DefaultClause") && isExit(later.block)) {
|
|
812
|
+
results2 = true;
|
|
813
|
+
break;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
return results2;
|
|
817
|
+
})()) {
|
|
818
|
+
results1 = true;
|
|
819
|
+
break;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
return results1;
|
|
823
|
+
})()
|
|
782
824
|
);
|
|
783
825
|
}
|
|
784
826
|
case "TryStatement": {
|
|
@@ -841,18 +883,18 @@ function insertTrimmingSpace(target, c) {
|
|
|
841
883
|
if (target.length === 0) {
|
|
842
884
|
return c;
|
|
843
885
|
}
|
|
844
|
-
const
|
|
845
|
-
for (let
|
|
846
|
-
const i =
|
|
847
|
-
const e = target[
|
|
886
|
+
const results3 = [];
|
|
887
|
+
for (let i4 = 0, len3 = target.length; i4 < len3; i4++) {
|
|
888
|
+
const i = i4;
|
|
889
|
+
const e = target[i4];
|
|
848
890
|
if (i === 0) {
|
|
849
|
-
|
|
891
|
+
results3.push(insertTrimmingSpace(e, c));
|
|
850
892
|
} else {
|
|
851
|
-
|
|
893
|
+
results3.push(e);
|
|
852
894
|
}
|
|
853
895
|
}
|
|
854
896
|
;
|
|
855
|
-
return
|
|
897
|
+
return results3;
|
|
856
898
|
} else if (isParent(target)) {
|
|
857
899
|
const oldChildren = target.children;
|
|
858
900
|
target = {
|
|
@@ -1087,8 +1129,8 @@ function startsWithPredicate(node, predicate, skip = isWhitespaceOrEmpty) {
|
|
|
1087
1129
|
return void 0;
|
|
1088
1130
|
}
|
|
1089
1131
|
if (Array.isArray(node)) {
|
|
1090
|
-
for (let
|
|
1091
|
-
const child = node[
|
|
1132
|
+
for (let i5 = 0, len4 = node.length; i5 < len4; i5++) {
|
|
1133
|
+
const child = node[i5];
|
|
1092
1134
|
if (skip(child)) {
|
|
1093
1135
|
continue;
|
|
1094
1136
|
}
|
|
@@ -1127,9 +1169,9 @@ function deepCopy(root) {
|
|
|
1127
1169
|
if (Array.isArray(node)) {
|
|
1128
1170
|
const array = new Array(node.length);
|
|
1129
1171
|
copied.set(node, array);
|
|
1130
|
-
for (let
|
|
1131
|
-
const i =
|
|
1132
|
-
const item = node[
|
|
1172
|
+
for (let i6 = 0, len5 = node.length; i6 < len5; i6++) {
|
|
1173
|
+
const i = i6;
|
|
1174
|
+
const item = node[i6];
|
|
1133
1175
|
array[i] = recurse(item);
|
|
1134
1176
|
}
|
|
1135
1177
|
} else if (node?.type === "Ref") {
|
|
@@ -1156,9 +1198,9 @@ function replaceNode(node, newNode, parent) {
|
|
|
1156
1198
|
throw new Error("replaceNode failed: node has no parent");
|
|
1157
1199
|
}
|
|
1158
1200
|
function recurse(children) {
|
|
1159
|
-
for (let
|
|
1160
|
-
const i =
|
|
1161
|
-
const child = children[
|
|
1201
|
+
for (let i7 = 0, len6 = children.length; i7 < len6; i7++) {
|
|
1202
|
+
const i = i7;
|
|
1203
|
+
const child = children[i7];
|
|
1162
1204
|
if (child === node) {
|
|
1163
1205
|
children[i] = newNode;
|
|
1164
1206
|
return true;
|
|
@@ -1195,9 +1237,9 @@ function replaceNodes(root, predicate, replacer) {
|
|
|
1195
1237
|
return root;
|
|
1196
1238
|
}
|
|
1197
1239
|
}
|
|
1198
|
-
for (let
|
|
1199
|
-
const i =
|
|
1200
|
-
const node = array[
|
|
1240
|
+
for (let i8 = 0, len7 = array.length; i8 < len7; i8++) {
|
|
1241
|
+
const i = i8;
|
|
1242
|
+
const node = array[i8];
|
|
1201
1243
|
if (!(node != null)) {
|
|
1202
1244
|
return;
|
|
1203
1245
|
}
|
|
@@ -1321,8 +1363,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1321
1363
|
return;
|
|
1322
1364
|
}
|
|
1323
1365
|
if (Array.isArray(node)) {
|
|
1324
|
-
for (let
|
|
1325
|
-
const child = node[
|
|
1366
|
+
for (let i9 = 0, len8 = node.length; i9 < len8; i9++) {
|
|
1367
|
+
const child = node[i9];
|
|
1326
1368
|
updateParentPointers(child, parent, depth);
|
|
1327
1369
|
}
|
|
1328
1370
|
return;
|
|
@@ -1332,8 +1374,8 @@ function updateParentPointers(node, parent, depth = 1) {
|
|
|
1332
1374
|
node.parent = parent;
|
|
1333
1375
|
}
|
|
1334
1376
|
if (depth && isParent(node)) {
|
|
1335
|
-
for (let ref8 = node.children,
|
|
1336
|
-
const child = ref8[
|
|
1377
|
+
for (let ref8 = node.children, i10 = 0, len9 = ref8.length; i10 < len9; i10++) {
|
|
1378
|
+
const child = ref8[i10];
|
|
1337
1379
|
updateParentPointers(child, node, depth - 1);
|
|
1338
1380
|
}
|
|
1339
1381
|
}
|
|
@@ -1530,9 +1572,9 @@ function wrapWithReturn(expression, parent = expression?.parent, semi = false) {
|
|
|
1530
1572
|
}
|
|
1531
1573
|
function flatJoin(array, separator) {
|
|
1532
1574
|
const result = [];
|
|
1533
|
-
for (let
|
|
1534
|
-
const i =
|
|
1535
|
-
const items = array[
|
|
1575
|
+
for (let i11 = 0, len10 = array.length; i11 < len10; i11++) {
|
|
1576
|
+
const i = i11;
|
|
1577
|
+
const items = array[i11];
|
|
1536
1578
|
if (i) {
|
|
1537
1579
|
result.push(separator);
|
|
1538
1580
|
}
|
|
@@ -1970,6 +2012,9 @@ function gatherBindingPatternTypeSuffix(pattern) {
|
|
|
1970
2012
|
ts: true,
|
|
1971
2013
|
children: [": unknown"]
|
|
1972
2014
|
};
|
|
2015
|
+
if (prop.initializer && !typeSuffix.optional) {
|
|
2016
|
+
typeSuffix.children.unshift(typeSuffix.optional = "?");
|
|
2017
|
+
}
|
|
1973
2018
|
switch (prop.type) {
|
|
1974
2019
|
case "BindingProperty": {
|
|
1975
2020
|
const ws = prop.children.slice(0, prop.children.indexOf(prop.name));
|
|
@@ -3152,12 +3197,10 @@ function assignResults(node, collect) {
|
|
|
3152
3197
|
}
|
|
3153
3198
|
case "IfStatement": {
|
|
3154
3199
|
assignResults(exp.then, collect);
|
|
3155
|
-
if (exp.then.bare && !exp.then.semicolon) {
|
|
3156
|
-
exp.then.children.push(exp.then.semicolon = ";");
|
|
3157
|
-
}
|
|
3158
3200
|
if (exp.else) {
|
|
3159
3201
|
assignResults(exp.else.block, collect);
|
|
3160
3202
|
} else {
|
|
3203
|
+
braceBlock(exp.then);
|
|
3161
3204
|
exp.children.push([" else {", collect("void 0"), "}"]);
|
|
3162
3205
|
}
|
|
3163
3206
|
return;
|
|
@@ -4241,6 +4284,11 @@ function duplicateBlock(block) {
|
|
|
4241
4284
|
children
|
|
4242
4285
|
};
|
|
4243
4286
|
}
|
|
4287
|
+
function bracedBlock(block) {
|
|
4288
|
+
block = duplicateBlock(block);
|
|
4289
|
+
braceBlock(block);
|
|
4290
|
+
return block;
|
|
4291
|
+
}
|
|
4244
4292
|
function makeEmptyBlock() {
|
|
4245
4293
|
const expressions = [];
|
|
4246
4294
|
return {
|
|
@@ -5362,7 +5410,7 @@ function processDeclarations(statements) {
|
|
|
5362
5410
|
});
|
|
5363
5411
|
}
|
|
5364
5412
|
}
|
|
5365
|
-
if (initializer) {
|
|
5413
|
+
if (initializer && blockContainingStatement(declaration)) {
|
|
5366
5414
|
prependStatementExpressionBlock(initializer, declaration);
|
|
5367
5415
|
}
|
|
5368
5416
|
}
|
|
@@ -8986,6 +9034,7 @@ var grammar = {
|
|
|
8986
9034
|
ExplicitPropertyGlob,
|
|
8987
9035
|
PropertyGlob,
|
|
8988
9036
|
PropertyBind,
|
|
9037
|
+
PropertyBindExplicitArguments,
|
|
8989
9038
|
SuperProperty,
|
|
8990
9039
|
MetaProperty,
|
|
8991
9040
|
ReturnValue,
|
|
@@ -9264,8 +9313,6 @@ var grammar = {
|
|
|
9264
9313
|
NamedImports,
|
|
9265
9314
|
OperatorNamedImports,
|
|
9266
9315
|
FromClause,
|
|
9267
|
-
ImpliedFromClause,
|
|
9268
|
-
ImpliedFrom,
|
|
9269
9316
|
ImportAssertion,
|
|
9270
9317
|
TypeAndImportSpecifier,
|
|
9271
9318
|
ImportSpecifier,
|
|
@@ -9701,16 +9748,16 @@ var $L13 = (0, import_lib2.$L)("=>");
|
|
|
9701
9748
|
var $L14 = (0, import_lib2.$L)("\u21D2");
|
|
9702
9749
|
var $L15 = (0, import_lib2.$L)("import");
|
|
9703
9750
|
var $L16 = (0, import_lib2.$L)(":");
|
|
9704
|
-
var $L17 = (0, import_lib2.$L)("
|
|
9705
|
-
var $L18 = (0, import_lib2.$L)("
|
|
9706
|
-
var $L19 = (0, import_lib2.$L)("
|
|
9707
|
-
var $L20 = (0, import_lib2.$L)("
|
|
9708
|
-
var $L21 = (0, import_lib2.$L)("
|
|
9709
|
-
var $L22 = (0, import_lib2.$L)("
|
|
9710
|
-
var $L23 = (0, import_lib2.$L)("
|
|
9711
|
-
var $L24 = (0, import_lib2.$L)("
|
|
9712
|
-
var $L25 = (0, import_lib2.$L)("
|
|
9713
|
-
var $L26 = (0, import_lib2.$L)("
|
|
9751
|
+
var $L17 = (0, import_lib2.$L)(" ");
|
|
9752
|
+
var $L18 = (0, import_lib2.$L)("<");
|
|
9753
|
+
var $L19 = (0, import_lib2.$L)("implements");
|
|
9754
|
+
var $L20 = (0, import_lib2.$L)("<:");
|
|
9755
|
+
var $L21 = (0, import_lib2.$L)("^");
|
|
9756
|
+
var $L22 = (0, import_lib2.$L)("<?");
|
|
9757
|
+
var $L23 = (0, import_lib2.$L)("-");
|
|
9758
|
+
var $L24 = (0, import_lib2.$L)("import.meta");
|
|
9759
|
+
var $L25 = (0, import_lib2.$L)("return.value");
|
|
9760
|
+
var $L26 = (0, import_lib2.$L)(",");
|
|
9714
9761
|
var $L27 = (0, import_lib2.$L)("tighter");
|
|
9715
9762
|
var $L28 = (0, import_lib2.$L)("looser");
|
|
9716
9763
|
var $L29 = (0, import_lib2.$L)("same");
|
|
@@ -9953,7 +10000,7 @@ var $R16 = (0, import_lib2.$R)(new RegExp(`(?=[0-9.'"tfyno])`, "suy"));
|
|
|
9953
10000
|
var $R17 = (0, import_lib2.$R)(new RegExp("(?=true|false|yes|no|on|off)", "suy"));
|
|
9954
10001
|
var $R18 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$])", "suy"));
|
|
9955
10002
|
var $R19 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
|
|
9956
|
-
var $R20 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022])", "suy"));
|
|
10003
|
+
var $R20 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022\\/])", "suy"));
|
|
9957
10004
|
var $R21 = (0, import_lib2.$R)(new RegExp("([<>])(=?)|([\u2264\u2265])", "suy"));
|
|
9958
10005
|
var $R22 = (0, import_lib2.$R)(new RegExp("[ \\t]*", "suy"));
|
|
9959
10006
|
var $R23 = (0, import_lib2.$R)(new RegExp("[ \\t]+", "suy"));
|
|
@@ -10519,13 +10566,19 @@ var IsLike$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Is, (0, import_lib2.$E)(
|
|
|
10519
10566
|
function IsLike(ctx, state2) {
|
|
10520
10567
|
return (0, import_lib2.$EVENT)(ctx, state2, "IsLike", IsLike$0);
|
|
10521
10568
|
}
|
|
10522
|
-
var WRHS$0 = (0, import_lib2.$
|
|
10569
|
+
var WRHS$0 = (0, import_lib2.$T)((0, import_lib2.$S)(NestedBulletedArray), function(value) {
|
|
10570
|
+
return [void 0, value[0]];
|
|
10571
|
+
});
|
|
10572
|
+
var WRHS$1 = (0, import_lib2.$T)((0, import_lib2.$S)(NestedImplicitObjectLiteral), function(value) {
|
|
10573
|
+
return [void 0, value[0]];
|
|
10574
|
+
});
|
|
10575
|
+
var WRHS$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$S)(Nested, (0, import_lib2.$E)(_)), RHS)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
10523
10576
|
var wrhs = $2;
|
|
10524
10577
|
if (!wrhs) return $skip;
|
|
10525
10578
|
return wrhs;
|
|
10526
10579
|
});
|
|
10527
|
-
var WRHS$
|
|
10528
|
-
var WRHS$$ = [WRHS$0, WRHS$1];
|
|
10580
|
+
var WRHS$3 = (0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$S)(EOS, __), _), RHS);
|
|
10581
|
+
var WRHS$$ = [WRHS$0, WRHS$1, WRHS$2, WRHS$3];
|
|
10529
10582
|
function WRHS(ctx, state2) {
|
|
10530
10583
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "WRHS", WRHS$$);
|
|
10531
10584
|
}
|
|
@@ -10664,11 +10717,13 @@ var NWTypePostfix$$ = [NWTypePostfix$0, NWTypePostfix$1, NWTypePostfix$2];
|
|
|
10664
10717
|
function NWTypePostfix(ctx, state2) {
|
|
10665
10718
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "NWTypePostfix", NWTypePostfix$$);
|
|
10666
10719
|
}
|
|
10667
|
-
var UpdateExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(UpdateExpressionSymbol, UnaryWithoutParenthesizedAssignment), function($skip, $loc, $0, $1, $2) {
|
|
10720
|
+
var UpdateExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(UpdateExpressionSymbol, (0, import_lib2.$N)(Whitespace), UnaryWithoutParenthesizedAssignment), function($skip, $loc, $0, $1, $2, $3) {
|
|
10721
|
+
var symbol = $1;
|
|
10722
|
+
var assigned = $3;
|
|
10668
10723
|
return {
|
|
10669
10724
|
type: "UpdateExpression",
|
|
10670
|
-
assigned
|
|
10671
|
-
children:
|
|
10725
|
+
assigned,
|
|
10726
|
+
children: [symbol, assigned]
|
|
10672
10727
|
};
|
|
10673
10728
|
});
|
|
10674
10729
|
var UpdateExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(LeftHandSideExpression, (0, import_lib2.$E)((0, import_lib2.$S)(UpdateExpressionSymbol, (0, import_lib2.$EXPECT)($R4, "UpdateExpression /(?!\\p{ID_Start}|[_$0-9(\\[{])/")))), function($skip, $loc, $0, $1, $2) {
|
|
@@ -11127,32 +11182,43 @@ var ExtendsClause$0 = (0, import_lib2.$S)(ExtendsToken, __, ExtendsTarget);
|
|
|
11127
11182
|
function ExtendsClause(ctx, state2) {
|
|
11128
11183
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExtendsClause", ExtendsClause$0);
|
|
11129
11184
|
}
|
|
11130
|
-
var WithClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
11185
|
+
var WithClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(NotDedented, With, PushIndent, (0, import_lib2.$Q)((0, import_lib2.$S)(Nested, ExtendsTarget, (0, import_lib2.$E)(_), (0, import_lib2.$E)(Comma))), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
11186
|
+
var targets = $4;
|
|
11187
|
+
if (!targets.length) return $skip;
|
|
11188
|
+
targets = targets.map(($) => $.slice(0, -1));
|
|
11189
|
+
return {
|
|
11190
|
+
type: "WithClause",
|
|
11191
|
+
children: $0,
|
|
11192
|
+
targets
|
|
11193
|
+
};
|
|
11194
|
+
});
|
|
11195
|
+
var WithClause$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(NotDedented, With, NotDedented, ExtendsTarget, (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$E)(_), Comma, NotDedented, ExtendsTarget))), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
11131
11196
|
var ws = $3;
|
|
11132
11197
|
var t = $4;
|
|
11133
11198
|
var rest = $5;
|
|
11134
11199
|
return {
|
|
11135
11200
|
type: "WithClause",
|
|
11136
11201
|
children: $0,
|
|
11137
|
-
targets: [[ws, t], ...rest.map(([_comma, ws2, target]) => [ws2, target])]
|
|
11202
|
+
targets: [[ws, t], ...rest.map(([ws1, _comma, ws2, target]) => [prepend(ws1, ws2), target])]
|
|
11138
11203
|
};
|
|
11139
11204
|
});
|
|
11205
|
+
var WithClause$$ = [WithClause$0, WithClause$1];
|
|
11140
11206
|
function WithClause(ctx, state2) {
|
|
11141
|
-
return (0, import_lib2.$
|
|
11207
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "WithClause", WithClause$$);
|
|
11142
11208
|
}
|
|
11143
|
-
var ExtendsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
11144
|
-
var
|
|
11145
|
-
var
|
|
11209
|
+
var ExtendsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(NotDedented, InsertSpace, ExtendsShorthand, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'ExtendsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
11210
|
+
var ws = $1;
|
|
11211
|
+
var s = $2;
|
|
11146
11212
|
var t = $3;
|
|
11147
11213
|
return {
|
|
11148
11214
|
type: "Extends",
|
|
11149
11215
|
children: [
|
|
11150
|
-
ws
|
|
11216
|
+
ws.length ? ws : s,
|
|
11151
11217
|
t
|
|
11152
11218
|
]
|
|
11153
11219
|
};
|
|
11154
11220
|
});
|
|
11155
|
-
var ExtendsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
11221
|
+
var ExtendsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(NotDedented, Extends), function($skip, $loc, $0, $1, $2) {
|
|
11156
11222
|
return {
|
|
11157
11223
|
type: "Extends",
|
|
11158
11224
|
children: $0
|
|
@@ -11162,13 +11228,13 @@ var ExtendsToken$$ = [ExtendsToken$0, ExtendsToken$1];
|
|
|
11162
11228
|
function ExtendsToken(ctx, state2) {
|
|
11163
11229
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ExtendsToken", ExtendsToken$$);
|
|
11164
11230
|
}
|
|
11165
|
-
var ExtendsShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
11231
|
+
var ExtendsShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L18, 'ExtendsShorthand "<"'), function($skip, $loc, $0, $1) {
|
|
11166
11232
|
return { $loc, token: "extends " };
|
|
11167
11233
|
});
|
|
11168
11234
|
function ExtendsShorthand(ctx, state2) {
|
|
11169
11235
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExtendsShorthand", ExtendsShorthand$0);
|
|
11170
11236
|
}
|
|
11171
|
-
var NotExtendsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, (0, import_lib2.$E)(_), OmittedNegation, ExtendsShorthand, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
11237
|
+
var NotExtendsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, (0, import_lib2.$E)(_), OmittedNegation, ExtendsShorthand, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'NotExtendsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
11172
11238
|
var l = $1;
|
|
11173
11239
|
var ws1 = $2;
|
|
11174
11240
|
var ws2 = $3;
|
|
@@ -11194,7 +11260,7 @@ function NotExtendsToken(ctx, state2) {
|
|
|
11194
11260
|
var OmittedNegation$0 = (0, import_lib2.$T)((0, import_lib2.$S)(ExclamationPoint), function(value) {
|
|
11195
11261
|
return "";
|
|
11196
11262
|
});
|
|
11197
|
-
var OmittedNegation$1 = (0, import_lib2.$T)((0, import_lib2.$S)(Not, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
11263
|
+
var OmittedNegation$1 = (0, import_lib2.$T)((0, import_lib2.$S)(Not, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'OmittedNegation " "')), (0, import_lib2.$E)(_)), function(value) {
|
|
11198
11264
|
return value[2];
|
|
11199
11265
|
});
|
|
11200
11266
|
var OmittedNegation$$ = [OmittedNegation$0, OmittedNegation$1];
|
|
@@ -11208,16 +11274,28 @@ var ExtendsTarget$0 = (0, import_lib2.$TV)(LeftHandSideExpressionWithObjectAppli
|
|
|
11208
11274
|
function ExtendsTarget(ctx, state2) {
|
|
11209
11275
|
return (0, import_lib2.$EVENT)(ctx, state2, "ExtendsTarget", ExtendsTarget$0);
|
|
11210
11276
|
}
|
|
11211
|
-
var ImplementsClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImplementsToken,
|
|
11277
|
+
var ImplementsClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImplementsToken, PushIndent, (0, import_lib2.$Q)((0, import_lib2.$S)(Nested, ImplementsTarget, ArrayBulletDelimiter)), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
11278
|
+
var i = $1;
|
|
11279
|
+
var targets = $3;
|
|
11280
|
+
if (!targets.length) return $skip;
|
|
11281
|
+
const last = targets.at(-1).slice(0, -1);
|
|
11282
|
+
targets = targets.slice(0, -1).concat(last);
|
|
11283
|
+
return {
|
|
11284
|
+
ts: true,
|
|
11285
|
+
children: [i, targets]
|
|
11286
|
+
};
|
|
11287
|
+
});
|
|
11288
|
+
var ImplementsClause$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImplementsToken, ImplementsTarget, (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$E)(_), Comma, ImplementsTarget))), function($skip, $loc, $0, $1, $2, $3) {
|
|
11212
11289
|
return {
|
|
11213
11290
|
ts: true,
|
|
11214
11291
|
children: $0
|
|
11215
11292
|
};
|
|
11216
11293
|
});
|
|
11294
|
+
var ImplementsClause$$ = [ImplementsClause$0, ImplementsClause$1];
|
|
11217
11295
|
function ImplementsClause(ctx, state2) {
|
|
11218
|
-
return (0, import_lib2.$
|
|
11296
|
+
return (0, import_lib2.$EVENT_C)(ctx, state2, "ImplementsClause", ImplementsClause$$);
|
|
11219
11297
|
}
|
|
11220
|
-
var ImplementsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc,
|
|
11298
|
+
var ImplementsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, NotDedented, ImplementsShorthand, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'ImplementsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
11221
11299
|
var l = $1;
|
|
11222
11300
|
var ws = $2;
|
|
11223
11301
|
var token = $3;
|
|
@@ -11227,7 +11305,7 @@ var ImplementsToken$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, __, Implem
|
|
|
11227
11305
|
}
|
|
11228
11306
|
return { children };
|
|
11229
11307
|
});
|
|
11230
|
-
var ImplementsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
11308
|
+
var ImplementsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(NotDedented, (0, import_lib2.$EXPECT)($L19, 'ImplementsToken "implements"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
11231
11309
|
$2 = { $loc, token: $2 };
|
|
11232
11310
|
return [$1, $2];
|
|
11233
11311
|
});
|
|
@@ -11235,7 +11313,7 @@ var ImplementsToken$$ = [ImplementsToken$0, ImplementsToken$1];
|
|
|
11235
11313
|
function ImplementsToken(ctx, state2) {
|
|
11236
11314
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "ImplementsToken", ImplementsToken$$);
|
|
11237
11315
|
}
|
|
11238
|
-
var ImplementsShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
11316
|
+
var ImplementsShorthand$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L20, 'ImplementsShorthand "<:"'), function($skip, $loc, $0, $1) {
|
|
11239
11317
|
return { $loc, token: "implements " };
|
|
11240
11318
|
});
|
|
11241
11319
|
function ImplementsShorthand(ctx, state2) {
|
|
@@ -11675,7 +11753,7 @@ var OptionalDot$$ = [OptionalDot$0, OptionalDot$1];
|
|
|
11675
11753
|
function OptionalDot(ctx, state2) {
|
|
11676
11754
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "OptionalDot", OptionalDot$$);
|
|
11677
11755
|
}
|
|
11678
|
-
var NonNullAssertion$0 = (0, import_lib2.$T)((0, import_lib2.$S)(ExclamationPoint, (0, import_lib2.$N)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($
|
|
11756
|
+
var NonNullAssertion$0 = (0, import_lib2.$T)((0, import_lib2.$S)(ExclamationPoint, (0, import_lib2.$N)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L21, 'NonNullAssertion "^"'), (0, import_lib2.$EXPECT)($L22, 'NonNullAssertion "<?"'), (0, import_lib2.$EXPECT)($L3, 'NonNullAssertion "="')))), function(value) {
|
|
11679
11757
|
return { "type": "NonNullAssertion", "ts": true, "children": [value[0]] };
|
|
11680
11758
|
});
|
|
11681
11759
|
function NonNullAssertion(ctx, state2) {
|
|
@@ -11935,7 +12013,7 @@ var PropertyAccess$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(AccessStart, (0,
|
|
|
11935
12013
|
]
|
|
11936
12014
|
};
|
|
11937
12015
|
});
|
|
11938
|
-
var PropertyAccess$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(AccessStart, (0, import_lib2.$EXPECT)($
|
|
12016
|
+
var PropertyAccess$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(AccessStart, (0, import_lib2.$EXPECT)($L23, 'PropertyAccess "-"'), IntegerLiteral), function($skip, $loc, $0, $1, $2, $3) {
|
|
11939
12017
|
var dot = $1;
|
|
11940
12018
|
var neg = $2;
|
|
11941
12019
|
var num = $3;
|
|
@@ -12041,6 +12119,23 @@ var PropertyBind$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E
|
|
|
12041
12119
|
function PropertyBind(ctx, state2) {
|
|
12042
12120
|
return (0, import_lib2.$EVENT)(ctx, state2, "PropertyBind", PropertyBind$0);
|
|
12043
12121
|
}
|
|
12122
|
+
var PropertyBindExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(PropertyAccessModifier), At, OptionalDot, (0, import_lib2.$C)(IdentifierName, PrivateIdentifier), (0, import_lib2.$E)(ExplicitArguments)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
12123
|
+
var modifier = $1;
|
|
12124
|
+
var dot = $3;
|
|
12125
|
+
var id = $4;
|
|
12126
|
+
var args = $5;
|
|
12127
|
+
return {
|
|
12128
|
+
type: "PropertyBind",
|
|
12129
|
+
name: id.name,
|
|
12130
|
+
children: [modifier, dot, id],
|
|
12131
|
+
// omit `@` from children
|
|
12132
|
+
args: args?.children.slice(1, -1) ?? []
|
|
12133
|
+
// remove the parens from the arg list, or give an empty list
|
|
12134
|
+
};
|
|
12135
|
+
});
|
|
12136
|
+
function PropertyBindExplicitArguments(ctx, state2) {
|
|
12137
|
+
return (0, import_lib2.$EVENT)(ctx, state2, "PropertyBindExplicitArguments", PropertyBindExplicitArguments$0);
|
|
12138
|
+
}
|
|
12044
12139
|
var SuperProperty$0 = (0, import_lib2.$S)(Super, MemberBracketContent);
|
|
12045
12140
|
var SuperProperty$1 = (0, import_lib2.$S)(Super, (0, import_lib2.$N)(PropertyAccessModifier), PropertyAccess);
|
|
12046
12141
|
var SuperProperty$$ = [SuperProperty$0, SuperProperty$1];
|
|
@@ -12048,7 +12143,7 @@ function SuperProperty(ctx, state2) {
|
|
|
12048
12143
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "SuperProperty", SuperProperty$$);
|
|
12049
12144
|
}
|
|
12050
12145
|
var MetaProperty$0 = (0, import_lib2.$S)(New, Dot, Target);
|
|
12051
|
-
var MetaProperty$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
12146
|
+
var MetaProperty$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L24, 'MetaProperty "import.meta"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12052
12147
|
return { $loc, token: $1 };
|
|
12053
12148
|
});
|
|
12054
12149
|
var MetaProperty$2 = ReturnValue;
|
|
@@ -12056,7 +12151,7 @@ var MetaProperty$$ = [MetaProperty$0, MetaProperty$1, MetaProperty$2];
|
|
|
12056
12151
|
function MetaProperty(ctx, state2) {
|
|
12057
12152
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MetaProperty", MetaProperty$$);
|
|
12058
12153
|
}
|
|
12059
|
-
var ReturnValue$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
12154
|
+
var ReturnValue$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L25, 'ReturnValue "return.value"'), NonIdContinue), (0, import_lib2.$S)(Return, (0, import_lib2.$Y)(AfterReturnShorthand))), function($skip, $loc, $0, $1) {
|
|
12060
12155
|
return { type: "ReturnValue", children: [$1[0]] };
|
|
12061
12156
|
});
|
|
12062
12157
|
function ReturnValue(ctx, state2) {
|
|
@@ -12612,7 +12707,7 @@ var BindingElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.
|
|
|
12612
12707
|
initializer
|
|
12613
12708
|
};
|
|
12614
12709
|
});
|
|
12615
|
-
var BindingElement$2 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($
|
|
12710
|
+
var BindingElement$2 = (0, import_lib2.$TV)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($L26, 'BindingElement ","'))), function($skip, $loc, $0, $1) {
|
|
12616
12711
|
return {
|
|
12617
12712
|
type: "ElisionElement",
|
|
12618
12713
|
children: [""],
|
|
@@ -13539,7 +13634,7 @@ var UpcomingAssignment$0 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, impor
|
|
|
13539
13634
|
function UpcomingAssignment(ctx, state2) {
|
|
13540
13635
|
return (0, import_lib2.$EVENT)(ctx, state2, "UpcomingAssignment", UpcomingAssignment$0);
|
|
13541
13636
|
}
|
|
13542
|
-
var ArrayLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R20, "ArrayLiteral /(?=\\[|\\s*[.\u2022])/"), _ArrayLiteral), function(value) {
|
|
13637
|
+
var ArrayLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R20, "ArrayLiteral /(?=\\[|\\s*[.\u2022\\/])/"), _ArrayLiteral), function(value) {
|
|
13543
13638
|
return value[1];
|
|
13544
13639
|
});
|
|
13545
13640
|
function ArrayLiteral(ctx, state2) {
|
|
@@ -14323,7 +14418,7 @@ function SnugNamedProperty(ctx, state2) {
|
|
|
14323
14418
|
var PropertyName$0 = NumericLiteral;
|
|
14324
14419
|
var PropertyName$1 = ComputedPropertyName;
|
|
14325
14420
|
var PropertyName$2 = StringLiteral;
|
|
14326
|
-
var PropertyName$3 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$E)(IdentifierName), (0, import_lib2.$EXPECT)($
|
|
14421
|
+
var PropertyName$3 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$E)(IdentifierName), (0, import_lib2.$EXPECT)($L23, 'PropertyName "-"'), (0, import_lib2.$EXPECT)($R25, "PropertyName /(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"))), function($skip, $loc, $0, $1) {
|
|
14327
14422
|
return {
|
|
14328
14423
|
token: `"${$1}"`,
|
|
14329
14424
|
$loc
|
|
@@ -14800,7 +14895,7 @@ var BinaryOpSymbol$6 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.
|
|
|
14800
14895
|
};
|
|
14801
14896
|
});
|
|
14802
14897
|
var BinaryOpSymbol$7 = (0, import_lib2.$EXPECT)($L79, 'BinaryOpSymbol "+"');
|
|
14803
|
-
var BinaryOpSymbol$8 = (0, import_lib2.$EXPECT)($
|
|
14898
|
+
var BinaryOpSymbol$8 = (0, import_lib2.$EXPECT)($L23, 'BinaryOpSymbol "-"');
|
|
14804
14899
|
var BinaryOpSymbol$9 = (0, import_lib2.$EXPECT)($L80, 'BinaryOpSymbol "<="');
|
|
14805
14900
|
var BinaryOpSymbol$10 = (0, import_lib2.$T)((0, import_lib2.$EXPECT)($L81, 'BinaryOpSymbol "\u2264"'), function(value) {
|
|
14806
14901
|
return "<=";
|
|
@@ -14809,7 +14904,7 @@ var BinaryOpSymbol$11 = (0, import_lib2.$EXPECT)($L82, 'BinaryOpSymbol ">="');
|
|
|
14809
14904
|
var BinaryOpSymbol$12 = (0, import_lib2.$T)((0, import_lib2.$EXPECT)($L83, 'BinaryOpSymbol "\u2265"'), function(value) {
|
|
14810
14905
|
return ">=";
|
|
14811
14906
|
});
|
|
14812
|
-
var BinaryOpSymbol$13 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
14907
|
+
var BinaryOpSymbol$13 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L22, 'BinaryOpSymbol "<?"'), function($skip, $loc, $0, $1) {
|
|
14813
14908
|
return {
|
|
14814
14909
|
$loc,
|
|
14815
14910
|
token: "instanceof",
|
|
@@ -14832,7 +14927,7 @@ var BinaryOpSymbol$15 = (0, import_lib2.$EXPECT)($L85, 'BinaryOpSymbol "<<"');
|
|
|
14832
14927
|
var BinaryOpSymbol$16 = (0, import_lib2.$T)((0, import_lib2.$EXPECT)($L86, 'BinaryOpSymbol "\u226A"'), function(value) {
|
|
14833
14928
|
return "<<";
|
|
14834
14929
|
});
|
|
14835
|
-
var BinaryOpSymbol$17 = (0, import_lib2.$EXPECT)($
|
|
14930
|
+
var BinaryOpSymbol$17 = (0, import_lib2.$EXPECT)($L18, 'BinaryOpSymbol "<"');
|
|
14836
14931
|
var BinaryOpSymbol$18 = (0, import_lib2.$EXPECT)($L87, 'BinaryOpSymbol ">>>"');
|
|
14837
14932
|
var BinaryOpSymbol$19 = (0, import_lib2.$T)((0, import_lib2.$EXPECT)($L88, 'BinaryOpSymbol "\u22D9"'), function(value) {
|
|
14838
14933
|
return ">>>";
|
|
@@ -14969,7 +15064,7 @@ var BinaryOpSymbol$48 = (0, import_lib2.$TS)((0, import_lib2.$S)(Is), function($
|
|
|
14969
15064
|
});
|
|
14970
15065
|
var BinaryOpSymbol$49 = In;
|
|
14971
15066
|
var BinaryOpSymbol$50 = (0, import_lib2.$EXPECT)($L117, 'BinaryOpSymbol "&"');
|
|
14972
|
-
var BinaryOpSymbol$51 = (0, import_lib2.$EXPECT)($
|
|
15067
|
+
var BinaryOpSymbol$51 = (0, import_lib2.$EXPECT)($L21, 'BinaryOpSymbol "^"');
|
|
14973
15068
|
var BinaryOpSymbol$52 = (0, import_lib2.$EXPECT)($L118, 'BinaryOpSymbol "|"');
|
|
14974
15069
|
var BinaryOpSymbol$$ = [BinaryOpSymbol$0, BinaryOpSymbol$1, BinaryOpSymbol$2, BinaryOpSymbol$3, BinaryOpSymbol$4, BinaryOpSymbol$5, BinaryOpSymbol$6, BinaryOpSymbol$7, BinaryOpSymbol$8, BinaryOpSymbol$9, BinaryOpSymbol$10, BinaryOpSymbol$11, BinaryOpSymbol$12, BinaryOpSymbol$13, BinaryOpSymbol$14, BinaryOpSymbol$15, BinaryOpSymbol$16, BinaryOpSymbol$17, BinaryOpSymbol$18, BinaryOpSymbol$19, BinaryOpSymbol$20, BinaryOpSymbol$21, BinaryOpSymbol$22, BinaryOpSymbol$23, BinaryOpSymbol$24, BinaryOpSymbol$25, BinaryOpSymbol$26, BinaryOpSymbol$27, BinaryOpSymbol$28, BinaryOpSymbol$29, BinaryOpSymbol$30, BinaryOpSymbol$31, BinaryOpSymbol$32, BinaryOpSymbol$33, BinaryOpSymbol$34, BinaryOpSymbol$35, BinaryOpSymbol$36, BinaryOpSymbol$37, BinaryOpSymbol$38, BinaryOpSymbol$39, BinaryOpSymbol$40, BinaryOpSymbol$41, BinaryOpSymbol$42, BinaryOpSymbol$43, BinaryOpSymbol$44, BinaryOpSymbol$45, BinaryOpSymbol$46, BinaryOpSymbol$47, BinaryOpSymbol$48, BinaryOpSymbol$49, BinaryOpSymbol$50, BinaryOpSymbol$51, BinaryOpSymbol$52];
|
|
14975
15070
|
function BinaryOpSymbol(ctx, state2) {
|
|
@@ -15064,7 +15159,7 @@ var UnaryOp$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)(Del
|
|
|
15064
15159
|
if (!ws) return [op, [" "]];
|
|
15065
15160
|
return [op, ws];
|
|
15066
15161
|
});
|
|
15067
|
-
var UnaryOp$3 = (0, import_lib2.$T)((0, import_lib2.$S)(Not, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R30, "UnaryOp /[:.]/")), (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
15162
|
+
var UnaryOp$3 = (0, import_lib2.$T)((0, import_lib2.$S)(Not, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R30, "UnaryOp /[:.]/")), (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'UnaryOp " "')), (0, import_lib2.$E)(_)), function(value) {
|
|
15068
15163
|
return [value[0], value[3]];
|
|
15069
15164
|
});
|
|
15070
15165
|
var UnaryOp$$ = [UnaryOp$0, UnaryOp$1, UnaryOp$2, UnaryOp$3];
|
|
@@ -15303,12 +15398,7 @@ var IfStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)
|
|
|
15303
15398
|
condition = negateCondition(condition);
|
|
15304
15399
|
}
|
|
15305
15400
|
if (block.bare && e) {
|
|
15306
|
-
|
|
15307
|
-
block = {
|
|
15308
|
-
...block,
|
|
15309
|
-
semicolon,
|
|
15310
|
-
children: [...block.children, semicolon]
|
|
15311
|
-
};
|
|
15401
|
+
block = bracedBlock(block);
|
|
15312
15402
|
}
|
|
15313
15403
|
return {
|
|
15314
15404
|
type: "IfStatement",
|
|
@@ -15324,11 +15414,7 @@ var IfStatement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(IfClause, BlockOrEm
|
|
|
15324
15414
|
var block = $2;
|
|
15325
15415
|
var e = $3;
|
|
15326
15416
|
if (block.bare && e) {
|
|
15327
|
-
block =
|
|
15328
|
-
...block,
|
|
15329
|
-
semicolon: ";",
|
|
15330
|
-
children: [...block.children, ";"]
|
|
15331
|
-
};
|
|
15417
|
+
block = bracedBlock(block);
|
|
15332
15418
|
}
|
|
15333
15419
|
return {
|
|
15334
15420
|
type: "IfStatement",
|
|
@@ -16547,31 +16633,27 @@ var Debugger$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPEC
|
|
|
16547
16633
|
function Debugger(ctx, state2) {
|
|
16548
16634
|
return (0, import_lib2.$EVENT)(ctx, state2, "Debugger", Debugger$0);
|
|
16549
16635
|
}
|
|
16550
|
-
var MaybeNestedNonPipelineExpression$0 = NestedBulletedArray
|
|
16551
|
-
var
|
|
16552
|
-
var
|
|
16553
|
-
var expression = $2;
|
|
16554
|
-
var trailing = $4;
|
|
16636
|
+
var MaybeNestedNonPipelineExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedBulletedArray), (0, import_lib2.$N)(NestedImplicitObjectLiteral), PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, NonPipelineExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
16637
|
+
var expression = $4;
|
|
16638
|
+
var trailing = $6;
|
|
16555
16639
|
if (!expression) return $skip;
|
|
16556
16640
|
if (!trailing) return expression;
|
|
16557
16641
|
return [expression, trailing];
|
|
16558
16642
|
});
|
|
16559
|
-
var MaybeNestedNonPipelineExpression$
|
|
16560
|
-
var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1
|
|
16643
|
+
var MaybeNestedNonPipelineExpression$1 = NonPipelineExpression;
|
|
16644
|
+
var MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1];
|
|
16561
16645
|
function MaybeNestedNonPipelineExpression(ctx, state2) {
|
|
16562
16646
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedNonPipelineExpression", MaybeNestedNonPipelineExpression$$);
|
|
16563
16647
|
}
|
|
16564
|
-
var MaybeNestedPostfixedExpression$0 = NestedBulletedArray
|
|
16565
|
-
var
|
|
16566
|
-
var
|
|
16567
|
-
var expression = $2;
|
|
16568
|
-
var trailing = $4;
|
|
16648
|
+
var MaybeNestedPostfixedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedBulletedArray), (0, import_lib2.$N)(NestedImplicitObjectLiteral), PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
16649
|
+
var expression = $4;
|
|
16650
|
+
var trailing = $6;
|
|
16569
16651
|
if (!expression) return $skip;
|
|
16570
16652
|
if (!trailing) return expression;
|
|
16571
16653
|
return [expression, trailing];
|
|
16572
16654
|
});
|
|
16573
|
-
var MaybeNestedPostfixedExpression$
|
|
16574
|
-
var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1
|
|
16655
|
+
var MaybeNestedPostfixedExpression$1 = PostfixedExpression;
|
|
16656
|
+
var MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1];
|
|
16575
16657
|
function MaybeNestedPostfixedExpression(ctx, state2) {
|
|
16576
16658
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedPostfixedExpression", MaybeNestedPostfixedExpression$$);
|
|
16577
16659
|
}
|
|
@@ -16586,17 +16668,15 @@ var NestedPostfixedExpressionNoTrailing$$ = [NestedPostfixedExpressionNoTrailing
|
|
|
16586
16668
|
function NestedPostfixedExpressionNoTrailing(ctx, state2) {
|
|
16587
16669
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedPostfixedExpressionNoTrailing", NestedPostfixedExpressionNoTrailing$$);
|
|
16588
16670
|
}
|
|
16589
|
-
var MaybeNestedExpression$0 = NestedBulletedArray
|
|
16590
|
-
var
|
|
16591
|
-
var
|
|
16592
|
-
var expression = $2;
|
|
16593
|
-
var trailing = $4;
|
|
16671
|
+
var MaybeNestedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedBulletedArray), (0, import_lib2.$N)(NestedImplicitObjectLiteral), PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
16672
|
+
var expression = $4;
|
|
16673
|
+
var trailing = $6;
|
|
16594
16674
|
if (!expression) return $skip;
|
|
16595
16675
|
if (!trailing) return expression;
|
|
16596
16676
|
return [expression, trailing];
|
|
16597
16677
|
});
|
|
16598
|
-
var MaybeNestedExpression$
|
|
16599
|
-
var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1
|
|
16678
|
+
var MaybeNestedExpression$1 = Expression;
|
|
16679
|
+
var MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1];
|
|
16600
16680
|
function MaybeNestedExpression(ctx, state2) {
|
|
16601
16681
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedExpression", MaybeNestedExpression$$);
|
|
16602
16682
|
}
|
|
@@ -16678,7 +16758,7 @@ var ImportDeclaration$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImpliedImport
|
|
|
16678
16758
|
const children = [i, t, imports, w, from];
|
|
16679
16759
|
return { type: "ImportDeclaration", ts: !!t, children, imports, from };
|
|
16680
16760
|
});
|
|
16681
|
-
var ImportDeclaration$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
16761
|
+
var ImportDeclaration$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __, Import, __, Operator, (0, import_lib2.$E)(OperatorBehavior), __, OperatorNamedImports), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
|
|
16682
16762
|
var from = $1;
|
|
16683
16763
|
var fws = $2;
|
|
16684
16764
|
var i = $3;
|
|
@@ -16700,7 +16780,7 @@ var ImportDeclaration$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImpliedFromCl
|
|
|
16700
16780
|
from
|
|
16701
16781
|
};
|
|
16702
16782
|
});
|
|
16703
|
-
var ImportDeclaration$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
16783
|
+
var ImportDeclaration$6 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __, Import, __, (0, import_lib2.$E)((0, import_lib2.$S)(TypeKeyword, __)), ImportClause), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
16704
16784
|
var from = $1;
|
|
16705
16785
|
var fws = $2;
|
|
16706
16786
|
var i = $3;
|
|
@@ -16798,20 +16878,6 @@ var FromClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(From, __, ModuleSpec
|
|
|
16798
16878
|
function FromClause(ctx, state2) {
|
|
16799
16879
|
return (0, import_lib2.$EVENT)(ctx, state2, "FromClause", FromClause$0);
|
|
16800
16880
|
}
|
|
16801
|
-
var ImpliedFromClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$S)(From, __), ImpliedFrom), ModuleSpecifier), function($skip, $loc, $0, $1, $2) {
|
|
16802
|
-
var module2 = $2;
|
|
16803
|
-
if (!Array.isArray(module2)) return $0;
|
|
16804
|
-
return [$1, ...module2];
|
|
16805
|
-
});
|
|
16806
|
-
function ImpliedFromClause(ctx, state2) {
|
|
16807
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFromClause", ImpliedFromClause$0);
|
|
16808
|
-
}
|
|
16809
|
-
var ImpliedFrom$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImpliedFrom ""'), function($skip, $loc, $0, $1) {
|
|
16810
|
-
return { $loc, token: "from " };
|
|
16811
|
-
});
|
|
16812
|
-
function ImpliedFrom(ctx, state2) {
|
|
16813
|
-
return (0, import_lib2.$EVENT)(ctx, state2, "ImpliedFrom", ImpliedFrom$0);
|
|
16814
|
-
}
|
|
16815
16881
|
var ImportAssertion$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)((0, import_lib2.$EXPECT)($L134, 'ImportAssertion "with"'), (0, import_lib2.$EXPECT)($L135, 'ImportAssertion "assert"')), NonIdContinue, (0, import_lib2.$E)(_), ObjectLiteral), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
16816
16882
|
var keyword = $2;
|
|
16817
16883
|
var object = $5;
|
|
@@ -16893,7 +16959,7 @@ function OperatorImportSpecifier(ctx, state2) {
|
|
|
16893
16959
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "OperatorImportSpecifier", OperatorImportSpecifier$$);
|
|
16894
16960
|
}
|
|
16895
16961
|
var ImportAsToken$0 = (0, import_lib2.$S)(__, As);
|
|
16896
|
-
var ImportAsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, __, Colon, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
16962
|
+
var ImportAsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, __, Colon, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'ImportAsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
16897
16963
|
var l = $1;
|
|
16898
16964
|
var ws = $2;
|
|
16899
16965
|
var c = $3;
|
|
@@ -17006,7 +17072,7 @@ var ExportDeclaration$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(Export, __, E
|
|
|
17006
17072
|
var exports2 = $3;
|
|
17007
17073
|
return { type: "ExportDeclaration", ts: exports2.ts, children: $0 };
|
|
17008
17074
|
});
|
|
17009
|
-
var ExportDeclaration$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(
|
|
17075
|
+
var ExportDeclaration$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __, Export, __, ExportFromClause), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
17010
17076
|
var from = $1;
|
|
17011
17077
|
var fws = $2;
|
|
17012
17078
|
var e = $3;
|
|
@@ -17709,7 +17775,7 @@ var Loc$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'Loc ""'), functi
|
|
|
17709
17775
|
function Loc(ctx, state2) {
|
|
17710
17776
|
return (0, import_lib2.$EVENT)(ctx, state2, "Loc", Loc$0);
|
|
17711
17777
|
}
|
|
17712
|
-
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L144, 'Abstract "abstract"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
17778
|
+
var Abstract$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L144, 'Abstract "abstract"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'Abstract " "')))), function($skip, $loc, $0, $1) {
|
|
17713
17779
|
return { $loc, token: $1, ts: true };
|
|
17714
17780
|
});
|
|
17715
17781
|
function Abstract(ctx, state2) {
|
|
@@ -17763,7 +17829,7 @@ var By$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L1
|
|
|
17763
17829
|
function By(ctx, state2) {
|
|
17764
17830
|
return (0, import_lib2.$EVENT)(ctx, state2, "By", By$0);
|
|
17765
17831
|
}
|
|
17766
|
-
var Caret$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
17832
|
+
var Caret$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L21, 'Caret "^"'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($L21, 'Caret "^"'))), function($skip, $loc, $0, $1, $2) {
|
|
17767
17833
|
return { $loc, token: $1 };
|
|
17768
17834
|
});
|
|
17769
17835
|
function Caret(ctx, state2) {
|
|
@@ -17823,7 +17889,7 @@ var Colon$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)(
|
|
|
17823
17889
|
function Colon(ctx, state2) {
|
|
17824
17890
|
return (0, import_lib2.$EVENT)(ctx, state2, "Colon", Colon$0);
|
|
17825
17891
|
}
|
|
17826
|
-
var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
17892
|
+
var Comma$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L26, 'Comma ","'), function($skip, $loc, $0, $1) {
|
|
17827
17893
|
return { $loc, token: $1 };
|
|
17828
17894
|
});
|
|
17829
17895
|
function Comma(ctx, state2) {
|
|
@@ -17995,7 +18061,7 @@ var Hash$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L178, 'Hash "#"'), f
|
|
|
17995
18061
|
function Hash(ctx, state2) {
|
|
17996
18062
|
return (0, import_lib2.$EVENT)(ctx, state2, "Hash", Hash$0);
|
|
17997
18063
|
}
|
|
17998
|
-
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L179, 'If "if"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($
|
|
18064
|
+
var If$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L179, 'If "if"'), NonIdContinue, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'If " "')))), function($skip, $loc, $0, $1) {
|
|
17999
18065
|
return { $loc, token: $1 };
|
|
18000
18066
|
});
|
|
18001
18067
|
function If(ctx, state2) {
|
|
@@ -18073,7 +18139,7 @@ var Of$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L1
|
|
|
18073
18139
|
function Of(ctx, state2) {
|
|
18074
18140
|
return (0, import_lib2.$EVENT)(ctx, state2, "Of", Of$0);
|
|
18075
18141
|
}
|
|
18076
|
-
var OpenAngleBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($
|
|
18142
|
+
var OpenAngleBracket$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L18, 'OpenAngleBracket "<"'), function($skip, $loc, $0, $1) {
|
|
18077
18143
|
return { $loc, token: $1 };
|
|
18078
18144
|
});
|
|
18079
18145
|
function OpenAngleBracket(ctx, state2) {
|
|
@@ -18407,7 +18473,7 @@ var JSXElement$$ = [JSXElement$0, JSXElement$1, JSXElement$2];
|
|
|
18407
18473
|
function JSXElement(ctx, state2) {
|
|
18408
18474
|
return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElement", JSXElement$$);
|
|
18409
18475
|
}
|
|
18410
|
-
var JSXSelfClosingElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18476
|
+
var JSXSelfClosingElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L18, 'JSXSelfClosingElement "<"'), JSXElementName, (0, import_lib2.$E)(TypeArguments), (0, import_lib2.$E)(JSXAttributes), (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L230, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
18411
18477
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
18412
18478
|
});
|
|
18413
18479
|
function JSXSelfClosingElement(ctx, state2) {
|
|
@@ -18426,7 +18492,7 @@ var PopJSXStack$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'PopJSXSt
|
|
|
18426
18492
|
function PopJSXStack(ctx, state2) {
|
|
18427
18493
|
return (0, import_lib2.$EVENT)(ctx, state2, "PopJSXStack", PopJSXStack$0);
|
|
18428
18494
|
}
|
|
18429
|
-
var JSXOpeningElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($
|
|
18495
|
+
var JSXOpeningElement$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L18, 'JSXOpeningElement "<"'), JSXElementName, (0, import_lib2.$E)(TypeArguments), (0, import_lib2.$E)(JSXAttributes), (0, import_lib2.$E)(Whitespace), (0, import_lib2.$EXPECT)($L45, 'JSXOpeningElement ">"'));
|
|
18430
18496
|
function JSXOpeningElement(ctx, state2) {
|
|
18431
18497
|
return (0, import_lib2.$EVENT)(ctx, state2, "JSXOpeningElement", JSXOpeningElement$0);
|
|
18432
18498
|
}
|
|
@@ -18868,7 +18934,7 @@ var InlineJSXMemberExpressionRest$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((
|
|
|
18868
18934
|
});
|
|
18869
18935
|
var InlineJSXMemberExpressionRest$1 = PropertyAccess;
|
|
18870
18936
|
var InlineJSXMemberExpressionRest$2 = PropertyGlob;
|
|
18871
|
-
var InlineJSXMemberExpressionRest$3 =
|
|
18937
|
+
var InlineJSXMemberExpressionRest$3 = PropertyBindExplicitArguments;
|
|
18872
18938
|
var InlineJSXMemberExpressionRest$4 = NonNullAssertion;
|
|
18873
18939
|
var InlineJSXMemberExpressionRest$$ = [InlineJSXMemberExpressionRest$0, InlineJSXMemberExpressionRest$1, InlineJSXMemberExpressionRest$2, InlineJSXMemberExpressionRest$3, InlineJSXMemberExpressionRest$4];
|
|
18874
18940
|
function InlineJSXMemberExpressionRest(ctx, state2) {
|
|
@@ -19807,7 +19873,7 @@ var TypePrimary$9 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)
|
|
|
19807
19873
|
args
|
|
19808
19874
|
};
|
|
19809
19875
|
});
|
|
19810
|
-
var TypePrimary$10 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), OpenParen, AllowAll, (0, import_lib2.$E)((0, import_lib2.$C)(
|
|
19876
|
+
var TypePrimary$10 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), OpenParen, AllowAll, (0, import_lib2.$E)((0, import_lib2.$C)(MaybeNestedType, (0, import_lib2.$S)(EOS, Type))), RestoreAll, __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
|
|
19811
19877
|
if (!$4) return $skip;
|
|
19812
19878
|
return {
|
|
19813
19879
|
type: "TypeParenthesized",
|