@flock/wirespec 0.22.0 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +166 -154
- package/arrow-arrow-core.mjs.map +1 -1
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1559 -1559
- package/colormath-root-colormath.mjs +441 -441
- package/kotlin-kotlin-stdlib.mjs +2239 -1951
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10246 -10246
- package/kotlin-rgxgen.mjs +1808 -1808
- package/kotlinx-io-kotlinx-io-core.mjs +419 -419
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1868 -1868
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1607 -1586
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1335 -1321
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +6432 -6170
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +181 -181
- package/wirespec-src-compiler-emitters-kotlin.mjs +143 -143
- package/wirespec-src-compiler-emitters-python.mjs +179 -179
- package/wirespec-src-compiler-emitters-rust.mjs +423 -423
- package/wirespec-src-compiler-emitters-scala.mjs +176 -176
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +254 -255
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +361 -163
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +937 -405
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-asyncapi.mjs +5382 -0
- package/wirespec-src-converter-asyncapi.mjs.map +1 -0
- package/wirespec-src-converter-avro.mjs +1075 -508
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +20 -20
- package/wirespec-src-converter-common.mjs.map +1 -1
- package/wirespec-src-converter-graphql.mjs +6895 -0
- package/wirespec-src-converter-graphql.mjs.map +1 -0
- package/wirespec-src-converter-openapi.mjs +786 -777
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1395 -1395
- package/wirespec-src-plugin-arguments.mjs +204 -184
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +111 -108
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-npm.d.mts +219 -27
- package/wirespec-src-plugin-npm.mjs +144 -49
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +35 -35
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
collectCustomTypeNames2atsrip288ol4 as collectCustomTypeNames,
|
|
140
140
|
plus14o24vdaiongg as plus_2,
|
|
141
141
|
convertWithValidation24mbxf4x2u6w4 as convertWithValidation,
|
|
142
|
-
|
|
142
|
+
get_fields1vhfmr41isbcc as get_fields,
|
|
143
143
|
injectSelfReceiverToValidate17yidn7t1g367 as injectSelfReceiverToValidate,
|
|
144
144
|
convert1ke01d6gmcvu7 as convert_0,
|
|
145
145
|
sanitizeEnumEntries28cw6g8cmlq5s as sanitizeEnumEntries,
|
|
@@ -194,15 +194,15 @@ initMetadataForClass(RustEmitter, 'RustEmitter', RustEmitter, VOID, [IrEmitter])
|
|
|
194
194
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
195
195
|
//endregion
|
|
196
196
|
function _get_sanitizationConfig__sns434($this) {
|
|
197
|
-
var tmp0 = $this.
|
|
197
|
+
var tmp0 = $this.y20_1;
|
|
198
198
|
var tmp = KProperty1;
|
|
199
199
|
// Inline function 'kotlin.getValue' call
|
|
200
200
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustEmitter$_get_sanitizationConfig_$ref_1dtj2x(), null);
|
|
201
|
-
return tmp0.
|
|
201
|
+
return tmp0.o1();
|
|
202
202
|
}
|
|
203
203
|
function sanitize($this, $receiver) {
|
|
204
204
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
205
|
-
var this_0 = split($receiver.
|
|
205
|
+
var this_0 = split($receiver.o1(), ['.', ' ']);
|
|
206
206
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
207
207
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
208
208
|
var index = 0;
|
|
@@ -211,7 +211,7 @@ function sanitize($this, $receiver) {
|
|
|
211
211
|
var item = _iterator__ex2g4s.v();
|
|
212
212
|
var _unary__edvuaz = index;
|
|
213
213
|
index = _unary__edvuaz + 1 | 0;
|
|
214
|
-
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
214
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.yr(item) : item;
|
|
215
215
|
destination.x(tmp$ret$2);
|
|
216
216
|
}
|
|
217
217
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -258,14 +258,14 @@ function sanitize($this, $receiver) {
|
|
|
258
258
|
return toSnakeCase($this, tmp$ret$8);
|
|
259
259
|
}
|
|
260
260
|
function toSnakeCase($this, $receiver) {
|
|
261
|
-
return Companion_getInstance().
|
|
261
|
+
return Companion_getInstance().wt($receiver).au();
|
|
262
262
|
}
|
|
263
263
|
function toPascalCase($this, $receiver) {
|
|
264
264
|
var tmp = split($receiver, ['_']);
|
|
265
265
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustEmitter$toPascalCase$lambda);
|
|
266
266
|
}
|
|
267
267
|
function sanitizeKeywords($this, $receiver) {
|
|
268
|
-
return Companion_getInstance_0().
|
|
268
|
+
return Companion_getInstance_0().v1z().i1($receiver) ? 'r#' + $receiver : $receiver;
|
|
269
269
|
}
|
|
270
270
|
function sanitizeEnum($this, $receiver) {
|
|
271
271
|
// Inline function 'kotlin.let' call
|
|
@@ -290,7 +290,7 @@ function prependImports($this, $receiver, imports) {
|
|
|
290
290
|
var tmp;
|
|
291
291
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
292
292
|
if (!imports.r()) {
|
|
293
|
-
tmp = $receiver.
|
|
293
|
+
tmp = $receiver.lv(VOID, plus(imports, $receiver.iv_1));
|
|
294
294
|
} else {
|
|
295
295
|
tmp = $receiver;
|
|
296
296
|
}
|
|
@@ -302,7 +302,7 @@ function containsWildcard($this, type) {
|
|
|
302
302
|
tmp = true;
|
|
303
303
|
} else {
|
|
304
304
|
if (type instanceof Custom) {
|
|
305
|
-
var tmp0 = type.
|
|
305
|
+
var tmp0 = type.ru_1;
|
|
306
306
|
var tmp$ret$0;
|
|
307
307
|
$l$block_0: {
|
|
308
308
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -329,13 +329,13 @@ function containsWildcard($this, type) {
|
|
|
329
329
|
tmp = tmp$ret$0;
|
|
330
330
|
} else {
|
|
331
331
|
if (type instanceof Nullable) {
|
|
332
|
-
tmp = containsWildcard($this, type.
|
|
332
|
+
tmp = containsWildcard($this, type.uu_1);
|
|
333
333
|
} else {
|
|
334
334
|
if (type instanceof Array_0) {
|
|
335
|
-
tmp = containsWildcard($this, type.
|
|
335
|
+
tmp = containsWildcard($this, type.lu_1);
|
|
336
336
|
} else {
|
|
337
337
|
if (type instanceof Dict) {
|
|
338
|
-
tmp = containsWildcard($this, type.
|
|
338
|
+
tmp = containsWildcard($this, type.nu_1) || containsWildcard($this, type.ou_1);
|
|
339
339
|
} else {
|
|
340
340
|
tmp = false;
|
|
341
341
|
}
|
|
@@ -357,7 +357,7 @@ function containsUnderiveable($this, type) {
|
|
|
357
357
|
tmp = true;
|
|
358
358
|
} else {
|
|
359
359
|
if (type instanceof Custom) {
|
|
360
|
-
var tmp0 = type.
|
|
360
|
+
var tmp0 = type.ru_1;
|
|
361
361
|
var tmp$ret$0;
|
|
362
362
|
$l$block_0: {
|
|
363
363
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -384,13 +384,13 @@ function containsUnderiveable($this, type) {
|
|
|
384
384
|
tmp = tmp$ret$0;
|
|
385
385
|
} else {
|
|
386
386
|
if (type instanceof Nullable) {
|
|
387
|
-
tmp = containsUnderiveable($this, type.
|
|
387
|
+
tmp = containsUnderiveable($this, type.uu_1);
|
|
388
388
|
} else {
|
|
389
389
|
if (type instanceof Array_0) {
|
|
390
|
-
tmp = containsUnderiveable($this, type.
|
|
390
|
+
tmp = containsUnderiveable($this, type.lu_1);
|
|
391
391
|
} else {
|
|
392
392
|
if (type instanceof Dict) {
|
|
393
|
-
tmp = containsUnderiveable($this, type.
|
|
393
|
+
tmp = containsUnderiveable($this, type.nu_1) || containsUnderiveable($this, type.ou_1);
|
|
394
394
|
} else {
|
|
395
395
|
tmp = false;
|
|
396
396
|
}
|
|
@@ -416,10 +416,10 @@ function buildClientParams($this, $receiver) {
|
|
|
416
416
|
}
|
|
417
417
|
function Companion() {
|
|
418
418
|
Companion_instance_2 = this;
|
|
419
|
-
this.
|
|
419
|
+
this.b21_1 = RustGenerator_getInstance();
|
|
420
420
|
}
|
|
421
|
-
protoOf(Companion).
|
|
422
|
-
return this.
|
|
421
|
+
protoOf(Companion).v1z = function () {
|
|
422
|
+
return this.b21_1.p1a_1;
|
|
423
423
|
};
|
|
424
424
|
var Companion_instance_2;
|
|
425
425
|
function Companion_getInstance_0() {
|
|
@@ -428,23 +428,23 @@ function Companion_getInstance_0() {
|
|
|
428
428
|
return Companion_instance_2;
|
|
429
429
|
}
|
|
430
430
|
function sam$kotlin_Comparator$0(function_0) {
|
|
431
|
-
this.
|
|
431
|
+
this.c21_1 = function_0;
|
|
432
432
|
}
|
|
433
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
434
|
-
return this.
|
|
433
|
+
protoOf(sam$kotlin_Comparator$0).yd = function (a, b) {
|
|
434
|
+
return this.c21_1(a, b);
|
|
435
435
|
};
|
|
436
436
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
437
|
-
return this.
|
|
437
|
+
return this.yd(a, b);
|
|
438
438
|
};
|
|
439
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
440
|
-
return this.
|
|
439
|
+
protoOf(sam$kotlin_Comparator$0).o3 = function () {
|
|
440
|
+
return this.c21_1;
|
|
441
441
|
};
|
|
442
442
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
443
443
|
var tmp;
|
|
444
444
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
445
445
|
var tmp_0;
|
|
446
446
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
447
|
-
tmp_0 = equals(this.
|
|
447
|
+
tmp_0 = equals(this.o3(), other.o3());
|
|
448
448
|
} else {
|
|
449
449
|
tmp_0 = false;
|
|
450
450
|
}
|
|
@@ -455,22 +455,22 @@ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
|
455
455
|
return tmp;
|
|
456
456
|
};
|
|
457
457
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
458
|
-
return hashCode(this.
|
|
458
|
+
return hashCode(this.o3());
|
|
459
459
|
};
|
|
460
460
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
461
461
|
return 'r#' + it;
|
|
462
462
|
}
|
|
463
463
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
464
|
-
return Companion_getInstance().
|
|
464
|
+
return Companion_getInstance().wt((new Name(name.ut_1)).au());
|
|
465
465
|
}
|
|
466
466
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
467
|
-
var value = name.
|
|
467
|
+
var value = name.xt();
|
|
468
468
|
switch (value) {
|
|
469
469
|
case 'self':
|
|
470
470
|
case '&self':
|
|
471
471
|
return name;
|
|
472
472
|
default:
|
|
473
|
-
return Companion_getInstance().
|
|
473
|
+
return Companion_getInstance().wt((new Name(name.ut_1)).au());
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
@@ -494,20 +494,20 @@ function RustEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
494
494
|
return function (stmt, tr) {
|
|
495
495
|
var tmp;
|
|
496
496
|
if (stmt instanceof ConstructorStatement) {
|
|
497
|
-
var tmp_0 = tr.
|
|
497
|
+
var tmp_0 = tr.m17(stmt.dv_1);
|
|
498
498
|
// Inline function 'kotlin.collections.map' call
|
|
499
|
-
var this_0 = stmt.
|
|
499
|
+
var this_0 = stmt.ev_1;
|
|
500
500
|
// Inline function 'kotlin.collections.mapTo' call
|
|
501
501
|
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
502
502
|
// Inline function 'kotlin.collections.iterator' call
|
|
503
|
-
var _iterator__ex2g4s = this_0.
|
|
503
|
+
var _iterator__ex2g4s = this_0.m1().t();
|
|
504
504
|
while (_iterator__ex2g4s.u()) {
|
|
505
505
|
var item = _iterator__ex2g4s.v();
|
|
506
506
|
// Inline function 'kotlin.collections.component1' call
|
|
507
|
-
var k = item.
|
|
507
|
+
var k = item.n1();
|
|
508
508
|
// Inline function 'kotlin.collections.component2' call
|
|
509
|
-
var v = item.
|
|
510
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
509
|
+
var v = item.o1();
|
|
510
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.p17(v));
|
|
511
511
|
destination.x(tmp$ret$3);
|
|
512
512
|
}
|
|
513
513
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -519,7 +519,7 @@ function RustEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
519
519
|
}
|
|
520
520
|
function RustEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
521
521
|
return function () {
|
|
522
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
522
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().v1z(), setOf(['self', 'Self']));
|
|
523
523
|
var tmp = RustEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
524
524
|
var tmp_0 = RustEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
525
525
|
var tmp_1 = RustEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -533,69 +533,69 @@ function RustEmitter$_get_sanitizationConfig_$ref_1dtj2x() {
|
|
|
533
533
|
};
|
|
534
534
|
}
|
|
535
535
|
function RustEmitter$emitShared$lambda($this$interface) {
|
|
536
|
-
$this$interface.
|
|
536
|
+
$this$interface.e16(Custom_init_$Create$('Headers'));
|
|
537
537
|
return Unit_instance;
|
|
538
538
|
}
|
|
539
539
|
function RustEmitter$emitShared$lambda_0($this$interface) {
|
|
540
|
-
$this$interface.
|
|
540
|
+
$this$interface.e16(Custom_init_$Create$('Headers'));
|
|
541
541
|
return Unit_instance;
|
|
542
542
|
}
|
|
543
543
|
function RustEmitter$emitShared$lambda_1($this$interface) {
|
|
544
|
-
$this$interface.
|
|
545
|
-
$this$interface.
|
|
546
|
-
$this$interface.
|
|
544
|
+
$this$interface.e16(Custom_init_$Create$('Sized'));
|
|
545
|
+
$this$interface.a15('label', VOID, VOID, RustEmitter$emitShared$lambda$lambda);
|
|
546
|
+
$this$interface.a15('from_label', true, VOID, RustEmitter$emitShared$lambda$lambda_0);
|
|
547
547
|
return Unit_instance;
|
|
548
548
|
}
|
|
549
549
|
function RustEmitter$emitShared$lambda$lambda($this$function) {
|
|
550
|
-
$this$function.
|
|
551
|
-
$this$function.
|
|
550
|
+
$this$function.k13('&self', Custom_init_$Create$(''));
|
|
551
|
+
$this$function.j13(Custom_init_$Create$('&str'));
|
|
552
552
|
return Unit_instance;
|
|
553
553
|
}
|
|
554
554
|
function RustEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
555
|
-
$this$function.
|
|
556
|
-
$this$function.
|
|
555
|
+
$this$function.k13('s', Custom_init_$Create$('&str'));
|
|
556
|
+
$this$function.j13(Custom_init_$Create$('Option<Self>'));
|
|
557
557
|
return Unit_instance;
|
|
558
558
|
}
|
|
559
559
|
function RustEmitter$emitShared$lambda_2($this$interface) {
|
|
560
|
-
$this$interface.
|
|
561
|
-
$this$interface.
|
|
562
|
-
$this$interface.
|
|
560
|
+
$this$interface.i13($this$interface.f14('T', []), []);
|
|
561
|
+
$this$interface.a15('value', VOID, VOID, RustEmitter$emitShared$lambda$lambda_1);
|
|
562
|
+
$this$interface.a15('validate', VOID, VOID, RustEmitter$emitShared$lambda$lambda_2);
|
|
563
563
|
return Unit_instance;
|
|
564
564
|
}
|
|
565
565
|
function RustEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
566
|
-
$this$function.
|
|
567
|
-
$this$function.
|
|
566
|
+
$this$function.k13('&self', Custom_init_$Create$(''));
|
|
567
|
+
$this$function.j13(borrow($this$function.f14('T', [])));
|
|
568
568
|
return Unit_instance;
|
|
569
569
|
}
|
|
570
570
|
function RustEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
571
|
-
$this$function.
|
|
572
|
-
$this$function.
|
|
571
|
+
$this$function.k13('&self', Custom_init_$Create$(''));
|
|
572
|
+
$this$function.j13($this$function.z13());
|
|
573
573
|
return Unit_instance;
|
|
574
574
|
}
|
|
575
575
|
function RustEmitter$emitShared$lambda_3($this$interface) {
|
|
576
|
-
$this$interface.
|
|
577
|
-
$this$interface.
|
|
578
|
-
$this$interface.
|
|
579
|
-
$this$interface.
|
|
580
|
-
$this$interface.
|
|
581
|
-
$this$interface.
|
|
576
|
+
$this$interface.i13($this$interface.f14('T', []), []);
|
|
577
|
+
$this$interface.f16('path', borrowDyn($this$interface.f14('Path', [])));
|
|
578
|
+
$this$interface.f16('method', borrow($this$interface.f14('Method', [])));
|
|
579
|
+
$this$interface.f16('queries', borrowDyn($this$interface.f14('Queries', [])));
|
|
580
|
+
$this$interface.f16('headers', borrowDyn($this$interface.f14('RequestHeaders', [])));
|
|
581
|
+
$this$interface.f16('body', borrow($this$interface.f14('T', [])));
|
|
582
582
|
return Unit_instance;
|
|
583
583
|
}
|
|
584
584
|
function RustEmitter$emitShared$lambda_4($this$interface) {
|
|
585
|
-
$this$interface.
|
|
586
|
-
$this$interface.
|
|
587
|
-
$this$interface.
|
|
588
|
-
$this$interface.
|
|
585
|
+
$this$interface.i13($this$interface.f14('T', []), []);
|
|
586
|
+
$this$interface.f16('status', $this$interface.s15());
|
|
587
|
+
$this$interface.f16('headers', borrowDyn($this$interface.f14('ResponseHeaders', [])));
|
|
588
|
+
$this$interface.f16('body', borrow($this$interface.f14('T', [])));
|
|
589
589
|
return Unit_instance;
|
|
590
590
|
}
|
|
591
591
|
function RustEmitter$emitShared$lambda_5($this$interface) {
|
|
592
|
-
$this$interface.
|
|
592
|
+
$this$interface.e15('transport', VOID, VOID, RustEmitter$emitShared$lambda$lambda_3);
|
|
593
593
|
return Unit_instance;
|
|
594
594
|
}
|
|
595
595
|
function RustEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
596
|
-
$this$asyncFunction.
|
|
597
|
-
$this$asyncFunction.
|
|
598
|
-
$this$asyncFunction.
|
|
596
|
+
$this$asyncFunction.k13('&self', Custom_init_$Create$(''));
|
|
597
|
+
$this$asyncFunction.k13('request', borrow($this$asyncFunction.f14('RawRequest', [])));
|
|
598
|
+
$this$asyncFunction.j13($this$asyncFunction.f14('RawResponse', []));
|
|
599
599
|
return Unit_instance;
|
|
600
600
|
}
|
|
601
601
|
function RustEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -603,7 +603,7 @@ function RustEmitter$emitShared$lambda_6($rustImports) {
|
|
|
603
603
|
var tmp;
|
|
604
604
|
if (element instanceof File) {
|
|
605
605
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
606
|
-
var tmp0 = element.
|
|
606
|
+
var tmp0 = element.iv_1;
|
|
607
607
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
608
608
|
var destination = ArrayList_init_$Create$_0();
|
|
609
609
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -614,7 +614,7 @@ function RustEmitter$emitShared$lambda_6($rustImports) {
|
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
var namespace = first(destination);
|
|
617
|
-
tmp = element.
|
|
617
|
+
tmp = element.lv(VOID, plus($rustImports, namespace.ov_1));
|
|
618
618
|
} else {
|
|
619
619
|
tmp = element;
|
|
620
620
|
}
|
|
@@ -626,7 +626,7 @@ function RustEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
626
626
|
var tmp;
|
|
627
627
|
if (element instanceof Enum) {
|
|
628
628
|
var tmp_0;
|
|
629
|
-
if (element.
|
|
629
|
+
if (element.yw_1.equals(Companion_getInstance().wt('Method'))) {
|
|
630
630
|
tmp_0 = new RawElement('#[derive(Debug, Clone, Default, PartialEq)]\npub enum Method {\n #[default]\n GET,\n PUT,\n POST,\n DELETE,\n OPTIONS,\n HEAD,\n PATCH,\n TRACE,\n}');
|
|
631
631
|
} else {
|
|
632
632
|
tmp_0 = element;
|
|
@@ -643,7 +643,7 @@ function RustEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $responseH
|
|
|
643
643
|
var tmp;
|
|
644
644
|
if (element instanceof File) {
|
|
645
645
|
// Inline function 'kotlin.collections.flatMap' call
|
|
646
|
-
var tmp0 = element.
|
|
646
|
+
var tmp0 = element.iv_1;
|
|
647
647
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
648
648
|
var destination = ArrayList_init_$Create$_0();
|
|
649
649
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -655,30 +655,30 @@ function RustEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $responseH
|
|
|
655
655
|
tmp$ret$3 = listOf(element_0);
|
|
656
656
|
break $l$block;
|
|
657
657
|
}
|
|
658
|
-
var name = element_0.
|
|
658
|
+
var name = element_0.tv_1.zt();
|
|
659
659
|
var tmp_0;
|
|
660
660
|
// Inline function 'kotlin.collections.contains' call
|
|
661
661
|
// Inline function 'kotlin.collections.containsKey' call
|
|
662
662
|
var this_0 = $dslTraits;
|
|
663
|
-
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).
|
|
663
|
+
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).q2(name)) {
|
|
664
664
|
// Inline function 'kotlin.collections.buildList' call
|
|
665
665
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
666
666
|
// Inline function 'kotlin.apply' call
|
|
667
667
|
var this_1 = ArrayList_init_$Create$_0();
|
|
668
|
-
this_1.x(ensureNotNull($dslTraits.
|
|
668
|
+
this_1.x(ensureNotNull($dslTraits.s2(name)));
|
|
669
669
|
if (name === 'Request') {
|
|
670
670
|
this_1.x($requestHeaders);
|
|
671
671
|
}
|
|
672
672
|
if (name === 'Response') {
|
|
673
673
|
this_1.x($responseHeaders);
|
|
674
674
|
}
|
|
675
|
-
tmp_0 = this_1.
|
|
675
|
+
tmp_0 = this_1.q5();
|
|
676
676
|
} else {
|
|
677
677
|
// Inline function 'kotlin.collections.contains' call
|
|
678
678
|
// Inline function 'kotlin.collections.containsKey' call
|
|
679
679
|
var this_2 = $rawElementInterfaces;
|
|
680
|
-
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).
|
|
681
|
-
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.
|
|
680
|
+
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).q2(name)) {
|
|
681
|
+
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.s2(name)));
|
|
682
682
|
} else {
|
|
683
683
|
tmp_0 = listOf(element_0);
|
|
684
684
|
}
|
|
@@ -689,7 +689,7 @@ function RustEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $responseH
|
|
|
689
689
|
addAll(destination, list);
|
|
690
690
|
}
|
|
691
691
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
692
|
-
tmp = element.
|
|
692
|
+
tmp = element.lv(VOID, newElements);
|
|
693
693
|
} else {
|
|
694
694
|
tmp = element;
|
|
695
695
|
}
|
|
@@ -705,14 +705,14 @@ function RustEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
705
705
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
706
706
|
var tmp_0 = scope;
|
|
707
707
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
708
|
-
var this_0 = scope.
|
|
708
|
+
var this_0 = scope.u17_1;
|
|
709
709
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
710
710
|
// Inline function 'kotlin.apply' call
|
|
711
711
|
var this_1 = new TransformerBuilder();
|
|
712
|
-
this_1.
|
|
713
|
-
var tmp$ret$5 = this_1.
|
|
714
|
-
tmp_0.
|
|
715
|
-
var tmp_1 = scope.
|
|
712
|
+
this_1.o18(RustEmitter$emitShared$lambda$lambda_4);
|
|
713
|
+
var tmp$ret$5 = this_1.j18();
|
|
714
|
+
tmp_0.u17_1 = transform(this_0, tmp$ret$5);
|
|
715
|
+
var tmp_1 = scope.u17_1;
|
|
716
716
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
717
717
|
} else {
|
|
718
718
|
tmp = element;
|
|
@@ -723,7 +723,7 @@ function RustEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
723
723
|
function RustEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
724
724
|
var tmp;
|
|
725
725
|
if (element instanceof Function_0) {
|
|
726
|
-
var tmp0 = element.
|
|
726
|
+
var tmp0 = element.vx_1;
|
|
727
727
|
var tmp$ret$1;
|
|
728
728
|
$l$block_0: {
|
|
729
729
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -740,7 +740,7 @@ function RustEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
740
740
|
var _iterator__ex2g4s = tmp0.t();
|
|
741
741
|
while (_iterator__ex2g4s.u()) {
|
|
742
742
|
var element_0 = _iterator__ex2g4s.v();
|
|
743
|
-
if (element_0.
|
|
743
|
+
if (element_0.jz_1.xt() === '&self' || element_0.jz_1.xt() === 'self') {
|
|
744
744
|
tmp$ret$1 = true;
|
|
745
745
|
break $l$block_0;
|
|
746
746
|
}
|
|
@@ -748,7 +748,7 @@ function RustEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
748
748
|
tmp$ret$1 = false;
|
|
749
749
|
}
|
|
750
750
|
var hasSelf = tmp$ret$1;
|
|
751
|
-
tmp = hasSelf || element.
|
|
751
|
+
tmp = hasSelf || element.zx_1 ? element : element.fy(VOID, VOID, plus(listOf(get_rustSelfParam()), element.vx_1));
|
|
752
752
|
} else {
|
|
753
753
|
tmp = element;
|
|
754
754
|
}
|
|
@@ -759,7 +759,7 @@ function RustEmitter$emitShared$lambda_10(group) {
|
|
|
759
759
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
760
760
|
}
|
|
761
761
|
function RustEmitter$emitShared$lambda$lambda_5(it) {
|
|
762
|
-
return RustGenerator_getInstance().
|
|
762
|
+
return RustGenerator_getInstance().i1a(it);
|
|
763
763
|
}
|
|
764
764
|
function RustEmitter$emit$lambda(a, b) {
|
|
765
765
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -768,7 +768,7 @@ function RustEmitter$emit$lambda(a, b) {
|
|
|
768
768
|
return compareValues(tmp, tmp$ret$2);
|
|
769
769
|
}
|
|
770
770
|
function emit$emitMod(this$0, def) {
|
|
771
|
-
return 'pub mod ' + sanitize(this$0, def.
|
|
771
|
+
return 'pub mod ' + sanitize(this$0, def.ds()) + ';';
|
|
772
772
|
}
|
|
773
773
|
function RustEmitter$emit$lambda_0(this$0) {
|
|
774
774
|
return function (it) {
|
|
@@ -797,17 +797,17 @@ function RustEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs) {
|
|
|
797
797
|
var tmp_0;
|
|
798
798
|
var tmp_1;
|
|
799
799
|
if (expr instanceof RawExpression) {
|
|
800
|
-
tmp_1 = endsWith(expr.
|
|
800
|
+
tmp_1 = endsWith(expr.iy_1, 'Generator');
|
|
801
801
|
} else {
|
|
802
802
|
tmp_1 = false;
|
|
803
803
|
}
|
|
804
804
|
if (tmp_1) {
|
|
805
|
-
tmp_0 = !(expr.
|
|
805
|
+
tmp_0 = !(expr.iy_1 === $generatorOwnName);
|
|
806
806
|
} else {
|
|
807
807
|
tmp_0 = false;
|
|
808
808
|
}
|
|
809
809
|
if (tmp_0) {
|
|
810
|
-
$generatorRefs.x(expr.
|
|
810
|
+
$generatorRefs.x(expr.iy_1);
|
|
811
811
|
tmp = Unit_instance;
|
|
812
812
|
}
|
|
813
813
|
return transformChildren_1(expr, t);
|
|
@@ -820,7 +820,7 @@ function RustEmitter$emit$lambda_2(this$0) {
|
|
|
820
820
|
}
|
|
821
821
|
function RustEmitter$emitClient$lambda(this$0) {
|
|
822
822
|
return function (endpoint) {
|
|
823
|
-
return 'pub mod ' + toSnakeCase(this$0, endpoint.
|
|
823
|
+
return 'pub mod ' + toSnakeCase(this$0, endpoint.fr_1.o1() + 'Client') + ';';
|
|
824
824
|
};
|
|
825
825
|
}
|
|
826
826
|
function RustEmitter$toPascalCase$lambda(s) {
|
|
@@ -840,39 +840,39 @@ function RustEmitter$toPascalCase$lambda(s) {
|
|
|
840
840
|
}
|
|
841
841
|
function RustEmitter$buildClientParams$lambda(this$0) {
|
|
842
842
|
return function (_destruct__k2r9zo) {
|
|
843
|
-
var name = _destruct__k2r9zo.
|
|
844
|
-
return sanitizeKeywords(this$0, name.
|
|
843
|
+
var name = _destruct__k2r9zo.ze();
|
|
844
|
+
return sanitizeKeywords(this$0, name.au());
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
847
|
function RustEmitter$buildClientParams$lambda_0(this$0) {
|
|
848
848
|
return function (_destruct__k2r9zo) {
|
|
849
|
-
var name = _destruct__k2r9zo.
|
|
850
|
-
var type = _destruct__k2r9zo.
|
|
851
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
849
|
+
var name = _destruct__k2r9zo.ze();
|
|
850
|
+
var type = _destruct__k2r9zo.af();
|
|
851
|
+
var tmp = sanitizeKeywords(this$0, name.au());
|
|
852
852
|
// Inline function 'kotlin.with' call
|
|
853
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
853
|
+
return tmp + ': ' + RustTransform_getInstance().i21(type);
|
|
854
854
|
};
|
|
855
855
|
}
|
|
856
856
|
function RustEmitter(packageName, emitShared) {
|
|
857
857
|
Companion_getInstance_0();
|
|
858
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
859
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
858
|
+
packageName = packageName === VOID ? Companion_instance_0.at('community.flock.wirespec.generated') : packageName;
|
|
859
|
+
emitShared = emitShared === VOID ? Companion_instance_1.fq() : emitShared;
|
|
860
|
+
this.u20_1 = packageName;
|
|
861
|
+
this.v20_1 = emitShared;
|
|
862
|
+
this.w20_1 = RustGenerator_getInstance();
|
|
863
|
+
this.x20_1 = FileExtension_Rust_getInstance();
|
|
864
864
|
var tmp = this;
|
|
865
|
-
tmp.
|
|
866
|
-
this.
|
|
867
|
-
this.
|
|
865
|
+
tmp.y20_1 = lazy(RustEmitter$sanitizationConfig$delegate$lambda(this));
|
|
866
|
+
this.z20_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
867
|
+
this.a21_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
868
868
|
}
|
|
869
|
-
protoOf(RustEmitter).
|
|
870
|
-
return this.
|
|
869
|
+
protoOf(RustEmitter).h1a = function () {
|
|
870
|
+
return this.w20_1;
|
|
871
871
|
};
|
|
872
|
-
protoOf(RustEmitter).
|
|
873
|
-
return this.
|
|
872
|
+
protoOf(RustEmitter).wp = function () {
|
|
873
|
+
return this.x20_1;
|
|
874
874
|
};
|
|
875
|
-
protoOf(RustEmitter).
|
|
875
|
+
protoOf(RustEmitter).c1a = function () {
|
|
876
876
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
877
877
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustEmitter$emitShared$lambda);
|
|
878
878
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustEmitter$emitShared$lambda_0);
|
|
@@ -886,43 +886,43 @@ protoOf(RustEmitter).s19 = function () {
|
|
|
886
886
|
var transportationTrait = interface_0('Transportation', VOID, RustEmitter$emitShared$lambda_5);
|
|
887
887
|
var dslTraits = mapOf([to('Enum', enumTrait), to('Refined', refinedTrait), to('Request', requestTrait), to('Response', responseTrait), to('Transportation', transportationTrait)]);
|
|
888
888
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
889
|
-
var this_0 = convert(Companion_instance_0.
|
|
889
|
+
var this_0 = convert(Companion_instance_0.at('shared'));
|
|
890
890
|
var scope = new TransformScope(this_0);
|
|
891
891
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
892
892
|
var tmp = scope;
|
|
893
893
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
894
|
-
var this_1 = scope.
|
|
894
|
+
var this_1 = scope.u17_1;
|
|
895
895
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
896
896
|
// Inline function 'kotlin.apply' call
|
|
897
897
|
var this_2 = new TransformerBuilder();
|
|
898
|
-
this_2.
|
|
899
|
-
var tmp$ret$4 = this_2.
|
|
900
|
-
tmp.
|
|
898
|
+
this_2.o18(RustEmitter$emitShared$lambda_6(rustImports));
|
|
899
|
+
var tmp$ret$4 = this_2.j18();
|
|
900
|
+
tmp.u17_1 = transform(this_1, tmp$ret$4);
|
|
901
901
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
902
902
|
var tmp_0 = scope;
|
|
903
903
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
904
|
-
var this_3 = scope.
|
|
904
|
+
var this_3 = scope.u17_1;
|
|
905
905
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
906
906
|
// Inline function 'kotlin.apply' call
|
|
907
907
|
var this_4 = new TransformerBuilder();
|
|
908
|
-
this_4.
|
|
909
|
-
var tmp$ret$9 = this_4.
|
|
910
|
-
tmp_0.
|
|
908
|
+
this_4.o18(RustEmitter$emitShared$lambda_7);
|
|
909
|
+
var tmp$ret$9 = this_4.j18();
|
|
910
|
+
tmp_0.u17_1 = transform(this_3, tmp$ret$9);
|
|
911
911
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
912
912
|
var tmp_1 = scope;
|
|
913
913
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
914
|
-
var this_5 = scope.
|
|
914
|
+
var this_5 = scope.u17_1;
|
|
915
915
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
916
916
|
// Inline function 'kotlin.apply' call
|
|
917
917
|
var this_6 = new TransformerBuilder();
|
|
918
|
-
this_6.
|
|
919
|
-
var tmp$ret$14 = this_6.
|
|
920
|
-
tmp_1.
|
|
921
|
-
var tmp_2 = scope.
|
|
918
|
+
this_6.o18(RustEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
919
|
+
var tmp$ret$14 = this_6.j18();
|
|
920
|
+
tmp_1.u17_1 = transform(this_5, tmp$ret$14);
|
|
921
|
+
var tmp_2 = scope.u17_1;
|
|
922
922
|
// Inline function 'kotlin.let' call
|
|
923
923
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
924
924
|
// Inline function 'kotlin.collections.flatMap' call
|
|
925
|
-
var tmp0 = file.
|
|
925
|
+
var tmp0 = file.iv_1;
|
|
926
926
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
927
927
|
var destination = ArrayList_init_$Create$_0();
|
|
928
928
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -952,7 +952,7 @@ protoOf(RustEmitter).s19 = function () {
|
|
|
952
952
|
var _iterator__ex2g4s_0 = structFields.t();
|
|
953
953
|
while (_iterator__ex2g4s_0.u()) {
|
|
954
954
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
955
|
-
if (containsUnderiveable(this, element_0.
|
|
955
|
+
if (containsUnderiveable(this, element_0.dw_1)) {
|
|
956
956
|
tmp$ret$22 = true;
|
|
957
957
|
break $l$block_1;
|
|
958
958
|
}
|
|
@@ -978,7 +978,7 @@ protoOf(RustEmitter).s19 = function () {
|
|
|
978
978
|
var _iterator__ex2g4s_1 = structFields.t();
|
|
979
979
|
while (_iterator__ex2g4s_1.u()) {
|
|
980
980
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
981
|
-
if (containsWildcard(this, element_1.
|
|
981
|
+
if (containsWildcard(this, element_1.dw_1)) {
|
|
982
982
|
tmp$ret$24 = true;
|
|
983
983
|
break $l$block_3;
|
|
984
984
|
}
|
|
@@ -988,7 +988,7 @@ protoOf(RustEmitter).s19 = function () {
|
|
|
988
988
|
if (tmp$ret$24) {
|
|
989
989
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
990
990
|
} else {
|
|
991
|
-
if (setOf(['RawRequest', 'RawResponse']).
|
|
991
|
+
if (setOf(['RawRequest', 'RawResponse']).i1(element.hx_1.zt())) {
|
|
992
992
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
993
993
|
} else {
|
|
994
994
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -1004,29 +1004,29 @@ protoOf(RustEmitter).s19 = function () {
|
|
|
1004
1004
|
tmp_6 = listOf(new RawElement(derive));
|
|
1005
1005
|
}
|
|
1006
1006
|
var prefix = tmp_6;
|
|
1007
|
-
tmp$ret$21 = listOf(new File(element.
|
|
1007
|
+
tmp$ret$21 = listOf(new File(element.hx_1, plus_0(prefix, element)));
|
|
1008
1008
|
}
|
|
1009
1009
|
var list = tmp$ret$21;
|
|
1010
1010
|
addAll(destination, list);
|
|
1011
1011
|
}
|
|
1012
|
-
var tmp0_0 = new File(file.
|
|
1012
|
+
var tmp0_0 = new File(file.hv_1, destination);
|
|
1013
1013
|
// Inline function 'kotlin.let' call
|
|
1014
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1014
|
+
var wirespecFile = RustTransform_getInstance().j21(tmp0_0);
|
|
1015
1015
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1016
1016
|
var scope_0 = new TransformScope(wirespecFile);
|
|
1017
1017
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1018
1018
|
var tmp_7 = scope_0;
|
|
1019
1019
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1020
|
-
var this_7 = scope_0.
|
|
1020
|
+
var this_7 = scope_0.u17_1;
|
|
1021
1021
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1022
1022
|
// Inline function 'kotlin.apply' call
|
|
1023
1023
|
var this_8 = new TransformerBuilder();
|
|
1024
|
-
this_8.
|
|
1025
|
-
var tmp$ret$33 = this_8.
|
|
1026
|
-
tmp_7.
|
|
1027
|
-
var tmp_8 = scope_0.
|
|
1024
|
+
this_8.o18(RustEmitter$emitShared$lambda_9);
|
|
1025
|
+
var tmp$ret$33 = this_8.j18();
|
|
1026
|
+
tmp_7.u17_1 = transform(this_7, tmp$ret$33);
|
|
1027
|
+
var tmp_8 = scope_0.u17_1;
|
|
1028
1028
|
// Inline function 'kotlin.let' call
|
|
1029
|
-
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1029
|
+
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).iv_1;
|
|
1030
1030
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1031
1031
|
// Inline function 'kotlin.collections.fold' call
|
|
1032
1032
|
var accumulator = ArrayList_init_$Create$_0();
|
|
@@ -1047,26 +1047,26 @@ protoOf(RustEmitter).s19 = function () {
|
|
|
1047
1047
|
var groups = accumulator;
|
|
1048
1048
|
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustEmitter$emitShared$lambda_10) + '\n';
|
|
1049
1049
|
var tmp_10;
|
|
1050
|
-
if (this.
|
|
1051
|
-
tmp_10 = new File(Companion_getInstance().
|
|
1050
|
+
if (this.v20_1.gq_1) {
|
|
1051
|
+
tmp_10 = new File(Companion_getInstance().wt(this.u20_1.dt() + 'wirespec'), listOf(new RawElement(source)));
|
|
1052
1052
|
} else {
|
|
1053
1053
|
tmp_10 = null;
|
|
1054
1054
|
}
|
|
1055
1055
|
return tmp_10;
|
|
1056
1056
|
};
|
|
1057
|
-
protoOf(RustEmitter).
|
|
1057
|
+
protoOf(RustEmitter).b1a = function (module_0, logger) {
|
|
1058
1058
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1059
|
-
var this_0 = new NonEmptyList(module_0.
|
|
1059
|
+
var this_0 = new NonEmptyList(module_0.gp_1);
|
|
1060
1060
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
1061
1061
|
var tmp = RustEmitter$emit$lambda;
|
|
1062
1062
|
var tmp$ret$1 = new sam$kotlin_Comparator$0(tmp);
|
|
1063
1063
|
var tmp$ret$0 = sortedWith(this_0, tmp$ret$1);
|
|
1064
1064
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$0);
|
|
1065
|
-
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).
|
|
1065
|
+
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).dn_1;
|
|
1066
1066
|
// Inline function 'kotlin.let' call
|
|
1067
|
-
var files = emit.call(this, module_0.
|
|
1067
|
+
var files = emit.call(this, module_0.tp(VOID, statements), logger);
|
|
1068
1068
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1069
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
1069
|
+
var tmp0 = new NonEmptyList(module_0.gp_1);
|
|
1070
1070
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1071
1071
|
var destination = ArrayList_init_$Create$_0();
|
|
1072
1072
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1086,11 +1086,11 @@ protoOf(RustEmitter).r19 = function (module_0, logger) {
|
|
|
1086
1086
|
tmp_1 = '';
|
|
1087
1087
|
}
|
|
1088
1088
|
var clientMod = tmp_1;
|
|
1089
|
-
var modRs = new File(Companion_getInstance().
|
|
1090
|
-
var modEndpoint = new File(Companion_getInstance().
|
|
1091
|
-
var tmp_2 = Companion_getInstance().
|
|
1089
|
+
var modRs = new File(Companion_getInstance().wt(this.u20_1.dt() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1090
|
+
var modEndpoint = new File(Companion_getInstance().wt(this.u20_1.dt() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1091
|
+
var tmp_2 = Companion_getInstance().wt(this.u20_1.dt() + 'model/' + 'mod');
|
|
1092
1092
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1093
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
1093
|
+
var tmp0_0 = new NonEmptyList(module_0.gp_1);
|
|
1094
1094
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1095
1095
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1096
1096
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1102,23 +1102,23 @@ protoOf(RustEmitter).r19 = function (module_0, logger) {
|
|
|
1102
1102
|
}
|
|
1103
1103
|
var tmp_3 = destination_0;
|
|
1104
1104
|
var modModel = new File(tmp_2, listOf(new RawElement(joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID, RustEmitter$emit$lambda_1(this)))));
|
|
1105
|
-
return this.
|
|
1105
|
+
return this.v20_1.gq_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(files, modRs), modEndpoint), modModel) : NonEmptyList__plus_impl_xqmb9(files, modRs);
|
|
1106
1106
|
};
|
|
1107
|
-
protoOf(RustEmitter).
|
|
1108
|
-
var subPackageName = plus_1(this.
|
|
1107
|
+
protoOf(RustEmitter).cs = function (definition, module_0, logger) {
|
|
1108
|
+
var subPackageName = plus_1(this.u20_1, definition);
|
|
1109
1109
|
var tmp;
|
|
1110
1110
|
if (definition instanceof Endpoint) {
|
|
1111
|
-
tmp = this.
|
|
1111
|
+
tmp = this.a21_1;
|
|
1112
1112
|
} else {
|
|
1113
|
-
tmp = this.
|
|
1113
|
+
tmp = this.z20_1;
|
|
1114
1114
|
}
|
|
1115
1115
|
var importHeader = tmp;
|
|
1116
1116
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1117
1117
|
// Inline function 'kotlin.let' call
|
|
1118
|
-
var file = RustTransform_getInstance().
|
|
1119
|
-
var tmp_0 = Companion_getInstance().
|
|
1118
|
+
var file = RustTransform_getInstance().j21(tmp0);
|
|
1119
|
+
var tmp_0 = Companion_getInstance().wt(subPackageName.dt() + toSnakeCase(this, file.hv_1.zt()));
|
|
1120
1120
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1121
|
-
var tmp0_0 = file.
|
|
1121
|
+
var tmp0_0 = file.iv_1;
|
|
1122
1122
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1123
1123
|
var destination = ArrayList_init_$Create$_0();
|
|
1124
1124
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1135,7 +1135,7 @@ protoOf(RustEmitter).sr = function (definition, module_0, logger) {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1137
1137
|
};
|
|
1138
|
-
protoOf(RustEmitter).
|
|
1138
|
+
protoOf(RustEmitter).k1a = function (definition, module_0) {
|
|
1139
1139
|
var tmp;
|
|
1140
1140
|
if (definition instanceof Type) {
|
|
1141
1141
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1155,7 +1155,7 @@ protoOf(RustEmitter).a1a = function (definition, module_0) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
1157
|
var generatorFile = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
|
|
1158
|
-
var generatorOwnName = definition.
|
|
1158
|
+
var generatorOwnName = definition.ds().o1() + 'Generator';
|
|
1159
1159
|
var tmp_0 = asSequence(collectCustomTypeNames(generatorFile));
|
|
1160
1160
|
var tmp_1 = filterNot(tmp_0, RustEmitter$emitGenerator$lambda);
|
|
1161
1161
|
var tmp_2 = filterNot(tmp_1, RustEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -1164,8 +1164,8 @@ protoOf(RustEmitter).a1a = function (definition, module_0) {
|
|
|
1164
1164
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1165
1165
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1166
1166
|
var scope = new TransformScope(generatorFile);
|
|
1167
|
-
scope.
|
|
1168
|
-
var tmp_3 = scope.
|
|
1167
|
+
scope.l18(RustEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1168
|
+
var tmp_3 = scope.u17_1;
|
|
1169
1169
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1170
1170
|
// Inline function 'kotlin.collections.filter' call
|
|
1171
1171
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1208,51 +1208,51 @@ protoOf(RustEmitter).a1a = function (definition, module_0) {
|
|
|
1208
1208
|
destination_2.x(tmp$ret$14);
|
|
1209
1209
|
}
|
|
1210
1210
|
var typeImports = destination_2;
|
|
1211
|
-
var subPackageName = plus_2(this.
|
|
1212
|
-
return new File(Companion_getInstance().
|
|
1211
|
+
var subPackageName = plus_2(this.u20_1, 'generator');
|
|
1212
|
+
return new File(Companion_getInstance().wt(subPackageName.dt() + toSnakeCase(this, generatorFile.hv_1.zt())), plus(plus(plus(this.z20_1, typeImports), generatorImports), generatorFile.iv_1));
|
|
1213
1213
|
};
|
|
1214
|
-
protoOf(RustEmitter).
|
|
1214
|
+
protoOf(RustEmitter).us = function (type, module_0) {
|
|
1215
1215
|
var tmp = convertWithValidation(type, module_0);
|
|
1216
1216
|
// Inline function 'kotlin.collections.map' call
|
|
1217
|
-
var this_0 = get_fields(type.
|
|
1217
|
+
var this_0 = get_fields(type.lp_1);
|
|
1218
1218
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1219
1219
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1220
1220
|
var _iterator__ex2g4s = this_0.t();
|
|
1221
1221
|
while (_iterator__ex2g4s.u()) {
|
|
1222
1222
|
var item = _iterator__ex2g4s.v();
|
|
1223
|
-
var tmp$ret$2 = item.
|
|
1223
|
+
var tmp$ret$2 = item.op_1.o1();
|
|
1224
1224
|
destination.x(tmp$ret$2);
|
|
1225
1225
|
}
|
|
1226
1226
|
return prependImports(this, sanitizeNames(injectSelfReceiverToValidate(tmp, toSet(destination), '&self'), _get_sanitizationConfig__sns434(this)), buildModelImports(type));
|
|
1227
1227
|
};
|
|
1228
|
-
protoOf(RustEmitter).
|
|
1228
|
+
protoOf(RustEmitter).ss = function (enum_0, module_0) {
|
|
1229
1229
|
var tmp = convert_0(enum_0);
|
|
1230
1230
|
return sanitizeEnumEntries(tmp, RustEmitter$emit$lambda_2(this));
|
|
1231
1231
|
};
|
|
1232
|
-
protoOf(RustEmitter).
|
|
1232
|
+
protoOf(RustEmitter).is = function (union) {
|
|
1233
1233
|
return convert_1(union);
|
|
1234
1234
|
};
|
|
1235
|
-
protoOf(RustEmitter).
|
|
1235
|
+
protoOf(RustEmitter).ns = function (refined) {
|
|
1236
1236
|
return replaceStructWithRefinedFunctions(convert_2(refined), refined);
|
|
1237
1237
|
};
|
|
1238
|
-
protoOf(RustEmitter).
|
|
1238
|
+
protoOf(RustEmitter).ts = function (endpoint) {
|
|
1239
1239
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1240
1240
|
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_3(endpoint))))));
|
|
1241
1241
|
var scope = new TransformScope(this_0);
|
|
1242
|
-
scope.
|
|
1243
|
-
var tmp = scope.
|
|
1242
|
+
scope.z17(fixResponseSwitchPatterns());
|
|
1243
|
+
var tmp = scope.u17_1;
|
|
1244
1244
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1245
1245
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1246
1246
|
var scope_0 = new TransformScope(this_1);
|
|
1247
|
-
scope_0.
|
|
1248
|
-
var tmp_0 = scope_0.
|
|
1247
|
+
scope_0.z17(fixConstructorCalls());
|
|
1248
|
+
var tmp_0 = scope_0.u17_1;
|
|
1249
1249
|
var tmp$ret$2 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1250
1250
|
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$2))), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1251
1251
|
};
|
|
1252
|
-
protoOf(RustEmitter).
|
|
1252
|
+
protoOf(RustEmitter).hs = function (channel) {
|
|
1253
1253
|
return convert_4(channel);
|
|
1254
1254
|
};
|
|
1255
|
-
protoOf(RustEmitter).
|
|
1255
|
+
protoOf(RustEmitter).gs = function (rpc) {
|
|
1256
1256
|
// Inline function 'kotlin.let' call
|
|
1257
1257
|
var file = convert_5(rpc);
|
|
1258
1258
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -1262,7 +1262,7 @@ protoOf(RustEmitter).wr = function (rpc) {
|
|
|
1262
1262
|
var _iterator__ex2g4s = this_0.t();
|
|
1263
1263
|
while (_iterator__ex2g4s.u()) {
|
|
1264
1264
|
var e = _iterator__ex2g4s.v();
|
|
1265
|
-
var key = e.
|
|
1265
|
+
var key = e.r18_1;
|
|
1266
1266
|
if (set.x(key)) {
|
|
1267
1267
|
list.x(e);
|
|
1268
1268
|
}
|
|
@@ -1273,12 +1273,12 @@ protoOf(RustEmitter).wr = function (rpc) {
|
|
|
1273
1273
|
var _iterator__ex2g4s_0 = list.t();
|
|
1274
1274
|
while (_iterator__ex2g4s_0.u()) {
|
|
1275
1275
|
var item = _iterator__ex2g4s_0.v();
|
|
1276
|
-
var tmp$ret$6 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1276
|
+
var tmp$ret$6 = import_0('super::super::model::' + toSnakeCase(this, item.r18_1), Companion_getInstance().wt(item.r18_1).zt());
|
|
1277
1277
|
destination.x(tmp$ret$6);
|
|
1278
1278
|
}
|
|
1279
1279
|
var rpcImports = destination;
|
|
1280
1280
|
// Inline function 'kotlin.collections.map' call
|
|
1281
|
-
var this_1 = file.
|
|
1281
|
+
var this_1 = file.iv_1;
|
|
1282
1282
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1283
1283
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1284
1284
|
var _iterator__ex2g4s_1 = this_1.t();
|
|
@@ -1287,7 +1287,7 @@ protoOf(RustEmitter).wr = function (rpc) {
|
|
|
1287
1287
|
var tmp;
|
|
1288
1288
|
if (item_0 instanceof Namespace) {
|
|
1289
1289
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1290
|
-
var tmp0 = item_0.
|
|
1290
|
+
var tmp0 = item_0.ov_1;
|
|
1291
1291
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1292
1292
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
1293
1293
|
var _iterator__ex2g4s_2 = tmp0.t();
|
|
@@ -1302,23 +1302,23 @@ protoOf(RustEmitter).wr = function (rpc) {
|
|
|
1302
1302
|
var list_0 = tmp_0;
|
|
1303
1303
|
addAll(destination_1, list_0);
|
|
1304
1304
|
}
|
|
1305
|
-
tmp = item_0.
|
|
1305
|
+
tmp = item_0.sv(VOID, destination_1);
|
|
1306
1306
|
} else {
|
|
1307
1307
|
tmp = item_0;
|
|
1308
1308
|
}
|
|
1309
1309
|
var tmp$ret$9 = tmp;
|
|
1310
1310
|
destination_0.x(tmp$ret$9);
|
|
1311
1311
|
}
|
|
1312
|
-
return file.
|
|
1312
|
+
return file.lv(VOID, plus(rpcImports, destination_0));
|
|
1313
1313
|
};
|
|
1314
|
-
protoOf(RustEmitter).
|
|
1315
|
-
var endpointName = endpoint.
|
|
1314
|
+
protoOf(RustEmitter).j1a = function (endpoint) {
|
|
1315
|
+
var endpointName = endpoint.fr_1.o1();
|
|
1316
1316
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1317
1317
|
var clientName = endpointName + 'Client';
|
|
1318
1318
|
var methodName = toSnakeCase(this, endpointName);
|
|
1319
1319
|
var _destruct__k2r9zo = buildClientParams(this, endpoint);
|
|
1320
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1321
|
-
var requestArgs = _destruct__k2r9zo.
|
|
1320
|
+
var paramsStr = _destruct__k2r9zo.ze();
|
|
1321
|
+
var requestArgs = _destruct__k2r9zo.af();
|
|
1322
1322
|
var requestConstruction = endpointModuleName + '::Request::new(' + requestArgs + ')';
|
|
1323
1323
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1324
1324
|
var this_0 = importReferences(endpoint);
|
|
@@ -1327,7 +1327,7 @@ protoOf(RustEmitter).z19 = function (endpoint) {
|
|
|
1327
1327
|
var _iterator__ex2g4s = this_0.t();
|
|
1328
1328
|
while (_iterator__ex2g4s.u()) {
|
|
1329
1329
|
var e = _iterator__ex2g4s.v();
|
|
1330
|
-
var key = e.
|
|
1330
|
+
var key = e.r18_1;
|
|
1331
1331
|
if (set.x(key)) {
|
|
1332
1332
|
list.x(e);
|
|
1333
1333
|
}
|
|
@@ -1338,7 +1338,7 @@ protoOf(RustEmitter).z19 = function (endpoint) {
|
|
|
1338
1338
|
var _iterator__ex2g4s_0 = list.t();
|
|
1339
1339
|
while (_iterator__ex2g4s_0.u()) {
|
|
1340
1340
|
var item = _iterator__ex2g4s_0.v();
|
|
1341
|
-
var tmp$ret$4 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1341
|
+
var tmp$ret$4 = import_0('super::super::model::' + toSnakeCase(this, item.r18_1), item.r18_1);
|
|
1342
1342
|
destination.x(tmp$ret$4);
|
|
1343
1343
|
}
|
|
1344
1344
|
var modelImports = destination;
|
|
@@ -1359,10 +1359,10 @@ protoOf(RustEmitter).z19 = function (endpoint) {
|
|
|
1359
1359
|
this_1.x(' ' + namespacePath + '::from_raw_response(self.serialization, raw_response)');
|
|
1360
1360
|
this_1.x(' }');
|
|
1361
1361
|
this_1.x('}');
|
|
1362
|
-
var tmp$ret$5 = this_1.
|
|
1362
|
+
var tmp$ret$5 = this_1.q5();
|
|
1363
1363
|
var code = joinToString(tmp$ret$5, '\n');
|
|
1364
|
-
var subPackageName = plus_2(this.
|
|
1365
|
-
var tmp = Companion_getInstance().
|
|
1364
|
+
var subPackageName = plus_2(this.u20_1, 'client');
|
|
1365
|
+
var tmp = Companion_getInstance().wt(subPackageName.dt() + toSnakeCase(this, clientName));
|
|
1366
1366
|
// Inline function 'kotlin.collections.buildList' call
|
|
1367
1367
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1368
1368
|
// Inline function 'kotlin.apply' call
|
|
@@ -1371,11 +1371,11 @@ protoOf(RustEmitter).z19 = function (endpoint) {
|
|
|
1371
1371
|
this_2.x(import_0('super::super::endpoint', endpointModuleName));
|
|
1372
1372
|
this_2.g1(modelImports);
|
|
1373
1373
|
this_2.x(new RawElement(code));
|
|
1374
|
-
var tmp$ret$9 = this_2.
|
|
1374
|
+
var tmp$ret$9 = this_2.q5();
|
|
1375
1375
|
return new File(tmp, tmp$ret$9);
|
|
1376
1376
|
};
|
|
1377
|
-
protoOf(RustEmitter).
|
|
1378
|
-
logger.
|
|
1377
|
+
protoOf(RustEmitter).d1a = function (endpoints, logger) {
|
|
1378
|
+
logger.as('Emitting main Client for ' + endpoints.b1() + ' endpoints');
|
|
1379
1379
|
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustEmitter$emitClient$lambda(this));
|
|
1380
1380
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1381
1381
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
@@ -1392,7 +1392,7 @@ protoOf(RustEmitter).t19 = function (endpoints, logger) {
|
|
|
1392
1392
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1393
1393
|
while (_iterator__ex2g4s_0.u()) {
|
|
1394
1394
|
var e = _iterator__ex2g4s_0.v();
|
|
1395
|
-
var key = e.
|
|
1395
|
+
var key = e.r18_1;
|
|
1396
1396
|
if (set.x(key)) {
|
|
1397
1397
|
list_0.x(e);
|
|
1398
1398
|
}
|
|
@@ -1419,7 +1419,7 @@ protoOf(RustEmitter).t19 = function (endpoints, logger) {
|
|
|
1419
1419
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1420
1420
|
while (_iterator__ex2g4s_2.u()) {
|
|
1421
1421
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1422
|
-
if (element_1.
|
|
1422
|
+
if (element_1.fr_1.o1() === element_0.r18_1) {
|
|
1423
1423
|
tmp$ret$8 = false;
|
|
1424
1424
|
break $l$block_0;
|
|
1425
1425
|
}
|
|
@@ -1436,7 +1436,7 @@ protoOf(RustEmitter).t19 = function (endpoints, logger) {
|
|
|
1436
1436
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1437
1437
|
while (_iterator__ex2g4s_3.u()) {
|
|
1438
1438
|
var item = _iterator__ex2g4s_3.v();
|
|
1439
|
-
var tmp$ret$12 = import_0('super::model::' + toSnakeCase(this, item.
|
|
1439
|
+
var tmp$ret$12 = import_0('super::model::' + toSnakeCase(this, item.r18_1), item.r18_1);
|
|
1440
1440
|
destination_1.x(tmp$ret$12);
|
|
1441
1441
|
}
|
|
1442
1442
|
var modelImports = destination_1;
|
|
@@ -1446,9 +1446,9 @@ protoOf(RustEmitter).t19 = function (endpoints, logger) {
|
|
|
1446
1446
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1447
1447
|
while (_iterator__ex2g4s_4.u()) {
|
|
1448
1448
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1449
|
-
var endpointModuleName = toSnakeCase(this, element_2.
|
|
1450
|
-
var clientModuleName = toSnakeCase(this, element_2.
|
|
1451
|
-
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.
|
|
1449
|
+
var endpointModuleName = toSnakeCase(this, element_2.fr_1.o1());
|
|
1450
|
+
var clientModuleName = toSnakeCase(this, element_2.fr_1.o1() + 'Client');
|
|
1451
|
+
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.fr_1.o1() + 'Client')]);
|
|
1452
1452
|
addAll(destination_2, list_1);
|
|
1453
1453
|
}
|
|
1454
1454
|
var endpointAndClientImports = destination_2;
|
|
@@ -1458,20 +1458,20 @@ protoOf(RustEmitter).t19 = function (endpoints, logger) {
|
|
|
1458
1458
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1459
1459
|
while (_iterator__ex2g4s_5.u()) {
|
|
1460
1460
|
var element_3 = _iterator__ex2g4s_5.v();
|
|
1461
|
-
var endpointName = element_3.
|
|
1461
|
+
var endpointName = element_3.fr_1.o1();
|
|
1462
1462
|
var endpointModuleName_0 = toSnakeCase(this, endpointName);
|
|
1463
1463
|
var namespacePath = endpointModuleName_0 + '::' + endpointName;
|
|
1464
1464
|
var methodName = toSnakeCase(this, endpointName);
|
|
1465
1465
|
var _destruct__k2r9zo = buildClientParams(this, element_3);
|
|
1466
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1467
|
-
var callArgs = _destruct__k2r9zo.
|
|
1466
|
+
var paramsStr = _destruct__k2r9zo.ze();
|
|
1467
|
+
var callArgs = _destruct__k2r9zo.af();
|
|
1468
1468
|
var delegateCall = endpointName + 'Client { serialization: &self.serialization, transportation: &self.transportation }\n' + (' .' + methodName + '(' + callArgs + ').await');
|
|
1469
1469
|
var list_2 = listOf_0(['impl<S: Serialization, T: Transportation> ' + namespacePath + '::Call for Client<S, T> {', ' async fn ' + methodName + '(&self' + paramsStr + ') -> ' + endpointModuleName_0 + '::Response {', ' ' + delegateCall, ' }', '}']);
|
|
1470
1470
|
addAll(destination_3, list_2);
|
|
1471
1471
|
}
|
|
1472
1472
|
var implBlocks = destination_3;
|
|
1473
1473
|
var code = joinToString(plus(listOf_0(['pub struct Client<S: Serialization, T: Transportation> {', ' pub serialization: S,', ' pub transportation: T,', '}']), implBlocks), '\n');
|
|
1474
|
-
var tmp_0 = Companion_getInstance().
|
|
1474
|
+
var tmp_0 = Companion_getInstance().wt(this.u20_1.dt() + 'client');
|
|
1475
1475
|
// Inline function 'kotlin.collections.buildList' call
|
|
1476
1476
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1477
1477
|
// Inline function 'kotlin.apply' call
|
|
@@ -1481,7 +1481,7 @@ protoOf(RustEmitter).t19 = function (endpoints, logger) {
|
|
|
1481
1481
|
this_0.g1(modelImports);
|
|
1482
1482
|
this_0.g1(endpointAndClientImports);
|
|
1483
1483
|
this_0.x(new RawElement(code));
|
|
1484
|
-
var tmp$ret$19 = this_0.
|
|
1484
|
+
var tmp$ret$19 = this_0.q5();
|
|
1485
1485
|
return new File(tmp_0, tmp$ret$19);
|
|
1486
1486
|
};
|
|
1487
1487
|
function get_rustSelfParam() {
|
|
@@ -1499,8 +1499,8 @@ function fixResponseSwitchPatterns() {
|
|
|
1499
1499
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1500
1500
|
// Inline function 'kotlin.apply' call
|
|
1501
1501
|
var this_0 = new TransformerBuilder();
|
|
1502
|
-
this_0.
|
|
1503
|
-
return this_0.
|
|
1502
|
+
this_0.k18(fixResponseSwitchPatterns$lambda);
|
|
1503
|
+
return this_0.j18();
|
|
1504
1504
|
}
|
|
1505
1505
|
function buildModelImports(_this__u8e3s4) {
|
|
1506
1506
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1511,7 +1511,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1511
1511
|
var _iterator__ex2g4s = this_0.t();
|
|
1512
1512
|
while (_iterator__ex2g4s.u()) {
|
|
1513
1513
|
var e = _iterator__ex2g4s.v();
|
|
1514
|
-
var key = e.
|
|
1514
|
+
var key = e.r18_1;
|
|
1515
1515
|
if (set.x(key)) {
|
|
1516
1516
|
list.x(e);
|
|
1517
1517
|
}
|
|
@@ -1522,7 +1522,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1522
1522
|
var _iterator__ex2g4s_0 = list.t();
|
|
1523
1523
|
while (_iterator__ex2g4s_0.u()) {
|
|
1524
1524
|
var item = _iterator__ex2g4s_0.v();
|
|
1525
|
-
var tmp$ret$4 = import_0('super::' + toRustSnakeCase(item.
|
|
1525
|
+
var tmp$ret$4 = import_0('super::' + toRustSnakeCase(item.r18_1), Companion_getInstance().wt(item.r18_1).zt());
|
|
1526
1526
|
destination.x(tmp$ret$4);
|
|
1527
1527
|
}
|
|
1528
1528
|
return destination;
|
|
@@ -1534,14 +1534,14 @@ function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
1534
1534
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1535
1535
|
var tmp = scope;
|
|
1536
1536
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1537
|
-
var this_0 = scope.
|
|
1537
|
+
var this_0 = scope.u17_1;
|
|
1538
1538
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1539
1539
|
// Inline function 'kotlin.apply' call
|
|
1540
1540
|
var this_1 = new TransformerBuilder();
|
|
1541
|
-
this_1.
|
|
1542
|
-
var tmp$ret$4 = this_1.
|
|
1543
|
-
tmp.
|
|
1544
|
-
var tmp_0 = scope.
|
|
1541
|
+
this_1.o18(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1542
|
+
var tmp$ret$4 = this_1.j18();
|
|
1543
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
1544
|
+
var tmp_0 = scope.u17_1;
|
|
1545
1545
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1546
1546
|
}
|
|
1547
1547
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
@@ -1551,14 +1551,14 @@ function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
|
1551
1551
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1552
1552
|
var tmp = scope;
|
|
1553
1553
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1554
|
-
var this_0 = scope.
|
|
1554
|
+
var this_0 = scope.u17_1;
|
|
1555
1555
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1556
1556
|
// Inline function 'kotlin.apply' call
|
|
1557
1557
|
var this_1 = new TransformerBuilder();
|
|
1558
|
-
this_1.
|
|
1559
|
-
var tmp$ret$4 = this_1.
|
|
1560
|
-
tmp.
|
|
1561
|
-
var tmp_0 = scope.
|
|
1558
|
+
this_1.o18(injectApiStruct$lambda(endpoint));
|
|
1559
|
+
var tmp$ret$4 = this_1.j18();
|
|
1560
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
1561
|
+
var tmp_0 = scope.u17_1;
|
|
1562
1562
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1563
1563
|
}
|
|
1564
1564
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
@@ -1568,14 +1568,14 @@ function injectResponseFromImpls(_this__u8e3s4) {
|
|
|
1568
1568
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1569
1569
|
var tmp = scope;
|
|
1570
1570
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1571
|
-
var this_0 = scope.
|
|
1571
|
+
var this_0 = scope.u17_1;
|
|
1572
1572
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1573
1573
|
// Inline function 'kotlin.apply' call
|
|
1574
1574
|
var this_1 = new TransformerBuilder();
|
|
1575
|
-
this_1.
|
|
1576
|
-
var tmp$ret$4 = this_1.
|
|
1577
|
-
tmp.
|
|
1578
|
-
var tmp_0 = scope.
|
|
1575
|
+
this_1.o18(injectResponseFromImpls$lambda);
|
|
1576
|
+
var tmp$ret$4 = this_1.j18();
|
|
1577
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
1578
|
+
var tmp_0 = scope.u17_1;
|
|
1579
1579
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1580
1580
|
}
|
|
1581
1581
|
function injectHandlerImplForClient(_this__u8e3s4) {
|
|
@@ -1585,14 +1585,14 @@ function injectHandlerImplForClient(_this__u8e3s4) {
|
|
|
1585
1585
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1586
1586
|
var tmp = scope;
|
|
1587
1587
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1588
|
-
var this_0 = scope.
|
|
1588
|
+
var this_0 = scope.u17_1;
|
|
1589
1589
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1590
1590
|
// Inline function 'kotlin.apply' call
|
|
1591
1591
|
var this_1 = new TransformerBuilder();
|
|
1592
|
-
this_1.
|
|
1593
|
-
var tmp$ret$4 = this_1.
|
|
1594
|
-
tmp.
|
|
1595
|
-
var tmp_0 = scope.
|
|
1592
|
+
this_1.o18(injectHandlerImplForClient$lambda);
|
|
1593
|
+
var tmp$ret$4 = this_1.j18();
|
|
1594
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
1595
|
+
var tmp_0 = scope.u17_1;
|
|
1596
1596
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1597
1597
|
}
|
|
1598
1598
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
@@ -1602,14 +1602,14 @@ function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
|
1602
1602
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1603
1603
|
var tmp = scope;
|
|
1604
1604
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1605
|
-
var this_0 = scope.
|
|
1605
|
+
var this_0 = scope.u17_1;
|
|
1606
1606
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1607
1607
|
// Inline function 'kotlin.apply' call
|
|
1608
1608
|
var this_1 = new TransformerBuilder();
|
|
1609
|
-
this_1.
|
|
1610
|
-
var tmp$ret$4 = this_1.
|
|
1611
|
-
tmp.
|
|
1612
|
-
var tmp_0 = scope.
|
|
1609
|
+
this_1.o18(injectSelfToHandlerMethods$lambda);
|
|
1610
|
+
var tmp$ret$4 = this_1.j18();
|
|
1611
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
1612
|
+
var tmp_0 = scope.u17_1;
|
|
1613
1613
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1614
1614
|
}
|
|
1615
1615
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
@@ -1619,14 +1619,14 @@ function stripResponseGenerics(_this__u8e3s4) {
|
|
|
1619
1619
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
1620
1620
|
var tmp = scope;
|
|
1621
1621
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
1622
|
-
var this_0 = scope.
|
|
1622
|
+
var this_0 = scope.u17_1;
|
|
1623
1623
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1624
1624
|
// Inline function 'kotlin.apply' call
|
|
1625
1625
|
var this_1 = new TransformerBuilder();
|
|
1626
|
-
this_1.
|
|
1627
|
-
var tmp$ret$4 = this_1.
|
|
1628
|
-
tmp.
|
|
1629
|
-
var tmp_0 = scope.
|
|
1626
|
+
this_1.a18(stripResponseGenerics$lambda);
|
|
1627
|
+
var tmp$ret$4 = this_1.j18();
|
|
1628
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
1629
|
+
var tmp_0 = scope.u17_1;
|
|
1630
1630
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1631
1631
|
}
|
|
1632
1632
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
@@ -1636,14 +1636,14 @@ function stripHandlerExtends(_this__u8e3s4) {
|
|
|
1636
1636
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1637
1637
|
var tmp = scope;
|
|
1638
1638
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1639
|
-
var this_0 = scope.
|
|
1639
|
+
var this_0 = scope.u17_1;
|
|
1640
1640
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1641
1641
|
// Inline function 'kotlin.apply' call
|
|
1642
1642
|
var this_1 = new TransformerBuilder();
|
|
1643
|
-
this_1.
|
|
1644
|
-
var tmp$ret$4 = this_1.
|
|
1645
|
-
tmp.
|
|
1646
|
-
var tmp_0 = scope.
|
|
1643
|
+
this_1.o18(stripHandlerExtends$lambda);
|
|
1644
|
+
var tmp$ret$4 = this_1.j18();
|
|
1645
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
1646
|
+
var tmp_0 = scope.u17_1;
|
|
1647
1647
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1648
1648
|
}
|
|
1649
1649
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
@@ -1651,8 +1651,8 @@ function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
|
1651
1651
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1652
1652
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1653
1653
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1654
|
-
scope.
|
|
1655
|
-
var tmp = scope.
|
|
1654
|
+
scope.m18(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1655
|
+
var tmp = scope.u17_1;
|
|
1656
1656
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1657
1657
|
}
|
|
1658
1658
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
@@ -1662,21 +1662,21 @@ function stripWirespecPrefix(_this__u8e3s4) {
|
|
|
1662
1662
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
1663
1663
|
var tmp = scope;
|
|
1664
1664
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
1665
|
-
var this_0 = scope.
|
|
1665
|
+
var this_0 = scope.u17_1;
|
|
1666
1666
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1667
1667
|
// Inline function 'kotlin.apply' call
|
|
1668
1668
|
var this_1 = new TransformerBuilder();
|
|
1669
|
-
this_1.
|
|
1670
|
-
var tmp$ret$4 = this_1.
|
|
1671
|
-
tmp.
|
|
1672
|
-
var tmp_0 = scope.
|
|
1669
|
+
this_1.a18(stripWirespecPrefix$lambda);
|
|
1670
|
+
var tmp$ret$4 = this_1.j18();
|
|
1671
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
1672
|
+
var tmp_0 = scope.u17_1;
|
|
1673
1673
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1674
1674
|
}
|
|
1675
1675
|
function flattenForRust(_this__u8e3s4) {
|
|
1676
1676
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1677
1677
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
1678
1678
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1679
|
-
var tmp0 = _this__u8e3s4.
|
|
1679
|
+
var tmp0 = _this__u8e3s4.jv();
|
|
1680
1680
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1681
1681
|
var destination = ArrayList_init_$Create$_0();
|
|
1682
1682
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1689,7 +1689,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1689
1689
|
var tmp$ret$0 = firstOrNull_0(destination);
|
|
1690
1690
|
var namespace = ensureNotNull(tmp$ret$0);
|
|
1691
1691
|
// Inline function 'kotlin.collections.filter' call
|
|
1692
|
-
var tmp0_0 = namespace.
|
|
1692
|
+
var tmp0_0 = namespace.ov_1;
|
|
1693
1693
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1694
1694
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1695
1695
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1714,13 +1714,13 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1714
1714
|
var tmp_0;
|
|
1715
1715
|
var tmp_1;
|
|
1716
1716
|
if (item instanceof Union_0) {
|
|
1717
|
-
tmp_1 = item.
|
|
1717
|
+
tmp_1 = item.nw_1.zt() === 'Response';
|
|
1718
1718
|
} else {
|
|
1719
1719
|
tmp_1 = false;
|
|
1720
1720
|
}
|
|
1721
1721
|
if (tmp_1) {
|
|
1722
1722
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1723
|
-
var tmp0_1 = namespace.
|
|
1723
|
+
var tmp0_1 = namespace.ov_1;
|
|
1724
1724
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1725
1725
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1726
1726
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -1736,7 +1736,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1736
1736
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1737
1737
|
while (_iterator__ex2g4s_3.u()) {
|
|
1738
1738
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1739
|
-
var tmp$ret$13 = item_0.
|
|
1739
|
+
var tmp$ret$13 = item_0.hx_1.zt();
|
|
1740
1740
|
destination_3.x(tmp$ret$13);
|
|
1741
1741
|
}
|
|
1742
1742
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -1745,7 +1745,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1745
1745
|
var _iterator__ex2g4s_4 = destination_3.t();
|
|
1746
1746
|
while (_iterator__ex2g4s_4.u()) {
|
|
1747
1747
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1748
|
-
if (get_rustResponsePattern().
|
|
1748
|
+
if (get_rustResponsePattern().rc(element_2)) {
|
|
1749
1749
|
destination_4.x(element_2);
|
|
1750
1750
|
}
|
|
1751
1751
|
}
|
|
@@ -1759,10 +1759,10 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1759
1759
|
destination_5.x(tmp$ret$19);
|
|
1760
1760
|
}
|
|
1761
1761
|
var members = destination_5;
|
|
1762
|
-
tmp_0 = item.
|
|
1762
|
+
tmp_0 = item.tw(VOID, VOID, members, emptyList());
|
|
1763
1763
|
} else {
|
|
1764
1764
|
if (item instanceof Union_0) {
|
|
1765
|
-
tmp_0 = item.
|
|
1765
|
+
tmp_0 = item.tw(VOID, VOID, VOID, emptyList());
|
|
1766
1766
|
} else {
|
|
1767
1767
|
tmp_0 = item;
|
|
1768
1768
|
}
|
|
@@ -1772,7 +1772,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
var moduleElements = destination_1;
|
|
1774
1774
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1775
|
-
var tmp0_2 = namespace.
|
|
1775
|
+
var tmp0_2 = namespace.ov_1;
|
|
1776
1776
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1777
1777
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1778
1778
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1789,15 +1789,15 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
1791
|
var classElements = destination_6;
|
|
1792
|
-
return new File(namespace.
|
|
1792
|
+
return new File(namespace.nv_1, plus_0(moduleElements, new Namespace(namespace.nv_1, classElements, namespace.pv_1)));
|
|
1793
1793
|
}
|
|
1794
1794
|
function fixConstructorCalls() {
|
|
1795
1795
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1796
1796
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1797
1797
|
// Inline function 'kotlin.apply' call
|
|
1798
1798
|
var this_0 = new TransformerBuilder();
|
|
1799
|
-
this_0.
|
|
1800
|
-
return this_0.
|
|
1799
|
+
this_0.m18(fixConstructorCalls$lambda);
|
|
1800
|
+
return this_0.j18();
|
|
1801
1801
|
}
|
|
1802
1802
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1803
1803
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1808,7 +1808,7 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1808
1808
|
var _iterator__ex2g4s = this_0.t();
|
|
1809
1809
|
while (_iterator__ex2g4s.u()) {
|
|
1810
1810
|
var e = _iterator__ex2g4s.v();
|
|
1811
|
-
var key = e.
|
|
1811
|
+
var key = e.r18_1;
|
|
1812
1812
|
if (set.x(key)) {
|
|
1813
1813
|
list.x(e);
|
|
1814
1814
|
}
|
|
@@ -1819,24 +1819,24 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1819
1819
|
var _iterator__ex2g4s_0 = list.t();
|
|
1820
1820
|
while (_iterator__ex2g4s_0.u()) {
|
|
1821
1821
|
var item = _iterator__ex2g4s_0.v();
|
|
1822
|
-
var tmp$ret$4 = import_0('super::super::model::' + toRustSnakeCase(item.
|
|
1822
|
+
var tmp$ret$4 = import_0('super::super::model::' + toRustSnakeCase(item.r18_1), Companion_getInstance().wt(item.r18_1).zt());
|
|
1823
1823
|
destination.x(tmp$ret$4);
|
|
1824
1824
|
}
|
|
1825
1825
|
return destination;
|
|
1826
1826
|
}
|
|
1827
1827
|
function toRustSnakeCase(_this__u8e3s4) {
|
|
1828
1828
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1829
|
-
return Companion_getInstance().
|
|
1829
|
+
return Companion_getInstance().wt(_this__u8e3s4).au();
|
|
1830
1830
|
}
|
|
1831
1831
|
function buildValidateFunction(refined) {
|
|
1832
1832
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1833
|
-
var constraintExpr = convertConstraint(refined.
|
|
1833
|
+
var constraintExpr = convertConstraint(refined.ms_1, new FieldCall(new VariableReference(Companion_getInstance().wt('self')), Companion_getInstance().wt('value')));
|
|
1834
1834
|
return function_0('validate', VOID, VOID, buildValidateFunction$lambda(constraintExpr));
|
|
1835
1835
|
}
|
|
1836
1836
|
function buildToStringFunction(refined) {
|
|
1837
1837
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1838
1838
|
var tmp;
|
|
1839
|
-
if (refined.
|
|
1839
|
+
if (refined.ms_1.t18_1 instanceof String_0) {
|
|
1840
1840
|
tmp = 'self.value.clone()';
|
|
1841
1841
|
} else {
|
|
1842
1842
|
tmp = 'format!("{}", self.value)';
|
|
@@ -1851,8 +1851,8 @@ function buildApiStruct(endpoint) {
|
|
|
1851
1851
|
function generateApiStructCode(_this__u8e3s4) {
|
|
1852
1852
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1853
1853
|
// Inline function 'kotlin.let' call
|
|
1854
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
1855
|
-
var methodName = _this__u8e3s4.
|
|
1854
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.hr_1, '/', VOID, VOID, VOID, VOID, generateApiStructCode$lambda);
|
|
1855
|
+
var methodName = _this__u8e3s4.gr_1.d3_1;
|
|
1856
1856
|
return trimIndent('\n pub struct Api;\n impl Server for Api {\n type Req = Request;\n type Res = Response;\n fn path_template(&self) -> &\'static str { "' + pathTemplate + '" }\n fn method(&self) -> Method { Method::' + methodName + ' }\n }\n ');
|
|
1857
1857
|
}
|
|
1858
1858
|
function fixResponseSwitchPatterns$lambda(s, t) {
|
|
@@ -1861,56 +1861,56 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1861
1861
|
if (!(s instanceof Switch)) {
|
|
1862
1862
|
tmp = true;
|
|
1863
1863
|
} else {
|
|
1864
|
-
var tmp0_safe_receiver = s.
|
|
1865
|
-
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1864
|
+
var tmp0_safe_receiver = s.xy_1;
|
|
1865
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yt()) === 'r');
|
|
1866
1866
|
}
|
|
1867
1867
|
if (tmp)
|
|
1868
1868
|
return transformChildren(s, t);
|
|
1869
1869
|
// Inline function 'kotlin.collections.map' call
|
|
1870
|
-
var this_0 = s.
|
|
1870
|
+
var this_0 = s.vy_1;
|
|
1871
1871
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1872
1872
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1873
1873
|
var _iterator__ex2g4s = this_0.t();
|
|
1874
1874
|
while (_iterator__ex2g4s.u()) {
|
|
1875
1875
|
var item = _iterator__ex2g4s.v();
|
|
1876
|
-
var tmp_0 = item.
|
|
1876
|
+
var tmp_0 = item.cz_1;
|
|
1877
1877
|
var tmp0_safe_receiver_0 = tmp_0 instanceof Custom ? tmp_0 : null;
|
|
1878
|
-
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.
|
|
1879
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1878
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.qu_1;
|
|
1879
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zt();
|
|
1880
1880
|
var tmp_1;
|
|
1881
|
-
if (!(typeName == null) && get_rustResponsePattern().
|
|
1882
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1881
|
+
if (!(typeName == null) && get_rustResponsePattern().rc(typeName)) {
|
|
1882
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.xy_1).au() + ')');
|
|
1883
1883
|
// Inline function 'kotlin.collections.map' call
|
|
1884
|
-
var this_1 = item.
|
|
1884
|
+
var this_1 = item.bz_1;
|
|
1885
1885
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1886
1886
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1887
1887
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1888
1888
|
while (_iterator__ex2g4s_0.u()) {
|
|
1889
1889
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1890
|
-
var tmp$ret$5 = t.
|
|
1890
|
+
var tmp$ret$5 = t.o17(item_0);
|
|
1891
1891
|
destination_0.x(tmp$ret$5);
|
|
1892
1892
|
}
|
|
1893
1893
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1894
1894
|
} else {
|
|
1895
|
-
var tmp_3 = t.
|
|
1895
|
+
var tmp_3 = t.p17(item.az_1);
|
|
1896
1896
|
// Inline function 'kotlin.collections.map' call
|
|
1897
|
-
var this_2 = item.
|
|
1897
|
+
var this_2 = item.bz_1;
|
|
1898
1898
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1899
1899
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1900
1900
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1901
1901
|
while (_iterator__ex2g4s_1.u()) {
|
|
1902
1902
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1903
|
-
var tmp$ret$8 = t.
|
|
1903
|
+
var tmp$ret$8 = t.o17(item_1);
|
|
1904
1904
|
destination_1.x(tmp$ret$8);
|
|
1905
1905
|
}
|
|
1906
1906
|
var tmp_4 = destination_1;
|
|
1907
|
-
var tmp2_safe_receiver = item.
|
|
1907
|
+
var tmp2_safe_receiver = item.cz_1;
|
|
1908
1908
|
var tmp_5;
|
|
1909
1909
|
if (tmp2_safe_receiver == null) {
|
|
1910
1910
|
tmp_5 = null;
|
|
1911
1911
|
} else {
|
|
1912
1912
|
// Inline function 'kotlin.let' call
|
|
1913
|
-
tmp_5 = t.
|
|
1913
|
+
tmp_5 = t.m17(tmp2_safe_receiver);
|
|
1914
1914
|
}
|
|
1915
1915
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1916
1916
|
}
|
|
@@ -1918,13 +1918,13 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1918
1918
|
destination.x(tmp$ret$2);
|
|
1919
1919
|
}
|
|
1920
1920
|
var transformedCases = destination;
|
|
1921
|
-
return s.
|
|
1921
|
+
return s.zy(t.p17(s.uy_1), transformedCases, null);
|
|
1922
1922
|
}
|
|
1923
1923
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1924
1924
|
return function (element, transformer) {
|
|
1925
1925
|
var tmp;
|
|
1926
1926
|
if (element instanceof Struct) {
|
|
1927
|
-
tmp = element.
|
|
1927
|
+
tmp = element.sx(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1928
1928
|
} else {
|
|
1929
1929
|
tmp = element;
|
|
1930
1930
|
}
|
|
@@ -1936,7 +1936,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1936
1936
|
return function (element, transformer) {
|
|
1937
1937
|
var tmp;
|
|
1938
1938
|
if (element instanceof Namespace) {
|
|
1939
|
-
tmp = element.
|
|
1939
|
+
tmp = element.sv(VOID, plus(element.ov_1, listOf(buildApiStruct($endpoint))));
|
|
1940
1940
|
} else {
|
|
1941
1941
|
tmp = element;
|
|
1942
1942
|
}
|
|
@@ -1949,7 +1949,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1949
1949
|
var tmp;
|
|
1950
1950
|
if (element instanceof File) {
|
|
1951
1951
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1952
|
-
var tmp0 = element.
|
|
1952
|
+
var tmp0 = element.iv_1;
|
|
1953
1953
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1954
1954
|
var destination = ArrayList_init_$Create$_0();
|
|
1955
1955
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1959,26 +1959,26 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1959
1959
|
var tmp_1;
|
|
1960
1960
|
var tmp_2;
|
|
1961
1961
|
if (element_0 instanceof Union_0) {
|
|
1962
|
-
tmp_2 = element_0.
|
|
1962
|
+
tmp_2 = element_0.nw_1.zt() === 'Response';
|
|
1963
1963
|
} else {
|
|
1964
1964
|
tmp_2 = false;
|
|
1965
1965
|
}
|
|
1966
1966
|
if (tmp_2) {
|
|
1967
1967
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1968
|
-
tmp_1 = !element_0.
|
|
1968
|
+
tmp_1 = !element_0.pw_1.r();
|
|
1969
1969
|
} else {
|
|
1970
1970
|
tmp_1 = false;
|
|
1971
1971
|
}
|
|
1972
1972
|
if (tmp_1) {
|
|
1973
1973
|
var tmp_3 = listOf(element_0);
|
|
1974
1974
|
// Inline function 'kotlin.collections.map' call
|
|
1975
|
-
var this_0 = element_0.
|
|
1975
|
+
var this_0 = element_0.pw_1;
|
|
1976
1976
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1977
1977
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1978
1978
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1979
1979
|
while (_iterator__ex2g4s_0.u()) {
|
|
1980
1980
|
var item = _iterator__ex2g4s_0.v();
|
|
1981
|
-
var memberName = item.
|
|
1981
|
+
var memberName = item.qu_1.zt();
|
|
1982
1982
|
var tmp$ret$7 = new RawElement('impl From<' + memberName + '> for Response { fn from(value: ' + memberName + ') -> Self { Response::' + memberName + '(value) } }\n');
|
|
1983
1983
|
destination_0.x(tmp$ret$7);
|
|
1984
1984
|
}
|
|
@@ -1989,7 +1989,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1989
1989
|
var list = tmp_0;
|
|
1990
1990
|
addAll(destination, list);
|
|
1991
1991
|
}
|
|
1992
|
-
tmp = element.
|
|
1992
|
+
tmp = element.lv(VOID, destination);
|
|
1993
1993
|
} else {
|
|
1994
1994
|
tmp = element;
|
|
1995
1995
|
}
|
|
@@ -2003,7 +2003,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2003
2003
|
var tmp$ret$0;
|
|
2004
2004
|
$l$block_1: {
|
|
2005
2005
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
2006
|
-
var tmp0 = element.
|
|
2006
|
+
var tmp0 = element.ov_1;
|
|
2007
2007
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
2008
2008
|
var destination = ArrayList_init_$Create$_0();
|
|
2009
2009
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -2019,7 +2019,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2019
2019
|
var _iterator__ex2g4s_0 = destination.t();
|
|
2020
2020
|
while (_iterator__ex2g4s_0.u()) {
|
|
2021
2021
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
2022
|
-
if (element_1.
|
|
2022
|
+
if (element_1.tv_1.equals(Companion_getInstance().wt('Handler'))) {
|
|
2023
2023
|
tmp$ret$3 = element_1;
|
|
2024
2024
|
break $l$block;
|
|
2025
2025
|
}
|
|
@@ -2036,7 +2036,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2036
2036
|
}
|
|
2037
2037
|
var handler = tmp_0;
|
|
2038
2038
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
2039
|
-
var tmp0_0 = handler.
|
|
2039
|
+
var tmp0_0 = handler.uv_1;
|
|
2040
2040
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
2041
2041
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
2042
2042
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
@@ -2055,8 +2055,8 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2055
2055
|
tmp_1 = tmp1_elvis_lhs;
|
|
2056
2056
|
}
|
|
2057
2057
|
var method = tmp_1;
|
|
2058
|
-
var methodName = method.
|
|
2059
|
-
tmp$ret$0 = element.
|
|
2058
|
+
var methodName = method.tx_1.au();
|
|
2059
|
+
tmp$ret$0 = element.sv(VOID, plus(element.ov_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 ')))));
|
|
2060
2060
|
}
|
|
2061
2061
|
tmp = tmp$ret$0;
|
|
2062
2062
|
} else {
|
|
@@ -2071,7 +2071,7 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2071
2071
|
if (element instanceof Interface) {
|
|
2072
2072
|
var tmp$ret$0;
|
|
2073
2073
|
$l$block: {
|
|
2074
|
-
if (!element.
|
|
2074
|
+
if (!element.tv_1.equals(Companion_getInstance().wt('Handler')) && !element.tv_1.equals(Companion_getInstance().wt('Call'))) {
|
|
2075
2075
|
tmp$ret$0 = element;
|
|
2076
2076
|
break $l$block;
|
|
2077
2077
|
}
|
|
@@ -2080,14 +2080,14 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2080
2080
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
2081
2081
|
var tmp_0 = scope;
|
|
2082
2082
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
2083
|
-
var this_0 = scope.
|
|
2083
|
+
var this_0 = scope.u17_1;
|
|
2084
2084
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2085
2085
|
// Inline function 'kotlin.apply' call
|
|
2086
2086
|
var this_1 = new TransformerBuilder();
|
|
2087
|
-
this_1.
|
|
2088
|
-
var tmp$ret$5 = this_1.
|
|
2089
|
-
tmp_0.
|
|
2090
|
-
var tmp_1 = scope.
|
|
2087
|
+
this_1.o18(injectSelfToHandlerMethods$lambda$lambda);
|
|
2088
|
+
var tmp$ret$5 = this_1.j18();
|
|
2089
|
+
tmp_0.u17_1 = transform(this_0, tmp$ret$5);
|
|
2090
|
+
var tmp_1 = scope.u17_1;
|
|
2091
2091
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2092
2092
|
}
|
|
2093
2093
|
tmp = tmp$ret$0;
|
|
@@ -2101,7 +2101,7 @@ function injectSelfToHandlerMethods$lambda$lambda(element, transformer) {
|
|
|
2101
2101
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2102
2102
|
var tmp;
|
|
2103
2103
|
if (element instanceof Function_0) {
|
|
2104
|
-
tmp = element.
|
|
2104
|
+
tmp = element.fy(Companion_getInstance().wt(element.tx_1.au()), VOID, plus(listOf(get_rustSelfParam()), element.vx_1));
|
|
2105
2105
|
} else {
|
|
2106
2106
|
tmp = element;
|
|
2107
2107
|
}
|
|
@@ -2114,14 +2114,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2114
2114
|
if (type instanceof Custom) {
|
|
2115
2115
|
var tmp_0;
|
|
2116
2116
|
var tmp_1;
|
|
2117
|
-
if (startsWith(type.
|
|
2117
|
+
if (startsWith(type.qu_1.zt(), 'Response')) {
|
|
2118
2118
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2119
|
-
tmp_1 = !type.
|
|
2119
|
+
tmp_1 = !type.ru_1.r();
|
|
2120
2120
|
} else {
|
|
2121
2121
|
tmp_1 = false;
|
|
2122
2122
|
}
|
|
2123
2123
|
if (tmp_1) {
|
|
2124
|
-
tmp_0 = type.
|
|
2124
|
+
tmp_0 = type.tu(VOID, emptyList());
|
|
2125
2125
|
} else {
|
|
2126
2126
|
tmp_0 = type;
|
|
2127
2127
|
}
|
|
@@ -2136,7 +2136,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2136
2136
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2137
2137
|
var tmp;
|
|
2138
2138
|
if (element instanceof Interface) {
|
|
2139
|
-
tmp = element.
|
|
2139
|
+
tmp = element.tv_1.equals(Companion_getInstance().wt('Handler')) || element.tv_1.equals(Companion_getInstance().wt('Call')) ? element.bw(VOID, VOID, emptyList()) : element;
|
|
2140
2140
|
} else {
|
|
2141
2141
|
tmp = element;
|
|
2142
2142
|
}
|
|
@@ -2149,17 +2149,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2149
2149
|
var tmp_0;
|
|
2150
2150
|
var tmp_1;
|
|
2151
2151
|
if (s instanceof RawExpression) {
|
|
2152
|
-
tmp_1 = $identifierPattern.
|
|
2152
|
+
tmp_1 = $identifierPattern.rc(s.iy_1);
|
|
2153
2153
|
} else {
|
|
2154
2154
|
tmp_1 = false;
|
|
2155
2155
|
}
|
|
2156
2156
|
if (tmp_1) {
|
|
2157
|
-
tmp_0 = !contains(s.
|
|
2157
|
+
tmp_0 = !contains(s.iy_1, '.');
|
|
2158
2158
|
} else {
|
|
2159
2159
|
tmp_0 = false;
|
|
2160
2160
|
}
|
|
2161
2161
|
if (tmp_0) {
|
|
2162
|
-
tmp = new VariableReference(Companion_getInstance().
|
|
2162
|
+
tmp = new VariableReference(Companion_getInstance().wt(s.iy_1));
|
|
2163
2163
|
} else {
|
|
2164
2164
|
tmp = transformChildren(s, t);
|
|
2165
2165
|
}
|
|
@@ -2170,10 +2170,10 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2170
2170
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2171
2171
|
var tmp;
|
|
2172
2172
|
if (type instanceof Custom) {
|
|
2173
|
-
var pascalName = type.
|
|
2173
|
+
var pascalName = type.qu_1.zt();
|
|
2174
2174
|
var tmp_0;
|
|
2175
2175
|
if (startsWith(pascalName, 'Wirespec.')) {
|
|
2176
|
-
tmp_0 = type.
|
|
2176
|
+
tmp_0 = type.tu(Companion_getInstance().wt(removePrefix(pascalName, 'Wirespec.')));
|
|
2177
2177
|
} else {
|
|
2178
2178
|
tmp_0 = type;
|
|
2179
2179
|
}
|
|
@@ -2188,38 +2188,38 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2188
2188
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2189
2189
|
if (!(s instanceof ConstructorStatement))
|
|
2190
2190
|
return transformChildren(s, t);
|
|
2191
|
-
var tmp = s.
|
|
2191
|
+
var tmp = s.dv_1;
|
|
2192
2192
|
var tmp0_safe_receiver = tmp instanceof Custom ? tmp : null;
|
|
2193
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2194
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
2193
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qu_1;
|
|
2194
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zt();
|
|
2195
2195
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2196
|
-
var this_0 = s.
|
|
2196
|
+
var this_0 = s.ev_1;
|
|
2197
2197
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2198
2198
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.b1()));
|
|
2199
2199
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
2200
|
-
var _iterator__ex2g4s = this_0.
|
|
2200
|
+
var _iterator__ex2g4s = this_0.m1().t();
|
|
2201
2201
|
while (_iterator__ex2g4s.u()) {
|
|
2202
2202
|
var element = _iterator__ex2g4s.v();
|
|
2203
|
-
var tmp_0 = element.
|
|
2204
|
-
var tmp$ret$4 = t.
|
|
2205
|
-
destination.
|
|
2203
|
+
var tmp_0 = element.n1();
|
|
2204
|
+
var tmp$ret$4 = t.p17(element.o1());
|
|
2205
|
+
destination.v2(tmp_0, tmp$ret$4);
|
|
2206
2206
|
}
|
|
2207
2207
|
var transformedArgs = destination;
|
|
2208
|
-
return !(typeName == null) && get_rustResponsePattern().
|
|
2208
|
+
return !(typeName == null) && get_rustResponsePattern().rc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().wt('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);
|
|
2209
2209
|
}
|
|
2210
2210
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2211
2211
|
return function ($this$function) {
|
|
2212
|
-
$this$function.
|
|
2213
|
-
$this$function.
|
|
2214
|
-
$this$function.
|
|
2212
|
+
$this$function.k13('&self', Custom_init_$Create$(''));
|
|
2213
|
+
$this$function.j13(Boolean_instance);
|
|
2214
|
+
$this$function.m13($constraintExpr);
|
|
2215
2215
|
return Unit_instance;
|
|
2216
2216
|
};
|
|
2217
2217
|
}
|
|
2218
2218
|
function buildToStringFunction$lambda($expr) {
|
|
2219
2219
|
return function ($this$function) {
|
|
2220
|
-
$this$function.
|
|
2221
|
-
$this$function.
|
|
2222
|
-
$this$function.
|
|
2220
|
+
$this$function.k13('&self', Custom_init_$Create$(''));
|
|
2221
|
+
$this$function.j13(String_instance);
|
|
2222
|
+
$this$function.m13(new RawExpression($expr));
|
|
2223
2223
|
return Unit_instance;
|
|
2224
2224
|
};
|
|
2225
2225
|
}
|
|
@@ -2227,10 +2227,10 @@ function generateApiStructCode$lambda(segment) {
|
|
|
2227
2227
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2228
2228
|
var tmp;
|
|
2229
2229
|
if (segment instanceof Literal) {
|
|
2230
|
-
tmp = segment.
|
|
2230
|
+
tmp = segment.a1a_1;
|
|
2231
2231
|
} else {
|
|
2232
2232
|
if (segment instanceof Param) {
|
|
2233
|
-
tmp = '{' + segment.
|
|
2233
|
+
tmp = '{' + segment.mr_1.o1() + '}';
|
|
2234
2234
|
} else {
|
|
2235
2235
|
noWhenBranchMatchedException();
|
|
2236
2236
|
}
|
|
@@ -2241,39 +2241,39 @@ var properties_initialized_RustIrTransformer_kt_hr6k9w;
|
|
|
2241
2241
|
function _init_properties_RustIrTransformer_kt__rrvmwq() {
|
|
2242
2242
|
if (!properties_initialized_RustIrTransformer_kt_hr6k9w) {
|
|
2243
2243
|
properties_initialized_RustIrTransformer_kt_hr6k9w = true;
|
|
2244
|
-
rustSelfParam = new Parameter(Companion_getInstance().
|
|
2244
|
+
rustSelfParam = new Parameter(Companion_getInstance().wt('&self'), Custom_init_$Create$(''));
|
|
2245
2245
|
rustResponsePattern = Regex_init_$Create$('Response(\\d+|Default)');
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
2248
|
function borrowParamsOf($this, fn) {
|
|
2249
2249
|
// Inline function 'kotlin.collections.map' call
|
|
2250
|
-
var this_0 = fn.
|
|
2250
|
+
var this_0 = fn.vx_1;
|
|
2251
2251
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2252
2252
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2253
2253
|
var _iterator__ex2g4s = this_0.t();
|
|
2254
2254
|
while (_iterator__ex2g4s.u()) {
|
|
2255
2255
|
var item = _iterator__ex2g4s.v();
|
|
2256
2256
|
var tmp;
|
|
2257
|
-
if (RustTransform_getInstance().
|
|
2257
|
+
if (RustTransform_getInstance().k21(item.jz_1)) {
|
|
2258
2258
|
tmp = item;
|
|
2259
2259
|
} else {
|
|
2260
|
-
tmp = item.
|
|
2260
|
+
tmp = item.nz(VOID, applyBorrowRule(RustTransform_getInstance(), item.kz_1));
|
|
2261
2261
|
}
|
|
2262
2262
|
var tmp$ret$2 = tmp;
|
|
2263
2263
|
destination.x(tmp$ret$2);
|
|
2264
2264
|
}
|
|
2265
|
-
return fn.
|
|
2265
|
+
return fn.fy(VOID, VOID, destination);
|
|
2266
2266
|
}
|
|
2267
2267
|
function applyBorrowRule($this, type) {
|
|
2268
2268
|
var tmp;
|
|
2269
2269
|
if (type instanceof Nullable) {
|
|
2270
|
-
tmp = new Nullable(applyBorrowRule($this, type.
|
|
2270
|
+
tmp = new Nullable(applyBorrowRule($this, type.uu_1));
|
|
2271
2271
|
} else {
|
|
2272
2272
|
if (equals(type, String_instance)) {
|
|
2273
2273
|
tmp = Custom_init_$Create$('&str');
|
|
2274
2274
|
} else {
|
|
2275
2275
|
if (type instanceof Custom) {
|
|
2276
|
-
tmp = $this.
|
|
2276
|
+
tmp = $this.n21(type) ? type : $this.m21(type) ? borrowImpl(type) : $this.l21(type) ? ownedImpl(type) : type;
|
|
2277
2277
|
} else {
|
|
2278
2278
|
tmp = type;
|
|
2279
2279
|
}
|
|
@@ -2285,15 +2285,15 @@ function toBorrowedRaw($this, $receiver) {
|
|
|
2285
2285
|
return new RawExpression('&' + toRawCode($this, $receiver));
|
|
2286
2286
|
}
|
|
2287
2287
|
function sanitizeKeywords_0($this, $receiver) {
|
|
2288
|
-
return Companion_getInstance_0().
|
|
2288
|
+
return Companion_getInstance_0().v1z().i1($receiver) ? 'r#' + $receiver : $receiver;
|
|
2289
2289
|
}
|
|
2290
2290
|
function toRawCode($this, $receiver) {
|
|
2291
2291
|
var tmp;
|
|
2292
2292
|
if ($receiver instanceof VariableReference) {
|
|
2293
|
-
tmp = sanitizeKeywords_0($this, $receiver.
|
|
2293
|
+
tmp = sanitizeKeywords_0($this, $receiver.gv_1.au());
|
|
2294
2294
|
} else {
|
|
2295
2295
|
if ($receiver instanceof FieldCall) {
|
|
2296
|
-
var tmp1_safe_receiver = $receiver.
|
|
2296
|
+
var tmp1_safe_receiver = $receiver.fz_1;
|
|
2297
2297
|
var tmp_0;
|
|
2298
2298
|
if (tmp1_safe_receiver == null) {
|
|
2299
2299
|
tmp_0 = null;
|
|
@@ -2303,20 +2303,20 @@ function toRawCode($this, $receiver) {
|
|
|
2303
2303
|
}
|
|
2304
2304
|
var tmp2_elvis_lhs = tmp_0;
|
|
2305
2305
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2306
|
-
tmp = recv + sanitizeKeywords_0($this, $receiver.
|
|
2306
|
+
tmp = recv + sanitizeKeywords_0($this, $receiver.gz_1.au());
|
|
2307
2307
|
} else {
|
|
2308
2308
|
if ($receiver instanceof ArrayIndexCall) {
|
|
2309
|
-
var tmp_1 = $receiver.
|
|
2309
|
+
var tmp_1 = $receiver.xz_1;
|
|
2310
2310
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2311
2311
|
var tmp_2;
|
|
2312
2312
|
var tmp_3;
|
|
2313
2313
|
if (!(lit == null)) {
|
|
2314
2314
|
var tmp_4;
|
|
2315
|
-
var tmp_5 = lit.
|
|
2315
|
+
var tmp_5 = lit.ry_1;
|
|
2316
2316
|
if (tmp_5 instanceof Integer) {
|
|
2317
2317
|
tmp_4 = true;
|
|
2318
2318
|
} else {
|
|
2319
|
-
var tmp_6 = lit.
|
|
2319
|
+
var tmp_6 = lit.ry_1;
|
|
2320
2320
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2321
2321
|
}
|
|
2322
2322
|
tmp_3 = tmp_4;
|
|
@@ -2324,31 +2324,31 @@ function toRawCode($this, $receiver) {
|
|
|
2324
2324
|
tmp_3 = false;
|
|
2325
2325
|
}
|
|
2326
2326
|
if (tmp_3) {
|
|
2327
|
-
tmp_2 = toString_0(lit.
|
|
2327
|
+
tmp_2 = toString_0(lit.qy_1);
|
|
2328
2328
|
} else {
|
|
2329
2329
|
var tmp_7;
|
|
2330
2330
|
if (!(lit == null)) {
|
|
2331
|
-
var tmp_8 = lit.
|
|
2331
|
+
var tmp_8 = lit.ry_1;
|
|
2332
2332
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2333
2333
|
} else {
|
|
2334
2334
|
tmp_7 = false;
|
|
2335
2335
|
}
|
|
2336
2336
|
if (tmp_7) {
|
|
2337
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2337
|
+
tmp_2 = '"' + toString_0(lit.qy_1) + '"';
|
|
2338
2338
|
} else {
|
|
2339
|
-
tmp_2 = toRawCode($this, $receiver.
|
|
2339
|
+
tmp_2 = toRawCode($this, $receiver.xz_1);
|
|
2340
2340
|
}
|
|
2341
2341
|
}
|
|
2342
2342
|
var idx = tmp_2;
|
|
2343
|
-
tmp = toRawCode($this, $receiver.
|
|
2343
|
+
tmp = toRawCode($this, $receiver.wz_1) + '[' + idx + ']';
|
|
2344
2344
|
} else {
|
|
2345
2345
|
if ($receiver instanceof ConstructorStatement) {
|
|
2346
|
-
var tmp_9 = $receiver.
|
|
2346
|
+
var tmp_9 = $receiver.dv_1;
|
|
2347
2347
|
var tmp3_safe_receiver = tmp_9 instanceof Custom ? tmp_9 : null;
|
|
2348
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
2349
|
-
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
2350
|
-
var typeName = tmp5_elvis_lhs == null ? toString_0($receiver.
|
|
2351
|
-
var tmp_10 = $receiver.
|
|
2348
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.qu_1;
|
|
2349
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.zt();
|
|
2350
|
+
var typeName = tmp5_elvis_lhs == null ? toString_0($receiver.dv_1) : tmp5_elvis_lhs;
|
|
2351
|
+
var tmp_10 = $receiver.ev_1.m1();
|
|
2352
2352
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2353
2353
|
var tmp_11;
|
|
2354
2354
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2361,23 +2361,23 @@ function toRawCode($this, $receiver) {
|
|
|
2361
2361
|
} else {
|
|
2362
2362
|
if ($receiver instanceof Literal_0) {
|
|
2363
2363
|
var tmp_12;
|
|
2364
|
-
var tmp_13 = $receiver.
|
|
2364
|
+
var tmp_13 = $receiver.ry_1;
|
|
2365
2365
|
if (tmp_13 instanceof String_1) {
|
|
2366
|
-
tmp_12 = 'String::from("' + toString_0($receiver.
|
|
2366
|
+
tmp_12 = 'String::from("' + toString_0($receiver.qy_1) + '")';
|
|
2367
2367
|
} else {
|
|
2368
|
-
var tmp_14 = $receiver.
|
|
2368
|
+
var tmp_14 = $receiver.ry_1;
|
|
2369
2369
|
if (tmp_14 instanceof Boolean_0) {
|
|
2370
|
-
tmp_12 = toString_0($receiver.
|
|
2370
|
+
tmp_12 = toString_0($receiver.qy_1);
|
|
2371
2371
|
} else {
|
|
2372
|
-
var tmp_15 = $receiver.
|
|
2372
|
+
var tmp_15 = $receiver.ry_1;
|
|
2373
2373
|
if (tmp_15 instanceof Integer) {
|
|
2374
|
-
tmp_12 = toString_0($receiver.
|
|
2374
|
+
tmp_12 = toString_0($receiver.qy_1);
|
|
2375
2375
|
} else {
|
|
2376
|
-
var tmp_16 = $receiver.
|
|
2376
|
+
var tmp_16 = $receiver.ry_1;
|
|
2377
2377
|
if (tmp_16 instanceof Number_0) {
|
|
2378
|
-
tmp_12 = toString_0($receiver.
|
|
2378
|
+
tmp_12 = toString_0($receiver.qy_1);
|
|
2379
2379
|
} else {
|
|
2380
|
-
tmp_12 = toString_0($receiver.
|
|
2380
|
+
tmp_12 = toString_0($receiver.qy_1);
|
|
2381
2381
|
}
|
|
2382
2382
|
}
|
|
2383
2383
|
}
|
|
@@ -2385,7 +2385,7 @@ function toRawCode($this, $receiver) {
|
|
|
2385
2385
|
tmp = tmp_12;
|
|
2386
2386
|
} else {
|
|
2387
2387
|
if ($receiver instanceof RawExpression) {
|
|
2388
|
-
tmp = $receiver.
|
|
2388
|
+
tmp = $receiver.iy_1;
|
|
2389
2389
|
} else {
|
|
2390
2390
|
// Inline function 'kotlin.error' call
|
|
2391
2391
|
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression($receiver).o();
|
|
@@ -2431,11 +2431,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2431
2431
|
var tmp;
|
|
2432
2432
|
if (element instanceof Interface) {
|
|
2433
2433
|
var tmp_0;
|
|
2434
|
-
if (element.
|
|
2434
|
+
if (element.tv_1.equals(Companion_getInstance().wt('Call'))) {
|
|
2435
2435
|
tmp_0 = element;
|
|
2436
2436
|
} else {
|
|
2437
2437
|
// Inline function 'kotlin.collections.map' call
|
|
2438
|
-
var this_0 = element.
|
|
2438
|
+
var this_0 = element.uv_1;
|
|
2439
2439
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2440
2440
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2441
2441
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2451,7 +2451,7 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2451
2451
|
destination.x(tmp$ret$2);
|
|
2452
2452
|
}
|
|
2453
2453
|
var borrowed = destination;
|
|
2454
|
-
tmp_0 = transformChildren_0(element.
|
|
2454
|
+
tmp_0 = transformChildren_0(element.bw(VOID, borrowed), tr);
|
|
2455
2455
|
}
|
|
2456
2456
|
tmp = tmp_0;
|
|
2457
2457
|
} else {
|
|
@@ -2467,13 +2467,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2467
2467
|
var tmp;
|
|
2468
2468
|
var tmp_0;
|
|
2469
2469
|
if (s instanceof FunctionCall) {
|
|
2470
|
-
tmp_0 = RustTransform_getInstance().
|
|
2470
|
+
tmp_0 = RustTransform_getInstance().g21_1.i1(s.eu_1.au());
|
|
2471
2471
|
} else {
|
|
2472
2472
|
tmp_0 = false;
|
|
2473
2473
|
}
|
|
2474
2474
|
if (tmp_0) {
|
|
2475
2475
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2476
|
-
var this_0 = s.
|
|
2476
|
+
var this_0 = s.fu_1.m1();
|
|
2477
2477
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2478
2478
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2479
2479
|
var index = 0;
|
|
@@ -2484,16 +2484,16 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2484
2484
|
index = _unary__edvuaz + 1 | 0;
|
|
2485
2485
|
var idx = checkIndexOverflow(_unary__edvuaz);
|
|
2486
2486
|
// Inline function 'kotlin.collections.component1' call
|
|
2487
|
-
var key = item.
|
|
2487
|
+
var key = item.n1();
|
|
2488
2488
|
// Inline function 'kotlin.collections.component2' call
|
|
2489
|
-
var value = item.
|
|
2490
|
-
var transformed = t.
|
|
2489
|
+
var value = item.o1();
|
|
2490
|
+
var transformed = t.p17(value);
|
|
2491
2491
|
var tmp_1;
|
|
2492
2492
|
var tmp_2;
|
|
2493
2493
|
if (idx === 0) {
|
|
2494
2494
|
var tmp_3;
|
|
2495
2495
|
if (transformed instanceof VariableReference) {
|
|
2496
|
-
tmp_3 = transformed.
|
|
2496
|
+
tmp_3 = transformed.gv_1.xt() === 'it';
|
|
2497
2497
|
} else {
|
|
2498
2498
|
tmp_3 = false;
|
|
2499
2499
|
}
|
|
@@ -2510,20 +2510,20 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2510
2510
|
destination.x(tmp$ret$2);
|
|
2511
2511
|
}
|
|
2512
2512
|
var newArgs = toMap(destination);
|
|
2513
|
-
tmp = s.
|
|
2513
|
+
tmp = s.iu(VOID, VOID, VOID, newArgs);
|
|
2514
2514
|
} else {
|
|
2515
2515
|
tmp = transformChildren(s, t);
|
|
2516
2516
|
}
|
|
2517
2517
|
return tmp;
|
|
2518
2518
|
}
|
|
2519
2519
|
function RustTransform$rustName$lambda(it) {
|
|
2520
|
-
return RustTransform_getInstance().
|
|
2520
|
+
return RustTransform_getInstance().i21(it);
|
|
2521
2521
|
}
|
|
2522
2522
|
function RustTransform$rustName$lambda_0(it) {
|
|
2523
|
-
return RustTransform_getInstance().
|
|
2523
|
+
return RustTransform_getInstance().i21(it);
|
|
2524
2524
|
}
|
|
2525
2525
|
function RustTransform$toRawCode$lambda(it) {
|
|
2526
|
-
return it.
|
|
2526
|
+
return it.n1().au() + ': ' + toRawCode(RustTransform_getInstance(), it.o1());
|
|
2527
2527
|
}
|
|
2528
2528
|
function RustTransform() {
|
|
2529
2529
|
RustTransform_instance = this;
|
|
@@ -2531,57 +2531,57 @@ function RustTransform() {
|
|
|
2531
2531
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2532
2532
|
// Inline function 'kotlin.apply' call
|
|
2533
2533
|
var this_0 = new TransformerBuilder();
|
|
2534
|
-
this_0.
|
|
2535
|
-
tmp.
|
|
2534
|
+
this_0.a18(RustTransform$primitivesToCustom$lambda);
|
|
2535
|
+
tmp.d21_1 = this_0.j18();
|
|
2536
2536
|
var tmp_0 = this;
|
|
2537
2537
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2538
2538
|
// Inline function 'kotlin.apply' call
|
|
2539
2539
|
var this_1 = new TransformerBuilder();
|
|
2540
|
-
this_1.
|
|
2541
|
-
tmp_0.
|
|
2540
|
+
this_1.o18(RustTransform$borrow$lambda);
|
|
2541
|
+
tmp_0.e21_1 = this_1.j18();
|
|
2542
2542
|
var tmp_1 = this;
|
|
2543
2543
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2544
2544
|
// Inline function 'kotlin.apply' call
|
|
2545
|
-
tmp_1.
|
|
2546
|
-
this.
|
|
2545
|
+
tmp_1.f21_1 = (new TransformerBuilder()).j18();
|
|
2546
|
+
this.g21_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2547
2547
|
var tmp_2 = this;
|
|
2548
2548
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2549
2549
|
// Inline function 'kotlin.apply' call
|
|
2550
2550
|
var this_2 = new TransformerBuilder();
|
|
2551
|
-
this_2.
|
|
2552
|
-
tmp_2.
|
|
2551
|
+
this_2.m18(RustTransform$serializationArgs$lambda);
|
|
2552
|
+
tmp_2.h21_1 = this_2.j18();
|
|
2553
2553
|
}
|
|
2554
|
-
protoOf(RustTransform).
|
|
2554
|
+
protoOf(RustTransform).j21 = function (element) {
|
|
2555
2555
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2556
2556
|
var scope = new TransformScope(element);
|
|
2557
|
-
scope.
|
|
2558
|
-
var tmp = scope.
|
|
2557
|
+
scope.z17(RustTransform_getInstance().d21_1);
|
|
2558
|
+
var tmp = scope.u17_1;
|
|
2559
2559
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2560
2560
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2561
2561
|
var scope_0 = new TransformScope(this_0);
|
|
2562
|
-
scope_0.
|
|
2563
|
-
var tmp_0 = scope_0.
|
|
2562
|
+
scope_0.z17(RustTransform_getInstance().e21_1);
|
|
2563
|
+
var tmp_0 = scope_0.u17_1;
|
|
2564
2564
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2565
2565
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2566
2566
|
var scope_1 = new TransformScope(this_1);
|
|
2567
|
-
scope_1.
|
|
2568
|
-
var tmp_1 = scope_1.
|
|
2567
|
+
scope_1.z17(RustTransform_getInstance().f21_1);
|
|
2568
|
+
var tmp_1 = scope_1.u17_1;
|
|
2569
2569
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2570
2570
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2571
2571
|
var scope_2 = new TransformScope(this_2);
|
|
2572
|
-
scope_2.
|
|
2573
|
-
var tmp_2 = scope_2.
|
|
2572
|
+
scope_2.z17(RustTransform_getInstance().h21_1);
|
|
2573
|
+
var tmp_2 = scope_2.u17_1;
|
|
2574
2574
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2575
2575
|
};
|
|
2576
|
-
protoOf(RustTransform).
|
|
2576
|
+
protoOf(RustTransform).i21 = function (_this__u8e3s4) {
|
|
2577
2577
|
var tmp;
|
|
2578
2578
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2579
|
-
var pascalName = _this__u8e3s4.
|
|
2579
|
+
var pascalName = _this__u8e3s4.qu_1.zt();
|
|
2580
2580
|
var tmp_0;
|
|
2581
|
-
if (_this__u8e3s4.
|
|
2581
|
+
if (_this__u8e3s4.ru_1.r()) {
|
|
2582
2582
|
tmp_0 = pascalName;
|
|
2583
2583
|
} else {
|
|
2584
|
-
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.
|
|
2584
|
+
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.ru_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda) + '>';
|
|
2585
2585
|
}
|
|
2586
2586
|
tmp = tmp_0;
|
|
2587
2587
|
} else {
|
|
@@ -2589,13 +2589,13 @@ protoOf(RustTransform).l20 = function (_this__u8e3s4) {
|
|
|
2589
2589
|
tmp = 'String';
|
|
2590
2590
|
} else {
|
|
2591
2591
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2592
|
-
tmp = 'Option<' + this.
|
|
2592
|
+
tmp = 'Option<' + this.i21(_this__u8e3s4.uu_1) + '>';
|
|
2593
2593
|
} else {
|
|
2594
2594
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2595
|
-
tmp = 'Vec<' + this.
|
|
2595
|
+
tmp = 'Vec<' + this.i21(_this__u8e3s4.lu_1) + '>';
|
|
2596
2596
|
} else {
|
|
2597
2597
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2598
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2598
|
+
tmp = 'std::collections::HashMap<' + this.i21(_this__u8e3s4.nu_1) + ', ' + this.i21(_this__u8e3s4.ou_1) + '>';
|
|
2599
2599
|
} else {
|
|
2600
2600
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2601
2601
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2617,7 +2617,7 @@ protoOf(RustTransform).l20 = function (_this__u8e3s4) {
|
|
|
2617
2617
|
} else {
|
|
2618
2618
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2619
2619
|
var tmp_1;
|
|
2620
|
-
switch (_this__u8e3s4.
|
|
2620
|
+
switch (_this__u8e3s4.ju_1.e3_1) {
|
|
2621
2621
|
case 0:
|
|
2622
2622
|
tmp_1 = 'i32';
|
|
2623
2623
|
break;
|
|
@@ -2632,7 +2632,7 @@ protoOf(RustTransform).l20 = function (_this__u8e3s4) {
|
|
|
2632
2632
|
} else {
|
|
2633
2633
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2634
2634
|
var tmp_2;
|
|
2635
|
-
switch (_this__u8e3s4.
|
|
2635
|
+
switch (_this__u8e3s4.ku_1.e3_1) {
|
|
2636
2636
|
case 0:
|
|
2637
2637
|
tmp_2 = 'f32';
|
|
2638
2638
|
break;
|
|
@@ -2652,7 +2652,7 @@ protoOf(RustTransform).l20 = function (_this__u8e3s4) {
|
|
|
2652
2652
|
tmp = 'String';
|
|
2653
2653
|
} else {
|
|
2654
2654
|
if (_this__u8e3s4 instanceof Function) {
|
|
2655
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2655
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.xu_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.i21(_this__u8e3s4.yu_1) + '>';
|
|
2656
2656
|
} else {
|
|
2657
2657
|
noWhenBranchMatchedException();
|
|
2658
2658
|
}
|
|
@@ -2673,27 +2673,27 @@ protoOf(RustTransform).l20 = function (_this__u8e3s4) {
|
|
|
2673
2673
|
}
|
|
2674
2674
|
return tmp;
|
|
2675
2675
|
};
|
|
2676
|
-
protoOf(RustTransform).
|
|
2676
|
+
protoOf(RustTransform).n21 = function (_this__u8e3s4) {
|
|
2677
2677
|
var tmp;
|
|
2678
2678
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2679
2679
|
// Inline function 'kotlin.let' call
|
|
2680
|
-
var it = _this__u8e3s4.
|
|
2680
|
+
var it = _this__u8e3s4.qu_1.zt();
|
|
2681
2681
|
tmp = startsWith(it, '&') || startsWith(it, '&dyn ') || startsWith(it, '&impl ') || startsWith(it, '&mut ');
|
|
2682
2682
|
} else {
|
|
2683
2683
|
tmp = false;
|
|
2684
2684
|
}
|
|
2685
2685
|
return tmp;
|
|
2686
2686
|
};
|
|
2687
|
-
protoOf(RustTransform).
|
|
2687
|
+
protoOf(RustTransform).m21 = function (_this__u8e3s4) {
|
|
2688
2688
|
// Inline function 'kotlin.let' call
|
|
2689
|
-
var it = _this__u8e3s4.
|
|
2689
|
+
var it = _this__u8e3s4.qu_1.zt();
|
|
2690
2690
|
return it === 'Serializer' || it === 'Deserializer';
|
|
2691
2691
|
};
|
|
2692
|
-
protoOf(RustTransform).
|
|
2693
|
-
return _this__u8e3s4.
|
|
2692
|
+
protoOf(RustTransform).l21 = function (_this__u8e3s4) {
|
|
2693
|
+
return _this__u8e3s4.qu_1.zt() === 'GeneratorField';
|
|
2694
2694
|
};
|
|
2695
|
-
protoOf(RustTransform).
|
|
2696
|
-
var v = _this__u8e3s4.
|
|
2695
|
+
protoOf(RustTransform).k21 = function (_this__u8e3s4) {
|
|
2696
|
+
var v = _this__u8e3s4.xt();
|
|
2697
2697
|
switch (v) {
|
|
2698
2698
|
case 'self':
|
|
2699
2699
|
case '&self':
|
|
@@ -2709,22 +2709,22 @@ function RustTransform_getInstance() {
|
|
|
2709
2709
|
return RustTransform_instance;
|
|
2710
2710
|
}
|
|
2711
2711
|
function borrow(_this__u8e3s4) {
|
|
2712
|
-
return _this__u8e3s4.
|
|
2712
|
+
return _this__u8e3s4.tu(new Name(listOf('&' + _this__u8e3s4.qu_1.zt())));
|
|
2713
2713
|
}
|
|
2714
2714
|
function borrowDyn(_this__u8e3s4) {
|
|
2715
|
-
return _this__u8e3s4.
|
|
2715
|
+
return _this__u8e3s4.tu(new Name(listOf('&dyn ' + _this__u8e3s4.qu_1.zt())));
|
|
2716
2716
|
}
|
|
2717
2717
|
function borrowImpl(_this__u8e3s4) {
|
|
2718
|
-
return _this__u8e3s4.
|
|
2718
|
+
return _this__u8e3s4.tu(new Name(listOf('&impl ' + _this__u8e3s4.qu_1.zt())));
|
|
2719
2719
|
}
|
|
2720
2720
|
function ownedImpl(_this__u8e3s4) {
|
|
2721
|
-
return _this__u8e3s4.
|
|
2721
|
+
return _this__u8e3s4.tu(new Name(listOf('impl ' + _this__u8e3s4.qu_1.zt())));
|
|
2722
2722
|
}
|
|
2723
2723
|
//region block: post-declaration
|
|
2724
|
-
protoOf(RustEmitter).
|
|
2725
|
-
protoOf(RustEmitter).
|
|
2726
|
-
protoOf(RustEmitter).
|
|
2727
|
-
protoOf(RustEmitter).
|
|
2724
|
+
protoOf(RustEmitter).e1a = get_extensions;
|
|
2725
|
+
protoOf(RustEmitter).to = emit_1;
|
|
2726
|
+
protoOf(RustEmitter).g1a = beforeGenerate;
|
|
2727
|
+
protoOf(RustEmitter).vp = get_supportsDefaults;
|
|
2728
2728
|
//endregion
|
|
2729
2729
|
//region block: exports
|
|
2730
2730
|
export {
|