@flock/wirespec 0.20.2 → 0.21.0
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 +79 -79
- package/clikt-clikt.mjs +1329 -1329
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +433 -433
- package/kotlin-kotlin-stdlib.mjs +6 -6
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10144 -10144
- package/kotlin-rgxgen.mjs +1760 -1760
- package/kotlinx-io-kotlinx-io-core.mjs +404 -404
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1810 -1810
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1488 -1488
- package/mordant-mordant.mjs +1198 -1198
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +1652 -1139
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +206 -191
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +153 -138
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +182 -153
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +439 -379
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +175 -160
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +268 -224
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +98 -77
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3704 -3619
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +308 -227
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +503 -503
- package/wirespec-src-converter-openapi.mjs +581 -569
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1352 -1352
- package/wirespec-src-plugin-arguments.mjs +136 -136
- package/wirespec-src-plugin-cli.mjs +85 -85
- package/wirespec-src-plugin-npm.d.mts +15 -0
- package/wirespec-src-plugin-npm.mjs +26 -26
- package/wirespec-src-tools-generator.mjs +29 -24
- package/wirespec-src-tools-generator.mjs.map +1 -1
|
@@ -152,6 +152,7 @@ import {
|
|
|
152
152
|
convert17zcptkz4mhr4 as convert_2,
|
|
153
153
|
convert32tuiui3czihh as convert_3,
|
|
154
154
|
convert1cn4bolzoed8c as convert_4,
|
|
155
|
+
convert3ewo9inue7gua as convert_5,
|
|
155
156
|
get_extensions31c4or738wbxz as get_extensions,
|
|
156
157
|
emit1oxjujel6f3jb as emit_1,
|
|
157
158
|
beforeGenerate3o8idb3hey1b0 as beforeGenerate,
|
|
@@ -193,7 +194,7 @@ initMetadataForClass(RustIrEmitter, 'RustIrEmitter', RustIrEmitter, VOID, [IrEmi
|
|
|
193
194
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
194
195
|
//endregion
|
|
195
196
|
function _get_sanitizationConfig__sns434($this) {
|
|
196
|
-
var tmp0 = $this.
|
|
197
|
+
var tmp0 = $this.x1y_1;
|
|
197
198
|
var tmp = KProperty1;
|
|
198
199
|
// Inline function 'kotlin.getValue' call
|
|
199
200
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustIrEmitter$_get_sanitizationConfig_$ref_17ypni(), null);
|
|
@@ -210,7 +211,7 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
210
211
|
var item = _iterator__ex2g4s.v();
|
|
211
212
|
var _unary__edvuaz = index;
|
|
212
213
|
index = _unary__edvuaz + 1 | 0;
|
|
213
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
214
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.dr(item) : item;
|
|
214
215
|
destination.x(tmp$ret$0);
|
|
215
216
|
}
|
|
216
217
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -257,14 +258,14 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
257
258
|
return toSnakeCase($this, tmp$ret$9);
|
|
258
259
|
}
|
|
259
260
|
function toSnakeCase($this, _this__u8e3s4) {
|
|
260
|
-
return Companion_getInstance().
|
|
261
|
+
return Companion_getInstance().h1h(_this__u8e3s4).z1m();
|
|
261
262
|
}
|
|
262
263
|
function toPascalCase($this, _this__u8e3s4) {
|
|
263
264
|
var tmp = split(_this__u8e3s4, ['_']);
|
|
264
265
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustIrEmitter$toPascalCase$lambda);
|
|
265
266
|
}
|
|
266
267
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
267
|
-
return Companion_getInstance_0().
|
|
268
|
+
return Companion_getInstance_0().v1x().v1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
268
269
|
}
|
|
269
270
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
270
271
|
// Inline function 'kotlin.let' call
|
|
@@ -289,7 +290,7 @@ function prependImports($this, _this__u8e3s4, imports) {
|
|
|
289
290
|
var tmp;
|
|
290
291
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
291
292
|
if (!imports.r()) {
|
|
292
|
-
tmp = _this__u8e3s4.
|
|
293
|
+
tmp = _this__u8e3s4.g1o(VOID, plus(imports, _this__u8e3s4.d1o_1));
|
|
293
294
|
} else {
|
|
294
295
|
tmp = _this__u8e3s4;
|
|
295
296
|
}
|
|
@@ -301,7 +302,7 @@ function containsWildcard($this, type) {
|
|
|
301
302
|
tmp = true;
|
|
302
303
|
} else {
|
|
303
304
|
if (type instanceof Custom) {
|
|
304
|
-
var tmp0 = type.
|
|
305
|
+
var tmp0 = type.f1j_1;
|
|
305
306
|
var tmp$ret$0;
|
|
306
307
|
$l$block_0: {
|
|
307
308
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -328,13 +329,13 @@ function containsWildcard($this, type) {
|
|
|
328
329
|
tmp = tmp$ret$0;
|
|
329
330
|
} else {
|
|
330
331
|
if (type instanceof Nullable) {
|
|
331
|
-
tmp = containsWildcard($this, type.
|
|
332
|
+
tmp = containsWildcard($this, type.c1j_1);
|
|
332
333
|
} else {
|
|
333
334
|
if (type instanceof Array_0) {
|
|
334
|
-
tmp = containsWildcard($this, type.
|
|
335
|
+
tmp = containsWildcard($this, type.d1j_1);
|
|
335
336
|
} else {
|
|
336
337
|
if (type instanceof Dict) {
|
|
337
|
-
tmp = containsWildcard($this, type.
|
|
338
|
+
tmp = containsWildcard($this, type.l1n_1) || containsWildcard($this, type.m1n_1);
|
|
338
339
|
} else {
|
|
339
340
|
tmp = false;
|
|
340
341
|
}
|
|
@@ -356,7 +357,7 @@ function containsUnderiveable($this, type) {
|
|
|
356
357
|
tmp = true;
|
|
357
358
|
} else {
|
|
358
359
|
if (type instanceof Custom) {
|
|
359
|
-
var tmp0 = type.
|
|
360
|
+
var tmp0 = type.f1j_1;
|
|
360
361
|
var tmp$ret$0;
|
|
361
362
|
$l$block_0: {
|
|
362
363
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -383,13 +384,13 @@ function containsUnderiveable($this, type) {
|
|
|
383
384
|
tmp = tmp$ret$0;
|
|
384
385
|
} else {
|
|
385
386
|
if (type instanceof Nullable) {
|
|
386
|
-
tmp = containsUnderiveable($this, type.
|
|
387
|
+
tmp = containsUnderiveable($this, type.c1j_1);
|
|
387
388
|
} else {
|
|
388
389
|
if (type instanceof Array_0) {
|
|
389
|
-
tmp = containsUnderiveable($this, type.
|
|
390
|
+
tmp = containsUnderiveable($this, type.d1j_1);
|
|
390
391
|
} else {
|
|
391
392
|
if (type instanceof Dict) {
|
|
392
|
-
tmp = containsUnderiveable($this, type.
|
|
393
|
+
tmp = containsUnderiveable($this, type.l1n_1) || containsUnderiveable($this, type.m1n_1);
|
|
393
394
|
} else {
|
|
394
395
|
tmp = false;
|
|
395
396
|
}
|
|
@@ -415,10 +416,10 @@ function buildClientParams($this, _this__u8e3s4) {
|
|
|
415
416
|
}
|
|
416
417
|
function Companion() {
|
|
417
418
|
Companion_instance_2 = this;
|
|
418
|
-
this.
|
|
419
|
+
this.a1z_1 = RustGenerator_getInstance();
|
|
419
420
|
}
|
|
420
|
-
protoOf(Companion).
|
|
421
|
-
return this.
|
|
421
|
+
protoOf(Companion).v1x = function () {
|
|
422
|
+
return this.a1z_1.b1x_1;
|
|
422
423
|
};
|
|
423
424
|
var Companion_instance_2;
|
|
424
425
|
function Companion_getInstance_0() {
|
|
@@ -427,16 +428,16 @@ function Companion_getInstance_0() {
|
|
|
427
428
|
return Companion_instance_2;
|
|
428
429
|
}
|
|
429
430
|
function sam$kotlin_Comparator$0(function_0) {
|
|
430
|
-
this.
|
|
431
|
+
this.b1z_1 = function_0;
|
|
431
432
|
}
|
|
432
433
|
protoOf(sam$kotlin_Comparator$0).ud = function (a, b) {
|
|
433
|
-
return this.
|
|
434
|
+
return this.b1z_1(a, b);
|
|
434
435
|
};
|
|
435
436
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
436
437
|
return this.ud(a, b);
|
|
437
438
|
};
|
|
438
439
|
protoOf(sam$kotlin_Comparator$0).m3 = function () {
|
|
439
|
-
return this.
|
|
440
|
+
return this.b1z_1;
|
|
440
441
|
};
|
|
441
442
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
442
443
|
var tmp;
|
|
@@ -460,16 +461,16 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
460
461
|
return 'r#' + it;
|
|
461
462
|
}
|
|
462
463
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
463
|
-
return Companion_getInstance().
|
|
464
|
+
return Companion_getInstance().h1h((new Name(name.f1h_1)).z1m());
|
|
464
465
|
}
|
|
465
466
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
466
|
-
var value = name.
|
|
467
|
+
var value = name.g1j();
|
|
467
468
|
switch (value) {
|
|
468
469
|
case 'self':
|
|
469
470
|
case '&self':
|
|
470
471
|
return name;
|
|
471
472
|
default:
|
|
472
|
-
return Companion_getInstance().
|
|
473
|
+
return Companion_getInstance().h1h((new Name(name.f1h_1)).z1m());
|
|
473
474
|
}
|
|
474
475
|
}
|
|
475
476
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
@@ -493,9 +494,9 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
493
494
|
return function (stmt, tr) {
|
|
494
495
|
var tmp;
|
|
495
496
|
if (stmt instanceof ConstructorStatement) {
|
|
496
|
-
var tmp_0 = tr.
|
|
497
|
+
var tmp_0 = tr.s1v(stmt.y1n_1);
|
|
497
498
|
// Inline function 'kotlin.collections.map' call
|
|
498
|
-
var this_0 = stmt.
|
|
499
|
+
var this_0 = stmt.z1n_1;
|
|
499
500
|
// Inline function 'kotlin.collections.mapTo' call
|
|
500
501
|
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
501
502
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -506,7 +507,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
506
507
|
var k = item.l1();
|
|
507
508
|
// Inline function 'kotlin.collections.component2' call
|
|
508
509
|
var v = item.m1();
|
|
509
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
510
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.v1v(v));
|
|
510
511
|
destination.x(tmp$ret$3);
|
|
511
512
|
}
|
|
512
513
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -518,7 +519,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
518
519
|
}
|
|
519
520
|
function RustIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
520
521
|
return function () {
|
|
521
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
522
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().v1x(), setOf(['self', 'Self']));
|
|
522
523
|
var tmp = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
523
524
|
var tmp_0 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
524
525
|
var tmp_1 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -532,69 +533,69 @@ function RustIrEmitter$_get_sanitizationConfig_$ref_17ypni() {
|
|
|
532
533
|
};
|
|
533
534
|
}
|
|
534
535
|
function RustIrEmitter$emitShared$lambda($this$interface) {
|
|
535
|
-
$this$interface.
|
|
536
|
+
$this$interface.t1j(Custom_init_$Create$('Headers'));
|
|
536
537
|
return Unit_instance;
|
|
537
538
|
}
|
|
538
539
|
function RustIrEmitter$emitShared$lambda_0($this$interface) {
|
|
539
|
-
$this$interface.
|
|
540
|
+
$this$interface.t1j(Custom_init_$Create$('Headers'));
|
|
540
541
|
return Unit_instance;
|
|
541
542
|
}
|
|
542
543
|
function RustIrEmitter$emitShared$lambda_1($this$interface) {
|
|
543
|
-
$this$interface.
|
|
544
|
-
$this$interface.
|
|
545
|
-
$this$interface.
|
|
544
|
+
$this$interface.t1j(Custom_init_$Create$('Sized'));
|
|
545
|
+
$this$interface.a1i('label', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda);
|
|
546
|
+
$this$interface.a1i('from_label', true, VOID, RustIrEmitter$emitShared$lambda$lambda_0);
|
|
546
547
|
return Unit_instance;
|
|
547
548
|
}
|
|
548
549
|
function RustIrEmitter$emitShared$lambda$lambda($this$function) {
|
|
549
|
-
$this$function.
|
|
550
|
-
$this$function.
|
|
550
|
+
$this$function.v1h('&self', Custom_init_$Create$(''));
|
|
551
|
+
$this$function.y1h(Custom_init_$Create$('&str'));
|
|
551
552
|
return Unit_instance;
|
|
552
553
|
}
|
|
553
554
|
function RustIrEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
554
|
-
$this$function.
|
|
555
|
-
$this$function.
|
|
555
|
+
$this$function.v1h('s', Custom_init_$Create$('&str'));
|
|
556
|
+
$this$function.y1h(Custom_init_$Create$('Option<Self>'));
|
|
556
557
|
return Unit_instance;
|
|
557
558
|
}
|
|
558
559
|
function RustIrEmitter$emitShared$lambda_2($this$interface) {
|
|
559
|
-
$this$interface.
|
|
560
|
-
$this$interface.
|
|
561
|
-
$this$interface.
|
|
560
|
+
$this$interface.n1j($this$interface.j1h('T', []), []);
|
|
561
|
+
$this$interface.a1i('value', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_1);
|
|
562
|
+
$this$interface.a1i('validate', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_2);
|
|
562
563
|
return Unit_instance;
|
|
563
564
|
}
|
|
564
565
|
function RustIrEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
565
|
-
$this$function.
|
|
566
|
-
$this$function.
|
|
566
|
+
$this$function.v1h('&self', Custom_init_$Create$(''));
|
|
567
|
+
$this$function.y1h(borrow($this$function.j1h('T', [])));
|
|
567
568
|
return Unit_instance;
|
|
568
569
|
}
|
|
569
570
|
function RustIrEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
570
|
-
$this$function.
|
|
571
|
-
$this$function.
|
|
571
|
+
$this$function.v1h('&self', Custom_init_$Create$(''));
|
|
572
|
+
$this$function.y1h($this$function.u1j());
|
|
572
573
|
return Unit_instance;
|
|
573
574
|
}
|
|
574
575
|
function RustIrEmitter$emitShared$lambda_3($this$interface) {
|
|
575
|
-
$this$interface.
|
|
576
|
-
$this$interface.
|
|
577
|
-
$this$interface.
|
|
578
|
-
$this$interface.
|
|
579
|
-
$this$interface.
|
|
580
|
-
$this$interface.
|
|
576
|
+
$this$interface.n1j($this$interface.j1h('T', []), []);
|
|
577
|
+
$this$interface.o1j('path', borrowDyn($this$interface.j1h('Path', [])));
|
|
578
|
+
$this$interface.o1j('method', borrow($this$interface.j1h('Method', [])));
|
|
579
|
+
$this$interface.o1j('queries', borrowDyn($this$interface.j1h('Queries', [])));
|
|
580
|
+
$this$interface.o1j('headers', borrowDyn($this$interface.j1h('RequestHeaders', [])));
|
|
581
|
+
$this$interface.o1j('body', borrow($this$interface.j1h('T', [])));
|
|
581
582
|
return Unit_instance;
|
|
582
583
|
}
|
|
583
584
|
function RustIrEmitter$emitShared$lambda_4($this$interface) {
|
|
584
|
-
$this$interface.
|
|
585
|
-
$this$interface.
|
|
586
|
-
$this$interface.
|
|
587
|
-
$this$interface.
|
|
585
|
+
$this$interface.n1j($this$interface.j1h('T', []), []);
|
|
586
|
+
$this$interface.o1j('status', $this$interface.x1k());
|
|
587
|
+
$this$interface.o1j('headers', borrowDyn($this$interface.j1h('ResponseHeaders', [])));
|
|
588
|
+
$this$interface.o1j('body', borrow($this$interface.j1h('T', [])));
|
|
588
589
|
return Unit_instance;
|
|
589
590
|
}
|
|
590
591
|
function RustIrEmitter$emitShared$lambda_5($this$interface) {
|
|
591
|
-
$this$interface.
|
|
592
|
+
$this$interface.u1k('transport', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_3);
|
|
592
593
|
return Unit_instance;
|
|
593
594
|
}
|
|
594
595
|
function RustIrEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
595
|
-
$this$asyncFunction.
|
|
596
|
-
$this$asyncFunction.
|
|
597
|
-
$this$asyncFunction.
|
|
596
|
+
$this$asyncFunction.v1h('&self', Custom_init_$Create$(''));
|
|
597
|
+
$this$asyncFunction.v1h('request', borrow($this$asyncFunction.j1h('RawRequest', [])));
|
|
598
|
+
$this$asyncFunction.y1h($this$asyncFunction.j1h('RawResponse', []));
|
|
598
599
|
return Unit_instance;
|
|
599
600
|
}
|
|
600
601
|
function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -602,7 +603,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
602
603
|
var tmp;
|
|
603
604
|
if (element instanceof File) {
|
|
604
605
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
605
|
-
var tmp0 = element.
|
|
606
|
+
var tmp0 = element.d1o_1;
|
|
606
607
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
607
608
|
var destination = ArrayList_init_$Create$_0();
|
|
608
609
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -613,7 +614,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
613
614
|
}
|
|
614
615
|
}
|
|
615
616
|
var namespace = first(destination);
|
|
616
|
-
tmp = element.
|
|
617
|
+
tmp = element.g1o(VOID, plus($rustImports, namespace.j1o_1));
|
|
617
618
|
} else {
|
|
618
619
|
tmp = element;
|
|
619
620
|
}
|
|
@@ -625,7 +626,7 @@ function RustIrEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
625
626
|
var tmp;
|
|
626
627
|
if (element instanceof Enum_0) {
|
|
627
628
|
var tmp_0;
|
|
628
|
-
if (element.
|
|
629
|
+
if (element.t1p_1.equals(Companion_getInstance().h1h('Method'))) {
|
|
629
630
|
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}');
|
|
630
631
|
} else {
|
|
631
632
|
tmp_0 = element;
|
|
@@ -642,7 +643,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
642
643
|
var tmp;
|
|
643
644
|
if (element instanceof File) {
|
|
644
645
|
// Inline function 'kotlin.collections.flatMap' call
|
|
645
|
-
var tmp0 = element.
|
|
646
|
+
var tmp0 = element.d1o_1;
|
|
646
647
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
647
648
|
var destination = ArrayList_init_$Create$_0();
|
|
648
649
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -654,7 +655,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
654
655
|
tmp$ret$0 = listOf(element_0);
|
|
655
656
|
break $l$block;
|
|
656
657
|
}
|
|
657
|
-
var name = element_0.
|
|
658
|
+
var name = element_0.o1o_1.i1h();
|
|
658
659
|
var tmp_0;
|
|
659
660
|
// Inline function 'kotlin.collections.contains' call
|
|
660
661
|
// Inline function 'kotlin.collections.containsKey' call
|
|
@@ -688,7 +689,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
688
689
|
addAll(destination, list);
|
|
689
690
|
}
|
|
690
691
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
691
|
-
tmp = element.
|
|
692
|
+
tmp = element.g1o(VOID, newElements);
|
|
692
693
|
} else {
|
|
693
694
|
tmp = element;
|
|
694
695
|
}
|
|
@@ -704,14 +705,14 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
704
705
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
705
706
|
var tmp_0 = scope;
|
|
706
707
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
707
|
-
var this_0 = scope.
|
|
708
|
+
var this_0 = scope.a1w_1;
|
|
708
709
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
709
710
|
// Inline function 'kotlin.apply' call
|
|
710
711
|
var this_1 = new TransformerBuilder();
|
|
711
|
-
this_1.
|
|
712
|
-
var tmp$ret$2 = this_1.
|
|
713
|
-
tmp_0.
|
|
714
|
-
var tmp_1 = scope.
|
|
712
|
+
this_1.u1i(RustIrEmitter$emitShared$lambda$lambda_4);
|
|
713
|
+
var tmp$ret$2 = this_1.v1i();
|
|
714
|
+
tmp_0.a1w_1 = transform(this_0, tmp$ret$2);
|
|
715
|
+
var tmp_1 = scope.a1w_1;
|
|
715
716
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
716
717
|
} else {
|
|
717
718
|
tmp = element;
|
|
@@ -722,7 +723,7 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
722
723
|
function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
723
724
|
var tmp;
|
|
724
725
|
if (element instanceof Function_0) {
|
|
725
|
-
var tmp0 = element.
|
|
726
|
+
var tmp0 = element.g1l_1;
|
|
726
727
|
var tmp$ret$0;
|
|
727
728
|
$l$block_0: {
|
|
728
729
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -739,7 +740,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
739
740
|
var _iterator__ex2g4s = tmp0.t();
|
|
740
741
|
while (_iterator__ex2g4s.u()) {
|
|
741
742
|
var element_0 = _iterator__ex2g4s.v();
|
|
742
|
-
if (element_0.
|
|
743
|
+
if (element_0.s1r_1.g1j() === '&self' || element_0.s1r_1.g1j() === 'self') {
|
|
743
744
|
tmp$ret$0 = true;
|
|
744
745
|
break $l$block_0;
|
|
745
746
|
}
|
|
@@ -747,7 +748,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
747
748
|
tmp$ret$0 = false;
|
|
748
749
|
}
|
|
749
750
|
var hasSelf = tmp$ret$0;
|
|
750
|
-
tmp = hasSelf || element.
|
|
751
|
+
tmp = hasSelf || element.k1l_1 ? element : element.p1l(VOID, VOID, plus(listOf(get_rustSelfParam()), element.g1l_1));
|
|
751
752
|
} else {
|
|
752
753
|
tmp = element;
|
|
753
754
|
}
|
|
@@ -758,7 +759,7 @@ function RustIrEmitter$emitShared$lambda_10(group) {
|
|
|
758
759
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
759
760
|
}
|
|
760
761
|
function RustIrEmitter$emitShared$lambda$lambda_5(it) {
|
|
761
|
-
return RustGenerator_getInstance().
|
|
762
|
+
return RustGenerator_getInstance().o1w(it);
|
|
762
763
|
}
|
|
763
764
|
function RustIrEmitter$emit$lambda(a, b) {
|
|
764
765
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -767,7 +768,7 @@ function RustIrEmitter$emit$lambda(a, b) {
|
|
|
767
768
|
return compareValues(tmp, tmp$ret$1);
|
|
768
769
|
}
|
|
769
770
|
function emit$emitMod(this$0, def) {
|
|
770
|
-
return 'pub mod ' + sanitize(this$0, def.
|
|
771
|
+
return 'pub mod ' + sanitize(this$0, def.mr()) + ';';
|
|
771
772
|
}
|
|
772
773
|
function RustIrEmitter$emit$lambda_0(this$0) {
|
|
773
774
|
return function (it) {
|
|
@@ -796,17 +797,17 @@ function RustIrEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs)
|
|
|
796
797
|
var tmp_0;
|
|
797
798
|
var tmp_1;
|
|
798
799
|
if (expr instanceof RawExpression) {
|
|
799
|
-
tmp_1 = endsWith(expr.
|
|
800
|
+
tmp_1 = endsWith(expr.r1q_1, 'Generator');
|
|
800
801
|
} else {
|
|
801
802
|
tmp_1 = false;
|
|
802
803
|
}
|
|
803
804
|
if (tmp_1) {
|
|
804
|
-
tmp_0 = !(expr.
|
|
805
|
+
tmp_0 = !(expr.r1q_1 === $generatorOwnName);
|
|
805
806
|
} else {
|
|
806
807
|
tmp_0 = false;
|
|
807
808
|
}
|
|
808
809
|
if (tmp_0) {
|
|
809
|
-
$generatorRefs.x(expr.
|
|
810
|
+
$generatorRefs.x(expr.r1q_1);
|
|
810
811
|
tmp = Unit_instance;
|
|
811
812
|
}
|
|
812
813
|
return transformChildren_1(expr, t);
|
|
@@ -819,7 +820,7 @@ function RustIrEmitter$emit$lambda_2(this$0) {
|
|
|
819
820
|
}
|
|
820
821
|
function RustIrEmitter$emitClient$lambda(this$0) {
|
|
821
822
|
return function (endpoint) {
|
|
822
|
-
return 'pub mod ' + toSnakeCase(this$0, endpoint.
|
|
823
|
+
return 'pub mod ' + toSnakeCase(this$0, endpoint.kq_1.m1() + 'Client') + ';';
|
|
823
824
|
};
|
|
824
825
|
}
|
|
825
826
|
function RustIrEmitter$toPascalCase$lambda(s) {
|
|
@@ -840,38 +841,38 @@ function RustIrEmitter$toPascalCase$lambda(s) {
|
|
|
840
841
|
function RustIrEmitter$buildClientParams$lambda(this$0) {
|
|
841
842
|
return function (_destruct__k2r9zo) {
|
|
842
843
|
var name = _destruct__k2r9zo.we();
|
|
843
|
-
return sanitizeKeywords(this$0, name.
|
|
844
|
+
return sanitizeKeywords(this$0, name.z1m());
|
|
844
845
|
};
|
|
845
846
|
}
|
|
846
847
|
function RustIrEmitter$buildClientParams$lambda_0(this$0) {
|
|
847
848
|
return function (_destruct__k2r9zo) {
|
|
848
849
|
var name = _destruct__k2r9zo.we();
|
|
849
850
|
var type = _destruct__k2r9zo.xe();
|
|
850
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
851
|
+
var tmp = sanitizeKeywords(this$0, name.z1m());
|
|
851
852
|
// Inline function 'kotlin.with' call
|
|
852
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
853
|
+
return tmp + ': ' + RustTransform_getInstance().h1z(type);
|
|
853
854
|
};
|
|
854
855
|
}
|
|
855
856
|
function RustIrEmitter(packageName, emitShared) {
|
|
856
857
|
Companion_getInstance_0();
|
|
857
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
858
|
+
packageName = packageName === VOID ? Companion_instance_0.is('community.flock.wirespec.generated') : packageName;
|
|
858
859
|
emitShared = emitShared === VOID ? Companion_instance_1.fp() : emitShared;
|
|
859
|
-
this.
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
860
|
+
this.t1y_1 = packageName;
|
|
861
|
+
this.u1y_1 = emitShared;
|
|
862
|
+
this.v1y_1 = RustGenerator_getInstance();
|
|
863
|
+
this.w1y_1 = FileExtension_Rust_getInstance();
|
|
863
864
|
var tmp = this;
|
|
864
|
-
tmp.
|
|
865
|
-
this.
|
|
866
|
-
this.
|
|
865
|
+
tmp.x1y_1 = lazy(RustIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
866
|
+
this.y1y_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
867
|
+
this.z1y_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
867
868
|
}
|
|
868
|
-
protoOf(RustIrEmitter).
|
|
869
|
-
return this.
|
|
869
|
+
protoOf(RustIrEmitter).n1w = function () {
|
|
870
|
+
return this.v1y_1;
|
|
870
871
|
};
|
|
871
|
-
protoOf(RustIrEmitter).
|
|
872
|
-
return this.
|
|
872
|
+
protoOf(RustIrEmitter).kr = function () {
|
|
873
|
+
return this.w1y_1;
|
|
873
874
|
};
|
|
874
|
-
protoOf(RustIrEmitter).
|
|
875
|
+
protoOf(RustIrEmitter).r1w = function () {
|
|
875
876
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
876
877
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustIrEmitter$emitShared$lambda);
|
|
877
878
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustIrEmitter$emitShared$lambda_0);
|
|
@@ -885,43 +886,43 @@ protoOf(RustIrEmitter).h1w = function () {
|
|
|
885
886
|
var transportationTrait = interface_0('Transportation', VOID, RustIrEmitter$emitShared$lambda_5);
|
|
886
887
|
var dslTraits = mapOf([to('Enum', enumTrait), to('Refined', refinedTrait), to('Request', requestTrait), to('Response', responseTrait), to('Transportation', transportationTrait)]);
|
|
887
888
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
888
|
-
var this_0 = convert(Companion_instance_0.
|
|
889
|
+
var this_0 = convert(Companion_instance_0.is('shared'));
|
|
889
890
|
var scope = new TransformScope(this_0);
|
|
890
891
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
891
892
|
var tmp = scope;
|
|
892
893
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
893
|
-
var this_1 = scope.
|
|
894
|
+
var this_1 = scope.a1w_1;
|
|
894
895
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
895
896
|
// Inline function 'kotlin.apply' call
|
|
896
897
|
var this_2 = new TransformerBuilder();
|
|
897
|
-
this_2.
|
|
898
|
-
var tmp$ret$2 = this_2.
|
|
899
|
-
tmp.
|
|
898
|
+
this_2.u1i(RustIrEmitter$emitShared$lambda_6(rustImports));
|
|
899
|
+
var tmp$ret$2 = this_2.v1i();
|
|
900
|
+
tmp.a1w_1 = transform(this_1, tmp$ret$2);
|
|
900
901
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
901
902
|
var tmp_0 = scope;
|
|
902
903
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
903
|
-
var this_3 = scope.
|
|
904
|
+
var this_3 = scope.a1w_1;
|
|
904
905
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
905
906
|
// Inline function 'kotlin.apply' call
|
|
906
907
|
var this_4 = new TransformerBuilder();
|
|
907
|
-
this_4.
|
|
908
|
-
var tmp$ret$7 = this_4.
|
|
909
|
-
tmp_0.
|
|
908
|
+
this_4.u1i(RustIrEmitter$emitShared$lambda_7);
|
|
909
|
+
var tmp$ret$7 = this_4.v1i();
|
|
910
|
+
tmp_0.a1w_1 = transform(this_3, tmp$ret$7);
|
|
910
911
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
911
912
|
var tmp_1 = scope;
|
|
912
913
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
913
|
-
var this_5 = scope.
|
|
914
|
+
var this_5 = scope.a1w_1;
|
|
914
915
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
915
916
|
// Inline function 'kotlin.apply' call
|
|
916
917
|
var this_6 = new TransformerBuilder();
|
|
917
|
-
this_6.
|
|
918
|
-
var tmp$ret$12 = this_6.
|
|
919
|
-
tmp_1.
|
|
920
|
-
var tmp_2 = scope.
|
|
918
|
+
this_6.u1i(RustIrEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
919
|
+
var tmp$ret$12 = this_6.v1i();
|
|
920
|
+
tmp_1.a1w_1 = transform(this_5, tmp$ret$12);
|
|
921
|
+
var tmp_2 = scope.a1w_1;
|
|
921
922
|
// Inline function 'kotlin.let' call
|
|
922
923
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
923
924
|
// Inline function 'kotlin.collections.flatMap' call
|
|
924
|
-
var tmp0 = file.
|
|
925
|
+
var tmp0 = file.d1o_1;
|
|
925
926
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
926
927
|
var destination = ArrayList_init_$Create$_0();
|
|
927
928
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -951,7 +952,7 @@ protoOf(RustIrEmitter).h1w = function () {
|
|
|
951
952
|
var _iterator__ex2g4s_0 = structFields.t();
|
|
952
953
|
while (_iterator__ex2g4s_0.u()) {
|
|
953
954
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
954
|
-
if (containsUnderiveable(this, element_0.
|
|
955
|
+
if (containsUnderiveable(this, element_0.y1o_1)) {
|
|
955
956
|
tmp$ret$18 = true;
|
|
956
957
|
break $l$block_1;
|
|
957
958
|
}
|
|
@@ -977,7 +978,7 @@ protoOf(RustIrEmitter).h1w = function () {
|
|
|
977
978
|
var _iterator__ex2g4s_1 = structFields.t();
|
|
978
979
|
while (_iterator__ex2g4s_1.u()) {
|
|
979
980
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
980
|
-
if (containsWildcard(this, element_1.
|
|
981
|
+
if (containsWildcard(this, element_1.y1o_1)) {
|
|
981
982
|
tmp$ret$20 = true;
|
|
982
983
|
break $l$block_3;
|
|
983
984
|
}
|
|
@@ -987,7 +988,7 @@ protoOf(RustIrEmitter).h1w = function () {
|
|
|
987
988
|
if (tmp$ret$20) {
|
|
988
989
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
989
990
|
} else {
|
|
990
|
-
if (setOf(['RawRequest', 'RawResponse']).v1(element.
|
|
991
|
+
if (setOf(['RawRequest', 'RawResponse']).v1(element.c1q_1.i1h())) {
|
|
991
992
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
992
993
|
} else {
|
|
993
994
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -1003,29 +1004,29 @@ protoOf(RustIrEmitter).h1w = function () {
|
|
|
1003
1004
|
tmp_6 = listOf(new RawElement(derive));
|
|
1004
1005
|
}
|
|
1005
1006
|
var prefix = tmp_6;
|
|
1006
|
-
tmp$ret$17 = listOf(new File(element.
|
|
1007
|
+
tmp$ret$17 = listOf(new File(element.c1q_1, plus_0(prefix, element)));
|
|
1007
1008
|
}
|
|
1008
1009
|
var list = tmp$ret$17;
|
|
1009
1010
|
addAll(destination, list);
|
|
1010
1011
|
}
|
|
1011
|
-
var tmp0_0 = new File(file.
|
|
1012
|
+
var tmp0_0 = new File(file.c1o_1, destination);
|
|
1012
1013
|
// Inline function 'kotlin.let' call
|
|
1013
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1014
|
+
var wirespecFile = RustTransform_getInstance().i1z(tmp0_0);
|
|
1014
1015
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1015
1016
|
var scope_0 = new TransformScope(wirespecFile);
|
|
1016
1017
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1017
1018
|
var tmp_7 = scope_0;
|
|
1018
1019
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1019
|
-
var this_7 = scope_0.
|
|
1020
|
+
var this_7 = scope_0.a1w_1;
|
|
1020
1021
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1021
1022
|
// Inline function 'kotlin.apply' call
|
|
1022
1023
|
var this_8 = new TransformerBuilder();
|
|
1023
|
-
this_8.
|
|
1024
|
-
var tmp$ret$31 = this_8.
|
|
1025
|
-
tmp_7.
|
|
1026
|
-
var tmp_8 = scope_0.
|
|
1024
|
+
this_8.u1i(RustIrEmitter$emitShared$lambda_9);
|
|
1025
|
+
var tmp$ret$31 = this_8.v1i();
|
|
1026
|
+
tmp_7.a1w_1 = transform(this_7, tmp$ret$31);
|
|
1027
|
+
var tmp_8 = scope_0.a1w_1;
|
|
1027
1028
|
// Inline function 'kotlin.let' call
|
|
1028
|
-
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1029
|
+
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).d1o_1;
|
|
1029
1030
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1030
1031
|
// Inline function 'kotlin.collections.fold' call
|
|
1031
1032
|
var accumulator = ArrayList_init_$Create$_0();
|
|
@@ -1046,16 +1047,16 @@ protoOf(RustIrEmitter).h1w = function () {
|
|
|
1046
1047
|
var groups = accumulator;
|
|
1047
1048
|
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda_10) + '\n';
|
|
1048
1049
|
var tmp_10;
|
|
1049
|
-
if (this.
|
|
1050
|
-
tmp_10 = new File(Companion_getInstance().
|
|
1050
|
+
if (this.u1y_1.gp_1) {
|
|
1051
|
+
tmp_10 = new File(Companion_getInstance().h1h(this.t1y_1.ls() + 'wirespec'), listOf(new RawElement(source)));
|
|
1051
1052
|
} else {
|
|
1052
1053
|
tmp_10 = null;
|
|
1053
1054
|
}
|
|
1054
1055
|
return tmp_10;
|
|
1055
1056
|
};
|
|
1056
|
-
protoOf(RustIrEmitter).
|
|
1057
|
+
protoOf(RustIrEmitter).q1w = function (module_0, logger) {
|
|
1057
1058
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1058
|
-
var this_0 = new NonEmptyList(module_0.
|
|
1059
|
+
var this_0 = new NonEmptyList(module_0.gr_1);
|
|
1059
1060
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
1060
1061
|
var tmp = RustIrEmitter$emit$lambda;
|
|
1061
1062
|
var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);
|
|
@@ -1063,9 +1064,9 @@ protoOf(RustIrEmitter).g1w = function (module_0, logger) {
|
|
|
1063
1064
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$1);
|
|
1064
1065
|
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).xm_1;
|
|
1065
1066
|
// Inline function 'kotlin.let' call
|
|
1066
|
-
var files = emit.call(this, module_0.
|
|
1067
|
+
var files = emit.call(this, module_0.tv(VOID, statements), logger);
|
|
1067
1068
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1068
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
1069
|
+
var tmp0 = new NonEmptyList(module_0.gr_1);
|
|
1069
1070
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1070
1071
|
var destination = ArrayList_init_$Create$_0();
|
|
1071
1072
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1085,11 +1086,11 @@ protoOf(RustIrEmitter).g1w = function (module_0, logger) {
|
|
|
1085
1086
|
tmp_1 = '';
|
|
1086
1087
|
}
|
|
1087
1088
|
var clientMod = tmp_1;
|
|
1088
|
-
var modRs = new File(Companion_getInstance().
|
|
1089
|
-
var modEndpoint = new File(Companion_getInstance().
|
|
1090
|
-
var tmp_2 = Companion_getInstance().
|
|
1089
|
+
var modRs = new File(Companion_getInstance().h1h(this.t1y_1.ls() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1090
|
+
var modEndpoint = new File(Companion_getInstance().h1h(this.t1y_1.ls() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1091
|
+
var tmp_2 = Companion_getInstance().h1h(this.t1y_1.ls() + 'model/' + 'mod');
|
|
1091
1092
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1092
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
1093
|
+
var tmp0_0 = new NonEmptyList(module_0.gr_1);
|
|
1093
1094
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1094
1095
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1095
1096
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1101,23 +1102,23 @@ protoOf(RustIrEmitter).g1w = function (module_0, logger) {
|
|
|
1101
1102
|
}
|
|
1102
1103
|
var tmp_3 = destination_0;
|
|
1103
1104
|
var modModel = new File(tmp_2, listOf(new RawElement(joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emit$lambda_1(this)))));
|
|
1104
|
-
return this.
|
|
1105
|
+
return this.u1y_1.gp_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(files, modRs), modEndpoint), modModel) : NonEmptyList__plus_impl_xqmb9(files, modRs);
|
|
1105
1106
|
};
|
|
1106
|
-
protoOf(RustIrEmitter).
|
|
1107
|
-
var subPackageName = plus_1(this.
|
|
1107
|
+
protoOf(RustIrEmitter).lr = function (definition, module_0, logger) {
|
|
1108
|
+
var subPackageName = plus_1(this.t1y_1, definition);
|
|
1108
1109
|
var tmp;
|
|
1109
1110
|
if (definition instanceof Endpoint) {
|
|
1110
|
-
tmp = this.
|
|
1111
|
+
tmp = this.z1y_1;
|
|
1111
1112
|
} else {
|
|
1112
|
-
tmp = this.
|
|
1113
|
+
tmp = this.y1y_1;
|
|
1113
1114
|
}
|
|
1114
1115
|
var importHeader = tmp;
|
|
1115
1116
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1116
1117
|
// Inline function 'kotlin.let' call
|
|
1117
|
-
var file = RustTransform_getInstance().
|
|
1118
|
-
var tmp_0 = Companion_getInstance().
|
|
1118
|
+
var file = RustTransform_getInstance().i1z(tmp0);
|
|
1119
|
+
var tmp_0 = Companion_getInstance().h1h(subPackageName.ls() + toSnakeCase(this, file.c1o_1.i1h()));
|
|
1119
1120
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1120
|
-
var tmp0_0 = file.
|
|
1121
|
+
var tmp0_0 = file.d1o_1;
|
|
1121
1122
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1122
1123
|
var destination = ArrayList_init_$Create$_0();
|
|
1123
1124
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1134,7 +1135,7 @@ protoOf(RustIrEmitter).fr = function (definition, module_0, logger) {
|
|
|
1134
1135
|
}
|
|
1135
1136
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1136
1137
|
};
|
|
1137
|
-
protoOf(RustIrEmitter).
|
|
1138
|
+
protoOf(RustIrEmitter).w1w = function (definition, module_0) {
|
|
1138
1139
|
var tmp;
|
|
1139
1140
|
if (definition instanceof Type) {
|
|
1140
1141
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1154,7 +1155,7 @@ protoOf(RustIrEmitter).m1w = function (definition, module_0) {
|
|
|
1154
1155
|
}
|
|
1155
1156
|
}
|
|
1156
1157
|
var generatorFile = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
|
|
1157
|
-
var generatorOwnName = definition.
|
|
1158
|
+
var generatorOwnName = definition.mr().m1() + 'Generator';
|
|
1158
1159
|
var tmp_0 = asSequence(collectCustomTypeNames(generatorFile));
|
|
1159
1160
|
var tmp_1 = filterNot(tmp_0, RustIrEmitter$emitGenerator$lambda);
|
|
1160
1161
|
var tmp_2 = filterNot(tmp_1, RustIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -1163,8 +1164,8 @@ protoOf(RustIrEmitter).m1w = function (definition, module_0) {
|
|
|
1163
1164
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1164
1165
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1165
1166
|
var scope = new TransformScope(generatorFile);
|
|
1166
|
-
scope.
|
|
1167
|
-
var tmp_3 = scope.
|
|
1167
|
+
scope.i1w(RustIrEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1168
|
+
var tmp_3 = scope.a1w_1;
|
|
1168
1169
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1169
1170
|
// Inline function 'kotlin.collections.filter' call
|
|
1170
1171
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1207,52 +1208,111 @@ protoOf(RustIrEmitter).m1w = function (definition, module_0) {
|
|
|
1207
1208
|
destination_2.x(tmp$ret$12);
|
|
1208
1209
|
}
|
|
1209
1210
|
var typeImports = destination_2;
|
|
1210
|
-
var subPackageName = plus_2(this.
|
|
1211
|
-
return new File(Companion_getInstance().
|
|
1211
|
+
var subPackageName = plus_2(this.t1y_1, 'generator');
|
|
1212
|
+
return new File(Companion_getInstance().h1h(subPackageName.ls() + toSnakeCase(this, generatorFile.c1o_1.i1h())), plus(plus(plus(this.y1y_1, typeImports), generatorImports), generatorFile.d1o_1));
|
|
1212
1213
|
};
|
|
1213
|
-
protoOf(RustIrEmitter).
|
|
1214
|
+
protoOf(RustIrEmitter).cs = function (type, module_0) {
|
|
1214
1215
|
var tmp = convertWithValidation(type, module_0);
|
|
1215
1216
|
// Inline function 'kotlin.collections.map' call
|
|
1216
|
-
var this_0 = type.
|
|
1217
|
+
var this_0 = type.fq_1.kp_1;
|
|
1217
1218
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1218
1219
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1219
1220
|
var _iterator__ex2g4s = this_0.t();
|
|
1220
1221
|
while (_iterator__ex2g4s.u()) {
|
|
1221
1222
|
var item = _iterator__ex2g4s.v();
|
|
1222
|
-
var tmp$ret$0 = item.
|
|
1223
|
+
var tmp$ret$0 = item.sp_1.m1();
|
|
1223
1224
|
destination.x(tmp$ret$0);
|
|
1224
1225
|
}
|
|
1225
1226
|
return prependImports(this, sanitizeNames(injectSelfReceiverToValidate(tmp, toSet(destination), '&self'), _get_sanitizationConfig__sns434(this)), buildModelImports(type));
|
|
1226
1227
|
};
|
|
1227
|
-
protoOf(RustIrEmitter).
|
|
1228
|
+
protoOf(RustIrEmitter).as = function (enum_0, module_0) {
|
|
1228
1229
|
var tmp = convert_0(enum_0);
|
|
1229
1230
|
return sanitizeEnumEntries(tmp, RustIrEmitter$emit$lambda_2(this));
|
|
1230
1231
|
};
|
|
1231
|
-
protoOf(RustIrEmitter).
|
|
1232
|
+
protoOf(RustIrEmitter).qr = function (union) {
|
|
1232
1233
|
return convert_1(union);
|
|
1233
1234
|
};
|
|
1234
|
-
protoOf(RustIrEmitter).
|
|
1235
|
+
protoOf(RustIrEmitter).vr = function (refined) {
|
|
1235
1236
|
return replaceStructWithRefinedFunctions(convert_2(refined), refined);
|
|
1236
1237
|
};
|
|
1237
|
-
protoOf(RustIrEmitter).
|
|
1238
|
+
protoOf(RustIrEmitter).bs = function (endpoint) {
|
|
1238
1239
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1239
1240
|
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_3(endpoint))))));
|
|
1240
1241
|
var scope = new TransformScope(this_0);
|
|
1241
|
-
scope.
|
|
1242
|
-
var tmp = scope.
|
|
1242
|
+
scope.f1w(fixResponseSwitchPatterns());
|
|
1243
|
+
var tmp = scope.a1w_1;
|
|
1243
1244
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1244
1245
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1245
1246
|
var scope_0 = new TransformScope(this_1);
|
|
1246
|
-
scope_0.
|
|
1247
|
-
var tmp_0 = scope_0.
|
|
1247
|
+
scope_0.f1w(fixConstructorCalls());
|
|
1248
|
+
var tmp_0 = scope_0.a1w_1;
|
|
1248
1249
|
var tmp$ret$3 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1249
1250
|
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$3))), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1250
1251
|
};
|
|
1251
|
-
protoOf(RustIrEmitter).
|
|
1252
|
+
protoOf(RustIrEmitter).pr = function (channel) {
|
|
1252
1253
|
return convert_4(channel);
|
|
1253
1254
|
};
|
|
1254
|
-
protoOf(RustIrEmitter).
|
|
1255
|
-
|
|
1255
|
+
protoOf(RustIrEmitter).or = function (rpc) {
|
|
1256
|
+
// Inline function 'kotlin.let' call
|
|
1257
|
+
var file = convert_5(rpc);
|
|
1258
|
+
// Inline function 'kotlin.collections.distinctBy' call
|
|
1259
|
+
var this_0 = importReferences(rpc);
|
|
1260
|
+
var set = HashSet_init_$Create$();
|
|
1261
|
+
var list = ArrayList_init_$Create$_0();
|
|
1262
|
+
var _iterator__ex2g4s = this_0.t();
|
|
1263
|
+
while (_iterator__ex2g4s.u()) {
|
|
1264
|
+
var e = _iterator__ex2g4s.v();
|
|
1265
|
+
var key = e.lv_1;
|
|
1266
|
+
if (set.x(key)) {
|
|
1267
|
+
list.x(e);
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
// Inline function 'kotlin.collections.map' call
|
|
1271
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1272
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(list, 10));
|
|
1273
|
+
var _iterator__ex2g4s_0 = list.t();
|
|
1274
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
1275
|
+
var item = _iterator__ex2g4s_0.v();
|
|
1276
|
+
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.lv_1), Companion_getInstance().h1h(item.lv_1).i1h());
|
|
1277
|
+
destination.x(tmp$ret$2);
|
|
1278
|
+
}
|
|
1279
|
+
var rpcImports = destination;
|
|
1280
|
+
// Inline function 'kotlin.collections.map' call
|
|
1281
|
+
var this_1 = file.d1o_1;
|
|
1282
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1283
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1284
|
+
var _iterator__ex2g4s_1 = this_1.t();
|
|
1285
|
+
while (_iterator__ex2g4s_1.u()) {
|
|
1286
|
+
var item_0 = _iterator__ex2g4s_1.v();
|
|
1287
|
+
var tmp;
|
|
1288
|
+
if (item_0 instanceof Namespace) {
|
|
1289
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1290
|
+
var tmp0 = item_0.j1o_1;
|
|
1291
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1292
|
+
var destination_1 = ArrayList_init_$Create$_0();
|
|
1293
|
+
var _iterator__ex2g4s_2 = tmp0.t();
|
|
1294
|
+
while (_iterator__ex2g4s_2.u()) {
|
|
1295
|
+
var element = _iterator__ex2g4s_2.v();
|
|
1296
|
+
var tmp_0;
|
|
1297
|
+
if (element instanceof Struct) {
|
|
1298
|
+
tmp_0 = listOf_0([new RawElement('#[derive(Debug, Clone, Default, PartialEq)]'), element]);
|
|
1299
|
+
} else {
|
|
1300
|
+
tmp_0 = listOf(element);
|
|
1301
|
+
}
|
|
1302
|
+
var list_0 = tmp_0;
|
|
1303
|
+
addAll(destination_1, list_0);
|
|
1304
|
+
}
|
|
1305
|
+
tmp = item_0.n1o(VOID, destination_1);
|
|
1306
|
+
} else {
|
|
1307
|
+
tmp = item_0;
|
|
1308
|
+
}
|
|
1309
|
+
var tmp$ret$8 = tmp;
|
|
1310
|
+
destination_0.x(tmp$ret$8);
|
|
1311
|
+
}
|
|
1312
|
+
return file.g1o(VOID, plus(rpcImports, destination_0));
|
|
1313
|
+
};
|
|
1314
|
+
protoOf(RustIrEmitter).v1w = function (endpoint) {
|
|
1315
|
+
var endpointName = endpoint.kq_1.m1();
|
|
1256
1316
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1257
1317
|
var clientName = endpointName + 'Client';
|
|
1258
1318
|
var methodName = toSnakeCase(this, endpointName);
|
|
@@ -1267,7 +1327,7 @@ protoOf(RustIrEmitter).l1w = function (endpoint) {
|
|
|
1267
1327
|
var _iterator__ex2g4s = this_0.t();
|
|
1268
1328
|
while (_iterator__ex2g4s.u()) {
|
|
1269
1329
|
var e = _iterator__ex2g4s.v();
|
|
1270
|
-
var key = e.
|
|
1330
|
+
var key = e.lv_1;
|
|
1271
1331
|
if (set.x(key)) {
|
|
1272
1332
|
list.x(e);
|
|
1273
1333
|
}
|
|
@@ -1278,7 +1338,7 @@ protoOf(RustIrEmitter).l1w = function (endpoint) {
|
|
|
1278
1338
|
var _iterator__ex2g4s_0 = list.t();
|
|
1279
1339
|
while (_iterator__ex2g4s_0.u()) {
|
|
1280
1340
|
var item = _iterator__ex2g4s_0.v();
|
|
1281
|
-
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1341
|
+
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.lv_1), item.lv_1);
|
|
1282
1342
|
destination.x(tmp$ret$2);
|
|
1283
1343
|
}
|
|
1284
1344
|
var modelImports = destination;
|
|
@@ -1301,8 +1361,8 @@ protoOf(RustIrEmitter).l1w = function (endpoint) {
|
|
|
1301
1361
|
this_1.x('}');
|
|
1302
1362
|
var tmp$ret$8 = this_1.p5();
|
|
1303
1363
|
var code = joinToString(tmp$ret$8, '\n');
|
|
1304
|
-
var subPackageName = plus_2(this.
|
|
1305
|
-
var tmp = Companion_getInstance().
|
|
1364
|
+
var subPackageName = plus_2(this.t1y_1, 'client');
|
|
1365
|
+
var tmp = Companion_getInstance().h1h(subPackageName.ls() + toSnakeCase(this, clientName));
|
|
1306
1366
|
// Inline function 'kotlin.collections.buildList' call
|
|
1307
1367
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1308
1368
|
// Inline function 'kotlin.apply' call
|
|
@@ -1314,8 +1374,8 @@ protoOf(RustIrEmitter).l1w = function (endpoint) {
|
|
|
1314
1374
|
var tmp$ret$12 = this_2.p5();
|
|
1315
1375
|
return new File(tmp, tmp$ret$12);
|
|
1316
1376
|
};
|
|
1317
|
-
protoOf(RustIrEmitter).
|
|
1318
|
-
logger.
|
|
1377
|
+
protoOf(RustIrEmitter).s1w = function (endpoints, logger) {
|
|
1378
|
+
logger.ir('Emitting main Client for ' + endpoints.b1() + ' endpoints');
|
|
1319
1379
|
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitClient$lambda(this));
|
|
1320
1380
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1321
1381
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
@@ -1332,7 +1392,7 @@ protoOf(RustIrEmitter).i1w = function (endpoints, logger) {
|
|
|
1332
1392
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1333
1393
|
while (_iterator__ex2g4s_0.u()) {
|
|
1334
1394
|
var e = _iterator__ex2g4s_0.v();
|
|
1335
|
-
var key = e.
|
|
1395
|
+
var key = e.lv_1;
|
|
1336
1396
|
if (set.x(key)) {
|
|
1337
1397
|
list_0.x(e);
|
|
1338
1398
|
}
|
|
@@ -1359,7 +1419,7 @@ protoOf(RustIrEmitter).i1w = function (endpoints, logger) {
|
|
|
1359
1419
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1360
1420
|
while (_iterator__ex2g4s_2.u()) {
|
|
1361
1421
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1362
|
-
if (element_1.
|
|
1422
|
+
if (element_1.kq_1.m1() === element_0.lv_1) {
|
|
1363
1423
|
tmp$ret$5 = false;
|
|
1364
1424
|
break $l$block_0;
|
|
1365
1425
|
}
|
|
@@ -1376,7 +1436,7 @@ protoOf(RustIrEmitter).i1w = function (endpoints, logger) {
|
|
|
1376
1436
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1377
1437
|
while (_iterator__ex2g4s_3.u()) {
|
|
1378
1438
|
var item = _iterator__ex2g4s_3.v();
|
|
1379
|
-
var tmp$ret$10 = import_0('super::model::' + toSnakeCase(this, item.
|
|
1439
|
+
var tmp$ret$10 = import_0('super::model::' + toSnakeCase(this, item.lv_1), item.lv_1);
|
|
1380
1440
|
destination_1.x(tmp$ret$10);
|
|
1381
1441
|
}
|
|
1382
1442
|
var modelImports = destination_1;
|
|
@@ -1386,9 +1446,9 @@ protoOf(RustIrEmitter).i1w = function (endpoints, logger) {
|
|
|
1386
1446
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1387
1447
|
while (_iterator__ex2g4s_4.u()) {
|
|
1388
1448
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1389
|
-
var endpointModuleName = toSnakeCase(this, element_2.
|
|
1390
|
-
var clientModuleName = toSnakeCase(this, element_2.
|
|
1391
|
-
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.
|
|
1449
|
+
var endpointModuleName = toSnakeCase(this, element_2.kq_1.m1());
|
|
1450
|
+
var clientModuleName = toSnakeCase(this, element_2.kq_1.m1() + 'Client');
|
|
1451
|
+
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.kq_1.m1() + 'Client')]);
|
|
1392
1452
|
addAll(destination_2, list_1);
|
|
1393
1453
|
}
|
|
1394
1454
|
var endpointAndClientImports = destination_2;
|
|
@@ -1398,7 +1458,7 @@ protoOf(RustIrEmitter).i1w = function (endpoints, logger) {
|
|
|
1398
1458
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1399
1459
|
while (_iterator__ex2g4s_5.u()) {
|
|
1400
1460
|
var element_3 = _iterator__ex2g4s_5.v();
|
|
1401
|
-
var endpointName = element_3.
|
|
1461
|
+
var endpointName = element_3.kq_1.m1();
|
|
1402
1462
|
var endpointModuleName_0 = toSnakeCase(this, endpointName);
|
|
1403
1463
|
var namespacePath = endpointModuleName_0 + '::' + endpointName;
|
|
1404
1464
|
var methodName = toSnakeCase(this, endpointName);
|
|
@@ -1411,7 +1471,7 @@ protoOf(RustIrEmitter).i1w = function (endpoints, logger) {
|
|
|
1411
1471
|
}
|
|
1412
1472
|
var implBlocks = destination_3;
|
|
1413
1473
|
var code = joinToString(plus(listOf_0(['pub struct Client<S: Serialization, T: Transportation> {', ' pub serialization: S,', ' pub transportation: T,', '}']), implBlocks), '\n');
|
|
1414
|
-
var tmp_0 = Companion_getInstance().
|
|
1474
|
+
var tmp_0 = Companion_getInstance().h1h(this.t1y_1.ls() + 'client');
|
|
1415
1475
|
// Inline function 'kotlin.collections.buildList' call
|
|
1416
1476
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1417
1477
|
// Inline function 'kotlin.apply' call
|
|
@@ -1439,8 +1499,8 @@ function fixResponseSwitchPatterns() {
|
|
|
1439
1499
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1440
1500
|
// Inline function 'kotlin.apply' call
|
|
1441
1501
|
var this_0 = new TransformerBuilder();
|
|
1442
|
-
this_0.
|
|
1443
|
-
return this_0.
|
|
1502
|
+
this_0.h1w(fixResponseSwitchPatterns$lambda);
|
|
1503
|
+
return this_0.v1i();
|
|
1444
1504
|
}
|
|
1445
1505
|
function buildModelImports(_this__u8e3s4) {
|
|
1446
1506
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1451,7 +1511,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1451
1511
|
var _iterator__ex2g4s = this_0.t();
|
|
1452
1512
|
while (_iterator__ex2g4s.u()) {
|
|
1453
1513
|
var e = _iterator__ex2g4s.v();
|
|
1454
|
-
var key = e.
|
|
1514
|
+
var key = e.lv_1;
|
|
1455
1515
|
if (set.x(key)) {
|
|
1456
1516
|
list.x(e);
|
|
1457
1517
|
}
|
|
@@ -1462,7 +1522,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1462
1522
|
var _iterator__ex2g4s_0 = list.t();
|
|
1463
1523
|
while (_iterator__ex2g4s_0.u()) {
|
|
1464
1524
|
var item = _iterator__ex2g4s_0.v();
|
|
1465
|
-
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.
|
|
1525
|
+
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.lv_1), Companion_getInstance().h1h(item.lv_1).i1h());
|
|
1466
1526
|
destination.x(tmp$ret$2);
|
|
1467
1527
|
}
|
|
1468
1528
|
return destination;
|
|
@@ -1474,14 +1534,14 @@ function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
1474
1534
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1475
1535
|
var tmp = scope;
|
|
1476
1536
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1477
|
-
var this_0 = scope.
|
|
1537
|
+
var this_0 = scope.a1w_1;
|
|
1478
1538
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1479
1539
|
// Inline function 'kotlin.apply' call
|
|
1480
1540
|
var this_1 = new TransformerBuilder();
|
|
1481
|
-
this_1.
|
|
1482
|
-
var tmp$ret$2 = this_1.
|
|
1483
|
-
tmp.
|
|
1484
|
-
var tmp_0 = scope.
|
|
1541
|
+
this_1.u1i(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1542
|
+
var tmp$ret$2 = this_1.v1i();
|
|
1543
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
1544
|
+
var tmp_0 = scope.a1w_1;
|
|
1485
1545
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1486
1546
|
}
|
|
1487
1547
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
@@ -1491,14 +1551,14 @@ function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
|
1491
1551
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1492
1552
|
var tmp = scope;
|
|
1493
1553
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1494
|
-
var this_0 = scope.
|
|
1554
|
+
var this_0 = scope.a1w_1;
|
|
1495
1555
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1496
1556
|
// Inline function 'kotlin.apply' call
|
|
1497
1557
|
var this_1 = new TransformerBuilder();
|
|
1498
|
-
this_1.
|
|
1499
|
-
var tmp$ret$2 = this_1.
|
|
1500
|
-
tmp.
|
|
1501
|
-
var tmp_0 = scope.
|
|
1558
|
+
this_1.u1i(injectApiStruct$lambda(endpoint));
|
|
1559
|
+
var tmp$ret$2 = this_1.v1i();
|
|
1560
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
1561
|
+
var tmp_0 = scope.a1w_1;
|
|
1502
1562
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1503
1563
|
}
|
|
1504
1564
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
@@ -1508,14 +1568,14 @@ function injectResponseFromImpls(_this__u8e3s4) {
|
|
|
1508
1568
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1509
1569
|
var tmp = scope;
|
|
1510
1570
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1511
|
-
var this_0 = scope.
|
|
1571
|
+
var this_0 = scope.a1w_1;
|
|
1512
1572
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1513
1573
|
// Inline function 'kotlin.apply' call
|
|
1514
1574
|
var this_1 = new TransformerBuilder();
|
|
1515
|
-
this_1.
|
|
1516
|
-
var tmp$ret$2 = this_1.
|
|
1517
|
-
tmp.
|
|
1518
|
-
var tmp_0 = scope.
|
|
1575
|
+
this_1.u1i(injectResponseFromImpls$lambda);
|
|
1576
|
+
var tmp$ret$2 = this_1.v1i();
|
|
1577
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
1578
|
+
var tmp_0 = scope.a1w_1;
|
|
1519
1579
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1520
1580
|
}
|
|
1521
1581
|
function injectHandlerImplForClient(_this__u8e3s4) {
|
|
@@ -1525,14 +1585,14 @@ function injectHandlerImplForClient(_this__u8e3s4) {
|
|
|
1525
1585
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1526
1586
|
var tmp = scope;
|
|
1527
1587
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1528
|
-
var this_0 = scope.
|
|
1588
|
+
var this_0 = scope.a1w_1;
|
|
1529
1589
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1530
1590
|
// Inline function 'kotlin.apply' call
|
|
1531
1591
|
var this_1 = new TransformerBuilder();
|
|
1532
|
-
this_1.
|
|
1533
|
-
var tmp$ret$2 = this_1.
|
|
1534
|
-
tmp.
|
|
1535
|
-
var tmp_0 = scope.
|
|
1592
|
+
this_1.u1i(injectHandlerImplForClient$lambda);
|
|
1593
|
+
var tmp$ret$2 = this_1.v1i();
|
|
1594
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
1595
|
+
var tmp_0 = scope.a1w_1;
|
|
1536
1596
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1537
1597
|
}
|
|
1538
1598
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
@@ -1542,14 +1602,14 @@ function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
|
1542
1602
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1543
1603
|
var tmp = scope;
|
|
1544
1604
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1545
|
-
var this_0 = scope.
|
|
1605
|
+
var this_0 = scope.a1w_1;
|
|
1546
1606
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1547
1607
|
// Inline function 'kotlin.apply' call
|
|
1548
1608
|
var this_1 = new TransformerBuilder();
|
|
1549
|
-
this_1.
|
|
1550
|
-
var tmp$ret$2 = this_1.
|
|
1551
|
-
tmp.
|
|
1552
|
-
var tmp_0 = scope.
|
|
1609
|
+
this_1.u1i(injectSelfToHandlerMethods$lambda);
|
|
1610
|
+
var tmp$ret$2 = this_1.v1i();
|
|
1611
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
1612
|
+
var tmp_0 = scope.a1w_1;
|
|
1553
1613
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1554
1614
|
}
|
|
1555
1615
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
@@ -1559,14 +1619,14 @@ function stripResponseGenerics(_this__u8e3s4) {
|
|
|
1559
1619
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1560
1620
|
var tmp = scope;
|
|
1561
1621
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1562
|
-
var this_0 = scope.
|
|
1622
|
+
var this_0 = scope.a1w_1;
|
|
1563
1623
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1564
1624
|
// Inline function 'kotlin.apply' call
|
|
1565
1625
|
var this_1 = new TransformerBuilder();
|
|
1566
|
-
this_1.
|
|
1567
|
-
var tmp$ret$2 = this_1.
|
|
1568
|
-
tmp.
|
|
1569
|
-
var tmp_0 = scope.
|
|
1626
|
+
this_1.g1w(stripResponseGenerics$lambda);
|
|
1627
|
+
var tmp$ret$2 = this_1.v1i();
|
|
1628
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
1629
|
+
var tmp_0 = scope.a1w_1;
|
|
1570
1630
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1571
1631
|
}
|
|
1572
1632
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
@@ -1576,14 +1636,14 @@ function stripHandlerExtends(_this__u8e3s4) {
|
|
|
1576
1636
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1577
1637
|
var tmp = scope;
|
|
1578
1638
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1579
|
-
var this_0 = scope.
|
|
1639
|
+
var this_0 = scope.a1w_1;
|
|
1580
1640
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1581
1641
|
// Inline function 'kotlin.apply' call
|
|
1582
1642
|
var this_1 = new TransformerBuilder();
|
|
1583
|
-
this_1.
|
|
1584
|
-
var tmp$ret$2 = this_1.
|
|
1585
|
-
tmp.
|
|
1586
|
-
var tmp_0 = scope.
|
|
1643
|
+
this_1.u1i(stripHandlerExtends$lambda);
|
|
1644
|
+
var tmp$ret$2 = this_1.v1i();
|
|
1645
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
1646
|
+
var tmp_0 = scope.a1w_1;
|
|
1587
1647
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1588
1648
|
}
|
|
1589
1649
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
@@ -1591,8 +1651,8 @@ function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
|
1591
1651
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1592
1652
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1593
1653
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1594
|
-
scope.
|
|
1595
|
-
var tmp = scope.
|
|
1654
|
+
scope.j1w(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1655
|
+
var tmp = scope.a1w_1;
|
|
1596
1656
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1597
1657
|
}
|
|
1598
1658
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
@@ -1602,21 +1662,21 @@ function stripWirespecPrefix(_this__u8e3s4) {
|
|
|
1602
1662
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1603
1663
|
var tmp = scope;
|
|
1604
1664
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1605
|
-
var this_0 = scope.
|
|
1665
|
+
var this_0 = scope.a1w_1;
|
|
1606
1666
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1607
1667
|
// Inline function 'kotlin.apply' call
|
|
1608
1668
|
var this_1 = new TransformerBuilder();
|
|
1609
|
-
this_1.
|
|
1610
|
-
var tmp$ret$2 = this_1.
|
|
1611
|
-
tmp.
|
|
1612
|
-
var tmp_0 = scope.
|
|
1669
|
+
this_1.g1w(stripWirespecPrefix$lambda);
|
|
1670
|
+
var tmp$ret$2 = this_1.v1i();
|
|
1671
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
1672
|
+
var tmp_0 = scope.a1w_1;
|
|
1613
1673
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1614
1674
|
}
|
|
1615
1675
|
function flattenForRust(_this__u8e3s4) {
|
|
1616
1676
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1617
1677
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1618
1678
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1619
|
-
var tmp0 = _this__u8e3s4.
|
|
1679
|
+
var tmp0 = _this__u8e3s4.e1o();
|
|
1620
1680
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1621
1681
|
var destination = ArrayList_init_$Create$_0();
|
|
1622
1682
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1629,7 +1689,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1629
1689
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1630
1690
|
var namespace = ensureNotNull(tmp$ret$2);
|
|
1631
1691
|
// Inline function 'kotlin.collections.filter' call
|
|
1632
|
-
var tmp0_0 = namespace.
|
|
1692
|
+
var tmp0_0 = namespace.j1o_1;
|
|
1633
1693
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1634
1694
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1635
1695
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1654,13 +1714,13 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1654
1714
|
var tmp_0;
|
|
1655
1715
|
var tmp_1;
|
|
1656
1716
|
if (item instanceof Union_0) {
|
|
1657
|
-
tmp_1 = item.
|
|
1717
|
+
tmp_1 = item.i1p_1.i1h() === 'Response';
|
|
1658
1718
|
} else {
|
|
1659
1719
|
tmp_1 = false;
|
|
1660
1720
|
}
|
|
1661
1721
|
if (tmp_1) {
|
|
1662
1722
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1663
|
-
var tmp0_1 = namespace.
|
|
1723
|
+
var tmp0_1 = namespace.j1o_1;
|
|
1664
1724
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1665
1725
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1666
1726
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -1676,7 +1736,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1676
1736
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1677
1737
|
while (_iterator__ex2g4s_3.u()) {
|
|
1678
1738
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1679
|
-
var tmp$ret$8 = item_0.
|
|
1739
|
+
var tmp$ret$8 = item_0.c1q_1.i1h();
|
|
1680
1740
|
destination_3.x(tmp$ret$8);
|
|
1681
1741
|
}
|
|
1682
1742
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -1699,10 +1759,10 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1699
1759
|
destination_5.x(tmp$ret$14);
|
|
1700
1760
|
}
|
|
1701
1761
|
var members = destination_5;
|
|
1702
|
-
tmp_0 = item.
|
|
1762
|
+
tmp_0 = item.o1p(VOID, VOID, members, emptyList());
|
|
1703
1763
|
} else {
|
|
1704
1764
|
if (item instanceof Union_0) {
|
|
1705
|
-
tmp_0 = item.
|
|
1765
|
+
tmp_0 = item.o1p(VOID, VOID, VOID, emptyList());
|
|
1706
1766
|
} else {
|
|
1707
1767
|
tmp_0 = item;
|
|
1708
1768
|
}
|
|
@@ -1712,7 +1772,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1712
1772
|
}
|
|
1713
1773
|
var moduleElements = destination_1;
|
|
1714
1774
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1715
|
-
var tmp0_2 = namespace.
|
|
1775
|
+
var tmp0_2 = namespace.j1o_1;
|
|
1716
1776
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1717
1777
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1718
1778
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1729,15 +1789,15 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1729
1789
|
}
|
|
1730
1790
|
}
|
|
1731
1791
|
var classElements = destination_6;
|
|
1732
|
-
return new File(namespace.
|
|
1792
|
+
return new File(namespace.i1o_1, plus_0(moduleElements, new Namespace(namespace.i1o_1, classElements, namespace.k1o_1)));
|
|
1733
1793
|
}
|
|
1734
1794
|
function fixConstructorCalls() {
|
|
1735
1795
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1736
1796
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1737
1797
|
// Inline function 'kotlin.apply' call
|
|
1738
1798
|
var this_0 = new TransformerBuilder();
|
|
1739
|
-
this_0.
|
|
1740
|
-
return this_0.
|
|
1799
|
+
this_0.j1w(fixConstructorCalls$lambda);
|
|
1800
|
+
return this_0.v1i();
|
|
1741
1801
|
}
|
|
1742
1802
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1743
1803
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1748,7 +1808,7 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1748
1808
|
var _iterator__ex2g4s = this_0.t();
|
|
1749
1809
|
while (_iterator__ex2g4s.u()) {
|
|
1750
1810
|
var e = _iterator__ex2g4s.v();
|
|
1751
|
-
var key = e.
|
|
1811
|
+
var key = e.lv_1;
|
|
1752
1812
|
if (set.x(key)) {
|
|
1753
1813
|
list.x(e);
|
|
1754
1814
|
}
|
|
@@ -1759,24 +1819,24 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1759
1819
|
var _iterator__ex2g4s_0 = list.t();
|
|
1760
1820
|
while (_iterator__ex2g4s_0.u()) {
|
|
1761
1821
|
var item = _iterator__ex2g4s_0.v();
|
|
1762
|
-
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.
|
|
1822
|
+
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.lv_1), Companion_getInstance().h1h(item.lv_1).i1h());
|
|
1763
1823
|
destination.x(tmp$ret$2);
|
|
1764
1824
|
}
|
|
1765
1825
|
return destination;
|
|
1766
1826
|
}
|
|
1767
1827
|
function toRustSnakeCase(_this__u8e3s4) {
|
|
1768
1828
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1769
|
-
return Companion_getInstance().
|
|
1829
|
+
return Companion_getInstance().h1h(_this__u8e3s4).z1m();
|
|
1770
1830
|
}
|
|
1771
1831
|
function buildValidateFunction(refined) {
|
|
1772
1832
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1773
|
-
var constraintExpr = convertConstraint(refined.
|
|
1833
|
+
var constraintExpr = convertConstraint(refined.ur_1, new FieldCall(new VariableReference(Companion_getInstance().h1h('self')), Companion_getInstance().h1h('value')));
|
|
1774
1834
|
return function_0('validate', VOID, VOID, buildValidateFunction$lambda(constraintExpr));
|
|
1775
1835
|
}
|
|
1776
1836
|
function buildToStringFunction(refined) {
|
|
1777
1837
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1778
1838
|
var tmp;
|
|
1779
|
-
if (refined.
|
|
1839
|
+
if (refined.ur_1.wt_1 instanceof String_0) {
|
|
1780
1840
|
tmp = 'self.value.clone()';
|
|
1781
1841
|
} else {
|
|
1782
1842
|
tmp = 'format!("{}", self.value)';
|
|
@@ -1791,8 +1851,8 @@ function buildApiStruct(endpoint) {
|
|
|
1791
1851
|
function generateApiStructCode(_this__u8e3s4) {
|
|
1792
1852
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1793
1853
|
// Inline function 'kotlin.let' call
|
|
1794
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
1795
|
-
var methodName = _this__u8e3s4.
|
|
1854
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.mq_1, '/', VOID, VOID, VOID, VOID, generateApiStructCode$lambda);
|
|
1855
|
+
var methodName = _this__u8e3s4.lq_1.b3_1;
|
|
1796
1856
|
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 ');
|
|
1797
1857
|
}
|
|
1798
1858
|
function fixResponseSwitchPatterns$lambda(s, t) {
|
|
@@ -1801,56 +1861,56 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1801
1861
|
if (!(s instanceof Switch)) {
|
|
1802
1862
|
tmp = true;
|
|
1803
1863
|
} else {
|
|
1804
|
-
var tmp0_safe_receiver = s.
|
|
1805
|
-
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1864
|
+
var tmp0_safe_receiver = s.g1r_1;
|
|
1865
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t1m()) === 'r');
|
|
1806
1866
|
}
|
|
1807
1867
|
if (tmp)
|
|
1808
1868
|
return transformChildren(s, t);
|
|
1809
1869
|
// Inline function 'kotlin.collections.map' call
|
|
1810
|
-
var this_0 = s.
|
|
1870
|
+
var this_0 = s.e1r_1;
|
|
1811
1871
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1812
1872
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1813
1873
|
var _iterator__ex2g4s = this_0.t();
|
|
1814
1874
|
while (_iterator__ex2g4s.u()) {
|
|
1815
1875
|
var item = _iterator__ex2g4s.v();
|
|
1816
|
-
var tmp_0 = item.
|
|
1876
|
+
var tmp_0 = item.l1r_1;
|
|
1817
1877
|
var tmp0_safe_receiver_0 = tmp_0 instanceof Custom ? tmp_0 : null;
|
|
1818
|
-
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.
|
|
1819
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1878
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.e1j_1;
|
|
1879
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.i1h();
|
|
1820
1880
|
var tmp_1;
|
|
1821
1881
|
if (!(typeName == null) && get_rustResponsePattern().pc(typeName)) {
|
|
1822
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1882
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.g1r_1).z1m() + ')');
|
|
1823
1883
|
// Inline function 'kotlin.collections.map' call
|
|
1824
|
-
var this_1 = item.
|
|
1884
|
+
var this_1 = item.k1r_1;
|
|
1825
1885
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1826
1886
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1827
1887
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1828
1888
|
while (_iterator__ex2g4s_0.u()) {
|
|
1829
1889
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1830
|
-
var tmp$ret$0 = t.
|
|
1890
|
+
var tmp$ret$0 = t.u1v(item_0);
|
|
1831
1891
|
destination_0.x(tmp$ret$0);
|
|
1832
1892
|
}
|
|
1833
1893
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1834
1894
|
} else {
|
|
1835
|
-
var tmp_3 = t.
|
|
1895
|
+
var tmp_3 = t.v1v(item.j1r_1);
|
|
1836
1896
|
// Inline function 'kotlin.collections.map' call
|
|
1837
|
-
var this_2 = item.
|
|
1897
|
+
var this_2 = item.k1r_1;
|
|
1838
1898
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1839
1899
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1840
1900
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1841
1901
|
while (_iterator__ex2g4s_1.u()) {
|
|
1842
1902
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1843
|
-
var tmp$ret$3 = t.
|
|
1903
|
+
var tmp$ret$3 = t.u1v(item_1);
|
|
1844
1904
|
destination_1.x(tmp$ret$3);
|
|
1845
1905
|
}
|
|
1846
1906
|
var tmp_4 = destination_1;
|
|
1847
|
-
var tmp2_safe_receiver = item.
|
|
1907
|
+
var tmp2_safe_receiver = item.l1r_1;
|
|
1848
1908
|
var tmp_5;
|
|
1849
1909
|
if (tmp2_safe_receiver == null) {
|
|
1850
1910
|
tmp_5 = null;
|
|
1851
1911
|
} else {
|
|
1852
1912
|
// Inline function 'kotlin.let' call
|
|
1853
|
-
tmp_5 = t.
|
|
1913
|
+
tmp_5 = t.s1v(tmp2_safe_receiver);
|
|
1854
1914
|
}
|
|
1855
1915
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1856
1916
|
}
|
|
@@ -1858,13 +1918,13 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1858
1918
|
destination.x(tmp$ret$8);
|
|
1859
1919
|
}
|
|
1860
1920
|
var transformedCases = destination;
|
|
1861
|
-
return s.
|
|
1921
|
+
return s.i1r(t.v1v(s.d1r_1), transformedCases, null);
|
|
1862
1922
|
}
|
|
1863
1923
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1864
1924
|
return function (element, transformer) {
|
|
1865
1925
|
var tmp;
|
|
1866
1926
|
if (element instanceof Struct) {
|
|
1867
|
-
tmp = element.
|
|
1927
|
+
tmp = element.n1q(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1868
1928
|
} else {
|
|
1869
1929
|
tmp = element;
|
|
1870
1930
|
}
|
|
@@ -1876,7 +1936,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1876
1936
|
return function (element, transformer) {
|
|
1877
1937
|
var tmp;
|
|
1878
1938
|
if (element instanceof Namespace) {
|
|
1879
|
-
tmp = element.
|
|
1939
|
+
tmp = element.n1o(VOID, plus(element.j1o_1, listOf(buildApiStruct($endpoint))));
|
|
1880
1940
|
} else {
|
|
1881
1941
|
tmp = element;
|
|
1882
1942
|
}
|
|
@@ -1889,7 +1949,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1889
1949
|
var tmp;
|
|
1890
1950
|
if (element instanceof File) {
|
|
1891
1951
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1892
|
-
var tmp0 = element.
|
|
1952
|
+
var tmp0 = element.d1o_1;
|
|
1893
1953
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1894
1954
|
var destination = ArrayList_init_$Create$_0();
|
|
1895
1955
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1899,26 +1959,26 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1899
1959
|
var tmp_1;
|
|
1900
1960
|
var tmp_2;
|
|
1901
1961
|
if (element_0 instanceof Union_0) {
|
|
1902
|
-
tmp_2 = element_0.
|
|
1962
|
+
tmp_2 = element_0.i1p_1.i1h() === 'Response';
|
|
1903
1963
|
} else {
|
|
1904
1964
|
tmp_2 = false;
|
|
1905
1965
|
}
|
|
1906
1966
|
if (tmp_2) {
|
|
1907
1967
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1908
|
-
tmp_1 = !element_0.
|
|
1968
|
+
tmp_1 = !element_0.k1p_1.r();
|
|
1909
1969
|
} else {
|
|
1910
1970
|
tmp_1 = false;
|
|
1911
1971
|
}
|
|
1912
1972
|
if (tmp_1) {
|
|
1913
1973
|
var tmp_3 = listOf(element_0);
|
|
1914
1974
|
// Inline function 'kotlin.collections.map' call
|
|
1915
|
-
var this_0 = element_0.
|
|
1975
|
+
var this_0 = element_0.k1p_1;
|
|
1916
1976
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1917
1977
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1918
1978
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1919
1979
|
while (_iterator__ex2g4s_0.u()) {
|
|
1920
1980
|
var item = _iterator__ex2g4s_0.v();
|
|
1921
|
-
var memberName = item.
|
|
1981
|
+
var memberName = item.e1j_1.i1h();
|
|
1922
1982
|
var tmp$ret$1 = new RawElement('impl From<' + memberName + '> for Response { fn from(value: ' + memberName + ') -> Self { Response::' + memberName + '(value) } }\n');
|
|
1923
1983
|
destination_0.x(tmp$ret$1);
|
|
1924
1984
|
}
|
|
@@ -1929,7 +1989,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1929
1989
|
var list = tmp_0;
|
|
1930
1990
|
addAll(destination, list);
|
|
1931
1991
|
}
|
|
1932
|
-
tmp = element.
|
|
1992
|
+
tmp = element.g1o(VOID, destination);
|
|
1933
1993
|
} else {
|
|
1934
1994
|
tmp = element;
|
|
1935
1995
|
}
|
|
@@ -1943,7 +2003,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1943
2003
|
var tmp$ret$4;
|
|
1944
2004
|
$l$block_1: {
|
|
1945
2005
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1946
|
-
var tmp0 = element.
|
|
2006
|
+
var tmp0 = element.j1o_1;
|
|
1947
2007
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1948
2008
|
var destination = ArrayList_init_$Create$_0();
|
|
1949
2009
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1959,7 +2019,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1959
2019
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1960
2020
|
while (_iterator__ex2g4s_0.u()) {
|
|
1961
2021
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
1962
|
-
if (element_1.
|
|
2022
|
+
if (element_1.o1o_1.equals(Companion_getInstance().h1h('Handler'))) {
|
|
1963
2023
|
tmp$ret$3 = element_1;
|
|
1964
2024
|
break $l$block;
|
|
1965
2025
|
}
|
|
@@ -1976,7 +2036,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1976
2036
|
}
|
|
1977
2037
|
var handler = tmp_0;
|
|
1978
2038
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1979
|
-
var tmp0_0 = handler.
|
|
2039
|
+
var tmp0_0 = handler.p1o_1;
|
|
1980
2040
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1981
2041
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1982
2042
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
@@ -1995,8 +2055,8 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1995
2055
|
tmp_1 = tmp1_elvis_lhs;
|
|
1996
2056
|
}
|
|
1997
2057
|
var method = tmp_1;
|
|
1998
|
-
var methodName = method.
|
|
1999
|
-
tmp$ret$4 = element.
|
|
2058
|
+
var methodName = method.e1l_1.z1m();
|
|
2059
|
+
tmp$ret$4 = element.n1o(VOID, plus(element.j1o_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 ')))));
|
|
2000
2060
|
}
|
|
2001
2061
|
tmp = tmp$ret$4;
|
|
2002
2062
|
} else {
|
|
@@ -2011,7 +2071,7 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2011
2071
|
if (element instanceof Interface) {
|
|
2012
2072
|
var tmp$ret$0;
|
|
2013
2073
|
$l$block: {
|
|
2014
|
-
if (!element.
|
|
2074
|
+
if (!element.o1o_1.equals(Companion_getInstance().h1h('Handler')) && !element.o1o_1.equals(Companion_getInstance().h1h('Call'))) {
|
|
2015
2075
|
tmp$ret$0 = element;
|
|
2016
2076
|
break $l$block;
|
|
2017
2077
|
}
|
|
@@ -2020,14 +2080,14 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2020
2080
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
2021
2081
|
var tmp_0 = scope;
|
|
2022
2082
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
2023
|
-
var this_0 = scope.
|
|
2083
|
+
var this_0 = scope.a1w_1;
|
|
2024
2084
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2025
2085
|
// Inline function 'kotlin.apply' call
|
|
2026
2086
|
var this_1 = new TransformerBuilder();
|
|
2027
|
-
this_1.
|
|
2028
|
-
var tmp$ret$3 = this_1.
|
|
2029
|
-
tmp_0.
|
|
2030
|
-
var tmp_1 = scope.
|
|
2087
|
+
this_1.u1i(injectSelfToHandlerMethods$lambda$lambda);
|
|
2088
|
+
var tmp$ret$3 = this_1.v1i();
|
|
2089
|
+
tmp_0.a1w_1 = transform(this_0, tmp$ret$3);
|
|
2090
|
+
var tmp_1 = scope.a1w_1;
|
|
2031
2091
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2032
2092
|
}
|
|
2033
2093
|
tmp = tmp$ret$0;
|
|
@@ -2041,7 +2101,7 @@ function injectSelfToHandlerMethods$lambda$lambda(element, transformer) {
|
|
|
2041
2101
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2042
2102
|
var tmp;
|
|
2043
2103
|
if (element instanceof Function_0) {
|
|
2044
|
-
tmp = element.
|
|
2104
|
+
tmp = element.p1l(Companion_getInstance().h1h(element.e1l_1.z1m()), VOID, plus(listOf(get_rustSelfParam()), element.g1l_1));
|
|
2045
2105
|
} else {
|
|
2046
2106
|
tmp = element;
|
|
2047
2107
|
}
|
|
@@ -2054,14 +2114,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2054
2114
|
if (type instanceof Custom) {
|
|
2055
2115
|
var tmp_0;
|
|
2056
2116
|
var tmp_1;
|
|
2057
|
-
if (startsWith(type.
|
|
2117
|
+
if (startsWith(type.e1j_1.i1h(), 'Response')) {
|
|
2058
2118
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2059
|
-
tmp_1 = !type.
|
|
2119
|
+
tmp_1 = !type.f1j_1.r();
|
|
2060
2120
|
} else {
|
|
2061
2121
|
tmp_1 = false;
|
|
2062
2122
|
}
|
|
2063
2123
|
if (tmp_1) {
|
|
2064
|
-
tmp_0 = type.
|
|
2124
|
+
tmp_0 = type.p1n(VOID, emptyList());
|
|
2065
2125
|
} else {
|
|
2066
2126
|
tmp_0 = type;
|
|
2067
2127
|
}
|
|
@@ -2076,7 +2136,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2076
2136
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2077
2137
|
var tmp;
|
|
2078
2138
|
if (element instanceof Interface) {
|
|
2079
|
-
tmp = element.
|
|
2139
|
+
tmp = element.o1o_1.equals(Companion_getInstance().h1h('Handler')) || element.o1o_1.equals(Companion_getInstance().h1h('Call')) ? element.w1o(VOID, VOID, emptyList()) : element;
|
|
2080
2140
|
} else {
|
|
2081
2141
|
tmp = element;
|
|
2082
2142
|
}
|
|
@@ -2089,17 +2149,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2089
2149
|
var tmp_0;
|
|
2090
2150
|
var tmp_1;
|
|
2091
2151
|
if (s instanceof RawExpression) {
|
|
2092
|
-
tmp_1 = $identifierPattern.pc(s.
|
|
2152
|
+
tmp_1 = $identifierPattern.pc(s.r1q_1);
|
|
2093
2153
|
} else {
|
|
2094
2154
|
tmp_1 = false;
|
|
2095
2155
|
}
|
|
2096
2156
|
if (tmp_1) {
|
|
2097
|
-
tmp_0 = !contains(s.
|
|
2157
|
+
tmp_0 = !contains(s.r1q_1, '.');
|
|
2098
2158
|
} else {
|
|
2099
2159
|
tmp_0 = false;
|
|
2100
2160
|
}
|
|
2101
2161
|
if (tmp_0) {
|
|
2102
|
-
tmp = new VariableReference(Companion_getInstance().
|
|
2162
|
+
tmp = new VariableReference(Companion_getInstance().h1h(s.r1q_1));
|
|
2103
2163
|
} else {
|
|
2104
2164
|
tmp = transformChildren(s, t);
|
|
2105
2165
|
}
|
|
@@ -2110,10 +2170,10 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2110
2170
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2111
2171
|
var tmp;
|
|
2112
2172
|
if (type instanceof Custom) {
|
|
2113
|
-
var pascalName = type.
|
|
2173
|
+
var pascalName = type.e1j_1.i1h();
|
|
2114
2174
|
var tmp_0;
|
|
2115
2175
|
if (startsWith(pascalName, 'Wirespec.')) {
|
|
2116
|
-
tmp_0 = type.
|
|
2176
|
+
tmp_0 = type.p1n(Companion_getInstance().h1h(removePrefix(pascalName, 'Wirespec.')));
|
|
2117
2177
|
} else {
|
|
2118
2178
|
tmp_0 = type;
|
|
2119
2179
|
}
|
|
@@ -2128,12 +2188,12 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2128
2188
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2129
2189
|
if (!(s instanceof ConstructorStatement))
|
|
2130
2190
|
return transformChildren(s, t);
|
|
2131
|
-
var tmp = s.
|
|
2191
|
+
var tmp = s.y1n_1;
|
|
2132
2192
|
var tmp0_safe_receiver = tmp instanceof Custom ? tmp : null;
|
|
2133
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2134
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
2193
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e1j_1;
|
|
2194
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.i1h();
|
|
2135
2195
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2136
|
-
var this_0 = s.
|
|
2196
|
+
var this_0 = s.z1n_1;
|
|
2137
2197
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2138
2198
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.b1()));
|
|
2139
2199
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -2141,25 +2201,25 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2141
2201
|
while (_iterator__ex2g4s.u()) {
|
|
2142
2202
|
var element = _iterator__ex2g4s.v();
|
|
2143
2203
|
var tmp_0 = element.l1();
|
|
2144
|
-
var tmp$ret$1 = t.
|
|
2204
|
+
var tmp$ret$1 = t.v1v(element.m1());
|
|
2145
2205
|
destination.t2(tmp_0, tmp$ret$1);
|
|
2146
2206
|
}
|
|
2147
2207
|
var transformedArgs = destination;
|
|
2148
|
-
return !(typeName == null) && get_rustResponsePattern().pc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().
|
|
2208
|
+
return !(typeName == null) && get_rustResponsePattern().pc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().h1h('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);
|
|
2149
2209
|
}
|
|
2150
2210
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2151
2211
|
return function ($this$function) {
|
|
2152
|
-
$this$function.
|
|
2153
|
-
$this$function.
|
|
2154
|
-
$this$function.
|
|
2212
|
+
$this$function.v1h('&self', Custom_init_$Create$(''));
|
|
2213
|
+
$this$function.y1h(Boolean_instance);
|
|
2214
|
+
$this$function.z1h($constraintExpr);
|
|
2155
2215
|
return Unit_instance;
|
|
2156
2216
|
};
|
|
2157
2217
|
}
|
|
2158
2218
|
function buildToStringFunction$lambda($expr) {
|
|
2159
2219
|
return function ($this$function) {
|
|
2160
|
-
$this$function.
|
|
2161
|
-
$this$function.
|
|
2162
|
-
$this$function.
|
|
2220
|
+
$this$function.v1h('&self', Custom_init_$Create$(''));
|
|
2221
|
+
$this$function.y1h(String_instance);
|
|
2222
|
+
$this$function.z1h(new RawExpression($expr));
|
|
2163
2223
|
return Unit_instance;
|
|
2164
2224
|
};
|
|
2165
2225
|
}
|
|
@@ -2167,10 +2227,10 @@ function generateApiStructCode$lambda(segment) {
|
|
|
2167
2227
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2168
2228
|
var tmp;
|
|
2169
2229
|
if (segment instanceof Literal) {
|
|
2170
|
-
tmp = segment.
|
|
2230
|
+
tmp = segment.bu_1;
|
|
2171
2231
|
} else {
|
|
2172
2232
|
if (segment instanceof Param) {
|
|
2173
|
-
tmp = '{' + segment.
|
|
2233
|
+
tmp = '{' + segment.rq_1.m1() + '}';
|
|
2174
2234
|
} else {
|
|
2175
2235
|
noWhenBranchMatchedException();
|
|
2176
2236
|
}
|
|
@@ -2181,39 +2241,39 @@ var properties_initialized_RustIrTransformer_kt_hr6k9w;
|
|
|
2181
2241
|
function _init_properties_RustIrTransformer_kt__rrvmwq() {
|
|
2182
2242
|
if (!properties_initialized_RustIrTransformer_kt_hr6k9w) {
|
|
2183
2243
|
properties_initialized_RustIrTransformer_kt_hr6k9w = true;
|
|
2184
|
-
rustSelfParam = new Parameter(Companion_getInstance().
|
|
2244
|
+
rustSelfParam = new Parameter(Companion_getInstance().h1h('&self'), Custom_init_$Create$(''));
|
|
2185
2245
|
rustResponsePattern = Regex_init_$Create$('Response(\\d+|Default)');
|
|
2186
2246
|
}
|
|
2187
2247
|
}
|
|
2188
2248
|
function borrowParamsOf($this, fn) {
|
|
2189
2249
|
// Inline function 'kotlin.collections.map' call
|
|
2190
|
-
var this_0 = fn.
|
|
2250
|
+
var this_0 = fn.g1l_1;
|
|
2191
2251
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2192
2252
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2193
2253
|
var _iterator__ex2g4s = this_0.t();
|
|
2194
2254
|
while (_iterator__ex2g4s.u()) {
|
|
2195
2255
|
var item = _iterator__ex2g4s.v();
|
|
2196
2256
|
var tmp;
|
|
2197
|
-
if (RustTransform_getInstance().
|
|
2257
|
+
if (RustTransform_getInstance().j1z(item.s1r_1)) {
|
|
2198
2258
|
tmp = item;
|
|
2199
2259
|
} else {
|
|
2200
|
-
tmp = item.
|
|
2260
|
+
tmp = item.w1r(VOID, applyBorrowRule(RustTransform_getInstance(), item.t1r_1));
|
|
2201
2261
|
}
|
|
2202
2262
|
var tmp$ret$0 = tmp;
|
|
2203
2263
|
destination.x(tmp$ret$0);
|
|
2204
2264
|
}
|
|
2205
|
-
return fn.
|
|
2265
|
+
return fn.p1l(VOID, VOID, destination);
|
|
2206
2266
|
}
|
|
2207
2267
|
function applyBorrowRule($this, type) {
|
|
2208
2268
|
var tmp;
|
|
2209
2269
|
if (type instanceof Nullable) {
|
|
2210
|
-
tmp = new Nullable(applyBorrowRule($this, type.
|
|
2270
|
+
tmp = new Nullable(applyBorrowRule($this, type.c1j_1));
|
|
2211
2271
|
} else {
|
|
2212
2272
|
if (equals(type, String_instance)) {
|
|
2213
2273
|
tmp = Custom_init_$Create$('&str');
|
|
2214
2274
|
} else {
|
|
2215
2275
|
if (type instanceof Custom) {
|
|
2216
|
-
tmp = $this.
|
|
2276
|
+
tmp = $this.m1z(type) ? type : $this.l1z(type) ? borrowImpl(type) : $this.k1z(type) ? ownedImpl(type) : type;
|
|
2217
2277
|
} else {
|
|
2218
2278
|
tmp = type;
|
|
2219
2279
|
}
|
|
@@ -2225,15 +2285,15 @@ function toBorrowedRaw($this, _this__u8e3s4) {
|
|
|
2225
2285
|
return new RawExpression('&' + toRawCode($this, _this__u8e3s4));
|
|
2226
2286
|
}
|
|
2227
2287
|
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
2228
|
-
return Companion_getInstance_0().
|
|
2288
|
+
return Companion_getInstance_0().v1x().v1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
2229
2289
|
}
|
|
2230
2290
|
function toRawCode($this, _this__u8e3s4) {
|
|
2231
2291
|
var tmp;
|
|
2232
2292
|
if (_this__u8e3s4 instanceof VariableReference) {
|
|
2233
|
-
tmp = sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2293
|
+
tmp = sanitizeKeywords_0($this, _this__u8e3s4.b1o_1.z1m());
|
|
2234
2294
|
} else {
|
|
2235
2295
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
2236
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
2296
|
+
var tmp1_safe_receiver = _this__u8e3s4.o1r_1;
|
|
2237
2297
|
var tmp_0;
|
|
2238
2298
|
if (tmp1_safe_receiver == null) {
|
|
2239
2299
|
tmp_0 = null;
|
|
@@ -2243,20 +2303,20 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2243
2303
|
}
|
|
2244
2304
|
var tmp2_elvis_lhs = tmp_0;
|
|
2245
2305
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2246
|
-
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2306
|
+
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.p1r_1.z1m());
|
|
2247
2307
|
} else {
|
|
2248
2308
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
2249
|
-
var tmp_1 = _this__u8e3s4.
|
|
2309
|
+
var tmp_1 = _this__u8e3s4.g1s_1;
|
|
2250
2310
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2251
2311
|
var tmp_2;
|
|
2252
2312
|
var tmp_3;
|
|
2253
2313
|
if (!(lit == null)) {
|
|
2254
2314
|
var tmp_4;
|
|
2255
|
-
var tmp_5 = lit.
|
|
2315
|
+
var tmp_5 = lit.a1r_1;
|
|
2256
2316
|
if (tmp_5 instanceof Integer) {
|
|
2257
2317
|
tmp_4 = true;
|
|
2258
2318
|
} else {
|
|
2259
|
-
var tmp_6 = lit.
|
|
2319
|
+
var tmp_6 = lit.a1r_1;
|
|
2260
2320
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2261
2321
|
}
|
|
2262
2322
|
tmp_3 = tmp_4;
|
|
@@ -2264,31 +2324,31 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2264
2324
|
tmp_3 = false;
|
|
2265
2325
|
}
|
|
2266
2326
|
if (tmp_3) {
|
|
2267
|
-
tmp_2 = toString_0(lit.
|
|
2327
|
+
tmp_2 = toString_0(lit.z1q_1);
|
|
2268
2328
|
} else {
|
|
2269
2329
|
var tmp_7;
|
|
2270
2330
|
if (!(lit == null)) {
|
|
2271
|
-
var tmp_8 = lit.
|
|
2331
|
+
var tmp_8 = lit.a1r_1;
|
|
2272
2332
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2273
2333
|
} else {
|
|
2274
2334
|
tmp_7 = false;
|
|
2275
2335
|
}
|
|
2276
2336
|
if (tmp_7) {
|
|
2277
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2337
|
+
tmp_2 = '"' + toString_0(lit.z1q_1) + '"';
|
|
2278
2338
|
} else {
|
|
2279
|
-
tmp_2 = toRawCode($this, _this__u8e3s4.
|
|
2339
|
+
tmp_2 = toRawCode($this, _this__u8e3s4.g1s_1);
|
|
2280
2340
|
}
|
|
2281
2341
|
}
|
|
2282
2342
|
var idx = tmp_2;
|
|
2283
|
-
tmp = toRawCode($this, _this__u8e3s4.
|
|
2343
|
+
tmp = toRawCode($this, _this__u8e3s4.f1s_1) + '[' + idx + ']';
|
|
2284
2344
|
} else {
|
|
2285
2345
|
if (_this__u8e3s4 instanceof ConstructorStatement) {
|
|
2286
|
-
var tmp_9 = _this__u8e3s4.
|
|
2346
|
+
var tmp_9 = _this__u8e3s4.y1n_1;
|
|
2287
2347
|
var tmp3_safe_receiver = tmp_9 instanceof Custom ? tmp_9 : null;
|
|
2288
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
2289
|
-
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
2290
|
-
var typeName = tmp5_elvis_lhs == null ? toString_0(_this__u8e3s4.
|
|
2291
|
-
var tmp_10 = _this__u8e3s4.
|
|
2348
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.e1j_1;
|
|
2349
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.i1h();
|
|
2350
|
+
var typeName = tmp5_elvis_lhs == null ? toString_0(_this__u8e3s4.y1n_1) : tmp5_elvis_lhs;
|
|
2351
|
+
var tmp_10 = _this__u8e3s4.z1n_1.k1();
|
|
2292
2352
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2293
2353
|
var tmp_11;
|
|
2294
2354
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2301,23 +2361,23 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2301
2361
|
} else {
|
|
2302
2362
|
if (_this__u8e3s4 instanceof Literal_0) {
|
|
2303
2363
|
var tmp_12;
|
|
2304
|
-
var tmp_13 = _this__u8e3s4.
|
|
2364
|
+
var tmp_13 = _this__u8e3s4.a1r_1;
|
|
2305
2365
|
if (tmp_13 instanceof String_1) {
|
|
2306
|
-
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.
|
|
2366
|
+
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.z1q_1) + '")';
|
|
2307
2367
|
} else {
|
|
2308
|
-
var tmp_14 = _this__u8e3s4.
|
|
2368
|
+
var tmp_14 = _this__u8e3s4.a1r_1;
|
|
2309
2369
|
if (tmp_14 instanceof Boolean_0) {
|
|
2310
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2370
|
+
tmp_12 = toString_0(_this__u8e3s4.z1q_1);
|
|
2311
2371
|
} else {
|
|
2312
|
-
var tmp_15 = _this__u8e3s4.
|
|
2372
|
+
var tmp_15 = _this__u8e3s4.a1r_1;
|
|
2313
2373
|
if (tmp_15 instanceof Integer) {
|
|
2314
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2374
|
+
tmp_12 = toString_0(_this__u8e3s4.z1q_1);
|
|
2315
2375
|
} else {
|
|
2316
|
-
var tmp_16 = _this__u8e3s4.
|
|
2376
|
+
var tmp_16 = _this__u8e3s4.a1r_1;
|
|
2317
2377
|
if (tmp_16 instanceof Number_0) {
|
|
2318
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2378
|
+
tmp_12 = toString_0(_this__u8e3s4.z1q_1);
|
|
2319
2379
|
} else {
|
|
2320
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2380
|
+
tmp_12 = toString_0(_this__u8e3s4.z1q_1);
|
|
2321
2381
|
}
|
|
2322
2382
|
}
|
|
2323
2383
|
}
|
|
@@ -2325,7 +2385,7 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2325
2385
|
tmp = tmp_12;
|
|
2326
2386
|
} else {
|
|
2327
2387
|
if (_this__u8e3s4 instanceof RawExpression) {
|
|
2328
|
-
tmp = _this__u8e3s4.
|
|
2388
|
+
tmp = _this__u8e3s4.r1q_1;
|
|
2329
2389
|
} else {
|
|
2330
2390
|
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression(_this__u8e3s4).o();
|
|
2331
2391
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
@@ -2370,11 +2430,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2370
2430
|
var tmp;
|
|
2371
2431
|
if (element instanceof Interface) {
|
|
2372
2432
|
var tmp_0;
|
|
2373
|
-
if (element.
|
|
2433
|
+
if (element.o1o_1.equals(Companion_getInstance().h1h('Call'))) {
|
|
2374
2434
|
tmp_0 = element;
|
|
2375
2435
|
} else {
|
|
2376
2436
|
// Inline function 'kotlin.collections.map' call
|
|
2377
|
-
var this_0 = element.
|
|
2437
|
+
var this_0 = element.p1o_1;
|
|
2378
2438
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2379
2439
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2380
2440
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2390,7 +2450,7 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2390
2450
|
destination.x(tmp$ret$0);
|
|
2391
2451
|
}
|
|
2392
2452
|
var borrowed = destination;
|
|
2393
|
-
tmp_0 = transformChildren_0(element.
|
|
2453
|
+
tmp_0 = transformChildren_0(element.w1o(VOID, borrowed), tr);
|
|
2394
2454
|
}
|
|
2395
2455
|
tmp = tmp_0;
|
|
2396
2456
|
} else {
|
|
@@ -2406,13 +2466,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2406
2466
|
var tmp;
|
|
2407
2467
|
var tmp_0;
|
|
2408
2468
|
if (s instanceof FunctionCall) {
|
|
2409
|
-
tmp_0 = RustTransform_getInstance().
|
|
2469
|
+
tmp_0 = RustTransform_getInstance().f1z_1.v1(s.d1n_1.z1m());
|
|
2410
2470
|
} else {
|
|
2411
2471
|
tmp_0 = false;
|
|
2412
2472
|
}
|
|
2413
2473
|
if (tmp_0) {
|
|
2414
2474
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2415
|
-
var this_0 = s.
|
|
2475
|
+
var this_0 = s.e1n_1.k1();
|
|
2416
2476
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2417
2477
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2418
2478
|
var index = 0;
|
|
@@ -2426,13 +2486,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2426
2486
|
var key = item.l1();
|
|
2427
2487
|
// Inline function 'kotlin.collections.component2' call
|
|
2428
2488
|
var value = item.m1();
|
|
2429
|
-
var transformed = t.
|
|
2489
|
+
var transformed = t.v1v(value);
|
|
2430
2490
|
var tmp_1;
|
|
2431
2491
|
var tmp_2;
|
|
2432
2492
|
if (idx === 0) {
|
|
2433
2493
|
var tmp_3;
|
|
2434
2494
|
if (transformed instanceof VariableReference) {
|
|
2435
|
-
tmp_3 = transformed.
|
|
2495
|
+
tmp_3 = transformed.b1o_1.g1j() === 'it';
|
|
2436
2496
|
} else {
|
|
2437
2497
|
tmp_3 = false;
|
|
2438
2498
|
}
|
|
@@ -2449,20 +2509,20 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2449
2509
|
destination.x(tmp$ret$2);
|
|
2450
2510
|
}
|
|
2451
2511
|
var newArgs = toMap(destination);
|
|
2452
|
-
tmp = s.
|
|
2512
|
+
tmp = s.h1n(VOID, VOID, VOID, newArgs);
|
|
2453
2513
|
} else {
|
|
2454
2514
|
tmp = transformChildren(s, t);
|
|
2455
2515
|
}
|
|
2456
2516
|
return tmp;
|
|
2457
2517
|
}
|
|
2458
2518
|
function RustTransform$rustName$lambda(it) {
|
|
2459
|
-
return RustTransform_getInstance().
|
|
2519
|
+
return RustTransform_getInstance().h1z(it);
|
|
2460
2520
|
}
|
|
2461
2521
|
function RustTransform$rustName$lambda_0(it) {
|
|
2462
|
-
return RustTransform_getInstance().
|
|
2522
|
+
return RustTransform_getInstance().h1z(it);
|
|
2463
2523
|
}
|
|
2464
2524
|
function RustTransform$toRawCode$lambda(it) {
|
|
2465
|
-
return it.l1().
|
|
2525
|
+
return it.l1().z1m() + ': ' + toRawCode(RustTransform_getInstance(), it.m1());
|
|
2466
2526
|
}
|
|
2467
2527
|
function RustTransform() {
|
|
2468
2528
|
RustTransform_instance = this;
|
|
@@ -2470,57 +2530,57 @@ function RustTransform() {
|
|
|
2470
2530
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2471
2531
|
// Inline function 'kotlin.apply' call
|
|
2472
2532
|
var this_0 = new TransformerBuilder();
|
|
2473
|
-
this_0.
|
|
2474
|
-
tmp.
|
|
2533
|
+
this_0.g1w(RustTransform$primitivesToCustom$lambda);
|
|
2534
|
+
tmp.c1z_1 = this_0.v1i();
|
|
2475
2535
|
var tmp_0 = this;
|
|
2476
2536
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2477
2537
|
// Inline function 'kotlin.apply' call
|
|
2478
2538
|
var this_1 = new TransformerBuilder();
|
|
2479
|
-
this_1.
|
|
2480
|
-
tmp_0.
|
|
2539
|
+
this_1.u1i(RustTransform$borrow$lambda);
|
|
2540
|
+
tmp_0.d1z_1 = this_1.v1i();
|
|
2481
2541
|
var tmp_1 = this;
|
|
2482
2542
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2483
2543
|
// Inline function 'kotlin.apply' call
|
|
2484
|
-
tmp_1.
|
|
2485
|
-
this.
|
|
2544
|
+
tmp_1.e1z_1 = (new TransformerBuilder()).v1i();
|
|
2545
|
+
this.f1z_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2486
2546
|
var tmp_2 = this;
|
|
2487
2547
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2488
2548
|
// Inline function 'kotlin.apply' call
|
|
2489
2549
|
var this_2 = new TransformerBuilder();
|
|
2490
|
-
this_2.
|
|
2491
|
-
tmp_2.
|
|
2550
|
+
this_2.j1w(RustTransform$serializationArgs$lambda);
|
|
2551
|
+
tmp_2.g1z_1 = this_2.v1i();
|
|
2492
2552
|
}
|
|
2493
|
-
protoOf(RustTransform).
|
|
2553
|
+
protoOf(RustTransform).i1z = function (element) {
|
|
2494
2554
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2495
2555
|
var scope = new TransformScope(element);
|
|
2496
|
-
scope.
|
|
2497
|
-
var tmp = scope.
|
|
2556
|
+
scope.f1w(RustTransform_getInstance().c1z_1);
|
|
2557
|
+
var tmp = scope.a1w_1;
|
|
2498
2558
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2499
2559
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2500
2560
|
var scope_0 = new TransformScope(this_0);
|
|
2501
|
-
scope_0.
|
|
2502
|
-
var tmp_0 = scope_0.
|
|
2561
|
+
scope_0.f1w(RustTransform_getInstance().d1z_1);
|
|
2562
|
+
var tmp_0 = scope_0.a1w_1;
|
|
2503
2563
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2504
2564
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2505
2565
|
var scope_1 = new TransformScope(this_1);
|
|
2506
|
-
scope_1.
|
|
2507
|
-
var tmp_1 = scope_1.
|
|
2566
|
+
scope_1.f1w(RustTransform_getInstance().e1z_1);
|
|
2567
|
+
var tmp_1 = scope_1.a1w_1;
|
|
2508
2568
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2509
2569
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2510
2570
|
var scope_2 = new TransformScope(this_2);
|
|
2511
|
-
scope_2.
|
|
2512
|
-
var tmp_2 = scope_2.
|
|
2571
|
+
scope_2.f1w(RustTransform_getInstance().g1z_1);
|
|
2572
|
+
var tmp_2 = scope_2.a1w_1;
|
|
2513
2573
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2514
2574
|
};
|
|
2515
|
-
protoOf(RustTransform).
|
|
2575
|
+
protoOf(RustTransform).h1z = function (_this__u8e3s4) {
|
|
2516
2576
|
var tmp;
|
|
2517
2577
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2518
|
-
var pascalName = _this__u8e3s4.
|
|
2578
|
+
var pascalName = _this__u8e3s4.e1j_1.i1h();
|
|
2519
2579
|
var tmp_0;
|
|
2520
|
-
if (_this__u8e3s4.
|
|
2580
|
+
if (_this__u8e3s4.f1j_1.r()) {
|
|
2521
2581
|
tmp_0 = pascalName;
|
|
2522
2582
|
} else {
|
|
2523
|
-
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.
|
|
2583
|
+
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.f1j_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda) + '>';
|
|
2524
2584
|
}
|
|
2525
2585
|
tmp = tmp_0;
|
|
2526
2586
|
} else {
|
|
@@ -2528,13 +2588,13 @@ protoOf(RustTransform).x1y = function (_this__u8e3s4) {
|
|
|
2528
2588
|
tmp = 'String';
|
|
2529
2589
|
} else {
|
|
2530
2590
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2531
|
-
tmp = 'Option<' + this.
|
|
2591
|
+
tmp = 'Option<' + this.h1z(_this__u8e3s4.c1j_1) + '>';
|
|
2532
2592
|
} else {
|
|
2533
2593
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2534
|
-
tmp = 'Vec<' + this.
|
|
2594
|
+
tmp = 'Vec<' + this.h1z(_this__u8e3s4.d1j_1) + '>';
|
|
2535
2595
|
} else {
|
|
2536
2596
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2537
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2597
|
+
tmp = 'std::collections::HashMap<' + this.h1z(_this__u8e3s4.l1n_1) + ', ' + this.h1z(_this__u8e3s4.m1n_1) + '>';
|
|
2538
2598
|
} else {
|
|
2539
2599
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2540
2600
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2556,7 +2616,7 @@ protoOf(RustTransform).x1y = function (_this__u8e3s4) {
|
|
|
2556
2616
|
} else {
|
|
2557
2617
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2558
2618
|
var tmp_1;
|
|
2559
|
-
switch (_this__u8e3s4.
|
|
2619
|
+
switch (_this__u8e3s4.i1n_1.c3_1) {
|
|
2560
2620
|
case 0:
|
|
2561
2621
|
tmp_1 = 'i32';
|
|
2562
2622
|
break;
|
|
@@ -2571,7 +2631,7 @@ protoOf(RustTransform).x1y = function (_this__u8e3s4) {
|
|
|
2571
2631
|
} else {
|
|
2572
2632
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2573
2633
|
var tmp_2;
|
|
2574
|
-
switch (_this__u8e3s4.
|
|
2634
|
+
switch (_this__u8e3s4.j1n_1.c3_1) {
|
|
2575
2635
|
case 0:
|
|
2576
2636
|
tmp_2 = 'f32';
|
|
2577
2637
|
break;
|
|
@@ -2591,7 +2651,7 @@ protoOf(RustTransform).x1y = function (_this__u8e3s4) {
|
|
|
2591
2651
|
tmp = 'String';
|
|
2592
2652
|
} else {
|
|
2593
2653
|
if (_this__u8e3s4 instanceof Function) {
|
|
2594
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2654
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.s1n_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.h1z(_this__u8e3s4.t1n_1) + '>';
|
|
2595
2655
|
} else {
|
|
2596
2656
|
noWhenBranchMatchedException();
|
|
2597
2657
|
}
|
|
@@ -2612,27 +2672,27 @@ protoOf(RustTransform).x1y = function (_this__u8e3s4) {
|
|
|
2612
2672
|
}
|
|
2613
2673
|
return tmp;
|
|
2614
2674
|
};
|
|
2615
|
-
protoOf(RustTransform).
|
|
2675
|
+
protoOf(RustTransform).m1z = function (_this__u8e3s4) {
|
|
2616
2676
|
var tmp;
|
|
2617
2677
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2618
2678
|
// Inline function 'kotlin.let' call
|
|
2619
|
-
var it = _this__u8e3s4.
|
|
2679
|
+
var it = _this__u8e3s4.e1j_1.i1h();
|
|
2620
2680
|
tmp = startsWith(it, '&') || startsWith(it, '&dyn ') || startsWith(it, '&impl ') || startsWith(it, '&mut ');
|
|
2621
2681
|
} else {
|
|
2622
2682
|
tmp = false;
|
|
2623
2683
|
}
|
|
2624
2684
|
return tmp;
|
|
2625
2685
|
};
|
|
2626
|
-
protoOf(RustTransform).
|
|
2686
|
+
protoOf(RustTransform).l1z = function (_this__u8e3s4) {
|
|
2627
2687
|
// Inline function 'kotlin.let' call
|
|
2628
|
-
var it = _this__u8e3s4.
|
|
2688
|
+
var it = _this__u8e3s4.e1j_1.i1h();
|
|
2629
2689
|
return it === 'Serializer' || it === 'Deserializer';
|
|
2630
2690
|
};
|
|
2631
|
-
protoOf(RustTransform).
|
|
2632
|
-
return _this__u8e3s4.
|
|
2691
|
+
protoOf(RustTransform).k1z = function (_this__u8e3s4) {
|
|
2692
|
+
return _this__u8e3s4.e1j_1.i1h() === 'GeneratorField';
|
|
2633
2693
|
};
|
|
2634
|
-
protoOf(RustTransform).
|
|
2635
|
-
var v = _this__u8e3s4.
|
|
2694
|
+
protoOf(RustTransform).j1z = function (_this__u8e3s4) {
|
|
2695
|
+
var v = _this__u8e3s4.g1j();
|
|
2636
2696
|
switch (v) {
|
|
2637
2697
|
case 'self':
|
|
2638
2698
|
case '&self':
|
|
@@ -2648,21 +2708,21 @@ function RustTransform_getInstance() {
|
|
|
2648
2708
|
return RustTransform_instance;
|
|
2649
2709
|
}
|
|
2650
2710
|
function borrow(_this__u8e3s4) {
|
|
2651
|
-
return _this__u8e3s4.
|
|
2711
|
+
return _this__u8e3s4.p1n(new Name(listOf('&' + _this__u8e3s4.e1j_1.i1h())));
|
|
2652
2712
|
}
|
|
2653
2713
|
function borrowDyn(_this__u8e3s4) {
|
|
2654
|
-
return _this__u8e3s4.
|
|
2714
|
+
return _this__u8e3s4.p1n(new Name(listOf('&dyn ' + _this__u8e3s4.e1j_1.i1h())));
|
|
2655
2715
|
}
|
|
2656
2716
|
function borrowImpl(_this__u8e3s4) {
|
|
2657
|
-
return _this__u8e3s4.
|
|
2717
|
+
return _this__u8e3s4.p1n(new Name(listOf('&impl ' + _this__u8e3s4.e1j_1.i1h())));
|
|
2658
2718
|
}
|
|
2659
2719
|
function ownedImpl(_this__u8e3s4) {
|
|
2660
|
-
return _this__u8e3s4.
|
|
2720
|
+
return _this__u8e3s4.p1n(new Name(listOf('impl ' + _this__u8e3s4.e1j_1.i1h())));
|
|
2661
2721
|
}
|
|
2662
2722
|
//region block: post-declaration
|
|
2663
|
-
protoOf(RustIrEmitter).
|
|
2723
|
+
protoOf(RustIrEmitter).p1w = get_extensions;
|
|
2664
2724
|
protoOf(RustIrEmitter).no = emit_1;
|
|
2665
|
-
protoOf(RustIrEmitter).
|
|
2725
|
+
protoOf(RustIrEmitter).u1w = beforeGenerate;
|
|
2666
2726
|
//endregion
|
|
2667
2727
|
//region block: exports
|
|
2668
2728
|
export {
|