@danielx/civet 0.5.49 → 0.5.51
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 +233 -26
- package/dist/main.js +233 -26
- package/dist/main.mjs +233 -26
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -877,6 +877,7 @@ ${input.slice(result.pos)}
|
|
|
877
877
|
NestedInterfaceProperties,
|
|
878
878
|
NestedInterfaceProperty,
|
|
879
879
|
InterfaceProperty,
|
|
880
|
+
BasicInterfaceProperty,
|
|
880
881
|
InterfacePropertyDelimiter,
|
|
881
882
|
NamespaceBlock,
|
|
882
883
|
NestedTypeDeclarations,
|
|
@@ -900,6 +901,9 @@ ${input.slice(result.pos)}
|
|
|
900
901
|
NestedType,
|
|
901
902
|
TypeConditional,
|
|
902
903
|
TypeLiteral,
|
|
904
|
+
InlineInterfaceLiteral,
|
|
905
|
+
InlineBasicInterfaceProperty,
|
|
906
|
+
InlineInterfacePropertyDelimiter,
|
|
903
907
|
TypeBinaryOp,
|
|
904
908
|
FunctionType,
|
|
905
909
|
TypeArguments,
|
|
@@ -948,6 +952,7 @@ ${input.slice(result.pos)}
|
|
|
948
952
|
CoffeeNotEnabled,
|
|
949
953
|
CoffeeOfEnabled,
|
|
950
954
|
CoffeePrototypeEnabled,
|
|
955
|
+
ObjectIsEnabled,
|
|
951
956
|
Reset,
|
|
952
957
|
Init,
|
|
953
958
|
Indent,
|
|
@@ -1128,7 +1133,7 @@ ${input.slice(result.pos)}
|
|
|
1128
1133
|
var $L167 = $L("infer");
|
|
1129
1134
|
var $L168 = $L("[]");
|
|
1130
1135
|
var $L169 = $L("civet");
|
|
1131
|
-
var $R0 = $R(new RegExp("(as|for|of|satisfies|then|when)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
1136
|
+
var $R0 = $R(new RegExp("(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
1132
1137
|
var $R1 = $R(new RegExp("[&]", "suy"));
|
|
1133
1138
|
var $R2 = $R(new RegExp("[!~+-]+", "suy"));
|
|
1134
1139
|
var $R3 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
|
|
@@ -1481,7 +1486,7 @@ ${input.slice(result.pos)}
|
|
|
1481
1486
|
return result;
|
|
1482
1487
|
}
|
|
1483
1488
|
}
|
|
1484
|
-
var ForbiddenImplicitCalls$0 = $R$0($EXPECT($R0, fail, "ForbiddenImplicitCalls /(as|for|of|satisfies|then|when)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
|
|
1489
|
+
var ForbiddenImplicitCalls$0 = $R$0($EXPECT($R0, fail, "ForbiddenImplicitCalls /(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
|
|
1485
1490
|
var ForbiddenImplicitCalls$1 = $EXPECT($L0, fail, 'ForbiddenImplicitCalls "/ "');
|
|
1486
1491
|
var ForbiddenImplicitCalls$2 = AtAt;
|
|
1487
1492
|
function ForbiddenImplicitCalls(state) {
|
|
@@ -6541,8 +6546,13 @@ ${input.slice(result.pos)}
|
|
|
6541
6546
|
var BinaryOpSymbol$6 = $EXPECT($L54, fail, 'BinaryOpSymbol "-"');
|
|
6542
6547
|
var BinaryOpSymbol$7 = $EXPECT($L55, fail, 'BinaryOpSymbol "<="');
|
|
6543
6548
|
var BinaryOpSymbol$8 = $EXPECT($L56, fail, 'BinaryOpSymbol ">="');
|
|
6544
|
-
var BinaryOpSymbol$9 = $
|
|
6545
|
-
return
|
|
6549
|
+
var BinaryOpSymbol$9 = $TV($EXPECT($L57, fail, 'BinaryOpSymbol "<?"'), function($skip, $loc, $0, $1) {
|
|
6550
|
+
return {
|
|
6551
|
+
$loc,
|
|
6552
|
+
token: "instanceof",
|
|
6553
|
+
relational: true,
|
|
6554
|
+
special: true
|
|
6555
|
+
};
|
|
6546
6556
|
});
|
|
6547
6557
|
var BinaryOpSymbol$10 = $EXPECT($L58, fail, 'BinaryOpSymbol "<<"');
|
|
6548
6558
|
var BinaryOpSymbol$11 = $TR($EXPECT($R5, fail, "BinaryOpSymbol /<(?!\\p{ID_Start}|[_$])/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
@@ -6590,17 +6600,28 @@ ${input.slice(result.pos)}
|
|
|
6590
6600
|
return {
|
|
6591
6601
|
$loc,
|
|
6592
6602
|
token: "instanceof",
|
|
6593
|
-
|
|
6603
|
+
relational: true,
|
|
6604
|
+
special: true,
|
|
6605
|
+
negated: true
|
|
6594
6606
|
};
|
|
6595
6607
|
});
|
|
6596
6608
|
var BinaryOpSymbol$29 = $TV($C($S($N(CoffeeOfEnabled), $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L68, fail, 'BinaryOpSymbol "of"'), NonIdContinue)), function($skip, $loc, $0, $1) {
|
|
6597
6609
|
return {
|
|
6598
6610
|
$loc,
|
|
6599
6611
|
token: "in",
|
|
6612
|
+
special: true,
|
|
6613
|
+
negated: true
|
|
6614
|
+
};
|
|
6615
|
+
});
|
|
6616
|
+
var BinaryOpSymbol$30 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
6617
|
+
return {
|
|
6618
|
+
method: "includes",
|
|
6619
|
+
relational: true,
|
|
6620
|
+
reversed: true,
|
|
6600
6621
|
special: true
|
|
6601
6622
|
};
|
|
6602
6623
|
});
|
|
6603
|
-
var BinaryOpSymbol$
|
|
6624
|
+
var BinaryOpSymbol$31 = $TS($S(CoffeeOfEnabled, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
6604
6625
|
return {
|
|
6605
6626
|
call: [module2.getRef("indexOf"), ".call"],
|
|
6606
6627
|
relational: true,
|
|
@@ -6609,7 +6630,16 @@ ${input.slice(result.pos)}
|
|
|
6609
6630
|
special: true
|
|
6610
6631
|
};
|
|
6611
6632
|
});
|
|
6612
|
-
var BinaryOpSymbol$
|
|
6633
|
+
var BinaryOpSymbol$32 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
|
|
6634
|
+
return {
|
|
6635
|
+
method: "includes",
|
|
6636
|
+
relational: true,
|
|
6637
|
+
reversed: true,
|
|
6638
|
+
special: true,
|
|
6639
|
+
negated: true
|
|
6640
|
+
};
|
|
6641
|
+
});
|
|
6642
|
+
var BinaryOpSymbol$33 = $TS($S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
6613
6643
|
return {
|
|
6614
6644
|
call: [module2.getRef("indexOf"), ".call"],
|
|
6615
6645
|
relational: true,
|
|
@@ -6618,18 +6648,35 @@ ${input.slice(result.pos)}
|
|
|
6618
6648
|
special: true
|
|
6619
6649
|
};
|
|
6620
6650
|
});
|
|
6621
|
-
var BinaryOpSymbol$
|
|
6651
|
+
var BinaryOpSymbol$34 = $TS($S($N(CoffeeNotEnabled), $EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
6652
|
+
if (module2.config.objectIs) {
|
|
6653
|
+
return {
|
|
6654
|
+
call: module2.getRef("is"),
|
|
6655
|
+
relational: true,
|
|
6656
|
+
special: true,
|
|
6657
|
+
asConst: true,
|
|
6658
|
+
negated: true
|
|
6659
|
+
};
|
|
6660
|
+
}
|
|
6622
6661
|
return "!==";
|
|
6623
6662
|
});
|
|
6624
|
-
var BinaryOpSymbol$
|
|
6663
|
+
var BinaryOpSymbol$35 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
6664
|
+
if (module2.config.objectIs) {
|
|
6665
|
+
return {
|
|
6666
|
+
call: module2.getRef("is"),
|
|
6667
|
+
relational: true,
|
|
6668
|
+
special: true,
|
|
6669
|
+
asConst: true
|
|
6670
|
+
};
|
|
6671
|
+
}
|
|
6625
6672
|
return "===";
|
|
6626
6673
|
});
|
|
6627
|
-
var BinaryOpSymbol$
|
|
6674
|
+
var BinaryOpSymbol$36 = $TS($S($EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
6628
6675
|
return $1;
|
|
6629
6676
|
});
|
|
6630
|
-
var BinaryOpSymbol$
|
|
6631
|
-
var BinaryOpSymbol$
|
|
6632
|
-
var BinaryOpSymbol$
|
|
6677
|
+
var BinaryOpSymbol$37 = $EXPECT($L76, fail, 'BinaryOpSymbol "&"');
|
|
6678
|
+
var BinaryOpSymbol$38 = $EXPECT($L77, fail, 'BinaryOpSymbol "^"');
|
|
6679
|
+
var BinaryOpSymbol$39 = $EXPECT($L78, fail, 'BinaryOpSymbol "|"');
|
|
6633
6680
|
function BinaryOpSymbol(state) {
|
|
6634
6681
|
let eventData;
|
|
6635
6682
|
if (state.events) {
|
|
@@ -6641,12 +6688,12 @@ ${input.slice(result.pos)}
|
|
|
6641
6688
|
}
|
|
6642
6689
|
}
|
|
6643
6690
|
if (state.tokenize) {
|
|
6644
|
-
const result = $TOKEN("BinaryOpSymbol", state, BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state) || BinaryOpSymbol$37(state));
|
|
6691
|
+
const result = $TOKEN("BinaryOpSymbol", state, BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state) || BinaryOpSymbol$37(state) || BinaryOpSymbol$38(state) || BinaryOpSymbol$39(state));
|
|
6645
6692
|
if (state.events)
|
|
6646
6693
|
state.events.exit?.("BinaryOpSymbol", state, result, eventData);
|
|
6647
6694
|
return result;
|
|
6648
6695
|
} else {
|
|
6649
|
-
const result = BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state) || BinaryOpSymbol$37(state);
|
|
6696
|
+
const result = BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state) || BinaryOpSymbol$37(state) || BinaryOpSymbol$38(state) || BinaryOpSymbol$39(state);
|
|
6650
6697
|
if (state.events)
|
|
6651
6698
|
state.events.exit?.("BinaryOpSymbol", state, result, eventData);
|
|
6652
6699
|
return result;
|
|
@@ -14508,7 +14555,7 @@ ${input.slice(result.pos)}
|
|
|
14508
14555
|
return result;
|
|
14509
14556
|
}
|
|
14510
14557
|
}
|
|
14511
|
-
var TypeDeclarationRest$0 = $S(TypeKeyword, $Q(TrailingComment), IdentifierName, $E(TypeParameters), __, Equals, __, Type);
|
|
14558
|
+
var TypeDeclarationRest$0 = $S(TypeKeyword, $Q(TrailingComment), IdentifierName, $E(TypeParameters), __, Equals, $C($S($E(_), Type), $S(__, Type)));
|
|
14512
14559
|
var TypeDeclarationRest$1 = $S(Interface, $Q(TrailingComment), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock);
|
|
14513
14560
|
var TypeDeclarationRest$2 = $S(Namespace, $Q(TrailingComment), IdentifierName, NamespaceBlock);
|
|
14514
14561
|
var TypeDeclarationRest$3 = FunctionSignature;
|
|
@@ -14580,7 +14627,7 @@ ${input.slice(result.pos)}
|
|
|
14580
14627
|
return result;
|
|
14581
14628
|
}
|
|
14582
14629
|
}
|
|
14583
|
-
var InterfaceExtendsClause$0 = $S(ExtendsToken, InterfaceExtendsTarget);
|
|
14630
|
+
var InterfaceExtendsClause$0 = $S(ExtendsToken, InterfaceExtendsTarget, $Q($S(Comma, InterfaceExtendsTarget)));
|
|
14584
14631
|
function InterfaceExtendsClause(state) {
|
|
14585
14632
|
let eventData;
|
|
14586
14633
|
if (state.events) {
|
|
@@ -14771,7 +14818,7 @@ ${input.slice(result.pos)}
|
|
|
14771
14818
|
return result;
|
|
14772
14819
|
}
|
|
14773
14820
|
}
|
|
14774
|
-
var InterfaceProperty$0 =
|
|
14821
|
+
var InterfaceProperty$0 = BasicInterfaceProperty;
|
|
14775
14822
|
var InterfaceProperty$1 = $S(NonEmptyParameters, TypeSuffix, InterfacePropertyDelimiter);
|
|
14776
14823
|
var InterfaceProperty$2 = $S(MethodSignature, InterfacePropertyDelimiter);
|
|
14777
14824
|
function InterfaceProperty(state) {
|
|
@@ -14796,6 +14843,29 @@ ${input.slice(result.pos)}
|
|
|
14796
14843
|
return result;
|
|
14797
14844
|
}
|
|
14798
14845
|
}
|
|
14846
|
+
var BasicInterfaceProperty$0 = $S($C(TypeIndexSignature, PropertyName), TypeSuffix, InterfacePropertyDelimiter);
|
|
14847
|
+
function BasicInterfaceProperty(state) {
|
|
14848
|
+
let eventData;
|
|
14849
|
+
if (state.events) {
|
|
14850
|
+
const result = state.events.enter?.("BasicInterfaceProperty", state);
|
|
14851
|
+
if (result) {
|
|
14852
|
+
if (result.cache)
|
|
14853
|
+
return result.cache;
|
|
14854
|
+
eventData = result.data;
|
|
14855
|
+
}
|
|
14856
|
+
}
|
|
14857
|
+
if (state.tokenize) {
|
|
14858
|
+
const result = $TOKEN("BasicInterfaceProperty", state, BasicInterfaceProperty$0(state));
|
|
14859
|
+
if (state.events)
|
|
14860
|
+
state.events.exit?.("BasicInterfaceProperty", state, result, eventData);
|
|
14861
|
+
return result;
|
|
14862
|
+
} else {
|
|
14863
|
+
const result = BasicInterfaceProperty$0(state);
|
|
14864
|
+
if (state.events)
|
|
14865
|
+
state.events.exit?.("BasicInterfaceProperty", state, result, eventData);
|
|
14866
|
+
return result;
|
|
14867
|
+
}
|
|
14868
|
+
}
|
|
14799
14869
|
var InterfacePropertyDelimiter$0 = $S($Q(_), $C(Semicolon, Comma));
|
|
14800
14870
|
var InterfacePropertyDelimiter$1 = $Y($S(__, CloseBrace));
|
|
14801
14871
|
var InterfacePropertyDelimiter$2 = $Y(EOS);
|
|
@@ -15178,12 +15248,13 @@ ${input.slice(result.pos)}
|
|
|
15178
15248
|
}
|
|
15179
15249
|
}
|
|
15180
15250
|
var TypePrimary$0 = InterfaceBlock;
|
|
15181
|
-
var TypePrimary$1 = $S(
|
|
15182
|
-
var TypePrimary$2 = $S($E(_),
|
|
15183
|
-
var TypePrimary$3 = $S($E(_),
|
|
15184
|
-
var TypePrimary$4 = $S($E(_),
|
|
15251
|
+
var TypePrimary$1 = $S($E(_), FunctionType);
|
|
15252
|
+
var TypePrimary$2 = $S($E(_), InlineInterfaceLiteral);
|
|
15253
|
+
var TypePrimary$3 = $S($E(_), TypeTuple);
|
|
15254
|
+
var TypePrimary$4 = $S($E(_), ImportType);
|
|
15185
15255
|
var TypePrimary$5 = $S($E(_), TypeLiteral);
|
|
15186
15256
|
var TypePrimary$6 = $S($E(_), IdentifierName, $Q($S(Dot, IdentifierName)), $E(TypeArguments));
|
|
15257
|
+
var TypePrimary$7 = $S(__, OpenParen, Type, __, CloseParen);
|
|
15187
15258
|
function TypePrimary(state) {
|
|
15188
15259
|
let eventData;
|
|
15189
15260
|
if (state.events) {
|
|
@@ -15195,12 +15266,12 @@ ${input.slice(result.pos)}
|
|
|
15195
15266
|
}
|
|
15196
15267
|
}
|
|
15197
15268
|
if (state.tokenize) {
|
|
15198
|
-
const result = $TOKEN("TypePrimary", state, TypePrimary$0(state) || TypePrimary$1(state) || TypePrimary$2(state) || TypePrimary$3(state) || TypePrimary$4(state) || TypePrimary$5(state) || TypePrimary$6(state));
|
|
15269
|
+
const result = $TOKEN("TypePrimary", state, TypePrimary$0(state) || TypePrimary$1(state) || TypePrimary$2(state) || TypePrimary$3(state) || TypePrimary$4(state) || TypePrimary$5(state) || TypePrimary$6(state) || TypePrimary$7(state));
|
|
15199
15270
|
if (state.events)
|
|
15200
15271
|
state.events.exit?.("TypePrimary", state, result, eventData);
|
|
15201
15272
|
return result;
|
|
15202
15273
|
} else {
|
|
15203
|
-
const result = TypePrimary$0(state) || TypePrimary$1(state) || TypePrimary$2(state) || TypePrimary$3(state) || TypePrimary$4(state) || TypePrimary$5(state) || TypePrimary$6(state);
|
|
15274
|
+
const result = TypePrimary$0(state) || TypePrimary$1(state) || TypePrimary$2(state) || TypePrimary$3(state) || TypePrimary$4(state) || TypePrimary$5(state) || TypePrimary$6(state) || TypePrimary$7(state);
|
|
15204
15275
|
if (state.events)
|
|
15205
15276
|
state.events.exit?.("TypePrimary", state, result, eventData);
|
|
15206
15277
|
return result;
|
|
@@ -15385,6 +15456,80 @@ ${input.slice(result.pos)}
|
|
|
15385
15456
|
return result;
|
|
15386
15457
|
}
|
|
15387
15458
|
}
|
|
15459
|
+
var InlineInterfaceLiteral$0 = $S(InsertInlineOpenBrace, InlineBasicInterfaceProperty, $Q($S($C(IndentedFurther, $E(_)), InlineBasicInterfaceProperty)), InsertCloseBrace);
|
|
15460
|
+
function InlineInterfaceLiteral(state) {
|
|
15461
|
+
let eventData;
|
|
15462
|
+
if (state.events) {
|
|
15463
|
+
const result = state.events.enter?.("InlineInterfaceLiteral", state);
|
|
15464
|
+
if (result) {
|
|
15465
|
+
if (result.cache)
|
|
15466
|
+
return result.cache;
|
|
15467
|
+
eventData = result.data;
|
|
15468
|
+
}
|
|
15469
|
+
}
|
|
15470
|
+
if (state.tokenize) {
|
|
15471
|
+
const result = $TOKEN("InlineInterfaceLiteral", state, InlineInterfaceLiteral$0(state));
|
|
15472
|
+
if (state.events)
|
|
15473
|
+
state.events.exit?.("InlineInterfaceLiteral", state, result, eventData);
|
|
15474
|
+
return result;
|
|
15475
|
+
} else {
|
|
15476
|
+
const result = InlineInterfaceLiteral$0(state);
|
|
15477
|
+
if (state.events)
|
|
15478
|
+
state.events.exit?.("InlineInterfaceLiteral", state, result, eventData);
|
|
15479
|
+
return result;
|
|
15480
|
+
}
|
|
15481
|
+
}
|
|
15482
|
+
var InlineBasicInterfaceProperty$0 = $S($C(TypeIndexSignature, PropertyName), $E(QuestionMark), Colon, Type, InlineInterfacePropertyDelimiter);
|
|
15483
|
+
function InlineBasicInterfaceProperty(state) {
|
|
15484
|
+
let eventData;
|
|
15485
|
+
if (state.events) {
|
|
15486
|
+
const result = state.events.enter?.("InlineBasicInterfaceProperty", state);
|
|
15487
|
+
if (result) {
|
|
15488
|
+
if (result.cache)
|
|
15489
|
+
return result.cache;
|
|
15490
|
+
eventData = result.data;
|
|
15491
|
+
}
|
|
15492
|
+
}
|
|
15493
|
+
if (state.tokenize) {
|
|
15494
|
+
const result = $TOKEN("InlineBasicInterfaceProperty", state, InlineBasicInterfaceProperty$0(state));
|
|
15495
|
+
if (state.events)
|
|
15496
|
+
state.events.exit?.("InlineBasicInterfaceProperty", state, result, eventData);
|
|
15497
|
+
return result;
|
|
15498
|
+
} else {
|
|
15499
|
+
const result = InlineBasicInterfaceProperty$0(state);
|
|
15500
|
+
if (state.events)
|
|
15501
|
+
state.events.exit?.("InlineBasicInterfaceProperty", state, result, eventData);
|
|
15502
|
+
return result;
|
|
15503
|
+
}
|
|
15504
|
+
}
|
|
15505
|
+
var InlineInterfacePropertyDelimiter$0 = $C($S($E(_), Semicolon), CommaDelimiter);
|
|
15506
|
+
var InlineInterfacePropertyDelimiter$1 = $T($S($Y($S($C(IndentedFurther, $E(_)), InlineBasicInterfaceProperty)), InsertComma), function(value) {
|
|
15507
|
+
return value[1];
|
|
15508
|
+
});
|
|
15509
|
+
var InlineInterfacePropertyDelimiter$2 = $Y($S(__, $C($EXPECT($L29, fail, 'InlineInterfacePropertyDelimiter ":"'), $EXPECT($L15, fail, 'InlineInterfacePropertyDelimiter ")"'), $EXPECT($L28, fail, 'InlineInterfacePropertyDelimiter "]"'), $EXPECT($L17, fail, 'InlineInterfacePropertyDelimiter "}"'))));
|
|
15510
|
+
var InlineInterfacePropertyDelimiter$3 = $Y(EOS);
|
|
15511
|
+
function InlineInterfacePropertyDelimiter(state) {
|
|
15512
|
+
let eventData;
|
|
15513
|
+
if (state.events) {
|
|
15514
|
+
const result = state.events.enter?.("InlineInterfacePropertyDelimiter", state);
|
|
15515
|
+
if (result) {
|
|
15516
|
+
if (result.cache)
|
|
15517
|
+
return result.cache;
|
|
15518
|
+
eventData = result.data;
|
|
15519
|
+
}
|
|
15520
|
+
}
|
|
15521
|
+
if (state.tokenize) {
|
|
15522
|
+
const result = $TOKEN("InlineInterfacePropertyDelimiter", state, InlineInterfacePropertyDelimiter$0(state) || InlineInterfacePropertyDelimiter$1(state) || InlineInterfacePropertyDelimiter$2(state) || InlineInterfacePropertyDelimiter$3(state));
|
|
15523
|
+
if (state.events)
|
|
15524
|
+
state.events.exit?.("InlineInterfacePropertyDelimiter", state, result, eventData);
|
|
15525
|
+
return result;
|
|
15526
|
+
} else {
|
|
15527
|
+
const result = InlineInterfacePropertyDelimiter$0(state) || InlineInterfacePropertyDelimiter$1(state) || InlineInterfacePropertyDelimiter$2(state) || InlineInterfacePropertyDelimiter$3(state);
|
|
15528
|
+
if (state.events)
|
|
15529
|
+
state.events.exit?.("InlineInterfacePropertyDelimiter", state, result, eventData);
|
|
15530
|
+
return result;
|
|
15531
|
+
}
|
|
15532
|
+
}
|
|
15388
15533
|
var TypeBinaryOp$0 = $TV($EXPECT($L78, fail, 'TypeBinaryOp "|"'), function($skip, $loc, $0, $1) {
|
|
15389
15534
|
return { $loc, token: "|" };
|
|
15390
15535
|
});
|
|
@@ -16630,6 +16775,33 @@ ${input.slice(result.pos)}
|
|
|
16630
16775
|
return result;
|
|
16631
16776
|
}
|
|
16632
16777
|
}
|
|
16778
|
+
var ObjectIsEnabled$0 = $TV($EXPECT($L14, fail, 'ObjectIsEnabled ""'), function($skip, $loc, $0, $1) {
|
|
16779
|
+
if (module2.config.objectIs)
|
|
16780
|
+
return;
|
|
16781
|
+
return $skip;
|
|
16782
|
+
});
|
|
16783
|
+
function ObjectIsEnabled(state) {
|
|
16784
|
+
let eventData;
|
|
16785
|
+
if (state.events) {
|
|
16786
|
+
const result = state.events.enter?.("ObjectIsEnabled", state);
|
|
16787
|
+
if (result) {
|
|
16788
|
+
if (result.cache)
|
|
16789
|
+
return result.cache;
|
|
16790
|
+
eventData = result.data;
|
|
16791
|
+
}
|
|
16792
|
+
}
|
|
16793
|
+
if (state.tokenize) {
|
|
16794
|
+
const result = $TOKEN("ObjectIsEnabled", state, ObjectIsEnabled$0(state));
|
|
16795
|
+
if (state.events)
|
|
16796
|
+
state.events.exit?.("ObjectIsEnabled", state, result, eventData);
|
|
16797
|
+
return result;
|
|
16798
|
+
} else {
|
|
16799
|
+
const result = ObjectIsEnabled$0(state);
|
|
16800
|
+
if (state.events)
|
|
16801
|
+
state.events.exit?.("ObjectIsEnabled", state, result, eventData);
|
|
16802
|
+
return result;
|
|
16803
|
+
}
|
|
16804
|
+
}
|
|
16633
16805
|
var Reset$0 = $TV($EXPECT($L14, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
|
|
16634
16806
|
module2.indentLevels = [{
|
|
16635
16807
|
level: 0,
|
|
@@ -16678,6 +16850,7 @@ ${input.slice(result.pos)}
|
|
|
16678
16850
|
coffeeOf: false,
|
|
16679
16851
|
coffeePrototype: false,
|
|
16680
16852
|
implicitReturns: true,
|
|
16853
|
+
objectIs: false,
|
|
16681
16854
|
react: false,
|
|
16682
16855
|
solid: false,
|
|
16683
16856
|
client: false,
|
|
@@ -16689,6 +16862,10 @@ ${input.slice(result.pos)}
|
|
|
16689
16862
|
ts: true,
|
|
16690
16863
|
children: [" as any"]
|
|
16691
16864
|
};
|
|
16865
|
+
module2.asConst = {
|
|
16866
|
+
ts: true,
|
|
16867
|
+
children: [" as const"]
|
|
16868
|
+
};
|
|
16692
16869
|
module2.prelude = [];
|
|
16693
16870
|
const declareRef = {
|
|
16694
16871
|
indexOf(indexOfRef) {
|
|
@@ -16705,6 +16882,13 @@ ${input.slice(result.pos)}
|
|
|
16705
16882
|
};
|
|
16706
16883
|
module2.prelude.push(["", ["const ", hasPropRef, typeSuffix, " = {}.hasOwnProperty", module2.asAny, "\n"]]);
|
|
16707
16884
|
},
|
|
16885
|
+
is(isRef) {
|
|
16886
|
+
const typeSuffix = {
|
|
16887
|
+
ts: true,
|
|
16888
|
+
children: [": { <B, A extends B> (a: A, b: B): b is A, <A, B> (a: A, b: B): a is A & B }"]
|
|
16889
|
+
};
|
|
16890
|
+
module2.prelude.push(["", ["const ", isRef, typeSuffix, " = Object.is", module2.asAny, "\n"]]);
|
|
16891
|
+
},
|
|
16708
16892
|
modulo(moduloRef) {
|
|
16709
16893
|
const typeSuffix = {
|
|
16710
16894
|
ts: true,
|
|
@@ -16764,6 +16948,12 @@ ${input.slice(result.pos)}
|
|
|
16764
16948
|
declareRef[base](ref);
|
|
16765
16949
|
return refs[base] = ref;
|
|
16766
16950
|
};
|
|
16951
|
+
module2.makeAsConst = function(node) {
|
|
16952
|
+
if (node.type === "Literal" && node.raw !== "null" || node.type === "ArrayExpression" || node.type === "ObjectExpression") {
|
|
16953
|
+
return { ...node, children: [...node.children, module2.asConst] };
|
|
16954
|
+
}
|
|
16955
|
+
return node;
|
|
16956
|
+
};
|
|
16767
16957
|
module2.typeOfJSX = function(node) {
|
|
16768
16958
|
switch (node.type) {
|
|
16769
16959
|
case "JSXElement":
|
|
@@ -16843,6 +17033,9 @@ ${input.slice(result.pos)}
|
|
|
16843
17033
|
]) {
|
|
16844
17034
|
module2.config[option] = b;
|
|
16845
17035
|
}
|
|
17036
|
+
if (b) {
|
|
17037
|
+
module2.config.objectIs = false;
|
|
17038
|
+
}
|
|
16846
17039
|
}
|
|
16847
17040
|
});
|
|
16848
17041
|
module2.modifyString = function(str) {
|
|
@@ -17186,6 +17379,10 @@ ${input.slice(result.pos)}
|
|
|
17186
17379
|
const op = expandedOps[i];
|
|
17187
17380
|
if (op.special) {
|
|
17188
17381
|
let [a, wsOp, op2, wsB, b] = expandedOps.slice(i - 2, i + 3);
|
|
17382
|
+
if (op2.asConst) {
|
|
17383
|
+
a = module2.makeAsConst(a);
|
|
17384
|
+
b = module2.makeAsConst(b);
|
|
17385
|
+
}
|
|
17189
17386
|
let children;
|
|
17190
17387
|
if (op2.call) {
|
|
17191
17388
|
wsOp = module2.insertTrimmingSpace(wsOp, "");
|
|
@@ -17195,11 +17392,21 @@ ${input.slice(result.pos)}
|
|
|
17195
17392
|
} else {
|
|
17196
17393
|
children = [wsOp, op2.call, "(", a, ",", wsB, b, ")", op2.suffix];
|
|
17197
17394
|
}
|
|
17198
|
-
} else if (op2.
|
|
17199
|
-
|
|
17395
|
+
} else if (op2.method) {
|
|
17396
|
+
wsOp = module2.insertTrimmingSpace(wsOp, "");
|
|
17397
|
+
wsB = module2.insertTrimmingSpace(wsB, "");
|
|
17398
|
+
if (op2.reversed) {
|
|
17399
|
+
children = [wsB, b, wsOp, ".", op2.method, "(", a, ")"];
|
|
17400
|
+
} else {
|
|
17401
|
+
children = [a, wsOp, ".", op2.method, "(", wsB, b, ")"];
|
|
17402
|
+
}
|
|
17403
|
+
} else if (op2.token) {
|
|
17404
|
+
children = ["(", a, wsOp, op2, wsB, b, ")"];
|
|
17200
17405
|
} else {
|
|
17201
17406
|
throw new Error("Unknown operator: " + JSON.stringify(op2));
|
|
17202
17407
|
}
|
|
17408
|
+
if (op2.negated)
|
|
17409
|
+
children.unshift("!");
|
|
17203
17410
|
expandedOps.splice(i - 2, 5, {
|
|
17204
17411
|
children
|
|
17205
17412
|
});
|