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