firefly-compiler 0.4.19 → 0.4.21
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/compiler/Builder.ff +23 -13
- package/compiler/JsEmitter.ff +120 -76
- package/compiler/LspHook.ff +17 -3
- package/compiler/Main.ff +13 -7
- package/compiler/Parser.ff +11 -13
- package/compiler/Resolver.ff +15 -15
- package/compiler/Syntax.ff +1 -0
- package/core/Array.ff +6 -4
- package/core/Int.ff +12 -12
- package/core/Json.ff +2 -2
- package/core/List.ff +6 -4
- package/experimental/benchmarks/ListGrab.ff +23 -0
- package/experimental/benchmarks/ListGrab.java +55 -0
- package/experimental/benchmarks/Pyrotek45.ff +30 -0
- package/experimental/benchmarks/Pyrotek45.java +64 -0
- package/experimental/tests/TestJson.ff +26 -0
- package/lsp/CompletionHandler.ff +14 -14
- package/lsp/Handler.ff +56 -60
- package/lsp/SignatureHelpHandler.ff +5 -4
- package/lsp/SymbolHandler.ff +18 -4
- package/lsp/TestReferences.ff +15 -0
- package/lsp/TestReferencesCase.ff +8 -0
- package/output/js/ff/compiler/Builder.mjs +50 -44
- package/output/js/ff/compiler/Dependencies.mjs +0 -2
- package/output/js/ff/compiler/Deriver.mjs +16 -140
- package/output/js/ff/compiler/Dictionaries.mjs +8 -222
- package/output/js/ff/compiler/Environment.mjs +12 -154
- package/output/js/ff/compiler/Inference.mjs +127 -1013
- package/output/js/ff/compiler/JsEmitter.mjs +434 -2344
- package/output/js/ff/compiler/JsImporter.mjs +0 -12
- package/output/js/ff/compiler/LspHook.mjs +548 -151
- package/output/js/ff/compiler/Main.mjs +96 -550
- package/output/js/ff/compiler/Parser.mjs +58 -390
- package/output/js/ff/compiler/Patterns.mjs +20 -200
- package/output/js/ff/compiler/Resolver.mjs +26 -340
- package/output/js/ff/compiler/Substitution.mjs +2 -160
- package/output/js/ff/compiler/Syntax.mjs +449 -3293
- package/output/js/ff/compiler/Token.mjs +9 -1095
- package/output/js/ff/compiler/Tokenizer.mjs +4 -2
- package/output/js/ff/compiler/Unification.mjs +26 -360
- package/output/js/ff/compiler/Wildcards.mjs +0 -86
- package/output/js/ff/compiler/Workspace.mjs +8 -96
- package/output/js/ff/core/Array.mjs +15 -8
- package/output/js/ff/core/AssetSystem.mjs +4 -14
- package/output/js/ff/core/Bool.mjs +0 -12
- package/output/js/ff/core/Core.mjs +0 -30
- package/output/js/ff/core/Int.mjs +24 -24
- package/output/js/ff/core/IntMap.mjs +0 -8
- package/output/js/ff/core/Json.mjs +2 -42
- package/output/js/ff/core/List.mjs +23 -32
- package/output/js/ff/core/Lock.mjs +0 -10
- package/output/js/ff/core/Map.mjs +0 -24
- package/output/js/ff/core/Option.mjs +10 -286
- package/output/js/ff/core/Ordering.mjs +16 -158
- package/output/js/ff/core/Pair.mjs +2 -34
- package/output/js/ff/core/Path.mjs +2 -28
- package/output/js/ff/core/Random.mjs +4 -4
- package/output/js/ff/core/RbMap.mjs +56 -644
- package/output/js/ff/core/Show.mjs +0 -16
- package/output/js/ff/core/Stream.mjs +14 -144
- package/output/js/ff/core/StringMap.mjs +0 -8
- package/output/js/ff/core/Try.mjs +4 -108
- package/output/js/ff/core/Unit.mjs +2 -16
- package/package.json +1 -1
- package/postgresql/Pg.ff +23 -23
- package/vscode/client/src/extension.ts +30 -2
- package/vscode/package.json +17 -1
- package/core/Stack.ff +0 -250
|
@@ -113,6 +113,42 @@ export function Box(value_) {
|
|
|
113
113
|
return {value_};
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
// type DocumentSymbolKind
|
|
117
|
+
export function SLet(mutable_) {
|
|
118
|
+
return {SLet: true, mutable_};
|
|
119
|
+
}
|
|
120
|
+
export function SFunction(member_) {
|
|
121
|
+
return {SFunction: true, member_};
|
|
122
|
+
}
|
|
123
|
+
const SExtend$ = {SExtend: true};
|
|
124
|
+
export function SExtend() {
|
|
125
|
+
return SExtend$;
|
|
126
|
+
}
|
|
127
|
+
const STraitFunction$ = {STraitFunction: true};
|
|
128
|
+
export function STraitFunction() {
|
|
129
|
+
return STraitFunction$;
|
|
130
|
+
}
|
|
131
|
+
const STrait$ = {STrait: true};
|
|
132
|
+
export function STrait() {
|
|
133
|
+
return STrait$;
|
|
134
|
+
}
|
|
135
|
+
const SInstance$ = {SInstance: true};
|
|
136
|
+
export function SInstance() {
|
|
137
|
+
return SInstance$;
|
|
138
|
+
}
|
|
139
|
+
const SVariant$ = {SVariant: true};
|
|
140
|
+
export function SVariant() {
|
|
141
|
+
return SVariant$;
|
|
142
|
+
}
|
|
143
|
+
const SType$ = {SType: true};
|
|
144
|
+
export function SType() {
|
|
145
|
+
return SType$;
|
|
146
|
+
}
|
|
147
|
+
const SParameter$ = {SParameter: true};
|
|
148
|
+
export function SParameter() {
|
|
149
|
+
return SParameter$;
|
|
150
|
+
}
|
|
151
|
+
|
|
116
152
|
// type ResultHook
|
|
117
153
|
const ParseSymbolBegin$ = {ParseSymbolBegin: true};
|
|
118
154
|
export function ParseSymbolBegin() {
|
|
@@ -124,8 +160,8 @@ return {ParseSymbolEnd: true, name_, kind_, selectionStart_, selectionEnd_, star
|
|
|
124
160
|
export function ParseArgumentHook(callAt_, argumentIndex_, parameterName_) {
|
|
125
161
|
return {ParseArgumentHook: true, callAt_, argumentIndex_, parameterName_};
|
|
126
162
|
}
|
|
127
|
-
export function ResolveSymbolHook(symbol_, annotation_) {
|
|
128
|
-
return {ResolveSymbolHook: true, symbol_, annotation_};
|
|
163
|
+
export function ResolveSymbolHook(symbol_, annotation_, topLevel_) {
|
|
164
|
+
return {ResolveSymbolHook: true, symbol_, annotation_, topLevel_};
|
|
129
165
|
}
|
|
130
166
|
export function ResolveTypeHook(types_, typeGenerics_, symbol_, explicitType_) {
|
|
131
167
|
return {ResolveTypeHook: true, types_, typeGenerics_, symbol_, explicitType_};
|
|
@@ -133,8 +169,8 @@ return {ResolveTypeHook: true, types_, typeGenerics_, symbol_, explicitType_};
|
|
|
133
169
|
export function ResolveConstraintHook(symbol_, constrant_) {
|
|
134
170
|
return {ResolveConstraintHook: true, symbol_, constrant_};
|
|
135
171
|
}
|
|
136
|
-
export function ResolveSignatureHook(signature_, isInstanceMethod_) {
|
|
137
|
-
return {ResolveSignatureHook: true, signature_, isInstanceMethod_};
|
|
172
|
+
export function ResolveSignatureHook(signature_, isInstanceMethod_, topLevel_) {
|
|
173
|
+
return {ResolveSignatureHook: true, signature_, isInstanceMethod_, topLevel_};
|
|
138
174
|
}
|
|
139
175
|
export function ResolveVariantFieldHook(symbol_, type_, commonField_) {
|
|
140
176
|
return {ResolveVariantFieldHook: true, symbol_, type_, commonField_};
|
|
@@ -186,9 +222,7 @@ return (((at_.file_ === afterAt_.file_) && (((at_.line_ === afterAt_.line_) && (
|
|
|
186
222
|
}
|
|
187
223
|
|
|
188
224
|
export function showHook_(hook_) {
|
|
189
|
-
{
|
|
190
225
|
const hook_a = hook_;
|
|
191
|
-
{
|
|
192
226
|
if(hook_a.InferArgumentHook) {
|
|
193
227
|
const unification_ = hook_a.unification_;
|
|
194
228
|
const environment_ = hook_a.environment_;
|
|
@@ -199,29 +233,20 @@ const parameters_ = hook_a.parameters_;
|
|
|
199
233
|
const arguments_ = hook_a.arguments_;
|
|
200
234
|
const argumentIndex_ = hook_a.argumentIndex_;
|
|
201
235
|
return "InferArgumentHook(...)"
|
|
202
|
-
return
|
|
203
236
|
}
|
|
204
|
-
}
|
|
205
|
-
{
|
|
206
237
|
if(hook_a.InferFunctionDefinitionHook) {
|
|
207
238
|
const unification_ = hook_a.unification_;
|
|
208
239
|
const environment_ = hook_a.environment_;
|
|
209
240
|
const definition_ = hook_a.definition_;
|
|
210
241
|
const missing_ = hook_a.missing_;
|
|
211
242
|
return "InferFunctionDefinitionHook(...)"
|
|
212
|
-
return
|
|
213
|
-
}
|
|
214
243
|
}
|
|
215
|
-
{
|
|
216
244
|
if(hook_a.InferLambdaStartHook) {
|
|
217
245
|
const unification_ = hook_a.unification_;
|
|
218
246
|
const environment_ = hook_a.environment_;
|
|
219
247
|
const lambdaType_ = hook_a.lambdaType_;
|
|
220
248
|
return "InferLambdaStartHook(...)"
|
|
221
|
-
return
|
|
222
|
-
}
|
|
223
249
|
}
|
|
224
|
-
{
|
|
225
250
|
if(hook_a.InferLookupHook) {
|
|
226
251
|
const unification_ = hook_a.unification_;
|
|
227
252
|
const environment_ = hook_a.environment_;
|
|
@@ -230,30 +255,21 @@ const selfVariable_ = hook_a.selfVariable_;
|
|
|
230
255
|
const symbol_ = hook_a.symbol_;
|
|
231
256
|
const instantiated_ = hook_a.instantiated_;
|
|
232
257
|
return "InferLookupHook(...)"
|
|
233
|
-
return
|
|
234
|
-
}
|
|
235
258
|
}
|
|
236
|
-
{
|
|
237
259
|
if(hook_a.InferParameterHook) {
|
|
238
260
|
const unification_ = hook_a.unification_;
|
|
239
261
|
const environment_ = hook_a.environment_;
|
|
240
262
|
const parameter_ = hook_a.parameter_;
|
|
241
263
|
const missing_ = hook_a.missing_;
|
|
242
264
|
return "InferParameterHook(...)"
|
|
243
|
-
return
|
|
244
|
-
}
|
|
245
265
|
}
|
|
246
|
-
{
|
|
247
266
|
if(hook_a.InferPatternHook) {
|
|
248
267
|
const unification_ = hook_a.unification_;
|
|
249
268
|
const environment_ = hook_a.environment_;
|
|
250
269
|
const expected_ = hook_a.expected_;
|
|
251
270
|
const pattern_ = hook_a.pattern_;
|
|
252
271
|
return "InferPatternHook(...)"
|
|
253
|
-
return
|
|
254
272
|
}
|
|
255
|
-
}
|
|
256
|
-
{
|
|
257
273
|
if(hook_a.InferRecordFieldHook) {
|
|
258
274
|
const unification_ = hook_a.unification_;
|
|
259
275
|
const environment_ = hook_a.environment_;
|
|
@@ -261,19 +277,13 @@ const expected_ = hook_a.expected_;
|
|
|
261
277
|
const recordType_ = hook_a.recordType_;
|
|
262
278
|
const fieldName_ = hook_a.fieldName_;
|
|
263
279
|
return "InferRecordFieldHook(...)"
|
|
264
|
-
return
|
|
265
|
-
}
|
|
266
280
|
}
|
|
267
|
-
{
|
|
268
281
|
if(hook_a.InferSequentialStartHook) {
|
|
269
282
|
const unification_ = hook_a.unification_;
|
|
270
283
|
const term_ = hook_a.term_;
|
|
271
284
|
const missing_ = hook_a.missing_;
|
|
272
285
|
return "InferSequentialStartHook(...)"
|
|
273
|
-
return
|
|
274
|
-
}
|
|
275
286
|
}
|
|
276
|
-
{
|
|
277
287
|
if(hook_a.InferTermHook) {
|
|
278
288
|
const unification_ = hook_a.unification_;
|
|
279
289
|
const environment_ = hook_a.environment_;
|
|
@@ -282,25 +292,16 @@ const term_ = hook_a.term_;
|
|
|
282
292
|
const recordType_ = hook_a.recordType_;
|
|
283
293
|
const missing_ = hook_a.missing_;
|
|
284
294
|
return "InferTermHook(...)"
|
|
285
|
-
return
|
|
286
|
-
}
|
|
287
295
|
}
|
|
288
|
-
{
|
|
289
296
|
if(hook_a.ParseArgumentHook) {
|
|
290
297
|
const callAt_ = hook_a.callAt_;
|
|
291
298
|
const argumentIndex_ = hook_a.argumentIndex_;
|
|
292
299
|
const parameterName_ = hook_a.parameterName_;
|
|
293
300
|
return "ParseArgumentHook(...)"
|
|
294
|
-
return
|
|
295
|
-
}
|
|
296
301
|
}
|
|
297
|
-
{
|
|
298
302
|
if(hook_a.ParseSymbolBegin) {
|
|
299
303
|
return "ParseSymbolBegin(...)"
|
|
300
|
-
return
|
|
301
|
-
}
|
|
302
304
|
}
|
|
303
|
-
{
|
|
304
305
|
if(hook_a.ParseSymbolEnd) {
|
|
305
306
|
const name_ = hook_a.name_;
|
|
306
307
|
const kind_ = hook_a.kind_;
|
|
@@ -309,51 +310,33 @@ const selectionEnd_ = hook_a.selectionEnd_;
|
|
|
309
310
|
const start_ = hook_a.start_;
|
|
310
311
|
const end_ = hook_a.end_;
|
|
311
312
|
return "ParseSymbolEnd(...)"
|
|
312
|
-
return
|
|
313
|
-
}
|
|
314
313
|
}
|
|
315
|
-
{
|
|
316
314
|
if(hook_a.ResolveConstraintHook) {
|
|
317
315
|
const symbol_ = hook_a.symbol_;
|
|
318
316
|
const constrant_ = hook_a.constrant_;
|
|
319
317
|
return "ResolveConstraintHook(...)"
|
|
320
|
-
return
|
|
321
|
-
}
|
|
322
318
|
}
|
|
323
|
-
{
|
|
324
319
|
if(hook_a.ResolveSignatureHook) {
|
|
325
320
|
const signature_ = hook_a.signature_;
|
|
326
321
|
return "ResolveSignatureHook(...)"
|
|
327
|
-
return
|
|
328
|
-
}
|
|
329
322
|
}
|
|
330
|
-
{
|
|
331
323
|
if(hook_a.ResolveSymbolHook) {
|
|
332
324
|
const symbol_ = hook_a.symbol_;
|
|
333
325
|
const annotation_ = hook_a.annotation_;
|
|
334
326
|
return "ResolveSymbolHook(...)"
|
|
335
|
-
return
|
|
336
327
|
}
|
|
337
|
-
}
|
|
338
|
-
{
|
|
339
328
|
if(hook_a.ResolveTypeHook) {
|
|
340
329
|
const types_ = hook_a.types_;
|
|
341
330
|
const typeGenerics_ = hook_a.typeGenerics_;
|
|
342
331
|
const symbol_ = hook_a.symbol_;
|
|
343
332
|
const explicitType_ = hook_a.explicitType_;
|
|
344
333
|
return "ResolveTypeHook(...)"
|
|
345
|
-
return
|
|
346
334
|
}
|
|
347
|
-
}
|
|
348
|
-
{
|
|
349
335
|
if(hook_a.ResolveVariantFieldHook) {
|
|
350
336
|
const symbol_ = hook_a.symbol_;
|
|
351
337
|
const type_ = hook_a.type_;
|
|
352
338
|
const commonField_ = hook_a.commonField_;
|
|
353
339
|
return "ResolveVariantFieldHook(...)"
|
|
354
|
-
return
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
340
|
}
|
|
358
341
|
}
|
|
359
342
|
|
|
@@ -374,9 +357,7 @@ return (((at_.file_ === afterAt_.file_) && (((at_.line_ === afterAt_.line_) && (
|
|
|
374
357
|
}
|
|
375
358
|
|
|
376
359
|
export async function showHook_$(hook_, $task) {
|
|
377
|
-
{
|
|
378
360
|
const hook_a = hook_;
|
|
379
|
-
{
|
|
380
361
|
if(hook_a.InferArgumentHook) {
|
|
381
362
|
const unification_ = hook_a.unification_;
|
|
382
363
|
const environment_ = hook_a.environment_;
|
|
@@ -387,29 +368,20 @@ const parameters_ = hook_a.parameters_;
|
|
|
387
368
|
const arguments_ = hook_a.arguments_;
|
|
388
369
|
const argumentIndex_ = hook_a.argumentIndex_;
|
|
389
370
|
return "InferArgumentHook(...)"
|
|
390
|
-
return
|
|
391
|
-
}
|
|
392
371
|
}
|
|
393
|
-
{
|
|
394
372
|
if(hook_a.InferFunctionDefinitionHook) {
|
|
395
373
|
const unification_ = hook_a.unification_;
|
|
396
374
|
const environment_ = hook_a.environment_;
|
|
397
375
|
const definition_ = hook_a.definition_;
|
|
398
376
|
const missing_ = hook_a.missing_;
|
|
399
377
|
return "InferFunctionDefinitionHook(...)"
|
|
400
|
-
return
|
|
401
|
-
}
|
|
402
378
|
}
|
|
403
|
-
{
|
|
404
379
|
if(hook_a.InferLambdaStartHook) {
|
|
405
380
|
const unification_ = hook_a.unification_;
|
|
406
381
|
const environment_ = hook_a.environment_;
|
|
407
382
|
const lambdaType_ = hook_a.lambdaType_;
|
|
408
383
|
return "InferLambdaStartHook(...)"
|
|
409
|
-
return
|
|
410
|
-
}
|
|
411
384
|
}
|
|
412
|
-
{
|
|
413
385
|
if(hook_a.InferLookupHook) {
|
|
414
386
|
const unification_ = hook_a.unification_;
|
|
415
387
|
const environment_ = hook_a.environment_;
|
|
@@ -418,30 +390,21 @@ const selfVariable_ = hook_a.selfVariable_;
|
|
|
418
390
|
const symbol_ = hook_a.symbol_;
|
|
419
391
|
const instantiated_ = hook_a.instantiated_;
|
|
420
392
|
return "InferLookupHook(...)"
|
|
421
|
-
return
|
|
422
|
-
}
|
|
423
393
|
}
|
|
424
|
-
{
|
|
425
394
|
if(hook_a.InferParameterHook) {
|
|
426
395
|
const unification_ = hook_a.unification_;
|
|
427
396
|
const environment_ = hook_a.environment_;
|
|
428
397
|
const parameter_ = hook_a.parameter_;
|
|
429
398
|
const missing_ = hook_a.missing_;
|
|
430
399
|
return "InferParameterHook(...)"
|
|
431
|
-
return
|
|
432
400
|
}
|
|
433
|
-
}
|
|
434
|
-
{
|
|
435
401
|
if(hook_a.InferPatternHook) {
|
|
436
402
|
const unification_ = hook_a.unification_;
|
|
437
403
|
const environment_ = hook_a.environment_;
|
|
438
404
|
const expected_ = hook_a.expected_;
|
|
439
405
|
const pattern_ = hook_a.pattern_;
|
|
440
406
|
return "InferPatternHook(...)"
|
|
441
|
-
return
|
|
442
|
-
}
|
|
443
407
|
}
|
|
444
|
-
{
|
|
445
408
|
if(hook_a.InferRecordFieldHook) {
|
|
446
409
|
const unification_ = hook_a.unification_;
|
|
447
410
|
const environment_ = hook_a.environment_;
|
|
@@ -449,19 +412,13 @@ const expected_ = hook_a.expected_;
|
|
|
449
412
|
const recordType_ = hook_a.recordType_;
|
|
450
413
|
const fieldName_ = hook_a.fieldName_;
|
|
451
414
|
return "InferRecordFieldHook(...)"
|
|
452
|
-
return
|
|
453
|
-
}
|
|
454
415
|
}
|
|
455
|
-
{
|
|
456
416
|
if(hook_a.InferSequentialStartHook) {
|
|
457
417
|
const unification_ = hook_a.unification_;
|
|
458
418
|
const term_ = hook_a.term_;
|
|
459
419
|
const missing_ = hook_a.missing_;
|
|
460
420
|
return "InferSequentialStartHook(...)"
|
|
461
|
-
return
|
|
462
|
-
}
|
|
463
421
|
}
|
|
464
|
-
{
|
|
465
422
|
if(hook_a.InferTermHook) {
|
|
466
423
|
const unification_ = hook_a.unification_;
|
|
467
424
|
const environment_ = hook_a.environment_;
|
|
@@ -470,25 +427,16 @@ const term_ = hook_a.term_;
|
|
|
470
427
|
const recordType_ = hook_a.recordType_;
|
|
471
428
|
const missing_ = hook_a.missing_;
|
|
472
429
|
return "InferTermHook(...)"
|
|
473
|
-
return
|
|
474
|
-
}
|
|
475
430
|
}
|
|
476
|
-
{
|
|
477
431
|
if(hook_a.ParseArgumentHook) {
|
|
478
432
|
const callAt_ = hook_a.callAt_;
|
|
479
433
|
const argumentIndex_ = hook_a.argumentIndex_;
|
|
480
434
|
const parameterName_ = hook_a.parameterName_;
|
|
481
435
|
return "ParseArgumentHook(...)"
|
|
482
|
-
return
|
|
483
|
-
}
|
|
484
436
|
}
|
|
485
|
-
{
|
|
486
437
|
if(hook_a.ParseSymbolBegin) {
|
|
487
438
|
return "ParseSymbolBegin(...)"
|
|
488
|
-
return
|
|
489
|
-
}
|
|
490
439
|
}
|
|
491
|
-
{
|
|
492
440
|
if(hook_a.ParseSymbolEnd) {
|
|
493
441
|
const name_ = hook_a.name_;
|
|
494
442
|
const kind_ = hook_a.kind_;
|
|
@@ -497,51 +445,33 @@ const selectionEnd_ = hook_a.selectionEnd_;
|
|
|
497
445
|
const start_ = hook_a.start_;
|
|
498
446
|
const end_ = hook_a.end_;
|
|
499
447
|
return "ParseSymbolEnd(...)"
|
|
500
|
-
return
|
|
501
|
-
}
|
|
502
448
|
}
|
|
503
|
-
{
|
|
504
449
|
if(hook_a.ResolveConstraintHook) {
|
|
505
450
|
const symbol_ = hook_a.symbol_;
|
|
506
451
|
const constrant_ = hook_a.constrant_;
|
|
507
452
|
return "ResolveConstraintHook(...)"
|
|
508
|
-
return
|
|
509
|
-
}
|
|
510
453
|
}
|
|
511
|
-
{
|
|
512
454
|
if(hook_a.ResolveSignatureHook) {
|
|
513
455
|
const signature_ = hook_a.signature_;
|
|
514
456
|
return "ResolveSignatureHook(...)"
|
|
515
|
-
return
|
|
516
457
|
}
|
|
517
|
-
}
|
|
518
|
-
{
|
|
519
458
|
if(hook_a.ResolveSymbolHook) {
|
|
520
459
|
const symbol_ = hook_a.symbol_;
|
|
521
460
|
const annotation_ = hook_a.annotation_;
|
|
522
461
|
return "ResolveSymbolHook(...)"
|
|
523
|
-
return
|
|
524
462
|
}
|
|
525
|
-
}
|
|
526
|
-
{
|
|
527
463
|
if(hook_a.ResolveTypeHook) {
|
|
528
464
|
const types_ = hook_a.types_;
|
|
529
465
|
const typeGenerics_ = hook_a.typeGenerics_;
|
|
530
466
|
const symbol_ = hook_a.symbol_;
|
|
531
467
|
const explicitType_ = hook_a.explicitType_;
|
|
532
468
|
return "ResolveTypeHook(...)"
|
|
533
|
-
return
|
|
534
469
|
}
|
|
535
|
-
}
|
|
536
|
-
{
|
|
537
470
|
if(hook_a.ResolveVariantFieldHook) {
|
|
538
471
|
const symbol_ = hook_a.symbol_;
|
|
539
472
|
const type_ = hook_a.type_;
|
|
540
473
|
const commonField_ = hook_a.commonField_;
|
|
541
474
|
return "ResolveVariantFieldHook(...)"
|
|
542
|
-
return
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
475
|
}
|
|
546
476
|
}
|
|
547
477
|
|
|
@@ -594,77 +524,185 @@ return ff_core_Any.internalAnyTag_((("ff:compiler/LspHook.SymbolHook" + "[") + "
|
|
|
594
524
|
}
|
|
595
525
|
};
|
|
596
526
|
|
|
527
|
+
export const ff_core_Any_HasAnyTag$ff_compiler_LspHook_DocumentSymbolKind = {
|
|
528
|
+
anyTag_() {
|
|
529
|
+
return ff_core_Any.internalAnyTag_((("ff:compiler/LspHook.DocumentSymbolKind" + "[") + "]"))
|
|
530
|
+
},
|
|
531
|
+
async anyTag_$($task) {
|
|
532
|
+
return ff_core_Any.internalAnyTag_((("ff:compiler/LspHook.DocumentSymbolKind" + "[") + "]"))
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
|
|
597
536
|
export const ff_core_Show_Show$ff_compiler_LspHook_SymbolHook = {
|
|
598
537
|
show_(value_) {
|
|
599
|
-
{
|
|
600
538
|
const value_a = value_;
|
|
601
539
|
{
|
|
602
540
|
const z_ = value_a;
|
|
603
541
|
return ((((((("SymbolHook" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.qualifiedName_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Location.show_(z_.usageAt_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Location.show_(z_.definedAt_)) + ")")
|
|
604
|
-
return
|
|
605
|
-
}
|
|
606
542
|
}
|
|
607
543
|
},
|
|
608
544
|
async show_$(value_, $task) {
|
|
609
|
-
{
|
|
610
545
|
const value_a = value_;
|
|
611
546
|
{
|
|
612
547
|
const z_ = value_a;
|
|
613
548
|
return ((((((("SymbolHook" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.qualifiedName_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Location.show_(z_.usageAt_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Location.show_(z_.definedAt_)) + ")")
|
|
614
|
-
return
|
|
615
549
|
}
|
|
616
550
|
}
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
export const ff_core_Show_Show$ff_compiler_LspHook_DocumentSymbolKind = {
|
|
554
|
+
show_(value_) {
|
|
555
|
+
const value_a = value_;
|
|
556
|
+
if(value_a.SLet) {
|
|
557
|
+
const z_ = value_a;
|
|
558
|
+
return ((("SLet" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.mutable_)) + ")")
|
|
559
|
+
}
|
|
560
|
+
if(value_a.SFunction) {
|
|
561
|
+
const z_ = value_a;
|
|
562
|
+
return ((("SFunction" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.member_)) + ")")
|
|
563
|
+
}
|
|
564
|
+
if(value_a.SExtend) {
|
|
565
|
+
const z_ = value_a;
|
|
566
|
+
return "SExtend"
|
|
567
|
+
}
|
|
568
|
+
if(value_a.STraitFunction) {
|
|
569
|
+
const z_ = value_a;
|
|
570
|
+
return "STraitFunction"
|
|
571
|
+
}
|
|
572
|
+
if(value_a.STrait) {
|
|
573
|
+
const z_ = value_a;
|
|
574
|
+
return "STrait"
|
|
575
|
+
}
|
|
576
|
+
if(value_a.SInstance) {
|
|
577
|
+
const z_ = value_a;
|
|
578
|
+
return "SInstance"
|
|
579
|
+
}
|
|
580
|
+
if(value_a.SVariant) {
|
|
581
|
+
const z_ = value_a;
|
|
582
|
+
return "SVariant"
|
|
583
|
+
}
|
|
584
|
+
if(value_a.SType) {
|
|
585
|
+
const z_ = value_a;
|
|
586
|
+
return "SType"
|
|
587
|
+
}
|
|
588
|
+
if(value_a.SParameter) {
|
|
589
|
+
const z_ = value_a;
|
|
590
|
+
return "SParameter"
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
async show_$(value_, $task) {
|
|
594
|
+
const value_a = value_;
|
|
595
|
+
if(value_a.SLet) {
|
|
596
|
+
const z_ = value_a;
|
|
597
|
+
return ((("SLet" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.mutable_)) + ")")
|
|
598
|
+
}
|
|
599
|
+
if(value_a.SFunction) {
|
|
600
|
+
const z_ = value_a;
|
|
601
|
+
return ((("SFunction" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.member_)) + ")")
|
|
602
|
+
}
|
|
603
|
+
if(value_a.SExtend) {
|
|
604
|
+
const z_ = value_a;
|
|
605
|
+
return "SExtend"
|
|
606
|
+
}
|
|
607
|
+
if(value_a.STraitFunction) {
|
|
608
|
+
const z_ = value_a;
|
|
609
|
+
return "STraitFunction"
|
|
610
|
+
}
|
|
611
|
+
if(value_a.STrait) {
|
|
612
|
+
const z_ = value_a;
|
|
613
|
+
return "STrait"
|
|
614
|
+
}
|
|
615
|
+
if(value_a.SInstance) {
|
|
616
|
+
const z_ = value_a;
|
|
617
|
+
return "SInstance"
|
|
618
|
+
}
|
|
619
|
+
if(value_a.SVariant) {
|
|
620
|
+
const z_ = value_a;
|
|
621
|
+
return "SVariant"
|
|
622
|
+
}
|
|
623
|
+
if(value_a.SType) {
|
|
624
|
+
const z_ = value_a;
|
|
625
|
+
return "SType"
|
|
626
|
+
}
|
|
627
|
+
if(value_a.SParameter) {
|
|
628
|
+
const z_ = value_a;
|
|
629
|
+
return "SParameter"
|
|
630
|
+
}
|
|
617
631
|
}
|
|
618
632
|
};
|
|
619
633
|
|
|
620
634
|
export const ff_core_Equal_Equal$ff_compiler_LspHook_SymbolHook = {
|
|
621
635
|
equals_(x_, y_) {
|
|
622
|
-
{
|
|
623
636
|
const x_a = x_;
|
|
624
637
|
const y_a = y_;
|
|
625
|
-
{
|
|
626
|
-
const _guard1 = (x_ === y_);
|
|
627
|
-
if(_guard1) {
|
|
638
|
+
if((x_ === y_)) {
|
|
628
639
|
return true
|
|
629
|
-
return
|
|
630
|
-
}
|
|
631
640
|
}
|
|
632
641
|
{
|
|
633
642
|
return ((x_.qualifiedName_ === y_.qualifiedName_) && (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Location.equals_(x_.usageAt_, y_.usageAt_) && ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Location.equals_(x_.definedAt_, y_.definedAt_)))
|
|
634
|
-
return
|
|
635
|
-
}
|
|
636
643
|
}
|
|
637
644
|
},
|
|
638
645
|
async equals_$(x_, y_, $task) {
|
|
639
|
-
{
|
|
640
646
|
const x_a = x_;
|
|
641
647
|
const y_a = y_;
|
|
648
|
+
if((x_ === y_)) {
|
|
649
|
+
return true
|
|
650
|
+
}
|
|
642
651
|
{
|
|
643
|
-
|
|
644
|
-
|
|
652
|
+
return ((x_.qualifiedName_ === y_.qualifiedName_) && (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Location.equals_(x_.usageAt_, y_.usageAt_) && ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Location.equals_(x_.definedAt_, y_.definedAt_)))
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
export const ff_core_Equal_Equal$ff_compiler_LspHook_DocumentSymbolKind = {
|
|
658
|
+
equals_(x_, y_) {
|
|
659
|
+
const x_a = x_;
|
|
660
|
+
const y_a = y_;
|
|
661
|
+
if((x_ === y_)) {
|
|
645
662
|
return true
|
|
646
|
-
return
|
|
647
663
|
}
|
|
664
|
+
if(x_a.SLet && y_a.SLet) {
|
|
665
|
+
const x_ = x_a;
|
|
666
|
+
const y_ = y_a;
|
|
667
|
+
return (x_.mutable_ === y_.mutable_)
|
|
668
|
+
}
|
|
669
|
+
if(x_a.SFunction && y_a.SFunction) {
|
|
670
|
+
const x_ = x_a;
|
|
671
|
+
const y_ = y_a;
|
|
672
|
+
return (x_.member_ === y_.member_)
|
|
648
673
|
}
|
|
649
674
|
{
|
|
650
|
-
return
|
|
651
|
-
|
|
675
|
+
return false
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
async equals_$(x_, y_, $task) {
|
|
679
|
+
const x_a = x_;
|
|
680
|
+
const y_a = y_;
|
|
681
|
+
if((x_ === y_)) {
|
|
682
|
+
return true
|
|
683
|
+
}
|
|
684
|
+
if(x_a.SLet && y_a.SLet) {
|
|
685
|
+
const x_ = x_a;
|
|
686
|
+
const y_ = y_a;
|
|
687
|
+
return (x_.mutable_ === y_.mutable_)
|
|
688
|
+
}
|
|
689
|
+
if(x_a.SFunction && y_a.SFunction) {
|
|
690
|
+
const x_ = x_a;
|
|
691
|
+
const y_ = y_a;
|
|
692
|
+
return (x_.member_ === y_.member_)
|
|
652
693
|
}
|
|
694
|
+
{
|
|
695
|
+
return false
|
|
653
696
|
}
|
|
654
697
|
}
|
|
655
698
|
};
|
|
656
699
|
|
|
657
700
|
export const ff_core_Ordering_Order$ff_compiler_LspHook_SymbolHook = {
|
|
658
701
|
compare_(x_, y_) {
|
|
659
|
-
{
|
|
660
702
|
const x_a = x_;
|
|
661
703
|
const y_a = y_;
|
|
662
|
-
{
|
|
663
|
-
const _guard1 = (x_ === y_);
|
|
664
|
-
if(_guard1) {
|
|
704
|
+
if((x_ === y_)) {
|
|
665
705
|
return ff_core_Ordering.OrderingSame()
|
|
666
|
-
return
|
|
667
|
-
}
|
|
668
706
|
}
|
|
669
707
|
{
|
|
670
708
|
const qualifiedNameOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.qualifiedName_, y_.qualifiedName_);
|
|
@@ -685,18 +723,12 @@ return ff_core_Ordering.OrderingSame()
|
|
|
685
723
|
}
|
|
686
724
|
return
|
|
687
725
|
}
|
|
688
|
-
}
|
|
689
726
|
},
|
|
690
727
|
async compare_$(x_, y_, $task) {
|
|
691
|
-
{
|
|
692
728
|
const x_a = x_;
|
|
693
729
|
const y_a = y_;
|
|
694
|
-
{
|
|
695
|
-
const _guard1 = (x_ === y_);
|
|
696
|
-
if(_guard1) {
|
|
730
|
+
if((x_ === y_)) {
|
|
697
731
|
return ff_core_Ordering.OrderingSame()
|
|
698
|
-
return
|
|
699
|
-
}
|
|
700
732
|
}
|
|
701
733
|
{
|
|
702
734
|
const qualifiedNameOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.qualifiedName_, y_.qualifiedName_);
|
|
@@ -718,12 +750,137 @@ return ff_core_Ordering.OrderingSame()
|
|
|
718
750
|
return
|
|
719
751
|
}
|
|
720
752
|
}
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
export const ff_core_Ordering_Order$ff_compiler_LspHook_DocumentSymbolKind = {
|
|
756
|
+
compare_(x_, y_) {
|
|
757
|
+
const x_a = x_;
|
|
758
|
+
const y_a = y_;
|
|
759
|
+
if((x_ === y_)) {
|
|
760
|
+
return ff_core_Ordering.OrderingSame()
|
|
761
|
+
}
|
|
762
|
+
if(x_a.SLet && y_a.SLet) {
|
|
763
|
+
const x_ = x_a;
|
|
764
|
+
const y_ = y_a;
|
|
765
|
+
const mutableOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.mutable_, y_.mutable_);
|
|
766
|
+
if((mutableOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
767
|
+
return mutableOrdering_
|
|
768
|
+
} else {
|
|
769
|
+
return ff_core_Ordering.OrderingSame()
|
|
770
|
+
}
|
|
771
|
+
return
|
|
772
|
+
}
|
|
773
|
+
if(x_a.SFunction && y_a.SFunction) {
|
|
774
|
+
const x_ = x_a;
|
|
775
|
+
const y_ = y_a;
|
|
776
|
+
const memberOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.member_, y_.member_);
|
|
777
|
+
if((memberOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
778
|
+
return memberOrdering_
|
|
779
|
+
} else {
|
|
780
|
+
return ff_core_Ordering.OrderingSame()
|
|
781
|
+
}
|
|
782
|
+
return
|
|
783
|
+
}
|
|
784
|
+
{
|
|
785
|
+
function number_(z_) {
|
|
786
|
+
const z_a = z_;
|
|
787
|
+
if(z_a.SLet) {
|
|
788
|
+
return 0
|
|
789
|
+
}
|
|
790
|
+
if(z_a.SFunction) {
|
|
791
|
+
return 1
|
|
792
|
+
}
|
|
793
|
+
if(z_a.SExtend) {
|
|
794
|
+
return 2
|
|
795
|
+
}
|
|
796
|
+
if(z_a.STraitFunction) {
|
|
797
|
+
return 3
|
|
798
|
+
}
|
|
799
|
+
if(z_a.STrait) {
|
|
800
|
+
return 4
|
|
801
|
+
}
|
|
802
|
+
if(z_a.SInstance) {
|
|
803
|
+
return 5
|
|
804
|
+
}
|
|
805
|
+
if(z_a.SVariant) {
|
|
806
|
+
return 6
|
|
807
|
+
}
|
|
808
|
+
if(z_a.SType) {
|
|
809
|
+
return 7
|
|
810
|
+
}
|
|
811
|
+
if(z_a.SParameter) {
|
|
812
|
+
return 8
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
return ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int.compare_(number_(x_), number_(y_))
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
async compare_$(x_, y_, $task) {
|
|
819
|
+
const x_a = x_;
|
|
820
|
+
const y_a = y_;
|
|
821
|
+
if((x_ === y_)) {
|
|
822
|
+
return ff_core_Ordering.OrderingSame()
|
|
823
|
+
}
|
|
824
|
+
if(x_a.SLet && y_a.SLet) {
|
|
825
|
+
const x_ = x_a;
|
|
826
|
+
const y_ = y_a;
|
|
827
|
+
const mutableOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.mutable_, y_.mutable_);
|
|
828
|
+
if((mutableOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
829
|
+
return mutableOrdering_
|
|
830
|
+
} else {
|
|
831
|
+
return ff_core_Ordering.OrderingSame()
|
|
832
|
+
}
|
|
833
|
+
return
|
|
834
|
+
}
|
|
835
|
+
if(x_a.SFunction && y_a.SFunction) {
|
|
836
|
+
const x_ = x_a;
|
|
837
|
+
const y_ = y_a;
|
|
838
|
+
const memberOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.member_, y_.member_);
|
|
839
|
+
if((memberOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
840
|
+
return memberOrdering_
|
|
841
|
+
} else {
|
|
842
|
+
return ff_core_Ordering.OrderingSame()
|
|
843
|
+
}
|
|
844
|
+
return
|
|
845
|
+
}
|
|
846
|
+
{
|
|
847
|
+
function number_(z_) {
|
|
848
|
+
const z_a = z_;
|
|
849
|
+
if(z_a.SLet) {
|
|
850
|
+
return 0
|
|
851
|
+
}
|
|
852
|
+
if(z_a.SFunction) {
|
|
853
|
+
return 1
|
|
854
|
+
}
|
|
855
|
+
if(z_a.SExtend) {
|
|
856
|
+
return 2
|
|
857
|
+
}
|
|
858
|
+
if(z_a.STraitFunction) {
|
|
859
|
+
return 3
|
|
860
|
+
}
|
|
861
|
+
if(z_a.STrait) {
|
|
862
|
+
return 4
|
|
863
|
+
}
|
|
864
|
+
if(z_a.SInstance) {
|
|
865
|
+
return 5
|
|
866
|
+
}
|
|
867
|
+
if(z_a.SVariant) {
|
|
868
|
+
return 6
|
|
869
|
+
}
|
|
870
|
+
if(z_a.SType) {
|
|
871
|
+
return 7
|
|
872
|
+
}
|
|
873
|
+
if(z_a.SParameter) {
|
|
874
|
+
return 8
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
return ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int.compare_(number_(x_), number_(y_))
|
|
878
|
+
}
|
|
721
879
|
}
|
|
722
880
|
};
|
|
723
881
|
|
|
724
882
|
export const ff_core_Serializable_Serializable$ff_compiler_LspHook_SymbolHook = {
|
|
725
883
|
serializeUsing_(serialization_, value_) {
|
|
726
|
-
{
|
|
727
884
|
const serialization_a = serialization_;
|
|
728
885
|
const value_a = value_;
|
|
729
886
|
{
|
|
@@ -737,28 +894,22 @@ ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location
|
|
|
737
894
|
ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.serializeUsing_(serialization_, v_.definedAt_)
|
|
738
895
|
return
|
|
739
896
|
}
|
|
740
|
-
}
|
|
741
897
|
},
|
|
742
898
|
deserializeUsing_(serialization_) {
|
|
743
899
|
const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
|
|
744
900
|
serialization_.offset_ += 1;
|
|
745
901
|
{
|
|
746
902
|
const _1 = variantIndex_;
|
|
747
|
-
{
|
|
748
903
|
if(_1 === 0) {
|
|
749
904
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
|
|
750
905
|
return ff_compiler_LspHook.SymbolHook(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_))
|
|
751
|
-
return
|
|
752
|
-
}
|
|
753
906
|
}
|
|
754
907
|
{
|
|
755
908
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
|
|
756
|
-
return
|
|
757
909
|
}
|
|
758
910
|
}
|
|
759
911
|
},
|
|
760
912
|
async serializeUsing_$(serialization_, value_, $task) {
|
|
761
|
-
{
|
|
762
913
|
const serialization_a = serialization_;
|
|
763
914
|
const value_a = value_;
|
|
764
915
|
{
|
|
@@ -772,24 +923,270 @@ ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location
|
|
|
772
923
|
ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.serializeUsing_(serialization_, v_.definedAt_)
|
|
773
924
|
return
|
|
774
925
|
}
|
|
775
|
-
}
|
|
776
926
|
},
|
|
777
927
|
async deserializeUsing_$(serialization_, $task) {
|
|
778
928
|
const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
|
|
779
929
|
serialization_.offset_ += 1;
|
|
780
930
|
{
|
|
781
931
|
const _1 = variantIndex_;
|
|
782
|
-
{
|
|
783
932
|
if(_1 === 0) {
|
|
784
933
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
|
|
785
934
|
return ff_compiler_LspHook.SymbolHook(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_))
|
|
935
|
+
}
|
|
936
|
+
{
|
|
937
|
+
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
|
|
943
|
+
export const ff_core_Serializable_Serializable$ff_compiler_LspHook_DocumentSymbolKind = {
|
|
944
|
+
serializeUsing_(serialization_, value_) {
|
|
945
|
+
const serialization_a = serialization_;
|
|
946
|
+
const value_a = value_;
|
|
947
|
+
if(value_a.SLet) {
|
|
948
|
+
const v_ = value_a;
|
|
949
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 24), 0);
|
|
950
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
951
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
|
|
952
|
+
serialization_.offset_ += 1;
|
|
953
|
+
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.mutable_)
|
|
954
|
+
return
|
|
955
|
+
}
|
|
956
|
+
if(value_a.SFunction) {
|
|
957
|
+
const v_ = value_a;
|
|
958
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
959
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
960
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 1);
|
|
961
|
+
serialization_.offset_ += 1;
|
|
962
|
+
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.member_)
|
|
963
|
+
return
|
|
964
|
+
}
|
|
965
|
+
if(value_a.SExtend) {
|
|
966
|
+
const v_ = value_a;
|
|
967
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 27), 0);
|
|
968
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
969
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 2);
|
|
970
|
+
serialization_.offset_ += 1
|
|
971
|
+
return
|
|
972
|
+
}
|
|
973
|
+
if(value_a.STraitFunction) {
|
|
974
|
+
const v_ = value_a;
|
|
975
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 34), 0);
|
|
976
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
977
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 3);
|
|
978
|
+
serialization_.offset_ += 1
|
|
786
979
|
return
|
|
787
980
|
}
|
|
981
|
+
if(value_a.STrait) {
|
|
982
|
+
const v_ = value_a;
|
|
983
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 26), 0);
|
|
984
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
985
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 4);
|
|
986
|
+
serialization_.offset_ += 1
|
|
987
|
+
return
|
|
988
|
+
}
|
|
989
|
+
if(value_a.SInstance) {
|
|
990
|
+
const v_ = value_a;
|
|
991
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
992
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
993
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 5);
|
|
994
|
+
serialization_.offset_ += 1
|
|
995
|
+
return
|
|
996
|
+
}
|
|
997
|
+
if(value_a.SVariant) {
|
|
998
|
+
const v_ = value_a;
|
|
999
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 28), 0);
|
|
1000
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1001
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 6);
|
|
1002
|
+
serialization_.offset_ += 1
|
|
1003
|
+
return
|
|
1004
|
+
}
|
|
1005
|
+
if(value_a.SType) {
|
|
1006
|
+
const v_ = value_a;
|
|
1007
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 25), 0);
|
|
1008
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1009
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 7);
|
|
1010
|
+
serialization_.offset_ += 1
|
|
1011
|
+
return
|
|
1012
|
+
}
|
|
1013
|
+
if(value_a.SParameter) {
|
|
1014
|
+
const v_ = value_a;
|
|
1015
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
|
|
1016
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1017
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 8);
|
|
1018
|
+
serialization_.offset_ += 1
|
|
1019
|
+
return
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
deserializeUsing_(serialization_) {
|
|
1023
|
+
const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
|
|
1024
|
+
serialization_.offset_ += 1;
|
|
1025
|
+
{
|
|
1026
|
+
const _1 = variantIndex_;
|
|
1027
|
+
if(_1 === 0) {
|
|
1028
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 24), 0);
|
|
1029
|
+
return ff_compiler_LspHook.SLet(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_))
|
|
1030
|
+
}
|
|
1031
|
+
if(_1 === 1) {
|
|
1032
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1033
|
+
return ff_compiler_LspHook.SFunction(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_))
|
|
1034
|
+
}
|
|
1035
|
+
if(_1 === 2) {
|
|
1036
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 27), 0);
|
|
1037
|
+
return ff_compiler_LspHook.SExtend()
|
|
1038
|
+
}
|
|
1039
|
+
if(_1 === 3) {
|
|
1040
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 34), 0);
|
|
1041
|
+
return ff_compiler_LspHook.STraitFunction()
|
|
1042
|
+
}
|
|
1043
|
+
if(_1 === 4) {
|
|
1044
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 26), 0);
|
|
1045
|
+
return ff_compiler_LspHook.STrait()
|
|
1046
|
+
}
|
|
1047
|
+
if(_1 === 5) {
|
|
1048
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1049
|
+
return ff_compiler_LspHook.SInstance()
|
|
1050
|
+
}
|
|
1051
|
+
if(_1 === 6) {
|
|
1052
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 28), 0);
|
|
1053
|
+
return ff_compiler_LspHook.SVariant()
|
|
1054
|
+
}
|
|
1055
|
+
if(_1 === 7) {
|
|
1056
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 25), 0);
|
|
1057
|
+
return ff_compiler_LspHook.SType()
|
|
1058
|
+
}
|
|
1059
|
+
if(_1 === 8) {
|
|
1060
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
|
|
1061
|
+
return ff_compiler_LspHook.SParameter()
|
|
788
1062
|
}
|
|
789
1063
|
{
|
|
790
1064
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
async serializeUsing_$(serialization_, value_, $task) {
|
|
1069
|
+
const serialization_a = serialization_;
|
|
1070
|
+
const value_a = value_;
|
|
1071
|
+
if(value_a.SLet) {
|
|
1072
|
+
const v_ = value_a;
|
|
1073
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 24), 0);
|
|
1074
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1075
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
|
|
1076
|
+
serialization_.offset_ += 1;
|
|
1077
|
+
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.mutable_)
|
|
791
1078
|
return
|
|
792
1079
|
}
|
|
1080
|
+
if(value_a.SFunction) {
|
|
1081
|
+
const v_ = value_a;
|
|
1082
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1083
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1084
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 1);
|
|
1085
|
+
serialization_.offset_ += 1;
|
|
1086
|
+
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.member_)
|
|
1087
|
+
return
|
|
1088
|
+
}
|
|
1089
|
+
if(value_a.SExtend) {
|
|
1090
|
+
const v_ = value_a;
|
|
1091
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 27), 0);
|
|
1092
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1093
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 2);
|
|
1094
|
+
serialization_.offset_ += 1
|
|
1095
|
+
return
|
|
1096
|
+
}
|
|
1097
|
+
if(value_a.STraitFunction) {
|
|
1098
|
+
const v_ = value_a;
|
|
1099
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 34), 0);
|
|
1100
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1101
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 3);
|
|
1102
|
+
serialization_.offset_ += 1
|
|
1103
|
+
return
|
|
1104
|
+
}
|
|
1105
|
+
if(value_a.STrait) {
|
|
1106
|
+
const v_ = value_a;
|
|
1107
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 26), 0);
|
|
1108
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1109
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 4);
|
|
1110
|
+
serialization_.offset_ += 1
|
|
1111
|
+
return
|
|
1112
|
+
}
|
|
1113
|
+
if(value_a.SInstance) {
|
|
1114
|
+
const v_ = value_a;
|
|
1115
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1116
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1117
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 5);
|
|
1118
|
+
serialization_.offset_ += 1
|
|
1119
|
+
return
|
|
1120
|
+
}
|
|
1121
|
+
if(value_a.SVariant) {
|
|
1122
|
+
const v_ = value_a;
|
|
1123
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 28), 0);
|
|
1124
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1125
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 6);
|
|
1126
|
+
serialization_.offset_ += 1
|
|
1127
|
+
return
|
|
1128
|
+
}
|
|
1129
|
+
if(value_a.SType) {
|
|
1130
|
+
const v_ = value_a;
|
|
1131
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 25), 0);
|
|
1132
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1133
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 7);
|
|
1134
|
+
serialization_.offset_ += 1
|
|
1135
|
+
return
|
|
1136
|
+
}
|
|
1137
|
+
if(value_a.SParameter) {
|
|
1138
|
+
const v_ = value_a;
|
|
1139
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
|
|
1140
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1141
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 8);
|
|
1142
|
+
serialization_.offset_ += 1
|
|
1143
|
+
return
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
async deserializeUsing_$(serialization_, $task) {
|
|
1147
|
+
const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
|
|
1148
|
+
serialization_.offset_ += 1;
|
|
1149
|
+
{
|
|
1150
|
+
const _1 = variantIndex_;
|
|
1151
|
+
if(_1 === 0) {
|
|
1152
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 24), 0);
|
|
1153
|
+
return ff_compiler_LspHook.SLet(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_))
|
|
1154
|
+
}
|
|
1155
|
+
if(_1 === 1) {
|
|
1156
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1157
|
+
return ff_compiler_LspHook.SFunction(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_))
|
|
1158
|
+
}
|
|
1159
|
+
if(_1 === 2) {
|
|
1160
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 27), 0);
|
|
1161
|
+
return ff_compiler_LspHook.SExtend()
|
|
1162
|
+
}
|
|
1163
|
+
if(_1 === 3) {
|
|
1164
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 34), 0);
|
|
1165
|
+
return ff_compiler_LspHook.STraitFunction()
|
|
1166
|
+
}
|
|
1167
|
+
if(_1 === 4) {
|
|
1168
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 26), 0);
|
|
1169
|
+
return ff_compiler_LspHook.STrait()
|
|
1170
|
+
}
|
|
1171
|
+
if(_1 === 5) {
|
|
1172
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1173
|
+
return ff_compiler_LspHook.SInstance()
|
|
1174
|
+
}
|
|
1175
|
+
if(_1 === 6) {
|
|
1176
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 28), 0);
|
|
1177
|
+
return ff_compiler_LspHook.SVariant()
|
|
1178
|
+
}
|
|
1179
|
+
if(_1 === 7) {
|
|
1180
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 25), 0);
|
|
1181
|
+
return ff_compiler_LspHook.SType()
|
|
1182
|
+
}
|
|
1183
|
+
if(_1 === 8) {
|
|
1184
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
|
|
1185
|
+
return ff_compiler_LspHook.SParameter()
|
|
1186
|
+
}
|
|
1187
|
+
{
|
|
1188
|
+
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
|
|
1189
|
+
}
|
|
793
1190
|
}
|
|
794
1191
|
}
|
|
795
1192
|
};
|