@danielx/civet 0.5.72 → 0.5.73
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 +375 -51
- package/dist/main.js +375 -51
- package/dist/main.mjs +375 -51
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -494,6 +494,11 @@ ${input.slice(result.pos)}
|
|
|
494
494
|
NestedClassElement,
|
|
495
495
|
ClassElement,
|
|
496
496
|
ClassElementDefinition,
|
|
497
|
+
ClassSignature,
|
|
498
|
+
ClassSignatureBody,
|
|
499
|
+
NestedClassSignatureElements,
|
|
500
|
+
NestedClassSignatureElement,
|
|
501
|
+
ClassSignatureElement,
|
|
497
502
|
AccessModifier,
|
|
498
503
|
FieldDefinition,
|
|
499
504
|
ThisLiteral,
|
|
@@ -842,6 +847,7 @@ ${input.slice(result.pos)}
|
|
|
842
847
|
Import,
|
|
843
848
|
In,
|
|
844
849
|
LetOrConst,
|
|
850
|
+
LetOrConstOrVar,
|
|
845
851
|
Loop,
|
|
846
852
|
New,
|
|
847
853
|
Not,
|
|
@@ -935,6 +941,8 @@ ${input.slice(result.pos)}
|
|
|
935
941
|
InterfaceExtendsTarget,
|
|
936
942
|
TypeKeyword,
|
|
937
943
|
Interface,
|
|
944
|
+
Global,
|
|
945
|
+
Module,
|
|
938
946
|
Namespace,
|
|
939
947
|
InterfaceBlock,
|
|
940
948
|
NestedInterfaceProperties,
|
|
@@ -942,9 +950,13 @@ ${input.slice(result.pos)}
|
|
|
942
950
|
InterfaceProperty,
|
|
943
951
|
BasicInterfaceProperty,
|
|
944
952
|
InterfacePropertyDelimiter,
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
953
|
+
ModuleBlock,
|
|
954
|
+
NestedModuleItems,
|
|
955
|
+
NestedModuleItem,
|
|
956
|
+
DeclareBlock,
|
|
957
|
+
NestedDeclareElements,
|
|
958
|
+
NestedDeclareElement,
|
|
959
|
+
DeclareElement,
|
|
948
960
|
TypeIndexSignature,
|
|
949
961
|
TypeIndex,
|
|
950
962
|
TypeSuffix,
|
|
@@ -1203,12 +1215,14 @@ ${input.slice(result.pos)}
|
|
|
1203
1215
|
var $L170 = $L("-->");
|
|
1204
1216
|
var $L171 = $L("type");
|
|
1205
1217
|
var $L172 = $L("interface");
|
|
1206
|
-
var $L173 = $L("
|
|
1207
|
-
var $L174 = $L("
|
|
1208
|
-
var $L175 = $L("
|
|
1209
|
-
var $L176 = $L("
|
|
1210
|
-
var $L177 = $L("
|
|
1211
|
-
var $L178 = $L("
|
|
1218
|
+
var $L173 = $L("global");
|
|
1219
|
+
var $L174 = $L("module");
|
|
1220
|
+
var $L175 = $L("namespace");
|
|
1221
|
+
var $L176 = $L("asserts");
|
|
1222
|
+
var $L177 = $L("keyof");
|
|
1223
|
+
var $L178 = $L("infer");
|
|
1224
|
+
var $L179 = $L("[]");
|
|
1225
|
+
var $L180 = $L("civet");
|
|
1212
1226
|
var $R0 = $R(new RegExp("(as|for|while|until|of|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
1213
1227
|
var $R1 = $R(new RegExp("[0-9]", "suy"));
|
|
1214
1228
|
var $R2 = $R(new RegExp("[)}]", "suy"));
|
|
@@ -2738,9 +2752,7 @@ ${input.slice(result.pos)}
|
|
|
2738
2752
|
return result;
|
|
2739
2753
|
}
|
|
2740
2754
|
}
|
|
2741
|
-
var ClassExpression$0 = $
|
|
2742
|
-
return $0;
|
|
2743
|
-
});
|
|
2755
|
+
var ClassExpression$0 = $S($E(Decorators), $E($S(Abstract, __)), Class, $E(ClassBinding), $E(ClassHeritage), ClassBody);
|
|
2744
2756
|
function ClassExpression(state) {
|
|
2745
2757
|
let eventData;
|
|
2746
2758
|
if (state.events) {
|
|
@@ -3136,6 +3148,128 @@ ${input.slice(result.pos)}
|
|
|
3136
3148
|
return result;
|
|
3137
3149
|
}
|
|
3138
3150
|
}
|
|
3151
|
+
var ClassSignature$0 = $S($E(Decorators), $E($S(Abstract, __)), Class, $E(ClassBinding), $E(ClassHeritage), ClassSignatureBody);
|
|
3152
|
+
function ClassSignature(state) {
|
|
3153
|
+
let eventData;
|
|
3154
|
+
if (state.events) {
|
|
3155
|
+
const result = state.events.enter?.("ClassSignature", state);
|
|
3156
|
+
if (result) {
|
|
3157
|
+
if (result.cache)
|
|
3158
|
+
return result.cache;
|
|
3159
|
+
eventData = result.data;
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
if (state.tokenize) {
|
|
3163
|
+
const result = $TOKEN("ClassSignature", state, ClassSignature$0(state));
|
|
3164
|
+
if (state.events)
|
|
3165
|
+
state.events.exit?.("ClassSignature", state, result, eventData);
|
|
3166
|
+
return result;
|
|
3167
|
+
} else {
|
|
3168
|
+
const result = ClassSignature$0(state);
|
|
3169
|
+
if (state.events)
|
|
3170
|
+
state.events.exit?.("ClassSignature", state, result, eventData);
|
|
3171
|
+
return result;
|
|
3172
|
+
}
|
|
3173
|
+
}
|
|
3174
|
+
var ClassSignatureBody$0 = $S(__, OpenBrace, $E(NestedClassSignatureElements), __, CloseBrace);
|
|
3175
|
+
var ClassSignatureBody$1 = $S(InsertOpenBrace, $E(NestedClassSignatureElements), InsertNewline, InsertIndent, InsertCloseBrace);
|
|
3176
|
+
function ClassSignatureBody(state) {
|
|
3177
|
+
let eventData;
|
|
3178
|
+
if (state.events) {
|
|
3179
|
+
const result = state.events.enter?.("ClassSignatureBody", state);
|
|
3180
|
+
if (result) {
|
|
3181
|
+
if (result.cache)
|
|
3182
|
+
return result.cache;
|
|
3183
|
+
eventData = result.data;
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
if (state.tokenize) {
|
|
3187
|
+
const result = $TOKEN("ClassSignatureBody", state, ClassSignatureBody$0(state) || ClassSignatureBody$1(state));
|
|
3188
|
+
if (state.events)
|
|
3189
|
+
state.events.exit?.("ClassSignatureBody", state, result, eventData);
|
|
3190
|
+
return result;
|
|
3191
|
+
} else {
|
|
3192
|
+
const result = ClassSignatureBody$0(state) || ClassSignatureBody$1(state);
|
|
3193
|
+
if (state.events)
|
|
3194
|
+
state.events.exit?.("ClassSignatureBody", state, result, eventData);
|
|
3195
|
+
return result;
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
var NestedClassSignatureElements$0 = $TS($S(PushIndent, $Q(NestedClassSignatureElement), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
3199
|
+
var elements = $2;
|
|
3200
|
+
if (!elements.length)
|
|
3201
|
+
return $skip;
|
|
3202
|
+
return elements;
|
|
3203
|
+
});
|
|
3204
|
+
function NestedClassSignatureElements(state) {
|
|
3205
|
+
let eventData;
|
|
3206
|
+
if (state.events) {
|
|
3207
|
+
const result = state.events.enter?.("NestedClassSignatureElements", state);
|
|
3208
|
+
if (result) {
|
|
3209
|
+
if (result.cache)
|
|
3210
|
+
return result.cache;
|
|
3211
|
+
eventData = result.data;
|
|
3212
|
+
}
|
|
3213
|
+
}
|
|
3214
|
+
if (state.tokenize) {
|
|
3215
|
+
const result = $TOKEN("NestedClassSignatureElements", state, NestedClassSignatureElements$0(state));
|
|
3216
|
+
if (state.events)
|
|
3217
|
+
state.events.exit?.("NestedClassSignatureElements", state, result, eventData);
|
|
3218
|
+
return result;
|
|
3219
|
+
} else {
|
|
3220
|
+
const result = NestedClassSignatureElements$0(state);
|
|
3221
|
+
if (state.events)
|
|
3222
|
+
state.events.exit?.("NestedClassSignatureElements", state, result, eventData);
|
|
3223
|
+
return result;
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
var NestedClassSignatureElement$0 = $S(Nested, ClassSignatureElement, StatementDelimiter);
|
|
3227
|
+
function NestedClassSignatureElement(state) {
|
|
3228
|
+
let eventData;
|
|
3229
|
+
if (state.events) {
|
|
3230
|
+
const result = state.events.enter?.("NestedClassSignatureElement", state);
|
|
3231
|
+
if (result) {
|
|
3232
|
+
if (result.cache)
|
|
3233
|
+
return result.cache;
|
|
3234
|
+
eventData = result.data;
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
if (state.tokenize) {
|
|
3238
|
+
const result = $TOKEN("NestedClassSignatureElement", state, NestedClassSignatureElement$0(state));
|
|
3239
|
+
if (state.events)
|
|
3240
|
+
state.events.exit?.("NestedClassSignatureElement", state, result, eventData);
|
|
3241
|
+
return result;
|
|
3242
|
+
} else {
|
|
3243
|
+
const result = NestedClassSignatureElement$0(state);
|
|
3244
|
+
if (state.events)
|
|
3245
|
+
state.events.exit?.("NestedClassSignatureElement", state, result, eventData);
|
|
3246
|
+
return result;
|
|
3247
|
+
}
|
|
3248
|
+
}
|
|
3249
|
+
var ClassSignatureElement$0 = $S($E(Decorators), $E(AccessModifier), $E($S(Static, $Q(TrailingComment))), $C(MethodSignature, FieldDefinition));
|
|
3250
|
+
var ClassSignatureElement$1 = $S(Static, ClassSignatureBody);
|
|
3251
|
+
function ClassSignatureElement(state) {
|
|
3252
|
+
let eventData;
|
|
3253
|
+
if (state.events) {
|
|
3254
|
+
const result = state.events.enter?.("ClassSignatureElement", state);
|
|
3255
|
+
if (result) {
|
|
3256
|
+
if (result.cache)
|
|
3257
|
+
return result.cache;
|
|
3258
|
+
eventData = result.data;
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
if (state.tokenize) {
|
|
3262
|
+
const result = $TOKEN("ClassSignatureElement", state, ClassSignatureElement$0(state) || ClassSignatureElement$1(state));
|
|
3263
|
+
if (state.events)
|
|
3264
|
+
state.events.exit?.("ClassSignatureElement", state, result, eventData);
|
|
3265
|
+
return result;
|
|
3266
|
+
} else {
|
|
3267
|
+
const result = ClassSignatureElement$0(state) || ClassSignatureElement$1(state);
|
|
3268
|
+
if (state.events)
|
|
3269
|
+
state.events.exit?.("ClassSignatureElement", state, result, eventData);
|
|
3270
|
+
return result;
|
|
3271
|
+
}
|
|
3272
|
+
}
|
|
3139
3273
|
var AccessModifier$0 = $TS($S($E($S($C(Public, Private, Protected), __)), $E($S(Readonly, __))), function($skip, $loc, $0, $1, $2) {
|
|
3140
3274
|
if (!($1 || $2))
|
|
3141
3275
|
return $skip;
|
|
@@ -11114,7 +11248,7 @@ ${input.slice(result.pos)}
|
|
|
11114
11248
|
return $0;
|
|
11115
11249
|
return { ts: true, children: $0 };
|
|
11116
11250
|
});
|
|
11117
|
-
var ExportDeclaration$2 = $TS($S(Export, __, $C(Declaration,
|
|
11251
|
+
var ExportDeclaration$2 = $TS($S(Export, __, $C(Declaration, VariableStatement, TypeAndNamedExports, ExportVarDec)), function($skip, $loc, $0, $1, $2, $3) {
|
|
11118
11252
|
if (!$3.ts)
|
|
11119
11253
|
return $0;
|
|
11120
11254
|
return { ts: true, children: $0 };
|
|
@@ -14212,6 +14346,30 @@ ${input.slice(result.pos)}
|
|
|
14212
14346
|
return result;
|
|
14213
14347
|
}
|
|
14214
14348
|
}
|
|
14349
|
+
var LetOrConstOrVar$0 = LetOrConst;
|
|
14350
|
+
var LetOrConstOrVar$1 = Var;
|
|
14351
|
+
function LetOrConstOrVar(state) {
|
|
14352
|
+
let eventData;
|
|
14353
|
+
if (state.events) {
|
|
14354
|
+
const result = state.events.enter?.("LetOrConstOrVar", state);
|
|
14355
|
+
if (result) {
|
|
14356
|
+
if (result.cache)
|
|
14357
|
+
return result.cache;
|
|
14358
|
+
eventData = result.data;
|
|
14359
|
+
}
|
|
14360
|
+
}
|
|
14361
|
+
if (state.tokenize) {
|
|
14362
|
+
const result = $TOKEN("LetOrConstOrVar", state, LetOrConstOrVar$0(state) || LetOrConstOrVar$1(state));
|
|
14363
|
+
if (state.events)
|
|
14364
|
+
state.events.exit?.("LetOrConstOrVar", state, result, eventData);
|
|
14365
|
+
return result;
|
|
14366
|
+
} else {
|
|
14367
|
+
const result = LetOrConstOrVar$0(state) || LetOrConstOrVar$1(state);
|
|
14368
|
+
if (state.events)
|
|
14369
|
+
state.events.exit?.("LetOrConstOrVar", state, result, eventData);
|
|
14370
|
+
return result;
|
|
14371
|
+
}
|
|
14372
|
+
}
|
|
14215
14373
|
var Loop$0 = $TS($S($EXPECT($L130, fail, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
14216
14374
|
return { $loc, token: "while(true)" };
|
|
14217
14375
|
});
|
|
@@ -16670,7 +16828,7 @@ ${input.slice(result.pos)}
|
|
|
16670
16828
|
}
|
|
16671
16829
|
var TypeDeclarationRest$0 = $S(TypeKeyword, $Q(TrailingComment), IdentifierName, $E(TypeParameters), __, Equals, $C($S($E(_), Type), $S(__, Type)));
|
|
16672
16830
|
var TypeDeclarationRest$1 = $S(Interface, $Q(TrailingComment), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock);
|
|
16673
|
-
var TypeDeclarationRest$2 = $S(Namespace, $Q(TrailingComment), IdentifierName,
|
|
16831
|
+
var TypeDeclarationRest$2 = $S(Namespace, $Q(TrailingComment), IdentifierName, ModuleBlock);
|
|
16674
16832
|
var TypeDeclarationRest$3 = FunctionSignature;
|
|
16675
16833
|
function TypeDeclarationRest(state) {
|
|
16676
16834
|
let eventData;
|
|
@@ -16694,7 +16852,11 @@ ${input.slice(result.pos)}
|
|
|
16694
16852
|
return result;
|
|
16695
16853
|
}
|
|
16696
16854
|
}
|
|
16697
|
-
var TypeLexicalDeclaration$0 = $S(__,
|
|
16855
|
+
var TypeLexicalDeclaration$0 = $S(__, LetOrConstOrVar, TypeDeclarationBinding, $Q($S(CommaDelimiter, __, TypeDeclarationBinding)));
|
|
16856
|
+
var TypeLexicalDeclaration$1 = ClassSignature;
|
|
16857
|
+
var TypeLexicalDeclaration$2 = $S(Namespace, $Q(TrailingComment), IdentifierName, DeclareBlock);
|
|
16858
|
+
var TypeLexicalDeclaration$3 = $S(Module, _, StringLiteral, $E(DeclareBlock));
|
|
16859
|
+
var TypeLexicalDeclaration$4 = $S(Global, $E(DeclareBlock));
|
|
16698
16860
|
function TypeLexicalDeclaration(state) {
|
|
16699
16861
|
let eventData;
|
|
16700
16862
|
if (state.events) {
|
|
@@ -16706,12 +16868,12 @@ ${input.slice(result.pos)}
|
|
|
16706
16868
|
}
|
|
16707
16869
|
}
|
|
16708
16870
|
if (state.tokenize) {
|
|
16709
|
-
const result = $TOKEN("TypeLexicalDeclaration", state, TypeLexicalDeclaration$0(state));
|
|
16871
|
+
const result = $TOKEN("TypeLexicalDeclaration", state, TypeLexicalDeclaration$0(state) || TypeLexicalDeclaration$1(state) || TypeLexicalDeclaration$2(state) || TypeLexicalDeclaration$3(state) || TypeLexicalDeclaration$4(state));
|
|
16710
16872
|
if (state.events)
|
|
16711
16873
|
state.events.exit?.("TypeLexicalDeclaration", state, result, eventData);
|
|
16712
16874
|
return result;
|
|
16713
16875
|
} else {
|
|
16714
|
-
const result = TypeLexicalDeclaration$0(state);
|
|
16876
|
+
const result = TypeLexicalDeclaration$0(state) || TypeLexicalDeclaration$1(state) || TypeLexicalDeclaration$2(state) || TypeLexicalDeclaration$3(state) || TypeLexicalDeclaration$4(state);
|
|
16715
16877
|
if (state.events)
|
|
16716
16878
|
state.events.exit?.("TypeLexicalDeclaration", state, result, eventData);
|
|
16717
16879
|
return result;
|
|
@@ -16786,7 +16948,9 @@ ${input.slice(result.pos)}
|
|
|
16786
16948
|
return result;
|
|
16787
16949
|
}
|
|
16788
16950
|
}
|
|
16789
|
-
var TypeKeyword$0 = $S($EXPECT($L171, fail, 'TypeKeyword "type"'), NonIdContinue)
|
|
16951
|
+
var TypeKeyword$0 = $TS($S($EXPECT($L171, fail, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16952
|
+
return { $loc, token: $1 };
|
|
16953
|
+
});
|
|
16790
16954
|
function TypeKeyword(state) {
|
|
16791
16955
|
let eventData;
|
|
16792
16956
|
if (state.events) {
|
|
@@ -16809,7 +16973,9 @@ ${input.slice(result.pos)}
|
|
|
16809
16973
|
return result;
|
|
16810
16974
|
}
|
|
16811
16975
|
}
|
|
16812
|
-
var Interface$0 = $S($EXPECT($L172, fail, 'Interface "interface"'), NonIdContinue)
|
|
16976
|
+
var Interface$0 = $TS($S($EXPECT($L172, fail, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16977
|
+
return { $loc, token: $1 };
|
|
16978
|
+
});
|
|
16813
16979
|
function Interface(state) {
|
|
16814
16980
|
let eventData;
|
|
16815
16981
|
if (state.events) {
|
|
@@ -16832,7 +16998,59 @@ ${input.slice(result.pos)}
|
|
|
16832
16998
|
return result;
|
|
16833
16999
|
}
|
|
16834
17000
|
}
|
|
16835
|
-
var
|
|
17001
|
+
var Global$0 = $TS($S($EXPECT($L173, fail, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17002
|
+
return { $loc, token: $1 };
|
|
17003
|
+
});
|
|
17004
|
+
function Global(state) {
|
|
17005
|
+
let eventData;
|
|
17006
|
+
if (state.events) {
|
|
17007
|
+
const result = state.events.enter?.("Global", state);
|
|
17008
|
+
if (result) {
|
|
17009
|
+
if (result.cache)
|
|
17010
|
+
return result.cache;
|
|
17011
|
+
eventData = result.data;
|
|
17012
|
+
}
|
|
17013
|
+
}
|
|
17014
|
+
if (state.tokenize) {
|
|
17015
|
+
const result = $TOKEN("Global", state, Global$0(state));
|
|
17016
|
+
if (state.events)
|
|
17017
|
+
state.events.exit?.("Global", state, result, eventData);
|
|
17018
|
+
return result;
|
|
17019
|
+
} else {
|
|
17020
|
+
const result = Global$0(state);
|
|
17021
|
+
if (state.events)
|
|
17022
|
+
state.events.exit?.("Global", state, result, eventData);
|
|
17023
|
+
return result;
|
|
17024
|
+
}
|
|
17025
|
+
}
|
|
17026
|
+
var Module$0 = $TS($S($EXPECT($L174, fail, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17027
|
+
return { $loc, token: $1 };
|
|
17028
|
+
});
|
|
17029
|
+
function Module(state) {
|
|
17030
|
+
let eventData;
|
|
17031
|
+
if (state.events) {
|
|
17032
|
+
const result = state.events.enter?.("Module", state);
|
|
17033
|
+
if (result) {
|
|
17034
|
+
if (result.cache)
|
|
17035
|
+
return result.cache;
|
|
17036
|
+
eventData = result.data;
|
|
17037
|
+
}
|
|
17038
|
+
}
|
|
17039
|
+
if (state.tokenize) {
|
|
17040
|
+
const result = $TOKEN("Module", state, Module$0(state));
|
|
17041
|
+
if (state.events)
|
|
17042
|
+
state.events.exit?.("Module", state, result, eventData);
|
|
17043
|
+
return result;
|
|
17044
|
+
} else {
|
|
17045
|
+
const result = Module$0(state);
|
|
17046
|
+
if (state.events)
|
|
17047
|
+
state.events.exit?.("Module", state, result, eventData);
|
|
17048
|
+
return result;
|
|
17049
|
+
}
|
|
17050
|
+
}
|
|
17051
|
+
var Namespace$0 = $TS($S($EXPECT($L175, fail, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17052
|
+
return { $loc, token: $1 };
|
|
17053
|
+
});
|
|
16836
17054
|
function Namespace(state) {
|
|
16837
17055
|
let eventData;
|
|
16838
17056
|
if (state.events) {
|
|
@@ -17004,13 +17222,88 @@ ${input.slice(result.pos)}
|
|
|
17004
17222
|
return result;
|
|
17005
17223
|
}
|
|
17006
17224
|
}
|
|
17007
|
-
var
|
|
17008
|
-
var
|
|
17009
|
-
|
|
17010
|
-
|
|
17225
|
+
var ModuleBlock$0 = $S(__, OpenBrace, NestedModuleItems, __, CloseBrace);
|
|
17226
|
+
var ModuleBlock$1 = $S(InsertOpenBrace, NestedModuleItems, InsertNewline, InsertIndent, InsertCloseBrace);
|
|
17227
|
+
function ModuleBlock(state) {
|
|
17228
|
+
let eventData;
|
|
17229
|
+
if (state.events) {
|
|
17230
|
+
const result = state.events.enter?.("ModuleBlock", state);
|
|
17231
|
+
if (result) {
|
|
17232
|
+
if (result.cache)
|
|
17233
|
+
return result.cache;
|
|
17234
|
+
eventData = result.data;
|
|
17235
|
+
}
|
|
17236
|
+
}
|
|
17237
|
+
if (state.tokenize) {
|
|
17238
|
+
const result = $TOKEN("ModuleBlock", state, ModuleBlock$0(state) || ModuleBlock$1(state));
|
|
17239
|
+
if (state.events)
|
|
17240
|
+
state.events.exit?.("ModuleBlock", state, result, eventData);
|
|
17241
|
+
return result;
|
|
17242
|
+
} else {
|
|
17243
|
+
const result = ModuleBlock$0(state) || ModuleBlock$1(state);
|
|
17244
|
+
if (state.events)
|
|
17245
|
+
state.events.exit?.("ModuleBlock", state, result, eventData);
|
|
17246
|
+
return result;
|
|
17247
|
+
}
|
|
17248
|
+
}
|
|
17249
|
+
var NestedModuleItems$0 = $TS($S(PushIndent, $Q(NestedModuleItem), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
17250
|
+
var items = $2;
|
|
17251
|
+
if (items.length)
|
|
17252
|
+
return items;
|
|
17253
|
+
return $skip;
|
|
17254
|
+
});
|
|
17255
|
+
function NestedModuleItems(state) {
|
|
17256
|
+
let eventData;
|
|
17257
|
+
if (state.events) {
|
|
17258
|
+
const result = state.events.enter?.("NestedModuleItems", state);
|
|
17259
|
+
if (result) {
|
|
17260
|
+
if (result.cache)
|
|
17261
|
+
return result.cache;
|
|
17262
|
+
eventData = result.data;
|
|
17263
|
+
}
|
|
17264
|
+
}
|
|
17265
|
+
if (state.tokenize) {
|
|
17266
|
+
const result = $TOKEN("NestedModuleItems", state, NestedModuleItems$0(state));
|
|
17267
|
+
if (state.events)
|
|
17268
|
+
state.events.exit?.("NestedModuleItems", state, result, eventData);
|
|
17269
|
+
return result;
|
|
17270
|
+
} else {
|
|
17271
|
+
const result = NestedModuleItems$0(state);
|
|
17272
|
+
if (state.events)
|
|
17273
|
+
state.events.exit?.("NestedModuleItems", state, result, eventData);
|
|
17274
|
+
return result;
|
|
17275
|
+
}
|
|
17276
|
+
}
|
|
17277
|
+
var NestedModuleItem$0 = $S(Nested, ModuleItem, StatementDelimiter);
|
|
17278
|
+
function NestedModuleItem(state) {
|
|
17279
|
+
let eventData;
|
|
17280
|
+
if (state.events) {
|
|
17281
|
+
const result = state.events.enter?.("NestedModuleItem", state);
|
|
17282
|
+
if (result) {
|
|
17283
|
+
if (result.cache)
|
|
17284
|
+
return result.cache;
|
|
17285
|
+
eventData = result.data;
|
|
17286
|
+
}
|
|
17287
|
+
}
|
|
17288
|
+
if (state.tokenize) {
|
|
17289
|
+
const result = $TOKEN("NestedModuleItem", state, NestedModuleItem$0(state));
|
|
17290
|
+
if (state.events)
|
|
17291
|
+
state.events.exit?.("NestedModuleItem", state, result, eventData);
|
|
17292
|
+
return result;
|
|
17293
|
+
} else {
|
|
17294
|
+
const result = NestedModuleItem$0(state);
|
|
17295
|
+
if (state.events)
|
|
17296
|
+
state.events.exit?.("NestedModuleItem", state, result, eventData);
|
|
17297
|
+
return result;
|
|
17298
|
+
}
|
|
17299
|
+
}
|
|
17300
|
+
var DeclareBlock$0 = $S(__, OpenBrace, NestedDeclareElements, __, CloseBrace);
|
|
17301
|
+
var DeclareBlock$1 = $S(__, OpenBrace, $Q($S(__, DeclareElement, InterfacePropertyDelimiter)), __, CloseBrace);
|
|
17302
|
+
var DeclareBlock$2 = $S(InsertOpenBrace, NestedDeclareElements, InsertNewline, InsertIndent, InsertCloseBrace);
|
|
17303
|
+
function DeclareBlock(state) {
|
|
17011
17304
|
let eventData;
|
|
17012
17305
|
if (state.events) {
|
|
17013
|
-
const result = state.events.enter?.("
|
|
17306
|
+
const result = state.events.enter?.("DeclareBlock", state);
|
|
17014
17307
|
if (result) {
|
|
17015
17308
|
if (result.cache)
|
|
17016
17309
|
return result.cache;
|
|
@@ -17018,27 +17311,27 @@ ${input.slice(result.pos)}
|
|
|
17018
17311
|
}
|
|
17019
17312
|
}
|
|
17020
17313
|
if (state.tokenize) {
|
|
17021
|
-
const result = $TOKEN("
|
|
17314
|
+
const result = $TOKEN("DeclareBlock", state, DeclareBlock$0(state) || DeclareBlock$1(state) || DeclareBlock$2(state));
|
|
17022
17315
|
if (state.events)
|
|
17023
|
-
state.events.exit?.("
|
|
17316
|
+
state.events.exit?.("DeclareBlock", state, result, eventData);
|
|
17024
17317
|
return result;
|
|
17025
17318
|
} else {
|
|
17026
|
-
const result =
|
|
17319
|
+
const result = DeclareBlock$0(state) || DeclareBlock$1(state) || DeclareBlock$2(state);
|
|
17027
17320
|
if (state.events)
|
|
17028
|
-
state.events.exit?.("
|
|
17321
|
+
state.events.exit?.("DeclareBlock", state, result, eventData);
|
|
17029
17322
|
return result;
|
|
17030
17323
|
}
|
|
17031
17324
|
}
|
|
17032
|
-
var
|
|
17325
|
+
var NestedDeclareElements$0 = $TS($S(PushIndent, $Q(NestedDeclareElement), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
17033
17326
|
var decs = $2;
|
|
17034
17327
|
if (decs.length)
|
|
17035
17328
|
return decs;
|
|
17036
17329
|
return $skip;
|
|
17037
17330
|
});
|
|
17038
|
-
function
|
|
17331
|
+
function NestedDeclareElements(state) {
|
|
17039
17332
|
let eventData;
|
|
17040
17333
|
if (state.events) {
|
|
17041
|
-
const result = state.events.enter?.("
|
|
17334
|
+
const result = state.events.enter?.("NestedDeclareElements", state);
|
|
17042
17335
|
if (result) {
|
|
17043
17336
|
if (result.cache)
|
|
17044
17337
|
return result.cache;
|
|
@@ -17046,22 +17339,22 @@ ${input.slice(result.pos)}
|
|
|
17046
17339
|
}
|
|
17047
17340
|
}
|
|
17048
17341
|
if (state.tokenize) {
|
|
17049
|
-
const result = $TOKEN("
|
|
17342
|
+
const result = $TOKEN("NestedDeclareElements", state, NestedDeclareElements$0(state));
|
|
17050
17343
|
if (state.events)
|
|
17051
|
-
state.events.exit?.("
|
|
17344
|
+
state.events.exit?.("NestedDeclareElements", state, result, eventData);
|
|
17052
17345
|
return result;
|
|
17053
17346
|
} else {
|
|
17054
|
-
const result =
|
|
17347
|
+
const result = NestedDeclareElements$0(state);
|
|
17055
17348
|
if (state.events)
|
|
17056
|
-
state.events.exit?.("
|
|
17349
|
+
state.events.exit?.("NestedDeclareElements", state, result, eventData);
|
|
17057
17350
|
return result;
|
|
17058
17351
|
}
|
|
17059
17352
|
}
|
|
17060
|
-
var
|
|
17061
|
-
function
|
|
17353
|
+
var NestedDeclareElement$0 = $S(Nested, DeclareElement, InterfacePropertyDelimiter);
|
|
17354
|
+
function NestedDeclareElement(state) {
|
|
17062
17355
|
let eventData;
|
|
17063
17356
|
if (state.events) {
|
|
17064
|
-
const result = state.events.enter?.("
|
|
17357
|
+
const result = state.events.enter?.("NestedDeclareElement", state);
|
|
17065
17358
|
if (result) {
|
|
17066
17359
|
if (result.cache)
|
|
17067
17360
|
return result.cache;
|
|
@@ -17069,14 +17362,42 @@ ${input.slice(result.pos)}
|
|
|
17069
17362
|
}
|
|
17070
17363
|
}
|
|
17071
17364
|
if (state.tokenize) {
|
|
17072
|
-
const result = $TOKEN("
|
|
17365
|
+
const result = $TOKEN("NestedDeclareElement", state, NestedDeclareElement$0(state));
|
|
17073
17366
|
if (state.events)
|
|
17074
|
-
state.events.exit?.("
|
|
17367
|
+
state.events.exit?.("NestedDeclareElement", state, result, eventData);
|
|
17075
17368
|
return result;
|
|
17076
17369
|
} else {
|
|
17077
|
-
const result =
|
|
17370
|
+
const result = NestedDeclareElement$0(state);
|
|
17078
17371
|
if (state.events)
|
|
17079
|
-
state.events.exit?.("
|
|
17372
|
+
state.events.exit?.("NestedDeclareElement", state, result, eventData);
|
|
17373
|
+
return result;
|
|
17374
|
+
}
|
|
17375
|
+
}
|
|
17376
|
+
var DeclareElement$0 = $T($S($E($S(Export, $E(_))), TypeLexicalDeclaration), function(value) {
|
|
17377
|
+
return { "ts": true, "children": value };
|
|
17378
|
+
});
|
|
17379
|
+
var DeclareElement$1 = $T($S($E($S(Export, $E(_))), TypeDeclarationRest), function(value) {
|
|
17380
|
+
return { "ts": true, "children": value };
|
|
17381
|
+
});
|
|
17382
|
+
function DeclareElement(state) {
|
|
17383
|
+
let eventData;
|
|
17384
|
+
if (state.events) {
|
|
17385
|
+
const result = state.events.enter?.("DeclareElement", state);
|
|
17386
|
+
if (result) {
|
|
17387
|
+
if (result.cache)
|
|
17388
|
+
return result.cache;
|
|
17389
|
+
eventData = result.data;
|
|
17390
|
+
}
|
|
17391
|
+
}
|
|
17392
|
+
if (state.tokenize) {
|
|
17393
|
+
const result = $TOKEN("DeclareElement", state, DeclareElement$0(state) || DeclareElement$1(state));
|
|
17394
|
+
if (state.events)
|
|
17395
|
+
state.events.exit?.("DeclareElement", state, result, eventData);
|
|
17396
|
+
return result;
|
|
17397
|
+
} else {
|
|
17398
|
+
const result = DeclareElement$0(state) || DeclareElement$1(state);
|
|
17399
|
+
if (state.events)
|
|
17400
|
+
state.events.exit?.("DeclareElement", state, result, eventData);
|
|
17080
17401
|
return result;
|
|
17081
17402
|
}
|
|
17082
17403
|
}
|
|
@@ -17130,6 +17451,9 @@ ${input.slice(result.pos)}
|
|
|
17130
17451
|
var TypeSuffix$0 = $T($S($E(QuestionMark), $E(_), Colon, Type), function(value) {
|
|
17131
17452
|
return { "type": "TypeSuffix", "ts": true, "children": value };
|
|
17132
17453
|
});
|
|
17454
|
+
var TypeSuffix$1 = $T($S(QuestionMark, $E(_)), function(value) {
|
|
17455
|
+
return { "type": "TypeSuffix", "ts": true, "children": value };
|
|
17456
|
+
});
|
|
17133
17457
|
function TypeSuffix(state) {
|
|
17134
17458
|
let eventData;
|
|
17135
17459
|
if (state.events) {
|
|
@@ -17141,18 +17465,18 @@ ${input.slice(result.pos)}
|
|
|
17141
17465
|
}
|
|
17142
17466
|
}
|
|
17143
17467
|
if (state.tokenize) {
|
|
17144
|
-
const result = $TOKEN("TypeSuffix", state, TypeSuffix$0(state));
|
|
17468
|
+
const result = $TOKEN("TypeSuffix", state, TypeSuffix$0(state) || TypeSuffix$1(state));
|
|
17145
17469
|
if (state.events)
|
|
17146
17470
|
state.events.exit?.("TypeSuffix", state, result, eventData);
|
|
17147
17471
|
return result;
|
|
17148
17472
|
} else {
|
|
17149
|
-
const result = TypeSuffix$0(state);
|
|
17473
|
+
const result = TypeSuffix$0(state) || TypeSuffix$1(state);
|
|
17150
17474
|
if (state.events)
|
|
17151
17475
|
state.events.exit?.("TypeSuffix", state, result, eventData);
|
|
17152
17476
|
return result;
|
|
17153
17477
|
}
|
|
17154
17478
|
}
|
|
17155
|
-
var ReturnTypeSuffix$0 = $TS($S($E(_), Colon, $E($S(__, $EXPECT($
|
|
17479
|
+
var ReturnTypeSuffix$0 = $TS($S($E(_), Colon, $E($S(__, $EXPECT($L176, fail, 'ReturnTypeSuffix "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
17156
17480
|
var asserts = $3;
|
|
17157
17481
|
var t = $4;
|
|
17158
17482
|
if (asserts) {
|
|
@@ -17326,9 +17650,9 @@ ${input.slice(result.pos)}
|
|
|
17326
17650
|
return result;
|
|
17327
17651
|
}
|
|
17328
17652
|
}
|
|
17329
|
-
var TypeUnaryOp$0 = $S($EXPECT($
|
|
17653
|
+
var TypeUnaryOp$0 = $S($EXPECT($L177, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
17330
17654
|
var TypeUnaryOp$1 = $S($EXPECT($L157, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
|
|
17331
|
-
var TypeUnaryOp$2 = $S($EXPECT($
|
|
17655
|
+
var TypeUnaryOp$2 = $S($EXPECT($L178, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
|
|
17332
17656
|
var TypeUnaryOp$3 = $S($EXPECT($L141, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
17333
17657
|
function TypeUnaryOp(state) {
|
|
17334
17658
|
let eventData;
|
|
@@ -17574,7 +17898,7 @@ ${input.slice(result.pos)}
|
|
|
17574
17898
|
var TypeLiteral$2 = $TS($S($EXPECT($L161, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17575
17899
|
return { type: "VoidType", $loc, token: $1 };
|
|
17576
17900
|
});
|
|
17577
|
-
var TypeLiteral$3 = $TV($EXPECT($
|
|
17901
|
+
var TypeLiteral$3 = $TV($EXPECT($L179, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
17578
17902
|
return { $loc, token: "[]" };
|
|
17579
17903
|
});
|
|
17580
17904
|
function TypeLiteral(state) {
|
|
@@ -18034,7 +18358,7 @@ ${input.slice(result.pos)}
|
|
|
18034
18358
|
return result;
|
|
18035
18359
|
}
|
|
18036
18360
|
}
|
|
18037
|
-
var CivetPrologueContent$0 = $TS($S($EXPECT($
|
|
18361
|
+
var CivetPrologueContent$0 = $TS($S($EXPECT($L180, fail, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R61, fail, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
18038
18362
|
var options = $3;
|
|
18039
18363
|
return {
|
|
18040
18364
|
type: "CivetPrologue",
|
|
@@ -21733,7 +22057,7 @@ ${input.slice(result.pos)}
|
|
|
21733
22057
|
var uncacheable;
|
|
21734
22058
|
({ parse } = import_parser.default);
|
|
21735
22059
|
({ SourceMap: SourceMap2, base64Encode: base64Encode2 } = util_exports);
|
|
21736
|
-
uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "AllowAll", "AllowIndentedApplication", "AllowTrailingMemberProperty", "AllowedTrailingMemberExpressions", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "Declaration", "Debugger", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationForbidden", "ExtendedExpression", "FatArrowBody", "ForbidIndentedApplication", "ForbidTrailingMemberProperty", "FunctionDeclaration", "FunctionExpression", "HoistableDeclaration", "ImplicitArguments", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedApplicationAllowed", "IndentedFurther", "IndentedJSXChildExpression", "InlineObjectLiteral", "InsertIndent", "JSXChild", "JSXChildren", "JSXElement", "JSXFragment", "JSXImplicitFragment", "JSXMixedChildren", "JSXNested", "JSXNestedChildren", "JSXOptionalClosingElement", "JSXOptionalClosingFragment", "JSXTag", "LeftHandSideExpression", "MemberExpression", "MemberExpressionRest", "Nested", "NestedBindingElement", "NestedBindingElements", "NestedBlockExpression", "NestedBlockExpression", "NestedBlockStatement", "NestedBlockStatements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedObject", "NestedPropertyDefinitions", "NonSingleBracedBlock", "ObjectLiteral", "PopIndent", "PopJSXStack", "PostfixedExpression", "PostfixedStatement", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "RestoreAll", "RestoreIndentedApplication", "RestoreTrailingMemberProperty", "RHS", "Samedent", "ShortCircuitExpression", "SingleLineAssignmentExpression", "SingleLineComment", "SingleLineStatements", "SnugNamedProperty", "Statement", "StatementListItem", "SuffixedExpression", "SuffixedStatement", "ThinArrowFunction", "TrackIndented", "TrailingMemberExpressions", "TrailingMemberPropertyAllowed", "TypedJSXElement", "TypedJSXFragment", "UnaryExpression", "UpdateExpression"]);
|
|
22060
|
+
uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "AllowAll", "AllowIndentedApplication", "AllowTrailingMemberProperty", "AllowedTrailingMemberExpressions", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "Declaration", "Debugger", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationForbidden", "ExtendedExpression", "FatArrowBody", "ForbidIndentedApplication", "ForbidTrailingMemberProperty", "FunctionDeclaration", "FunctionExpression", "HoistableDeclaration", "ImplicitArguments", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedApplicationAllowed", "IndentedFurther", "IndentedJSXChildExpression", "InlineObjectLiteral", "InsertIndent", "JSXChild", "JSXChildren", "JSXElement", "JSXFragment", "JSXImplicitFragment", "JSXMixedChildren", "JSXNested", "JSXNestedChildren", "JSXOptionalClosingElement", "JSXOptionalClosingFragment", "JSXTag", "LeftHandSideExpression", "MemberExpression", "MemberExpressionRest", "Nested", "NestedBindingElement", "NestedBindingElements", "NestedBlockExpression", "NestedBlockExpression", "NestedBlockStatement", "NestedBlockStatements", "NestedClassSignatureElement", "NestedClassSignatureElements", "NestedDeclareElement", "NestedDeclareElements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedModuleItem", "NestedModuleItems", "NestedObject", "NestedPropertyDefinitions", "NonSingleBracedBlock", "ObjectLiteral", "PopIndent", "PopJSXStack", "PostfixedExpression", "PostfixedStatement", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "RestoreAll", "RestoreIndentedApplication", "RestoreTrailingMemberProperty", "RHS", "Samedent", "ShortCircuitExpression", "SingleLineAssignmentExpression", "SingleLineComment", "SingleLineStatements", "SnugNamedProperty", "Statement", "StatementListItem", "SuffixedExpression", "SuffixedStatement", "ThinArrowFunction", "TrackIndented", "TrailingMemberExpressions", "TrailingMemberPropertyAllowed", "TypedJSXElement", "TypedJSXFragment", "UnaryExpression", "UpdateExpression"]);
|
|
21737
22061
|
var compile = function(src, options) {
|
|
21738
22062
|
var ast, code, events, filename, ref, result, sm, srcMapJSON;
|
|
21739
22063
|
if (!options) {
|