@flock/wirespec 0.19.5 → 0.20.0-RC.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +167 -167
- package/clikt-clikt-mordant.mjs +81 -81
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1636 -1636
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +448 -448
- package/kotest-kotest-assertions-kotest-assertions-core.mjs +4 -0
- package/kotest-kotest-assertions-kotest-assertions-core.mjs.map +1 -0
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs +4 -0
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs.map +1 -0
- package/kotest-kotest-common.mjs +56 -0
- package/kotest-kotest-common.mjs.map +1 -0
- package/kotest-kotest-framework-kotest-framework-engine.mjs +4 -0
- package/kotest-kotest-framework-kotest-framework-engine.mjs.map +1 -0
- package/kotest-kotest-property.mjs +2501 -0
- package/kotest-kotest-property.mjs.map +1 -0
- package/kotlin-kotlin-stdlib.mjs +5263 -2481
- 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 +1598 -1598
- package/wirespec-src-compiler-emitters-java.mjs +445 -445
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +343 -343
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +429 -429
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +482 -482
- package/wirespec-src-compiler-emitters-scala.mjs +194 -194
- package/wirespec-src-compiler-emitters-typescript.mjs +530 -530
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +87 -87
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3887 -3863
- 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
|
@@ -192,15 +192,15 @@ initMetadataForClass(RustIrEmitter, 'RustIrEmitter', RustIrEmitter, VOID, [IrEmi
|
|
|
192
192
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
193
193
|
//endregion
|
|
194
194
|
function _get_sanitizationConfig__sns434($this) {
|
|
195
|
-
var tmp0 = $this.
|
|
195
|
+
var tmp0 = $this.g23_1;
|
|
196
196
|
var tmp = KProperty1;
|
|
197
197
|
// Inline function 'kotlin.getValue' call
|
|
198
198
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustIrEmitter$_get_sanitizationConfig_$ref_17ypni(), null);
|
|
199
|
-
return tmp0.
|
|
199
|
+
return tmp0.m1();
|
|
200
200
|
}
|
|
201
201
|
function sanitize($this, _this__u8e3s4) {
|
|
202
202
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
203
|
-
var this_0 = split(_this__u8e3s4.
|
|
203
|
+
var this_0 = split(_this__u8e3s4.m1(), ['.', ' ']);
|
|
204
204
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
205
205
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
206
206
|
var index = 0;
|
|
@@ -209,8 +209,8 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
209
209
|
var item = _iterator__ex2g4s.v();
|
|
210
210
|
var _unary__edvuaz = index;
|
|
211
211
|
index = _unary__edvuaz + 1 | 0;
|
|
212
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
213
|
-
destination.
|
|
212
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.pu(item) : item;
|
|
213
|
+
destination.y(tmp$ret$0);
|
|
214
214
|
}
|
|
215
215
|
// Inline function 'kotlin.text.filter' call
|
|
216
216
|
var tmp0 = joinToString(destination, '');
|
|
@@ -256,14 +256,14 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
256
256
|
return toSnakeCase($this, tmp$ret$9);
|
|
257
257
|
}
|
|
258
258
|
function toSnakeCase($this, _this__u8e3s4) {
|
|
259
|
-
return Companion_getInstance().
|
|
259
|
+
return Companion_getInstance().c1l(_this__u8e3s4).l1q();
|
|
260
260
|
}
|
|
261
261
|
function toPascalCase($this, _this__u8e3s4) {
|
|
262
262
|
var tmp = split(_this__u8e3s4, ['_']);
|
|
263
263
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustIrEmitter$toPascalCase$lambda);
|
|
264
264
|
}
|
|
265
265
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
266
|
-
return Companion_getInstance_0().
|
|
266
|
+
return Companion_getInstance_0().j23_1.v1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
267
267
|
}
|
|
268
268
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
269
269
|
// Inline function 'kotlin.let' call
|
|
@@ -288,7 +288,7 @@ function prependImports($this, _this__u8e3s4, imports) {
|
|
|
288
288
|
var tmp;
|
|
289
289
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
290
290
|
if (!imports.r()) {
|
|
291
|
-
tmp = _this__u8e3s4.
|
|
291
|
+
tmp = _this__u8e3s4.o1r(VOID, plus(imports, _this__u8e3s4.l1r_1));
|
|
292
292
|
} else {
|
|
293
293
|
tmp = _this__u8e3s4;
|
|
294
294
|
}
|
|
@@ -300,7 +300,7 @@ function containsWildcard($this, type) {
|
|
|
300
300
|
tmp = true;
|
|
301
301
|
} else {
|
|
302
302
|
if (type instanceof Custom) {
|
|
303
|
-
var tmp0 = type.
|
|
303
|
+
var tmp0 = type.x1m_1;
|
|
304
304
|
var tmp$ret$0;
|
|
305
305
|
$l$block_0: {
|
|
306
306
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -327,13 +327,13 @@ function containsWildcard($this, type) {
|
|
|
327
327
|
tmp = tmp$ret$0;
|
|
328
328
|
} else {
|
|
329
329
|
if (type instanceof Nullable) {
|
|
330
|
-
tmp = containsWildcard($this, type.
|
|
330
|
+
tmp = containsWildcard($this, type.u1m_1);
|
|
331
331
|
} else {
|
|
332
332
|
if (type instanceof Array_0) {
|
|
333
|
-
tmp = containsWildcard($this, type.
|
|
333
|
+
tmp = containsWildcard($this, type.v1m_1);
|
|
334
334
|
} else {
|
|
335
335
|
if (type instanceof Dict) {
|
|
336
|
-
tmp = containsWildcard($this, type.
|
|
336
|
+
tmp = containsWildcard($this, type.x1q_1) || containsWildcard($this, type.y1q_1);
|
|
337
337
|
} else {
|
|
338
338
|
tmp = false;
|
|
339
339
|
}
|
|
@@ -355,7 +355,7 @@ function containsUnderiveable($this, type) {
|
|
|
355
355
|
tmp = true;
|
|
356
356
|
} else {
|
|
357
357
|
if (type instanceof Custom) {
|
|
358
|
-
var tmp0 = type.
|
|
358
|
+
var tmp0 = type.x1m_1;
|
|
359
359
|
var tmp$ret$0;
|
|
360
360
|
$l$block_0: {
|
|
361
361
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -382,13 +382,13 @@ function containsUnderiveable($this, type) {
|
|
|
382
382
|
tmp = tmp$ret$0;
|
|
383
383
|
} else {
|
|
384
384
|
if (type instanceof Nullable) {
|
|
385
|
-
tmp = containsUnderiveable($this, type.
|
|
385
|
+
tmp = containsUnderiveable($this, type.u1m_1);
|
|
386
386
|
} else {
|
|
387
387
|
if (type instanceof Array_0) {
|
|
388
|
-
tmp = containsUnderiveable($this, type.
|
|
388
|
+
tmp = containsUnderiveable($this, type.v1m_1);
|
|
389
389
|
} else {
|
|
390
390
|
if (type instanceof Dict) {
|
|
391
|
-
tmp = containsUnderiveable($this, type.
|
|
391
|
+
tmp = containsUnderiveable($this, type.x1q_1) || containsUnderiveable($this, type.y1q_1);
|
|
392
392
|
} else {
|
|
393
393
|
tmp = false;
|
|
394
394
|
}
|
|
@@ -414,7 +414,7 @@ function buildClientParams($this, _this__u8e3s4) {
|
|
|
414
414
|
}
|
|
415
415
|
function Companion() {
|
|
416
416
|
Companion_instance_2 = this;
|
|
417
|
-
this.
|
|
417
|
+
this.j23_1 = setOf(['as', 'break', 'const', 'continue', 'crate', 'else', 'enum', 'extern', 'false', 'fn', 'for', 'if', 'impl', 'in', 'let', 'loop', 'match', 'mod', 'move', 'mut', 'pub', 'ref', 'return', 'self', 'Self', 'static', 'struct', 'super', 'trait', 'true', 'type', 'unsafe', 'use', 'where', 'while', 'async', 'await', 'dyn', 'abstract', 'become', 'box', 'do', 'final', 'macro', 'override', 'priv', 'typeof', 'unsized', 'virtual', 'yield', 'try']);
|
|
418
418
|
}
|
|
419
419
|
var Companion_instance_2;
|
|
420
420
|
function Companion_getInstance_0() {
|
|
@@ -423,23 +423,23 @@ function Companion_getInstance_0() {
|
|
|
423
423
|
return Companion_instance_2;
|
|
424
424
|
}
|
|
425
425
|
function sam$kotlin_Comparator$0(function_0) {
|
|
426
|
-
this.
|
|
426
|
+
this.k23_1 = function_0;
|
|
427
427
|
}
|
|
428
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
429
|
-
return this.
|
|
428
|
+
protoOf(sam$kotlin_Comparator$0).ud = function (a, b) {
|
|
429
|
+
return this.k23_1(a, b);
|
|
430
430
|
};
|
|
431
431
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
432
|
-
return this.
|
|
432
|
+
return this.ud(a, b);
|
|
433
433
|
};
|
|
434
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
435
|
-
return this.
|
|
434
|
+
protoOf(sam$kotlin_Comparator$0).m3 = function () {
|
|
435
|
+
return this.k23_1;
|
|
436
436
|
};
|
|
437
437
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
438
438
|
var tmp;
|
|
439
439
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
440
440
|
var tmp_0;
|
|
441
441
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
442
|
-
tmp_0 = equals(this.
|
|
442
|
+
tmp_0 = equals(this.m3(), other.m3());
|
|
443
443
|
} else {
|
|
444
444
|
tmp_0 = false;
|
|
445
445
|
}
|
|
@@ -450,22 +450,22 @@ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
|
450
450
|
return tmp;
|
|
451
451
|
};
|
|
452
452
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
453
|
-
return hashCode(this.
|
|
453
|
+
return hashCode(this.m3());
|
|
454
454
|
};
|
|
455
455
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
456
456
|
return 'r#' + it;
|
|
457
457
|
}
|
|
458
458
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
459
|
-
return Companion_getInstance().
|
|
459
|
+
return Companion_getInstance().c1l((new Name(name.a1l_1)).l1q());
|
|
460
460
|
}
|
|
461
461
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
462
|
-
var value = name.
|
|
462
|
+
var value = name.y1m();
|
|
463
463
|
switch (value) {
|
|
464
464
|
case 'self':
|
|
465
465
|
case '&self':
|
|
466
466
|
return name;
|
|
467
467
|
default:
|
|
468
|
-
return Companion_getInstance().
|
|
468
|
+
return Companion_getInstance().c1l((new Name(name.a1l_1)).l1q());
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
@@ -489,21 +489,21 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
489
489
|
return function (stmt, tr) {
|
|
490
490
|
var tmp;
|
|
491
491
|
if (stmt instanceof ConstructorStatement) {
|
|
492
|
-
var tmp_0 = tr.
|
|
492
|
+
var tmp_0 = tr.n1y(stmt.h1r_1);
|
|
493
493
|
// Inline function 'kotlin.collections.map' call
|
|
494
|
-
var this_0 = stmt.
|
|
494
|
+
var this_0 = stmt.i1r_1;
|
|
495
495
|
// Inline function 'kotlin.collections.mapTo' call
|
|
496
|
-
var destination = ArrayList_init_$Create$(this_0.
|
|
496
|
+
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
497
497
|
// Inline function 'kotlin.collections.iterator' call
|
|
498
|
-
var _iterator__ex2g4s = this_0.
|
|
498
|
+
var _iterator__ex2g4s = this_0.k1().t();
|
|
499
499
|
while (_iterator__ex2g4s.u()) {
|
|
500
500
|
var item = _iterator__ex2g4s.v();
|
|
501
501
|
// Inline function 'kotlin.collections.component1' call
|
|
502
|
-
var k = item.
|
|
502
|
+
var k = item.l1();
|
|
503
503
|
// Inline function 'kotlin.collections.component2' call
|
|
504
|
-
var v = item.
|
|
505
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
506
|
-
destination.
|
|
504
|
+
var v = item.m1();
|
|
505
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.q1y(v));
|
|
506
|
+
destination.y(tmp$ret$3);
|
|
507
507
|
}
|
|
508
508
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
509
509
|
} else {
|
|
@@ -514,7 +514,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
514
514
|
}
|
|
515
515
|
function RustIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
516
516
|
return function () {
|
|
517
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
517
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().j23_1, setOf(['self', 'Self']));
|
|
518
518
|
var tmp = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
519
519
|
var tmp_0 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
520
520
|
var tmp_1 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -528,69 +528,69 @@ function RustIrEmitter$_get_sanitizationConfig_$ref_17ypni() {
|
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
530
|
function RustIrEmitter$emitShared$lambda($this$interface) {
|
|
531
|
-
$this$interface.
|
|
531
|
+
$this$interface.l1n(Custom_init_$Create$('Headers'));
|
|
532
532
|
return Unit_instance;
|
|
533
533
|
}
|
|
534
534
|
function RustIrEmitter$emitShared$lambda_0($this$interface) {
|
|
535
|
-
$this$interface.
|
|
535
|
+
$this$interface.l1n(Custom_init_$Create$('Headers'));
|
|
536
536
|
return Unit_instance;
|
|
537
537
|
}
|
|
538
538
|
function RustIrEmitter$emitShared$lambda_1($this$interface) {
|
|
539
|
-
$this$interface.
|
|
540
|
-
$this$interface.
|
|
541
|
-
$this$interface.
|
|
539
|
+
$this$interface.l1n(Custom_init_$Create$('Sized'));
|
|
540
|
+
$this$interface.s1l('label', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda);
|
|
541
|
+
$this$interface.s1l('from_label', true, VOID, RustIrEmitter$emitShared$lambda$lambda_0);
|
|
542
542
|
return Unit_instance;
|
|
543
543
|
}
|
|
544
544
|
function RustIrEmitter$emitShared$lambda$lambda($this$function) {
|
|
545
|
-
$this$function.
|
|
546
|
-
$this$function.
|
|
545
|
+
$this$function.n1l('&self', Custom_init_$Create$(''));
|
|
546
|
+
$this$function.q1l(Custom_init_$Create$('&str'));
|
|
547
547
|
return Unit_instance;
|
|
548
548
|
}
|
|
549
549
|
function RustIrEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
550
|
-
$this$function.
|
|
551
|
-
$this$function.
|
|
550
|
+
$this$function.n1l('s', Custom_init_$Create$('&str'));
|
|
551
|
+
$this$function.q1l(Custom_init_$Create$('Option<Self>'));
|
|
552
552
|
return Unit_instance;
|
|
553
553
|
}
|
|
554
554
|
function RustIrEmitter$emitShared$lambda_2($this$interface) {
|
|
555
|
-
$this$interface.
|
|
556
|
-
$this$interface.
|
|
557
|
-
$this$interface.
|
|
555
|
+
$this$interface.f1n($this$interface.e1l('T', []), []);
|
|
556
|
+
$this$interface.s1l('value', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_1);
|
|
557
|
+
$this$interface.s1l('validate', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_2);
|
|
558
558
|
return Unit_instance;
|
|
559
559
|
}
|
|
560
560
|
function RustIrEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
561
|
-
$this$function.
|
|
562
|
-
$this$function.
|
|
561
|
+
$this$function.n1l('&self', Custom_init_$Create$(''));
|
|
562
|
+
$this$function.q1l(borrow($this$function.e1l('T', [])));
|
|
563
563
|
return Unit_instance;
|
|
564
564
|
}
|
|
565
565
|
function RustIrEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
566
|
-
$this$function.
|
|
567
|
-
$this$function.
|
|
566
|
+
$this$function.n1l('&self', Custom_init_$Create$(''));
|
|
567
|
+
$this$function.q1l($this$function.m1n());
|
|
568
568
|
return Unit_instance;
|
|
569
569
|
}
|
|
570
570
|
function RustIrEmitter$emitShared$lambda_3($this$interface) {
|
|
571
|
-
$this$interface.
|
|
572
|
-
$this$interface.
|
|
573
|
-
$this$interface.
|
|
574
|
-
$this$interface.
|
|
575
|
-
$this$interface.
|
|
576
|
-
$this$interface.
|
|
571
|
+
$this$interface.f1n($this$interface.e1l('T', []), []);
|
|
572
|
+
$this$interface.g1n('path', borrowDyn($this$interface.e1l('Path', [])));
|
|
573
|
+
$this$interface.g1n('method', borrow($this$interface.e1l('Method', [])));
|
|
574
|
+
$this$interface.g1n('queries', borrowDyn($this$interface.e1l('Queries', [])));
|
|
575
|
+
$this$interface.g1n('headers', borrowDyn($this$interface.e1l('RequestHeaders', [])));
|
|
576
|
+
$this$interface.g1n('body', borrow($this$interface.e1l('T', [])));
|
|
577
577
|
return Unit_instance;
|
|
578
578
|
}
|
|
579
579
|
function RustIrEmitter$emitShared$lambda_4($this$interface) {
|
|
580
|
-
$this$interface.
|
|
581
|
-
$this$interface.
|
|
582
|
-
$this$interface.
|
|
583
|
-
$this$interface.
|
|
580
|
+
$this$interface.f1n($this$interface.e1l('T', []), []);
|
|
581
|
+
$this$interface.g1n('status', $this$interface.l1o());
|
|
582
|
+
$this$interface.g1n('headers', borrowDyn($this$interface.e1l('ResponseHeaders', [])));
|
|
583
|
+
$this$interface.g1n('body', borrow($this$interface.e1l('T', [])));
|
|
584
584
|
return Unit_instance;
|
|
585
585
|
}
|
|
586
586
|
function RustIrEmitter$emitShared$lambda_5($this$interface) {
|
|
587
|
-
$this$interface.
|
|
587
|
+
$this$interface.i1o('transport', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_3);
|
|
588
588
|
return Unit_instance;
|
|
589
589
|
}
|
|
590
590
|
function RustIrEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
591
|
-
$this$asyncFunction.
|
|
592
|
-
$this$asyncFunction.
|
|
593
|
-
$this$asyncFunction.
|
|
591
|
+
$this$asyncFunction.n1l('&self', Custom_init_$Create$(''));
|
|
592
|
+
$this$asyncFunction.n1l('request', borrow($this$asyncFunction.e1l('RawRequest', [])));
|
|
593
|
+
$this$asyncFunction.q1l($this$asyncFunction.e1l('RawResponse', []));
|
|
594
594
|
return Unit_instance;
|
|
595
595
|
}
|
|
596
596
|
function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -598,18 +598,18 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
598
598
|
var tmp;
|
|
599
599
|
if (element instanceof File) {
|
|
600
600
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
601
|
-
var tmp0 = element.
|
|
601
|
+
var tmp0 = element.l1r_1;
|
|
602
602
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
603
603
|
var destination = ArrayList_init_$Create$_0();
|
|
604
604
|
var _iterator__ex2g4s = tmp0.t();
|
|
605
605
|
while (_iterator__ex2g4s.u()) {
|
|
606
606
|
var element_0 = _iterator__ex2g4s.v();
|
|
607
607
|
if (element_0 instanceof Namespace) {
|
|
608
|
-
destination.
|
|
608
|
+
destination.y(element_0);
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
611
|
var namespace = first(destination);
|
|
612
|
-
tmp = element.
|
|
612
|
+
tmp = element.o1r(VOID, plus($rustImports, namespace.r1r_1));
|
|
613
613
|
} else {
|
|
614
614
|
tmp = element;
|
|
615
615
|
}
|
|
@@ -621,7 +621,7 @@ function RustIrEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
621
621
|
var tmp;
|
|
622
622
|
if (element instanceof Enum_0) {
|
|
623
623
|
var tmp_0;
|
|
624
|
-
if (element.
|
|
624
|
+
if (element.q1s_1.equals(Companion_getInstance().c1l('Method'))) {
|
|
625
625
|
tmp_0 = new RawElement('#[derive(Debug, Clone, Default, PartialEq)]\npub enum Method {\n #[default]\n GET,\n PUT,\n POST,\n DELETE,\n OPTIONS,\n HEAD,\n PATCH,\n TRACE,\n}');
|
|
626
626
|
} else {
|
|
627
627
|
tmp_0 = element;
|
|
@@ -638,7 +638,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
638
638
|
var tmp;
|
|
639
639
|
if (element instanceof File) {
|
|
640
640
|
// Inline function 'kotlin.collections.flatMap' call
|
|
641
|
-
var tmp0 = element.
|
|
641
|
+
var tmp0 = element.l1r_1;
|
|
642
642
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
643
643
|
var destination = ArrayList_init_$Create$_0();
|
|
644
644
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -650,30 +650,30 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
650
650
|
tmp$ret$0 = listOf(element_0);
|
|
651
651
|
break $l$block;
|
|
652
652
|
}
|
|
653
|
-
var name = element_0.
|
|
653
|
+
var name = element_0.e1s_1.d1l();
|
|
654
654
|
var tmp_0;
|
|
655
655
|
// Inline function 'kotlin.collections.contains' call
|
|
656
656
|
// Inline function 'kotlin.collections.containsKey' call
|
|
657
657
|
var this_0 = $dslTraits;
|
|
658
|
-
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).
|
|
658
|
+
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).o2(name)) {
|
|
659
659
|
// Inline function 'kotlin.collections.buildList' call
|
|
660
660
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
661
661
|
// Inline function 'kotlin.apply' call
|
|
662
662
|
var this_1 = ArrayList_init_$Create$_0();
|
|
663
|
-
this_1.
|
|
663
|
+
this_1.y(ensureNotNull($dslTraits.q2(name)));
|
|
664
664
|
if (name === 'Request') {
|
|
665
|
-
this_1.
|
|
665
|
+
this_1.y($requestHeaders);
|
|
666
666
|
}
|
|
667
667
|
if (name === 'Response') {
|
|
668
|
-
this_1.
|
|
668
|
+
this_1.y($responseHeaders);
|
|
669
669
|
}
|
|
670
|
-
tmp_0 = this_1.
|
|
670
|
+
tmp_0 = this_1.p5();
|
|
671
671
|
} else {
|
|
672
672
|
// Inline function 'kotlin.collections.contains' call
|
|
673
673
|
// Inline function 'kotlin.collections.containsKey' call
|
|
674
674
|
var this_2 = $rawElementInterfaces;
|
|
675
|
-
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).
|
|
676
|
-
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.
|
|
675
|
+
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).o2(name)) {
|
|
676
|
+
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.q2(name)));
|
|
677
677
|
} else {
|
|
678
678
|
tmp_0 = listOf(element_0);
|
|
679
679
|
}
|
|
@@ -684,7 +684,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
684
684
|
addAll(destination, list);
|
|
685
685
|
}
|
|
686
686
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
687
|
-
tmp = element.
|
|
687
|
+
tmp = element.o1r(VOID, newElements);
|
|
688
688
|
} else {
|
|
689
689
|
tmp = element;
|
|
690
690
|
}
|
|
@@ -700,14 +700,14 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
700
700
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
701
701
|
var tmp_0 = scope;
|
|
702
702
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
703
|
-
var this_0 = scope.
|
|
703
|
+
var this_0 = scope.v1y_1;
|
|
704
704
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
705
705
|
// Inline function 'kotlin.apply' call
|
|
706
706
|
var this_1 = new TransformerBuilder();
|
|
707
|
-
this_1.
|
|
708
|
-
var tmp$ret$2 = this_1.
|
|
709
|
-
tmp_0.
|
|
710
|
-
var tmp_1 = scope.
|
|
707
|
+
this_1.m1m(RustIrEmitter$emitShared$lambda$lambda_4);
|
|
708
|
+
var tmp$ret$2 = this_1.n1m();
|
|
709
|
+
tmp_0.v1y_1 = transform(this_0, tmp$ret$2);
|
|
710
|
+
var tmp_1 = scope.v1y_1;
|
|
711
711
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
712
712
|
} else {
|
|
713
713
|
tmp = element;
|
|
@@ -718,7 +718,7 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
718
718
|
function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
719
719
|
var tmp;
|
|
720
720
|
if (element instanceof Function_0) {
|
|
721
|
-
var tmp0 = element.
|
|
721
|
+
var tmp0 = element.u1o_1;
|
|
722
722
|
var tmp$ret$0;
|
|
723
723
|
$l$block_0: {
|
|
724
724
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -735,7 +735,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
735
735
|
var _iterator__ex2g4s = tmp0.t();
|
|
736
736
|
while (_iterator__ex2g4s.u()) {
|
|
737
737
|
var element_0 = _iterator__ex2g4s.v();
|
|
738
|
-
if (element_0.
|
|
738
|
+
if (element_0.n1t_1.y1m() === '&self' || element_0.n1t_1.y1m() === 'self') {
|
|
739
739
|
tmp$ret$0 = true;
|
|
740
740
|
break $l$block_0;
|
|
741
741
|
}
|
|
@@ -743,7 +743,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
743
743
|
tmp$ret$0 = false;
|
|
744
744
|
}
|
|
745
745
|
var hasSelf = tmp$ret$0;
|
|
746
|
-
tmp = hasSelf || element.
|
|
746
|
+
tmp = hasSelf || element.y1o_1 ? element : element.a1p(VOID, VOID, plus(listOf(get_rustSelfParam()), element.u1o_1));
|
|
747
747
|
} else {
|
|
748
748
|
tmp = element;
|
|
749
749
|
}
|
|
@@ -754,7 +754,7 @@ function RustIrEmitter$emitShared$lambda_10(group) {
|
|
|
754
754
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
755
755
|
}
|
|
756
756
|
function RustIrEmitter$emitShared$lambda$lambda_5(it) {
|
|
757
|
-
return RustGenerator_instance.
|
|
757
|
+
return RustGenerator_instance.j1z(it);
|
|
758
758
|
}
|
|
759
759
|
function RustIrEmitter$emit$lambda(a, b) {
|
|
760
760
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -763,7 +763,7 @@ function RustIrEmitter$emit$lambda(a, b) {
|
|
|
763
763
|
return compareValues(tmp, tmp$ret$1);
|
|
764
764
|
}
|
|
765
765
|
function emit$emitMod(this$0, def) {
|
|
766
|
-
return 'pub mod ' + sanitize(this$0, def.
|
|
766
|
+
return 'pub mod ' + sanitize(this$0, def.xu()) + ';';
|
|
767
767
|
}
|
|
768
768
|
function RustIrEmitter$emit$lambda_0(this$0) {
|
|
769
769
|
return function (it) {
|
|
@@ -792,17 +792,17 @@ function RustIrEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs)
|
|
|
792
792
|
var tmp_0;
|
|
793
793
|
var tmp_1;
|
|
794
794
|
if (expr instanceof RawExpression) {
|
|
795
|
-
tmp_1 = endsWith(expr.
|
|
795
|
+
tmp_1 = endsWith(expr.b1t_1, 'Generator');
|
|
796
796
|
} else {
|
|
797
797
|
tmp_1 = false;
|
|
798
798
|
}
|
|
799
799
|
if (tmp_1) {
|
|
800
|
-
tmp_0 = !(expr.
|
|
800
|
+
tmp_0 = !(expr.b1t_1 === $generatorOwnName);
|
|
801
801
|
} else {
|
|
802
802
|
tmp_0 = false;
|
|
803
803
|
}
|
|
804
804
|
if (tmp_0) {
|
|
805
|
-
$generatorRefs.
|
|
805
|
+
$generatorRefs.y(expr.b1t_1);
|
|
806
806
|
tmp = Unit_instance;
|
|
807
807
|
}
|
|
808
808
|
return transformChildren_1(expr, t);
|
|
@@ -815,7 +815,7 @@ function RustIrEmitter$emit$lambda_2(this$0) {
|
|
|
815
815
|
}
|
|
816
816
|
function RustIrEmitter$emitClient$lambda(this$0) {
|
|
817
817
|
return function (endpoint) {
|
|
818
|
-
return 'pub mod ' + toSnakeCase(this$0, endpoint.
|
|
818
|
+
return 'pub mod ' + toSnakeCase(this$0, endpoint.ft_1.m1() + 'Client') + ';';
|
|
819
819
|
};
|
|
820
820
|
}
|
|
821
821
|
function RustIrEmitter$toPascalCase$lambda(s) {
|
|
@@ -835,39 +835,39 @@ function RustIrEmitter$toPascalCase$lambda(s) {
|
|
|
835
835
|
}
|
|
836
836
|
function RustIrEmitter$buildClientParams$lambda(this$0) {
|
|
837
837
|
return function (_destruct__k2r9zo) {
|
|
838
|
-
var name = _destruct__k2r9zo.
|
|
839
|
-
return sanitizeKeywords(this$0, name.
|
|
838
|
+
var name = _destruct__k2r9zo.mf();
|
|
839
|
+
return sanitizeKeywords(this$0, name.l1q());
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
842
|
function RustIrEmitter$buildClientParams$lambda_0(this$0) {
|
|
843
843
|
return function (_destruct__k2r9zo) {
|
|
844
|
-
var name = _destruct__k2r9zo.
|
|
845
|
-
var type = _destruct__k2r9zo.
|
|
846
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
844
|
+
var name = _destruct__k2r9zo.mf();
|
|
845
|
+
var type = _destruct__k2r9zo.nf();
|
|
846
|
+
var tmp = sanitizeKeywords(this$0, name.l1q());
|
|
847
847
|
// Inline function 'kotlin.with' call
|
|
848
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
848
|
+
return tmp + ': ' + RustTransform_getInstance().r23(type);
|
|
849
849
|
};
|
|
850
850
|
}
|
|
851
851
|
function RustIrEmitter(packageName, emitShared) {
|
|
852
852
|
Companion_getInstance_0();
|
|
853
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
854
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
855
|
-
this.
|
|
856
|
-
this.
|
|
857
|
-
this.
|
|
858
|
-
this.
|
|
853
|
+
packageName = packageName === VOID ? Companion_instance_0.nv('community.flock.wirespec.generated') : packageName;
|
|
854
|
+
emitShared = emitShared === VOID ? Companion_instance_1.hs() : emitShared;
|
|
855
|
+
this.c23_1 = packageName;
|
|
856
|
+
this.d23_1 = emitShared;
|
|
857
|
+
this.e23_1 = RustGenerator_instance;
|
|
858
|
+
this.f23_1 = FileExtension_Rust_getInstance();
|
|
859
859
|
var tmp = this;
|
|
860
|
-
tmp.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
860
|
+
tmp.g23_1 = lazy(RustIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
861
|
+
this.h23_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
862
|
+
this.i23_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
863
863
|
}
|
|
864
|
-
protoOf(RustIrEmitter).
|
|
865
|
-
return this.
|
|
864
|
+
protoOf(RustIrEmitter).i1z = function () {
|
|
865
|
+
return this.e23_1;
|
|
866
866
|
};
|
|
867
|
-
protoOf(RustIrEmitter).
|
|
868
|
-
return this.
|
|
867
|
+
protoOf(RustIrEmitter).fu = function () {
|
|
868
|
+
return this.f23_1;
|
|
869
869
|
};
|
|
870
|
-
protoOf(RustIrEmitter).
|
|
870
|
+
protoOf(RustIrEmitter).m1z = function () {
|
|
871
871
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
872
872
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustIrEmitter$emitShared$lambda);
|
|
873
873
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustIrEmitter$emitShared$lambda_0);
|
|
@@ -881,43 +881,43 @@ protoOf(RustIrEmitter).b1w = function () {
|
|
|
881
881
|
var transportationTrait = interface_0('Transportation', VOID, RustIrEmitter$emitShared$lambda_5);
|
|
882
882
|
var dslTraits = mapOf([to('Enum', enumTrait), to('Refined', refinedTrait), to('Request', requestTrait), to('Response', responseTrait), to('Transportation', transportationTrait)]);
|
|
883
883
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
884
|
-
var this_0 = convert(Companion_instance_0.
|
|
884
|
+
var this_0 = convert(Companion_instance_0.nv('shared'));
|
|
885
885
|
var scope = new TransformScope(this_0);
|
|
886
886
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
887
887
|
var tmp = scope;
|
|
888
888
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
889
|
-
var this_1 = scope.
|
|
889
|
+
var this_1 = scope.v1y_1;
|
|
890
890
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
891
891
|
// Inline function 'kotlin.apply' call
|
|
892
892
|
var this_2 = new TransformerBuilder();
|
|
893
|
-
this_2.
|
|
894
|
-
var tmp$ret$2 = this_2.
|
|
895
|
-
tmp.
|
|
893
|
+
this_2.m1m(RustIrEmitter$emitShared$lambda_6(rustImports));
|
|
894
|
+
var tmp$ret$2 = this_2.n1m();
|
|
895
|
+
tmp.v1y_1 = transform(this_1, tmp$ret$2);
|
|
896
896
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
897
897
|
var tmp_0 = scope;
|
|
898
898
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
899
|
-
var this_3 = scope.
|
|
899
|
+
var this_3 = scope.v1y_1;
|
|
900
900
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
901
901
|
// Inline function 'kotlin.apply' call
|
|
902
902
|
var this_4 = new TransformerBuilder();
|
|
903
|
-
this_4.
|
|
904
|
-
var tmp$ret$7 = this_4.
|
|
905
|
-
tmp_0.
|
|
903
|
+
this_4.m1m(RustIrEmitter$emitShared$lambda_7);
|
|
904
|
+
var tmp$ret$7 = this_4.n1m();
|
|
905
|
+
tmp_0.v1y_1 = transform(this_3, tmp$ret$7);
|
|
906
906
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
907
907
|
var tmp_1 = scope;
|
|
908
908
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
909
|
-
var this_5 = scope.
|
|
909
|
+
var this_5 = scope.v1y_1;
|
|
910
910
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
911
911
|
// Inline function 'kotlin.apply' call
|
|
912
912
|
var this_6 = new TransformerBuilder();
|
|
913
|
-
this_6.
|
|
914
|
-
var tmp$ret$12 = this_6.
|
|
915
|
-
tmp_1.
|
|
916
|
-
var tmp_2 = scope.
|
|
913
|
+
this_6.m1m(RustIrEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
914
|
+
var tmp$ret$12 = this_6.n1m();
|
|
915
|
+
tmp_1.v1y_1 = transform(this_5, tmp$ret$12);
|
|
916
|
+
var tmp_2 = scope.v1y_1;
|
|
917
917
|
// Inline function 'kotlin.let' call
|
|
918
918
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
919
919
|
// Inline function 'kotlin.collections.flatMap' call
|
|
920
|
-
var tmp0 = file.
|
|
920
|
+
var tmp0 = file.l1r_1;
|
|
921
921
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
922
922
|
var destination = ArrayList_init_$Create$_0();
|
|
923
923
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -930,7 +930,7 @@ protoOf(RustIrEmitter).b1w = function () {
|
|
|
930
930
|
break $l$block;
|
|
931
931
|
}
|
|
932
932
|
var tmp_3;
|
|
933
|
-
var tmp0_0 = element.
|
|
933
|
+
var tmp0_0 = element.w1r_1;
|
|
934
934
|
var tmp$ret$18;
|
|
935
935
|
$l$block_1: {
|
|
936
936
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -947,7 +947,7 @@ protoOf(RustIrEmitter).b1w = function () {
|
|
|
947
947
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
948
948
|
while (_iterator__ex2g4s_0.u()) {
|
|
949
949
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
950
|
-
if (containsUnderiveable(this, element_0.
|
|
950
|
+
if (containsUnderiveable(this, element_0.s1t_1)) {
|
|
951
951
|
tmp$ret$18 = true;
|
|
952
952
|
break $l$block_1;
|
|
953
953
|
}
|
|
@@ -957,7 +957,7 @@ protoOf(RustIrEmitter).b1w = function () {
|
|
|
957
957
|
if (tmp$ret$18) {
|
|
958
958
|
tmp_3 = '';
|
|
959
959
|
} else {
|
|
960
|
-
var tmp0_1 = element.
|
|
960
|
+
var tmp0_1 = element.w1r_1;
|
|
961
961
|
var tmp$ret$20;
|
|
962
962
|
$l$block_3: {
|
|
963
963
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -974,7 +974,7 @@ protoOf(RustIrEmitter).b1w = function () {
|
|
|
974
974
|
var _iterator__ex2g4s_1 = tmp0_1.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.s1t_1)) {
|
|
978
978
|
tmp$ret$20 = true;
|
|
979
979
|
break $l$block_3;
|
|
980
980
|
}
|
|
@@ -984,7 +984,7 @@ protoOf(RustIrEmitter).b1w = 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.v1r_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).b1w = 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.v1r_1, plus_0(prefix, element)));
|
|
1004
1004
|
}
|
|
1005
1005
|
var list = tmp$ret$17;
|
|
1006
1006
|
addAll(destination, list);
|
|
1007
1007
|
}
|
|
1008
|
-
var tmp0_2 = new File(file.
|
|
1008
|
+
var tmp0_2 = new File(file.k1r_1, destination);
|
|
1009
1009
|
// Inline function 'kotlin.let' call
|
|
1010
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1010
|
+
var wirespecFile = RustTransform_getInstance().s23(tmp0_2);
|
|
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.v1y_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.v1y_1 = transform(this_7, tmp$ret$31);
|
|
1023
|
+
var tmp_8 = scope_0.v1y_1;
|
|
1024
1024
|
// Inline function 'kotlin.let' call
|
|
1025
|
-
var tmp0_3 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1025
|
+
var tmp0_3 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).l1r_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).b1w = 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.d23_1.is_1) {
|
|
1047
|
+
tmp_10 = new File(Companion_getInstance().c1l(this.c23_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).l1z = 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).a1w = 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.c23_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.c23_1.qv() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1087
|
+
var tmp_2 = Companion_getInstance().c1l(this.c23_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.d23_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.c23_1, definition);
|
|
1105
1105
|
var tmp;
|
|
1106
1106
|
if (definition instanceof Endpoint) {
|
|
1107
|
-
tmp = this.
|
|
1107
|
+
tmp = this.i23_1;
|
|
1108
1108
|
} else {
|
|
1109
|
-
tmp = this.
|
|
1109
|
+
tmp = this.h23_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().s23(tmp0);
|
|
1115
|
+
var tmp_0 = Companion_getInstance().c1l(subPackageName.qv() + toSnakeCase(this, file.k1r_1.d1l()));
|
|
1116
1116
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1117
|
-
var tmp0_0 = file.
|
|
1117
|
+
var tmp0_0 = file.l1r_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).r1z = 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).g1w = 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).g1w = 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.d1z(RustIrEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1164
|
+
var tmp_3 = scope.v1y_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).g1w = 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).g1w = 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).g1w = 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).g1w = 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.c23_1, 'generator');
|
|
1208
|
+
return new File(Companion_getInstance().c1l(subPackageName.qv() + toSnakeCase(this, generatorFile.k1r_1.d1l())), plus(plus(plus(this.h23_1, typeImports), generatorImports), generatorFile.l1r_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.a1z(fixResponseSwitchPatterns());
|
|
1239
|
+
var tmp = scope.v1y_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.a1z(fixConstructorCalls());
|
|
1244
|
+
var tmp_0 = scope_0.v1y_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).q1z = 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).f1w = 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).f1w = 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).f1w = 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.c23_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).n1z = 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).c1w = 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).c1w = 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).c1w = 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).c1w = 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).c1w = 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).c1w = 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.c23_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.c1z(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.v1y_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.v1y_1 = transform(this_0, tmp$ret$2);
|
|
1481
|
+
var tmp_0 = scope.v1y_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.v1y_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.v1y_1 = transform(this_0, tmp$ret$2);
|
|
1498
|
+
var tmp_0 = scope.v1y_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.v1y_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.v1y_1 = transform(this_0, tmp$ret$2);
|
|
1515
|
+
var tmp_0 = scope.v1y_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.v1y_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.v1y_1 = transform(this_0, tmp$ret$2);
|
|
1532
|
+
var tmp_0 = scope.v1y_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.v1y_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.v1y_1 = transform(this_0, tmp$ret$2);
|
|
1549
|
+
var tmp_0 = scope.v1y_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.v1y_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.b1z(stripResponseGenerics$lambda);
|
|
1564
|
+
var tmp$ret$2 = this_1.n1m();
|
|
1565
|
+
tmp.v1y_1 = transform(this_0, tmp$ret$2);
|
|
1566
|
+
var tmp_0 = scope.v1y_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.v1y_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.v1y_1 = transform(this_0, tmp$ret$2);
|
|
1583
|
+
var tmp_0 = scope.v1y_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.e1z(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1592
|
+
var tmp = scope.v1y_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.v1y_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.b1z(stripWirespecPrefix$lambda);
|
|
1607
|
+
var tmp$ret$2 = this_1.n1m();
|
|
1608
|
+
tmp.v1y_1 = transform(this_0, tmp$ret$2);
|
|
1609
|
+
var tmp_0 = scope.v1y_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.m1r();
|
|
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.r1r_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.t1u_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.r1r_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.v1r_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.y1u(VOID, VOID, members, emptyList());
|
|
1700
1700
|
} else {
|
|
1701
1701
|
if (item instanceof Union_0) {
|
|
1702
|
-
tmp_0 = item.
|
|
1702
|
+
tmp_0 = item.y1u(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.r1r_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.q1r_1, plus_0(moduleElements, new Namespace(namespace.q1r_1, classElements, namespace.s1r_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.e1z(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).l1q();
|
|
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.z1t_1;
|
|
1802
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f1q()) === '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.x1t_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.e1u_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.z1t_1).l1q() + ')');
|
|
1820
1820
|
// Inline function 'kotlin.collections.map' call
|
|
1821
|
-
var this_1 = item.
|
|
1821
|
+
var this_1 = item.d1u_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.p1y(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.q1y(item.c1u_1);
|
|
1833
1833
|
// Inline function 'kotlin.collections.map' call
|
|
1834
|
-
var this_2 = item.
|
|
1834
|
+
var this_2 = item.d1u_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.p1y(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.e1u_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.n1y(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.b1u(t.q1y(s.w1t_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.c1s(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.u1r(VOID, plus(element.r1r_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.l1r_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.t1u_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.v1u_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.v1u_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.o1r(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.r1r_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.e1s_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.f1s_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.l1q();
|
|
1996
|
+
tmp$ret$4 = element.u1r(VOID, plus(element.r1r_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.e1s_1.equals(Companion_getInstance().c1l('Handler')) && !element.e1s_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.v1y_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.v1y_1 = transform(this_0, tmp$ret$3);
|
|
2027
|
+
var tmp_1 = scope.v1y_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.l1q()), 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.b1r(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.e1s_1.equals(Companion_getInstance().c1l('Handler')) || element.e1s_1.equals(Companion_getInstance().c1l('Call')) ? element.l1s(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.b1t_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.b1t_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.b1t_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.b1r(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.h1r_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.i1r_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.q1y(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().t23(item.n1t_1)) {
|
|
2195
2195
|
tmp = item;
|
|
2196
2196
|
} else {
|
|
2197
|
-
tmp = item.
|
|
2197
|
+
tmp = item.q1t(VOID, applyBorrowRule(RustTransform_getInstance(), item.o1t_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.w23(type) ? type : $this.v23(type) ? borrowImpl(type) : $this.u23(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().j23_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.z1s_1.l1q());
|
|
2231
2231
|
} else {
|
|
2232
2232
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
2233
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
2233
|
+
var tmp1_safe_receiver = _this__u8e3s4.h1u_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.i1u_1.l1q());
|
|
2244
2244
|
} else {
|
|
2245
2245
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
2246
|
-
var tmp_1 = _this__u8e3s4.
|
|
2246
|
+
var tmp_1 = _this__u8e3s4.a1v_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.k1t_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.k1t_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.j1t_1);
|
|
2265
2265
|
} else {
|
|
2266
2266
|
var tmp_7;
|
|
2267
2267
|
if (!(lit == null)) {
|
|
2268
|
-
var tmp_8 = lit.
|
|
2268
|
+
var tmp_8 = lit.k1t_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.j1t_1) + '"';
|
|
2275
2275
|
} else {
|
|
2276
|
-
tmp_2 = toRawCode($this, _this__u8e3s4.
|
|
2276
|
+
tmp_2 = toRawCode($this, _this__u8e3s4.a1v_1);
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
2279
|
var idx = tmp_2;
|
|
2280
|
-
tmp = toRawCode($this, _this__u8e3s4.
|
|
2280
|
+
tmp = toRawCode($this, _this__u8e3s4.z1u_1) + '[' + idx + ']';
|
|
2281
2281
|
} else {
|
|
2282
2282
|
if (_this__u8e3s4 instanceof ConstructorStatement) {
|
|
2283
|
-
var tmp_9 = _this__u8e3s4.
|
|
2283
|
+
var tmp_9 = _this__u8e3s4.h1r_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.h1r_1) : tmp5_elvis_lhs;
|
|
2288
|
+
var tmp_10 = _this__u8e3s4.i1r_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.k1t_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.j1t_1) + '")';
|
|
2304
2304
|
} else {
|
|
2305
|
-
var tmp_14 = _this__u8e3s4.
|
|
2305
|
+
var tmp_14 = _this__u8e3s4.k1t_1;
|
|
2306
2306
|
if (tmp_14 instanceof Boolean_0) {
|
|
2307
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2307
|
+
tmp_12 = toString_0(_this__u8e3s4.j1t_1);
|
|
2308
2308
|
} else {
|
|
2309
|
-
var tmp_15 = _this__u8e3s4.
|
|
2309
|
+
var tmp_15 = _this__u8e3s4.k1t_1;
|
|
2310
2310
|
if (tmp_15 instanceof Integer) {
|
|
2311
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2311
|
+
tmp_12 = toString_0(_this__u8e3s4.j1t_1);
|
|
2312
2312
|
} else {
|
|
2313
|
-
var tmp_16 = _this__u8e3s4.
|
|
2313
|
+
var tmp_16 = _this__u8e3s4.k1t_1;
|
|
2314
2314
|
if (tmp_16 instanceof Number_0) {
|
|
2315
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2315
|
+
tmp_12 = toString_0(_this__u8e3s4.j1t_1);
|
|
2316
2316
|
} else {
|
|
2317
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2317
|
+
tmp_12 = toString_0(_this__u8e3s4.j1t_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.b1t_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.e1s_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.f1s_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.l1s(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().o23_1.v1(s.p1q_1.l1q());
|
|
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.q1q_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.q1y(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.z1s_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.t1q(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().r23(it);
|
|
2457
2457
|
}
|
|
2458
2458
|
function RustTransform$rustName$lambda_0(it) {
|
|
2459
|
-
return RustTransform_getInstance().
|
|
2459
|
+
return RustTransform_getInstance().r23(it);
|
|
2460
2460
|
}
|
|
2461
2461
|
function RustTransform$toRawCode$lambda(it) {
|
|
2462
|
-
return it.
|
|
2462
|
+
return it.l1().l1q() + ': ' + 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.b1z(RustTransform$primitivesToCustom$lambda);
|
|
2471
|
+
tmp.l23_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.m23_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.n23_1 = (new TransformerBuilder()).n1m();
|
|
2482
|
+
this.o23_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.e1z(RustTransform$serializationArgs$lambda);
|
|
2488
|
+
tmp_2.p23_1 = this_2.n1m();
|
|
2489
|
+
this.q23_1 = setOf(['i32', 'i64', 'f32', 'f64', 'bool', 'u8', 'u16', 'u32', 'u64', 'usize', 'isize', '()']);
|
|
2490
2490
|
}
|
|
2491
|
-
protoOf(RustTransform).
|
|
2491
|
+
protoOf(RustTransform).s23 = 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.a1z(RustTransform_getInstance().l23_1);
|
|
2495
|
+
var tmp = scope.v1y_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.a1z(RustTransform_getInstance().m23_1);
|
|
2500
|
+
var tmp_0 = scope_0.v1y_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.a1z(RustTransform_getInstance().n23_1);
|
|
2505
|
+
var tmp_1 = scope_1.v1y_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.a1z(RustTransform_getInstance().p23_1);
|
|
2510
|
+
var tmp_2 = scope_2.v1y_1;
|
|
2511
2511
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2512
2512
|
};
|
|
2513
|
-
protoOf(RustTransform).
|
|
2513
|
+
protoOf(RustTransform).r23 = 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).g20 = 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.r23(_this__u8e3s4.u1m_1) + '>';
|
|
2530
2530
|
} else {
|
|
2531
2531
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2532
|
-
tmp = 'Vec<' + this.
|
|
2532
|
+
tmp = 'Vec<' + this.r23(_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.r23(_this__u8e3s4.x1q_1) + ', ' + this.r23(_this__u8e3s4.y1q_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).g20 = 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.u1q_1.c3_1) {
|
|
2558
2558
|
case 0:
|
|
2559
2559
|
tmp_1 = 'i32';
|
|
2560
2560
|
break;
|
|
@@ -2569,7 +2569,7 @@ protoOf(RustTransform).g20 = 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.v1q_1.c3_1) {
|
|
2573
2573
|
case 0:
|
|
2574
2574
|
tmp_2 = 'f32';
|
|
2575
2575
|
break;
|
|
@@ -2589,7 +2589,7 @@ protoOf(RustTransform).g20 = 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.e1r_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.r23(_this__u8e3s4.f1r_1) + '>';
|
|
2593
2593
|
} else {
|
|
2594
2594
|
noWhenBranchMatchedException();
|
|
2595
2595
|
}
|
|
@@ -2610,27 +2610,27 @@ protoOf(RustTransform).g20 = function (_this__u8e3s4) {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
return tmp;
|
|
2612
2612
|
};
|
|
2613
|
-
protoOf(RustTransform).
|
|
2613
|
+
protoOf(RustTransform).w23 = 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).v23 = 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).u23 = function (_this__u8e3s4) {
|
|
2630
|
+
return _this__u8e3s4.w1m_1.d1l() === 'GeneratorField';
|
|
2631
2631
|
};
|
|
2632
|
-
protoOf(RustTransform).
|
|
2633
|
-
var v = _this__u8e3s4.
|
|
2632
|
+
protoOf(RustTransform).t23 = 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.b1r(new Name(listOf('&' + _this__u8e3s4.w1m_1.d1l())));
|
|
2650
2650
|
}
|
|
2651
2651
|
function borrowDyn(_this__u8e3s4) {
|
|
2652
|
-
return _this__u8e3s4.
|
|
2652
|
+
return _this__u8e3s4.b1r(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.b1r(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.b1r(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).k1z = get_extensions;
|
|
2662
|
+
protoOf(RustIrEmitter).pr = emit_1;
|
|
2663
|
+
protoOf(RustIrEmitter).p1z = beforeGenerate;
|
|
2664
2664
|
//endregion
|
|
2665
2665
|
//region block: exports
|
|
2666
2666
|
export {
|