@flock/wirespec 0.22.6 → 0.22.7
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/arrow-arrow-atomic.mjs +11 -11
- package/arrow-arrow-core.mjs +150 -150
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1488 -1488
- package/colormath-root-colormath.mjs +441 -441
- package/kotlin-kotlin-stdlib.mjs +1622 -1600
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10028 -10028
- package/kotlin-rgxgen.mjs +1802 -1802
- package/kotlinx-io-kotlinx-io-core.mjs +414 -414
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1816 -1816
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1570 -1570
- package/mordant-mordant.mjs +1278 -1278
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +6104 -5969
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +177 -177
- package/wirespec-src-compiler-emitters-kotlin.mjs +132 -132
- package/wirespec-src-compiler-emitters-python.mjs +166 -166
- package/wirespec-src-compiler-emitters-rust.mjs +409 -409
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +165 -165
- package/wirespec-src-compiler-emitters-typescript.mjs +214 -214
- package/wirespec-src-compiler-emitters-wirespec.mjs +175 -195
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +282 -282
- package/wirespec-src-converter-asyncapi.mjs +849 -767
- package/wirespec-src-converter-asyncapi.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +596 -595
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +18 -18
- package/wirespec-src-converter-graphql.mjs +1063 -1063
- package/wirespec-src-converter-openapi.mjs +773 -661
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1379 -1379
- package/wirespec-src-plugin-arguments.mjs +200 -190
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +112 -112
- package/wirespec-src-plugin-extensions.mjs +1034 -998
- package/wirespec-src-plugin-extensions.mjs.map +1 -1
- package/wirespec-src-plugin-npm.mjs +54 -54
- package/wirespec-src-tools-generator.mjs +32 -32
|
@@ -191,7 +191,7 @@ initMetadataForClass(RustEmitter, 'RustEmitter', RustEmitter, VOID, [IrEmitter])
|
|
|
191
191
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
192
192
|
//endregion
|
|
193
193
|
function _get_sanitizationConfig__sns434($this) {
|
|
194
|
-
var tmp0 = $this.
|
|
194
|
+
var tmp0 = $this.q38_1;
|
|
195
195
|
var tmp = KProperty1;
|
|
196
196
|
// Inline function 'kotlin.getValue' call
|
|
197
197
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustEmitter$_get_sanitizationConfig_$ref_1dtj2x(), null);
|
|
@@ -208,7 +208,7 @@ function sanitize($this, $receiver) {
|
|
|
208
208
|
var item = _iterator__ex2g4s.v();
|
|
209
209
|
var _unary__edvuaz = index;
|
|
210
210
|
index = _unary__edvuaz + 1 | 0;
|
|
211
|
-
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
211
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.zr(item) : item;
|
|
212
212
|
destination.x(tmp$ret$2);
|
|
213
213
|
}
|
|
214
214
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -255,14 +255,14 @@ function sanitize($this, $receiver) {
|
|
|
255
255
|
return toSnakeCase($this, tmp$ret$8);
|
|
256
256
|
}
|
|
257
257
|
function toSnakeCase($this, $receiver) {
|
|
258
|
-
return Companion_getInstance().
|
|
258
|
+
return Companion_getInstance().au($receiver).eu();
|
|
259
259
|
}
|
|
260
260
|
function toPascalCase($this, $receiver) {
|
|
261
261
|
var tmp = split($receiver, ['_']);
|
|
262
262
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustEmitter$toPascalCase$lambda);
|
|
263
263
|
}
|
|
264
264
|
function sanitizeKeywords($this, $receiver) {
|
|
265
|
-
return Companion_getInstance_0().
|
|
265
|
+
return Companion_getInstance_0().n37().i1($receiver) ? 'r#' + $receiver : $receiver;
|
|
266
266
|
}
|
|
267
267
|
function sanitizeEnum($this, $receiver) {
|
|
268
268
|
// Inline function 'kotlin.let' call
|
|
@@ -287,7 +287,7 @@ function prependImports($this, $receiver, imports) {
|
|
|
287
287
|
var tmp;
|
|
288
288
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
289
289
|
if (!imports.r()) {
|
|
290
|
-
tmp = $receiver.
|
|
290
|
+
tmp = $receiver.jv(VOID, plus(imports, $receiver.gv_1));
|
|
291
291
|
} else {
|
|
292
292
|
tmp = $receiver;
|
|
293
293
|
}
|
|
@@ -299,7 +299,7 @@ function containsWildcard($this, type) {
|
|
|
299
299
|
tmp = true;
|
|
300
300
|
} else {
|
|
301
301
|
if (type instanceof Custom) {
|
|
302
|
-
var tmp0 = type.
|
|
302
|
+
var tmp0 = type.su_1;
|
|
303
303
|
var tmp$ret$0;
|
|
304
304
|
$l$block_0: {
|
|
305
305
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -326,13 +326,13 @@ function containsWildcard($this, type) {
|
|
|
326
326
|
tmp = tmp$ret$0;
|
|
327
327
|
} else {
|
|
328
328
|
if (type instanceof Nullable) {
|
|
329
|
-
tmp = containsWildcard($this, type.
|
|
329
|
+
tmp = containsWildcard($this, type.vu_1);
|
|
330
330
|
} else {
|
|
331
331
|
if (type instanceof Array_0) {
|
|
332
|
-
tmp = containsWildcard($this, type.
|
|
332
|
+
tmp = containsWildcard($this, type.mu_1);
|
|
333
333
|
} else {
|
|
334
334
|
if (type instanceof Dict) {
|
|
335
|
-
tmp = containsWildcard($this, type.
|
|
335
|
+
tmp = containsWildcard($this, type.ou_1) || containsWildcard($this, type.pu_1);
|
|
336
336
|
} else {
|
|
337
337
|
tmp = false;
|
|
338
338
|
}
|
|
@@ -354,7 +354,7 @@ function containsUnderiveable($this, type) {
|
|
|
354
354
|
tmp = true;
|
|
355
355
|
} else {
|
|
356
356
|
if (type instanceof Custom) {
|
|
357
|
-
var tmp0 = type.
|
|
357
|
+
var tmp0 = type.su_1;
|
|
358
358
|
var tmp$ret$0;
|
|
359
359
|
$l$block_0: {
|
|
360
360
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -381,13 +381,13 @@ function containsUnderiveable($this, type) {
|
|
|
381
381
|
tmp = tmp$ret$0;
|
|
382
382
|
} else {
|
|
383
383
|
if (type instanceof Nullable) {
|
|
384
|
-
tmp = containsUnderiveable($this, type.
|
|
384
|
+
tmp = containsUnderiveable($this, type.vu_1);
|
|
385
385
|
} else {
|
|
386
386
|
if (type instanceof Array_0) {
|
|
387
|
-
tmp = containsUnderiveable($this, type.
|
|
387
|
+
tmp = containsUnderiveable($this, type.mu_1);
|
|
388
388
|
} else {
|
|
389
389
|
if (type instanceof Dict) {
|
|
390
|
-
tmp = containsUnderiveable($this, type.
|
|
390
|
+
tmp = containsUnderiveable($this, type.ou_1) || containsUnderiveable($this, type.pu_1);
|
|
391
391
|
} else {
|
|
392
392
|
tmp = false;
|
|
393
393
|
}
|
|
@@ -413,10 +413,10 @@ function buildClientParams($this, $receiver) {
|
|
|
413
413
|
}
|
|
414
414
|
function Companion() {
|
|
415
415
|
Companion_instance_2 = this;
|
|
416
|
-
this.
|
|
416
|
+
this.t38_1 = RustGenerator_getInstance();
|
|
417
417
|
}
|
|
418
|
-
protoOf(Companion).
|
|
419
|
-
return this.
|
|
418
|
+
protoOf(Companion).n37 = function () {
|
|
419
|
+
return this.t38_1.r1c_1;
|
|
420
420
|
};
|
|
421
421
|
var Companion_instance_2;
|
|
422
422
|
function Companion_getInstance_0() {
|
|
@@ -425,23 +425,23 @@ function Companion_getInstance_0() {
|
|
|
425
425
|
return Companion_instance_2;
|
|
426
426
|
}
|
|
427
427
|
function sam$kotlin_Comparator$0(function_0) {
|
|
428
|
-
this.
|
|
428
|
+
this.u38_1 = function_0;
|
|
429
429
|
}
|
|
430
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
431
|
-
return this.
|
|
430
|
+
protoOf(sam$kotlin_Comparator$0).zd = function (a, b) {
|
|
431
|
+
return this.u38_1(a, b);
|
|
432
432
|
};
|
|
433
433
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
434
|
-
return this.
|
|
434
|
+
return this.zd(a, b);
|
|
435
435
|
};
|
|
436
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
437
|
-
return this.
|
|
436
|
+
protoOf(sam$kotlin_Comparator$0).p3 = function () {
|
|
437
|
+
return this.u38_1;
|
|
438
438
|
};
|
|
439
439
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
440
440
|
var tmp;
|
|
441
441
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
442
442
|
var tmp_0;
|
|
443
443
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
444
|
-
tmp_0 = equals(this.
|
|
444
|
+
tmp_0 = equals(this.p3(), other.p3());
|
|
445
445
|
} else {
|
|
446
446
|
tmp_0 = false;
|
|
447
447
|
}
|
|
@@ -452,22 +452,22 @@ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
|
452
452
|
return tmp;
|
|
453
453
|
};
|
|
454
454
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
455
|
-
return hashCode(this.
|
|
455
|
+
return hashCode(this.p3());
|
|
456
456
|
};
|
|
457
457
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
458
458
|
return 'r#' + it;
|
|
459
459
|
}
|
|
460
460
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
461
|
-
return Companion_getInstance().
|
|
461
|
+
return Companion_getInstance().au((new Name(name.yt_1)).eu());
|
|
462
462
|
}
|
|
463
463
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
464
|
-
var value = name.
|
|
464
|
+
var value = name.bu();
|
|
465
465
|
switch (value) {
|
|
466
466
|
case 'self':
|
|
467
467
|
case '&self':
|
|
468
468
|
return name;
|
|
469
469
|
default:
|
|
470
|
-
return Companion_getInstance().
|
|
470
|
+
return Companion_getInstance().au((new Name(name.yt_1)).eu());
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
@@ -491,9 +491,9 @@ function RustEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
491
491
|
return function (stmt, tr) {
|
|
492
492
|
var tmp;
|
|
493
493
|
if (stmt instanceof ConstructorStatement) {
|
|
494
|
-
var tmp_0 = tr.
|
|
494
|
+
var tmp_0 = tr.w18(stmt.gu_1);
|
|
495
495
|
// Inline function 'kotlin.collections.map' call
|
|
496
|
-
var this_0 = stmt.
|
|
496
|
+
var this_0 = stmt.hu_1;
|
|
497
497
|
// Inline function 'kotlin.collections.mapTo' call
|
|
498
498
|
var destination = ArrayList_init_$Create$(this_0.c1());
|
|
499
499
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -504,7 +504,7 @@ function RustEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
504
504
|
var k = item.n1();
|
|
505
505
|
// Inline function 'kotlin.collections.component2' call
|
|
506
506
|
var v = item.o1();
|
|
507
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
507
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.z18(v));
|
|
508
508
|
destination.x(tmp$ret$3);
|
|
509
509
|
}
|
|
510
510
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -516,7 +516,7 @@ function RustEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
516
516
|
}
|
|
517
517
|
function RustEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
518
518
|
return function () {
|
|
519
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
519
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().n37(), setOf(['self', 'Self']));
|
|
520
520
|
var tmp = RustEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
521
521
|
var tmp_0 = RustEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
522
522
|
var tmp_1 = RustEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -530,69 +530,69 @@ function RustEmitter$_get_sanitizationConfig_$ref_1dtj2x() {
|
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
532
|
function RustEmitter$emitShared$lambda($this$interface) {
|
|
533
|
-
$this$interface.
|
|
533
|
+
$this$interface.o17(Custom_init_$Create$('Headers'));
|
|
534
534
|
return Unit_instance;
|
|
535
535
|
}
|
|
536
536
|
function RustEmitter$emitShared$lambda_0($this$interface) {
|
|
537
|
-
$this$interface.
|
|
537
|
+
$this$interface.o17(Custom_init_$Create$('Headers'));
|
|
538
538
|
return Unit_instance;
|
|
539
539
|
}
|
|
540
540
|
function RustEmitter$emitShared$lambda_1($this$interface) {
|
|
541
|
-
$this$interface.
|
|
542
|
-
$this$interface.
|
|
543
|
-
$this$interface.
|
|
541
|
+
$this$interface.o17(Custom_init_$Create$('Sized'));
|
|
542
|
+
$this$interface.k16('label', VOID, VOID, RustEmitter$emitShared$lambda$lambda);
|
|
543
|
+
$this$interface.k16('from_label', true, VOID, RustEmitter$emitShared$lambda$lambda_0);
|
|
544
544
|
return Unit_instance;
|
|
545
545
|
}
|
|
546
546
|
function RustEmitter$emitShared$lambda$lambda($this$function) {
|
|
547
|
-
$this$function.
|
|
548
|
-
$this$function.
|
|
547
|
+
$this$function.a14('&self', Custom_init_$Create$(''));
|
|
548
|
+
$this$function.x13(Custom_init_$Create$('&str'));
|
|
549
549
|
return Unit_instance;
|
|
550
550
|
}
|
|
551
551
|
function RustEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
552
|
-
$this$function.
|
|
553
|
-
$this$function.
|
|
552
|
+
$this$function.a14('s', Custom_init_$Create$('&str'));
|
|
553
|
+
$this$function.x13(Custom_init_$Create$('Option<Self>'));
|
|
554
554
|
return Unit_instance;
|
|
555
555
|
}
|
|
556
556
|
function RustEmitter$emitShared$lambda_2($this$interface) {
|
|
557
|
-
$this$interface.
|
|
558
|
-
$this$interface.
|
|
559
|
-
$this$interface.
|
|
557
|
+
$this$interface.w13($this$interface.e15('T', []), []);
|
|
558
|
+
$this$interface.k16('value', VOID, VOID, RustEmitter$emitShared$lambda$lambda_1);
|
|
559
|
+
$this$interface.k16('validate', VOID, VOID, RustEmitter$emitShared$lambda$lambda_2);
|
|
560
560
|
return Unit_instance;
|
|
561
561
|
}
|
|
562
562
|
function RustEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
563
|
-
$this$function.
|
|
564
|
-
$this$function.
|
|
563
|
+
$this$function.a14('&self', Custom_init_$Create$(''));
|
|
564
|
+
$this$function.x13(borrow($this$function.e15('T', [])));
|
|
565
565
|
return Unit_instance;
|
|
566
566
|
}
|
|
567
567
|
function RustEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
568
|
-
$this$function.
|
|
569
|
-
$this$function.
|
|
568
|
+
$this$function.a14('&self', Custom_init_$Create$(''));
|
|
569
|
+
$this$function.x13($this$function.y14());
|
|
570
570
|
return Unit_instance;
|
|
571
571
|
}
|
|
572
572
|
function RustEmitter$emitShared$lambda_3($this$interface) {
|
|
573
|
-
$this$interface.
|
|
574
|
-
$this$interface.
|
|
575
|
-
$this$interface.
|
|
576
|
-
$this$interface.
|
|
577
|
-
$this$interface.
|
|
578
|
-
$this$interface.
|
|
573
|
+
$this$interface.w13($this$interface.e15('T', []), []);
|
|
574
|
+
$this$interface.p17('path', borrowDyn($this$interface.e15('Path', [])));
|
|
575
|
+
$this$interface.p17('method', borrow($this$interface.e15('Method', [])));
|
|
576
|
+
$this$interface.p17('queries', borrowDyn($this$interface.e15('Queries', [])));
|
|
577
|
+
$this$interface.p17('headers', borrowDyn($this$interface.e15('RequestHeaders', [])));
|
|
578
|
+
$this$interface.p17('body', borrow($this$interface.e15('T', [])));
|
|
579
579
|
return Unit_instance;
|
|
580
580
|
}
|
|
581
581
|
function RustEmitter$emitShared$lambda_4($this$interface) {
|
|
582
|
-
$this$interface.
|
|
583
|
-
$this$interface.
|
|
584
|
-
$this$interface.
|
|
585
|
-
$this$interface.
|
|
582
|
+
$this$interface.w13($this$interface.e15('T', []), []);
|
|
583
|
+
$this$interface.p17('status', $this$interface.c17());
|
|
584
|
+
$this$interface.p17('headers', borrowDyn($this$interface.e15('ResponseHeaders', [])));
|
|
585
|
+
$this$interface.p17('body', borrow($this$interface.e15('T', [])));
|
|
586
586
|
return Unit_instance;
|
|
587
587
|
}
|
|
588
588
|
function RustEmitter$emitShared$lambda_5($this$interface) {
|
|
589
|
-
$this$interface.
|
|
589
|
+
$this$interface.o16('transport', VOID, VOID, RustEmitter$emitShared$lambda$lambda_3);
|
|
590
590
|
return Unit_instance;
|
|
591
591
|
}
|
|
592
592
|
function RustEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
593
|
-
$this$asyncFunction.
|
|
594
|
-
$this$asyncFunction.
|
|
595
|
-
$this$asyncFunction.
|
|
593
|
+
$this$asyncFunction.a14('&self', Custom_init_$Create$(''));
|
|
594
|
+
$this$asyncFunction.a14('request', borrow($this$asyncFunction.e15('RawRequest', [])));
|
|
595
|
+
$this$asyncFunction.x13($this$asyncFunction.e15('RawResponse', []));
|
|
596
596
|
return Unit_instance;
|
|
597
597
|
}
|
|
598
598
|
function RustEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -600,7 +600,7 @@ function RustEmitter$emitShared$lambda_6($rustImports) {
|
|
|
600
600
|
var tmp;
|
|
601
601
|
if (element instanceof File) {
|
|
602
602
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
603
|
-
var tmp0 = element.
|
|
603
|
+
var tmp0 = element.gv_1;
|
|
604
604
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
605
605
|
var destination = ArrayList_init_$Create$_0();
|
|
606
606
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -611,7 +611,7 @@ function RustEmitter$emitShared$lambda_6($rustImports) {
|
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
var namespace = first(destination);
|
|
614
|
-
tmp = element.
|
|
614
|
+
tmp = element.jv(VOID, plus($rustImports, namespace.mv_1));
|
|
615
615
|
} else {
|
|
616
616
|
tmp = element;
|
|
617
617
|
}
|
|
@@ -623,7 +623,7 @@ function RustEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
623
623
|
var tmp;
|
|
624
624
|
if (element instanceof Enum) {
|
|
625
625
|
var tmp_0;
|
|
626
|
-
if (element.
|
|
626
|
+
if (element.ww_1.equals(Companion_getInstance().au('Method'))) {
|
|
627
627
|
tmp_0 = new RawElement('#[derive(Debug, Clone, Default, PartialEq)]\npub enum Method {\n #[default]\n GET,\n PUT,\n POST,\n DELETE,\n OPTIONS,\n HEAD,\n PATCH,\n TRACE,\n}');
|
|
628
628
|
} else {
|
|
629
629
|
tmp_0 = element;
|
|
@@ -640,7 +640,7 @@ function RustEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $responseH
|
|
|
640
640
|
var tmp;
|
|
641
641
|
if (element instanceof File) {
|
|
642
642
|
// Inline function 'kotlin.collections.flatMap' call
|
|
643
|
-
var tmp0 = element.
|
|
643
|
+
var tmp0 = element.gv_1;
|
|
644
644
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
645
645
|
var destination = ArrayList_init_$Create$_0();
|
|
646
646
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -652,30 +652,30 @@ function RustEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $responseH
|
|
|
652
652
|
tmp$ret$3 = listOf(element_0);
|
|
653
653
|
break $l$block;
|
|
654
654
|
}
|
|
655
|
-
var name = element_0.
|
|
655
|
+
var name = element_0.rv_1.du();
|
|
656
656
|
var tmp_0;
|
|
657
657
|
// Inline function 'kotlin.collections.contains' call
|
|
658
658
|
// Inline function 'kotlin.collections.containsKey' call
|
|
659
659
|
var this_0 = $dslTraits;
|
|
660
|
-
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).
|
|
660
|
+
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).r2(name)) {
|
|
661
661
|
// Inline function 'kotlin.collections.buildList' call
|
|
662
662
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
663
663
|
// Inline function 'kotlin.apply' call
|
|
664
664
|
var this_1 = ArrayList_init_$Create$_0();
|
|
665
|
-
this_1.x(ensureNotNull($dslTraits.
|
|
665
|
+
this_1.x(ensureNotNull($dslTraits.t2(name)));
|
|
666
666
|
if (name === 'Request') {
|
|
667
667
|
this_1.x($requestHeaders);
|
|
668
668
|
}
|
|
669
669
|
if (name === 'Response') {
|
|
670
670
|
this_1.x($responseHeaders);
|
|
671
671
|
}
|
|
672
|
-
tmp_0 = this_1.
|
|
672
|
+
tmp_0 = this_1.r5();
|
|
673
673
|
} else {
|
|
674
674
|
// Inline function 'kotlin.collections.contains' call
|
|
675
675
|
// Inline function 'kotlin.collections.containsKey' call
|
|
676
676
|
var this_2 = $rawElementInterfaces;
|
|
677
|
-
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).
|
|
678
|
-
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.
|
|
677
|
+
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).r2(name)) {
|
|
678
|
+
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.t2(name)));
|
|
679
679
|
} else {
|
|
680
680
|
tmp_0 = listOf(element_0);
|
|
681
681
|
}
|
|
@@ -686,7 +686,7 @@ function RustEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $responseH
|
|
|
686
686
|
addAll(destination, list);
|
|
687
687
|
}
|
|
688
688
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
689
|
-
tmp = element.
|
|
689
|
+
tmp = element.jv(VOID, newElements);
|
|
690
690
|
} else {
|
|
691
691
|
tmp = element;
|
|
692
692
|
}
|
|
@@ -702,14 +702,14 @@ function RustEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
702
702
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
703
703
|
var tmp_0 = scope;
|
|
704
704
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
705
|
-
var this_0 = scope.
|
|
705
|
+
var this_0 = scope.e19_1;
|
|
706
706
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
707
707
|
// Inline function 'kotlin.apply' call
|
|
708
708
|
var this_1 = new TransformerBuilder();
|
|
709
|
-
this_1.
|
|
710
|
-
var tmp$ret$5 = this_1.
|
|
711
|
-
tmp_0.
|
|
712
|
-
var tmp_1 = scope.
|
|
709
|
+
this_1.y19(RustEmitter$emitShared$lambda$lambda_4);
|
|
710
|
+
var tmp$ret$5 = this_1.t19();
|
|
711
|
+
tmp_0.e19_1 = transform(this_0, tmp$ret$5);
|
|
712
|
+
var tmp_1 = scope.e19_1;
|
|
713
713
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
714
714
|
} else {
|
|
715
715
|
tmp = element;
|
|
@@ -720,7 +720,7 @@ function RustEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
720
720
|
function RustEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
721
721
|
var tmp;
|
|
722
722
|
if (element instanceof Function_0) {
|
|
723
|
-
var tmp0 = element.
|
|
723
|
+
var tmp0 = element.tx_1;
|
|
724
724
|
var tmp$ret$1;
|
|
725
725
|
$l$block_0: {
|
|
726
726
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -737,7 +737,7 @@ function RustEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
737
737
|
var _iterator__ex2g4s = tmp0.t();
|
|
738
738
|
while (_iterator__ex2g4s.u()) {
|
|
739
739
|
var element_0 = _iterator__ex2g4s.v();
|
|
740
|
-
if (element_0.
|
|
740
|
+
if (element_0.oz_1.bu() === '&self' || element_0.oz_1.bu() === 'self') {
|
|
741
741
|
tmp$ret$1 = true;
|
|
742
742
|
break $l$block_0;
|
|
743
743
|
}
|
|
@@ -745,7 +745,7 @@ function RustEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
745
745
|
tmp$ret$1 = false;
|
|
746
746
|
}
|
|
747
747
|
var hasSelf = tmp$ret$1;
|
|
748
|
-
tmp = hasSelf || element.
|
|
748
|
+
tmp = hasSelf || element.xx_1 ? element : element.dy(VOID, VOID, plus(listOf(get_rustSelfParam()), element.tx_1));
|
|
749
749
|
} else {
|
|
750
750
|
tmp = element;
|
|
751
751
|
}
|
|
@@ -756,7 +756,7 @@ function RustEmitter$emitShared$lambda_10(group) {
|
|
|
756
756
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
757
757
|
}
|
|
758
758
|
function RustEmitter$emitShared$lambda$lambda_5(it) {
|
|
759
|
-
return RustGenerator_getInstance().
|
|
759
|
+
return RustGenerator_getInstance().m1b(it);
|
|
760
760
|
}
|
|
761
761
|
function RustEmitter$emit$lambda(a, b) {
|
|
762
762
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -765,7 +765,7 @@ function RustEmitter$emit$lambda(a, b) {
|
|
|
765
765
|
return compareValues(tmp, tmp$ret$2);
|
|
766
766
|
}
|
|
767
767
|
function emit$emitMod(this$0, def) {
|
|
768
|
-
return 'pub mod ' + sanitize(this$0, def.
|
|
768
|
+
return 'pub mod ' + sanitize(this$0, def.es()) + ';';
|
|
769
769
|
}
|
|
770
770
|
function RustEmitter$emit$lambda_0(this$0) {
|
|
771
771
|
return function (it) {
|
|
@@ -794,17 +794,17 @@ function RustEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs) {
|
|
|
794
794
|
var tmp_0;
|
|
795
795
|
var tmp_1;
|
|
796
796
|
if (expr instanceof RawExpression) {
|
|
797
|
-
tmp_1 = endsWith(expr.
|
|
797
|
+
tmp_1 = endsWith(expr.gy_1, 'Generator');
|
|
798
798
|
} else {
|
|
799
799
|
tmp_1 = false;
|
|
800
800
|
}
|
|
801
801
|
if (tmp_1) {
|
|
802
|
-
tmp_0 = !(expr.
|
|
802
|
+
tmp_0 = !(expr.gy_1 === $generatorOwnName);
|
|
803
803
|
} else {
|
|
804
804
|
tmp_0 = false;
|
|
805
805
|
}
|
|
806
806
|
if (tmp_0) {
|
|
807
|
-
$generatorRefs.x(expr.
|
|
807
|
+
$generatorRefs.x(expr.gy_1);
|
|
808
808
|
tmp = Unit_instance;
|
|
809
809
|
}
|
|
810
810
|
return transformChildren_1(expr, t);
|
|
@@ -817,7 +817,7 @@ function RustEmitter$emit$lambda_2(this$0) {
|
|
|
817
817
|
}
|
|
818
818
|
function RustEmitter$emitClient$lambda(this$0) {
|
|
819
819
|
return function (endpoint) {
|
|
820
|
-
return 'pub mod ' + toSnakeCase(this$0, endpoint.
|
|
820
|
+
return 'pub mod ' + toSnakeCase(this$0, endpoint.gr_1.o1() + 'Client') + ';';
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
823
|
function RustEmitter$toPascalCase$lambda(s) {
|
|
@@ -837,39 +837,39 @@ function RustEmitter$toPascalCase$lambda(s) {
|
|
|
837
837
|
}
|
|
838
838
|
function RustEmitter$buildClientParams$lambda(this$0) {
|
|
839
839
|
return function (_destruct__k2r9zo) {
|
|
840
|
-
var name = _destruct__k2r9zo.
|
|
841
|
-
return sanitizeKeywords(this$0, name.
|
|
840
|
+
var name = _destruct__k2r9zo.af();
|
|
841
|
+
return sanitizeKeywords(this$0, name.eu());
|
|
842
842
|
};
|
|
843
843
|
}
|
|
844
844
|
function RustEmitter$buildClientParams$lambda_0(this$0) {
|
|
845
845
|
return function (_destruct__k2r9zo) {
|
|
846
|
-
var name = _destruct__k2r9zo.
|
|
847
|
-
var type = _destruct__k2r9zo.
|
|
848
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
846
|
+
var name = _destruct__k2r9zo.af();
|
|
847
|
+
var type = _destruct__k2r9zo.bf();
|
|
848
|
+
var tmp = sanitizeKeywords(this$0, name.eu());
|
|
849
849
|
// Inline function 'kotlin.with' call
|
|
850
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
850
|
+
return tmp + ': ' + RustTransform_getInstance().a39(type);
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
853
|
function RustEmitter(packageName, emitShared) {
|
|
854
854
|
Companion_getInstance_0();
|
|
855
855
|
packageName = packageName === VOID ? Companion_instance_0.at('community.flock.wirespec.generated') : packageName;
|
|
856
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
857
|
-
this.
|
|
858
|
-
this.
|
|
859
|
-
this.
|
|
860
|
-
this.
|
|
856
|
+
emitShared = emitShared === VOID ? Companion_instance_1.gq() : emitShared;
|
|
857
|
+
this.m38_1 = packageName;
|
|
858
|
+
this.n38_1 = emitShared;
|
|
859
|
+
this.o38_1 = RustGenerator_getInstance();
|
|
860
|
+
this.p38_1 = FileExtension_Rust_getInstance();
|
|
861
861
|
var tmp = this;
|
|
862
|
-
tmp.
|
|
863
|
-
this.
|
|
864
|
-
this.
|
|
862
|
+
tmp.q38_1 = lazy(RustEmitter$sanitizationConfig$delegate$lambda(this));
|
|
863
|
+
this.r38_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
864
|
+
this.s38_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
865
865
|
}
|
|
866
|
-
protoOf(RustEmitter).
|
|
867
|
-
return this.
|
|
866
|
+
protoOf(RustEmitter).l1b = function () {
|
|
867
|
+
return this.o38_1;
|
|
868
868
|
};
|
|
869
|
-
protoOf(RustEmitter).
|
|
870
|
-
return this.
|
|
869
|
+
protoOf(RustEmitter).xp = function () {
|
|
870
|
+
return this.p38_1;
|
|
871
871
|
};
|
|
872
|
-
protoOf(RustEmitter).
|
|
872
|
+
protoOf(RustEmitter).g1b = function () {
|
|
873
873
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
874
874
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustEmitter$emitShared$lambda);
|
|
875
875
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustEmitter$emitShared$lambda_0);
|
|
@@ -888,38 +888,38 @@ protoOf(RustEmitter).c1b = function () {
|
|
|
888
888
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
889
889
|
var tmp = scope;
|
|
890
890
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
891
|
-
var this_1 = scope.
|
|
891
|
+
var this_1 = scope.e19_1;
|
|
892
892
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
893
893
|
// Inline function 'kotlin.apply' call
|
|
894
894
|
var this_2 = new TransformerBuilder();
|
|
895
|
-
this_2.
|
|
896
|
-
var tmp$ret$4 = this_2.
|
|
897
|
-
tmp.
|
|
895
|
+
this_2.y19(RustEmitter$emitShared$lambda_6(rustImports));
|
|
896
|
+
var tmp$ret$4 = this_2.t19();
|
|
897
|
+
tmp.e19_1 = transform(this_1, tmp$ret$4);
|
|
898
898
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
899
899
|
var tmp_0 = scope;
|
|
900
900
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
901
|
-
var this_3 = scope.
|
|
901
|
+
var this_3 = scope.e19_1;
|
|
902
902
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
903
903
|
// Inline function 'kotlin.apply' call
|
|
904
904
|
var this_4 = new TransformerBuilder();
|
|
905
|
-
this_4.
|
|
906
|
-
var tmp$ret$9 = this_4.
|
|
907
|
-
tmp_0.
|
|
905
|
+
this_4.y19(RustEmitter$emitShared$lambda_7);
|
|
906
|
+
var tmp$ret$9 = this_4.t19();
|
|
907
|
+
tmp_0.e19_1 = transform(this_3, tmp$ret$9);
|
|
908
908
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
909
909
|
var tmp_1 = scope;
|
|
910
910
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
911
|
-
var this_5 = scope.
|
|
911
|
+
var this_5 = scope.e19_1;
|
|
912
912
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
913
913
|
// Inline function 'kotlin.apply' call
|
|
914
914
|
var this_6 = new TransformerBuilder();
|
|
915
|
-
this_6.
|
|
916
|
-
var tmp$ret$14 = this_6.
|
|
917
|
-
tmp_1.
|
|
918
|
-
var tmp_2 = scope.
|
|
915
|
+
this_6.y19(RustEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
916
|
+
var tmp$ret$14 = this_6.t19();
|
|
917
|
+
tmp_1.e19_1 = transform(this_5, tmp$ret$14);
|
|
918
|
+
var tmp_2 = scope.e19_1;
|
|
919
919
|
// Inline function 'kotlin.let' call
|
|
920
920
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
921
921
|
// Inline function 'kotlin.collections.flatMap' call
|
|
922
|
-
var tmp0 = file.
|
|
922
|
+
var tmp0 = file.gv_1;
|
|
923
923
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
924
924
|
var destination = ArrayList_init_$Create$_0();
|
|
925
925
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -949,7 +949,7 @@ protoOf(RustEmitter).c1b = function () {
|
|
|
949
949
|
var _iterator__ex2g4s_0 = structFields.t();
|
|
950
950
|
while (_iterator__ex2g4s_0.u()) {
|
|
951
951
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
952
|
-
if (containsUnderiveable(this, element_0.
|
|
952
|
+
if (containsUnderiveable(this, element_0.bw_1)) {
|
|
953
953
|
tmp$ret$22 = true;
|
|
954
954
|
break $l$block_1;
|
|
955
955
|
}
|
|
@@ -975,7 +975,7 @@ protoOf(RustEmitter).c1b = function () {
|
|
|
975
975
|
var _iterator__ex2g4s_1 = structFields.t();
|
|
976
976
|
while (_iterator__ex2g4s_1.u()) {
|
|
977
977
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
978
|
-
if (containsWildcard(this, element_1.
|
|
978
|
+
if (containsWildcard(this, element_1.bw_1)) {
|
|
979
979
|
tmp$ret$24 = true;
|
|
980
980
|
break $l$block_3;
|
|
981
981
|
}
|
|
@@ -985,7 +985,7 @@ protoOf(RustEmitter).c1b = function () {
|
|
|
985
985
|
if (tmp$ret$24) {
|
|
986
986
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
987
987
|
} else {
|
|
988
|
-
if (setOf(['RawRequest', 'RawResponse']).i1(element.
|
|
988
|
+
if (setOf(['RawRequest', 'RawResponse']).i1(element.fx_1.du())) {
|
|
989
989
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
990
990
|
} else {
|
|
991
991
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -1001,29 +1001,29 @@ protoOf(RustEmitter).c1b = function () {
|
|
|
1001
1001
|
tmp_6 = listOf(new RawElement(derive));
|
|
1002
1002
|
}
|
|
1003
1003
|
var prefix = tmp_6;
|
|
1004
|
-
tmp$ret$21 = listOf(new File(element.
|
|
1004
|
+
tmp$ret$21 = listOf(new File(element.fx_1, plus_0(prefix, element)));
|
|
1005
1005
|
}
|
|
1006
1006
|
var list = tmp$ret$21;
|
|
1007
1007
|
addAll(destination, list);
|
|
1008
1008
|
}
|
|
1009
|
-
var tmp0_0 = new File(file.
|
|
1009
|
+
var tmp0_0 = new File(file.fv_1, destination);
|
|
1010
1010
|
// Inline function 'kotlin.let' call
|
|
1011
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1011
|
+
var wirespecFile = RustTransform_getInstance().b39(tmp0_0);
|
|
1012
1012
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1013
1013
|
var scope_0 = new TransformScope(wirespecFile);
|
|
1014
1014
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1015
1015
|
var tmp_7 = scope_0;
|
|
1016
1016
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1017
|
-
var this_7 = scope_0.
|
|
1017
|
+
var this_7 = scope_0.e19_1;
|
|
1018
1018
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1019
1019
|
// Inline function 'kotlin.apply' call
|
|
1020
1020
|
var this_8 = new TransformerBuilder();
|
|
1021
|
-
this_8.
|
|
1022
|
-
var tmp$ret$33 = this_8.
|
|
1023
|
-
tmp_7.
|
|
1024
|
-
var tmp_8 = scope_0.
|
|
1021
|
+
this_8.y19(RustEmitter$emitShared$lambda_9);
|
|
1022
|
+
var tmp$ret$33 = this_8.t19();
|
|
1023
|
+
tmp_7.e19_1 = transform(this_7, tmp$ret$33);
|
|
1024
|
+
var tmp_8 = scope_0.e19_1;
|
|
1025
1025
|
// Inline function 'kotlin.let' call
|
|
1026
|
-
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1026
|
+
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).gv_1;
|
|
1027
1027
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1028
1028
|
// Inline function 'kotlin.collections.fold' call
|
|
1029
1029
|
var accumulator = ArrayList_init_$Create$_0();
|
|
@@ -1044,26 +1044,26 @@ protoOf(RustEmitter).c1b = function () {
|
|
|
1044
1044
|
var groups = accumulator;
|
|
1045
1045
|
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustEmitter$emitShared$lambda_10) + '\n';
|
|
1046
1046
|
var tmp_10;
|
|
1047
|
-
if (this.
|
|
1048
|
-
tmp_10 = new File(Companion_getInstance().
|
|
1047
|
+
if (this.n38_1.hq_1) {
|
|
1048
|
+
tmp_10 = new File(Companion_getInstance().au(this.m38_1.dt() + 'wirespec'), listOf(new RawElement(source)));
|
|
1049
1049
|
} else {
|
|
1050
1050
|
tmp_10 = null;
|
|
1051
1051
|
}
|
|
1052
1052
|
return tmp_10;
|
|
1053
1053
|
};
|
|
1054
|
-
protoOf(RustEmitter).
|
|
1054
|
+
protoOf(RustEmitter).f1b = function (module_0, logger) {
|
|
1055
1055
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1056
|
-
var this_0 = new NonEmptyList(module_0.
|
|
1056
|
+
var this_0 = new NonEmptyList(module_0.hp_1);
|
|
1057
1057
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
1058
1058
|
var tmp = RustEmitter$emit$lambda;
|
|
1059
1059
|
var tmp$ret$1 = new sam$kotlin_Comparator$0(tmp);
|
|
1060
1060
|
var tmp$ret$0 = sortedWith(this_0, tmp$ret$1);
|
|
1061
1061
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$0);
|
|
1062
|
-
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).
|
|
1062
|
+
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).en_1;
|
|
1063
1063
|
// Inline function 'kotlin.let' call
|
|
1064
|
-
var files = emit.call(this, module_0.
|
|
1064
|
+
var files = emit.call(this, module_0.up(VOID, statements), logger);
|
|
1065
1065
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1066
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
1066
|
+
var tmp0 = new NonEmptyList(module_0.hp_1);
|
|
1067
1067
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1068
1068
|
var destination = ArrayList_init_$Create$_0();
|
|
1069
1069
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1083,11 +1083,11 @@ protoOf(RustEmitter).b1b = function (module_0, logger) {
|
|
|
1083
1083
|
tmp_1 = '';
|
|
1084
1084
|
}
|
|
1085
1085
|
var clientMod = tmp_1;
|
|
1086
|
-
var modRs = new File(Companion_getInstance().
|
|
1087
|
-
var modEndpoint = new File(Companion_getInstance().
|
|
1088
|
-
var tmp_2 = Companion_getInstance().
|
|
1086
|
+
var modRs = new File(Companion_getInstance().au(this.m38_1.dt() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1087
|
+
var modEndpoint = new File(Companion_getInstance().au(this.m38_1.dt() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1088
|
+
var tmp_2 = Companion_getInstance().au(this.m38_1.dt() + 'model/' + 'mod');
|
|
1089
1089
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1090
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
1090
|
+
var tmp0_0 = new NonEmptyList(module_0.hp_1);
|
|
1091
1091
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1092
1092
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1093
1093
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1099,23 +1099,23 @@ protoOf(RustEmitter).b1b = function (module_0, logger) {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
var tmp_3 = destination_0;
|
|
1101
1101
|
var modModel = new File(tmp_2, listOf(new RawElement(joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID, RustEmitter$emit$lambda_1(this)))));
|
|
1102
|
-
return this.
|
|
1102
|
+
return this.n38_1.hq_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(files, modRs), modEndpoint), modModel) : NonEmptyList__plus_impl_xqmb9(files, modRs);
|
|
1103
1103
|
};
|
|
1104
|
-
protoOf(RustEmitter).
|
|
1105
|
-
var subPackageName = plus_1(this.
|
|
1104
|
+
protoOf(RustEmitter).ds = function (definition, module_0, logger) {
|
|
1105
|
+
var subPackageName = plus_1(this.m38_1, definition);
|
|
1106
1106
|
var tmp;
|
|
1107
1107
|
if (definition instanceof Endpoint) {
|
|
1108
|
-
tmp = this.
|
|
1108
|
+
tmp = this.s38_1;
|
|
1109
1109
|
} else {
|
|
1110
|
-
tmp = this.
|
|
1110
|
+
tmp = this.r38_1;
|
|
1111
1111
|
}
|
|
1112
1112
|
var importHeader = tmp;
|
|
1113
1113
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1114
1114
|
// Inline function 'kotlin.let' call
|
|
1115
|
-
var file = RustTransform_getInstance().
|
|
1116
|
-
var tmp_0 = Companion_getInstance().
|
|
1115
|
+
var file = RustTransform_getInstance().b39(tmp0);
|
|
1116
|
+
var tmp_0 = Companion_getInstance().au(subPackageName.dt() + toSnakeCase(this, file.fv_1.du()));
|
|
1117
1117
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1118
|
-
var tmp0_0 = file.
|
|
1118
|
+
var tmp0_0 = file.gv_1;
|
|
1119
1119
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1120
1120
|
var destination = ArrayList_init_$Create$_0();
|
|
1121
1121
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1132,7 +1132,7 @@ protoOf(RustEmitter).cs = function (definition, module_0, logger) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1134
1134
|
};
|
|
1135
|
-
protoOf(RustEmitter).
|
|
1135
|
+
protoOf(RustEmitter).o1b = function (definition, module_0) {
|
|
1136
1136
|
var tmp;
|
|
1137
1137
|
if (definition instanceof Type) {
|
|
1138
1138
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1152,7 +1152,7 @@ protoOf(RustEmitter).k1b = function (definition, module_0) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
var generatorFile = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
|
|
1155
|
-
var generatorOwnName = definition.
|
|
1155
|
+
var generatorOwnName = definition.es().o1() + 'Generator';
|
|
1156
1156
|
var tmp_0 = asSequence(collectCustomTypeNames(generatorFile));
|
|
1157
1157
|
var tmp_1 = filterNot(tmp_0, RustEmitter$emitGenerator$lambda);
|
|
1158
1158
|
var tmp_2 = filterNot(tmp_1, RustEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -1161,8 +1161,8 @@ protoOf(RustEmitter).k1b = function (definition, module_0) {
|
|
|
1161
1161
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1162
1162
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1163
1163
|
var scope = new TransformScope(generatorFile);
|
|
1164
|
-
scope.
|
|
1165
|
-
var tmp_3 = scope.
|
|
1164
|
+
scope.v19(RustEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1165
|
+
var tmp_3 = scope.e19_1;
|
|
1166
1166
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1167
1167
|
// Inline function 'kotlin.collections.filter' call
|
|
1168
1168
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1205,40 +1205,40 @@ protoOf(RustEmitter).k1b = function (definition, module_0) {
|
|
|
1205
1205
|
destination_2.x(tmp$ret$14);
|
|
1206
1206
|
}
|
|
1207
1207
|
var typeImports = destination_2;
|
|
1208
|
-
var subPackageName = plus_2(this.
|
|
1209
|
-
return new File(Companion_getInstance().
|
|
1208
|
+
var subPackageName = plus_2(this.m38_1, 'generator');
|
|
1209
|
+
return new File(Companion_getInstance().au(subPackageName.dt() + toSnakeCase(this, generatorFile.fv_1.du())), plus(plus(plus(this.r38_1, typeImports), generatorImports), generatorFile.gv_1));
|
|
1210
1210
|
};
|
|
1211
|
-
protoOf(RustEmitter).
|
|
1211
|
+
protoOf(RustEmitter).vs = function (type, module_0) {
|
|
1212
1212
|
return prependImports(this, sanitizeNames(convert_0(type), _get_sanitizationConfig__sns434(this)), buildModelImports(type));
|
|
1213
1213
|
};
|
|
1214
|
-
protoOf(RustEmitter).
|
|
1214
|
+
protoOf(RustEmitter).ts = function (enum_0, module_0) {
|
|
1215
1215
|
var tmp = convert_1(enum_0);
|
|
1216
1216
|
return sanitizeEnumEntries(tmp, RustEmitter$emit$lambda_2(this));
|
|
1217
1217
|
};
|
|
1218
|
-
protoOf(RustEmitter).
|
|
1218
|
+
protoOf(RustEmitter).js = function (union) {
|
|
1219
1219
|
return convert_2(union);
|
|
1220
1220
|
};
|
|
1221
|
-
protoOf(RustEmitter).
|
|
1221
|
+
protoOf(RustEmitter).os = function (refined) {
|
|
1222
1222
|
return replaceStructWithRefinedFunctions(convert_3(refined), refined);
|
|
1223
1223
|
};
|
|
1224
|
-
protoOf(RustEmitter).
|
|
1224
|
+
protoOf(RustEmitter).us = function (endpoint) {
|
|
1225
1225
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1226
1226
|
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_4(endpoint))))));
|
|
1227
1227
|
var scope = new TransformScope(this_0);
|
|
1228
|
-
scope.
|
|
1229
|
-
var tmp = scope.
|
|
1228
|
+
scope.j19(fixResponseSwitchPatterns());
|
|
1229
|
+
var tmp = scope.e19_1;
|
|
1230
1230
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1231
1231
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1232
1232
|
var scope_0 = new TransformScope(this_1);
|
|
1233
|
-
scope_0.
|
|
1234
|
-
var tmp_0 = scope_0.
|
|
1233
|
+
scope_0.j19(fixConstructorCalls());
|
|
1234
|
+
var tmp_0 = scope_0.e19_1;
|
|
1235
1235
|
var tmp$ret$2 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1236
1236
|
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$2))), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1237
1237
|
};
|
|
1238
|
-
protoOf(RustEmitter).
|
|
1238
|
+
protoOf(RustEmitter).is = function (channel) {
|
|
1239
1239
|
return convert_5(channel);
|
|
1240
1240
|
};
|
|
1241
|
-
protoOf(RustEmitter).
|
|
1241
|
+
protoOf(RustEmitter).hs = function (rpc) {
|
|
1242
1242
|
// Inline function 'kotlin.let' call
|
|
1243
1243
|
var file = convert_6(rpc);
|
|
1244
1244
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -1248,7 +1248,7 @@ protoOf(RustEmitter).gs = function (rpc) {
|
|
|
1248
1248
|
var _iterator__ex2g4s = this_0.t();
|
|
1249
1249
|
while (_iterator__ex2g4s.u()) {
|
|
1250
1250
|
var e = _iterator__ex2g4s.v();
|
|
1251
|
-
var key = e.
|
|
1251
|
+
var key = e.b1a_1;
|
|
1252
1252
|
if (set.x(key)) {
|
|
1253
1253
|
list.x(e);
|
|
1254
1254
|
}
|
|
@@ -1259,12 +1259,12 @@ protoOf(RustEmitter).gs = function (rpc) {
|
|
|
1259
1259
|
var _iterator__ex2g4s_0 = list.t();
|
|
1260
1260
|
while (_iterator__ex2g4s_0.u()) {
|
|
1261
1261
|
var item = _iterator__ex2g4s_0.v();
|
|
1262
|
-
var tmp$ret$6 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1262
|
+
var tmp$ret$6 = import_0('super::super::model::' + toSnakeCase(this, item.b1a_1), Companion_getInstance().au(item.b1a_1).du());
|
|
1263
1263
|
destination.x(tmp$ret$6);
|
|
1264
1264
|
}
|
|
1265
1265
|
var rpcImports = destination;
|
|
1266
1266
|
// Inline function 'kotlin.collections.map' call
|
|
1267
|
-
var this_1 = file.
|
|
1267
|
+
var this_1 = file.gv_1;
|
|
1268
1268
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1269
1269
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1270
1270
|
var _iterator__ex2g4s_1 = this_1.t();
|
|
@@ -1273,7 +1273,7 @@ protoOf(RustEmitter).gs = function (rpc) {
|
|
|
1273
1273
|
var tmp;
|
|
1274
1274
|
if (item_0 instanceof Namespace) {
|
|
1275
1275
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1276
|
-
var tmp0 = item_0.
|
|
1276
|
+
var tmp0 = item_0.mv_1;
|
|
1277
1277
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1278
1278
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
1279
1279
|
var _iterator__ex2g4s_2 = tmp0.t();
|
|
@@ -1288,23 +1288,23 @@ protoOf(RustEmitter).gs = function (rpc) {
|
|
|
1288
1288
|
var list_0 = tmp_0;
|
|
1289
1289
|
addAll(destination_1, list_0);
|
|
1290
1290
|
}
|
|
1291
|
-
tmp = item_0.
|
|
1291
|
+
tmp = item_0.qv(VOID, destination_1);
|
|
1292
1292
|
} else {
|
|
1293
1293
|
tmp = item_0;
|
|
1294
1294
|
}
|
|
1295
1295
|
var tmp$ret$9 = tmp;
|
|
1296
1296
|
destination_0.x(tmp$ret$9);
|
|
1297
1297
|
}
|
|
1298
|
-
return file.
|
|
1298
|
+
return file.jv(VOID, plus(rpcImports, destination_0));
|
|
1299
1299
|
};
|
|
1300
|
-
protoOf(RustEmitter).
|
|
1301
|
-
var endpointName = endpoint.
|
|
1300
|
+
protoOf(RustEmitter).n1b = function (endpoint) {
|
|
1301
|
+
var endpointName = endpoint.gr_1.o1();
|
|
1302
1302
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1303
1303
|
var clientName = endpointName + 'Client';
|
|
1304
1304
|
var methodName = toSnakeCase(this, endpointName);
|
|
1305
1305
|
var _destruct__k2r9zo = buildClientParams(this, endpoint);
|
|
1306
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1307
|
-
var requestArgs = _destruct__k2r9zo.
|
|
1306
|
+
var paramsStr = _destruct__k2r9zo.af();
|
|
1307
|
+
var requestArgs = _destruct__k2r9zo.bf();
|
|
1308
1308
|
var requestConstruction = endpointModuleName + '::Request::new(' + requestArgs + ')';
|
|
1309
1309
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1310
1310
|
var this_0 = importReferences(endpoint);
|
|
@@ -1313,7 +1313,7 @@ protoOf(RustEmitter).j1b = function (endpoint) {
|
|
|
1313
1313
|
var _iterator__ex2g4s = this_0.t();
|
|
1314
1314
|
while (_iterator__ex2g4s.u()) {
|
|
1315
1315
|
var e = _iterator__ex2g4s.v();
|
|
1316
|
-
var key = e.
|
|
1316
|
+
var key = e.b1a_1;
|
|
1317
1317
|
if (set.x(key)) {
|
|
1318
1318
|
list.x(e);
|
|
1319
1319
|
}
|
|
@@ -1324,7 +1324,7 @@ protoOf(RustEmitter).j1b = function (endpoint) {
|
|
|
1324
1324
|
var _iterator__ex2g4s_0 = list.t();
|
|
1325
1325
|
while (_iterator__ex2g4s_0.u()) {
|
|
1326
1326
|
var item = _iterator__ex2g4s_0.v();
|
|
1327
|
-
var tmp$ret$4 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1327
|
+
var tmp$ret$4 = import_0('super::super::model::' + toSnakeCase(this, item.b1a_1), item.b1a_1);
|
|
1328
1328
|
destination.x(tmp$ret$4);
|
|
1329
1329
|
}
|
|
1330
1330
|
var modelImports = destination;
|
|
@@ -1345,10 +1345,10 @@ protoOf(RustEmitter).j1b = function (endpoint) {
|
|
|
1345
1345
|
this_1.x(' ' + namespacePath + '::from_raw_response(self.serialization, raw_response)');
|
|
1346
1346
|
this_1.x(' }');
|
|
1347
1347
|
this_1.x('}');
|
|
1348
|
-
var tmp$ret$5 = this_1.
|
|
1348
|
+
var tmp$ret$5 = this_1.r5();
|
|
1349
1349
|
var code = joinToString(tmp$ret$5, '\n');
|
|
1350
|
-
var subPackageName = plus_2(this.
|
|
1351
|
-
var tmp = Companion_getInstance().
|
|
1350
|
+
var subPackageName = plus_2(this.m38_1, 'client');
|
|
1351
|
+
var tmp = Companion_getInstance().au(subPackageName.dt() + toSnakeCase(this, clientName));
|
|
1352
1352
|
// Inline function 'kotlin.collections.buildList' call
|
|
1353
1353
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1354
1354
|
// Inline function 'kotlin.apply' call
|
|
@@ -1357,11 +1357,11 @@ protoOf(RustEmitter).j1b = function (endpoint) {
|
|
|
1357
1357
|
this_2.x(import_0('super::super::endpoint', endpointModuleName));
|
|
1358
1358
|
this_2.g1(modelImports);
|
|
1359
1359
|
this_2.x(new RawElement(code));
|
|
1360
|
-
var tmp$ret$9 = this_2.
|
|
1360
|
+
var tmp$ret$9 = this_2.r5();
|
|
1361
1361
|
return new File(tmp, tmp$ret$9);
|
|
1362
1362
|
};
|
|
1363
|
-
protoOf(RustEmitter).
|
|
1364
|
-
logger.
|
|
1363
|
+
protoOf(RustEmitter).h1b = function (endpoints, logger) {
|
|
1364
|
+
logger.bs('Emitting main Client for ' + endpoints.c1() + ' endpoints');
|
|
1365
1365
|
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustEmitter$emitClient$lambda(this));
|
|
1366
1366
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1367
1367
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
@@ -1378,7 +1378,7 @@ protoOf(RustEmitter).d1b = function (endpoints, logger) {
|
|
|
1378
1378
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1379
1379
|
while (_iterator__ex2g4s_0.u()) {
|
|
1380
1380
|
var e = _iterator__ex2g4s_0.v();
|
|
1381
|
-
var key = e.
|
|
1381
|
+
var key = e.b1a_1;
|
|
1382
1382
|
if (set.x(key)) {
|
|
1383
1383
|
list_0.x(e);
|
|
1384
1384
|
}
|
|
@@ -1405,7 +1405,7 @@ protoOf(RustEmitter).d1b = function (endpoints, logger) {
|
|
|
1405
1405
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1406
1406
|
while (_iterator__ex2g4s_2.u()) {
|
|
1407
1407
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1408
|
-
if (element_1.
|
|
1408
|
+
if (element_1.gr_1.o1() === element_0.b1a_1) {
|
|
1409
1409
|
tmp$ret$8 = false;
|
|
1410
1410
|
break $l$block_0;
|
|
1411
1411
|
}
|
|
@@ -1422,7 +1422,7 @@ protoOf(RustEmitter).d1b = function (endpoints, logger) {
|
|
|
1422
1422
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1423
1423
|
while (_iterator__ex2g4s_3.u()) {
|
|
1424
1424
|
var item = _iterator__ex2g4s_3.v();
|
|
1425
|
-
var tmp$ret$12 = import_0('super::model::' + toSnakeCase(this, item.
|
|
1425
|
+
var tmp$ret$12 = import_0('super::model::' + toSnakeCase(this, item.b1a_1), item.b1a_1);
|
|
1426
1426
|
destination_1.x(tmp$ret$12);
|
|
1427
1427
|
}
|
|
1428
1428
|
var modelImports = destination_1;
|
|
@@ -1432,9 +1432,9 @@ protoOf(RustEmitter).d1b = function (endpoints, logger) {
|
|
|
1432
1432
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1433
1433
|
while (_iterator__ex2g4s_4.u()) {
|
|
1434
1434
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1435
|
-
var endpointModuleName = toSnakeCase(this, element_2.
|
|
1436
|
-
var clientModuleName = toSnakeCase(this, element_2.
|
|
1437
|
-
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.
|
|
1435
|
+
var endpointModuleName = toSnakeCase(this, element_2.gr_1.o1());
|
|
1436
|
+
var clientModuleName = toSnakeCase(this, element_2.gr_1.o1() + 'Client');
|
|
1437
|
+
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.gr_1.o1() + 'Client')]);
|
|
1438
1438
|
addAll(destination_2, list_1);
|
|
1439
1439
|
}
|
|
1440
1440
|
var endpointAndClientImports = destination_2;
|
|
@@ -1444,20 +1444,20 @@ protoOf(RustEmitter).d1b = function (endpoints, logger) {
|
|
|
1444
1444
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1445
1445
|
while (_iterator__ex2g4s_5.u()) {
|
|
1446
1446
|
var element_3 = _iterator__ex2g4s_5.v();
|
|
1447
|
-
var endpointName = element_3.
|
|
1447
|
+
var endpointName = element_3.gr_1.o1();
|
|
1448
1448
|
var endpointModuleName_0 = toSnakeCase(this, endpointName);
|
|
1449
1449
|
var namespacePath = endpointModuleName_0 + '::' + endpointName;
|
|
1450
1450
|
var methodName = toSnakeCase(this, endpointName);
|
|
1451
1451
|
var _destruct__k2r9zo = buildClientParams(this, element_3);
|
|
1452
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1453
|
-
var callArgs = _destruct__k2r9zo.
|
|
1452
|
+
var paramsStr = _destruct__k2r9zo.af();
|
|
1453
|
+
var callArgs = _destruct__k2r9zo.bf();
|
|
1454
1454
|
var delegateCall = endpointName + 'Client { serialization: &self.serialization, transportation: &self.transportation }\n' + (' .' + methodName + '(' + callArgs + ').await');
|
|
1455
1455
|
var list_2 = listOf_0(['impl<S: Serialization, T: Transportation> ' + namespacePath + '::Call for Client<S, T> {', ' async fn ' + methodName + '(&self' + paramsStr + ') -> ' + endpointModuleName_0 + '::Response {', ' ' + delegateCall, ' }', '}']);
|
|
1456
1456
|
addAll(destination_3, list_2);
|
|
1457
1457
|
}
|
|
1458
1458
|
var implBlocks = destination_3;
|
|
1459
1459
|
var code = joinToString(plus(listOf_0(['pub struct Client<S: Serialization, T: Transportation> {', ' pub serialization: S,', ' pub transportation: T,', '}']), implBlocks), '\n');
|
|
1460
|
-
var tmp_0 = Companion_getInstance().
|
|
1460
|
+
var tmp_0 = Companion_getInstance().au(this.m38_1.dt() + 'client');
|
|
1461
1461
|
// Inline function 'kotlin.collections.buildList' call
|
|
1462
1462
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1463
1463
|
// Inline function 'kotlin.apply' call
|
|
@@ -1467,7 +1467,7 @@ protoOf(RustEmitter).d1b = function (endpoints, logger) {
|
|
|
1467
1467
|
this_0.g1(modelImports);
|
|
1468
1468
|
this_0.g1(endpointAndClientImports);
|
|
1469
1469
|
this_0.x(new RawElement(code));
|
|
1470
|
-
var tmp$ret$19 = this_0.
|
|
1470
|
+
var tmp$ret$19 = this_0.r5();
|
|
1471
1471
|
return new File(tmp_0, tmp$ret$19);
|
|
1472
1472
|
};
|
|
1473
1473
|
function get_rustSelfParam() {
|
|
@@ -1485,8 +1485,8 @@ function fixResponseSwitchPatterns() {
|
|
|
1485
1485
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1486
1486
|
// Inline function 'kotlin.apply' call
|
|
1487
1487
|
var this_0 = new TransformerBuilder();
|
|
1488
|
-
this_0.
|
|
1489
|
-
return this_0.
|
|
1488
|
+
this_0.u19(fixResponseSwitchPatterns$lambda);
|
|
1489
|
+
return this_0.t19();
|
|
1490
1490
|
}
|
|
1491
1491
|
function buildModelImports(_this__u8e3s4) {
|
|
1492
1492
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1497,7 +1497,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1497
1497
|
var _iterator__ex2g4s = this_0.t();
|
|
1498
1498
|
while (_iterator__ex2g4s.u()) {
|
|
1499
1499
|
var e = _iterator__ex2g4s.v();
|
|
1500
|
-
var key = e.
|
|
1500
|
+
var key = e.b1a_1;
|
|
1501
1501
|
if (set.x(key)) {
|
|
1502
1502
|
list.x(e);
|
|
1503
1503
|
}
|
|
@@ -1508,7 +1508,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1508
1508
|
var _iterator__ex2g4s_0 = list.t();
|
|
1509
1509
|
while (_iterator__ex2g4s_0.u()) {
|
|
1510
1510
|
var item = _iterator__ex2g4s_0.v();
|
|
1511
|
-
var tmp$ret$4 = import_0('super::' + toRustSnakeCase(item.
|
|
1511
|
+
var tmp$ret$4 = import_0('super::' + toRustSnakeCase(item.b1a_1), Companion_getInstance().au(item.b1a_1).du());
|
|
1512
1512
|
destination.x(tmp$ret$4);
|
|
1513
1513
|
}
|
|
1514
1514
|
return destination;
|
|
@@ -1520,14 +1520,14 @@ function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
1520
1520
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1521
1521
|
var tmp = scope;
|
|
1522
1522
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1523
|
-
var this_0 = scope.
|
|
1523
|
+
var this_0 = scope.e19_1;
|
|
1524
1524
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1525
1525
|
// Inline function 'kotlin.apply' call
|
|
1526
1526
|
var this_1 = new TransformerBuilder();
|
|
1527
|
-
this_1.
|
|
1528
|
-
var tmp$ret$4 = this_1.
|
|
1529
|
-
tmp.
|
|
1530
|
-
var tmp_0 = scope.
|
|
1527
|
+
this_1.y19(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1528
|
+
var tmp$ret$4 = this_1.t19();
|
|
1529
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1530
|
+
var tmp_0 = scope.e19_1;
|
|
1531
1531
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1532
1532
|
}
|
|
1533
1533
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
@@ -1537,14 +1537,14 @@ function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
|
1537
1537
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1538
1538
|
var tmp = scope;
|
|
1539
1539
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1540
|
-
var this_0 = scope.
|
|
1540
|
+
var this_0 = scope.e19_1;
|
|
1541
1541
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1542
1542
|
// Inline function 'kotlin.apply' call
|
|
1543
1543
|
var this_1 = new TransformerBuilder();
|
|
1544
|
-
this_1.
|
|
1545
|
-
var tmp$ret$4 = this_1.
|
|
1546
|
-
tmp.
|
|
1547
|
-
var tmp_0 = scope.
|
|
1544
|
+
this_1.y19(injectApiStruct$lambda(endpoint));
|
|
1545
|
+
var tmp$ret$4 = this_1.t19();
|
|
1546
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1547
|
+
var tmp_0 = scope.e19_1;
|
|
1548
1548
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1549
1549
|
}
|
|
1550
1550
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
@@ -1554,14 +1554,14 @@ function injectResponseFromImpls(_this__u8e3s4) {
|
|
|
1554
1554
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1555
1555
|
var tmp = scope;
|
|
1556
1556
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1557
|
-
var this_0 = scope.
|
|
1557
|
+
var this_0 = scope.e19_1;
|
|
1558
1558
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1559
1559
|
// Inline function 'kotlin.apply' call
|
|
1560
1560
|
var this_1 = new TransformerBuilder();
|
|
1561
|
-
this_1.
|
|
1562
|
-
var tmp$ret$4 = this_1.
|
|
1563
|
-
tmp.
|
|
1564
|
-
var tmp_0 = scope.
|
|
1561
|
+
this_1.y19(injectResponseFromImpls$lambda);
|
|
1562
|
+
var tmp$ret$4 = this_1.t19();
|
|
1563
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1564
|
+
var tmp_0 = scope.e19_1;
|
|
1565
1565
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1566
1566
|
}
|
|
1567
1567
|
function injectHandlerImplForClient(_this__u8e3s4) {
|
|
@@ -1571,14 +1571,14 @@ function injectHandlerImplForClient(_this__u8e3s4) {
|
|
|
1571
1571
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1572
1572
|
var tmp = scope;
|
|
1573
1573
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1574
|
-
var this_0 = scope.
|
|
1574
|
+
var this_0 = scope.e19_1;
|
|
1575
1575
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1576
1576
|
// Inline function 'kotlin.apply' call
|
|
1577
1577
|
var this_1 = new TransformerBuilder();
|
|
1578
|
-
this_1.
|
|
1579
|
-
var tmp$ret$4 = this_1.
|
|
1580
|
-
tmp.
|
|
1581
|
-
var tmp_0 = scope.
|
|
1578
|
+
this_1.y19(injectHandlerImplForClient$lambda);
|
|
1579
|
+
var tmp$ret$4 = this_1.t19();
|
|
1580
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1581
|
+
var tmp_0 = scope.e19_1;
|
|
1582
1582
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1583
1583
|
}
|
|
1584
1584
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
@@ -1588,14 +1588,14 @@ function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
|
1588
1588
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1589
1589
|
var tmp = scope;
|
|
1590
1590
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1591
|
-
var this_0 = scope.
|
|
1591
|
+
var this_0 = scope.e19_1;
|
|
1592
1592
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1593
1593
|
// Inline function 'kotlin.apply' call
|
|
1594
1594
|
var this_1 = new TransformerBuilder();
|
|
1595
|
-
this_1.
|
|
1596
|
-
var tmp$ret$4 = this_1.
|
|
1597
|
-
tmp.
|
|
1598
|
-
var tmp_0 = scope.
|
|
1595
|
+
this_1.y19(injectSelfToHandlerMethods$lambda);
|
|
1596
|
+
var tmp$ret$4 = this_1.t19();
|
|
1597
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1598
|
+
var tmp_0 = scope.e19_1;
|
|
1599
1599
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1600
1600
|
}
|
|
1601
1601
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
@@ -1605,14 +1605,14 @@ function stripResponseGenerics(_this__u8e3s4) {
|
|
|
1605
1605
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
1606
1606
|
var tmp = scope;
|
|
1607
1607
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
1608
|
-
var this_0 = scope.
|
|
1608
|
+
var this_0 = scope.e19_1;
|
|
1609
1609
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1610
1610
|
// Inline function 'kotlin.apply' call
|
|
1611
1611
|
var this_1 = new TransformerBuilder();
|
|
1612
|
-
this_1.
|
|
1613
|
-
var tmp$ret$4 = this_1.
|
|
1614
|
-
tmp.
|
|
1615
|
-
var tmp_0 = scope.
|
|
1612
|
+
this_1.k19(stripResponseGenerics$lambda);
|
|
1613
|
+
var tmp$ret$4 = this_1.t19();
|
|
1614
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1615
|
+
var tmp_0 = scope.e19_1;
|
|
1616
1616
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1617
1617
|
}
|
|
1618
1618
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
@@ -1622,14 +1622,14 @@ function stripHandlerExtends(_this__u8e3s4) {
|
|
|
1622
1622
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1623
1623
|
var tmp = scope;
|
|
1624
1624
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1625
|
-
var this_0 = scope.
|
|
1625
|
+
var this_0 = scope.e19_1;
|
|
1626
1626
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1627
1627
|
// Inline function 'kotlin.apply' call
|
|
1628
1628
|
var this_1 = new TransformerBuilder();
|
|
1629
|
-
this_1.
|
|
1630
|
-
var tmp$ret$4 = this_1.
|
|
1631
|
-
tmp.
|
|
1632
|
-
var tmp_0 = scope.
|
|
1629
|
+
this_1.y19(stripHandlerExtends$lambda);
|
|
1630
|
+
var tmp$ret$4 = this_1.t19();
|
|
1631
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1632
|
+
var tmp_0 = scope.e19_1;
|
|
1633
1633
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1634
1634
|
}
|
|
1635
1635
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
@@ -1637,8 +1637,8 @@ function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
|
1637
1637
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1638
1638
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1639
1639
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1640
|
-
scope.
|
|
1641
|
-
var tmp = scope.
|
|
1640
|
+
scope.w19(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1641
|
+
var tmp = scope.e19_1;
|
|
1642
1642
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1643
1643
|
}
|
|
1644
1644
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
@@ -1648,21 +1648,21 @@ function stripWirespecPrefix(_this__u8e3s4) {
|
|
|
1648
1648
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
1649
1649
|
var tmp = scope;
|
|
1650
1650
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
1651
|
-
var this_0 = scope.
|
|
1651
|
+
var this_0 = scope.e19_1;
|
|
1652
1652
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1653
1653
|
// Inline function 'kotlin.apply' call
|
|
1654
1654
|
var this_1 = new TransformerBuilder();
|
|
1655
|
-
this_1.
|
|
1656
|
-
var tmp$ret$4 = this_1.
|
|
1657
|
-
tmp.
|
|
1658
|
-
var tmp_0 = scope.
|
|
1655
|
+
this_1.k19(stripWirespecPrefix$lambda);
|
|
1656
|
+
var tmp$ret$4 = this_1.t19();
|
|
1657
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1658
|
+
var tmp_0 = scope.e19_1;
|
|
1659
1659
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1660
1660
|
}
|
|
1661
1661
|
function flattenForRust(_this__u8e3s4) {
|
|
1662
1662
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1663
1663
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
1664
1664
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1665
|
-
var tmp0 = _this__u8e3s4.
|
|
1665
|
+
var tmp0 = _this__u8e3s4.hv();
|
|
1666
1666
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1667
1667
|
var destination = ArrayList_init_$Create$_0();
|
|
1668
1668
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1675,7 +1675,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1675
1675
|
var tmp$ret$0 = firstOrNull_0(destination);
|
|
1676
1676
|
var namespace = ensureNotNull(tmp$ret$0);
|
|
1677
1677
|
// Inline function 'kotlin.collections.filter' call
|
|
1678
|
-
var tmp0_0 = namespace.
|
|
1678
|
+
var tmp0_0 = namespace.mv_1;
|
|
1679
1679
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1680
1680
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1681
1681
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1700,13 +1700,13 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1700
1700
|
var tmp_0;
|
|
1701
1701
|
var tmp_1;
|
|
1702
1702
|
if (item instanceof Union_0) {
|
|
1703
|
-
tmp_1 = item.
|
|
1703
|
+
tmp_1 = item.lw_1.du() === 'Response';
|
|
1704
1704
|
} else {
|
|
1705
1705
|
tmp_1 = false;
|
|
1706
1706
|
}
|
|
1707
1707
|
if (tmp_1) {
|
|
1708
1708
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1709
|
-
var tmp0_1 = namespace.
|
|
1709
|
+
var tmp0_1 = namespace.mv_1;
|
|
1710
1710
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1711
1711
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1712
1712
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -1722,7 +1722,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1722
1722
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1723
1723
|
while (_iterator__ex2g4s_3.u()) {
|
|
1724
1724
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1725
|
-
var tmp$ret$13 = item_0.
|
|
1725
|
+
var tmp$ret$13 = item_0.fx_1.du();
|
|
1726
1726
|
destination_3.x(tmp$ret$13);
|
|
1727
1727
|
}
|
|
1728
1728
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -1731,7 +1731,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1731
1731
|
var _iterator__ex2g4s_4 = destination_3.t();
|
|
1732
1732
|
while (_iterator__ex2g4s_4.u()) {
|
|
1733
1733
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1734
|
-
if (get_rustResponsePattern().
|
|
1734
|
+
if (get_rustResponsePattern().sc(element_2)) {
|
|
1735
1735
|
destination_4.x(element_2);
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
@@ -1745,10 +1745,10 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1745
1745
|
destination_5.x(tmp$ret$19);
|
|
1746
1746
|
}
|
|
1747
1747
|
var members = destination_5;
|
|
1748
|
-
tmp_0 = item.
|
|
1748
|
+
tmp_0 = item.rw(VOID, VOID, members, emptyList());
|
|
1749
1749
|
} else {
|
|
1750
1750
|
if (item instanceof Union_0) {
|
|
1751
|
-
tmp_0 = item.
|
|
1751
|
+
tmp_0 = item.rw(VOID, VOID, VOID, emptyList());
|
|
1752
1752
|
} else {
|
|
1753
1753
|
tmp_0 = item;
|
|
1754
1754
|
}
|
|
@@ -1758,7 +1758,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1758
1758
|
}
|
|
1759
1759
|
var moduleElements = destination_1;
|
|
1760
1760
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1761
|
-
var tmp0_2 = namespace.
|
|
1761
|
+
var tmp0_2 = namespace.mv_1;
|
|
1762
1762
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1763
1763
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1764
1764
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1775,15 +1775,15 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1775
1775
|
}
|
|
1776
1776
|
}
|
|
1777
1777
|
var classElements = destination_6;
|
|
1778
|
-
return new File(namespace.
|
|
1778
|
+
return new File(namespace.lv_1, plus_0(moduleElements, new Namespace(namespace.lv_1, classElements, namespace.nv_1)));
|
|
1779
1779
|
}
|
|
1780
1780
|
function fixConstructorCalls() {
|
|
1781
1781
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1782
1782
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1783
1783
|
// Inline function 'kotlin.apply' call
|
|
1784
1784
|
var this_0 = new TransformerBuilder();
|
|
1785
|
-
this_0.
|
|
1786
|
-
return this_0.
|
|
1785
|
+
this_0.w19(fixConstructorCalls$lambda);
|
|
1786
|
+
return this_0.t19();
|
|
1787
1787
|
}
|
|
1788
1788
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1789
1789
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1794,7 +1794,7 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1794
1794
|
var _iterator__ex2g4s = this_0.t();
|
|
1795
1795
|
while (_iterator__ex2g4s.u()) {
|
|
1796
1796
|
var e = _iterator__ex2g4s.v();
|
|
1797
|
-
var key = e.
|
|
1797
|
+
var key = e.b1a_1;
|
|
1798
1798
|
if (set.x(key)) {
|
|
1799
1799
|
list.x(e);
|
|
1800
1800
|
}
|
|
@@ -1805,24 +1805,24 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1805
1805
|
var _iterator__ex2g4s_0 = list.t();
|
|
1806
1806
|
while (_iterator__ex2g4s_0.u()) {
|
|
1807
1807
|
var item = _iterator__ex2g4s_0.v();
|
|
1808
|
-
var tmp$ret$4 = import_0('super::super::model::' + toRustSnakeCase(item.
|
|
1808
|
+
var tmp$ret$4 = import_0('super::super::model::' + toRustSnakeCase(item.b1a_1), Companion_getInstance().au(item.b1a_1).du());
|
|
1809
1809
|
destination.x(tmp$ret$4);
|
|
1810
1810
|
}
|
|
1811
1811
|
return destination;
|
|
1812
1812
|
}
|
|
1813
1813
|
function toRustSnakeCase(_this__u8e3s4) {
|
|
1814
1814
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1815
|
-
return Companion_getInstance().
|
|
1815
|
+
return Companion_getInstance().au(_this__u8e3s4).eu();
|
|
1816
1816
|
}
|
|
1817
1817
|
function buildValidateFunction(refined) {
|
|
1818
1818
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1819
|
-
var constraintExpr = convertConstraint(refined.
|
|
1819
|
+
var constraintExpr = convertConstraint(refined.ns_1, new FieldCall(new VariableReference(Companion_getInstance().au('self')), Companion_getInstance().au('value')));
|
|
1820
1820
|
return function_0('validate', VOID, VOID, buildValidateFunction$lambda(constraintExpr));
|
|
1821
1821
|
}
|
|
1822
1822
|
function buildToStringFunction(refined) {
|
|
1823
1823
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1824
1824
|
var tmp;
|
|
1825
|
-
if (refined.
|
|
1825
|
+
if (refined.ns_1.d1a_1 instanceof String_0) {
|
|
1826
1826
|
tmp = 'self.value.clone()';
|
|
1827
1827
|
} else {
|
|
1828
1828
|
tmp = 'format!("{}", self.value)';
|
|
@@ -1837,8 +1837,8 @@ function buildApiStruct(endpoint) {
|
|
|
1837
1837
|
function generateApiStructCode(_this__u8e3s4) {
|
|
1838
1838
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1839
1839
|
// Inline function 'kotlin.let' call
|
|
1840
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
1841
|
-
var methodName = _this__u8e3s4.
|
|
1840
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.ir_1, '/', VOID, VOID, VOID, VOID, generateApiStructCode$lambda);
|
|
1841
|
+
var methodName = _this__u8e3s4.hr_1.e3_1;
|
|
1842
1842
|
return trimIndent('\n pub struct Api;\n impl Server for Api {\n type Req = Request;\n type Res = Response;\n fn path_template(&self) -> &\'static str { "' + pathTemplate + '" }\n fn method(&self) -> Method { Method::' + methodName + ' }\n }\n ');
|
|
1843
1843
|
}
|
|
1844
1844
|
function fixResponseSwitchPatterns$lambda(s, t) {
|
|
@@ -1847,56 +1847,56 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1847
1847
|
if (!(s instanceof Switch)) {
|
|
1848
1848
|
tmp = true;
|
|
1849
1849
|
} else {
|
|
1850
|
-
var tmp0_safe_receiver = s.
|
|
1851
|
-
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1850
|
+
var tmp0_safe_receiver = s.cz_1;
|
|
1851
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cu()) === 'r');
|
|
1852
1852
|
}
|
|
1853
1853
|
if (tmp)
|
|
1854
1854
|
return transformChildren(s, t);
|
|
1855
1855
|
// Inline function 'kotlin.collections.map' call
|
|
1856
|
-
var this_0 = s.
|
|
1856
|
+
var this_0 = s.az_1;
|
|
1857
1857
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1858
1858
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1859
1859
|
var _iterator__ex2g4s = this_0.t();
|
|
1860
1860
|
while (_iterator__ex2g4s.u()) {
|
|
1861
1861
|
var item = _iterator__ex2g4s.v();
|
|
1862
|
-
var tmp_0 = item.
|
|
1862
|
+
var tmp_0 = item.hz_1;
|
|
1863
1863
|
var tmp0_safe_receiver_0 = tmp_0 instanceof Custom ? tmp_0 : null;
|
|
1864
|
-
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.
|
|
1865
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1864
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.ru_1;
|
|
1865
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.du();
|
|
1866
1866
|
var tmp_1;
|
|
1867
|
-
if (!(typeName == null) && get_rustResponsePattern().
|
|
1868
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1867
|
+
if (!(typeName == null) && get_rustResponsePattern().sc(typeName)) {
|
|
1868
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.cz_1).eu() + ')');
|
|
1869
1869
|
// Inline function 'kotlin.collections.map' call
|
|
1870
|
-
var this_1 = item.
|
|
1870
|
+
var this_1 = item.gz_1;
|
|
1871
1871
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1872
1872
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1873
1873
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1874
1874
|
while (_iterator__ex2g4s_0.u()) {
|
|
1875
1875
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1876
|
-
var tmp$ret$5 = t.
|
|
1876
|
+
var tmp$ret$5 = t.y18(item_0);
|
|
1877
1877
|
destination_0.x(tmp$ret$5);
|
|
1878
1878
|
}
|
|
1879
1879
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1880
1880
|
} else {
|
|
1881
|
-
var tmp_3 = t.
|
|
1881
|
+
var tmp_3 = t.z18(item.fz_1);
|
|
1882
1882
|
// Inline function 'kotlin.collections.map' call
|
|
1883
|
-
var this_2 = item.
|
|
1883
|
+
var this_2 = item.gz_1;
|
|
1884
1884
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1885
1885
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1886
1886
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1887
1887
|
while (_iterator__ex2g4s_1.u()) {
|
|
1888
1888
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1889
|
-
var tmp$ret$8 = t.
|
|
1889
|
+
var tmp$ret$8 = t.y18(item_1);
|
|
1890
1890
|
destination_1.x(tmp$ret$8);
|
|
1891
1891
|
}
|
|
1892
1892
|
var tmp_4 = destination_1;
|
|
1893
|
-
var tmp2_safe_receiver = item.
|
|
1893
|
+
var tmp2_safe_receiver = item.hz_1;
|
|
1894
1894
|
var tmp_5;
|
|
1895
1895
|
if (tmp2_safe_receiver == null) {
|
|
1896
1896
|
tmp_5 = null;
|
|
1897
1897
|
} else {
|
|
1898
1898
|
// Inline function 'kotlin.let' call
|
|
1899
|
-
tmp_5 = t.
|
|
1899
|
+
tmp_5 = t.w18(tmp2_safe_receiver);
|
|
1900
1900
|
}
|
|
1901
1901
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1902
1902
|
}
|
|
@@ -1904,13 +1904,13 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1904
1904
|
destination.x(tmp$ret$2);
|
|
1905
1905
|
}
|
|
1906
1906
|
var transformedCases = destination;
|
|
1907
|
-
return s.
|
|
1907
|
+
return s.ez(t.z18(s.zy_1), transformedCases, null);
|
|
1908
1908
|
}
|
|
1909
1909
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1910
1910
|
return function (element, transformer) {
|
|
1911
1911
|
var tmp;
|
|
1912
1912
|
if (element instanceof Struct) {
|
|
1913
|
-
tmp = element.
|
|
1913
|
+
tmp = element.qx(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1914
1914
|
} else {
|
|
1915
1915
|
tmp = element;
|
|
1916
1916
|
}
|
|
@@ -1922,7 +1922,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1922
1922
|
return function (element, transformer) {
|
|
1923
1923
|
var tmp;
|
|
1924
1924
|
if (element instanceof Namespace) {
|
|
1925
|
-
tmp = element.
|
|
1925
|
+
tmp = element.qv(VOID, plus(element.mv_1, listOf(buildApiStruct($endpoint))));
|
|
1926
1926
|
} else {
|
|
1927
1927
|
tmp = element;
|
|
1928
1928
|
}
|
|
@@ -1935,7 +1935,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1935
1935
|
var tmp;
|
|
1936
1936
|
if (element instanceof File) {
|
|
1937
1937
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1938
|
-
var tmp0 = element.
|
|
1938
|
+
var tmp0 = element.gv_1;
|
|
1939
1939
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1940
1940
|
var destination = ArrayList_init_$Create$_0();
|
|
1941
1941
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1945,26 +1945,26 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1945
1945
|
var tmp_1;
|
|
1946
1946
|
var tmp_2;
|
|
1947
1947
|
if (element_0 instanceof Union_0) {
|
|
1948
|
-
tmp_2 = element_0.
|
|
1948
|
+
tmp_2 = element_0.lw_1.du() === 'Response';
|
|
1949
1949
|
} else {
|
|
1950
1950
|
tmp_2 = false;
|
|
1951
1951
|
}
|
|
1952
1952
|
if (tmp_2) {
|
|
1953
1953
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1954
|
-
tmp_1 = !element_0.
|
|
1954
|
+
tmp_1 = !element_0.nw_1.r();
|
|
1955
1955
|
} else {
|
|
1956
1956
|
tmp_1 = false;
|
|
1957
1957
|
}
|
|
1958
1958
|
if (tmp_1) {
|
|
1959
1959
|
var tmp_3 = listOf(element_0);
|
|
1960
1960
|
// Inline function 'kotlin.collections.map' call
|
|
1961
|
-
var this_0 = element_0.
|
|
1961
|
+
var this_0 = element_0.nw_1;
|
|
1962
1962
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1963
1963
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1964
1964
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1965
1965
|
while (_iterator__ex2g4s_0.u()) {
|
|
1966
1966
|
var item = _iterator__ex2g4s_0.v();
|
|
1967
|
-
var memberName = item.
|
|
1967
|
+
var memberName = item.ru_1.du();
|
|
1968
1968
|
var tmp$ret$7 = new RawElement('impl From<' + memberName + '> for Response { fn from(value: ' + memberName + ') -> Self { Response::' + memberName + '(value) } }\n');
|
|
1969
1969
|
destination_0.x(tmp$ret$7);
|
|
1970
1970
|
}
|
|
@@ -1975,7 +1975,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1975
1975
|
var list = tmp_0;
|
|
1976
1976
|
addAll(destination, list);
|
|
1977
1977
|
}
|
|
1978
|
-
tmp = element.
|
|
1978
|
+
tmp = element.jv(VOID, destination);
|
|
1979
1979
|
} else {
|
|
1980
1980
|
tmp = element;
|
|
1981
1981
|
}
|
|
@@ -1989,7 +1989,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1989
1989
|
var tmp$ret$0;
|
|
1990
1990
|
$l$block_1: {
|
|
1991
1991
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1992
|
-
var tmp0 = element.
|
|
1992
|
+
var tmp0 = element.mv_1;
|
|
1993
1993
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1994
1994
|
var destination = ArrayList_init_$Create$_0();
|
|
1995
1995
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -2005,7 +2005,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2005
2005
|
var _iterator__ex2g4s_0 = destination.t();
|
|
2006
2006
|
while (_iterator__ex2g4s_0.u()) {
|
|
2007
2007
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
2008
|
-
if (element_1.
|
|
2008
|
+
if (element_1.rv_1.equals(Companion_getInstance().au('Handler'))) {
|
|
2009
2009
|
tmp$ret$3 = element_1;
|
|
2010
2010
|
break $l$block;
|
|
2011
2011
|
}
|
|
@@ -2022,7 +2022,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2022
2022
|
}
|
|
2023
2023
|
var handler = tmp_0;
|
|
2024
2024
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
2025
|
-
var tmp0_0 = handler.
|
|
2025
|
+
var tmp0_0 = handler.sv_1;
|
|
2026
2026
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
2027
2027
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
2028
2028
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
@@ -2041,8 +2041,8 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2041
2041
|
tmp_1 = tmp1_elvis_lhs;
|
|
2042
2042
|
}
|
|
2043
2043
|
var method = tmp_1;
|
|
2044
|
-
var methodName = method.
|
|
2045
|
-
tmp$ret$0 = element.
|
|
2044
|
+
var methodName = method.rx_1.eu();
|
|
2045
|
+
tmp$ret$0 = element.qv(VOID, plus(element.mv_1, listOf(new RawElement(trimIndent('\n impl<C: Client> Handler for C {\n async fn ' + methodName + '(&self, request: Request) -> Response {\n let raw = to_raw_request(self.serialization(), request);\n let resp = self.transport().transport(&raw).await;\n from_raw_response(self.serialization(), resp)\n }\n }\n ')))));
|
|
2046
2046
|
}
|
|
2047
2047
|
tmp = tmp$ret$0;
|
|
2048
2048
|
} else {
|
|
@@ -2057,7 +2057,7 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2057
2057
|
if (element instanceof Interface) {
|
|
2058
2058
|
var tmp$ret$0;
|
|
2059
2059
|
$l$block: {
|
|
2060
|
-
if (!element.
|
|
2060
|
+
if (!element.rv_1.equals(Companion_getInstance().au('Handler')) && !element.rv_1.equals(Companion_getInstance().au('Call'))) {
|
|
2061
2061
|
tmp$ret$0 = element;
|
|
2062
2062
|
break $l$block;
|
|
2063
2063
|
}
|
|
@@ -2066,14 +2066,14 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2066
2066
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
2067
2067
|
var tmp_0 = scope;
|
|
2068
2068
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
2069
|
-
var this_0 = scope.
|
|
2069
|
+
var this_0 = scope.e19_1;
|
|
2070
2070
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2071
2071
|
// Inline function 'kotlin.apply' call
|
|
2072
2072
|
var this_1 = new TransformerBuilder();
|
|
2073
|
-
this_1.
|
|
2074
|
-
var tmp$ret$5 = this_1.
|
|
2075
|
-
tmp_0.
|
|
2076
|
-
var tmp_1 = scope.
|
|
2073
|
+
this_1.y19(injectSelfToHandlerMethods$lambda$lambda);
|
|
2074
|
+
var tmp$ret$5 = this_1.t19();
|
|
2075
|
+
tmp_0.e19_1 = transform(this_0, tmp$ret$5);
|
|
2076
|
+
var tmp_1 = scope.e19_1;
|
|
2077
2077
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2078
2078
|
}
|
|
2079
2079
|
tmp = tmp$ret$0;
|
|
@@ -2087,7 +2087,7 @@ function injectSelfToHandlerMethods$lambda$lambda(element, transformer) {
|
|
|
2087
2087
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2088
2088
|
var tmp;
|
|
2089
2089
|
if (element instanceof Function_0) {
|
|
2090
|
-
tmp = element.
|
|
2090
|
+
tmp = element.dy(Companion_getInstance().au(element.rx_1.eu()), VOID, plus(listOf(get_rustSelfParam()), element.tx_1));
|
|
2091
2091
|
} else {
|
|
2092
2092
|
tmp = element;
|
|
2093
2093
|
}
|
|
@@ -2100,14 +2100,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2100
2100
|
if (type instanceof Custom) {
|
|
2101
2101
|
var tmp_0;
|
|
2102
2102
|
var tmp_1;
|
|
2103
|
-
if (startsWith(type.
|
|
2103
|
+
if (startsWith(type.ru_1.du(), 'Response')) {
|
|
2104
2104
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2105
|
-
tmp_1 = !type.
|
|
2105
|
+
tmp_1 = !type.su_1.r();
|
|
2106
2106
|
} else {
|
|
2107
2107
|
tmp_1 = false;
|
|
2108
2108
|
}
|
|
2109
2109
|
if (tmp_1) {
|
|
2110
|
-
tmp_0 = type.
|
|
2110
|
+
tmp_0 = type.uu(VOID, emptyList());
|
|
2111
2111
|
} else {
|
|
2112
2112
|
tmp_0 = type;
|
|
2113
2113
|
}
|
|
@@ -2122,7 +2122,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2122
2122
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2123
2123
|
var tmp;
|
|
2124
2124
|
if (element instanceof Interface) {
|
|
2125
|
-
tmp = element.
|
|
2125
|
+
tmp = element.rv_1.equals(Companion_getInstance().au('Handler')) || element.rv_1.equals(Companion_getInstance().au('Call')) ? element.zv(VOID, VOID, emptyList()) : element;
|
|
2126
2126
|
} else {
|
|
2127
2127
|
tmp = element;
|
|
2128
2128
|
}
|
|
@@ -2135,17 +2135,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2135
2135
|
var tmp_0;
|
|
2136
2136
|
var tmp_1;
|
|
2137
2137
|
if (s instanceof RawExpression) {
|
|
2138
|
-
tmp_1 = $identifierPattern.
|
|
2138
|
+
tmp_1 = $identifierPattern.sc(s.gy_1);
|
|
2139
2139
|
} else {
|
|
2140
2140
|
tmp_1 = false;
|
|
2141
2141
|
}
|
|
2142
2142
|
if (tmp_1) {
|
|
2143
|
-
tmp_0 = !contains(s.
|
|
2143
|
+
tmp_0 = !contains(s.gy_1, '.');
|
|
2144
2144
|
} else {
|
|
2145
2145
|
tmp_0 = false;
|
|
2146
2146
|
}
|
|
2147
2147
|
if (tmp_0) {
|
|
2148
|
-
tmp = new VariableReference(Companion_getInstance().
|
|
2148
|
+
tmp = new VariableReference(Companion_getInstance().au(s.gy_1));
|
|
2149
2149
|
} else {
|
|
2150
2150
|
tmp = transformChildren(s, t);
|
|
2151
2151
|
}
|
|
@@ -2156,10 +2156,10 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2156
2156
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2157
2157
|
var tmp;
|
|
2158
2158
|
if (type instanceof Custom) {
|
|
2159
|
-
var pascalName = type.
|
|
2159
|
+
var pascalName = type.ru_1.du();
|
|
2160
2160
|
var tmp_0;
|
|
2161
2161
|
if (startsWith(pascalName, 'Wirespec.')) {
|
|
2162
|
-
tmp_0 = type.
|
|
2162
|
+
tmp_0 = type.uu(Companion_getInstance().au(removePrefix(pascalName, 'Wirespec.')));
|
|
2163
2163
|
} else {
|
|
2164
2164
|
tmp_0 = type;
|
|
2165
2165
|
}
|
|
@@ -2174,12 +2174,12 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2174
2174
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2175
2175
|
if (!(s instanceof ConstructorStatement))
|
|
2176
2176
|
return transformChildren(s, t);
|
|
2177
|
-
var tmp = s.
|
|
2177
|
+
var tmp = s.gu_1;
|
|
2178
2178
|
var tmp0_safe_receiver = tmp instanceof Custom ? tmp : null;
|
|
2179
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2180
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
2179
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ru_1;
|
|
2180
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.du();
|
|
2181
2181
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2182
|
-
var this_0 = s.
|
|
2182
|
+
var this_0 = s.hu_1;
|
|
2183
2183
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2184
2184
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.c1()));
|
|
2185
2185
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -2187,25 +2187,25 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2187
2187
|
while (_iterator__ex2g4s.u()) {
|
|
2188
2188
|
var element = _iterator__ex2g4s.v();
|
|
2189
2189
|
var tmp_0 = element.n1();
|
|
2190
|
-
var tmp$ret$4 = t.
|
|
2191
|
-
destination.
|
|
2190
|
+
var tmp$ret$4 = t.z18(element.o1());
|
|
2191
|
+
destination.w2(tmp_0, tmp$ret$4);
|
|
2192
2192
|
}
|
|
2193
2193
|
var transformedArgs = destination;
|
|
2194
|
-
return !(typeName == null) && get_rustResponsePattern().
|
|
2194
|
+
return !(typeName == null) && get_rustResponsePattern().sc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().au('inner'), new FunctionCall(VOID, VOID, new Name(listOf(typeName + '::new')), transformedArgs)))) : typeName === 'Request' ? new FunctionCall(VOID, VOID, new Name(listOf('Request::new')), transformedArgs) : transformChildren(s, t);
|
|
2195
2195
|
}
|
|
2196
2196
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2197
2197
|
return function ($this$function) {
|
|
2198
|
-
$this$function.
|
|
2199
|
-
$this$function.
|
|
2200
|
-
$this$function.
|
|
2198
|
+
$this$function.a14('&self', Custom_init_$Create$(''));
|
|
2199
|
+
$this$function.x13(Boolean_instance);
|
|
2200
|
+
$this$function.d14($constraintExpr);
|
|
2201
2201
|
return Unit_instance;
|
|
2202
2202
|
};
|
|
2203
2203
|
}
|
|
2204
2204
|
function buildToStringFunction$lambda($expr) {
|
|
2205
2205
|
return function ($this$function) {
|
|
2206
|
-
$this$function.
|
|
2207
|
-
$this$function.
|
|
2208
|
-
$this$function.
|
|
2206
|
+
$this$function.a14('&self', Custom_init_$Create$(''));
|
|
2207
|
+
$this$function.x13(String_instance);
|
|
2208
|
+
$this$function.d14(new RawExpression($expr));
|
|
2209
2209
|
return Unit_instance;
|
|
2210
2210
|
};
|
|
2211
2211
|
}
|
|
@@ -2213,10 +2213,10 @@ function generateApiStructCode$lambda(segment) {
|
|
|
2213
2213
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2214
2214
|
var tmp;
|
|
2215
2215
|
if (segment instanceof Literal) {
|
|
2216
|
-
tmp = segment.
|
|
2216
|
+
tmp = segment.e1b_1;
|
|
2217
2217
|
} else {
|
|
2218
2218
|
if (segment instanceof Param) {
|
|
2219
|
-
tmp = '{' + segment.
|
|
2219
|
+
tmp = '{' + segment.nr_1.o1() + '}';
|
|
2220
2220
|
} else {
|
|
2221
2221
|
noWhenBranchMatchedException();
|
|
2222
2222
|
}
|
|
@@ -2227,39 +2227,39 @@ var properties_initialized_RustIrTransformer_kt_hr6k9w;
|
|
|
2227
2227
|
function _init_properties_RustIrTransformer_kt__rrvmwq() {
|
|
2228
2228
|
if (!properties_initialized_RustIrTransformer_kt_hr6k9w) {
|
|
2229
2229
|
properties_initialized_RustIrTransformer_kt_hr6k9w = true;
|
|
2230
|
-
rustSelfParam = new Parameter(Companion_getInstance().
|
|
2230
|
+
rustSelfParam = new Parameter(Companion_getInstance().au('&self'), Custom_init_$Create$(''));
|
|
2231
2231
|
rustResponsePattern = Regex_init_$Create$('Response(\\d+|Default)');
|
|
2232
2232
|
}
|
|
2233
2233
|
}
|
|
2234
2234
|
function borrowParamsOf($this, fn) {
|
|
2235
2235
|
// Inline function 'kotlin.collections.map' call
|
|
2236
|
-
var this_0 = fn.
|
|
2236
|
+
var this_0 = fn.tx_1;
|
|
2237
2237
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2238
2238
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2239
2239
|
var _iterator__ex2g4s = this_0.t();
|
|
2240
2240
|
while (_iterator__ex2g4s.u()) {
|
|
2241
2241
|
var item = _iterator__ex2g4s.v();
|
|
2242
2242
|
var tmp;
|
|
2243
|
-
if (RustTransform_getInstance().
|
|
2243
|
+
if (RustTransform_getInstance().c39(item.oz_1)) {
|
|
2244
2244
|
tmp = item;
|
|
2245
2245
|
} else {
|
|
2246
|
-
tmp = item.
|
|
2246
|
+
tmp = item.sz(VOID, applyBorrowRule(RustTransform_getInstance(), item.pz_1));
|
|
2247
2247
|
}
|
|
2248
2248
|
var tmp$ret$2 = tmp;
|
|
2249
2249
|
destination.x(tmp$ret$2);
|
|
2250
2250
|
}
|
|
2251
|
-
return fn.
|
|
2251
|
+
return fn.dy(VOID, VOID, destination);
|
|
2252
2252
|
}
|
|
2253
2253
|
function applyBorrowRule($this, type) {
|
|
2254
2254
|
var tmp;
|
|
2255
2255
|
if (type instanceof Nullable) {
|
|
2256
|
-
tmp = new Nullable(applyBorrowRule($this, type.
|
|
2256
|
+
tmp = new Nullable(applyBorrowRule($this, type.vu_1));
|
|
2257
2257
|
} else {
|
|
2258
2258
|
if (equals(type, String_instance)) {
|
|
2259
2259
|
tmp = Custom_init_$Create$('&str');
|
|
2260
2260
|
} else {
|
|
2261
2261
|
if (type instanceof Custom) {
|
|
2262
|
-
tmp = $this.
|
|
2262
|
+
tmp = $this.f39(type) ? type : $this.e39(type) ? borrowImpl(type) : $this.d39(type) ? ownedImpl(type) : type;
|
|
2263
2263
|
} else {
|
|
2264
2264
|
tmp = type;
|
|
2265
2265
|
}
|
|
@@ -2271,15 +2271,15 @@ function toBorrowedRaw($this, $receiver) {
|
|
|
2271
2271
|
return new RawExpression('&' + toRawCode($this, $receiver));
|
|
2272
2272
|
}
|
|
2273
2273
|
function sanitizeKeywords_0($this, $receiver) {
|
|
2274
|
-
return Companion_getInstance_0().
|
|
2274
|
+
return Companion_getInstance_0().n37().i1($receiver) ? 'r#' + $receiver : $receiver;
|
|
2275
2275
|
}
|
|
2276
2276
|
function toRawCode($this, $receiver) {
|
|
2277
2277
|
var tmp;
|
|
2278
2278
|
if ($receiver instanceof VariableReference) {
|
|
2279
|
-
tmp = sanitizeKeywords_0($this, $receiver.
|
|
2279
|
+
tmp = sanitizeKeywords_0($this, $receiver.ev_1.eu());
|
|
2280
2280
|
} else {
|
|
2281
2281
|
if ($receiver instanceof FieldCall) {
|
|
2282
|
-
var tmp1_safe_receiver = $receiver.
|
|
2282
|
+
var tmp1_safe_receiver = $receiver.kz_1;
|
|
2283
2283
|
var tmp_0;
|
|
2284
2284
|
if (tmp1_safe_receiver == null) {
|
|
2285
2285
|
tmp_0 = null;
|
|
@@ -2289,20 +2289,20 @@ function toRawCode($this, $receiver) {
|
|
|
2289
2289
|
}
|
|
2290
2290
|
var tmp2_elvis_lhs = tmp_0;
|
|
2291
2291
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2292
|
-
tmp = recv + sanitizeKeywords_0($this, $receiver.
|
|
2292
|
+
tmp = recv + sanitizeKeywords_0($this, $receiver.lz_1.eu());
|
|
2293
2293
|
} else {
|
|
2294
2294
|
if ($receiver instanceof ArrayIndexCall) {
|
|
2295
|
-
var tmp_1 = $receiver.
|
|
2295
|
+
var tmp_1 = $receiver.c10_1;
|
|
2296
2296
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2297
2297
|
var tmp_2;
|
|
2298
2298
|
var tmp_3;
|
|
2299
2299
|
if (!(lit == null)) {
|
|
2300
2300
|
var tmp_4;
|
|
2301
|
-
var tmp_5 = lit.
|
|
2301
|
+
var tmp_5 = lit.wy_1;
|
|
2302
2302
|
if (tmp_5 instanceof Integer) {
|
|
2303
2303
|
tmp_4 = true;
|
|
2304
2304
|
} else {
|
|
2305
|
-
var tmp_6 = lit.
|
|
2305
|
+
var tmp_6 = lit.wy_1;
|
|
2306
2306
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2307
2307
|
}
|
|
2308
2308
|
tmp_3 = tmp_4;
|
|
@@ -2310,31 +2310,31 @@ function toRawCode($this, $receiver) {
|
|
|
2310
2310
|
tmp_3 = false;
|
|
2311
2311
|
}
|
|
2312
2312
|
if (tmp_3) {
|
|
2313
|
-
tmp_2 = toString_0(lit.
|
|
2313
|
+
tmp_2 = toString_0(lit.vy_1);
|
|
2314
2314
|
} else {
|
|
2315
2315
|
var tmp_7;
|
|
2316
2316
|
if (!(lit == null)) {
|
|
2317
|
-
var tmp_8 = lit.
|
|
2317
|
+
var tmp_8 = lit.wy_1;
|
|
2318
2318
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2319
2319
|
} else {
|
|
2320
2320
|
tmp_7 = false;
|
|
2321
2321
|
}
|
|
2322
2322
|
if (tmp_7) {
|
|
2323
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2323
|
+
tmp_2 = '"' + toString_0(lit.vy_1) + '"';
|
|
2324
2324
|
} else {
|
|
2325
|
-
tmp_2 = toRawCode($this, $receiver.
|
|
2325
|
+
tmp_2 = toRawCode($this, $receiver.c10_1);
|
|
2326
2326
|
}
|
|
2327
2327
|
}
|
|
2328
2328
|
var idx = tmp_2;
|
|
2329
|
-
tmp = toRawCode($this, $receiver.
|
|
2329
|
+
tmp = toRawCode($this, $receiver.b10_1) + '[' + idx + ']';
|
|
2330
2330
|
} else {
|
|
2331
2331
|
if ($receiver instanceof ConstructorStatement) {
|
|
2332
|
-
var tmp_9 = $receiver.
|
|
2332
|
+
var tmp_9 = $receiver.gu_1;
|
|
2333
2333
|
var tmp3_safe_receiver = tmp_9 instanceof Custom ? tmp_9 : null;
|
|
2334
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
2335
|
-
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
2336
|
-
var typeName = tmp5_elvis_lhs == null ? toString_0($receiver.
|
|
2337
|
-
var tmp_10 = $receiver.
|
|
2334
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.ru_1;
|
|
2335
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.du();
|
|
2336
|
+
var typeName = tmp5_elvis_lhs == null ? toString_0($receiver.gu_1) : tmp5_elvis_lhs;
|
|
2337
|
+
var tmp_10 = $receiver.hu_1.m1();
|
|
2338
2338
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2339
2339
|
var tmp_11;
|
|
2340
2340
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2347,23 +2347,23 @@ function toRawCode($this, $receiver) {
|
|
|
2347
2347
|
} else {
|
|
2348
2348
|
if ($receiver instanceof Literal_0) {
|
|
2349
2349
|
var tmp_12;
|
|
2350
|
-
var tmp_13 = $receiver.
|
|
2350
|
+
var tmp_13 = $receiver.wy_1;
|
|
2351
2351
|
if (tmp_13 instanceof String_1) {
|
|
2352
|
-
tmp_12 = 'String::from("' + toString_0($receiver.
|
|
2352
|
+
tmp_12 = 'String::from("' + toString_0($receiver.vy_1) + '")';
|
|
2353
2353
|
} else {
|
|
2354
|
-
var tmp_14 = $receiver.
|
|
2354
|
+
var tmp_14 = $receiver.wy_1;
|
|
2355
2355
|
if (tmp_14 instanceof Boolean_0) {
|
|
2356
|
-
tmp_12 = toString_0($receiver.
|
|
2356
|
+
tmp_12 = toString_0($receiver.vy_1);
|
|
2357
2357
|
} else {
|
|
2358
|
-
var tmp_15 = $receiver.
|
|
2358
|
+
var tmp_15 = $receiver.wy_1;
|
|
2359
2359
|
if (tmp_15 instanceof Integer) {
|
|
2360
|
-
tmp_12 = toString_0($receiver.
|
|
2360
|
+
tmp_12 = toString_0($receiver.vy_1);
|
|
2361
2361
|
} else {
|
|
2362
|
-
var tmp_16 = $receiver.
|
|
2362
|
+
var tmp_16 = $receiver.wy_1;
|
|
2363
2363
|
if (tmp_16 instanceof Number_0) {
|
|
2364
|
-
tmp_12 = toString_0($receiver.
|
|
2364
|
+
tmp_12 = toString_0($receiver.vy_1);
|
|
2365
2365
|
} else {
|
|
2366
|
-
tmp_12 = toString_0($receiver.
|
|
2366
|
+
tmp_12 = toString_0($receiver.vy_1);
|
|
2367
2367
|
}
|
|
2368
2368
|
}
|
|
2369
2369
|
}
|
|
@@ -2371,7 +2371,7 @@ function toRawCode($this, $receiver) {
|
|
|
2371
2371
|
tmp = tmp_12;
|
|
2372
2372
|
} else {
|
|
2373
2373
|
if ($receiver instanceof RawExpression) {
|
|
2374
|
-
tmp = $receiver.
|
|
2374
|
+
tmp = $receiver.gy_1;
|
|
2375
2375
|
} else {
|
|
2376
2376
|
// Inline function 'kotlin.error' call
|
|
2377
2377
|
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression($receiver).o();
|
|
@@ -2417,11 +2417,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2417
2417
|
var tmp;
|
|
2418
2418
|
if (element instanceof Interface) {
|
|
2419
2419
|
var tmp_0;
|
|
2420
|
-
if (element.
|
|
2420
|
+
if (element.rv_1.equals(Companion_getInstance().au('Call'))) {
|
|
2421
2421
|
tmp_0 = element;
|
|
2422
2422
|
} else {
|
|
2423
2423
|
// Inline function 'kotlin.collections.map' call
|
|
2424
|
-
var this_0 = element.
|
|
2424
|
+
var this_0 = element.sv_1;
|
|
2425
2425
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2426
2426
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2427
2427
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2437,7 +2437,7 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2437
2437
|
destination.x(tmp$ret$2);
|
|
2438
2438
|
}
|
|
2439
2439
|
var borrowed = destination;
|
|
2440
|
-
tmp_0 = transformChildren_0(element.
|
|
2440
|
+
tmp_0 = transformChildren_0(element.zv(VOID, borrowed), tr);
|
|
2441
2441
|
}
|
|
2442
2442
|
tmp = tmp_0;
|
|
2443
2443
|
} else {
|
|
@@ -2453,13 +2453,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2453
2453
|
var tmp;
|
|
2454
2454
|
var tmp_0;
|
|
2455
2455
|
if (s instanceof FunctionCall) {
|
|
2456
|
-
tmp_0 = RustTransform_getInstance().
|
|
2456
|
+
tmp_0 = RustTransform_getInstance().y38_1.i1(s.qy_1.eu());
|
|
2457
2457
|
} else {
|
|
2458
2458
|
tmp_0 = false;
|
|
2459
2459
|
}
|
|
2460
2460
|
if (tmp_0) {
|
|
2461
2461
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2462
|
-
var this_0 = s.
|
|
2462
|
+
var this_0 = s.ry_1.m1();
|
|
2463
2463
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2464
2464
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2465
2465
|
var index = 0;
|
|
@@ -2473,13 +2473,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2473
2473
|
var key = item.n1();
|
|
2474
2474
|
// Inline function 'kotlin.collections.component2' call
|
|
2475
2475
|
var value = item.o1();
|
|
2476
|
-
var transformed = t.
|
|
2476
|
+
var transformed = t.z18(value);
|
|
2477
2477
|
var tmp_1;
|
|
2478
2478
|
var tmp_2;
|
|
2479
2479
|
if (idx === 0) {
|
|
2480
2480
|
var tmp_3;
|
|
2481
2481
|
if (transformed instanceof VariableReference) {
|
|
2482
|
-
tmp_3 = transformed.
|
|
2482
|
+
tmp_3 = transformed.ev_1.bu() === 'it';
|
|
2483
2483
|
} else {
|
|
2484
2484
|
tmp_3 = false;
|
|
2485
2485
|
}
|
|
@@ -2496,20 +2496,20 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2496
2496
|
destination.x(tmp$ret$2);
|
|
2497
2497
|
}
|
|
2498
2498
|
var newArgs = toMap(destination);
|
|
2499
|
-
tmp = s.
|
|
2499
|
+
tmp = s.uy(VOID, VOID, VOID, newArgs);
|
|
2500
2500
|
} else {
|
|
2501
2501
|
tmp = transformChildren(s, t);
|
|
2502
2502
|
}
|
|
2503
2503
|
return tmp;
|
|
2504
2504
|
}
|
|
2505
2505
|
function RustTransform$rustName$lambda(it) {
|
|
2506
|
-
return RustTransform_getInstance().
|
|
2506
|
+
return RustTransform_getInstance().a39(it);
|
|
2507
2507
|
}
|
|
2508
2508
|
function RustTransform$rustName$lambda_0(it) {
|
|
2509
|
-
return RustTransform_getInstance().
|
|
2509
|
+
return RustTransform_getInstance().a39(it);
|
|
2510
2510
|
}
|
|
2511
2511
|
function RustTransform$toRawCode$lambda(it) {
|
|
2512
|
-
return it.n1().
|
|
2512
|
+
return it.n1().eu() + ': ' + toRawCode(RustTransform_getInstance(), it.o1());
|
|
2513
2513
|
}
|
|
2514
2514
|
function RustTransform() {
|
|
2515
2515
|
RustTransform_instance = this;
|
|
@@ -2517,57 +2517,57 @@ function RustTransform() {
|
|
|
2517
2517
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2518
2518
|
// Inline function 'kotlin.apply' call
|
|
2519
2519
|
var this_0 = new TransformerBuilder();
|
|
2520
|
-
this_0.
|
|
2521
|
-
tmp.
|
|
2520
|
+
this_0.k19(RustTransform$primitivesToCustom$lambda);
|
|
2521
|
+
tmp.v38_1 = this_0.t19();
|
|
2522
2522
|
var tmp_0 = this;
|
|
2523
2523
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2524
2524
|
// Inline function 'kotlin.apply' call
|
|
2525
2525
|
var this_1 = new TransformerBuilder();
|
|
2526
|
-
this_1.
|
|
2527
|
-
tmp_0.
|
|
2526
|
+
this_1.y19(RustTransform$borrow$lambda);
|
|
2527
|
+
tmp_0.w38_1 = this_1.t19();
|
|
2528
2528
|
var tmp_1 = this;
|
|
2529
2529
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2530
2530
|
// Inline function 'kotlin.apply' call
|
|
2531
|
-
tmp_1.
|
|
2532
|
-
this.
|
|
2531
|
+
tmp_1.x38_1 = (new TransformerBuilder()).t19();
|
|
2532
|
+
this.y38_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2533
2533
|
var tmp_2 = this;
|
|
2534
2534
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2535
2535
|
// Inline function 'kotlin.apply' call
|
|
2536
2536
|
var this_2 = new TransformerBuilder();
|
|
2537
|
-
this_2.
|
|
2538
|
-
tmp_2.
|
|
2537
|
+
this_2.w19(RustTransform$serializationArgs$lambda);
|
|
2538
|
+
tmp_2.z38_1 = this_2.t19();
|
|
2539
2539
|
}
|
|
2540
|
-
protoOf(RustTransform).
|
|
2540
|
+
protoOf(RustTransform).b39 = function (element) {
|
|
2541
2541
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2542
2542
|
var scope = new TransformScope(element);
|
|
2543
|
-
scope.
|
|
2544
|
-
var tmp = scope.
|
|
2543
|
+
scope.j19(RustTransform_getInstance().v38_1);
|
|
2544
|
+
var tmp = scope.e19_1;
|
|
2545
2545
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2546
2546
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2547
2547
|
var scope_0 = new TransformScope(this_0);
|
|
2548
|
-
scope_0.
|
|
2549
|
-
var tmp_0 = scope_0.
|
|
2548
|
+
scope_0.j19(RustTransform_getInstance().w38_1);
|
|
2549
|
+
var tmp_0 = scope_0.e19_1;
|
|
2550
2550
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2551
2551
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2552
2552
|
var scope_1 = new TransformScope(this_1);
|
|
2553
|
-
scope_1.
|
|
2554
|
-
var tmp_1 = scope_1.
|
|
2553
|
+
scope_1.j19(RustTransform_getInstance().x38_1);
|
|
2554
|
+
var tmp_1 = scope_1.e19_1;
|
|
2555
2555
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2556
2556
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2557
2557
|
var scope_2 = new TransformScope(this_2);
|
|
2558
|
-
scope_2.
|
|
2559
|
-
var tmp_2 = scope_2.
|
|
2558
|
+
scope_2.j19(RustTransform_getInstance().z38_1);
|
|
2559
|
+
var tmp_2 = scope_2.e19_1;
|
|
2560
2560
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2561
2561
|
};
|
|
2562
|
-
protoOf(RustTransform).
|
|
2562
|
+
protoOf(RustTransform).a39 = function (_this__u8e3s4) {
|
|
2563
2563
|
var tmp;
|
|
2564
2564
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2565
|
-
var pascalName = _this__u8e3s4.
|
|
2565
|
+
var pascalName = _this__u8e3s4.ru_1.du();
|
|
2566
2566
|
var tmp_0;
|
|
2567
|
-
if (_this__u8e3s4.
|
|
2567
|
+
if (_this__u8e3s4.su_1.r()) {
|
|
2568
2568
|
tmp_0 = pascalName;
|
|
2569
2569
|
} else {
|
|
2570
|
-
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.
|
|
2570
|
+
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.su_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda) + '>';
|
|
2571
2571
|
}
|
|
2572
2572
|
tmp = tmp_0;
|
|
2573
2573
|
} else {
|
|
@@ -2575,13 +2575,13 @@ protoOf(RustTransform).v38 = function (_this__u8e3s4) {
|
|
|
2575
2575
|
tmp = 'String';
|
|
2576
2576
|
} else {
|
|
2577
2577
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2578
|
-
tmp = 'Option<' + this.
|
|
2578
|
+
tmp = 'Option<' + this.a39(_this__u8e3s4.vu_1) + '>';
|
|
2579
2579
|
} else {
|
|
2580
2580
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2581
|
-
tmp = 'Vec<' + this.
|
|
2581
|
+
tmp = 'Vec<' + this.a39(_this__u8e3s4.mu_1) + '>';
|
|
2582
2582
|
} else {
|
|
2583
2583
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2584
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2584
|
+
tmp = 'std::collections::HashMap<' + this.a39(_this__u8e3s4.ou_1) + ', ' + this.a39(_this__u8e3s4.pu_1) + '>';
|
|
2585
2585
|
} else {
|
|
2586
2586
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2587
2587
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2603,7 +2603,7 @@ protoOf(RustTransform).v38 = function (_this__u8e3s4) {
|
|
|
2603
2603
|
} else {
|
|
2604
2604
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2605
2605
|
var tmp_1;
|
|
2606
|
-
switch (_this__u8e3s4.
|
|
2606
|
+
switch (_this__u8e3s4.ku_1.f3_1) {
|
|
2607
2607
|
case 0:
|
|
2608
2608
|
tmp_1 = 'i32';
|
|
2609
2609
|
break;
|
|
@@ -2618,7 +2618,7 @@ protoOf(RustTransform).v38 = function (_this__u8e3s4) {
|
|
|
2618
2618
|
} else {
|
|
2619
2619
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2620
2620
|
var tmp_2;
|
|
2621
|
-
switch (_this__u8e3s4.
|
|
2621
|
+
switch (_this__u8e3s4.lu_1.f3_1) {
|
|
2622
2622
|
case 0:
|
|
2623
2623
|
tmp_2 = 'f32';
|
|
2624
2624
|
break;
|
|
@@ -2638,7 +2638,7 @@ protoOf(RustTransform).v38 = function (_this__u8e3s4) {
|
|
|
2638
2638
|
tmp = 'String';
|
|
2639
2639
|
} else {
|
|
2640
2640
|
if (_this__u8e3s4 instanceof Function) {
|
|
2641
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2641
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.yu_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.a39(_this__u8e3s4.zu_1) + '>';
|
|
2642
2642
|
} else {
|
|
2643
2643
|
noWhenBranchMatchedException();
|
|
2644
2644
|
}
|
|
@@ -2659,27 +2659,27 @@ protoOf(RustTransform).v38 = function (_this__u8e3s4) {
|
|
|
2659
2659
|
}
|
|
2660
2660
|
return tmp;
|
|
2661
2661
|
};
|
|
2662
|
-
protoOf(RustTransform).
|
|
2662
|
+
protoOf(RustTransform).f39 = function (_this__u8e3s4) {
|
|
2663
2663
|
var tmp;
|
|
2664
2664
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2665
2665
|
// Inline function 'kotlin.let' call
|
|
2666
|
-
var it = _this__u8e3s4.
|
|
2666
|
+
var it = _this__u8e3s4.ru_1.du();
|
|
2667
2667
|
tmp = startsWith(it, '&') || startsWith(it, '&dyn ') || startsWith(it, '&impl ') || startsWith(it, '&mut ');
|
|
2668
2668
|
} else {
|
|
2669
2669
|
tmp = false;
|
|
2670
2670
|
}
|
|
2671
2671
|
return tmp;
|
|
2672
2672
|
};
|
|
2673
|
-
protoOf(RustTransform).
|
|
2673
|
+
protoOf(RustTransform).e39 = function (_this__u8e3s4) {
|
|
2674
2674
|
// Inline function 'kotlin.let' call
|
|
2675
|
-
var it = _this__u8e3s4.
|
|
2675
|
+
var it = _this__u8e3s4.ru_1.du();
|
|
2676
2676
|
return it === 'Serializer' || it === 'Deserializer';
|
|
2677
2677
|
};
|
|
2678
|
-
protoOf(RustTransform).
|
|
2679
|
-
return _this__u8e3s4.
|
|
2678
|
+
protoOf(RustTransform).d39 = function (_this__u8e3s4) {
|
|
2679
|
+
return _this__u8e3s4.ru_1.du() === 'GeneratorField';
|
|
2680
2680
|
};
|
|
2681
|
-
protoOf(RustTransform).
|
|
2682
|
-
var v = _this__u8e3s4.
|
|
2681
|
+
protoOf(RustTransform).c39 = function (_this__u8e3s4) {
|
|
2682
|
+
var v = _this__u8e3s4.bu();
|
|
2683
2683
|
switch (v) {
|
|
2684
2684
|
case 'self':
|
|
2685
2685
|
case '&self':
|
|
@@ -2695,22 +2695,22 @@ function RustTransform_getInstance() {
|
|
|
2695
2695
|
return RustTransform_instance;
|
|
2696
2696
|
}
|
|
2697
2697
|
function borrow(_this__u8e3s4) {
|
|
2698
|
-
return _this__u8e3s4.
|
|
2698
|
+
return _this__u8e3s4.uu(new Name(listOf('&' + _this__u8e3s4.ru_1.du())));
|
|
2699
2699
|
}
|
|
2700
2700
|
function borrowDyn(_this__u8e3s4) {
|
|
2701
|
-
return _this__u8e3s4.
|
|
2701
|
+
return _this__u8e3s4.uu(new Name(listOf('&dyn ' + _this__u8e3s4.ru_1.du())));
|
|
2702
2702
|
}
|
|
2703
2703
|
function borrowImpl(_this__u8e3s4) {
|
|
2704
|
-
return _this__u8e3s4.
|
|
2704
|
+
return _this__u8e3s4.uu(new Name(listOf('&impl ' + _this__u8e3s4.ru_1.du())));
|
|
2705
2705
|
}
|
|
2706
2706
|
function ownedImpl(_this__u8e3s4) {
|
|
2707
|
-
return _this__u8e3s4.
|
|
2707
|
+
return _this__u8e3s4.uu(new Name(listOf('impl ' + _this__u8e3s4.ru_1.du())));
|
|
2708
2708
|
}
|
|
2709
2709
|
//region block: post-declaration
|
|
2710
|
-
protoOf(RustEmitter).
|
|
2711
|
-
protoOf(RustEmitter).
|
|
2712
|
-
protoOf(RustEmitter).
|
|
2713
|
-
protoOf(RustEmitter).
|
|
2710
|
+
protoOf(RustEmitter).i1b = get_extensions;
|
|
2711
|
+
protoOf(RustEmitter).uo = emit_1;
|
|
2712
|
+
protoOf(RustEmitter).k1b = beforeGenerate;
|
|
2713
|
+
protoOf(RustEmitter).wp = get_supportsDefaults;
|
|
2714
2714
|
//endregion
|
|
2715
2715
|
//region block: exports
|
|
2716
2716
|
export {
|