@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/main.mjs
CHANGED
|
@@ -491,6 +491,11 @@ ${input.slice(result.pos)}
|
|
|
491
491
|
NestedClassElement,
|
|
492
492
|
ClassElement,
|
|
493
493
|
ClassElementDefinition,
|
|
494
|
+
ClassSignature,
|
|
495
|
+
ClassSignatureBody,
|
|
496
|
+
NestedClassSignatureElements,
|
|
497
|
+
NestedClassSignatureElement,
|
|
498
|
+
ClassSignatureElement,
|
|
494
499
|
AccessModifier,
|
|
495
500
|
FieldDefinition,
|
|
496
501
|
ThisLiteral,
|
|
@@ -839,6 +844,7 @@ ${input.slice(result.pos)}
|
|
|
839
844
|
Import,
|
|
840
845
|
In,
|
|
841
846
|
LetOrConst,
|
|
847
|
+
LetOrConstOrVar,
|
|
842
848
|
Loop,
|
|
843
849
|
New,
|
|
844
850
|
Not,
|
|
@@ -932,6 +938,8 @@ ${input.slice(result.pos)}
|
|
|
932
938
|
InterfaceExtendsTarget,
|
|
933
939
|
TypeKeyword,
|
|
934
940
|
Interface,
|
|
941
|
+
Global,
|
|
942
|
+
Module,
|
|
935
943
|
Namespace,
|
|
936
944
|
InterfaceBlock,
|
|
937
945
|
NestedInterfaceProperties,
|
|
@@ -939,9 +947,13 @@ ${input.slice(result.pos)}
|
|
|
939
947
|
InterfaceProperty,
|
|
940
948
|
BasicInterfaceProperty,
|
|
941
949
|
InterfacePropertyDelimiter,
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
950
|
+
ModuleBlock,
|
|
951
|
+
NestedModuleItems,
|
|
952
|
+
NestedModuleItem,
|
|
953
|
+
DeclareBlock,
|
|
954
|
+
NestedDeclareElements,
|
|
955
|
+
NestedDeclareElement,
|
|
956
|
+
DeclareElement,
|
|
945
957
|
TypeIndexSignature,
|
|
946
958
|
TypeIndex,
|
|
947
959
|
TypeSuffix,
|
|
@@ -1200,12 +1212,14 @@ ${input.slice(result.pos)}
|
|
|
1200
1212
|
var $L170 = $L("-->");
|
|
1201
1213
|
var $L171 = $L("type");
|
|
1202
1214
|
var $L172 = $L("interface");
|
|
1203
|
-
var $L173 = $L("
|
|
1204
|
-
var $L174 = $L("
|
|
1205
|
-
var $L175 = $L("
|
|
1206
|
-
var $L176 = $L("
|
|
1207
|
-
var $L177 = $L("
|
|
1208
|
-
var $L178 = $L("
|
|
1215
|
+
var $L173 = $L("global");
|
|
1216
|
+
var $L174 = $L("module");
|
|
1217
|
+
var $L175 = $L("namespace");
|
|
1218
|
+
var $L176 = $L("asserts");
|
|
1219
|
+
var $L177 = $L("keyof");
|
|
1220
|
+
var $L178 = $L("infer");
|
|
1221
|
+
var $L179 = $L("[]");
|
|
1222
|
+
var $L180 = $L("civet");
|
|
1209
1223
|
var $R0 = $R(new RegExp("(as|for|while|until|of|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
1210
1224
|
var $R1 = $R(new RegExp("[0-9]", "suy"));
|
|
1211
1225
|
var $R2 = $R(new RegExp("[)}]", "suy"));
|
|
@@ -2735,9 +2749,7 @@ ${input.slice(result.pos)}
|
|
|
2735
2749
|
return result;
|
|
2736
2750
|
}
|
|
2737
2751
|
}
|
|
2738
|
-
var ClassExpression$0 = $
|
|
2739
|
-
return $0;
|
|
2740
|
-
});
|
|
2752
|
+
var ClassExpression$0 = $S($E(Decorators), $E($S(Abstract, __)), Class, $E(ClassBinding), $E(ClassHeritage), ClassBody);
|
|
2741
2753
|
function ClassExpression(state) {
|
|
2742
2754
|
let eventData;
|
|
2743
2755
|
if (state.events) {
|
|
@@ -3133,6 +3145,128 @@ ${input.slice(result.pos)}
|
|
|
3133
3145
|
return result;
|
|
3134
3146
|
}
|
|
3135
3147
|
}
|
|
3148
|
+
var ClassSignature$0 = $S($E(Decorators), $E($S(Abstract, __)), Class, $E(ClassBinding), $E(ClassHeritage), ClassSignatureBody);
|
|
3149
|
+
function ClassSignature(state) {
|
|
3150
|
+
let eventData;
|
|
3151
|
+
if (state.events) {
|
|
3152
|
+
const result = state.events.enter?.("ClassSignature", state);
|
|
3153
|
+
if (result) {
|
|
3154
|
+
if (result.cache)
|
|
3155
|
+
return result.cache;
|
|
3156
|
+
eventData = result.data;
|
|
3157
|
+
}
|
|
3158
|
+
}
|
|
3159
|
+
if (state.tokenize) {
|
|
3160
|
+
const result = $TOKEN("ClassSignature", state, ClassSignature$0(state));
|
|
3161
|
+
if (state.events)
|
|
3162
|
+
state.events.exit?.("ClassSignature", state, result, eventData);
|
|
3163
|
+
return result;
|
|
3164
|
+
} else {
|
|
3165
|
+
const result = ClassSignature$0(state);
|
|
3166
|
+
if (state.events)
|
|
3167
|
+
state.events.exit?.("ClassSignature", state, result, eventData);
|
|
3168
|
+
return result;
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
var ClassSignatureBody$0 = $S(__, OpenBrace, $E(NestedClassSignatureElements), __, CloseBrace);
|
|
3172
|
+
var ClassSignatureBody$1 = $S(InsertOpenBrace, $E(NestedClassSignatureElements), InsertNewline, InsertIndent, InsertCloseBrace);
|
|
3173
|
+
function ClassSignatureBody(state) {
|
|
3174
|
+
let eventData;
|
|
3175
|
+
if (state.events) {
|
|
3176
|
+
const result = state.events.enter?.("ClassSignatureBody", state);
|
|
3177
|
+
if (result) {
|
|
3178
|
+
if (result.cache)
|
|
3179
|
+
return result.cache;
|
|
3180
|
+
eventData = result.data;
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
if (state.tokenize) {
|
|
3184
|
+
const result = $TOKEN("ClassSignatureBody", state, ClassSignatureBody$0(state) || ClassSignatureBody$1(state));
|
|
3185
|
+
if (state.events)
|
|
3186
|
+
state.events.exit?.("ClassSignatureBody", state, result, eventData);
|
|
3187
|
+
return result;
|
|
3188
|
+
} else {
|
|
3189
|
+
const result = ClassSignatureBody$0(state) || ClassSignatureBody$1(state);
|
|
3190
|
+
if (state.events)
|
|
3191
|
+
state.events.exit?.("ClassSignatureBody", state, result, eventData);
|
|
3192
|
+
return result;
|
|
3193
|
+
}
|
|
3194
|
+
}
|
|
3195
|
+
var NestedClassSignatureElements$0 = $TS($S(PushIndent, $Q(NestedClassSignatureElement), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
3196
|
+
var elements = $2;
|
|
3197
|
+
if (!elements.length)
|
|
3198
|
+
return $skip;
|
|
3199
|
+
return elements;
|
|
3200
|
+
});
|
|
3201
|
+
function NestedClassSignatureElements(state) {
|
|
3202
|
+
let eventData;
|
|
3203
|
+
if (state.events) {
|
|
3204
|
+
const result = state.events.enter?.("NestedClassSignatureElements", state);
|
|
3205
|
+
if (result) {
|
|
3206
|
+
if (result.cache)
|
|
3207
|
+
return result.cache;
|
|
3208
|
+
eventData = result.data;
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
if (state.tokenize) {
|
|
3212
|
+
const result = $TOKEN("NestedClassSignatureElements", state, NestedClassSignatureElements$0(state));
|
|
3213
|
+
if (state.events)
|
|
3214
|
+
state.events.exit?.("NestedClassSignatureElements", state, result, eventData);
|
|
3215
|
+
return result;
|
|
3216
|
+
} else {
|
|
3217
|
+
const result = NestedClassSignatureElements$0(state);
|
|
3218
|
+
if (state.events)
|
|
3219
|
+
state.events.exit?.("NestedClassSignatureElements", state, result, eventData);
|
|
3220
|
+
return result;
|
|
3221
|
+
}
|
|
3222
|
+
}
|
|
3223
|
+
var NestedClassSignatureElement$0 = $S(Nested, ClassSignatureElement, StatementDelimiter);
|
|
3224
|
+
function NestedClassSignatureElement(state) {
|
|
3225
|
+
let eventData;
|
|
3226
|
+
if (state.events) {
|
|
3227
|
+
const result = state.events.enter?.("NestedClassSignatureElement", state);
|
|
3228
|
+
if (result) {
|
|
3229
|
+
if (result.cache)
|
|
3230
|
+
return result.cache;
|
|
3231
|
+
eventData = result.data;
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
if (state.tokenize) {
|
|
3235
|
+
const result = $TOKEN("NestedClassSignatureElement", state, NestedClassSignatureElement$0(state));
|
|
3236
|
+
if (state.events)
|
|
3237
|
+
state.events.exit?.("NestedClassSignatureElement", state, result, eventData);
|
|
3238
|
+
return result;
|
|
3239
|
+
} else {
|
|
3240
|
+
const result = NestedClassSignatureElement$0(state);
|
|
3241
|
+
if (state.events)
|
|
3242
|
+
state.events.exit?.("NestedClassSignatureElement", state, result, eventData);
|
|
3243
|
+
return result;
|
|
3244
|
+
}
|
|
3245
|
+
}
|
|
3246
|
+
var ClassSignatureElement$0 = $S($E(Decorators), $E(AccessModifier), $E($S(Static, $Q(TrailingComment))), $C(MethodSignature, FieldDefinition));
|
|
3247
|
+
var ClassSignatureElement$1 = $S(Static, ClassSignatureBody);
|
|
3248
|
+
function ClassSignatureElement(state) {
|
|
3249
|
+
let eventData;
|
|
3250
|
+
if (state.events) {
|
|
3251
|
+
const result = state.events.enter?.("ClassSignatureElement", state);
|
|
3252
|
+
if (result) {
|
|
3253
|
+
if (result.cache)
|
|
3254
|
+
return result.cache;
|
|
3255
|
+
eventData = result.data;
|
|
3256
|
+
}
|
|
3257
|
+
}
|
|
3258
|
+
if (state.tokenize) {
|
|
3259
|
+
const result = $TOKEN("ClassSignatureElement", state, ClassSignatureElement$0(state) || ClassSignatureElement$1(state));
|
|
3260
|
+
if (state.events)
|
|
3261
|
+
state.events.exit?.("ClassSignatureElement", state, result, eventData);
|
|
3262
|
+
return result;
|
|
3263
|
+
} else {
|
|
3264
|
+
const result = ClassSignatureElement$0(state) || ClassSignatureElement$1(state);
|
|
3265
|
+
if (state.events)
|
|
3266
|
+
state.events.exit?.("ClassSignatureElement", state, result, eventData);
|
|
3267
|
+
return result;
|
|
3268
|
+
}
|
|
3269
|
+
}
|
|
3136
3270
|
var AccessModifier$0 = $TS($S($E($S($C(Public, Private, Protected), __)), $E($S(Readonly, __))), function($skip, $loc, $0, $1, $2) {
|
|
3137
3271
|
if (!($1 || $2))
|
|
3138
3272
|
return $skip;
|
|
@@ -11111,7 +11245,7 @@ ${input.slice(result.pos)}
|
|
|
11111
11245
|
return $0;
|
|
11112
11246
|
return { ts: true, children: $0 };
|
|
11113
11247
|
});
|
|
11114
|
-
var ExportDeclaration$2 = $TS($S(Export, __, $C(Declaration,
|
|
11248
|
+
var ExportDeclaration$2 = $TS($S(Export, __, $C(Declaration, VariableStatement, TypeAndNamedExports, ExportVarDec)), function($skip, $loc, $0, $1, $2, $3) {
|
|
11115
11249
|
if (!$3.ts)
|
|
11116
11250
|
return $0;
|
|
11117
11251
|
return { ts: true, children: $0 };
|
|
@@ -14209,6 +14343,30 @@ ${input.slice(result.pos)}
|
|
|
14209
14343
|
return result;
|
|
14210
14344
|
}
|
|
14211
14345
|
}
|
|
14346
|
+
var LetOrConstOrVar$0 = LetOrConst;
|
|
14347
|
+
var LetOrConstOrVar$1 = Var;
|
|
14348
|
+
function LetOrConstOrVar(state) {
|
|
14349
|
+
let eventData;
|
|
14350
|
+
if (state.events) {
|
|
14351
|
+
const result = state.events.enter?.("LetOrConstOrVar", state);
|
|
14352
|
+
if (result) {
|
|
14353
|
+
if (result.cache)
|
|
14354
|
+
return result.cache;
|
|
14355
|
+
eventData = result.data;
|
|
14356
|
+
}
|
|
14357
|
+
}
|
|
14358
|
+
if (state.tokenize) {
|
|
14359
|
+
const result = $TOKEN("LetOrConstOrVar", state, LetOrConstOrVar$0(state) || LetOrConstOrVar$1(state));
|
|
14360
|
+
if (state.events)
|
|
14361
|
+
state.events.exit?.("LetOrConstOrVar", state, result, eventData);
|
|
14362
|
+
return result;
|
|
14363
|
+
} else {
|
|
14364
|
+
const result = LetOrConstOrVar$0(state) || LetOrConstOrVar$1(state);
|
|
14365
|
+
if (state.events)
|
|
14366
|
+
state.events.exit?.("LetOrConstOrVar", state, result, eventData);
|
|
14367
|
+
return result;
|
|
14368
|
+
}
|
|
14369
|
+
}
|
|
14212
14370
|
var Loop$0 = $TS($S($EXPECT($L130, fail, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
14213
14371
|
return { $loc, token: "while(true)" };
|
|
14214
14372
|
});
|
|
@@ -16667,7 +16825,7 @@ ${input.slice(result.pos)}
|
|
|
16667
16825
|
}
|
|
16668
16826
|
var TypeDeclarationRest$0 = $S(TypeKeyword, $Q(TrailingComment), IdentifierName, $E(TypeParameters), __, Equals, $C($S($E(_), Type), $S(__, Type)));
|
|
16669
16827
|
var TypeDeclarationRest$1 = $S(Interface, $Q(TrailingComment), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock);
|
|
16670
|
-
var TypeDeclarationRest$2 = $S(Namespace, $Q(TrailingComment), IdentifierName,
|
|
16828
|
+
var TypeDeclarationRest$2 = $S(Namespace, $Q(TrailingComment), IdentifierName, ModuleBlock);
|
|
16671
16829
|
var TypeDeclarationRest$3 = FunctionSignature;
|
|
16672
16830
|
function TypeDeclarationRest(state) {
|
|
16673
16831
|
let eventData;
|
|
@@ -16691,7 +16849,11 @@ ${input.slice(result.pos)}
|
|
|
16691
16849
|
return result;
|
|
16692
16850
|
}
|
|
16693
16851
|
}
|
|
16694
|
-
var TypeLexicalDeclaration$0 = $S(__,
|
|
16852
|
+
var TypeLexicalDeclaration$0 = $S(__, LetOrConstOrVar, TypeDeclarationBinding, $Q($S(CommaDelimiter, __, TypeDeclarationBinding)));
|
|
16853
|
+
var TypeLexicalDeclaration$1 = ClassSignature;
|
|
16854
|
+
var TypeLexicalDeclaration$2 = $S(Namespace, $Q(TrailingComment), IdentifierName, DeclareBlock);
|
|
16855
|
+
var TypeLexicalDeclaration$3 = $S(Module, _, StringLiteral, $E(DeclareBlock));
|
|
16856
|
+
var TypeLexicalDeclaration$4 = $S(Global, $E(DeclareBlock));
|
|
16695
16857
|
function TypeLexicalDeclaration(state) {
|
|
16696
16858
|
let eventData;
|
|
16697
16859
|
if (state.events) {
|
|
@@ -16703,12 +16865,12 @@ ${input.slice(result.pos)}
|
|
|
16703
16865
|
}
|
|
16704
16866
|
}
|
|
16705
16867
|
if (state.tokenize) {
|
|
16706
|
-
const result = $TOKEN("TypeLexicalDeclaration", state, TypeLexicalDeclaration$0(state));
|
|
16868
|
+
const result = $TOKEN("TypeLexicalDeclaration", state, TypeLexicalDeclaration$0(state) || TypeLexicalDeclaration$1(state) || TypeLexicalDeclaration$2(state) || TypeLexicalDeclaration$3(state) || TypeLexicalDeclaration$4(state));
|
|
16707
16869
|
if (state.events)
|
|
16708
16870
|
state.events.exit?.("TypeLexicalDeclaration", state, result, eventData);
|
|
16709
16871
|
return result;
|
|
16710
16872
|
} else {
|
|
16711
|
-
const result = TypeLexicalDeclaration$0(state);
|
|
16873
|
+
const result = TypeLexicalDeclaration$0(state) || TypeLexicalDeclaration$1(state) || TypeLexicalDeclaration$2(state) || TypeLexicalDeclaration$3(state) || TypeLexicalDeclaration$4(state);
|
|
16712
16874
|
if (state.events)
|
|
16713
16875
|
state.events.exit?.("TypeLexicalDeclaration", state, result, eventData);
|
|
16714
16876
|
return result;
|
|
@@ -16783,7 +16945,9 @@ ${input.slice(result.pos)}
|
|
|
16783
16945
|
return result;
|
|
16784
16946
|
}
|
|
16785
16947
|
}
|
|
16786
|
-
var TypeKeyword$0 = $S($EXPECT($L171, fail, 'TypeKeyword "type"'), NonIdContinue)
|
|
16948
|
+
var TypeKeyword$0 = $TS($S($EXPECT($L171, fail, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16949
|
+
return { $loc, token: $1 };
|
|
16950
|
+
});
|
|
16787
16951
|
function TypeKeyword(state) {
|
|
16788
16952
|
let eventData;
|
|
16789
16953
|
if (state.events) {
|
|
@@ -16806,7 +16970,9 @@ ${input.slice(result.pos)}
|
|
|
16806
16970
|
return result;
|
|
16807
16971
|
}
|
|
16808
16972
|
}
|
|
16809
|
-
var Interface$0 = $S($EXPECT($L172, fail, 'Interface "interface"'), NonIdContinue)
|
|
16973
|
+
var Interface$0 = $TS($S($EXPECT($L172, fail, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16974
|
+
return { $loc, token: $1 };
|
|
16975
|
+
});
|
|
16810
16976
|
function Interface(state) {
|
|
16811
16977
|
let eventData;
|
|
16812
16978
|
if (state.events) {
|
|
@@ -16829,7 +16995,59 @@ ${input.slice(result.pos)}
|
|
|
16829
16995
|
return result;
|
|
16830
16996
|
}
|
|
16831
16997
|
}
|
|
16832
|
-
var
|
|
16998
|
+
var Global$0 = $TS($S($EXPECT($L173, fail, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
16999
|
+
return { $loc, token: $1 };
|
|
17000
|
+
});
|
|
17001
|
+
function Global(state) {
|
|
17002
|
+
let eventData;
|
|
17003
|
+
if (state.events) {
|
|
17004
|
+
const result = state.events.enter?.("Global", state);
|
|
17005
|
+
if (result) {
|
|
17006
|
+
if (result.cache)
|
|
17007
|
+
return result.cache;
|
|
17008
|
+
eventData = result.data;
|
|
17009
|
+
}
|
|
17010
|
+
}
|
|
17011
|
+
if (state.tokenize) {
|
|
17012
|
+
const result = $TOKEN("Global", state, Global$0(state));
|
|
17013
|
+
if (state.events)
|
|
17014
|
+
state.events.exit?.("Global", state, result, eventData);
|
|
17015
|
+
return result;
|
|
17016
|
+
} else {
|
|
17017
|
+
const result = Global$0(state);
|
|
17018
|
+
if (state.events)
|
|
17019
|
+
state.events.exit?.("Global", state, result, eventData);
|
|
17020
|
+
return result;
|
|
17021
|
+
}
|
|
17022
|
+
}
|
|
17023
|
+
var Module$0 = $TS($S($EXPECT($L174, fail, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17024
|
+
return { $loc, token: $1 };
|
|
17025
|
+
});
|
|
17026
|
+
function Module(state) {
|
|
17027
|
+
let eventData;
|
|
17028
|
+
if (state.events) {
|
|
17029
|
+
const result = state.events.enter?.("Module", state);
|
|
17030
|
+
if (result) {
|
|
17031
|
+
if (result.cache)
|
|
17032
|
+
return result.cache;
|
|
17033
|
+
eventData = result.data;
|
|
17034
|
+
}
|
|
17035
|
+
}
|
|
17036
|
+
if (state.tokenize) {
|
|
17037
|
+
const result = $TOKEN("Module", state, Module$0(state));
|
|
17038
|
+
if (state.events)
|
|
17039
|
+
state.events.exit?.("Module", state, result, eventData);
|
|
17040
|
+
return result;
|
|
17041
|
+
} else {
|
|
17042
|
+
const result = Module$0(state);
|
|
17043
|
+
if (state.events)
|
|
17044
|
+
state.events.exit?.("Module", state, result, eventData);
|
|
17045
|
+
return result;
|
|
17046
|
+
}
|
|
17047
|
+
}
|
|
17048
|
+
var Namespace$0 = $TS($S($EXPECT($L175, fail, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17049
|
+
return { $loc, token: $1 };
|
|
17050
|
+
});
|
|
16833
17051
|
function Namespace(state) {
|
|
16834
17052
|
let eventData;
|
|
16835
17053
|
if (state.events) {
|
|
@@ -17001,13 +17219,88 @@ ${input.slice(result.pos)}
|
|
|
17001
17219
|
return result;
|
|
17002
17220
|
}
|
|
17003
17221
|
}
|
|
17004
|
-
var
|
|
17005
|
-
var
|
|
17006
|
-
|
|
17007
|
-
|
|
17222
|
+
var ModuleBlock$0 = $S(__, OpenBrace, NestedModuleItems, __, CloseBrace);
|
|
17223
|
+
var ModuleBlock$1 = $S(InsertOpenBrace, NestedModuleItems, InsertNewline, InsertIndent, InsertCloseBrace);
|
|
17224
|
+
function ModuleBlock(state) {
|
|
17225
|
+
let eventData;
|
|
17226
|
+
if (state.events) {
|
|
17227
|
+
const result = state.events.enter?.("ModuleBlock", state);
|
|
17228
|
+
if (result) {
|
|
17229
|
+
if (result.cache)
|
|
17230
|
+
return result.cache;
|
|
17231
|
+
eventData = result.data;
|
|
17232
|
+
}
|
|
17233
|
+
}
|
|
17234
|
+
if (state.tokenize) {
|
|
17235
|
+
const result = $TOKEN("ModuleBlock", state, ModuleBlock$0(state) || ModuleBlock$1(state));
|
|
17236
|
+
if (state.events)
|
|
17237
|
+
state.events.exit?.("ModuleBlock", state, result, eventData);
|
|
17238
|
+
return result;
|
|
17239
|
+
} else {
|
|
17240
|
+
const result = ModuleBlock$0(state) || ModuleBlock$1(state);
|
|
17241
|
+
if (state.events)
|
|
17242
|
+
state.events.exit?.("ModuleBlock", state, result, eventData);
|
|
17243
|
+
return result;
|
|
17244
|
+
}
|
|
17245
|
+
}
|
|
17246
|
+
var NestedModuleItems$0 = $TS($S(PushIndent, $Q(NestedModuleItem), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
17247
|
+
var items = $2;
|
|
17248
|
+
if (items.length)
|
|
17249
|
+
return items;
|
|
17250
|
+
return $skip;
|
|
17251
|
+
});
|
|
17252
|
+
function NestedModuleItems(state) {
|
|
17253
|
+
let eventData;
|
|
17254
|
+
if (state.events) {
|
|
17255
|
+
const result = state.events.enter?.("NestedModuleItems", state);
|
|
17256
|
+
if (result) {
|
|
17257
|
+
if (result.cache)
|
|
17258
|
+
return result.cache;
|
|
17259
|
+
eventData = result.data;
|
|
17260
|
+
}
|
|
17261
|
+
}
|
|
17262
|
+
if (state.tokenize) {
|
|
17263
|
+
const result = $TOKEN("NestedModuleItems", state, NestedModuleItems$0(state));
|
|
17264
|
+
if (state.events)
|
|
17265
|
+
state.events.exit?.("NestedModuleItems", state, result, eventData);
|
|
17266
|
+
return result;
|
|
17267
|
+
} else {
|
|
17268
|
+
const result = NestedModuleItems$0(state);
|
|
17269
|
+
if (state.events)
|
|
17270
|
+
state.events.exit?.("NestedModuleItems", state, result, eventData);
|
|
17271
|
+
return result;
|
|
17272
|
+
}
|
|
17273
|
+
}
|
|
17274
|
+
var NestedModuleItem$0 = $S(Nested, ModuleItem, StatementDelimiter);
|
|
17275
|
+
function NestedModuleItem(state) {
|
|
17276
|
+
let eventData;
|
|
17277
|
+
if (state.events) {
|
|
17278
|
+
const result = state.events.enter?.("NestedModuleItem", state);
|
|
17279
|
+
if (result) {
|
|
17280
|
+
if (result.cache)
|
|
17281
|
+
return result.cache;
|
|
17282
|
+
eventData = result.data;
|
|
17283
|
+
}
|
|
17284
|
+
}
|
|
17285
|
+
if (state.tokenize) {
|
|
17286
|
+
const result = $TOKEN("NestedModuleItem", state, NestedModuleItem$0(state));
|
|
17287
|
+
if (state.events)
|
|
17288
|
+
state.events.exit?.("NestedModuleItem", state, result, eventData);
|
|
17289
|
+
return result;
|
|
17290
|
+
} else {
|
|
17291
|
+
const result = NestedModuleItem$0(state);
|
|
17292
|
+
if (state.events)
|
|
17293
|
+
state.events.exit?.("NestedModuleItem", state, result, eventData);
|
|
17294
|
+
return result;
|
|
17295
|
+
}
|
|
17296
|
+
}
|
|
17297
|
+
var DeclareBlock$0 = $S(__, OpenBrace, NestedDeclareElements, __, CloseBrace);
|
|
17298
|
+
var DeclareBlock$1 = $S(__, OpenBrace, $Q($S(__, DeclareElement, InterfacePropertyDelimiter)), __, CloseBrace);
|
|
17299
|
+
var DeclareBlock$2 = $S(InsertOpenBrace, NestedDeclareElements, InsertNewline, InsertIndent, InsertCloseBrace);
|
|
17300
|
+
function DeclareBlock(state) {
|
|
17008
17301
|
let eventData;
|
|
17009
17302
|
if (state.events) {
|
|
17010
|
-
const result = state.events.enter?.("
|
|
17303
|
+
const result = state.events.enter?.("DeclareBlock", state);
|
|
17011
17304
|
if (result) {
|
|
17012
17305
|
if (result.cache)
|
|
17013
17306
|
return result.cache;
|
|
@@ -17015,27 +17308,27 @@ ${input.slice(result.pos)}
|
|
|
17015
17308
|
}
|
|
17016
17309
|
}
|
|
17017
17310
|
if (state.tokenize) {
|
|
17018
|
-
const result = $TOKEN("
|
|
17311
|
+
const result = $TOKEN("DeclareBlock", state, DeclareBlock$0(state) || DeclareBlock$1(state) || DeclareBlock$2(state));
|
|
17019
17312
|
if (state.events)
|
|
17020
|
-
state.events.exit?.("
|
|
17313
|
+
state.events.exit?.("DeclareBlock", state, result, eventData);
|
|
17021
17314
|
return result;
|
|
17022
17315
|
} else {
|
|
17023
|
-
const result =
|
|
17316
|
+
const result = DeclareBlock$0(state) || DeclareBlock$1(state) || DeclareBlock$2(state);
|
|
17024
17317
|
if (state.events)
|
|
17025
|
-
state.events.exit?.("
|
|
17318
|
+
state.events.exit?.("DeclareBlock", state, result, eventData);
|
|
17026
17319
|
return result;
|
|
17027
17320
|
}
|
|
17028
17321
|
}
|
|
17029
|
-
var
|
|
17322
|
+
var NestedDeclareElements$0 = $TS($S(PushIndent, $Q(NestedDeclareElement), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
17030
17323
|
var decs = $2;
|
|
17031
17324
|
if (decs.length)
|
|
17032
17325
|
return decs;
|
|
17033
17326
|
return $skip;
|
|
17034
17327
|
});
|
|
17035
|
-
function
|
|
17328
|
+
function NestedDeclareElements(state) {
|
|
17036
17329
|
let eventData;
|
|
17037
17330
|
if (state.events) {
|
|
17038
|
-
const result = state.events.enter?.("
|
|
17331
|
+
const result = state.events.enter?.("NestedDeclareElements", state);
|
|
17039
17332
|
if (result) {
|
|
17040
17333
|
if (result.cache)
|
|
17041
17334
|
return result.cache;
|
|
@@ -17043,22 +17336,22 @@ ${input.slice(result.pos)}
|
|
|
17043
17336
|
}
|
|
17044
17337
|
}
|
|
17045
17338
|
if (state.tokenize) {
|
|
17046
|
-
const result = $TOKEN("
|
|
17339
|
+
const result = $TOKEN("NestedDeclareElements", state, NestedDeclareElements$0(state));
|
|
17047
17340
|
if (state.events)
|
|
17048
|
-
state.events.exit?.("
|
|
17341
|
+
state.events.exit?.("NestedDeclareElements", state, result, eventData);
|
|
17049
17342
|
return result;
|
|
17050
17343
|
} else {
|
|
17051
|
-
const result =
|
|
17344
|
+
const result = NestedDeclareElements$0(state);
|
|
17052
17345
|
if (state.events)
|
|
17053
|
-
state.events.exit?.("
|
|
17346
|
+
state.events.exit?.("NestedDeclareElements", state, result, eventData);
|
|
17054
17347
|
return result;
|
|
17055
17348
|
}
|
|
17056
17349
|
}
|
|
17057
|
-
var
|
|
17058
|
-
function
|
|
17350
|
+
var NestedDeclareElement$0 = $S(Nested, DeclareElement, InterfacePropertyDelimiter);
|
|
17351
|
+
function NestedDeclareElement(state) {
|
|
17059
17352
|
let eventData;
|
|
17060
17353
|
if (state.events) {
|
|
17061
|
-
const result = state.events.enter?.("
|
|
17354
|
+
const result = state.events.enter?.("NestedDeclareElement", state);
|
|
17062
17355
|
if (result) {
|
|
17063
17356
|
if (result.cache)
|
|
17064
17357
|
return result.cache;
|
|
@@ -17066,14 +17359,42 @@ ${input.slice(result.pos)}
|
|
|
17066
17359
|
}
|
|
17067
17360
|
}
|
|
17068
17361
|
if (state.tokenize) {
|
|
17069
|
-
const result = $TOKEN("
|
|
17362
|
+
const result = $TOKEN("NestedDeclareElement", state, NestedDeclareElement$0(state));
|
|
17070
17363
|
if (state.events)
|
|
17071
|
-
state.events.exit?.("
|
|
17364
|
+
state.events.exit?.("NestedDeclareElement", state, result, eventData);
|
|
17072
17365
|
return result;
|
|
17073
17366
|
} else {
|
|
17074
|
-
const result =
|
|
17367
|
+
const result = NestedDeclareElement$0(state);
|
|
17075
17368
|
if (state.events)
|
|
17076
|
-
state.events.exit?.("
|
|
17369
|
+
state.events.exit?.("NestedDeclareElement", state, result, eventData);
|
|
17370
|
+
return result;
|
|
17371
|
+
}
|
|
17372
|
+
}
|
|
17373
|
+
var DeclareElement$0 = $T($S($E($S(Export, $E(_))), TypeLexicalDeclaration), function(value) {
|
|
17374
|
+
return { "ts": true, "children": value };
|
|
17375
|
+
});
|
|
17376
|
+
var DeclareElement$1 = $T($S($E($S(Export, $E(_))), TypeDeclarationRest), function(value) {
|
|
17377
|
+
return { "ts": true, "children": value };
|
|
17378
|
+
});
|
|
17379
|
+
function DeclareElement(state) {
|
|
17380
|
+
let eventData;
|
|
17381
|
+
if (state.events) {
|
|
17382
|
+
const result = state.events.enter?.("DeclareElement", state);
|
|
17383
|
+
if (result) {
|
|
17384
|
+
if (result.cache)
|
|
17385
|
+
return result.cache;
|
|
17386
|
+
eventData = result.data;
|
|
17387
|
+
}
|
|
17388
|
+
}
|
|
17389
|
+
if (state.tokenize) {
|
|
17390
|
+
const result = $TOKEN("DeclareElement", state, DeclareElement$0(state) || DeclareElement$1(state));
|
|
17391
|
+
if (state.events)
|
|
17392
|
+
state.events.exit?.("DeclareElement", state, result, eventData);
|
|
17393
|
+
return result;
|
|
17394
|
+
} else {
|
|
17395
|
+
const result = DeclareElement$0(state) || DeclareElement$1(state);
|
|
17396
|
+
if (state.events)
|
|
17397
|
+
state.events.exit?.("DeclareElement", state, result, eventData);
|
|
17077
17398
|
return result;
|
|
17078
17399
|
}
|
|
17079
17400
|
}
|
|
@@ -17127,6 +17448,9 @@ ${input.slice(result.pos)}
|
|
|
17127
17448
|
var TypeSuffix$0 = $T($S($E(QuestionMark), $E(_), Colon, Type), function(value) {
|
|
17128
17449
|
return { "type": "TypeSuffix", "ts": true, "children": value };
|
|
17129
17450
|
});
|
|
17451
|
+
var TypeSuffix$1 = $T($S(QuestionMark, $E(_)), function(value) {
|
|
17452
|
+
return { "type": "TypeSuffix", "ts": true, "children": value };
|
|
17453
|
+
});
|
|
17130
17454
|
function TypeSuffix(state) {
|
|
17131
17455
|
let eventData;
|
|
17132
17456
|
if (state.events) {
|
|
@@ -17138,18 +17462,18 @@ ${input.slice(result.pos)}
|
|
|
17138
17462
|
}
|
|
17139
17463
|
}
|
|
17140
17464
|
if (state.tokenize) {
|
|
17141
|
-
const result = $TOKEN("TypeSuffix", state, TypeSuffix$0(state));
|
|
17465
|
+
const result = $TOKEN("TypeSuffix", state, TypeSuffix$0(state) || TypeSuffix$1(state));
|
|
17142
17466
|
if (state.events)
|
|
17143
17467
|
state.events.exit?.("TypeSuffix", state, result, eventData);
|
|
17144
17468
|
return result;
|
|
17145
17469
|
} else {
|
|
17146
|
-
const result = TypeSuffix$0(state);
|
|
17470
|
+
const result = TypeSuffix$0(state) || TypeSuffix$1(state);
|
|
17147
17471
|
if (state.events)
|
|
17148
17472
|
state.events.exit?.("TypeSuffix", state, result, eventData);
|
|
17149
17473
|
return result;
|
|
17150
17474
|
}
|
|
17151
17475
|
}
|
|
17152
|
-
var ReturnTypeSuffix$0 = $TS($S($E(_), Colon, $E($S(__, $EXPECT($
|
|
17476
|
+
var ReturnTypeSuffix$0 = $TS($S($E(_), Colon, $E($S(__, $EXPECT($L176, fail, 'ReturnTypeSuffix "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
17153
17477
|
var asserts = $3;
|
|
17154
17478
|
var t = $4;
|
|
17155
17479
|
if (asserts) {
|
|
@@ -17323,9 +17647,9 @@ ${input.slice(result.pos)}
|
|
|
17323
17647
|
return result;
|
|
17324
17648
|
}
|
|
17325
17649
|
}
|
|
17326
|
-
var TypeUnaryOp$0 = $S($EXPECT($
|
|
17650
|
+
var TypeUnaryOp$0 = $S($EXPECT($L177, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
17327
17651
|
var TypeUnaryOp$1 = $S($EXPECT($L157, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
|
|
17328
|
-
var TypeUnaryOp$2 = $S($EXPECT($
|
|
17652
|
+
var TypeUnaryOp$2 = $S($EXPECT($L178, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
|
|
17329
17653
|
var TypeUnaryOp$3 = $S($EXPECT($L141, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
17330
17654
|
function TypeUnaryOp(state) {
|
|
17331
17655
|
let eventData;
|
|
@@ -17571,7 +17895,7 @@ ${input.slice(result.pos)}
|
|
|
17571
17895
|
var TypeLiteral$2 = $TS($S($EXPECT($L161, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17572
17896
|
return { type: "VoidType", $loc, token: $1 };
|
|
17573
17897
|
});
|
|
17574
|
-
var TypeLiteral$3 = $TV($EXPECT($
|
|
17898
|
+
var TypeLiteral$3 = $TV($EXPECT($L179, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
17575
17899
|
return { $loc, token: "[]" };
|
|
17576
17900
|
});
|
|
17577
17901
|
function TypeLiteral(state) {
|
|
@@ -18031,7 +18355,7 @@ ${input.slice(result.pos)}
|
|
|
18031
18355
|
return result;
|
|
18032
18356
|
}
|
|
18033
18357
|
}
|
|
18034
|
-
var CivetPrologueContent$0 = $TS($S($EXPECT($
|
|
18358
|
+
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) {
|
|
18035
18359
|
var options = $3;
|
|
18036
18360
|
return {
|
|
18037
18361
|
type: "CivetPrologue",
|
|
@@ -21721,7 +22045,7 @@ var parse;
|
|
|
21721
22045
|
var uncacheable;
|
|
21722
22046
|
({ parse } = import_parser.default);
|
|
21723
22047
|
({ SourceMap: SourceMap2, base64Encode: base64Encode2 } = util_exports);
|
|
21724
|
-
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"]);
|
|
22048
|
+
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"]);
|
|
21725
22049
|
var compile = function(src, options) {
|
|
21726
22050
|
var ast, code, events, filename, ref, result, sm, srcMapJSON;
|
|
21727
22051
|
if (!options) {
|