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