@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.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;
|
|
@@ -3699,6 +3833,20 @@ ${input.slice(result.pos)}
|
|
|
3699
3833
|
children: [start, [...ws, { ...sep, token: ", " }], [end, ...inc]]
|
|
3700
3834
|
};
|
|
3701
3835
|
});
|
|
3836
|
+
var SliceParameters$2 = $TS($S(Loc, __, $C(DotDot, DotDotDot), $Y($S(__, CloseBracket))), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
3837
|
+
var l = $1;
|
|
3838
|
+
var ws = $2;
|
|
3839
|
+
const start = {
|
|
3840
|
+
$loc: l.$loc,
|
|
3841
|
+
token: "0"
|
|
3842
|
+
};
|
|
3843
|
+
return {
|
|
3844
|
+
type: "SliceParameters",
|
|
3845
|
+
start,
|
|
3846
|
+
end: void 0,
|
|
3847
|
+
children: [start, ws]
|
|
3848
|
+
};
|
|
3849
|
+
});
|
|
3702
3850
|
function SliceParameters(state) {
|
|
3703
3851
|
let eventData;
|
|
3704
3852
|
if (state.events) {
|
|
@@ -3710,12 +3858,12 @@ ${input.slice(result.pos)}
|
|
|
3710
3858
|
}
|
|
3711
3859
|
}
|
|
3712
3860
|
if (state.tokenize) {
|
|
3713
|
-
const result = $TOKEN("SliceParameters", state, SliceParameters$0(state) || SliceParameters$1(state));
|
|
3861
|
+
const result = $TOKEN("SliceParameters", state, SliceParameters$0(state) || SliceParameters$1(state) || SliceParameters$2(state));
|
|
3714
3862
|
if (state.events)
|
|
3715
3863
|
state.events.exit?.("SliceParameters", state, result, eventData);
|
|
3716
3864
|
return result;
|
|
3717
3865
|
} else {
|
|
3718
|
-
const result = SliceParameters$0(state) || SliceParameters$1(state);
|
|
3866
|
+
const result = SliceParameters$0(state) || SliceParameters$1(state) || SliceParameters$2(state);
|
|
3719
3867
|
if (state.events)
|
|
3720
3868
|
state.events.exit?.("SliceParameters", state, result, eventData);
|
|
3721
3869
|
return result;
|
|
@@ -5326,19 +5474,15 @@ ${input.slice(result.pos)}
|
|
|
5326
5474
|
};
|
|
5327
5475
|
return {
|
|
5328
5476
|
type: "ArrowFunction",
|
|
5329
|
-
children: [ref2, " => ", prefix, ref2]
|
|
5477
|
+
children: [ref2, " => ", prefix, ref2],
|
|
5478
|
+
ampersandBlock: true
|
|
5330
5479
|
};
|
|
5331
5480
|
}
|
|
5332
5481
|
const { ref } = rhs;
|
|
5333
|
-
if (!prefix) {
|
|
5334
|
-
return {
|
|
5335
|
-
type: "ArrowFunction",
|
|
5336
|
-
children: [ref, " => ", rhs]
|
|
5337
|
-
};
|
|
5338
|
-
}
|
|
5339
5482
|
return {
|
|
5340
5483
|
type: "ArrowFunction",
|
|
5341
|
-
children: [ref, " => ", prefix, rhs]
|
|
5484
|
+
children: [ref, " => ", prefix, rhs],
|
|
5485
|
+
ampersandBlock: true
|
|
5342
5486
|
};
|
|
5343
5487
|
});
|
|
5344
5488
|
function FunctionExpression(state) {
|
|
@@ -9578,7 +9722,8 @@ ${input.slice(result.pos)}
|
|
|
9578
9722
|
return {
|
|
9579
9723
|
type: "SwitchExpression",
|
|
9580
9724
|
children: ["(()=>{", e.children, "})()"],
|
|
9581
|
-
|
|
9725
|
+
expression: e.expression,
|
|
9726
|
+
caseBlock: e.caseBlock
|
|
9582
9727
|
};
|
|
9583
9728
|
});
|
|
9584
9729
|
function SwitchExpression(state) {
|
|
@@ -11102,7 +11247,7 @@ ${input.slice(result.pos)}
|
|
|
11102
11247
|
return $0;
|
|
11103
11248
|
return { ts: true, children: $0 };
|
|
11104
11249
|
});
|
|
11105
|
-
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) {
|
|
11106
11251
|
if (!$3.ts)
|
|
11107
11252
|
return $0;
|
|
11108
11253
|
return { ts: true, children: $0 };
|
|
@@ -13775,7 +13920,7 @@ ${input.slice(result.pos)}
|
|
|
13775
13920
|
return result;
|
|
13776
13921
|
}
|
|
13777
13922
|
}
|
|
13778
|
-
var DotDot$0 = $
|
|
13923
|
+
var DotDot$0 = $TS($S($EXPECT($L114, fail, 'DotDot ".."'), $N($EXPECT($L4, fail, 'DotDot "."'))), function($skip, $loc, $0, $1, $2) {
|
|
13779
13924
|
return { $loc, token: $1 };
|
|
13780
13925
|
});
|
|
13781
13926
|
function DotDot(state) {
|
|
@@ -14200,6 +14345,30 @@ ${input.slice(result.pos)}
|
|
|
14200
14345
|
return result;
|
|
14201
14346
|
}
|
|
14202
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
|
+
}
|
|
14203
14372
|
var Loop$0 = $TS($S($EXPECT($L130, fail, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
14204
14373
|
return { $loc, token: "while(true)" };
|
|
14205
14374
|
});
|
|
@@ -16658,7 +16827,7 @@ ${input.slice(result.pos)}
|
|
|
16658
16827
|
}
|
|
16659
16828
|
var TypeDeclarationRest$0 = $S(TypeKeyword, $Q(TrailingComment), IdentifierName, $E(TypeParameters), __, Equals, $C($S($E(_), Type), $S(__, Type)));
|
|
16660
16829
|
var TypeDeclarationRest$1 = $S(Interface, $Q(TrailingComment), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock);
|
|
16661
|
-
var TypeDeclarationRest$2 = $S(Namespace, $Q(TrailingComment), IdentifierName,
|
|
16830
|
+
var TypeDeclarationRest$2 = $S(Namespace, $Q(TrailingComment), IdentifierName, ModuleBlock);
|
|
16662
16831
|
var TypeDeclarationRest$3 = FunctionSignature;
|
|
16663
16832
|
function TypeDeclarationRest(state) {
|
|
16664
16833
|
let eventData;
|
|
@@ -16682,7 +16851,11 @@ ${input.slice(result.pos)}
|
|
|
16682
16851
|
return result;
|
|
16683
16852
|
}
|
|
16684
16853
|
}
|
|
16685
|
-
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));
|
|
16686
16859
|
function TypeLexicalDeclaration(state) {
|
|
16687
16860
|
let eventData;
|
|
16688
16861
|
if (state.events) {
|
|
@@ -16694,12 +16867,12 @@ ${input.slice(result.pos)}
|
|
|
16694
16867
|
}
|
|
16695
16868
|
}
|
|
16696
16869
|
if (state.tokenize) {
|
|
16697
|
-
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));
|
|
16698
16871
|
if (state.events)
|
|
16699
16872
|
state.events.exit?.("TypeLexicalDeclaration", state, result, eventData);
|
|
16700
16873
|
return result;
|
|
16701
16874
|
} else {
|
|
16702
|
-
const result = TypeLexicalDeclaration$0(state);
|
|
16875
|
+
const result = TypeLexicalDeclaration$0(state) || TypeLexicalDeclaration$1(state) || TypeLexicalDeclaration$2(state) || TypeLexicalDeclaration$3(state) || TypeLexicalDeclaration$4(state);
|
|
16703
16876
|
if (state.events)
|
|
16704
16877
|
state.events.exit?.("TypeLexicalDeclaration", state, result, eventData);
|
|
16705
16878
|
return result;
|
|
@@ -16774,7 +16947,9 @@ ${input.slice(result.pos)}
|
|
|
16774
16947
|
return result;
|
|
16775
16948
|
}
|
|
16776
16949
|
}
|
|
16777
|
-
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
|
+
});
|
|
16778
16953
|
function TypeKeyword(state) {
|
|
16779
16954
|
let eventData;
|
|
16780
16955
|
if (state.events) {
|
|
@@ -16797,7 +16972,9 @@ ${input.slice(result.pos)}
|
|
|
16797
16972
|
return result;
|
|
16798
16973
|
}
|
|
16799
16974
|
}
|
|
16800
|
-
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
|
+
});
|
|
16801
16978
|
function Interface(state) {
|
|
16802
16979
|
let eventData;
|
|
16803
16980
|
if (state.events) {
|
|
@@ -16820,7 +16997,59 @@ ${input.slice(result.pos)}
|
|
|
16820
16997
|
return result;
|
|
16821
16998
|
}
|
|
16822
16999
|
}
|
|
16823
|
-
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
|
+
});
|
|
16824
17053
|
function Namespace(state) {
|
|
16825
17054
|
let eventData;
|
|
16826
17055
|
if (state.events) {
|
|
@@ -16992,13 +17221,63 @@ ${input.slice(result.pos)}
|
|
|
16992
17221
|
return result;
|
|
16993
17222
|
}
|
|
16994
17223
|
}
|
|
16995
|
-
var
|
|
16996
|
-
var
|
|
16997
|
-
|
|
16998
|
-
|
|
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) {
|
|
16999
17278
|
let eventData;
|
|
17000
17279
|
if (state.events) {
|
|
17001
|
-
const result = state.events.enter?.("
|
|
17280
|
+
const result = state.events.enter?.("NestedModuleItem", state);
|
|
17002
17281
|
if (result) {
|
|
17003
17282
|
if (result.cache)
|
|
17004
17283
|
return result.cache;
|
|
@@ -17006,27 +17285,52 @@ ${input.slice(result.pos)}
|
|
|
17006
17285
|
}
|
|
17007
17286
|
}
|
|
17008
17287
|
if (state.tokenize) {
|
|
17009
|
-
const result = $TOKEN("
|
|
17288
|
+
const result = $TOKEN("NestedModuleItem", state, NestedModuleItem$0(state));
|
|
17010
17289
|
if (state.events)
|
|
17011
|
-
state.events.exit?.("
|
|
17290
|
+
state.events.exit?.("NestedModuleItem", state, result, eventData);
|
|
17012
17291
|
return result;
|
|
17013
17292
|
} else {
|
|
17014
|
-
const result =
|
|
17293
|
+
const result = NestedModuleItem$0(state);
|
|
17015
17294
|
if (state.events)
|
|
17016
|
-
state.events.exit?.("
|
|
17295
|
+
state.events.exit?.("NestedModuleItem", state, result, eventData);
|
|
17017
17296
|
return result;
|
|
17018
17297
|
}
|
|
17019
17298
|
}
|
|
17020
|
-
var
|
|
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) {
|
|
17303
|
+
let eventData;
|
|
17304
|
+
if (state.events) {
|
|
17305
|
+
const result = state.events.enter?.("DeclareBlock", state);
|
|
17306
|
+
if (result) {
|
|
17307
|
+
if (result.cache)
|
|
17308
|
+
return result.cache;
|
|
17309
|
+
eventData = result.data;
|
|
17310
|
+
}
|
|
17311
|
+
}
|
|
17312
|
+
if (state.tokenize) {
|
|
17313
|
+
const result = $TOKEN("DeclareBlock", state, DeclareBlock$0(state) || DeclareBlock$1(state) || DeclareBlock$2(state));
|
|
17314
|
+
if (state.events)
|
|
17315
|
+
state.events.exit?.("DeclareBlock", state, result, eventData);
|
|
17316
|
+
return result;
|
|
17317
|
+
} else {
|
|
17318
|
+
const result = DeclareBlock$0(state) || DeclareBlock$1(state) || DeclareBlock$2(state);
|
|
17319
|
+
if (state.events)
|
|
17320
|
+
state.events.exit?.("DeclareBlock", state, result, eventData);
|
|
17321
|
+
return result;
|
|
17322
|
+
}
|
|
17323
|
+
}
|
|
17324
|
+
var NestedDeclareElements$0 = $TS($S(PushIndent, $Q(NestedDeclareElement), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
17021
17325
|
var decs = $2;
|
|
17022
17326
|
if (decs.length)
|
|
17023
17327
|
return decs;
|
|
17024
17328
|
return $skip;
|
|
17025
17329
|
});
|
|
17026
|
-
function
|
|
17330
|
+
function NestedDeclareElements(state) {
|
|
17027
17331
|
let eventData;
|
|
17028
17332
|
if (state.events) {
|
|
17029
|
-
const result = state.events.enter?.("
|
|
17333
|
+
const result = state.events.enter?.("NestedDeclareElements", state);
|
|
17030
17334
|
if (result) {
|
|
17031
17335
|
if (result.cache)
|
|
17032
17336
|
return result.cache;
|
|
@@ -17034,22 +17338,22 @@ ${input.slice(result.pos)}
|
|
|
17034
17338
|
}
|
|
17035
17339
|
}
|
|
17036
17340
|
if (state.tokenize) {
|
|
17037
|
-
const result = $TOKEN("
|
|
17341
|
+
const result = $TOKEN("NestedDeclareElements", state, NestedDeclareElements$0(state));
|
|
17038
17342
|
if (state.events)
|
|
17039
|
-
state.events.exit?.("
|
|
17343
|
+
state.events.exit?.("NestedDeclareElements", state, result, eventData);
|
|
17040
17344
|
return result;
|
|
17041
17345
|
} else {
|
|
17042
|
-
const result =
|
|
17346
|
+
const result = NestedDeclareElements$0(state);
|
|
17043
17347
|
if (state.events)
|
|
17044
|
-
state.events.exit?.("
|
|
17348
|
+
state.events.exit?.("NestedDeclareElements", state, result, eventData);
|
|
17045
17349
|
return result;
|
|
17046
17350
|
}
|
|
17047
17351
|
}
|
|
17048
|
-
var
|
|
17049
|
-
function
|
|
17352
|
+
var NestedDeclareElement$0 = $S(Nested, DeclareElement, InterfacePropertyDelimiter);
|
|
17353
|
+
function NestedDeclareElement(state) {
|
|
17050
17354
|
let eventData;
|
|
17051
17355
|
if (state.events) {
|
|
17052
|
-
const result = state.events.enter?.("
|
|
17356
|
+
const result = state.events.enter?.("NestedDeclareElement", state);
|
|
17053
17357
|
if (result) {
|
|
17054
17358
|
if (result.cache)
|
|
17055
17359
|
return result.cache;
|
|
@@ -17057,14 +17361,42 @@ ${input.slice(result.pos)}
|
|
|
17057
17361
|
}
|
|
17058
17362
|
}
|
|
17059
17363
|
if (state.tokenize) {
|
|
17060
|
-
const result = $TOKEN("
|
|
17364
|
+
const result = $TOKEN("NestedDeclareElement", state, NestedDeclareElement$0(state));
|
|
17061
17365
|
if (state.events)
|
|
17062
|
-
state.events.exit?.("
|
|
17366
|
+
state.events.exit?.("NestedDeclareElement", state, result, eventData);
|
|
17063
17367
|
return result;
|
|
17064
17368
|
} else {
|
|
17065
|
-
const result =
|
|
17369
|
+
const result = NestedDeclareElement$0(state);
|
|
17066
17370
|
if (state.events)
|
|
17067
|
-
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);
|
|
17068
17400
|
return result;
|
|
17069
17401
|
}
|
|
17070
17402
|
}
|
|
@@ -17118,6 +17450,9 @@ ${input.slice(result.pos)}
|
|
|
17118
17450
|
var TypeSuffix$0 = $T($S($E(QuestionMark), $E(_), Colon, Type), function(value) {
|
|
17119
17451
|
return { "type": "TypeSuffix", "ts": true, "children": value };
|
|
17120
17452
|
});
|
|
17453
|
+
var TypeSuffix$1 = $T($S(QuestionMark, $E(_)), function(value) {
|
|
17454
|
+
return { "type": "TypeSuffix", "ts": true, "children": value };
|
|
17455
|
+
});
|
|
17121
17456
|
function TypeSuffix(state) {
|
|
17122
17457
|
let eventData;
|
|
17123
17458
|
if (state.events) {
|
|
@@ -17129,18 +17464,18 @@ ${input.slice(result.pos)}
|
|
|
17129
17464
|
}
|
|
17130
17465
|
}
|
|
17131
17466
|
if (state.tokenize) {
|
|
17132
|
-
const result = $TOKEN("TypeSuffix", state, TypeSuffix$0(state));
|
|
17467
|
+
const result = $TOKEN("TypeSuffix", state, TypeSuffix$0(state) || TypeSuffix$1(state));
|
|
17133
17468
|
if (state.events)
|
|
17134
17469
|
state.events.exit?.("TypeSuffix", state, result, eventData);
|
|
17135
17470
|
return result;
|
|
17136
17471
|
} else {
|
|
17137
|
-
const result = TypeSuffix$0(state);
|
|
17472
|
+
const result = TypeSuffix$0(state) || TypeSuffix$1(state);
|
|
17138
17473
|
if (state.events)
|
|
17139
17474
|
state.events.exit?.("TypeSuffix", state, result, eventData);
|
|
17140
17475
|
return result;
|
|
17141
17476
|
}
|
|
17142
17477
|
}
|
|
17143
|
-
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) {
|
|
17144
17479
|
var asserts = $3;
|
|
17145
17480
|
var t = $4;
|
|
17146
17481
|
if (asserts) {
|
|
@@ -17314,9 +17649,9 @@ ${input.slice(result.pos)}
|
|
|
17314
17649
|
return result;
|
|
17315
17650
|
}
|
|
17316
17651
|
}
|
|
17317
|
-
var TypeUnaryOp$0 = $S($EXPECT($
|
|
17652
|
+
var TypeUnaryOp$0 = $S($EXPECT($L177, fail, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
17318
17653
|
var TypeUnaryOp$1 = $S($EXPECT($L157, fail, 'TypeUnaryOp "typeof"'), NonIdContinue);
|
|
17319
|
-
var TypeUnaryOp$2 = $S($EXPECT($
|
|
17654
|
+
var TypeUnaryOp$2 = $S($EXPECT($L178, fail, 'TypeUnaryOp "infer"'), NonIdContinue);
|
|
17320
17655
|
var TypeUnaryOp$3 = $S($EXPECT($L141, fail, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
17321
17656
|
function TypeUnaryOp(state) {
|
|
17322
17657
|
let eventData;
|
|
@@ -17562,7 +17897,7 @@ ${input.slice(result.pos)}
|
|
|
17562
17897
|
var TypeLiteral$2 = $TS($S($EXPECT($L161, fail, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
17563
17898
|
return { type: "VoidType", $loc, token: $1 };
|
|
17564
17899
|
});
|
|
17565
|
-
var TypeLiteral$3 = $TV($EXPECT($
|
|
17900
|
+
var TypeLiteral$3 = $TV($EXPECT($L179, fail, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
17566
17901
|
return { $loc, token: "[]" };
|
|
17567
17902
|
});
|
|
17568
17903
|
function TypeLiteral(state) {
|
|
@@ -18022,7 +18357,7 @@ ${input.slice(result.pos)}
|
|
|
18022
18357
|
return result;
|
|
18023
18358
|
}
|
|
18024
18359
|
}
|
|
18025
|
-
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) {
|
|
18026
18361
|
var options = $3;
|
|
18027
18362
|
return {
|
|
18028
18363
|
type: "CivetPrologue",
|
|
@@ -19615,6 +19950,9 @@ ${input.slice(result.pos)}
|
|
|
19615
19950
|
else
|
|
19616
19951
|
exp.children.push([" else {\n", indent, ref, ".push(undefined)\n", indent, "}"]);
|
|
19617
19952
|
return;
|
|
19953
|
+
case "PatternMatchingStatement":
|
|
19954
|
+
insertPush(exp.children[0][0], ref);
|
|
19955
|
+
return;
|
|
19618
19956
|
case "SwitchStatement":
|
|
19619
19957
|
insertPush(exp.children[2], ref);
|
|
19620
19958
|
return;
|
|
@@ -19702,6 +20040,9 @@ ${input.slice(result.pos)}
|
|
|
19702
20040
|
else
|
|
19703
20041
|
exp.children.push(["\n", indent, wrapWithReturn()]);
|
|
19704
20042
|
return;
|
|
20043
|
+
case "PatternMatchingStatement":
|
|
20044
|
+
insertReturn(exp.children[0][0]);
|
|
20045
|
+
return;
|
|
19705
20046
|
case "SwitchStatement":
|
|
19706
20047
|
insertSwitchReturns(exp);
|
|
19707
20048
|
return;
|
|
@@ -20629,7 +20970,7 @@ ${input.slice(result.pos)}
|
|
|
20629
20970
|
}
|
|
20630
20971
|
}
|
|
20631
20972
|
function processPatternMatching(statements) {
|
|
20632
|
-
gatherRecursiveAll(statements, (n) => n.type === "SwitchStatement").forEach((s) => {
|
|
20973
|
+
gatherRecursiveAll(statements, (n) => n.type === "SwitchStatement" || n.type === "SwitchExpression").forEach((s) => {
|
|
20633
20974
|
const { caseBlock } = s;
|
|
20634
20975
|
const { clauses } = caseBlock;
|
|
20635
20976
|
let errors = false;
|
|
@@ -20708,15 +21049,21 @@ ${input.slice(result.pos)}
|
|
|
20708
21049
|
block.children.push("}");
|
|
20709
21050
|
block.bare = false;
|
|
20710
21051
|
}
|
|
20711
|
-
|
|
20712
|
-
|
|
21052
|
+
if (i < l - 1)
|
|
21053
|
+
next.push("\n", "else ");
|
|
21054
|
+
prev.push(["", {
|
|
20713
21055
|
type: "IfStatement",
|
|
20714
|
-
children: ["if", condition, block,
|
|
21056
|
+
children: ["if", condition, block, next],
|
|
20715
21057
|
then: block,
|
|
20716
|
-
else:
|
|
20717
|
-
});
|
|
21058
|
+
else: next
|
|
21059
|
+
}]);
|
|
20718
21060
|
prev = next;
|
|
20719
21061
|
});
|
|
21062
|
+
if (module2.config.implicitReturns && s.type === "SwitchExpression") {
|
|
21063
|
+
insertReturn(root[0]);
|
|
21064
|
+
root.unshift("(()=>{");
|
|
21065
|
+
root.push("})()");
|
|
21066
|
+
}
|
|
20720
21067
|
s.type = "PatternMatchingStatement";
|
|
20721
21068
|
s.children = [root];
|
|
20722
21069
|
});
|
|
@@ -20769,10 +21116,10 @@ ${input.slice(result.pos)}
|
|
|
20769
21116
|
addParentPointers(statements);
|
|
20770
21117
|
processPipelineExpressions(statements);
|
|
20771
21118
|
processAssignments(statements);
|
|
21119
|
+
processPatternMatching(statements);
|
|
20772
21120
|
processFunctions(statements);
|
|
20773
21121
|
processSwitchExpressions(statements);
|
|
20774
21122
|
processTryExpressions(statements);
|
|
20775
|
-
processPatternMatching(statements);
|
|
20776
21123
|
gatherRecursiveAll(statements, (n) => n.type === "IterationExpression").forEach((e) => expressionizeIteration(e));
|
|
20777
21124
|
checkSpliceRef(statements);
|
|
20778
21125
|
statements.unshift(...module2.prelude);
|
|
@@ -20971,6 +21318,15 @@ ${input.slice(result.pos)}
|
|
|
20971
21318
|
module2.gatherBindingCode = gatherBindingCode;
|
|
20972
21319
|
module2.constructInvocation = function(fn, arg) {
|
|
20973
21320
|
const fnArr = [fn.leadingComment, fn.expr, fn.trailingComment];
|
|
21321
|
+
if (fn.expr.ampersandBlock) {
|
|
21322
|
+
const [ref, , prefix, rhs] = fn.expr.children;
|
|
21323
|
+
ref.type = "PipedExpression";
|
|
21324
|
+
ref.children = [module2.makeLeftHandSideExpression(arg)];
|
|
21325
|
+
return {
|
|
21326
|
+
type: "UnwrappedExpression",
|
|
21327
|
+
children: [module2.skipIfOnlyWS(fn.leadingComment), prefix, rhs, module2.skipIfOnlyWS(fn.trailingComment)]
|
|
21328
|
+
};
|
|
21329
|
+
}
|
|
20974
21330
|
const lhs = module2.makeLeftHandSideExpression(fn.expr);
|
|
20975
21331
|
let comment = module2.skipIfOnlyWS(fn.trailingComment);
|
|
20976
21332
|
if (comment)
|
|
@@ -20980,10 +21336,7 @@ ${input.slice(result.pos)}
|
|
|
20980
21336
|
lhs.children.splice(1, 0, comment);
|
|
20981
21337
|
switch (arg.type) {
|
|
20982
21338
|
case "CommaExpression":
|
|
20983
|
-
arg =
|
|
20984
|
-
type: "ParenthesizedExpression",
|
|
20985
|
-
children: ["(", arg, ")"]
|
|
20986
|
-
};
|
|
21339
|
+
arg = module2.makeLeftHandSideExpression(arg);
|
|
20987
21340
|
break;
|
|
20988
21341
|
}
|
|
20989
21342
|
return {
|
|
@@ -21704,7 +22057,7 @@ var parse;
|
|
|
21704
22057
|
var uncacheable;
|
|
21705
22058
|
({ parse } = import_parser.default);
|
|
21706
22059
|
({ SourceMap: SourceMap2, base64Encode: base64Encode2 } = util_exports);
|
|
21707
|
-
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"]);
|
|
21708
22061
|
var compile = function(src, options) {
|
|
21709
22062
|
var ast, code, events, filename, ref, result, sm, srcMapJSON;
|
|
21710
22063
|
if (!options) {
|