@danielx/civet 0.5.71 → 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 +427 -74
- package/dist/civet +0 -0
- package/dist/main.js +427 -74
- package/dist/main.mjs +427 -74
- 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;
|
|
@@ -3697,6 +3831,20 @@ ${input.slice(result.pos)}
|
|
|
3697
3831
|
children: [start, [...ws, { ...sep, token: ", " }], [end, ...inc]]
|
|
3698
3832
|
};
|
|
3699
3833
|
});
|
|
3834
|
+
var SliceParameters$2 = $TS($S(Loc, __, $C(DotDot, DotDotDot), $Y($S(__, CloseBracket))), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
3835
|
+
var l = $1;
|
|
3836
|
+
var ws = $2;
|
|
3837
|
+
const start = {
|
|
3838
|
+
$loc: l.$loc,
|
|
3839
|
+
token: "0"
|
|
3840
|
+
};
|
|
3841
|
+
return {
|
|
3842
|
+
type: "SliceParameters",
|
|
3843
|
+
start,
|
|
3844
|
+
end: void 0,
|
|
3845
|
+
children: [start, ws]
|
|
3846
|
+
};
|
|
3847
|
+
});
|
|
3700
3848
|
function SliceParameters(state) {
|
|
3701
3849
|
let eventData;
|
|
3702
3850
|
if (state.events) {
|
|
@@ -3708,12 +3856,12 @@ ${input.slice(result.pos)}
|
|
|
3708
3856
|
}
|
|
3709
3857
|
}
|
|
3710
3858
|
if (state.tokenize) {
|
|
3711
|
-
const result = $TOKEN("SliceParameters", state, SliceParameters$0(state) || SliceParameters$1(state));
|
|
3859
|
+
const result = $TOKEN("SliceParameters", state, SliceParameters$0(state) || SliceParameters$1(state) || SliceParameters$2(state));
|
|
3712
3860
|
if (state.events)
|
|
3713
3861
|
state.events.exit?.("SliceParameters", state, result, eventData);
|
|
3714
3862
|
return result;
|
|
3715
3863
|
} else {
|
|
3716
|
-
const result = SliceParameters$0(state) || SliceParameters$1(state);
|
|
3864
|
+
const result = SliceParameters$0(state) || SliceParameters$1(state) || SliceParameters$2(state);
|
|
3717
3865
|
if (state.events)
|
|
3718
3866
|
state.events.exit?.("SliceParameters", state, result, eventData);
|
|
3719
3867
|
return result;
|
|
@@ -5324,19 +5472,15 @@ ${input.slice(result.pos)}
|
|
|
5324
5472
|
};
|
|
5325
5473
|
return {
|
|
5326
5474
|
type: "ArrowFunction",
|
|
5327
|
-
children: [ref2, " => ", prefix, ref2]
|
|
5475
|
+
children: [ref2, " => ", prefix, ref2],
|
|
5476
|
+
ampersandBlock: true
|
|
5328
5477
|
};
|
|
5329
5478
|
}
|
|
5330
5479
|
const { ref } = rhs;
|
|
5331
|
-
if (!prefix) {
|
|
5332
|
-
return {
|
|
5333
|
-
type: "ArrowFunction",
|
|
5334
|
-
children: [ref, " => ", rhs]
|
|
5335
|
-
};
|
|
5336
|
-
}
|
|
5337
5480
|
return {
|
|
5338
5481
|
type: "ArrowFunction",
|
|
5339
|
-
children: [ref, " => ", prefix, rhs]
|
|
5482
|
+
children: [ref, " => ", prefix, rhs],
|
|
5483
|
+
ampersandBlock: true
|
|
5340
5484
|
};
|
|
5341
5485
|
});
|
|
5342
5486
|
function FunctionExpression(state) {
|
|
@@ -9576,7 +9720,8 @@ ${input.slice(result.pos)}
|
|
|
9576
9720
|
return {
|
|
9577
9721
|
type: "SwitchExpression",
|
|
9578
9722
|
children: ["(()=>{", e.children, "})()"],
|
|
9579
|
-
|
|
9723
|
+
expression: e.expression,
|
|
9724
|
+
caseBlock: e.caseBlock
|
|
9580
9725
|
};
|
|
9581
9726
|
});
|
|
9582
9727
|
function SwitchExpression(state) {
|
|
@@ -11100,7 +11245,7 @@ ${input.slice(result.pos)}
|
|
|
11100
11245
|
return $0;
|
|
11101
11246
|
return { ts: true, children: $0 };
|
|
11102
11247
|
});
|
|
11103
|
-
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) {
|
|
11104
11249
|
if (!$3.ts)
|
|
11105
11250
|
return $0;
|
|
11106
11251
|
return { ts: true, children: $0 };
|
|
@@ -13773,7 +13918,7 @@ ${input.slice(result.pos)}
|
|
|
13773
13918
|
return result;
|
|
13774
13919
|
}
|
|
13775
13920
|
}
|
|
13776
|
-
var DotDot$0 = $
|
|
13921
|
+
var DotDot$0 = $TS($S($EXPECT($L114, fail, 'DotDot ".."'), $N($EXPECT($L4, fail, 'DotDot "."'))), function($skip, $loc, $0, $1, $2) {
|
|
13777
13922
|
return { $loc, token: $1 };
|
|
13778
13923
|
});
|
|
13779
13924
|
function DotDot(state) {
|
|
@@ -14198,6 +14343,30 @@ ${input.slice(result.pos)}
|
|
|
14198
14343
|
return result;
|
|
14199
14344
|
}
|
|
14200
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
|
+
}
|
|
14201
14370
|
var Loop$0 = $TS($S($EXPECT($L130, fail, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
14202
14371
|
return { $loc, token: "while(true)" };
|
|
14203
14372
|
});
|
|
@@ -16656,7 +16825,7 @@ ${input.slice(result.pos)}
|
|
|
16656
16825
|
}
|
|
16657
16826
|
var TypeDeclarationRest$0 = $S(TypeKeyword, $Q(TrailingComment), IdentifierName, $E(TypeParameters), __, Equals, $C($S($E(_), Type), $S(__, Type)));
|
|
16658
16827
|
var TypeDeclarationRest$1 = $S(Interface, $Q(TrailingComment), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock);
|
|
16659
|
-
var TypeDeclarationRest$2 = $S(Namespace, $Q(TrailingComment), IdentifierName,
|
|
16828
|
+
var TypeDeclarationRest$2 = $S(Namespace, $Q(TrailingComment), IdentifierName, ModuleBlock);
|
|
16660
16829
|
var TypeDeclarationRest$3 = FunctionSignature;
|
|
16661
16830
|
function TypeDeclarationRest(state) {
|
|
16662
16831
|
let eventData;
|
|
@@ -16680,7 +16849,11 @@ ${input.slice(result.pos)}
|
|
|
16680
16849
|
return result;
|
|
16681
16850
|
}
|
|
16682
16851
|
}
|
|
16683
|
-
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));
|
|
16684
16857
|
function TypeLexicalDeclaration(state) {
|
|
16685
16858
|
let eventData;
|
|
16686
16859
|
if (state.events) {
|
|
@@ -16692,12 +16865,12 @@ ${input.slice(result.pos)}
|
|
|
16692
16865
|
}
|
|
16693
16866
|
}
|
|
16694
16867
|
if (state.tokenize) {
|
|
16695
|
-
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));
|
|
16696
16869
|
if (state.events)
|
|
16697
16870
|
state.events.exit?.("TypeLexicalDeclaration", state, result, eventData);
|
|
16698
16871
|
return result;
|
|
16699
16872
|
} else {
|
|
16700
|
-
const result = TypeLexicalDeclaration$0(state);
|
|
16873
|
+
const result = TypeLexicalDeclaration$0(state) || TypeLexicalDeclaration$1(state) || TypeLexicalDeclaration$2(state) || TypeLexicalDeclaration$3(state) || TypeLexicalDeclaration$4(state);
|
|
16701
16874
|
if (state.events)
|
|
16702
16875
|
state.events.exit?.("TypeLexicalDeclaration", state, result, eventData);
|
|
16703
16876
|
return result;
|
|
@@ -16772,7 +16945,9 @@ ${input.slice(result.pos)}
|
|
|
16772
16945
|
return result;
|
|
16773
16946
|
}
|
|
16774
16947
|
}
|
|
16775
|
-
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
|
+
});
|
|
16776
16951
|
function TypeKeyword(state) {
|
|
16777
16952
|
let eventData;
|
|
16778
16953
|
if (state.events) {
|
|
@@ -16795,7 +16970,9 @@ ${input.slice(result.pos)}
|
|
|
16795
16970
|
return result;
|
|
16796
16971
|
}
|
|
16797
16972
|
}
|
|
16798
|
-
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
|
+
});
|
|
16799
16976
|
function Interface(state) {
|
|
16800
16977
|
let eventData;
|
|
16801
16978
|
if (state.events) {
|
|
@@ -16818,7 +16995,59 @@ ${input.slice(result.pos)}
|
|
|
16818
16995
|
return result;
|
|
16819
16996
|
}
|
|
16820
16997
|
}
|
|
16821
|
-
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
|
+
});
|
|
16822
17051
|
function Namespace(state) {
|
|
16823
17052
|
let eventData;
|
|
16824
17053
|
if (state.events) {
|
|
@@ -16990,13 +17219,63 @@ ${input.slice(result.pos)}
|
|
|
16990
17219
|
return result;
|
|
16991
17220
|
}
|
|
16992
17221
|
}
|
|
16993
|
-
var
|
|
16994
|
-
var
|
|
16995
|
-
|
|
16996
|
-
|
|
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) {
|
|
16997
17276
|
let eventData;
|
|
16998
17277
|
if (state.events) {
|
|
16999
|
-
const result = state.events.enter?.("
|
|
17278
|
+
const result = state.events.enter?.("NestedModuleItem", state);
|
|
17000
17279
|
if (result) {
|
|
17001
17280
|
if (result.cache)
|
|
17002
17281
|
return result.cache;
|
|
@@ -17004,27 +17283,52 @@ ${input.slice(result.pos)}
|
|
|
17004
17283
|
}
|
|
17005
17284
|
}
|
|
17006
17285
|
if (state.tokenize) {
|
|
17007
|
-
const result = $TOKEN("
|
|
17286
|
+
const result = $TOKEN("NestedModuleItem", state, NestedModuleItem$0(state));
|
|
17008
17287
|
if (state.events)
|
|
17009
|
-
state.events.exit?.("
|
|
17288
|
+
state.events.exit?.("NestedModuleItem", state, result, eventData);
|
|
17010
17289
|
return result;
|
|
17011
17290
|
} else {
|
|
17012
|
-
const result =
|
|
17291
|
+
const result = NestedModuleItem$0(state);
|
|
17013
17292
|
if (state.events)
|
|
17014
|
-
state.events.exit?.("
|
|
17293
|
+
state.events.exit?.("NestedModuleItem", state, result, eventData);
|
|
17015
17294
|
return result;
|
|
17016
17295
|
}
|
|
17017
17296
|
}
|
|
17018
|
-
var
|
|
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) {
|
|
17301
|
+
let eventData;
|
|
17302
|
+
if (state.events) {
|
|
17303
|
+
const result = state.events.enter?.("DeclareBlock", state);
|
|
17304
|
+
if (result) {
|
|
17305
|
+
if (result.cache)
|
|
17306
|
+
return result.cache;
|
|
17307
|
+
eventData = result.data;
|
|
17308
|
+
}
|
|
17309
|
+
}
|
|
17310
|
+
if (state.tokenize) {
|
|
17311
|
+
const result = $TOKEN("DeclareBlock", state, DeclareBlock$0(state) || DeclareBlock$1(state) || DeclareBlock$2(state));
|
|
17312
|
+
if (state.events)
|
|
17313
|
+
state.events.exit?.("DeclareBlock", state, result, eventData);
|
|
17314
|
+
return result;
|
|
17315
|
+
} else {
|
|
17316
|
+
const result = DeclareBlock$0(state) || DeclareBlock$1(state) || DeclareBlock$2(state);
|
|
17317
|
+
if (state.events)
|
|
17318
|
+
state.events.exit?.("DeclareBlock", state, result, eventData);
|
|
17319
|
+
return result;
|
|
17320
|
+
}
|
|
17321
|
+
}
|
|
17322
|
+
var NestedDeclareElements$0 = $TS($S(PushIndent, $Q(NestedDeclareElement), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
17019
17323
|
var decs = $2;
|
|
17020
17324
|
if (decs.length)
|
|
17021
17325
|
return decs;
|
|
17022
17326
|
return $skip;
|
|
17023
17327
|
});
|
|
17024
|
-
function
|
|
17328
|
+
function NestedDeclareElements(state) {
|
|
17025
17329
|
let eventData;
|
|
17026
17330
|
if (state.events) {
|
|
17027
|
-
const result = state.events.enter?.("
|
|
17331
|
+
const result = state.events.enter?.("NestedDeclareElements", state);
|
|
17028
17332
|
if (result) {
|
|
17029
17333
|
if (result.cache)
|
|
17030
17334
|
return result.cache;
|
|
@@ -17032,22 +17336,22 @@ ${input.slice(result.pos)}
|
|
|
17032
17336
|
}
|
|
17033
17337
|
}
|
|
17034
17338
|
if (state.tokenize) {
|
|
17035
|
-
const result = $TOKEN("
|
|
17339
|
+
const result = $TOKEN("NestedDeclareElements", state, NestedDeclareElements$0(state));
|
|
17036
17340
|
if (state.events)
|
|
17037
|
-
state.events.exit?.("
|
|
17341
|
+
state.events.exit?.("NestedDeclareElements", state, result, eventData);
|
|
17038
17342
|
return result;
|
|
17039
17343
|
} else {
|
|
17040
|
-
const result =
|
|
17344
|
+
const result = NestedDeclareElements$0(state);
|
|
17041
17345
|
if (state.events)
|
|
17042
|
-
state.events.exit?.("
|
|
17346
|
+
state.events.exit?.("NestedDeclareElements", state, result, eventData);
|
|
17043
17347
|
return result;
|
|
17044
17348
|
}
|
|
17045
17349
|
}
|
|
17046
|
-
var
|
|
17047
|
-
function
|
|
17350
|
+
var NestedDeclareElement$0 = $S(Nested, DeclareElement, InterfacePropertyDelimiter);
|
|
17351
|
+
function NestedDeclareElement(state) {
|
|
17048
17352
|
let eventData;
|
|
17049
17353
|
if (state.events) {
|
|
17050
|
-
const result = state.events.enter?.("
|
|
17354
|
+
const result = state.events.enter?.("NestedDeclareElement", state);
|
|
17051
17355
|
if (result) {
|
|
17052
17356
|
if (result.cache)
|
|
17053
17357
|
return result.cache;
|
|
@@ -17055,14 +17359,42 @@ ${input.slice(result.pos)}
|
|
|
17055
17359
|
}
|
|
17056
17360
|
}
|
|
17057
17361
|
if (state.tokenize) {
|
|
17058
|
-
const result = $TOKEN("
|
|
17362
|
+
const result = $TOKEN("NestedDeclareElement", state, NestedDeclareElement$0(state));
|
|
17059
17363
|
if (state.events)
|
|
17060
|
-
state.events.exit?.("
|
|
17364
|
+
state.events.exit?.("NestedDeclareElement", state, result, eventData);
|
|
17061
17365
|
return result;
|
|
17062
17366
|
} else {
|
|
17063
|
-
const result =
|
|
17367
|
+
const result = NestedDeclareElement$0(state);
|
|
17064
17368
|
if (state.events)
|
|
17065
|
-
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);
|
|
17066
17398
|
return result;
|
|
17067
17399
|
}
|
|
17068
17400
|
}
|
|
@@ -17116,6 +17448,9 @@ ${input.slice(result.pos)}
|
|
|
17116
17448
|
var TypeSuffix$0 = $T($S($E(QuestionMark), $E(_), Colon, Type), function(value) {
|
|
17117
17449
|
return { "type": "TypeSuffix", "ts": true, "children": value };
|
|
17118
17450
|
});
|
|
17451
|
+
var TypeSuffix$1 = $T($S(QuestionMark, $E(_)), function(value) {
|
|
17452
|
+
return { "type": "TypeSuffix", "ts": true, "children": value };
|
|
17453
|
+
});
|
|
17119
17454
|
function TypeSuffix(state) {
|
|
17120
17455
|
let eventData;
|
|
17121
17456
|
if (state.events) {
|
|
@@ -17127,18 +17462,18 @@ ${input.slice(result.pos)}
|
|
|
17127
17462
|
}
|
|
17128
17463
|
}
|
|
17129
17464
|
if (state.tokenize) {
|
|
17130
|
-
const result = $TOKEN("TypeSuffix", state, TypeSuffix$0(state));
|
|
17465
|
+
const result = $TOKEN("TypeSuffix", state, TypeSuffix$0(state) || TypeSuffix$1(state));
|
|
17131
17466
|
if (state.events)
|
|
17132
17467
|
state.events.exit?.("TypeSuffix", state, result, eventData);
|
|
17133
17468
|
return result;
|
|
17134
17469
|
} else {
|
|
17135
|
-
const result = TypeSuffix$0(state);
|
|
17470
|
+
const result = TypeSuffix$0(state) || TypeSuffix$1(state);
|
|
17136
17471
|
if (state.events)
|
|
17137
17472
|
state.events.exit?.("TypeSuffix", state, result, eventData);
|
|
17138
17473
|
return result;
|
|
17139
17474
|
}
|
|
17140
17475
|
}
|
|
17141
|
-
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) {
|
|
17142
17477
|
var asserts = $3;
|
|
17143
17478
|
var t = $4;
|
|
17144
17479
|
if (asserts) {
|
|
@@ -17312,9 +17647,9 @@ ${input.slice(result.pos)}
|
|
|
17312
17647
|
return result;
|
|
17313
17648
|
}
|
|
17314
17649
|
}
|
|
17315
|
-
var TypeUnaryOp$0 = $S($EXPECT($
|
|
17650
|
+
var TypeUnaryOp$0 = $S($EXPECT($L177, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
17316
17651
|
var TypeUnaryOp$1 = $S($EXPECT($L157, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
|
|
17317
|
-
var TypeUnaryOp$2 = $S($EXPECT($
|
|
17652
|
+
var TypeUnaryOp$2 = $S($EXPECT($L178, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
|
|
17318
17653
|
var TypeUnaryOp$3 = $S($EXPECT($L141, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
17319
17654
|
function TypeUnaryOp(state) {
|
|
17320
17655
|
let eventData;
|
|
@@ -17560,7 +17895,7 @@ ${input.slice(result.pos)}
|
|
|
17560
17895
|
var TypeLiteral$2 = $TS($S($EXPECT($L161, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17561
17896
|
return { type: "VoidType", $loc, token: $1 };
|
|
17562
17897
|
});
|
|
17563
|
-
var TypeLiteral$3 = $TV($EXPECT($
|
|
17898
|
+
var TypeLiteral$3 = $TV($EXPECT($L179, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
17564
17899
|
return { $loc, token: "[]" };
|
|
17565
17900
|
});
|
|
17566
17901
|
function TypeLiteral(state) {
|
|
@@ -18020,7 +18355,7 @@ ${input.slice(result.pos)}
|
|
|
18020
18355
|
return result;
|
|
18021
18356
|
}
|
|
18022
18357
|
}
|
|
18023
|
-
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) {
|
|
18024
18359
|
var options = $3;
|
|
18025
18360
|
return {
|
|
18026
18361
|
type: "CivetPrologue",
|
|
@@ -19613,6 +19948,9 @@ ${input.slice(result.pos)}
|
|
|
19613
19948
|
else
|
|
19614
19949
|
exp.children.push([" else {\n", indent, ref, ".push(undefined)\n", indent, "}"]);
|
|
19615
19950
|
return;
|
|
19951
|
+
case "PatternMatchingStatement":
|
|
19952
|
+
insertPush(exp.children[0][0], ref);
|
|
19953
|
+
return;
|
|
19616
19954
|
case "SwitchStatement":
|
|
19617
19955
|
insertPush(exp.children[2], ref);
|
|
19618
19956
|
return;
|
|
@@ -19700,6 +20038,9 @@ ${input.slice(result.pos)}
|
|
|
19700
20038
|
else
|
|
19701
20039
|
exp.children.push(["\n", indent, wrapWithReturn()]);
|
|
19702
20040
|
return;
|
|
20041
|
+
case "PatternMatchingStatement":
|
|
20042
|
+
insertReturn(exp.children[0][0]);
|
|
20043
|
+
return;
|
|
19703
20044
|
case "SwitchStatement":
|
|
19704
20045
|
insertSwitchReturns(exp);
|
|
19705
20046
|
return;
|
|
@@ -20627,7 +20968,7 @@ ${input.slice(result.pos)}
|
|
|
20627
20968
|
}
|
|
20628
20969
|
}
|
|
20629
20970
|
function processPatternMatching(statements) {
|
|
20630
|
-
gatherRecursiveAll(statements, (n) => n.type === "SwitchStatement").forEach((s) => {
|
|
20971
|
+
gatherRecursiveAll(statements, (n) => n.type === "SwitchStatement" || n.type === "SwitchExpression").forEach((s) => {
|
|
20631
20972
|
const { caseBlock } = s;
|
|
20632
20973
|
const { clauses } = caseBlock;
|
|
20633
20974
|
let errors = false;
|
|
@@ -20706,15 +21047,21 @@ ${input.slice(result.pos)}
|
|
|
20706
21047
|
block.children.push("}");
|
|
20707
21048
|
block.bare = false;
|
|
20708
21049
|
}
|
|
20709
|
-
|
|
20710
|
-
|
|
21050
|
+
if (i < l - 1)
|
|
21051
|
+
next.push("\n", "else ");
|
|
21052
|
+
prev.push(["", {
|
|
20711
21053
|
type: "IfStatement",
|
|
20712
|
-
children: ["if", condition, block,
|
|
21054
|
+
children: ["if", condition, block, next],
|
|
20713
21055
|
then: block,
|
|
20714
|
-
else:
|
|
20715
|
-
});
|
|
21056
|
+
else: next
|
|
21057
|
+
}]);
|
|
20716
21058
|
prev = next;
|
|
20717
21059
|
});
|
|
21060
|
+
if (module.config.implicitReturns && s.type === "SwitchExpression") {
|
|
21061
|
+
insertReturn(root[0]);
|
|
21062
|
+
root.unshift("(()=>{");
|
|
21063
|
+
root.push("})()");
|
|
21064
|
+
}
|
|
20718
21065
|
s.type = "PatternMatchingStatement";
|
|
20719
21066
|
s.children = [root];
|
|
20720
21067
|
});
|
|
@@ -20767,10 +21114,10 @@ ${input.slice(result.pos)}
|
|
|
20767
21114
|
addParentPointers(statements);
|
|
20768
21115
|
processPipelineExpressions(statements);
|
|
20769
21116
|
processAssignments(statements);
|
|
21117
|
+
processPatternMatching(statements);
|
|
20770
21118
|
processFunctions(statements);
|
|
20771
21119
|
processSwitchExpressions(statements);
|
|
20772
21120
|
processTryExpressions(statements);
|
|
20773
|
-
processPatternMatching(statements);
|
|
20774
21121
|
gatherRecursiveAll(statements, (n) => n.type === "IterationExpression").forEach((e) => expressionizeIteration(e));
|
|
20775
21122
|
checkSpliceRef(statements);
|
|
20776
21123
|
statements.unshift(...module.prelude);
|
|
@@ -20969,6 +21316,15 @@ ${input.slice(result.pos)}
|
|
|
20969
21316
|
module.gatherBindingCode = gatherBindingCode;
|
|
20970
21317
|
module.constructInvocation = function(fn, arg) {
|
|
20971
21318
|
const fnArr = [fn.leadingComment, fn.expr, fn.trailingComment];
|
|
21319
|
+
if (fn.expr.ampersandBlock) {
|
|
21320
|
+
const [ref, , prefix, rhs] = fn.expr.children;
|
|
21321
|
+
ref.type = "PipedExpression";
|
|
21322
|
+
ref.children = [module.makeLeftHandSideExpression(arg)];
|
|
21323
|
+
return {
|
|
21324
|
+
type: "UnwrappedExpression",
|
|
21325
|
+
children: [module.skipIfOnlyWS(fn.leadingComment), prefix, rhs, module.skipIfOnlyWS(fn.trailingComment)]
|
|
21326
|
+
};
|
|
21327
|
+
}
|
|
20972
21328
|
const lhs = module.makeLeftHandSideExpression(fn.expr);
|
|
20973
21329
|
let comment = module.skipIfOnlyWS(fn.trailingComment);
|
|
20974
21330
|
if (comment)
|
|
@@ -20978,10 +21334,7 @@ ${input.slice(result.pos)}
|
|
|
20978
21334
|
lhs.children.splice(1, 0, comment);
|
|
20979
21335
|
switch (arg.type) {
|
|
20980
21336
|
case "CommaExpression":
|
|
20981
|
-
arg =
|
|
20982
|
-
type: "ParenthesizedExpression",
|
|
20983
|
-
children: ["(", arg, ")"]
|
|
20984
|
-
};
|
|
21337
|
+
arg = module.makeLeftHandSideExpression(arg);
|
|
20985
21338
|
break;
|
|
20986
21339
|
}
|
|
20987
21340
|
return {
|
|
@@ -21692,7 +22045,7 @@ var parse;
|
|
|
21692
22045
|
var uncacheable;
|
|
21693
22046
|
({ parse } = import_parser.default);
|
|
21694
22047
|
({ SourceMap: SourceMap2, base64Encode: base64Encode2 } = util_exports);
|
|
21695
|
-
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"]);
|
|
21696
22049
|
var compile = function(src, options) {
|
|
21697
22050
|
var ast, code, events, filename, ref, result, sm, srcMapJSON;
|
|
21698
22051
|
if (!options) {
|