@danielx/civet 0.6.15 → 0.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +230 -38
- package/dist/main.js +230 -38
- package/dist/main.mjs +230 -38
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -742,12 +742,15 @@ var require_lib = __commonJS({
|
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
744
|
function findAncestor(node, predicate, stopPredicate) {
|
|
745
|
-
|
|
746
|
-
while (
|
|
747
|
-
if (predicate(node))
|
|
748
|
-
return node;
|
|
749
|
-
|
|
745
|
+
let { parent } = node;
|
|
746
|
+
while (parent && !stopPredicate?.(parent, node)) {
|
|
747
|
+
if (predicate(parent, node)) {
|
|
748
|
+
return { ancestor: parent, child: node };
|
|
749
|
+
}
|
|
750
|
+
node = parent;
|
|
751
|
+
parent = node.parent;
|
|
750
752
|
}
|
|
753
|
+
return { ancestor: void 0, child: node };
|
|
751
754
|
}
|
|
752
755
|
function gatherNodes(node, predicate) {
|
|
753
756
|
if (node == null)
|
|
@@ -820,14 +823,11 @@ var require_lib = __commonJS({
|
|
|
820
823
|
}
|
|
821
824
|
function hoistRefDecs(statements) {
|
|
822
825
|
gatherRecursiveAll(statements, (s) => s.hoistDec).forEach((node) => {
|
|
823
|
-
let { hoistDec
|
|
826
|
+
let { hoistDec } = node;
|
|
824
827
|
node.hoistDec = null;
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
}
|
|
829
|
-
if (parent) {
|
|
830
|
-
insertHoistDec(parent, node, hoistDec);
|
|
828
|
+
const { ancestor, child } = findAncestor(node, (ancestor2) => ancestor2.type === "BlockStatement" && (!ancestor2.bare || ancestor2.root));
|
|
829
|
+
if (ancestor) {
|
|
830
|
+
insertHoistDec(ancestor, child, hoistDec);
|
|
831
831
|
} else {
|
|
832
832
|
throw new Error("Couldn't find block to hoist declaration into.");
|
|
833
833
|
}
|
|
@@ -943,6 +943,9 @@ var require_lib = __commonJS({
|
|
|
943
943
|
function isVoidType(t) {
|
|
944
944
|
return t?.type === "LiteralType" && t.t.type === "VoidType";
|
|
945
945
|
}
|
|
946
|
+
function isPromiseVoidType(t) {
|
|
947
|
+
return t?.type === "IdentifierType" && t.raw === "Promise" && t.args?.types?.length === 1 && isVoidType(t.args.types[0]);
|
|
948
|
+
}
|
|
946
949
|
function isWhitespaceOrEmpty(node) {
|
|
947
950
|
if (!node)
|
|
948
951
|
return true;
|
|
@@ -1367,6 +1370,8 @@ var require_lib = __commonJS({
|
|
|
1367
1370
|
if (f.abstract || f.block || f.signature?.optional)
|
|
1368
1371
|
return;
|
|
1369
1372
|
const { name, parent } = f;
|
|
1373
|
+
if (parent?.type === "ExportDeclaration")
|
|
1374
|
+
return;
|
|
1370
1375
|
const expressions = parent?.expressions ?? parent?.elements;
|
|
1371
1376
|
const currentIndex = expressions?.findIndex(([, def]) => def === f);
|
|
1372
1377
|
const following = currentIndex >= 0 && expressions[currentIndex + 1]?.[1];
|
|
@@ -1386,8 +1391,8 @@ var require_lib = __commonJS({
|
|
|
1386
1391
|
implicitFunctionBlock(f);
|
|
1387
1392
|
processParams(f);
|
|
1388
1393
|
if (!processReturnValue(f) && config.implicitReturns) {
|
|
1389
|
-
const { block, returnType } = f;
|
|
1390
|
-
const isVoid = isVoidType(returnType?.t);
|
|
1394
|
+
const { async, block, returnType } = f;
|
|
1395
|
+
const isVoid = isVoidType(returnType?.t) || async && isPromiseVoidType(returnType?.t);
|
|
1391
1396
|
const isBlock = block?.type === "BlockStatement";
|
|
1392
1397
|
if (!isVoid && isBlock) {
|
|
1393
1398
|
insertReturn(block);
|
|
@@ -2109,7 +2114,7 @@ var require_lib = __commonJS({
|
|
|
2109
2114
|
if (!hasDec(x))
|
|
2110
2115
|
return a.indexOf(x) === i;
|
|
2111
2116
|
}).forEach(pushVar);
|
|
2112
|
-
const fnNodes = gatherNodes(statements,
|
|
2117
|
+
const fnNodes = gatherNodes(statements, isFunction);
|
|
2113
2118
|
const forNodes = gatherNodes(statements, (s) => s.type === "ForStatement");
|
|
2114
2119
|
const blockNodes = new Set(gatherNodes(statements, (s) => s.type === "BlockStatement"));
|
|
2115
2120
|
fnNodes.forEach(({ block }) => blockNodes.delete(block));
|
|
@@ -2161,7 +2166,7 @@ var require_lib = __commonJS({
|
|
|
2161
2166
|
}
|
|
2162
2167
|
let currentScope = /* @__PURE__ */ new Set();
|
|
2163
2168
|
scopes.push(currentScope);
|
|
2164
|
-
const fnNodes = gatherNodes(statements,
|
|
2169
|
+
const fnNodes = gatherNodes(statements, isFunction);
|
|
2165
2170
|
const forNodes = gatherNodes(statements, (s) => s.type === "ForStatement");
|
|
2166
2171
|
let targetStatements = [];
|
|
2167
2172
|
for (const statement of statements) {
|
|
@@ -2224,7 +2229,7 @@ var require_lib = __commonJS({
|
|
|
2224
2229
|
let declared;
|
|
2225
2230
|
values.forEach((value) => {
|
|
2226
2231
|
value.children = [ref];
|
|
2227
|
-
const ancestor = findAncestor(
|
|
2232
|
+
const { ancestor } = findAncestor(
|
|
2228
2233
|
value,
|
|
2229
2234
|
({ type }) => type === "Declaration",
|
|
2230
2235
|
isFunction
|
|
@@ -2994,6 +2999,7 @@ ${input.slice(result.pos)}
|
|
|
2994
2999
|
NonPipelineArgumentPart,
|
|
2995
3000
|
BinaryOpExpression,
|
|
2996
3001
|
BinaryOpRHS,
|
|
3002
|
+
WRHS,
|
|
2997
3003
|
SingleLineBinaryOpRHS,
|
|
2998
3004
|
RHS,
|
|
2999
3005
|
ParenthesizedAssignment,
|
|
@@ -3103,6 +3109,8 @@ ${input.slice(result.pos)}
|
|
|
3103
3109
|
ExplicitBlock,
|
|
3104
3110
|
ImplicitNestedBlock,
|
|
3105
3111
|
Block,
|
|
3112
|
+
BareNestedBlock,
|
|
3113
|
+
BareBlock,
|
|
3106
3114
|
ThenClause,
|
|
3107
3115
|
BracedOrEmptyBlock,
|
|
3108
3116
|
NoPostfixBracedOrEmptyBlock,
|
|
@@ -3227,7 +3235,9 @@ ${input.slice(result.pos)}
|
|
|
3227
3235
|
PatternExpressionList,
|
|
3228
3236
|
ConditionFragment,
|
|
3229
3237
|
CaseExpressionList,
|
|
3238
|
+
CaseExpression,
|
|
3230
3239
|
ImpliedColon,
|
|
3240
|
+
IgnoreColon,
|
|
3231
3241
|
TryStatement,
|
|
3232
3242
|
TryExpression,
|
|
3233
3243
|
CatchClause,
|
|
@@ -3570,6 +3580,7 @@ ${input.slice(result.pos)}
|
|
|
3570
3580
|
EOS,
|
|
3571
3581
|
EOL,
|
|
3572
3582
|
DebugHere,
|
|
3583
|
+
InsertColon,
|
|
3573
3584
|
InsertSemicolon,
|
|
3574
3585
|
InsertOpenParen,
|
|
3575
3586
|
InsertCloseParen,
|
|
@@ -4801,9 +4812,10 @@ ${input.slice(result.pos)}
|
|
|
4801
4812
|
var rhs = $2;
|
|
4802
4813
|
return [[], op, [], rhs];
|
|
4803
4814
|
});
|
|
4804
|
-
var BinaryOpRHS$1 = $TS($S(NewlineBinaryOpAllowed,
|
|
4805
|
-
var
|
|
4806
|
-
|
|
4815
|
+
var BinaryOpRHS$1 = $TS($S(NewlineBinaryOpAllowed, NotDedentedBinaryOp, WRHS), function($skip, $loc, $0, $1, $2, $3) {
|
|
4816
|
+
var op = $2;
|
|
4817
|
+
var rhs = $3;
|
|
4818
|
+
return [...op, ...rhs];
|
|
4807
4819
|
});
|
|
4808
4820
|
var BinaryOpRHS$2 = $T($S($N(NewlineBinaryOpAllowed), SingleLineBinaryOpRHS), function(value) {
|
|
4809
4821
|
return value[1];
|
|
@@ -4830,6 +4842,35 @@ ${input.slice(result.pos)}
|
|
|
4830
4842
|
return result;
|
|
4831
4843
|
}
|
|
4832
4844
|
}
|
|
4845
|
+
var WRHS$0 = $TS($S(PushIndent, $E($S(Nested, RHS)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
4846
|
+
var wrhs = $2;
|
|
4847
|
+
if (!wrhs)
|
|
4848
|
+
return $skip;
|
|
4849
|
+
return wrhs;
|
|
4850
|
+
});
|
|
4851
|
+
var WRHS$1 = $S($C(_, $S(EOS, __)), RHS);
|
|
4852
|
+
function WRHS(state) {
|
|
4853
|
+
let eventData;
|
|
4854
|
+
if (state.events) {
|
|
4855
|
+
const result = state.events.enter?.("WRHS", state);
|
|
4856
|
+
if (result) {
|
|
4857
|
+
if (result.cache)
|
|
4858
|
+
return result.cache;
|
|
4859
|
+
eventData = result.data;
|
|
4860
|
+
}
|
|
4861
|
+
}
|
|
4862
|
+
if (state.tokenize) {
|
|
4863
|
+
const result = $TOKEN("WRHS", state, WRHS$0(state) || WRHS$1(state));
|
|
4864
|
+
if (state.events)
|
|
4865
|
+
state.events.exit?.("WRHS", state, result, eventData);
|
|
4866
|
+
return result;
|
|
4867
|
+
} else {
|
|
4868
|
+
const result = WRHS$0(state) || WRHS$1(state);
|
|
4869
|
+
if (state.events)
|
|
4870
|
+
state.events.exit?.("WRHS", state, result, eventData);
|
|
4871
|
+
return result;
|
|
4872
|
+
}
|
|
4873
|
+
}
|
|
4833
4874
|
var SingleLineBinaryOpRHS$0 = $TS($S($E(_), BinaryOp, $C(_, $S(EOS, __)), RHS), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
4834
4875
|
var ws1 = $1;
|
|
4835
4876
|
var op = $2;
|
|
@@ -5536,8 +5577,8 @@ ${input.slice(result.pos)}
|
|
|
5536
5577
|
var PrimaryExpression$2 = TemplateLiteral;
|
|
5537
5578
|
var PrimaryExpression$3 = Literal;
|
|
5538
5579
|
var PrimaryExpression$4 = ArrayLiteral;
|
|
5539
|
-
var PrimaryExpression$5 =
|
|
5540
|
-
var PrimaryExpression$6 =
|
|
5580
|
+
var PrimaryExpression$5 = FunctionExpression;
|
|
5581
|
+
var PrimaryExpression$6 = IdentifierReference;
|
|
5541
5582
|
var PrimaryExpression$7 = ClassExpression;
|
|
5542
5583
|
var PrimaryExpression$8 = RegularExpressionLiteral;
|
|
5543
5584
|
var PrimaryExpression$9 = ParenthesizedExpression;
|
|
@@ -8463,6 +8504,70 @@ ${input.slice(result.pos)}
|
|
|
8463
8504
|
return result;
|
|
8464
8505
|
}
|
|
8465
8506
|
}
|
|
8507
|
+
var BareNestedBlock$0 = $TS($S($Y(EOS), AllowAll, $E(NestedBlockStatements), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
8508
|
+
if (!$3)
|
|
8509
|
+
return $skip;
|
|
8510
|
+
return $3;
|
|
8511
|
+
});
|
|
8512
|
+
function BareNestedBlock(state) {
|
|
8513
|
+
let eventData;
|
|
8514
|
+
if (state.events) {
|
|
8515
|
+
const result = state.events.enter?.("BareNestedBlock", state);
|
|
8516
|
+
if (result) {
|
|
8517
|
+
if (result.cache)
|
|
8518
|
+
return result.cache;
|
|
8519
|
+
eventData = result.data;
|
|
8520
|
+
}
|
|
8521
|
+
}
|
|
8522
|
+
if (state.tokenize) {
|
|
8523
|
+
const result = $TOKEN("BareNestedBlock", state, BareNestedBlock$0(state));
|
|
8524
|
+
if (state.events)
|
|
8525
|
+
state.events.exit?.("BareNestedBlock", state, result, eventData);
|
|
8526
|
+
return result;
|
|
8527
|
+
} else {
|
|
8528
|
+
const result = BareNestedBlock$0(state);
|
|
8529
|
+
if (state.events)
|
|
8530
|
+
state.events.exit?.("BareNestedBlock", state, result, eventData);
|
|
8531
|
+
return result;
|
|
8532
|
+
}
|
|
8533
|
+
}
|
|
8534
|
+
var BareBlock$0 = BareNestedBlock;
|
|
8535
|
+
var BareBlock$1 = ExplicitBlock;
|
|
8536
|
+
var BareBlock$2 = ThenClause;
|
|
8537
|
+
var BareBlock$3 = $TS($S($E(_), $N(EOS), Statement), function($skip, $loc, $0, $1, $2, $3) {
|
|
8538
|
+
var ws = $1;
|
|
8539
|
+
var s = $3;
|
|
8540
|
+
const expressions = [[ws, s]];
|
|
8541
|
+
return {
|
|
8542
|
+
type: "BlockStatement",
|
|
8543
|
+
expressions,
|
|
8544
|
+
children: [expressions],
|
|
8545
|
+
bare: true
|
|
8546
|
+
};
|
|
8547
|
+
});
|
|
8548
|
+
var BareBlock$4 = EmptyBareBlock;
|
|
8549
|
+
function BareBlock(state) {
|
|
8550
|
+
let eventData;
|
|
8551
|
+
if (state.events) {
|
|
8552
|
+
const result = state.events.enter?.("BareBlock", state);
|
|
8553
|
+
if (result) {
|
|
8554
|
+
if (result.cache)
|
|
8555
|
+
return result.cache;
|
|
8556
|
+
eventData = result.data;
|
|
8557
|
+
}
|
|
8558
|
+
}
|
|
8559
|
+
if (state.tokenize) {
|
|
8560
|
+
const result = $TOKEN("BareBlock", state, BareBlock$0(state) || BareBlock$1(state) || BareBlock$2(state) || BareBlock$3(state) || BareBlock$4(state));
|
|
8561
|
+
if (state.events)
|
|
8562
|
+
state.events.exit?.("BareBlock", state, result, eventData);
|
|
8563
|
+
return result;
|
|
8564
|
+
} else {
|
|
8565
|
+
const result = BareBlock$0(state) || BareBlock$1(state) || BareBlock$2(state) || BareBlock$3(state) || BareBlock$4(state);
|
|
8566
|
+
if (state.events)
|
|
8567
|
+
state.events.exit?.("BareBlock", state, result, eventData);
|
|
8568
|
+
return result;
|
|
8569
|
+
}
|
|
8570
|
+
}
|
|
8466
8571
|
var ThenClause$0 = $T($S(Then, SingleLineStatements), function(value) {
|
|
8467
8572
|
return value[1];
|
|
8468
8573
|
});
|
|
@@ -10213,13 +10318,17 @@ ${input.slice(result.pos)}
|
|
|
10213
10318
|
return {
|
|
10214
10319
|
type: "ComputedPropertyName",
|
|
10215
10320
|
children: $0,
|
|
10216
|
-
expression
|
|
10321
|
+
expression,
|
|
10322
|
+
implicit: true
|
|
10217
10323
|
};
|
|
10218
10324
|
});
|
|
10219
10325
|
var ComputedPropertyName$2 = $TS($S(InsertOpenBracket, $EXPECT($L20, fail, 'ComputedPropertyName "-"'), NumericLiteral, InsertCloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
10326
|
+
const expression = [$2, $3];
|
|
10220
10327
|
return {
|
|
10221
10328
|
type: "ComputedPropertyName",
|
|
10222
|
-
|
|
10329
|
+
expression,
|
|
10330
|
+
children: [$1, expression, $4],
|
|
10331
|
+
implicit: true
|
|
10223
10332
|
};
|
|
10224
10333
|
});
|
|
10225
10334
|
function ComputedPropertyName(state) {
|
|
@@ -12847,7 +12956,7 @@ ${input.slice(result.pos)}
|
|
|
12847
12956
|
return result;
|
|
12848
12957
|
}
|
|
12849
12958
|
}
|
|
12850
|
-
var CaseClause$0 = $TS($S(PatternExpressionList, $C(ThenClause,
|
|
12959
|
+
var CaseClause$0 = $TS($S(PatternExpressionList, $C(ThenClause, BareBlock)), function($skip, $loc, $0, $1, $2) {
|
|
12851
12960
|
var patterns = $1;
|
|
12852
12961
|
var block = $2;
|
|
12853
12962
|
return {
|
|
@@ -12857,13 +12966,13 @@ ${input.slice(result.pos)}
|
|
|
12857
12966
|
patterns
|
|
12858
12967
|
};
|
|
12859
12968
|
});
|
|
12860
|
-
var CaseClause$1 = $T($S(Case, CaseExpressionList, $C(
|
|
12969
|
+
var CaseClause$1 = $T($S(Case, CaseExpressionList, IgnoreColon, $C(ThenClause, BareBlock)), function(value) {
|
|
12861
12970
|
return { "type": "CaseClause", "children": value };
|
|
12862
12971
|
});
|
|
12863
|
-
var CaseClause$2 = $TS($S(When, CaseExpressionList, InsertOpenBrace, $C(ThenClause,
|
|
12972
|
+
var CaseClause$2 = $TS($S(When, CaseExpressionList, IgnoreColon, InsertOpenBrace, $C(ThenClause, BareBlock), InsertBreak, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
12864
12973
|
var cases = $2;
|
|
12865
|
-
var block = $
|
|
12866
|
-
var b = $
|
|
12974
|
+
var block = $5;
|
|
12975
|
+
var b = $6;
|
|
12867
12976
|
return {
|
|
12868
12977
|
type: "WhenClause",
|
|
12869
12978
|
cases,
|
|
@@ -12872,7 +12981,7 @@ ${input.slice(result.pos)}
|
|
|
12872
12981
|
children: $0
|
|
12873
12982
|
};
|
|
12874
12983
|
});
|
|
12875
|
-
var CaseClause$3 = $TS($S(Default, ImpliedColon, $C(
|
|
12984
|
+
var CaseClause$3 = $TS($S(Default, ImpliedColon, $C(ThenClause, BareBlock)), function($skip, $loc, $0, $1, $2, $3) {
|
|
12876
12985
|
var block = $3;
|
|
12877
12986
|
return {
|
|
12878
12987
|
type: "DefaultClause",
|
|
@@ -12968,7 +13077,7 @@ ${input.slice(result.pos)}
|
|
|
12968
13077
|
return result;
|
|
12969
13078
|
}
|
|
12970
13079
|
}
|
|
12971
|
-
var CaseExpressionList$0 = $TS($S(ForbidMultiLineImplicitObjectLiteral, $E($S($
|
|
13080
|
+
var CaseExpressionList$0 = $TS($S(ForbidMultiLineImplicitObjectLiteral, $E($S($E(_), CaseExpression, InsertColon)), $Q($S(__, Comma, CaseExpression, InsertColon)), RestoreMultiLineImplicitObjectLiteral), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
12972
13081
|
var first = $2;
|
|
12973
13082
|
var rest = $3;
|
|
12974
13083
|
if (!first)
|
|
@@ -13004,10 +13113,40 @@ ${input.slice(result.pos)}
|
|
|
13004
13113
|
return result;
|
|
13005
13114
|
}
|
|
13006
13115
|
}
|
|
13007
|
-
var
|
|
13008
|
-
|
|
13009
|
-
|
|
13116
|
+
var CaseExpression$0 = $TS($S(PropertyName, $Y($S($E(_), Colon))), function($skip, $loc, $0, $1, $2) {
|
|
13117
|
+
var value = $1;
|
|
13118
|
+
if (value.type === "ComputedPropertyName") {
|
|
13119
|
+
if (value.implicit)
|
|
13120
|
+
return value.expression;
|
|
13121
|
+
return { ...value, type: "ArrayExpression" };
|
|
13122
|
+
}
|
|
13123
|
+
return value;
|
|
13010
13124
|
});
|
|
13125
|
+
var CaseExpression$1 = ExpressionWithObjectApplicationForbidden;
|
|
13126
|
+
function CaseExpression(state) {
|
|
13127
|
+
let eventData;
|
|
13128
|
+
if (state.events) {
|
|
13129
|
+
const result = state.events.enter?.("CaseExpression", state);
|
|
13130
|
+
if (result) {
|
|
13131
|
+
if (result.cache)
|
|
13132
|
+
return result.cache;
|
|
13133
|
+
eventData = result.data;
|
|
13134
|
+
}
|
|
13135
|
+
}
|
|
13136
|
+
if (state.tokenize) {
|
|
13137
|
+
const result = $TOKEN("CaseExpression", state, CaseExpression$0(state) || CaseExpression$1(state));
|
|
13138
|
+
if (state.events)
|
|
13139
|
+
state.events.exit?.("CaseExpression", state, result, eventData);
|
|
13140
|
+
return result;
|
|
13141
|
+
} else {
|
|
13142
|
+
const result = CaseExpression$0(state) || CaseExpression$1(state);
|
|
13143
|
+
if (state.events)
|
|
13144
|
+
state.events.exit?.("CaseExpression", state, result, eventData);
|
|
13145
|
+
return result;
|
|
13146
|
+
}
|
|
13147
|
+
}
|
|
13148
|
+
var ImpliedColon$0 = $S($E(_), Colon);
|
|
13149
|
+
var ImpliedColon$1 = InsertColon;
|
|
13011
13150
|
function ImpliedColon(state) {
|
|
13012
13151
|
let eventData;
|
|
13013
13152
|
if (state.events) {
|
|
@@ -13030,6 +13169,32 @@ ${input.slice(result.pos)}
|
|
|
13030
13169
|
return result;
|
|
13031
13170
|
}
|
|
13032
13171
|
}
|
|
13172
|
+
var IgnoreColon$0 = $TV($E($S($E(_), Colon)), function($skip, $loc, $0, $1) {
|
|
13173
|
+
if ($1)
|
|
13174
|
+
return $1[0];
|
|
13175
|
+
});
|
|
13176
|
+
function IgnoreColon(state) {
|
|
13177
|
+
let eventData;
|
|
13178
|
+
if (state.events) {
|
|
13179
|
+
const result = state.events.enter?.("IgnoreColon", state);
|
|
13180
|
+
if (result) {
|
|
13181
|
+
if (result.cache)
|
|
13182
|
+
return result.cache;
|
|
13183
|
+
eventData = result.data;
|
|
13184
|
+
}
|
|
13185
|
+
}
|
|
13186
|
+
if (state.tokenize) {
|
|
13187
|
+
const result = $TOKEN("IgnoreColon", state, IgnoreColon$0(state));
|
|
13188
|
+
if (state.events)
|
|
13189
|
+
state.events.exit?.("IgnoreColon", state, result, eventData);
|
|
13190
|
+
return result;
|
|
13191
|
+
} else {
|
|
13192
|
+
const result = IgnoreColon$0(state);
|
|
13193
|
+
if (state.events)
|
|
13194
|
+
state.events.exit?.("IgnoreColon", state, result, eventData);
|
|
13195
|
+
return result;
|
|
13196
|
+
}
|
|
13197
|
+
}
|
|
13033
13198
|
var TryStatement$0 = $TS($S(Try, $N($EXPECT($L12, fail, 'TryStatement ":"')), NoPostfixBracedOrEmptyBlock, $E(CatchClause), $E(FinallyClause)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
13034
13199
|
var t = $1;
|
|
13035
13200
|
var b = $3;
|
|
@@ -14729,14 +14894,15 @@ ${input.slice(result.pos)}
|
|
|
14729
14894
|
}
|
|
14730
14895
|
}
|
|
14731
14896
|
var ExportDeclaration$0 = $TS($S($E(Decorators), Export, __, Default, __, $C(HoistableDeclaration, ClassDeclaration, ExtendedExpression)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
14732
|
-
|
|
14897
|
+
var declaration = $6;
|
|
14898
|
+
return { type: "ExportDeclaration", declaration, children: $0 };
|
|
14733
14899
|
});
|
|
14734
14900
|
var ExportDeclaration$1 = $TS($S(Export, __, ExportFromClause, __, FromClause), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
14735
14901
|
return { type: "ExportDeclaration", ts: $3.ts, children: $0 };
|
|
14736
14902
|
});
|
|
14737
14903
|
var ExportDeclaration$2 = $TS($S($E(Decorators), Export, __, $C(Declaration, VariableStatement, TypeAndNamedExports, ExportVarDec)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
14738
|
-
var
|
|
14739
|
-
return { type: "ExportDeclaration", ts:
|
|
14904
|
+
var declaration = $4;
|
|
14905
|
+
return { type: "ExportDeclaration", declaration, ts: declaration.ts, children: $0 };
|
|
14740
14906
|
});
|
|
14741
14907
|
function ExportDeclaration(state) {
|
|
14742
14908
|
let eventData;
|
|
@@ -22106,7 +22272,8 @@ ${input.slice(result.pos)}
|
|
|
22106
22272
|
}
|
|
22107
22273
|
}
|
|
22108
22274
|
var TypeArguments$0 = $TS($S($EXPECT($L155, fail, 'TypeArguments "<"'), $P(TypeArgument), __, $EXPECT($L34, fail, 'TypeArguments ">"')), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
22109
|
-
|
|
22275
|
+
var args = $2;
|
|
22276
|
+
return { ts: true, types: args.map(([, t]) => t), children: $0 };
|
|
22110
22277
|
});
|
|
22111
22278
|
function TypeArguments(state) {
|
|
22112
22279
|
let eventData;
|
|
@@ -22567,6 +22734,31 @@ ${input.slice(result.pos)}
|
|
|
22567
22734
|
return result;
|
|
22568
22735
|
}
|
|
22569
22736
|
}
|
|
22737
|
+
var InsertColon$0 = $TV($EXPECT($L0, fail, 'InsertColon ""'), function($skip, $loc, $0, $1) {
|
|
22738
|
+
return { $loc, token: ":" };
|
|
22739
|
+
});
|
|
22740
|
+
function InsertColon(state) {
|
|
22741
|
+
let eventData;
|
|
22742
|
+
if (state.events) {
|
|
22743
|
+
const result = state.events.enter?.("InsertColon", state);
|
|
22744
|
+
if (result) {
|
|
22745
|
+
if (result.cache)
|
|
22746
|
+
return result.cache;
|
|
22747
|
+
eventData = result.data;
|
|
22748
|
+
}
|
|
22749
|
+
}
|
|
22750
|
+
if (state.tokenize) {
|
|
22751
|
+
const result = $TOKEN("InsertColon", state, InsertColon$0(state));
|
|
22752
|
+
if (state.events)
|
|
22753
|
+
state.events.exit?.("InsertColon", state, result, eventData);
|
|
22754
|
+
return result;
|
|
22755
|
+
} else {
|
|
22756
|
+
const result = InsertColon$0(state);
|
|
22757
|
+
if (state.events)
|
|
22758
|
+
state.events.exit?.("InsertColon", state, result, eventData);
|
|
22759
|
+
return result;
|
|
22760
|
+
}
|
|
22761
|
+
}
|
|
22570
22762
|
var InsertSemicolon$0 = $TV($EXPECT($L0, fail, 'InsertSemicolon ""'), function($skip, $loc, $0, $1) {
|
|
22571
22763
|
return { $loc, token: ";" };
|
|
22572
22764
|
});
|