@flock/wirespec 0.19.2 → 0.19.3
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/clikt-clikt-mordant.mjs +39 -39
- package/colormath-root-colormath.mjs +432 -432
- package/kotlin-kotlin-stdlib.mjs +6 -6
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +9765 -9765
- package/kotlin-rgxgen.mjs +1756 -1756
- package/kotlinx-io-kotlinx-io-core.mjs +403 -403
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1759 -1759
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1468 -1468
- package/mordant-mordant.mjs +1181 -1181
- package/package.json +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +238 -236
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +139 -137
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +176 -174
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +305 -303
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +112 -110
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +179 -177
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +24 -24
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +2626 -2578
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +479 -479
- package/wirespec-src-converter-openapi.mjs +338 -338
- package/wirespec-src-ide-lsp.mjs +1351 -1351
- package/wirespec-src-plugin-arguments.mjs +134 -134
- package/wirespec-src-plugin-cli.mjs +84 -84
- package/wirespec-src-plugin-npm.mjs +18 -18
- package/wirespec-src-tools-generator.mjs +2 -2
|
@@ -151,6 +151,7 @@ import {
|
|
|
151
151
|
convert17zcptkz4mhr4 as convert_2,
|
|
152
152
|
convert32tuiui3czihh as convert_3,
|
|
153
153
|
convert1cn4bolzoed8c as convert_4,
|
|
154
|
+
get_extensions31c4or738wbxz as get_extensions,
|
|
154
155
|
emit1oxjujel6f3jb as emit_1,
|
|
155
156
|
beforeGenerate3o8idb3hey1b0 as beforeGenerate,
|
|
156
157
|
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
@@ -191,7 +192,7 @@ initMetadataForClass(RustIrEmitter, 'RustIrEmitter', RustIrEmitter, VOID, [IrEmi
|
|
|
191
192
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
192
193
|
//endregion
|
|
193
194
|
function _get_sanitizationConfig__sns434($this) {
|
|
194
|
-
var tmp0 = $this.
|
|
195
|
+
var tmp0 = $this.r1z_1;
|
|
195
196
|
var tmp = KProperty1;
|
|
196
197
|
// Inline function 'kotlin.getValue' call
|
|
197
198
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustIrEmitter$_get_sanitizationConfig_$ref_17ypni(), null);
|
|
@@ -262,7 +263,7 @@ function toPascalCase($this, _this__u8e3s4) {
|
|
|
262
263
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustIrEmitter$toPascalCase$lambda);
|
|
263
264
|
}
|
|
264
265
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
265
|
-
return Companion_getInstance_0().
|
|
266
|
+
return Companion_getInstance_0().u1z_1.u1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
266
267
|
}
|
|
267
268
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
268
269
|
// Inline function 'kotlin.let' call
|
|
@@ -287,7 +288,7 @@ function prependImports($this, _this__u8e3s4, imports) {
|
|
|
287
288
|
var tmp;
|
|
288
289
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
289
290
|
if (!imports.r()) {
|
|
290
|
-
tmp = _this__u8e3s4.
|
|
291
|
+
tmp = _this__u8e3s4.z1n(VOID, plus(imports, _this__u8e3s4.w1n_1));
|
|
291
292
|
} else {
|
|
292
293
|
tmp = _this__u8e3s4;
|
|
293
294
|
}
|
|
@@ -332,7 +333,7 @@ function containsWildcard($this, type) {
|
|
|
332
333
|
tmp = containsWildcard($this, type.g1j_1);
|
|
333
334
|
} else {
|
|
334
335
|
if (type instanceof Dict) {
|
|
335
|
-
tmp = containsWildcard($this, type.
|
|
336
|
+
tmp = containsWildcard($this, type.i1n_1) || containsWildcard($this, type.j1n_1);
|
|
336
337
|
} else {
|
|
337
338
|
tmp = false;
|
|
338
339
|
}
|
|
@@ -387,7 +388,7 @@ function containsUnderiveable($this, type) {
|
|
|
387
388
|
tmp = containsUnderiveable($this, type.g1j_1);
|
|
388
389
|
} else {
|
|
389
390
|
if (type instanceof Dict) {
|
|
390
|
-
tmp = containsUnderiveable($this, type.
|
|
391
|
+
tmp = containsUnderiveable($this, type.i1n_1) || containsUnderiveable($this, type.j1n_1);
|
|
391
392
|
} else {
|
|
392
393
|
tmp = false;
|
|
393
394
|
}
|
|
@@ -413,7 +414,7 @@ function buildClientParams($this, _this__u8e3s4) {
|
|
|
413
414
|
}
|
|
414
415
|
function Companion() {
|
|
415
416
|
Companion_instance_2 = this;
|
|
416
|
-
this.
|
|
417
|
+
this.u1z_1 = setOf(['as', 'break', 'const', 'continue', 'crate', 'else', 'enum', 'extern', 'false', 'fn', 'for', 'if', 'impl', 'in', 'let', 'loop', 'match', 'mod', 'move', 'mut', 'pub', 'ref', 'return', 'self', 'Self', 'static', 'struct', 'super', 'trait', 'true', 'type', 'unsafe', 'use', 'where', 'while', 'async', 'await', 'dyn', 'abstract', 'become', 'box', 'do', 'final', 'macro', 'override', 'priv', 'typeof', 'unsized', 'virtual', 'yield', 'try']);
|
|
417
418
|
}
|
|
418
419
|
var Companion_instance_2;
|
|
419
420
|
function Companion_getInstance_0() {
|
|
@@ -422,16 +423,16 @@ function Companion_getInstance_0() {
|
|
|
422
423
|
return Companion_instance_2;
|
|
423
424
|
}
|
|
424
425
|
function sam$kotlin_Comparator$0(function_0) {
|
|
425
|
-
this.
|
|
426
|
+
this.v1z_1 = function_0;
|
|
426
427
|
}
|
|
427
428
|
protoOf(sam$kotlin_Comparator$0).td = function (a, b) {
|
|
428
|
-
return this.
|
|
429
|
+
return this.v1z_1(a, b);
|
|
429
430
|
};
|
|
430
431
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
431
432
|
return this.td(a, b);
|
|
432
433
|
};
|
|
433
434
|
protoOf(sam$kotlin_Comparator$0).l3 = function () {
|
|
434
|
-
return this.
|
|
435
|
+
return this.v1z_1;
|
|
435
436
|
};
|
|
436
437
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
437
438
|
var tmp;
|
|
@@ -488,9 +489,9 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
488
489
|
return function (stmt, tr) {
|
|
489
490
|
var tmp;
|
|
490
491
|
if (stmt instanceof ConstructorStatement) {
|
|
491
|
-
var tmp_0 = tr.
|
|
492
|
+
var tmp_0 = tr.y1u(stmt.s1n_1);
|
|
492
493
|
// Inline function 'kotlin.collections.map' call
|
|
493
|
-
var this_0 = stmt.
|
|
494
|
+
var this_0 = stmt.t1n_1;
|
|
494
495
|
// Inline function 'kotlin.collections.mapTo' call
|
|
495
496
|
var destination = ArrayList_init_$Create$(this_0.a1());
|
|
496
497
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -501,7 +502,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
501
502
|
var k = item.k1();
|
|
502
503
|
// Inline function 'kotlin.collections.component2' call
|
|
503
504
|
var v = item.l1();
|
|
504
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
505
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.b1v(v));
|
|
505
506
|
destination.x(tmp$ret$3);
|
|
506
507
|
}
|
|
507
508
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -513,7 +514,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
513
514
|
}
|
|
514
515
|
function RustIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
515
516
|
return function () {
|
|
516
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
517
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().u1z_1, setOf(['self', 'Self']));
|
|
517
518
|
var tmp = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
518
519
|
var tmp_0 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
519
520
|
var tmp_1 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -536,50 +537,50 @@ function RustIrEmitter$emitShared$lambda_0($this$interface) {
|
|
|
536
537
|
}
|
|
537
538
|
function RustIrEmitter$emitShared$lambda_1($this$interface) {
|
|
538
539
|
$this$interface.w1j(Custom_init_$Create$('Sized'));
|
|
539
|
-
$this$interface.
|
|
540
|
-
$this$interface.
|
|
540
|
+
$this$interface.d1i('label', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda);
|
|
541
|
+
$this$interface.d1i('from_label', true, VOID, RustIrEmitter$emitShared$lambda$lambda_0);
|
|
541
542
|
return Unit_instance;
|
|
542
543
|
}
|
|
543
544
|
function RustIrEmitter$emitShared$lambda$lambda($this$function) {
|
|
544
|
-
$this$function.
|
|
545
|
-
$this$function.
|
|
545
|
+
$this$function.y1h('&self', Custom_init_$Create$(''));
|
|
546
|
+
$this$function.b1i(Custom_init_$Create$('&str'));
|
|
546
547
|
return Unit_instance;
|
|
547
548
|
}
|
|
548
549
|
function RustIrEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
549
|
-
$this$function.
|
|
550
|
-
$this$function.
|
|
550
|
+
$this$function.y1h('s', Custom_init_$Create$('&str'));
|
|
551
|
+
$this$function.b1i(Custom_init_$Create$('Option<Self>'));
|
|
551
552
|
return Unit_instance;
|
|
552
553
|
}
|
|
553
554
|
function RustIrEmitter$emitShared$lambda_2($this$interface) {
|
|
554
|
-
$this$interface.q1j($this$interface.
|
|
555
|
-
$this$interface.
|
|
556
|
-
$this$interface.
|
|
555
|
+
$this$interface.q1j($this$interface.p1h('T', []), []);
|
|
556
|
+
$this$interface.d1i('value', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_1);
|
|
557
|
+
$this$interface.d1i('validate', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_2);
|
|
557
558
|
return Unit_instance;
|
|
558
559
|
}
|
|
559
560
|
function RustIrEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
560
|
-
$this$function.
|
|
561
|
-
$this$function.
|
|
561
|
+
$this$function.y1h('&self', Custom_init_$Create$(''));
|
|
562
|
+
$this$function.b1i(borrow($this$function.p1h('T', [])));
|
|
562
563
|
return Unit_instance;
|
|
563
564
|
}
|
|
564
565
|
function RustIrEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
565
|
-
$this$function.
|
|
566
|
-
$this$function.
|
|
566
|
+
$this$function.y1h('&self', Custom_init_$Create$(''));
|
|
567
|
+
$this$function.b1i($this$function.x1j());
|
|
567
568
|
return Unit_instance;
|
|
568
569
|
}
|
|
569
570
|
function RustIrEmitter$emitShared$lambda_3($this$interface) {
|
|
570
|
-
$this$interface.q1j($this$interface.
|
|
571
|
-
$this$interface.r1j('path', borrowDyn($this$interface.
|
|
572
|
-
$this$interface.r1j('method', borrow($this$interface.
|
|
573
|
-
$this$interface.r1j('queries', borrowDyn($this$interface.
|
|
574
|
-
$this$interface.r1j('headers', borrowDyn($this$interface.
|
|
575
|
-
$this$interface.r1j('body', borrow($this$interface.
|
|
571
|
+
$this$interface.q1j($this$interface.p1h('T', []), []);
|
|
572
|
+
$this$interface.r1j('path', borrowDyn($this$interface.p1h('Path', [])));
|
|
573
|
+
$this$interface.r1j('method', borrow($this$interface.p1h('Method', [])));
|
|
574
|
+
$this$interface.r1j('queries', borrowDyn($this$interface.p1h('Queries', [])));
|
|
575
|
+
$this$interface.r1j('headers', borrowDyn($this$interface.p1h('RequestHeaders', [])));
|
|
576
|
+
$this$interface.r1j('body', borrow($this$interface.p1h('T', [])));
|
|
576
577
|
return Unit_instance;
|
|
577
578
|
}
|
|
578
579
|
function RustIrEmitter$emitShared$lambda_4($this$interface) {
|
|
579
|
-
$this$interface.q1j($this$interface.
|
|
580
|
+
$this$interface.q1j($this$interface.p1h('T', []), []);
|
|
580
581
|
$this$interface.r1j('status', $this$interface.w1k());
|
|
581
|
-
$this$interface.r1j('headers', borrowDyn($this$interface.
|
|
582
|
-
$this$interface.r1j('body', borrow($this$interface.
|
|
582
|
+
$this$interface.r1j('headers', borrowDyn($this$interface.p1h('ResponseHeaders', [])));
|
|
583
|
+
$this$interface.r1j('body', borrow($this$interface.p1h('T', [])));
|
|
583
584
|
return Unit_instance;
|
|
584
585
|
}
|
|
585
586
|
function RustIrEmitter$emitShared$lambda_5($this$interface) {
|
|
@@ -587,9 +588,9 @@ function RustIrEmitter$emitShared$lambda_5($this$interface) {
|
|
|
587
588
|
return Unit_instance;
|
|
588
589
|
}
|
|
589
590
|
function RustIrEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
590
|
-
$this$asyncFunction.
|
|
591
|
-
$this$asyncFunction.
|
|
592
|
-
$this$asyncFunction.
|
|
591
|
+
$this$asyncFunction.y1h('&self', Custom_init_$Create$(''));
|
|
592
|
+
$this$asyncFunction.y1h('request', borrow($this$asyncFunction.p1h('RawRequest', [])));
|
|
593
|
+
$this$asyncFunction.b1i($this$asyncFunction.p1h('RawResponse', []));
|
|
593
594
|
return Unit_instance;
|
|
594
595
|
}
|
|
595
596
|
function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -597,7 +598,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
597
598
|
var tmp;
|
|
598
599
|
if (element instanceof File) {
|
|
599
600
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
600
|
-
var tmp0 = element.
|
|
601
|
+
var tmp0 = element.w1n_1;
|
|
601
602
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
602
603
|
var destination = ArrayList_init_$Create$_0();
|
|
603
604
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -608,7 +609,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
608
609
|
}
|
|
609
610
|
}
|
|
610
611
|
var namespace = first(destination);
|
|
611
|
-
tmp = element.
|
|
612
|
+
tmp = element.z1n(VOID, plus($rustImports, namespace.c1o_1));
|
|
612
613
|
} else {
|
|
613
614
|
tmp = element;
|
|
614
615
|
}
|
|
@@ -620,7 +621,7 @@ function RustIrEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
620
621
|
var tmp;
|
|
621
622
|
if (element instanceof Enum_0) {
|
|
622
623
|
var tmp_0;
|
|
623
|
-
if (element.
|
|
624
|
+
if (element.b1p_1.equals(Companion_getInstance().n1h('Method'))) {
|
|
624
625
|
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}');
|
|
625
626
|
} else {
|
|
626
627
|
tmp_0 = element;
|
|
@@ -637,7 +638,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
637
638
|
var tmp;
|
|
638
639
|
if (element instanceof File) {
|
|
639
640
|
// Inline function 'kotlin.collections.flatMap' call
|
|
640
|
-
var tmp0 = element.
|
|
641
|
+
var tmp0 = element.w1n_1;
|
|
641
642
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
642
643
|
var destination = ArrayList_init_$Create$_0();
|
|
643
644
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -649,7 +650,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
649
650
|
tmp$ret$0 = listOf(element_0);
|
|
650
651
|
break $l$block;
|
|
651
652
|
}
|
|
652
|
-
var name = element_0.
|
|
653
|
+
var name = element_0.p1o_1.o1h();
|
|
653
654
|
var tmp_0;
|
|
654
655
|
// Inline function 'kotlin.collections.contains' call
|
|
655
656
|
// Inline function 'kotlin.collections.containsKey' call
|
|
@@ -683,7 +684,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
683
684
|
addAll(destination, list);
|
|
684
685
|
}
|
|
685
686
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
686
|
-
tmp = element.
|
|
687
|
+
tmp = element.z1n(VOID, newElements);
|
|
687
688
|
} else {
|
|
688
689
|
tmp = element;
|
|
689
690
|
}
|
|
@@ -699,14 +700,14 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
699
700
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
700
701
|
var tmp_0 = scope;
|
|
701
702
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
702
|
-
var this_0 = scope.
|
|
703
|
+
var this_0 = scope.g1v_1;
|
|
703
704
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
704
705
|
// Inline function 'kotlin.apply' call
|
|
705
706
|
var this_1 = new TransformerBuilder();
|
|
706
|
-
this_1.
|
|
707
|
-
var tmp$ret$2 = this_1.
|
|
708
|
-
tmp_0.
|
|
709
|
-
var tmp_1 = scope.
|
|
707
|
+
this_1.x1i(RustIrEmitter$emitShared$lambda$lambda_4);
|
|
708
|
+
var tmp$ret$2 = this_1.y1i();
|
|
709
|
+
tmp_0.g1v_1 = transform(this_0, tmp$ret$2);
|
|
710
|
+
var tmp_1 = scope.g1v_1;
|
|
710
711
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
711
712
|
} else {
|
|
712
713
|
tmp = element;
|
|
@@ -734,7 +735,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
734
735
|
var _iterator__ex2g4s = tmp0.t();
|
|
735
736
|
while (_iterator__ex2g4s.u()) {
|
|
736
737
|
var element_0 = _iterator__ex2g4s.v();
|
|
737
|
-
if (element_0.
|
|
738
|
+
if (element_0.y1p_1.j1j() === '&self' || element_0.y1p_1.j1j() === 'self') {
|
|
738
739
|
tmp$ret$0 = true;
|
|
739
740
|
break $l$block_0;
|
|
740
741
|
}
|
|
@@ -753,7 +754,7 @@ function RustIrEmitter$emitShared$lambda_10(group) {
|
|
|
753
754
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
754
755
|
}
|
|
755
756
|
function RustIrEmitter$emitShared$lambda$lambda_5(it) {
|
|
756
|
-
return RustGenerator_instance.
|
|
757
|
+
return RustGenerator_instance.u1v(it);
|
|
757
758
|
}
|
|
758
759
|
function RustIrEmitter$emit$lambda(a, b) {
|
|
759
760
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -791,17 +792,17 @@ function RustIrEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs)
|
|
|
791
792
|
var tmp_0;
|
|
792
793
|
var tmp_1;
|
|
793
794
|
if (expr instanceof RawExpression) {
|
|
794
|
-
tmp_1 = endsWith(expr.
|
|
795
|
+
tmp_1 = endsWith(expr.m1p_1, 'Generator');
|
|
795
796
|
} else {
|
|
796
797
|
tmp_1 = false;
|
|
797
798
|
}
|
|
798
799
|
if (tmp_1) {
|
|
799
|
-
tmp_0 = !(expr.
|
|
800
|
+
tmp_0 = !(expr.m1p_1 === $generatorOwnName);
|
|
800
801
|
} else {
|
|
801
802
|
tmp_0 = false;
|
|
802
803
|
}
|
|
803
804
|
if (tmp_0) {
|
|
804
|
-
$generatorRefs.x(expr.
|
|
805
|
+
$generatorRefs.x(expr.m1p_1);
|
|
805
806
|
tmp = Unit_instance;
|
|
806
807
|
}
|
|
807
808
|
return transformChildren_1(expr, t);
|
|
@@ -844,29 +845,29 @@ function RustIrEmitter$buildClientParams$lambda_0(this$0) {
|
|
|
844
845
|
var type = _destruct__k2r9zo.we();
|
|
845
846
|
var tmp = sanitizeKeywords(this$0, name.w1m());
|
|
846
847
|
// Inline function 'kotlin.with' call
|
|
847
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
848
|
+
return tmp + ': ' + RustTransform_getInstance().c20(type);
|
|
848
849
|
};
|
|
849
850
|
}
|
|
850
851
|
function RustIrEmitter(packageName, emitShared) {
|
|
851
852
|
Companion_getInstance_0();
|
|
852
853
|
packageName = packageName === VOID ? Companion_instance_0.cs('community.flock.wirespec.generated') : packageName;
|
|
853
854
|
emitShared = emitShared === VOID ? Companion_instance_1.wo() : emitShared;
|
|
854
|
-
this.
|
|
855
|
-
this.
|
|
856
|
-
this.
|
|
857
|
-
this.
|
|
855
|
+
this.n1z_1 = packageName;
|
|
856
|
+
this.o1z_1 = emitShared;
|
|
857
|
+
this.p1z_1 = RustGenerator_instance;
|
|
858
|
+
this.q1z_1 = FileExtension_Rust_getInstance();
|
|
858
859
|
var tmp = this;
|
|
859
|
-
tmp.
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
860
|
+
tmp.r1z_1 = lazy(RustIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
861
|
+
this.s1z_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
862
|
+
this.t1z_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
862
863
|
}
|
|
863
|
-
protoOf(RustIrEmitter).
|
|
864
|
-
return this.
|
|
864
|
+
protoOf(RustIrEmitter).t1v = function () {
|
|
865
|
+
return this.p1z_1;
|
|
865
866
|
};
|
|
866
867
|
protoOf(RustIrEmitter).uq = function () {
|
|
867
|
-
return this.
|
|
868
|
+
return this.q1z_1;
|
|
868
869
|
};
|
|
869
|
-
protoOf(RustIrEmitter).
|
|
870
|
+
protoOf(RustIrEmitter).x1v = function () {
|
|
870
871
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
871
872
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustIrEmitter$emitShared$lambda);
|
|
872
873
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustIrEmitter$emitShared$lambda_0);
|
|
@@ -885,38 +886,38 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
885
886
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
886
887
|
var tmp = scope;
|
|
887
888
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
888
|
-
var this_1 = scope.
|
|
889
|
+
var this_1 = scope.g1v_1;
|
|
889
890
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
890
891
|
// Inline function 'kotlin.apply' call
|
|
891
892
|
var this_2 = new TransformerBuilder();
|
|
892
|
-
this_2.
|
|
893
|
-
var tmp$ret$2 = this_2.
|
|
894
|
-
tmp.
|
|
893
|
+
this_2.x1i(RustIrEmitter$emitShared$lambda_6(rustImports));
|
|
894
|
+
var tmp$ret$2 = this_2.y1i();
|
|
895
|
+
tmp.g1v_1 = transform(this_1, tmp$ret$2);
|
|
895
896
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
896
897
|
var tmp_0 = scope;
|
|
897
898
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
898
|
-
var this_3 = scope.
|
|
899
|
+
var this_3 = scope.g1v_1;
|
|
899
900
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
900
901
|
// Inline function 'kotlin.apply' call
|
|
901
902
|
var this_4 = new TransformerBuilder();
|
|
902
|
-
this_4.
|
|
903
|
-
var tmp$ret$7 = this_4.
|
|
904
|
-
tmp_0.
|
|
903
|
+
this_4.x1i(RustIrEmitter$emitShared$lambda_7);
|
|
904
|
+
var tmp$ret$7 = this_4.y1i();
|
|
905
|
+
tmp_0.g1v_1 = transform(this_3, tmp$ret$7);
|
|
905
906
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
906
907
|
var tmp_1 = scope;
|
|
907
908
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
908
|
-
var this_5 = scope.
|
|
909
|
+
var this_5 = scope.g1v_1;
|
|
909
910
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
910
911
|
// Inline function 'kotlin.apply' call
|
|
911
912
|
var this_6 = new TransformerBuilder();
|
|
912
|
-
this_6.
|
|
913
|
-
var tmp$ret$12 = this_6.
|
|
914
|
-
tmp_1.
|
|
915
|
-
var tmp_2 = scope.
|
|
913
|
+
this_6.x1i(RustIrEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
914
|
+
var tmp$ret$12 = this_6.y1i();
|
|
915
|
+
tmp_1.g1v_1 = transform(this_5, tmp$ret$12);
|
|
916
|
+
var tmp_2 = scope.g1v_1;
|
|
916
917
|
// Inline function 'kotlin.let' call
|
|
917
918
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
918
919
|
// Inline function 'kotlin.collections.flatMap' call
|
|
919
|
-
var tmp0 = file.
|
|
920
|
+
var tmp0 = file.w1n_1;
|
|
920
921
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
921
922
|
var destination = ArrayList_init_$Create$_0();
|
|
922
923
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -929,7 +930,7 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
929
930
|
break $l$block;
|
|
930
931
|
}
|
|
931
932
|
var tmp_3;
|
|
932
|
-
var tmp0_0 = element.
|
|
933
|
+
var tmp0_0 = element.h1o_1;
|
|
933
934
|
var tmp$ret$18;
|
|
934
935
|
$l$block_1: {
|
|
935
936
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -946,7 +947,7 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
946
947
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
947
948
|
while (_iterator__ex2g4s_0.u()) {
|
|
948
949
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
949
|
-
if (containsUnderiveable(this, element_0.
|
|
950
|
+
if (containsUnderiveable(this, element_0.d1q_1)) {
|
|
950
951
|
tmp$ret$18 = true;
|
|
951
952
|
break $l$block_1;
|
|
952
953
|
}
|
|
@@ -956,7 +957,7 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
956
957
|
if (tmp$ret$18) {
|
|
957
958
|
tmp_3 = '';
|
|
958
959
|
} else {
|
|
959
|
-
var tmp0_1 = element.
|
|
960
|
+
var tmp0_1 = element.h1o_1;
|
|
960
961
|
var tmp$ret$20;
|
|
961
962
|
$l$block_3: {
|
|
962
963
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -973,7 +974,7 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
973
974
|
var _iterator__ex2g4s_1 = tmp0_1.t();
|
|
974
975
|
while (_iterator__ex2g4s_1.u()) {
|
|
975
976
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
976
|
-
if (containsWildcard(this, element_1.
|
|
977
|
+
if (containsWildcard(this, element_1.d1q_1)) {
|
|
977
978
|
tmp$ret$20 = true;
|
|
978
979
|
break $l$block_3;
|
|
979
980
|
}
|
|
@@ -983,7 +984,7 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
983
984
|
if (tmp$ret$20) {
|
|
984
985
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
985
986
|
} else {
|
|
986
|
-
if (setOf(['RawRequest', 'RawResponse']).u1(element.
|
|
987
|
+
if (setOf(['RawRequest', 'RawResponse']).u1(element.g1o_1.o1h())) {
|
|
987
988
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
988
989
|
} else {
|
|
989
990
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -999,29 +1000,29 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
999
1000
|
tmp_6 = listOf(new RawElement(derive));
|
|
1000
1001
|
}
|
|
1001
1002
|
var prefix = tmp_6;
|
|
1002
|
-
tmp$ret$17 = listOf(new File(element.
|
|
1003
|
+
tmp$ret$17 = listOf(new File(element.g1o_1, plus_0(prefix, element)));
|
|
1003
1004
|
}
|
|
1004
1005
|
var list = tmp$ret$17;
|
|
1005
1006
|
addAll(destination, list);
|
|
1006
1007
|
}
|
|
1007
|
-
var tmp0_2 = new File(file.
|
|
1008
|
+
var tmp0_2 = new File(file.v1n_1, destination);
|
|
1008
1009
|
// Inline function 'kotlin.let' call
|
|
1009
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1010
|
+
var wirespecFile = RustTransform_getInstance().d20(tmp0_2);
|
|
1010
1011
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1011
1012
|
var scope_0 = new TransformScope(wirespecFile);
|
|
1012
1013
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1013
1014
|
var tmp_7 = scope_0;
|
|
1014
1015
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1015
|
-
var this_7 = scope_0.
|
|
1016
|
+
var this_7 = scope_0.g1v_1;
|
|
1016
1017
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1017
1018
|
// Inline function 'kotlin.apply' call
|
|
1018
1019
|
var this_8 = new TransformerBuilder();
|
|
1019
|
-
this_8.
|
|
1020
|
-
var tmp$ret$31 = this_8.
|
|
1021
|
-
tmp_7.
|
|
1022
|
-
var tmp_8 = scope_0.
|
|
1020
|
+
this_8.x1i(RustIrEmitter$emitShared$lambda_9);
|
|
1021
|
+
var tmp$ret$31 = this_8.y1i();
|
|
1022
|
+
tmp_7.g1v_1 = transform(this_7, tmp$ret$31);
|
|
1023
|
+
var tmp_8 = scope_0.g1v_1;
|
|
1023
1024
|
// Inline function 'kotlin.let' call
|
|
1024
|
-
var tmp0_3 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1025
|
+
var tmp0_3 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).w1n_1;
|
|
1025
1026
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1026
1027
|
// Inline function 'kotlin.collections.fold' call
|
|
1027
1028
|
var accumulator = ArrayList_init_$Create$_0();
|
|
@@ -1042,14 +1043,14 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
1042
1043
|
var groups = accumulator;
|
|
1043
1044
|
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda_10) + '\n';
|
|
1044
1045
|
var tmp_10;
|
|
1045
|
-
if (this.
|
|
1046
|
-
tmp_10 = new File(Companion_getInstance().n1h(this.
|
|
1046
|
+
if (this.o1z_1.xo_1) {
|
|
1047
|
+
tmp_10 = new File(Companion_getInstance().n1h(this.n1z_1.fs() + 'wirespec'), listOf(new RawElement(source)));
|
|
1047
1048
|
} else {
|
|
1048
1049
|
tmp_10 = null;
|
|
1049
1050
|
}
|
|
1050
1051
|
return tmp_10;
|
|
1051
1052
|
};
|
|
1052
|
-
protoOf(RustIrEmitter).
|
|
1053
|
+
protoOf(RustIrEmitter).w1v = function (module_0, logger) {
|
|
1053
1054
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1054
1055
|
var this_0 = new NonEmptyList(module_0.tq_1);
|
|
1055
1056
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
@@ -1081,9 +1082,9 @@ protoOf(RustIrEmitter).u1v = function (module_0, logger) {
|
|
|
1081
1082
|
tmp_1 = '';
|
|
1082
1083
|
}
|
|
1083
1084
|
var clientMod = tmp_1;
|
|
1084
|
-
var modRs = new File(Companion_getInstance().n1h(this.
|
|
1085
|
-
var modEndpoint = new File(Companion_getInstance().n1h(this.
|
|
1086
|
-
var tmp_2 = Companion_getInstance().n1h(this.
|
|
1085
|
+
var modRs = new File(Companion_getInstance().n1h(this.n1z_1.fs() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1086
|
+
var modEndpoint = new File(Companion_getInstance().n1h(this.n1z_1.fs() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1087
|
+
var tmp_2 = Companion_getInstance().n1h(this.n1z_1.fs() + 'model/' + 'mod');
|
|
1087
1088
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1088
1089
|
var tmp0_0 = new NonEmptyList(module_0.tq_1);
|
|
1089
1090
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
@@ -1097,23 +1098,23 @@ protoOf(RustIrEmitter).u1v = function (module_0, logger) {
|
|
|
1097
1098
|
}
|
|
1098
1099
|
var tmp_3 = destination_0;
|
|
1099
1100
|
var modModel = new File(tmp_2, listOf(new RawElement(joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emit$lambda_1(this)))));
|
|
1100
|
-
return this.
|
|
1101
|
+
return this.o1z_1.xo_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(files, modRs), modEndpoint), modModel) : NonEmptyList__plus_impl_xqmb9(files, modRs);
|
|
1101
1102
|
};
|
|
1102
1103
|
protoOf(RustIrEmitter).lr = function (definition, module_0, logger) {
|
|
1103
|
-
var subPackageName = plus_1(this.
|
|
1104
|
+
var subPackageName = plus_1(this.n1z_1, definition);
|
|
1104
1105
|
var tmp;
|
|
1105
1106
|
if (definition instanceof Endpoint) {
|
|
1106
|
-
tmp = this.
|
|
1107
|
+
tmp = this.t1z_1;
|
|
1107
1108
|
} else {
|
|
1108
|
-
tmp = this.
|
|
1109
|
+
tmp = this.s1z_1;
|
|
1109
1110
|
}
|
|
1110
1111
|
var importHeader = tmp;
|
|
1111
1112
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1112
1113
|
// Inline function 'kotlin.let' call
|
|
1113
|
-
var file = RustTransform_getInstance().
|
|
1114
|
-
var tmp_0 = Companion_getInstance().n1h(subPackageName.fs() + toSnakeCase(this, file.
|
|
1114
|
+
var file = RustTransform_getInstance().d20(tmp0);
|
|
1115
|
+
var tmp_0 = Companion_getInstance().n1h(subPackageName.fs() + toSnakeCase(this, file.v1n_1.o1h()));
|
|
1115
1116
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1116
|
-
var tmp0_0 = file.
|
|
1117
|
+
var tmp0_0 = file.w1n_1;
|
|
1117
1118
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1118
1119
|
var destination = ArrayList_init_$Create$_0();
|
|
1119
1120
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1130,7 +1131,7 @@ protoOf(RustIrEmitter).lr = function (definition, module_0, logger) {
|
|
|
1130
1131
|
}
|
|
1131
1132
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1132
1133
|
};
|
|
1133
|
-
protoOf(RustIrEmitter).
|
|
1134
|
+
protoOf(RustIrEmitter).c1w = function (definition, module_0) {
|
|
1134
1135
|
var tmp;
|
|
1135
1136
|
if (definition instanceof Type) {
|
|
1136
1137
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1159,8 +1160,8 @@ protoOf(RustIrEmitter).z1v = function (definition, module_0) {
|
|
|
1159
1160
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1160
1161
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1161
1162
|
var scope = new TransformScope(generatorFile);
|
|
1162
|
-
scope.
|
|
1163
|
-
var tmp_3 = scope.
|
|
1163
|
+
scope.o1v(RustIrEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1164
|
+
var tmp_3 = scope.g1v_1;
|
|
1164
1165
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1165
1166
|
// Inline function 'kotlin.collections.filter' call
|
|
1166
1167
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1203,8 +1204,8 @@ protoOf(RustIrEmitter).z1v = function (definition, module_0) {
|
|
|
1203
1204
|
destination_2.x(tmp$ret$12);
|
|
1204
1205
|
}
|
|
1205
1206
|
var typeImports = destination_2;
|
|
1206
|
-
var subPackageName = plus_2(this.
|
|
1207
|
-
return new File(Companion_getInstance().n1h(subPackageName.fs() + toSnakeCase(this, generatorFile.
|
|
1207
|
+
var subPackageName = plus_2(this.n1z_1, 'generator');
|
|
1208
|
+
return new File(Companion_getInstance().n1h(subPackageName.fs() + toSnakeCase(this, generatorFile.v1n_1.o1h())), plus(plus(plus(this.s1z_1, typeImports), generatorImports), generatorFile.w1n_1));
|
|
1208
1209
|
};
|
|
1209
1210
|
protoOf(RustIrEmitter).kq = function (type, module_0) {
|
|
1210
1211
|
var tmp = convertWithValidation(type, module_0);
|
|
@@ -1234,20 +1235,20 @@ protoOf(RustIrEmitter).as = function (endpoint) {
|
|
|
1234
1235
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1235
1236
|
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_3(endpoint))))));
|
|
1236
1237
|
var scope = new TransformScope(this_0);
|
|
1237
|
-
scope.
|
|
1238
|
-
var tmp = scope.
|
|
1238
|
+
scope.l1v(fixResponseSwitchPatterns());
|
|
1239
|
+
var tmp = scope.g1v_1;
|
|
1239
1240
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1240
1241
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1241
1242
|
var scope_0 = new TransformScope(this_1);
|
|
1242
|
-
scope_0.
|
|
1243
|
-
var tmp_0 = scope_0.
|
|
1243
|
+
scope_0.l1v(fixConstructorCalls());
|
|
1244
|
+
var tmp_0 = scope_0.g1v_1;
|
|
1244
1245
|
var tmp$ret$3 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1245
1246
|
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$3), endpoint)), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1246
1247
|
};
|
|
1247
1248
|
protoOf(RustIrEmitter).or = function (channel) {
|
|
1248
1249
|
return convert_4(channel);
|
|
1249
1250
|
};
|
|
1250
|
-
protoOf(RustIrEmitter).
|
|
1251
|
+
protoOf(RustIrEmitter).b1w = function (endpoint) {
|
|
1251
1252
|
var endpointName = endpoint.up_1.l1();
|
|
1252
1253
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1253
1254
|
var clientName = endpointName + 'Client';
|
|
@@ -1297,7 +1298,7 @@ protoOf(RustIrEmitter).y1v = function (endpoint) {
|
|
|
1297
1298
|
this_1.x('}');
|
|
1298
1299
|
var tmp$ret$8 = this_1.o5();
|
|
1299
1300
|
var code = joinToString(tmp$ret$8, '\n');
|
|
1300
|
-
var subPackageName = plus_2(this.
|
|
1301
|
+
var subPackageName = plus_2(this.n1z_1, 'client');
|
|
1301
1302
|
var tmp = Companion_getInstance().n1h(subPackageName.fs() + toSnakeCase(this, clientName));
|
|
1302
1303
|
// Inline function 'kotlin.collections.buildList' call
|
|
1303
1304
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
@@ -1310,7 +1311,7 @@ protoOf(RustIrEmitter).y1v = function (endpoint) {
|
|
|
1310
1311
|
var tmp$ret$12 = this_2.o5();
|
|
1311
1312
|
return new File(tmp, tmp$ret$12);
|
|
1312
1313
|
};
|
|
1313
|
-
protoOf(RustIrEmitter).
|
|
1314
|
+
protoOf(RustIrEmitter).y1v = function (endpoints, logger) {
|
|
1314
1315
|
logger.jr('Emitting main Client for ' + endpoints.a1() + ' endpoints');
|
|
1315
1316
|
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitClient$lambda(this));
|
|
1316
1317
|
// Inline function 'kotlin.collections.flatMap' call
|
|
@@ -1407,7 +1408,7 @@ protoOf(RustIrEmitter).w1v = function (endpoints, logger) {
|
|
|
1407
1408
|
}
|
|
1408
1409
|
var implBlocks = destination_3;
|
|
1409
1410
|
var code = joinToString(plus(listOf_0(['pub struct Client<S: Serialization, T: Transportation> {', ' pub serialization: S,', ' pub transportation: T,', '}']), implBlocks), '\n');
|
|
1410
|
-
var tmp_0 = Companion_getInstance().n1h(this.
|
|
1411
|
+
var tmp_0 = Companion_getInstance().n1h(this.n1z_1.fs() + 'client');
|
|
1411
1412
|
// Inline function 'kotlin.collections.buildList' call
|
|
1412
1413
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1413
1414
|
// Inline function 'kotlin.apply' call
|
|
@@ -1435,8 +1436,8 @@ function fixResponseSwitchPatterns() {
|
|
|
1435
1436
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1436
1437
|
// Inline function 'kotlin.apply' call
|
|
1437
1438
|
var this_0 = new TransformerBuilder();
|
|
1438
|
-
this_0.
|
|
1439
|
-
return this_0.
|
|
1439
|
+
this_0.n1v(fixResponseSwitchPatterns$lambda);
|
|
1440
|
+
return this_0.y1i();
|
|
1440
1441
|
}
|
|
1441
1442
|
function buildModelImports(_this__u8e3s4) {
|
|
1442
1443
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1458,7 +1459,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1458
1459
|
var _iterator__ex2g4s_0 = list.t();
|
|
1459
1460
|
while (_iterator__ex2g4s_0.u()) {
|
|
1460
1461
|
var item = _iterator__ex2g4s_0.v();
|
|
1461
|
-
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.bv_1), Companion_getInstance().n1h(item.bv_1).
|
|
1462
|
+
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.bv_1), Companion_getInstance().n1h(item.bv_1).o1h());
|
|
1462
1463
|
destination.x(tmp$ret$2);
|
|
1463
1464
|
}
|
|
1464
1465
|
return destination;
|
|
@@ -1470,14 +1471,14 @@ function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
1470
1471
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1471
1472
|
var tmp = scope;
|
|
1472
1473
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1473
|
-
var this_0 = scope.
|
|
1474
|
+
var this_0 = scope.g1v_1;
|
|
1474
1475
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1475
1476
|
// Inline function 'kotlin.apply' call
|
|
1476
1477
|
var this_1 = new TransformerBuilder();
|
|
1477
|
-
this_1.
|
|
1478
|
-
var tmp$ret$2 = this_1.
|
|
1479
|
-
tmp.
|
|
1480
|
-
var tmp_0 = scope.
|
|
1478
|
+
this_1.x1i(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1479
|
+
var tmp$ret$2 = this_1.y1i();
|
|
1480
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
1481
|
+
var tmp_0 = scope.g1v_1;
|
|
1481
1482
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1482
1483
|
}
|
|
1483
1484
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
@@ -1487,14 +1488,14 @@ function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
|
1487
1488
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1488
1489
|
var tmp = scope;
|
|
1489
1490
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1490
|
-
var this_0 = scope.
|
|
1491
|
+
var this_0 = scope.g1v_1;
|
|
1491
1492
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1492
1493
|
// Inline function 'kotlin.apply' call
|
|
1493
1494
|
var this_1 = new TransformerBuilder();
|
|
1494
|
-
this_1.
|
|
1495
|
-
var tmp$ret$2 = this_1.
|
|
1496
|
-
tmp.
|
|
1497
|
-
var tmp_0 = scope.
|
|
1495
|
+
this_1.x1i(injectApiStruct$lambda(endpoint));
|
|
1496
|
+
var tmp$ret$2 = this_1.y1i();
|
|
1497
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
1498
|
+
var tmp_0 = scope.g1v_1;
|
|
1498
1499
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1499
1500
|
}
|
|
1500
1501
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
@@ -1504,14 +1505,14 @@ function injectResponseFromImpls(_this__u8e3s4) {
|
|
|
1504
1505
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1505
1506
|
var tmp = scope;
|
|
1506
1507
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1507
|
-
var this_0 = scope.
|
|
1508
|
+
var this_0 = scope.g1v_1;
|
|
1508
1509
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1509
1510
|
// Inline function 'kotlin.apply' call
|
|
1510
1511
|
var this_1 = new TransformerBuilder();
|
|
1511
|
-
this_1.
|
|
1512
|
-
var tmp$ret$2 = this_1.
|
|
1513
|
-
tmp.
|
|
1514
|
-
var tmp_0 = scope.
|
|
1512
|
+
this_1.x1i(injectResponseFromImpls$lambda);
|
|
1513
|
+
var tmp$ret$2 = this_1.y1i();
|
|
1514
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
1515
|
+
var tmp_0 = scope.g1v_1;
|
|
1515
1516
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1516
1517
|
}
|
|
1517
1518
|
function injectHandlerImplForClient(_this__u8e3s4, endpoint) {
|
|
@@ -1521,14 +1522,14 @@ function injectHandlerImplForClient(_this__u8e3s4, endpoint) {
|
|
|
1521
1522
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1522
1523
|
var tmp = scope;
|
|
1523
1524
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1524
|
-
var this_0 = scope.
|
|
1525
|
+
var this_0 = scope.g1v_1;
|
|
1525
1526
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1526
1527
|
// Inline function 'kotlin.apply' call
|
|
1527
1528
|
var this_1 = new TransformerBuilder();
|
|
1528
|
-
this_1.
|
|
1529
|
-
var tmp$ret$2 = this_1.
|
|
1530
|
-
tmp.
|
|
1531
|
-
var tmp_0 = scope.
|
|
1529
|
+
this_1.x1i(injectHandlerImplForClient$lambda);
|
|
1530
|
+
var tmp$ret$2 = this_1.y1i();
|
|
1531
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
1532
|
+
var tmp_0 = scope.g1v_1;
|
|
1532
1533
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1533
1534
|
}
|
|
1534
1535
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
@@ -1538,14 +1539,14 @@ function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
|
1538
1539
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1539
1540
|
var tmp = scope;
|
|
1540
1541
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1541
|
-
var this_0 = scope.
|
|
1542
|
+
var this_0 = scope.g1v_1;
|
|
1542
1543
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1543
1544
|
// Inline function 'kotlin.apply' call
|
|
1544
1545
|
var this_1 = new TransformerBuilder();
|
|
1545
|
-
this_1.
|
|
1546
|
-
var tmp$ret$2 = this_1.
|
|
1547
|
-
tmp.
|
|
1548
|
-
var tmp_0 = scope.
|
|
1546
|
+
this_1.x1i(injectSelfToHandlerMethods$lambda);
|
|
1547
|
+
var tmp$ret$2 = this_1.y1i();
|
|
1548
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
1549
|
+
var tmp_0 = scope.g1v_1;
|
|
1549
1550
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1550
1551
|
}
|
|
1551
1552
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
@@ -1555,14 +1556,14 @@ function stripResponseGenerics(_this__u8e3s4) {
|
|
|
1555
1556
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1556
1557
|
var tmp = scope;
|
|
1557
1558
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1558
|
-
var this_0 = scope.
|
|
1559
|
+
var this_0 = scope.g1v_1;
|
|
1559
1560
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1560
1561
|
// Inline function 'kotlin.apply' call
|
|
1561
1562
|
var this_1 = new TransformerBuilder();
|
|
1562
|
-
this_1.
|
|
1563
|
-
var tmp$ret$2 = this_1.
|
|
1564
|
-
tmp.
|
|
1565
|
-
var tmp_0 = scope.
|
|
1563
|
+
this_1.m1v(stripResponseGenerics$lambda);
|
|
1564
|
+
var tmp$ret$2 = this_1.y1i();
|
|
1565
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
1566
|
+
var tmp_0 = scope.g1v_1;
|
|
1566
1567
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1567
1568
|
}
|
|
1568
1569
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
@@ -1572,14 +1573,14 @@ function stripHandlerExtends(_this__u8e3s4) {
|
|
|
1572
1573
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1573
1574
|
var tmp = scope;
|
|
1574
1575
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1575
|
-
var this_0 = scope.
|
|
1576
|
+
var this_0 = scope.g1v_1;
|
|
1576
1577
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1577
1578
|
// Inline function 'kotlin.apply' call
|
|
1578
1579
|
var this_1 = new TransformerBuilder();
|
|
1579
|
-
this_1.
|
|
1580
|
-
var tmp$ret$2 = this_1.
|
|
1581
|
-
tmp.
|
|
1582
|
-
var tmp_0 = scope.
|
|
1580
|
+
this_1.x1i(stripHandlerExtends$lambda);
|
|
1581
|
+
var tmp$ret$2 = this_1.y1i();
|
|
1582
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
1583
|
+
var tmp_0 = scope.g1v_1;
|
|
1583
1584
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1584
1585
|
}
|
|
1585
1586
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
@@ -1587,8 +1588,8 @@ function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
|
1587
1588
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1588
1589
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1589
1590
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1590
|
-
scope.
|
|
1591
|
-
var tmp = scope.
|
|
1591
|
+
scope.p1v(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1592
|
+
var tmp = scope.g1v_1;
|
|
1592
1593
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1593
1594
|
}
|
|
1594
1595
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
@@ -1598,21 +1599,21 @@ function stripWirespecPrefix(_this__u8e3s4) {
|
|
|
1598
1599
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1599
1600
|
var tmp = scope;
|
|
1600
1601
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1601
|
-
var this_0 = scope.
|
|
1602
|
+
var this_0 = scope.g1v_1;
|
|
1602
1603
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1603
1604
|
// Inline function 'kotlin.apply' call
|
|
1604
1605
|
var this_1 = new TransformerBuilder();
|
|
1605
|
-
this_1.
|
|
1606
|
-
var tmp$ret$2 = this_1.
|
|
1607
|
-
tmp.
|
|
1608
|
-
var tmp_0 = scope.
|
|
1606
|
+
this_1.m1v(stripWirespecPrefix$lambda);
|
|
1607
|
+
var tmp$ret$2 = this_1.y1i();
|
|
1608
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
1609
|
+
var tmp_0 = scope.g1v_1;
|
|
1609
1610
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1610
1611
|
}
|
|
1611
1612
|
function flattenForRust(_this__u8e3s4) {
|
|
1612
1613
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1613
1614
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1614
1615
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1615
|
-
var tmp0 = _this__u8e3s4.
|
|
1616
|
+
var tmp0 = _this__u8e3s4.x1n();
|
|
1616
1617
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1617
1618
|
var destination = ArrayList_init_$Create$_0();
|
|
1618
1619
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1625,7 +1626,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1625
1626
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1626
1627
|
var namespace = ensureNotNull(tmp$ret$2);
|
|
1627
1628
|
// Inline function 'kotlin.collections.filter' call
|
|
1628
|
-
var tmp0_0 = namespace.
|
|
1629
|
+
var tmp0_0 = namespace.c1o_1;
|
|
1629
1630
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1630
1631
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1631
1632
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1650,13 +1651,13 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1650
1651
|
var tmp_0;
|
|
1651
1652
|
var tmp_1;
|
|
1652
1653
|
if (item instanceof Union_0) {
|
|
1653
|
-
tmp_1 = item.
|
|
1654
|
+
tmp_1 = item.e1r_1.o1h() === 'Response';
|
|
1654
1655
|
} else {
|
|
1655
1656
|
tmp_1 = false;
|
|
1656
1657
|
}
|
|
1657
1658
|
if (tmp_1) {
|
|
1658
1659
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1659
|
-
var tmp0_1 = namespace.
|
|
1660
|
+
var tmp0_1 = namespace.c1o_1;
|
|
1660
1661
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1661
1662
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1662
1663
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -1672,7 +1673,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1672
1673
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1673
1674
|
while (_iterator__ex2g4s_3.u()) {
|
|
1674
1675
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1675
|
-
var tmp$ret$8 = item_0.
|
|
1676
|
+
var tmp$ret$8 = item_0.g1o_1.o1h();
|
|
1676
1677
|
destination_3.x(tmp$ret$8);
|
|
1677
1678
|
}
|
|
1678
1679
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -1695,10 +1696,10 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1695
1696
|
destination_5.x(tmp$ret$14);
|
|
1696
1697
|
}
|
|
1697
1698
|
var members = destination_5;
|
|
1698
|
-
tmp_0 = item.
|
|
1699
|
+
tmp_0 = item.j1r(VOID, VOID, members, emptyList());
|
|
1699
1700
|
} else {
|
|
1700
1701
|
if (item instanceof Union_0) {
|
|
1701
|
-
tmp_0 = item.
|
|
1702
|
+
tmp_0 = item.j1r(VOID, VOID, VOID, emptyList());
|
|
1702
1703
|
} else {
|
|
1703
1704
|
tmp_0 = item;
|
|
1704
1705
|
}
|
|
@@ -1708,7 +1709,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1708
1709
|
}
|
|
1709
1710
|
var moduleElements = destination_1;
|
|
1710
1711
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1711
|
-
var tmp0_2 = namespace.
|
|
1712
|
+
var tmp0_2 = namespace.c1o_1;
|
|
1712
1713
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1713
1714
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1714
1715
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1725,15 +1726,15 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1725
1726
|
}
|
|
1726
1727
|
}
|
|
1727
1728
|
var classElements = destination_6;
|
|
1728
|
-
return new File(namespace.
|
|
1729
|
+
return new File(namespace.b1o_1, plus_0(moduleElements, new Namespace(namespace.b1o_1, classElements, namespace.d1o_1)));
|
|
1729
1730
|
}
|
|
1730
1731
|
function fixConstructorCalls() {
|
|
1731
1732
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1732
1733
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1733
1734
|
// Inline function 'kotlin.apply' call
|
|
1734
1735
|
var this_0 = new TransformerBuilder();
|
|
1735
|
-
this_0.
|
|
1736
|
-
return this_0.
|
|
1736
|
+
this_0.p1v(fixConstructorCalls$lambda);
|
|
1737
|
+
return this_0.y1i();
|
|
1737
1738
|
}
|
|
1738
1739
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1739
1740
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1755,7 +1756,7 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1755
1756
|
var _iterator__ex2g4s_0 = list.t();
|
|
1756
1757
|
while (_iterator__ex2g4s_0.u()) {
|
|
1757
1758
|
var item = _iterator__ex2g4s_0.v();
|
|
1758
|
-
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.bv_1), Companion_getInstance().n1h(item.bv_1).
|
|
1759
|
+
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.bv_1), Companion_getInstance().n1h(item.bv_1).o1h());
|
|
1759
1760
|
destination.x(tmp$ret$2);
|
|
1760
1761
|
}
|
|
1761
1762
|
return destination;
|
|
@@ -1797,56 +1798,56 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1797
1798
|
if (!(s instanceof Switch)) {
|
|
1798
1799
|
tmp = true;
|
|
1799
1800
|
} else {
|
|
1800
|
-
var tmp0_safe_receiver = s.
|
|
1801
|
+
var tmp0_safe_receiver = s.k1q_1;
|
|
1801
1802
|
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q1m()) === 'r');
|
|
1802
1803
|
}
|
|
1803
1804
|
if (tmp)
|
|
1804
1805
|
return transformChildren(s, t);
|
|
1805
1806
|
// Inline function 'kotlin.collections.map' call
|
|
1806
|
-
var this_0 = s.
|
|
1807
|
+
var this_0 = s.i1q_1;
|
|
1807
1808
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1808
1809
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1809
1810
|
var _iterator__ex2g4s = this_0.t();
|
|
1810
1811
|
while (_iterator__ex2g4s.u()) {
|
|
1811
1812
|
var item = _iterator__ex2g4s.v();
|
|
1812
|
-
var tmp_0 = item.
|
|
1813
|
+
var tmp_0 = item.p1q_1;
|
|
1813
1814
|
var tmp0_safe_receiver_0 = tmp_0 instanceof Custom ? tmp_0 : null;
|
|
1814
1815
|
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.h1j_1;
|
|
1815
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1816
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o1h();
|
|
1816
1817
|
var tmp_1;
|
|
1817
1818
|
if (!(typeName == null) && get_rustResponsePattern().oc(typeName)) {
|
|
1818
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1819
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.k1q_1).w1m() + ')');
|
|
1819
1820
|
// Inline function 'kotlin.collections.map' call
|
|
1820
|
-
var this_1 = item.
|
|
1821
|
+
var this_1 = item.o1q_1;
|
|
1821
1822
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1822
1823
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1823
1824
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1824
1825
|
while (_iterator__ex2g4s_0.u()) {
|
|
1825
1826
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1826
|
-
var tmp$ret$0 = t.
|
|
1827
|
+
var tmp$ret$0 = t.a1v(item_0);
|
|
1827
1828
|
destination_0.x(tmp$ret$0);
|
|
1828
1829
|
}
|
|
1829
1830
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1830
1831
|
} else {
|
|
1831
|
-
var tmp_3 = t.
|
|
1832
|
+
var tmp_3 = t.b1v(item.n1q_1);
|
|
1832
1833
|
// Inline function 'kotlin.collections.map' call
|
|
1833
|
-
var this_2 = item.
|
|
1834
|
+
var this_2 = item.o1q_1;
|
|
1834
1835
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1835
1836
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1836
1837
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1837
1838
|
while (_iterator__ex2g4s_1.u()) {
|
|
1838
1839
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1839
|
-
var tmp$ret$3 = t.
|
|
1840
|
+
var tmp$ret$3 = t.a1v(item_1);
|
|
1840
1841
|
destination_1.x(tmp$ret$3);
|
|
1841
1842
|
}
|
|
1842
1843
|
var tmp_4 = destination_1;
|
|
1843
|
-
var tmp2_safe_receiver = item.
|
|
1844
|
+
var tmp2_safe_receiver = item.p1q_1;
|
|
1844
1845
|
var tmp_5;
|
|
1845
1846
|
if (tmp2_safe_receiver == null) {
|
|
1846
1847
|
tmp_5 = null;
|
|
1847
1848
|
} else {
|
|
1848
1849
|
// Inline function 'kotlin.let' call
|
|
1849
|
-
tmp_5 = t.
|
|
1850
|
+
tmp_5 = t.y1u(tmp2_safe_receiver);
|
|
1850
1851
|
}
|
|
1851
1852
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1852
1853
|
}
|
|
@@ -1854,13 +1855,13 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1854
1855
|
destination.x(tmp$ret$8);
|
|
1855
1856
|
}
|
|
1856
1857
|
var transformedCases = destination;
|
|
1857
|
-
return s.
|
|
1858
|
+
return s.m1q(t.b1v(s.h1q_1), transformedCases, null);
|
|
1858
1859
|
}
|
|
1859
1860
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1860
1861
|
return function (element, transformer) {
|
|
1861
1862
|
var tmp;
|
|
1862
1863
|
if (element instanceof Struct) {
|
|
1863
|
-
tmp = element.
|
|
1864
|
+
tmp = element.n1o(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1864
1865
|
} else {
|
|
1865
1866
|
tmp = element;
|
|
1866
1867
|
}
|
|
@@ -1872,7 +1873,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1872
1873
|
return function (element, transformer) {
|
|
1873
1874
|
var tmp;
|
|
1874
1875
|
if (element instanceof Namespace) {
|
|
1875
|
-
tmp = element.
|
|
1876
|
+
tmp = element.f1o(VOID, plus(element.c1o_1, listOf(buildApiStruct($endpoint))));
|
|
1876
1877
|
} else {
|
|
1877
1878
|
tmp = element;
|
|
1878
1879
|
}
|
|
@@ -1885,7 +1886,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1885
1886
|
var tmp;
|
|
1886
1887
|
if (element instanceof File) {
|
|
1887
1888
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1888
|
-
var tmp0 = element.
|
|
1889
|
+
var tmp0 = element.w1n_1;
|
|
1889
1890
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1890
1891
|
var destination = ArrayList_init_$Create$_0();
|
|
1891
1892
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1895,26 +1896,26 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1895
1896
|
var tmp_1;
|
|
1896
1897
|
var tmp_2;
|
|
1897
1898
|
if (element_0 instanceof Union_0) {
|
|
1898
|
-
tmp_2 = element_0.
|
|
1899
|
+
tmp_2 = element_0.e1r_1.o1h() === 'Response';
|
|
1899
1900
|
} else {
|
|
1900
1901
|
tmp_2 = false;
|
|
1901
1902
|
}
|
|
1902
1903
|
if (tmp_2) {
|
|
1903
1904
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1904
|
-
tmp_1 = !element_0.
|
|
1905
|
+
tmp_1 = !element_0.g1r_1.r();
|
|
1905
1906
|
} else {
|
|
1906
1907
|
tmp_1 = false;
|
|
1907
1908
|
}
|
|
1908
1909
|
if (tmp_1) {
|
|
1909
1910
|
var tmp_3 = listOf(element_0);
|
|
1910
1911
|
// Inline function 'kotlin.collections.map' call
|
|
1911
|
-
var this_0 = element_0.
|
|
1912
|
+
var this_0 = element_0.g1r_1;
|
|
1912
1913
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1913
1914
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1914
1915
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1915
1916
|
while (_iterator__ex2g4s_0.u()) {
|
|
1916
1917
|
var item = _iterator__ex2g4s_0.v();
|
|
1917
|
-
var memberName = item.h1j_1.
|
|
1918
|
+
var memberName = item.h1j_1.o1h();
|
|
1918
1919
|
var tmp$ret$1 = new RawElement('impl From<' + memberName + '> for Response { fn from(value: ' + memberName + ') -> Self { Response::' + memberName + '(value) } }\n');
|
|
1919
1920
|
destination_0.x(tmp$ret$1);
|
|
1920
1921
|
}
|
|
@@ -1925,7 +1926,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1925
1926
|
var list = tmp_0;
|
|
1926
1927
|
addAll(destination, list);
|
|
1927
1928
|
}
|
|
1928
|
-
tmp = element.
|
|
1929
|
+
tmp = element.z1n(VOID, destination);
|
|
1929
1930
|
} else {
|
|
1930
1931
|
tmp = element;
|
|
1931
1932
|
}
|
|
@@ -1939,7 +1940,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1939
1940
|
var tmp$ret$4;
|
|
1940
1941
|
$l$block_1: {
|
|
1941
1942
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1942
|
-
var tmp0 = element.
|
|
1943
|
+
var tmp0 = element.c1o_1;
|
|
1943
1944
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1944
1945
|
var destination = ArrayList_init_$Create$_0();
|
|
1945
1946
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1955,7 +1956,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1955
1956
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1956
1957
|
while (_iterator__ex2g4s_0.u()) {
|
|
1957
1958
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
1958
|
-
if (element_1.
|
|
1959
|
+
if (element_1.p1o_1.equals(Companion_getInstance().n1h('Handler'))) {
|
|
1959
1960
|
tmp$ret$3 = element_1;
|
|
1960
1961
|
break $l$block;
|
|
1961
1962
|
}
|
|
@@ -1972,7 +1973,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1972
1973
|
}
|
|
1973
1974
|
var handler = tmp_0;
|
|
1974
1975
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1975
|
-
var tmp0_0 = handler.
|
|
1976
|
+
var tmp0_0 = handler.q1o_1;
|
|
1976
1977
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1977
1978
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1978
1979
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
@@ -1992,7 +1993,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1992
1993
|
}
|
|
1993
1994
|
var method = tmp_1;
|
|
1994
1995
|
var methodName = method.d1l_1.w1m();
|
|
1995
|
-
tmp$ret$4 = element.
|
|
1996
|
+
tmp$ret$4 = element.f1o(VOID, plus(element.c1o_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 ')))));
|
|
1996
1997
|
}
|
|
1997
1998
|
tmp = tmp$ret$4;
|
|
1998
1999
|
} else {
|
|
@@ -2007,7 +2008,7 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2007
2008
|
if (element instanceof Interface) {
|
|
2008
2009
|
var tmp$ret$0;
|
|
2009
2010
|
$l$block: {
|
|
2010
|
-
if (!element.
|
|
2011
|
+
if (!element.p1o_1.equals(Companion_getInstance().n1h('Handler')) && !element.p1o_1.equals(Companion_getInstance().n1h('Call'))) {
|
|
2011
2012
|
tmp$ret$0 = element;
|
|
2012
2013
|
break $l$block;
|
|
2013
2014
|
}
|
|
@@ -2016,14 +2017,14 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2016
2017
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
2017
2018
|
var tmp_0 = scope;
|
|
2018
2019
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
2019
|
-
var this_0 = scope.
|
|
2020
|
+
var this_0 = scope.g1v_1;
|
|
2020
2021
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2021
2022
|
// Inline function 'kotlin.apply' call
|
|
2022
2023
|
var this_1 = new TransformerBuilder();
|
|
2023
|
-
this_1.
|
|
2024
|
-
var tmp$ret$3 = this_1.
|
|
2025
|
-
tmp_0.
|
|
2026
|
-
var tmp_1 = scope.
|
|
2024
|
+
this_1.x1i(injectSelfToHandlerMethods$lambda$lambda);
|
|
2025
|
+
var tmp$ret$3 = this_1.y1i();
|
|
2026
|
+
tmp_0.g1v_1 = transform(this_0, tmp$ret$3);
|
|
2027
|
+
var tmp_1 = scope.g1v_1;
|
|
2027
2028
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2028
2029
|
}
|
|
2029
2030
|
tmp = tmp$ret$0;
|
|
@@ -2050,14 +2051,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2050
2051
|
if (type instanceof Custom) {
|
|
2051
2052
|
var tmp_0;
|
|
2052
2053
|
var tmp_1;
|
|
2053
|
-
if (startsWith(type.h1j_1.
|
|
2054
|
+
if (startsWith(type.h1j_1.o1h(), 'Response')) {
|
|
2054
2055
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2055
2056
|
tmp_1 = !type.i1j_1.r();
|
|
2056
2057
|
} else {
|
|
2057
2058
|
tmp_1 = false;
|
|
2058
2059
|
}
|
|
2059
2060
|
if (tmp_1) {
|
|
2060
|
-
tmp_0 = type.
|
|
2061
|
+
tmp_0 = type.m1n(VOID, emptyList());
|
|
2061
2062
|
} else {
|
|
2062
2063
|
tmp_0 = type;
|
|
2063
2064
|
}
|
|
@@ -2072,7 +2073,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2072
2073
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2073
2074
|
var tmp;
|
|
2074
2075
|
if (element instanceof Interface) {
|
|
2075
|
-
tmp = element.
|
|
2076
|
+
tmp = element.p1o_1.equals(Companion_getInstance().n1h('Handler')) || element.p1o_1.equals(Companion_getInstance().n1h('Call')) ? element.w1o(VOID, VOID, emptyList()) : element;
|
|
2076
2077
|
} else {
|
|
2077
2078
|
tmp = element;
|
|
2078
2079
|
}
|
|
@@ -2085,17 +2086,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2085
2086
|
var tmp_0;
|
|
2086
2087
|
var tmp_1;
|
|
2087
2088
|
if (s instanceof RawExpression) {
|
|
2088
|
-
tmp_1 = $identifierPattern.oc(s.
|
|
2089
|
+
tmp_1 = $identifierPattern.oc(s.m1p_1);
|
|
2089
2090
|
} else {
|
|
2090
2091
|
tmp_1 = false;
|
|
2091
2092
|
}
|
|
2092
2093
|
if (tmp_1) {
|
|
2093
|
-
tmp_0 = !contains(s.
|
|
2094
|
+
tmp_0 = !contains(s.m1p_1, '.');
|
|
2094
2095
|
} else {
|
|
2095
2096
|
tmp_0 = false;
|
|
2096
2097
|
}
|
|
2097
2098
|
if (tmp_0) {
|
|
2098
|
-
tmp = new VariableReference(Companion_getInstance().n1h(s.
|
|
2099
|
+
tmp = new VariableReference(Companion_getInstance().n1h(s.m1p_1));
|
|
2099
2100
|
} else {
|
|
2100
2101
|
tmp = transformChildren(s, t);
|
|
2101
2102
|
}
|
|
@@ -2106,10 +2107,10 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2106
2107
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2107
2108
|
var tmp;
|
|
2108
2109
|
if (type instanceof Custom) {
|
|
2109
|
-
var pascalName = type.h1j_1.
|
|
2110
|
+
var pascalName = type.h1j_1.o1h();
|
|
2110
2111
|
var tmp_0;
|
|
2111
2112
|
if (startsWith(pascalName, 'Wirespec.')) {
|
|
2112
|
-
tmp_0 = type.
|
|
2113
|
+
tmp_0 = type.m1n(Companion_getInstance().n1h(removePrefix(pascalName, 'Wirespec.')));
|
|
2113
2114
|
} else {
|
|
2114
2115
|
tmp_0 = type;
|
|
2115
2116
|
}
|
|
@@ -2124,12 +2125,12 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2124
2125
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2125
2126
|
if (!(s instanceof ConstructorStatement))
|
|
2126
2127
|
return transformChildren(s, t);
|
|
2127
|
-
var tmp = s.
|
|
2128
|
+
var tmp = s.s1n_1;
|
|
2128
2129
|
var tmp0_safe_receiver = tmp instanceof Custom ? tmp : null;
|
|
2129
2130
|
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.h1j_1;
|
|
2130
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
2131
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o1h();
|
|
2131
2132
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2132
|
-
var this_0 = s.
|
|
2133
|
+
var this_0 = s.t1n_1;
|
|
2133
2134
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2134
2135
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.a1()));
|
|
2135
2136
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -2137,7 +2138,7 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2137
2138
|
while (_iterator__ex2g4s.u()) {
|
|
2138
2139
|
var element = _iterator__ex2g4s.v();
|
|
2139
2140
|
var tmp_0 = element.k1();
|
|
2140
|
-
var tmp$ret$1 = t.
|
|
2141
|
+
var tmp$ret$1 = t.b1v(element.l1());
|
|
2141
2142
|
destination.s2(tmp_0, tmp$ret$1);
|
|
2142
2143
|
}
|
|
2143
2144
|
var transformedArgs = destination;
|
|
@@ -2145,17 +2146,17 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2145
2146
|
}
|
|
2146
2147
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2147
2148
|
return function ($this$function) {
|
|
2148
|
-
$this$function.
|
|
2149
|
-
$this$function.
|
|
2150
|
-
$this$function.
|
|
2149
|
+
$this$function.y1h('&self', Custom_init_$Create$(''));
|
|
2150
|
+
$this$function.b1i(Boolean_instance);
|
|
2151
|
+
$this$function.c1i($constraintExpr);
|
|
2151
2152
|
return Unit_instance;
|
|
2152
2153
|
};
|
|
2153
2154
|
}
|
|
2154
2155
|
function buildToStringFunction$lambda($expr) {
|
|
2155
2156
|
return function ($this$function) {
|
|
2156
|
-
$this$function.
|
|
2157
|
-
$this$function.
|
|
2158
|
-
$this$function.
|
|
2157
|
+
$this$function.y1h('&self', Custom_init_$Create$(''));
|
|
2158
|
+
$this$function.b1i(String_instance);
|
|
2159
|
+
$this$function.c1i(new RawExpression($expr));
|
|
2159
2160
|
return Unit_instance;
|
|
2160
2161
|
};
|
|
2161
2162
|
}
|
|
@@ -2190,10 +2191,10 @@ function borrowParamsOf($this, fn) {
|
|
|
2190
2191
|
while (_iterator__ex2g4s.u()) {
|
|
2191
2192
|
var item = _iterator__ex2g4s.v();
|
|
2192
2193
|
var tmp;
|
|
2193
|
-
if (RustTransform_getInstance().
|
|
2194
|
+
if (RustTransform_getInstance().e20(item.y1p_1)) {
|
|
2194
2195
|
tmp = item;
|
|
2195
2196
|
} else {
|
|
2196
|
-
tmp = item.
|
|
2197
|
+
tmp = item.b1q(VOID, applyBorrowRule(RustTransform_getInstance(), item.z1p_1));
|
|
2197
2198
|
}
|
|
2198
2199
|
var tmp$ret$0 = tmp;
|
|
2199
2200
|
destination.x(tmp$ret$0);
|
|
@@ -2209,7 +2210,7 @@ function applyBorrowRule($this, type) {
|
|
|
2209
2210
|
tmp = Custom_init_$Create$('&str');
|
|
2210
2211
|
} else {
|
|
2211
2212
|
if (type instanceof Custom) {
|
|
2212
|
-
tmp = $this.
|
|
2213
|
+
tmp = $this.h20(type) ? type : $this.g20(type) ? borrowImpl(type) : $this.f20(type) ? ownedImpl(type) : type;
|
|
2213
2214
|
} else {
|
|
2214
2215
|
tmp = type;
|
|
2215
2216
|
}
|
|
@@ -2221,15 +2222,15 @@ function toBorrowedRaw($this, _this__u8e3s4) {
|
|
|
2221
2222
|
return new RawExpression('&' + toRawCode($this, _this__u8e3s4));
|
|
2222
2223
|
}
|
|
2223
2224
|
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
2224
|
-
return Companion_getInstance_0().
|
|
2225
|
+
return Companion_getInstance_0().u1z_1.u1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
2225
2226
|
}
|
|
2226
2227
|
function toRawCode($this, _this__u8e3s4) {
|
|
2227
2228
|
var tmp;
|
|
2228
2229
|
if (_this__u8e3s4 instanceof VariableReference) {
|
|
2229
|
-
tmp = sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2230
|
+
tmp = sanitizeKeywords_0($this, _this__u8e3s4.k1p_1.w1m());
|
|
2230
2231
|
} else {
|
|
2231
2232
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
2232
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
2233
|
+
var tmp1_safe_receiver = _this__u8e3s4.s1q_1;
|
|
2233
2234
|
var tmp_0;
|
|
2234
2235
|
if (tmp1_safe_receiver == null) {
|
|
2235
2236
|
tmp_0 = null;
|
|
@@ -2239,20 +2240,20 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2239
2240
|
}
|
|
2240
2241
|
var tmp2_elvis_lhs = tmp_0;
|
|
2241
2242
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2242
|
-
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2243
|
+
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.t1q_1.w1m());
|
|
2243
2244
|
} else {
|
|
2244
2245
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
2245
|
-
var tmp_1 = _this__u8e3s4.
|
|
2246
|
+
var tmp_1 = _this__u8e3s4.l1r_1;
|
|
2246
2247
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2247
2248
|
var tmp_2;
|
|
2248
2249
|
var tmp_3;
|
|
2249
2250
|
if (!(lit == null)) {
|
|
2250
2251
|
var tmp_4;
|
|
2251
|
-
var tmp_5 = lit.
|
|
2252
|
+
var tmp_5 = lit.v1p_1;
|
|
2252
2253
|
if (tmp_5 instanceof Integer) {
|
|
2253
2254
|
tmp_4 = true;
|
|
2254
2255
|
} else {
|
|
2255
|
-
var tmp_6 = lit.
|
|
2256
|
+
var tmp_6 = lit.v1p_1;
|
|
2256
2257
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2257
2258
|
}
|
|
2258
2259
|
tmp_3 = tmp_4;
|
|
@@ -2260,31 +2261,31 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2260
2261
|
tmp_3 = false;
|
|
2261
2262
|
}
|
|
2262
2263
|
if (tmp_3) {
|
|
2263
|
-
tmp_2 = toString_0(lit.
|
|
2264
|
+
tmp_2 = toString_0(lit.u1p_1);
|
|
2264
2265
|
} else {
|
|
2265
2266
|
var tmp_7;
|
|
2266
2267
|
if (!(lit == null)) {
|
|
2267
|
-
var tmp_8 = lit.
|
|
2268
|
+
var tmp_8 = lit.v1p_1;
|
|
2268
2269
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2269
2270
|
} else {
|
|
2270
2271
|
tmp_7 = false;
|
|
2271
2272
|
}
|
|
2272
2273
|
if (tmp_7) {
|
|
2273
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2274
|
+
tmp_2 = '"' + toString_0(lit.u1p_1) + '"';
|
|
2274
2275
|
} else {
|
|
2275
|
-
tmp_2 = toRawCode($this, _this__u8e3s4.
|
|
2276
|
+
tmp_2 = toRawCode($this, _this__u8e3s4.l1r_1);
|
|
2276
2277
|
}
|
|
2277
2278
|
}
|
|
2278
2279
|
var idx = tmp_2;
|
|
2279
|
-
tmp = toRawCode($this, _this__u8e3s4.
|
|
2280
|
+
tmp = toRawCode($this, _this__u8e3s4.k1r_1) + '[' + idx + ']';
|
|
2280
2281
|
} else {
|
|
2281
2282
|
if (_this__u8e3s4 instanceof ConstructorStatement) {
|
|
2282
|
-
var tmp_9 = _this__u8e3s4.
|
|
2283
|
+
var tmp_9 = _this__u8e3s4.s1n_1;
|
|
2283
2284
|
var tmp3_safe_receiver = tmp_9 instanceof Custom ? tmp_9 : null;
|
|
2284
2285
|
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.h1j_1;
|
|
2285
|
-
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
2286
|
-
var typeName = tmp5_elvis_lhs == null ? toString_0(_this__u8e3s4.
|
|
2287
|
-
var tmp_10 = _this__u8e3s4.
|
|
2286
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.o1h();
|
|
2287
|
+
var typeName = tmp5_elvis_lhs == null ? toString_0(_this__u8e3s4.s1n_1) : tmp5_elvis_lhs;
|
|
2288
|
+
var tmp_10 = _this__u8e3s4.t1n_1.j1();
|
|
2288
2289
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2289
2290
|
var tmp_11;
|
|
2290
2291
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2297,23 +2298,23 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2297
2298
|
} else {
|
|
2298
2299
|
if (_this__u8e3s4 instanceof Literal_0) {
|
|
2299
2300
|
var tmp_12;
|
|
2300
|
-
var tmp_13 = _this__u8e3s4.
|
|
2301
|
+
var tmp_13 = _this__u8e3s4.v1p_1;
|
|
2301
2302
|
if (tmp_13 instanceof String_1) {
|
|
2302
|
-
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.
|
|
2303
|
+
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.u1p_1) + '")';
|
|
2303
2304
|
} else {
|
|
2304
|
-
var tmp_14 = _this__u8e3s4.
|
|
2305
|
+
var tmp_14 = _this__u8e3s4.v1p_1;
|
|
2305
2306
|
if (tmp_14 instanceof Boolean_0) {
|
|
2306
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2307
|
+
tmp_12 = toString_0(_this__u8e3s4.u1p_1);
|
|
2307
2308
|
} else {
|
|
2308
|
-
var tmp_15 = _this__u8e3s4.
|
|
2309
|
+
var tmp_15 = _this__u8e3s4.v1p_1;
|
|
2309
2310
|
if (tmp_15 instanceof Integer) {
|
|
2310
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2311
|
+
tmp_12 = toString_0(_this__u8e3s4.u1p_1);
|
|
2311
2312
|
} else {
|
|
2312
|
-
var tmp_16 = _this__u8e3s4.
|
|
2313
|
+
var tmp_16 = _this__u8e3s4.v1p_1;
|
|
2313
2314
|
if (tmp_16 instanceof Number_0) {
|
|
2314
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2315
|
+
tmp_12 = toString_0(_this__u8e3s4.u1p_1);
|
|
2315
2316
|
} else {
|
|
2316
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2317
|
+
tmp_12 = toString_0(_this__u8e3s4.u1p_1);
|
|
2317
2318
|
}
|
|
2318
2319
|
}
|
|
2319
2320
|
}
|
|
@@ -2321,7 +2322,7 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2321
2322
|
tmp = tmp_12;
|
|
2322
2323
|
} else {
|
|
2323
2324
|
if (_this__u8e3s4 instanceof RawExpression) {
|
|
2324
|
-
tmp = _this__u8e3s4.
|
|
2325
|
+
tmp = _this__u8e3s4.m1p_1;
|
|
2325
2326
|
} else {
|
|
2326
2327
|
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression(_this__u8e3s4).o();
|
|
2327
2328
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
@@ -2366,11 +2367,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2366
2367
|
var tmp;
|
|
2367
2368
|
if (element instanceof Interface) {
|
|
2368
2369
|
var tmp_0;
|
|
2369
|
-
if (element.
|
|
2370
|
+
if (element.p1o_1.equals(Companion_getInstance().n1h('Call'))) {
|
|
2370
2371
|
tmp_0 = element;
|
|
2371
2372
|
} else {
|
|
2372
2373
|
// Inline function 'kotlin.collections.map' call
|
|
2373
|
-
var this_0 = element.
|
|
2374
|
+
var this_0 = element.q1o_1;
|
|
2374
2375
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2375
2376
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2376
2377
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2386,7 +2387,7 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2386
2387
|
destination.x(tmp$ret$0);
|
|
2387
2388
|
}
|
|
2388
2389
|
var borrowed = destination;
|
|
2389
|
-
tmp_0 = transformChildren_0(element.
|
|
2390
|
+
tmp_0 = transformChildren_0(element.w1o(VOID, borrowed), tr);
|
|
2390
2391
|
}
|
|
2391
2392
|
tmp = tmp_0;
|
|
2392
2393
|
} else {
|
|
@@ -2402,13 +2403,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2402
2403
|
var tmp;
|
|
2403
2404
|
var tmp_0;
|
|
2404
2405
|
if (s instanceof FunctionCall) {
|
|
2405
|
-
tmp_0 = RustTransform_getInstance().
|
|
2406
|
+
tmp_0 = RustTransform_getInstance().z1z_1.u1(s.a1n_1.w1m());
|
|
2406
2407
|
} else {
|
|
2407
2408
|
tmp_0 = false;
|
|
2408
2409
|
}
|
|
2409
2410
|
if (tmp_0) {
|
|
2410
2411
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2411
|
-
var this_0 = s.
|
|
2412
|
+
var this_0 = s.b1n_1.j1();
|
|
2412
2413
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2413
2414
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2414
2415
|
var index = 0;
|
|
@@ -2422,13 +2423,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2422
2423
|
var key = item.k1();
|
|
2423
2424
|
// Inline function 'kotlin.collections.component2' call
|
|
2424
2425
|
var value = item.l1();
|
|
2425
|
-
var transformed = t.
|
|
2426
|
+
var transformed = t.b1v(value);
|
|
2426
2427
|
var tmp_1;
|
|
2427
2428
|
var tmp_2;
|
|
2428
2429
|
if (idx === 0) {
|
|
2429
2430
|
var tmp_3;
|
|
2430
2431
|
if (transformed instanceof VariableReference) {
|
|
2431
|
-
tmp_3 = transformed.
|
|
2432
|
+
tmp_3 = transformed.k1p_1.j1j() === 'it';
|
|
2432
2433
|
} else {
|
|
2433
2434
|
tmp_3 = false;
|
|
2434
2435
|
}
|
|
@@ -2445,17 +2446,17 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2445
2446
|
destination.x(tmp$ret$2);
|
|
2446
2447
|
}
|
|
2447
2448
|
var newArgs = toMap(destination);
|
|
2448
|
-
tmp = s.
|
|
2449
|
+
tmp = s.e1n(VOID, VOID, VOID, newArgs);
|
|
2449
2450
|
} else {
|
|
2450
2451
|
tmp = transformChildren(s, t);
|
|
2451
2452
|
}
|
|
2452
2453
|
return tmp;
|
|
2453
2454
|
}
|
|
2454
2455
|
function RustTransform$rustName$lambda(it) {
|
|
2455
|
-
return RustTransform_getInstance().
|
|
2456
|
+
return RustTransform_getInstance().c20(it);
|
|
2456
2457
|
}
|
|
2457
2458
|
function RustTransform$rustName$lambda_0(it) {
|
|
2458
|
-
return RustTransform_getInstance().
|
|
2459
|
+
return RustTransform_getInstance().c20(it);
|
|
2459
2460
|
}
|
|
2460
2461
|
function RustTransform$toRawCode$lambda(it) {
|
|
2461
2462
|
return it.k1().w1m() + ': ' + toRawCode(RustTransform_getInstance(), it.l1());
|
|
@@ -2466,53 +2467,53 @@ function RustTransform() {
|
|
|
2466
2467
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2467
2468
|
// Inline function 'kotlin.apply' call
|
|
2468
2469
|
var this_0 = new TransformerBuilder();
|
|
2469
|
-
this_0.
|
|
2470
|
-
tmp.
|
|
2470
|
+
this_0.m1v(RustTransform$primitivesToCustom$lambda);
|
|
2471
|
+
tmp.w1z_1 = this_0.y1i();
|
|
2471
2472
|
var tmp_0 = this;
|
|
2472
2473
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2473
2474
|
// Inline function 'kotlin.apply' call
|
|
2474
2475
|
var this_1 = new TransformerBuilder();
|
|
2475
|
-
this_1.
|
|
2476
|
-
tmp_0.
|
|
2476
|
+
this_1.x1i(RustTransform$borrow$lambda);
|
|
2477
|
+
tmp_0.x1z_1 = this_1.y1i();
|
|
2477
2478
|
var tmp_1 = this;
|
|
2478
2479
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2479
2480
|
// Inline function 'kotlin.apply' call
|
|
2480
|
-
tmp_1.
|
|
2481
|
-
this.
|
|
2481
|
+
tmp_1.y1z_1 = (new TransformerBuilder()).y1i();
|
|
2482
|
+
this.z1z_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2482
2483
|
var tmp_2 = this;
|
|
2483
2484
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2484
2485
|
// Inline function 'kotlin.apply' call
|
|
2485
2486
|
var this_2 = new TransformerBuilder();
|
|
2486
|
-
this_2.
|
|
2487
|
-
tmp_2.
|
|
2488
|
-
this.
|
|
2487
|
+
this_2.p1v(RustTransform$serializationArgs$lambda);
|
|
2488
|
+
tmp_2.a20_1 = this_2.y1i();
|
|
2489
|
+
this.b20_1 = setOf(['i32', 'i64', 'f32', 'f64', 'bool', 'u8', 'u16', 'u32', 'u64', 'usize', 'isize', '()']);
|
|
2489
2490
|
}
|
|
2490
|
-
protoOf(RustTransform).
|
|
2491
|
+
protoOf(RustTransform).d20 = function (element) {
|
|
2491
2492
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2492
2493
|
var scope = new TransformScope(element);
|
|
2493
|
-
scope.
|
|
2494
|
-
var tmp = scope.
|
|
2494
|
+
scope.l1v(RustTransform_getInstance().w1z_1);
|
|
2495
|
+
var tmp = scope.g1v_1;
|
|
2495
2496
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2496
2497
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2497
2498
|
var scope_0 = new TransformScope(this_0);
|
|
2498
|
-
scope_0.
|
|
2499
|
-
var tmp_0 = scope_0.
|
|
2499
|
+
scope_0.l1v(RustTransform_getInstance().x1z_1);
|
|
2500
|
+
var tmp_0 = scope_0.g1v_1;
|
|
2500
2501
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2501
2502
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2502
2503
|
var scope_1 = new TransformScope(this_1);
|
|
2503
|
-
scope_1.
|
|
2504
|
-
var tmp_1 = scope_1.
|
|
2504
|
+
scope_1.l1v(RustTransform_getInstance().y1z_1);
|
|
2505
|
+
var tmp_1 = scope_1.g1v_1;
|
|
2505
2506
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2506
2507
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2507
2508
|
var scope_2 = new TransformScope(this_2);
|
|
2508
|
-
scope_2.
|
|
2509
|
-
var tmp_2 = scope_2.
|
|
2509
|
+
scope_2.l1v(RustTransform_getInstance().a20_1);
|
|
2510
|
+
var tmp_2 = scope_2.g1v_1;
|
|
2510
2511
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2511
2512
|
};
|
|
2512
|
-
protoOf(RustTransform).
|
|
2513
|
+
protoOf(RustTransform).c20 = function (_this__u8e3s4) {
|
|
2513
2514
|
var tmp;
|
|
2514
2515
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2515
|
-
var pascalName = _this__u8e3s4.h1j_1.
|
|
2516
|
+
var pascalName = _this__u8e3s4.h1j_1.o1h();
|
|
2516
2517
|
var tmp_0;
|
|
2517
2518
|
if (_this__u8e3s4.i1j_1.r()) {
|
|
2518
2519
|
tmp_0 = pascalName;
|
|
@@ -2525,13 +2526,13 @@ protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
|
2525
2526
|
tmp = 'String';
|
|
2526
2527
|
} else {
|
|
2527
2528
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2528
|
-
tmp = 'Option<' + this.
|
|
2529
|
+
tmp = 'Option<' + this.c20(_this__u8e3s4.f1j_1) + '>';
|
|
2529
2530
|
} else {
|
|
2530
2531
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2531
|
-
tmp = 'Vec<' + this.
|
|
2532
|
+
tmp = 'Vec<' + this.c20(_this__u8e3s4.g1j_1) + '>';
|
|
2532
2533
|
} else {
|
|
2533
2534
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2534
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2535
|
+
tmp = 'std::collections::HashMap<' + this.c20(_this__u8e3s4.i1n_1) + ', ' + this.c20(_this__u8e3s4.j1n_1) + '>';
|
|
2535
2536
|
} else {
|
|
2536
2537
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2537
2538
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2553,7 +2554,7 @@ protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
|
2553
2554
|
} else {
|
|
2554
2555
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2555
2556
|
var tmp_1;
|
|
2556
|
-
switch (_this__u8e3s4.
|
|
2557
|
+
switch (_this__u8e3s4.f1n_1.b3_1) {
|
|
2557
2558
|
case 0:
|
|
2558
2559
|
tmp_1 = 'i32';
|
|
2559
2560
|
break;
|
|
@@ -2568,7 +2569,7 @@ protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
|
2568
2569
|
} else {
|
|
2569
2570
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2570
2571
|
var tmp_2;
|
|
2571
|
-
switch (_this__u8e3s4.
|
|
2572
|
+
switch (_this__u8e3s4.g1n_1.b3_1) {
|
|
2572
2573
|
case 0:
|
|
2573
2574
|
tmp_2 = 'f32';
|
|
2574
2575
|
break;
|
|
@@ -2588,7 +2589,7 @@ protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
|
2588
2589
|
tmp = 'String';
|
|
2589
2590
|
} else {
|
|
2590
2591
|
if (_this__u8e3s4 instanceof Function) {
|
|
2591
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2592
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.p1n_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.c20(_this__u8e3s4.q1n_1) + '>';
|
|
2592
2593
|
} else {
|
|
2593
2594
|
noWhenBranchMatchedException();
|
|
2594
2595
|
}
|
|
@@ -2609,26 +2610,26 @@ protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
|
2609
2610
|
}
|
|
2610
2611
|
return tmp;
|
|
2611
2612
|
};
|
|
2612
|
-
protoOf(RustTransform).
|
|
2613
|
+
protoOf(RustTransform).h20 = function (_this__u8e3s4) {
|
|
2613
2614
|
var tmp;
|
|
2614
2615
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2615
2616
|
// Inline function 'kotlin.let' call
|
|
2616
|
-
var it = _this__u8e3s4.h1j_1.
|
|
2617
|
+
var it = _this__u8e3s4.h1j_1.o1h();
|
|
2617
2618
|
tmp = startsWith(it, '&') || startsWith(it, '&dyn ') || startsWith(it, '&impl ') || startsWith(it, '&mut ');
|
|
2618
2619
|
} else {
|
|
2619
2620
|
tmp = false;
|
|
2620
2621
|
}
|
|
2621
2622
|
return tmp;
|
|
2622
2623
|
};
|
|
2623
|
-
protoOf(RustTransform).
|
|
2624
|
+
protoOf(RustTransform).g20 = function (_this__u8e3s4) {
|
|
2624
2625
|
// Inline function 'kotlin.let' call
|
|
2625
|
-
var it = _this__u8e3s4.h1j_1.
|
|
2626
|
+
var it = _this__u8e3s4.h1j_1.o1h();
|
|
2626
2627
|
return it === 'Serializer' || it === 'Deserializer';
|
|
2627
2628
|
};
|
|
2628
|
-
protoOf(RustTransform).
|
|
2629
|
-
return _this__u8e3s4.h1j_1.
|
|
2629
|
+
protoOf(RustTransform).f20 = function (_this__u8e3s4) {
|
|
2630
|
+
return _this__u8e3s4.h1j_1.o1h() === 'GeneratorField';
|
|
2630
2631
|
};
|
|
2631
|
-
protoOf(RustTransform).
|
|
2632
|
+
protoOf(RustTransform).e20 = function (_this__u8e3s4) {
|
|
2632
2633
|
var v = _this__u8e3s4.j1j();
|
|
2633
2634
|
switch (v) {
|
|
2634
2635
|
case 'self':
|
|
@@ -2645,20 +2646,21 @@ function RustTransform_getInstance() {
|
|
|
2645
2646
|
return RustTransform_instance;
|
|
2646
2647
|
}
|
|
2647
2648
|
function borrow(_this__u8e3s4) {
|
|
2648
|
-
return _this__u8e3s4.
|
|
2649
|
+
return _this__u8e3s4.m1n(new Name(listOf('&' + _this__u8e3s4.h1j_1.o1h())));
|
|
2649
2650
|
}
|
|
2650
2651
|
function borrowDyn(_this__u8e3s4) {
|
|
2651
|
-
return _this__u8e3s4.
|
|
2652
|
+
return _this__u8e3s4.m1n(new Name(listOf('&dyn ' + _this__u8e3s4.h1j_1.o1h())));
|
|
2652
2653
|
}
|
|
2653
2654
|
function borrowImpl(_this__u8e3s4) {
|
|
2654
|
-
return _this__u8e3s4.
|
|
2655
|
+
return _this__u8e3s4.m1n(new Name(listOf('&impl ' + _this__u8e3s4.h1j_1.o1h())));
|
|
2655
2656
|
}
|
|
2656
2657
|
function ownedImpl(_this__u8e3s4) {
|
|
2657
|
-
return _this__u8e3s4.
|
|
2658
|
+
return _this__u8e3s4.m1n(new Name(listOf('impl ' + _this__u8e3s4.h1j_1.o1h())));
|
|
2658
2659
|
}
|
|
2659
2660
|
//region block: post-declaration
|
|
2661
|
+
protoOf(RustIrEmitter).v1v = get_extensions;
|
|
2660
2662
|
protoOf(RustIrEmitter).eo = emit_1;
|
|
2661
|
-
protoOf(RustIrEmitter).
|
|
2663
|
+
protoOf(RustIrEmitter).a1w = beforeGenerate;
|
|
2662
2664
|
//endregion
|
|
2663
2665
|
//region block: exports
|
|
2664
2666
|
export {
|