@flock/wirespec 0.19.1 → 0.19.3-RC.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +167 -167
- package/clikt-clikt-mordant.mjs +81 -81
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1636 -1636
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +448 -448
- package/kotest-kotest-assertions-kotest-assertions-core.mjs +4 -0
- package/kotest-kotest-assertions-kotest-assertions-core.mjs.map +1 -0
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs +4 -0
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs.map +1 -0
- package/kotest-kotest-common.mjs +56 -0
- package/kotest-kotest-common.mjs.map +1 -0
- package/kotest-kotest-framework-kotest-framework-engine.mjs +4 -0
- package/kotest-kotest-framework-kotest-framework-engine.mjs.map +1 -0
- package/kotest-kotest-property.mjs +2501 -0
- package/kotest-kotest-property.mjs.map +1 -0
- package/kotlin-kotlin-stdlib.mjs +5270 -2488
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +14654 -14575
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1846 -1846
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlinx-coroutines-test.mjs +4 -0
- package/kotlinx-coroutines-test.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-core.mjs +455 -455
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2132 -2098
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1579 -1579
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1435 -1435
- package/package.json +5 -1
- package/wirespec-generator.d.ts +51 -0
- package/wirespec-generator.mjs +9 -0
- package/wirespec-src-compiler-core.mjs +1598 -1598
- package/wirespec-src-compiler-emitters-java.mjs +465 -465
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +369 -369
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +457 -457
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +481 -481
- package/wirespec-src-compiler-emitters-scala.mjs +193 -193
- package/wirespec-src-compiler-emitters-typescript.mjs +499 -499
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +88 -88
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3911 -3855
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +439 -439
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +521 -521
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +1262 -894
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1387 -1387
- package/wirespec-src-ide-lsp.mjs.map +1 -1
- package/wirespec-src-integration-kotest.mjs +1647 -0
- package/wirespec-src-integration-kotest.mjs.map +1 -0
- package/wirespec-src-plugin-arguments.mjs +192 -192
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +109 -109
- package/wirespec-src-plugin-npm.d.mts +21 -0
- package/wirespec-src-plugin-npm.mjs +43 -43
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +35 -35
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/xmlutil-core.mjs +4 -0
- package/xmlutil-core.mjs.map +1 -0
- package/xmlutil-serialization.mjs +4 -0
- package/xmlutil-serialization.mjs.map +1 -0
|
@@ -191,15 +191,15 @@ initMetadataForClass(RustIrEmitter, 'RustIrEmitter', RustIrEmitter, VOID, [IrEmi
|
|
|
191
191
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
192
192
|
//endregion
|
|
193
193
|
function _get_sanitizationConfig__sns434($this) {
|
|
194
|
-
var tmp0 = $this.
|
|
194
|
+
var tmp0 = $this.a23_1;
|
|
195
195
|
var tmp = KProperty1;
|
|
196
196
|
// Inline function 'kotlin.getValue' call
|
|
197
197
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustIrEmitter$_get_sanitizationConfig_$ref_17ypni(), null);
|
|
198
|
-
return tmp0.
|
|
198
|
+
return tmp0.m1();
|
|
199
199
|
}
|
|
200
200
|
function sanitize($this, _this__u8e3s4) {
|
|
201
201
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
202
|
-
var this_0 = split(_this__u8e3s4.
|
|
202
|
+
var this_0 = split(_this__u8e3s4.m1(), ['.', ' ']);
|
|
203
203
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
204
204
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
205
205
|
var index = 0;
|
|
@@ -208,8 +208,8 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
208
208
|
var item = _iterator__ex2g4s.v();
|
|
209
209
|
var _unary__edvuaz = index;
|
|
210
210
|
index = _unary__edvuaz + 1 | 0;
|
|
211
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
212
|
-
destination.
|
|
211
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.pu(item) : item;
|
|
212
|
+
destination.y(tmp$ret$0);
|
|
213
213
|
}
|
|
214
214
|
// Inline function 'kotlin.text.filter' call
|
|
215
215
|
var tmp0 = joinToString(destination, '');
|
|
@@ -255,14 +255,14 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
255
255
|
return toSnakeCase($this, tmp$ret$9);
|
|
256
256
|
}
|
|
257
257
|
function toSnakeCase($this, _this__u8e3s4) {
|
|
258
|
-
return Companion_getInstance().
|
|
258
|
+
return Companion_getInstance().y1k(_this__u8e3s4).h1q();
|
|
259
259
|
}
|
|
260
260
|
function toPascalCase($this, _this__u8e3s4) {
|
|
261
261
|
var tmp = split(_this__u8e3s4, ['_']);
|
|
262
262
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustIrEmitter$toPascalCase$lambda);
|
|
263
263
|
}
|
|
264
264
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
265
|
-
return Companion_getInstance_0().
|
|
265
|
+
return Companion_getInstance_0().d23_1.v1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
266
266
|
}
|
|
267
267
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
268
268
|
// Inline function 'kotlin.let' call
|
|
@@ -287,7 +287,7 @@ function prependImports($this, _this__u8e3s4, imports) {
|
|
|
287
287
|
var tmp;
|
|
288
288
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
289
289
|
if (!imports.r()) {
|
|
290
|
-
tmp = _this__u8e3s4.
|
|
290
|
+
tmp = _this__u8e3s4.k1r(VOID, plus(imports, _this__u8e3s4.h1r_1));
|
|
291
291
|
} else {
|
|
292
292
|
tmp = _this__u8e3s4;
|
|
293
293
|
}
|
|
@@ -299,7 +299,7 @@ function containsWildcard($this, type) {
|
|
|
299
299
|
tmp = true;
|
|
300
300
|
} else {
|
|
301
301
|
if (type instanceof Custom) {
|
|
302
|
-
var tmp0 = type.
|
|
302
|
+
var tmp0 = type.t1m_1;
|
|
303
303
|
var tmp$ret$0;
|
|
304
304
|
$l$block_0: {
|
|
305
305
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -326,13 +326,13 @@ function containsWildcard($this, type) {
|
|
|
326
326
|
tmp = tmp$ret$0;
|
|
327
327
|
} else {
|
|
328
328
|
if (type instanceof Nullable) {
|
|
329
|
-
tmp = containsWildcard($this, type.
|
|
329
|
+
tmp = containsWildcard($this, type.q1m_1);
|
|
330
330
|
} else {
|
|
331
331
|
if (type instanceof Array_0) {
|
|
332
|
-
tmp = containsWildcard($this, type.
|
|
332
|
+
tmp = containsWildcard($this, type.r1m_1);
|
|
333
333
|
} else {
|
|
334
334
|
if (type instanceof Dict) {
|
|
335
|
-
tmp = containsWildcard($this, type.
|
|
335
|
+
tmp = containsWildcard($this, type.t1q_1) || containsWildcard($this, type.u1q_1);
|
|
336
336
|
} else {
|
|
337
337
|
tmp = false;
|
|
338
338
|
}
|
|
@@ -354,7 +354,7 @@ function containsUnderiveable($this, type) {
|
|
|
354
354
|
tmp = true;
|
|
355
355
|
} else {
|
|
356
356
|
if (type instanceof Custom) {
|
|
357
|
-
var tmp0 = type.
|
|
357
|
+
var tmp0 = type.t1m_1;
|
|
358
358
|
var tmp$ret$0;
|
|
359
359
|
$l$block_0: {
|
|
360
360
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -381,13 +381,13 @@ function containsUnderiveable($this, type) {
|
|
|
381
381
|
tmp = tmp$ret$0;
|
|
382
382
|
} else {
|
|
383
383
|
if (type instanceof Nullable) {
|
|
384
|
-
tmp = containsUnderiveable($this, type.
|
|
384
|
+
tmp = containsUnderiveable($this, type.q1m_1);
|
|
385
385
|
} else {
|
|
386
386
|
if (type instanceof Array_0) {
|
|
387
|
-
tmp = containsUnderiveable($this, type.
|
|
387
|
+
tmp = containsUnderiveable($this, type.r1m_1);
|
|
388
388
|
} else {
|
|
389
389
|
if (type instanceof Dict) {
|
|
390
|
-
tmp = containsUnderiveable($this, type.
|
|
390
|
+
tmp = containsUnderiveable($this, type.t1q_1) || containsUnderiveable($this, type.u1q_1);
|
|
391
391
|
} else {
|
|
392
392
|
tmp = false;
|
|
393
393
|
}
|
|
@@ -413,7 +413,7 @@ function buildClientParams($this, _this__u8e3s4) {
|
|
|
413
413
|
}
|
|
414
414
|
function Companion() {
|
|
415
415
|
Companion_instance_2 = this;
|
|
416
|
-
this.
|
|
416
|
+
this.d23_1 = setOf(['as', 'break', 'const', 'continue', 'crate', 'else', 'enum', 'extern', 'false', 'fn', 'for', 'if', 'impl', 'in', 'let', 'loop', 'match', 'mod', 'move', 'mut', 'pub', 'ref', 'return', 'self', 'Self', 'static', 'struct', 'super', 'trait', 'true', 'type', 'unsafe', 'use', 'where', 'while', 'async', 'await', 'dyn', 'abstract', 'become', 'box', 'do', 'final', 'macro', 'override', 'priv', 'typeof', 'unsized', 'virtual', 'yield', 'try']);
|
|
417
417
|
}
|
|
418
418
|
var Companion_instance_2;
|
|
419
419
|
function Companion_getInstance_0() {
|
|
@@ -422,23 +422,23 @@ function Companion_getInstance_0() {
|
|
|
422
422
|
return Companion_instance_2;
|
|
423
423
|
}
|
|
424
424
|
function sam$kotlin_Comparator$0(function_0) {
|
|
425
|
-
this.
|
|
425
|
+
this.e23_1 = function_0;
|
|
426
426
|
}
|
|
427
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
428
|
-
return this.
|
|
427
|
+
protoOf(sam$kotlin_Comparator$0).ud = function (a, b) {
|
|
428
|
+
return this.e23_1(a, b);
|
|
429
429
|
};
|
|
430
430
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
431
|
-
return this.
|
|
431
|
+
return this.ud(a, b);
|
|
432
432
|
};
|
|
433
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
434
|
-
return this.
|
|
433
|
+
protoOf(sam$kotlin_Comparator$0).m3 = function () {
|
|
434
|
+
return this.e23_1;
|
|
435
435
|
};
|
|
436
436
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
437
437
|
var tmp;
|
|
438
438
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
439
439
|
var tmp_0;
|
|
440
440
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
441
|
-
tmp_0 = equals(this.
|
|
441
|
+
tmp_0 = equals(this.m3(), other.m3());
|
|
442
442
|
} else {
|
|
443
443
|
tmp_0 = false;
|
|
444
444
|
}
|
|
@@ -449,22 +449,22 @@ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
|
449
449
|
return tmp;
|
|
450
450
|
};
|
|
451
451
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
452
|
-
return hashCode(this.
|
|
452
|
+
return hashCode(this.m3());
|
|
453
453
|
};
|
|
454
454
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
455
455
|
return 'r#' + it;
|
|
456
456
|
}
|
|
457
457
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
458
|
-
return Companion_getInstance().
|
|
458
|
+
return Companion_getInstance().y1k((new Name(name.w1k_1)).h1q());
|
|
459
459
|
}
|
|
460
460
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
461
|
-
var value = name.
|
|
461
|
+
var value = name.u1m();
|
|
462
462
|
switch (value) {
|
|
463
463
|
case 'self':
|
|
464
464
|
case '&self':
|
|
465
465
|
return name;
|
|
466
466
|
default:
|
|
467
|
-
return Companion_getInstance().
|
|
467
|
+
return Companion_getInstance().y1k((new Name(name.w1k_1)).h1q());
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
@@ -488,21 +488,21 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
488
488
|
return function (stmt, tr) {
|
|
489
489
|
var tmp;
|
|
490
490
|
if (stmt instanceof ConstructorStatement) {
|
|
491
|
-
var tmp_0 = tr.
|
|
491
|
+
var tmp_0 = tr.j1y(stmt.d1r_1);
|
|
492
492
|
// Inline function 'kotlin.collections.map' call
|
|
493
|
-
var this_0 = stmt.
|
|
493
|
+
var this_0 = stmt.e1r_1;
|
|
494
494
|
// Inline function 'kotlin.collections.mapTo' call
|
|
495
|
-
var destination = ArrayList_init_$Create$(this_0.
|
|
495
|
+
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
496
496
|
// Inline function 'kotlin.collections.iterator' call
|
|
497
|
-
var _iterator__ex2g4s = this_0.
|
|
497
|
+
var _iterator__ex2g4s = this_0.k1().t();
|
|
498
498
|
while (_iterator__ex2g4s.u()) {
|
|
499
499
|
var item = _iterator__ex2g4s.v();
|
|
500
500
|
// Inline function 'kotlin.collections.component1' call
|
|
501
|
-
var k = item.
|
|
501
|
+
var k = item.l1();
|
|
502
502
|
// Inline function 'kotlin.collections.component2' call
|
|
503
|
-
var v = item.
|
|
504
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
505
|
-
destination.
|
|
503
|
+
var v = item.m1();
|
|
504
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.m1y(v));
|
|
505
|
+
destination.y(tmp$ret$3);
|
|
506
506
|
}
|
|
507
507
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
508
508
|
} else {
|
|
@@ -513,7 +513,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
513
513
|
}
|
|
514
514
|
function RustIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
515
515
|
return function () {
|
|
516
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
516
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().d23_1, setOf(['self', 'Self']));
|
|
517
517
|
var tmp = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
518
518
|
var tmp_0 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
519
519
|
var tmp_1 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -527,69 +527,69 @@ function RustIrEmitter$_get_sanitizationConfig_$ref_17ypni() {
|
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
529
|
function RustIrEmitter$emitShared$lambda($this$interface) {
|
|
530
|
-
$this$interface.
|
|
530
|
+
$this$interface.h1n(Custom_init_$Create$('Headers'));
|
|
531
531
|
return Unit_instance;
|
|
532
532
|
}
|
|
533
533
|
function RustIrEmitter$emitShared$lambda_0($this$interface) {
|
|
534
|
-
$this$interface.
|
|
534
|
+
$this$interface.h1n(Custom_init_$Create$('Headers'));
|
|
535
535
|
return Unit_instance;
|
|
536
536
|
}
|
|
537
537
|
function RustIrEmitter$emitShared$lambda_1($this$interface) {
|
|
538
|
-
$this$interface.
|
|
539
|
-
$this$interface.
|
|
540
|
-
$this$interface.
|
|
538
|
+
$this$interface.h1n(Custom_init_$Create$('Sized'));
|
|
539
|
+
$this$interface.o1l('label', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda);
|
|
540
|
+
$this$interface.o1l('from_label', true, VOID, RustIrEmitter$emitShared$lambda$lambda_0);
|
|
541
541
|
return Unit_instance;
|
|
542
542
|
}
|
|
543
543
|
function RustIrEmitter$emitShared$lambda$lambda($this$function) {
|
|
544
|
-
$this$function.
|
|
545
|
-
$this$function.
|
|
544
|
+
$this$function.j1l('&self', Custom_init_$Create$(''));
|
|
545
|
+
$this$function.m1l(Custom_init_$Create$('&str'));
|
|
546
546
|
return Unit_instance;
|
|
547
547
|
}
|
|
548
548
|
function RustIrEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
549
|
-
$this$function.
|
|
550
|
-
$this$function.
|
|
549
|
+
$this$function.j1l('s', Custom_init_$Create$('&str'));
|
|
550
|
+
$this$function.m1l(Custom_init_$Create$('Option<Self>'));
|
|
551
551
|
return Unit_instance;
|
|
552
552
|
}
|
|
553
553
|
function RustIrEmitter$emitShared$lambda_2($this$interface) {
|
|
554
|
-
$this$interface.
|
|
555
|
-
$this$interface.
|
|
556
|
-
$this$interface.
|
|
554
|
+
$this$interface.b1n($this$interface.a1l('T', []), []);
|
|
555
|
+
$this$interface.o1l('value', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_1);
|
|
556
|
+
$this$interface.o1l('validate', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_2);
|
|
557
557
|
return Unit_instance;
|
|
558
558
|
}
|
|
559
559
|
function RustIrEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
560
|
-
$this$function.
|
|
561
|
-
$this$function.
|
|
560
|
+
$this$function.j1l('&self', Custom_init_$Create$(''));
|
|
561
|
+
$this$function.m1l(borrow($this$function.a1l('T', [])));
|
|
562
562
|
return Unit_instance;
|
|
563
563
|
}
|
|
564
564
|
function RustIrEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
565
|
-
$this$function.
|
|
566
|
-
$this$function.
|
|
565
|
+
$this$function.j1l('&self', Custom_init_$Create$(''));
|
|
566
|
+
$this$function.m1l($this$function.i1n());
|
|
567
567
|
return Unit_instance;
|
|
568
568
|
}
|
|
569
569
|
function RustIrEmitter$emitShared$lambda_3($this$interface) {
|
|
570
|
-
$this$interface.
|
|
571
|
-
$this$interface.
|
|
572
|
-
$this$interface.
|
|
573
|
-
$this$interface.
|
|
574
|
-
$this$interface.
|
|
575
|
-
$this$interface.
|
|
570
|
+
$this$interface.b1n($this$interface.a1l('T', []), []);
|
|
571
|
+
$this$interface.c1n('path', borrowDyn($this$interface.a1l('Path', [])));
|
|
572
|
+
$this$interface.c1n('method', borrow($this$interface.a1l('Method', [])));
|
|
573
|
+
$this$interface.c1n('queries', borrowDyn($this$interface.a1l('Queries', [])));
|
|
574
|
+
$this$interface.c1n('headers', borrowDyn($this$interface.a1l('RequestHeaders', [])));
|
|
575
|
+
$this$interface.c1n('body', borrow($this$interface.a1l('T', [])));
|
|
576
576
|
return Unit_instance;
|
|
577
577
|
}
|
|
578
578
|
function RustIrEmitter$emitShared$lambda_4($this$interface) {
|
|
579
|
-
$this$interface.
|
|
580
|
-
$this$interface.
|
|
581
|
-
$this$interface.
|
|
582
|
-
$this$interface.
|
|
579
|
+
$this$interface.b1n($this$interface.a1l('T', []), []);
|
|
580
|
+
$this$interface.c1n('status', $this$interface.h1o());
|
|
581
|
+
$this$interface.c1n('headers', borrowDyn($this$interface.a1l('ResponseHeaders', [])));
|
|
582
|
+
$this$interface.c1n('body', borrow($this$interface.a1l('T', [])));
|
|
583
583
|
return Unit_instance;
|
|
584
584
|
}
|
|
585
585
|
function RustIrEmitter$emitShared$lambda_5($this$interface) {
|
|
586
|
-
$this$interface.
|
|
586
|
+
$this$interface.e1o('transport', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_3);
|
|
587
587
|
return Unit_instance;
|
|
588
588
|
}
|
|
589
589
|
function RustIrEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
590
|
-
$this$asyncFunction.
|
|
591
|
-
$this$asyncFunction.
|
|
592
|
-
$this$asyncFunction.
|
|
590
|
+
$this$asyncFunction.j1l('&self', Custom_init_$Create$(''));
|
|
591
|
+
$this$asyncFunction.j1l('request', borrow($this$asyncFunction.a1l('RawRequest', [])));
|
|
592
|
+
$this$asyncFunction.m1l($this$asyncFunction.a1l('RawResponse', []));
|
|
593
593
|
return Unit_instance;
|
|
594
594
|
}
|
|
595
595
|
function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -597,18 +597,18 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
597
597
|
var tmp;
|
|
598
598
|
if (element instanceof File) {
|
|
599
599
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
600
|
-
var tmp0 = element.
|
|
600
|
+
var tmp0 = element.h1r_1;
|
|
601
601
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
602
602
|
var destination = ArrayList_init_$Create$_0();
|
|
603
603
|
var _iterator__ex2g4s = tmp0.t();
|
|
604
604
|
while (_iterator__ex2g4s.u()) {
|
|
605
605
|
var element_0 = _iterator__ex2g4s.v();
|
|
606
606
|
if (element_0 instanceof Namespace) {
|
|
607
|
-
destination.
|
|
607
|
+
destination.y(element_0);
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
var namespace = first(destination);
|
|
611
|
-
tmp = element.
|
|
611
|
+
tmp = element.k1r(VOID, plus($rustImports, namespace.n1r_1));
|
|
612
612
|
} else {
|
|
613
613
|
tmp = element;
|
|
614
614
|
}
|
|
@@ -620,7 +620,7 @@ function RustIrEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
620
620
|
var tmp;
|
|
621
621
|
if (element instanceof Enum_0) {
|
|
622
622
|
var tmp_0;
|
|
623
|
-
if (element.
|
|
623
|
+
if (element.m1s_1.equals(Companion_getInstance().y1k('Method'))) {
|
|
624
624
|
tmp_0 = new RawElement('#[derive(Debug, Clone, Default, PartialEq)]\npub enum Method {\n #[default]\n GET,\n PUT,\n POST,\n DELETE,\n OPTIONS,\n HEAD,\n PATCH,\n TRACE,\n}');
|
|
625
625
|
} else {
|
|
626
626
|
tmp_0 = element;
|
|
@@ -637,7 +637,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
637
637
|
var tmp;
|
|
638
638
|
if (element instanceof File) {
|
|
639
639
|
// Inline function 'kotlin.collections.flatMap' call
|
|
640
|
-
var tmp0 = element.
|
|
640
|
+
var tmp0 = element.h1r_1;
|
|
641
641
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
642
642
|
var destination = ArrayList_init_$Create$_0();
|
|
643
643
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -649,30 +649,30 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
649
649
|
tmp$ret$0 = listOf(element_0);
|
|
650
650
|
break $l$block;
|
|
651
651
|
}
|
|
652
|
-
var name = element_0.
|
|
652
|
+
var name = element_0.a1s_1.z1k();
|
|
653
653
|
var tmp_0;
|
|
654
654
|
// Inline function 'kotlin.collections.contains' call
|
|
655
655
|
// Inline function 'kotlin.collections.containsKey' call
|
|
656
656
|
var this_0 = $dslTraits;
|
|
657
|
-
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).
|
|
657
|
+
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).o2(name)) {
|
|
658
658
|
// Inline function 'kotlin.collections.buildList' call
|
|
659
659
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
660
660
|
// Inline function 'kotlin.apply' call
|
|
661
661
|
var this_1 = ArrayList_init_$Create$_0();
|
|
662
|
-
this_1.
|
|
662
|
+
this_1.y(ensureNotNull($dslTraits.q2(name)));
|
|
663
663
|
if (name === 'Request') {
|
|
664
|
-
this_1.
|
|
664
|
+
this_1.y($requestHeaders);
|
|
665
665
|
}
|
|
666
666
|
if (name === 'Response') {
|
|
667
|
-
this_1.
|
|
667
|
+
this_1.y($responseHeaders);
|
|
668
668
|
}
|
|
669
|
-
tmp_0 = this_1.
|
|
669
|
+
tmp_0 = this_1.p5();
|
|
670
670
|
} else {
|
|
671
671
|
// Inline function 'kotlin.collections.contains' call
|
|
672
672
|
// Inline function 'kotlin.collections.containsKey' call
|
|
673
673
|
var this_2 = $rawElementInterfaces;
|
|
674
|
-
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).
|
|
675
|
-
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.
|
|
674
|
+
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).o2(name)) {
|
|
675
|
+
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.q2(name)));
|
|
676
676
|
} else {
|
|
677
677
|
tmp_0 = listOf(element_0);
|
|
678
678
|
}
|
|
@@ -683,7 +683,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
683
683
|
addAll(destination, list);
|
|
684
684
|
}
|
|
685
685
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
686
|
-
tmp = element.
|
|
686
|
+
tmp = element.k1r(VOID, newElements);
|
|
687
687
|
} else {
|
|
688
688
|
tmp = element;
|
|
689
689
|
}
|
|
@@ -699,14 +699,14 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
699
699
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
700
700
|
var tmp_0 = scope;
|
|
701
701
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
702
|
-
var this_0 = scope.
|
|
702
|
+
var this_0 = scope.r1y_1;
|
|
703
703
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
704
704
|
// Inline function 'kotlin.apply' call
|
|
705
705
|
var this_1 = new TransformerBuilder();
|
|
706
|
-
this_1.
|
|
707
|
-
var tmp$ret$2 = this_1.
|
|
708
|
-
tmp_0.
|
|
709
|
-
var tmp_1 = scope.
|
|
706
|
+
this_1.i1m(RustIrEmitter$emitShared$lambda$lambda_4);
|
|
707
|
+
var tmp$ret$2 = this_1.j1m();
|
|
708
|
+
tmp_0.r1y_1 = transform(this_0, tmp$ret$2);
|
|
709
|
+
var tmp_1 = scope.r1y_1;
|
|
710
710
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
711
711
|
} else {
|
|
712
712
|
tmp = element;
|
|
@@ -717,7 +717,7 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
717
717
|
function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
718
718
|
var tmp;
|
|
719
719
|
if (element instanceof Function_0) {
|
|
720
|
-
var tmp0 = element.
|
|
720
|
+
var tmp0 = element.q1o_1;
|
|
721
721
|
var tmp$ret$0;
|
|
722
722
|
$l$block_0: {
|
|
723
723
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -734,7 +734,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
734
734
|
var _iterator__ex2g4s = tmp0.t();
|
|
735
735
|
while (_iterator__ex2g4s.u()) {
|
|
736
736
|
var element_0 = _iterator__ex2g4s.v();
|
|
737
|
-
if (element_0.
|
|
737
|
+
if (element_0.j1t_1.u1m() === '&self' || element_0.j1t_1.u1m() === 'self') {
|
|
738
738
|
tmp$ret$0 = true;
|
|
739
739
|
break $l$block_0;
|
|
740
740
|
}
|
|
@@ -742,7 +742,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
742
742
|
tmp$ret$0 = false;
|
|
743
743
|
}
|
|
744
744
|
var hasSelf = tmp$ret$0;
|
|
745
|
-
tmp = hasSelf || element.
|
|
745
|
+
tmp = hasSelf || element.u1o_1 ? element : element.w1o(VOID, VOID, plus(listOf(get_rustSelfParam()), element.q1o_1));
|
|
746
746
|
} else {
|
|
747
747
|
tmp = element;
|
|
748
748
|
}
|
|
@@ -753,7 +753,7 @@ function RustIrEmitter$emitShared$lambda_10(group) {
|
|
|
753
753
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
754
754
|
}
|
|
755
755
|
function RustIrEmitter$emitShared$lambda$lambda_5(it) {
|
|
756
|
-
return RustGenerator_instance.
|
|
756
|
+
return RustGenerator_instance.f1z(it);
|
|
757
757
|
}
|
|
758
758
|
function RustIrEmitter$emit$lambda(a, b) {
|
|
759
759
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -762,7 +762,7 @@ function RustIrEmitter$emit$lambda(a, b) {
|
|
|
762
762
|
return compareValues(tmp, tmp$ret$1);
|
|
763
763
|
}
|
|
764
764
|
function emit$emitMod(this$0, def) {
|
|
765
|
-
return 'pub mod ' + sanitize(this$0, def.
|
|
765
|
+
return 'pub mod ' + sanitize(this$0, def.xu()) + ';';
|
|
766
766
|
}
|
|
767
767
|
function RustIrEmitter$emit$lambda_0(this$0) {
|
|
768
768
|
return function (it) {
|
|
@@ -791,17 +791,17 @@ function RustIrEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs)
|
|
|
791
791
|
var tmp_0;
|
|
792
792
|
var tmp_1;
|
|
793
793
|
if (expr instanceof RawExpression) {
|
|
794
|
-
tmp_1 = endsWith(expr.
|
|
794
|
+
tmp_1 = endsWith(expr.x1s_1, 'Generator');
|
|
795
795
|
} else {
|
|
796
796
|
tmp_1 = false;
|
|
797
797
|
}
|
|
798
798
|
if (tmp_1) {
|
|
799
|
-
tmp_0 = !(expr.
|
|
799
|
+
tmp_0 = !(expr.x1s_1 === $generatorOwnName);
|
|
800
800
|
} else {
|
|
801
801
|
tmp_0 = false;
|
|
802
802
|
}
|
|
803
803
|
if (tmp_0) {
|
|
804
|
-
$generatorRefs.
|
|
804
|
+
$generatorRefs.y(expr.x1s_1);
|
|
805
805
|
tmp = Unit_instance;
|
|
806
806
|
}
|
|
807
807
|
return transformChildren_1(expr, t);
|
|
@@ -814,7 +814,7 @@ function RustIrEmitter$emit$lambda_2(this$0) {
|
|
|
814
814
|
}
|
|
815
815
|
function RustIrEmitter$emitClient$lambda(this$0) {
|
|
816
816
|
return function (endpoint) {
|
|
817
|
-
return 'pub mod ' + toSnakeCase(this$0, endpoint.
|
|
817
|
+
return 'pub mod ' + toSnakeCase(this$0, endpoint.ft_1.m1() + 'Client') + ';';
|
|
818
818
|
};
|
|
819
819
|
}
|
|
820
820
|
function RustIrEmitter$toPascalCase$lambda(s) {
|
|
@@ -834,39 +834,39 @@ function RustIrEmitter$toPascalCase$lambda(s) {
|
|
|
834
834
|
}
|
|
835
835
|
function RustIrEmitter$buildClientParams$lambda(this$0) {
|
|
836
836
|
return function (_destruct__k2r9zo) {
|
|
837
|
-
var name = _destruct__k2r9zo.
|
|
838
|
-
return sanitizeKeywords(this$0, name.
|
|
837
|
+
var name = _destruct__k2r9zo.mf();
|
|
838
|
+
return sanitizeKeywords(this$0, name.h1q());
|
|
839
839
|
};
|
|
840
840
|
}
|
|
841
841
|
function RustIrEmitter$buildClientParams$lambda_0(this$0) {
|
|
842
842
|
return function (_destruct__k2r9zo) {
|
|
843
|
-
var name = _destruct__k2r9zo.
|
|
844
|
-
var type = _destruct__k2r9zo.
|
|
845
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
843
|
+
var name = _destruct__k2r9zo.mf();
|
|
844
|
+
var type = _destruct__k2r9zo.nf();
|
|
845
|
+
var tmp = sanitizeKeywords(this$0, name.h1q());
|
|
846
846
|
// Inline function 'kotlin.with' call
|
|
847
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
847
|
+
return tmp + ': ' + RustTransform_getInstance().l23(type);
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
850
|
function RustIrEmitter(packageName, emitShared) {
|
|
851
851
|
Companion_getInstance_0();
|
|
852
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
853
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
854
|
-
this.
|
|
855
|
-
this.
|
|
856
|
-
this.
|
|
857
|
-
this.
|
|
852
|
+
packageName = packageName === VOID ? Companion_instance_0.nv('community.flock.wirespec.generated') : packageName;
|
|
853
|
+
emitShared = emitShared === VOID ? Companion_instance_1.hs() : emitShared;
|
|
854
|
+
this.w22_1 = packageName;
|
|
855
|
+
this.x22_1 = emitShared;
|
|
856
|
+
this.y22_1 = RustGenerator_instance;
|
|
857
|
+
this.z22_1 = FileExtension_Rust_getInstance();
|
|
858
858
|
var tmp = this;
|
|
859
|
-
tmp.
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
859
|
+
tmp.a23_1 = lazy(RustIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
860
|
+
this.b23_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
861
|
+
this.c23_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
862
862
|
}
|
|
863
|
-
protoOf(RustIrEmitter).
|
|
864
|
-
return this.
|
|
863
|
+
protoOf(RustIrEmitter).e1z = function () {
|
|
864
|
+
return this.y22_1;
|
|
865
865
|
};
|
|
866
|
-
protoOf(RustIrEmitter).
|
|
867
|
-
return this.
|
|
866
|
+
protoOf(RustIrEmitter).fu = function () {
|
|
867
|
+
return this.z22_1;
|
|
868
868
|
};
|
|
869
|
-
protoOf(RustIrEmitter).
|
|
869
|
+
protoOf(RustIrEmitter).h1z = function () {
|
|
870
870
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
871
871
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustIrEmitter$emitShared$lambda);
|
|
872
872
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustIrEmitter$emitShared$lambda_0);
|
|
@@ -880,43 +880,43 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
880
880
|
var transportationTrait = interface_0('Transportation', VOID, RustIrEmitter$emitShared$lambda_5);
|
|
881
881
|
var dslTraits = mapOf([to('Enum', enumTrait), to('Refined', refinedTrait), to('Request', requestTrait), to('Response', responseTrait), to('Transportation', transportationTrait)]);
|
|
882
882
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
883
|
-
var this_0 = convert(Companion_instance_0.
|
|
883
|
+
var this_0 = convert(Companion_instance_0.nv('shared'));
|
|
884
884
|
var scope = new TransformScope(this_0);
|
|
885
885
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
886
886
|
var tmp = scope;
|
|
887
887
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
888
|
-
var this_1 = scope.
|
|
888
|
+
var this_1 = scope.r1y_1;
|
|
889
889
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
890
890
|
// Inline function 'kotlin.apply' call
|
|
891
891
|
var this_2 = new TransformerBuilder();
|
|
892
|
-
this_2.
|
|
893
|
-
var tmp$ret$2 = this_2.
|
|
894
|
-
tmp.
|
|
892
|
+
this_2.i1m(RustIrEmitter$emitShared$lambda_6(rustImports));
|
|
893
|
+
var tmp$ret$2 = this_2.j1m();
|
|
894
|
+
tmp.r1y_1 = transform(this_1, tmp$ret$2);
|
|
895
895
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
896
896
|
var tmp_0 = scope;
|
|
897
897
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
898
|
-
var this_3 = scope.
|
|
898
|
+
var this_3 = scope.r1y_1;
|
|
899
899
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
900
900
|
// Inline function 'kotlin.apply' call
|
|
901
901
|
var this_4 = new TransformerBuilder();
|
|
902
|
-
this_4.
|
|
903
|
-
var tmp$ret$7 = this_4.
|
|
904
|
-
tmp_0.
|
|
902
|
+
this_4.i1m(RustIrEmitter$emitShared$lambda_7);
|
|
903
|
+
var tmp$ret$7 = this_4.j1m();
|
|
904
|
+
tmp_0.r1y_1 = transform(this_3, tmp$ret$7);
|
|
905
905
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
906
906
|
var tmp_1 = scope;
|
|
907
907
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
908
|
-
var this_5 = scope.
|
|
908
|
+
var this_5 = scope.r1y_1;
|
|
909
909
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
910
910
|
// Inline function 'kotlin.apply' call
|
|
911
911
|
var this_6 = new TransformerBuilder();
|
|
912
|
-
this_6.
|
|
913
|
-
var tmp$ret$12 = this_6.
|
|
914
|
-
tmp_1.
|
|
915
|
-
var tmp_2 = scope.
|
|
912
|
+
this_6.i1m(RustIrEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
913
|
+
var tmp$ret$12 = this_6.j1m();
|
|
914
|
+
tmp_1.r1y_1 = transform(this_5, tmp$ret$12);
|
|
915
|
+
var tmp_2 = scope.r1y_1;
|
|
916
916
|
// Inline function 'kotlin.let' call
|
|
917
917
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
918
918
|
// Inline function 'kotlin.collections.flatMap' call
|
|
919
|
-
var tmp0 = file.
|
|
919
|
+
var tmp0 = file.h1r_1;
|
|
920
920
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
921
921
|
var destination = ArrayList_init_$Create$_0();
|
|
922
922
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -929,7 +929,7 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
929
929
|
break $l$block;
|
|
930
930
|
}
|
|
931
931
|
var tmp_3;
|
|
932
|
-
var tmp0_0 = element.
|
|
932
|
+
var tmp0_0 = element.s1r_1;
|
|
933
933
|
var tmp$ret$18;
|
|
934
934
|
$l$block_1: {
|
|
935
935
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -946,7 +946,7 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
946
946
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
947
947
|
while (_iterator__ex2g4s_0.u()) {
|
|
948
948
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
949
|
-
if (containsUnderiveable(this, element_0.
|
|
949
|
+
if (containsUnderiveable(this, element_0.o1t_1)) {
|
|
950
950
|
tmp$ret$18 = true;
|
|
951
951
|
break $l$block_1;
|
|
952
952
|
}
|
|
@@ -956,7 +956,7 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
956
956
|
if (tmp$ret$18) {
|
|
957
957
|
tmp_3 = '';
|
|
958
958
|
} else {
|
|
959
|
-
var tmp0_1 = element.
|
|
959
|
+
var tmp0_1 = element.s1r_1;
|
|
960
960
|
var tmp$ret$20;
|
|
961
961
|
$l$block_3: {
|
|
962
962
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -973,7 +973,7 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
973
973
|
var _iterator__ex2g4s_1 = tmp0_1.t();
|
|
974
974
|
while (_iterator__ex2g4s_1.u()) {
|
|
975
975
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
976
|
-
if (containsWildcard(this, element_1.
|
|
976
|
+
if (containsWildcard(this, element_1.o1t_1)) {
|
|
977
977
|
tmp$ret$20 = true;
|
|
978
978
|
break $l$block_3;
|
|
979
979
|
}
|
|
@@ -983,7 +983,7 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
983
983
|
if (tmp$ret$20) {
|
|
984
984
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
985
985
|
} else {
|
|
986
|
-
if (setOf(['RawRequest', 'RawResponse']).
|
|
986
|
+
if (setOf(['RawRequest', 'RawResponse']).v1(element.r1r_1.z1k())) {
|
|
987
987
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
988
988
|
} else {
|
|
989
989
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -999,29 +999,29 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
999
999
|
tmp_6 = listOf(new RawElement(derive));
|
|
1000
1000
|
}
|
|
1001
1001
|
var prefix = tmp_6;
|
|
1002
|
-
tmp$ret$17 = listOf(new File(element.
|
|
1002
|
+
tmp$ret$17 = listOf(new File(element.r1r_1, plus_0(prefix, element)));
|
|
1003
1003
|
}
|
|
1004
1004
|
var list = tmp$ret$17;
|
|
1005
1005
|
addAll(destination, list);
|
|
1006
1006
|
}
|
|
1007
|
-
var tmp0_2 = new File(file.
|
|
1007
|
+
var tmp0_2 = new File(file.g1r_1, destination);
|
|
1008
1008
|
// Inline function 'kotlin.let' call
|
|
1009
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1009
|
+
var wirespecFile = RustTransform_getInstance().m23(tmp0_2);
|
|
1010
1010
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1011
1011
|
var scope_0 = new TransformScope(wirespecFile);
|
|
1012
1012
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1013
1013
|
var tmp_7 = scope_0;
|
|
1014
1014
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1015
|
-
var this_7 = scope_0.
|
|
1015
|
+
var this_7 = scope_0.r1y_1;
|
|
1016
1016
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1017
1017
|
// Inline function 'kotlin.apply' call
|
|
1018
1018
|
var this_8 = new TransformerBuilder();
|
|
1019
|
-
this_8.
|
|
1020
|
-
var tmp$ret$31 = this_8.
|
|
1021
|
-
tmp_7.
|
|
1022
|
-
var tmp_8 = scope_0.
|
|
1019
|
+
this_8.i1m(RustIrEmitter$emitShared$lambda_9);
|
|
1020
|
+
var tmp$ret$31 = this_8.j1m();
|
|
1021
|
+
tmp_7.r1y_1 = transform(this_7, tmp$ret$31);
|
|
1022
|
+
var tmp_8 = scope_0.r1y_1;
|
|
1023
1023
|
// Inline function 'kotlin.let' call
|
|
1024
|
-
var tmp0_3 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1024
|
+
var tmp0_3 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).h1r_1;
|
|
1025
1025
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1026
1026
|
// Inline function 'kotlin.collections.fold' call
|
|
1027
1027
|
var accumulator = ArrayList_init_$Create$_0();
|
|
@@ -1034,41 +1034,41 @@ protoOf(RustIrEmitter).v1v = function () {
|
|
|
1034
1034
|
var tmp_9 = tmp0_safe_receiver == null ? null : firstOrNull_0(tmp0_safe_receiver);
|
|
1035
1035
|
var lastGroupIsImports = tmp_9 instanceof Import;
|
|
1036
1036
|
if (isImport && lastGroupIsImports)
|
|
1037
|
-
last(acc).
|
|
1037
|
+
last(acc).y(element_2);
|
|
1038
1038
|
else
|
|
1039
|
-
acc.
|
|
1039
|
+
acc.y(mutableListOf([element_2]));
|
|
1040
1040
|
accumulator = acc;
|
|
1041
1041
|
}
|
|
1042
1042
|
var groups = accumulator;
|
|
1043
1043
|
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda_10) + '\n';
|
|
1044
1044
|
var tmp_10;
|
|
1045
|
-
if (this.
|
|
1046
|
-
tmp_10 = new File(Companion_getInstance().
|
|
1045
|
+
if (this.x22_1.is_1) {
|
|
1046
|
+
tmp_10 = new File(Companion_getInstance().y1k(this.w22_1.qv() + 'wirespec'), listOf(new RawElement(source)));
|
|
1047
1047
|
} else {
|
|
1048
1048
|
tmp_10 = null;
|
|
1049
1049
|
}
|
|
1050
1050
|
return tmp_10;
|
|
1051
1051
|
};
|
|
1052
|
-
protoOf(RustIrEmitter).
|
|
1052
|
+
protoOf(RustIrEmitter).g1z = function (module_0, logger) {
|
|
1053
1053
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1054
|
-
var this_0 = new NonEmptyList(module_0.
|
|
1054
|
+
var this_0 = new NonEmptyList(module_0.eu_1);
|
|
1055
1055
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
1056
1056
|
var tmp = RustIrEmitter$emit$lambda;
|
|
1057
1057
|
var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);
|
|
1058
1058
|
var tmp$ret$1 = sortedWith(this_0, tmp$ret$0);
|
|
1059
1059
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$1);
|
|
1060
|
-
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).
|
|
1060
|
+
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).zp_1;
|
|
1061
1061
|
// Inline function 'kotlin.let' call
|
|
1062
|
-
var files = emit.call(this, module_0.
|
|
1062
|
+
var files = emit.call(this, module_0.xy(VOID, statements), logger);
|
|
1063
1063
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1064
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
1064
|
+
var tmp0 = new NonEmptyList(module_0.eu_1);
|
|
1065
1065
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1066
1066
|
var destination = ArrayList_init_$Create$_0();
|
|
1067
1067
|
var _iterator__ex2g4s = tmp0.t();
|
|
1068
1068
|
while (_iterator__ex2g4s.u()) {
|
|
1069
1069
|
var element = _iterator__ex2g4s.v();
|
|
1070
1070
|
if (element instanceof Endpoint) {
|
|
1071
|
-
destination.
|
|
1071
|
+
destination.y(element);
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
1074
|
var endpoints = destination;
|
|
@@ -1081,39 +1081,39 @@ protoOf(RustIrEmitter).u1v = function (module_0, logger) {
|
|
|
1081
1081
|
tmp_1 = '';
|
|
1082
1082
|
}
|
|
1083
1083
|
var clientMod = tmp_1;
|
|
1084
|
-
var modRs = new File(Companion_getInstance().
|
|
1085
|
-
var modEndpoint = new File(Companion_getInstance().
|
|
1086
|
-
var tmp_2 = Companion_getInstance().
|
|
1084
|
+
var modRs = new File(Companion_getInstance().y1k(this.w22_1.qv() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1085
|
+
var modEndpoint = new File(Companion_getInstance().y1k(this.w22_1.qv() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1086
|
+
var tmp_2 = Companion_getInstance().y1k(this.w22_1.qv() + 'model/' + 'mod');
|
|
1087
1087
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1088
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
1088
|
+
var tmp0_0 = new NonEmptyList(module_0.eu_1);
|
|
1089
1089
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1090
1090
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1091
1091
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
1092
1092
|
while (_iterator__ex2g4s_0.u()) {
|
|
1093
1093
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
1094
1094
|
if (!(element_0 == null) ? isInterface(element_0, Model) : false) {
|
|
1095
|
-
destination_0.
|
|
1095
|
+
destination_0.y(element_0);
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
1098
|
var tmp_3 = destination_0;
|
|
1099
1099
|
var modModel = new File(tmp_2, listOf(new RawElement(joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emit$lambda_1(this)))));
|
|
1100
|
-
return this.
|
|
1100
|
+
return this.x22_1.is_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(files, modRs), modEndpoint), modModel) : NonEmptyList__plus_impl_xqmb9(files, modRs);
|
|
1101
1101
|
};
|
|
1102
|
-
protoOf(RustIrEmitter).
|
|
1103
|
-
var subPackageName = plus_1(this.
|
|
1102
|
+
protoOf(RustIrEmitter).wu = function (definition, module_0, logger) {
|
|
1103
|
+
var subPackageName = plus_1(this.w22_1, definition);
|
|
1104
1104
|
var tmp;
|
|
1105
1105
|
if (definition instanceof Endpoint) {
|
|
1106
|
-
tmp = this.
|
|
1106
|
+
tmp = this.c23_1;
|
|
1107
1107
|
} else {
|
|
1108
|
-
tmp = this.
|
|
1108
|
+
tmp = this.b23_1;
|
|
1109
1109
|
}
|
|
1110
1110
|
var importHeader = tmp;
|
|
1111
1111
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1112
1112
|
// Inline function 'kotlin.let' call
|
|
1113
|
-
var file = RustTransform_getInstance().
|
|
1114
|
-
var tmp_0 = Companion_getInstance().
|
|
1113
|
+
var file = RustTransform_getInstance().m23(tmp0);
|
|
1114
|
+
var tmp_0 = Companion_getInstance().y1k(subPackageName.qv() + toSnakeCase(this, file.g1r_1.z1k()));
|
|
1115
1115
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1116
|
-
var tmp0_0 = file.
|
|
1116
|
+
var tmp0_0 = file.h1r_1;
|
|
1117
1117
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1118
1118
|
var destination = ArrayList_init_$Create$_0();
|
|
1119
1119
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1130,7 +1130,7 @@ protoOf(RustIrEmitter).lr = function (definition, module_0, logger) {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1132
1132
|
};
|
|
1133
|
-
protoOf(RustIrEmitter).
|
|
1133
|
+
protoOf(RustIrEmitter).l1z = function (definition, module_0) {
|
|
1134
1134
|
var tmp;
|
|
1135
1135
|
if (definition instanceof Type) {
|
|
1136
1136
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1150,7 +1150,7 @@ protoOf(RustIrEmitter).z1v = function (definition, module_0) {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
1152
|
var generatorFile = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
|
|
1153
|
-
var generatorOwnName = definition.
|
|
1153
|
+
var generatorOwnName = definition.xu().m1() + 'Generator';
|
|
1154
1154
|
var tmp_0 = asSequence(collectCustomTypeNames(generatorFile));
|
|
1155
1155
|
var tmp_1 = filterNot(tmp_0, RustIrEmitter$emitGenerator$lambda);
|
|
1156
1156
|
var tmp_2 = filterNot(tmp_1, RustIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -1159,8 +1159,8 @@ protoOf(RustIrEmitter).z1v = function (definition, module_0) {
|
|
|
1159
1159
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1160
1160
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1161
1161
|
var scope = new TransformScope(generatorFile);
|
|
1162
|
-
scope.
|
|
1163
|
-
var tmp_3 = scope.
|
|
1162
|
+
scope.z1y(RustIrEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1163
|
+
var tmp_3 = scope.r1y_1;
|
|
1164
1164
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1165
1165
|
// Inline function 'kotlin.collections.filter' call
|
|
1166
1166
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1169,7 +1169,7 @@ protoOf(RustIrEmitter).z1v = function (definition, module_0) {
|
|
|
1169
1169
|
while (_iterator__ex2g4s.u()) {
|
|
1170
1170
|
var element = _iterator__ex2g4s.v();
|
|
1171
1171
|
if (endsWith(element, 'Generator')) {
|
|
1172
|
-
destination.
|
|
1172
|
+
destination.y(element);
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
1175
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1180,7 +1180,7 @@ protoOf(RustIrEmitter).z1v = function (definition, module_0) {
|
|
|
1180
1180
|
while (_iterator__ex2g4s_0.u()) {
|
|
1181
1181
|
var item = _iterator__ex2g4s_0.v();
|
|
1182
1182
|
var tmp$ret$6 = import_0('super::' + toSnakeCase(this, item), item);
|
|
1183
|
-
destination_0.
|
|
1183
|
+
destination_0.y(tmp$ret$6);
|
|
1184
1184
|
}
|
|
1185
1185
|
var generatorImports = destination_0;
|
|
1186
1186
|
// Inline function 'kotlin.collections.filterNot' call
|
|
@@ -1190,7 +1190,7 @@ protoOf(RustIrEmitter).z1v = function (definition, module_0) {
|
|
|
1190
1190
|
while (_iterator__ex2g4s_1.u()) {
|
|
1191
1191
|
var element_0 = _iterator__ex2g4s_1.v();
|
|
1192
1192
|
if (!endsWith(element_0, 'Generator')) {
|
|
1193
|
-
destination_1.
|
|
1193
|
+
destination_1.y(element_0);
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
1196
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1200,61 +1200,61 @@ protoOf(RustIrEmitter).z1v = function (definition, module_0) {
|
|
|
1200
1200
|
while (_iterator__ex2g4s_2.u()) {
|
|
1201
1201
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
1202
1202
|
var tmp$ret$12 = import_0('super::super::model::' + toSnakeCase(this, item_0), item_0);
|
|
1203
|
-
destination_2.
|
|
1203
|
+
destination_2.y(tmp$ret$12);
|
|
1204
1204
|
}
|
|
1205
1205
|
var typeImports = destination_2;
|
|
1206
|
-
var subPackageName = plus_2(this.
|
|
1207
|
-
return new File(Companion_getInstance().
|
|
1206
|
+
var subPackageName = plus_2(this.w22_1, 'generator');
|
|
1207
|
+
return new File(Companion_getInstance().y1k(subPackageName.qv() + toSnakeCase(this, generatorFile.g1r_1.z1k())), plus(plus(plus(this.b23_1, typeImports), generatorImports), generatorFile.h1r_1));
|
|
1208
1208
|
};
|
|
1209
|
-
protoOf(RustIrEmitter).
|
|
1209
|
+
protoOf(RustIrEmitter).vt = function (type, module_0) {
|
|
1210
1210
|
var tmp = convertWithValidation(type, module_0);
|
|
1211
1211
|
// Inline function 'kotlin.collections.map' call
|
|
1212
|
-
var this_0 = type.
|
|
1212
|
+
var this_0 = type.xs_1.ts_1;
|
|
1213
1213
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1214
1214
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1215
1215
|
var _iterator__ex2g4s = this_0.t();
|
|
1216
1216
|
while (_iterator__ex2g4s.u()) {
|
|
1217
1217
|
var item = _iterator__ex2g4s.v();
|
|
1218
|
-
var tmp$ret$0 = item.
|
|
1219
|
-
destination.
|
|
1218
|
+
var tmp$ret$0 = item.bt_1.m1();
|
|
1219
|
+
destination.y(tmp$ret$0);
|
|
1220
1220
|
}
|
|
1221
1221
|
return prependImports(this, sanitizeNames(injectSelfReceiverToValidate(tmp, toSet(destination), '&self'), _get_sanitizationConfig__sns434(this)), buildModelImports(type));
|
|
1222
1222
|
};
|
|
1223
|
-
protoOf(RustIrEmitter).
|
|
1223
|
+
protoOf(RustIrEmitter).kv = function (enum_0, module_0) {
|
|
1224
1224
|
var tmp = convert_0(enum_0);
|
|
1225
1225
|
return sanitizeEnumEntries(tmp, RustIrEmitter$emit$lambda_2(this));
|
|
1226
1226
|
};
|
|
1227
|
-
protoOf(RustIrEmitter).
|
|
1227
|
+
protoOf(RustIrEmitter).av = function (union) {
|
|
1228
1228
|
return convert_1(union);
|
|
1229
1229
|
};
|
|
1230
|
-
protoOf(RustIrEmitter).
|
|
1230
|
+
protoOf(RustIrEmitter).fv = function (refined) {
|
|
1231
1231
|
return replaceStructWithRefinedFunctions(convert_2(refined), refined);
|
|
1232
1232
|
};
|
|
1233
|
-
protoOf(RustIrEmitter).
|
|
1233
|
+
protoOf(RustIrEmitter).lv = function (endpoint) {
|
|
1234
1234
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1235
1235
|
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_3(endpoint))))));
|
|
1236
1236
|
var scope = new TransformScope(this_0);
|
|
1237
|
-
scope.
|
|
1238
|
-
var tmp = scope.
|
|
1237
|
+
scope.w1y(fixResponseSwitchPatterns());
|
|
1238
|
+
var tmp = scope.r1y_1;
|
|
1239
1239
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1240
1240
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1241
1241
|
var scope_0 = new TransformScope(this_1);
|
|
1242
|
-
scope_0.
|
|
1243
|
-
var tmp_0 = scope_0.
|
|
1242
|
+
scope_0.w1y(fixConstructorCalls());
|
|
1243
|
+
var tmp_0 = scope_0.r1y_1;
|
|
1244
1244
|
var tmp$ret$3 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1245
1245
|
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$3), endpoint)), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1246
1246
|
};
|
|
1247
|
-
protoOf(RustIrEmitter).
|
|
1247
|
+
protoOf(RustIrEmitter).zu = function (channel) {
|
|
1248
1248
|
return convert_4(channel);
|
|
1249
1249
|
};
|
|
1250
|
-
protoOf(RustIrEmitter).
|
|
1251
|
-
var endpointName = endpoint.
|
|
1250
|
+
protoOf(RustIrEmitter).k1z = function (endpoint) {
|
|
1251
|
+
var endpointName = endpoint.ft_1.m1();
|
|
1252
1252
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1253
1253
|
var clientName = endpointName + 'Client';
|
|
1254
1254
|
var methodName = toSnakeCase(this, endpointName);
|
|
1255
1255
|
var _destruct__k2r9zo = buildClientParams(this, endpoint);
|
|
1256
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1257
|
-
var requestArgs = _destruct__k2r9zo.
|
|
1256
|
+
var paramsStr = _destruct__k2r9zo.mf();
|
|
1257
|
+
var requestArgs = _destruct__k2r9zo.nf();
|
|
1258
1258
|
var requestConstruction = endpointModuleName + '::Request::new(' + requestArgs + ')';
|
|
1259
1259
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1260
1260
|
var this_0 = importReferences(endpoint);
|
|
@@ -1263,9 +1263,9 @@ protoOf(RustIrEmitter).y1v = function (endpoint) {
|
|
|
1263
1263
|
var _iterator__ex2g4s = this_0.t();
|
|
1264
1264
|
while (_iterator__ex2g4s.u()) {
|
|
1265
1265
|
var e = _iterator__ex2g4s.v();
|
|
1266
|
-
var key = e.
|
|
1267
|
-
if (set.
|
|
1268
|
-
list.
|
|
1266
|
+
var key = e.my_1;
|
|
1267
|
+
if (set.y(key)) {
|
|
1268
|
+
list.y(e);
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1274,8 +1274,8 @@ protoOf(RustIrEmitter).y1v = function (endpoint) {
|
|
|
1274
1274
|
var _iterator__ex2g4s_0 = list.t();
|
|
1275
1275
|
while (_iterator__ex2g4s_0.u()) {
|
|
1276
1276
|
var item = _iterator__ex2g4s_0.v();
|
|
1277
|
-
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1278
|
-
destination.
|
|
1277
|
+
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.my_1), item.my_1);
|
|
1278
|
+
destination.y(tmp$ret$2);
|
|
1279
1279
|
}
|
|
1280
1280
|
var modelImports = destination;
|
|
1281
1281
|
var namespacePath = endpointModuleName + '::' + endpointName;
|
|
@@ -1283,35 +1283,35 @@ protoOf(RustIrEmitter).y1v = function (endpoint) {
|
|
|
1283
1283
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1284
1284
|
// Inline function 'kotlin.apply' call
|
|
1285
1285
|
var this_1 = ArrayList_init_$Create$_0();
|
|
1286
|
-
this_1.
|
|
1287
|
-
this_1.
|
|
1288
|
-
this_1.
|
|
1289
|
-
this_1.
|
|
1290
|
-
this_1.
|
|
1291
|
-
this_1.
|
|
1292
|
-
this_1.
|
|
1293
|
-
this_1.
|
|
1294
|
-
this_1.
|
|
1295
|
-
this_1.
|
|
1296
|
-
this_1.
|
|
1297
|
-
this_1.
|
|
1298
|
-
var tmp$ret$8 = this_1.
|
|
1286
|
+
this_1.y('pub struct ' + clientName + "<'a, S: Serialization, T: Transportation> {");
|
|
1287
|
+
this_1.y(" pub serialization: &'a S,");
|
|
1288
|
+
this_1.y(" pub transportation: &'a T,");
|
|
1289
|
+
this_1.y('}');
|
|
1290
|
+
this_1.y("impl<'a, S: Serialization, T: Transportation> " + namespacePath + '::Call for ' + clientName + "<'a, S, T> {");
|
|
1291
|
+
this_1.y(' async fn ' + methodName + '(&self' + paramsStr + ') -> ' + endpointModuleName + '::Response {');
|
|
1292
|
+
this_1.y(' let request = ' + requestConstruction + ';');
|
|
1293
|
+
this_1.y(' let raw_request = ' + namespacePath + '::to_raw_request(self.serialization, request);');
|
|
1294
|
+
this_1.y(' let raw_response = self.transportation.transport(&raw_request).await;');
|
|
1295
|
+
this_1.y(' ' + namespacePath + '::from_raw_response(self.serialization, raw_response)');
|
|
1296
|
+
this_1.y(' }');
|
|
1297
|
+
this_1.y('}');
|
|
1298
|
+
var tmp$ret$8 = this_1.p5();
|
|
1299
1299
|
var code = joinToString(tmp$ret$8, '\n');
|
|
1300
|
-
var subPackageName = plus_2(this.
|
|
1301
|
-
var tmp = Companion_getInstance().
|
|
1300
|
+
var subPackageName = plus_2(this.w22_1, 'client');
|
|
1301
|
+
var tmp = Companion_getInstance().y1k(subPackageName.qv() + toSnakeCase(this, clientName));
|
|
1302
1302
|
// Inline function 'kotlin.collections.buildList' call
|
|
1303
1303
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1304
1304
|
// Inline function 'kotlin.apply' call
|
|
1305
1305
|
var this_2 = ArrayList_init_$Create$_0();
|
|
1306
|
-
this_2.
|
|
1307
|
-
this_2.
|
|
1308
|
-
this_2.
|
|
1309
|
-
this_2.
|
|
1310
|
-
var tmp$ret$12 = this_2.
|
|
1306
|
+
this_2.y(import_0('super::super::wirespec', '*'));
|
|
1307
|
+
this_2.y(import_0('super::super::endpoint', endpointModuleName));
|
|
1308
|
+
this_2.g1(modelImports);
|
|
1309
|
+
this_2.y(new RawElement(code));
|
|
1310
|
+
var tmp$ret$12 = this_2.p5();
|
|
1311
1311
|
return new File(tmp, tmp$ret$12);
|
|
1312
1312
|
};
|
|
1313
|
-
protoOf(RustIrEmitter).
|
|
1314
|
-
logger.
|
|
1313
|
+
protoOf(RustIrEmitter).i1z = function (endpoints, logger) {
|
|
1314
|
+
logger.uu('Emitting main Client for ' + endpoints.b1() + ' endpoints');
|
|
1315
1315
|
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitClient$lambda(this));
|
|
1316
1316
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1317
1317
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
@@ -1328,9 +1328,9 @@ protoOf(RustIrEmitter).w1v = function (endpoints, logger) {
|
|
|
1328
1328
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1329
1329
|
while (_iterator__ex2g4s_0.u()) {
|
|
1330
1330
|
var e = _iterator__ex2g4s_0.v();
|
|
1331
|
-
var key = e.
|
|
1332
|
-
if (set.
|
|
1333
|
-
list_0.
|
|
1331
|
+
var key = e.my_1;
|
|
1332
|
+
if (set.y(key)) {
|
|
1333
|
+
list_0.y(e);
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
1336
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -1355,7 +1355,7 @@ protoOf(RustIrEmitter).w1v = function (endpoints, logger) {
|
|
|
1355
1355
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1356
1356
|
while (_iterator__ex2g4s_2.u()) {
|
|
1357
1357
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1358
|
-
if (element_1.
|
|
1358
|
+
if (element_1.ft_1.m1() === element_0.my_1) {
|
|
1359
1359
|
tmp$ret$5 = false;
|
|
1360
1360
|
break $l$block_0;
|
|
1361
1361
|
}
|
|
@@ -1363,7 +1363,7 @@ protoOf(RustIrEmitter).w1v = function (endpoints, logger) {
|
|
|
1363
1363
|
tmp$ret$5 = true;
|
|
1364
1364
|
}
|
|
1365
1365
|
if (tmp$ret$5) {
|
|
1366
|
-
destination_0.
|
|
1366
|
+
destination_0.y(element_0);
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
1369
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1372,8 +1372,8 @@ protoOf(RustIrEmitter).w1v = function (endpoints, logger) {
|
|
|
1372
1372
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1373
1373
|
while (_iterator__ex2g4s_3.u()) {
|
|
1374
1374
|
var item = _iterator__ex2g4s_3.v();
|
|
1375
|
-
var tmp$ret$10 = import_0('super::model::' + toSnakeCase(this, item.
|
|
1376
|
-
destination_1.
|
|
1375
|
+
var tmp$ret$10 = import_0('super::model::' + toSnakeCase(this, item.my_1), item.my_1);
|
|
1376
|
+
destination_1.y(tmp$ret$10);
|
|
1377
1377
|
}
|
|
1378
1378
|
var modelImports = destination_1;
|
|
1379
1379
|
// Inline function 'kotlin.collections.flatMap' call
|
|
@@ -1382,9 +1382,9 @@ protoOf(RustIrEmitter).w1v = function (endpoints, logger) {
|
|
|
1382
1382
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1383
1383
|
while (_iterator__ex2g4s_4.u()) {
|
|
1384
1384
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1385
|
-
var endpointModuleName = toSnakeCase(this, element_2.
|
|
1386
|
-
var clientModuleName = toSnakeCase(this, element_2.
|
|
1387
|
-
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.
|
|
1385
|
+
var endpointModuleName = toSnakeCase(this, element_2.ft_1.m1());
|
|
1386
|
+
var clientModuleName = toSnakeCase(this, element_2.ft_1.m1() + 'Client');
|
|
1387
|
+
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.ft_1.m1() + 'Client')]);
|
|
1388
1388
|
addAll(destination_2, list_1);
|
|
1389
1389
|
}
|
|
1390
1390
|
var endpointAndClientImports = destination_2;
|
|
@@ -1394,30 +1394,30 @@ protoOf(RustIrEmitter).w1v = function (endpoints, logger) {
|
|
|
1394
1394
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1395
1395
|
while (_iterator__ex2g4s_5.u()) {
|
|
1396
1396
|
var element_3 = _iterator__ex2g4s_5.v();
|
|
1397
|
-
var endpointName = element_3.
|
|
1397
|
+
var endpointName = element_3.ft_1.m1();
|
|
1398
1398
|
var endpointModuleName_0 = toSnakeCase(this, endpointName);
|
|
1399
1399
|
var namespacePath = endpointModuleName_0 + '::' + endpointName;
|
|
1400
1400
|
var methodName = toSnakeCase(this, endpointName);
|
|
1401
1401
|
var _destruct__k2r9zo = buildClientParams(this, element_3);
|
|
1402
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1403
|
-
var callArgs = _destruct__k2r9zo.
|
|
1402
|
+
var paramsStr = _destruct__k2r9zo.mf();
|
|
1403
|
+
var callArgs = _destruct__k2r9zo.nf();
|
|
1404
1404
|
var delegateCall = endpointName + 'Client { serialization: &self.serialization, transportation: &self.transportation }\n' + (' .' + methodName + '(' + callArgs + ').await');
|
|
1405
1405
|
var list_2 = listOf_0(['impl<S: Serialization, T: Transportation> ' + namespacePath + '::Call for Client<S, T> {', ' async fn ' + methodName + '(&self' + paramsStr + ') -> ' + endpointModuleName_0 + '::Response {', ' ' + delegateCall, ' }', '}']);
|
|
1406
1406
|
addAll(destination_3, list_2);
|
|
1407
1407
|
}
|
|
1408
1408
|
var implBlocks = destination_3;
|
|
1409
1409
|
var code = joinToString(plus(listOf_0(['pub struct Client<S: Serialization, T: Transportation> {', ' pub serialization: S,', ' pub transportation: T,', '}']), implBlocks), '\n');
|
|
1410
|
-
var tmp_0 = Companion_getInstance().
|
|
1410
|
+
var tmp_0 = Companion_getInstance().y1k(this.w22_1.qv() + 'client');
|
|
1411
1411
|
// Inline function 'kotlin.collections.buildList' call
|
|
1412
1412
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1413
1413
|
// Inline function 'kotlin.apply' call
|
|
1414
1414
|
var this_0 = ArrayList_init_$Create$_0();
|
|
1415
|
-
this_0.
|
|
1416
|
-
this_0.
|
|
1417
|
-
this_0.
|
|
1418
|
-
this_0.
|
|
1419
|
-
this_0.
|
|
1420
|
-
var tmp$ret$22 = this_0.
|
|
1415
|
+
this_0.y(new RawElement(modDeclarations));
|
|
1416
|
+
this_0.y(import_0('super::wirespec', '*'));
|
|
1417
|
+
this_0.g1(modelImports);
|
|
1418
|
+
this_0.g1(endpointAndClientImports);
|
|
1419
|
+
this_0.y(new RawElement(code));
|
|
1420
|
+
var tmp$ret$22 = this_0.p5();
|
|
1421
1421
|
return new File(tmp_0, tmp$ret$22);
|
|
1422
1422
|
};
|
|
1423
1423
|
function get_rustSelfParam() {
|
|
@@ -1435,8 +1435,8 @@ function fixResponseSwitchPatterns() {
|
|
|
1435
1435
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1436
1436
|
// Inline function 'kotlin.apply' call
|
|
1437
1437
|
var this_0 = new TransformerBuilder();
|
|
1438
|
-
this_0.
|
|
1439
|
-
return this_0.
|
|
1438
|
+
this_0.y1y(fixResponseSwitchPatterns$lambda);
|
|
1439
|
+
return this_0.j1m();
|
|
1440
1440
|
}
|
|
1441
1441
|
function buildModelImports(_this__u8e3s4) {
|
|
1442
1442
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1447,9 +1447,9 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1447
1447
|
var _iterator__ex2g4s = this_0.t();
|
|
1448
1448
|
while (_iterator__ex2g4s.u()) {
|
|
1449
1449
|
var e = _iterator__ex2g4s.v();
|
|
1450
|
-
var key = e.
|
|
1451
|
-
if (set.
|
|
1452
|
-
list.
|
|
1450
|
+
var key = e.my_1;
|
|
1451
|
+
if (set.y(key)) {
|
|
1452
|
+
list.y(e);
|
|
1453
1453
|
}
|
|
1454
1454
|
}
|
|
1455
1455
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1458,8 +1458,8 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1458
1458
|
var _iterator__ex2g4s_0 = list.t();
|
|
1459
1459
|
while (_iterator__ex2g4s_0.u()) {
|
|
1460
1460
|
var item = _iterator__ex2g4s_0.v();
|
|
1461
|
-
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.
|
|
1462
|
-
destination.
|
|
1461
|
+
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.my_1), Companion_getInstance().y1k(item.my_1).z1k());
|
|
1462
|
+
destination.y(tmp$ret$2);
|
|
1463
1463
|
}
|
|
1464
1464
|
return destination;
|
|
1465
1465
|
}
|
|
@@ -1470,14 +1470,14 @@ function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
1470
1470
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1471
1471
|
var tmp = scope;
|
|
1472
1472
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1473
|
-
var this_0 = scope.
|
|
1473
|
+
var this_0 = scope.r1y_1;
|
|
1474
1474
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1475
1475
|
// Inline function 'kotlin.apply' call
|
|
1476
1476
|
var this_1 = new TransformerBuilder();
|
|
1477
|
-
this_1.
|
|
1478
|
-
var tmp$ret$2 = this_1.
|
|
1479
|
-
tmp.
|
|
1480
|
-
var tmp_0 = scope.
|
|
1477
|
+
this_1.i1m(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1478
|
+
var tmp$ret$2 = this_1.j1m();
|
|
1479
|
+
tmp.r1y_1 = transform(this_0, tmp$ret$2);
|
|
1480
|
+
var tmp_0 = scope.r1y_1;
|
|
1481
1481
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1482
1482
|
}
|
|
1483
1483
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
@@ -1487,14 +1487,14 @@ function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
|
1487
1487
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1488
1488
|
var tmp = scope;
|
|
1489
1489
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1490
|
-
var this_0 = scope.
|
|
1490
|
+
var this_0 = scope.r1y_1;
|
|
1491
1491
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1492
1492
|
// Inline function 'kotlin.apply' call
|
|
1493
1493
|
var this_1 = new TransformerBuilder();
|
|
1494
|
-
this_1.
|
|
1495
|
-
var tmp$ret$2 = this_1.
|
|
1496
|
-
tmp.
|
|
1497
|
-
var tmp_0 = scope.
|
|
1494
|
+
this_1.i1m(injectApiStruct$lambda(endpoint));
|
|
1495
|
+
var tmp$ret$2 = this_1.j1m();
|
|
1496
|
+
tmp.r1y_1 = transform(this_0, tmp$ret$2);
|
|
1497
|
+
var tmp_0 = scope.r1y_1;
|
|
1498
1498
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1499
1499
|
}
|
|
1500
1500
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
@@ -1504,14 +1504,14 @@ function injectResponseFromImpls(_this__u8e3s4) {
|
|
|
1504
1504
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1505
1505
|
var tmp = scope;
|
|
1506
1506
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1507
|
-
var this_0 = scope.
|
|
1507
|
+
var this_0 = scope.r1y_1;
|
|
1508
1508
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1509
1509
|
// Inline function 'kotlin.apply' call
|
|
1510
1510
|
var this_1 = new TransformerBuilder();
|
|
1511
|
-
this_1.
|
|
1512
|
-
var tmp$ret$2 = this_1.
|
|
1513
|
-
tmp.
|
|
1514
|
-
var tmp_0 = scope.
|
|
1511
|
+
this_1.i1m(injectResponseFromImpls$lambda);
|
|
1512
|
+
var tmp$ret$2 = this_1.j1m();
|
|
1513
|
+
tmp.r1y_1 = transform(this_0, tmp$ret$2);
|
|
1514
|
+
var tmp_0 = scope.r1y_1;
|
|
1515
1515
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1516
1516
|
}
|
|
1517
1517
|
function injectHandlerImplForClient(_this__u8e3s4, endpoint) {
|
|
@@ -1521,14 +1521,14 @@ function injectHandlerImplForClient(_this__u8e3s4, endpoint) {
|
|
|
1521
1521
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1522
1522
|
var tmp = scope;
|
|
1523
1523
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1524
|
-
var this_0 = scope.
|
|
1524
|
+
var this_0 = scope.r1y_1;
|
|
1525
1525
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1526
1526
|
// Inline function 'kotlin.apply' call
|
|
1527
1527
|
var this_1 = new TransformerBuilder();
|
|
1528
|
-
this_1.
|
|
1529
|
-
var tmp$ret$2 = this_1.
|
|
1530
|
-
tmp.
|
|
1531
|
-
var tmp_0 = scope.
|
|
1528
|
+
this_1.i1m(injectHandlerImplForClient$lambda);
|
|
1529
|
+
var tmp$ret$2 = this_1.j1m();
|
|
1530
|
+
tmp.r1y_1 = transform(this_0, tmp$ret$2);
|
|
1531
|
+
var tmp_0 = scope.r1y_1;
|
|
1532
1532
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1533
1533
|
}
|
|
1534
1534
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
@@ -1538,14 +1538,14 @@ function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
|
1538
1538
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1539
1539
|
var tmp = scope;
|
|
1540
1540
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1541
|
-
var this_0 = scope.
|
|
1541
|
+
var this_0 = scope.r1y_1;
|
|
1542
1542
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1543
1543
|
// Inline function 'kotlin.apply' call
|
|
1544
1544
|
var this_1 = new TransformerBuilder();
|
|
1545
|
-
this_1.
|
|
1546
|
-
var tmp$ret$2 = this_1.
|
|
1547
|
-
tmp.
|
|
1548
|
-
var tmp_0 = scope.
|
|
1545
|
+
this_1.i1m(injectSelfToHandlerMethods$lambda);
|
|
1546
|
+
var tmp$ret$2 = this_1.j1m();
|
|
1547
|
+
tmp.r1y_1 = transform(this_0, tmp$ret$2);
|
|
1548
|
+
var tmp_0 = scope.r1y_1;
|
|
1549
1549
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1550
1550
|
}
|
|
1551
1551
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
@@ -1555,14 +1555,14 @@ function stripResponseGenerics(_this__u8e3s4) {
|
|
|
1555
1555
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1556
1556
|
var tmp = scope;
|
|
1557
1557
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1558
|
-
var this_0 = scope.
|
|
1558
|
+
var this_0 = scope.r1y_1;
|
|
1559
1559
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1560
1560
|
// Inline function 'kotlin.apply' call
|
|
1561
1561
|
var this_1 = new TransformerBuilder();
|
|
1562
|
-
this_1.
|
|
1563
|
-
var tmp$ret$2 = this_1.
|
|
1564
|
-
tmp.
|
|
1565
|
-
var tmp_0 = scope.
|
|
1562
|
+
this_1.x1y(stripResponseGenerics$lambda);
|
|
1563
|
+
var tmp$ret$2 = this_1.j1m();
|
|
1564
|
+
tmp.r1y_1 = transform(this_0, tmp$ret$2);
|
|
1565
|
+
var tmp_0 = scope.r1y_1;
|
|
1566
1566
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1567
1567
|
}
|
|
1568
1568
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
@@ -1572,14 +1572,14 @@ function stripHandlerExtends(_this__u8e3s4) {
|
|
|
1572
1572
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1573
1573
|
var tmp = scope;
|
|
1574
1574
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1575
|
-
var this_0 = scope.
|
|
1575
|
+
var this_0 = scope.r1y_1;
|
|
1576
1576
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1577
1577
|
// Inline function 'kotlin.apply' call
|
|
1578
1578
|
var this_1 = new TransformerBuilder();
|
|
1579
|
-
this_1.
|
|
1580
|
-
var tmp$ret$2 = this_1.
|
|
1581
|
-
tmp.
|
|
1582
|
-
var tmp_0 = scope.
|
|
1579
|
+
this_1.i1m(stripHandlerExtends$lambda);
|
|
1580
|
+
var tmp$ret$2 = this_1.j1m();
|
|
1581
|
+
tmp.r1y_1 = transform(this_0, tmp$ret$2);
|
|
1582
|
+
var tmp_0 = scope.r1y_1;
|
|
1583
1583
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1584
1584
|
}
|
|
1585
1585
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
@@ -1587,8 +1587,8 @@ function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
|
1587
1587
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1588
1588
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1589
1589
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1590
|
-
scope.
|
|
1591
|
-
var tmp = scope.
|
|
1590
|
+
scope.a1z(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1591
|
+
var tmp = scope.r1y_1;
|
|
1592
1592
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1593
1593
|
}
|
|
1594
1594
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
@@ -1598,34 +1598,34 @@ function stripWirespecPrefix(_this__u8e3s4) {
|
|
|
1598
1598
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1599
1599
|
var tmp = scope;
|
|
1600
1600
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1601
|
-
var this_0 = scope.
|
|
1601
|
+
var this_0 = scope.r1y_1;
|
|
1602
1602
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1603
1603
|
// Inline function 'kotlin.apply' call
|
|
1604
1604
|
var this_1 = new TransformerBuilder();
|
|
1605
|
-
this_1.
|
|
1606
|
-
var tmp$ret$2 = this_1.
|
|
1607
|
-
tmp.
|
|
1608
|
-
var tmp_0 = scope.
|
|
1605
|
+
this_1.x1y(stripWirespecPrefix$lambda);
|
|
1606
|
+
var tmp$ret$2 = this_1.j1m();
|
|
1607
|
+
tmp.r1y_1 = transform(this_0, tmp$ret$2);
|
|
1608
|
+
var tmp_0 = scope.r1y_1;
|
|
1609
1609
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1610
1610
|
}
|
|
1611
1611
|
function flattenForRust(_this__u8e3s4) {
|
|
1612
1612
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1613
1613
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1614
1614
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1615
|
-
var tmp0 = _this__u8e3s4.
|
|
1615
|
+
var tmp0 = _this__u8e3s4.i1r();
|
|
1616
1616
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1617
1617
|
var destination = ArrayList_init_$Create$_0();
|
|
1618
1618
|
var _iterator__ex2g4s = tmp0.t();
|
|
1619
1619
|
while (_iterator__ex2g4s.u()) {
|
|
1620
1620
|
var element = _iterator__ex2g4s.v();
|
|
1621
1621
|
if (element instanceof Namespace) {
|
|
1622
|
-
destination.
|
|
1622
|
+
destination.y(element);
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
1625
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1626
1626
|
var namespace = ensureNotNull(tmp$ret$2);
|
|
1627
1627
|
// Inline function 'kotlin.collections.filter' call
|
|
1628
|
-
var tmp0_0 = namespace.
|
|
1628
|
+
var tmp0_0 = namespace.n1r_1;
|
|
1629
1629
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1630
1630
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1631
1631
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1638,7 +1638,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1638
1638
|
tmp = element_0 instanceof Union_0;
|
|
1639
1639
|
}
|
|
1640
1640
|
if (tmp) {
|
|
1641
|
-
destination_0.
|
|
1641
|
+
destination_0.y(element_0);
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
1644
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1650,20 +1650,20 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1650
1650
|
var tmp_0;
|
|
1651
1651
|
var tmp_1;
|
|
1652
1652
|
if (item instanceof Union_0) {
|
|
1653
|
-
tmp_1 = item.
|
|
1653
|
+
tmp_1 = item.p1u_1.z1k() === 'Response';
|
|
1654
1654
|
} else {
|
|
1655
1655
|
tmp_1 = false;
|
|
1656
1656
|
}
|
|
1657
1657
|
if (tmp_1) {
|
|
1658
1658
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1659
|
-
var tmp0_1 = namespace.
|
|
1659
|
+
var tmp0_1 = namespace.n1r_1;
|
|
1660
1660
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1661
1661
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1662
1662
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
1663
1663
|
while (_iterator__ex2g4s_2.u()) {
|
|
1664
1664
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1665
1665
|
if (element_1 instanceof Struct) {
|
|
1666
|
-
destination_2.
|
|
1666
|
+
destination_2.y(element_1);
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
1669
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1672,8 +1672,8 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1672
1672
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1673
1673
|
while (_iterator__ex2g4s_3.u()) {
|
|
1674
1674
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1675
|
-
var tmp$ret$8 = item_0.
|
|
1676
|
-
destination_3.
|
|
1675
|
+
var tmp$ret$8 = item_0.r1r_1.z1k();
|
|
1676
|
+
destination_3.y(tmp$ret$8);
|
|
1677
1677
|
}
|
|
1678
1678
|
// Inline function 'kotlin.collections.filter' call
|
|
1679
1679
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1681,8 +1681,8 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1681
1681
|
var _iterator__ex2g4s_4 = destination_3.t();
|
|
1682
1682
|
while (_iterator__ex2g4s_4.u()) {
|
|
1683
1683
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1684
|
-
if (get_rustResponsePattern().
|
|
1685
|
-
destination_4.
|
|
1684
|
+
if (get_rustResponsePattern().pc(element_2)) {
|
|
1685
|
+
destination_4.y(element_2);
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1692,23 +1692,23 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1692
1692
|
while (_iterator__ex2g4s_5.u()) {
|
|
1693
1693
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
1694
1694
|
var tmp$ret$14 = Custom_init_$Create$(item_1);
|
|
1695
|
-
destination_5.
|
|
1695
|
+
destination_5.y(tmp$ret$14);
|
|
1696
1696
|
}
|
|
1697
1697
|
var members = destination_5;
|
|
1698
|
-
tmp_0 = item.
|
|
1698
|
+
tmp_0 = item.u1u(VOID, VOID, members, emptyList());
|
|
1699
1699
|
} else {
|
|
1700
1700
|
if (item instanceof Union_0) {
|
|
1701
|
-
tmp_0 = item.
|
|
1701
|
+
tmp_0 = item.u1u(VOID, VOID, VOID, emptyList());
|
|
1702
1702
|
} else {
|
|
1703
1703
|
tmp_0 = item;
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
1706
|
var tmp$ret$17 = tmp_0;
|
|
1707
|
-
destination_1.
|
|
1707
|
+
destination_1.y(tmp$ret$17);
|
|
1708
1708
|
}
|
|
1709
1709
|
var moduleElements = destination_1;
|
|
1710
1710
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1711
|
-
var tmp0_2 = namespace.
|
|
1711
|
+
var tmp0_2 = namespace.n1r_1;
|
|
1712
1712
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1713
1713
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1714
1714
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1721,19 +1721,19 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1721
1721
|
tmp_2 = element_3 instanceof Union_0;
|
|
1722
1722
|
}
|
|
1723
1723
|
if (!tmp_2) {
|
|
1724
|
-
destination_6.
|
|
1724
|
+
destination_6.y(element_3);
|
|
1725
1725
|
}
|
|
1726
1726
|
}
|
|
1727
1727
|
var classElements = destination_6;
|
|
1728
|
-
return new File(namespace.
|
|
1728
|
+
return new File(namespace.m1r_1, plus_0(moduleElements, new Namespace(namespace.m1r_1, classElements, namespace.o1r_1)));
|
|
1729
1729
|
}
|
|
1730
1730
|
function fixConstructorCalls() {
|
|
1731
1731
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1732
1732
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1733
1733
|
// Inline function 'kotlin.apply' call
|
|
1734
1734
|
var this_0 = new TransformerBuilder();
|
|
1735
|
-
this_0.
|
|
1736
|
-
return this_0.
|
|
1735
|
+
this_0.a1z(fixConstructorCalls$lambda);
|
|
1736
|
+
return this_0.j1m();
|
|
1737
1737
|
}
|
|
1738
1738
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1739
1739
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1744,9 +1744,9 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1744
1744
|
var _iterator__ex2g4s = this_0.t();
|
|
1745
1745
|
while (_iterator__ex2g4s.u()) {
|
|
1746
1746
|
var e = _iterator__ex2g4s.v();
|
|
1747
|
-
var key = e.
|
|
1748
|
-
if (set.
|
|
1749
|
-
list.
|
|
1747
|
+
var key = e.my_1;
|
|
1748
|
+
if (set.y(key)) {
|
|
1749
|
+
list.y(e);
|
|
1750
1750
|
}
|
|
1751
1751
|
}
|
|
1752
1752
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1755,24 +1755,24 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1755
1755
|
var _iterator__ex2g4s_0 = list.t();
|
|
1756
1756
|
while (_iterator__ex2g4s_0.u()) {
|
|
1757
1757
|
var item = _iterator__ex2g4s_0.v();
|
|
1758
|
-
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.
|
|
1759
|
-
destination.
|
|
1758
|
+
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.my_1), Companion_getInstance().y1k(item.my_1).z1k());
|
|
1759
|
+
destination.y(tmp$ret$2);
|
|
1760
1760
|
}
|
|
1761
1761
|
return destination;
|
|
1762
1762
|
}
|
|
1763
1763
|
function toRustSnakeCase(_this__u8e3s4) {
|
|
1764
1764
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1765
|
-
return Companion_getInstance().
|
|
1765
|
+
return Companion_getInstance().y1k(_this__u8e3s4).h1q();
|
|
1766
1766
|
}
|
|
1767
1767
|
function buildValidateFunction(refined) {
|
|
1768
1768
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1769
|
-
var constraintExpr = convertConstraint(refined.
|
|
1769
|
+
var constraintExpr = convertConstraint(refined.ev_1, new FieldCall(new VariableReference(Companion_getInstance().y1k('self')), Companion_getInstance().y1k('value')));
|
|
1770
1770
|
return function_0('validate', VOID, VOID, buildValidateFunction$lambda(constraintExpr));
|
|
1771
1771
|
}
|
|
1772
1772
|
function buildToStringFunction(refined) {
|
|
1773
1773
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1774
1774
|
var tmp;
|
|
1775
|
-
if (refined.
|
|
1775
|
+
if (refined.ev_1.qy_1 instanceof String_0) {
|
|
1776
1776
|
tmp = 'self.value.clone()';
|
|
1777
1777
|
} else {
|
|
1778
1778
|
tmp = 'format!("{}", self.value)';
|
|
@@ -1787,8 +1787,8 @@ function buildApiStruct(endpoint) {
|
|
|
1787
1787
|
function generateApiStructCode(_this__u8e3s4) {
|
|
1788
1788
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1789
1789
|
// Inline function 'kotlin.let' call
|
|
1790
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
1791
|
-
var methodName = _this__u8e3s4.
|
|
1790
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.ht_1, '/', VOID, VOID, VOID, VOID, generateApiStructCode$lambda);
|
|
1791
|
+
var methodName = _this__u8e3s4.gt_1.b3_1;
|
|
1792
1792
|
return trimIndent('\n pub struct Api;\n impl Server for Api {\n type Req = Request;\n type Res = Response;\n fn path_template(&self) -> &\'static str { "' + pathTemplate + '" }\n fn method(&self) -> Method { Method::' + methodName + ' }\n }\n ');
|
|
1793
1793
|
}
|
|
1794
1794
|
function fixResponseSwitchPatterns$lambda(s, t) {
|
|
@@ -1797,70 +1797,70 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1797
1797
|
if (!(s instanceof Switch)) {
|
|
1798
1798
|
tmp = true;
|
|
1799
1799
|
} else {
|
|
1800
|
-
var tmp0_safe_receiver = s.
|
|
1801
|
-
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1800
|
+
var tmp0_safe_receiver = s.v1t_1;
|
|
1801
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b1q()) === 'r');
|
|
1802
1802
|
}
|
|
1803
1803
|
if (tmp)
|
|
1804
1804
|
return transformChildren(s, t);
|
|
1805
1805
|
// Inline function 'kotlin.collections.map' call
|
|
1806
|
-
var this_0 = s.
|
|
1806
|
+
var this_0 = s.t1t_1;
|
|
1807
1807
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1808
1808
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1809
1809
|
var _iterator__ex2g4s = this_0.t();
|
|
1810
1810
|
while (_iterator__ex2g4s.u()) {
|
|
1811
1811
|
var item = _iterator__ex2g4s.v();
|
|
1812
|
-
var tmp_0 = item.
|
|
1812
|
+
var tmp_0 = item.a1u_1;
|
|
1813
1813
|
var tmp0_safe_receiver_0 = tmp_0 instanceof Custom ? tmp_0 : null;
|
|
1814
|
-
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.
|
|
1815
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1814
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.s1m_1;
|
|
1815
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z1k();
|
|
1816
1816
|
var tmp_1;
|
|
1817
|
-
if (!(typeName == null) && get_rustResponsePattern().
|
|
1818
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1817
|
+
if (!(typeName == null) && get_rustResponsePattern().pc(typeName)) {
|
|
1818
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.v1t_1).h1q() + ')');
|
|
1819
1819
|
// Inline function 'kotlin.collections.map' call
|
|
1820
|
-
var this_1 = item.
|
|
1820
|
+
var this_1 = item.z1t_1;
|
|
1821
1821
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1822
1822
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1823
1823
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1824
1824
|
while (_iterator__ex2g4s_0.u()) {
|
|
1825
1825
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1826
|
-
var tmp$ret$0 = t.
|
|
1827
|
-
destination_0.
|
|
1826
|
+
var tmp$ret$0 = t.l1y(item_0);
|
|
1827
|
+
destination_0.y(tmp$ret$0);
|
|
1828
1828
|
}
|
|
1829
1829
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1830
1830
|
} else {
|
|
1831
|
-
var tmp_3 = t.
|
|
1831
|
+
var tmp_3 = t.m1y(item.y1t_1);
|
|
1832
1832
|
// Inline function 'kotlin.collections.map' call
|
|
1833
|
-
var this_2 = item.
|
|
1833
|
+
var this_2 = item.z1t_1;
|
|
1834
1834
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1835
1835
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1836
1836
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1837
1837
|
while (_iterator__ex2g4s_1.u()) {
|
|
1838
1838
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1839
|
-
var tmp$ret$3 = t.
|
|
1840
|
-
destination_1.
|
|
1839
|
+
var tmp$ret$3 = t.l1y(item_1);
|
|
1840
|
+
destination_1.y(tmp$ret$3);
|
|
1841
1841
|
}
|
|
1842
1842
|
var tmp_4 = destination_1;
|
|
1843
|
-
var tmp2_safe_receiver = item.
|
|
1843
|
+
var tmp2_safe_receiver = item.a1u_1;
|
|
1844
1844
|
var tmp_5;
|
|
1845
1845
|
if (tmp2_safe_receiver == null) {
|
|
1846
1846
|
tmp_5 = null;
|
|
1847
1847
|
} else {
|
|
1848
1848
|
// Inline function 'kotlin.let' call
|
|
1849
|
-
tmp_5 = t.
|
|
1849
|
+
tmp_5 = t.j1y(tmp2_safe_receiver);
|
|
1850
1850
|
}
|
|
1851
1851
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1852
1852
|
}
|
|
1853
1853
|
var tmp$ret$8 = tmp_1;
|
|
1854
|
-
destination.
|
|
1854
|
+
destination.y(tmp$ret$8);
|
|
1855
1855
|
}
|
|
1856
1856
|
var transformedCases = destination;
|
|
1857
|
-
return s.
|
|
1857
|
+
return s.x1t(t.m1y(s.s1t_1), transformedCases, null);
|
|
1858
1858
|
}
|
|
1859
1859
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1860
1860
|
return function (element, transformer) {
|
|
1861
1861
|
var tmp;
|
|
1862
1862
|
if (element instanceof Struct) {
|
|
1863
|
-
tmp = element.
|
|
1863
|
+
tmp = element.y1r(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1864
1864
|
} else {
|
|
1865
1865
|
tmp = element;
|
|
1866
1866
|
}
|
|
@@ -1872,7 +1872,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1872
1872
|
return function (element, transformer) {
|
|
1873
1873
|
var tmp;
|
|
1874
1874
|
if (element instanceof Namespace) {
|
|
1875
|
-
tmp = element.
|
|
1875
|
+
tmp = element.q1r(VOID, plus(element.n1r_1, listOf(buildApiStruct($endpoint))));
|
|
1876
1876
|
} else {
|
|
1877
1877
|
tmp = element;
|
|
1878
1878
|
}
|
|
@@ -1885,7 +1885,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1885
1885
|
var tmp;
|
|
1886
1886
|
if (element instanceof File) {
|
|
1887
1887
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1888
|
-
var tmp0 = element.
|
|
1888
|
+
var tmp0 = element.h1r_1;
|
|
1889
1889
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1890
1890
|
var destination = ArrayList_init_$Create$_0();
|
|
1891
1891
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1895,28 +1895,28 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1895
1895
|
var tmp_1;
|
|
1896
1896
|
var tmp_2;
|
|
1897
1897
|
if (element_0 instanceof Union_0) {
|
|
1898
|
-
tmp_2 = element_0.
|
|
1898
|
+
tmp_2 = element_0.p1u_1.z1k() === 'Response';
|
|
1899
1899
|
} else {
|
|
1900
1900
|
tmp_2 = false;
|
|
1901
1901
|
}
|
|
1902
1902
|
if (tmp_2) {
|
|
1903
1903
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1904
|
-
tmp_1 = !element_0.
|
|
1904
|
+
tmp_1 = !element_0.r1u_1.r();
|
|
1905
1905
|
} else {
|
|
1906
1906
|
tmp_1 = false;
|
|
1907
1907
|
}
|
|
1908
1908
|
if (tmp_1) {
|
|
1909
1909
|
var tmp_3 = listOf(element_0);
|
|
1910
1910
|
// Inline function 'kotlin.collections.map' call
|
|
1911
|
-
var this_0 = element_0.
|
|
1911
|
+
var this_0 = element_0.r1u_1;
|
|
1912
1912
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1913
1913
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1914
1914
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1915
1915
|
while (_iterator__ex2g4s_0.u()) {
|
|
1916
1916
|
var item = _iterator__ex2g4s_0.v();
|
|
1917
|
-
var memberName = item.
|
|
1917
|
+
var memberName = item.s1m_1.z1k();
|
|
1918
1918
|
var tmp$ret$1 = new RawElement('impl From<' + memberName + '> for Response { fn from(value: ' + memberName + ') -> Self { Response::' + memberName + '(value) } }\n');
|
|
1919
|
-
destination_0.
|
|
1919
|
+
destination_0.y(tmp$ret$1);
|
|
1920
1920
|
}
|
|
1921
1921
|
tmp_0 = plus(tmp_3, destination_0);
|
|
1922
1922
|
} else {
|
|
@@ -1925,7 +1925,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1925
1925
|
var list = tmp_0;
|
|
1926
1926
|
addAll(destination, list);
|
|
1927
1927
|
}
|
|
1928
|
-
tmp = element.
|
|
1928
|
+
tmp = element.k1r(VOID, destination);
|
|
1929
1929
|
} else {
|
|
1930
1930
|
tmp = element;
|
|
1931
1931
|
}
|
|
@@ -1939,14 +1939,14 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1939
1939
|
var tmp$ret$4;
|
|
1940
1940
|
$l$block_1: {
|
|
1941
1941
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1942
|
-
var tmp0 = element.
|
|
1942
|
+
var tmp0 = element.n1r_1;
|
|
1943
1943
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1944
1944
|
var destination = ArrayList_init_$Create$_0();
|
|
1945
1945
|
var _iterator__ex2g4s = tmp0.t();
|
|
1946
1946
|
while (_iterator__ex2g4s.u()) {
|
|
1947
1947
|
var element_0 = _iterator__ex2g4s.v();
|
|
1948
1948
|
if (element_0 instanceof Interface) {
|
|
1949
|
-
destination.
|
|
1949
|
+
destination.y(element_0);
|
|
1950
1950
|
}
|
|
1951
1951
|
}
|
|
1952
1952
|
var tmp$ret$3;
|
|
@@ -1955,7 +1955,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1955
1955
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1956
1956
|
while (_iterator__ex2g4s_0.u()) {
|
|
1957
1957
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
1958
|
-
if (element_1.
|
|
1958
|
+
if (element_1.a1s_1.equals(Companion_getInstance().y1k('Handler'))) {
|
|
1959
1959
|
tmp$ret$3 = element_1;
|
|
1960
1960
|
break $l$block;
|
|
1961
1961
|
}
|
|
@@ -1972,14 +1972,14 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1972
1972
|
}
|
|
1973
1973
|
var handler = tmp_0;
|
|
1974
1974
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1975
|
-
var tmp0_0 = handler.
|
|
1975
|
+
var tmp0_0 = handler.b1s_1;
|
|
1976
1976
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1977
1977
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1978
1978
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
1979
1979
|
while (_iterator__ex2g4s_1.u()) {
|
|
1980
1980
|
var element_2 = _iterator__ex2g4s_1.v();
|
|
1981
1981
|
if (element_2 instanceof Function_0) {
|
|
1982
|
-
destination_0.
|
|
1982
|
+
destination_0.y(element_2);
|
|
1983
1983
|
}
|
|
1984
1984
|
}
|
|
1985
1985
|
var tmp1_elvis_lhs = firstOrNull_0(destination_0);
|
|
@@ -1991,8 +1991,8 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1991
1991
|
tmp_1 = tmp1_elvis_lhs;
|
|
1992
1992
|
}
|
|
1993
1993
|
var method = tmp_1;
|
|
1994
|
-
var methodName = method.
|
|
1995
|
-
tmp$ret$4 = element.
|
|
1994
|
+
var methodName = method.o1o_1.h1q();
|
|
1995
|
+
tmp$ret$4 = element.q1r(VOID, plus(element.n1r_1, listOf(new RawElement(trimIndent('\n impl<C: Client> Handler for C {\n async fn ' + methodName + '(&self, request: Request) -> Response {\n let raw = to_raw_request(self.serialization(), request);\n let resp = self.transport().transport(&raw).await;\n from_raw_response(self.serialization(), resp)\n }\n }\n ')))));
|
|
1996
1996
|
}
|
|
1997
1997
|
tmp = tmp$ret$4;
|
|
1998
1998
|
} else {
|
|
@@ -2007,7 +2007,7 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2007
2007
|
if (element instanceof Interface) {
|
|
2008
2008
|
var tmp$ret$0;
|
|
2009
2009
|
$l$block: {
|
|
2010
|
-
if (!element.
|
|
2010
|
+
if (!element.a1s_1.equals(Companion_getInstance().y1k('Handler')) && !element.a1s_1.equals(Companion_getInstance().y1k('Call'))) {
|
|
2011
2011
|
tmp$ret$0 = element;
|
|
2012
2012
|
break $l$block;
|
|
2013
2013
|
}
|
|
@@ -2016,14 +2016,14 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2016
2016
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
2017
2017
|
var tmp_0 = scope;
|
|
2018
2018
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
2019
|
-
var this_0 = scope.
|
|
2019
|
+
var this_0 = scope.r1y_1;
|
|
2020
2020
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2021
2021
|
// Inline function 'kotlin.apply' call
|
|
2022
2022
|
var this_1 = new TransformerBuilder();
|
|
2023
|
-
this_1.
|
|
2024
|
-
var tmp$ret$3 = this_1.
|
|
2025
|
-
tmp_0.
|
|
2026
|
-
var tmp_1 = scope.
|
|
2023
|
+
this_1.i1m(injectSelfToHandlerMethods$lambda$lambda);
|
|
2024
|
+
var tmp$ret$3 = this_1.j1m();
|
|
2025
|
+
tmp_0.r1y_1 = transform(this_0, tmp$ret$3);
|
|
2026
|
+
var tmp_1 = scope.r1y_1;
|
|
2027
2027
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2028
2028
|
}
|
|
2029
2029
|
tmp = tmp$ret$0;
|
|
@@ -2037,7 +2037,7 @@ function injectSelfToHandlerMethods$lambda$lambda(element, transformer) {
|
|
|
2037
2037
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2038
2038
|
var tmp;
|
|
2039
2039
|
if (element instanceof Function_0) {
|
|
2040
|
-
tmp = element.
|
|
2040
|
+
tmp = element.w1o(Companion_getInstance().y1k(element.o1o_1.h1q()), VOID, plus(listOf(get_rustSelfParam()), element.q1o_1));
|
|
2041
2041
|
} else {
|
|
2042
2042
|
tmp = element;
|
|
2043
2043
|
}
|
|
@@ -2050,14 +2050,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2050
2050
|
if (type instanceof Custom) {
|
|
2051
2051
|
var tmp_0;
|
|
2052
2052
|
var tmp_1;
|
|
2053
|
-
if (startsWith(type.
|
|
2053
|
+
if (startsWith(type.s1m_1.z1k(), 'Response')) {
|
|
2054
2054
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2055
|
-
tmp_1 = !type.
|
|
2055
|
+
tmp_1 = !type.t1m_1.r();
|
|
2056
2056
|
} else {
|
|
2057
2057
|
tmp_1 = false;
|
|
2058
2058
|
}
|
|
2059
2059
|
if (tmp_1) {
|
|
2060
|
-
tmp_0 = type.
|
|
2060
|
+
tmp_0 = type.x1q(VOID, emptyList());
|
|
2061
2061
|
} else {
|
|
2062
2062
|
tmp_0 = type;
|
|
2063
2063
|
}
|
|
@@ -2072,7 +2072,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2072
2072
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2073
2073
|
var tmp;
|
|
2074
2074
|
if (element instanceof Interface) {
|
|
2075
|
-
tmp = element.
|
|
2075
|
+
tmp = element.a1s_1.equals(Companion_getInstance().y1k('Handler')) || element.a1s_1.equals(Companion_getInstance().y1k('Call')) ? element.h1s(VOID, VOID, emptyList()) : element;
|
|
2076
2076
|
} else {
|
|
2077
2077
|
tmp = element;
|
|
2078
2078
|
}
|
|
@@ -2085,17 +2085,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2085
2085
|
var tmp_0;
|
|
2086
2086
|
var tmp_1;
|
|
2087
2087
|
if (s instanceof RawExpression) {
|
|
2088
|
-
tmp_1 = $identifierPattern.
|
|
2088
|
+
tmp_1 = $identifierPattern.pc(s.x1s_1);
|
|
2089
2089
|
} else {
|
|
2090
2090
|
tmp_1 = false;
|
|
2091
2091
|
}
|
|
2092
2092
|
if (tmp_1) {
|
|
2093
|
-
tmp_0 = !contains(s.
|
|
2093
|
+
tmp_0 = !contains(s.x1s_1, '.');
|
|
2094
2094
|
} else {
|
|
2095
2095
|
tmp_0 = false;
|
|
2096
2096
|
}
|
|
2097
2097
|
if (tmp_0) {
|
|
2098
|
-
tmp = new VariableReference(Companion_getInstance().
|
|
2098
|
+
tmp = new VariableReference(Companion_getInstance().y1k(s.x1s_1));
|
|
2099
2099
|
} else {
|
|
2100
2100
|
tmp = transformChildren(s, t);
|
|
2101
2101
|
}
|
|
@@ -2106,10 +2106,10 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2106
2106
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2107
2107
|
var tmp;
|
|
2108
2108
|
if (type instanceof Custom) {
|
|
2109
|
-
var pascalName = type.
|
|
2109
|
+
var pascalName = type.s1m_1.z1k();
|
|
2110
2110
|
var tmp_0;
|
|
2111
2111
|
if (startsWith(pascalName, 'Wirespec.')) {
|
|
2112
|
-
tmp_0 = type.
|
|
2112
|
+
tmp_0 = type.x1q(Companion_getInstance().y1k(removePrefix(pascalName, 'Wirespec.')));
|
|
2113
2113
|
} else {
|
|
2114
2114
|
tmp_0 = type;
|
|
2115
2115
|
}
|
|
@@ -2124,38 +2124,38 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2124
2124
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2125
2125
|
if (!(s instanceof ConstructorStatement))
|
|
2126
2126
|
return transformChildren(s, t);
|
|
2127
|
-
var tmp = s.
|
|
2127
|
+
var tmp = s.d1r_1;
|
|
2128
2128
|
var tmp0_safe_receiver = tmp instanceof Custom ? tmp : null;
|
|
2129
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2130
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
2129
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s1m_1;
|
|
2130
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z1k();
|
|
2131
2131
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2132
|
-
var this_0 = s.
|
|
2132
|
+
var this_0 = s.e1r_1;
|
|
2133
2133
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2134
|
-
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.
|
|
2134
|
+
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.b1()));
|
|
2135
2135
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
2136
|
-
var _iterator__ex2g4s = this_0.
|
|
2136
|
+
var _iterator__ex2g4s = this_0.k1().t();
|
|
2137
2137
|
while (_iterator__ex2g4s.u()) {
|
|
2138
2138
|
var element = _iterator__ex2g4s.v();
|
|
2139
|
-
var tmp_0 = element.
|
|
2140
|
-
var tmp$ret$1 = t.
|
|
2141
|
-
destination.
|
|
2139
|
+
var tmp_0 = element.l1();
|
|
2140
|
+
var tmp$ret$1 = t.m1y(element.m1());
|
|
2141
|
+
destination.t2(tmp_0, tmp$ret$1);
|
|
2142
2142
|
}
|
|
2143
2143
|
var transformedArgs = destination;
|
|
2144
|
-
return !(typeName == null) && get_rustResponsePattern().
|
|
2144
|
+
return !(typeName == null) && get_rustResponsePattern().pc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().y1k('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);
|
|
2145
2145
|
}
|
|
2146
2146
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2147
2147
|
return function ($this$function) {
|
|
2148
|
-
$this$function.
|
|
2149
|
-
$this$function.
|
|
2150
|
-
$this$function.
|
|
2148
|
+
$this$function.j1l('&self', Custom_init_$Create$(''));
|
|
2149
|
+
$this$function.m1l(Boolean_instance);
|
|
2150
|
+
$this$function.n1l($constraintExpr);
|
|
2151
2151
|
return Unit_instance;
|
|
2152
2152
|
};
|
|
2153
2153
|
}
|
|
2154
2154
|
function buildToStringFunction$lambda($expr) {
|
|
2155
2155
|
return function ($this$function) {
|
|
2156
|
-
$this$function.
|
|
2157
|
-
$this$function.
|
|
2158
|
-
$this$function.
|
|
2156
|
+
$this$function.j1l('&self', Custom_init_$Create$(''));
|
|
2157
|
+
$this$function.m1l(String_instance);
|
|
2158
|
+
$this$function.n1l(new RawExpression($expr));
|
|
2159
2159
|
return Unit_instance;
|
|
2160
2160
|
};
|
|
2161
2161
|
}
|
|
@@ -2163,10 +2163,10 @@ function generateApiStructCode$lambda(segment) {
|
|
|
2163
2163
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2164
2164
|
var tmp;
|
|
2165
2165
|
if (segment instanceof Literal) {
|
|
2166
|
-
tmp = segment.
|
|
2166
|
+
tmp = segment.iu_1;
|
|
2167
2167
|
} else {
|
|
2168
2168
|
if (segment instanceof Param) {
|
|
2169
|
-
tmp = '{' + segment.
|
|
2169
|
+
tmp = '{' + segment.mt_1.m1() + '}';
|
|
2170
2170
|
} else {
|
|
2171
2171
|
noWhenBranchMatchedException();
|
|
2172
2172
|
}
|
|
@@ -2177,39 +2177,39 @@ var properties_initialized_RustIrTransformer_kt_hr6k9w;
|
|
|
2177
2177
|
function _init_properties_RustIrTransformer_kt__rrvmwq() {
|
|
2178
2178
|
if (!properties_initialized_RustIrTransformer_kt_hr6k9w) {
|
|
2179
2179
|
properties_initialized_RustIrTransformer_kt_hr6k9w = true;
|
|
2180
|
-
rustSelfParam = new Parameter(Companion_getInstance().
|
|
2180
|
+
rustSelfParam = new Parameter(Companion_getInstance().y1k('&self'), Custom_init_$Create$(''));
|
|
2181
2181
|
rustResponsePattern = Regex_init_$Create$('Response(\\d+|Default)');
|
|
2182
2182
|
}
|
|
2183
2183
|
}
|
|
2184
2184
|
function borrowParamsOf($this, fn) {
|
|
2185
2185
|
// Inline function 'kotlin.collections.map' call
|
|
2186
|
-
var this_0 = fn.
|
|
2186
|
+
var this_0 = fn.q1o_1;
|
|
2187
2187
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2188
2188
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2189
2189
|
var _iterator__ex2g4s = this_0.t();
|
|
2190
2190
|
while (_iterator__ex2g4s.u()) {
|
|
2191
2191
|
var item = _iterator__ex2g4s.v();
|
|
2192
2192
|
var tmp;
|
|
2193
|
-
if (RustTransform_getInstance().
|
|
2193
|
+
if (RustTransform_getInstance().n23(item.j1t_1)) {
|
|
2194
2194
|
tmp = item;
|
|
2195
2195
|
} else {
|
|
2196
|
-
tmp = item.
|
|
2196
|
+
tmp = item.m1t(VOID, applyBorrowRule(RustTransform_getInstance(), item.k1t_1));
|
|
2197
2197
|
}
|
|
2198
2198
|
var tmp$ret$0 = tmp;
|
|
2199
|
-
destination.
|
|
2199
|
+
destination.y(tmp$ret$0);
|
|
2200
2200
|
}
|
|
2201
|
-
return fn.
|
|
2201
|
+
return fn.w1o(VOID, VOID, destination);
|
|
2202
2202
|
}
|
|
2203
2203
|
function applyBorrowRule($this, type) {
|
|
2204
2204
|
var tmp;
|
|
2205
2205
|
if (type instanceof Nullable) {
|
|
2206
|
-
tmp = new Nullable(applyBorrowRule($this, type.
|
|
2206
|
+
tmp = new Nullable(applyBorrowRule($this, type.q1m_1));
|
|
2207
2207
|
} else {
|
|
2208
2208
|
if (equals(type, String_instance)) {
|
|
2209
2209
|
tmp = Custom_init_$Create$('&str');
|
|
2210
2210
|
} else {
|
|
2211
2211
|
if (type instanceof Custom) {
|
|
2212
|
-
tmp = $this.
|
|
2212
|
+
tmp = $this.q23(type) ? type : $this.p23(type) ? borrowImpl(type) : $this.o23(type) ? ownedImpl(type) : type;
|
|
2213
2213
|
} else {
|
|
2214
2214
|
tmp = type;
|
|
2215
2215
|
}
|
|
@@ -2221,15 +2221,15 @@ function toBorrowedRaw($this, _this__u8e3s4) {
|
|
|
2221
2221
|
return new RawExpression('&' + toRawCode($this, _this__u8e3s4));
|
|
2222
2222
|
}
|
|
2223
2223
|
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
2224
|
-
return Companion_getInstance_0().
|
|
2224
|
+
return Companion_getInstance_0().d23_1.v1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
2225
2225
|
}
|
|
2226
2226
|
function toRawCode($this, _this__u8e3s4) {
|
|
2227
2227
|
var tmp;
|
|
2228
2228
|
if (_this__u8e3s4 instanceof VariableReference) {
|
|
2229
|
-
tmp = sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2229
|
+
tmp = sanitizeKeywords_0($this, _this__u8e3s4.v1s_1.h1q());
|
|
2230
2230
|
} else {
|
|
2231
2231
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
2232
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
2232
|
+
var tmp1_safe_receiver = _this__u8e3s4.d1u_1;
|
|
2233
2233
|
var tmp_0;
|
|
2234
2234
|
if (tmp1_safe_receiver == null) {
|
|
2235
2235
|
tmp_0 = null;
|
|
@@ -2239,20 +2239,20 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2239
2239
|
}
|
|
2240
2240
|
var tmp2_elvis_lhs = tmp_0;
|
|
2241
2241
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2242
|
-
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2242
|
+
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.e1u_1.h1q());
|
|
2243
2243
|
} else {
|
|
2244
2244
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
2245
|
-
var tmp_1 = _this__u8e3s4.
|
|
2245
|
+
var tmp_1 = _this__u8e3s4.w1u_1;
|
|
2246
2246
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2247
2247
|
var tmp_2;
|
|
2248
2248
|
var tmp_3;
|
|
2249
2249
|
if (!(lit == null)) {
|
|
2250
2250
|
var tmp_4;
|
|
2251
|
-
var tmp_5 = lit.
|
|
2251
|
+
var tmp_5 = lit.g1t_1;
|
|
2252
2252
|
if (tmp_5 instanceof Integer) {
|
|
2253
2253
|
tmp_4 = true;
|
|
2254
2254
|
} else {
|
|
2255
|
-
var tmp_6 = lit.
|
|
2255
|
+
var tmp_6 = lit.g1t_1;
|
|
2256
2256
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2257
2257
|
}
|
|
2258
2258
|
tmp_3 = tmp_4;
|
|
@@ -2260,31 +2260,31 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2260
2260
|
tmp_3 = false;
|
|
2261
2261
|
}
|
|
2262
2262
|
if (tmp_3) {
|
|
2263
|
-
tmp_2 = toString_0(lit.
|
|
2263
|
+
tmp_2 = toString_0(lit.f1t_1);
|
|
2264
2264
|
} else {
|
|
2265
2265
|
var tmp_7;
|
|
2266
2266
|
if (!(lit == null)) {
|
|
2267
|
-
var tmp_8 = lit.
|
|
2267
|
+
var tmp_8 = lit.g1t_1;
|
|
2268
2268
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2269
2269
|
} else {
|
|
2270
2270
|
tmp_7 = false;
|
|
2271
2271
|
}
|
|
2272
2272
|
if (tmp_7) {
|
|
2273
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2273
|
+
tmp_2 = '"' + toString_0(lit.f1t_1) + '"';
|
|
2274
2274
|
} else {
|
|
2275
|
-
tmp_2 = toRawCode($this, _this__u8e3s4.
|
|
2275
|
+
tmp_2 = toRawCode($this, _this__u8e3s4.w1u_1);
|
|
2276
2276
|
}
|
|
2277
2277
|
}
|
|
2278
2278
|
var idx = tmp_2;
|
|
2279
|
-
tmp = toRawCode($this, _this__u8e3s4.
|
|
2279
|
+
tmp = toRawCode($this, _this__u8e3s4.v1u_1) + '[' + idx + ']';
|
|
2280
2280
|
} else {
|
|
2281
2281
|
if (_this__u8e3s4 instanceof ConstructorStatement) {
|
|
2282
|
-
var tmp_9 = _this__u8e3s4.
|
|
2282
|
+
var tmp_9 = _this__u8e3s4.d1r_1;
|
|
2283
2283
|
var tmp3_safe_receiver = tmp_9 instanceof Custom ? tmp_9 : null;
|
|
2284
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
2285
|
-
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
2286
|
-
var typeName = tmp5_elvis_lhs == null ? toString_0(_this__u8e3s4.
|
|
2287
|
-
var tmp_10 = _this__u8e3s4.
|
|
2284
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.s1m_1;
|
|
2285
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.z1k();
|
|
2286
|
+
var typeName = tmp5_elvis_lhs == null ? toString_0(_this__u8e3s4.d1r_1) : tmp5_elvis_lhs;
|
|
2287
|
+
var tmp_10 = _this__u8e3s4.e1r_1.k1();
|
|
2288
2288
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2289
2289
|
var tmp_11;
|
|
2290
2290
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2297,23 +2297,23 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2297
2297
|
} else {
|
|
2298
2298
|
if (_this__u8e3s4 instanceof Literal_0) {
|
|
2299
2299
|
var tmp_12;
|
|
2300
|
-
var tmp_13 = _this__u8e3s4.
|
|
2300
|
+
var tmp_13 = _this__u8e3s4.g1t_1;
|
|
2301
2301
|
if (tmp_13 instanceof String_1) {
|
|
2302
|
-
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.
|
|
2302
|
+
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.f1t_1) + '")';
|
|
2303
2303
|
} else {
|
|
2304
|
-
var tmp_14 = _this__u8e3s4.
|
|
2304
|
+
var tmp_14 = _this__u8e3s4.g1t_1;
|
|
2305
2305
|
if (tmp_14 instanceof Boolean_0) {
|
|
2306
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2306
|
+
tmp_12 = toString_0(_this__u8e3s4.f1t_1);
|
|
2307
2307
|
} else {
|
|
2308
|
-
var tmp_15 = _this__u8e3s4.
|
|
2308
|
+
var tmp_15 = _this__u8e3s4.g1t_1;
|
|
2309
2309
|
if (tmp_15 instanceof Integer) {
|
|
2310
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2310
|
+
tmp_12 = toString_0(_this__u8e3s4.f1t_1);
|
|
2311
2311
|
} else {
|
|
2312
|
-
var tmp_16 = _this__u8e3s4.
|
|
2312
|
+
var tmp_16 = _this__u8e3s4.g1t_1;
|
|
2313
2313
|
if (tmp_16 instanceof Number_0) {
|
|
2314
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2314
|
+
tmp_12 = toString_0(_this__u8e3s4.f1t_1);
|
|
2315
2315
|
} else {
|
|
2316
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2316
|
+
tmp_12 = toString_0(_this__u8e3s4.f1t_1);
|
|
2317
2317
|
}
|
|
2318
2318
|
}
|
|
2319
2319
|
}
|
|
@@ -2321,7 +2321,7 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2321
2321
|
tmp = tmp_12;
|
|
2322
2322
|
} else {
|
|
2323
2323
|
if (_this__u8e3s4 instanceof RawExpression) {
|
|
2324
|
-
tmp = _this__u8e3s4.
|
|
2324
|
+
tmp = _this__u8e3s4.x1s_1;
|
|
2325
2325
|
} else {
|
|
2326
2326
|
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression(_this__u8e3s4).o();
|
|
2327
2327
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
@@ -2366,11 +2366,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2366
2366
|
var tmp;
|
|
2367
2367
|
if (element instanceof Interface) {
|
|
2368
2368
|
var tmp_0;
|
|
2369
|
-
if (element.
|
|
2369
|
+
if (element.a1s_1.equals(Companion_getInstance().y1k('Call'))) {
|
|
2370
2370
|
tmp_0 = element;
|
|
2371
2371
|
} else {
|
|
2372
2372
|
// Inline function 'kotlin.collections.map' call
|
|
2373
|
-
var this_0 = element.
|
|
2373
|
+
var this_0 = element.b1s_1;
|
|
2374
2374
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2375
2375
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2376
2376
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2383,10 +2383,10 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2383
2383
|
tmp_1 = item;
|
|
2384
2384
|
}
|
|
2385
2385
|
var tmp$ret$0 = tmp_1;
|
|
2386
|
-
destination.
|
|
2386
|
+
destination.y(tmp$ret$0);
|
|
2387
2387
|
}
|
|
2388
2388
|
var borrowed = destination;
|
|
2389
|
-
tmp_0 = transformChildren_0(element.
|
|
2389
|
+
tmp_0 = transformChildren_0(element.h1s(VOID, borrowed), tr);
|
|
2390
2390
|
}
|
|
2391
2391
|
tmp = tmp_0;
|
|
2392
2392
|
} else {
|
|
@@ -2402,13 +2402,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2402
2402
|
var tmp;
|
|
2403
2403
|
var tmp_0;
|
|
2404
2404
|
if (s instanceof FunctionCall) {
|
|
2405
|
-
tmp_0 = RustTransform_getInstance().
|
|
2405
|
+
tmp_0 = RustTransform_getInstance().i23_1.v1(s.l1q_1.h1q());
|
|
2406
2406
|
} else {
|
|
2407
2407
|
tmp_0 = false;
|
|
2408
2408
|
}
|
|
2409
2409
|
if (tmp_0) {
|
|
2410
2410
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2411
|
-
var this_0 = s.
|
|
2411
|
+
var this_0 = s.m1q_1.k1();
|
|
2412
2412
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2413
2413
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2414
2414
|
var index = 0;
|
|
@@ -2419,16 +2419,16 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2419
2419
|
index = _unary__edvuaz + 1 | 0;
|
|
2420
2420
|
var idx = checkIndexOverflow(_unary__edvuaz);
|
|
2421
2421
|
// Inline function 'kotlin.collections.component1' call
|
|
2422
|
-
var key = item.
|
|
2422
|
+
var key = item.l1();
|
|
2423
2423
|
// Inline function 'kotlin.collections.component2' call
|
|
2424
|
-
var value = item.
|
|
2425
|
-
var transformed = t.
|
|
2424
|
+
var value = item.m1();
|
|
2425
|
+
var transformed = t.m1y(value);
|
|
2426
2426
|
var tmp_1;
|
|
2427
2427
|
var tmp_2;
|
|
2428
2428
|
if (idx === 0) {
|
|
2429
2429
|
var tmp_3;
|
|
2430
2430
|
if (transformed instanceof VariableReference) {
|
|
2431
|
-
tmp_3 = transformed.
|
|
2431
|
+
tmp_3 = transformed.v1s_1.u1m() === 'it';
|
|
2432
2432
|
} else {
|
|
2433
2433
|
tmp_3 = false;
|
|
2434
2434
|
}
|
|
@@ -2442,23 +2442,23 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2442
2442
|
tmp_1 = to(key, transformed);
|
|
2443
2443
|
}
|
|
2444
2444
|
var tmp$ret$2 = tmp_1;
|
|
2445
|
-
destination.
|
|
2445
|
+
destination.y(tmp$ret$2);
|
|
2446
2446
|
}
|
|
2447
2447
|
var newArgs = toMap(destination);
|
|
2448
|
-
tmp = s.
|
|
2448
|
+
tmp = s.p1q(VOID, VOID, VOID, newArgs);
|
|
2449
2449
|
} else {
|
|
2450
2450
|
tmp = transformChildren(s, t);
|
|
2451
2451
|
}
|
|
2452
2452
|
return tmp;
|
|
2453
2453
|
}
|
|
2454
2454
|
function RustTransform$rustName$lambda(it) {
|
|
2455
|
-
return RustTransform_getInstance().
|
|
2455
|
+
return RustTransform_getInstance().l23(it);
|
|
2456
2456
|
}
|
|
2457
2457
|
function RustTransform$rustName$lambda_0(it) {
|
|
2458
|
-
return RustTransform_getInstance().
|
|
2458
|
+
return RustTransform_getInstance().l23(it);
|
|
2459
2459
|
}
|
|
2460
2460
|
function RustTransform$toRawCode$lambda(it) {
|
|
2461
|
-
return it.
|
|
2461
|
+
return it.l1().h1q() + ': ' + toRawCode(RustTransform_getInstance(), it.m1());
|
|
2462
2462
|
}
|
|
2463
2463
|
function RustTransform() {
|
|
2464
2464
|
RustTransform_instance = this;
|
|
@@ -2466,58 +2466,58 @@ function RustTransform() {
|
|
|
2466
2466
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2467
2467
|
// Inline function 'kotlin.apply' call
|
|
2468
2468
|
var this_0 = new TransformerBuilder();
|
|
2469
|
-
this_0.
|
|
2470
|
-
tmp.
|
|
2469
|
+
this_0.x1y(RustTransform$primitivesToCustom$lambda);
|
|
2470
|
+
tmp.f23_1 = this_0.j1m();
|
|
2471
2471
|
var tmp_0 = this;
|
|
2472
2472
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2473
2473
|
// Inline function 'kotlin.apply' call
|
|
2474
2474
|
var this_1 = new TransformerBuilder();
|
|
2475
|
-
this_1.
|
|
2476
|
-
tmp_0.
|
|
2475
|
+
this_1.i1m(RustTransform$borrow$lambda);
|
|
2476
|
+
tmp_0.g23_1 = this_1.j1m();
|
|
2477
2477
|
var tmp_1 = this;
|
|
2478
2478
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2479
2479
|
// Inline function 'kotlin.apply' call
|
|
2480
|
-
tmp_1.
|
|
2481
|
-
this.
|
|
2480
|
+
tmp_1.h23_1 = (new TransformerBuilder()).j1m();
|
|
2481
|
+
this.i23_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2482
2482
|
var tmp_2 = this;
|
|
2483
2483
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2484
2484
|
// Inline function 'kotlin.apply' call
|
|
2485
2485
|
var this_2 = new TransformerBuilder();
|
|
2486
|
-
this_2.
|
|
2487
|
-
tmp_2.
|
|
2488
|
-
this.
|
|
2486
|
+
this_2.a1z(RustTransform$serializationArgs$lambda);
|
|
2487
|
+
tmp_2.j23_1 = this_2.j1m();
|
|
2488
|
+
this.k23_1 = setOf(['i32', 'i64', 'f32', 'f64', 'bool', 'u8', 'u16', 'u32', 'u64', 'usize', 'isize', '()']);
|
|
2489
2489
|
}
|
|
2490
|
-
protoOf(RustTransform).
|
|
2490
|
+
protoOf(RustTransform).m23 = function (element) {
|
|
2491
2491
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2492
2492
|
var scope = new TransformScope(element);
|
|
2493
|
-
scope.
|
|
2494
|
-
var tmp = scope.
|
|
2493
|
+
scope.w1y(RustTransform_getInstance().f23_1);
|
|
2494
|
+
var tmp = scope.r1y_1;
|
|
2495
2495
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2496
2496
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2497
2497
|
var scope_0 = new TransformScope(this_0);
|
|
2498
|
-
scope_0.
|
|
2499
|
-
var tmp_0 = scope_0.
|
|
2498
|
+
scope_0.w1y(RustTransform_getInstance().g23_1);
|
|
2499
|
+
var tmp_0 = scope_0.r1y_1;
|
|
2500
2500
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2501
2501
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2502
2502
|
var scope_1 = new TransformScope(this_1);
|
|
2503
|
-
scope_1.
|
|
2504
|
-
var tmp_1 = scope_1.
|
|
2503
|
+
scope_1.w1y(RustTransform_getInstance().h23_1);
|
|
2504
|
+
var tmp_1 = scope_1.r1y_1;
|
|
2505
2505
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2506
2506
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2507
2507
|
var scope_2 = new TransformScope(this_2);
|
|
2508
|
-
scope_2.
|
|
2509
|
-
var tmp_2 = scope_2.
|
|
2508
|
+
scope_2.w1y(RustTransform_getInstance().j23_1);
|
|
2509
|
+
var tmp_2 = scope_2.r1y_1;
|
|
2510
2510
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2511
2511
|
};
|
|
2512
|
-
protoOf(RustTransform).
|
|
2512
|
+
protoOf(RustTransform).l23 = function (_this__u8e3s4) {
|
|
2513
2513
|
var tmp;
|
|
2514
2514
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2515
|
-
var pascalName = _this__u8e3s4.
|
|
2515
|
+
var pascalName = _this__u8e3s4.s1m_1.z1k();
|
|
2516
2516
|
var tmp_0;
|
|
2517
|
-
if (_this__u8e3s4.
|
|
2517
|
+
if (_this__u8e3s4.t1m_1.r()) {
|
|
2518
2518
|
tmp_0 = pascalName;
|
|
2519
2519
|
} else {
|
|
2520
|
-
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.
|
|
2520
|
+
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.t1m_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda) + '>';
|
|
2521
2521
|
}
|
|
2522
2522
|
tmp = tmp_0;
|
|
2523
2523
|
} else {
|
|
@@ -2525,13 +2525,13 @@ protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
|
2525
2525
|
tmp = 'String';
|
|
2526
2526
|
} else {
|
|
2527
2527
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2528
|
-
tmp = 'Option<' + this.
|
|
2528
|
+
tmp = 'Option<' + this.l23(_this__u8e3s4.q1m_1) + '>';
|
|
2529
2529
|
} else {
|
|
2530
2530
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2531
|
-
tmp = 'Vec<' + this.
|
|
2531
|
+
tmp = 'Vec<' + this.l23(_this__u8e3s4.r1m_1) + '>';
|
|
2532
2532
|
} else {
|
|
2533
2533
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2534
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2534
|
+
tmp = 'std::collections::HashMap<' + this.l23(_this__u8e3s4.t1q_1) + ', ' + this.l23(_this__u8e3s4.u1q_1) + '>';
|
|
2535
2535
|
} else {
|
|
2536
2536
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2537
2537
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2553,7 +2553,7 @@ protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
|
2553
2553
|
} else {
|
|
2554
2554
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2555
2555
|
var tmp_1;
|
|
2556
|
-
switch (_this__u8e3s4.
|
|
2556
|
+
switch (_this__u8e3s4.q1q_1.c3_1) {
|
|
2557
2557
|
case 0:
|
|
2558
2558
|
tmp_1 = 'i32';
|
|
2559
2559
|
break;
|
|
@@ -2568,7 +2568,7 @@ protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
|
2568
2568
|
} else {
|
|
2569
2569
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2570
2570
|
var tmp_2;
|
|
2571
|
-
switch (_this__u8e3s4.
|
|
2571
|
+
switch (_this__u8e3s4.r1q_1.c3_1) {
|
|
2572
2572
|
case 0:
|
|
2573
2573
|
tmp_2 = 'f32';
|
|
2574
2574
|
break;
|
|
@@ -2588,7 +2588,7 @@ protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
|
2588
2588
|
tmp = 'String';
|
|
2589
2589
|
} else {
|
|
2590
2590
|
if (_this__u8e3s4 instanceof Function) {
|
|
2591
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2591
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.a1r_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.l23(_this__u8e3s4.b1r_1) + '>';
|
|
2592
2592
|
} else {
|
|
2593
2593
|
noWhenBranchMatchedException();
|
|
2594
2594
|
}
|
|
@@ -2609,27 +2609,27 @@ protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
|
2609
2609
|
}
|
|
2610
2610
|
return tmp;
|
|
2611
2611
|
};
|
|
2612
|
-
protoOf(RustTransform).
|
|
2612
|
+
protoOf(RustTransform).q23 = function (_this__u8e3s4) {
|
|
2613
2613
|
var tmp;
|
|
2614
2614
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2615
2615
|
// Inline function 'kotlin.let' call
|
|
2616
|
-
var it = _this__u8e3s4.
|
|
2616
|
+
var it = _this__u8e3s4.s1m_1.z1k();
|
|
2617
2617
|
tmp = startsWith(it, '&') || startsWith(it, '&dyn ') || startsWith(it, '&impl ') || startsWith(it, '&mut ');
|
|
2618
2618
|
} else {
|
|
2619
2619
|
tmp = false;
|
|
2620
2620
|
}
|
|
2621
2621
|
return tmp;
|
|
2622
2622
|
};
|
|
2623
|
-
protoOf(RustTransform).
|
|
2623
|
+
protoOf(RustTransform).p23 = function (_this__u8e3s4) {
|
|
2624
2624
|
// Inline function 'kotlin.let' call
|
|
2625
|
-
var it = _this__u8e3s4.
|
|
2625
|
+
var it = _this__u8e3s4.s1m_1.z1k();
|
|
2626
2626
|
return it === 'Serializer' || it === 'Deserializer';
|
|
2627
2627
|
};
|
|
2628
|
-
protoOf(RustTransform).
|
|
2629
|
-
return _this__u8e3s4.
|
|
2628
|
+
protoOf(RustTransform).o23 = function (_this__u8e3s4) {
|
|
2629
|
+
return _this__u8e3s4.s1m_1.z1k() === 'GeneratorField';
|
|
2630
2630
|
};
|
|
2631
|
-
protoOf(RustTransform).
|
|
2632
|
-
var v = _this__u8e3s4.
|
|
2631
|
+
protoOf(RustTransform).n23 = function (_this__u8e3s4) {
|
|
2632
|
+
var v = _this__u8e3s4.u1m();
|
|
2633
2633
|
switch (v) {
|
|
2634
2634
|
case 'self':
|
|
2635
2635
|
case '&self':
|
|
@@ -2645,20 +2645,20 @@ function RustTransform_getInstance() {
|
|
|
2645
2645
|
return RustTransform_instance;
|
|
2646
2646
|
}
|
|
2647
2647
|
function borrow(_this__u8e3s4) {
|
|
2648
|
-
return _this__u8e3s4.
|
|
2648
|
+
return _this__u8e3s4.x1q(new Name(listOf('&' + _this__u8e3s4.s1m_1.z1k())));
|
|
2649
2649
|
}
|
|
2650
2650
|
function borrowDyn(_this__u8e3s4) {
|
|
2651
|
-
return _this__u8e3s4.
|
|
2651
|
+
return _this__u8e3s4.x1q(new Name(listOf('&dyn ' + _this__u8e3s4.s1m_1.z1k())));
|
|
2652
2652
|
}
|
|
2653
2653
|
function borrowImpl(_this__u8e3s4) {
|
|
2654
|
-
return _this__u8e3s4.
|
|
2654
|
+
return _this__u8e3s4.x1q(new Name(listOf('&impl ' + _this__u8e3s4.s1m_1.z1k())));
|
|
2655
2655
|
}
|
|
2656
2656
|
function ownedImpl(_this__u8e3s4) {
|
|
2657
|
-
return _this__u8e3s4.
|
|
2657
|
+
return _this__u8e3s4.x1q(new Name(listOf('impl ' + _this__u8e3s4.s1m_1.z1k())));
|
|
2658
2658
|
}
|
|
2659
2659
|
//region block: post-declaration
|
|
2660
|
-
protoOf(RustIrEmitter).
|
|
2661
|
-
protoOf(RustIrEmitter).
|
|
2660
|
+
protoOf(RustIrEmitter).pr = emit_1;
|
|
2661
|
+
protoOf(RustIrEmitter).j1z = beforeGenerate;
|
|
2662
2662
|
//endregion
|
|
2663
2663
|
//region block: exports
|
|
2664
2664
|
export {
|