@flock/wirespec 0.19.0-RC.2 → 0.19.0-RC.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +163 -163
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1570 -1570
- package/colormath-root-colormath.mjs +444 -444
- package/kotest-kotest-property.mjs +605 -1435
- package/kotest-kotest-property.mjs.map +1 -1
- package/kotest-property-arbs.mjs +0 -478
- package/kotest-property-arbs.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +2478 -2738
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +4926 -4926
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1819 -1819
- package/kotlinx-io-kotlinx-io-core.mjs +440 -440
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1792 -1792
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1395 -1395
- package/mordant-mordant.mjs +1362 -1362
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +1541 -1541
- package/wirespec-src-compiler-emitters-java.mjs +387 -387
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +341 -341
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +371 -371
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +416 -416
- package/wirespec-src-compiler-emitters-scala.mjs +168 -168
- package/wirespec-src-compiler-emitters-typescript.mjs +471 -471
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +87 -87
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3672 -3672
- package/wirespec-src-compiler-lib.mjs +418 -418
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +512 -512
- package/wirespec-src-converter-openapi.mjs +772 -772
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-integration-kotest.mjs +490 -572
- package/wirespec-src-integration-kotest.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +185 -185
- package/wirespec-src-plugin-cli.mjs +106 -106
- package/wirespec-src-plugin-npm.d.mts +1 -1
- package/wirespec-src-plugin-npm.mjs +40 -40
- package/wirespec-src-tools-generator.mjs +35 -35
|
@@ -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.r22_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.m1();
|
|
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.m1(), ['.', ' ']);
|
|
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.mu(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().u1k(_this__u8e3s4).c1q();
|
|
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().u22_1.v1(_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.e1r(VOID, plus(imports, _this__u8e3s4.b1r_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.o1m_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.l1m_1);
|
|
330
330
|
} else {
|
|
331
331
|
if (type instanceof Array_0) {
|
|
332
|
-
tmp = containsWildcard($this, type.
|
|
332
|
+
tmp = containsWildcard($this, type.m1m_1);
|
|
333
333
|
} else {
|
|
334
334
|
if (type instanceof Dict) {
|
|
335
|
-
tmp = containsWildcard($this, type.
|
|
335
|
+
tmp = containsWildcard($this, type.n1q_1) || containsWildcard($this, type.o1q_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.o1m_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.l1m_1);
|
|
385
385
|
} else {
|
|
386
386
|
if (type instanceof Array_0) {
|
|
387
|
-
tmp = containsUnderiveable($this, type.
|
|
387
|
+
tmp = containsUnderiveable($this, type.m1m_1);
|
|
388
388
|
} else {
|
|
389
389
|
if (type instanceof Dict) {
|
|
390
|
-
tmp = containsUnderiveable($this, type.
|
|
390
|
+
tmp = containsUnderiveable($this, type.n1q_1) || containsUnderiveable($this, type.o1q_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.u22_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.v22_1 = function_0;
|
|
426
426
|
}
|
|
427
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
428
|
-
return this.
|
|
427
|
+
protoOf(sam$kotlin_Comparator$0).sd = function (a, b) {
|
|
428
|
+
return this.v22_1(a, b);
|
|
429
429
|
};
|
|
430
430
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
431
|
-
return this.
|
|
431
|
+
return this.sd(a, b);
|
|
432
432
|
};
|
|
433
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
434
|
-
return this.
|
|
433
|
+
protoOf(sam$kotlin_Comparator$0).m3 = function () {
|
|
434
|
+
return this.v22_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.m3(), other.m3());
|
|
442
442
|
} else {
|
|
443
443
|
tmp_0 = false;
|
|
444
444
|
}
|
|
@@ -449,22 +449,22 @@ 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.m3());
|
|
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().u1k((new Name(name.s1k_1)).c1q());
|
|
459
459
|
}
|
|
460
460
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
461
|
-
var value = name.
|
|
461
|
+
var value = name.p1m();
|
|
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().u1k((new Name(name.s1k_1)).c1q());
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
@@ -474,20 +474,20 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
474
474
|
return function (stmt, tr) {
|
|
475
475
|
var tmp;
|
|
476
476
|
if (stmt instanceof ConstructorStatement) {
|
|
477
|
-
var tmp_0 = tr.
|
|
477
|
+
var tmp_0 = tr.d1y(stmt.x1q_1);
|
|
478
478
|
// Inline function 'kotlin.collections.map' call
|
|
479
|
-
var this_0 = stmt.
|
|
479
|
+
var this_0 = stmt.y1q_1;
|
|
480
480
|
// Inline function 'kotlin.collections.mapTo' call
|
|
481
|
-
var destination = ArrayList_init_$Create$(this_0.
|
|
481
|
+
var destination = ArrayList_init_$Create$(this_0.a1());
|
|
482
482
|
// Inline function 'kotlin.collections.iterator' call
|
|
483
|
-
var _iterator__ex2g4s = this_0.
|
|
483
|
+
var _iterator__ex2g4s = this_0.k1().t();
|
|
484
484
|
while (_iterator__ex2g4s.u()) {
|
|
485
485
|
var item = _iterator__ex2g4s.v();
|
|
486
486
|
// Inline function 'kotlin.collections.component1' call
|
|
487
|
-
var k = item.
|
|
487
|
+
var k = item.l1();
|
|
488
488
|
// Inline function 'kotlin.collections.component2' call
|
|
489
|
-
var v = item.
|
|
490
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
489
|
+
var v = item.m1();
|
|
490
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.g1y(v));
|
|
491
491
|
destination.x(tmp$ret$3);
|
|
492
492
|
}
|
|
493
493
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -499,7 +499,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
499
499
|
}
|
|
500
500
|
function RustIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
501
501
|
return function () {
|
|
502
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
502
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().u22_1, setOf(['self', 'Self']));
|
|
503
503
|
var tmp = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
504
504
|
var tmp_0 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
505
505
|
var tmp_1 = RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -513,69 +513,69 @@ function RustIrEmitter$_get_sanitizationConfig_$ref_17ypni() {
|
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
function RustIrEmitter$emitShared$lambda($this$interface) {
|
|
516
|
-
$this$interface.
|
|
516
|
+
$this$interface.c1n(new Custom('Headers'));
|
|
517
517
|
return Unit_instance;
|
|
518
518
|
}
|
|
519
519
|
function RustIrEmitter$emitShared$lambda_0($this$interface) {
|
|
520
|
-
$this$interface.
|
|
520
|
+
$this$interface.c1n(new Custom('Headers'));
|
|
521
521
|
return Unit_instance;
|
|
522
522
|
}
|
|
523
523
|
function RustIrEmitter$emitShared$lambda_1($this$interface) {
|
|
524
|
-
$this$interface.
|
|
525
|
-
$this$interface.
|
|
526
|
-
$this$interface.
|
|
524
|
+
$this$interface.c1n(new Custom('Sized'));
|
|
525
|
+
$this$interface.j1l('label', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda);
|
|
526
|
+
$this$interface.j1l('from_label', true, VOID, RustIrEmitter$emitShared$lambda$lambda_0);
|
|
527
527
|
return Unit_instance;
|
|
528
528
|
}
|
|
529
529
|
function RustIrEmitter$emitShared$lambda$lambda($this$function) {
|
|
530
|
-
$this$function.
|
|
531
|
-
$this$function.
|
|
530
|
+
$this$function.e1l('&self', new Custom(''));
|
|
531
|
+
$this$function.h1l(new Custom('&str'));
|
|
532
532
|
return Unit_instance;
|
|
533
533
|
}
|
|
534
534
|
function RustIrEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
535
|
-
$this$function.
|
|
536
|
-
$this$function.
|
|
535
|
+
$this$function.e1l('s', new Custom('&str'));
|
|
536
|
+
$this$function.h1l(new Custom('Option<Self>'));
|
|
537
537
|
return Unit_instance;
|
|
538
538
|
}
|
|
539
539
|
function RustIrEmitter$emitShared$lambda_2($this$interface) {
|
|
540
|
-
$this$interface.
|
|
541
|
-
$this$interface.
|
|
542
|
-
$this$interface.
|
|
540
|
+
$this$interface.w1m($this$interface.v1k('T', []), []);
|
|
541
|
+
$this$interface.j1l('value', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_1);
|
|
542
|
+
$this$interface.j1l('validate', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_2);
|
|
543
543
|
return Unit_instance;
|
|
544
544
|
}
|
|
545
545
|
function RustIrEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
546
|
-
$this$function.
|
|
547
|
-
$this$function.
|
|
546
|
+
$this$function.e1l('&self', new Custom(''));
|
|
547
|
+
$this$function.h1l(borrow($this$function.v1k('T', [])));
|
|
548
548
|
return Unit_instance;
|
|
549
549
|
}
|
|
550
550
|
function RustIrEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
551
|
-
$this$function.
|
|
552
|
-
$this$function.
|
|
551
|
+
$this$function.e1l('&self', new Custom(''));
|
|
552
|
+
$this$function.h1l($this$function.d1n());
|
|
553
553
|
return Unit_instance;
|
|
554
554
|
}
|
|
555
555
|
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.
|
|
556
|
+
$this$interface.w1m($this$interface.v1k('T', []), []);
|
|
557
|
+
$this$interface.x1m('path', borrowDyn($this$interface.v1k('Path', [])));
|
|
558
|
+
$this$interface.x1m('method', borrow($this$interface.v1k('Method', [])));
|
|
559
|
+
$this$interface.x1m('queries', borrowDyn($this$interface.v1k('Queries', [])));
|
|
560
|
+
$this$interface.x1m('headers', borrowDyn($this$interface.v1k('RequestHeaders', [])));
|
|
561
|
+
$this$interface.x1m('body', borrow($this$interface.v1k('T', [])));
|
|
562
562
|
return Unit_instance;
|
|
563
563
|
}
|
|
564
564
|
function RustIrEmitter$emitShared$lambda_4($this$interface) {
|
|
565
|
-
$this$interface.
|
|
566
|
-
$this$interface.
|
|
567
|
-
$this$interface.
|
|
568
|
-
$this$interface.
|
|
565
|
+
$this$interface.w1m($this$interface.v1k('T', []), []);
|
|
566
|
+
$this$interface.x1m('status', $this$interface.c1o());
|
|
567
|
+
$this$interface.x1m('headers', borrowDyn($this$interface.v1k('ResponseHeaders', [])));
|
|
568
|
+
$this$interface.x1m('body', borrow($this$interface.v1k('T', [])));
|
|
569
569
|
return Unit_instance;
|
|
570
570
|
}
|
|
571
571
|
function RustIrEmitter$emitShared$lambda_5($this$interface) {
|
|
572
|
-
$this$interface.
|
|
572
|
+
$this$interface.z1n('transport', VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_3);
|
|
573
573
|
return Unit_instance;
|
|
574
574
|
}
|
|
575
575
|
function RustIrEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
576
|
-
$this$asyncFunction.
|
|
577
|
-
$this$asyncFunction.
|
|
578
|
-
$this$asyncFunction.
|
|
576
|
+
$this$asyncFunction.e1l('&self', new Custom(''));
|
|
577
|
+
$this$asyncFunction.e1l('request', borrow($this$asyncFunction.v1k('RawRequest', [])));
|
|
578
|
+
$this$asyncFunction.h1l($this$asyncFunction.v1k('RawResponse', []));
|
|
579
579
|
return Unit_instance;
|
|
580
580
|
}
|
|
581
581
|
function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -583,7 +583,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
583
583
|
var tmp;
|
|
584
584
|
if (element instanceof File) {
|
|
585
585
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
586
|
-
var tmp0 = element.
|
|
586
|
+
var tmp0 = element.b1r_1;
|
|
587
587
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
588
588
|
var destination = ArrayList_init_$Create$_0();
|
|
589
589
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -594,7 +594,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
var namespace = first(destination);
|
|
597
|
-
tmp = element.
|
|
597
|
+
tmp = element.e1r(VOID, plus($rustImports, namespace.h1r_1));
|
|
598
598
|
} else {
|
|
599
599
|
tmp = element;
|
|
600
600
|
}
|
|
@@ -606,7 +606,7 @@ function RustIrEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
606
606
|
var tmp;
|
|
607
607
|
if (element instanceof Enum_0) {
|
|
608
608
|
var tmp_0;
|
|
609
|
-
if (element.
|
|
609
|
+
if (element.g1s_1.equals(Companion_getInstance().u1k('Method'))) {
|
|
610
610
|
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
611
|
} else {
|
|
612
612
|
tmp_0 = element;
|
|
@@ -623,7 +623,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
623
623
|
var tmp;
|
|
624
624
|
if (element instanceof File) {
|
|
625
625
|
// Inline function 'kotlin.collections.flatMap' call
|
|
626
|
-
var tmp0 = element.
|
|
626
|
+
var tmp0 = element.b1r_1;
|
|
627
627
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
628
628
|
var destination = ArrayList_init_$Create$_0();
|
|
629
629
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -635,30 +635,30 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
635
635
|
tmp$ret$0 = listOf(element_0);
|
|
636
636
|
break $l$block;
|
|
637
637
|
}
|
|
638
|
-
var name = element_0.
|
|
638
|
+
var name = element_0.t1r_1.b1q();
|
|
639
639
|
var tmp_0;
|
|
640
640
|
// Inline function 'kotlin.collections.contains' call
|
|
641
641
|
// Inline function 'kotlin.collections.containsKey' call
|
|
642
642
|
var this_0 = $dslTraits;
|
|
643
|
-
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).
|
|
643
|
+
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).o2(name)) {
|
|
644
644
|
// Inline function 'kotlin.collections.buildList' call
|
|
645
645
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
646
646
|
// Inline function 'kotlin.apply' call
|
|
647
647
|
var this_1 = ArrayList_init_$Create$_0();
|
|
648
|
-
this_1.x(ensureNotNull($dslTraits.
|
|
648
|
+
this_1.x(ensureNotNull($dslTraits.q2(name)));
|
|
649
649
|
if (name === 'Request') {
|
|
650
650
|
this_1.x($requestHeaders);
|
|
651
651
|
}
|
|
652
652
|
if (name === 'Response') {
|
|
653
653
|
this_1.x($responseHeaders);
|
|
654
654
|
}
|
|
655
|
-
tmp_0 = this_1.
|
|
655
|
+
tmp_0 = this_1.p5();
|
|
656
656
|
} else {
|
|
657
657
|
// Inline function 'kotlin.collections.contains' call
|
|
658
658
|
// Inline function 'kotlin.collections.containsKey' call
|
|
659
659
|
var this_2 = $rawElementInterfaces;
|
|
660
|
-
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).
|
|
661
|
-
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.
|
|
660
|
+
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).o2(name)) {
|
|
661
|
+
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.q2(name)));
|
|
662
662
|
} else {
|
|
663
663
|
tmp_0 = listOf(element_0);
|
|
664
664
|
}
|
|
@@ -669,7 +669,7 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
669
669
|
addAll(destination, list);
|
|
670
670
|
}
|
|
671
671
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
672
|
-
tmp = element.
|
|
672
|
+
tmp = element.e1r(VOID, newElements);
|
|
673
673
|
} else {
|
|
674
674
|
tmp = element;
|
|
675
675
|
}
|
|
@@ -685,14 +685,14 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
685
685
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
686
686
|
var tmp_0 = scope;
|
|
687
687
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
688
|
-
var this_0 = scope.
|
|
688
|
+
var this_0 = scope.l1y_1;
|
|
689
689
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
690
690
|
// Inline function 'kotlin.apply' call
|
|
691
691
|
var this_1 = new TransformerBuilder();
|
|
692
|
-
this_1.
|
|
693
|
-
var tmp$ret$2 = this_1.
|
|
694
|
-
tmp_0.
|
|
695
|
-
var tmp_1 = scope.
|
|
692
|
+
this_1.d1m(RustIrEmitter$emitShared$lambda$lambda_4);
|
|
693
|
+
var tmp$ret$2 = this_1.e1m();
|
|
694
|
+
tmp_0.l1y_1 = transform(this_0, tmp$ret$2);
|
|
695
|
+
var tmp_1 = scope.l1y_1;
|
|
696
696
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
697
697
|
} else {
|
|
698
698
|
tmp = element;
|
|
@@ -703,7 +703,7 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
703
703
|
function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
704
704
|
var tmp;
|
|
705
705
|
if (element instanceof Function_0) {
|
|
706
|
-
var tmp0 = element.
|
|
706
|
+
var tmp0 = element.l1o_1;
|
|
707
707
|
var tmp$ret$0;
|
|
708
708
|
$l$block_0: {
|
|
709
709
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -720,7 +720,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
720
720
|
var _iterator__ex2g4s = tmp0.t();
|
|
721
721
|
while (_iterator__ex2g4s.u()) {
|
|
722
722
|
var element_0 = _iterator__ex2g4s.v();
|
|
723
|
-
if (element_0.
|
|
723
|
+
if (element_0.d1t_1.p1m() === '&self' || element_0.d1t_1.p1m() === 'self') {
|
|
724
724
|
tmp$ret$0 = true;
|
|
725
725
|
break $l$block_0;
|
|
726
726
|
}
|
|
@@ -728,7 +728,7 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
728
728
|
tmp$ret$0 = false;
|
|
729
729
|
}
|
|
730
730
|
var hasSelf = tmp$ret$0;
|
|
731
|
-
tmp = hasSelf || element.
|
|
731
|
+
tmp = hasSelf || element.p1o_1 ? element : element.r1o(VOID, VOID, plus(listOf(get_rustSelfParam()), element.l1o_1));
|
|
732
732
|
} else {
|
|
733
733
|
tmp = element;
|
|
734
734
|
}
|
|
@@ -739,7 +739,7 @@ function RustIrEmitter$emitShared$lambda_10(group) {
|
|
|
739
739
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
740
740
|
}
|
|
741
741
|
function RustIrEmitter$emitShared$lambda$lambda_5(it) {
|
|
742
|
-
return RustGenerator_instance.
|
|
742
|
+
return RustGenerator_instance.z1y(it);
|
|
743
743
|
}
|
|
744
744
|
function RustIrEmitter$emit$lambda(a, b) {
|
|
745
745
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -748,7 +748,7 @@ function RustIrEmitter$emit$lambda(a, b) {
|
|
|
748
748
|
return compareValues(tmp, tmp$ret$1);
|
|
749
749
|
}
|
|
750
750
|
function emit$emitMod(this$0, def) {
|
|
751
|
-
return 'pub mod ' + sanitize(this$0, def.
|
|
751
|
+
return 'pub mod ' + sanitize(this$0, def.tu()) + ';';
|
|
752
752
|
}
|
|
753
753
|
function RustIrEmitter$emit$lambda_0(this$0) {
|
|
754
754
|
return function (it) {
|
|
@@ -777,17 +777,17 @@ function RustIrEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs)
|
|
|
777
777
|
var tmp_0;
|
|
778
778
|
var tmp_1;
|
|
779
779
|
if (expr instanceof RawExpression) {
|
|
780
|
-
tmp_1 = endsWith(expr.
|
|
780
|
+
tmp_1 = endsWith(expr.r1s_1, 'Generator');
|
|
781
781
|
} else {
|
|
782
782
|
tmp_1 = false;
|
|
783
783
|
}
|
|
784
784
|
if (tmp_1) {
|
|
785
|
-
tmp_0 = !(expr.
|
|
785
|
+
tmp_0 = !(expr.r1s_1 === $generatorOwnName);
|
|
786
786
|
} else {
|
|
787
787
|
tmp_0 = false;
|
|
788
788
|
}
|
|
789
789
|
if (tmp_0) {
|
|
790
|
-
$generatorRefs.x(expr.
|
|
790
|
+
$generatorRefs.x(expr.r1s_1);
|
|
791
791
|
tmp = Unit_instance;
|
|
792
792
|
}
|
|
793
793
|
return transformChildren_1(expr, t);
|
|
@@ -800,7 +800,7 @@ function RustIrEmitter$emit$lambda_2(this$0) {
|
|
|
800
800
|
}
|
|
801
801
|
function RustIrEmitter$emitClient$lambda(this$0) {
|
|
802
802
|
return function (endpoint) {
|
|
803
|
-
return 'pub mod ' + toSnakeCase(this$0, endpoint.
|
|
803
|
+
return 'pub mod ' + toSnakeCase(this$0, endpoint.ct_1.m1() + 'Client') + ';';
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
806
|
function RustIrEmitter$toPascalCase$lambda(s) {
|
|
@@ -820,39 +820,39 @@ function RustIrEmitter$toPascalCase$lambda(s) {
|
|
|
820
820
|
}
|
|
821
821
|
function RustIrEmitter$buildClientParams$lambda(this$0) {
|
|
822
822
|
return function (_destruct__k2r9zo) {
|
|
823
|
-
var name = _destruct__k2r9zo.
|
|
824
|
-
return sanitizeKeywords(this$0, name.
|
|
823
|
+
var name = _destruct__k2r9zo.kf();
|
|
824
|
+
return sanitizeKeywords(this$0, name.c1q());
|
|
825
825
|
};
|
|
826
826
|
}
|
|
827
827
|
function RustIrEmitter$buildClientParams$lambda_0(this$0) {
|
|
828
828
|
return function (_destruct__k2r9zo) {
|
|
829
|
-
var name = _destruct__k2r9zo.
|
|
830
|
-
var type = _destruct__k2r9zo.
|
|
831
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
829
|
+
var name = _destruct__k2r9zo.kf();
|
|
830
|
+
var type = _destruct__k2r9zo.lf();
|
|
831
|
+
var tmp = sanitizeKeywords(this$0, name.c1q());
|
|
832
832
|
// Inline function 'kotlin.with' call
|
|
833
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
833
|
+
return tmp + ': ' + RustTransform_getInstance().c23(type);
|
|
834
834
|
};
|
|
835
835
|
}
|
|
836
836
|
function RustIrEmitter(packageName, emitShared) {
|
|
837
837
|
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.
|
|
838
|
+
packageName = packageName === VOID ? Companion_instance_0.jv('community.flock.wirespec.generated') : packageName;
|
|
839
|
+
emitShared = emitShared === VOID ? Companion_instance_1.es() : emitShared;
|
|
840
|
+
this.n22_1 = packageName;
|
|
841
|
+
this.o22_1 = emitShared;
|
|
842
|
+
this.p22_1 = RustGenerator_instance;
|
|
843
|
+
this.q22_1 = FileExtension_Rust_getInstance();
|
|
844
844
|
var tmp = this;
|
|
845
|
-
tmp.
|
|
846
|
-
this.
|
|
847
|
-
this.
|
|
845
|
+
tmp.r22_1 = lazy(RustIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
846
|
+
this.s22_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
847
|
+
this.t22_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
848
848
|
}
|
|
849
|
-
protoOf(RustIrEmitter).
|
|
850
|
-
return this.
|
|
849
|
+
protoOf(RustIrEmitter).y1y = function () {
|
|
850
|
+
return this.p22_1;
|
|
851
851
|
};
|
|
852
|
-
protoOf(RustIrEmitter).
|
|
853
|
-
return this.
|
|
852
|
+
protoOf(RustIrEmitter).cu = function () {
|
|
853
|
+
return this.q22_1;
|
|
854
854
|
};
|
|
855
|
-
protoOf(RustIrEmitter).
|
|
855
|
+
protoOf(RustIrEmitter).b1z = function () {
|
|
856
856
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
857
857
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustIrEmitter$emitShared$lambda);
|
|
858
858
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustIrEmitter$emitShared$lambda_0);
|
|
@@ -866,43 +866,43 @@ protoOf(RustIrEmitter).t1z = function () {
|
|
|
866
866
|
var transportationTrait = interface_0('Transportation', VOID, RustIrEmitter$emitShared$lambda_5);
|
|
867
867
|
var dslTraits = mapOf([to('Enum', enumTrait), to('Refined', refinedTrait), to('Request', requestTrait), to('Response', responseTrait), to('Transportation', transportationTrait)]);
|
|
868
868
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
869
|
-
var this_0 = convert(Companion_instance_0.
|
|
869
|
+
var this_0 = convert(Companion_instance_0.jv('shared'));
|
|
870
870
|
var scope = new TransformScope(this_0);
|
|
871
871
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
872
872
|
var tmp = scope;
|
|
873
873
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
874
|
-
var this_1 = scope.
|
|
874
|
+
var this_1 = scope.l1y_1;
|
|
875
875
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
876
876
|
// Inline function 'kotlin.apply' call
|
|
877
877
|
var this_2 = new TransformerBuilder();
|
|
878
|
-
this_2.
|
|
879
|
-
var tmp$ret$2 = this_2.
|
|
880
|
-
tmp.
|
|
878
|
+
this_2.d1m(RustIrEmitter$emitShared$lambda_6(rustImports));
|
|
879
|
+
var tmp$ret$2 = this_2.e1m();
|
|
880
|
+
tmp.l1y_1 = transform(this_1, tmp$ret$2);
|
|
881
881
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
882
882
|
var tmp_0 = scope;
|
|
883
883
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
884
|
-
var this_3 = scope.
|
|
884
|
+
var this_3 = scope.l1y_1;
|
|
885
885
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
886
886
|
// Inline function 'kotlin.apply' call
|
|
887
887
|
var this_4 = new TransformerBuilder();
|
|
888
|
-
this_4.
|
|
889
|
-
var tmp$ret$7 = this_4.
|
|
890
|
-
tmp_0.
|
|
888
|
+
this_4.d1m(RustIrEmitter$emitShared$lambda_7);
|
|
889
|
+
var tmp$ret$7 = this_4.e1m();
|
|
890
|
+
tmp_0.l1y_1 = transform(this_3, tmp$ret$7);
|
|
891
891
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
892
892
|
var tmp_1 = scope;
|
|
893
893
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
894
|
-
var this_5 = scope.
|
|
894
|
+
var this_5 = scope.l1y_1;
|
|
895
895
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
896
896
|
// Inline function 'kotlin.apply' call
|
|
897
897
|
var this_6 = new TransformerBuilder();
|
|
898
|
-
this_6.
|
|
899
|
-
var tmp$ret$12 = this_6.
|
|
900
|
-
tmp_1.
|
|
901
|
-
var tmp_2 = scope.
|
|
898
|
+
this_6.d1m(RustIrEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
899
|
+
var tmp$ret$12 = this_6.e1m();
|
|
900
|
+
tmp_1.l1y_1 = transform(this_5, tmp$ret$12);
|
|
901
|
+
var tmp_2 = scope.l1y_1;
|
|
902
902
|
// Inline function 'kotlin.let' call
|
|
903
903
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
904
904
|
// Inline function 'kotlin.collections.flatMap' call
|
|
905
|
-
var tmp0 = file.
|
|
905
|
+
var tmp0 = file.b1r_1;
|
|
906
906
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
907
907
|
var destination = ArrayList_init_$Create$_0();
|
|
908
908
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -915,7 +915,7 @@ protoOf(RustIrEmitter).t1z = function () {
|
|
|
915
915
|
break $l$block;
|
|
916
916
|
}
|
|
917
917
|
var tmp_3;
|
|
918
|
-
var tmp0_0 = element.
|
|
918
|
+
var tmp0_0 = element.m1r_1;
|
|
919
919
|
var tmp$ret$18;
|
|
920
920
|
$l$block_1: {
|
|
921
921
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -932,7 +932,7 @@ protoOf(RustIrEmitter).t1z = function () {
|
|
|
932
932
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
933
933
|
while (_iterator__ex2g4s_0.u()) {
|
|
934
934
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
935
|
-
if (containsUnderiveable(this, element_0.
|
|
935
|
+
if (containsUnderiveable(this, element_0.i1t_1)) {
|
|
936
936
|
tmp$ret$18 = true;
|
|
937
937
|
break $l$block_1;
|
|
938
938
|
}
|
|
@@ -942,7 +942,7 @@ protoOf(RustIrEmitter).t1z = function () {
|
|
|
942
942
|
if (tmp$ret$18) {
|
|
943
943
|
tmp_3 = '';
|
|
944
944
|
} else {
|
|
945
|
-
var tmp0_1 = element.
|
|
945
|
+
var tmp0_1 = element.m1r_1;
|
|
946
946
|
var tmp$ret$20;
|
|
947
947
|
$l$block_3: {
|
|
948
948
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -959,7 +959,7 @@ protoOf(RustIrEmitter).t1z = function () {
|
|
|
959
959
|
var _iterator__ex2g4s_1 = tmp0_1.t();
|
|
960
960
|
while (_iterator__ex2g4s_1.u()) {
|
|
961
961
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
962
|
-
if (containsWildcard(this, element_1.
|
|
962
|
+
if (containsWildcard(this, element_1.i1t_1)) {
|
|
963
963
|
tmp$ret$20 = true;
|
|
964
964
|
break $l$block_3;
|
|
965
965
|
}
|
|
@@ -969,7 +969,7 @@ protoOf(RustIrEmitter).t1z = function () {
|
|
|
969
969
|
if (tmp$ret$20) {
|
|
970
970
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
971
971
|
} else {
|
|
972
|
-
if (setOf(['RawRequest', 'RawResponse']).
|
|
972
|
+
if (setOf(['RawRequest', 'RawResponse']).v1(element.l1r_1.b1q())) {
|
|
973
973
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
974
974
|
} else {
|
|
975
975
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -985,29 +985,29 @@ protoOf(RustIrEmitter).t1z = function () {
|
|
|
985
985
|
tmp_6 = listOf(new RawElement(derive));
|
|
986
986
|
}
|
|
987
987
|
var prefix = tmp_6;
|
|
988
|
-
tmp$ret$17 = listOf(new File(element.
|
|
988
|
+
tmp$ret$17 = listOf(new File(element.l1r_1, plus_0(prefix, element)));
|
|
989
989
|
}
|
|
990
990
|
var list = tmp$ret$17;
|
|
991
991
|
addAll(destination, list);
|
|
992
992
|
}
|
|
993
|
-
var tmp0_2 = new File(file.
|
|
993
|
+
var tmp0_2 = new File(file.a1r_1, destination);
|
|
994
994
|
// Inline function 'kotlin.let' call
|
|
995
|
-
var wirespecFile = RustTransform_getInstance().
|
|
995
|
+
var wirespecFile = RustTransform_getInstance().d23(tmp0_2);
|
|
996
996
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
997
997
|
var scope_0 = new TransformScope(wirespecFile);
|
|
998
998
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
999
999
|
var tmp_7 = scope_0;
|
|
1000
1000
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1001
|
-
var this_7 = scope_0.
|
|
1001
|
+
var this_7 = scope_0.l1y_1;
|
|
1002
1002
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1003
1003
|
// Inline function 'kotlin.apply' call
|
|
1004
1004
|
var this_8 = new TransformerBuilder();
|
|
1005
|
-
this_8.
|
|
1006
|
-
var tmp$ret$31 = this_8.
|
|
1007
|
-
tmp_7.
|
|
1008
|
-
var tmp_8 = scope_0.
|
|
1005
|
+
this_8.d1m(RustIrEmitter$emitShared$lambda_9);
|
|
1006
|
+
var tmp$ret$31 = this_8.e1m();
|
|
1007
|
+
tmp_7.l1y_1 = transform(this_7, tmp$ret$31);
|
|
1008
|
+
var tmp_8 = scope_0.l1y_1;
|
|
1009
1009
|
// Inline function 'kotlin.let' call
|
|
1010
|
-
var tmp0_3 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1010
|
+
var tmp0_3 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).b1r_1;
|
|
1011
1011
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1012
1012
|
// Inline function 'kotlin.collections.fold' call
|
|
1013
1013
|
var accumulator = ArrayList_init_$Create$_0();
|
|
@@ -1028,26 +1028,26 @@ protoOf(RustIrEmitter).t1z = function () {
|
|
|
1028
1028
|
var groups = accumulator;
|
|
1029
1029
|
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitShared$lambda_10) + '\n';
|
|
1030
1030
|
var tmp_10;
|
|
1031
|
-
if (this.
|
|
1032
|
-
tmp_10 = new File(Companion_getInstance().
|
|
1031
|
+
if (this.o22_1.fs_1) {
|
|
1032
|
+
tmp_10 = new File(Companion_getInstance().u1k(this.n22_1.mv() + 'wirespec'), listOf(new RawElement(source)));
|
|
1033
1033
|
} else {
|
|
1034
1034
|
tmp_10 = null;
|
|
1035
1035
|
}
|
|
1036
1036
|
return tmp_10;
|
|
1037
1037
|
};
|
|
1038
|
-
protoOf(RustIrEmitter).
|
|
1038
|
+
protoOf(RustIrEmitter).a1z = function (module_0, logger) {
|
|
1039
1039
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1040
|
-
var this_0 = new NonEmptyList(module_0.
|
|
1040
|
+
var this_0 = new NonEmptyList(module_0.bu_1);
|
|
1041
1041
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
1042
1042
|
var tmp = RustIrEmitter$emit$lambda;
|
|
1043
1043
|
var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);
|
|
1044
1044
|
var tmp$ret$1 = sortedWith(this_0, tmp$ret$0);
|
|
1045
1045
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$1);
|
|
1046
|
-
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).
|
|
1046
|
+
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).wp_1;
|
|
1047
1047
|
// Inline function 'kotlin.let' call
|
|
1048
|
-
var files = emit.call(this, module_0.
|
|
1048
|
+
var files = emit.call(this, module_0.ty(VOID, statements), logger);
|
|
1049
1049
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1050
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
1050
|
+
var tmp0 = new NonEmptyList(module_0.bu_1);
|
|
1051
1051
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1052
1052
|
var destination = ArrayList_init_$Create$_0();
|
|
1053
1053
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1067,11 +1067,11 @@ protoOf(RustIrEmitter).s1z = function (module_0, logger) {
|
|
|
1067
1067
|
tmp_1 = '';
|
|
1068
1068
|
}
|
|
1069
1069
|
var clientMod = tmp_1;
|
|
1070
|
-
var modRs = new File(Companion_getInstance().
|
|
1071
|
-
var modEndpoint = new File(Companion_getInstance().
|
|
1072
|
-
var tmp_2 = Companion_getInstance().
|
|
1070
|
+
var modRs = new File(Companion_getInstance().u1k(this.n22_1.mv() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1071
|
+
var modEndpoint = new File(Companion_getInstance().u1k(this.n22_1.mv() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1072
|
+
var tmp_2 = Companion_getInstance().u1k(this.n22_1.mv() + 'model/' + 'mod');
|
|
1073
1073
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1074
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
1074
|
+
var tmp0_0 = new NonEmptyList(module_0.bu_1);
|
|
1075
1075
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1076
1076
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1077
1077
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1083,23 +1083,23 @@ protoOf(RustIrEmitter).s1z = function (module_0, logger) {
|
|
|
1083
1083
|
}
|
|
1084
1084
|
var tmp_3 = destination_0;
|
|
1085
1085
|
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.
|
|
1086
|
+
return this.o22_1.fs_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(files, modRs), modEndpoint), modModel) : NonEmptyList__plus_impl_xqmb9(files, modRs);
|
|
1087
1087
|
};
|
|
1088
|
-
protoOf(RustIrEmitter).
|
|
1089
|
-
var subPackageName = plus_1(this.
|
|
1088
|
+
protoOf(RustIrEmitter).su = function (definition, module_0, logger) {
|
|
1089
|
+
var subPackageName = plus_1(this.n22_1, definition);
|
|
1090
1090
|
var tmp;
|
|
1091
1091
|
if (definition instanceof Endpoint) {
|
|
1092
|
-
tmp = this.
|
|
1092
|
+
tmp = this.t22_1;
|
|
1093
1093
|
} else {
|
|
1094
|
-
tmp = this.
|
|
1094
|
+
tmp = this.s22_1;
|
|
1095
1095
|
}
|
|
1096
1096
|
var importHeader = tmp;
|
|
1097
1097
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1098
1098
|
// Inline function 'kotlin.let' call
|
|
1099
|
-
var file = RustTransform_getInstance().
|
|
1100
|
-
var tmp_0 = Companion_getInstance().
|
|
1099
|
+
var file = RustTransform_getInstance().d23(tmp0);
|
|
1100
|
+
var tmp_0 = Companion_getInstance().u1k(subPackageName.mv() + toSnakeCase(this, file.a1r_1.b1q()));
|
|
1101
1101
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1102
|
-
var tmp0_0 = file.
|
|
1102
|
+
var tmp0_0 = file.b1r_1;
|
|
1103
1103
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1104
1104
|
var destination = ArrayList_init_$Create$_0();
|
|
1105
1105
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1116,7 +1116,7 @@ protoOf(RustIrEmitter).kv = function (definition, module_0, logger) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1118
1118
|
};
|
|
1119
|
-
protoOf(RustIrEmitter).
|
|
1119
|
+
protoOf(RustIrEmitter).f1z = function (definition, module_0) {
|
|
1120
1120
|
var tmp;
|
|
1121
1121
|
if (definition instanceof Type) {
|
|
1122
1122
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1136,7 +1136,7 @@ protoOf(RustIrEmitter).x1z = function (definition, module_0) {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
}
|
|
1138
1138
|
var generatorFile = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
|
|
1139
|
-
var generatorOwnName = definition.
|
|
1139
|
+
var generatorOwnName = definition.tu().m1() + 'Generator';
|
|
1140
1140
|
var tmp_0 = asSequence(collectCustomTypeNames(generatorFile));
|
|
1141
1141
|
var tmp_1 = filterNot(tmp_0, RustIrEmitter$emitGenerator$lambda);
|
|
1142
1142
|
var tmp_2 = filterNot(tmp_1, RustIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -1145,8 +1145,8 @@ protoOf(RustIrEmitter).x1z = function (definition, module_0) {
|
|
|
1145
1145
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1146
1146
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1147
1147
|
var scope = new TransformScope(generatorFile);
|
|
1148
|
-
scope.
|
|
1149
|
-
var tmp_3 = scope.
|
|
1148
|
+
scope.t1y(RustIrEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1149
|
+
var tmp_3 = scope.l1y_1;
|
|
1150
1150
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1151
1151
|
// Inline function 'kotlin.collections.filter' call
|
|
1152
1152
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1189,58 +1189,58 @@ protoOf(RustIrEmitter).x1z = function (definition, module_0) {
|
|
|
1189
1189
|
destination_2.x(tmp$ret$12);
|
|
1190
1190
|
}
|
|
1191
1191
|
var typeImports = destination_2;
|
|
1192
|
-
var subPackageName = plus_2(this.
|
|
1193
|
-
return new File(Companion_getInstance().
|
|
1192
|
+
var subPackageName = plus_2(this.n22_1, 'generator');
|
|
1193
|
+
return new File(Companion_getInstance().u1k(subPackageName.mv() + toSnakeCase(this, generatorFile.a1r_1.b1q())), plus(plus(plus(this.s22_1, typeImports), generatorImports), generatorFile.b1r_1));
|
|
1194
1194
|
};
|
|
1195
|
-
protoOf(RustIrEmitter).
|
|
1195
|
+
protoOf(RustIrEmitter).st = function (type, module_0) {
|
|
1196
1196
|
var tmp = convertWithValidation(type, module_0);
|
|
1197
1197
|
// Inline function 'kotlin.collections.map' call
|
|
1198
|
-
var this_0 = type.
|
|
1198
|
+
var this_0 = type.us_1.qs_1;
|
|
1199
1199
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1200
1200
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1201
1201
|
var _iterator__ex2g4s = this_0.t();
|
|
1202
1202
|
while (_iterator__ex2g4s.u()) {
|
|
1203
1203
|
var item = _iterator__ex2g4s.v();
|
|
1204
|
-
var tmp$ret$0 = item.
|
|
1204
|
+
var tmp$ret$0 = item.ys_1.m1();
|
|
1205
1205
|
destination.x(tmp$ret$0);
|
|
1206
1206
|
}
|
|
1207
1207
|
return prependImports(this, sanitizeNames(injectSelfReceiverToValidate(tmp, toSet(destination), '&self'), _get_sanitizationConfig__sns434(this)), buildModelImports(type));
|
|
1208
1208
|
};
|
|
1209
|
-
protoOf(RustIrEmitter).
|
|
1209
|
+
protoOf(RustIrEmitter).gv = function (enum_0, module_0) {
|
|
1210
1210
|
var tmp = convert_0(enum_0);
|
|
1211
1211
|
return sanitizeEnumEntries(tmp, RustIrEmitter$emit$lambda_2(this));
|
|
1212
1212
|
};
|
|
1213
|
-
protoOf(RustIrEmitter).
|
|
1213
|
+
protoOf(RustIrEmitter).wu = function (union) {
|
|
1214
1214
|
return convert_1(union);
|
|
1215
1215
|
};
|
|
1216
|
-
protoOf(RustIrEmitter).
|
|
1216
|
+
protoOf(RustIrEmitter).bv = function (refined) {
|
|
1217
1217
|
return replaceStructWithRefinedFunctions(convert_2(refined), refined);
|
|
1218
1218
|
};
|
|
1219
|
-
protoOf(RustIrEmitter).
|
|
1219
|
+
protoOf(RustIrEmitter).hv = function (endpoint) {
|
|
1220
1220
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1221
1221
|
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_3(endpoint))))));
|
|
1222
1222
|
var scope = new TransformScope(this_0);
|
|
1223
|
-
scope.
|
|
1224
|
-
var tmp = scope.
|
|
1223
|
+
scope.q1y(fixResponseSwitchPatterns());
|
|
1224
|
+
var tmp = scope.l1y_1;
|
|
1225
1225
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1226
1226
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1227
1227
|
var scope_0 = new TransformScope(this_1);
|
|
1228
|
-
scope_0.
|
|
1229
|
-
var tmp_0 = scope_0.
|
|
1228
|
+
scope_0.q1y(fixConstructorCalls());
|
|
1229
|
+
var tmp_0 = scope_0.l1y_1;
|
|
1230
1230
|
var tmp$ret$3 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1231
1231
|
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$3), endpoint)), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1232
1232
|
};
|
|
1233
|
-
protoOf(RustIrEmitter).
|
|
1233
|
+
protoOf(RustIrEmitter).vu = function (channel) {
|
|
1234
1234
|
return convert_4(channel);
|
|
1235
1235
|
};
|
|
1236
|
-
protoOf(RustIrEmitter).
|
|
1237
|
-
var endpointName = endpoint.
|
|
1236
|
+
protoOf(RustIrEmitter).e1z = function (endpoint) {
|
|
1237
|
+
var endpointName = endpoint.ct_1.m1();
|
|
1238
1238
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1239
1239
|
var clientName = endpointName + 'Client';
|
|
1240
1240
|
var methodName = toSnakeCase(this, endpointName);
|
|
1241
1241
|
var _destruct__k2r9zo = buildClientParams(this, endpoint);
|
|
1242
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1243
|
-
var requestArgs = _destruct__k2r9zo.
|
|
1242
|
+
var paramsStr = _destruct__k2r9zo.kf();
|
|
1243
|
+
var requestArgs = _destruct__k2r9zo.lf();
|
|
1244
1244
|
var requestConstruction = endpointModuleName + '::Request::new(' + requestArgs + ')';
|
|
1245
1245
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1246
1246
|
var this_0 = importReferences(endpoint);
|
|
@@ -1249,7 +1249,7 @@ protoOf(RustIrEmitter).w1z = function (endpoint) {
|
|
|
1249
1249
|
var _iterator__ex2g4s = this_0.t();
|
|
1250
1250
|
while (_iterator__ex2g4s.u()) {
|
|
1251
1251
|
var e = _iterator__ex2g4s.v();
|
|
1252
|
-
var key = e.
|
|
1252
|
+
var key = e.iy_1;
|
|
1253
1253
|
if (set.x(key)) {
|
|
1254
1254
|
list.x(e);
|
|
1255
1255
|
}
|
|
@@ -1260,7 +1260,7 @@ protoOf(RustIrEmitter).w1z = function (endpoint) {
|
|
|
1260
1260
|
var _iterator__ex2g4s_0 = list.t();
|
|
1261
1261
|
while (_iterator__ex2g4s_0.u()) {
|
|
1262
1262
|
var item = _iterator__ex2g4s_0.v();
|
|
1263
|
-
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1263
|
+
var tmp$ret$2 = import_0('super::super::model::' + toSnakeCase(this, item.iy_1), item.iy_1);
|
|
1264
1264
|
destination.x(tmp$ret$2);
|
|
1265
1265
|
}
|
|
1266
1266
|
var modelImports = destination;
|
|
@@ -1281,23 +1281,23 @@ protoOf(RustIrEmitter).w1z = function (endpoint) {
|
|
|
1281
1281
|
this_1.x(' ' + namespacePath + '::from_raw_response(self.serialization, raw_response)');
|
|
1282
1282
|
this_1.x(' }');
|
|
1283
1283
|
this_1.x('}');
|
|
1284
|
-
var tmp$ret$8 = this_1.
|
|
1284
|
+
var tmp$ret$8 = this_1.p5();
|
|
1285
1285
|
var code = joinToString(tmp$ret$8, '\n');
|
|
1286
|
-
var subPackageName = plus_2(this.
|
|
1287
|
-
var tmp = Companion_getInstance().
|
|
1286
|
+
var subPackageName = plus_2(this.n22_1, 'client');
|
|
1287
|
+
var tmp = Companion_getInstance().u1k(subPackageName.mv() + toSnakeCase(this, clientName));
|
|
1288
1288
|
// Inline function 'kotlin.collections.buildList' call
|
|
1289
1289
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1290
1290
|
// Inline function 'kotlin.apply' call
|
|
1291
1291
|
var this_2 = ArrayList_init_$Create$_0();
|
|
1292
1292
|
this_2.x(import_0('super::super::wirespec', '*'));
|
|
1293
1293
|
this_2.x(import_0('super::super::endpoint', endpointModuleName));
|
|
1294
|
-
this_2.
|
|
1294
|
+
this_2.e1(modelImports);
|
|
1295
1295
|
this_2.x(new RawElement(code));
|
|
1296
|
-
var tmp$ret$12 = this_2.
|
|
1296
|
+
var tmp$ret$12 = this_2.p5();
|
|
1297
1297
|
return new File(tmp, tmp$ret$12);
|
|
1298
1298
|
};
|
|
1299
|
-
protoOf(RustIrEmitter).
|
|
1300
|
-
logger.
|
|
1299
|
+
protoOf(RustIrEmitter).c1z = function (endpoints, logger) {
|
|
1300
|
+
logger.qu('Emitting main Client for ' + endpoints.a1() + ' endpoints');
|
|
1301
1301
|
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustIrEmitter$emitClient$lambda(this));
|
|
1302
1302
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1303
1303
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
@@ -1314,7 +1314,7 @@ protoOf(RustIrEmitter).u1z = function (endpoints, logger) {
|
|
|
1314
1314
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1315
1315
|
while (_iterator__ex2g4s_0.u()) {
|
|
1316
1316
|
var e = _iterator__ex2g4s_0.v();
|
|
1317
|
-
var key = e.
|
|
1317
|
+
var key = e.iy_1;
|
|
1318
1318
|
if (set.x(key)) {
|
|
1319
1319
|
list_0.x(e);
|
|
1320
1320
|
}
|
|
@@ -1341,7 +1341,7 @@ protoOf(RustIrEmitter).u1z = function (endpoints, logger) {
|
|
|
1341
1341
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1342
1342
|
while (_iterator__ex2g4s_2.u()) {
|
|
1343
1343
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1344
|
-
if (element_1.
|
|
1344
|
+
if (element_1.ct_1.m1() === element_0.iy_1) {
|
|
1345
1345
|
tmp$ret$5 = false;
|
|
1346
1346
|
break $l$block_0;
|
|
1347
1347
|
}
|
|
@@ -1358,7 +1358,7 @@ protoOf(RustIrEmitter).u1z = function (endpoints, logger) {
|
|
|
1358
1358
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1359
1359
|
while (_iterator__ex2g4s_3.u()) {
|
|
1360
1360
|
var item = _iterator__ex2g4s_3.v();
|
|
1361
|
-
var tmp$ret$10 = import_0('super::model::' + toSnakeCase(this, item.
|
|
1361
|
+
var tmp$ret$10 = import_0('super::model::' + toSnakeCase(this, item.iy_1), item.iy_1);
|
|
1362
1362
|
destination_1.x(tmp$ret$10);
|
|
1363
1363
|
}
|
|
1364
1364
|
var modelImports = destination_1;
|
|
@@ -1368,9 +1368,9 @@ protoOf(RustIrEmitter).u1z = function (endpoints, logger) {
|
|
|
1368
1368
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1369
1369
|
while (_iterator__ex2g4s_4.u()) {
|
|
1370
1370
|
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.
|
|
1371
|
+
var endpointModuleName = toSnakeCase(this, element_2.ct_1.m1());
|
|
1372
|
+
var clientModuleName = toSnakeCase(this, element_2.ct_1.m1() + 'Client');
|
|
1373
|
+
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.ct_1.m1() + 'Client')]);
|
|
1374
1374
|
addAll(destination_2, list_1);
|
|
1375
1375
|
}
|
|
1376
1376
|
var endpointAndClientImports = destination_2;
|
|
@@ -1380,30 +1380,30 @@ protoOf(RustIrEmitter).u1z = function (endpoints, logger) {
|
|
|
1380
1380
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1381
1381
|
while (_iterator__ex2g4s_5.u()) {
|
|
1382
1382
|
var element_3 = _iterator__ex2g4s_5.v();
|
|
1383
|
-
var endpointName = element_3.
|
|
1383
|
+
var endpointName = element_3.ct_1.m1();
|
|
1384
1384
|
var endpointModuleName_0 = toSnakeCase(this, endpointName);
|
|
1385
1385
|
var namespacePath = endpointModuleName_0 + '::' + endpointName;
|
|
1386
1386
|
var methodName = toSnakeCase(this, endpointName);
|
|
1387
1387
|
var _destruct__k2r9zo = buildClientParams(this, element_3);
|
|
1388
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1389
|
-
var callArgs = _destruct__k2r9zo.
|
|
1388
|
+
var paramsStr = _destruct__k2r9zo.kf();
|
|
1389
|
+
var callArgs = _destruct__k2r9zo.lf();
|
|
1390
1390
|
var delegateCall = endpointName + 'Client { serialization: &self.serialization, transportation: &self.transportation }\n' + (' .' + methodName + '(' + callArgs + ').await');
|
|
1391
1391
|
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
1392
|
addAll(destination_3, list_2);
|
|
1393
1393
|
}
|
|
1394
1394
|
var implBlocks = destination_3;
|
|
1395
1395
|
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().
|
|
1396
|
+
var tmp_0 = Companion_getInstance().u1k(this.n22_1.mv() + 'client');
|
|
1397
1397
|
// Inline function 'kotlin.collections.buildList' call
|
|
1398
1398
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1399
1399
|
// Inline function 'kotlin.apply' call
|
|
1400
1400
|
var this_0 = ArrayList_init_$Create$_0();
|
|
1401
1401
|
this_0.x(new RawElement(modDeclarations));
|
|
1402
1402
|
this_0.x(import_0('super::wirespec', '*'));
|
|
1403
|
-
this_0.
|
|
1404
|
-
this_0.
|
|
1403
|
+
this_0.e1(modelImports);
|
|
1404
|
+
this_0.e1(endpointAndClientImports);
|
|
1405
1405
|
this_0.x(new RawElement(code));
|
|
1406
|
-
var tmp$ret$22 = this_0.
|
|
1406
|
+
var tmp$ret$22 = this_0.p5();
|
|
1407
1407
|
return new File(tmp_0, tmp$ret$22);
|
|
1408
1408
|
};
|
|
1409
1409
|
function get_rustSelfParam() {
|
|
@@ -1421,8 +1421,8 @@ function fixResponseSwitchPatterns() {
|
|
|
1421
1421
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1422
1422
|
// Inline function 'kotlin.apply' call
|
|
1423
1423
|
var this_0 = new TransformerBuilder();
|
|
1424
|
-
this_0.
|
|
1425
|
-
return this_0.
|
|
1424
|
+
this_0.s1y(fixResponseSwitchPatterns$lambda);
|
|
1425
|
+
return this_0.e1m();
|
|
1426
1426
|
}
|
|
1427
1427
|
function buildModelImports(_this__u8e3s4) {
|
|
1428
1428
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1433,7 +1433,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1433
1433
|
var _iterator__ex2g4s = this_0.t();
|
|
1434
1434
|
while (_iterator__ex2g4s.u()) {
|
|
1435
1435
|
var e = _iterator__ex2g4s.v();
|
|
1436
|
-
var key = e.
|
|
1436
|
+
var key = e.iy_1;
|
|
1437
1437
|
if (set.x(key)) {
|
|
1438
1438
|
list.x(e);
|
|
1439
1439
|
}
|
|
@@ -1444,7 +1444,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1444
1444
|
var _iterator__ex2g4s_0 = list.t();
|
|
1445
1445
|
while (_iterator__ex2g4s_0.u()) {
|
|
1446
1446
|
var item = _iterator__ex2g4s_0.v();
|
|
1447
|
-
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.
|
|
1447
|
+
var tmp$ret$2 = import_0('super::' + toRustSnakeCase(item.iy_1), item.iy_1);
|
|
1448
1448
|
destination.x(tmp$ret$2);
|
|
1449
1449
|
}
|
|
1450
1450
|
return destination;
|
|
@@ -1456,14 +1456,14 @@ function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
1456
1456
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1457
1457
|
var tmp = scope;
|
|
1458
1458
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1459
|
-
var this_0 = scope.
|
|
1459
|
+
var this_0 = scope.l1y_1;
|
|
1460
1460
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1461
1461
|
// Inline function 'kotlin.apply' call
|
|
1462
1462
|
var this_1 = new TransformerBuilder();
|
|
1463
|
-
this_1.
|
|
1464
|
-
var tmp$ret$2 = this_1.
|
|
1465
|
-
tmp.
|
|
1466
|
-
var tmp_0 = scope.
|
|
1463
|
+
this_1.d1m(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1464
|
+
var tmp$ret$2 = this_1.e1m();
|
|
1465
|
+
tmp.l1y_1 = transform(this_0, tmp$ret$2);
|
|
1466
|
+
var tmp_0 = scope.l1y_1;
|
|
1467
1467
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1468
1468
|
}
|
|
1469
1469
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
@@ -1473,14 +1473,14 @@ function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
|
1473
1473
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1474
1474
|
var tmp = scope;
|
|
1475
1475
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1476
|
-
var this_0 = scope.
|
|
1476
|
+
var this_0 = scope.l1y_1;
|
|
1477
1477
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1478
1478
|
// Inline function 'kotlin.apply' call
|
|
1479
1479
|
var this_1 = new TransformerBuilder();
|
|
1480
|
-
this_1.
|
|
1481
|
-
var tmp$ret$2 = this_1.
|
|
1482
|
-
tmp.
|
|
1483
|
-
var tmp_0 = scope.
|
|
1480
|
+
this_1.d1m(injectApiStruct$lambda(endpoint));
|
|
1481
|
+
var tmp$ret$2 = this_1.e1m();
|
|
1482
|
+
tmp.l1y_1 = transform(this_0, tmp$ret$2);
|
|
1483
|
+
var tmp_0 = scope.l1y_1;
|
|
1484
1484
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1485
1485
|
}
|
|
1486
1486
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
@@ -1490,14 +1490,14 @@ function injectResponseFromImpls(_this__u8e3s4) {
|
|
|
1490
1490
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1491
1491
|
var tmp = scope;
|
|
1492
1492
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1493
|
-
var this_0 = scope.
|
|
1493
|
+
var this_0 = scope.l1y_1;
|
|
1494
1494
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1495
1495
|
// Inline function 'kotlin.apply' call
|
|
1496
1496
|
var this_1 = new TransformerBuilder();
|
|
1497
|
-
this_1.
|
|
1498
|
-
var tmp$ret$2 = this_1.
|
|
1499
|
-
tmp.
|
|
1500
|
-
var tmp_0 = scope.
|
|
1497
|
+
this_1.d1m(injectResponseFromImpls$lambda);
|
|
1498
|
+
var tmp$ret$2 = this_1.e1m();
|
|
1499
|
+
tmp.l1y_1 = transform(this_0, tmp$ret$2);
|
|
1500
|
+
var tmp_0 = scope.l1y_1;
|
|
1501
1501
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1502
1502
|
}
|
|
1503
1503
|
function injectHandlerImplForClient(_this__u8e3s4, endpoint) {
|
|
@@ -1507,14 +1507,14 @@ function injectHandlerImplForClient(_this__u8e3s4, endpoint) {
|
|
|
1507
1507
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1508
1508
|
var tmp = scope;
|
|
1509
1509
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1510
|
-
var this_0 = scope.
|
|
1510
|
+
var this_0 = scope.l1y_1;
|
|
1511
1511
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1512
1512
|
// Inline function 'kotlin.apply' call
|
|
1513
1513
|
var this_1 = new TransformerBuilder();
|
|
1514
|
-
this_1.
|
|
1515
|
-
var tmp$ret$2 = this_1.
|
|
1516
|
-
tmp.
|
|
1517
|
-
var tmp_0 = scope.
|
|
1514
|
+
this_1.d1m(injectHandlerImplForClient$lambda);
|
|
1515
|
+
var tmp$ret$2 = this_1.e1m();
|
|
1516
|
+
tmp.l1y_1 = transform(this_0, tmp$ret$2);
|
|
1517
|
+
var tmp_0 = scope.l1y_1;
|
|
1518
1518
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1519
1519
|
}
|
|
1520
1520
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
@@ -1524,14 +1524,14 @@ function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
|
1524
1524
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1525
1525
|
var tmp = scope;
|
|
1526
1526
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1527
|
-
var this_0 = scope.
|
|
1527
|
+
var this_0 = scope.l1y_1;
|
|
1528
1528
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1529
1529
|
// Inline function 'kotlin.apply' call
|
|
1530
1530
|
var this_1 = new TransformerBuilder();
|
|
1531
|
-
this_1.
|
|
1532
|
-
var tmp$ret$2 = this_1.
|
|
1533
|
-
tmp.
|
|
1534
|
-
var tmp_0 = scope.
|
|
1531
|
+
this_1.d1m(injectSelfToHandlerMethods$lambda);
|
|
1532
|
+
var tmp$ret$2 = this_1.e1m();
|
|
1533
|
+
tmp.l1y_1 = transform(this_0, tmp$ret$2);
|
|
1534
|
+
var tmp_0 = scope.l1y_1;
|
|
1535
1535
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1536
1536
|
}
|
|
1537
1537
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
@@ -1541,14 +1541,14 @@ function stripResponseGenerics(_this__u8e3s4) {
|
|
|
1541
1541
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1542
1542
|
var tmp = scope;
|
|
1543
1543
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1544
|
-
var this_0 = scope.
|
|
1544
|
+
var this_0 = scope.l1y_1;
|
|
1545
1545
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1546
1546
|
// Inline function 'kotlin.apply' call
|
|
1547
1547
|
var this_1 = new TransformerBuilder();
|
|
1548
|
-
this_1.
|
|
1549
|
-
var tmp$ret$2 = this_1.
|
|
1550
|
-
tmp.
|
|
1551
|
-
var tmp_0 = scope.
|
|
1548
|
+
this_1.r1y(stripResponseGenerics$lambda);
|
|
1549
|
+
var tmp$ret$2 = this_1.e1m();
|
|
1550
|
+
tmp.l1y_1 = transform(this_0, tmp$ret$2);
|
|
1551
|
+
var tmp_0 = scope.l1y_1;
|
|
1552
1552
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1553
1553
|
}
|
|
1554
1554
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
@@ -1558,14 +1558,14 @@ function stripHandlerExtends(_this__u8e3s4) {
|
|
|
1558
1558
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1559
1559
|
var tmp = scope;
|
|
1560
1560
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1561
|
-
var this_0 = scope.
|
|
1561
|
+
var this_0 = scope.l1y_1;
|
|
1562
1562
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1563
1563
|
// Inline function 'kotlin.apply' call
|
|
1564
1564
|
var this_1 = new TransformerBuilder();
|
|
1565
|
-
this_1.
|
|
1566
|
-
var tmp$ret$2 = this_1.
|
|
1567
|
-
tmp.
|
|
1568
|
-
var tmp_0 = scope.
|
|
1565
|
+
this_1.d1m(stripHandlerExtends$lambda);
|
|
1566
|
+
var tmp$ret$2 = this_1.e1m();
|
|
1567
|
+
tmp.l1y_1 = transform(this_0, tmp$ret$2);
|
|
1568
|
+
var tmp_0 = scope.l1y_1;
|
|
1569
1569
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1570
1570
|
}
|
|
1571
1571
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
@@ -1573,8 +1573,8 @@ function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
|
1573
1573
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1574
1574
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1575
1575
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1576
|
-
scope.
|
|
1577
|
-
var tmp = scope.
|
|
1576
|
+
scope.u1y(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1577
|
+
var tmp = scope.l1y_1;
|
|
1578
1578
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1579
1579
|
}
|
|
1580
1580
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
@@ -1584,21 +1584,21 @@ function stripWirespecPrefix(_this__u8e3s4) {
|
|
|
1584
1584
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1585
1585
|
var tmp = scope;
|
|
1586
1586
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1587
|
-
var this_0 = scope.
|
|
1587
|
+
var this_0 = scope.l1y_1;
|
|
1588
1588
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1589
1589
|
// Inline function 'kotlin.apply' call
|
|
1590
1590
|
var this_1 = new TransformerBuilder();
|
|
1591
|
-
this_1.
|
|
1592
|
-
var tmp$ret$2 = this_1.
|
|
1593
|
-
tmp.
|
|
1594
|
-
var tmp_0 = scope.
|
|
1591
|
+
this_1.r1y(stripWirespecPrefix$lambda);
|
|
1592
|
+
var tmp$ret$2 = this_1.e1m();
|
|
1593
|
+
tmp.l1y_1 = transform(this_0, tmp$ret$2);
|
|
1594
|
+
var tmp_0 = scope.l1y_1;
|
|
1595
1595
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1596
1596
|
}
|
|
1597
1597
|
function flattenForRust(_this__u8e3s4) {
|
|
1598
1598
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1599
1599
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1600
1600
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1601
|
-
var tmp0 = _this__u8e3s4.
|
|
1601
|
+
var tmp0 = _this__u8e3s4.c1r();
|
|
1602
1602
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1603
1603
|
var destination = ArrayList_init_$Create$_0();
|
|
1604
1604
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1612,7 +1612,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1612
1612
|
var namespace = ensureNotNull(tmp$ret$2);
|
|
1613
1613
|
var flattened = flattenNestedStructs(namespace);
|
|
1614
1614
|
// Inline function 'kotlin.collections.filter' call
|
|
1615
|
-
var tmp0_0 = flattened.
|
|
1615
|
+
var tmp0_0 = flattened.h1r_1;
|
|
1616
1616
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1617
1617
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1618
1618
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1637,13 +1637,13 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1637
1637
|
var tmp_0;
|
|
1638
1638
|
var tmp_1;
|
|
1639
1639
|
if (item instanceof Union_0) {
|
|
1640
|
-
tmp_1 = item.
|
|
1640
|
+
tmp_1 = item.j1u_1.b1q() === 'Response';
|
|
1641
1641
|
} else {
|
|
1642
1642
|
tmp_1 = false;
|
|
1643
1643
|
}
|
|
1644
1644
|
if (tmp_1) {
|
|
1645
1645
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1646
|
-
var tmp0_1 = flattened.
|
|
1646
|
+
var tmp0_1 = flattened.h1r_1;
|
|
1647
1647
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1648
1648
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1649
1649
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -1659,7 +1659,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1659
1659
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1660
1660
|
while (_iterator__ex2g4s_3.u()) {
|
|
1661
1661
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1662
|
-
var tmp$ret$8 = item_0.
|
|
1662
|
+
var tmp$ret$8 = item_0.l1r_1.b1q();
|
|
1663
1663
|
destination_3.x(tmp$ret$8);
|
|
1664
1664
|
}
|
|
1665
1665
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -1668,7 +1668,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1668
1668
|
var _iterator__ex2g4s_4 = destination_3.t();
|
|
1669
1669
|
while (_iterator__ex2g4s_4.u()) {
|
|
1670
1670
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1671
|
-
if (get_rustResponsePattern().
|
|
1671
|
+
if (get_rustResponsePattern().oc(element_2)) {
|
|
1672
1672
|
destination_4.x(element_2);
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
@@ -1682,10 +1682,10 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1682
1682
|
destination_5.x(tmp$ret$14);
|
|
1683
1683
|
}
|
|
1684
1684
|
var members = destination_5;
|
|
1685
|
-
tmp_0 = item.
|
|
1685
|
+
tmp_0 = item.o1u(VOID, VOID, members, emptyList());
|
|
1686
1686
|
} else {
|
|
1687
1687
|
if (item instanceof Union_0) {
|
|
1688
|
-
tmp_0 = item.
|
|
1688
|
+
tmp_0 = item.o1u(VOID, VOID, VOID, emptyList());
|
|
1689
1689
|
} else {
|
|
1690
1690
|
tmp_0 = item;
|
|
1691
1691
|
}
|
|
@@ -1695,7 +1695,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
var moduleElements = destination_1;
|
|
1697
1697
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1698
|
-
var tmp0_2 = flattened.
|
|
1698
|
+
var tmp0_2 = flattened.h1r_1;
|
|
1699
1699
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1700
1700
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1701
1701
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1712,15 +1712,15 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1712
1712
|
}
|
|
1713
1713
|
}
|
|
1714
1714
|
var classElements = destination_6;
|
|
1715
|
-
return new File(namespace.
|
|
1715
|
+
return new File(namespace.g1r_1, plus_0(moduleElements, new Namespace(namespace.g1r_1, classElements, namespace.i1r_1)));
|
|
1716
1716
|
}
|
|
1717
1717
|
function fixConstructorCalls() {
|
|
1718
1718
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1719
1719
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1720
1720
|
// Inline function 'kotlin.apply' call
|
|
1721
1721
|
var this_0 = new TransformerBuilder();
|
|
1722
|
-
this_0.
|
|
1723
|
-
return this_0.
|
|
1722
|
+
this_0.u1y(fixConstructorCalls$lambda);
|
|
1723
|
+
return this_0.e1m();
|
|
1724
1724
|
}
|
|
1725
1725
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1726
1726
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1731,7 +1731,7 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1731
1731
|
var _iterator__ex2g4s = this_0.t();
|
|
1732
1732
|
while (_iterator__ex2g4s.u()) {
|
|
1733
1733
|
var e = _iterator__ex2g4s.v();
|
|
1734
|
-
var key = e.
|
|
1734
|
+
var key = e.iy_1;
|
|
1735
1735
|
if (set.x(key)) {
|
|
1736
1736
|
list.x(e);
|
|
1737
1737
|
}
|
|
@@ -1742,24 +1742,24 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1742
1742
|
var _iterator__ex2g4s_0 = list.t();
|
|
1743
1743
|
while (_iterator__ex2g4s_0.u()) {
|
|
1744
1744
|
var item = _iterator__ex2g4s_0.v();
|
|
1745
|
-
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.
|
|
1745
|
+
var tmp$ret$2 = import_0('super::super::model::' + toRustSnakeCase(item.iy_1), item.iy_1);
|
|
1746
1746
|
destination.x(tmp$ret$2);
|
|
1747
1747
|
}
|
|
1748
1748
|
return destination;
|
|
1749
1749
|
}
|
|
1750
1750
|
function toRustSnakeCase(_this__u8e3s4) {
|
|
1751
1751
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1752
|
-
return Companion_getInstance().
|
|
1752
|
+
return Companion_getInstance().u1k(_this__u8e3s4).c1q();
|
|
1753
1753
|
}
|
|
1754
1754
|
function buildValidateFunction(refined) {
|
|
1755
1755
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1756
|
-
var constraintExpr = convertConstraint(refined.
|
|
1756
|
+
var constraintExpr = convertConstraint(refined.av_1, new FieldCall(new VariableReference(Companion_getInstance().u1k('self')), Companion_getInstance().u1k('value')));
|
|
1757
1757
|
return function_0('validate', VOID, VOID, buildValidateFunction$lambda(constraintExpr));
|
|
1758
1758
|
}
|
|
1759
1759
|
function buildToStringFunction(refined) {
|
|
1760
1760
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1761
1761
|
var tmp;
|
|
1762
|
-
if (refined.
|
|
1762
|
+
if (refined.av_1.my_1 instanceof String_0) {
|
|
1763
1763
|
tmp = 'self.value.clone()';
|
|
1764
1764
|
} else {
|
|
1765
1765
|
tmp = 'format!("{}", self.value)';
|
|
@@ -1774,8 +1774,8 @@ function buildApiStruct(endpoint) {
|
|
|
1774
1774
|
function generateApiStructCode(_this__u8e3s4) {
|
|
1775
1775
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1776
1776
|
// Inline function 'kotlin.let' call
|
|
1777
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
1778
|
-
var methodName = _this__u8e3s4.
|
|
1777
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.et_1, '/', VOID, VOID, VOID, VOID, generateApiStructCode$lambda);
|
|
1778
|
+
var methodName = _this__u8e3s4.dt_1.b3_1;
|
|
1779
1779
|
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
1780
|
}
|
|
1781
1781
|
function fixResponseSwitchPatterns$lambda(s, t) {
|
|
@@ -1784,55 +1784,55 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1784
1784
|
if (!(s instanceof Switch)) {
|
|
1785
1785
|
tmp = true;
|
|
1786
1786
|
} else {
|
|
1787
|
-
var tmp0_safe_receiver = s.
|
|
1788
|
-
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1787
|
+
var tmp0_safe_receiver = s.p1t_1;
|
|
1788
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v1p()) === 'r');
|
|
1789
1789
|
}
|
|
1790
1790
|
if (tmp)
|
|
1791
1791
|
return transformChildren(s, t);
|
|
1792
1792
|
// Inline function 'kotlin.collections.map' call
|
|
1793
|
-
var this_0 = s.
|
|
1793
|
+
var this_0 = s.n1t_1;
|
|
1794
1794
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1795
1795
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1796
1796
|
var _iterator__ex2g4s = this_0.t();
|
|
1797
1797
|
while (_iterator__ex2g4s.u()) {
|
|
1798
1798
|
var item = _iterator__ex2g4s.v();
|
|
1799
|
-
var tmp_0 = item.
|
|
1799
|
+
var tmp_0 = item.u1t_1;
|
|
1800
1800
|
var tmp0_safe_receiver_0 = tmp_0 instanceof Custom ? tmp_0 : null;
|
|
1801
|
-
var typeName = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.
|
|
1801
|
+
var typeName = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.n1m_1;
|
|
1802
1802
|
var tmp_1;
|
|
1803
|
-
if (!(typeName == null) && get_rustResponsePattern().
|
|
1804
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1803
|
+
if (!(typeName == null) && get_rustResponsePattern().oc(typeName)) {
|
|
1804
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.p1t_1).c1q() + ')');
|
|
1805
1805
|
// Inline function 'kotlin.collections.map' call
|
|
1806
|
-
var this_1 = item.
|
|
1806
|
+
var this_1 = item.t1t_1;
|
|
1807
1807
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1808
1808
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1809
1809
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1810
1810
|
while (_iterator__ex2g4s_0.u()) {
|
|
1811
1811
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1812
|
-
var tmp$ret$0 = t.
|
|
1812
|
+
var tmp$ret$0 = t.f1y(item_0);
|
|
1813
1813
|
destination_0.x(tmp$ret$0);
|
|
1814
1814
|
}
|
|
1815
1815
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1816
1816
|
} else {
|
|
1817
|
-
var tmp_3 = t.
|
|
1817
|
+
var tmp_3 = t.g1y(item.s1t_1);
|
|
1818
1818
|
// Inline function 'kotlin.collections.map' call
|
|
1819
|
-
var this_2 = item.
|
|
1819
|
+
var this_2 = item.t1t_1;
|
|
1820
1820
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1821
1821
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1822
1822
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1823
1823
|
while (_iterator__ex2g4s_1.u()) {
|
|
1824
1824
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1825
|
-
var tmp$ret$3 = t.
|
|
1825
|
+
var tmp$ret$3 = t.f1y(item_1);
|
|
1826
1826
|
destination_1.x(tmp$ret$3);
|
|
1827
1827
|
}
|
|
1828
1828
|
var tmp_4 = destination_1;
|
|
1829
|
-
var tmp1_safe_receiver = item.
|
|
1829
|
+
var tmp1_safe_receiver = item.u1t_1;
|
|
1830
1830
|
var tmp_5;
|
|
1831
1831
|
if (tmp1_safe_receiver == null) {
|
|
1832
1832
|
tmp_5 = null;
|
|
1833
1833
|
} else {
|
|
1834
1834
|
// Inline function 'kotlin.let' call
|
|
1835
|
-
tmp_5 = t.
|
|
1835
|
+
tmp_5 = t.d1y(tmp1_safe_receiver);
|
|
1836
1836
|
}
|
|
1837
1837
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1838
1838
|
}
|
|
@@ -1840,13 +1840,13 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1840
1840
|
destination.x(tmp$ret$8);
|
|
1841
1841
|
}
|
|
1842
1842
|
var transformedCases = destination;
|
|
1843
|
-
return s.
|
|
1843
|
+
return s.r1t(t.g1y(s.m1t_1), transformedCases, null);
|
|
1844
1844
|
}
|
|
1845
1845
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1846
1846
|
return function (element, transformer) {
|
|
1847
1847
|
var tmp;
|
|
1848
1848
|
if (element instanceof Struct) {
|
|
1849
|
-
tmp = element.
|
|
1849
|
+
tmp = element.s1r(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1850
1850
|
} else {
|
|
1851
1851
|
tmp = element;
|
|
1852
1852
|
}
|
|
@@ -1858,7 +1858,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1858
1858
|
return function (element, transformer) {
|
|
1859
1859
|
var tmp;
|
|
1860
1860
|
if (element instanceof Namespace) {
|
|
1861
|
-
tmp = element.
|
|
1861
|
+
tmp = element.k1r(VOID, plus(element.h1r_1, listOf(buildApiStruct($endpoint))));
|
|
1862
1862
|
} else {
|
|
1863
1863
|
tmp = element;
|
|
1864
1864
|
}
|
|
@@ -1871,7 +1871,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1871
1871
|
var tmp;
|
|
1872
1872
|
if (element instanceof File) {
|
|
1873
1873
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1874
|
-
var tmp0 = element.
|
|
1874
|
+
var tmp0 = element.b1r_1;
|
|
1875
1875
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1876
1876
|
var destination = ArrayList_init_$Create$_0();
|
|
1877
1877
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1881,26 +1881,26 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1881
1881
|
var tmp_1;
|
|
1882
1882
|
var tmp_2;
|
|
1883
1883
|
if (element_0 instanceof Union_0) {
|
|
1884
|
-
tmp_2 = element_0.
|
|
1884
|
+
tmp_2 = element_0.j1u_1.b1q() === 'Response';
|
|
1885
1885
|
} else {
|
|
1886
1886
|
tmp_2 = false;
|
|
1887
1887
|
}
|
|
1888
1888
|
if (tmp_2) {
|
|
1889
1889
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1890
|
-
tmp_1 = !element_0.
|
|
1890
|
+
tmp_1 = !element_0.l1u_1.r();
|
|
1891
1891
|
} else {
|
|
1892
1892
|
tmp_1 = false;
|
|
1893
1893
|
}
|
|
1894
1894
|
if (tmp_1) {
|
|
1895
1895
|
var tmp_3 = listOf(element_0);
|
|
1896
1896
|
// Inline function 'kotlin.collections.map' call
|
|
1897
|
-
var this_0 = element_0.
|
|
1897
|
+
var this_0 = element_0.l1u_1;
|
|
1898
1898
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1899
1899
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1900
1900
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1901
1901
|
while (_iterator__ex2g4s_0.u()) {
|
|
1902
1902
|
var item = _iterator__ex2g4s_0.v();
|
|
1903
|
-
var tmp$ret$1 = new RawElement('impl From<' + item.
|
|
1903
|
+
var tmp$ret$1 = new RawElement('impl From<' + item.n1m_1 + '> for Response { fn from(value: ' + item.n1m_1 + ') -> Self { Response::' + item.n1m_1 + '(value) } }\n');
|
|
1904
1904
|
destination_0.x(tmp$ret$1);
|
|
1905
1905
|
}
|
|
1906
1906
|
tmp_0 = plus(tmp_3, destination_0);
|
|
@@ -1910,7 +1910,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1910
1910
|
var list = tmp_0;
|
|
1911
1911
|
addAll(destination, list);
|
|
1912
1912
|
}
|
|
1913
|
-
tmp = element.
|
|
1913
|
+
tmp = element.e1r(VOID, destination);
|
|
1914
1914
|
} else {
|
|
1915
1915
|
tmp = element;
|
|
1916
1916
|
}
|
|
@@ -1924,7 +1924,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1924
1924
|
var tmp$ret$4;
|
|
1925
1925
|
$l$block_1: {
|
|
1926
1926
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1927
|
-
var tmp0 = element.
|
|
1927
|
+
var tmp0 = element.h1r_1;
|
|
1928
1928
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1929
1929
|
var destination = ArrayList_init_$Create$_0();
|
|
1930
1930
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1940,7 +1940,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1940
1940
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1941
1941
|
while (_iterator__ex2g4s_0.u()) {
|
|
1942
1942
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
1943
|
-
if (element_1.
|
|
1943
|
+
if (element_1.t1r_1.equals(Companion_getInstance().u1k('Handler'))) {
|
|
1944
1944
|
tmp$ret$3 = element_1;
|
|
1945
1945
|
break $l$block;
|
|
1946
1946
|
}
|
|
@@ -1957,7 +1957,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1957
1957
|
}
|
|
1958
1958
|
var handler = tmp_0;
|
|
1959
1959
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1960
|
-
var tmp0_0 = handler.
|
|
1960
|
+
var tmp0_0 = handler.u1r_1;
|
|
1961
1961
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1962
1962
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1963
1963
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
@@ -1976,8 +1976,8 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
1976
1976
|
tmp_1 = tmp1_elvis_lhs;
|
|
1977
1977
|
}
|
|
1978
1978
|
var method = tmp_1;
|
|
1979
|
-
var methodName = method.
|
|
1980
|
-
tmp$ret$4 = element.
|
|
1979
|
+
var methodName = method.j1o_1.c1q();
|
|
1980
|
+
tmp$ret$4 = element.k1r(VOID, plus(element.h1r_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
1981
|
}
|
|
1982
1982
|
tmp = tmp$ret$4;
|
|
1983
1983
|
} else {
|
|
@@ -1992,7 +1992,7 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
1992
1992
|
if (element instanceof Interface) {
|
|
1993
1993
|
var tmp$ret$0;
|
|
1994
1994
|
$l$block: {
|
|
1995
|
-
if (!element.
|
|
1995
|
+
if (!element.t1r_1.equals(Companion_getInstance().u1k('Handler')) && !element.t1r_1.equals(Companion_getInstance().u1k('Call'))) {
|
|
1996
1996
|
tmp$ret$0 = element;
|
|
1997
1997
|
break $l$block;
|
|
1998
1998
|
}
|
|
@@ -2001,14 +2001,14 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2001
2001
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
2002
2002
|
var tmp_0 = scope;
|
|
2003
2003
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
2004
|
-
var this_0 = scope.
|
|
2004
|
+
var this_0 = scope.l1y_1;
|
|
2005
2005
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2006
2006
|
// Inline function 'kotlin.apply' call
|
|
2007
2007
|
var this_1 = new TransformerBuilder();
|
|
2008
|
-
this_1.
|
|
2009
|
-
var tmp$ret$3 = this_1.
|
|
2010
|
-
tmp_0.
|
|
2011
|
-
var tmp_1 = scope.
|
|
2008
|
+
this_1.d1m(injectSelfToHandlerMethods$lambda$lambda);
|
|
2009
|
+
var tmp$ret$3 = this_1.e1m();
|
|
2010
|
+
tmp_0.l1y_1 = transform(this_0, tmp$ret$3);
|
|
2011
|
+
var tmp_1 = scope.l1y_1;
|
|
2012
2012
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2013
2013
|
}
|
|
2014
2014
|
tmp = tmp$ret$0;
|
|
@@ -2022,7 +2022,7 @@ function injectSelfToHandlerMethods$lambda$lambda(element, transformer) {
|
|
|
2022
2022
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2023
2023
|
var tmp;
|
|
2024
2024
|
if (element instanceof Function_0) {
|
|
2025
|
-
tmp = element.
|
|
2025
|
+
tmp = element.r1o(Companion_getInstance().u1k(element.j1o_1.c1q()), VOID, plus(listOf(get_rustSelfParam()), element.l1o_1));
|
|
2026
2026
|
} else {
|
|
2027
2027
|
tmp = element;
|
|
2028
2028
|
}
|
|
@@ -2035,14 +2035,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2035
2035
|
if (type instanceof Custom) {
|
|
2036
2036
|
var tmp_0;
|
|
2037
2037
|
var tmp_1;
|
|
2038
|
-
if (startsWith(type.
|
|
2038
|
+
if (startsWith(type.n1m_1, 'Response')) {
|
|
2039
2039
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2040
|
-
tmp_1 = !type.
|
|
2040
|
+
tmp_1 = !type.o1m_1.r();
|
|
2041
2041
|
} else {
|
|
2042
2042
|
tmp_1 = false;
|
|
2043
2043
|
}
|
|
2044
2044
|
if (tmp_1) {
|
|
2045
|
-
tmp_0 = type.
|
|
2045
|
+
tmp_0 = type.r1q(VOID, emptyList());
|
|
2046
2046
|
} else {
|
|
2047
2047
|
tmp_0 = type;
|
|
2048
2048
|
}
|
|
@@ -2057,7 +2057,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2057
2057
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2058
2058
|
var tmp;
|
|
2059
2059
|
if (element instanceof Interface) {
|
|
2060
|
-
tmp = element.
|
|
2060
|
+
tmp = element.t1r_1.equals(Companion_getInstance().u1k('Handler')) || element.t1r_1.equals(Companion_getInstance().u1k('Call')) ? element.a1s(VOID, VOID, emptyList()) : element;
|
|
2061
2061
|
} else {
|
|
2062
2062
|
tmp = element;
|
|
2063
2063
|
}
|
|
@@ -2070,17 +2070,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2070
2070
|
var tmp_0;
|
|
2071
2071
|
var tmp_1;
|
|
2072
2072
|
if (s instanceof RawExpression) {
|
|
2073
|
-
tmp_1 = $identifierPattern.
|
|
2073
|
+
tmp_1 = $identifierPattern.oc(s.r1s_1);
|
|
2074
2074
|
} else {
|
|
2075
2075
|
tmp_1 = false;
|
|
2076
2076
|
}
|
|
2077
2077
|
if (tmp_1) {
|
|
2078
|
-
tmp_0 = !contains(s.
|
|
2078
|
+
tmp_0 = !contains(s.r1s_1, '.');
|
|
2079
2079
|
} else {
|
|
2080
2080
|
tmp_0 = false;
|
|
2081
2081
|
}
|
|
2082
2082
|
if (tmp_0) {
|
|
2083
|
-
tmp = new VariableReference(Companion_getInstance().
|
|
2083
|
+
tmp = new VariableReference(Companion_getInstance().u1k(s.r1s_1));
|
|
2084
2084
|
} else {
|
|
2085
2085
|
tmp = transformChildren(s, t);
|
|
2086
2086
|
}
|
|
@@ -2092,8 +2092,8 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2092
2092
|
var tmp;
|
|
2093
2093
|
if (type instanceof Custom) {
|
|
2094
2094
|
var tmp_0;
|
|
2095
|
-
if (startsWith(type.
|
|
2096
|
-
tmp_0 = type.
|
|
2095
|
+
if (startsWith(type.n1m_1, 'Wirespec.')) {
|
|
2096
|
+
tmp_0 = type.r1q(removePrefix(type.n1m_1, 'Wirespec.'));
|
|
2097
2097
|
} else {
|
|
2098
2098
|
tmp_0 = type;
|
|
2099
2099
|
}
|
|
@@ -2108,37 +2108,37 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2108
2108
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2109
2109
|
if (!(s instanceof ConstructorStatement))
|
|
2110
2110
|
return transformChildren(s, t);
|
|
2111
|
-
var tmp = s.
|
|
2111
|
+
var tmp = s.x1q_1;
|
|
2112
2112
|
var tmp0_safe_receiver = tmp instanceof Custom ? tmp : null;
|
|
2113
|
-
var typeName = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2113
|
+
var typeName = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n1m_1;
|
|
2114
2114
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2115
|
-
var this_0 = s.
|
|
2115
|
+
var this_0 = s.y1q_1;
|
|
2116
2116
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2117
|
-
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.
|
|
2117
|
+
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.a1()));
|
|
2118
2118
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
2119
|
-
var _iterator__ex2g4s = this_0.
|
|
2119
|
+
var _iterator__ex2g4s = this_0.k1().t();
|
|
2120
2120
|
while (_iterator__ex2g4s.u()) {
|
|
2121
2121
|
var element = _iterator__ex2g4s.v();
|
|
2122
|
-
var tmp_0 = element.
|
|
2123
|
-
var tmp$ret$1 = t.
|
|
2124
|
-
destination.
|
|
2122
|
+
var tmp_0 = element.l1();
|
|
2123
|
+
var tmp$ret$1 = t.g1y(element.m1());
|
|
2124
|
+
destination.y2(tmp_0, tmp$ret$1);
|
|
2125
2125
|
}
|
|
2126
2126
|
var transformedArgs = destination;
|
|
2127
|
-
return !(typeName == null) && get_rustResponsePattern().
|
|
2127
|
+
return !(typeName == null) && get_rustResponsePattern().oc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().u1k('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
2128
|
}
|
|
2129
2129
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2130
2130
|
return function ($this$function) {
|
|
2131
|
-
$this$function.
|
|
2132
|
-
$this$function.
|
|
2133
|
-
$this$function.
|
|
2131
|
+
$this$function.e1l('&self', new Custom(''));
|
|
2132
|
+
$this$function.h1l(Boolean_instance);
|
|
2133
|
+
$this$function.i1l($constraintExpr);
|
|
2134
2134
|
return Unit_instance;
|
|
2135
2135
|
};
|
|
2136
2136
|
}
|
|
2137
2137
|
function buildToStringFunction$lambda($expr) {
|
|
2138
2138
|
return function ($this$function) {
|
|
2139
|
-
$this$function.
|
|
2140
|
-
$this$function.
|
|
2141
|
-
$this$function.
|
|
2139
|
+
$this$function.e1l('&self', new Custom(''));
|
|
2140
|
+
$this$function.h1l(String_instance);
|
|
2141
|
+
$this$function.i1l(new RawExpression($expr));
|
|
2142
2142
|
return Unit_instance;
|
|
2143
2143
|
};
|
|
2144
2144
|
}
|
|
@@ -2146,10 +2146,10 @@ function generateApiStructCode$lambda(segment) {
|
|
|
2146
2146
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2147
2147
|
var tmp;
|
|
2148
2148
|
if (segment instanceof Literal) {
|
|
2149
|
-
tmp = segment.
|
|
2149
|
+
tmp = segment.fu_1;
|
|
2150
2150
|
} else {
|
|
2151
2151
|
if (segment instanceof Param) {
|
|
2152
|
-
tmp = '{' + segment.
|
|
2152
|
+
tmp = '{' + segment.jt_1.m1() + '}';
|
|
2153
2153
|
} else {
|
|
2154
2154
|
noWhenBranchMatchedException();
|
|
2155
2155
|
}
|
|
@@ -2160,39 +2160,39 @@ var properties_initialized_RustIrTransformer_kt_hr6k9w;
|
|
|
2160
2160
|
function _init_properties_RustIrTransformer_kt__rrvmwq() {
|
|
2161
2161
|
if (!properties_initialized_RustIrTransformer_kt_hr6k9w) {
|
|
2162
2162
|
properties_initialized_RustIrTransformer_kt_hr6k9w = true;
|
|
2163
|
-
rustSelfParam = new Parameter(Companion_getInstance().
|
|
2163
|
+
rustSelfParam = new Parameter(Companion_getInstance().u1k('&self'), new Custom(''));
|
|
2164
2164
|
rustResponsePattern = Regex_init_$Create$('Response(\\d+|Default)');
|
|
2165
2165
|
}
|
|
2166
2166
|
}
|
|
2167
2167
|
function borrowParamsOf($this, fn) {
|
|
2168
2168
|
// Inline function 'kotlin.collections.map' call
|
|
2169
|
-
var this_0 = fn.
|
|
2169
|
+
var this_0 = fn.l1o_1;
|
|
2170
2170
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2171
2171
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2172
2172
|
var _iterator__ex2g4s = this_0.t();
|
|
2173
2173
|
while (_iterator__ex2g4s.u()) {
|
|
2174
2174
|
var item = _iterator__ex2g4s.v();
|
|
2175
2175
|
var tmp;
|
|
2176
|
-
if (RustTransform_getInstance().
|
|
2176
|
+
if (RustTransform_getInstance().e23(item.d1t_1)) {
|
|
2177
2177
|
tmp = item;
|
|
2178
2178
|
} else {
|
|
2179
|
-
tmp = item.
|
|
2179
|
+
tmp = item.g1t(VOID, applyBorrowRule(RustTransform_getInstance(), item.e1t_1));
|
|
2180
2180
|
}
|
|
2181
2181
|
var tmp$ret$0 = tmp;
|
|
2182
2182
|
destination.x(tmp$ret$0);
|
|
2183
2183
|
}
|
|
2184
|
-
return fn.
|
|
2184
|
+
return fn.r1o(VOID, VOID, destination);
|
|
2185
2185
|
}
|
|
2186
2186
|
function applyBorrowRule($this, type) {
|
|
2187
2187
|
var tmp;
|
|
2188
2188
|
if (type instanceof Nullable) {
|
|
2189
|
-
tmp = new Nullable(applyBorrowRule($this, type.
|
|
2189
|
+
tmp = new Nullable(applyBorrowRule($this, type.l1m_1));
|
|
2190
2190
|
} else {
|
|
2191
2191
|
if (equals(type, String_instance)) {
|
|
2192
2192
|
tmp = new Custom('&str');
|
|
2193
2193
|
} else {
|
|
2194
2194
|
if (type instanceof Custom) {
|
|
2195
|
-
tmp = $this.
|
|
2195
|
+
tmp = $this.h23(type) ? type : $this.g23(type) ? borrowImpl(type) : $this.f23(type) ? ownedImpl(type) : type;
|
|
2196
2196
|
} else {
|
|
2197
2197
|
tmp = type;
|
|
2198
2198
|
}
|
|
@@ -2204,15 +2204,15 @@ function toBorrowedRaw($this, _this__u8e3s4) {
|
|
|
2204
2204
|
return new RawExpression('&' + toRawCode($this, _this__u8e3s4));
|
|
2205
2205
|
}
|
|
2206
2206
|
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
2207
|
-
return Companion_getInstance_0().
|
|
2207
|
+
return Companion_getInstance_0().u22_1.v1(_this__u8e3s4) ? 'r#' + _this__u8e3s4 : _this__u8e3s4;
|
|
2208
2208
|
}
|
|
2209
2209
|
function toRawCode($this, _this__u8e3s4) {
|
|
2210
2210
|
var tmp;
|
|
2211
2211
|
if (_this__u8e3s4 instanceof VariableReference) {
|
|
2212
|
-
tmp = sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2212
|
+
tmp = sanitizeKeywords_0($this, _this__u8e3s4.p1s_1.c1q());
|
|
2213
2213
|
} else {
|
|
2214
2214
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
2215
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
2215
|
+
var tmp1_safe_receiver = _this__u8e3s4.x1t_1;
|
|
2216
2216
|
var tmp_0;
|
|
2217
2217
|
if (tmp1_safe_receiver == null) {
|
|
2218
2218
|
tmp_0 = null;
|
|
@@ -2222,20 +2222,20 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2222
2222
|
}
|
|
2223
2223
|
var tmp2_elvis_lhs = tmp_0;
|
|
2224
2224
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2225
|
-
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.
|
|
2225
|
+
tmp = recv + sanitizeKeywords_0($this, _this__u8e3s4.y1t_1.c1q());
|
|
2226
2226
|
} else {
|
|
2227
2227
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
2228
|
-
var tmp_1 = _this__u8e3s4.
|
|
2228
|
+
var tmp_1 = _this__u8e3s4.q1u_1;
|
|
2229
2229
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2230
2230
|
var tmp_2;
|
|
2231
2231
|
var tmp_3;
|
|
2232
2232
|
if (!(lit == null)) {
|
|
2233
2233
|
var tmp_4;
|
|
2234
|
-
var tmp_5 = lit.
|
|
2234
|
+
var tmp_5 = lit.a1t_1;
|
|
2235
2235
|
if (tmp_5 instanceof Integer) {
|
|
2236
2236
|
tmp_4 = true;
|
|
2237
2237
|
} else {
|
|
2238
|
-
var tmp_6 = lit.
|
|
2238
|
+
var tmp_6 = lit.a1t_1;
|
|
2239
2239
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2240
2240
|
}
|
|
2241
2241
|
tmp_3 = tmp_4;
|
|
@@ -2243,30 +2243,30 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2243
2243
|
tmp_3 = false;
|
|
2244
2244
|
}
|
|
2245
2245
|
if (tmp_3) {
|
|
2246
|
-
tmp_2 = toString_0(lit.
|
|
2246
|
+
tmp_2 = toString_0(lit.z1s_1);
|
|
2247
2247
|
} else {
|
|
2248
2248
|
var tmp_7;
|
|
2249
2249
|
if (!(lit == null)) {
|
|
2250
|
-
var tmp_8 = lit.
|
|
2250
|
+
var tmp_8 = lit.a1t_1;
|
|
2251
2251
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2252
2252
|
} else {
|
|
2253
2253
|
tmp_7 = false;
|
|
2254
2254
|
}
|
|
2255
2255
|
if (tmp_7) {
|
|
2256
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2256
|
+
tmp_2 = '"' + toString_0(lit.z1s_1) + '"';
|
|
2257
2257
|
} else {
|
|
2258
|
-
tmp_2 = toRawCode($this, _this__u8e3s4.
|
|
2258
|
+
tmp_2 = toRawCode($this, _this__u8e3s4.q1u_1);
|
|
2259
2259
|
}
|
|
2260
2260
|
}
|
|
2261
2261
|
var idx = tmp_2;
|
|
2262
|
-
tmp = toRawCode($this, _this__u8e3s4.
|
|
2262
|
+
tmp = toRawCode($this, _this__u8e3s4.p1u_1) + '[' + idx + ']';
|
|
2263
2263
|
} else {
|
|
2264
2264
|
if (_this__u8e3s4 instanceof ConstructorStatement) {
|
|
2265
|
-
var tmp_9 = _this__u8e3s4.
|
|
2265
|
+
var tmp_9 = _this__u8e3s4.x1q_1;
|
|
2266
2266
|
var tmp3_safe_receiver = tmp_9 instanceof Custom ? tmp_9 : null;
|
|
2267
|
-
var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
2268
|
-
var typeName = tmp4_elvis_lhs == null ? toString_0(_this__u8e3s4.
|
|
2269
|
-
var tmp_10 = _this__u8e3s4.
|
|
2267
|
+
var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.n1m_1;
|
|
2268
|
+
var typeName = tmp4_elvis_lhs == null ? toString_0(_this__u8e3s4.x1q_1) : tmp4_elvis_lhs;
|
|
2269
|
+
var tmp_10 = _this__u8e3s4.y1q_1.k1();
|
|
2270
2270
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2271
2271
|
var tmp_11;
|
|
2272
2272
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2279,23 +2279,23 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2279
2279
|
} else {
|
|
2280
2280
|
if (_this__u8e3s4 instanceof Literal_0) {
|
|
2281
2281
|
var tmp_12;
|
|
2282
|
-
var tmp_13 = _this__u8e3s4.
|
|
2282
|
+
var tmp_13 = _this__u8e3s4.a1t_1;
|
|
2283
2283
|
if (tmp_13 instanceof String_1) {
|
|
2284
|
-
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.
|
|
2284
|
+
tmp_12 = 'String::from("' + toString_0(_this__u8e3s4.z1s_1) + '")';
|
|
2285
2285
|
} else {
|
|
2286
|
-
var tmp_14 = _this__u8e3s4.
|
|
2286
|
+
var tmp_14 = _this__u8e3s4.a1t_1;
|
|
2287
2287
|
if (tmp_14 instanceof Boolean_0) {
|
|
2288
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2288
|
+
tmp_12 = toString_0(_this__u8e3s4.z1s_1);
|
|
2289
2289
|
} else {
|
|
2290
|
-
var tmp_15 = _this__u8e3s4.
|
|
2290
|
+
var tmp_15 = _this__u8e3s4.a1t_1;
|
|
2291
2291
|
if (tmp_15 instanceof Integer) {
|
|
2292
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2292
|
+
tmp_12 = toString_0(_this__u8e3s4.z1s_1);
|
|
2293
2293
|
} else {
|
|
2294
|
-
var tmp_16 = _this__u8e3s4.
|
|
2294
|
+
var tmp_16 = _this__u8e3s4.a1t_1;
|
|
2295
2295
|
if (tmp_16 instanceof Number_0) {
|
|
2296
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2296
|
+
tmp_12 = toString_0(_this__u8e3s4.z1s_1);
|
|
2297
2297
|
} else {
|
|
2298
|
-
tmp_12 = toString_0(_this__u8e3s4.
|
|
2298
|
+
tmp_12 = toString_0(_this__u8e3s4.z1s_1);
|
|
2299
2299
|
}
|
|
2300
2300
|
}
|
|
2301
2301
|
}
|
|
@@ -2303,7 +2303,7 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2303
2303
|
tmp = tmp_12;
|
|
2304
2304
|
} else {
|
|
2305
2305
|
if (_this__u8e3s4 instanceof RawExpression) {
|
|
2306
|
-
tmp = _this__u8e3s4.
|
|
2306
|
+
tmp = _this__u8e3s4.r1s_1;
|
|
2307
2307
|
} else {
|
|
2308
2308
|
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression(_this__u8e3s4).o();
|
|
2309
2309
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
@@ -2348,11 +2348,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2348
2348
|
var tmp;
|
|
2349
2349
|
if (element instanceof Interface) {
|
|
2350
2350
|
var tmp_0;
|
|
2351
|
-
if (element.
|
|
2351
|
+
if (element.t1r_1.equals(Companion_getInstance().u1k('Call'))) {
|
|
2352
2352
|
tmp_0 = element;
|
|
2353
2353
|
} else {
|
|
2354
2354
|
// Inline function 'kotlin.collections.map' call
|
|
2355
|
-
var this_0 = element.
|
|
2355
|
+
var this_0 = element.u1r_1;
|
|
2356
2356
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2357
2357
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2358
2358
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2368,7 +2368,7 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2368
2368
|
destination.x(tmp$ret$0);
|
|
2369
2369
|
}
|
|
2370
2370
|
var borrowed = destination;
|
|
2371
|
-
tmp_0 = transformChildren_0(element.
|
|
2371
|
+
tmp_0 = transformChildren_0(element.a1s(VOID, borrowed), tr);
|
|
2372
2372
|
}
|
|
2373
2373
|
tmp = tmp_0;
|
|
2374
2374
|
} else {
|
|
@@ -2384,13 +2384,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2384
2384
|
var tmp;
|
|
2385
2385
|
var tmp_0;
|
|
2386
2386
|
if (s instanceof FunctionCall) {
|
|
2387
|
-
tmp_0 = RustTransform_getInstance().
|
|
2387
|
+
tmp_0 = RustTransform_getInstance().z22_1.v1(s.f1q_1.c1q());
|
|
2388
2388
|
} else {
|
|
2389
2389
|
tmp_0 = false;
|
|
2390
2390
|
}
|
|
2391
2391
|
if (tmp_0) {
|
|
2392
2392
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2393
|
-
var this_0 = s.
|
|
2393
|
+
var this_0 = s.g1q_1.k1();
|
|
2394
2394
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2395
2395
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2396
2396
|
var index = 0;
|
|
@@ -2401,16 +2401,16 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2401
2401
|
index = _unary__edvuaz + 1 | 0;
|
|
2402
2402
|
var idx = checkIndexOverflow(_unary__edvuaz);
|
|
2403
2403
|
// Inline function 'kotlin.collections.component1' call
|
|
2404
|
-
var key = item.
|
|
2404
|
+
var key = item.l1();
|
|
2405
2405
|
// Inline function 'kotlin.collections.component2' call
|
|
2406
|
-
var value = item.
|
|
2407
|
-
var transformed = t.
|
|
2406
|
+
var value = item.m1();
|
|
2407
|
+
var transformed = t.g1y(value);
|
|
2408
2408
|
var tmp_1;
|
|
2409
2409
|
var tmp_2;
|
|
2410
2410
|
if (idx === 0) {
|
|
2411
2411
|
var tmp_3;
|
|
2412
2412
|
if (transformed instanceof VariableReference) {
|
|
2413
|
-
tmp_3 = transformed.
|
|
2413
|
+
tmp_3 = transformed.p1s_1.p1m() === 'it';
|
|
2414
2414
|
} else {
|
|
2415
2415
|
tmp_3 = false;
|
|
2416
2416
|
}
|
|
@@ -2427,20 +2427,20 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2427
2427
|
destination.x(tmp$ret$2);
|
|
2428
2428
|
}
|
|
2429
2429
|
var newArgs = toMap(destination);
|
|
2430
|
-
tmp = s.
|
|
2430
|
+
tmp = s.j1q(VOID, VOID, VOID, newArgs);
|
|
2431
2431
|
} else {
|
|
2432
2432
|
tmp = transformChildren(s, t);
|
|
2433
2433
|
}
|
|
2434
2434
|
return tmp;
|
|
2435
2435
|
}
|
|
2436
2436
|
function RustTransform$rustName$lambda(it) {
|
|
2437
|
-
return RustTransform_getInstance().
|
|
2437
|
+
return RustTransform_getInstance().c23(it);
|
|
2438
2438
|
}
|
|
2439
2439
|
function RustTransform$rustName$lambda_0(it) {
|
|
2440
|
-
return RustTransform_getInstance().
|
|
2440
|
+
return RustTransform_getInstance().c23(it);
|
|
2441
2441
|
}
|
|
2442
2442
|
function RustTransform$toRawCode$lambda(it) {
|
|
2443
|
-
return it.
|
|
2443
|
+
return it.l1().c1q() + ': ' + toRawCode(RustTransform_getInstance(), it.m1());
|
|
2444
2444
|
}
|
|
2445
2445
|
function RustTransform() {
|
|
2446
2446
|
RustTransform_instance = this;
|
|
@@ -2448,57 +2448,57 @@ function RustTransform() {
|
|
|
2448
2448
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2449
2449
|
// Inline function 'kotlin.apply' call
|
|
2450
2450
|
var this_0 = new TransformerBuilder();
|
|
2451
|
-
this_0.
|
|
2452
|
-
tmp.
|
|
2451
|
+
this_0.r1y(RustTransform$primitivesToCustom$lambda);
|
|
2452
|
+
tmp.w22_1 = this_0.e1m();
|
|
2453
2453
|
var tmp_0 = this;
|
|
2454
2454
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2455
2455
|
// Inline function 'kotlin.apply' call
|
|
2456
2456
|
var this_1 = new TransformerBuilder();
|
|
2457
|
-
this_1.
|
|
2458
|
-
tmp_0.
|
|
2457
|
+
this_1.d1m(RustTransform$borrow$lambda);
|
|
2458
|
+
tmp_0.x22_1 = this_1.e1m();
|
|
2459
2459
|
var tmp_1 = this;
|
|
2460
2460
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2461
2461
|
// Inline function 'kotlin.apply' call
|
|
2462
|
-
tmp_1.
|
|
2463
|
-
this.
|
|
2462
|
+
tmp_1.y22_1 = (new TransformerBuilder()).e1m();
|
|
2463
|
+
this.z22_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2464
2464
|
var tmp_2 = this;
|
|
2465
2465
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
2466
2466
|
// Inline function 'kotlin.apply' call
|
|
2467
2467
|
var this_2 = new TransformerBuilder();
|
|
2468
|
-
this_2.
|
|
2469
|
-
tmp_2.
|
|
2470
|
-
this.
|
|
2468
|
+
this_2.u1y(RustTransform$serializationArgs$lambda);
|
|
2469
|
+
tmp_2.a23_1 = this_2.e1m();
|
|
2470
|
+
this.b23_1 = setOf(['i32', 'i64', 'f32', 'f64', 'bool', 'u8', 'u16', 'u32', 'u64', 'usize', 'isize', '()']);
|
|
2471
2471
|
}
|
|
2472
|
-
protoOf(RustTransform).
|
|
2472
|
+
protoOf(RustTransform).d23 = function (element) {
|
|
2473
2473
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2474
2474
|
var scope = new TransformScope(element);
|
|
2475
|
-
scope.
|
|
2476
|
-
var tmp = scope.
|
|
2475
|
+
scope.q1y(RustTransform_getInstance().w22_1);
|
|
2476
|
+
var tmp = scope.l1y_1;
|
|
2477
2477
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2478
2478
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2479
2479
|
var scope_0 = new TransformScope(this_0);
|
|
2480
|
-
scope_0.
|
|
2481
|
-
var tmp_0 = scope_0.
|
|
2480
|
+
scope_0.q1y(RustTransform_getInstance().x22_1);
|
|
2481
|
+
var tmp_0 = scope_0.l1y_1;
|
|
2482
2482
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2483
2483
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2484
2484
|
var scope_1 = new TransformScope(this_1);
|
|
2485
|
-
scope_1.
|
|
2486
|
-
var tmp_1 = scope_1.
|
|
2485
|
+
scope_1.q1y(RustTransform_getInstance().y22_1);
|
|
2486
|
+
var tmp_1 = scope_1.l1y_1;
|
|
2487
2487
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
2488
2488
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2489
2489
|
var scope_2 = new TransformScope(this_2);
|
|
2490
|
-
scope_2.
|
|
2491
|
-
var tmp_2 = scope_2.
|
|
2490
|
+
scope_2.q1y(RustTransform_getInstance().a23_1);
|
|
2491
|
+
var tmp_2 = scope_2.l1y_1;
|
|
2492
2492
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2493
2493
|
};
|
|
2494
|
-
protoOf(RustTransform).
|
|
2494
|
+
protoOf(RustTransform).c23 = function (_this__u8e3s4) {
|
|
2495
2495
|
var tmp;
|
|
2496
2496
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2497
2497
|
var tmp_0;
|
|
2498
|
-
if (_this__u8e3s4.
|
|
2499
|
-
tmp_0 = _this__u8e3s4.
|
|
2498
|
+
if (_this__u8e3s4.o1m_1.r()) {
|
|
2499
|
+
tmp_0 = _this__u8e3s4.n1m_1;
|
|
2500
2500
|
} else {
|
|
2501
|
-
tmp_0 = _this__u8e3s4.
|
|
2501
|
+
tmp_0 = _this__u8e3s4.n1m_1 + '<' + joinToString(_this__u8e3s4.o1m_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda) + '>';
|
|
2502
2502
|
}
|
|
2503
2503
|
tmp = tmp_0;
|
|
2504
2504
|
} else {
|
|
@@ -2506,13 +2506,13 @@ protoOf(RustTransform).u23 = function (_this__u8e3s4) {
|
|
|
2506
2506
|
tmp = 'String';
|
|
2507
2507
|
} else {
|
|
2508
2508
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2509
|
-
tmp = 'Option<' + this.
|
|
2509
|
+
tmp = 'Option<' + this.c23(_this__u8e3s4.l1m_1) + '>';
|
|
2510
2510
|
} else {
|
|
2511
2511
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2512
|
-
tmp = 'Vec<' + this.
|
|
2512
|
+
tmp = 'Vec<' + this.c23(_this__u8e3s4.m1m_1) + '>';
|
|
2513
2513
|
} else {
|
|
2514
2514
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2515
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2515
|
+
tmp = 'std::collections::HashMap<' + this.c23(_this__u8e3s4.n1q_1) + ', ' + this.c23(_this__u8e3s4.o1q_1) + '>';
|
|
2516
2516
|
} else {
|
|
2517
2517
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2518
2518
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2534,7 +2534,7 @@ protoOf(RustTransform).u23 = function (_this__u8e3s4) {
|
|
|
2534
2534
|
} else {
|
|
2535
2535
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2536
2536
|
var tmp_1;
|
|
2537
|
-
switch (_this__u8e3s4.
|
|
2537
|
+
switch (_this__u8e3s4.k1q_1.c3_1) {
|
|
2538
2538
|
case 0:
|
|
2539
2539
|
tmp_1 = 'i32';
|
|
2540
2540
|
break;
|
|
@@ -2549,7 +2549,7 @@ protoOf(RustTransform).u23 = function (_this__u8e3s4) {
|
|
|
2549
2549
|
} else {
|
|
2550
2550
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2551
2551
|
var tmp_2;
|
|
2552
|
-
switch (_this__u8e3s4.
|
|
2552
|
+
switch (_this__u8e3s4.l1q_1.c3_1) {
|
|
2553
2553
|
case 0:
|
|
2554
2554
|
tmp_2 = 'f32';
|
|
2555
2555
|
break;
|
|
@@ -2569,7 +2569,7 @@ protoOf(RustTransform).u23 = function (_this__u8e3s4) {
|
|
|
2569
2569
|
tmp = 'String';
|
|
2570
2570
|
} else {
|
|
2571
2571
|
if (_this__u8e3s4 instanceof Function) {
|
|
2572
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2572
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.u1q_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.c23(_this__u8e3s4.v1q_1) + '>';
|
|
2573
2573
|
} else {
|
|
2574
2574
|
noWhenBranchMatchedException();
|
|
2575
2575
|
}
|
|
@@ -2590,23 +2590,23 @@ protoOf(RustTransform).u23 = function (_this__u8e3s4) {
|
|
|
2590
2590
|
}
|
|
2591
2591
|
return tmp;
|
|
2592
2592
|
};
|
|
2593
|
-
protoOf(RustTransform).
|
|
2593
|
+
protoOf(RustTransform).h23 = function (_this__u8e3s4) {
|
|
2594
2594
|
var tmp;
|
|
2595
2595
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2596
|
-
tmp = startsWith(_this__u8e3s4.
|
|
2596
|
+
tmp = startsWith(_this__u8e3s4.n1m_1, '&') || startsWith(_this__u8e3s4.n1m_1, '&dyn ') || startsWith(_this__u8e3s4.n1m_1, '&impl ') || startsWith(_this__u8e3s4.n1m_1, '&mut ');
|
|
2597
2597
|
} else {
|
|
2598
2598
|
tmp = false;
|
|
2599
2599
|
}
|
|
2600
2600
|
return tmp;
|
|
2601
2601
|
};
|
|
2602
|
-
protoOf(RustTransform).
|
|
2603
|
-
return _this__u8e3s4.
|
|
2602
|
+
protoOf(RustTransform).g23 = function (_this__u8e3s4) {
|
|
2603
|
+
return _this__u8e3s4.n1m_1 === 'Serializer' || _this__u8e3s4.n1m_1 === 'Deserializer';
|
|
2604
2604
|
};
|
|
2605
|
-
protoOf(RustTransform).
|
|
2606
|
-
return _this__u8e3s4.
|
|
2605
|
+
protoOf(RustTransform).f23 = function (_this__u8e3s4) {
|
|
2606
|
+
return _this__u8e3s4.n1m_1 === 'GeneratorField';
|
|
2607
2607
|
};
|
|
2608
|
-
protoOf(RustTransform).
|
|
2609
|
-
var v = _this__u8e3s4.
|
|
2608
|
+
protoOf(RustTransform).e23 = function (_this__u8e3s4) {
|
|
2609
|
+
var v = _this__u8e3s4.p1m();
|
|
2610
2610
|
switch (v) {
|
|
2611
2611
|
case 'self':
|
|
2612
2612
|
case '&self':
|
|
@@ -2622,20 +2622,20 @@ function RustTransform_getInstance() {
|
|
|
2622
2622
|
return RustTransform_instance;
|
|
2623
2623
|
}
|
|
2624
2624
|
function borrow(_this__u8e3s4) {
|
|
2625
|
-
return _this__u8e3s4.
|
|
2625
|
+
return _this__u8e3s4.r1q('&' + _this__u8e3s4.n1m_1);
|
|
2626
2626
|
}
|
|
2627
2627
|
function borrowDyn(_this__u8e3s4) {
|
|
2628
|
-
return _this__u8e3s4.
|
|
2628
|
+
return _this__u8e3s4.r1q('&dyn ' + _this__u8e3s4.n1m_1);
|
|
2629
2629
|
}
|
|
2630
2630
|
function borrowImpl(_this__u8e3s4) {
|
|
2631
|
-
return _this__u8e3s4.
|
|
2631
|
+
return _this__u8e3s4.r1q('&impl ' + _this__u8e3s4.n1m_1);
|
|
2632
2632
|
}
|
|
2633
2633
|
function ownedImpl(_this__u8e3s4) {
|
|
2634
|
-
return _this__u8e3s4.
|
|
2634
|
+
return _this__u8e3s4.r1q('impl ' + _this__u8e3s4.n1m_1);
|
|
2635
2635
|
}
|
|
2636
2636
|
//region block: post-declaration
|
|
2637
|
-
protoOf(RustIrEmitter).
|
|
2638
|
-
protoOf(RustIrEmitter).
|
|
2637
|
+
protoOf(RustIrEmitter).mr = emit_1;
|
|
2638
|
+
protoOf(RustIrEmitter).d1z = beforeGenerate;
|
|
2639
2639
|
//endregion
|
|
2640
2640
|
//region block: exports
|
|
2641
2641
|
export {
|