@flock/wirespec 0.19.4 → 0.19.6
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 +78 -78
- package/clikt-clikt.mjs +1312 -1312
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +426 -426
- package/kotlin-kotlin-stdlib.mjs +78 -77
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +9632 -9632
- package/kotlin-rgxgen.mjs +1759 -1759
- package/kotlinx-io-kotlinx-io-core.mjs +403 -403
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1729 -1729
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1467 -1467
- package/mordant-mordant.mjs +1157 -1157
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +13 -1
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +311 -340
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +143 -143
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +204 -196
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +349 -349
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +123 -123
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +194 -194
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +22 -22
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3584 -3460
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +227 -58
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +473 -473
- package/wirespec-src-converter-openapi.mjs +342 -342
- package/wirespec-src-ide-lsp.mjs +1346 -1346
- package/wirespec-src-plugin-arguments.mjs +131 -131
- package/wirespec-src-plugin-cli.mjs +87 -87
- package/wirespec-src-plugin-npm.d.mts +39 -2
- package/wirespec-src-plugin-npm.mjs +21 -21
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +2 -2
|
@@ -134,6 +134,7 @@ import {
|
|
|
134
134
|
interface24qlavvm81r6z as interface_0,
|
|
135
135
|
convertnty9x0e63d0u as convert,
|
|
136
136
|
Struct39wf79cwtn4ty as Struct,
|
|
137
|
+
fieldList3dg35dj9v5h4v as fieldList,
|
|
137
138
|
Importdjdfxu3pjkxa as Import,
|
|
138
139
|
emit3bzdcd0f6nwtj as emit,
|
|
139
140
|
emitn3eihixilqyh as emit_0,
|
|
@@ -192,7 +193,7 @@ initMetadataForClass(RustIrEmitter, 'RustIrEmitter', RustIrEmitter, VOID, [IrEmi
|
|
|
192
193
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
193
194
|
//endregion
|
|
194
195
|
function _get_sanitizationConfig__sns434($this) {
|
|
195
|
-
var tmp0 = $this.
|
|
196
|
+
var tmp0 = $this.t1z_1;
|
|
196
197
|
var tmp = KProperty1;
|
|
197
198
|
// Inline function 'kotlin.getValue' call
|
|
198
199
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustIrEmitter$_get_sanitizationConfig_$ref_17ypni(), null);
|
|
@@ -256,14 +257,14 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
256
257
|
return toSnakeCase($this, tmp$ret$9);
|
|
257
258
|
}
|
|
258
259
|
function toSnakeCase($this, _this__u8e3s4) {
|
|
259
|
-
return Companion_getInstance().
|
|
260
|
+
return Companion_getInstance().r1h(_this__u8e3s4).z1m();
|
|
260
261
|
}
|
|
261
262
|
function toPascalCase($this, _this__u8e3s4) {
|
|
262
263
|
var tmp = split(_this__u8e3s4, ['_']);
|
|
263
264
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustIrEmitter$toPascalCase$lambda);
|
|
264
265
|
}
|
|
265
266
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
266
|
-
return Companion_getInstance_0().
|
|
267
|
+
return Companion_getInstance_0().w1z_1.u1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
267
268
|
}
|
|
268
269
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
269
270
|
// Inline function 'kotlin.let' call
|
|
@@ -288,7 +289,7 @@ function prependImports($this, _this__u8e3s4, imports) {
|
|
|
288
289
|
var tmp;
|
|
289
290
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
290
291
|
if (!imports.r()) {
|
|
291
|
-
tmp = _this__u8e3s4.
|
|
292
|
+
tmp = _this__u8e3s4.c1o(VOID, plus(imports, _this__u8e3s4.z1n_1));
|
|
292
293
|
} else {
|
|
293
294
|
tmp = _this__u8e3s4;
|
|
294
295
|
}
|
|
@@ -300,7 +301,7 @@ function containsWildcard($this, type) {
|
|
|
300
301
|
tmp = true;
|
|
301
302
|
} else {
|
|
302
303
|
if (type instanceof Custom) {
|
|
303
|
-
var tmp0 = type.
|
|
304
|
+
var tmp0 = type.m1j_1;
|
|
304
305
|
var tmp$ret$0;
|
|
305
306
|
$l$block_0: {
|
|
306
307
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -327,13 +328,13 @@ function containsWildcard($this, type) {
|
|
|
327
328
|
tmp = tmp$ret$0;
|
|
328
329
|
} else {
|
|
329
330
|
if (type instanceof Nullable) {
|
|
330
|
-
tmp = containsWildcard($this, type.
|
|
331
|
+
tmp = containsWildcard($this, type.j1j_1);
|
|
331
332
|
} else {
|
|
332
333
|
if (type instanceof Array_0) {
|
|
333
|
-
tmp = containsWildcard($this, type.
|
|
334
|
+
tmp = containsWildcard($this, type.k1j_1);
|
|
334
335
|
} else {
|
|
335
336
|
if (type instanceof Dict) {
|
|
336
|
-
tmp = containsWildcard($this, type.
|
|
337
|
+
tmp = containsWildcard($this, type.l1n_1) || containsWildcard($this, type.m1n_1);
|
|
337
338
|
} else {
|
|
338
339
|
tmp = false;
|
|
339
340
|
}
|
|
@@ -355,7 +356,7 @@ function containsUnderiveable($this, type) {
|
|
|
355
356
|
tmp = true;
|
|
356
357
|
} else {
|
|
357
358
|
if (type instanceof Custom) {
|
|
358
|
-
var tmp0 = type.
|
|
359
|
+
var tmp0 = type.m1j_1;
|
|
359
360
|
var tmp$ret$0;
|
|
360
361
|
$l$block_0: {
|
|
361
362
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -382,13 +383,13 @@ function containsUnderiveable($this, type) {
|
|
|
382
383
|
tmp = tmp$ret$0;
|
|
383
384
|
} else {
|
|
384
385
|
if (type instanceof Nullable) {
|
|
385
|
-
tmp = containsUnderiveable($this, type.
|
|
386
|
+
tmp = containsUnderiveable($this, type.j1j_1);
|
|
386
387
|
} else {
|
|
387
388
|
if (type instanceof Array_0) {
|
|
388
|
-
tmp = containsUnderiveable($this, type.
|
|
389
|
+
tmp = containsUnderiveable($this, type.k1j_1);
|
|
389
390
|
} else {
|
|
390
391
|
if (type instanceof Dict) {
|
|
391
|
-
tmp = containsUnderiveable($this, type.
|
|
392
|
+
tmp = containsUnderiveable($this, type.l1n_1) || containsUnderiveable($this, type.m1n_1);
|
|
392
393
|
} else {
|
|
393
394
|
tmp = false;
|
|
394
395
|
}
|
|
@@ -414,7 +415,7 @@ function buildClientParams($this, _this__u8e3s4) {
|
|
|
414
415
|
}
|
|
415
416
|
function Companion() {
|
|
416
417
|
Companion_instance_2 = this;
|
|
417
|
-
this.
|
|
418
|
+
this.w1z_1 = setOf(['as', 'break', 'const', 'continue', 'crate', 'else', 'enum', 'extern', 'false', 'fn', 'for', 'if', 'impl', 'in', 'let', 'loop', 'match', 'mod', 'move', 'mut', 'pub', 'ref', 'return', 'self', 'Self', 'static', 'struct', 'super', 'trait', 'true', 'type', 'unsafe', 'use', 'where', 'while', 'async', 'await', 'dyn', 'abstract', 'become', 'box', 'do', 'final', 'macro', 'override', 'priv', 'typeof', 'unsized', 'virtual', 'yield', 'try']);
|
|
418
419
|
}
|
|
419
420
|
var Companion_instance_2;
|
|
420
421
|
function Companion_getInstance_0() {
|
|
@@ -423,16 +424,16 @@ function Companion_getInstance_0() {
|
|
|
423
424
|
return Companion_instance_2;
|
|
424
425
|
}
|
|
425
426
|
function sam$kotlin_Comparator$0(function_0) {
|
|
426
|
-
this.
|
|
427
|
+
this.x1z_1 = function_0;
|
|
427
428
|
}
|
|
428
429
|
protoOf(sam$kotlin_Comparator$0).td = function (a, b) {
|
|
429
|
-
return this.
|
|
430
|
+
return this.x1z_1(a, b);
|
|
430
431
|
};
|
|
431
432
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
432
433
|
return this.td(a, b);
|
|
433
434
|
};
|
|
434
435
|
protoOf(sam$kotlin_Comparator$0).l3 = function () {
|
|
435
|
-
return this.
|
|
436
|
+
return this.x1z_1;
|
|
436
437
|
};
|
|
437
438
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
438
439
|
var tmp;
|
|
@@ -456,16 +457,16 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
456
457
|
return 'r#' + it;
|
|
457
458
|
}
|
|
458
459
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
459
|
-
return Companion_getInstance().
|
|
460
|
+
return Companion_getInstance().r1h((new Name(name.p1h_1)).z1m());
|
|
460
461
|
}
|
|
461
462
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
462
|
-
var value = name.
|
|
463
|
+
var value = name.n1j();
|
|
463
464
|
switch (value) {
|
|
464
465
|
case 'self':
|
|
465
466
|
case '&self':
|
|
466
467
|
return name;
|
|
467
468
|
default:
|
|
468
|
-
return Companion_getInstance().
|
|
469
|
+
return Companion_getInstance().r1h((new Name(name.p1h_1)).z1m());
|
|
469
470
|
}
|
|
470
471
|
}
|
|
471
472
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
@@ -489,9 +490,9 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
489
490
|
return function (stmt, tr) {
|
|
490
491
|
var tmp;
|
|
491
492
|
if (stmt instanceof ConstructorStatement) {
|
|
492
|
-
var tmp_0 = tr.
|
|
493
|
+
var tmp_0 = tr.a1v(stmt.v1n_1);
|
|
493
494
|
// Inline function 'kotlin.collections.map' call
|
|
494
|
-
var this_0 = stmt.
|
|
495
|
+
var this_0 = stmt.w1n_1;
|
|
495
496
|
// Inline function 'kotlin.collections.mapTo' call
|
|
496
497
|
var destination = ArrayList_init_$Create$(this_0.a1());
|
|
497
498
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -502,7 +503,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
502
503
|
var k = item.k1();
|
|
503
504
|
// Inline function 'kotlin.collections.component2' call
|
|
504
505
|
var v = item.l1();
|
|
505
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
506
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.d1v(v));
|
|
506
507
|
destination.x(tmp$ret$3);
|
|
507
508
|
}
|
|
508
509
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -514,7 +515,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
514
515
|
}
|
|
515
516
|
function RustIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
516
517
|
return function () {
|
|
517
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
518
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().w1z_1, setOf(['self', 'Self']));
|
|
518
519
|
var tmp = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
519
520
|
var tmp_0 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
520
521
|
var tmp_1 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -528,69 +529,69 @@ function RustIrEmitter$_get_sanitizationConfig_$ref_17ypni() {
|
|
|
528
529
|
};
|
|
529
530
|
}
|
|
530
531
|
function RustIrEmitter$emitShared$lambda($this$interface) {
|
|
531
|
-
$this$interface.
|
|
532
|
+
$this$interface.a1k(Custom_init_$Create$('Headers'));
|
|
532
533
|
return Unit_instance;
|
|
533
534
|
}
|
|
534
535
|
function RustIrEmitter$emitShared$lambda_0($this$interface) {
|
|
535
|
-
$this$interface.
|
|
536
|
+
$this$interface.a1k(Custom_init_$Create$('Headers'));
|
|
536
537
|
return Unit_instance;
|
|
537
538
|
}
|
|
538
539
|
function RustIrEmitter$emitShared$lambda_1($this$interface) {
|
|
539
|
-
$this$interface.
|
|
540
|
-
$this$interface.
|
|
541
|
-
$this$interface.
|
|
540
|
+
$this$interface.a1k(Custom_init_$Create$('Sized'));
|
|
541
|
+
$this$interface.h1i('label', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda);
|
|
542
|
+
$this$interface.h1i('from_label', true, VOID, RustIrEmitter$emitShared$lambda$lambda_0);
|
|
542
543
|
return Unit_instance;
|
|
543
544
|
}
|
|
544
545
|
function RustIrEmitter$emitShared$lambda$lambda($this$function) {
|
|
545
|
-
$this$function.
|
|
546
|
-
$this$function.
|
|
546
|
+
$this$function.c1i('&self', Custom_init_$Create$(''));
|
|
547
|
+
$this$function.f1i(Custom_init_$Create$('&str'));
|
|
547
548
|
return Unit_instance;
|
|
548
549
|
}
|
|
549
550
|
function RustIrEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
550
|
-
$this$function.
|
|
551
|
-
$this$function.
|
|
551
|
+
$this$function.c1i('s', Custom_init_$Create$('&str'));
|
|
552
|
+
$this$function.f1i(Custom_init_$Create$('Option<Self>'));
|
|
552
553
|
return Unit_instance;
|
|
553
554
|
}
|
|
554
555
|
function RustIrEmitter$emitShared$lambda_2($this$interface) {
|
|
555
|
-
$this$interface.
|
|
556
|
-
$this$interface.
|
|
557
|
-
$this$interface.
|
|
556
|
+
$this$interface.u1j($this$interface.t1h('T', []), []);
|
|
557
|
+
$this$interface.h1i('value', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_1);
|
|
558
|
+
$this$interface.h1i('validate', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_2);
|
|
558
559
|
return Unit_instance;
|
|
559
560
|
}
|
|
560
561
|
function RustIrEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
561
|
-
$this$function.
|
|
562
|
-
$this$function.
|
|
562
|
+
$this$function.c1i('&self', Custom_init_$Create$(''));
|
|
563
|
+
$this$function.f1i(borrow($this$function.t1h('T', [])));
|
|
563
564
|
return Unit_instance;
|
|
564
565
|
}
|
|
565
566
|
function RustIrEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
566
|
-
$this$function.
|
|
567
|
-
$this$function.
|
|
567
|
+
$this$function.c1i('&self', Custom_init_$Create$(''));
|
|
568
|
+
$this$function.f1i($this$function.b1k());
|
|
568
569
|
return Unit_instance;
|
|
569
570
|
}
|
|
570
571
|
function RustIrEmitter$emitShared$lambda_3($this$interface) {
|
|
571
|
-
$this$interface.
|
|
572
|
-
$this$interface.
|
|
573
|
-
$this$interface.
|
|
574
|
-
$this$interface.
|
|
575
|
-
$this$interface.
|
|
576
|
-
$this$interface.
|
|
572
|
+
$this$interface.u1j($this$interface.t1h('T', []), []);
|
|
573
|
+
$this$interface.v1j('path', borrowDyn($this$interface.t1h('Path', [])));
|
|
574
|
+
$this$interface.v1j('method', borrow($this$interface.t1h('Method', [])));
|
|
575
|
+
$this$interface.v1j('queries', borrowDyn($this$interface.t1h('Queries', [])));
|
|
576
|
+
$this$interface.v1j('headers', borrowDyn($this$interface.t1h('RequestHeaders', [])));
|
|
577
|
+
$this$interface.v1j('body', borrow($this$interface.t1h('T', [])));
|
|
577
578
|
return Unit_instance;
|
|
578
579
|
}
|
|
579
580
|
function RustIrEmitter$emitShared$lambda_4($this$interface) {
|
|
580
|
-
$this$interface.
|
|
581
|
-
$this$interface.
|
|
582
|
-
$this$interface.
|
|
583
|
-
$this$interface.
|
|
581
|
+
$this$interface.u1j($this$interface.t1h('T', []), []);
|
|
582
|
+
$this$interface.v1j('status', $this$interface.a1l());
|
|
583
|
+
$this$interface.v1j('headers', borrowDyn($this$interface.t1h('ResponseHeaders', [])));
|
|
584
|
+
$this$interface.v1j('body', borrow($this$interface.t1h('T', [])));
|
|
584
585
|
return Unit_instance;
|
|
585
586
|
}
|
|
586
587
|
function RustIrEmitter$emitShared$lambda_5($this$interface) {
|
|
587
|
-
$this$interface.
|
|
588
|
+
$this$interface.x1k('transport', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_3);
|
|
588
589
|
return Unit_instance;
|
|
589
590
|
}
|
|
590
591
|
function RustIrEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
591
|
-
$this$asyncFunction.
|
|
592
|
-
$this$asyncFunction.
|
|
593
|
-
$this$asyncFunction.
|
|
592
|
+
$this$asyncFunction.c1i('&self', Custom_init_$Create$(''));
|
|
593
|
+
$this$asyncFunction.c1i('request', borrow($this$asyncFunction.t1h('RawRequest', [])));
|
|
594
|
+
$this$asyncFunction.f1i($this$asyncFunction.t1h('RawResponse', []));
|
|
594
595
|
return Unit_instance;
|
|
595
596
|
}
|
|
596
597
|
function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -598,7 +599,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
598
599
|
var tmp;
|
|
599
600
|
if (element instanceof File) {
|
|
600
601
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
601
|
-
var tmp0 = element.
|
|
602
|
+
var tmp0 = element.z1n_1;
|
|
602
603
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
603
604
|
var destination = ArrayList_init_$Create$_0();
|
|
604
605
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -609,7 +610,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
609
610
|
}
|
|
610
611
|
}
|
|
611
612
|
var namespace = first(destination);
|
|
612
|
-
tmp = element.
|
|
613
|
+
tmp = element.c1o(VOID, plus($rustImports, namespace.f1o_1));
|
|
613
614
|
} else {
|
|
614
615
|
tmp = element;
|
|
615
616
|
}
|
|
@@ -621,7 +622,7 @@ function RustIrEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
621
622
|
var tmp;
|
|
622
623
|
if (element instanceof Enum_0) {
|
|
623
624
|
var tmp_0;
|
|
624
|
-
if (element.
|
|
625
|
+
if (element.e1p_1.equals(Companion_getInstance().r1h('Method'))) {
|
|
625
626
|
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}');
|
|
626
627
|
} else {
|
|
627
628
|
tmp_0 = element;
|
|
@@ -638,7 +639,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
638
639
|
var tmp;
|
|
639
640
|
if (element instanceof File) {
|
|
640
641
|
// Inline function 'kotlin.collections.flatMap' call
|
|
641
|
-
var tmp0 = element.
|
|
642
|
+
var tmp0 = element.z1n_1;
|
|
642
643
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
643
644
|
var destination = ArrayList_init_$Create$_0();
|
|
644
645
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -650,7 +651,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
650
651
|
tmp$ret$0 = listOf(element_0);
|
|
651
652
|
break $l$block;
|
|
652
653
|
}
|
|
653
|
-
var name = element_0.
|
|
654
|
+
var name = element_0.s1o_1.s1h();
|
|
654
655
|
var tmp_0;
|
|
655
656
|
// Inline function 'kotlin.collections.contains' call
|
|
656
657
|
// Inline function 'kotlin.collections.containsKey' call
|
|
@@ -684,7 +685,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
684
685
|
addAll(destination, list);
|
|
685
686
|
}
|
|
686
687
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
687
|
-
tmp = element.
|
|
688
|
+
tmp = element.c1o(VOID, newElements);
|
|
688
689
|
} else {
|
|
689
690
|
tmp = element;
|
|
690
691
|
}
|
|
@@ -700,14 +701,14 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
700
701
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
701
702
|
var tmp_0 = scope;
|
|
702
703
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
703
|
-
var this_0 = scope.
|
|
704
|
+
var this_0 = scope.i1v_1;
|
|
704
705
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
705
706
|
// Inline function 'kotlin.apply' call
|
|
706
707
|
var this_1 = new TransformerBuilder();
|
|
707
|
-
this_1.
|
|
708
|
-
var tmp$ret$2 = this_1.
|
|
709
|
-
tmp_0.
|
|
710
|
-
var tmp_1 = scope.
|
|
708
|
+
this_1.b1j(RustIrEmitter$emitShared$lambda$lambda_4);
|
|
709
|
+
var tmp$ret$2 = this_1.c1j();
|
|
710
|
+
tmp_0.i1v_1 = transform(this_0, tmp$ret$2);
|
|
711
|
+
var tmp_1 = scope.i1v_1;
|
|
711
712
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
712
713
|
} else {
|
|
713
714
|
tmp = element;
|
|
@@ -718,7 +719,7 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
718
719
|
function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
719
720
|
var tmp;
|
|
720
721
|
if (element instanceof Function_0) {
|
|
721
|
-
var tmp0 = element.
|
|
722
|
+
var tmp0 = element.j1l_1;
|
|
722
723
|
var tmp$ret$0;
|
|
723
724
|
$l$block_0: {
|
|
724
725
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -735,7 +736,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
735
736
|
var _iterator__ex2g4s = tmp0.t();
|
|
736
737
|
while (_iterator__ex2g4s.u()) {
|
|
737
738
|
var element_0 = _iterator__ex2g4s.v();
|
|
738
|
-
if (element_0.
|
|
739
|
+
if (element_0.v1q_1.n1j() === '&self' || element_0.v1q_1.n1j() === 'self') {
|
|
739
740
|
tmp$ret$0 = true;
|
|
740
741
|
break $l$block_0;
|
|
741
742
|
}
|
|
@@ -743,7 +744,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
743
744
|
tmp$ret$0 = false;
|
|
744
745
|
}
|
|
745
746
|
var hasSelf = tmp$ret$0;
|
|
746
|
-
tmp = hasSelf || element.
|
|
747
|
+
tmp = hasSelf || element.n1l_1 ? element : element.p1l(VOID, VOID, plus(listOf(get_rustSelfParam()), element.j1l_1));
|
|
747
748
|
} else {
|
|
748
749
|
tmp = element;
|
|
749
750
|
}
|
|
@@ -754,7 +755,7 @@ function RustIrEmitter$emitShared$lambda_10(group) {
|
|
|
754
755
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
755
756
|
}
|
|
756
757
|
function RustIrEmitter$emitShared$lambda$lambda_5(it) {
|
|
757
|
-
return RustGenerator_instance.
|
|
758
|
+
return RustGenerator_instance.w1v(it);
|
|
758
759
|
}
|
|
759
760
|
function RustIrEmitter$emit$lambda(a, b) {
|
|
760
761
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -792,17 +793,17 @@ function RustIrEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs)
|
|
|
792
793
|
var tmp_0;
|
|
793
794
|
var tmp_1;
|
|
794
795
|
if (expr instanceof RawExpression) {
|
|
795
|
-
tmp_1 = endsWith(expr.
|
|
796
|
+
tmp_1 = endsWith(expr.p1p_1, 'Generator');
|
|
796
797
|
} else {
|
|
797
798
|
tmp_1 = false;
|
|
798
799
|
}
|
|
799
800
|
if (tmp_1) {
|
|
800
|
-
tmp_0 = !(expr.
|
|
801
|
+
tmp_0 = !(expr.p1p_1 === $generatorOwnName);
|
|
801
802
|
} else {
|
|
802
803
|
tmp_0 = false;
|
|
803
804
|
}
|
|
804
805
|
if (tmp_0) {
|
|
805
|
-
$generatorRefs.x(expr.
|
|
806
|
+
$generatorRefs.x(expr.p1p_1);
|
|
806
807
|
tmp = Unit_instance;
|
|
807
808
|
}
|
|
808
809
|
return transformChildren_1(expr, t);
|
|
@@ -836,38 +837,38 @@ function RustIrEmitter$toPascalCase$lambda(s) {
|
|
|
836
837
|
function RustIrEmitter$buildClientParams$lambda(this$0) {
|
|
837
838
|
return function (_destruct__k2r9zo) {
|
|
838
839
|
var name = _destruct__k2r9zo.ve();
|
|
839
|
-
return sanitizeKeywords(this$0, name.
|
|
840
|
+
return sanitizeKeywords(this$0, name.z1m());
|
|
840
841
|
};
|
|
841
842
|
}
|
|
842
843
|
function RustIrEmitter$buildClientParams$lambda_0(this$0) {
|
|
843
844
|
return function (_destruct__k2r9zo) {
|
|
844
845
|
var name = _destruct__k2r9zo.ve();
|
|
845
846
|
var type = _destruct__k2r9zo.we();
|
|
846
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
847
|
+
var tmp = sanitizeKeywords(this$0, name.z1m());
|
|
847
848
|
// Inline function 'kotlin.with' call
|
|
848
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
849
|
+
return tmp + ': ' + RustTransform_getInstance().e20(type);
|
|
849
850
|
};
|
|
850
851
|
}
|
|
851
852
|
function RustIrEmitter(packageName, emitShared) {
|
|
852
853
|
Companion_getInstance_0();
|
|
853
854
|
packageName = packageName === VOID ? Companion_instance_0.cs('community.flock.wirespec.generated') : packageName;
|
|
854
855
|
emitShared = emitShared === VOID ? Companion_instance_1.wo() : emitShared;
|
|
855
|
-
this.
|
|
856
|
-
this.
|
|
857
|
-
this.
|
|
858
|
-
this.
|
|
856
|
+
this.p1z_1 = packageName;
|
|
857
|
+
this.q1z_1 = emitShared;
|
|
858
|
+
this.r1z_1 = RustGenerator_instance;
|
|
859
|
+
this.s1z_1 = FileExtension_Rust_getInstance();
|
|
859
860
|
var tmp = this;
|
|
860
|
-
tmp.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
861
|
+
tmp.t1z_1 = lazy(RustIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
862
|
+
this.u1z_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
863
|
+
this.v1z_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
863
864
|
}
|
|
864
|
-
protoOf(RustIrEmitter).
|
|
865
|
-
return this.
|
|
865
|
+
protoOf(RustIrEmitter).v1v = function () {
|
|
866
|
+
return this.r1z_1;
|
|
866
867
|
};
|
|
867
868
|
protoOf(RustIrEmitter).uq = function () {
|
|
868
|
-
return this.
|
|
869
|
+
return this.s1z_1;
|
|
869
870
|
};
|
|
870
|
-
protoOf(RustIrEmitter).
|
|
871
|
+
protoOf(RustIrEmitter).z1v = function () {
|
|
871
872
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
872
873
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustIrEmitter$emitShared$lambda);
|
|
873
874
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustIrEmitter$emitShared$lambda_0);
|
|
@@ -886,38 +887,38 @@ protoOf(RustIrEmitter).x1v = function () {
|
|
|
886
887
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
887
888
|
var tmp = scope;
|
|
888
889
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
889
|
-
var this_1 = scope.
|
|
890
|
+
var this_1 = scope.i1v_1;
|
|
890
891
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
891
892
|
// Inline function 'kotlin.apply' call
|
|
892
893
|
var this_2 = new TransformerBuilder();
|
|
893
|
-
this_2.
|
|
894
|
-
var tmp$ret$2 = this_2.
|
|
895
|
-
tmp.
|
|
894
|
+
this_2.b1j(RustIrEmitter$emitShared$lambda_6(rustImports));
|
|
895
|
+
var tmp$ret$2 = this_2.c1j();
|
|
896
|
+
tmp.i1v_1 = transform(this_1, tmp$ret$2);
|
|
896
897
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
897
898
|
var tmp_0 = scope;
|
|
898
899
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
899
|
-
var this_3 = scope.
|
|
900
|
+
var this_3 = scope.i1v_1;
|
|
900
901
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
901
902
|
// Inline function 'kotlin.apply' call
|
|
902
903
|
var this_4 = new TransformerBuilder();
|
|
903
|
-
this_4.
|
|
904
|
-
var tmp$ret$7 = this_4.
|
|
905
|
-
tmp_0.
|
|
904
|
+
this_4.b1j(RustIrEmitter$emitShared$lambda_7);
|
|
905
|
+
var tmp$ret$7 = this_4.c1j();
|
|
906
|
+
tmp_0.i1v_1 = transform(this_3, tmp$ret$7);
|
|
906
907
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
907
908
|
var tmp_1 = scope;
|
|
908
909
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
909
|
-
var this_5 = scope.
|
|
910
|
+
var this_5 = scope.i1v_1;
|
|
910
911
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
911
912
|
// Inline function 'kotlin.apply' call
|
|
912
913
|
var this_6 = new TransformerBuilder();
|
|
913
|
-
this_6.
|
|
914
|
-
var tmp$ret$12 = this_6.
|
|
915
|
-
tmp_1.
|
|
916
|
-
var tmp_2 = scope.
|
|
914
|
+
this_6.b1j(RustIrEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
915
|
+
var tmp$ret$12 = this_6.c1j();
|
|
916
|
+
tmp_1.i1v_1 = transform(this_5, tmp$ret$12);
|
|
917
|
+
var tmp_2 = scope.i1v_1;
|
|
917
918
|
// Inline function 'kotlin.let' call
|
|
918
919
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
919
920
|
// Inline function 'kotlin.collections.flatMap' call
|
|
920
|
-
var tmp0 = file.
|
|
921
|
+
var tmp0 = file.z1n_1;
|
|
921
922
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
922
923
|
var destination = ArrayList_init_$Create$_0();
|
|
923
924
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -929,14 +930,14 @@ protoOf(RustIrEmitter).x1v = function () {
|
|
|
929
930
|
tmp$ret$17 = listOf(element);
|
|
930
931
|
break $l$block;
|
|
931
932
|
}
|
|
933
|
+
var structFields = fieldList(element);
|
|
932
934
|
var tmp_3;
|
|
933
|
-
var tmp0_0 = element.h1o_1;
|
|
934
935
|
var tmp$ret$18;
|
|
935
936
|
$l$block_1: {
|
|
936
937
|
// Inline function 'kotlin.collections.any' call
|
|
937
938
|
var tmp_4;
|
|
938
|
-
if (isInterface(
|
|
939
|
-
tmp_4 =
|
|
939
|
+
if (isInterface(structFields, Collection)) {
|
|
940
|
+
tmp_4 = structFields.r();
|
|
940
941
|
} else {
|
|
941
942
|
tmp_4 = false;
|
|
942
943
|
}
|
|
@@ -944,10 +945,10 @@ protoOf(RustIrEmitter).x1v = function () {
|
|
|
944
945
|
tmp$ret$18 = false;
|
|
945
946
|
break $l$block_1;
|
|
946
947
|
}
|
|
947
|
-
var _iterator__ex2g4s_0 =
|
|
948
|
+
var _iterator__ex2g4s_0 = structFields.t();
|
|
948
949
|
while (_iterator__ex2g4s_0.u()) {
|
|
949
950
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
950
|
-
if (containsUnderiveable(this, element_0.
|
|
951
|
+
if (containsUnderiveable(this, element_0.c1q_1)) {
|
|
951
952
|
tmp$ret$18 = true;
|
|
952
953
|
break $l$block_1;
|
|
953
954
|
}
|
|
@@ -957,13 +958,12 @@ protoOf(RustIrEmitter).x1v = function () {
|
|
|
957
958
|
if (tmp$ret$18) {
|
|
958
959
|
tmp_3 = '';
|
|
959
960
|
} else {
|
|
960
|
-
var tmp0_1 = element.h1o_1;
|
|
961
961
|
var tmp$ret$20;
|
|
962
962
|
$l$block_3: {
|
|
963
963
|
// Inline function 'kotlin.collections.any' call
|
|
964
964
|
var tmp_5;
|
|
965
|
-
if (isInterface(
|
|
966
|
-
tmp_5 =
|
|
965
|
+
if (isInterface(structFields, Collection)) {
|
|
966
|
+
tmp_5 = structFields.r();
|
|
967
967
|
} else {
|
|
968
968
|
tmp_5 = false;
|
|
969
969
|
}
|
|
@@ -971,10 +971,10 @@ protoOf(RustIrEmitter).x1v = function () {
|
|
|
971
971
|
tmp$ret$20 = false;
|
|
972
972
|
break $l$block_3;
|
|
973
973
|
}
|
|
974
|
-
var _iterator__ex2g4s_1 =
|
|
974
|
+
var _iterator__ex2g4s_1 = structFields.t();
|
|
975
975
|
while (_iterator__ex2g4s_1.u()) {
|
|
976
976
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
977
|
-
if (containsWildcard(this, element_1.
|
|
977
|
+
if (containsWildcard(this, element_1.c1q_1)) {
|
|
978
978
|
tmp$ret$20 = true;
|
|
979
979
|
break $l$block_3;
|
|
980
980
|
}
|
|
@@ -984,7 +984,7 @@ protoOf(RustIrEmitter).x1v = function () {
|
|
|
984
984
|
if (tmp$ret$20) {
|
|
985
985
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
986
986
|
} else {
|
|
987
|
-
if (setOf(['RawRequest', 'RawResponse']).u1(element.
|
|
987
|
+
if (setOf(['RawRequest', 'RawResponse']).u1(element.j1o_1.s1h())) {
|
|
988
988
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
989
989
|
} else {
|
|
990
990
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -1000,33 +1000,33 @@ protoOf(RustIrEmitter).x1v = function () {
|
|
|
1000
1000
|
tmp_6 = listOf(new RawElement(derive));
|
|
1001
1001
|
}
|
|
1002
1002
|
var prefix = tmp_6;
|
|
1003
|
-
tmp$ret$17 = listOf(new File(element.
|
|
1003
|
+
tmp$ret$17 = listOf(new File(element.j1o_1, plus_0(prefix, element)));
|
|
1004
1004
|
}
|
|
1005
1005
|
var list = tmp$ret$17;
|
|
1006
1006
|
addAll(destination, list);
|
|
1007
1007
|
}
|
|
1008
|
-
var
|
|
1008
|
+
var tmp0_0 = new File(file.y1n_1, destination);
|
|
1009
1009
|
// Inline function 'kotlin.let' call
|
|
1010
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1010
|
+
var wirespecFile = RustTransform_getInstance().f20(tmp0_0);
|
|
1011
1011
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1012
1012
|
var scope_0 = new TransformScope(wirespecFile);
|
|
1013
1013
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1014
1014
|
var tmp_7 = scope_0;
|
|
1015
1015
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1016
|
-
var this_7 = scope_0.
|
|
1016
|
+
var this_7 = scope_0.i1v_1;
|
|
1017
1017
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1018
1018
|
// Inline function 'kotlin.apply' call
|
|
1019
1019
|
var this_8 = new TransformerBuilder();
|
|
1020
|
-
this_8.
|
|
1021
|
-
var tmp$ret$31 = this_8.
|
|
1022
|
-
tmp_7.
|
|
1023
|
-
var tmp_8 = scope_0.
|
|
1020
|
+
this_8.b1j(RustIrEmitter$emitShared$lambda_9);
|
|
1021
|
+
var tmp$ret$31 = this_8.c1j();
|
|
1022
|
+
tmp_7.i1v_1 = transform(this_7, tmp$ret$31);
|
|
1023
|
+
var tmp_8 = scope_0.i1v_1;
|
|
1024
1024
|
// Inline function 'kotlin.let' call
|
|
1025
|
-
var
|
|
1025
|
+
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).z1n_1;
|
|
1026
1026
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1027
1027
|
// Inline function 'kotlin.collections.fold' call
|
|
1028
1028
|
var accumulator = ArrayList_init_$Create$_0();
|
|
1029
|
-
var _iterator__ex2g4s_2 =
|
|
1029
|
+
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
1030
1030
|
while (_iterator__ex2g4s_2.u()) {
|
|
1031
1031
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
1032
1032
|
var acc = accumulator;
|
|
@@ -1043,14 +1043,14 @@ protoOf(RustIrEmitter).x1v = function () {
|
|
|
1043
1043
|
var groups = accumulator;
|
|
1044
1044
|
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda_10) + '\n';
|
|
1045
1045
|
var tmp_10;
|
|
1046
|
-
if (this.
|
|
1047
|
-
tmp_10 = new File(Companion_getInstance().
|
|
1046
|
+
if (this.q1z_1.xo_1) {
|
|
1047
|
+
tmp_10 = new File(Companion_getInstance().r1h(this.p1z_1.fs() + 'wirespec'), listOf(new RawElement(source)));
|
|
1048
1048
|
} else {
|
|
1049
1049
|
tmp_10 = null;
|
|
1050
1050
|
}
|
|
1051
1051
|
return tmp_10;
|
|
1052
1052
|
};
|
|
1053
|
-
protoOf(RustIrEmitter).
|
|
1053
|
+
protoOf(RustIrEmitter).y1v = function (module_0, logger) {
|
|
1054
1054
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1055
1055
|
var this_0 = new NonEmptyList(module_0.tq_1);
|
|
1056
1056
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
@@ -1082,9 +1082,9 @@ protoOf(RustIrEmitter).w1v = function (module_0, logger) {
|
|
|
1082
1082
|
tmp_1 = '';
|
|
1083
1083
|
}
|
|
1084
1084
|
var clientMod = tmp_1;
|
|
1085
|
-
var modRs = new File(Companion_getInstance().
|
|
1086
|
-
var modEndpoint = new File(Companion_getInstance().
|
|
1087
|
-
var tmp_2 = Companion_getInstance().
|
|
1085
|
+
var modRs = new File(Companion_getInstance().r1h(this.p1z_1.fs() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1086
|
+
var modEndpoint = new File(Companion_getInstance().r1h(this.p1z_1.fs() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1087
|
+
var tmp_2 = Companion_getInstance().r1h(this.p1z_1.fs() + 'model/' + 'mod');
|
|
1088
1088
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1089
1089
|
var tmp0_0 = new NonEmptyList(module_0.tq_1);
|
|
1090
1090
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
@@ -1098,23 +1098,23 @@ protoOf(RustIrEmitter).w1v = function (module_0, logger) {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
var tmp_3 = destination_0;
|
|
1100
1100
|
var modModel = new File(tmp_2, listOf(new RawElement(joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emit$lambda_1(this)))));
|
|
1101
|
-
return this.
|
|
1101
|
+
return this.q1z_1.xo_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(files, modRs), modEndpoint), modModel) : NonEmptyList__plus_impl_xqmb9(files, modRs);
|
|
1102
1102
|
};
|
|
1103
1103
|
protoOf(RustIrEmitter).lr = function (definition, module_0, logger) {
|
|
1104
|
-
var subPackageName = plus_1(this.
|
|
1104
|
+
var subPackageName = plus_1(this.p1z_1, definition);
|
|
1105
1105
|
var tmp;
|
|
1106
1106
|
if (definition instanceof Endpoint) {
|
|
1107
|
-
tmp = this.
|
|
1107
|
+
tmp = this.v1z_1;
|
|
1108
1108
|
} else {
|
|
1109
|
-
tmp = this.
|
|
1109
|
+
tmp = this.u1z_1;
|
|
1110
1110
|
}
|
|
1111
1111
|
var importHeader = tmp;
|
|
1112
1112
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1113
1113
|
// Inline function 'kotlin.let' call
|
|
1114
|
-
var file = RustTransform_getInstance().
|
|
1115
|
-
var tmp_0 = Companion_getInstance().
|
|
1114
|
+
var file = RustTransform_getInstance().f20(tmp0);
|
|
1115
|
+
var tmp_0 = Companion_getInstance().r1h(subPackageName.fs() + toSnakeCase(this, file.y1n_1.s1h()));
|
|
1116
1116
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1117
|
-
var tmp0_0 = file.
|
|
1117
|
+
var tmp0_0 = file.z1n_1;
|
|
1118
1118
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1119
1119
|
var destination = ArrayList_init_$Create$_0();
|
|
1120
1120
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1131,7 +1131,7 @@ protoOf(RustIrEmitter).lr = function (definition, module_0, logger) {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1133
1133
|
};
|
|
1134
|
-
protoOf(RustIrEmitter).
|
|
1134
|
+
protoOf(RustIrEmitter).e1w = function (definition, module_0) {
|
|
1135
1135
|
var tmp;
|
|
1136
1136
|
if (definition instanceof Type) {
|
|
1137
1137
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1160,8 +1160,8 @@ protoOf(RustIrEmitter).c1w = function (definition, module_0) {
|
|
|
1160
1160
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1161
1161
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1162
1162
|
var scope = new TransformScope(generatorFile);
|
|
1163
|
-
scope.
|
|
1164
|
-
var tmp_3 = scope.
|
|
1163
|
+
scope.q1v(RustIrEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1164
|
+
var tmp_3 = scope.i1v_1;
|
|
1165
1165
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1166
1166
|
// Inline function 'kotlin.collections.filter' call
|
|
1167
1167
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1204,8 +1204,8 @@ protoOf(RustIrEmitter).c1w = function (definition, module_0) {
|
|
|
1204
1204
|
destination_2.x(tmp$ret$12);
|
|
1205
1205
|
}
|
|
1206
1206
|
var typeImports = destination_2;
|
|
1207
|
-
var subPackageName = plus_2(this.
|
|
1208
|
-
return new File(Companion_getInstance().
|
|
1207
|
+
var subPackageName = plus_2(this.p1z_1, 'generator');
|
|
1208
|
+
return new File(Companion_getInstance().r1h(subPackageName.fs() + toSnakeCase(this, generatorFile.y1n_1.s1h())), plus(plus(plus(this.u1z_1, typeImports), generatorImports), generatorFile.z1n_1));
|
|
1209
1209
|
};
|
|
1210
1210
|
protoOf(RustIrEmitter).kq = function (type, module_0) {
|
|
1211
1211
|
var tmp = convertWithValidation(type, module_0);
|
|
@@ -1235,20 +1235,20 @@ protoOf(RustIrEmitter).as = function (endpoint) {
|
|
|
1235
1235
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1236
1236
|
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_3(endpoint))))));
|
|
1237
1237
|
var scope = new TransformScope(this_0);
|
|
1238
|
-
scope.
|
|
1239
|
-
var tmp = scope.
|
|
1238
|
+
scope.n1v(fixResponseSwitchPatterns());
|
|
1239
|
+
var tmp = scope.i1v_1;
|
|
1240
1240
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1241
1241
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1242
1242
|
var scope_0 = new TransformScope(this_1);
|
|
1243
|
-
scope_0.
|
|
1244
|
-
var tmp_0 = scope_0.
|
|
1243
|
+
scope_0.n1v(fixConstructorCalls());
|
|
1244
|
+
var tmp_0 = scope_0.i1v_1;
|
|
1245
1245
|
var tmp$ret$3 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1246
1246
|
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$3), endpoint)), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1247
1247
|
};
|
|
1248
1248
|
protoOf(RustIrEmitter).or = function (channel) {
|
|
1249
1249
|
return convert_4(channel);
|
|
1250
1250
|
};
|
|
1251
|
-
protoOf(RustIrEmitter).
|
|
1251
|
+
protoOf(RustIrEmitter).d1w = function (endpoint) {
|
|
1252
1252
|
var endpointName = endpoint.up_1.l1();
|
|
1253
1253
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1254
1254
|
var clientName = endpointName + 'Client';
|
|
@@ -1298,8 +1298,8 @@ protoOf(RustIrEmitter).b1w = function (endpoint) {
|
|
|
1298
1298
|
this_1.x('}');
|
|
1299
1299
|
var tmp$ret$8 = this_1.o5();
|
|
1300
1300
|
var code = joinToString(tmp$ret$8, '\n');
|
|
1301
|
-
var subPackageName = plus_2(this.
|
|
1302
|
-
var tmp = Companion_getInstance().
|
|
1301
|
+
var subPackageName = plus_2(this.p1z_1, 'client');
|
|
1302
|
+
var tmp = Companion_getInstance().r1h(subPackageName.fs() + toSnakeCase(this, clientName));
|
|
1303
1303
|
// Inline function 'kotlin.collections.buildList' call
|
|
1304
1304
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1305
1305
|
// Inline function 'kotlin.apply' call
|
|
@@ -1311,7 +1311,7 @@ protoOf(RustIrEmitter).b1w = function (endpoint) {
|
|
|
1311
1311
|
var tmp$ret$12 = this_2.o5();
|
|
1312
1312
|
return new File(tmp, tmp$ret$12);
|
|
1313
1313
|
};
|
|
1314
|
-
protoOf(RustIrEmitter).
|
|
1314
|
+
protoOf(RustIrEmitter).a1w = function (endpoints, logger) {
|
|
1315
1315
|
logger.jr('Emitting main Client for ' + endpoints.a1() + ' endpoints');
|
|
1316
1316
|
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitClient$lambda(this));
|
|
1317
1317
|
// Inline function 'kotlin.collections.flatMap' call
|
|
@@ -1408,7 +1408,7 @@ protoOf(RustIrEmitter).y1v = function (endpoints, logger) {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
var implBlocks = destination_3;
|
|
1410
1410
|
var code = joinToString(plus(listOf_0(['pub struct Client<S: Serialization, T: Transportation> {', ' pub serialization: S,', ' pub transportation: T,', '}']), implBlocks), '\n');
|
|
1411
|
-
var tmp_0 = Companion_getInstance().
|
|
1411
|
+
var tmp_0 = Companion_getInstance().r1h(this.p1z_1.fs() + 'client');
|
|
1412
1412
|
// Inline function 'kotlin.collections.buildList' call
|
|
1413
1413
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1414
1414
|
// Inline function 'kotlin.apply' call
|
|
@@ -1436,8 +1436,8 @@ function fixResponseSwitchPatterns() {
|
|
|
1436
1436
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1437
1437
|
// Inline function 'kotlin.apply' call
|
|
1438
1438
|
var this_0 = new TransformerBuilder();
|
|
1439
|
-
this_0.
|
|
1440
|
-
return this_0.
|
|
1439
|
+
this_0.p1v(fixResponseSwitchPatterns$lambda);
|
|
1440
|
+
return this_0.c1j();
|
|
1441
1441
|
}
|
|
1442
1442
|
function buildModelImports(_this__u8e3s4) {
|
|
1443
1443
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1459,7 +1459,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1459
1459
|
var _iterator__ex2g4s_0 = list.t();
|
|
1460
1460
|
while (_iterator__ex2g4s_0.u()) {
|
|
1461
1461
|
var item = _iterator__ex2g4s_0.v();
|
|
1462
|
-
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.bv_1), Companion_getInstance().
|
|
1462
|
+
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.bv_1), Companion_getInstance().r1h(item.bv_1).s1h());
|
|
1463
1463
|
destination.x(tmp$ret$2);
|
|
1464
1464
|
}
|
|
1465
1465
|
return destination;
|
|
@@ -1471,14 +1471,14 @@ function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
1471
1471
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1472
1472
|
var tmp = scope;
|
|
1473
1473
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1474
|
-
var this_0 = scope.
|
|
1474
|
+
var this_0 = scope.i1v_1;
|
|
1475
1475
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1476
1476
|
// Inline function 'kotlin.apply' call
|
|
1477
1477
|
var this_1 = new TransformerBuilder();
|
|
1478
|
-
this_1.
|
|
1479
|
-
var tmp$ret$2 = this_1.
|
|
1480
|
-
tmp.
|
|
1481
|
-
var tmp_0 = scope.
|
|
1478
|
+
this_1.b1j(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1479
|
+
var tmp$ret$2 = this_1.c1j();
|
|
1480
|
+
tmp.i1v_1 = transform(this_0, tmp$ret$2);
|
|
1481
|
+
var tmp_0 = scope.i1v_1;
|
|
1482
1482
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1483
1483
|
}
|
|
1484
1484
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
@@ -1488,14 +1488,14 @@ function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
|
1488
1488
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1489
1489
|
var tmp = scope;
|
|
1490
1490
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1491
|
-
var this_0 = scope.
|
|
1491
|
+
var this_0 = scope.i1v_1;
|
|
1492
1492
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1493
1493
|
// Inline function 'kotlin.apply' call
|
|
1494
1494
|
var this_1 = new TransformerBuilder();
|
|
1495
|
-
this_1.
|
|
1496
|
-
var tmp$ret$2 = this_1.
|
|
1497
|
-
tmp.
|
|
1498
|
-
var tmp_0 = scope.
|
|
1495
|
+
this_1.b1j(injectApiStruct$lambda(endpoint));
|
|
1496
|
+
var tmp$ret$2 = this_1.c1j();
|
|
1497
|
+
tmp.i1v_1 = transform(this_0, tmp$ret$2);
|
|
1498
|
+
var tmp_0 = scope.i1v_1;
|
|
1499
1499
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1500
1500
|
}
|
|
1501
1501
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
@@ -1505,14 +1505,14 @@ function injectResponseFromImpls(_this__u8e3s4) {
|
|
|
1505
1505
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1506
1506
|
var tmp = scope;
|
|
1507
1507
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1508
|
-
var this_0 = scope.
|
|
1508
|
+
var this_0 = scope.i1v_1;
|
|
1509
1509
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1510
1510
|
// Inline function 'kotlin.apply' call
|
|
1511
1511
|
var this_1 = new TransformerBuilder();
|
|
1512
|
-
this_1.
|
|
1513
|
-
var tmp$ret$2 = this_1.
|
|
1514
|
-
tmp.
|
|
1515
|
-
var tmp_0 = scope.
|
|
1512
|
+
this_1.b1j(injectResponseFromImpls$lambda);
|
|
1513
|
+
var tmp$ret$2 = this_1.c1j();
|
|
1514
|
+
tmp.i1v_1 = transform(this_0, tmp$ret$2);
|
|
1515
|
+
var tmp_0 = scope.i1v_1;
|
|
1516
1516
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1517
1517
|
}
|
|
1518
1518
|
function injectHandlerImplForClient(_this__u8e3s4, endpoint) {
|
|
@@ -1522,14 +1522,14 @@ function injectHandlerImplForClient(_this__u8e3s4, endpoint) {
|
|
|
1522
1522
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1523
1523
|
var tmp = scope;
|
|
1524
1524
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1525
|
-
var this_0 = scope.
|
|
1525
|
+
var this_0 = scope.i1v_1;
|
|
1526
1526
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1527
1527
|
// Inline function 'kotlin.apply' call
|
|
1528
1528
|
var this_1 = new TransformerBuilder();
|
|
1529
|
-
this_1.
|
|
1530
|
-
var tmp$ret$2 = this_1.
|
|
1531
|
-
tmp.
|
|
1532
|
-
var tmp_0 = scope.
|
|
1529
|
+
this_1.b1j(injectHandlerImplForClient$lambda);
|
|
1530
|
+
var tmp$ret$2 = this_1.c1j();
|
|
1531
|
+
tmp.i1v_1 = transform(this_0, tmp$ret$2);
|
|
1532
|
+
var tmp_0 = scope.i1v_1;
|
|
1533
1533
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1534
1534
|
}
|
|
1535
1535
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
@@ -1539,14 +1539,14 @@ function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
|
1539
1539
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1540
1540
|
var tmp = scope;
|
|
1541
1541
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1542
|
-
var this_0 = scope.
|
|
1542
|
+
var this_0 = scope.i1v_1;
|
|
1543
1543
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1544
1544
|
// Inline function 'kotlin.apply' call
|
|
1545
1545
|
var this_1 = new TransformerBuilder();
|
|
1546
|
-
this_1.
|
|
1547
|
-
var tmp$ret$2 = this_1.
|
|
1548
|
-
tmp.
|
|
1549
|
-
var tmp_0 = scope.
|
|
1546
|
+
this_1.b1j(injectSelfToHandlerMethods$lambda);
|
|
1547
|
+
var tmp$ret$2 = this_1.c1j();
|
|
1548
|
+
tmp.i1v_1 = transform(this_0, tmp$ret$2);
|
|
1549
|
+
var tmp_0 = scope.i1v_1;
|
|
1550
1550
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1551
1551
|
}
|
|
1552
1552
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
@@ -1556,14 +1556,14 @@ function stripResponseGenerics(_this__u8e3s4) {
|
|
|
1556
1556
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1557
1557
|
var tmp = scope;
|
|
1558
1558
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1559
|
-
var this_0 = scope.
|
|
1559
|
+
var this_0 = scope.i1v_1;
|
|
1560
1560
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1561
1561
|
// Inline function 'kotlin.apply' call
|
|
1562
1562
|
var this_1 = new TransformerBuilder();
|
|
1563
|
-
this_1.
|
|
1564
|
-
var tmp$ret$2 = this_1.
|
|
1565
|
-
tmp.
|
|
1566
|
-
var tmp_0 = scope.
|
|
1563
|
+
this_1.o1v(stripResponseGenerics$lambda);
|
|
1564
|
+
var tmp$ret$2 = this_1.c1j();
|
|
1565
|
+
tmp.i1v_1 = transform(this_0, tmp$ret$2);
|
|
1566
|
+
var tmp_0 = scope.i1v_1;
|
|
1567
1567
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1568
1568
|
}
|
|
1569
1569
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
@@ -1573,14 +1573,14 @@ function stripHandlerExtends(_this__u8e3s4) {
|
|
|
1573
1573
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1574
1574
|
var tmp = scope;
|
|
1575
1575
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1576
|
-
var this_0 = scope.
|
|
1576
|
+
var this_0 = scope.i1v_1;
|
|
1577
1577
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1578
1578
|
// Inline function 'kotlin.apply' call
|
|
1579
1579
|
var this_1 = new TransformerBuilder();
|
|
1580
|
-
this_1.
|
|
1581
|
-
var tmp$ret$2 = this_1.
|
|
1582
|
-
tmp.
|
|
1583
|
-
var tmp_0 = scope.
|
|
1580
|
+
this_1.b1j(stripHandlerExtends$lambda);
|
|
1581
|
+
var tmp$ret$2 = this_1.c1j();
|
|
1582
|
+
tmp.i1v_1 = transform(this_0, tmp$ret$2);
|
|
1583
|
+
var tmp_0 = scope.i1v_1;
|
|
1584
1584
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1585
1585
|
}
|
|
1586
1586
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
@@ -1588,8 +1588,8 @@ function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
|
1588
1588
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1589
1589
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1590
1590
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1591
|
-
scope.
|
|
1592
|
-
var tmp = scope.
|
|
1591
|
+
scope.r1v(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1592
|
+
var tmp = scope.i1v_1;
|
|
1593
1593
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1594
1594
|
}
|
|
1595
1595
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
@@ -1599,21 +1599,21 @@ function stripWirespecPrefix(_this__u8e3s4) {
|
|
|
1599
1599
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1600
1600
|
var tmp = scope;
|
|
1601
1601
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1602
|
-
var this_0 = scope.
|
|
1602
|
+
var this_0 = scope.i1v_1;
|
|
1603
1603
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1604
1604
|
// Inline function 'kotlin.apply' call
|
|
1605
1605
|
var this_1 = new TransformerBuilder();
|
|
1606
|
-
this_1.
|
|
1607
|
-
var tmp$ret$2 = this_1.
|
|
1608
|
-
tmp.
|
|
1609
|
-
var tmp_0 = scope.
|
|
1606
|
+
this_1.o1v(stripWirespecPrefix$lambda);
|
|
1607
|
+
var tmp$ret$2 = this_1.c1j();
|
|
1608
|
+
tmp.i1v_1 = transform(this_0, tmp$ret$2);
|
|
1609
|
+
var tmp_0 = scope.i1v_1;
|
|
1610
1610
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1611
1611
|
}
|
|
1612
1612
|
function flattenForRust(_this__u8e3s4) {
|
|
1613
1613
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1614
1614
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1615
1615
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1616
|
-
var tmp0 = _this__u8e3s4.
|
|
1616
|
+
var tmp0 = _this__u8e3s4.a1o();
|
|
1617
1617
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1618
1618
|
var destination = ArrayList_init_$Create$_0();
|
|
1619
1619
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1626,7 +1626,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1626
1626
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1627
1627
|
var namespace = ensureNotNull(tmp$ret$2);
|
|
1628
1628
|
// Inline function 'kotlin.collections.filter' call
|
|
1629
|
-
var tmp0_0 = namespace.
|
|
1629
|
+
var tmp0_0 = namespace.f1o_1;
|
|
1630
1630
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1631
1631
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1632
1632
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1651,13 +1651,13 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1651
1651
|
var tmp_0;
|
|
1652
1652
|
var tmp_1;
|
|
1653
1653
|
if (item instanceof Union_0) {
|
|
1654
|
-
tmp_1 = item.
|
|
1654
|
+
tmp_1 = item.h1r_1.s1h() === 'Response';
|
|
1655
1655
|
} else {
|
|
1656
1656
|
tmp_1 = false;
|
|
1657
1657
|
}
|
|
1658
1658
|
if (tmp_1) {
|
|
1659
1659
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1660
|
-
var tmp0_1 = namespace.
|
|
1660
|
+
var tmp0_1 = namespace.f1o_1;
|
|
1661
1661
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1662
1662
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1663
1663
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -1673,7 +1673,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1673
1673
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1674
1674
|
while (_iterator__ex2g4s_3.u()) {
|
|
1675
1675
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1676
|
-
var tmp$ret$8 = item_0.
|
|
1676
|
+
var tmp$ret$8 = item_0.j1o_1.s1h();
|
|
1677
1677
|
destination_3.x(tmp$ret$8);
|
|
1678
1678
|
}
|
|
1679
1679
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -1696,10 +1696,10 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1696
1696
|
destination_5.x(tmp$ret$14);
|
|
1697
1697
|
}
|
|
1698
1698
|
var members = destination_5;
|
|
1699
|
-
tmp_0 = item.
|
|
1699
|
+
tmp_0 = item.m1r(VOID, VOID, members, emptyList());
|
|
1700
1700
|
} else {
|
|
1701
1701
|
if (item instanceof Union_0) {
|
|
1702
|
-
tmp_0 = item.
|
|
1702
|
+
tmp_0 = item.m1r(VOID, VOID, VOID, emptyList());
|
|
1703
1703
|
} else {
|
|
1704
1704
|
tmp_0 = item;
|
|
1705
1705
|
}
|
|
@@ -1709,7 +1709,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1709
1709
|
}
|
|
1710
1710
|
var moduleElements = destination_1;
|
|
1711
1711
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1712
|
-
var tmp0_2 = namespace.
|
|
1712
|
+
var tmp0_2 = namespace.f1o_1;
|
|
1713
1713
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1714
1714
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1715
1715
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1726,15 +1726,15 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
1728
|
var classElements = destination_6;
|
|
1729
|
-
return new File(namespace.
|
|
1729
|
+
return new File(namespace.e1o_1, plus_0(moduleElements, new Namespace(namespace.e1o_1, classElements, namespace.g1o_1)));
|
|
1730
1730
|
}
|
|
1731
1731
|
function fixConstructorCalls() {
|
|
1732
1732
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1733
1733
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1734
1734
|
// Inline function 'kotlin.apply' call
|
|
1735
1735
|
var this_0 = new TransformerBuilder();
|
|
1736
|
-
this_0.
|
|
1737
|
-
return this_0.
|
|
1736
|
+
this_0.r1v(fixConstructorCalls$lambda);
|
|
1737
|
+
return this_0.c1j();
|
|
1738
1738
|
}
|
|
1739
1739
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1740
1740
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1756,18 +1756,18 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1756
1756
|
var _iterator__ex2g4s_0 = list.t();
|
|
1757
1757
|
while (_iterator__ex2g4s_0.u()) {
|
|
1758
1758
|
var item = _iterator__ex2g4s_0.v();
|
|
1759
|
-
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.bv_1), Companion_getInstance().
|
|
1759
|
+
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.bv_1), Companion_getInstance().r1h(item.bv_1).s1h());
|
|
1760
1760
|
destination.x(tmp$ret$2);
|
|
1761
1761
|
}
|
|
1762
1762
|
return destination;
|
|
1763
1763
|
}
|
|
1764
1764
|
function toRustSnakeCase(_this__u8e3s4) {
|
|
1765
1765
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1766
|
-
return Companion_getInstance().
|
|
1766
|
+
return Companion_getInstance().r1h(_this__u8e3s4).z1m();
|
|
1767
1767
|
}
|
|
1768
1768
|
function buildValidateFunction(refined) {
|
|
1769
1769
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1770
|
-
var constraintExpr = convertConstraint(refined.tr_1, new FieldCall(new VariableReference(Companion_getInstance().
|
|
1770
|
+
var constraintExpr = convertConstraint(refined.tr_1, new FieldCall(new VariableReference(Companion_getInstance().r1h('self')), Companion_getInstance().r1h('value')));
|
|
1771
1771
|
return function_0('validate', VOID, VOID, buildValidateFunction$lambda(constraintExpr));
|
|
1772
1772
|
}
|
|
1773
1773
|
function buildToStringFunction(refined) {
|
|
@@ -1798,56 +1798,56 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1798
1798
|
if (!(s instanceof Switch)) {
|
|
1799
1799
|
tmp = true;
|
|
1800
1800
|
} else {
|
|
1801
|
-
var tmp0_safe_receiver = s.
|
|
1802
|
-
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1801
|
+
var tmp0_safe_receiver = s.j1q_1;
|
|
1802
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t1m()) === 'r');
|
|
1803
1803
|
}
|
|
1804
1804
|
if (tmp)
|
|
1805
1805
|
return transformChildren(s, t);
|
|
1806
1806
|
// Inline function 'kotlin.collections.map' call
|
|
1807
|
-
var this_0 = s.
|
|
1807
|
+
var this_0 = s.h1q_1;
|
|
1808
1808
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1809
1809
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1810
1810
|
var _iterator__ex2g4s = this_0.t();
|
|
1811
1811
|
while (_iterator__ex2g4s.u()) {
|
|
1812
1812
|
var item = _iterator__ex2g4s.v();
|
|
1813
|
-
var tmp_0 = item.
|
|
1813
|
+
var tmp_0 = item.o1q_1;
|
|
1814
1814
|
var tmp0_safe_receiver_0 = tmp_0 instanceof Custom ? tmp_0 : null;
|
|
1815
|
-
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.
|
|
1816
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1815
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.l1j_1;
|
|
1816
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s1h();
|
|
1817
1817
|
var tmp_1;
|
|
1818
1818
|
if (!(typeName == null) && get_rustResponsePattern().oc(typeName)) {
|
|
1819
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1819
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.j1q_1).z1m() + ')');
|
|
1820
1820
|
// Inline function 'kotlin.collections.map' call
|
|
1821
|
-
var this_1 = item.
|
|
1821
|
+
var this_1 = item.n1q_1;
|
|
1822
1822
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1823
1823
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1824
1824
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1825
1825
|
while (_iterator__ex2g4s_0.u()) {
|
|
1826
1826
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1827
|
-
var tmp$ret$0 = t.
|
|
1827
|
+
var tmp$ret$0 = t.c1v(item_0);
|
|
1828
1828
|
destination_0.x(tmp$ret$0);
|
|
1829
1829
|
}
|
|
1830
1830
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1831
1831
|
} else {
|
|
1832
|
-
var tmp_3 = t.
|
|
1832
|
+
var tmp_3 = t.d1v(item.m1q_1);
|
|
1833
1833
|
// Inline function 'kotlin.collections.map' call
|
|
1834
|
-
var this_2 = item.
|
|
1834
|
+
var this_2 = item.n1q_1;
|
|
1835
1835
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1836
1836
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1837
1837
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1838
1838
|
while (_iterator__ex2g4s_1.u()) {
|
|
1839
1839
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1840
|
-
var tmp$ret$3 = t.
|
|
1840
|
+
var tmp$ret$3 = t.c1v(item_1);
|
|
1841
1841
|
destination_1.x(tmp$ret$3);
|
|
1842
1842
|
}
|
|
1843
1843
|
var tmp_4 = destination_1;
|
|
1844
|
-
var tmp2_safe_receiver = item.
|
|
1844
|
+
var tmp2_safe_receiver = item.o1q_1;
|
|
1845
1845
|
var tmp_5;
|
|
1846
1846
|
if (tmp2_safe_receiver == null) {
|
|
1847
1847
|
tmp_5 = null;
|
|
1848
1848
|
} else {
|
|
1849
1849
|
// Inline function 'kotlin.let' call
|
|
1850
|
-
tmp_5 = t.
|
|
1850
|
+
tmp_5 = t.a1v(tmp2_safe_receiver);
|
|
1851
1851
|
}
|
|
1852
1852
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1853
1853
|
}
|
|
@@ -1855,13 +1855,13 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1855
1855
|
destination.x(tmp$ret$8);
|
|
1856
1856
|
}
|
|
1857
1857
|
var transformedCases = destination;
|
|
1858
|
-
return s.
|
|
1858
|
+
return s.l1q(t.d1v(s.g1q_1), transformedCases, null);
|
|
1859
1859
|
}
|
|
1860
1860
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1861
1861
|
return function (element, transformer) {
|
|
1862
1862
|
var tmp;
|
|
1863
1863
|
if (element instanceof Struct) {
|
|
1864
|
-
tmp = element.
|
|
1864
|
+
tmp = element.q1o(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1865
1865
|
} else {
|
|
1866
1866
|
tmp = element;
|
|
1867
1867
|
}
|
|
@@ -1873,7 +1873,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1873
1873
|
return function (element, transformer) {
|
|
1874
1874
|
var tmp;
|
|
1875
1875
|
if (element instanceof Namespace) {
|
|
1876
|
-
tmp = element.
|
|
1876
|
+
tmp = element.i1o(VOID, plus(element.f1o_1, listOf(buildApiStruct($endpoint))));
|
|
1877
1877
|
} else {
|
|
1878
1878
|
tmp = element;
|
|
1879
1879
|
}
|
|
@@ -1886,7 +1886,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1886
1886
|
var tmp;
|
|
1887
1887
|
if (element instanceof File) {
|
|
1888
1888
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1889
|
-
var tmp0 = element.
|
|
1889
|
+
var tmp0 = element.z1n_1;
|
|
1890
1890
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1891
1891
|
var destination = ArrayList_init_$Create$_0();
|
|
1892
1892
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1896,26 +1896,26 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1896
1896
|
var tmp_1;
|
|
1897
1897
|
var tmp_2;
|
|
1898
1898
|
if (element_0 instanceof Union_0) {
|
|
1899
|
-
tmp_2 = element_0.
|
|
1899
|
+
tmp_2 = element_0.h1r_1.s1h() === 'Response';
|
|
1900
1900
|
} else {
|
|
1901
1901
|
tmp_2 = false;
|
|
1902
1902
|
}
|
|
1903
1903
|
if (tmp_2) {
|
|
1904
1904
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1905
|
-
tmp_1 = !element_0.
|
|
1905
|
+
tmp_1 = !element_0.j1r_1.r();
|
|
1906
1906
|
} else {
|
|
1907
1907
|
tmp_1 = false;
|
|
1908
1908
|
}
|
|
1909
1909
|
if (tmp_1) {
|
|
1910
1910
|
var tmp_3 = listOf(element_0);
|
|
1911
1911
|
// Inline function 'kotlin.collections.map' call
|
|
1912
|
-
var this_0 = element_0.
|
|
1912
|
+
var this_0 = element_0.j1r_1;
|
|
1913
1913
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1914
1914
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1915
1915
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1916
1916
|
while (_iterator__ex2g4s_0.u()) {
|
|
1917
1917
|
var item = _iterator__ex2g4s_0.v();
|
|
1918
|
-
var memberName = item.
|
|
1918
|
+
var memberName = item.l1j_1.s1h();
|
|
1919
1919
|
var tmp$ret$1 = new RawElement('impl From<' + memberName + '> for Response { fn from(value: ' + memberName + ') -> Self { Response::' + memberName + '(value) } }\n');
|
|
1920
1920
|
destination_0.x(tmp$ret$1);
|
|
1921
1921
|
}
|
|
@@ -1926,7 +1926,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1926
1926
|
var list = tmp_0;
|
|
1927
1927
|
addAll(destination, list);
|
|
1928
1928
|
}
|
|
1929
|
-
tmp = element.
|
|
1929
|
+
tmp = element.c1o(VOID, destination);
|
|
1930
1930
|
} else {
|
|
1931
1931
|
tmp = element;
|
|
1932
1932
|
}
|
|
@@ -1940,7 +1940,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1940
1940
|
var tmp$ret$4;
|
|
1941
1941
|
$l$block_1: {
|
|
1942
1942
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1943
|
-
var tmp0 = element.
|
|
1943
|
+
var tmp0 = element.f1o_1;
|
|
1944
1944
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1945
1945
|
var destination = ArrayList_init_$Create$_0();
|
|
1946
1946
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1956,7 +1956,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1956
1956
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1957
1957
|
while (_iterator__ex2g4s_0.u()) {
|
|
1958
1958
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
1959
|
-
if (element_1.
|
|
1959
|
+
if (element_1.s1o_1.equals(Companion_getInstance().r1h('Handler'))) {
|
|
1960
1960
|
tmp$ret$3 = element_1;
|
|
1961
1961
|
break $l$block;
|
|
1962
1962
|
}
|
|
@@ -1973,7 +1973,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1973
1973
|
}
|
|
1974
1974
|
var handler = tmp_0;
|
|
1975
1975
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1976
|
-
var tmp0_0 = handler.
|
|
1976
|
+
var tmp0_0 = handler.t1o_1;
|
|
1977
1977
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1978
1978
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1979
1979
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
@@ -1992,8 +1992,8 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1992
1992
|
tmp_1 = tmp1_elvis_lhs;
|
|
1993
1993
|
}
|
|
1994
1994
|
var method = tmp_1;
|
|
1995
|
-
var methodName = method.
|
|
1996
|
-
tmp$ret$4 = element.
|
|
1995
|
+
var methodName = method.h1l_1.z1m();
|
|
1996
|
+
tmp$ret$4 = element.i1o(VOID, plus(element.f1o_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 ')))));
|
|
1997
1997
|
}
|
|
1998
1998
|
tmp = tmp$ret$4;
|
|
1999
1999
|
} else {
|
|
@@ -2008,7 +2008,7 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2008
2008
|
if (element instanceof Interface) {
|
|
2009
2009
|
var tmp$ret$0;
|
|
2010
2010
|
$l$block: {
|
|
2011
|
-
if (!element.
|
|
2011
|
+
if (!element.s1o_1.equals(Companion_getInstance().r1h('Handler')) && !element.s1o_1.equals(Companion_getInstance().r1h('Call'))) {
|
|
2012
2012
|
tmp$ret$0 = element;
|
|
2013
2013
|
break $l$block;
|
|
2014
2014
|
}
|
|
@@ -2017,14 +2017,14 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2017
2017
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
2018
2018
|
var tmp_0 = scope;
|
|
2019
2019
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
2020
|
-
var this_0 = scope.
|
|
2020
|
+
var this_0 = scope.i1v_1;
|
|
2021
2021
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2022
2022
|
// Inline function 'kotlin.apply' call
|
|
2023
2023
|
var this_1 = new TransformerBuilder();
|
|
2024
|
-
this_1.
|
|
2025
|
-
var tmp$ret$3 = this_1.
|
|
2026
|
-
tmp_0.
|
|
2027
|
-
var tmp_1 = scope.
|
|
2024
|
+
this_1.b1j(injectSelfToHandlerMethods$lambda$lambda);
|
|
2025
|
+
var tmp$ret$3 = this_1.c1j();
|
|
2026
|
+
tmp_0.i1v_1 = transform(this_0, tmp$ret$3);
|
|
2027
|
+
var tmp_1 = scope.i1v_1;
|
|
2028
2028
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2029
2029
|
}
|
|
2030
2030
|
tmp = tmp$ret$0;
|
|
@@ -2038,7 +2038,7 @@ function injectSelfToHandlerMethods$lambda$lambda(element, transformer) {
|
|
|
2038
2038
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2039
2039
|
var tmp;
|
|
2040
2040
|
if (element instanceof Function_0) {
|
|
2041
|
-
tmp = element.
|
|
2041
|
+
tmp = element.p1l(Companion_getInstance().r1h(element.h1l_1.z1m()), VOID, plus(listOf(get_rustSelfParam()), element.j1l_1));
|
|
2042
2042
|
} else {
|
|
2043
2043
|
tmp = element;
|
|
2044
2044
|
}
|
|
@@ -2051,14 +2051,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2051
2051
|
if (type instanceof Custom) {
|
|
2052
2052
|
var tmp_0;
|
|
2053
2053
|
var tmp_1;
|
|
2054
|
-
if (startsWith(type.
|
|
2054
|
+
if (startsWith(type.l1j_1.s1h(), 'Response')) {
|
|
2055
2055
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2056
|
-
tmp_1 = !type.
|
|
2056
|
+
tmp_1 = !type.m1j_1.r();
|
|
2057
2057
|
} else {
|
|
2058
2058
|
tmp_1 = false;
|
|
2059
2059
|
}
|
|
2060
2060
|
if (tmp_1) {
|
|
2061
|
-
tmp_0 = type.
|
|
2061
|
+
tmp_0 = type.p1n(VOID, emptyList());
|
|
2062
2062
|
} else {
|
|
2063
2063
|
tmp_0 = type;
|
|
2064
2064
|
}
|
|
@@ -2073,7 +2073,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2073
2073
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2074
2074
|
var tmp;
|
|
2075
2075
|
if (element instanceof Interface) {
|
|
2076
|
-
tmp = element.
|
|
2076
|
+
tmp = element.s1o_1.equals(Companion_getInstance().r1h('Handler')) || element.s1o_1.equals(Companion_getInstance().r1h('Call')) ? element.z1o(VOID, VOID, emptyList()) : element;
|
|
2077
2077
|
} else {
|
|
2078
2078
|
tmp = element;
|
|
2079
2079
|
}
|
|
@@ -2086,17 +2086,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2086
2086
|
var tmp_0;
|
|
2087
2087
|
var tmp_1;
|
|
2088
2088
|
if (s instanceof RawExpression) {
|
|
2089
|
-
tmp_1 = $identifierPattern.oc(s.
|
|
2089
|
+
tmp_1 = $identifierPattern.oc(s.p1p_1);
|
|
2090
2090
|
} else {
|
|
2091
2091
|
tmp_1 = false;
|
|
2092
2092
|
}
|
|
2093
2093
|
if (tmp_1) {
|
|
2094
|
-
tmp_0 = !contains(s.
|
|
2094
|
+
tmp_0 = !contains(s.p1p_1, '.');
|
|
2095
2095
|
} else {
|
|
2096
2096
|
tmp_0 = false;
|
|
2097
2097
|
}
|
|
2098
2098
|
if (tmp_0) {
|
|
2099
|
-
tmp = new VariableReference(Companion_getInstance().
|
|
2099
|
+
tmp = new VariableReference(Companion_getInstance().r1h(s.p1p_1));
|
|
2100
2100
|
} else {
|
|
2101
2101
|
tmp = transformChildren(s, t);
|
|
2102
2102
|
}
|
|
@@ -2107,10 +2107,10 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2107
2107
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2108
2108
|
var tmp;
|
|
2109
2109
|
if (type instanceof Custom) {
|
|
2110
|
-
var pascalName = type.
|
|
2110
|
+
var pascalName = type.l1j_1.s1h();
|
|
2111
2111
|
var tmp_0;
|
|
2112
2112
|
if (startsWith(pascalName, 'Wirespec.')) {
|
|
2113
|
-
tmp_0 = type.
|
|
2113
|
+
tmp_0 = type.p1n(Companion_getInstance().r1h(removePrefix(pascalName, 'Wirespec.')));
|
|
2114
2114
|
} else {
|
|
2115
2115
|
tmp_0 = type;
|
|
2116
2116
|
}
|
|
@@ -2125,12 +2125,12 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2125
2125
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2126
2126
|
if (!(s instanceof ConstructorStatement))
|
|
2127
2127
|
return transformChildren(s, t);
|
|
2128
|
-
var tmp = s.
|
|
2128
|
+
var tmp = s.v1n_1;
|
|
2129
2129
|
var tmp0_safe_receiver = tmp instanceof Custom ? tmp : null;
|
|
2130
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2131
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
2130
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l1j_1;
|
|
2131
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s1h();
|
|
2132
2132
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2133
|
-
var this_0 = s.
|
|
2133
|
+
var this_0 = s.w1n_1;
|
|
2134
2134
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2135
2135
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.a1()));
|
|
2136
2136
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -2138,25 +2138,25 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2138
2138
|
while (_iterator__ex2g4s.u()) {
|
|
2139
2139
|
var element = _iterator__ex2g4s.v();
|
|
2140
2140
|
var tmp_0 = element.k1();
|
|
2141
|
-
var tmp$ret$1 = t.
|
|
2141
|
+
var tmp$ret$1 = t.d1v(element.l1());
|
|
2142
2142
|
destination.s2(tmp_0, tmp$ret$1);
|
|
2143
2143
|
}
|
|
2144
2144
|
var transformedArgs = destination;
|
|
2145
|
-
return !(typeName == null) && get_rustResponsePattern().oc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().
|
|
2145
|
+
return !(typeName == null) && get_rustResponsePattern().oc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().r1h('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);
|
|
2146
2146
|
}
|
|
2147
2147
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2148
2148
|
return function ($this$function) {
|
|
2149
|
-
$this$function.
|
|
2150
|
-
$this$function.
|
|
2151
|
-
$this$function.
|
|
2149
|
+
$this$function.c1i('&self', Custom_init_$Create$(''));
|
|
2150
|
+
$this$function.f1i(Boolean_instance);
|
|
2151
|
+
$this$function.g1i($constraintExpr);
|
|
2152
2152
|
return Unit_instance;
|
|
2153
2153
|
};
|
|
2154
2154
|
}
|
|
2155
2155
|
function buildToStringFunction$lambda($expr) {
|
|
2156
2156
|
return function ($this$function) {
|
|
2157
|
-
$this$function.
|
|
2158
|
-
$this$function.
|
|
2159
|
-
$this$function.
|
|
2157
|
+
$this$function.c1i('&self', Custom_init_$Create$(''));
|
|
2158
|
+
$this$function.f1i(String_instance);
|
|
2159
|
+
$this$function.g1i(new RawExpression($expr));
|
|
2160
2160
|
return Unit_instance;
|
|
2161
2161
|
};
|
|
2162
2162
|
}
|
|
@@ -2178,39 +2178,39 @@ var properties_initialized_RustIrTransformer_kt_hr6k9w;
|
|
|
2178
2178
|
function _init_properties_RustIrTransformer_kt__rrvmwq() {
|
|
2179
2179
|
if (!properties_initialized_RustIrTransformer_kt_hr6k9w) {
|
|
2180
2180
|
properties_initialized_RustIrTransformer_kt_hr6k9w = true;
|
|
2181
|
-
rustSelfParam = new Parameter(Companion_getInstance().
|
|
2181
|
+
rustSelfParam = new Parameter(Companion_getInstance().r1h('&self'), Custom_init_$Create$(''));
|
|
2182
2182
|
rustResponsePattern = Regex_init_$Create$('Response(\\d+|Default)');
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
2185
|
function borrowParamsOf($this, fn) {
|
|
2186
2186
|
// Inline function 'kotlin.collections.map' call
|
|
2187
|
-
var this_0 = fn.
|
|
2187
|
+
var this_0 = fn.j1l_1;
|
|
2188
2188
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2189
2189
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2190
2190
|
var _iterator__ex2g4s = this_0.t();
|
|
2191
2191
|
while (_iterator__ex2g4s.u()) {
|
|
2192
2192
|
var item = _iterator__ex2g4s.v();
|
|
2193
2193
|
var tmp;
|
|
2194
|
-
if (RustTransform_getInstance().
|
|
2194
|
+
if (RustTransform_getInstance().g20(item.v1q_1)) {
|
|
2195
2195
|
tmp = item;
|
|
2196
2196
|
} else {
|
|
2197
|
-
tmp = item.
|
|
2197
|
+
tmp = item.y1q(VOID, applyBorrowRule(RustTransform_getInstance(), item.w1q_1));
|
|
2198
2198
|
}
|
|
2199
2199
|
var tmp$ret$0 = tmp;
|
|
2200
2200
|
destination.x(tmp$ret$0);
|
|
2201
2201
|
}
|
|
2202
|
-
return fn.
|
|
2202
|
+
return fn.p1l(VOID, VOID, destination);
|
|
2203
2203
|
}
|
|
2204
2204
|
function applyBorrowRule($this, type) {
|
|
2205
2205
|
var tmp;
|
|
2206
2206
|
if (type instanceof Nullable) {
|
|
2207
|
-
tmp = new Nullable(applyBorrowRule($this, type.
|
|
2207
|
+
tmp = new Nullable(applyBorrowRule($this, type.j1j_1));
|
|
2208
2208
|
} else {
|
|
2209
2209
|
if (equals(type, String_instance)) {
|
|
2210
2210
|
tmp = Custom_init_$Create$('&str');
|
|
2211
2211
|
} else {
|
|
2212
2212
|
if (type instanceof Custom) {
|
|
2213
|
-
tmp = $this.
|
|
2213
|
+
tmp = $this.j20(type) ? type : $this.i20(type) ? borrowImpl(type) : $this.h20(type) ? ownedImpl(type) : type;
|
|
2214
2214
|
} else {
|
|
2215
2215
|
tmp = type;
|
|
2216
2216
|
}
|
|
@@ -2222,15 +2222,15 @@ function toBorrowedRaw($this, _this__u8e3s4) {
|
|
|
2222
2222
|
return new RawExpression('&' + toRawCode($this, _this__u8e3s4));
|
|
2223
2223
|
}
|
|
2224
2224
|
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
2225
|
-
return Companion_getInstance_0().
|
|
2225
|
+
return Companion_getInstance_0().w1z_1.u1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
2226
2226
|
}
|
|
2227
2227
|
function toRawCode($this, _this__u8e3s4) {
|
|
2228
2228
|
var tmp;
|
|
2229
2229
|
if (_this__u8e3s4 instanceof VariableReference) {
|
|
2230
|
-
tmp = sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2230
|
+
tmp = sanitizeKeywords_0($this, _this__u8e3s4.n1p_1.z1m());
|
|
2231
2231
|
} else {
|
|
2232
2232
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
2233
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
2233
|
+
var tmp1_safe_receiver = _this__u8e3s4.r1q_1;
|
|
2234
2234
|
var tmp_0;
|
|
2235
2235
|
if (tmp1_safe_receiver == null) {
|
|
2236
2236
|
tmp_0 = null;
|
|
@@ -2240,20 +2240,20 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2240
2240
|
}
|
|
2241
2241
|
var tmp2_elvis_lhs = tmp_0;
|
|
2242
2242
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2243
|
-
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2243
|
+
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.s1q_1.z1m());
|
|
2244
2244
|
} else {
|
|
2245
2245
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
2246
|
-
var tmp_1 = _this__u8e3s4.
|
|
2246
|
+
var tmp_1 = _this__u8e3s4.o1r_1;
|
|
2247
2247
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2248
2248
|
var tmp_2;
|
|
2249
2249
|
var tmp_3;
|
|
2250
2250
|
if (!(lit == null)) {
|
|
2251
2251
|
var tmp_4;
|
|
2252
|
-
var tmp_5 = lit.
|
|
2252
|
+
var tmp_5 = lit.y1p_1;
|
|
2253
2253
|
if (tmp_5 instanceof Integer) {
|
|
2254
2254
|
tmp_4 = true;
|
|
2255
2255
|
} else {
|
|
2256
|
-
var tmp_6 = lit.
|
|
2256
|
+
var tmp_6 = lit.y1p_1;
|
|
2257
2257
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2258
2258
|
}
|
|
2259
2259
|
tmp_3 = tmp_4;
|
|
@@ -2261,31 +2261,31 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2261
2261
|
tmp_3 = false;
|
|
2262
2262
|
}
|
|
2263
2263
|
if (tmp_3) {
|
|
2264
|
-
tmp_2 = toString_0(lit.
|
|
2264
|
+
tmp_2 = toString_0(lit.x1p_1);
|
|
2265
2265
|
} else {
|
|
2266
2266
|
var tmp_7;
|
|
2267
2267
|
if (!(lit == null)) {
|
|
2268
|
-
var tmp_8 = lit.
|
|
2268
|
+
var tmp_8 = lit.y1p_1;
|
|
2269
2269
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2270
2270
|
} else {
|
|
2271
2271
|
tmp_7 = false;
|
|
2272
2272
|
}
|
|
2273
2273
|
if (tmp_7) {
|
|
2274
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2274
|
+
tmp_2 = '"' + toString_0(lit.x1p_1) + '"';
|
|
2275
2275
|
} else {
|
|
2276
|
-
tmp_2 = toRawCode($this, _this__u8e3s4.
|
|
2276
|
+
tmp_2 = toRawCode($this, _this__u8e3s4.o1r_1);
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
2279
|
var idx = tmp_2;
|
|
2280
|
-
tmp = toRawCode($this, _this__u8e3s4.
|
|
2280
|
+
tmp = toRawCode($this, _this__u8e3s4.n1r_1) + '[' + idx + ']';
|
|
2281
2281
|
} else {
|
|
2282
2282
|
if (_this__u8e3s4 instanceof ConstructorStatement) {
|
|
2283
|
-
var tmp_9 = _this__u8e3s4.
|
|
2283
|
+
var tmp_9 = _this__u8e3s4.v1n_1;
|
|
2284
2284
|
var tmp3_safe_receiver = tmp_9 instanceof Custom ? tmp_9 : null;
|
|
2285
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
2286
|
-
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
2287
|
-
var typeName = tmp5_elvis_lhs == null ? toString_0(_this__u8e3s4.
|
|
2288
|
-
var tmp_10 = _this__u8e3s4.
|
|
2285
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.l1j_1;
|
|
2286
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.s1h();
|
|
2287
|
+
var typeName = tmp5_elvis_lhs == null ? toString_0(_this__u8e3s4.v1n_1) : tmp5_elvis_lhs;
|
|
2288
|
+
var tmp_10 = _this__u8e3s4.w1n_1.j1();
|
|
2289
2289
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2290
2290
|
var tmp_11;
|
|
2291
2291
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2298,23 +2298,23 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2298
2298
|
} else {
|
|
2299
2299
|
if (_this__u8e3s4 instanceof Literal_0) {
|
|
2300
2300
|
var tmp_12;
|
|
2301
|
-
var tmp_13 = _this__u8e3s4.
|
|
2301
|
+
var tmp_13 = _this__u8e3s4.y1p_1;
|
|
2302
2302
|
if (tmp_13 instanceof String_1) {
|
|
2303
|
-
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.
|
|
2303
|
+
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.x1p_1) + '")';
|
|
2304
2304
|
} else {
|
|
2305
|
-
var tmp_14 = _this__u8e3s4.
|
|
2305
|
+
var tmp_14 = _this__u8e3s4.y1p_1;
|
|
2306
2306
|
if (tmp_14 instanceof Boolean_0) {
|
|
2307
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2307
|
+
tmp_12 = toString_0(_this__u8e3s4.x1p_1);
|
|
2308
2308
|
} else {
|
|
2309
|
-
var tmp_15 = _this__u8e3s4.
|
|
2309
|
+
var tmp_15 = _this__u8e3s4.y1p_1;
|
|
2310
2310
|
if (tmp_15 instanceof Integer) {
|
|
2311
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2311
|
+
tmp_12 = toString_0(_this__u8e3s4.x1p_1);
|
|
2312
2312
|
} else {
|
|
2313
|
-
var tmp_16 = _this__u8e3s4.
|
|
2313
|
+
var tmp_16 = _this__u8e3s4.y1p_1;
|
|
2314
2314
|
if (tmp_16 instanceof Number_0) {
|
|
2315
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2315
|
+
tmp_12 = toString_0(_this__u8e3s4.x1p_1);
|
|
2316
2316
|
} else {
|
|
2317
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2317
|
+
tmp_12 = toString_0(_this__u8e3s4.x1p_1);
|
|
2318
2318
|
}
|
|
2319
2319
|
}
|
|
2320
2320
|
}
|
|
@@ -2322,7 +2322,7 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2322
2322
|
tmp = tmp_12;
|
|
2323
2323
|
} else {
|
|
2324
2324
|
if (_this__u8e3s4 instanceof RawExpression) {
|
|
2325
|
-
tmp = _this__u8e3s4.
|
|
2325
|
+
tmp = _this__u8e3s4.p1p_1;
|
|
2326
2326
|
} else {
|
|
2327
2327
|
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression(_this__u8e3s4).o();
|
|
2328
2328
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
@@ -2367,11 +2367,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2367
2367
|
var tmp;
|
|
2368
2368
|
if (element instanceof Interface) {
|
|
2369
2369
|
var tmp_0;
|
|
2370
|
-
if (element.
|
|
2370
|
+
if (element.s1o_1.equals(Companion_getInstance().r1h('Call'))) {
|
|
2371
2371
|
tmp_0 = element;
|
|
2372
2372
|
} else {
|
|
2373
2373
|
// Inline function 'kotlin.collections.map' call
|
|
2374
|
-
var this_0 = element.
|
|
2374
|
+
var this_0 = element.t1o_1;
|
|
2375
2375
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2376
2376
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2377
2377
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2387,7 +2387,7 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2387
2387
|
destination.x(tmp$ret$0);
|
|
2388
2388
|
}
|
|
2389
2389
|
var borrowed = destination;
|
|
2390
|
-
tmp_0 = transformChildren_0(element.
|
|
2390
|
+
tmp_0 = transformChildren_0(element.z1o(VOID, borrowed), tr);
|
|
2391
2391
|
}
|
|
2392
2392
|
tmp = tmp_0;
|
|
2393
2393
|
} else {
|
|
@@ -2403,13 +2403,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2403
2403
|
var tmp;
|
|
2404
2404
|
var tmp_0;
|
|
2405
2405
|
if (s instanceof FunctionCall) {
|
|
2406
|
-
tmp_0 = RustTransform_getInstance().
|
|
2406
|
+
tmp_0 = RustTransform_getInstance().b20_1.u1(s.d1n_1.z1m());
|
|
2407
2407
|
} else {
|
|
2408
2408
|
tmp_0 = false;
|
|
2409
2409
|
}
|
|
2410
2410
|
if (tmp_0) {
|
|
2411
2411
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2412
|
-
var this_0 = s.
|
|
2412
|
+
var this_0 = s.e1n_1.j1();
|
|
2413
2413
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2414
2414
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2415
2415
|
var index = 0;
|
|
@@ -2423,13 +2423,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2423
2423
|
var key = item.k1();
|
|
2424
2424
|
// Inline function 'kotlin.collections.component2' call
|
|
2425
2425
|
var value = item.l1();
|
|
2426
|
-
var transformed = t.
|
|
2426
|
+
var transformed = t.d1v(value);
|
|
2427
2427
|
var tmp_1;
|
|
2428
2428
|
var tmp_2;
|
|
2429
2429
|
if (idx === 0) {
|
|
2430
2430
|
var tmp_3;
|
|
2431
2431
|
if (transformed instanceof VariableReference) {
|
|
2432
|
-
tmp_3 = transformed.
|
|
2432
|
+
tmp_3 = transformed.n1p_1.n1j() === 'it';
|
|
2433
2433
|
} else {
|
|
2434
2434
|
tmp_3 = false;
|
|
2435
2435
|
}
|
|
@@ -2446,20 +2446,20 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2446
2446
|
destination.x(tmp$ret$2);
|
|
2447
2447
|
}
|
|
2448
2448
|
var newArgs = toMap(destination);
|
|
2449
|
-
tmp = s.
|
|
2449
|
+
tmp = s.h1n(VOID, VOID, VOID, newArgs);
|
|
2450
2450
|
} else {
|
|
2451
2451
|
tmp = transformChildren(s, t);
|
|
2452
2452
|
}
|
|
2453
2453
|
return tmp;
|
|
2454
2454
|
}
|
|
2455
2455
|
function RustTransform$rustName$lambda(it) {
|
|
2456
|
-
return RustTransform_getInstance().
|
|
2456
|
+
return RustTransform_getInstance().e20(it);
|
|
2457
2457
|
}
|
|
2458
2458
|
function RustTransform$rustName$lambda_0(it) {
|
|
2459
|
-
return RustTransform_getInstance().
|
|
2459
|
+
return RustTransform_getInstance().e20(it);
|
|
2460
2460
|
}
|
|
2461
2461
|
function RustTransform$toRawCode$lambda(it) {
|
|
2462
|
-
return it.k1().
|
|
2462
|
+
return it.k1().z1m() + ': ' + toRawCode(RustTransform_getInstance(), it.l1());
|
|
2463
2463
|
}
|
|
2464
2464
|
function RustTransform() {
|
|
2465
2465
|
RustTransform_instance = this;
|
|
@@ -2467,58 +2467,58 @@ function RustTransform() {
|
|
|
2467
2467
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2468
2468
|
// Inline function 'kotlin.apply' call
|
|
2469
2469
|
var this_0 = new TransformerBuilder();
|
|
2470
|
-
this_0.
|
|
2471
|
-
tmp.
|
|
2470
|
+
this_0.o1v(RustTransform$primitivesToCustom$lambda);
|
|
2471
|
+
tmp.y1z_1 = this_0.c1j();
|
|
2472
2472
|
var tmp_0 = this;
|
|
2473
2473
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2474
2474
|
// Inline function 'kotlin.apply' call
|
|
2475
2475
|
var this_1 = new TransformerBuilder();
|
|
2476
|
-
this_1.
|
|
2477
|
-
tmp_0.
|
|
2476
|
+
this_1.b1j(RustTransform$borrow$lambda);
|
|
2477
|
+
tmp_0.z1z_1 = this_1.c1j();
|
|
2478
2478
|
var tmp_1 = this;
|
|
2479
2479
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2480
2480
|
// Inline function 'kotlin.apply' call
|
|
2481
|
-
tmp_1.
|
|
2482
|
-
this.
|
|
2481
|
+
tmp_1.a20_1 = (new TransformerBuilder()).c1j();
|
|
2482
|
+
this.b20_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2483
2483
|
var tmp_2 = this;
|
|
2484
2484
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2485
2485
|
// Inline function 'kotlin.apply' call
|
|
2486
2486
|
var this_2 = new TransformerBuilder();
|
|
2487
|
-
this_2.
|
|
2488
|
-
tmp_2.
|
|
2489
|
-
this.
|
|
2487
|
+
this_2.r1v(RustTransform$serializationArgs$lambda);
|
|
2488
|
+
tmp_2.c20_1 = this_2.c1j();
|
|
2489
|
+
this.d20_1 = setOf(['i32', 'i64', 'f32', 'f64', 'bool', 'u8', 'u16', 'u32', 'u64', 'usize', 'isize', '()']);
|
|
2490
2490
|
}
|
|
2491
|
-
protoOf(RustTransform).
|
|
2491
|
+
protoOf(RustTransform).f20 = function (element) {
|
|
2492
2492
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2493
2493
|
var scope = new TransformScope(element);
|
|
2494
|
-
scope.
|
|
2495
|
-
var tmp = scope.
|
|
2494
|
+
scope.n1v(RustTransform_getInstance().y1z_1);
|
|
2495
|
+
var tmp = scope.i1v_1;
|
|
2496
2496
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2497
2497
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2498
2498
|
var scope_0 = new TransformScope(this_0);
|
|
2499
|
-
scope_0.
|
|
2500
|
-
var tmp_0 = scope_0.
|
|
2499
|
+
scope_0.n1v(RustTransform_getInstance().z1z_1);
|
|
2500
|
+
var tmp_0 = scope_0.i1v_1;
|
|
2501
2501
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2502
2502
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2503
2503
|
var scope_1 = new TransformScope(this_1);
|
|
2504
|
-
scope_1.
|
|
2505
|
-
var tmp_1 = scope_1.
|
|
2504
|
+
scope_1.n1v(RustTransform_getInstance().a20_1);
|
|
2505
|
+
var tmp_1 = scope_1.i1v_1;
|
|
2506
2506
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2507
2507
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2508
2508
|
var scope_2 = new TransformScope(this_2);
|
|
2509
|
-
scope_2.
|
|
2510
|
-
var tmp_2 = scope_2.
|
|
2509
|
+
scope_2.n1v(RustTransform_getInstance().c20_1);
|
|
2510
|
+
var tmp_2 = scope_2.i1v_1;
|
|
2511
2511
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2512
2512
|
};
|
|
2513
|
-
protoOf(RustTransform).
|
|
2513
|
+
protoOf(RustTransform).e20 = function (_this__u8e3s4) {
|
|
2514
2514
|
var tmp;
|
|
2515
2515
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2516
|
-
var pascalName = _this__u8e3s4.
|
|
2516
|
+
var pascalName = _this__u8e3s4.l1j_1.s1h();
|
|
2517
2517
|
var tmp_0;
|
|
2518
|
-
if (_this__u8e3s4.
|
|
2518
|
+
if (_this__u8e3s4.m1j_1.r()) {
|
|
2519
2519
|
tmp_0 = pascalName;
|
|
2520
2520
|
} else {
|
|
2521
|
-
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.
|
|
2521
|
+
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.m1j_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda) + '>';
|
|
2522
2522
|
}
|
|
2523
2523
|
tmp = tmp_0;
|
|
2524
2524
|
} else {
|
|
@@ -2526,13 +2526,13 @@ protoOf(RustTransform).c20 = function (_this__u8e3s4) {
|
|
|
2526
2526
|
tmp = 'String';
|
|
2527
2527
|
} else {
|
|
2528
2528
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2529
|
-
tmp = 'Option<' + this.
|
|
2529
|
+
tmp = 'Option<' + this.e20(_this__u8e3s4.j1j_1) + '>';
|
|
2530
2530
|
} else {
|
|
2531
2531
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2532
|
-
tmp = 'Vec<' + this.
|
|
2532
|
+
tmp = 'Vec<' + this.e20(_this__u8e3s4.k1j_1) + '>';
|
|
2533
2533
|
} else {
|
|
2534
2534
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2535
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2535
|
+
tmp = 'std::collections::HashMap<' + this.e20(_this__u8e3s4.l1n_1) + ', ' + this.e20(_this__u8e3s4.m1n_1) + '>';
|
|
2536
2536
|
} else {
|
|
2537
2537
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2538
2538
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2554,7 +2554,7 @@ protoOf(RustTransform).c20 = function (_this__u8e3s4) {
|
|
|
2554
2554
|
} else {
|
|
2555
2555
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2556
2556
|
var tmp_1;
|
|
2557
|
-
switch (_this__u8e3s4.
|
|
2557
|
+
switch (_this__u8e3s4.i1n_1.b3_1) {
|
|
2558
2558
|
case 0:
|
|
2559
2559
|
tmp_1 = 'i32';
|
|
2560
2560
|
break;
|
|
@@ -2569,7 +2569,7 @@ protoOf(RustTransform).c20 = function (_this__u8e3s4) {
|
|
|
2569
2569
|
} else {
|
|
2570
2570
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2571
2571
|
var tmp_2;
|
|
2572
|
-
switch (_this__u8e3s4.
|
|
2572
|
+
switch (_this__u8e3s4.j1n_1.b3_1) {
|
|
2573
2573
|
case 0:
|
|
2574
2574
|
tmp_2 = 'f32';
|
|
2575
2575
|
break;
|
|
@@ -2589,7 +2589,7 @@ protoOf(RustTransform).c20 = function (_this__u8e3s4) {
|
|
|
2589
2589
|
tmp = 'String';
|
|
2590
2590
|
} else {
|
|
2591
2591
|
if (_this__u8e3s4 instanceof Function) {
|
|
2592
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2592
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.s1n_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.e20(_this__u8e3s4.t1n_1) + '>';
|
|
2593
2593
|
} else {
|
|
2594
2594
|
noWhenBranchMatchedException();
|
|
2595
2595
|
}
|
|
@@ -2610,27 +2610,27 @@ protoOf(RustTransform).c20 = function (_this__u8e3s4) {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
return tmp;
|
|
2612
2612
|
};
|
|
2613
|
-
protoOf(RustTransform).
|
|
2613
|
+
protoOf(RustTransform).j20 = function (_this__u8e3s4) {
|
|
2614
2614
|
var tmp;
|
|
2615
2615
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2616
2616
|
// Inline function 'kotlin.let' call
|
|
2617
|
-
var it = _this__u8e3s4.
|
|
2617
|
+
var it = _this__u8e3s4.l1j_1.s1h();
|
|
2618
2618
|
tmp = startsWith(it, '&') || startsWith(it, '&dyn ') || startsWith(it, '&impl ') || startsWith(it, '&mut ');
|
|
2619
2619
|
} else {
|
|
2620
2620
|
tmp = false;
|
|
2621
2621
|
}
|
|
2622
2622
|
return tmp;
|
|
2623
2623
|
};
|
|
2624
|
-
protoOf(RustTransform).
|
|
2624
|
+
protoOf(RustTransform).i20 = function (_this__u8e3s4) {
|
|
2625
2625
|
// Inline function 'kotlin.let' call
|
|
2626
|
-
var it = _this__u8e3s4.
|
|
2626
|
+
var it = _this__u8e3s4.l1j_1.s1h();
|
|
2627
2627
|
return it === 'Serializer' || it === 'Deserializer';
|
|
2628
2628
|
};
|
|
2629
|
-
protoOf(RustTransform).
|
|
2630
|
-
return _this__u8e3s4.
|
|
2629
|
+
protoOf(RustTransform).h20 = function (_this__u8e3s4) {
|
|
2630
|
+
return _this__u8e3s4.l1j_1.s1h() === 'GeneratorField';
|
|
2631
2631
|
};
|
|
2632
|
-
protoOf(RustTransform).
|
|
2633
|
-
var v = _this__u8e3s4.
|
|
2632
|
+
protoOf(RustTransform).g20 = function (_this__u8e3s4) {
|
|
2633
|
+
var v = _this__u8e3s4.n1j();
|
|
2634
2634
|
switch (v) {
|
|
2635
2635
|
case 'self':
|
|
2636
2636
|
case '&self':
|
|
@@ -2646,21 +2646,21 @@ function RustTransform_getInstance() {
|
|
|
2646
2646
|
return RustTransform_instance;
|
|
2647
2647
|
}
|
|
2648
2648
|
function borrow(_this__u8e3s4) {
|
|
2649
|
-
return _this__u8e3s4.
|
|
2649
|
+
return _this__u8e3s4.p1n(new Name(listOf('&' + _this__u8e3s4.l1j_1.s1h())));
|
|
2650
2650
|
}
|
|
2651
2651
|
function borrowDyn(_this__u8e3s4) {
|
|
2652
|
-
return _this__u8e3s4.
|
|
2652
|
+
return _this__u8e3s4.p1n(new Name(listOf('&dyn ' + _this__u8e3s4.l1j_1.s1h())));
|
|
2653
2653
|
}
|
|
2654
2654
|
function borrowImpl(_this__u8e3s4) {
|
|
2655
|
-
return _this__u8e3s4.
|
|
2655
|
+
return _this__u8e3s4.p1n(new Name(listOf('&impl ' + _this__u8e3s4.l1j_1.s1h())));
|
|
2656
2656
|
}
|
|
2657
2657
|
function ownedImpl(_this__u8e3s4) {
|
|
2658
|
-
return _this__u8e3s4.
|
|
2658
|
+
return _this__u8e3s4.p1n(new Name(listOf('impl ' + _this__u8e3s4.l1j_1.s1h())));
|
|
2659
2659
|
}
|
|
2660
2660
|
//region block: post-declaration
|
|
2661
|
-
protoOf(RustIrEmitter).
|
|
2661
|
+
protoOf(RustIrEmitter).x1v = get_extensions;
|
|
2662
2662
|
protoOf(RustIrEmitter).eo = emit_1;
|
|
2663
|
-
protoOf(RustIrEmitter).
|
|
2663
|
+
protoOf(RustIrEmitter).c1w = beforeGenerate;
|
|
2664
2664
|
//endregion
|
|
2665
2665
|
//region block: exports
|
|
2666
2666
|
export {
|