@flock/wirespec 0.20.0-RC.8 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +163 -163
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1575 -1575
- 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 +10254 -10254
- package/kotlin-rgxgen.mjs +1815 -1815
- 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 +1768 -2207
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +384 -1254
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +366 -1065
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +400 -1422
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +424 -422
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +214 -189
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +529 -1409
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +92 -86
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +4476 -4329
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +250 -1120
- 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 +756 -756
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1408 -1393
- 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 +0 -104
- package/wirespec-src-plugin-npm.mjs +40 -40
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +34 -34
- 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,
|
|
@@ -193,15 +193,15 @@ initMetadataForClass(RustIrEmitter, 'RustIrEmitter', RustIrEmitter, VOID, [IrEmi
|
|
|
193
193
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
194
194
|
//endregion
|
|
195
195
|
function _get_sanitizationConfig__sns434($this) {
|
|
196
|
-
var tmp0 = $this.
|
|
196
|
+
var tmp0 = $this.n1y_1;
|
|
197
197
|
var tmp = KProperty1;
|
|
198
198
|
// Inline function 'kotlin.getValue' call
|
|
199
199
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustIrEmitter$_get_sanitizationConfig_$ref_17ypni(), null);
|
|
200
|
-
return tmp0.
|
|
200
|
+
return tmp0.m1();
|
|
201
201
|
}
|
|
202
202
|
function sanitize($this, _this__u8e3s4) {
|
|
203
203
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
204
|
-
var this_0 = split(_this__u8e3s4.
|
|
204
|
+
var this_0 = split(_this__u8e3s4.m1(), ['.', ' ']);
|
|
205
205
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
206
206
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
207
207
|
var index = 0;
|
|
@@ -210,7 +210,7 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
210
210
|
var item = _iterator__ex2g4s.v();
|
|
211
211
|
var _unary__edvuaz = index;
|
|
212
212
|
index = _unary__edvuaz + 1 | 0;
|
|
213
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
213
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.xq(item) : item;
|
|
214
214
|
destination.x(tmp$ret$0);
|
|
215
215
|
}
|
|
216
216
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -257,14 +257,14 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
257
257
|
return toSnakeCase($this, tmp$ret$9);
|
|
258
258
|
}
|
|
259
259
|
function toSnakeCase($this, _this__u8e3s4) {
|
|
260
|
-
return Companion_getInstance().
|
|
260
|
+
return Companion_getInstance().x1g(_this__u8e3s4).p1m();
|
|
261
261
|
}
|
|
262
262
|
function toPascalCase($this, _this__u8e3s4) {
|
|
263
263
|
var tmp = split(_this__u8e3s4, ['_']);
|
|
264
264
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustIrEmitter$toPascalCase$lambda);
|
|
265
265
|
}
|
|
266
266
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
267
|
-
return Companion_getInstance_0().
|
|
267
|
+
return Companion_getInstance_0().l1x().v1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
268
268
|
}
|
|
269
269
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
270
270
|
// Inline function 'kotlin.let' call
|
|
@@ -289,7 +289,7 @@ function prependImports($this, _this__u8e3s4, imports) {
|
|
|
289
289
|
var tmp;
|
|
290
290
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
291
291
|
if (!imports.r()) {
|
|
292
|
-
tmp = _this__u8e3s4.
|
|
292
|
+
tmp = _this__u8e3s4.w1n(VOID, plus(imports, _this__u8e3s4.t1n_1));
|
|
293
293
|
} else {
|
|
294
294
|
tmp = _this__u8e3s4;
|
|
295
295
|
}
|
|
@@ -301,7 +301,7 @@ function containsWildcard($this, type) {
|
|
|
301
301
|
tmp = true;
|
|
302
302
|
} else {
|
|
303
303
|
if (type instanceof Custom) {
|
|
304
|
-
var tmp0 = type.
|
|
304
|
+
var tmp0 = type.v1i_1;
|
|
305
305
|
var tmp$ret$0;
|
|
306
306
|
$l$block_0: {
|
|
307
307
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -328,13 +328,13 @@ function containsWildcard($this, type) {
|
|
|
328
328
|
tmp = tmp$ret$0;
|
|
329
329
|
} else {
|
|
330
330
|
if (type instanceof Nullable) {
|
|
331
|
-
tmp = containsWildcard($this, type.
|
|
331
|
+
tmp = containsWildcard($this, type.s1i_1);
|
|
332
332
|
} else {
|
|
333
333
|
if (type instanceof Array_0) {
|
|
334
|
-
tmp = containsWildcard($this, type.
|
|
334
|
+
tmp = containsWildcard($this, type.t1i_1);
|
|
335
335
|
} else {
|
|
336
336
|
if (type instanceof Dict) {
|
|
337
|
-
tmp = containsWildcard($this, type.
|
|
337
|
+
tmp = containsWildcard($this, type.b1n_1) || containsWildcard($this, type.c1n_1);
|
|
338
338
|
} else {
|
|
339
339
|
tmp = false;
|
|
340
340
|
}
|
|
@@ -356,7 +356,7 @@ function containsUnderiveable($this, type) {
|
|
|
356
356
|
tmp = true;
|
|
357
357
|
} else {
|
|
358
358
|
if (type instanceof Custom) {
|
|
359
|
-
var tmp0 = type.
|
|
359
|
+
var tmp0 = type.v1i_1;
|
|
360
360
|
var tmp$ret$0;
|
|
361
361
|
$l$block_0: {
|
|
362
362
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -383,13 +383,13 @@ function containsUnderiveable($this, type) {
|
|
|
383
383
|
tmp = tmp$ret$0;
|
|
384
384
|
} else {
|
|
385
385
|
if (type instanceof Nullable) {
|
|
386
|
-
tmp = containsUnderiveable($this, type.
|
|
386
|
+
tmp = containsUnderiveable($this, type.s1i_1);
|
|
387
387
|
} else {
|
|
388
388
|
if (type instanceof Array_0) {
|
|
389
|
-
tmp = containsUnderiveable($this, type.
|
|
389
|
+
tmp = containsUnderiveable($this, type.t1i_1);
|
|
390
390
|
} else {
|
|
391
391
|
if (type instanceof Dict) {
|
|
392
|
-
tmp = containsUnderiveable($this, type.
|
|
392
|
+
tmp = containsUnderiveable($this, type.b1n_1) || containsUnderiveable($this, type.c1n_1);
|
|
393
393
|
} else {
|
|
394
394
|
tmp = false;
|
|
395
395
|
}
|
|
@@ -415,8 +415,11 @@ function buildClientParams($this, _this__u8e3s4) {
|
|
|
415
415
|
}
|
|
416
416
|
function Companion() {
|
|
417
417
|
Companion_instance_2 = this;
|
|
418
|
-
this.
|
|
418
|
+
this.q1y_1 = RustGenerator_getInstance();
|
|
419
419
|
}
|
|
420
|
+
protoOf(Companion).l1x = function () {
|
|
421
|
+
return this.q1y_1.r1w_1;
|
|
422
|
+
};
|
|
420
423
|
var Companion_instance_2;
|
|
421
424
|
function Companion_getInstance_0() {
|
|
422
425
|
if (Companion_instance_2 == null)
|
|
@@ -424,23 +427,23 @@ function Companion_getInstance_0() {
|
|
|
424
427
|
return Companion_instance_2;
|
|
425
428
|
}
|
|
426
429
|
function sam$kotlin_Comparator$0(function_0) {
|
|
427
|
-
this.
|
|
430
|
+
this.r1y_1 = function_0;
|
|
428
431
|
}
|
|
429
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
430
|
-
return this.
|
|
432
|
+
protoOf(sam$kotlin_Comparator$0).ud = function (a, b) {
|
|
433
|
+
return this.r1y_1(a, b);
|
|
431
434
|
};
|
|
432
435
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
433
|
-
return this.
|
|
436
|
+
return this.ud(a, b);
|
|
434
437
|
};
|
|
435
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
436
|
-
return this.
|
|
438
|
+
protoOf(sam$kotlin_Comparator$0).m3 = function () {
|
|
439
|
+
return this.r1y_1;
|
|
437
440
|
};
|
|
438
441
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
439
442
|
var tmp;
|
|
440
443
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
441
444
|
var tmp_0;
|
|
442
445
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
443
|
-
tmp_0 = equals(this.
|
|
446
|
+
tmp_0 = equals(this.m3(), other.m3());
|
|
444
447
|
} else {
|
|
445
448
|
tmp_0 = false;
|
|
446
449
|
}
|
|
@@ -451,22 +454,22 @@ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
|
451
454
|
return tmp;
|
|
452
455
|
};
|
|
453
456
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
454
|
-
return hashCode(this.
|
|
457
|
+
return hashCode(this.m3());
|
|
455
458
|
};
|
|
456
459
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
457
460
|
return 'r#' + it;
|
|
458
461
|
}
|
|
459
462
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
460
|
-
return Companion_getInstance().
|
|
463
|
+
return Companion_getInstance().x1g((new Name(name.v1g_1)).p1m());
|
|
461
464
|
}
|
|
462
465
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
463
|
-
var value = name.
|
|
466
|
+
var value = name.w1i();
|
|
464
467
|
switch (value) {
|
|
465
468
|
case 'self':
|
|
466
469
|
case '&self':
|
|
467
470
|
return name;
|
|
468
471
|
default:
|
|
469
|
-
return Companion_getInstance().
|
|
472
|
+
return Companion_getInstance().x1g((new Name(name.v1g_1)).p1m());
|
|
470
473
|
}
|
|
471
474
|
}
|
|
472
475
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
@@ -490,20 +493,20 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
490
493
|
return function (stmt, tr) {
|
|
491
494
|
var tmp;
|
|
492
495
|
if (stmt instanceof ConstructorStatement) {
|
|
493
|
-
var tmp_0 = tr.
|
|
496
|
+
var tmp_0 = tr.i1v(stmt.o1n_1);
|
|
494
497
|
// Inline function 'kotlin.collections.map' call
|
|
495
|
-
var this_0 = stmt.
|
|
498
|
+
var this_0 = stmt.p1n_1;
|
|
496
499
|
// Inline function 'kotlin.collections.mapTo' call
|
|
497
|
-
var destination = ArrayList_init_$Create$(this_0.
|
|
500
|
+
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
498
501
|
// Inline function 'kotlin.collections.iterator' call
|
|
499
|
-
var _iterator__ex2g4s = this_0.
|
|
502
|
+
var _iterator__ex2g4s = this_0.k1().t();
|
|
500
503
|
while (_iterator__ex2g4s.u()) {
|
|
501
504
|
var item = _iterator__ex2g4s.v();
|
|
502
505
|
// Inline function 'kotlin.collections.component1' call
|
|
503
|
-
var k = item.
|
|
506
|
+
var k = item.l1();
|
|
504
507
|
// Inline function 'kotlin.collections.component2' call
|
|
505
|
-
var v = item.
|
|
506
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
508
|
+
var v = item.m1();
|
|
509
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.l1v(v));
|
|
507
510
|
destination.x(tmp$ret$3);
|
|
508
511
|
}
|
|
509
512
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -515,7 +518,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
515
518
|
}
|
|
516
519
|
function RustIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
517
520
|
return function () {
|
|
518
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
521
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().l1x(), setOf(['self', 'Self']));
|
|
519
522
|
var tmp = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
520
523
|
var tmp_0 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
521
524
|
var tmp_1 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -529,69 +532,69 @@ function RustIrEmitter$_get_sanitizationConfig_$ref_17ypni() {
|
|
|
529
532
|
};
|
|
530
533
|
}
|
|
531
534
|
function RustIrEmitter$emitShared$lambda($this$interface) {
|
|
532
|
-
$this$interface.
|
|
535
|
+
$this$interface.j1j(Custom_init_$Create$('Headers'));
|
|
533
536
|
return Unit_instance;
|
|
534
537
|
}
|
|
535
538
|
function RustIrEmitter$emitShared$lambda_0($this$interface) {
|
|
536
|
-
$this$interface.
|
|
539
|
+
$this$interface.j1j(Custom_init_$Create$('Headers'));
|
|
537
540
|
return Unit_instance;
|
|
538
541
|
}
|
|
539
542
|
function RustIrEmitter$emitShared$lambda_1($this$interface) {
|
|
540
|
-
$this$interface.
|
|
541
|
-
$this$interface.
|
|
542
|
-
$this$interface.
|
|
543
|
+
$this$interface.j1j(Custom_init_$Create$('Sized'));
|
|
544
|
+
$this$interface.q1h('label', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda);
|
|
545
|
+
$this$interface.q1h('from_label', true, VOID, RustIrEmitter$emitShared$lambda$lambda_0);
|
|
543
546
|
return Unit_instance;
|
|
544
547
|
}
|
|
545
548
|
function RustIrEmitter$emitShared$lambda$lambda($this$function) {
|
|
546
|
-
$this$function.
|
|
547
|
-
$this$function.
|
|
549
|
+
$this$function.l1h('&self', Custom_init_$Create$(''));
|
|
550
|
+
$this$function.o1h(Custom_init_$Create$('&str'));
|
|
548
551
|
return Unit_instance;
|
|
549
552
|
}
|
|
550
553
|
function RustIrEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
551
|
-
$this$function.
|
|
552
|
-
$this$function.
|
|
554
|
+
$this$function.l1h('s', Custom_init_$Create$('&str'));
|
|
555
|
+
$this$function.o1h(Custom_init_$Create$('Option<Self>'));
|
|
553
556
|
return Unit_instance;
|
|
554
557
|
}
|
|
555
558
|
function RustIrEmitter$emitShared$lambda_2($this$interface) {
|
|
556
|
-
$this$interface.
|
|
557
|
-
$this$interface.
|
|
558
|
-
$this$interface.
|
|
559
|
+
$this$interface.d1j($this$interface.z1g('T', []), []);
|
|
560
|
+
$this$interface.q1h('value', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_1);
|
|
561
|
+
$this$interface.q1h('validate', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_2);
|
|
559
562
|
return Unit_instance;
|
|
560
563
|
}
|
|
561
564
|
function RustIrEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
562
|
-
$this$function.
|
|
563
|
-
$this$function.
|
|
565
|
+
$this$function.l1h('&self', Custom_init_$Create$(''));
|
|
566
|
+
$this$function.o1h(borrow($this$function.z1g('T', [])));
|
|
564
567
|
return Unit_instance;
|
|
565
568
|
}
|
|
566
569
|
function RustIrEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
567
|
-
$this$function.
|
|
568
|
-
$this$function.
|
|
570
|
+
$this$function.l1h('&self', Custom_init_$Create$(''));
|
|
571
|
+
$this$function.o1h($this$function.k1j());
|
|
569
572
|
return Unit_instance;
|
|
570
573
|
}
|
|
571
574
|
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.
|
|
575
|
+
$this$interface.d1j($this$interface.z1g('T', []), []);
|
|
576
|
+
$this$interface.e1j('path', borrowDyn($this$interface.z1g('Path', [])));
|
|
577
|
+
$this$interface.e1j('method', borrow($this$interface.z1g('Method', [])));
|
|
578
|
+
$this$interface.e1j('queries', borrowDyn($this$interface.z1g('Queries', [])));
|
|
579
|
+
$this$interface.e1j('headers', borrowDyn($this$interface.z1g('RequestHeaders', [])));
|
|
580
|
+
$this$interface.e1j('body', borrow($this$interface.z1g('T', [])));
|
|
578
581
|
return Unit_instance;
|
|
579
582
|
}
|
|
580
583
|
function RustIrEmitter$emitShared$lambda_4($this$interface) {
|
|
581
|
-
$this$interface.
|
|
582
|
-
$this$interface.
|
|
583
|
-
$this$interface.
|
|
584
|
-
$this$interface.
|
|
584
|
+
$this$interface.d1j($this$interface.z1g('T', []), []);
|
|
585
|
+
$this$interface.e1j('status', $this$interface.n1k());
|
|
586
|
+
$this$interface.e1j('headers', borrowDyn($this$interface.z1g('ResponseHeaders', [])));
|
|
587
|
+
$this$interface.e1j('body', borrow($this$interface.z1g('T', [])));
|
|
585
588
|
return Unit_instance;
|
|
586
589
|
}
|
|
587
590
|
function RustIrEmitter$emitShared$lambda_5($this$interface) {
|
|
588
|
-
$this$interface.
|
|
591
|
+
$this$interface.k1k('transport', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_3);
|
|
589
592
|
return Unit_instance;
|
|
590
593
|
}
|
|
591
594
|
function RustIrEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
592
|
-
$this$asyncFunction.
|
|
593
|
-
$this$asyncFunction.
|
|
594
|
-
$this$asyncFunction.
|
|
595
|
+
$this$asyncFunction.l1h('&self', Custom_init_$Create$(''));
|
|
596
|
+
$this$asyncFunction.l1h('request', borrow($this$asyncFunction.z1g('RawRequest', [])));
|
|
597
|
+
$this$asyncFunction.o1h($this$asyncFunction.z1g('RawResponse', []));
|
|
595
598
|
return Unit_instance;
|
|
596
599
|
}
|
|
597
600
|
function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -599,7 +602,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
599
602
|
var tmp;
|
|
600
603
|
if (element instanceof File) {
|
|
601
604
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
602
|
-
var tmp0 = element.
|
|
605
|
+
var tmp0 = element.t1n_1;
|
|
603
606
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
604
607
|
var destination = ArrayList_init_$Create$_0();
|
|
605
608
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -610,7 +613,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
610
613
|
}
|
|
611
614
|
}
|
|
612
615
|
var namespace = first(destination);
|
|
613
|
-
tmp = element.
|
|
616
|
+
tmp = element.w1n(VOID, plus($rustImports, namespace.z1n_1));
|
|
614
617
|
} else {
|
|
615
618
|
tmp = element;
|
|
616
619
|
}
|
|
@@ -622,7 +625,7 @@ function RustIrEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
622
625
|
var tmp;
|
|
623
626
|
if (element instanceof Enum_0) {
|
|
624
627
|
var tmp_0;
|
|
625
|
-
if (element.
|
|
628
|
+
if (element.j1p_1.equals(Companion_getInstance().x1g('Method'))) {
|
|
626
629
|
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
630
|
} else {
|
|
628
631
|
tmp_0 = element;
|
|
@@ -639,7 +642,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
639
642
|
var tmp;
|
|
640
643
|
if (element instanceof File) {
|
|
641
644
|
// Inline function 'kotlin.collections.flatMap' call
|
|
642
|
-
var tmp0 = element.
|
|
645
|
+
var tmp0 = element.t1n_1;
|
|
643
646
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
644
647
|
var destination = ArrayList_init_$Create$_0();
|
|
645
648
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -651,30 +654,30 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
651
654
|
tmp$ret$0 = listOf(element_0);
|
|
652
655
|
break $l$block;
|
|
653
656
|
}
|
|
654
|
-
var name = element_0.
|
|
657
|
+
var name = element_0.e1o_1.y1g();
|
|
655
658
|
var tmp_0;
|
|
656
659
|
// Inline function 'kotlin.collections.contains' call
|
|
657
660
|
// Inline function 'kotlin.collections.containsKey' call
|
|
658
661
|
var this_0 = $dslTraits;
|
|
659
|
-
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).
|
|
662
|
+
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).o2(name)) {
|
|
660
663
|
// Inline function 'kotlin.collections.buildList' call
|
|
661
664
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
662
665
|
// Inline function 'kotlin.apply' call
|
|
663
666
|
var this_1 = ArrayList_init_$Create$_0();
|
|
664
|
-
this_1.x(ensureNotNull($dslTraits.
|
|
667
|
+
this_1.x(ensureNotNull($dslTraits.q2(name)));
|
|
665
668
|
if (name === 'Request') {
|
|
666
669
|
this_1.x($requestHeaders);
|
|
667
670
|
}
|
|
668
671
|
if (name === 'Response') {
|
|
669
672
|
this_1.x($responseHeaders);
|
|
670
673
|
}
|
|
671
|
-
tmp_0 = this_1.
|
|
674
|
+
tmp_0 = this_1.p5();
|
|
672
675
|
} else {
|
|
673
676
|
// Inline function 'kotlin.collections.contains' call
|
|
674
677
|
// Inline function 'kotlin.collections.containsKey' call
|
|
675
678
|
var this_2 = $rawElementInterfaces;
|
|
676
|
-
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).
|
|
677
|
-
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.
|
|
679
|
+
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).o2(name)) {
|
|
680
|
+
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.q2(name)));
|
|
678
681
|
} else {
|
|
679
682
|
tmp_0 = listOf(element_0);
|
|
680
683
|
}
|
|
@@ -685,7 +688,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
685
688
|
addAll(destination, list);
|
|
686
689
|
}
|
|
687
690
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
688
|
-
tmp = element.
|
|
691
|
+
tmp = element.w1n(VOID, newElements);
|
|
689
692
|
} else {
|
|
690
693
|
tmp = element;
|
|
691
694
|
}
|
|
@@ -701,14 +704,14 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
701
704
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
702
705
|
var tmp_0 = scope;
|
|
703
706
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
704
|
-
var this_0 = scope.
|
|
707
|
+
var this_0 = scope.q1v_1;
|
|
705
708
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
706
709
|
// Inline function 'kotlin.apply' call
|
|
707
710
|
var this_1 = new TransformerBuilder();
|
|
708
|
-
this_1.
|
|
709
|
-
var tmp$ret$2 = this_1.
|
|
710
|
-
tmp_0.
|
|
711
|
-
var tmp_1 = scope.
|
|
711
|
+
this_1.k1i(RustIrEmitter$emitShared$lambda$lambda_4);
|
|
712
|
+
var tmp$ret$2 = this_1.l1i();
|
|
713
|
+
tmp_0.q1v_1 = transform(this_0, tmp$ret$2);
|
|
714
|
+
var tmp_1 = scope.q1v_1;
|
|
712
715
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
713
716
|
} else {
|
|
714
717
|
tmp = element;
|
|
@@ -719,7 +722,7 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
719
722
|
function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
720
723
|
var tmp;
|
|
721
724
|
if (element instanceof Function_0) {
|
|
722
|
-
var tmp0 = element.
|
|
725
|
+
var tmp0 = element.w1k_1;
|
|
723
726
|
var tmp$ret$0;
|
|
724
727
|
$l$block_0: {
|
|
725
728
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -736,7 +739,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
736
739
|
var _iterator__ex2g4s = tmp0.t();
|
|
737
740
|
while (_iterator__ex2g4s.u()) {
|
|
738
741
|
var element_0 = _iterator__ex2g4s.v();
|
|
739
|
-
if (element_0.
|
|
742
|
+
if (element_0.i1r_1.w1i() === '&self' || element_0.i1r_1.w1i() === 'self') {
|
|
740
743
|
tmp$ret$0 = true;
|
|
741
744
|
break $l$block_0;
|
|
742
745
|
}
|
|
@@ -744,7 +747,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
744
747
|
tmp$ret$0 = false;
|
|
745
748
|
}
|
|
746
749
|
var hasSelf = tmp$ret$0;
|
|
747
|
-
tmp = hasSelf || element.
|
|
750
|
+
tmp = hasSelf || element.a1l_1 ? element : element.f1l(VOID, VOID, plus(listOf(get_rustSelfParam()), element.w1k_1));
|
|
748
751
|
} else {
|
|
749
752
|
tmp = element;
|
|
750
753
|
}
|
|
@@ -755,7 +758,7 @@ function RustIrEmitter$emitShared$lambda_10(group) {
|
|
|
755
758
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
756
759
|
}
|
|
757
760
|
function RustIrEmitter$emitShared$lambda$lambda_5(it) {
|
|
758
|
-
return
|
|
761
|
+
return RustGenerator_getInstance().e1w(it);
|
|
759
762
|
}
|
|
760
763
|
function RustIrEmitter$emit$lambda(a, b) {
|
|
761
764
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -764,7 +767,7 @@ function RustIrEmitter$emit$lambda(a, b) {
|
|
|
764
767
|
return compareValues(tmp, tmp$ret$1);
|
|
765
768
|
}
|
|
766
769
|
function emit$emitMod(this$0, def) {
|
|
767
|
-
return 'pub mod ' + sanitize(this$0, def.
|
|
770
|
+
return 'pub mod ' + sanitize(this$0, def.gr()) + ';';
|
|
768
771
|
}
|
|
769
772
|
function RustIrEmitter$emit$lambda_0(this$0) {
|
|
770
773
|
return function (it) {
|
|
@@ -793,17 +796,17 @@ function RustIrEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs)
|
|
|
793
796
|
var tmp_0;
|
|
794
797
|
var tmp_1;
|
|
795
798
|
if (expr instanceof RawExpression) {
|
|
796
|
-
tmp_1 = endsWith(expr.
|
|
799
|
+
tmp_1 = endsWith(expr.h1q_1, 'Generator');
|
|
797
800
|
} else {
|
|
798
801
|
tmp_1 = false;
|
|
799
802
|
}
|
|
800
803
|
if (tmp_1) {
|
|
801
|
-
tmp_0 = !(expr.
|
|
804
|
+
tmp_0 = !(expr.h1q_1 === $generatorOwnName);
|
|
802
805
|
} else {
|
|
803
806
|
tmp_0 = false;
|
|
804
807
|
}
|
|
805
808
|
if (tmp_0) {
|
|
806
|
-
$generatorRefs.x(expr.
|
|
809
|
+
$generatorRefs.x(expr.h1q_1);
|
|
807
810
|
tmp = Unit_instance;
|
|
808
811
|
}
|
|
809
812
|
return transformChildren_1(expr, t);
|
|
@@ -816,7 +819,7 @@ function RustIrEmitter$emit$lambda_2(this$0) {
|
|
|
816
819
|
}
|
|
817
820
|
function RustIrEmitter$emitClient$lambda(this$0) {
|
|
818
821
|
return function (endpoint) {
|
|
819
|
-
return 'pub mod ' + toSnakeCase(this$0, endpoint.
|
|
822
|
+
return 'pub mod ' + toSnakeCase(this$0, endpoint.eq_1.m1() + 'Client') + ';';
|
|
820
823
|
};
|
|
821
824
|
}
|
|
822
825
|
function RustIrEmitter$toPascalCase$lambda(s) {
|
|
@@ -836,39 +839,39 @@ function RustIrEmitter$toPascalCase$lambda(s) {
|
|
|
836
839
|
}
|
|
837
840
|
function RustIrEmitter$buildClientParams$lambda(this$0) {
|
|
838
841
|
return function (_destruct__k2r9zo) {
|
|
839
|
-
var name = _destruct__k2r9zo.
|
|
840
|
-
return sanitizeKeywords(this$0, name.
|
|
842
|
+
var name = _destruct__k2r9zo.we();
|
|
843
|
+
return sanitizeKeywords(this$0, name.p1m());
|
|
841
844
|
};
|
|
842
845
|
}
|
|
843
846
|
function RustIrEmitter$buildClientParams$lambda_0(this$0) {
|
|
844
847
|
return function (_destruct__k2r9zo) {
|
|
845
|
-
var name = _destruct__k2r9zo.
|
|
846
|
-
var type = _destruct__k2r9zo.
|
|
847
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
848
|
+
var name = _destruct__k2r9zo.we();
|
|
849
|
+
var type = _destruct__k2r9zo.xe();
|
|
850
|
+
var tmp = sanitizeKeywords(this$0, name.p1m());
|
|
848
851
|
// Inline function 'kotlin.with' call
|
|
849
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
852
|
+
return tmp + ': ' + RustTransform_getInstance().x1y(type);
|
|
850
853
|
};
|
|
851
854
|
}
|
|
852
855
|
function RustIrEmitter(packageName, emitShared) {
|
|
853
856
|
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.
|
|
857
|
+
packageName = packageName === VOID ? Companion_instance_0.bs('community.flock.wirespec.generated') : packageName;
|
|
858
|
+
emitShared = emitShared === VOID ? Companion_instance_1.fp() : emitShared;
|
|
859
|
+
this.j1y_1 = packageName;
|
|
860
|
+
this.k1y_1 = emitShared;
|
|
861
|
+
this.l1y_1 = RustGenerator_getInstance();
|
|
862
|
+
this.m1y_1 = FileExtension_Rust_getInstance();
|
|
860
863
|
var tmp = this;
|
|
861
|
-
tmp.
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
864
|
+
tmp.n1y_1 = lazy(RustIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
865
|
+
this.o1y_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
866
|
+
this.p1y_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
864
867
|
}
|
|
865
|
-
protoOf(RustIrEmitter).
|
|
866
|
-
return this.
|
|
868
|
+
protoOf(RustIrEmitter).d1w = function () {
|
|
869
|
+
return this.l1y_1;
|
|
867
870
|
};
|
|
868
|
-
protoOf(RustIrEmitter).
|
|
869
|
-
return this.
|
|
871
|
+
protoOf(RustIrEmitter).er = function () {
|
|
872
|
+
return this.m1y_1;
|
|
870
873
|
};
|
|
871
|
-
protoOf(RustIrEmitter).
|
|
874
|
+
protoOf(RustIrEmitter).h1w = function () {
|
|
872
875
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
873
876
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustIrEmitter$emitShared$lambda);
|
|
874
877
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustIrEmitter$emitShared$lambda_0);
|
|
@@ -882,43 +885,43 @@ protoOf(RustIrEmitter).a1w = function () {
|
|
|
882
885
|
var transportationTrait = interface_0('Transportation', VOID, RustIrEmitter$emitShared$lambda_5);
|
|
883
886
|
var dslTraits = mapOf([to('Enum', enumTrait), to('Refined', refinedTrait), to('Request', requestTrait), to('Response', responseTrait), to('Transportation', transportationTrait)]);
|
|
884
887
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
885
|
-
var this_0 = convert(Companion_instance_0.
|
|
888
|
+
var this_0 = convert(Companion_instance_0.bs('shared'));
|
|
886
889
|
var scope = new TransformScope(this_0);
|
|
887
890
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
888
891
|
var tmp = scope;
|
|
889
892
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
890
|
-
var this_1 = scope.
|
|
893
|
+
var this_1 = scope.q1v_1;
|
|
891
894
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
892
895
|
// Inline function 'kotlin.apply' call
|
|
893
896
|
var this_2 = new TransformerBuilder();
|
|
894
|
-
this_2.
|
|
895
|
-
var tmp$ret$2 = this_2.
|
|
896
|
-
tmp.
|
|
897
|
+
this_2.k1i(RustIrEmitter$emitShared$lambda_6(rustImports));
|
|
898
|
+
var tmp$ret$2 = this_2.l1i();
|
|
899
|
+
tmp.q1v_1 = transform(this_1, tmp$ret$2);
|
|
897
900
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
898
901
|
var tmp_0 = scope;
|
|
899
902
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
900
|
-
var this_3 = scope.
|
|
903
|
+
var this_3 = scope.q1v_1;
|
|
901
904
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
902
905
|
// Inline function 'kotlin.apply' call
|
|
903
906
|
var this_4 = new TransformerBuilder();
|
|
904
|
-
this_4.
|
|
905
|
-
var tmp$ret$7 = this_4.
|
|
906
|
-
tmp_0.
|
|
907
|
+
this_4.k1i(RustIrEmitter$emitShared$lambda_7);
|
|
908
|
+
var tmp$ret$7 = this_4.l1i();
|
|
909
|
+
tmp_0.q1v_1 = transform(this_3, tmp$ret$7);
|
|
907
910
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
908
911
|
var tmp_1 = scope;
|
|
909
912
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
910
|
-
var this_5 = scope.
|
|
913
|
+
var this_5 = scope.q1v_1;
|
|
911
914
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
912
915
|
// Inline function 'kotlin.apply' call
|
|
913
916
|
var this_6 = new TransformerBuilder();
|
|
914
|
-
this_6.
|
|
915
|
-
var tmp$ret$12 = this_6.
|
|
916
|
-
tmp_1.
|
|
917
|
-
var tmp_2 = scope.
|
|
917
|
+
this_6.k1i(RustIrEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
918
|
+
var tmp$ret$12 = this_6.l1i();
|
|
919
|
+
tmp_1.q1v_1 = transform(this_5, tmp$ret$12);
|
|
920
|
+
var tmp_2 = scope.q1v_1;
|
|
918
921
|
// Inline function 'kotlin.let' call
|
|
919
922
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
920
923
|
// Inline function 'kotlin.collections.flatMap' call
|
|
921
|
-
var tmp0 = file.
|
|
924
|
+
var tmp0 = file.t1n_1;
|
|
922
925
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
923
926
|
var destination = ArrayList_init_$Create$_0();
|
|
924
927
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -948,7 +951,7 @@ protoOf(RustIrEmitter).a1w = function () {
|
|
|
948
951
|
var _iterator__ex2g4s_0 = structFields.t();
|
|
949
952
|
while (_iterator__ex2g4s_0.u()) {
|
|
950
953
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
951
|
-
if (containsUnderiveable(this, element_0.
|
|
954
|
+
if (containsUnderiveable(this, element_0.o1o_1)) {
|
|
952
955
|
tmp$ret$18 = true;
|
|
953
956
|
break $l$block_1;
|
|
954
957
|
}
|
|
@@ -974,7 +977,7 @@ protoOf(RustIrEmitter).a1w = function () {
|
|
|
974
977
|
var _iterator__ex2g4s_1 = structFields.t();
|
|
975
978
|
while (_iterator__ex2g4s_1.u()) {
|
|
976
979
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
977
|
-
if (containsWildcard(this, element_1.
|
|
980
|
+
if (containsWildcard(this, element_1.o1o_1)) {
|
|
978
981
|
tmp$ret$20 = true;
|
|
979
982
|
break $l$block_3;
|
|
980
983
|
}
|
|
@@ -984,7 +987,7 @@ protoOf(RustIrEmitter).a1w = function () {
|
|
|
984
987
|
if (tmp$ret$20) {
|
|
985
988
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
986
989
|
} else {
|
|
987
|
-
if (setOf(['RawRequest', 'RawResponse']).
|
|
990
|
+
if (setOf(['RawRequest', 'RawResponse']).v1(element.s1p_1.y1g())) {
|
|
988
991
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
989
992
|
} else {
|
|
990
993
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -1000,29 +1003,29 @@ protoOf(RustIrEmitter).a1w = function () {
|
|
|
1000
1003
|
tmp_6 = listOf(new RawElement(derive));
|
|
1001
1004
|
}
|
|
1002
1005
|
var prefix = tmp_6;
|
|
1003
|
-
tmp$ret$17 = listOf(new File(element.
|
|
1006
|
+
tmp$ret$17 = listOf(new File(element.s1p_1, plus_0(prefix, element)));
|
|
1004
1007
|
}
|
|
1005
1008
|
var list = tmp$ret$17;
|
|
1006
1009
|
addAll(destination, list);
|
|
1007
1010
|
}
|
|
1008
|
-
var tmp0_0 = new File(file.
|
|
1011
|
+
var tmp0_0 = new File(file.s1n_1, destination);
|
|
1009
1012
|
// Inline function 'kotlin.let' call
|
|
1010
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1013
|
+
var wirespecFile = RustTransform_getInstance().y1y(tmp0_0);
|
|
1011
1014
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1012
1015
|
var scope_0 = new TransformScope(wirespecFile);
|
|
1013
1016
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1014
1017
|
var tmp_7 = scope_0;
|
|
1015
1018
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1016
|
-
var this_7 = scope_0.
|
|
1019
|
+
var this_7 = scope_0.q1v_1;
|
|
1017
1020
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1018
1021
|
// Inline function 'kotlin.apply' call
|
|
1019
1022
|
var this_8 = new TransformerBuilder();
|
|
1020
|
-
this_8.
|
|
1021
|
-
var tmp$ret$31 = this_8.
|
|
1022
|
-
tmp_7.
|
|
1023
|
-
var tmp_8 = scope_0.
|
|
1023
|
+
this_8.k1i(RustIrEmitter$emitShared$lambda_9);
|
|
1024
|
+
var tmp$ret$31 = this_8.l1i();
|
|
1025
|
+
tmp_7.q1v_1 = transform(this_7, tmp$ret$31);
|
|
1026
|
+
var tmp_8 = scope_0.q1v_1;
|
|
1024
1027
|
// Inline function 'kotlin.let' call
|
|
1025
|
-
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1028
|
+
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).t1n_1;
|
|
1026
1029
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1027
1030
|
// Inline function 'kotlin.collections.fold' call
|
|
1028
1031
|
var accumulator = ArrayList_init_$Create$_0();
|
|
@@ -1043,26 +1046,26 @@ protoOf(RustIrEmitter).a1w = function () {
|
|
|
1043
1046
|
var groups = accumulator;
|
|
1044
1047
|
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda_10) + '\n';
|
|
1045
1048
|
var tmp_10;
|
|
1046
|
-
if (this.
|
|
1047
|
-
tmp_10 = new File(Companion_getInstance().
|
|
1049
|
+
if (this.k1y_1.gp_1) {
|
|
1050
|
+
tmp_10 = new File(Companion_getInstance().x1g(this.j1y_1.es() + 'wirespec'), listOf(new RawElement(source)));
|
|
1048
1051
|
} else {
|
|
1049
1052
|
tmp_10 = null;
|
|
1050
1053
|
}
|
|
1051
1054
|
return tmp_10;
|
|
1052
1055
|
};
|
|
1053
|
-
protoOf(RustIrEmitter).
|
|
1056
|
+
protoOf(RustIrEmitter).g1w = function (module_0, logger) {
|
|
1054
1057
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1055
|
-
var this_0 = new NonEmptyList(module_0.
|
|
1058
|
+
var this_0 = new NonEmptyList(module_0.ar_1);
|
|
1056
1059
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
1057
1060
|
var tmp = RustIrEmitter$emit$lambda;
|
|
1058
1061
|
var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);
|
|
1059
1062
|
var tmp$ret$1 = sortedWith(this_0, tmp$ret$0);
|
|
1060
1063
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$1);
|
|
1061
|
-
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).
|
|
1064
|
+
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).xm_1;
|
|
1062
1065
|
// Inline function 'kotlin.let' call
|
|
1063
|
-
var files = emit.call(this, module_0.
|
|
1066
|
+
var files = emit.call(this, module_0.lv(VOID, statements), logger);
|
|
1064
1067
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1065
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
1068
|
+
var tmp0 = new NonEmptyList(module_0.ar_1);
|
|
1066
1069
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1067
1070
|
var destination = ArrayList_init_$Create$_0();
|
|
1068
1071
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1082,11 +1085,11 @@ protoOf(RustIrEmitter).z1v = function (module_0, logger) {
|
|
|
1082
1085
|
tmp_1 = '';
|
|
1083
1086
|
}
|
|
1084
1087
|
var clientMod = tmp_1;
|
|
1085
|
-
var modRs = new File(Companion_getInstance().
|
|
1086
|
-
var modEndpoint = new File(Companion_getInstance().
|
|
1087
|
-
var tmp_2 = Companion_getInstance().
|
|
1088
|
+
var modRs = new File(Companion_getInstance().x1g(this.j1y_1.es() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1089
|
+
var modEndpoint = new File(Companion_getInstance().x1g(this.j1y_1.es() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1090
|
+
var tmp_2 = Companion_getInstance().x1g(this.j1y_1.es() + 'model/' + 'mod');
|
|
1088
1091
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1089
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
1092
|
+
var tmp0_0 = new NonEmptyList(module_0.ar_1);
|
|
1090
1093
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1091
1094
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1092
1095
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1098,23 +1101,23 @@ protoOf(RustIrEmitter).z1v = function (module_0, logger) {
|
|
|
1098
1101
|
}
|
|
1099
1102
|
var tmp_3 = destination_0;
|
|
1100
1103
|
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.
|
|
1104
|
+
return this.k1y_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
1105
|
};
|
|
1103
|
-
protoOf(RustIrEmitter).
|
|
1104
|
-
var subPackageName = plus_1(this.
|
|
1106
|
+
protoOf(RustIrEmitter).fr = function (definition, module_0, logger) {
|
|
1107
|
+
var subPackageName = plus_1(this.j1y_1, definition);
|
|
1105
1108
|
var tmp;
|
|
1106
1109
|
if (definition instanceof Endpoint) {
|
|
1107
|
-
tmp = this.
|
|
1110
|
+
tmp = this.p1y_1;
|
|
1108
1111
|
} else {
|
|
1109
|
-
tmp = this.
|
|
1112
|
+
tmp = this.o1y_1;
|
|
1110
1113
|
}
|
|
1111
1114
|
var importHeader = tmp;
|
|
1112
1115
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1113
1116
|
// Inline function 'kotlin.let' call
|
|
1114
|
-
var file = RustTransform_getInstance().
|
|
1115
|
-
var tmp_0 = Companion_getInstance().
|
|
1117
|
+
var file = RustTransform_getInstance().y1y(tmp0);
|
|
1118
|
+
var tmp_0 = Companion_getInstance().x1g(subPackageName.es() + toSnakeCase(this, file.s1n_1.y1g()));
|
|
1116
1119
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1117
|
-
var tmp0_0 = file.
|
|
1120
|
+
var tmp0_0 = file.t1n_1;
|
|
1118
1121
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1119
1122
|
var destination = ArrayList_init_$Create$_0();
|
|
1120
1123
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1131,7 +1134,7 @@ protoOf(RustIrEmitter).mr = function (definition, module_0, logger) {
|
|
|
1131
1134
|
}
|
|
1132
1135
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1133
1136
|
};
|
|
1134
|
-
protoOf(RustIrEmitter).
|
|
1137
|
+
protoOf(RustIrEmitter).m1w = function (definition, module_0) {
|
|
1135
1138
|
var tmp;
|
|
1136
1139
|
if (definition instanceof Type) {
|
|
1137
1140
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1151,7 +1154,7 @@ protoOf(RustIrEmitter).f1w = function (definition, module_0) {
|
|
|
1151
1154
|
}
|
|
1152
1155
|
}
|
|
1153
1156
|
var generatorFile = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
|
|
1154
|
-
var generatorOwnName = definition.
|
|
1157
|
+
var generatorOwnName = definition.gr().m1() + 'Generator';
|
|
1155
1158
|
var tmp_0 = asSequence(collectCustomTypeNames(generatorFile));
|
|
1156
1159
|
var tmp_1 = filterNot(tmp_0, RustIrEmitter$emitGenerator$lambda);
|
|
1157
1160
|
var tmp_2 = filterNot(tmp_1, RustIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -1160,8 +1163,8 @@ protoOf(RustIrEmitter).f1w = function (definition, module_0) {
|
|
|
1160
1163
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1161
1164
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1162
1165
|
var scope = new TransformScope(generatorFile);
|
|
1163
|
-
scope.
|
|
1164
|
-
var tmp_3 = scope.
|
|
1166
|
+
scope.y1v(RustIrEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1167
|
+
var tmp_3 = scope.q1v_1;
|
|
1165
1168
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1166
1169
|
// Inline function 'kotlin.collections.filter' call
|
|
1167
1170
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1204,58 +1207,58 @@ protoOf(RustIrEmitter).f1w = function (definition, module_0) {
|
|
|
1204
1207
|
destination_2.x(tmp$ret$12);
|
|
1205
1208
|
}
|
|
1206
1209
|
var typeImports = destination_2;
|
|
1207
|
-
var subPackageName = plus_2(this.
|
|
1208
|
-
return new File(Companion_getInstance().
|
|
1210
|
+
var subPackageName = plus_2(this.j1y_1, 'generator');
|
|
1211
|
+
return new File(Companion_getInstance().x1g(subPackageName.es() + toSnakeCase(this, generatorFile.s1n_1.y1g())), plus(plus(plus(this.o1y_1, typeImports), generatorImports), generatorFile.t1n_1));
|
|
1209
1212
|
};
|
|
1210
|
-
protoOf(RustIrEmitter).
|
|
1213
|
+
protoOf(RustIrEmitter).vr = function (type, module_0) {
|
|
1211
1214
|
var tmp = convertWithValidation(type, module_0);
|
|
1212
1215
|
// Inline function 'kotlin.collections.map' call
|
|
1213
|
-
var this_0 = type.
|
|
1216
|
+
var this_0 = type.wp_1.sp_1;
|
|
1214
1217
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1215
1218
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1216
1219
|
var _iterator__ex2g4s = this_0.t();
|
|
1217
1220
|
while (_iterator__ex2g4s.u()) {
|
|
1218
1221
|
var item = _iterator__ex2g4s.v();
|
|
1219
|
-
var tmp$ret$0 = item.
|
|
1222
|
+
var tmp$ret$0 = item.aq_1.m1();
|
|
1220
1223
|
destination.x(tmp$ret$0);
|
|
1221
1224
|
}
|
|
1222
1225
|
return prependImports(this, sanitizeNames(injectSelfReceiverToValidate(tmp, toSet(destination), '&self'), _get_sanitizationConfig__sns434(this)), buildModelImports(type));
|
|
1223
1226
|
};
|
|
1224
|
-
protoOf(RustIrEmitter).
|
|
1227
|
+
protoOf(RustIrEmitter).tr = function (enum_0, module_0) {
|
|
1225
1228
|
var tmp = convert_0(enum_0);
|
|
1226
1229
|
return sanitizeEnumEntries(tmp, RustIrEmitter$emit$lambda_2(this));
|
|
1227
1230
|
};
|
|
1228
|
-
protoOf(RustIrEmitter).
|
|
1231
|
+
protoOf(RustIrEmitter).jr = function (union) {
|
|
1229
1232
|
return convert_1(union);
|
|
1230
1233
|
};
|
|
1231
|
-
protoOf(RustIrEmitter).
|
|
1234
|
+
protoOf(RustIrEmitter).or = function (refined) {
|
|
1232
1235
|
return replaceStructWithRefinedFunctions(convert_2(refined), refined);
|
|
1233
1236
|
};
|
|
1234
|
-
protoOf(RustIrEmitter).
|
|
1237
|
+
protoOf(RustIrEmitter).ur = function (endpoint) {
|
|
1235
1238
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1236
1239
|
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_3(endpoint))))));
|
|
1237
1240
|
var scope = new TransformScope(this_0);
|
|
1238
|
-
scope.
|
|
1239
|
-
var tmp = scope.
|
|
1241
|
+
scope.v1v(fixResponseSwitchPatterns());
|
|
1242
|
+
var tmp = scope.q1v_1;
|
|
1240
1243
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1241
1244
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1242
1245
|
var scope_0 = new TransformScope(this_1);
|
|
1243
|
-
scope_0.
|
|
1244
|
-
var tmp_0 = scope_0.
|
|
1246
|
+
scope_0.v1v(fixConstructorCalls());
|
|
1247
|
+
var tmp_0 = scope_0.q1v_1;
|
|
1245
1248
|
var tmp$ret$3 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1246
|
-
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$3)
|
|
1249
|
+
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$3))), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1247
1250
|
};
|
|
1248
|
-
protoOf(RustIrEmitter).
|
|
1251
|
+
protoOf(RustIrEmitter).ir = function (channel) {
|
|
1249
1252
|
return convert_4(channel);
|
|
1250
1253
|
};
|
|
1251
|
-
protoOf(RustIrEmitter).
|
|
1252
|
-
var endpointName = endpoint.
|
|
1254
|
+
protoOf(RustIrEmitter).l1w = function (endpoint) {
|
|
1255
|
+
var endpointName = endpoint.eq_1.m1();
|
|
1253
1256
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1254
1257
|
var clientName = endpointName + 'Client';
|
|
1255
1258
|
var methodName = toSnakeCase(this, endpointName);
|
|
1256
1259
|
var _destruct__k2r9zo = buildClientParams(this, endpoint);
|
|
1257
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1258
|
-
var requestArgs = _destruct__k2r9zo.
|
|
1260
|
+
var paramsStr = _destruct__k2r9zo.we();
|
|
1261
|
+
var requestArgs = _destruct__k2r9zo.xe();
|
|
1259
1262
|
var requestConstruction = endpointModuleName + '::Request::new(' + requestArgs + ')';
|
|
1260
1263
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1261
1264
|
var this_0 = importReferences(endpoint);
|
|
@@ -1264,7 +1267,7 @@ protoOf(RustIrEmitter).e1w = function (endpoint) {
|
|
|
1264
1267
|
var _iterator__ex2g4s = this_0.t();
|
|
1265
1268
|
while (_iterator__ex2g4s.u()) {
|
|
1266
1269
|
var e = _iterator__ex2g4s.v();
|
|
1267
|
-
var key = e.
|
|
1270
|
+
var key = e.dv_1;
|
|
1268
1271
|
if (set.x(key)) {
|
|
1269
1272
|
list.x(e);
|
|
1270
1273
|
}
|
|
@@ -1275,7 +1278,7 @@ protoOf(RustIrEmitter).e1w = function (endpoint) {
|
|
|
1275
1278
|
var _iterator__ex2g4s_0 = list.t();
|
|
1276
1279
|
while (_iterator__ex2g4s_0.u()) {
|
|
1277
1280
|
var item = _iterator__ex2g4s_0.v();
|
|
1278
|
-
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1281
|
+
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.dv_1), item.dv_1);
|
|
1279
1282
|
destination.x(tmp$ret$2);
|
|
1280
1283
|
}
|
|
1281
1284
|
var modelImports = destination;
|
|
@@ -1296,23 +1299,23 @@ protoOf(RustIrEmitter).e1w = function (endpoint) {
|
|
|
1296
1299
|
this_1.x(' ' + namespacePath + '::from_raw_response(self.serialization, raw_response)');
|
|
1297
1300
|
this_1.x(' }');
|
|
1298
1301
|
this_1.x('}');
|
|
1299
|
-
var tmp$ret$8 = this_1.
|
|
1302
|
+
var tmp$ret$8 = this_1.p5();
|
|
1300
1303
|
var code = joinToString(tmp$ret$8, '\n');
|
|
1301
|
-
var subPackageName = plus_2(this.
|
|
1302
|
-
var tmp = Companion_getInstance().
|
|
1304
|
+
var subPackageName = plus_2(this.j1y_1, 'client');
|
|
1305
|
+
var tmp = Companion_getInstance().x1g(subPackageName.es() + toSnakeCase(this, clientName));
|
|
1303
1306
|
// Inline function 'kotlin.collections.buildList' call
|
|
1304
1307
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1305
1308
|
// Inline function 'kotlin.apply' call
|
|
1306
1309
|
var this_2 = ArrayList_init_$Create$_0();
|
|
1307
1310
|
this_2.x(import_0('super::super::wirespec', '*'));
|
|
1308
1311
|
this_2.x(import_0('super::super::endpoint', endpointModuleName));
|
|
1309
|
-
this_2.
|
|
1312
|
+
this_2.g1(modelImports);
|
|
1310
1313
|
this_2.x(new RawElement(code));
|
|
1311
|
-
var tmp$ret$12 = this_2.
|
|
1314
|
+
var tmp$ret$12 = this_2.p5();
|
|
1312
1315
|
return new File(tmp, tmp$ret$12);
|
|
1313
1316
|
};
|
|
1314
|
-
protoOf(RustIrEmitter).
|
|
1315
|
-
logger.
|
|
1317
|
+
protoOf(RustIrEmitter).i1w = function (endpoints, logger) {
|
|
1318
|
+
logger.cr('Emitting main Client for ' + endpoints.b1() + ' endpoints');
|
|
1316
1319
|
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitClient$lambda(this));
|
|
1317
1320
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1318
1321
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
@@ -1329,7 +1332,7 @@ protoOf(RustIrEmitter).b1w = function (endpoints, logger) {
|
|
|
1329
1332
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1330
1333
|
while (_iterator__ex2g4s_0.u()) {
|
|
1331
1334
|
var e = _iterator__ex2g4s_0.v();
|
|
1332
|
-
var key = e.
|
|
1335
|
+
var key = e.dv_1;
|
|
1333
1336
|
if (set.x(key)) {
|
|
1334
1337
|
list_0.x(e);
|
|
1335
1338
|
}
|
|
@@ -1356,7 +1359,7 @@ protoOf(RustIrEmitter).b1w = function (endpoints, logger) {
|
|
|
1356
1359
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1357
1360
|
while (_iterator__ex2g4s_2.u()) {
|
|
1358
1361
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1359
|
-
if (element_1.
|
|
1362
|
+
if (element_1.eq_1.m1() === element_0.dv_1) {
|
|
1360
1363
|
tmp$ret$5 = false;
|
|
1361
1364
|
break $l$block_0;
|
|
1362
1365
|
}
|
|
@@ -1373,7 +1376,7 @@ protoOf(RustIrEmitter).b1w = function (endpoints, logger) {
|
|
|
1373
1376
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1374
1377
|
while (_iterator__ex2g4s_3.u()) {
|
|
1375
1378
|
var item = _iterator__ex2g4s_3.v();
|
|
1376
|
-
var tmp$ret$10 = import_0('super::model::' + toSnakeCase(this, item.
|
|
1379
|
+
var tmp$ret$10 = import_0('super::model::' + toSnakeCase(this, item.dv_1), item.dv_1);
|
|
1377
1380
|
destination_1.x(tmp$ret$10);
|
|
1378
1381
|
}
|
|
1379
1382
|
var modelImports = destination_1;
|
|
@@ -1383,9 +1386,9 @@ protoOf(RustIrEmitter).b1w = function (endpoints, logger) {
|
|
|
1383
1386
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1384
1387
|
while (_iterator__ex2g4s_4.u()) {
|
|
1385
1388
|
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.
|
|
1389
|
+
var endpointModuleName = toSnakeCase(this, element_2.eq_1.m1());
|
|
1390
|
+
var clientModuleName = toSnakeCase(this, element_2.eq_1.m1() + 'Client');
|
|
1391
|
+
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.eq_1.m1() + 'Client')]);
|
|
1389
1392
|
addAll(destination_2, list_1);
|
|
1390
1393
|
}
|
|
1391
1394
|
var endpointAndClientImports = destination_2;
|
|
@@ -1395,30 +1398,30 @@ protoOf(RustIrEmitter).b1w = function (endpoints, logger) {
|
|
|
1395
1398
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1396
1399
|
while (_iterator__ex2g4s_5.u()) {
|
|
1397
1400
|
var element_3 = _iterator__ex2g4s_5.v();
|
|
1398
|
-
var endpointName = element_3.
|
|
1401
|
+
var endpointName = element_3.eq_1.m1();
|
|
1399
1402
|
var endpointModuleName_0 = toSnakeCase(this, endpointName);
|
|
1400
1403
|
var namespacePath = endpointModuleName_0 + '::' + endpointName;
|
|
1401
1404
|
var methodName = toSnakeCase(this, endpointName);
|
|
1402
1405
|
var _destruct__k2r9zo = buildClientParams(this, element_3);
|
|
1403
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1404
|
-
var callArgs = _destruct__k2r9zo.
|
|
1406
|
+
var paramsStr = _destruct__k2r9zo.we();
|
|
1407
|
+
var callArgs = _destruct__k2r9zo.xe();
|
|
1405
1408
|
var delegateCall = endpointName + 'Client { serialization: &self.serialization, transportation: &self.transportation }\n' + (' .' + methodName + '(' + callArgs + ').await');
|
|
1406
1409
|
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
1410
|
addAll(destination_3, list_2);
|
|
1408
1411
|
}
|
|
1409
1412
|
var implBlocks = destination_3;
|
|
1410
1413
|
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().
|
|
1414
|
+
var tmp_0 = Companion_getInstance().x1g(this.j1y_1.es() + 'client');
|
|
1412
1415
|
// Inline function 'kotlin.collections.buildList' call
|
|
1413
1416
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1414
1417
|
// Inline function 'kotlin.apply' call
|
|
1415
1418
|
var this_0 = ArrayList_init_$Create$_0();
|
|
1416
1419
|
this_0.x(new RawElement(modDeclarations));
|
|
1417
1420
|
this_0.x(import_0('super::wirespec', '*'));
|
|
1418
|
-
this_0.
|
|
1419
|
-
this_0.
|
|
1421
|
+
this_0.g1(modelImports);
|
|
1422
|
+
this_0.g1(endpointAndClientImports);
|
|
1420
1423
|
this_0.x(new RawElement(code));
|
|
1421
|
-
var tmp$ret$22 = this_0.
|
|
1424
|
+
var tmp$ret$22 = this_0.p5();
|
|
1422
1425
|
return new File(tmp_0, tmp$ret$22);
|
|
1423
1426
|
};
|
|
1424
1427
|
function get_rustSelfParam() {
|
|
@@ -1436,8 +1439,8 @@ function fixResponseSwitchPatterns() {
|
|
|
1436
1439
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1437
1440
|
// Inline function 'kotlin.apply' call
|
|
1438
1441
|
var this_0 = new TransformerBuilder();
|
|
1439
|
-
this_0.
|
|
1440
|
-
return this_0.
|
|
1442
|
+
this_0.x1v(fixResponseSwitchPatterns$lambda);
|
|
1443
|
+
return this_0.l1i();
|
|
1441
1444
|
}
|
|
1442
1445
|
function buildModelImports(_this__u8e3s4) {
|
|
1443
1446
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1448,7 +1451,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1448
1451
|
var _iterator__ex2g4s = this_0.t();
|
|
1449
1452
|
while (_iterator__ex2g4s.u()) {
|
|
1450
1453
|
var e = _iterator__ex2g4s.v();
|
|
1451
|
-
var key = e.
|
|
1454
|
+
var key = e.dv_1;
|
|
1452
1455
|
if (set.x(key)) {
|
|
1453
1456
|
list.x(e);
|
|
1454
1457
|
}
|
|
@@ -1459,7 +1462,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1459
1462
|
var _iterator__ex2g4s_0 = list.t();
|
|
1460
1463
|
while (_iterator__ex2g4s_0.u()) {
|
|
1461
1464
|
var item = _iterator__ex2g4s_0.v();
|
|
1462
|
-
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.
|
|
1465
|
+
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.dv_1), Companion_getInstance().x1g(item.dv_1).y1g());
|
|
1463
1466
|
destination.x(tmp$ret$2);
|
|
1464
1467
|
}
|
|
1465
1468
|
return destination;
|
|
@@ -1471,14 +1474,14 @@ function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
1471
1474
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1472
1475
|
var tmp = scope;
|
|
1473
1476
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1474
|
-
var this_0 = scope.
|
|
1477
|
+
var this_0 = scope.q1v_1;
|
|
1475
1478
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1476
1479
|
// Inline function 'kotlin.apply' call
|
|
1477
1480
|
var this_1 = new TransformerBuilder();
|
|
1478
|
-
this_1.
|
|
1479
|
-
var tmp$ret$2 = this_1.
|
|
1480
|
-
tmp.
|
|
1481
|
-
var tmp_0 = scope.
|
|
1481
|
+
this_1.k1i(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1482
|
+
var tmp$ret$2 = this_1.l1i();
|
|
1483
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
1484
|
+
var tmp_0 = scope.q1v_1;
|
|
1482
1485
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1483
1486
|
}
|
|
1484
1487
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
@@ -1488,14 +1491,14 @@ function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
|
1488
1491
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1489
1492
|
var tmp = scope;
|
|
1490
1493
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1491
|
-
var this_0 = scope.
|
|
1494
|
+
var this_0 = scope.q1v_1;
|
|
1492
1495
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1493
1496
|
// Inline function 'kotlin.apply' call
|
|
1494
1497
|
var this_1 = new TransformerBuilder();
|
|
1495
|
-
this_1.
|
|
1496
|
-
var tmp$ret$2 = this_1.
|
|
1497
|
-
tmp.
|
|
1498
|
-
var tmp_0 = scope.
|
|
1498
|
+
this_1.k1i(injectApiStruct$lambda(endpoint));
|
|
1499
|
+
var tmp$ret$2 = this_1.l1i();
|
|
1500
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
1501
|
+
var tmp_0 = scope.q1v_1;
|
|
1499
1502
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1500
1503
|
}
|
|
1501
1504
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
@@ -1505,31 +1508,31 @@ function injectResponseFromImpls(_this__u8e3s4) {
|
|
|
1505
1508
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1506
1509
|
var tmp = scope;
|
|
1507
1510
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1508
|
-
var this_0 = scope.
|
|
1511
|
+
var this_0 = scope.q1v_1;
|
|
1509
1512
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1510
1513
|
// Inline function 'kotlin.apply' call
|
|
1511
1514
|
var this_1 = new TransformerBuilder();
|
|
1512
|
-
this_1.
|
|
1513
|
-
var tmp$ret$2 = this_1.
|
|
1514
|
-
tmp.
|
|
1515
|
-
var tmp_0 = scope.
|
|
1515
|
+
this_1.k1i(injectResponseFromImpls$lambda);
|
|
1516
|
+
var tmp$ret$2 = this_1.l1i();
|
|
1517
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
1518
|
+
var tmp_0 = scope.q1v_1;
|
|
1516
1519
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1517
1520
|
}
|
|
1518
|
-
function injectHandlerImplForClient(_this__u8e3s4
|
|
1521
|
+
function injectHandlerImplForClient(_this__u8e3s4) {
|
|
1519
1522
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1520
1523
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1521
1524
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1522
1525
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1523
1526
|
var tmp = scope;
|
|
1524
1527
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1525
|
-
var this_0 = scope.
|
|
1528
|
+
var this_0 = scope.q1v_1;
|
|
1526
1529
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1527
1530
|
// Inline function 'kotlin.apply' call
|
|
1528
1531
|
var this_1 = new TransformerBuilder();
|
|
1529
|
-
this_1.
|
|
1530
|
-
var tmp$ret$2 = this_1.
|
|
1531
|
-
tmp.
|
|
1532
|
-
var tmp_0 = scope.
|
|
1532
|
+
this_1.k1i(injectHandlerImplForClient$lambda);
|
|
1533
|
+
var tmp$ret$2 = this_1.l1i();
|
|
1534
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
1535
|
+
var tmp_0 = scope.q1v_1;
|
|
1533
1536
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1534
1537
|
}
|
|
1535
1538
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
@@ -1539,14 +1542,14 @@ function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
|
1539
1542
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1540
1543
|
var tmp = scope;
|
|
1541
1544
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1542
|
-
var this_0 = scope.
|
|
1545
|
+
var this_0 = scope.q1v_1;
|
|
1543
1546
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1544
1547
|
// Inline function 'kotlin.apply' call
|
|
1545
1548
|
var this_1 = new TransformerBuilder();
|
|
1546
|
-
this_1.
|
|
1547
|
-
var tmp$ret$2 = this_1.
|
|
1548
|
-
tmp.
|
|
1549
|
-
var tmp_0 = scope.
|
|
1549
|
+
this_1.k1i(injectSelfToHandlerMethods$lambda);
|
|
1550
|
+
var tmp$ret$2 = this_1.l1i();
|
|
1551
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
1552
|
+
var tmp_0 = scope.q1v_1;
|
|
1550
1553
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1551
1554
|
}
|
|
1552
1555
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
@@ -1556,14 +1559,14 @@ function stripResponseGenerics(_this__u8e3s4) {
|
|
|
1556
1559
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1557
1560
|
var tmp = scope;
|
|
1558
1561
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1559
|
-
var this_0 = scope.
|
|
1562
|
+
var this_0 = scope.q1v_1;
|
|
1560
1563
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1561
1564
|
// Inline function 'kotlin.apply' call
|
|
1562
1565
|
var this_1 = new TransformerBuilder();
|
|
1563
|
-
this_1.
|
|
1564
|
-
var tmp$ret$2 = this_1.
|
|
1565
|
-
tmp.
|
|
1566
|
-
var tmp_0 = scope.
|
|
1566
|
+
this_1.w1v(stripResponseGenerics$lambda);
|
|
1567
|
+
var tmp$ret$2 = this_1.l1i();
|
|
1568
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
1569
|
+
var tmp_0 = scope.q1v_1;
|
|
1567
1570
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1568
1571
|
}
|
|
1569
1572
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
@@ -1573,14 +1576,14 @@ function stripHandlerExtends(_this__u8e3s4) {
|
|
|
1573
1576
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1574
1577
|
var tmp = scope;
|
|
1575
1578
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1576
|
-
var this_0 = scope.
|
|
1579
|
+
var this_0 = scope.q1v_1;
|
|
1577
1580
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1578
1581
|
// Inline function 'kotlin.apply' call
|
|
1579
1582
|
var this_1 = new TransformerBuilder();
|
|
1580
|
-
this_1.
|
|
1581
|
-
var tmp$ret$2 = this_1.
|
|
1582
|
-
tmp.
|
|
1583
|
-
var tmp_0 = scope.
|
|
1583
|
+
this_1.k1i(stripHandlerExtends$lambda);
|
|
1584
|
+
var tmp$ret$2 = this_1.l1i();
|
|
1585
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
1586
|
+
var tmp_0 = scope.q1v_1;
|
|
1584
1587
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1585
1588
|
}
|
|
1586
1589
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
@@ -1588,8 +1591,8 @@ function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
|
1588
1591
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1589
1592
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1590
1593
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1591
|
-
scope.
|
|
1592
|
-
var tmp = scope.
|
|
1594
|
+
scope.z1v(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1595
|
+
var tmp = scope.q1v_1;
|
|
1593
1596
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1594
1597
|
}
|
|
1595
1598
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
@@ -1599,21 +1602,21 @@ function stripWirespecPrefix(_this__u8e3s4) {
|
|
|
1599
1602
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1600
1603
|
var tmp = scope;
|
|
1601
1604
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1602
|
-
var this_0 = scope.
|
|
1605
|
+
var this_0 = scope.q1v_1;
|
|
1603
1606
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1604
1607
|
// Inline function 'kotlin.apply' call
|
|
1605
1608
|
var this_1 = new TransformerBuilder();
|
|
1606
|
-
this_1.
|
|
1607
|
-
var tmp$ret$2 = this_1.
|
|
1608
|
-
tmp.
|
|
1609
|
-
var tmp_0 = scope.
|
|
1609
|
+
this_1.w1v(stripWirespecPrefix$lambda);
|
|
1610
|
+
var tmp$ret$2 = this_1.l1i();
|
|
1611
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
1612
|
+
var tmp_0 = scope.q1v_1;
|
|
1610
1613
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1611
1614
|
}
|
|
1612
1615
|
function flattenForRust(_this__u8e3s4) {
|
|
1613
1616
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1614
1617
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1615
1618
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1616
|
-
var tmp0 = _this__u8e3s4.
|
|
1619
|
+
var tmp0 = _this__u8e3s4.u1n();
|
|
1617
1620
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1618
1621
|
var destination = ArrayList_init_$Create$_0();
|
|
1619
1622
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1626,7 +1629,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1626
1629
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1627
1630
|
var namespace = ensureNotNull(tmp$ret$2);
|
|
1628
1631
|
// Inline function 'kotlin.collections.filter' call
|
|
1629
|
-
var tmp0_0 = namespace.
|
|
1632
|
+
var tmp0_0 = namespace.z1n_1;
|
|
1630
1633
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1631
1634
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1632
1635
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1651,13 +1654,13 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1651
1654
|
var tmp_0;
|
|
1652
1655
|
var tmp_1;
|
|
1653
1656
|
if (item instanceof Union_0) {
|
|
1654
|
-
tmp_1 = item.
|
|
1657
|
+
tmp_1 = item.y1o_1.y1g() === 'Response';
|
|
1655
1658
|
} else {
|
|
1656
1659
|
tmp_1 = false;
|
|
1657
1660
|
}
|
|
1658
1661
|
if (tmp_1) {
|
|
1659
1662
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1660
|
-
var tmp0_1 = namespace.
|
|
1663
|
+
var tmp0_1 = namespace.z1n_1;
|
|
1661
1664
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1662
1665
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1663
1666
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -1673,7 +1676,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1673
1676
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1674
1677
|
while (_iterator__ex2g4s_3.u()) {
|
|
1675
1678
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1676
|
-
var tmp$ret$8 = item_0.
|
|
1679
|
+
var tmp$ret$8 = item_0.s1p_1.y1g();
|
|
1677
1680
|
destination_3.x(tmp$ret$8);
|
|
1678
1681
|
}
|
|
1679
1682
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -1682,7 +1685,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1682
1685
|
var _iterator__ex2g4s_4 = destination_3.t();
|
|
1683
1686
|
while (_iterator__ex2g4s_4.u()) {
|
|
1684
1687
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1685
|
-
if (get_rustResponsePattern().
|
|
1688
|
+
if (get_rustResponsePattern().pc(element_2)) {
|
|
1686
1689
|
destination_4.x(element_2);
|
|
1687
1690
|
}
|
|
1688
1691
|
}
|
|
@@ -1696,10 +1699,10 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1696
1699
|
destination_5.x(tmp$ret$14);
|
|
1697
1700
|
}
|
|
1698
1701
|
var members = destination_5;
|
|
1699
|
-
tmp_0 = item.
|
|
1702
|
+
tmp_0 = item.e1p(VOID, VOID, members, emptyList());
|
|
1700
1703
|
} else {
|
|
1701
1704
|
if (item instanceof Union_0) {
|
|
1702
|
-
tmp_0 = item.
|
|
1705
|
+
tmp_0 = item.e1p(VOID, VOID, VOID, emptyList());
|
|
1703
1706
|
} else {
|
|
1704
1707
|
tmp_0 = item;
|
|
1705
1708
|
}
|
|
@@ -1709,7 +1712,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1709
1712
|
}
|
|
1710
1713
|
var moduleElements = destination_1;
|
|
1711
1714
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1712
|
-
var tmp0_2 = namespace.
|
|
1715
|
+
var tmp0_2 = namespace.z1n_1;
|
|
1713
1716
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1714
1717
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1715
1718
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1726,15 +1729,15 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1726
1729
|
}
|
|
1727
1730
|
}
|
|
1728
1731
|
var classElements = destination_6;
|
|
1729
|
-
return new File(namespace.
|
|
1732
|
+
return new File(namespace.y1n_1, plus_0(moduleElements, new Namespace(namespace.y1n_1, classElements, namespace.a1o_1)));
|
|
1730
1733
|
}
|
|
1731
1734
|
function fixConstructorCalls() {
|
|
1732
1735
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1733
1736
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1734
1737
|
// Inline function 'kotlin.apply' call
|
|
1735
1738
|
var this_0 = new TransformerBuilder();
|
|
1736
|
-
this_0.
|
|
1737
|
-
return this_0.
|
|
1739
|
+
this_0.z1v(fixConstructorCalls$lambda);
|
|
1740
|
+
return this_0.l1i();
|
|
1738
1741
|
}
|
|
1739
1742
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1740
1743
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1745,7 +1748,7 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1745
1748
|
var _iterator__ex2g4s = this_0.t();
|
|
1746
1749
|
while (_iterator__ex2g4s.u()) {
|
|
1747
1750
|
var e = _iterator__ex2g4s.v();
|
|
1748
|
-
var key = e.
|
|
1751
|
+
var key = e.dv_1;
|
|
1749
1752
|
if (set.x(key)) {
|
|
1750
1753
|
list.x(e);
|
|
1751
1754
|
}
|
|
@@ -1756,24 +1759,24 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1756
1759
|
var _iterator__ex2g4s_0 = list.t();
|
|
1757
1760
|
while (_iterator__ex2g4s_0.u()) {
|
|
1758
1761
|
var item = _iterator__ex2g4s_0.v();
|
|
1759
|
-
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.
|
|
1762
|
+
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.dv_1), Companion_getInstance().x1g(item.dv_1).y1g());
|
|
1760
1763
|
destination.x(tmp$ret$2);
|
|
1761
1764
|
}
|
|
1762
1765
|
return destination;
|
|
1763
1766
|
}
|
|
1764
1767
|
function toRustSnakeCase(_this__u8e3s4) {
|
|
1765
1768
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1766
|
-
return Companion_getInstance().
|
|
1769
|
+
return Companion_getInstance().x1g(_this__u8e3s4).p1m();
|
|
1767
1770
|
}
|
|
1768
1771
|
function buildValidateFunction(refined) {
|
|
1769
1772
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1770
|
-
var constraintExpr = convertConstraint(refined.
|
|
1773
|
+
var constraintExpr = convertConstraint(refined.nr_1, new FieldCall(new VariableReference(Companion_getInstance().x1g('self')), Companion_getInstance().x1g('value')));
|
|
1771
1774
|
return function_0('validate', VOID, VOID, buildValidateFunction$lambda(constraintExpr));
|
|
1772
1775
|
}
|
|
1773
1776
|
function buildToStringFunction(refined) {
|
|
1774
1777
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1775
1778
|
var tmp;
|
|
1776
|
-
if (refined.
|
|
1779
|
+
if (refined.nr_1.ot_1 instanceof String_0) {
|
|
1777
1780
|
tmp = 'self.value.clone()';
|
|
1778
1781
|
} else {
|
|
1779
1782
|
tmp = 'format!("{}", self.value)';
|
|
@@ -1788,8 +1791,8 @@ function buildApiStruct(endpoint) {
|
|
|
1788
1791
|
function generateApiStructCode(_this__u8e3s4) {
|
|
1789
1792
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1790
1793
|
// Inline function 'kotlin.let' call
|
|
1791
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
1792
|
-
var methodName = _this__u8e3s4.
|
|
1794
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.gq_1, '/', VOID, VOID, VOID, VOID, generateApiStructCode$lambda);
|
|
1795
|
+
var methodName = _this__u8e3s4.fq_1.b3_1;
|
|
1793
1796
|
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
1797
|
}
|
|
1795
1798
|
function fixResponseSwitchPatterns$lambda(s, t) {
|
|
@@ -1798,56 +1801,56 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1798
1801
|
if (!(s instanceof Switch)) {
|
|
1799
1802
|
tmp = true;
|
|
1800
1803
|
} else {
|
|
1801
|
-
var tmp0_safe_receiver = s.
|
|
1802
|
-
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1804
|
+
var tmp0_safe_receiver = s.w1q_1;
|
|
1805
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j1m()) === 'r');
|
|
1803
1806
|
}
|
|
1804
1807
|
if (tmp)
|
|
1805
1808
|
return transformChildren(s, t);
|
|
1806
1809
|
// Inline function 'kotlin.collections.map' call
|
|
1807
|
-
var this_0 = s.
|
|
1810
|
+
var this_0 = s.u1q_1;
|
|
1808
1811
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1809
1812
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1810
1813
|
var _iterator__ex2g4s = this_0.t();
|
|
1811
1814
|
while (_iterator__ex2g4s.u()) {
|
|
1812
1815
|
var item = _iterator__ex2g4s.v();
|
|
1813
|
-
var tmp_0 = item.
|
|
1816
|
+
var tmp_0 = item.b1r_1;
|
|
1814
1817
|
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.
|
|
1818
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.u1i_1;
|
|
1819
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y1g();
|
|
1817
1820
|
var tmp_1;
|
|
1818
|
-
if (!(typeName == null) && get_rustResponsePattern().
|
|
1819
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1821
|
+
if (!(typeName == null) && get_rustResponsePattern().pc(typeName)) {
|
|
1822
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.w1q_1).p1m() + ')');
|
|
1820
1823
|
// Inline function 'kotlin.collections.map' call
|
|
1821
|
-
var this_1 = item.
|
|
1824
|
+
var this_1 = item.a1r_1;
|
|
1822
1825
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1823
1826
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1824
1827
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1825
1828
|
while (_iterator__ex2g4s_0.u()) {
|
|
1826
1829
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1827
|
-
var tmp$ret$0 = t.
|
|
1830
|
+
var tmp$ret$0 = t.k1v(item_0);
|
|
1828
1831
|
destination_0.x(tmp$ret$0);
|
|
1829
1832
|
}
|
|
1830
1833
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1831
1834
|
} else {
|
|
1832
|
-
var tmp_3 = t.
|
|
1835
|
+
var tmp_3 = t.l1v(item.z1q_1);
|
|
1833
1836
|
// Inline function 'kotlin.collections.map' call
|
|
1834
|
-
var this_2 = item.
|
|
1837
|
+
var this_2 = item.a1r_1;
|
|
1835
1838
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1836
1839
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1837
1840
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1838
1841
|
while (_iterator__ex2g4s_1.u()) {
|
|
1839
1842
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1840
|
-
var tmp$ret$3 = t.
|
|
1843
|
+
var tmp$ret$3 = t.k1v(item_1);
|
|
1841
1844
|
destination_1.x(tmp$ret$3);
|
|
1842
1845
|
}
|
|
1843
1846
|
var tmp_4 = destination_1;
|
|
1844
|
-
var tmp2_safe_receiver = item.
|
|
1847
|
+
var tmp2_safe_receiver = item.b1r_1;
|
|
1845
1848
|
var tmp_5;
|
|
1846
1849
|
if (tmp2_safe_receiver == null) {
|
|
1847
1850
|
tmp_5 = null;
|
|
1848
1851
|
} else {
|
|
1849
1852
|
// Inline function 'kotlin.let' call
|
|
1850
|
-
tmp_5 = t.
|
|
1853
|
+
tmp_5 = t.i1v(tmp2_safe_receiver);
|
|
1851
1854
|
}
|
|
1852
1855
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1853
1856
|
}
|
|
@@ -1855,13 +1858,13 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1855
1858
|
destination.x(tmp$ret$8);
|
|
1856
1859
|
}
|
|
1857
1860
|
var transformedCases = destination;
|
|
1858
|
-
return s.
|
|
1861
|
+
return s.y1q(t.l1v(s.t1q_1), transformedCases, null);
|
|
1859
1862
|
}
|
|
1860
1863
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1861
1864
|
return function (element, transformer) {
|
|
1862
1865
|
var tmp;
|
|
1863
1866
|
if (element instanceof Struct) {
|
|
1864
|
-
tmp = element.
|
|
1867
|
+
tmp = element.d1q(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1865
1868
|
} else {
|
|
1866
1869
|
tmp = element;
|
|
1867
1870
|
}
|
|
@@ -1873,7 +1876,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1873
1876
|
return function (element, transformer) {
|
|
1874
1877
|
var tmp;
|
|
1875
1878
|
if (element instanceof Namespace) {
|
|
1876
|
-
tmp = element.
|
|
1879
|
+
tmp = element.d1o(VOID, plus(element.z1n_1, listOf(buildApiStruct($endpoint))));
|
|
1877
1880
|
} else {
|
|
1878
1881
|
tmp = element;
|
|
1879
1882
|
}
|
|
@@ -1886,7 +1889,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1886
1889
|
var tmp;
|
|
1887
1890
|
if (element instanceof File) {
|
|
1888
1891
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1889
|
-
var tmp0 = element.
|
|
1892
|
+
var tmp0 = element.t1n_1;
|
|
1890
1893
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1891
1894
|
var destination = ArrayList_init_$Create$_0();
|
|
1892
1895
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1896,26 +1899,26 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1896
1899
|
var tmp_1;
|
|
1897
1900
|
var tmp_2;
|
|
1898
1901
|
if (element_0 instanceof Union_0) {
|
|
1899
|
-
tmp_2 = element_0.
|
|
1902
|
+
tmp_2 = element_0.y1o_1.y1g() === 'Response';
|
|
1900
1903
|
} else {
|
|
1901
1904
|
tmp_2 = false;
|
|
1902
1905
|
}
|
|
1903
1906
|
if (tmp_2) {
|
|
1904
1907
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1905
|
-
tmp_1 = !element_0.
|
|
1908
|
+
tmp_1 = !element_0.a1p_1.r();
|
|
1906
1909
|
} else {
|
|
1907
1910
|
tmp_1 = false;
|
|
1908
1911
|
}
|
|
1909
1912
|
if (tmp_1) {
|
|
1910
1913
|
var tmp_3 = listOf(element_0);
|
|
1911
1914
|
// Inline function 'kotlin.collections.map' call
|
|
1912
|
-
var this_0 = element_0.
|
|
1915
|
+
var this_0 = element_0.a1p_1;
|
|
1913
1916
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1914
1917
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1915
1918
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1916
1919
|
while (_iterator__ex2g4s_0.u()) {
|
|
1917
1920
|
var item = _iterator__ex2g4s_0.v();
|
|
1918
|
-
var memberName = item.
|
|
1921
|
+
var memberName = item.u1i_1.y1g();
|
|
1919
1922
|
var tmp$ret$1 = new RawElement('impl From<' + memberName + '> for Response { fn from(value: ' + memberName + ') -> Self { Response::' + memberName + '(value) } }\n');
|
|
1920
1923
|
destination_0.x(tmp$ret$1);
|
|
1921
1924
|
}
|
|
@@ -1926,7 +1929,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1926
1929
|
var list = tmp_0;
|
|
1927
1930
|
addAll(destination, list);
|
|
1928
1931
|
}
|
|
1929
|
-
tmp = element.
|
|
1932
|
+
tmp = element.w1n(VOID, destination);
|
|
1930
1933
|
} else {
|
|
1931
1934
|
tmp = element;
|
|
1932
1935
|
}
|
|
@@ -1940,7 +1943,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1940
1943
|
var tmp$ret$4;
|
|
1941
1944
|
$l$block_1: {
|
|
1942
1945
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1943
|
-
var tmp0 = element.
|
|
1946
|
+
var tmp0 = element.z1n_1;
|
|
1944
1947
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1945
1948
|
var destination = ArrayList_init_$Create$_0();
|
|
1946
1949
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1956,7 +1959,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1956
1959
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1957
1960
|
while (_iterator__ex2g4s_0.u()) {
|
|
1958
1961
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
1959
|
-
if (element_1.
|
|
1962
|
+
if (element_1.e1o_1.equals(Companion_getInstance().x1g('Handler'))) {
|
|
1960
1963
|
tmp$ret$3 = element_1;
|
|
1961
1964
|
break $l$block;
|
|
1962
1965
|
}
|
|
@@ -1973,7 +1976,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1973
1976
|
}
|
|
1974
1977
|
var handler = tmp_0;
|
|
1975
1978
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1976
|
-
var tmp0_0 = handler.
|
|
1979
|
+
var tmp0_0 = handler.f1o_1;
|
|
1977
1980
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1978
1981
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1979
1982
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
@@ -1992,8 +1995,8 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1992
1995
|
tmp_1 = tmp1_elvis_lhs;
|
|
1993
1996
|
}
|
|
1994
1997
|
var method = tmp_1;
|
|
1995
|
-
var methodName = method.
|
|
1996
|
-
tmp$ret$4 = element.
|
|
1998
|
+
var methodName = method.u1k_1.p1m();
|
|
1999
|
+
tmp$ret$4 = element.d1o(VOID, plus(element.z1n_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
2000
|
}
|
|
1998
2001
|
tmp = tmp$ret$4;
|
|
1999
2002
|
} else {
|
|
@@ -2008,7 +2011,7 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2008
2011
|
if (element instanceof Interface) {
|
|
2009
2012
|
var tmp$ret$0;
|
|
2010
2013
|
$l$block: {
|
|
2011
|
-
if (!element.
|
|
2014
|
+
if (!element.e1o_1.equals(Companion_getInstance().x1g('Handler')) && !element.e1o_1.equals(Companion_getInstance().x1g('Call'))) {
|
|
2012
2015
|
tmp$ret$0 = element;
|
|
2013
2016
|
break $l$block;
|
|
2014
2017
|
}
|
|
@@ -2017,14 +2020,14 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2017
2020
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
2018
2021
|
var tmp_0 = scope;
|
|
2019
2022
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
2020
|
-
var this_0 = scope.
|
|
2023
|
+
var this_0 = scope.q1v_1;
|
|
2021
2024
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2022
2025
|
// Inline function 'kotlin.apply' call
|
|
2023
2026
|
var this_1 = new TransformerBuilder();
|
|
2024
|
-
this_1.
|
|
2025
|
-
var tmp$ret$3 = this_1.
|
|
2026
|
-
tmp_0.
|
|
2027
|
-
var tmp_1 = scope.
|
|
2027
|
+
this_1.k1i(injectSelfToHandlerMethods$lambda$lambda);
|
|
2028
|
+
var tmp$ret$3 = this_1.l1i();
|
|
2029
|
+
tmp_0.q1v_1 = transform(this_0, tmp$ret$3);
|
|
2030
|
+
var tmp_1 = scope.q1v_1;
|
|
2028
2031
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2029
2032
|
}
|
|
2030
2033
|
tmp = tmp$ret$0;
|
|
@@ -2038,7 +2041,7 @@ function injectSelfToHandlerMethods$lambda$lambda(element, transformer) {
|
|
|
2038
2041
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2039
2042
|
var tmp;
|
|
2040
2043
|
if (element instanceof Function_0) {
|
|
2041
|
-
tmp = element.
|
|
2044
|
+
tmp = element.f1l(Companion_getInstance().x1g(element.u1k_1.p1m()), VOID, plus(listOf(get_rustSelfParam()), element.w1k_1));
|
|
2042
2045
|
} else {
|
|
2043
2046
|
tmp = element;
|
|
2044
2047
|
}
|
|
@@ -2051,14 +2054,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2051
2054
|
if (type instanceof Custom) {
|
|
2052
2055
|
var tmp_0;
|
|
2053
2056
|
var tmp_1;
|
|
2054
|
-
if (startsWith(type.
|
|
2057
|
+
if (startsWith(type.u1i_1.y1g(), 'Response')) {
|
|
2055
2058
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2056
|
-
tmp_1 = !type.
|
|
2059
|
+
tmp_1 = !type.v1i_1.r();
|
|
2057
2060
|
} else {
|
|
2058
2061
|
tmp_1 = false;
|
|
2059
2062
|
}
|
|
2060
2063
|
if (tmp_1) {
|
|
2061
|
-
tmp_0 = type.
|
|
2064
|
+
tmp_0 = type.f1n(VOID, emptyList());
|
|
2062
2065
|
} else {
|
|
2063
2066
|
tmp_0 = type;
|
|
2064
2067
|
}
|
|
@@ -2073,7 +2076,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2073
2076
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2074
2077
|
var tmp;
|
|
2075
2078
|
if (element instanceof Interface) {
|
|
2076
|
-
tmp = element.
|
|
2079
|
+
tmp = element.e1o_1.equals(Companion_getInstance().x1g('Handler')) || element.e1o_1.equals(Companion_getInstance().x1g('Call')) ? element.m1o(VOID, VOID, emptyList()) : element;
|
|
2077
2080
|
} else {
|
|
2078
2081
|
tmp = element;
|
|
2079
2082
|
}
|
|
@@ -2086,17 +2089,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2086
2089
|
var tmp_0;
|
|
2087
2090
|
var tmp_1;
|
|
2088
2091
|
if (s instanceof RawExpression) {
|
|
2089
|
-
tmp_1 = $identifierPattern.
|
|
2092
|
+
tmp_1 = $identifierPattern.pc(s.h1q_1);
|
|
2090
2093
|
} else {
|
|
2091
2094
|
tmp_1 = false;
|
|
2092
2095
|
}
|
|
2093
2096
|
if (tmp_1) {
|
|
2094
|
-
tmp_0 = !contains(s.
|
|
2097
|
+
tmp_0 = !contains(s.h1q_1, '.');
|
|
2095
2098
|
} else {
|
|
2096
2099
|
tmp_0 = false;
|
|
2097
2100
|
}
|
|
2098
2101
|
if (tmp_0) {
|
|
2099
|
-
tmp = new VariableReference(Companion_getInstance().
|
|
2102
|
+
tmp = new VariableReference(Companion_getInstance().x1g(s.h1q_1));
|
|
2100
2103
|
} else {
|
|
2101
2104
|
tmp = transformChildren(s, t);
|
|
2102
2105
|
}
|
|
@@ -2107,10 +2110,10 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2107
2110
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2108
2111
|
var tmp;
|
|
2109
2112
|
if (type instanceof Custom) {
|
|
2110
|
-
var pascalName = type.
|
|
2113
|
+
var pascalName = type.u1i_1.y1g();
|
|
2111
2114
|
var tmp_0;
|
|
2112
2115
|
if (startsWith(pascalName, 'Wirespec.')) {
|
|
2113
|
-
tmp_0 = type.
|
|
2116
|
+
tmp_0 = type.f1n(Companion_getInstance().x1g(removePrefix(pascalName, 'Wirespec.')));
|
|
2114
2117
|
} else {
|
|
2115
2118
|
tmp_0 = type;
|
|
2116
2119
|
}
|
|
@@ -2125,38 +2128,38 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2125
2128
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2126
2129
|
if (!(s instanceof ConstructorStatement))
|
|
2127
2130
|
return transformChildren(s, t);
|
|
2128
|
-
var tmp = s.
|
|
2131
|
+
var tmp = s.o1n_1;
|
|
2129
2132
|
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.
|
|
2133
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u1i_1;
|
|
2134
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y1g();
|
|
2132
2135
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2133
|
-
var this_0 = s.
|
|
2136
|
+
var this_0 = s.p1n_1;
|
|
2134
2137
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2135
|
-
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.
|
|
2138
|
+
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.b1()));
|
|
2136
2139
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
2137
|
-
var _iterator__ex2g4s = this_0.
|
|
2140
|
+
var _iterator__ex2g4s = this_0.k1().t();
|
|
2138
2141
|
while (_iterator__ex2g4s.u()) {
|
|
2139
2142
|
var element = _iterator__ex2g4s.v();
|
|
2140
|
-
var tmp_0 = element.
|
|
2141
|
-
var tmp$ret$1 = t.
|
|
2142
|
-
destination.
|
|
2143
|
+
var tmp_0 = element.l1();
|
|
2144
|
+
var tmp$ret$1 = t.l1v(element.m1());
|
|
2145
|
+
destination.t2(tmp_0, tmp$ret$1);
|
|
2143
2146
|
}
|
|
2144
2147
|
var transformedArgs = destination;
|
|
2145
|
-
return !(typeName == null) && get_rustResponsePattern().
|
|
2148
|
+
return !(typeName == null) && get_rustResponsePattern().pc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().x1g('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
2149
|
}
|
|
2147
2150
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2148
2151
|
return function ($this$function) {
|
|
2149
|
-
$this$function.
|
|
2150
|
-
$this$function.
|
|
2151
|
-
$this$function.
|
|
2152
|
+
$this$function.l1h('&self', Custom_init_$Create$(''));
|
|
2153
|
+
$this$function.o1h(Boolean_instance);
|
|
2154
|
+
$this$function.p1h($constraintExpr);
|
|
2152
2155
|
return Unit_instance;
|
|
2153
2156
|
};
|
|
2154
2157
|
}
|
|
2155
2158
|
function buildToStringFunction$lambda($expr) {
|
|
2156
2159
|
return function ($this$function) {
|
|
2157
|
-
$this$function.
|
|
2158
|
-
$this$function.
|
|
2159
|
-
$this$function.
|
|
2160
|
+
$this$function.l1h('&self', Custom_init_$Create$(''));
|
|
2161
|
+
$this$function.o1h(String_instance);
|
|
2162
|
+
$this$function.p1h(new RawExpression($expr));
|
|
2160
2163
|
return Unit_instance;
|
|
2161
2164
|
};
|
|
2162
2165
|
}
|
|
@@ -2164,10 +2167,10 @@ function generateApiStructCode$lambda(segment) {
|
|
|
2164
2167
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2165
2168
|
var tmp;
|
|
2166
2169
|
if (segment instanceof Literal) {
|
|
2167
|
-
tmp = segment.
|
|
2170
|
+
tmp = segment.tt_1;
|
|
2168
2171
|
} else {
|
|
2169
2172
|
if (segment instanceof Param) {
|
|
2170
|
-
tmp = '{' + segment.
|
|
2173
|
+
tmp = '{' + segment.lq_1.m1() + '}';
|
|
2171
2174
|
} else {
|
|
2172
2175
|
noWhenBranchMatchedException();
|
|
2173
2176
|
}
|
|
@@ -2178,39 +2181,39 @@ var properties_initialized_RustIrTransformer_kt_hr6k9w;
|
|
|
2178
2181
|
function _init_properties_RustIrTransformer_kt__rrvmwq() {
|
|
2179
2182
|
if (!properties_initialized_RustIrTransformer_kt_hr6k9w) {
|
|
2180
2183
|
properties_initialized_RustIrTransformer_kt_hr6k9w = true;
|
|
2181
|
-
rustSelfParam = new Parameter(Companion_getInstance().
|
|
2184
|
+
rustSelfParam = new Parameter(Companion_getInstance().x1g('&self'), Custom_init_$Create$(''));
|
|
2182
2185
|
rustResponsePattern = Regex_init_$Create$('Response(\\d+|Default)');
|
|
2183
2186
|
}
|
|
2184
2187
|
}
|
|
2185
2188
|
function borrowParamsOf($this, fn) {
|
|
2186
2189
|
// Inline function 'kotlin.collections.map' call
|
|
2187
|
-
var this_0 = fn.
|
|
2190
|
+
var this_0 = fn.w1k_1;
|
|
2188
2191
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2189
2192
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2190
2193
|
var _iterator__ex2g4s = this_0.t();
|
|
2191
2194
|
while (_iterator__ex2g4s.u()) {
|
|
2192
2195
|
var item = _iterator__ex2g4s.v();
|
|
2193
2196
|
var tmp;
|
|
2194
|
-
if (RustTransform_getInstance().
|
|
2197
|
+
if (RustTransform_getInstance().z1y(item.i1r_1)) {
|
|
2195
2198
|
tmp = item;
|
|
2196
2199
|
} else {
|
|
2197
|
-
tmp = item.
|
|
2200
|
+
tmp = item.m1r(VOID, applyBorrowRule(RustTransform_getInstance(), item.j1r_1));
|
|
2198
2201
|
}
|
|
2199
2202
|
var tmp$ret$0 = tmp;
|
|
2200
2203
|
destination.x(tmp$ret$0);
|
|
2201
2204
|
}
|
|
2202
|
-
return fn.
|
|
2205
|
+
return fn.f1l(VOID, VOID, destination);
|
|
2203
2206
|
}
|
|
2204
2207
|
function applyBorrowRule($this, type) {
|
|
2205
2208
|
var tmp;
|
|
2206
2209
|
if (type instanceof Nullable) {
|
|
2207
|
-
tmp = new Nullable(applyBorrowRule($this, type.
|
|
2210
|
+
tmp = new Nullable(applyBorrowRule($this, type.s1i_1));
|
|
2208
2211
|
} else {
|
|
2209
2212
|
if (equals(type, String_instance)) {
|
|
2210
2213
|
tmp = Custom_init_$Create$('&str');
|
|
2211
2214
|
} else {
|
|
2212
2215
|
if (type instanceof Custom) {
|
|
2213
|
-
tmp = $this.
|
|
2216
|
+
tmp = $this.c1z(type) ? type : $this.b1z(type) ? borrowImpl(type) : $this.a1z(type) ? ownedImpl(type) : type;
|
|
2214
2217
|
} else {
|
|
2215
2218
|
tmp = type;
|
|
2216
2219
|
}
|
|
@@ -2222,15 +2225,15 @@ function toBorrowedRaw($this, _this__u8e3s4) {
|
|
|
2222
2225
|
return new RawExpression('&' + toRawCode($this, _this__u8e3s4));
|
|
2223
2226
|
}
|
|
2224
2227
|
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
2225
|
-
return Companion_getInstance_0().
|
|
2228
|
+
return Companion_getInstance_0().l1x().v1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
2226
2229
|
}
|
|
2227
2230
|
function toRawCode($this, _this__u8e3s4) {
|
|
2228
2231
|
var tmp;
|
|
2229
2232
|
if (_this__u8e3s4 instanceof VariableReference) {
|
|
2230
|
-
tmp = sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2233
|
+
tmp = sanitizeKeywords_0($this, _this__u8e3s4.r1n_1.p1m());
|
|
2231
2234
|
} else {
|
|
2232
2235
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
2233
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
2236
|
+
var tmp1_safe_receiver = _this__u8e3s4.e1r_1;
|
|
2234
2237
|
var tmp_0;
|
|
2235
2238
|
if (tmp1_safe_receiver == null) {
|
|
2236
2239
|
tmp_0 = null;
|
|
@@ -2240,20 +2243,20 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2240
2243
|
}
|
|
2241
2244
|
var tmp2_elvis_lhs = tmp_0;
|
|
2242
2245
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2243
|
-
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2246
|
+
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.f1r_1.p1m());
|
|
2244
2247
|
} else {
|
|
2245
2248
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
2246
|
-
var tmp_1 = _this__u8e3s4.
|
|
2249
|
+
var tmp_1 = _this__u8e3s4.w1r_1;
|
|
2247
2250
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2248
2251
|
var tmp_2;
|
|
2249
2252
|
var tmp_3;
|
|
2250
2253
|
if (!(lit == null)) {
|
|
2251
2254
|
var tmp_4;
|
|
2252
|
-
var tmp_5 = lit.
|
|
2255
|
+
var tmp_5 = lit.q1q_1;
|
|
2253
2256
|
if (tmp_5 instanceof Integer) {
|
|
2254
2257
|
tmp_4 = true;
|
|
2255
2258
|
} else {
|
|
2256
|
-
var tmp_6 = lit.
|
|
2259
|
+
var tmp_6 = lit.q1q_1;
|
|
2257
2260
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2258
2261
|
}
|
|
2259
2262
|
tmp_3 = tmp_4;
|
|
@@ -2261,31 +2264,31 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2261
2264
|
tmp_3 = false;
|
|
2262
2265
|
}
|
|
2263
2266
|
if (tmp_3) {
|
|
2264
|
-
tmp_2 = toString_0(lit.
|
|
2267
|
+
tmp_2 = toString_0(lit.p1q_1);
|
|
2265
2268
|
} else {
|
|
2266
2269
|
var tmp_7;
|
|
2267
2270
|
if (!(lit == null)) {
|
|
2268
|
-
var tmp_8 = lit.
|
|
2271
|
+
var tmp_8 = lit.q1q_1;
|
|
2269
2272
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2270
2273
|
} else {
|
|
2271
2274
|
tmp_7 = false;
|
|
2272
2275
|
}
|
|
2273
2276
|
if (tmp_7) {
|
|
2274
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2277
|
+
tmp_2 = '"' + toString_0(lit.p1q_1) + '"';
|
|
2275
2278
|
} else {
|
|
2276
|
-
tmp_2 = toRawCode($this, _this__u8e3s4.
|
|
2279
|
+
tmp_2 = toRawCode($this, _this__u8e3s4.w1r_1);
|
|
2277
2280
|
}
|
|
2278
2281
|
}
|
|
2279
2282
|
var idx = tmp_2;
|
|
2280
|
-
tmp = toRawCode($this, _this__u8e3s4.
|
|
2283
|
+
tmp = toRawCode($this, _this__u8e3s4.v1r_1) + '[' + idx + ']';
|
|
2281
2284
|
} else {
|
|
2282
2285
|
if (_this__u8e3s4 instanceof ConstructorStatement) {
|
|
2283
|
-
var tmp_9 = _this__u8e3s4.
|
|
2286
|
+
var tmp_9 = _this__u8e3s4.o1n_1;
|
|
2284
2287
|
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.
|
|
2288
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.u1i_1;
|
|
2289
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.y1g();
|
|
2290
|
+
var typeName = tmp5_elvis_lhs == null ? toString_0(_this__u8e3s4.o1n_1) : tmp5_elvis_lhs;
|
|
2291
|
+
var tmp_10 = _this__u8e3s4.p1n_1.k1();
|
|
2289
2292
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2290
2293
|
var tmp_11;
|
|
2291
2294
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2298,23 +2301,23 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2298
2301
|
} else {
|
|
2299
2302
|
if (_this__u8e3s4 instanceof Literal_0) {
|
|
2300
2303
|
var tmp_12;
|
|
2301
|
-
var tmp_13 = _this__u8e3s4.
|
|
2304
|
+
var tmp_13 = _this__u8e3s4.q1q_1;
|
|
2302
2305
|
if (tmp_13 instanceof String_1) {
|
|
2303
|
-
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.
|
|
2306
|
+
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.p1q_1) + '")';
|
|
2304
2307
|
} else {
|
|
2305
|
-
var tmp_14 = _this__u8e3s4.
|
|
2308
|
+
var tmp_14 = _this__u8e3s4.q1q_1;
|
|
2306
2309
|
if (tmp_14 instanceof Boolean_0) {
|
|
2307
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2310
|
+
tmp_12 = toString_0(_this__u8e3s4.p1q_1);
|
|
2308
2311
|
} else {
|
|
2309
|
-
var tmp_15 = _this__u8e3s4.
|
|
2312
|
+
var tmp_15 = _this__u8e3s4.q1q_1;
|
|
2310
2313
|
if (tmp_15 instanceof Integer) {
|
|
2311
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2314
|
+
tmp_12 = toString_0(_this__u8e3s4.p1q_1);
|
|
2312
2315
|
} else {
|
|
2313
|
-
var tmp_16 = _this__u8e3s4.
|
|
2316
|
+
var tmp_16 = _this__u8e3s4.q1q_1;
|
|
2314
2317
|
if (tmp_16 instanceof Number_0) {
|
|
2315
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2318
|
+
tmp_12 = toString_0(_this__u8e3s4.p1q_1);
|
|
2316
2319
|
} else {
|
|
2317
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2320
|
+
tmp_12 = toString_0(_this__u8e3s4.p1q_1);
|
|
2318
2321
|
}
|
|
2319
2322
|
}
|
|
2320
2323
|
}
|
|
@@ -2322,7 +2325,7 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2322
2325
|
tmp = tmp_12;
|
|
2323
2326
|
} else {
|
|
2324
2327
|
if (_this__u8e3s4 instanceof RawExpression) {
|
|
2325
|
-
tmp = _this__u8e3s4.
|
|
2328
|
+
tmp = _this__u8e3s4.h1q_1;
|
|
2326
2329
|
} else {
|
|
2327
2330
|
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression(_this__u8e3s4).o();
|
|
2328
2331
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
@@ -2367,11 +2370,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2367
2370
|
var tmp;
|
|
2368
2371
|
if (element instanceof Interface) {
|
|
2369
2372
|
var tmp_0;
|
|
2370
|
-
if (element.
|
|
2373
|
+
if (element.e1o_1.equals(Companion_getInstance().x1g('Call'))) {
|
|
2371
2374
|
tmp_0 = element;
|
|
2372
2375
|
} else {
|
|
2373
2376
|
// Inline function 'kotlin.collections.map' call
|
|
2374
|
-
var this_0 = element.
|
|
2377
|
+
var this_0 = element.f1o_1;
|
|
2375
2378
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2376
2379
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2377
2380
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2387,7 +2390,7 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2387
2390
|
destination.x(tmp$ret$0);
|
|
2388
2391
|
}
|
|
2389
2392
|
var borrowed = destination;
|
|
2390
|
-
tmp_0 = transformChildren_0(element.
|
|
2393
|
+
tmp_0 = transformChildren_0(element.m1o(VOID, borrowed), tr);
|
|
2391
2394
|
}
|
|
2392
2395
|
tmp = tmp_0;
|
|
2393
2396
|
} else {
|
|
@@ -2403,13 +2406,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2403
2406
|
var tmp;
|
|
2404
2407
|
var tmp_0;
|
|
2405
2408
|
if (s instanceof FunctionCall) {
|
|
2406
|
-
tmp_0 = RustTransform_getInstance().
|
|
2409
|
+
tmp_0 = RustTransform_getInstance().v1y_1.v1(s.t1m_1.p1m());
|
|
2407
2410
|
} else {
|
|
2408
2411
|
tmp_0 = false;
|
|
2409
2412
|
}
|
|
2410
2413
|
if (tmp_0) {
|
|
2411
2414
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2412
|
-
var this_0 = s.
|
|
2415
|
+
var this_0 = s.u1m_1.k1();
|
|
2413
2416
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2414
2417
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2415
2418
|
var index = 0;
|
|
@@ -2420,16 +2423,16 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2420
2423
|
index = _unary__edvuaz + 1 | 0;
|
|
2421
2424
|
var idx = checkIndexOverflow(_unary__edvuaz);
|
|
2422
2425
|
// Inline function 'kotlin.collections.component1' call
|
|
2423
|
-
var key = item.
|
|
2426
|
+
var key = item.l1();
|
|
2424
2427
|
// Inline function 'kotlin.collections.component2' call
|
|
2425
|
-
var value = item.
|
|
2426
|
-
var transformed = t.
|
|
2428
|
+
var value = item.m1();
|
|
2429
|
+
var transformed = t.l1v(value);
|
|
2427
2430
|
var tmp_1;
|
|
2428
2431
|
var tmp_2;
|
|
2429
2432
|
if (idx === 0) {
|
|
2430
2433
|
var tmp_3;
|
|
2431
2434
|
if (transformed instanceof VariableReference) {
|
|
2432
|
-
tmp_3 = transformed.
|
|
2435
|
+
tmp_3 = transformed.r1n_1.w1i() === 'it';
|
|
2433
2436
|
} else {
|
|
2434
2437
|
tmp_3 = false;
|
|
2435
2438
|
}
|
|
@@ -2446,20 +2449,20 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2446
2449
|
destination.x(tmp$ret$2);
|
|
2447
2450
|
}
|
|
2448
2451
|
var newArgs = toMap(destination);
|
|
2449
|
-
tmp = s.
|
|
2452
|
+
tmp = s.x1m(VOID, VOID, VOID, newArgs);
|
|
2450
2453
|
} else {
|
|
2451
2454
|
tmp = transformChildren(s, t);
|
|
2452
2455
|
}
|
|
2453
2456
|
return tmp;
|
|
2454
2457
|
}
|
|
2455
2458
|
function RustTransform$rustName$lambda(it) {
|
|
2456
|
-
return RustTransform_getInstance().
|
|
2459
|
+
return RustTransform_getInstance().x1y(it);
|
|
2457
2460
|
}
|
|
2458
2461
|
function RustTransform$rustName$lambda_0(it) {
|
|
2459
|
-
return RustTransform_getInstance().
|
|
2462
|
+
return RustTransform_getInstance().x1y(it);
|
|
2460
2463
|
}
|
|
2461
2464
|
function RustTransform$toRawCode$lambda(it) {
|
|
2462
|
-
return it.
|
|
2465
|
+
return it.l1().p1m() + ': ' + toRawCode(RustTransform_getInstance(), it.m1());
|
|
2463
2466
|
}
|
|
2464
2467
|
function RustTransform() {
|
|
2465
2468
|
RustTransform_instance = this;
|
|
@@ -2467,58 +2470,57 @@ function RustTransform() {
|
|
|
2467
2470
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2468
2471
|
// Inline function 'kotlin.apply' call
|
|
2469
2472
|
var this_0 = new TransformerBuilder();
|
|
2470
|
-
this_0.
|
|
2471
|
-
tmp.
|
|
2473
|
+
this_0.w1v(RustTransform$primitivesToCustom$lambda);
|
|
2474
|
+
tmp.s1y_1 = this_0.l1i();
|
|
2472
2475
|
var tmp_0 = this;
|
|
2473
2476
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2474
2477
|
// Inline function 'kotlin.apply' call
|
|
2475
2478
|
var this_1 = new TransformerBuilder();
|
|
2476
|
-
this_1.
|
|
2477
|
-
tmp_0.
|
|
2479
|
+
this_1.k1i(RustTransform$borrow$lambda);
|
|
2480
|
+
tmp_0.t1y_1 = this_1.l1i();
|
|
2478
2481
|
var tmp_1 = this;
|
|
2479
2482
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2480
2483
|
// Inline function 'kotlin.apply' call
|
|
2481
|
-
tmp_1.
|
|
2482
|
-
this.
|
|
2484
|
+
tmp_1.u1y_1 = (new TransformerBuilder()).l1i();
|
|
2485
|
+
this.v1y_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2483
2486
|
var tmp_2 = this;
|
|
2484
2487
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2485
2488
|
// Inline function 'kotlin.apply' call
|
|
2486
2489
|
var this_2 = new TransformerBuilder();
|
|
2487
|
-
this_2.
|
|
2488
|
-
tmp_2.
|
|
2489
|
-
this.e20_1 = setOf(['i32', 'i64', 'f32', 'f64', 'bool', 'u8', 'u16', 'u32', 'u64', 'usize', 'isize', '()']);
|
|
2490
|
+
this_2.z1v(RustTransform$serializationArgs$lambda);
|
|
2491
|
+
tmp_2.w1y_1 = this_2.l1i();
|
|
2490
2492
|
}
|
|
2491
|
-
protoOf(RustTransform).
|
|
2493
|
+
protoOf(RustTransform).y1y = function (element) {
|
|
2492
2494
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2493
2495
|
var scope = new TransformScope(element);
|
|
2494
|
-
scope.
|
|
2495
|
-
var tmp = scope.
|
|
2496
|
+
scope.v1v(RustTransform_getInstance().s1y_1);
|
|
2497
|
+
var tmp = scope.q1v_1;
|
|
2496
2498
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2497
2499
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2498
2500
|
var scope_0 = new TransformScope(this_0);
|
|
2499
|
-
scope_0.
|
|
2500
|
-
var tmp_0 = scope_0.
|
|
2501
|
+
scope_0.v1v(RustTransform_getInstance().t1y_1);
|
|
2502
|
+
var tmp_0 = scope_0.q1v_1;
|
|
2501
2503
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2502
2504
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2503
2505
|
var scope_1 = new TransformScope(this_1);
|
|
2504
|
-
scope_1.
|
|
2505
|
-
var tmp_1 = scope_1.
|
|
2506
|
+
scope_1.v1v(RustTransform_getInstance().u1y_1);
|
|
2507
|
+
var tmp_1 = scope_1.q1v_1;
|
|
2506
2508
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2507
2509
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2508
2510
|
var scope_2 = new TransformScope(this_2);
|
|
2509
|
-
scope_2.
|
|
2510
|
-
var tmp_2 = scope_2.
|
|
2511
|
+
scope_2.v1v(RustTransform_getInstance().w1y_1);
|
|
2512
|
+
var tmp_2 = scope_2.q1v_1;
|
|
2511
2513
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2512
2514
|
};
|
|
2513
|
-
protoOf(RustTransform).
|
|
2515
|
+
protoOf(RustTransform).x1y = function (_this__u8e3s4) {
|
|
2514
2516
|
var tmp;
|
|
2515
2517
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2516
|
-
var pascalName = _this__u8e3s4.
|
|
2518
|
+
var pascalName = _this__u8e3s4.u1i_1.y1g();
|
|
2517
2519
|
var tmp_0;
|
|
2518
|
-
if (_this__u8e3s4.
|
|
2520
|
+
if (_this__u8e3s4.v1i_1.r()) {
|
|
2519
2521
|
tmp_0 = pascalName;
|
|
2520
2522
|
} else {
|
|
2521
|
-
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.
|
|
2523
|
+
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.v1i_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda) + '>';
|
|
2522
2524
|
}
|
|
2523
2525
|
tmp = tmp_0;
|
|
2524
2526
|
} else {
|
|
@@ -2526,13 +2528,13 @@ protoOf(RustTransform).f20 = function (_this__u8e3s4) {
|
|
|
2526
2528
|
tmp = 'String';
|
|
2527
2529
|
} else {
|
|
2528
2530
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2529
|
-
tmp = 'Option<' + this.
|
|
2531
|
+
tmp = 'Option<' + this.x1y(_this__u8e3s4.s1i_1) + '>';
|
|
2530
2532
|
} else {
|
|
2531
2533
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2532
|
-
tmp = 'Vec<' + this.
|
|
2534
|
+
tmp = 'Vec<' + this.x1y(_this__u8e3s4.t1i_1) + '>';
|
|
2533
2535
|
} else {
|
|
2534
2536
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2535
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2537
|
+
tmp = 'std::collections::HashMap<' + this.x1y(_this__u8e3s4.b1n_1) + ', ' + this.x1y(_this__u8e3s4.c1n_1) + '>';
|
|
2536
2538
|
} else {
|
|
2537
2539
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2538
2540
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2554,7 +2556,7 @@ protoOf(RustTransform).f20 = function (_this__u8e3s4) {
|
|
|
2554
2556
|
} else {
|
|
2555
2557
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2556
2558
|
var tmp_1;
|
|
2557
|
-
switch (_this__u8e3s4.
|
|
2559
|
+
switch (_this__u8e3s4.y1m_1.c3_1) {
|
|
2558
2560
|
case 0:
|
|
2559
2561
|
tmp_1 = 'i32';
|
|
2560
2562
|
break;
|
|
@@ -2569,7 +2571,7 @@ protoOf(RustTransform).f20 = function (_this__u8e3s4) {
|
|
|
2569
2571
|
} else {
|
|
2570
2572
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2571
2573
|
var tmp_2;
|
|
2572
|
-
switch (_this__u8e3s4.
|
|
2574
|
+
switch (_this__u8e3s4.z1m_1.c3_1) {
|
|
2573
2575
|
case 0:
|
|
2574
2576
|
tmp_2 = 'f32';
|
|
2575
2577
|
break;
|
|
@@ -2589,7 +2591,7 @@ protoOf(RustTransform).f20 = function (_this__u8e3s4) {
|
|
|
2589
2591
|
tmp = 'String';
|
|
2590
2592
|
} else {
|
|
2591
2593
|
if (_this__u8e3s4 instanceof Function) {
|
|
2592
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2594
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.i1n_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.x1y(_this__u8e3s4.j1n_1) + '>';
|
|
2593
2595
|
} else {
|
|
2594
2596
|
noWhenBranchMatchedException();
|
|
2595
2597
|
}
|
|
@@ -2610,27 +2612,27 @@ protoOf(RustTransform).f20 = function (_this__u8e3s4) {
|
|
|
2610
2612
|
}
|
|
2611
2613
|
return tmp;
|
|
2612
2614
|
};
|
|
2613
|
-
protoOf(RustTransform).
|
|
2615
|
+
protoOf(RustTransform).c1z = function (_this__u8e3s4) {
|
|
2614
2616
|
var tmp;
|
|
2615
2617
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2616
2618
|
// Inline function 'kotlin.let' call
|
|
2617
|
-
var it = _this__u8e3s4.
|
|
2619
|
+
var it = _this__u8e3s4.u1i_1.y1g();
|
|
2618
2620
|
tmp = startsWith(it, '&') || startsWith(it, '&dyn ') || startsWith(it, '&impl ') || startsWith(it, '&mut ');
|
|
2619
2621
|
} else {
|
|
2620
2622
|
tmp = false;
|
|
2621
2623
|
}
|
|
2622
2624
|
return tmp;
|
|
2623
2625
|
};
|
|
2624
|
-
protoOf(RustTransform).
|
|
2626
|
+
protoOf(RustTransform).b1z = function (_this__u8e3s4) {
|
|
2625
2627
|
// Inline function 'kotlin.let' call
|
|
2626
|
-
var it = _this__u8e3s4.
|
|
2628
|
+
var it = _this__u8e3s4.u1i_1.y1g();
|
|
2627
2629
|
return it === 'Serializer' || it === 'Deserializer';
|
|
2628
2630
|
};
|
|
2629
|
-
protoOf(RustTransform).
|
|
2630
|
-
return _this__u8e3s4.
|
|
2631
|
+
protoOf(RustTransform).a1z = function (_this__u8e3s4) {
|
|
2632
|
+
return _this__u8e3s4.u1i_1.y1g() === 'GeneratorField';
|
|
2631
2633
|
};
|
|
2632
|
-
protoOf(RustTransform).
|
|
2633
|
-
var v = _this__u8e3s4.
|
|
2634
|
+
protoOf(RustTransform).z1y = function (_this__u8e3s4) {
|
|
2635
|
+
var v = _this__u8e3s4.w1i();
|
|
2634
2636
|
switch (v) {
|
|
2635
2637
|
case 'self':
|
|
2636
2638
|
case '&self':
|
|
@@ -2646,21 +2648,21 @@ function RustTransform_getInstance() {
|
|
|
2646
2648
|
return RustTransform_instance;
|
|
2647
2649
|
}
|
|
2648
2650
|
function borrow(_this__u8e3s4) {
|
|
2649
|
-
return _this__u8e3s4.
|
|
2651
|
+
return _this__u8e3s4.f1n(new Name(listOf('&' + _this__u8e3s4.u1i_1.y1g())));
|
|
2650
2652
|
}
|
|
2651
2653
|
function borrowDyn(_this__u8e3s4) {
|
|
2652
|
-
return _this__u8e3s4.
|
|
2654
|
+
return _this__u8e3s4.f1n(new Name(listOf('&dyn ' + _this__u8e3s4.u1i_1.y1g())));
|
|
2653
2655
|
}
|
|
2654
2656
|
function borrowImpl(_this__u8e3s4) {
|
|
2655
|
-
return _this__u8e3s4.
|
|
2657
|
+
return _this__u8e3s4.f1n(new Name(listOf('&impl ' + _this__u8e3s4.u1i_1.y1g())));
|
|
2656
2658
|
}
|
|
2657
2659
|
function ownedImpl(_this__u8e3s4) {
|
|
2658
|
-
return _this__u8e3s4.
|
|
2660
|
+
return _this__u8e3s4.f1n(new Name(listOf('impl ' + _this__u8e3s4.u1i_1.y1g())));
|
|
2659
2661
|
}
|
|
2660
2662
|
//region block: post-declaration
|
|
2661
|
-
protoOf(RustIrEmitter).
|
|
2662
|
-
protoOf(RustIrEmitter).
|
|
2663
|
-
protoOf(RustIrEmitter).
|
|
2663
|
+
protoOf(RustIrEmitter).f1w = get_extensions;
|
|
2664
|
+
protoOf(RustIrEmitter).no = emit_1;
|
|
2665
|
+
protoOf(RustIrEmitter).k1w = beforeGenerate;
|
|
2664
2666
|
//endregion
|
|
2665
2667
|
//region block: exports
|
|
2666
2668
|
export {
|