@flock/wirespec 0.19.0-RC.3 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +156 -156
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1547 -1547
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +444 -444
- package/kotlin-kotlin-stdlib.mjs +2347 -5055
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +20865 -6871
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1806 -1806
- package/kotlinx-io-kotlinx-io-core.mjs +432 -432
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2213 -2050
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1947 -1472
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1333 -1333
- package/package.json +14 -9
- package/wirespec-lsp.mjs +7 -0
- package/wirespec-msw.d.ts +53 -0
- package/wirespec-msw.mjs +83 -0
- package/wirespec-src-compiler-core.mjs +1752 -1688
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +457 -421
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +440 -341
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +381 -382
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +447 -424
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +172 -173
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +475 -444
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +83 -83
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3833 -3883
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +418 -418
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +510 -510
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +1584 -1510
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +4928 -0
- package/wirespec-src-ide-lsp.mjs.map +1 -0
- package/wirespec-src-plugin-arguments.mjs +183 -183
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +106 -106
- package/wirespec-src-plugin-npm.d.mts +2 -11
- package/wirespec-src-plugin-npm.mjs +47 -42
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +53 -53
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +0 -4
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +0 -1
- package/kotest-kotest-assertions-kotest-assertions-core.mjs +0 -4
- package/kotest-kotest-assertions-kotest-assertions-core.mjs.map +0 -1
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs +0 -4
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs.map +0 -1
- package/kotest-kotest-common.mjs +0 -56
- package/kotest-kotest-common.mjs.map +0 -1
- package/kotest-kotest-framework-kotest-framework-engine.mjs +0 -4
- package/kotest-kotest-framework-kotest-framework-engine.mjs.map +0 -1
- package/kotest-kotest-property-kotest-property-datetime.mjs +0 -4
- package/kotest-kotest-property-kotest-property-datetime.mjs.map +0 -1
- package/kotest-kotest-property.mjs +0 -2400
- package/kotest-kotest-property.mjs.map +0 -1
- package/kotest-property-arbs.mjs +0 -4
- package/kotest-property-arbs.mjs.map +0 -1
- package/kotlinx-coroutines-test.mjs +0 -4
- package/kotlinx-coroutines-test.mjs.map +0 -1
- package/wirespec-generator.d.ts +0 -52
- package/wirespec-generator.mjs +0 -9
- package/wirespec-src-integration-kotest.mjs +0 -1455
- package/wirespec-src-integration-kotest.mjs.map +0 -1
- package/xmlutil-core.mjs +0 -4
- package/xmlutil-core.mjs.map +0 -1
- package/xmlutil-serialization.mjs +0 -4
- package/xmlutil-serialization.mjs.map +0 -1
|
@@ -114,6 +114,7 @@ import {
|
|
|
114
114
|
sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
|
|
115
115
|
ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
|
|
116
116
|
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
117
|
+
Custom_init_$Create$2enn7oyj71j1t as Custom_init_$Create$,
|
|
117
118
|
Namespace345pal554qu3j as Namespace,
|
|
118
119
|
File3dimy4iqmuock as File,
|
|
119
120
|
transformChildrend9p91tpcqdkx as transformChildren_0,
|
|
@@ -153,7 +154,6 @@ import {
|
|
|
153
154
|
emit1oxjujel6f3jb as emit_1,
|
|
154
155
|
beforeGenerate3o8idb3hey1b0 as beforeGenerate,
|
|
155
156
|
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
156
|
-
flattenNestedStructs2956rxx8q2zxl as flattenNestedStructs,
|
|
157
157
|
Union38f3pecvfcpxh as Union_0,
|
|
158
158
|
VariableReference2vlynnhaw1i64 as VariableReference,
|
|
159
159
|
FieldCall1iz7z2fx2xo4p as FieldCall,
|
|
@@ -191,15 +191,15 @@ initMetadataForClass(RustIrEmitter, 'RustIrEmitter', RustIrEmitter, VOID, [IrEmi
|
|
|
191
191
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
192
192
|
//endregion
|
|
193
193
|
function _get_sanitizationConfig__sns434($this) {
|
|
194
|
-
var tmp0 = $this.
|
|
194
|
+
var tmp0 = $this.o1z_1;
|
|
195
195
|
var tmp = KProperty1;
|
|
196
196
|
// Inline function 'kotlin.getValue' call
|
|
197
197
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustIrEmitter$_get_sanitizationConfig_$ref_17ypni(), null);
|
|
198
|
-
return tmp0.
|
|
198
|
+
return tmp0.l1();
|
|
199
199
|
}
|
|
200
200
|
function sanitize($this, _this__u8e3s4) {
|
|
201
201
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
202
|
-
var this_0 = split(_this__u8e3s4.
|
|
202
|
+
var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
|
|
203
203
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
204
204
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
205
205
|
var index = 0;
|
|
@@ -208,7 +208,7 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
208
208
|
var item = _iterator__ex2g4s.v();
|
|
209
209
|
var _unary__edvuaz = index;
|
|
210
210
|
index = _unary__edvuaz + 1 | 0;
|
|
211
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
211
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.er(item) : item;
|
|
212
212
|
destination.x(tmp$ret$0);
|
|
213
213
|
}
|
|
214
214
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -255,14 +255,14 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
255
255
|
return toSnakeCase($this, tmp$ret$9);
|
|
256
256
|
}
|
|
257
257
|
function toSnakeCase($this, _this__u8e3s4) {
|
|
258
|
-
return Companion_getInstance().
|
|
258
|
+
return Companion_getInstance().n1h(_this__u8e3s4).w1m();
|
|
259
259
|
}
|
|
260
260
|
function toPascalCase($this, _this__u8e3s4) {
|
|
261
261
|
var tmp = split(_this__u8e3s4, ['_']);
|
|
262
262
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustIrEmitter$toPascalCase$lambda);
|
|
263
263
|
}
|
|
264
264
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
265
|
-
return Companion_getInstance_0().
|
|
265
|
+
return Companion_getInstance_0().r1z_1.u1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
266
266
|
}
|
|
267
267
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
268
268
|
// Inline function 'kotlin.let' call
|
|
@@ -287,7 +287,7 @@ function prependImports($this, _this__u8e3s4, imports) {
|
|
|
287
287
|
var tmp;
|
|
288
288
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
289
289
|
if (!imports.r()) {
|
|
290
|
-
tmp = _this__u8e3s4.
|
|
290
|
+
tmp = _this__u8e3s4.y1n(VOID, plus(imports, _this__u8e3s4.v1n_1));
|
|
291
291
|
} else {
|
|
292
292
|
tmp = _this__u8e3s4;
|
|
293
293
|
}
|
|
@@ -299,7 +299,7 @@ function containsWildcard($this, type) {
|
|
|
299
299
|
tmp = true;
|
|
300
300
|
} else {
|
|
301
301
|
if (type instanceof Custom) {
|
|
302
|
-
var tmp0 = type.
|
|
302
|
+
var tmp0 = type.i1j_1;
|
|
303
303
|
var tmp$ret$0;
|
|
304
304
|
$l$block_0: {
|
|
305
305
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -326,13 +326,13 @@ function containsWildcard($this, type) {
|
|
|
326
326
|
tmp = tmp$ret$0;
|
|
327
327
|
} else {
|
|
328
328
|
if (type instanceof Nullable) {
|
|
329
|
-
tmp = containsWildcard($this, type.
|
|
329
|
+
tmp = containsWildcard($this, type.f1j_1);
|
|
330
330
|
} else {
|
|
331
331
|
if (type instanceof Array_0) {
|
|
332
|
-
tmp = containsWildcard($this, type.
|
|
332
|
+
tmp = containsWildcard($this, type.g1j_1);
|
|
333
333
|
} else {
|
|
334
334
|
if (type instanceof Dict) {
|
|
335
|
-
tmp = containsWildcard($this, type.
|
|
335
|
+
tmp = containsWildcard($this, type.h1n_1) || containsWildcard($this, type.i1n_1);
|
|
336
336
|
} else {
|
|
337
337
|
tmp = false;
|
|
338
338
|
}
|
|
@@ -354,7 +354,7 @@ function containsUnderiveable($this, type) {
|
|
|
354
354
|
tmp = true;
|
|
355
355
|
} else {
|
|
356
356
|
if (type instanceof Custom) {
|
|
357
|
-
var tmp0 = type.
|
|
357
|
+
var tmp0 = type.i1j_1;
|
|
358
358
|
var tmp$ret$0;
|
|
359
359
|
$l$block_0: {
|
|
360
360
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -381,13 +381,13 @@ function containsUnderiveable($this, type) {
|
|
|
381
381
|
tmp = tmp$ret$0;
|
|
382
382
|
} else {
|
|
383
383
|
if (type instanceof Nullable) {
|
|
384
|
-
tmp = containsUnderiveable($this, type.
|
|
384
|
+
tmp = containsUnderiveable($this, type.f1j_1);
|
|
385
385
|
} else {
|
|
386
386
|
if (type instanceof Array_0) {
|
|
387
|
-
tmp = containsUnderiveable($this, type.
|
|
387
|
+
tmp = containsUnderiveable($this, type.g1j_1);
|
|
388
388
|
} else {
|
|
389
389
|
if (type instanceof Dict) {
|
|
390
|
-
tmp = containsUnderiveable($this, type.
|
|
390
|
+
tmp = containsUnderiveable($this, type.h1n_1) || containsUnderiveable($this, type.i1n_1);
|
|
391
391
|
} else {
|
|
392
392
|
tmp = false;
|
|
393
393
|
}
|
|
@@ -413,7 +413,7 @@ function buildClientParams($this, _this__u8e3s4) {
|
|
|
413
413
|
}
|
|
414
414
|
function Companion() {
|
|
415
415
|
Companion_instance_2 = this;
|
|
416
|
-
this.
|
|
416
|
+
this.r1z_1 = setOf(['as', 'break', 'const', 'continue', 'crate', 'else', 'enum', 'extern', 'false', 'fn', 'for', 'if', 'impl', 'in', 'let', 'loop', 'match', 'mod', 'move', 'mut', 'pub', 'ref', 'return', 'self', 'Self', 'static', 'struct', 'super', 'trait', 'true', 'type', 'unsafe', 'use', 'where', 'while', 'async', 'await', 'dyn', 'abstract', 'become', 'box', 'do', 'final', 'macro', 'override', 'priv', 'typeof', 'unsized', 'virtual', 'yield', 'try']);
|
|
417
417
|
}
|
|
418
418
|
var Companion_instance_2;
|
|
419
419
|
function Companion_getInstance_0() {
|
|
@@ -422,23 +422,23 @@ function Companion_getInstance_0() {
|
|
|
422
422
|
return Companion_instance_2;
|
|
423
423
|
}
|
|
424
424
|
function sam$kotlin_Comparator$0(function_0) {
|
|
425
|
-
this.
|
|
425
|
+
this.s1z_1 = function_0;
|
|
426
426
|
}
|
|
427
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
428
|
-
return this.
|
|
427
|
+
protoOf(sam$kotlin_Comparator$0).td = function (a, b) {
|
|
428
|
+
return this.s1z_1(a, b);
|
|
429
429
|
};
|
|
430
430
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
431
|
-
return this.
|
|
431
|
+
return this.td(a, b);
|
|
432
432
|
};
|
|
433
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
434
|
-
return this.
|
|
433
|
+
protoOf(sam$kotlin_Comparator$0).l3 = function () {
|
|
434
|
+
return this.s1z_1;
|
|
435
435
|
};
|
|
436
436
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
437
437
|
var tmp;
|
|
438
438
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
439
439
|
var tmp_0;
|
|
440
440
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
441
|
-
tmp_0 = equals(this.
|
|
441
|
+
tmp_0 = equals(this.l3(), other.l3());
|
|
442
442
|
} else {
|
|
443
443
|
tmp_0 = false;
|
|
444
444
|
}
|
|
@@ -449,45 +449,59 @@ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
|
449
449
|
return tmp;
|
|
450
450
|
};
|
|
451
451
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
452
|
-
return hashCode(this.
|
|
452
|
+
return hashCode(this.l3());
|
|
453
453
|
};
|
|
454
454
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
455
455
|
return 'r#' + it;
|
|
456
456
|
}
|
|
457
457
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
458
|
-
return Companion_getInstance().
|
|
458
|
+
return Companion_getInstance().n1h((new Name(name.l1h_1)).w1m());
|
|
459
459
|
}
|
|
460
460
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
461
|
-
var value = name.
|
|
461
|
+
var value = name.j1j();
|
|
462
462
|
switch (value) {
|
|
463
463
|
case 'self':
|
|
464
464
|
case '&self':
|
|
465
465
|
return name;
|
|
466
466
|
default:
|
|
467
|
-
return Companion_getInstance().
|
|
467
|
+
return Companion_getInstance().n1h((new Name(name.l1h_1)).w1m());
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
471
|
-
|
|
471
|
+
var tmp;
|
|
472
|
+
var tmp0_safe_receiver = firstOrNull(it);
|
|
473
|
+
var tmp_0;
|
|
474
|
+
var tmp_1 = tmp0_safe_receiver;
|
|
475
|
+
if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
|
|
476
|
+
tmp_0 = null;
|
|
477
|
+
} else {
|
|
478
|
+
tmp_0 = isDigit(tmp0_safe_receiver);
|
|
479
|
+
}
|
|
480
|
+
if (tmp_0 === true) {
|
|
481
|
+
tmp = '_' + it;
|
|
482
|
+
} else {
|
|
483
|
+
tmp = it;
|
|
484
|
+
}
|
|
485
|
+
return tmp;
|
|
472
486
|
}
|
|
473
487
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
474
488
|
return function (stmt, tr) {
|
|
475
489
|
var tmp;
|
|
476
490
|
if (stmt instanceof ConstructorStatement) {
|
|
477
|
-
var tmp_0 = tr.
|
|
491
|
+
var tmp_0 = tr.x1u(stmt.r1n_1);
|
|
478
492
|
// Inline function 'kotlin.collections.map' call
|
|
479
|
-
var this_0 = stmt.
|
|
493
|
+
var this_0 = stmt.s1n_1;
|
|
480
494
|
// Inline function 'kotlin.collections.mapTo' call
|
|
481
495
|
var destination = ArrayList_init_$Create$(this_0.a1());
|
|
482
496
|
// Inline function 'kotlin.collections.iterator' call
|
|
483
|
-
var _iterator__ex2g4s = this_0.
|
|
497
|
+
var _iterator__ex2g4s = this_0.j1().t();
|
|
484
498
|
while (_iterator__ex2g4s.u()) {
|
|
485
499
|
var item = _iterator__ex2g4s.v();
|
|
486
500
|
// Inline function 'kotlin.collections.component1' call
|
|
487
|
-
var k = item.
|
|
501
|
+
var k = item.k1();
|
|
488
502
|
// Inline function 'kotlin.collections.component2' call
|
|
489
|
-
var v = item.
|
|
490
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
503
|
+
var v = item.l1();
|
|
504
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.a1v(v));
|
|
491
505
|
destination.x(tmp$ret$3);
|
|
492
506
|
}
|
|
493
507
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -499,7 +513,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
499
513
|
}
|
|
500
514
|
function RustIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
501
515
|
return function () {
|
|
502
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
516
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().r1z_1, setOf(['self', 'Self']));
|
|
503
517
|
var tmp = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
504
518
|
var tmp_0 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
505
519
|
var tmp_1 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -513,69 +527,69 @@ function RustIrEmitter$_get_sanitizationConfig_$ref_17ypni() {
|
|
|
513
527
|
};
|
|
514
528
|
}
|
|
515
529
|
function RustIrEmitter$emitShared$lambda($this$interface) {
|
|
516
|
-
$this$interface.
|
|
530
|
+
$this$interface.w1j(Custom_init_$Create$('Headers'));
|
|
517
531
|
return Unit_instance;
|
|
518
532
|
}
|
|
519
533
|
function RustIrEmitter$emitShared$lambda_0($this$interface) {
|
|
520
|
-
$this$interface.
|
|
534
|
+
$this$interface.w1j(Custom_init_$Create$('Headers'));
|
|
521
535
|
return Unit_instance;
|
|
522
536
|
}
|
|
523
537
|
function RustIrEmitter$emitShared$lambda_1($this$interface) {
|
|
524
|
-
$this$interface.
|
|
525
|
-
$this$interface.
|
|
526
|
-
$this$interface.
|
|
538
|
+
$this$interface.w1j(Custom_init_$Create$('Sized'));
|
|
539
|
+
$this$interface.c1i('label', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda);
|
|
540
|
+
$this$interface.c1i('from_label', true, VOID, RustIrEmitter$emitShared$lambda$lambda_0);
|
|
527
541
|
return Unit_instance;
|
|
528
542
|
}
|
|
529
543
|
function RustIrEmitter$emitShared$lambda$lambda($this$function) {
|
|
530
|
-
$this$function.
|
|
531
|
-
$this$function.
|
|
544
|
+
$this$function.x1h('&self', Custom_init_$Create$(''));
|
|
545
|
+
$this$function.a1i(Custom_init_$Create$('&str'));
|
|
532
546
|
return Unit_instance;
|
|
533
547
|
}
|
|
534
548
|
function RustIrEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
535
|
-
$this$function.
|
|
536
|
-
$this$function.
|
|
549
|
+
$this$function.x1h('s', Custom_init_$Create$('&str'));
|
|
550
|
+
$this$function.a1i(Custom_init_$Create$('Option<Self>'));
|
|
537
551
|
return Unit_instance;
|
|
538
552
|
}
|
|
539
553
|
function RustIrEmitter$emitShared$lambda_2($this$interface) {
|
|
540
|
-
$this$interface.
|
|
541
|
-
$this$interface.
|
|
542
|
-
$this$interface.
|
|
554
|
+
$this$interface.q1j($this$interface.o1h('T', []), []);
|
|
555
|
+
$this$interface.c1i('value', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_1);
|
|
556
|
+
$this$interface.c1i('validate', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_2);
|
|
543
557
|
return Unit_instance;
|
|
544
558
|
}
|
|
545
559
|
function RustIrEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
546
|
-
$this$function.
|
|
547
|
-
$this$function.
|
|
560
|
+
$this$function.x1h('&self', Custom_init_$Create$(''));
|
|
561
|
+
$this$function.a1i(borrow($this$function.o1h('T', [])));
|
|
548
562
|
return Unit_instance;
|
|
549
563
|
}
|
|
550
564
|
function RustIrEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
551
|
-
$this$function.
|
|
552
|
-
$this$function.
|
|
565
|
+
$this$function.x1h('&self', Custom_init_$Create$(''));
|
|
566
|
+
$this$function.a1i($this$function.x1j());
|
|
553
567
|
return Unit_instance;
|
|
554
568
|
}
|
|
555
569
|
function RustIrEmitter$emitShared$lambda_3($this$interface) {
|
|
556
|
-
$this$interface.
|
|
557
|
-
$this$interface.
|
|
558
|
-
$this$interface.
|
|
559
|
-
$this$interface.
|
|
560
|
-
$this$interface.
|
|
561
|
-
$this$interface.
|
|
570
|
+
$this$interface.q1j($this$interface.o1h('T', []), []);
|
|
571
|
+
$this$interface.r1j('path', borrowDyn($this$interface.o1h('Path', [])));
|
|
572
|
+
$this$interface.r1j('method', borrow($this$interface.o1h('Method', [])));
|
|
573
|
+
$this$interface.r1j('queries', borrowDyn($this$interface.o1h('Queries', [])));
|
|
574
|
+
$this$interface.r1j('headers', borrowDyn($this$interface.o1h('RequestHeaders', [])));
|
|
575
|
+
$this$interface.r1j('body', borrow($this$interface.o1h('T', [])));
|
|
562
576
|
return Unit_instance;
|
|
563
577
|
}
|
|
564
578
|
function RustIrEmitter$emitShared$lambda_4($this$interface) {
|
|
565
|
-
$this$interface.
|
|
566
|
-
$this$interface.
|
|
567
|
-
$this$interface.
|
|
568
|
-
$this$interface.
|
|
579
|
+
$this$interface.q1j($this$interface.o1h('T', []), []);
|
|
580
|
+
$this$interface.r1j('status', $this$interface.w1k());
|
|
581
|
+
$this$interface.r1j('headers', borrowDyn($this$interface.o1h('ResponseHeaders', [])));
|
|
582
|
+
$this$interface.r1j('body', borrow($this$interface.o1h('T', [])));
|
|
569
583
|
return Unit_instance;
|
|
570
584
|
}
|
|
571
585
|
function RustIrEmitter$emitShared$lambda_5($this$interface) {
|
|
572
|
-
$this$interface.
|
|
586
|
+
$this$interface.t1k('transport', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_3);
|
|
573
587
|
return Unit_instance;
|
|
574
588
|
}
|
|
575
589
|
function RustIrEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
576
|
-
$this$asyncFunction.
|
|
577
|
-
$this$asyncFunction.
|
|
578
|
-
$this$asyncFunction.
|
|
590
|
+
$this$asyncFunction.x1h('&self', Custom_init_$Create$(''));
|
|
591
|
+
$this$asyncFunction.x1h('request', borrow($this$asyncFunction.o1h('RawRequest', [])));
|
|
592
|
+
$this$asyncFunction.a1i($this$asyncFunction.o1h('RawResponse', []));
|
|
579
593
|
return Unit_instance;
|
|
580
594
|
}
|
|
581
595
|
function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -583,7 +597,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
583
597
|
var tmp;
|
|
584
598
|
if (element instanceof File) {
|
|
585
599
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
586
|
-
var tmp0 = element.
|
|
600
|
+
var tmp0 = element.v1n_1;
|
|
587
601
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
588
602
|
var destination = ArrayList_init_$Create$_0();
|
|
589
603
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -594,7 +608,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
594
608
|
}
|
|
595
609
|
}
|
|
596
610
|
var namespace = first(destination);
|
|
597
|
-
tmp = element.
|
|
611
|
+
tmp = element.y1n(VOID, plus($rustImports, namespace.b1o_1));
|
|
598
612
|
} else {
|
|
599
613
|
tmp = element;
|
|
600
614
|
}
|
|
@@ -606,7 +620,7 @@ function RustIrEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
606
620
|
var tmp;
|
|
607
621
|
if (element instanceof Enum_0) {
|
|
608
622
|
var tmp_0;
|
|
609
|
-
if (element.
|
|
623
|
+
if (element.a1p_1.equals(Companion_getInstance().n1h('Method'))) {
|
|
610
624
|
tmp_0 = new RawElement('#[derive(Debug, Clone, Default, PartialEq)]\npub enum Method {\n #[default]\n GET,\n PUT,\n POST,\n DELETE,\n OPTIONS,\n HEAD,\n PATCH,\n TRACE,\n}');
|
|
611
625
|
} else {
|
|
612
626
|
tmp_0 = element;
|
|
@@ -623,7 +637,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
623
637
|
var tmp;
|
|
624
638
|
if (element instanceof File) {
|
|
625
639
|
// Inline function 'kotlin.collections.flatMap' call
|
|
626
|
-
var tmp0 = element.
|
|
640
|
+
var tmp0 = element.v1n_1;
|
|
627
641
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
628
642
|
var destination = ArrayList_init_$Create$_0();
|
|
629
643
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -635,30 +649,30 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
635
649
|
tmp$ret$0 = listOf(element_0);
|
|
636
650
|
break $l$block;
|
|
637
651
|
}
|
|
638
|
-
var name = element_0.
|
|
652
|
+
var name = element_0.o1o_1.y1i();
|
|
639
653
|
var tmp_0;
|
|
640
654
|
// Inline function 'kotlin.collections.contains' call
|
|
641
655
|
// Inline function 'kotlin.collections.containsKey' call
|
|
642
656
|
var this_0 = $dslTraits;
|
|
643
|
-
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).
|
|
657
|
+
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).n2(name)) {
|
|
644
658
|
// Inline function 'kotlin.collections.buildList' call
|
|
645
659
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
646
660
|
// Inline function 'kotlin.apply' call
|
|
647
661
|
var this_1 = ArrayList_init_$Create$_0();
|
|
648
|
-
this_1.x(ensureNotNull($dslTraits.
|
|
662
|
+
this_1.x(ensureNotNull($dslTraits.p2(name)));
|
|
649
663
|
if (name === 'Request') {
|
|
650
664
|
this_1.x($requestHeaders);
|
|
651
665
|
}
|
|
652
666
|
if (name === 'Response') {
|
|
653
667
|
this_1.x($responseHeaders);
|
|
654
668
|
}
|
|
655
|
-
tmp_0 = this_1.
|
|
669
|
+
tmp_0 = this_1.o5();
|
|
656
670
|
} else {
|
|
657
671
|
// Inline function 'kotlin.collections.contains' call
|
|
658
672
|
// Inline function 'kotlin.collections.containsKey' call
|
|
659
673
|
var this_2 = $rawElementInterfaces;
|
|
660
|
-
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).
|
|
661
|
-
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.
|
|
674
|
+
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).n2(name)) {
|
|
675
|
+
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.p2(name)));
|
|
662
676
|
} else {
|
|
663
677
|
tmp_0 = listOf(element_0);
|
|
664
678
|
}
|
|
@@ -669,7 +683,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
669
683
|
addAll(destination, list);
|
|
670
684
|
}
|
|
671
685
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
672
|
-
tmp = element.
|
|
686
|
+
tmp = element.y1n(VOID, newElements);
|
|
673
687
|
} else {
|
|
674
688
|
tmp = element;
|
|
675
689
|
}
|
|
@@ -685,14 +699,14 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
685
699
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
686
700
|
var tmp_0 = scope;
|
|
687
701
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
688
|
-
var this_0 = scope.
|
|
702
|
+
var this_0 = scope.f1v_1;
|
|
689
703
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
690
704
|
// Inline function 'kotlin.apply' call
|
|
691
705
|
var this_1 = new TransformerBuilder();
|
|
692
|
-
this_1.
|
|
693
|
-
var tmp$ret$2 = this_1.
|
|
694
|
-
tmp_0.
|
|
695
|
-
var tmp_1 = scope.
|
|
706
|
+
this_1.w1i(RustIrEmitter$emitShared$lambda$lambda_4);
|
|
707
|
+
var tmp$ret$2 = this_1.x1i();
|
|
708
|
+
tmp_0.f1v_1 = transform(this_0, tmp$ret$2);
|
|
709
|
+
var tmp_1 = scope.f1v_1;
|
|
696
710
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
697
711
|
} else {
|
|
698
712
|
tmp = element;
|
|
@@ -703,7 +717,7 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
703
717
|
function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
704
718
|
var tmp;
|
|
705
719
|
if (element instanceof Function_0) {
|
|
706
|
-
var tmp0 = element.
|
|
720
|
+
var tmp0 = element.f1l_1;
|
|
707
721
|
var tmp$ret$0;
|
|
708
722
|
$l$block_0: {
|
|
709
723
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -720,7 +734,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
720
734
|
var _iterator__ex2g4s = tmp0.t();
|
|
721
735
|
while (_iterator__ex2g4s.u()) {
|
|
722
736
|
var element_0 = _iterator__ex2g4s.v();
|
|
723
|
-
if (element_0.
|
|
737
|
+
if (element_0.x1p_1.j1j() === '&self' || element_0.x1p_1.j1j() === 'self') {
|
|
724
738
|
tmp$ret$0 = true;
|
|
725
739
|
break $l$block_0;
|
|
726
740
|
}
|
|
@@ -728,7 +742,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
728
742
|
tmp$ret$0 = false;
|
|
729
743
|
}
|
|
730
744
|
var hasSelf = tmp$ret$0;
|
|
731
|
-
tmp = hasSelf || element.
|
|
745
|
+
tmp = hasSelf || element.j1l_1 ? element : element.l1l(VOID, VOID, plus(listOf(get_rustSelfParam()), element.f1l_1));
|
|
732
746
|
} else {
|
|
733
747
|
tmp = element;
|
|
734
748
|
}
|
|
@@ -739,7 +753,7 @@ function RustIrEmitter$emitShared$lambda_10(group) {
|
|
|
739
753
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
740
754
|
}
|
|
741
755
|
function RustIrEmitter$emitShared$lambda$lambda_5(it) {
|
|
742
|
-
return RustGenerator_instance.
|
|
756
|
+
return RustGenerator_instance.t1v(it);
|
|
743
757
|
}
|
|
744
758
|
function RustIrEmitter$emit$lambda(a, b) {
|
|
745
759
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -748,7 +762,7 @@ function RustIrEmitter$emit$lambda(a, b) {
|
|
|
748
762
|
return compareValues(tmp, tmp$ret$1);
|
|
749
763
|
}
|
|
750
764
|
function emit$emitMod(this$0, def) {
|
|
751
|
-
return 'pub mod ' + sanitize(this$0, def.
|
|
765
|
+
return 'pub mod ' + sanitize(this$0, def.mr()) + ';';
|
|
752
766
|
}
|
|
753
767
|
function RustIrEmitter$emit$lambda_0(this$0) {
|
|
754
768
|
return function (it) {
|
|
@@ -777,17 +791,17 @@ function RustIrEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs)
|
|
|
777
791
|
var tmp_0;
|
|
778
792
|
var tmp_1;
|
|
779
793
|
if (expr instanceof RawExpression) {
|
|
780
|
-
tmp_1 = endsWith(expr.
|
|
794
|
+
tmp_1 = endsWith(expr.l1p_1, 'Generator');
|
|
781
795
|
} else {
|
|
782
796
|
tmp_1 = false;
|
|
783
797
|
}
|
|
784
798
|
if (tmp_1) {
|
|
785
|
-
tmp_0 = !(expr.
|
|
799
|
+
tmp_0 = !(expr.l1p_1 === $generatorOwnName);
|
|
786
800
|
} else {
|
|
787
801
|
tmp_0 = false;
|
|
788
802
|
}
|
|
789
803
|
if (tmp_0) {
|
|
790
|
-
$generatorRefs.x(expr.
|
|
804
|
+
$generatorRefs.x(expr.l1p_1);
|
|
791
805
|
tmp = Unit_instance;
|
|
792
806
|
}
|
|
793
807
|
return transformChildren_1(expr, t);
|
|
@@ -800,7 +814,7 @@ function RustIrEmitter$emit$lambda_2(this$0) {
|
|
|
800
814
|
}
|
|
801
815
|
function RustIrEmitter$emitClient$lambda(this$0) {
|
|
802
816
|
return function (endpoint) {
|
|
803
|
-
return 'pub mod ' + toSnakeCase(this$0, endpoint.
|
|
817
|
+
return 'pub mod ' + toSnakeCase(this$0, endpoint.up_1.l1() + 'Client') + ';';
|
|
804
818
|
};
|
|
805
819
|
}
|
|
806
820
|
function RustIrEmitter$toPascalCase$lambda(s) {
|
|
@@ -820,39 +834,39 @@ function RustIrEmitter$toPascalCase$lambda(s) {
|
|
|
820
834
|
}
|
|
821
835
|
function RustIrEmitter$buildClientParams$lambda(this$0) {
|
|
822
836
|
return function (_destruct__k2r9zo) {
|
|
823
|
-
var name = _destruct__k2r9zo.
|
|
824
|
-
return sanitizeKeywords(this$0, name.
|
|
837
|
+
var name = _destruct__k2r9zo.ve();
|
|
838
|
+
return sanitizeKeywords(this$0, name.w1m());
|
|
825
839
|
};
|
|
826
840
|
}
|
|
827
841
|
function RustIrEmitter$buildClientParams$lambda_0(this$0) {
|
|
828
842
|
return function (_destruct__k2r9zo) {
|
|
829
|
-
var name = _destruct__k2r9zo.
|
|
830
|
-
var type = _destruct__k2r9zo.
|
|
831
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
843
|
+
var name = _destruct__k2r9zo.ve();
|
|
844
|
+
var type = _destruct__k2r9zo.we();
|
|
845
|
+
var tmp = sanitizeKeywords(this$0, name.w1m());
|
|
832
846
|
// Inline function 'kotlin.with' call
|
|
833
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
847
|
+
return tmp + ': ' + RustTransform_getInstance().z1z(type);
|
|
834
848
|
};
|
|
835
849
|
}
|
|
836
850
|
function RustIrEmitter(packageName, emitShared) {
|
|
837
851
|
Companion_getInstance_0();
|
|
838
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
839
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
840
|
-
this.
|
|
841
|
-
this.
|
|
842
|
-
this.
|
|
843
|
-
this.
|
|
852
|
+
packageName = packageName === VOID ? Companion_instance_0.cs('community.flock.wirespec.generated') : packageName;
|
|
853
|
+
emitShared = emitShared === VOID ? Companion_instance_1.wo() : emitShared;
|
|
854
|
+
this.k1z_1 = packageName;
|
|
855
|
+
this.l1z_1 = emitShared;
|
|
856
|
+
this.m1z_1 = RustGenerator_instance;
|
|
857
|
+
this.n1z_1 = FileExtension_Rust_getInstance();
|
|
844
858
|
var tmp = this;
|
|
845
|
-
tmp.
|
|
846
|
-
this.
|
|
847
|
-
this.
|
|
859
|
+
tmp.o1z_1 = lazy(RustIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
860
|
+
this.p1z_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
861
|
+
this.q1z_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
848
862
|
}
|
|
849
|
-
protoOf(RustIrEmitter).
|
|
850
|
-
return this.
|
|
863
|
+
protoOf(RustIrEmitter).s1v = function () {
|
|
864
|
+
return this.m1z_1;
|
|
851
865
|
};
|
|
852
|
-
protoOf(RustIrEmitter).
|
|
853
|
-
return this.
|
|
866
|
+
protoOf(RustIrEmitter).uq = function () {
|
|
867
|
+
return this.n1z_1;
|
|
854
868
|
};
|
|
855
|
-
protoOf(RustIrEmitter).
|
|
869
|
+
protoOf(RustIrEmitter).v1v = function () {
|
|
856
870
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
857
871
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustIrEmitter$emitShared$lambda);
|
|
858
872
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustIrEmitter$emitShared$lambda_0);
|
|
@@ -866,43 +880,43 @@ protoOf(RustIrEmitter).b1z = function () {
|
|
|
866
880
|
var transportationTrait = interface_0('Transportation', VOID, RustIrEmitter$emitShared$lambda_5);
|
|
867
881
|
var dslTraits = mapOf([to('Enum', enumTrait), to('Refined', refinedTrait), to('Request', requestTrait), to('Response', responseTrait), to('Transportation', transportationTrait)]);
|
|
868
882
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
869
|
-
var this_0 = convert(Companion_instance_0.
|
|
883
|
+
var this_0 = convert(Companion_instance_0.cs('shared'));
|
|
870
884
|
var scope = new TransformScope(this_0);
|
|
871
885
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
872
886
|
var tmp = scope;
|
|
873
887
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
874
|
-
var this_1 = scope.
|
|
888
|
+
var this_1 = scope.f1v_1;
|
|
875
889
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
876
890
|
// Inline function 'kotlin.apply' call
|
|
877
891
|
var this_2 = new TransformerBuilder();
|
|
878
|
-
this_2.
|
|
879
|
-
var tmp$ret$2 = this_2.
|
|
880
|
-
tmp.
|
|
892
|
+
this_2.w1i(RustIrEmitter$emitShared$lambda_6(rustImports));
|
|
893
|
+
var tmp$ret$2 = this_2.x1i();
|
|
894
|
+
tmp.f1v_1 = transform(this_1, tmp$ret$2);
|
|
881
895
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
882
896
|
var tmp_0 = scope;
|
|
883
897
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
884
|
-
var this_3 = scope.
|
|
898
|
+
var this_3 = scope.f1v_1;
|
|
885
899
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
886
900
|
// Inline function 'kotlin.apply' call
|
|
887
901
|
var this_4 = new TransformerBuilder();
|
|
888
|
-
this_4.
|
|
889
|
-
var tmp$ret$7 = this_4.
|
|
890
|
-
tmp_0.
|
|
902
|
+
this_4.w1i(RustIrEmitter$emitShared$lambda_7);
|
|
903
|
+
var tmp$ret$7 = this_4.x1i();
|
|
904
|
+
tmp_0.f1v_1 = transform(this_3, tmp$ret$7);
|
|
891
905
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
892
906
|
var tmp_1 = scope;
|
|
893
907
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
894
|
-
var this_5 = scope.
|
|
908
|
+
var this_5 = scope.f1v_1;
|
|
895
909
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
896
910
|
// Inline function 'kotlin.apply' call
|
|
897
911
|
var this_6 = new TransformerBuilder();
|
|
898
|
-
this_6.
|
|
899
|
-
var tmp$ret$12 = this_6.
|
|
900
|
-
tmp_1.
|
|
901
|
-
var tmp_2 = scope.
|
|
912
|
+
this_6.w1i(RustIrEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
913
|
+
var tmp$ret$12 = this_6.x1i();
|
|
914
|
+
tmp_1.f1v_1 = transform(this_5, tmp$ret$12);
|
|
915
|
+
var tmp_2 = scope.f1v_1;
|
|
902
916
|
// Inline function 'kotlin.let' call
|
|
903
917
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
904
918
|
// Inline function 'kotlin.collections.flatMap' call
|
|
905
|
-
var tmp0 = file.
|
|
919
|
+
var tmp0 = file.v1n_1;
|
|
906
920
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
907
921
|
var destination = ArrayList_init_$Create$_0();
|
|
908
922
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -915,7 +929,7 @@ protoOf(RustIrEmitter).b1z = function () {
|
|
|
915
929
|
break $l$block;
|
|
916
930
|
}
|
|
917
931
|
var tmp_3;
|
|
918
|
-
var tmp0_0 = element.
|
|
932
|
+
var tmp0_0 = element.g1o_1;
|
|
919
933
|
var tmp$ret$18;
|
|
920
934
|
$l$block_1: {
|
|
921
935
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -932,7 +946,7 @@ protoOf(RustIrEmitter).b1z = function () {
|
|
|
932
946
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
933
947
|
while (_iterator__ex2g4s_0.u()) {
|
|
934
948
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
935
|
-
if (containsUnderiveable(this, element_0.
|
|
949
|
+
if (containsUnderiveable(this, element_0.c1q_1)) {
|
|
936
950
|
tmp$ret$18 = true;
|
|
937
951
|
break $l$block_1;
|
|
938
952
|
}
|
|
@@ -942,7 +956,7 @@ protoOf(RustIrEmitter).b1z = function () {
|
|
|
942
956
|
if (tmp$ret$18) {
|
|
943
957
|
tmp_3 = '';
|
|
944
958
|
} else {
|
|
945
|
-
var tmp0_1 = element.
|
|
959
|
+
var tmp0_1 = element.g1o_1;
|
|
946
960
|
var tmp$ret$20;
|
|
947
961
|
$l$block_3: {
|
|
948
962
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -959,7 +973,7 @@ protoOf(RustIrEmitter).b1z = function () {
|
|
|
959
973
|
var _iterator__ex2g4s_1 = tmp0_1.t();
|
|
960
974
|
while (_iterator__ex2g4s_1.u()) {
|
|
961
975
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
962
|
-
if (containsWildcard(this, element_1.
|
|
976
|
+
if (containsWildcard(this, element_1.c1q_1)) {
|
|
963
977
|
tmp$ret$20 = true;
|
|
964
978
|
break $l$block_3;
|
|
965
979
|
}
|
|
@@ -969,7 +983,7 @@ protoOf(RustIrEmitter).b1z = function () {
|
|
|
969
983
|
if (tmp$ret$20) {
|
|
970
984
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
971
985
|
} else {
|
|
972
|
-
if (setOf(['RawRequest', 'RawResponse']).
|
|
986
|
+
if (setOf(['RawRequest', 'RawResponse']).u1(element.f1o_1.y1i())) {
|
|
973
987
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
974
988
|
} else {
|
|
975
989
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -985,29 +999,29 @@ protoOf(RustIrEmitter).b1z = function () {
|
|
|
985
999
|
tmp_6 = listOf(new RawElement(derive));
|
|
986
1000
|
}
|
|
987
1001
|
var prefix = tmp_6;
|
|
988
|
-
tmp$ret$17 = listOf(new File(element.
|
|
1002
|
+
tmp$ret$17 = listOf(new File(element.f1o_1, plus_0(prefix, element)));
|
|
989
1003
|
}
|
|
990
1004
|
var list = tmp$ret$17;
|
|
991
1005
|
addAll(destination, list);
|
|
992
1006
|
}
|
|
993
|
-
var tmp0_2 = new File(file.
|
|
1007
|
+
var tmp0_2 = new File(file.u1n_1, destination);
|
|
994
1008
|
// Inline function 'kotlin.let' call
|
|
995
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1009
|
+
var wirespecFile = RustTransform_getInstance().a20(tmp0_2);
|
|
996
1010
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
997
1011
|
var scope_0 = new TransformScope(wirespecFile);
|
|
998
1012
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
999
1013
|
var tmp_7 = scope_0;
|
|
1000
1014
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1001
|
-
var this_7 = scope_0.
|
|
1015
|
+
var this_7 = scope_0.f1v_1;
|
|
1002
1016
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1003
1017
|
// Inline function 'kotlin.apply' call
|
|
1004
1018
|
var this_8 = new TransformerBuilder();
|
|
1005
|
-
this_8.
|
|
1006
|
-
var tmp$ret$31 = this_8.
|
|
1007
|
-
tmp_7.
|
|
1008
|
-
var tmp_8 = scope_0.
|
|
1019
|
+
this_8.w1i(RustIrEmitter$emitShared$lambda_9);
|
|
1020
|
+
var tmp$ret$31 = this_8.x1i();
|
|
1021
|
+
tmp_7.f1v_1 = transform(this_7, tmp$ret$31);
|
|
1022
|
+
var tmp_8 = scope_0.f1v_1;
|
|
1009
1023
|
// Inline function 'kotlin.let' call
|
|
1010
|
-
var tmp0_3 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1024
|
+
var tmp0_3 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).v1n_1;
|
|
1011
1025
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1012
1026
|
// Inline function 'kotlin.collections.fold' call
|
|
1013
1027
|
var accumulator = ArrayList_init_$Create$_0();
|
|
@@ -1028,26 +1042,26 @@ protoOf(RustIrEmitter).b1z = function () {
|
|
|
1028
1042
|
var groups = accumulator;
|
|
1029
1043
|
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda_10) + '\n';
|
|
1030
1044
|
var tmp_10;
|
|
1031
|
-
if (this.
|
|
1032
|
-
tmp_10 = new File(Companion_getInstance().
|
|
1045
|
+
if (this.l1z_1.xo_1) {
|
|
1046
|
+
tmp_10 = new File(Companion_getInstance().n1h(this.k1z_1.fs() + 'wirespec'), listOf(new RawElement(source)));
|
|
1033
1047
|
} else {
|
|
1034
1048
|
tmp_10 = null;
|
|
1035
1049
|
}
|
|
1036
1050
|
return tmp_10;
|
|
1037
1051
|
};
|
|
1038
|
-
protoOf(RustIrEmitter).
|
|
1052
|
+
protoOf(RustIrEmitter).u1v = function (module_0, logger) {
|
|
1039
1053
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1040
|
-
var this_0 = new NonEmptyList(module_0.
|
|
1054
|
+
var this_0 = new NonEmptyList(module_0.tq_1);
|
|
1041
1055
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
1042
1056
|
var tmp = RustIrEmitter$emit$lambda;
|
|
1043
1057
|
var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);
|
|
1044
1058
|
var tmp$ret$1 = sortedWith(this_0, tmp$ret$0);
|
|
1045
1059
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$1);
|
|
1046
|
-
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).
|
|
1060
|
+
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).om_1;
|
|
1047
1061
|
// Inline function 'kotlin.let' call
|
|
1048
|
-
var files = emit.call(this, module_0.
|
|
1062
|
+
var files = emit.call(this, module_0.mv(VOID, statements), logger);
|
|
1049
1063
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1050
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
1064
|
+
var tmp0 = new NonEmptyList(module_0.tq_1);
|
|
1051
1065
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1052
1066
|
var destination = ArrayList_init_$Create$_0();
|
|
1053
1067
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1067,11 +1081,11 @@ protoOf(RustIrEmitter).a1z = function (module_0, logger) {
|
|
|
1067
1081
|
tmp_1 = '';
|
|
1068
1082
|
}
|
|
1069
1083
|
var clientMod = tmp_1;
|
|
1070
|
-
var modRs = new File(Companion_getInstance().
|
|
1071
|
-
var modEndpoint = new File(Companion_getInstance().
|
|
1072
|
-
var tmp_2 = Companion_getInstance().
|
|
1084
|
+
var modRs = new File(Companion_getInstance().n1h(this.k1z_1.fs() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1085
|
+
var modEndpoint = new File(Companion_getInstance().n1h(this.k1z_1.fs() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1086
|
+
var tmp_2 = Companion_getInstance().n1h(this.k1z_1.fs() + 'model/' + 'mod');
|
|
1073
1087
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1074
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
1088
|
+
var tmp0_0 = new NonEmptyList(module_0.tq_1);
|
|
1075
1089
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1076
1090
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1077
1091
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1083,23 +1097,23 @@ protoOf(RustIrEmitter).a1z = function (module_0, logger) {
|
|
|
1083
1097
|
}
|
|
1084
1098
|
var tmp_3 = destination_0;
|
|
1085
1099
|
var modModel = new File(tmp_2, listOf(new RawElement(joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emit$lambda_1(this)))));
|
|
1086
|
-
return this.
|
|
1100
|
+
return this.l1z_1.xo_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(files, modRs), modEndpoint), modModel) : NonEmptyList__plus_impl_xqmb9(files, modRs);
|
|
1087
1101
|
};
|
|
1088
|
-
protoOf(RustIrEmitter).
|
|
1089
|
-
var subPackageName = plus_1(this.
|
|
1102
|
+
protoOf(RustIrEmitter).lr = function (definition, module_0, logger) {
|
|
1103
|
+
var subPackageName = plus_1(this.k1z_1, definition);
|
|
1090
1104
|
var tmp;
|
|
1091
1105
|
if (definition instanceof Endpoint) {
|
|
1092
|
-
tmp = this.
|
|
1106
|
+
tmp = this.q1z_1;
|
|
1093
1107
|
} else {
|
|
1094
|
-
tmp = this.
|
|
1108
|
+
tmp = this.p1z_1;
|
|
1095
1109
|
}
|
|
1096
1110
|
var importHeader = tmp;
|
|
1097
1111
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1098
1112
|
// Inline function 'kotlin.let' call
|
|
1099
|
-
var file = RustTransform_getInstance().
|
|
1100
|
-
var tmp_0 = Companion_getInstance().
|
|
1113
|
+
var file = RustTransform_getInstance().a20(tmp0);
|
|
1114
|
+
var tmp_0 = Companion_getInstance().n1h(subPackageName.fs() + toSnakeCase(this, file.u1n_1.y1i()));
|
|
1101
1115
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1102
|
-
var tmp0_0 = file.
|
|
1116
|
+
var tmp0_0 = file.v1n_1;
|
|
1103
1117
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1104
1118
|
var destination = ArrayList_init_$Create$_0();
|
|
1105
1119
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1116,7 +1130,7 @@ protoOf(RustIrEmitter).su = function (definition, module_0, logger) {
|
|
|
1116
1130
|
}
|
|
1117
1131
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1118
1132
|
};
|
|
1119
|
-
protoOf(RustIrEmitter).
|
|
1133
|
+
protoOf(RustIrEmitter).z1v = function (definition, module_0) {
|
|
1120
1134
|
var tmp;
|
|
1121
1135
|
if (definition instanceof Type) {
|
|
1122
1136
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1136,7 +1150,7 @@ protoOf(RustIrEmitter).f1z = function (definition, module_0) {
|
|
|
1136
1150
|
}
|
|
1137
1151
|
}
|
|
1138
1152
|
var generatorFile = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
|
|
1139
|
-
var generatorOwnName = definition.
|
|
1153
|
+
var generatorOwnName = definition.mr().l1() + 'Generator';
|
|
1140
1154
|
var tmp_0 = asSequence(collectCustomTypeNames(generatorFile));
|
|
1141
1155
|
var tmp_1 = filterNot(tmp_0, RustIrEmitter$emitGenerator$lambda);
|
|
1142
1156
|
var tmp_2 = filterNot(tmp_1, RustIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -1145,8 +1159,8 @@ protoOf(RustIrEmitter).f1z = function (definition, module_0) {
|
|
|
1145
1159
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1146
1160
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1147
1161
|
var scope = new TransformScope(generatorFile);
|
|
1148
|
-
scope.
|
|
1149
|
-
var tmp_3 = scope.
|
|
1162
|
+
scope.n1v(RustIrEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1163
|
+
var tmp_3 = scope.f1v_1;
|
|
1150
1164
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1151
1165
|
// Inline function 'kotlin.collections.filter' call
|
|
1152
1166
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1189,58 +1203,58 @@ protoOf(RustIrEmitter).f1z = function (definition, module_0) {
|
|
|
1189
1203
|
destination_2.x(tmp$ret$12);
|
|
1190
1204
|
}
|
|
1191
1205
|
var typeImports = destination_2;
|
|
1192
|
-
var subPackageName = plus_2(this.
|
|
1193
|
-
return new File(Companion_getInstance().
|
|
1206
|
+
var subPackageName = plus_2(this.k1z_1, 'generator');
|
|
1207
|
+
return new File(Companion_getInstance().n1h(subPackageName.fs() + toSnakeCase(this, generatorFile.u1n_1.y1i())), plus(plus(plus(this.p1z_1, typeImports), generatorImports), generatorFile.v1n_1));
|
|
1194
1208
|
};
|
|
1195
|
-
protoOf(RustIrEmitter).
|
|
1209
|
+
protoOf(RustIrEmitter).kq = function (type, module_0) {
|
|
1196
1210
|
var tmp = convertWithValidation(type, module_0);
|
|
1197
1211
|
// Inline function 'kotlin.collections.map' call
|
|
1198
|
-
var this_0 = type.
|
|
1212
|
+
var this_0 = type.mp_1.ip_1;
|
|
1199
1213
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1200
1214
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1201
1215
|
var _iterator__ex2g4s = this_0.t();
|
|
1202
1216
|
while (_iterator__ex2g4s.u()) {
|
|
1203
1217
|
var item = _iterator__ex2g4s.v();
|
|
1204
|
-
var tmp$ret$0 = item.
|
|
1218
|
+
var tmp$ret$0 = item.qp_1.l1();
|
|
1205
1219
|
destination.x(tmp$ret$0);
|
|
1206
1220
|
}
|
|
1207
1221
|
return prependImports(this, sanitizeNames(injectSelfReceiverToValidate(tmp, toSet(destination), '&self'), _get_sanitizationConfig__sns434(this)), buildModelImports(type));
|
|
1208
1222
|
};
|
|
1209
|
-
protoOf(RustIrEmitter).
|
|
1223
|
+
protoOf(RustIrEmitter).zr = function (enum_0, module_0) {
|
|
1210
1224
|
var tmp = convert_0(enum_0);
|
|
1211
1225
|
return sanitizeEnumEntries(tmp, RustIrEmitter$emit$lambda_2(this));
|
|
1212
1226
|
};
|
|
1213
|
-
protoOf(RustIrEmitter).
|
|
1227
|
+
protoOf(RustIrEmitter).pr = function (union) {
|
|
1214
1228
|
return convert_1(union);
|
|
1215
1229
|
};
|
|
1216
|
-
protoOf(RustIrEmitter).
|
|
1230
|
+
protoOf(RustIrEmitter).ur = function (refined) {
|
|
1217
1231
|
return replaceStructWithRefinedFunctions(convert_2(refined), refined);
|
|
1218
1232
|
};
|
|
1219
|
-
protoOf(RustIrEmitter).
|
|
1233
|
+
protoOf(RustIrEmitter).as = function (endpoint) {
|
|
1220
1234
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1221
1235
|
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_3(endpoint))))));
|
|
1222
1236
|
var scope = new TransformScope(this_0);
|
|
1223
|
-
scope.
|
|
1224
|
-
var tmp = scope.
|
|
1237
|
+
scope.k1v(fixResponseSwitchPatterns());
|
|
1238
|
+
var tmp = scope.f1v_1;
|
|
1225
1239
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1226
1240
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1227
1241
|
var scope_0 = new TransformScope(this_1);
|
|
1228
|
-
scope_0.
|
|
1229
|
-
var tmp_0 = scope_0.
|
|
1242
|
+
scope_0.k1v(fixConstructorCalls());
|
|
1243
|
+
var tmp_0 = scope_0.f1v_1;
|
|
1230
1244
|
var tmp$ret$3 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1231
1245
|
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$3), endpoint)), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1232
1246
|
};
|
|
1233
|
-
protoOf(RustIrEmitter).
|
|
1247
|
+
protoOf(RustIrEmitter).or = function (channel) {
|
|
1234
1248
|
return convert_4(channel);
|
|
1235
1249
|
};
|
|
1236
|
-
protoOf(RustIrEmitter).
|
|
1237
|
-
var endpointName = endpoint.
|
|
1250
|
+
protoOf(RustIrEmitter).y1v = function (endpoint) {
|
|
1251
|
+
var endpointName = endpoint.up_1.l1();
|
|
1238
1252
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1239
1253
|
var clientName = endpointName + 'Client';
|
|
1240
1254
|
var methodName = toSnakeCase(this, endpointName);
|
|
1241
1255
|
var _destruct__k2r9zo = buildClientParams(this, endpoint);
|
|
1242
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1243
|
-
var requestArgs = _destruct__k2r9zo.
|
|
1256
|
+
var paramsStr = _destruct__k2r9zo.ve();
|
|
1257
|
+
var requestArgs = _destruct__k2r9zo.we();
|
|
1244
1258
|
var requestConstruction = endpointModuleName + '::Request::new(' + requestArgs + ')';
|
|
1245
1259
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1246
1260
|
var this_0 = importReferences(endpoint);
|
|
@@ -1249,7 +1263,7 @@ protoOf(RustIrEmitter).e1z = function (endpoint) {
|
|
|
1249
1263
|
var _iterator__ex2g4s = this_0.t();
|
|
1250
1264
|
while (_iterator__ex2g4s.u()) {
|
|
1251
1265
|
var e = _iterator__ex2g4s.v();
|
|
1252
|
-
var key = e.
|
|
1266
|
+
var key = e.bv_1;
|
|
1253
1267
|
if (set.x(key)) {
|
|
1254
1268
|
list.x(e);
|
|
1255
1269
|
}
|
|
@@ -1260,7 +1274,7 @@ protoOf(RustIrEmitter).e1z = function (endpoint) {
|
|
|
1260
1274
|
var _iterator__ex2g4s_0 = list.t();
|
|
1261
1275
|
while (_iterator__ex2g4s_0.u()) {
|
|
1262
1276
|
var item = _iterator__ex2g4s_0.v();
|
|
1263
|
-
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1277
|
+
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.bv_1), item.bv_1);
|
|
1264
1278
|
destination.x(tmp$ret$2);
|
|
1265
1279
|
}
|
|
1266
1280
|
var modelImports = destination;
|
|
@@ -1281,23 +1295,23 @@ protoOf(RustIrEmitter).e1z = function (endpoint) {
|
|
|
1281
1295
|
this_1.x(' ' + namespacePath + '::from_raw_response(self.serialization, raw_response)');
|
|
1282
1296
|
this_1.x(' }');
|
|
1283
1297
|
this_1.x('}');
|
|
1284
|
-
var tmp$ret$8 = this_1.
|
|
1298
|
+
var tmp$ret$8 = this_1.o5();
|
|
1285
1299
|
var code = joinToString(tmp$ret$8, '\n');
|
|
1286
|
-
var subPackageName = plus_2(this.
|
|
1287
|
-
var tmp = Companion_getInstance().
|
|
1300
|
+
var subPackageName = plus_2(this.k1z_1, 'client');
|
|
1301
|
+
var tmp = Companion_getInstance().n1h(subPackageName.fs() + toSnakeCase(this, clientName));
|
|
1288
1302
|
// Inline function 'kotlin.collections.buildList' call
|
|
1289
1303
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1290
1304
|
// Inline function 'kotlin.apply' call
|
|
1291
1305
|
var this_2 = ArrayList_init_$Create$_0();
|
|
1292
1306
|
this_2.x(import_0('super::super::wirespec', '*'));
|
|
1293
1307
|
this_2.x(import_0('super::super::endpoint', endpointModuleName));
|
|
1294
|
-
this_2.
|
|
1308
|
+
this_2.f1(modelImports);
|
|
1295
1309
|
this_2.x(new RawElement(code));
|
|
1296
|
-
var tmp$ret$12 = this_2.
|
|
1310
|
+
var tmp$ret$12 = this_2.o5();
|
|
1297
1311
|
return new File(tmp, tmp$ret$12);
|
|
1298
1312
|
};
|
|
1299
|
-
protoOf(RustIrEmitter).
|
|
1300
|
-
logger.
|
|
1313
|
+
protoOf(RustIrEmitter).w1v = function (endpoints, logger) {
|
|
1314
|
+
logger.jr('Emitting main Client for ' + endpoints.a1() + ' endpoints');
|
|
1301
1315
|
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitClient$lambda(this));
|
|
1302
1316
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1303
1317
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
@@ -1314,7 +1328,7 @@ protoOf(RustIrEmitter).c1z = function (endpoints, logger) {
|
|
|
1314
1328
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1315
1329
|
while (_iterator__ex2g4s_0.u()) {
|
|
1316
1330
|
var e = _iterator__ex2g4s_0.v();
|
|
1317
|
-
var key = e.
|
|
1331
|
+
var key = e.bv_1;
|
|
1318
1332
|
if (set.x(key)) {
|
|
1319
1333
|
list_0.x(e);
|
|
1320
1334
|
}
|
|
@@ -1341,7 +1355,7 @@ protoOf(RustIrEmitter).c1z = function (endpoints, logger) {
|
|
|
1341
1355
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1342
1356
|
while (_iterator__ex2g4s_2.u()) {
|
|
1343
1357
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1344
|
-
if (element_1.
|
|
1358
|
+
if (element_1.up_1.l1() === element_0.bv_1) {
|
|
1345
1359
|
tmp$ret$5 = false;
|
|
1346
1360
|
break $l$block_0;
|
|
1347
1361
|
}
|
|
@@ -1358,7 +1372,7 @@ protoOf(RustIrEmitter).c1z = function (endpoints, logger) {
|
|
|
1358
1372
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1359
1373
|
while (_iterator__ex2g4s_3.u()) {
|
|
1360
1374
|
var item = _iterator__ex2g4s_3.v();
|
|
1361
|
-
var tmp$ret$10 = import_0('super::model::' + toSnakeCase(this, item.
|
|
1375
|
+
var tmp$ret$10 = import_0('super::model::' + toSnakeCase(this, item.bv_1), item.bv_1);
|
|
1362
1376
|
destination_1.x(tmp$ret$10);
|
|
1363
1377
|
}
|
|
1364
1378
|
var modelImports = destination_1;
|
|
@@ -1368,9 +1382,9 @@ protoOf(RustIrEmitter).c1z = function (endpoints, logger) {
|
|
|
1368
1382
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1369
1383
|
while (_iterator__ex2g4s_4.u()) {
|
|
1370
1384
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1371
|
-
var endpointModuleName = toSnakeCase(this, element_2.
|
|
1372
|
-
var clientModuleName = toSnakeCase(this, element_2.
|
|
1373
|
-
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.
|
|
1385
|
+
var endpointModuleName = toSnakeCase(this, element_2.up_1.l1());
|
|
1386
|
+
var clientModuleName = toSnakeCase(this, element_2.up_1.l1() + 'Client');
|
|
1387
|
+
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.up_1.l1() + 'Client')]);
|
|
1374
1388
|
addAll(destination_2, list_1);
|
|
1375
1389
|
}
|
|
1376
1390
|
var endpointAndClientImports = destination_2;
|
|
@@ -1380,30 +1394,30 @@ protoOf(RustIrEmitter).c1z = function (endpoints, logger) {
|
|
|
1380
1394
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1381
1395
|
while (_iterator__ex2g4s_5.u()) {
|
|
1382
1396
|
var element_3 = _iterator__ex2g4s_5.v();
|
|
1383
|
-
var endpointName = element_3.
|
|
1397
|
+
var endpointName = element_3.up_1.l1();
|
|
1384
1398
|
var endpointModuleName_0 = toSnakeCase(this, endpointName);
|
|
1385
1399
|
var namespacePath = endpointModuleName_0 + '::' + endpointName;
|
|
1386
1400
|
var methodName = toSnakeCase(this, endpointName);
|
|
1387
1401
|
var _destruct__k2r9zo = buildClientParams(this, element_3);
|
|
1388
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1389
|
-
var callArgs = _destruct__k2r9zo.
|
|
1402
|
+
var paramsStr = _destruct__k2r9zo.ve();
|
|
1403
|
+
var callArgs = _destruct__k2r9zo.we();
|
|
1390
1404
|
var delegateCall = endpointName + 'Client { serialization: &self.serialization, transportation: &self.transportation }\n' + (' .' + methodName + '(' + callArgs + ').await');
|
|
1391
1405
|
var list_2 = listOf_0(['impl<S: Serialization, T: Transportation> ' + namespacePath + '::Call for Client<S, T> {', ' async fn ' + methodName + '(&self' + paramsStr + ') -> ' + endpointModuleName_0 + '::Response {', ' ' + delegateCall, ' }', '}']);
|
|
1392
1406
|
addAll(destination_3, list_2);
|
|
1393
1407
|
}
|
|
1394
1408
|
var implBlocks = destination_3;
|
|
1395
1409
|
var code = joinToString(plus(listOf_0(['pub struct Client<S: Serialization, T: Transportation> {', ' pub serialization: S,', ' pub transportation: T,', '}']), implBlocks), '\n');
|
|
1396
|
-
var tmp_0 = Companion_getInstance().
|
|
1410
|
+
var tmp_0 = Companion_getInstance().n1h(this.k1z_1.fs() + 'client');
|
|
1397
1411
|
// Inline function 'kotlin.collections.buildList' call
|
|
1398
1412
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1399
1413
|
// Inline function 'kotlin.apply' call
|
|
1400
1414
|
var this_0 = ArrayList_init_$Create$_0();
|
|
1401
1415
|
this_0.x(new RawElement(modDeclarations));
|
|
1402
1416
|
this_0.x(import_0('super::wirespec', '*'));
|
|
1403
|
-
this_0.
|
|
1404
|
-
this_0.
|
|
1417
|
+
this_0.f1(modelImports);
|
|
1418
|
+
this_0.f1(endpointAndClientImports);
|
|
1405
1419
|
this_0.x(new RawElement(code));
|
|
1406
|
-
var tmp$ret$22 = this_0.
|
|
1420
|
+
var tmp$ret$22 = this_0.o5();
|
|
1407
1421
|
return new File(tmp_0, tmp$ret$22);
|
|
1408
1422
|
};
|
|
1409
1423
|
function get_rustSelfParam() {
|
|
@@ -1421,8 +1435,8 @@ function fixResponseSwitchPatterns() {
|
|
|
1421
1435
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1422
1436
|
// Inline function 'kotlin.apply' call
|
|
1423
1437
|
var this_0 = new TransformerBuilder();
|
|
1424
|
-
this_0.
|
|
1425
|
-
return this_0.
|
|
1438
|
+
this_0.m1v(fixResponseSwitchPatterns$lambda);
|
|
1439
|
+
return this_0.x1i();
|
|
1426
1440
|
}
|
|
1427
1441
|
function buildModelImports(_this__u8e3s4) {
|
|
1428
1442
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1433,7 +1447,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1433
1447
|
var _iterator__ex2g4s = this_0.t();
|
|
1434
1448
|
while (_iterator__ex2g4s.u()) {
|
|
1435
1449
|
var e = _iterator__ex2g4s.v();
|
|
1436
|
-
var key = e.
|
|
1450
|
+
var key = e.bv_1;
|
|
1437
1451
|
if (set.x(key)) {
|
|
1438
1452
|
list.x(e);
|
|
1439
1453
|
}
|
|
@@ -1444,7 +1458,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1444
1458
|
var _iterator__ex2g4s_0 = list.t();
|
|
1445
1459
|
while (_iterator__ex2g4s_0.u()) {
|
|
1446
1460
|
var item = _iterator__ex2g4s_0.v();
|
|
1447
|
-
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.
|
|
1461
|
+
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.bv_1), Companion_getInstance().n1h(item.bv_1).y1i());
|
|
1448
1462
|
destination.x(tmp$ret$2);
|
|
1449
1463
|
}
|
|
1450
1464
|
return destination;
|
|
@@ -1456,14 +1470,14 @@ function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
1456
1470
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1457
1471
|
var tmp = scope;
|
|
1458
1472
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1459
|
-
var this_0 = scope.
|
|
1473
|
+
var this_0 = scope.f1v_1;
|
|
1460
1474
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1461
1475
|
// Inline function 'kotlin.apply' call
|
|
1462
1476
|
var this_1 = new TransformerBuilder();
|
|
1463
|
-
this_1.
|
|
1464
|
-
var tmp$ret$2 = this_1.
|
|
1465
|
-
tmp.
|
|
1466
|
-
var tmp_0 = scope.
|
|
1477
|
+
this_1.w1i(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1478
|
+
var tmp$ret$2 = this_1.x1i();
|
|
1479
|
+
tmp.f1v_1 = transform(this_0, tmp$ret$2);
|
|
1480
|
+
var tmp_0 = scope.f1v_1;
|
|
1467
1481
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1468
1482
|
}
|
|
1469
1483
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
@@ -1473,14 +1487,14 @@ function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
|
1473
1487
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1474
1488
|
var tmp = scope;
|
|
1475
1489
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1476
|
-
var this_0 = scope.
|
|
1490
|
+
var this_0 = scope.f1v_1;
|
|
1477
1491
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1478
1492
|
// Inline function 'kotlin.apply' call
|
|
1479
1493
|
var this_1 = new TransformerBuilder();
|
|
1480
|
-
this_1.
|
|
1481
|
-
var tmp$ret$2 = this_1.
|
|
1482
|
-
tmp.
|
|
1483
|
-
var tmp_0 = scope.
|
|
1494
|
+
this_1.w1i(injectApiStruct$lambda(endpoint));
|
|
1495
|
+
var tmp$ret$2 = this_1.x1i();
|
|
1496
|
+
tmp.f1v_1 = transform(this_0, tmp$ret$2);
|
|
1497
|
+
var tmp_0 = scope.f1v_1;
|
|
1484
1498
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1485
1499
|
}
|
|
1486
1500
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
@@ -1490,14 +1504,14 @@ function injectResponseFromImpls(_this__u8e3s4) {
|
|
|
1490
1504
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1491
1505
|
var tmp = scope;
|
|
1492
1506
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1493
|
-
var this_0 = scope.
|
|
1507
|
+
var this_0 = scope.f1v_1;
|
|
1494
1508
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1495
1509
|
// Inline function 'kotlin.apply' call
|
|
1496
1510
|
var this_1 = new TransformerBuilder();
|
|
1497
|
-
this_1.
|
|
1498
|
-
var tmp$ret$2 = this_1.
|
|
1499
|
-
tmp.
|
|
1500
|
-
var tmp_0 = scope.
|
|
1511
|
+
this_1.w1i(injectResponseFromImpls$lambda);
|
|
1512
|
+
var tmp$ret$2 = this_1.x1i();
|
|
1513
|
+
tmp.f1v_1 = transform(this_0, tmp$ret$2);
|
|
1514
|
+
var tmp_0 = scope.f1v_1;
|
|
1501
1515
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1502
1516
|
}
|
|
1503
1517
|
function injectHandlerImplForClient(_this__u8e3s4, endpoint) {
|
|
@@ -1507,14 +1521,14 @@ function injectHandlerImplForClient(_this__u8e3s4, endpoint) {
|
|
|
1507
1521
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1508
1522
|
var tmp = scope;
|
|
1509
1523
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1510
|
-
var this_0 = scope.
|
|
1524
|
+
var this_0 = scope.f1v_1;
|
|
1511
1525
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1512
1526
|
// Inline function 'kotlin.apply' call
|
|
1513
1527
|
var this_1 = new TransformerBuilder();
|
|
1514
|
-
this_1.
|
|
1515
|
-
var tmp$ret$2 = this_1.
|
|
1516
|
-
tmp.
|
|
1517
|
-
var tmp_0 = scope.
|
|
1528
|
+
this_1.w1i(injectHandlerImplForClient$lambda);
|
|
1529
|
+
var tmp$ret$2 = this_1.x1i();
|
|
1530
|
+
tmp.f1v_1 = transform(this_0, tmp$ret$2);
|
|
1531
|
+
var tmp_0 = scope.f1v_1;
|
|
1518
1532
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1519
1533
|
}
|
|
1520
1534
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
@@ -1524,14 +1538,14 @@ function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
|
1524
1538
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1525
1539
|
var tmp = scope;
|
|
1526
1540
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1527
|
-
var this_0 = scope.
|
|
1541
|
+
var this_0 = scope.f1v_1;
|
|
1528
1542
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1529
1543
|
// Inline function 'kotlin.apply' call
|
|
1530
1544
|
var this_1 = new TransformerBuilder();
|
|
1531
|
-
this_1.
|
|
1532
|
-
var tmp$ret$2 = this_1.
|
|
1533
|
-
tmp.
|
|
1534
|
-
var tmp_0 = scope.
|
|
1545
|
+
this_1.w1i(injectSelfToHandlerMethods$lambda);
|
|
1546
|
+
var tmp$ret$2 = this_1.x1i();
|
|
1547
|
+
tmp.f1v_1 = transform(this_0, tmp$ret$2);
|
|
1548
|
+
var tmp_0 = scope.f1v_1;
|
|
1535
1549
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1536
1550
|
}
|
|
1537
1551
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
@@ -1541,14 +1555,14 @@ function stripResponseGenerics(_this__u8e3s4) {
|
|
|
1541
1555
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1542
1556
|
var tmp = scope;
|
|
1543
1557
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1544
|
-
var this_0 = scope.
|
|
1558
|
+
var this_0 = scope.f1v_1;
|
|
1545
1559
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1546
1560
|
// Inline function 'kotlin.apply' call
|
|
1547
1561
|
var this_1 = new TransformerBuilder();
|
|
1548
|
-
this_1.
|
|
1549
|
-
var tmp$ret$2 = this_1.
|
|
1550
|
-
tmp.
|
|
1551
|
-
var tmp_0 = scope.
|
|
1562
|
+
this_1.l1v(stripResponseGenerics$lambda);
|
|
1563
|
+
var tmp$ret$2 = this_1.x1i();
|
|
1564
|
+
tmp.f1v_1 = transform(this_0, tmp$ret$2);
|
|
1565
|
+
var tmp_0 = scope.f1v_1;
|
|
1552
1566
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1553
1567
|
}
|
|
1554
1568
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
@@ -1558,14 +1572,14 @@ function stripHandlerExtends(_this__u8e3s4) {
|
|
|
1558
1572
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1559
1573
|
var tmp = scope;
|
|
1560
1574
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1561
|
-
var this_0 = scope.
|
|
1575
|
+
var this_0 = scope.f1v_1;
|
|
1562
1576
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1563
1577
|
// Inline function 'kotlin.apply' call
|
|
1564
1578
|
var this_1 = new TransformerBuilder();
|
|
1565
|
-
this_1.
|
|
1566
|
-
var tmp$ret$2 = this_1.
|
|
1567
|
-
tmp.
|
|
1568
|
-
var tmp_0 = scope.
|
|
1579
|
+
this_1.w1i(stripHandlerExtends$lambda);
|
|
1580
|
+
var tmp$ret$2 = this_1.x1i();
|
|
1581
|
+
tmp.f1v_1 = transform(this_0, tmp$ret$2);
|
|
1582
|
+
var tmp_0 = scope.f1v_1;
|
|
1569
1583
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1570
1584
|
}
|
|
1571
1585
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
@@ -1573,8 +1587,8 @@ function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
|
1573
1587
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1574
1588
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1575
1589
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1576
|
-
scope.
|
|
1577
|
-
var tmp = scope.
|
|
1590
|
+
scope.o1v(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1591
|
+
var tmp = scope.f1v_1;
|
|
1578
1592
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1579
1593
|
}
|
|
1580
1594
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
@@ -1584,21 +1598,21 @@ function stripWirespecPrefix(_this__u8e3s4) {
|
|
|
1584
1598
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1585
1599
|
var tmp = scope;
|
|
1586
1600
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1587
|
-
var this_0 = scope.
|
|
1601
|
+
var this_0 = scope.f1v_1;
|
|
1588
1602
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1589
1603
|
// Inline function 'kotlin.apply' call
|
|
1590
1604
|
var this_1 = new TransformerBuilder();
|
|
1591
|
-
this_1.
|
|
1592
|
-
var tmp$ret$2 = this_1.
|
|
1593
|
-
tmp.
|
|
1594
|
-
var tmp_0 = scope.
|
|
1605
|
+
this_1.l1v(stripWirespecPrefix$lambda);
|
|
1606
|
+
var tmp$ret$2 = this_1.x1i();
|
|
1607
|
+
tmp.f1v_1 = transform(this_0, tmp$ret$2);
|
|
1608
|
+
var tmp_0 = scope.f1v_1;
|
|
1595
1609
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1596
1610
|
}
|
|
1597
1611
|
function flattenForRust(_this__u8e3s4) {
|
|
1598
1612
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1599
1613
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1600
1614
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1601
|
-
var tmp0 = _this__u8e3s4.
|
|
1615
|
+
var tmp0 = _this__u8e3s4.w1n();
|
|
1602
1616
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1603
1617
|
var destination = ArrayList_init_$Create$_0();
|
|
1604
1618
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1610,9 +1624,8 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1610
1624
|
}
|
|
1611
1625
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1612
1626
|
var namespace = ensureNotNull(tmp$ret$2);
|
|
1613
|
-
var flattened = flattenNestedStructs(namespace);
|
|
1614
1627
|
// Inline function 'kotlin.collections.filter' call
|
|
1615
|
-
var tmp0_0 =
|
|
1628
|
+
var tmp0_0 = namespace.b1o_1;
|
|
1616
1629
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1617
1630
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1618
1631
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1637,13 +1650,13 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1637
1650
|
var tmp_0;
|
|
1638
1651
|
var tmp_1;
|
|
1639
1652
|
if (item instanceof Union_0) {
|
|
1640
|
-
tmp_1 = item.
|
|
1653
|
+
tmp_1 = item.d1r_1.y1i() === 'Response';
|
|
1641
1654
|
} else {
|
|
1642
1655
|
tmp_1 = false;
|
|
1643
1656
|
}
|
|
1644
1657
|
if (tmp_1) {
|
|
1645
1658
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1646
|
-
var tmp0_1 =
|
|
1659
|
+
var tmp0_1 = namespace.b1o_1;
|
|
1647
1660
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1648
1661
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1649
1662
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -1659,7 +1672,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1659
1672
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1660
1673
|
while (_iterator__ex2g4s_3.u()) {
|
|
1661
1674
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1662
|
-
var tmp$ret$8 = item_0.
|
|
1675
|
+
var tmp$ret$8 = item_0.f1o_1.y1i();
|
|
1663
1676
|
destination_3.x(tmp$ret$8);
|
|
1664
1677
|
}
|
|
1665
1678
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -1678,14 +1691,14 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1678
1691
|
var _iterator__ex2g4s_5 = destination_4.t();
|
|
1679
1692
|
while (_iterator__ex2g4s_5.u()) {
|
|
1680
1693
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
1681
|
-
var tmp$ret$14 =
|
|
1694
|
+
var tmp$ret$14 = Custom_init_$Create$(item_1);
|
|
1682
1695
|
destination_5.x(tmp$ret$14);
|
|
1683
1696
|
}
|
|
1684
1697
|
var members = destination_5;
|
|
1685
|
-
tmp_0 = item.
|
|
1698
|
+
tmp_0 = item.i1r(VOID, VOID, members, emptyList());
|
|
1686
1699
|
} else {
|
|
1687
1700
|
if (item instanceof Union_0) {
|
|
1688
|
-
tmp_0 = item.
|
|
1701
|
+
tmp_0 = item.i1r(VOID, VOID, VOID, emptyList());
|
|
1689
1702
|
} else {
|
|
1690
1703
|
tmp_0 = item;
|
|
1691
1704
|
}
|
|
@@ -1695,7 +1708,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1695
1708
|
}
|
|
1696
1709
|
var moduleElements = destination_1;
|
|
1697
1710
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1698
|
-
var tmp0_2 =
|
|
1711
|
+
var tmp0_2 = namespace.b1o_1;
|
|
1699
1712
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1700
1713
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1701
1714
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1712,15 +1725,15 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1712
1725
|
}
|
|
1713
1726
|
}
|
|
1714
1727
|
var classElements = destination_6;
|
|
1715
|
-
return new File(namespace.
|
|
1728
|
+
return new File(namespace.a1o_1, plus_0(moduleElements, new Namespace(namespace.a1o_1, classElements, namespace.c1o_1)));
|
|
1716
1729
|
}
|
|
1717
1730
|
function fixConstructorCalls() {
|
|
1718
1731
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1719
1732
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1720
1733
|
// Inline function 'kotlin.apply' call
|
|
1721
1734
|
var this_0 = new TransformerBuilder();
|
|
1722
|
-
this_0.
|
|
1723
|
-
return this_0.
|
|
1735
|
+
this_0.o1v(fixConstructorCalls$lambda);
|
|
1736
|
+
return this_0.x1i();
|
|
1724
1737
|
}
|
|
1725
1738
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1726
1739
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1731,7 +1744,7 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1731
1744
|
var _iterator__ex2g4s = this_0.t();
|
|
1732
1745
|
while (_iterator__ex2g4s.u()) {
|
|
1733
1746
|
var e = _iterator__ex2g4s.v();
|
|
1734
|
-
var key = e.
|
|
1747
|
+
var key = e.bv_1;
|
|
1735
1748
|
if (set.x(key)) {
|
|
1736
1749
|
list.x(e);
|
|
1737
1750
|
}
|
|
@@ -1742,24 +1755,24 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1742
1755
|
var _iterator__ex2g4s_0 = list.t();
|
|
1743
1756
|
while (_iterator__ex2g4s_0.u()) {
|
|
1744
1757
|
var item = _iterator__ex2g4s_0.v();
|
|
1745
|
-
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.
|
|
1758
|
+
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.bv_1), Companion_getInstance().n1h(item.bv_1).y1i());
|
|
1746
1759
|
destination.x(tmp$ret$2);
|
|
1747
1760
|
}
|
|
1748
1761
|
return destination;
|
|
1749
1762
|
}
|
|
1750
1763
|
function toRustSnakeCase(_this__u8e3s4) {
|
|
1751
1764
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1752
|
-
return Companion_getInstance().
|
|
1765
|
+
return Companion_getInstance().n1h(_this__u8e3s4).w1m();
|
|
1753
1766
|
}
|
|
1754
1767
|
function buildValidateFunction(refined) {
|
|
1755
1768
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1756
|
-
var constraintExpr = convertConstraint(refined.
|
|
1769
|
+
var constraintExpr = convertConstraint(refined.tr_1, new FieldCall(new VariableReference(Companion_getInstance().n1h('self')), Companion_getInstance().n1h('value')));
|
|
1757
1770
|
return function_0('validate', VOID, VOID, buildValidateFunction$lambda(constraintExpr));
|
|
1758
1771
|
}
|
|
1759
1772
|
function buildToStringFunction(refined) {
|
|
1760
1773
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1761
1774
|
var tmp;
|
|
1762
|
-
if (refined.
|
|
1775
|
+
if (refined.tr_1.fv_1 instanceof String_0) {
|
|
1763
1776
|
tmp = 'self.value.clone()';
|
|
1764
1777
|
} else {
|
|
1765
1778
|
tmp = 'format!("{}", self.value)';
|
|
@@ -1774,8 +1787,8 @@ function buildApiStruct(endpoint) {
|
|
|
1774
1787
|
function generateApiStructCode(_this__u8e3s4) {
|
|
1775
1788
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1776
1789
|
// Inline function 'kotlin.let' call
|
|
1777
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
1778
|
-
var methodName = _this__u8e3s4.
|
|
1790
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.wp_1, '/', VOID, VOID, VOID, VOID, generateApiStructCode$lambda);
|
|
1791
|
+
var methodName = _this__u8e3s4.vp_1.a3_1;
|
|
1779
1792
|
return trimIndent('\n pub struct Api;\n impl Server for Api {\n type Req = Request;\n type Res = Response;\n fn path_template(&self) -> &\'static str { "' + pathTemplate + '" }\n fn method(&self) -> Method { Method::' + methodName + ' }\n }\n ');
|
|
1780
1793
|
}
|
|
1781
1794
|
function fixResponseSwitchPatterns$lambda(s, t) {
|
|
@@ -1784,55 +1797,56 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1784
1797
|
if (!(s instanceof Switch)) {
|
|
1785
1798
|
tmp = true;
|
|
1786
1799
|
} else {
|
|
1787
|
-
var tmp0_safe_receiver = s.
|
|
1788
|
-
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1800
|
+
var tmp0_safe_receiver = s.j1q_1;
|
|
1801
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q1m()) === 'r');
|
|
1789
1802
|
}
|
|
1790
1803
|
if (tmp)
|
|
1791
1804
|
return transformChildren(s, t);
|
|
1792
1805
|
// Inline function 'kotlin.collections.map' call
|
|
1793
|
-
var this_0 = s.
|
|
1806
|
+
var this_0 = s.h1q_1;
|
|
1794
1807
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1795
1808
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1796
1809
|
var _iterator__ex2g4s = this_0.t();
|
|
1797
1810
|
while (_iterator__ex2g4s.u()) {
|
|
1798
1811
|
var item = _iterator__ex2g4s.v();
|
|
1799
|
-
var tmp_0 = item.
|
|
1812
|
+
var tmp_0 = item.o1q_1;
|
|
1800
1813
|
var tmp0_safe_receiver_0 = tmp_0 instanceof Custom ? tmp_0 : null;
|
|
1801
|
-
var
|
|
1814
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.h1j_1;
|
|
1815
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y1i();
|
|
1802
1816
|
var tmp_1;
|
|
1803
1817
|
if (!(typeName == null) && get_rustResponsePattern().oc(typeName)) {
|
|
1804
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1818
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.j1q_1).w1m() + ')');
|
|
1805
1819
|
// Inline function 'kotlin.collections.map' call
|
|
1806
|
-
var this_1 = item.
|
|
1820
|
+
var this_1 = item.n1q_1;
|
|
1807
1821
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1808
1822
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1809
1823
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1810
1824
|
while (_iterator__ex2g4s_0.u()) {
|
|
1811
1825
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1812
|
-
var tmp$ret$0 = t.
|
|
1826
|
+
var tmp$ret$0 = t.z1u(item_0);
|
|
1813
1827
|
destination_0.x(tmp$ret$0);
|
|
1814
1828
|
}
|
|
1815
1829
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1816
1830
|
} else {
|
|
1817
|
-
var tmp_3 = t.
|
|
1831
|
+
var tmp_3 = t.a1v(item.m1q_1);
|
|
1818
1832
|
// Inline function 'kotlin.collections.map' call
|
|
1819
|
-
var this_2 = item.
|
|
1833
|
+
var this_2 = item.n1q_1;
|
|
1820
1834
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1821
1835
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1822
1836
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1823
1837
|
while (_iterator__ex2g4s_1.u()) {
|
|
1824
1838
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1825
|
-
var tmp$ret$3 = t.
|
|
1839
|
+
var tmp$ret$3 = t.z1u(item_1);
|
|
1826
1840
|
destination_1.x(tmp$ret$3);
|
|
1827
1841
|
}
|
|
1828
1842
|
var tmp_4 = destination_1;
|
|
1829
|
-
var
|
|
1843
|
+
var tmp2_safe_receiver = item.o1q_1;
|
|
1830
1844
|
var tmp_5;
|
|
1831
|
-
if (
|
|
1845
|
+
if (tmp2_safe_receiver == null) {
|
|
1832
1846
|
tmp_5 = null;
|
|
1833
1847
|
} else {
|
|
1834
1848
|
// Inline function 'kotlin.let' call
|
|
1835
|
-
tmp_5 = t.
|
|
1849
|
+
tmp_5 = t.x1u(tmp2_safe_receiver);
|
|
1836
1850
|
}
|
|
1837
1851
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1838
1852
|
}
|
|
@@ -1840,13 +1854,13 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1840
1854
|
destination.x(tmp$ret$8);
|
|
1841
1855
|
}
|
|
1842
1856
|
var transformedCases = destination;
|
|
1843
|
-
return s.
|
|
1857
|
+
return s.l1q(t.a1v(s.g1q_1), transformedCases, null);
|
|
1844
1858
|
}
|
|
1845
1859
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1846
1860
|
return function (element, transformer) {
|
|
1847
1861
|
var tmp;
|
|
1848
1862
|
if (element instanceof Struct) {
|
|
1849
|
-
tmp = element.
|
|
1863
|
+
tmp = element.m1o(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1850
1864
|
} else {
|
|
1851
1865
|
tmp = element;
|
|
1852
1866
|
}
|
|
@@ -1858,7 +1872,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1858
1872
|
return function (element, transformer) {
|
|
1859
1873
|
var tmp;
|
|
1860
1874
|
if (element instanceof Namespace) {
|
|
1861
|
-
tmp = element.
|
|
1875
|
+
tmp = element.e1o(VOID, plus(element.b1o_1, listOf(buildApiStruct($endpoint))));
|
|
1862
1876
|
} else {
|
|
1863
1877
|
tmp = element;
|
|
1864
1878
|
}
|
|
@@ -1871,7 +1885,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1871
1885
|
var tmp;
|
|
1872
1886
|
if (element instanceof File) {
|
|
1873
1887
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1874
|
-
var tmp0 = element.
|
|
1888
|
+
var tmp0 = element.v1n_1;
|
|
1875
1889
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1876
1890
|
var destination = ArrayList_init_$Create$_0();
|
|
1877
1891
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1881,26 +1895,27 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1881
1895
|
var tmp_1;
|
|
1882
1896
|
var tmp_2;
|
|
1883
1897
|
if (element_0 instanceof Union_0) {
|
|
1884
|
-
tmp_2 = element_0.
|
|
1898
|
+
tmp_2 = element_0.d1r_1.y1i() === 'Response';
|
|
1885
1899
|
} else {
|
|
1886
1900
|
tmp_2 = false;
|
|
1887
1901
|
}
|
|
1888
1902
|
if (tmp_2) {
|
|
1889
1903
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1890
|
-
tmp_1 = !element_0.
|
|
1904
|
+
tmp_1 = !element_0.f1r_1.r();
|
|
1891
1905
|
} else {
|
|
1892
1906
|
tmp_1 = false;
|
|
1893
1907
|
}
|
|
1894
1908
|
if (tmp_1) {
|
|
1895
1909
|
var tmp_3 = listOf(element_0);
|
|
1896
1910
|
// Inline function 'kotlin.collections.map' call
|
|
1897
|
-
var this_0 = element_0.
|
|
1911
|
+
var this_0 = element_0.f1r_1;
|
|
1898
1912
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1899
1913
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1900
1914
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1901
1915
|
while (_iterator__ex2g4s_0.u()) {
|
|
1902
1916
|
var item = _iterator__ex2g4s_0.v();
|
|
1903
|
-
var
|
|
1917
|
+
var memberName = item.h1j_1.y1i();
|
|
1918
|
+
var tmp$ret$1 = new RawElement('impl From<' + memberName + '> for Response { fn from(value: ' + memberName + ') -> Self { Response::' + memberName + '(value) } }\n');
|
|
1904
1919
|
destination_0.x(tmp$ret$1);
|
|
1905
1920
|
}
|
|
1906
1921
|
tmp_0 = plus(tmp_3, destination_0);
|
|
@@ -1910,7 +1925,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1910
1925
|
var list = tmp_0;
|
|
1911
1926
|
addAll(destination, list);
|
|
1912
1927
|
}
|
|
1913
|
-
tmp = element.
|
|
1928
|
+
tmp = element.y1n(VOID, destination);
|
|
1914
1929
|
} else {
|
|
1915
1930
|
tmp = element;
|
|
1916
1931
|
}
|
|
@@ -1924,7 +1939,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1924
1939
|
var tmp$ret$4;
|
|
1925
1940
|
$l$block_1: {
|
|
1926
1941
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1927
|
-
var tmp0 = element.
|
|
1942
|
+
var tmp0 = element.b1o_1;
|
|
1928
1943
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1929
1944
|
var destination = ArrayList_init_$Create$_0();
|
|
1930
1945
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1940,7 +1955,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1940
1955
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1941
1956
|
while (_iterator__ex2g4s_0.u()) {
|
|
1942
1957
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
1943
|
-
if (element_1.
|
|
1958
|
+
if (element_1.o1o_1.equals(Companion_getInstance().n1h('Handler'))) {
|
|
1944
1959
|
tmp$ret$3 = element_1;
|
|
1945
1960
|
break $l$block;
|
|
1946
1961
|
}
|
|
@@ -1957,7 +1972,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1957
1972
|
}
|
|
1958
1973
|
var handler = tmp_0;
|
|
1959
1974
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1960
|
-
var tmp0_0 = handler.
|
|
1975
|
+
var tmp0_0 = handler.p1o_1;
|
|
1961
1976
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1962
1977
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1963
1978
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
@@ -1976,8 +1991,8 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1976
1991
|
tmp_1 = tmp1_elvis_lhs;
|
|
1977
1992
|
}
|
|
1978
1993
|
var method = tmp_1;
|
|
1979
|
-
var methodName = method.
|
|
1980
|
-
tmp$ret$4 = element.
|
|
1994
|
+
var methodName = method.d1l_1.w1m();
|
|
1995
|
+
tmp$ret$4 = element.e1o(VOID, plus(element.b1o_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 ')))));
|
|
1981
1996
|
}
|
|
1982
1997
|
tmp = tmp$ret$4;
|
|
1983
1998
|
} else {
|
|
@@ -1992,7 +2007,7 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
1992
2007
|
if (element instanceof Interface) {
|
|
1993
2008
|
var tmp$ret$0;
|
|
1994
2009
|
$l$block: {
|
|
1995
|
-
if (!element.
|
|
2010
|
+
if (!element.o1o_1.equals(Companion_getInstance().n1h('Handler')) && !element.o1o_1.equals(Companion_getInstance().n1h('Call'))) {
|
|
1996
2011
|
tmp$ret$0 = element;
|
|
1997
2012
|
break $l$block;
|
|
1998
2013
|
}
|
|
@@ -2001,14 +2016,14 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2001
2016
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
2002
2017
|
var tmp_0 = scope;
|
|
2003
2018
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
2004
|
-
var this_0 = scope.
|
|
2019
|
+
var this_0 = scope.f1v_1;
|
|
2005
2020
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2006
2021
|
// Inline function 'kotlin.apply' call
|
|
2007
2022
|
var this_1 = new TransformerBuilder();
|
|
2008
|
-
this_1.
|
|
2009
|
-
var tmp$ret$3 = this_1.
|
|
2010
|
-
tmp_0.
|
|
2011
|
-
var tmp_1 = scope.
|
|
2023
|
+
this_1.w1i(injectSelfToHandlerMethods$lambda$lambda);
|
|
2024
|
+
var tmp$ret$3 = this_1.x1i();
|
|
2025
|
+
tmp_0.f1v_1 = transform(this_0, tmp$ret$3);
|
|
2026
|
+
var tmp_1 = scope.f1v_1;
|
|
2012
2027
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2013
2028
|
}
|
|
2014
2029
|
tmp = tmp$ret$0;
|
|
@@ -2022,7 +2037,7 @@ function injectSelfToHandlerMethods$lambda$lambda(element, transformer) {
|
|
|
2022
2037
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2023
2038
|
var tmp;
|
|
2024
2039
|
if (element instanceof Function_0) {
|
|
2025
|
-
tmp = element.
|
|
2040
|
+
tmp = element.l1l(Companion_getInstance().n1h(element.d1l_1.w1m()), VOID, plus(listOf(get_rustSelfParam()), element.f1l_1));
|
|
2026
2041
|
} else {
|
|
2027
2042
|
tmp = element;
|
|
2028
2043
|
}
|
|
@@ -2035,14 +2050,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2035
2050
|
if (type instanceof Custom) {
|
|
2036
2051
|
var tmp_0;
|
|
2037
2052
|
var tmp_1;
|
|
2038
|
-
if (startsWith(type.
|
|
2053
|
+
if (startsWith(type.h1j_1.y1i(), 'Response')) {
|
|
2039
2054
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2040
|
-
tmp_1 = !type.
|
|
2055
|
+
tmp_1 = !type.i1j_1.r();
|
|
2041
2056
|
} else {
|
|
2042
2057
|
tmp_1 = false;
|
|
2043
2058
|
}
|
|
2044
2059
|
if (tmp_1) {
|
|
2045
|
-
tmp_0 = type.
|
|
2060
|
+
tmp_0 = type.l1n(VOID, emptyList());
|
|
2046
2061
|
} else {
|
|
2047
2062
|
tmp_0 = type;
|
|
2048
2063
|
}
|
|
@@ -2057,7 +2072,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2057
2072
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2058
2073
|
var tmp;
|
|
2059
2074
|
if (element instanceof Interface) {
|
|
2060
|
-
tmp = element.
|
|
2075
|
+
tmp = element.o1o_1.equals(Companion_getInstance().n1h('Handler')) || element.o1o_1.equals(Companion_getInstance().n1h('Call')) ? element.v1o(VOID, VOID, emptyList()) : element;
|
|
2061
2076
|
} else {
|
|
2062
2077
|
tmp = element;
|
|
2063
2078
|
}
|
|
@@ -2070,17 +2085,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2070
2085
|
var tmp_0;
|
|
2071
2086
|
var tmp_1;
|
|
2072
2087
|
if (s instanceof RawExpression) {
|
|
2073
|
-
tmp_1 = $identifierPattern.oc(s.
|
|
2088
|
+
tmp_1 = $identifierPattern.oc(s.l1p_1);
|
|
2074
2089
|
} else {
|
|
2075
2090
|
tmp_1 = false;
|
|
2076
2091
|
}
|
|
2077
2092
|
if (tmp_1) {
|
|
2078
|
-
tmp_0 = !contains(s.
|
|
2093
|
+
tmp_0 = !contains(s.l1p_1, '.');
|
|
2079
2094
|
} else {
|
|
2080
2095
|
tmp_0 = false;
|
|
2081
2096
|
}
|
|
2082
2097
|
if (tmp_0) {
|
|
2083
|
-
tmp = new VariableReference(Companion_getInstance().
|
|
2098
|
+
tmp = new VariableReference(Companion_getInstance().n1h(s.l1p_1));
|
|
2084
2099
|
} else {
|
|
2085
2100
|
tmp = transformChildren(s, t);
|
|
2086
2101
|
}
|
|
@@ -2091,9 +2106,10 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2091
2106
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2092
2107
|
var tmp;
|
|
2093
2108
|
if (type instanceof Custom) {
|
|
2109
|
+
var pascalName = type.h1j_1.y1i();
|
|
2094
2110
|
var tmp_0;
|
|
2095
|
-
if (startsWith(
|
|
2096
|
-
tmp_0 = type.
|
|
2111
|
+
if (startsWith(pascalName, 'Wirespec.')) {
|
|
2112
|
+
tmp_0 = type.l1n(Companion_getInstance().n1h(removePrefix(pascalName, 'Wirespec.')));
|
|
2097
2113
|
} else {
|
|
2098
2114
|
tmp_0 = type;
|
|
2099
2115
|
}
|
|
@@ -2108,37 +2124,38 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2108
2124
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2109
2125
|
if (!(s instanceof ConstructorStatement))
|
|
2110
2126
|
return transformChildren(s, t);
|
|
2111
|
-
var tmp = s.
|
|
2127
|
+
var tmp = s.r1n_1;
|
|
2112
2128
|
var tmp0_safe_receiver = tmp instanceof Custom ? tmp : null;
|
|
2113
|
-
var
|
|
2129
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.h1j_1;
|
|
2130
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y1i();
|
|
2114
2131
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2115
|
-
var this_0 = s.
|
|
2132
|
+
var this_0 = s.s1n_1;
|
|
2116
2133
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2117
2134
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.a1()));
|
|
2118
2135
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
2119
|
-
var _iterator__ex2g4s = this_0.
|
|
2136
|
+
var _iterator__ex2g4s = this_0.j1().t();
|
|
2120
2137
|
while (_iterator__ex2g4s.u()) {
|
|
2121
2138
|
var element = _iterator__ex2g4s.v();
|
|
2122
|
-
var tmp_0 = element.
|
|
2123
|
-
var tmp$ret$1 = t.
|
|
2124
|
-
destination.
|
|
2139
|
+
var tmp_0 = element.k1();
|
|
2140
|
+
var tmp$ret$1 = t.a1v(element.l1());
|
|
2141
|
+
destination.s2(tmp_0, tmp$ret$1);
|
|
2125
2142
|
}
|
|
2126
2143
|
var transformedArgs = destination;
|
|
2127
|
-
return !(typeName == null) && get_rustResponsePattern().oc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().
|
|
2144
|
+
return !(typeName == null) && get_rustResponsePattern().oc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().n1h('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);
|
|
2128
2145
|
}
|
|
2129
2146
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2130
2147
|
return function ($this$function) {
|
|
2131
|
-
$this$function.
|
|
2132
|
-
$this$function.
|
|
2133
|
-
$this$function.
|
|
2148
|
+
$this$function.x1h('&self', Custom_init_$Create$(''));
|
|
2149
|
+
$this$function.a1i(Boolean_instance);
|
|
2150
|
+
$this$function.b1i($constraintExpr);
|
|
2134
2151
|
return Unit_instance;
|
|
2135
2152
|
};
|
|
2136
2153
|
}
|
|
2137
2154
|
function buildToStringFunction$lambda($expr) {
|
|
2138
2155
|
return function ($this$function) {
|
|
2139
|
-
$this$function.
|
|
2140
|
-
$this$function.
|
|
2141
|
-
$this$function.
|
|
2156
|
+
$this$function.x1h('&self', Custom_init_$Create$(''));
|
|
2157
|
+
$this$function.a1i(String_instance);
|
|
2158
|
+
$this$function.b1i(new RawExpression($expr));
|
|
2142
2159
|
return Unit_instance;
|
|
2143
2160
|
};
|
|
2144
2161
|
}
|
|
@@ -2146,10 +2163,10 @@ function generateApiStructCode$lambda(segment) {
|
|
|
2146
2163
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2147
2164
|
var tmp;
|
|
2148
2165
|
if (segment instanceof Literal) {
|
|
2149
|
-
tmp = segment.
|
|
2166
|
+
tmp = segment.xq_1;
|
|
2150
2167
|
} else {
|
|
2151
2168
|
if (segment instanceof Param) {
|
|
2152
|
-
tmp = '{' + segment.
|
|
2169
|
+
tmp = '{' + segment.bq_1.l1() + '}';
|
|
2153
2170
|
} else {
|
|
2154
2171
|
noWhenBranchMatchedException();
|
|
2155
2172
|
}
|
|
@@ -2160,39 +2177,39 @@ var properties_initialized_RustIrTransformer_kt_hr6k9w;
|
|
|
2160
2177
|
function _init_properties_RustIrTransformer_kt__rrvmwq() {
|
|
2161
2178
|
if (!properties_initialized_RustIrTransformer_kt_hr6k9w) {
|
|
2162
2179
|
properties_initialized_RustIrTransformer_kt_hr6k9w = true;
|
|
2163
|
-
rustSelfParam = new Parameter(Companion_getInstance().
|
|
2180
|
+
rustSelfParam = new Parameter(Companion_getInstance().n1h('&self'), Custom_init_$Create$(''));
|
|
2164
2181
|
rustResponsePattern = Regex_init_$Create$('Response(\\d+|Default)');
|
|
2165
2182
|
}
|
|
2166
2183
|
}
|
|
2167
2184
|
function borrowParamsOf($this, fn) {
|
|
2168
2185
|
// Inline function 'kotlin.collections.map' call
|
|
2169
|
-
var this_0 = fn.
|
|
2186
|
+
var this_0 = fn.f1l_1;
|
|
2170
2187
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2171
2188
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2172
2189
|
var _iterator__ex2g4s = this_0.t();
|
|
2173
2190
|
while (_iterator__ex2g4s.u()) {
|
|
2174
2191
|
var item = _iterator__ex2g4s.v();
|
|
2175
2192
|
var tmp;
|
|
2176
|
-
if (RustTransform_getInstance().
|
|
2193
|
+
if (RustTransform_getInstance().b20(item.x1p_1)) {
|
|
2177
2194
|
tmp = item;
|
|
2178
2195
|
} else {
|
|
2179
|
-
tmp = item.
|
|
2196
|
+
tmp = item.a1q(VOID, applyBorrowRule(RustTransform_getInstance(), item.y1p_1));
|
|
2180
2197
|
}
|
|
2181
2198
|
var tmp$ret$0 = tmp;
|
|
2182
2199
|
destination.x(tmp$ret$0);
|
|
2183
2200
|
}
|
|
2184
|
-
return fn.
|
|
2201
|
+
return fn.l1l(VOID, VOID, destination);
|
|
2185
2202
|
}
|
|
2186
2203
|
function applyBorrowRule($this, type) {
|
|
2187
2204
|
var tmp;
|
|
2188
2205
|
if (type instanceof Nullable) {
|
|
2189
|
-
tmp = new Nullable(applyBorrowRule($this, type.
|
|
2206
|
+
tmp = new Nullable(applyBorrowRule($this, type.f1j_1));
|
|
2190
2207
|
} else {
|
|
2191
2208
|
if (equals(type, String_instance)) {
|
|
2192
|
-
tmp =
|
|
2209
|
+
tmp = Custom_init_$Create$('&str');
|
|
2193
2210
|
} else {
|
|
2194
2211
|
if (type instanceof Custom) {
|
|
2195
|
-
tmp = $this.
|
|
2212
|
+
tmp = $this.e20(type) ? type : $this.d20(type) ? borrowImpl(type) : $this.c20(type) ? ownedImpl(type) : type;
|
|
2196
2213
|
} else {
|
|
2197
2214
|
tmp = type;
|
|
2198
2215
|
}
|
|
@@ -2204,15 +2221,15 @@ function toBorrowedRaw($this, _this__u8e3s4) {
|
|
|
2204
2221
|
return new RawExpression('&' + toRawCode($this, _this__u8e3s4));
|
|
2205
2222
|
}
|
|
2206
2223
|
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
2207
|
-
return Companion_getInstance_0().
|
|
2224
|
+
return Companion_getInstance_0().r1z_1.u1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
2208
2225
|
}
|
|
2209
2226
|
function toRawCode($this, _this__u8e3s4) {
|
|
2210
2227
|
var tmp;
|
|
2211
2228
|
if (_this__u8e3s4 instanceof VariableReference) {
|
|
2212
|
-
tmp = sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2229
|
+
tmp = sanitizeKeywords_0($this, _this__u8e3s4.j1p_1.w1m());
|
|
2213
2230
|
} else {
|
|
2214
2231
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
2215
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
2232
|
+
var tmp1_safe_receiver = _this__u8e3s4.r1q_1;
|
|
2216
2233
|
var tmp_0;
|
|
2217
2234
|
if (tmp1_safe_receiver == null) {
|
|
2218
2235
|
tmp_0 = null;
|
|
@@ -2222,20 +2239,20 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2222
2239
|
}
|
|
2223
2240
|
var tmp2_elvis_lhs = tmp_0;
|
|
2224
2241
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2225
|
-
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2242
|
+
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.s1q_1.w1m());
|
|
2226
2243
|
} else {
|
|
2227
2244
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
2228
|
-
var tmp_1 = _this__u8e3s4.
|
|
2245
|
+
var tmp_1 = _this__u8e3s4.k1r_1;
|
|
2229
2246
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2230
2247
|
var tmp_2;
|
|
2231
2248
|
var tmp_3;
|
|
2232
2249
|
if (!(lit == null)) {
|
|
2233
2250
|
var tmp_4;
|
|
2234
|
-
var tmp_5 = lit.
|
|
2251
|
+
var tmp_5 = lit.u1p_1;
|
|
2235
2252
|
if (tmp_5 instanceof Integer) {
|
|
2236
2253
|
tmp_4 = true;
|
|
2237
2254
|
} else {
|
|
2238
|
-
var tmp_6 = lit.
|
|
2255
|
+
var tmp_6 = lit.u1p_1;
|
|
2239
2256
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2240
2257
|
}
|
|
2241
2258
|
tmp_3 = tmp_4;
|
|
@@ -2243,30 +2260,31 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2243
2260
|
tmp_3 = false;
|
|
2244
2261
|
}
|
|
2245
2262
|
if (tmp_3) {
|
|
2246
|
-
tmp_2 = toString_0(lit.
|
|
2263
|
+
tmp_2 = toString_0(lit.t1p_1);
|
|
2247
2264
|
} else {
|
|
2248
2265
|
var tmp_7;
|
|
2249
2266
|
if (!(lit == null)) {
|
|
2250
|
-
var tmp_8 = lit.
|
|
2267
|
+
var tmp_8 = lit.u1p_1;
|
|
2251
2268
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2252
2269
|
} else {
|
|
2253
2270
|
tmp_7 = false;
|
|
2254
2271
|
}
|
|
2255
2272
|
if (tmp_7) {
|
|
2256
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2273
|
+
tmp_2 = '"' + toString_0(lit.t1p_1) + '"';
|
|
2257
2274
|
} else {
|
|
2258
|
-
tmp_2 = toRawCode($this, _this__u8e3s4.
|
|
2275
|
+
tmp_2 = toRawCode($this, _this__u8e3s4.k1r_1);
|
|
2259
2276
|
}
|
|
2260
2277
|
}
|
|
2261
2278
|
var idx = tmp_2;
|
|
2262
|
-
tmp = toRawCode($this, _this__u8e3s4.
|
|
2279
|
+
tmp = toRawCode($this, _this__u8e3s4.j1r_1) + '[' + idx + ']';
|
|
2263
2280
|
} else {
|
|
2264
2281
|
if (_this__u8e3s4 instanceof ConstructorStatement) {
|
|
2265
|
-
var tmp_9 = _this__u8e3s4.
|
|
2282
|
+
var tmp_9 = _this__u8e3s4.r1n_1;
|
|
2266
2283
|
var tmp3_safe_receiver = tmp_9 instanceof Custom ? tmp_9 : null;
|
|
2267
|
-
var
|
|
2268
|
-
var
|
|
2269
|
-
var
|
|
2284
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.h1j_1;
|
|
2285
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.y1i();
|
|
2286
|
+
var typeName = tmp5_elvis_lhs == null ? toString_0(_this__u8e3s4.r1n_1) : tmp5_elvis_lhs;
|
|
2287
|
+
var tmp_10 = _this__u8e3s4.s1n_1.j1();
|
|
2270
2288
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2271
2289
|
var tmp_11;
|
|
2272
2290
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2279,23 +2297,23 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2279
2297
|
} else {
|
|
2280
2298
|
if (_this__u8e3s4 instanceof Literal_0) {
|
|
2281
2299
|
var tmp_12;
|
|
2282
|
-
var tmp_13 = _this__u8e3s4.
|
|
2300
|
+
var tmp_13 = _this__u8e3s4.u1p_1;
|
|
2283
2301
|
if (tmp_13 instanceof String_1) {
|
|
2284
|
-
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.
|
|
2302
|
+
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.t1p_1) + '")';
|
|
2285
2303
|
} else {
|
|
2286
|
-
var tmp_14 = _this__u8e3s4.
|
|
2304
|
+
var tmp_14 = _this__u8e3s4.u1p_1;
|
|
2287
2305
|
if (tmp_14 instanceof Boolean_0) {
|
|
2288
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2306
|
+
tmp_12 = toString_0(_this__u8e3s4.t1p_1);
|
|
2289
2307
|
} else {
|
|
2290
|
-
var tmp_15 = _this__u8e3s4.
|
|
2308
|
+
var tmp_15 = _this__u8e3s4.u1p_1;
|
|
2291
2309
|
if (tmp_15 instanceof Integer) {
|
|
2292
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2310
|
+
tmp_12 = toString_0(_this__u8e3s4.t1p_1);
|
|
2293
2311
|
} else {
|
|
2294
|
-
var tmp_16 = _this__u8e3s4.
|
|
2312
|
+
var tmp_16 = _this__u8e3s4.u1p_1;
|
|
2295
2313
|
if (tmp_16 instanceof Number_0) {
|
|
2296
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2314
|
+
tmp_12 = toString_0(_this__u8e3s4.t1p_1);
|
|
2297
2315
|
} else {
|
|
2298
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2316
|
+
tmp_12 = toString_0(_this__u8e3s4.t1p_1);
|
|
2299
2317
|
}
|
|
2300
2318
|
}
|
|
2301
2319
|
}
|
|
@@ -2303,7 +2321,7 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2303
2321
|
tmp = tmp_12;
|
|
2304
2322
|
} else {
|
|
2305
2323
|
if (_this__u8e3s4 instanceof RawExpression) {
|
|
2306
|
-
tmp = _this__u8e3s4.
|
|
2324
|
+
tmp = _this__u8e3s4.l1p_1;
|
|
2307
2325
|
} else {
|
|
2308
2326
|
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression(_this__u8e3s4).o();
|
|
2309
2327
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
@@ -2318,22 +2336,22 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2318
2336
|
function RustTransform$primitivesToCustom$lambda(t, tr) {
|
|
2319
2337
|
var tmp;
|
|
2320
2338
|
if (equals(t, Any_instance)) {
|
|
2321
|
-
tmp =
|
|
2339
|
+
tmp = Custom_init_$Create$('Box<dyn std::any::Any>');
|
|
2322
2340
|
} else {
|
|
2323
2341
|
if (equals(t, Bytes_instance)) {
|
|
2324
|
-
tmp =
|
|
2342
|
+
tmp = Custom_init_$Create$('Vec<u8>');
|
|
2325
2343
|
} else {
|
|
2326
2344
|
if (equals(t, Reflect_instance)) {
|
|
2327
|
-
tmp =
|
|
2345
|
+
tmp = Custom_init_$Create$('std::any::TypeId');
|
|
2328
2346
|
} else {
|
|
2329
2347
|
if (equals(t, Wildcard_instance)) {
|
|
2330
|
-
tmp =
|
|
2348
|
+
tmp = Custom_init_$Create$('_');
|
|
2331
2349
|
} else {
|
|
2332
2350
|
if (t instanceof IntegerLiteral) {
|
|
2333
|
-
tmp =
|
|
2351
|
+
tmp = Custom_init_$Create$('i32');
|
|
2334
2352
|
} else {
|
|
2335
2353
|
if (t instanceof StringLiteral) {
|
|
2336
|
-
tmp =
|
|
2354
|
+
tmp = Custom_init_$Create$('String');
|
|
2337
2355
|
} else {
|
|
2338
2356
|
tmp = transformChildren_2(t, tr);
|
|
2339
2357
|
}
|
|
@@ -2348,11 +2366,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2348
2366
|
var tmp;
|
|
2349
2367
|
if (element instanceof Interface) {
|
|
2350
2368
|
var tmp_0;
|
|
2351
|
-
if (element.
|
|
2369
|
+
if (element.o1o_1.equals(Companion_getInstance().n1h('Call'))) {
|
|
2352
2370
|
tmp_0 = element;
|
|
2353
2371
|
} else {
|
|
2354
2372
|
// Inline function 'kotlin.collections.map' call
|
|
2355
|
-
var this_0 = element.
|
|
2373
|
+
var this_0 = element.p1o_1;
|
|
2356
2374
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2357
2375
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2358
2376
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2368,7 +2386,7 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2368
2386
|
destination.x(tmp$ret$0);
|
|
2369
2387
|
}
|
|
2370
2388
|
var borrowed = destination;
|
|
2371
|
-
tmp_0 = transformChildren_0(element.
|
|
2389
|
+
tmp_0 = transformChildren_0(element.v1o(VOID, borrowed), tr);
|
|
2372
2390
|
}
|
|
2373
2391
|
tmp = tmp_0;
|
|
2374
2392
|
} else {
|
|
@@ -2384,13 +2402,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2384
2402
|
var tmp;
|
|
2385
2403
|
var tmp_0;
|
|
2386
2404
|
if (s instanceof FunctionCall) {
|
|
2387
|
-
tmp_0 = RustTransform_getInstance().
|
|
2405
|
+
tmp_0 = RustTransform_getInstance().w1z_1.u1(s.z1m_1.w1m());
|
|
2388
2406
|
} else {
|
|
2389
2407
|
tmp_0 = false;
|
|
2390
2408
|
}
|
|
2391
2409
|
if (tmp_0) {
|
|
2392
2410
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2393
|
-
var this_0 = s.
|
|
2411
|
+
var this_0 = s.a1n_1.j1();
|
|
2394
2412
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2395
2413
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2396
2414
|
var index = 0;
|
|
@@ -2401,16 +2419,16 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2401
2419
|
index = _unary__edvuaz + 1 | 0;
|
|
2402
2420
|
var idx = checkIndexOverflow(_unary__edvuaz);
|
|
2403
2421
|
// Inline function 'kotlin.collections.component1' call
|
|
2404
|
-
var key = item.
|
|
2422
|
+
var key = item.k1();
|
|
2405
2423
|
// Inline function 'kotlin.collections.component2' call
|
|
2406
|
-
var value = item.
|
|
2407
|
-
var transformed = t.
|
|
2424
|
+
var value = item.l1();
|
|
2425
|
+
var transformed = t.a1v(value);
|
|
2408
2426
|
var tmp_1;
|
|
2409
2427
|
var tmp_2;
|
|
2410
2428
|
if (idx === 0) {
|
|
2411
2429
|
var tmp_3;
|
|
2412
2430
|
if (transformed instanceof VariableReference) {
|
|
2413
|
-
tmp_3 = transformed.
|
|
2431
|
+
tmp_3 = transformed.j1p_1.j1j() === 'it';
|
|
2414
2432
|
} else {
|
|
2415
2433
|
tmp_3 = false;
|
|
2416
2434
|
}
|
|
@@ -2427,20 +2445,20 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2427
2445
|
destination.x(tmp$ret$2);
|
|
2428
2446
|
}
|
|
2429
2447
|
var newArgs = toMap(destination);
|
|
2430
|
-
tmp = s.
|
|
2448
|
+
tmp = s.d1n(VOID, VOID, VOID, newArgs);
|
|
2431
2449
|
} else {
|
|
2432
2450
|
tmp = transformChildren(s, t);
|
|
2433
2451
|
}
|
|
2434
2452
|
return tmp;
|
|
2435
2453
|
}
|
|
2436
2454
|
function RustTransform$rustName$lambda(it) {
|
|
2437
|
-
return RustTransform_getInstance().
|
|
2455
|
+
return RustTransform_getInstance().z1z(it);
|
|
2438
2456
|
}
|
|
2439
2457
|
function RustTransform$rustName$lambda_0(it) {
|
|
2440
|
-
return RustTransform_getInstance().
|
|
2458
|
+
return RustTransform_getInstance().z1z(it);
|
|
2441
2459
|
}
|
|
2442
2460
|
function RustTransform$toRawCode$lambda(it) {
|
|
2443
|
-
return it.
|
|
2461
|
+
return it.k1().w1m() + ': ' + toRawCode(RustTransform_getInstance(), it.l1());
|
|
2444
2462
|
}
|
|
2445
2463
|
function RustTransform() {
|
|
2446
2464
|
RustTransform_instance = this;
|
|
@@ -2448,57 +2466,58 @@ function RustTransform() {
|
|
|
2448
2466
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2449
2467
|
// Inline function 'kotlin.apply' call
|
|
2450
2468
|
var this_0 = new TransformerBuilder();
|
|
2451
|
-
this_0.
|
|
2452
|
-
tmp.
|
|
2469
|
+
this_0.l1v(RustTransform$primitivesToCustom$lambda);
|
|
2470
|
+
tmp.t1z_1 = this_0.x1i();
|
|
2453
2471
|
var tmp_0 = this;
|
|
2454
2472
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2455
2473
|
// Inline function 'kotlin.apply' call
|
|
2456
2474
|
var this_1 = new TransformerBuilder();
|
|
2457
|
-
this_1.
|
|
2458
|
-
tmp_0.
|
|
2475
|
+
this_1.w1i(RustTransform$borrow$lambda);
|
|
2476
|
+
tmp_0.u1z_1 = this_1.x1i();
|
|
2459
2477
|
var tmp_1 = this;
|
|
2460
2478
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2461
2479
|
// Inline function 'kotlin.apply' call
|
|
2462
|
-
tmp_1.
|
|
2463
|
-
this.
|
|
2480
|
+
tmp_1.v1z_1 = (new TransformerBuilder()).x1i();
|
|
2481
|
+
this.w1z_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2464
2482
|
var tmp_2 = this;
|
|
2465
2483
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2466
2484
|
// Inline function 'kotlin.apply' call
|
|
2467
2485
|
var this_2 = new TransformerBuilder();
|
|
2468
|
-
this_2.
|
|
2469
|
-
tmp_2.
|
|
2470
|
-
this.
|
|
2486
|
+
this_2.o1v(RustTransform$serializationArgs$lambda);
|
|
2487
|
+
tmp_2.x1z_1 = this_2.x1i();
|
|
2488
|
+
this.y1z_1 = setOf(['i32', 'i64', 'f32', 'f64', 'bool', 'u8', 'u16', 'u32', 'u64', 'usize', 'isize', '()']);
|
|
2471
2489
|
}
|
|
2472
|
-
protoOf(RustTransform).
|
|
2490
|
+
protoOf(RustTransform).a20 = function (element) {
|
|
2473
2491
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2474
2492
|
var scope = new TransformScope(element);
|
|
2475
|
-
scope.
|
|
2476
|
-
var tmp = scope.
|
|
2493
|
+
scope.k1v(RustTransform_getInstance().t1z_1);
|
|
2494
|
+
var tmp = scope.f1v_1;
|
|
2477
2495
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2478
2496
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2479
2497
|
var scope_0 = new TransformScope(this_0);
|
|
2480
|
-
scope_0.
|
|
2481
|
-
var tmp_0 = scope_0.
|
|
2498
|
+
scope_0.k1v(RustTransform_getInstance().u1z_1);
|
|
2499
|
+
var tmp_0 = scope_0.f1v_1;
|
|
2482
2500
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2483
2501
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2484
2502
|
var scope_1 = new TransformScope(this_1);
|
|
2485
|
-
scope_1.
|
|
2486
|
-
var tmp_1 = scope_1.
|
|
2503
|
+
scope_1.k1v(RustTransform_getInstance().v1z_1);
|
|
2504
|
+
var tmp_1 = scope_1.f1v_1;
|
|
2487
2505
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2488
2506
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2489
2507
|
var scope_2 = new TransformScope(this_2);
|
|
2490
|
-
scope_2.
|
|
2491
|
-
var tmp_2 = scope_2.
|
|
2508
|
+
scope_2.k1v(RustTransform_getInstance().x1z_1);
|
|
2509
|
+
var tmp_2 = scope_2.f1v_1;
|
|
2492
2510
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2493
2511
|
};
|
|
2494
|
-
protoOf(RustTransform).
|
|
2512
|
+
protoOf(RustTransform).z1z = function (_this__u8e3s4) {
|
|
2495
2513
|
var tmp;
|
|
2496
2514
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2515
|
+
var pascalName = _this__u8e3s4.h1j_1.y1i();
|
|
2497
2516
|
var tmp_0;
|
|
2498
|
-
if (_this__u8e3s4.
|
|
2499
|
-
tmp_0 =
|
|
2517
|
+
if (_this__u8e3s4.i1j_1.r()) {
|
|
2518
|
+
tmp_0 = pascalName;
|
|
2500
2519
|
} else {
|
|
2501
|
-
tmp_0 =
|
|
2520
|
+
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.i1j_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda) + '>';
|
|
2502
2521
|
}
|
|
2503
2522
|
tmp = tmp_0;
|
|
2504
2523
|
} else {
|
|
@@ -2506,13 +2525,13 @@ protoOf(RustTransform).c23 = function (_this__u8e3s4) {
|
|
|
2506
2525
|
tmp = 'String';
|
|
2507
2526
|
} else {
|
|
2508
2527
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2509
|
-
tmp = 'Option<' + this.
|
|
2528
|
+
tmp = 'Option<' + this.z1z(_this__u8e3s4.f1j_1) + '>';
|
|
2510
2529
|
} else {
|
|
2511
2530
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2512
|
-
tmp = 'Vec<' + this.
|
|
2531
|
+
tmp = 'Vec<' + this.z1z(_this__u8e3s4.g1j_1) + '>';
|
|
2513
2532
|
} else {
|
|
2514
2533
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2515
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2534
|
+
tmp = 'std::collections::HashMap<' + this.z1z(_this__u8e3s4.h1n_1) + ', ' + this.z1z(_this__u8e3s4.i1n_1) + '>';
|
|
2516
2535
|
} else {
|
|
2517
2536
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2518
2537
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2534,7 +2553,7 @@ protoOf(RustTransform).c23 = function (_this__u8e3s4) {
|
|
|
2534
2553
|
} else {
|
|
2535
2554
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2536
2555
|
var tmp_1;
|
|
2537
|
-
switch (_this__u8e3s4.
|
|
2556
|
+
switch (_this__u8e3s4.e1n_1.b3_1) {
|
|
2538
2557
|
case 0:
|
|
2539
2558
|
tmp_1 = 'i32';
|
|
2540
2559
|
break;
|
|
@@ -2549,7 +2568,7 @@ protoOf(RustTransform).c23 = function (_this__u8e3s4) {
|
|
|
2549
2568
|
} else {
|
|
2550
2569
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2551
2570
|
var tmp_2;
|
|
2552
|
-
switch (_this__u8e3s4.
|
|
2571
|
+
switch (_this__u8e3s4.f1n_1.b3_1) {
|
|
2553
2572
|
case 0:
|
|
2554
2573
|
tmp_2 = 'f32';
|
|
2555
2574
|
break;
|
|
@@ -2569,7 +2588,7 @@ protoOf(RustTransform).c23 = function (_this__u8e3s4) {
|
|
|
2569
2588
|
tmp = 'String';
|
|
2570
2589
|
} else {
|
|
2571
2590
|
if (_this__u8e3s4 instanceof Function) {
|
|
2572
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2591
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.o1n_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.z1z(_this__u8e3s4.p1n_1) + '>';
|
|
2573
2592
|
} else {
|
|
2574
2593
|
noWhenBranchMatchedException();
|
|
2575
2594
|
}
|
|
@@ -2590,23 +2609,27 @@ protoOf(RustTransform).c23 = function (_this__u8e3s4) {
|
|
|
2590
2609
|
}
|
|
2591
2610
|
return tmp;
|
|
2592
2611
|
};
|
|
2593
|
-
protoOf(RustTransform).
|
|
2612
|
+
protoOf(RustTransform).e20 = function (_this__u8e3s4) {
|
|
2594
2613
|
var tmp;
|
|
2595
2614
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2596
|
-
|
|
2615
|
+
// Inline function 'kotlin.let' call
|
|
2616
|
+
var it = _this__u8e3s4.h1j_1.y1i();
|
|
2617
|
+
tmp = startsWith(it, '&') || startsWith(it, '&dyn ') || startsWith(it, '&impl ') || startsWith(it, '&mut ');
|
|
2597
2618
|
} else {
|
|
2598
2619
|
tmp = false;
|
|
2599
2620
|
}
|
|
2600
2621
|
return tmp;
|
|
2601
2622
|
};
|
|
2602
|
-
protoOf(RustTransform).
|
|
2603
|
-
|
|
2623
|
+
protoOf(RustTransform).d20 = function (_this__u8e3s4) {
|
|
2624
|
+
// Inline function 'kotlin.let' call
|
|
2625
|
+
var it = _this__u8e3s4.h1j_1.y1i();
|
|
2626
|
+
return it === 'Serializer' || it === 'Deserializer';
|
|
2604
2627
|
};
|
|
2605
|
-
protoOf(RustTransform).
|
|
2606
|
-
return _this__u8e3s4.
|
|
2628
|
+
protoOf(RustTransform).c20 = function (_this__u8e3s4) {
|
|
2629
|
+
return _this__u8e3s4.h1j_1.y1i() === 'GeneratorField';
|
|
2607
2630
|
};
|
|
2608
|
-
protoOf(RustTransform).
|
|
2609
|
-
var v = _this__u8e3s4.
|
|
2631
|
+
protoOf(RustTransform).b20 = function (_this__u8e3s4) {
|
|
2632
|
+
var v = _this__u8e3s4.j1j();
|
|
2610
2633
|
switch (v) {
|
|
2611
2634
|
case 'self':
|
|
2612
2635
|
case '&self':
|
|
@@ -2622,20 +2645,20 @@ function RustTransform_getInstance() {
|
|
|
2622
2645
|
return RustTransform_instance;
|
|
2623
2646
|
}
|
|
2624
2647
|
function borrow(_this__u8e3s4) {
|
|
2625
|
-
return _this__u8e3s4.
|
|
2648
|
+
return _this__u8e3s4.l1n(new Name(listOf('&' + _this__u8e3s4.h1j_1.y1i())));
|
|
2626
2649
|
}
|
|
2627
2650
|
function borrowDyn(_this__u8e3s4) {
|
|
2628
|
-
return _this__u8e3s4.
|
|
2651
|
+
return _this__u8e3s4.l1n(new Name(listOf('&dyn ' + _this__u8e3s4.h1j_1.y1i())));
|
|
2629
2652
|
}
|
|
2630
2653
|
function borrowImpl(_this__u8e3s4) {
|
|
2631
|
-
return _this__u8e3s4.
|
|
2654
|
+
return _this__u8e3s4.l1n(new Name(listOf('&impl ' + _this__u8e3s4.h1j_1.y1i())));
|
|
2632
2655
|
}
|
|
2633
2656
|
function ownedImpl(_this__u8e3s4) {
|
|
2634
|
-
return _this__u8e3s4.
|
|
2657
|
+
return _this__u8e3s4.l1n(new Name(listOf('impl ' + _this__u8e3s4.h1j_1.y1i())));
|
|
2635
2658
|
}
|
|
2636
2659
|
//region block: post-declaration
|
|
2637
|
-
protoOf(RustIrEmitter).
|
|
2638
|
-
protoOf(RustIrEmitter).
|
|
2660
|
+
protoOf(RustIrEmitter).eo = emit_1;
|
|
2661
|
+
protoOf(RustIrEmitter).x1v = beforeGenerate;
|
|
2639
2662
|
//endregion
|
|
2640
2663
|
//region block: exports
|
|
2641
2664
|
export {
|