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