@flock/wirespec 0.22.5 → 0.22.7
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 +11 -11
- package/arrow-arrow-core.mjs +157 -157
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1528 -1527
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +444 -444
- package/kotlin-kotlin-stdlib.mjs +1780 -1757
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10202 -10202
- package/kotlin-rgxgen.mjs +1812 -1812
- package/kotlinx-io-kotlinx-io-core.mjs +435 -435
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1848 -1848
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1576 -1576
- package/mordant-mordant.mjs +1322 -1322
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +7497 -7034
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +198 -214
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +164 -175
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +185 -198
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +425 -439
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +197 -207
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +234 -360
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +179 -199
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +282 -282
- package/wirespec-src-converter-asyncapi.mjs +861 -779
- package/wirespec-src-converter-asyncapi.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +603 -602
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +18 -18
- package/wirespec-src-converter-graphql.mjs +1070 -1070
- package/wirespec-src-converter-openapi.mjs +792 -680
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1383 -1383
- package/wirespec-src-plugin-arguments.mjs +207 -201
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +156 -159
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-extensions.mjs +1828 -1275
- package/wirespec-src-plugin-extensions.mjs.map +1 -1
- package/wirespec-src-plugin-npm.mjs +54 -54
- package/wirespec-src-tools-generator.mjs +32 -32
|
@@ -64,7 +64,6 @@ import {
|
|
|
64
64
|
toListx6x8nvfmvvht as toList,
|
|
65
65
|
LinkedHashSet_init_$Create$t7gzf3ihb6pk as LinkedHashSet_init_$Create$,
|
|
66
66
|
distinct10qe1scfdvu5k as distinct_0,
|
|
67
|
-
toSet2orjxp16sotqu as toSet,
|
|
68
67
|
HashSet_init_$Create$2w31ptb4ree5i as HashSet_init_$Create$,
|
|
69
68
|
Regex_init_$Create$17zqsmfd15n8x as Regex_init_$Create$,
|
|
70
69
|
trimIndent1qytc1wvt8suh as trimIndent,
|
|
@@ -138,16 +137,14 @@ import {
|
|
|
138
137
|
sanitizeNames1v55mz1p84psg as sanitizeNames,
|
|
139
138
|
collectCustomTypeNames2atsrip288ol4 as collectCustomTypeNames,
|
|
140
139
|
plus14o24vdaiongg as plus_2,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
injectSelfReceiverToValidate17yidn7t1g367 as injectSelfReceiverToValidate,
|
|
144
|
-
convert1ke01d6gmcvu7 as convert_0,
|
|
140
|
+
convert23o50n5glj7h5 as convert_0,
|
|
141
|
+
convert1ke01d6gmcvu7 as convert_1,
|
|
145
142
|
sanitizeEnumEntries28cw6g8cmlq5s as sanitizeEnumEntries,
|
|
146
|
-
convert29zpebhuxz599 as
|
|
147
|
-
convert39lmqftdnlhsy as
|
|
148
|
-
convert333pgxr2q05n as
|
|
149
|
-
convert86y6uioox2cl as
|
|
150
|
-
convert1o5h4ulxoqycg as
|
|
143
|
+
convert29zpebhuxz599 as convert_2,
|
|
144
|
+
convert39lmqftdnlhsy as convert_3,
|
|
145
|
+
convert333pgxr2q05n as convert_4,
|
|
146
|
+
convert86y6uioox2cl as convert_5,
|
|
147
|
+
convert1o5h4ulxoqycg as convert_6,
|
|
151
148
|
importReferencesy4xv7r53sjjs as importReferences,
|
|
152
149
|
get_extensions1p1y8uybwv35q as get_extensions,
|
|
153
150
|
emit2s9bv7yrx5jcs as emit_1,
|
|
@@ -194,7 +191,7 @@ initMetadataForClass(RustEmitter, 'RustEmitter', RustEmitter, VOID, [IrEmitter])
|
|
|
194
191
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
195
192
|
//endregion
|
|
196
193
|
function _get_sanitizationConfig__sns434($this) {
|
|
197
|
-
var tmp0 = $this.
|
|
194
|
+
var tmp0 = $this.q38_1;
|
|
198
195
|
var tmp = KProperty1;
|
|
199
196
|
// Inline function 'kotlin.getValue' call
|
|
200
197
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustEmitter$_get_sanitizationConfig_$ref_1dtj2x(), null);
|
|
@@ -211,7 +208,7 @@ function sanitize($this, $receiver) {
|
|
|
211
208
|
var item = _iterator__ex2g4s.v();
|
|
212
209
|
var _unary__edvuaz = index;
|
|
213
210
|
index = _unary__edvuaz + 1 | 0;
|
|
214
|
-
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
211
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.zr(item) : item;
|
|
215
212
|
destination.x(tmp$ret$2);
|
|
216
213
|
}
|
|
217
214
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -258,14 +255,14 @@ function sanitize($this, $receiver) {
|
|
|
258
255
|
return toSnakeCase($this, tmp$ret$8);
|
|
259
256
|
}
|
|
260
257
|
function toSnakeCase($this, $receiver) {
|
|
261
|
-
return Companion_getInstance().
|
|
258
|
+
return Companion_getInstance().au($receiver).eu();
|
|
262
259
|
}
|
|
263
260
|
function toPascalCase($this, $receiver) {
|
|
264
261
|
var tmp = split($receiver, ['_']);
|
|
265
262
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustEmitter$toPascalCase$lambda);
|
|
266
263
|
}
|
|
267
264
|
function sanitizeKeywords($this, $receiver) {
|
|
268
|
-
return Companion_getInstance_0().
|
|
265
|
+
return Companion_getInstance_0().n37().i1($receiver) ? 'r#' + $receiver : $receiver;
|
|
269
266
|
}
|
|
270
267
|
function sanitizeEnum($this, $receiver) {
|
|
271
268
|
// Inline function 'kotlin.let' call
|
|
@@ -290,7 +287,7 @@ function prependImports($this, $receiver, imports) {
|
|
|
290
287
|
var tmp;
|
|
291
288
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
292
289
|
if (!imports.r()) {
|
|
293
|
-
tmp = $receiver.
|
|
290
|
+
tmp = $receiver.jv(VOID, plus(imports, $receiver.gv_1));
|
|
294
291
|
} else {
|
|
295
292
|
tmp = $receiver;
|
|
296
293
|
}
|
|
@@ -302,7 +299,7 @@ function containsWildcard($this, type) {
|
|
|
302
299
|
tmp = true;
|
|
303
300
|
} else {
|
|
304
301
|
if (type instanceof Custom) {
|
|
305
|
-
var tmp0 = type.
|
|
302
|
+
var tmp0 = type.su_1;
|
|
306
303
|
var tmp$ret$0;
|
|
307
304
|
$l$block_0: {
|
|
308
305
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -329,13 +326,13 @@ function containsWildcard($this, type) {
|
|
|
329
326
|
tmp = tmp$ret$0;
|
|
330
327
|
} else {
|
|
331
328
|
if (type instanceof Nullable) {
|
|
332
|
-
tmp = containsWildcard($this, type.
|
|
329
|
+
tmp = containsWildcard($this, type.vu_1);
|
|
333
330
|
} else {
|
|
334
331
|
if (type instanceof Array_0) {
|
|
335
|
-
tmp = containsWildcard($this, type.
|
|
332
|
+
tmp = containsWildcard($this, type.mu_1);
|
|
336
333
|
} else {
|
|
337
334
|
if (type instanceof Dict) {
|
|
338
|
-
tmp = containsWildcard($this, type.
|
|
335
|
+
tmp = containsWildcard($this, type.ou_1) || containsWildcard($this, type.pu_1);
|
|
339
336
|
} else {
|
|
340
337
|
tmp = false;
|
|
341
338
|
}
|
|
@@ -357,7 +354,7 @@ function containsUnderiveable($this, type) {
|
|
|
357
354
|
tmp = true;
|
|
358
355
|
} else {
|
|
359
356
|
if (type instanceof Custom) {
|
|
360
|
-
var tmp0 = type.
|
|
357
|
+
var tmp0 = type.su_1;
|
|
361
358
|
var tmp$ret$0;
|
|
362
359
|
$l$block_0: {
|
|
363
360
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -384,13 +381,13 @@ function containsUnderiveable($this, type) {
|
|
|
384
381
|
tmp = tmp$ret$0;
|
|
385
382
|
} else {
|
|
386
383
|
if (type instanceof Nullable) {
|
|
387
|
-
tmp = containsUnderiveable($this, type.
|
|
384
|
+
tmp = containsUnderiveable($this, type.vu_1);
|
|
388
385
|
} else {
|
|
389
386
|
if (type instanceof Array_0) {
|
|
390
|
-
tmp = containsUnderiveable($this, type.
|
|
387
|
+
tmp = containsUnderiveable($this, type.mu_1);
|
|
391
388
|
} else {
|
|
392
389
|
if (type instanceof Dict) {
|
|
393
|
-
tmp = containsUnderiveable($this, type.
|
|
390
|
+
tmp = containsUnderiveable($this, type.ou_1) || containsUnderiveable($this, type.pu_1);
|
|
394
391
|
} else {
|
|
395
392
|
tmp = false;
|
|
396
393
|
}
|
|
@@ -416,10 +413,10 @@ function buildClientParams($this, $receiver) {
|
|
|
416
413
|
}
|
|
417
414
|
function Companion() {
|
|
418
415
|
Companion_instance_2 = this;
|
|
419
|
-
this.
|
|
416
|
+
this.t38_1 = RustGenerator_getInstance();
|
|
420
417
|
}
|
|
421
|
-
protoOf(Companion).
|
|
422
|
-
return this.
|
|
418
|
+
protoOf(Companion).n37 = function () {
|
|
419
|
+
return this.t38_1.r1c_1;
|
|
423
420
|
};
|
|
424
421
|
var Companion_instance_2;
|
|
425
422
|
function Companion_getInstance_0() {
|
|
@@ -428,23 +425,23 @@ function Companion_getInstance_0() {
|
|
|
428
425
|
return Companion_instance_2;
|
|
429
426
|
}
|
|
430
427
|
function sam$kotlin_Comparator$0(function_0) {
|
|
431
|
-
this.
|
|
428
|
+
this.u38_1 = function_0;
|
|
432
429
|
}
|
|
433
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
434
|
-
return this.
|
|
430
|
+
protoOf(sam$kotlin_Comparator$0).zd = function (a, b) {
|
|
431
|
+
return this.u38_1(a, b);
|
|
435
432
|
};
|
|
436
433
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
437
|
-
return this.
|
|
434
|
+
return this.zd(a, b);
|
|
438
435
|
};
|
|
439
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
440
|
-
return this.
|
|
436
|
+
protoOf(sam$kotlin_Comparator$0).p3 = function () {
|
|
437
|
+
return this.u38_1;
|
|
441
438
|
};
|
|
442
439
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
443
440
|
var tmp;
|
|
444
441
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
445
442
|
var tmp_0;
|
|
446
443
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
447
|
-
tmp_0 = equals(this.
|
|
444
|
+
tmp_0 = equals(this.p3(), other.p3());
|
|
448
445
|
} else {
|
|
449
446
|
tmp_0 = false;
|
|
450
447
|
}
|
|
@@ -455,22 +452,22 @@ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
|
455
452
|
return tmp;
|
|
456
453
|
};
|
|
457
454
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
458
|
-
return hashCode(this.
|
|
455
|
+
return hashCode(this.p3());
|
|
459
456
|
};
|
|
460
457
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
461
458
|
return 'r#' + it;
|
|
462
459
|
}
|
|
463
460
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
464
|
-
return Companion_getInstance().
|
|
461
|
+
return Companion_getInstance().au((new Name(name.yt_1)).eu());
|
|
465
462
|
}
|
|
466
463
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
467
|
-
var value = name.
|
|
464
|
+
var value = name.bu();
|
|
468
465
|
switch (value) {
|
|
469
466
|
case 'self':
|
|
470
467
|
case '&self':
|
|
471
468
|
return name;
|
|
472
469
|
default:
|
|
473
|
-
return Companion_getInstance().
|
|
470
|
+
return Companion_getInstance().au((new Name(name.yt_1)).eu());
|
|
474
471
|
}
|
|
475
472
|
}
|
|
476
473
|
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
@@ -494,11 +491,11 @@ function RustEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
494
491
|
return function (stmt, tr) {
|
|
495
492
|
var tmp;
|
|
496
493
|
if (stmt instanceof ConstructorStatement) {
|
|
497
|
-
var tmp_0 = tr.
|
|
494
|
+
var tmp_0 = tr.w18(stmt.gu_1);
|
|
498
495
|
// Inline function 'kotlin.collections.map' call
|
|
499
|
-
var this_0 = stmt.
|
|
496
|
+
var this_0 = stmt.hu_1;
|
|
500
497
|
// Inline function 'kotlin.collections.mapTo' call
|
|
501
|
-
var destination = ArrayList_init_$Create$(this_0.
|
|
498
|
+
var destination = ArrayList_init_$Create$(this_0.c1());
|
|
502
499
|
// Inline function 'kotlin.collections.iterator' call
|
|
503
500
|
var _iterator__ex2g4s = this_0.m1().t();
|
|
504
501
|
while (_iterator__ex2g4s.u()) {
|
|
@@ -507,7 +504,7 @@ function RustEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
507
504
|
var k = item.n1();
|
|
508
505
|
// Inline function 'kotlin.collections.component2' call
|
|
509
506
|
var v = item.o1();
|
|
510
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
507
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.z18(v));
|
|
511
508
|
destination.x(tmp$ret$3);
|
|
512
509
|
}
|
|
513
510
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -519,7 +516,7 @@ function RustEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
519
516
|
}
|
|
520
517
|
function RustEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
521
518
|
return function () {
|
|
522
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
519
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().n37(), setOf(['self', 'Self']));
|
|
523
520
|
var tmp = RustEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
524
521
|
var tmp_0 = RustEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
525
522
|
var tmp_1 = RustEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -533,69 +530,69 @@ function RustEmitter$_get_sanitizationConfig_$ref_1dtj2x() {
|
|
|
533
530
|
};
|
|
534
531
|
}
|
|
535
532
|
function RustEmitter$emitShared$lambda($this$interface) {
|
|
536
|
-
$this$interface.
|
|
533
|
+
$this$interface.o17(Custom_init_$Create$('Headers'));
|
|
537
534
|
return Unit_instance;
|
|
538
535
|
}
|
|
539
536
|
function RustEmitter$emitShared$lambda_0($this$interface) {
|
|
540
|
-
$this$interface.
|
|
537
|
+
$this$interface.o17(Custom_init_$Create$('Headers'));
|
|
541
538
|
return Unit_instance;
|
|
542
539
|
}
|
|
543
540
|
function RustEmitter$emitShared$lambda_1($this$interface) {
|
|
544
|
-
$this$interface.
|
|
545
|
-
$this$interface.
|
|
546
|
-
$this$interface.
|
|
541
|
+
$this$interface.o17(Custom_init_$Create$('Sized'));
|
|
542
|
+
$this$interface.k16('label', VOID, VOID, RustEmitter$emitShared$lambda$lambda);
|
|
543
|
+
$this$interface.k16('from_label', true, VOID, RustEmitter$emitShared$lambda$lambda_0);
|
|
547
544
|
return Unit_instance;
|
|
548
545
|
}
|
|
549
546
|
function RustEmitter$emitShared$lambda$lambda($this$function) {
|
|
550
|
-
$this$function.
|
|
551
|
-
$this$function.
|
|
547
|
+
$this$function.a14('&self', Custom_init_$Create$(''));
|
|
548
|
+
$this$function.x13(Custom_init_$Create$('&str'));
|
|
552
549
|
return Unit_instance;
|
|
553
550
|
}
|
|
554
551
|
function RustEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
555
|
-
$this$function.
|
|
556
|
-
$this$function.
|
|
552
|
+
$this$function.a14('s', Custom_init_$Create$('&str'));
|
|
553
|
+
$this$function.x13(Custom_init_$Create$('Option<Self>'));
|
|
557
554
|
return Unit_instance;
|
|
558
555
|
}
|
|
559
556
|
function RustEmitter$emitShared$lambda_2($this$interface) {
|
|
560
|
-
$this$interface.
|
|
561
|
-
$this$interface.
|
|
562
|
-
$this$interface.
|
|
557
|
+
$this$interface.w13($this$interface.e15('T', []), []);
|
|
558
|
+
$this$interface.k16('value', VOID, VOID, RustEmitter$emitShared$lambda$lambda_1);
|
|
559
|
+
$this$interface.k16('validate', VOID, VOID, RustEmitter$emitShared$lambda$lambda_2);
|
|
563
560
|
return Unit_instance;
|
|
564
561
|
}
|
|
565
562
|
function RustEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
566
|
-
$this$function.
|
|
567
|
-
$this$function.
|
|
563
|
+
$this$function.a14('&self', Custom_init_$Create$(''));
|
|
564
|
+
$this$function.x13(borrow($this$function.e15('T', [])));
|
|
568
565
|
return Unit_instance;
|
|
569
566
|
}
|
|
570
567
|
function RustEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
571
|
-
$this$function.
|
|
572
|
-
$this$function.
|
|
568
|
+
$this$function.a14('&self', Custom_init_$Create$(''));
|
|
569
|
+
$this$function.x13($this$function.y14());
|
|
573
570
|
return Unit_instance;
|
|
574
571
|
}
|
|
575
572
|
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.
|
|
573
|
+
$this$interface.w13($this$interface.e15('T', []), []);
|
|
574
|
+
$this$interface.p17('path', borrowDyn($this$interface.e15('Path', [])));
|
|
575
|
+
$this$interface.p17('method', borrow($this$interface.e15('Method', [])));
|
|
576
|
+
$this$interface.p17('queries', borrowDyn($this$interface.e15('Queries', [])));
|
|
577
|
+
$this$interface.p17('headers', borrowDyn($this$interface.e15('RequestHeaders', [])));
|
|
578
|
+
$this$interface.p17('body', borrow($this$interface.e15('T', [])));
|
|
582
579
|
return Unit_instance;
|
|
583
580
|
}
|
|
584
581
|
function RustEmitter$emitShared$lambda_4($this$interface) {
|
|
585
|
-
$this$interface.
|
|
586
|
-
$this$interface.
|
|
587
|
-
$this$interface.
|
|
588
|
-
$this$interface.
|
|
582
|
+
$this$interface.w13($this$interface.e15('T', []), []);
|
|
583
|
+
$this$interface.p17('status', $this$interface.c17());
|
|
584
|
+
$this$interface.p17('headers', borrowDyn($this$interface.e15('ResponseHeaders', [])));
|
|
585
|
+
$this$interface.p17('body', borrow($this$interface.e15('T', [])));
|
|
589
586
|
return Unit_instance;
|
|
590
587
|
}
|
|
591
588
|
function RustEmitter$emitShared$lambda_5($this$interface) {
|
|
592
|
-
$this$interface.
|
|
589
|
+
$this$interface.o16('transport', VOID, VOID, RustEmitter$emitShared$lambda$lambda_3);
|
|
593
590
|
return Unit_instance;
|
|
594
591
|
}
|
|
595
592
|
function RustEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
596
|
-
$this$asyncFunction.
|
|
597
|
-
$this$asyncFunction.
|
|
598
|
-
$this$asyncFunction.
|
|
593
|
+
$this$asyncFunction.a14('&self', Custom_init_$Create$(''));
|
|
594
|
+
$this$asyncFunction.a14('request', borrow($this$asyncFunction.e15('RawRequest', [])));
|
|
595
|
+
$this$asyncFunction.x13($this$asyncFunction.e15('RawResponse', []));
|
|
599
596
|
return Unit_instance;
|
|
600
597
|
}
|
|
601
598
|
function RustEmitter$emitShared$lambda_6($rustImports) {
|
|
@@ -603,7 +600,7 @@ function RustEmitter$emitShared$lambda_6($rustImports) {
|
|
|
603
600
|
var tmp;
|
|
604
601
|
if (element instanceof File) {
|
|
605
602
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
606
|
-
var tmp0 = element.
|
|
603
|
+
var tmp0 = element.gv_1;
|
|
607
604
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
608
605
|
var destination = ArrayList_init_$Create$_0();
|
|
609
606
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -614,7 +611,7 @@ function RustEmitter$emitShared$lambda_6($rustImports) {
|
|
|
614
611
|
}
|
|
615
612
|
}
|
|
616
613
|
var namespace = first(destination);
|
|
617
|
-
tmp = element.
|
|
614
|
+
tmp = element.jv(VOID, plus($rustImports, namespace.mv_1));
|
|
618
615
|
} else {
|
|
619
616
|
tmp = element;
|
|
620
617
|
}
|
|
@@ -626,7 +623,7 @@ function RustEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
626
623
|
var tmp;
|
|
627
624
|
if (element instanceof Enum) {
|
|
628
625
|
var tmp_0;
|
|
629
|
-
if (element.
|
|
626
|
+
if (element.ww_1.equals(Companion_getInstance().au('Method'))) {
|
|
630
627
|
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
628
|
} else {
|
|
632
629
|
tmp_0 = element;
|
|
@@ -643,7 +640,7 @@ function RustEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $responseH
|
|
|
643
640
|
var tmp;
|
|
644
641
|
if (element instanceof File) {
|
|
645
642
|
// Inline function 'kotlin.collections.flatMap' call
|
|
646
|
-
var tmp0 = element.
|
|
643
|
+
var tmp0 = element.gv_1;
|
|
647
644
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
648
645
|
var destination = ArrayList_init_$Create$_0();
|
|
649
646
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -655,30 +652,30 @@ function RustEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $responseH
|
|
|
655
652
|
tmp$ret$3 = listOf(element_0);
|
|
656
653
|
break $l$block;
|
|
657
654
|
}
|
|
658
|
-
var name = element_0.
|
|
655
|
+
var name = element_0.rv_1.du();
|
|
659
656
|
var tmp_0;
|
|
660
657
|
// Inline function 'kotlin.collections.contains' call
|
|
661
658
|
// Inline function 'kotlin.collections.containsKey' call
|
|
662
659
|
var this_0 = $dslTraits;
|
|
663
|
-
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).
|
|
660
|
+
if ((isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).r2(name)) {
|
|
664
661
|
// Inline function 'kotlin.collections.buildList' call
|
|
665
662
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
666
663
|
// Inline function 'kotlin.apply' call
|
|
667
664
|
var this_1 = ArrayList_init_$Create$_0();
|
|
668
|
-
this_1.x(ensureNotNull($dslTraits.
|
|
665
|
+
this_1.x(ensureNotNull($dslTraits.t2(name)));
|
|
669
666
|
if (name === 'Request') {
|
|
670
667
|
this_1.x($requestHeaders);
|
|
671
668
|
}
|
|
672
669
|
if (name === 'Response') {
|
|
673
670
|
this_1.x($responseHeaders);
|
|
674
671
|
}
|
|
675
|
-
tmp_0 = this_1.
|
|
672
|
+
tmp_0 = this_1.r5();
|
|
676
673
|
} else {
|
|
677
674
|
// Inline function 'kotlin.collections.contains' call
|
|
678
675
|
// Inline function 'kotlin.collections.containsKey' call
|
|
679
676
|
var this_2 = $rawElementInterfaces;
|
|
680
|
-
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).
|
|
681
|
-
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.
|
|
677
|
+
if ((isInterface(this_2, KtMap) ? this_2 : THROW_CCE()).r2(name)) {
|
|
678
|
+
tmp_0 = listOf(ensureNotNull($rawElementInterfaces.t2(name)));
|
|
682
679
|
} else {
|
|
683
680
|
tmp_0 = listOf(element_0);
|
|
684
681
|
}
|
|
@@ -689,7 +686,7 @@ function RustEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $responseH
|
|
|
689
686
|
addAll(destination, list);
|
|
690
687
|
}
|
|
691
688
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
692
|
-
tmp = element.
|
|
689
|
+
tmp = element.jv(VOID, newElements);
|
|
693
690
|
} else {
|
|
694
691
|
tmp = element;
|
|
695
692
|
}
|
|
@@ -705,14 +702,14 @@ function RustEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
705
702
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
706
703
|
var tmp_0 = scope;
|
|
707
704
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
708
|
-
var this_0 = scope.
|
|
705
|
+
var this_0 = scope.e19_1;
|
|
709
706
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
710
707
|
// Inline function 'kotlin.apply' call
|
|
711
708
|
var this_1 = new TransformerBuilder();
|
|
712
|
-
this_1.
|
|
713
|
-
var tmp$ret$5 = this_1.
|
|
714
|
-
tmp_0.
|
|
715
|
-
var tmp_1 = scope.
|
|
709
|
+
this_1.y19(RustEmitter$emitShared$lambda$lambda_4);
|
|
710
|
+
var tmp$ret$5 = this_1.t19();
|
|
711
|
+
tmp_0.e19_1 = transform(this_0, tmp$ret$5);
|
|
712
|
+
var tmp_1 = scope.e19_1;
|
|
716
713
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
717
714
|
} else {
|
|
718
715
|
tmp = element;
|
|
@@ -723,7 +720,7 @@ function RustEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
723
720
|
function RustEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
724
721
|
var tmp;
|
|
725
722
|
if (element instanceof Function_0) {
|
|
726
|
-
var tmp0 = element.
|
|
723
|
+
var tmp0 = element.tx_1;
|
|
727
724
|
var tmp$ret$1;
|
|
728
725
|
$l$block_0: {
|
|
729
726
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -740,7 +737,7 @@ function RustEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
740
737
|
var _iterator__ex2g4s = tmp0.t();
|
|
741
738
|
while (_iterator__ex2g4s.u()) {
|
|
742
739
|
var element_0 = _iterator__ex2g4s.v();
|
|
743
|
-
if (element_0.
|
|
740
|
+
if (element_0.oz_1.bu() === '&self' || element_0.oz_1.bu() === 'self') {
|
|
744
741
|
tmp$ret$1 = true;
|
|
745
742
|
break $l$block_0;
|
|
746
743
|
}
|
|
@@ -748,7 +745,7 @@ function RustEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
748
745
|
tmp$ret$1 = false;
|
|
749
746
|
}
|
|
750
747
|
var hasSelf = tmp$ret$1;
|
|
751
|
-
tmp = hasSelf || element.
|
|
748
|
+
tmp = hasSelf || element.xx_1 ? element : element.dy(VOID, VOID, plus(listOf(get_rustSelfParam()), element.tx_1));
|
|
752
749
|
} else {
|
|
753
750
|
tmp = element;
|
|
754
751
|
}
|
|
@@ -759,7 +756,7 @@ function RustEmitter$emitShared$lambda_10(group) {
|
|
|
759
756
|
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
760
757
|
}
|
|
761
758
|
function RustEmitter$emitShared$lambda$lambda_5(it) {
|
|
762
|
-
return RustGenerator_getInstance().
|
|
759
|
+
return RustGenerator_getInstance().m1b(it);
|
|
763
760
|
}
|
|
764
761
|
function RustEmitter$emit$lambda(a, b) {
|
|
765
762
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
@@ -768,7 +765,7 @@ function RustEmitter$emit$lambda(a, b) {
|
|
|
768
765
|
return compareValues(tmp, tmp$ret$2);
|
|
769
766
|
}
|
|
770
767
|
function emit$emitMod(this$0, def) {
|
|
771
|
-
return 'pub mod ' + sanitize(this$0, def.
|
|
768
|
+
return 'pub mod ' + sanitize(this$0, def.es()) + ';';
|
|
772
769
|
}
|
|
773
770
|
function RustEmitter$emit$lambda_0(this$0) {
|
|
774
771
|
return function (it) {
|
|
@@ -797,17 +794,17 @@ function RustEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs) {
|
|
|
797
794
|
var tmp_0;
|
|
798
795
|
var tmp_1;
|
|
799
796
|
if (expr instanceof RawExpression) {
|
|
800
|
-
tmp_1 = endsWith(expr.
|
|
797
|
+
tmp_1 = endsWith(expr.gy_1, 'Generator');
|
|
801
798
|
} else {
|
|
802
799
|
tmp_1 = false;
|
|
803
800
|
}
|
|
804
801
|
if (tmp_1) {
|
|
805
|
-
tmp_0 = !(expr.
|
|
802
|
+
tmp_0 = !(expr.gy_1 === $generatorOwnName);
|
|
806
803
|
} else {
|
|
807
804
|
tmp_0 = false;
|
|
808
805
|
}
|
|
809
806
|
if (tmp_0) {
|
|
810
|
-
$generatorRefs.x(expr.
|
|
807
|
+
$generatorRefs.x(expr.gy_1);
|
|
811
808
|
tmp = Unit_instance;
|
|
812
809
|
}
|
|
813
810
|
return transformChildren_1(expr, t);
|
|
@@ -820,7 +817,7 @@ function RustEmitter$emit$lambda_2(this$0) {
|
|
|
820
817
|
}
|
|
821
818
|
function RustEmitter$emitClient$lambda(this$0) {
|
|
822
819
|
return function (endpoint) {
|
|
823
|
-
return 'pub mod ' + toSnakeCase(this$0, endpoint.
|
|
820
|
+
return 'pub mod ' + toSnakeCase(this$0, endpoint.gr_1.o1() + 'Client') + ';';
|
|
824
821
|
};
|
|
825
822
|
}
|
|
826
823
|
function RustEmitter$toPascalCase$lambda(s) {
|
|
@@ -840,39 +837,39 @@ function RustEmitter$toPascalCase$lambda(s) {
|
|
|
840
837
|
}
|
|
841
838
|
function RustEmitter$buildClientParams$lambda(this$0) {
|
|
842
839
|
return function (_destruct__k2r9zo) {
|
|
843
|
-
var name = _destruct__k2r9zo.
|
|
844
|
-
return sanitizeKeywords(this$0, name.
|
|
840
|
+
var name = _destruct__k2r9zo.af();
|
|
841
|
+
return sanitizeKeywords(this$0, name.eu());
|
|
845
842
|
};
|
|
846
843
|
}
|
|
847
844
|
function RustEmitter$buildClientParams$lambda_0(this$0) {
|
|
848
845
|
return function (_destruct__k2r9zo) {
|
|
849
|
-
var name = _destruct__k2r9zo.
|
|
850
|
-
var type = _destruct__k2r9zo.
|
|
851
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
846
|
+
var name = _destruct__k2r9zo.af();
|
|
847
|
+
var type = _destruct__k2r9zo.bf();
|
|
848
|
+
var tmp = sanitizeKeywords(this$0, name.eu());
|
|
852
849
|
// Inline function 'kotlin.with' call
|
|
853
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
850
|
+
return tmp + ': ' + RustTransform_getInstance().a39(type);
|
|
854
851
|
};
|
|
855
852
|
}
|
|
856
853
|
function RustEmitter(packageName, emitShared) {
|
|
857
854
|
Companion_getInstance_0();
|
|
858
855
|
packageName = packageName === VOID ? Companion_instance_0.at('community.flock.wirespec.generated') : packageName;
|
|
859
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
856
|
+
emitShared = emitShared === VOID ? Companion_instance_1.gq() : emitShared;
|
|
857
|
+
this.m38_1 = packageName;
|
|
858
|
+
this.n38_1 = emitShared;
|
|
859
|
+
this.o38_1 = RustGenerator_getInstance();
|
|
860
|
+
this.p38_1 = FileExtension_Rust_getInstance();
|
|
864
861
|
var tmp = this;
|
|
865
|
-
tmp.
|
|
866
|
-
this.
|
|
867
|
-
this.
|
|
862
|
+
tmp.q38_1 = lazy(RustEmitter$sanitizationConfig$delegate$lambda(this));
|
|
863
|
+
this.r38_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
864
|
+
this.s38_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
868
865
|
}
|
|
869
|
-
protoOf(RustEmitter).
|
|
870
|
-
return this.
|
|
866
|
+
protoOf(RustEmitter).l1b = function () {
|
|
867
|
+
return this.o38_1;
|
|
871
868
|
};
|
|
872
|
-
protoOf(RustEmitter).
|
|
873
|
-
return this.
|
|
869
|
+
protoOf(RustEmitter).xp = function () {
|
|
870
|
+
return this.p38_1;
|
|
874
871
|
};
|
|
875
|
-
protoOf(RustEmitter).
|
|
872
|
+
protoOf(RustEmitter).g1b = function () {
|
|
876
873
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
877
874
|
var requestHeaders = interface_0('RequestHeaders', VOID, RustEmitter$emitShared$lambda);
|
|
878
875
|
var responseHeaders = interface_0('ResponseHeaders', VOID, RustEmitter$emitShared$lambda_0);
|
|
@@ -891,38 +888,38 @@ protoOf(RustEmitter).y1a = function () {
|
|
|
891
888
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
892
889
|
var tmp = scope;
|
|
893
890
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
894
|
-
var this_1 = scope.
|
|
891
|
+
var this_1 = scope.e19_1;
|
|
895
892
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
896
893
|
// Inline function 'kotlin.apply' call
|
|
897
894
|
var this_2 = new TransformerBuilder();
|
|
898
|
-
this_2.
|
|
899
|
-
var tmp$ret$4 = this_2.
|
|
900
|
-
tmp.
|
|
895
|
+
this_2.y19(RustEmitter$emitShared$lambda_6(rustImports));
|
|
896
|
+
var tmp$ret$4 = this_2.t19();
|
|
897
|
+
tmp.e19_1 = transform(this_1, tmp$ret$4);
|
|
901
898
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
902
899
|
var tmp_0 = scope;
|
|
903
900
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
904
|
-
var this_3 = scope.
|
|
901
|
+
var this_3 = scope.e19_1;
|
|
905
902
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
906
903
|
// Inline function 'kotlin.apply' call
|
|
907
904
|
var this_4 = new TransformerBuilder();
|
|
908
|
-
this_4.
|
|
909
|
-
var tmp$ret$9 = this_4.
|
|
910
|
-
tmp_0.
|
|
905
|
+
this_4.y19(RustEmitter$emitShared$lambda_7);
|
|
906
|
+
var tmp$ret$9 = this_4.t19();
|
|
907
|
+
tmp_0.e19_1 = transform(this_3, tmp$ret$9);
|
|
911
908
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
912
909
|
var tmp_1 = scope;
|
|
913
910
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
914
|
-
var this_5 = scope.
|
|
911
|
+
var this_5 = scope.e19_1;
|
|
915
912
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
916
913
|
// Inline function 'kotlin.apply' call
|
|
917
914
|
var this_6 = new TransformerBuilder();
|
|
918
|
-
this_6.
|
|
919
|
-
var tmp$ret$14 = this_6.
|
|
920
|
-
tmp_1.
|
|
921
|
-
var tmp_2 = scope.
|
|
915
|
+
this_6.y19(RustEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
916
|
+
var tmp$ret$14 = this_6.t19();
|
|
917
|
+
tmp_1.e19_1 = transform(this_5, tmp$ret$14);
|
|
918
|
+
var tmp_2 = scope.e19_1;
|
|
922
919
|
// Inline function 'kotlin.let' call
|
|
923
920
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
924
921
|
// Inline function 'kotlin.collections.flatMap' call
|
|
925
|
-
var tmp0 = file.
|
|
922
|
+
var tmp0 = file.gv_1;
|
|
926
923
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
927
924
|
var destination = ArrayList_init_$Create$_0();
|
|
928
925
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -952,7 +949,7 @@ protoOf(RustEmitter).y1a = function () {
|
|
|
952
949
|
var _iterator__ex2g4s_0 = structFields.t();
|
|
953
950
|
while (_iterator__ex2g4s_0.u()) {
|
|
954
951
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
955
|
-
if (containsUnderiveable(this, element_0.
|
|
952
|
+
if (containsUnderiveable(this, element_0.bw_1)) {
|
|
956
953
|
tmp$ret$22 = true;
|
|
957
954
|
break $l$block_1;
|
|
958
955
|
}
|
|
@@ -978,7 +975,7 @@ protoOf(RustEmitter).y1a = function () {
|
|
|
978
975
|
var _iterator__ex2g4s_1 = structFields.t();
|
|
979
976
|
while (_iterator__ex2g4s_1.u()) {
|
|
980
977
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
981
|
-
if (containsWildcard(this, element_1.
|
|
978
|
+
if (containsWildcard(this, element_1.bw_1)) {
|
|
982
979
|
tmp$ret$24 = true;
|
|
983
980
|
break $l$block_3;
|
|
984
981
|
}
|
|
@@ -988,7 +985,7 @@ protoOf(RustEmitter).y1a = function () {
|
|
|
988
985
|
if (tmp$ret$24) {
|
|
989
986
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
990
987
|
} else {
|
|
991
|
-
if (setOf(['RawRequest', 'RawResponse']).i1(element.
|
|
988
|
+
if (setOf(['RawRequest', 'RawResponse']).i1(element.fx_1.du())) {
|
|
992
989
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
993
990
|
} else {
|
|
994
991
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -1004,29 +1001,29 @@ protoOf(RustEmitter).y1a = function () {
|
|
|
1004
1001
|
tmp_6 = listOf(new RawElement(derive));
|
|
1005
1002
|
}
|
|
1006
1003
|
var prefix = tmp_6;
|
|
1007
|
-
tmp$ret$21 = listOf(new File(element.
|
|
1004
|
+
tmp$ret$21 = listOf(new File(element.fx_1, plus_0(prefix, element)));
|
|
1008
1005
|
}
|
|
1009
1006
|
var list = tmp$ret$21;
|
|
1010
1007
|
addAll(destination, list);
|
|
1011
1008
|
}
|
|
1012
|
-
var tmp0_0 = new File(file.
|
|
1009
|
+
var tmp0_0 = new File(file.fv_1, destination);
|
|
1013
1010
|
// Inline function 'kotlin.let' call
|
|
1014
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1011
|
+
var wirespecFile = RustTransform_getInstance().b39(tmp0_0);
|
|
1015
1012
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1016
1013
|
var scope_0 = new TransformScope(wirespecFile);
|
|
1017
1014
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1018
1015
|
var tmp_7 = scope_0;
|
|
1019
1016
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1020
|
-
var this_7 = scope_0.
|
|
1017
|
+
var this_7 = scope_0.e19_1;
|
|
1021
1018
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1022
1019
|
// Inline function 'kotlin.apply' call
|
|
1023
1020
|
var this_8 = new TransformerBuilder();
|
|
1024
|
-
this_8.
|
|
1025
|
-
var tmp$ret$33 = this_8.
|
|
1026
|
-
tmp_7.
|
|
1027
|
-
var tmp_8 = scope_0.
|
|
1021
|
+
this_8.y19(RustEmitter$emitShared$lambda_9);
|
|
1022
|
+
var tmp$ret$33 = this_8.t19();
|
|
1023
|
+
tmp_7.e19_1 = transform(this_7, tmp$ret$33);
|
|
1024
|
+
var tmp_8 = scope_0.e19_1;
|
|
1028
1025
|
// Inline function 'kotlin.let' call
|
|
1029
|
-
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1026
|
+
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).gv_1;
|
|
1030
1027
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1031
1028
|
// Inline function 'kotlin.collections.fold' call
|
|
1032
1029
|
var accumulator = ArrayList_init_$Create$_0();
|
|
@@ -1047,26 +1044,26 @@ protoOf(RustEmitter).y1a = function () {
|
|
|
1047
1044
|
var groups = accumulator;
|
|
1048
1045
|
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustEmitter$emitShared$lambda_10) + '\n';
|
|
1049
1046
|
var tmp_10;
|
|
1050
|
-
if (this.
|
|
1051
|
-
tmp_10 = new File(Companion_getInstance().
|
|
1047
|
+
if (this.n38_1.hq_1) {
|
|
1048
|
+
tmp_10 = new File(Companion_getInstance().au(this.m38_1.dt() + 'wirespec'), listOf(new RawElement(source)));
|
|
1052
1049
|
} else {
|
|
1053
1050
|
tmp_10 = null;
|
|
1054
1051
|
}
|
|
1055
1052
|
return tmp_10;
|
|
1056
1053
|
};
|
|
1057
|
-
protoOf(RustEmitter).
|
|
1054
|
+
protoOf(RustEmitter).f1b = function (module_0, logger) {
|
|
1058
1055
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1059
|
-
var this_0 = new NonEmptyList(module_0.
|
|
1056
|
+
var this_0 = new NonEmptyList(module_0.hp_1);
|
|
1060
1057
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
1061
1058
|
var tmp = RustEmitter$emit$lambda;
|
|
1062
1059
|
var tmp$ret$1 = new sam$kotlin_Comparator$0(tmp);
|
|
1063
1060
|
var tmp$ret$0 = sortedWith(this_0, tmp$ret$1);
|
|
1064
1061
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$0);
|
|
1065
|
-
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).
|
|
1062
|
+
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).en_1;
|
|
1066
1063
|
// Inline function 'kotlin.let' call
|
|
1067
|
-
var files = emit.call(this, module_0.
|
|
1064
|
+
var files = emit.call(this, module_0.up(VOID, statements), logger);
|
|
1068
1065
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1069
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
1066
|
+
var tmp0 = new NonEmptyList(module_0.hp_1);
|
|
1070
1067
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1071
1068
|
var destination = ArrayList_init_$Create$_0();
|
|
1072
1069
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1086,11 +1083,11 @@ protoOf(RustEmitter).x1a = function (module_0, logger) {
|
|
|
1086
1083
|
tmp_1 = '';
|
|
1087
1084
|
}
|
|
1088
1085
|
var clientMod = tmp_1;
|
|
1089
|
-
var modRs = new File(Companion_getInstance().
|
|
1090
|
-
var modEndpoint = new File(Companion_getInstance().
|
|
1091
|
-
var tmp_2 = Companion_getInstance().
|
|
1086
|
+
var modRs = new File(Companion_getInstance().au(this.m38_1.dt() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1087
|
+
var modEndpoint = new File(Companion_getInstance().au(this.m38_1.dt() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1088
|
+
var tmp_2 = Companion_getInstance().au(this.m38_1.dt() + 'model/' + 'mod');
|
|
1092
1089
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1093
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
1090
|
+
var tmp0_0 = new NonEmptyList(module_0.hp_1);
|
|
1094
1091
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1095
1092
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1096
1093
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1102,23 +1099,23 @@ protoOf(RustEmitter).x1a = function (module_0, logger) {
|
|
|
1102
1099
|
}
|
|
1103
1100
|
var tmp_3 = destination_0;
|
|
1104
1101
|
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.
|
|
1102
|
+
return this.n38_1.hq_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(files, modRs), modEndpoint), modModel) : NonEmptyList__plus_impl_xqmb9(files, modRs);
|
|
1106
1103
|
};
|
|
1107
|
-
protoOf(RustEmitter).
|
|
1108
|
-
var subPackageName = plus_1(this.
|
|
1104
|
+
protoOf(RustEmitter).ds = function (definition, module_0, logger) {
|
|
1105
|
+
var subPackageName = plus_1(this.m38_1, definition);
|
|
1109
1106
|
var tmp;
|
|
1110
1107
|
if (definition instanceof Endpoint) {
|
|
1111
|
-
tmp = this.
|
|
1108
|
+
tmp = this.s38_1;
|
|
1112
1109
|
} else {
|
|
1113
|
-
tmp = this.
|
|
1110
|
+
tmp = this.r38_1;
|
|
1114
1111
|
}
|
|
1115
1112
|
var importHeader = tmp;
|
|
1116
1113
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1117
1114
|
// Inline function 'kotlin.let' call
|
|
1118
|
-
var file = RustTransform_getInstance().
|
|
1119
|
-
var tmp_0 = Companion_getInstance().
|
|
1115
|
+
var file = RustTransform_getInstance().b39(tmp0);
|
|
1116
|
+
var tmp_0 = Companion_getInstance().au(subPackageName.dt() + toSnakeCase(this, file.fv_1.du()));
|
|
1120
1117
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1121
|
-
var tmp0_0 = file.
|
|
1118
|
+
var tmp0_0 = file.gv_1;
|
|
1122
1119
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1123
1120
|
var destination = ArrayList_init_$Create$_0();
|
|
1124
1121
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1135,7 +1132,7 @@ protoOf(RustEmitter).cs = function (definition, module_0, logger) {
|
|
|
1135
1132
|
}
|
|
1136
1133
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1137
1134
|
};
|
|
1138
|
-
protoOf(RustEmitter).
|
|
1135
|
+
protoOf(RustEmitter).o1b = function (definition, module_0) {
|
|
1139
1136
|
var tmp;
|
|
1140
1137
|
if (definition instanceof Type) {
|
|
1141
1138
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1155,7 +1152,7 @@ protoOf(RustEmitter).g1b = function (definition, module_0) {
|
|
|
1155
1152
|
}
|
|
1156
1153
|
}
|
|
1157
1154
|
var generatorFile = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
|
|
1158
|
-
var generatorOwnName = definition.
|
|
1155
|
+
var generatorOwnName = definition.es().o1() + 'Generator';
|
|
1159
1156
|
var tmp_0 = asSequence(collectCustomTypeNames(generatorFile));
|
|
1160
1157
|
var tmp_1 = filterNot(tmp_0, RustEmitter$emitGenerator$lambda);
|
|
1161
1158
|
var tmp_2 = filterNot(tmp_1, RustEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -1164,8 +1161,8 @@ protoOf(RustEmitter).g1b = function (definition, module_0) {
|
|
|
1164
1161
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1165
1162
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1166
1163
|
var scope = new TransformScope(generatorFile);
|
|
1167
|
-
scope.
|
|
1168
|
-
var tmp_3 = scope.
|
|
1164
|
+
scope.v19(RustEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1165
|
+
var tmp_3 = scope.e19_1;
|
|
1169
1166
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1170
1167
|
// Inline function 'kotlin.collections.filter' call
|
|
1171
1168
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1208,53 +1205,42 @@ protoOf(RustEmitter).g1b = function (definition, module_0) {
|
|
|
1208
1205
|
destination_2.x(tmp$ret$14);
|
|
1209
1206
|
}
|
|
1210
1207
|
var typeImports = destination_2;
|
|
1211
|
-
var subPackageName = plus_2(this.
|
|
1212
|
-
return new File(Companion_getInstance().
|
|
1208
|
+
var subPackageName = plus_2(this.m38_1, 'generator');
|
|
1209
|
+
return new File(Companion_getInstance().au(subPackageName.dt() + toSnakeCase(this, generatorFile.fv_1.du())), plus(plus(plus(this.r38_1, typeImports), generatorImports), generatorFile.gv_1));
|
|
1213
1210
|
};
|
|
1214
|
-
protoOf(RustEmitter).
|
|
1215
|
-
|
|
1216
|
-
// Inline function 'kotlin.collections.map' call
|
|
1217
|
-
var this_0 = get_fields(type.lp_1);
|
|
1218
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
1219
|
-
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1220
|
-
var _iterator__ex2g4s = this_0.t();
|
|
1221
|
-
while (_iterator__ex2g4s.u()) {
|
|
1222
|
-
var item = _iterator__ex2g4s.v();
|
|
1223
|
-
var tmp$ret$2 = item.op_1.o1();
|
|
1224
|
-
destination.x(tmp$ret$2);
|
|
1225
|
-
}
|
|
1226
|
-
return prependImports(this, sanitizeNames(injectSelfReceiverToValidate(tmp, toSet(destination), '&self'), _get_sanitizationConfig__sns434(this)), buildModelImports(type));
|
|
1211
|
+
protoOf(RustEmitter).vs = function (type, module_0) {
|
|
1212
|
+
return prependImports(this, sanitizeNames(convert_0(type), _get_sanitizationConfig__sns434(this)), buildModelImports(type));
|
|
1227
1213
|
};
|
|
1228
|
-
protoOf(RustEmitter).
|
|
1229
|
-
var tmp =
|
|
1214
|
+
protoOf(RustEmitter).ts = function (enum_0, module_0) {
|
|
1215
|
+
var tmp = convert_1(enum_0);
|
|
1230
1216
|
return sanitizeEnumEntries(tmp, RustEmitter$emit$lambda_2(this));
|
|
1231
1217
|
};
|
|
1232
|
-
protoOf(RustEmitter).
|
|
1233
|
-
return
|
|
1218
|
+
protoOf(RustEmitter).js = function (union) {
|
|
1219
|
+
return convert_2(union);
|
|
1234
1220
|
};
|
|
1235
|
-
protoOf(RustEmitter).
|
|
1236
|
-
return replaceStructWithRefinedFunctions(
|
|
1221
|
+
protoOf(RustEmitter).os = function (refined) {
|
|
1222
|
+
return replaceStructWithRefinedFunctions(convert_3(refined), refined);
|
|
1237
1223
|
};
|
|
1238
|
-
protoOf(RustEmitter).
|
|
1224
|
+
protoOf(RustEmitter).us = function (endpoint) {
|
|
1239
1225
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1240
|
-
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(
|
|
1226
|
+
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_4(endpoint))))));
|
|
1241
1227
|
var scope = new TransformScope(this_0);
|
|
1242
|
-
scope.
|
|
1243
|
-
var tmp = scope.
|
|
1228
|
+
scope.j19(fixResponseSwitchPatterns());
|
|
1229
|
+
var tmp = scope.e19_1;
|
|
1244
1230
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1245
1231
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1246
1232
|
var scope_0 = new TransformScope(this_1);
|
|
1247
|
-
scope_0.
|
|
1248
|
-
var tmp_0 = scope_0.
|
|
1233
|
+
scope_0.j19(fixConstructorCalls());
|
|
1234
|
+
var tmp_0 = scope_0.e19_1;
|
|
1249
1235
|
var tmp$ret$2 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1250
1236
|
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$2))), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1251
1237
|
};
|
|
1252
|
-
protoOf(RustEmitter).
|
|
1253
|
-
return
|
|
1238
|
+
protoOf(RustEmitter).is = function (channel) {
|
|
1239
|
+
return convert_5(channel);
|
|
1254
1240
|
};
|
|
1255
|
-
protoOf(RustEmitter).
|
|
1241
|
+
protoOf(RustEmitter).hs = function (rpc) {
|
|
1256
1242
|
// Inline function 'kotlin.let' call
|
|
1257
|
-
var file =
|
|
1243
|
+
var file = convert_6(rpc);
|
|
1258
1244
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1259
1245
|
var this_0 = importReferences(rpc);
|
|
1260
1246
|
var set = HashSet_init_$Create$();
|
|
@@ -1262,7 +1248,7 @@ protoOf(RustEmitter).gs = function (rpc) {
|
|
|
1262
1248
|
var _iterator__ex2g4s = this_0.t();
|
|
1263
1249
|
while (_iterator__ex2g4s.u()) {
|
|
1264
1250
|
var e = _iterator__ex2g4s.v();
|
|
1265
|
-
var key = e.
|
|
1251
|
+
var key = e.b1a_1;
|
|
1266
1252
|
if (set.x(key)) {
|
|
1267
1253
|
list.x(e);
|
|
1268
1254
|
}
|
|
@@ -1273,12 +1259,12 @@ protoOf(RustEmitter).gs = function (rpc) {
|
|
|
1273
1259
|
var _iterator__ex2g4s_0 = list.t();
|
|
1274
1260
|
while (_iterator__ex2g4s_0.u()) {
|
|
1275
1261
|
var item = _iterator__ex2g4s_0.v();
|
|
1276
|
-
var tmp$ret$6 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1262
|
+
var tmp$ret$6 = import_0('super::super::model::' + toSnakeCase(this, item.b1a_1), Companion_getInstance().au(item.b1a_1).du());
|
|
1277
1263
|
destination.x(tmp$ret$6);
|
|
1278
1264
|
}
|
|
1279
1265
|
var rpcImports = destination;
|
|
1280
1266
|
// Inline function 'kotlin.collections.map' call
|
|
1281
|
-
var this_1 = file.
|
|
1267
|
+
var this_1 = file.gv_1;
|
|
1282
1268
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1283
1269
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1284
1270
|
var _iterator__ex2g4s_1 = this_1.t();
|
|
@@ -1287,7 +1273,7 @@ protoOf(RustEmitter).gs = function (rpc) {
|
|
|
1287
1273
|
var tmp;
|
|
1288
1274
|
if (item_0 instanceof Namespace) {
|
|
1289
1275
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1290
|
-
var tmp0 = item_0.
|
|
1276
|
+
var tmp0 = item_0.mv_1;
|
|
1291
1277
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1292
1278
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
1293
1279
|
var _iterator__ex2g4s_2 = tmp0.t();
|
|
@@ -1302,23 +1288,23 @@ protoOf(RustEmitter).gs = function (rpc) {
|
|
|
1302
1288
|
var list_0 = tmp_0;
|
|
1303
1289
|
addAll(destination_1, list_0);
|
|
1304
1290
|
}
|
|
1305
|
-
tmp = item_0.
|
|
1291
|
+
tmp = item_0.qv(VOID, destination_1);
|
|
1306
1292
|
} else {
|
|
1307
1293
|
tmp = item_0;
|
|
1308
1294
|
}
|
|
1309
1295
|
var tmp$ret$9 = tmp;
|
|
1310
1296
|
destination_0.x(tmp$ret$9);
|
|
1311
1297
|
}
|
|
1312
|
-
return file.
|
|
1298
|
+
return file.jv(VOID, plus(rpcImports, destination_0));
|
|
1313
1299
|
};
|
|
1314
|
-
protoOf(RustEmitter).
|
|
1315
|
-
var endpointName = endpoint.
|
|
1300
|
+
protoOf(RustEmitter).n1b = function (endpoint) {
|
|
1301
|
+
var endpointName = endpoint.gr_1.o1();
|
|
1316
1302
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1317
1303
|
var clientName = endpointName + 'Client';
|
|
1318
1304
|
var methodName = toSnakeCase(this, endpointName);
|
|
1319
1305
|
var _destruct__k2r9zo = buildClientParams(this, endpoint);
|
|
1320
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1321
|
-
var requestArgs = _destruct__k2r9zo.
|
|
1306
|
+
var paramsStr = _destruct__k2r9zo.af();
|
|
1307
|
+
var requestArgs = _destruct__k2r9zo.bf();
|
|
1322
1308
|
var requestConstruction = endpointModuleName + '::Request::new(' + requestArgs + ')';
|
|
1323
1309
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1324
1310
|
var this_0 = importReferences(endpoint);
|
|
@@ -1327,7 +1313,7 @@ protoOf(RustEmitter).f1b = function (endpoint) {
|
|
|
1327
1313
|
var _iterator__ex2g4s = this_0.t();
|
|
1328
1314
|
while (_iterator__ex2g4s.u()) {
|
|
1329
1315
|
var e = _iterator__ex2g4s.v();
|
|
1330
|
-
var key = e.
|
|
1316
|
+
var key = e.b1a_1;
|
|
1331
1317
|
if (set.x(key)) {
|
|
1332
1318
|
list.x(e);
|
|
1333
1319
|
}
|
|
@@ -1338,7 +1324,7 @@ protoOf(RustEmitter).f1b = function (endpoint) {
|
|
|
1338
1324
|
var _iterator__ex2g4s_0 = list.t();
|
|
1339
1325
|
while (_iterator__ex2g4s_0.u()) {
|
|
1340
1326
|
var item = _iterator__ex2g4s_0.v();
|
|
1341
|
-
var tmp$ret$4 = import_0('super::super::model::' + toSnakeCase(this, item.
|
|
1327
|
+
var tmp$ret$4 = import_0('super::super::model::' + toSnakeCase(this, item.b1a_1), item.b1a_1);
|
|
1342
1328
|
destination.x(tmp$ret$4);
|
|
1343
1329
|
}
|
|
1344
1330
|
var modelImports = destination;
|
|
@@ -1359,10 +1345,10 @@ protoOf(RustEmitter).f1b = function (endpoint) {
|
|
|
1359
1345
|
this_1.x(' ' + namespacePath + '::from_raw_response(self.serialization, raw_response)');
|
|
1360
1346
|
this_1.x(' }');
|
|
1361
1347
|
this_1.x('}');
|
|
1362
|
-
var tmp$ret$5 = this_1.
|
|
1348
|
+
var tmp$ret$5 = this_1.r5();
|
|
1363
1349
|
var code = joinToString(tmp$ret$5, '\n');
|
|
1364
|
-
var subPackageName = plus_2(this.
|
|
1365
|
-
var tmp = Companion_getInstance().
|
|
1350
|
+
var subPackageName = plus_2(this.m38_1, 'client');
|
|
1351
|
+
var tmp = Companion_getInstance().au(subPackageName.dt() + toSnakeCase(this, clientName));
|
|
1366
1352
|
// Inline function 'kotlin.collections.buildList' call
|
|
1367
1353
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1368
1354
|
// Inline function 'kotlin.apply' call
|
|
@@ -1371,11 +1357,11 @@ protoOf(RustEmitter).f1b = function (endpoint) {
|
|
|
1371
1357
|
this_2.x(import_0('super::super::endpoint', endpointModuleName));
|
|
1372
1358
|
this_2.g1(modelImports);
|
|
1373
1359
|
this_2.x(new RawElement(code));
|
|
1374
|
-
var tmp$ret$9 = this_2.
|
|
1360
|
+
var tmp$ret$9 = this_2.r5();
|
|
1375
1361
|
return new File(tmp, tmp$ret$9);
|
|
1376
1362
|
};
|
|
1377
|
-
protoOf(RustEmitter).
|
|
1378
|
-
logger.
|
|
1363
|
+
protoOf(RustEmitter).h1b = function (endpoints, logger) {
|
|
1364
|
+
logger.bs('Emitting main Client for ' + endpoints.c1() + ' endpoints');
|
|
1379
1365
|
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustEmitter$emitClient$lambda(this));
|
|
1380
1366
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1381
1367
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
@@ -1392,7 +1378,7 @@ protoOf(RustEmitter).z1a = function (endpoints, logger) {
|
|
|
1392
1378
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1393
1379
|
while (_iterator__ex2g4s_0.u()) {
|
|
1394
1380
|
var e = _iterator__ex2g4s_0.v();
|
|
1395
|
-
var key = e.
|
|
1381
|
+
var key = e.b1a_1;
|
|
1396
1382
|
if (set.x(key)) {
|
|
1397
1383
|
list_0.x(e);
|
|
1398
1384
|
}
|
|
@@ -1419,7 +1405,7 @@ protoOf(RustEmitter).z1a = function (endpoints, logger) {
|
|
|
1419
1405
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1420
1406
|
while (_iterator__ex2g4s_2.u()) {
|
|
1421
1407
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1422
|
-
if (element_1.
|
|
1408
|
+
if (element_1.gr_1.o1() === element_0.b1a_1) {
|
|
1423
1409
|
tmp$ret$8 = false;
|
|
1424
1410
|
break $l$block_0;
|
|
1425
1411
|
}
|
|
@@ -1436,7 +1422,7 @@ protoOf(RustEmitter).z1a = function (endpoints, logger) {
|
|
|
1436
1422
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1437
1423
|
while (_iterator__ex2g4s_3.u()) {
|
|
1438
1424
|
var item = _iterator__ex2g4s_3.v();
|
|
1439
|
-
var tmp$ret$12 = import_0('super::model::' + toSnakeCase(this, item.
|
|
1425
|
+
var tmp$ret$12 = import_0('super::model::' + toSnakeCase(this, item.b1a_1), item.b1a_1);
|
|
1440
1426
|
destination_1.x(tmp$ret$12);
|
|
1441
1427
|
}
|
|
1442
1428
|
var modelImports = destination_1;
|
|
@@ -1446,9 +1432,9 @@ protoOf(RustEmitter).z1a = function (endpoints, logger) {
|
|
|
1446
1432
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1447
1433
|
while (_iterator__ex2g4s_4.u()) {
|
|
1448
1434
|
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.
|
|
1435
|
+
var endpointModuleName = toSnakeCase(this, element_2.gr_1.o1());
|
|
1436
|
+
var clientModuleName = toSnakeCase(this, element_2.gr_1.o1() + 'Client');
|
|
1437
|
+
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.gr_1.o1() + 'Client')]);
|
|
1452
1438
|
addAll(destination_2, list_1);
|
|
1453
1439
|
}
|
|
1454
1440
|
var endpointAndClientImports = destination_2;
|
|
@@ -1458,20 +1444,20 @@ protoOf(RustEmitter).z1a = function (endpoints, logger) {
|
|
|
1458
1444
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1459
1445
|
while (_iterator__ex2g4s_5.u()) {
|
|
1460
1446
|
var element_3 = _iterator__ex2g4s_5.v();
|
|
1461
|
-
var endpointName = element_3.
|
|
1447
|
+
var endpointName = element_3.gr_1.o1();
|
|
1462
1448
|
var endpointModuleName_0 = toSnakeCase(this, endpointName);
|
|
1463
1449
|
var namespacePath = endpointModuleName_0 + '::' + endpointName;
|
|
1464
1450
|
var methodName = toSnakeCase(this, endpointName);
|
|
1465
1451
|
var _destruct__k2r9zo = buildClientParams(this, element_3);
|
|
1466
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1467
|
-
var callArgs = _destruct__k2r9zo.
|
|
1452
|
+
var paramsStr = _destruct__k2r9zo.af();
|
|
1453
|
+
var callArgs = _destruct__k2r9zo.bf();
|
|
1468
1454
|
var delegateCall = endpointName + 'Client { serialization: &self.serialization, transportation: &self.transportation }\n' + (' .' + methodName + '(' + callArgs + ').await');
|
|
1469
1455
|
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
1456
|
addAll(destination_3, list_2);
|
|
1471
1457
|
}
|
|
1472
1458
|
var implBlocks = destination_3;
|
|
1473
1459
|
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().
|
|
1460
|
+
var tmp_0 = Companion_getInstance().au(this.m38_1.dt() + 'client');
|
|
1475
1461
|
// Inline function 'kotlin.collections.buildList' call
|
|
1476
1462
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1477
1463
|
// Inline function 'kotlin.apply' call
|
|
@@ -1481,7 +1467,7 @@ protoOf(RustEmitter).z1a = function (endpoints, logger) {
|
|
|
1481
1467
|
this_0.g1(modelImports);
|
|
1482
1468
|
this_0.g1(endpointAndClientImports);
|
|
1483
1469
|
this_0.x(new RawElement(code));
|
|
1484
|
-
var tmp$ret$19 = this_0.
|
|
1470
|
+
var tmp$ret$19 = this_0.r5();
|
|
1485
1471
|
return new File(tmp_0, tmp$ret$19);
|
|
1486
1472
|
};
|
|
1487
1473
|
function get_rustSelfParam() {
|
|
@@ -1499,8 +1485,8 @@ function fixResponseSwitchPatterns() {
|
|
|
1499
1485
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1500
1486
|
// Inline function 'kotlin.apply' call
|
|
1501
1487
|
var this_0 = new TransformerBuilder();
|
|
1502
|
-
this_0.
|
|
1503
|
-
return this_0.
|
|
1488
|
+
this_0.u19(fixResponseSwitchPatterns$lambda);
|
|
1489
|
+
return this_0.t19();
|
|
1504
1490
|
}
|
|
1505
1491
|
function buildModelImports(_this__u8e3s4) {
|
|
1506
1492
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1511,7 +1497,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1511
1497
|
var _iterator__ex2g4s = this_0.t();
|
|
1512
1498
|
while (_iterator__ex2g4s.u()) {
|
|
1513
1499
|
var e = _iterator__ex2g4s.v();
|
|
1514
|
-
var key = e.
|
|
1500
|
+
var key = e.b1a_1;
|
|
1515
1501
|
if (set.x(key)) {
|
|
1516
1502
|
list.x(e);
|
|
1517
1503
|
}
|
|
@@ -1522,7 +1508,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1522
1508
|
var _iterator__ex2g4s_0 = list.t();
|
|
1523
1509
|
while (_iterator__ex2g4s_0.u()) {
|
|
1524
1510
|
var item = _iterator__ex2g4s_0.v();
|
|
1525
|
-
var tmp$ret$4 = import_0('super::' + toRustSnakeCase(item.
|
|
1511
|
+
var tmp$ret$4 = import_0('super::' + toRustSnakeCase(item.b1a_1), Companion_getInstance().au(item.b1a_1).du());
|
|
1526
1512
|
destination.x(tmp$ret$4);
|
|
1527
1513
|
}
|
|
1528
1514
|
return destination;
|
|
@@ -1534,14 +1520,14 @@ function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
1534
1520
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1535
1521
|
var tmp = scope;
|
|
1536
1522
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1537
|
-
var this_0 = scope.
|
|
1523
|
+
var this_0 = scope.e19_1;
|
|
1538
1524
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1539
1525
|
// Inline function 'kotlin.apply' call
|
|
1540
1526
|
var this_1 = new TransformerBuilder();
|
|
1541
|
-
this_1.
|
|
1542
|
-
var tmp$ret$4 = this_1.
|
|
1543
|
-
tmp.
|
|
1544
|
-
var tmp_0 = scope.
|
|
1527
|
+
this_1.y19(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1528
|
+
var tmp$ret$4 = this_1.t19();
|
|
1529
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1530
|
+
var tmp_0 = scope.e19_1;
|
|
1545
1531
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1546
1532
|
}
|
|
1547
1533
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
@@ -1551,14 +1537,14 @@ function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
|
1551
1537
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1552
1538
|
var tmp = scope;
|
|
1553
1539
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1554
|
-
var this_0 = scope.
|
|
1540
|
+
var this_0 = scope.e19_1;
|
|
1555
1541
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1556
1542
|
// Inline function 'kotlin.apply' call
|
|
1557
1543
|
var this_1 = new TransformerBuilder();
|
|
1558
|
-
this_1.
|
|
1559
|
-
var tmp$ret$4 = this_1.
|
|
1560
|
-
tmp.
|
|
1561
|
-
var tmp_0 = scope.
|
|
1544
|
+
this_1.y19(injectApiStruct$lambda(endpoint));
|
|
1545
|
+
var tmp$ret$4 = this_1.t19();
|
|
1546
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1547
|
+
var tmp_0 = scope.e19_1;
|
|
1562
1548
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1563
1549
|
}
|
|
1564
1550
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
@@ -1568,14 +1554,14 @@ function injectResponseFromImpls(_this__u8e3s4) {
|
|
|
1568
1554
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1569
1555
|
var tmp = scope;
|
|
1570
1556
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1571
|
-
var this_0 = scope.
|
|
1557
|
+
var this_0 = scope.e19_1;
|
|
1572
1558
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1573
1559
|
// Inline function 'kotlin.apply' call
|
|
1574
1560
|
var this_1 = new TransformerBuilder();
|
|
1575
|
-
this_1.
|
|
1576
|
-
var tmp$ret$4 = this_1.
|
|
1577
|
-
tmp.
|
|
1578
|
-
var tmp_0 = scope.
|
|
1561
|
+
this_1.y19(injectResponseFromImpls$lambda);
|
|
1562
|
+
var tmp$ret$4 = this_1.t19();
|
|
1563
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1564
|
+
var tmp_0 = scope.e19_1;
|
|
1579
1565
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1580
1566
|
}
|
|
1581
1567
|
function injectHandlerImplForClient(_this__u8e3s4) {
|
|
@@ -1585,14 +1571,14 @@ function injectHandlerImplForClient(_this__u8e3s4) {
|
|
|
1585
1571
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1586
1572
|
var tmp = scope;
|
|
1587
1573
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1588
|
-
var this_0 = scope.
|
|
1574
|
+
var this_0 = scope.e19_1;
|
|
1589
1575
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1590
1576
|
// Inline function 'kotlin.apply' call
|
|
1591
1577
|
var this_1 = new TransformerBuilder();
|
|
1592
|
-
this_1.
|
|
1593
|
-
var tmp$ret$4 = this_1.
|
|
1594
|
-
tmp.
|
|
1595
|
-
var tmp_0 = scope.
|
|
1578
|
+
this_1.y19(injectHandlerImplForClient$lambda);
|
|
1579
|
+
var tmp$ret$4 = this_1.t19();
|
|
1580
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1581
|
+
var tmp_0 = scope.e19_1;
|
|
1596
1582
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1597
1583
|
}
|
|
1598
1584
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
@@ -1602,14 +1588,14 @@ function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
|
1602
1588
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1603
1589
|
var tmp = scope;
|
|
1604
1590
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1605
|
-
var this_0 = scope.
|
|
1591
|
+
var this_0 = scope.e19_1;
|
|
1606
1592
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1607
1593
|
// Inline function 'kotlin.apply' call
|
|
1608
1594
|
var this_1 = new TransformerBuilder();
|
|
1609
|
-
this_1.
|
|
1610
|
-
var tmp$ret$4 = this_1.
|
|
1611
|
-
tmp.
|
|
1612
|
-
var tmp_0 = scope.
|
|
1595
|
+
this_1.y19(injectSelfToHandlerMethods$lambda);
|
|
1596
|
+
var tmp$ret$4 = this_1.t19();
|
|
1597
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1598
|
+
var tmp_0 = scope.e19_1;
|
|
1613
1599
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1614
1600
|
}
|
|
1615
1601
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
@@ -1619,14 +1605,14 @@ function stripResponseGenerics(_this__u8e3s4) {
|
|
|
1619
1605
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
1620
1606
|
var tmp = scope;
|
|
1621
1607
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
1622
|
-
var this_0 = scope.
|
|
1608
|
+
var this_0 = scope.e19_1;
|
|
1623
1609
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1624
1610
|
// Inline function 'kotlin.apply' call
|
|
1625
1611
|
var this_1 = new TransformerBuilder();
|
|
1626
|
-
this_1.
|
|
1627
|
-
var tmp$ret$4 = this_1.
|
|
1628
|
-
tmp.
|
|
1629
|
-
var tmp_0 = scope.
|
|
1612
|
+
this_1.k19(stripResponseGenerics$lambda);
|
|
1613
|
+
var tmp$ret$4 = this_1.t19();
|
|
1614
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1615
|
+
var tmp_0 = scope.e19_1;
|
|
1630
1616
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1631
1617
|
}
|
|
1632
1618
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
@@ -1636,14 +1622,14 @@ function stripHandlerExtends(_this__u8e3s4) {
|
|
|
1636
1622
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1637
1623
|
var tmp = scope;
|
|
1638
1624
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1639
|
-
var this_0 = scope.
|
|
1625
|
+
var this_0 = scope.e19_1;
|
|
1640
1626
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1641
1627
|
// Inline function 'kotlin.apply' call
|
|
1642
1628
|
var this_1 = new TransformerBuilder();
|
|
1643
|
-
this_1.
|
|
1644
|
-
var tmp$ret$4 = this_1.
|
|
1645
|
-
tmp.
|
|
1646
|
-
var tmp_0 = scope.
|
|
1629
|
+
this_1.y19(stripHandlerExtends$lambda);
|
|
1630
|
+
var tmp$ret$4 = this_1.t19();
|
|
1631
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1632
|
+
var tmp_0 = scope.e19_1;
|
|
1647
1633
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1648
1634
|
}
|
|
1649
1635
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
@@ -1651,8 +1637,8 @@ function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
|
1651
1637
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1652
1638
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1653
1639
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1654
|
-
scope.
|
|
1655
|
-
var tmp = scope.
|
|
1640
|
+
scope.w19(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1641
|
+
var tmp = scope.e19_1;
|
|
1656
1642
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1657
1643
|
}
|
|
1658
1644
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
@@ -1662,21 +1648,21 @@ function stripWirespecPrefix(_this__u8e3s4) {
|
|
|
1662
1648
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
1663
1649
|
var tmp = scope;
|
|
1664
1650
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
1665
|
-
var this_0 = scope.
|
|
1651
|
+
var this_0 = scope.e19_1;
|
|
1666
1652
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1667
1653
|
// Inline function 'kotlin.apply' call
|
|
1668
1654
|
var this_1 = new TransformerBuilder();
|
|
1669
|
-
this_1.
|
|
1670
|
-
var tmp$ret$4 = this_1.
|
|
1671
|
-
tmp.
|
|
1672
|
-
var tmp_0 = scope.
|
|
1655
|
+
this_1.k19(stripWirespecPrefix$lambda);
|
|
1656
|
+
var tmp$ret$4 = this_1.t19();
|
|
1657
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
1658
|
+
var tmp_0 = scope.e19_1;
|
|
1673
1659
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1674
1660
|
}
|
|
1675
1661
|
function flattenForRust(_this__u8e3s4) {
|
|
1676
1662
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1677
1663
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
1678
1664
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1679
|
-
var tmp0 = _this__u8e3s4.
|
|
1665
|
+
var tmp0 = _this__u8e3s4.hv();
|
|
1680
1666
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1681
1667
|
var destination = ArrayList_init_$Create$_0();
|
|
1682
1668
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1689,7 +1675,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1689
1675
|
var tmp$ret$0 = firstOrNull_0(destination);
|
|
1690
1676
|
var namespace = ensureNotNull(tmp$ret$0);
|
|
1691
1677
|
// Inline function 'kotlin.collections.filter' call
|
|
1692
|
-
var tmp0_0 = namespace.
|
|
1678
|
+
var tmp0_0 = namespace.mv_1;
|
|
1693
1679
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1694
1680
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1695
1681
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1714,13 +1700,13 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1714
1700
|
var tmp_0;
|
|
1715
1701
|
var tmp_1;
|
|
1716
1702
|
if (item instanceof Union_0) {
|
|
1717
|
-
tmp_1 = item.
|
|
1703
|
+
tmp_1 = item.lw_1.du() === 'Response';
|
|
1718
1704
|
} else {
|
|
1719
1705
|
tmp_1 = false;
|
|
1720
1706
|
}
|
|
1721
1707
|
if (tmp_1) {
|
|
1722
1708
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1723
|
-
var tmp0_1 = namespace.
|
|
1709
|
+
var tmp0_1 = namespace.mv_1;
|
|
1724
1710
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1725
1711
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1726
1712
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -1736,7 +1722,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1736
1722
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1737
1723
|
while (_iterator__ex2g4s_3.u()) {
|
|
1738
1724
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1739
|
-
var tmp$ret$13 = item_0.
|
|
1725
|
+
var tmp$ret$13 = item_0.fx_1.du();
|
|
1740
1726
|
destination_3.x(tmp$ret$13);
|
|
1741
1727
|
}
|
|
1742
1728
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -1745,7 +1731,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1745
1731
|
var _iterator__ex2g4s_4 = destination_3.t();
|
|
1746
1732
|
while (_iterator__ex2g4s_4.u()) {
|
|
1747
1733
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1748
|
-
if (get_rustResponsePattern().
|
|
1734
|
+
if (get_rustResponsePattern().sc(element_2)) {
|
|
1749
1735
|
destination_4.x(element_2);
|
|
1750
1736
|
}
|
|
1751
1737
|
}
|
|
@@ -1759,10 +1745,10 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1759
1745
|
destination_5.x(tmp$ret$19);
|
|
1760
1746
|
}
|
|
1761
1747
|
var members = destination_5;
|
|
1762
|
-
tmp_0 = item.
|
|
1748
|
+
tmp_0 = item.rw(VOID, VOID, members, emptyList());
|
|
1763
1749
|
} else {
|
|
1764
1750
|
if (item instanceof Union_0) {
|
|
1765
|
-
tmp_0 = item.
|
|
1751
|
+
tmp_0 = item.rw(VOID, VOID, VOID, emptyList());
|
|
1766
1752
|
} else {
|
|
1767
1753
|
tmp_0 = item;
|
|
1768
1754
|
}
|
|
@@ -1772,7 +1758,7 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1772
1758
|
}
|
|
1773
1759
|
var moduleElements = destination_1;
|
|
1774
1760
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1775
|
-
var tmp0_2 = namespace.
|
|
1761
|
+
var tmp0_2 = namespace.mv_1;
|
|
1776
1762
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1777
1763
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1778
1764
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1789,15 +1775,15 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1789
1775
|
}
|
|
1790
1776
|
}
|
|
1791
1777
|
var classElements = destination_6;
|
|
1792
|
-
return new File(namespace.
|
|
1778
|
+
return new File(namespace.lv_1, plus_0(moduleElements, new Namespace(namespace.lv_1, classElements, namespace.nv_1)));
|
|
1793
1779
|
}
|
|
1794
1780
|
function fixConstructorCalls() {
|
|
1795
1781
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1796
1782
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1797
1783
|
// Inline function 'kotlin.apply' call
|
|
1798
1784
|
var this_0 = new TransformerBuilder();
|
|
1799
|
-
this_0.
|
|
1800
|
-
return this_0.
|
|
1785
|
+
this_0.w19(fixConstructorCalls$lambda);
|
|
1786
|
+
return this_0.t19();
|
|
1801
1787
|
}
|
|
1802
1788
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1803
1789
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1808,7 +1794,7 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1808
1794
|
var _iterator__ex2g4s = this_0.t();
|
|
1809
1795
|
while (_iterator__ex2g4s.u()) {
|
|
1810
1796
|
var e = _iterator__ex2g4s.v();
|
|
1811
|
-
var key = e.
|
|
1797
|
+
var key = e.b1a_1;
|
|
1812
1798
|
if (set.x(key)) {
|
|
1813
1799
|
list.x(e);
|
|
1814
1800
|
}
|
|
@@ -1819,24 +1805,24 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1819
1805
|
var _iterator__ex2g4s_0 = list.t();
|
|
1820
1806
|
while (_iterator__ex2g4s_0.u()) {
|
|
1821
1807
|
var item = _iterator__ex2g4s_0.v();
|
|
1822
|
-
var tmp$ret$4 = import_0('super::super::model::' + toRustSnakeCase(item.
|
|
1808
|
+
var tmp$ret$4 = import_0('super::super::model::' + toRustSnakeCase(item.b1a_1), Companion_getInstance().au(item.b1a_1).du());
|
|
1823
1809
|
destination.x(tmp$ret$4);
|
|
1824
1810
|
}
|
|
1825
1811
|
return destination;
|
|
1826
1812
|
}
|
|
1827
1813
|
function toRustSnakeCase(_this__u8e3s4) {
|
|
1828
1814
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1829
|
-
return Companion_getInstance().
|
|
1815
|
+
return Companion_getInstance().au(_this__u8e3s4).eu();
|
|
1830
1816
|
}
|
|
1831
1817
|
function buildValidateFunction(refined) {
|
|
1832
1818
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1833
|
-
var constraintExpr = convertConstraint(refined.
|
|
1819
|
+
var constraintExpr = convertConstraint(refined.ns_1, new FieldCall(new VariableReference(Companion_getInstance().au('self')), Companion_getInstance().au('value')));
|
|
1834
1820
|
return function_0('validate', VOID, VOID, buildValidateFunction$lambda(constraintExpr));
|
|
1835
1821
|
}
|
|
1836
1822
|
function buildToStringFunction(refined) {
|
|
1837
1823
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1838
1824
|
var tmp;
|
|
1839
|
-
if (refined.
|
|
1825
|
+
if (refined.ns_1.d1a_1 instanceof String_0) {
|
|
1840
1826
|
tmp = 'self.value.clone()';
|
|
1841
1827
|
} else {
|
|
1842
1828
|
tmp = 'format!("{}", self.value)';
|
|
@@ -1851,8 +1837,8 @@ function buildApiStruct(endpoint) {
|
|
|
1851
1837
|
function generateApiStructCode(_this__u8e3s4) {
|
|
1852
1838
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1853
1839
|
// Inline function 'kotlin.let' call
|
|
1854
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
1855
|
-
var methodName = _this__u8e3s4.
|
|
1840
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.ir_1, '/', VOID, VOID, VOID, VOID, generateApiStructCode$lambda);
|
|
1841
|
+
var methodName = _this__u8e3s4.hr_1.e3_1;
|
|
1856
1842
|
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
1843
|
}
|
|
1858
1844
|
function fixResponseSwitchPatterns$lambda(s, t) {
|
|
@@ -1861,56 +1847,56 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1861
1847
|
if (!(s instanceof Switch)) {
|
|
1862
1848
|
tmp = true;
|
|
1863
1849
|
} else {
|
|
1864
|
-
var tmp0_safe_receiver = s.
|
|
1865
|
-
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1850
|
+
var tmp0_safe_receiver = s.cz_1;
|
|
1851
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cu()) === 'r');
|
|
1866
1852
|
}
|
|
1867
1853
|
if (tmp)
|
|
1868
1854
|
return transformChildren(s, t);
|
|
1869
1855
|
// Inline function 'kotlin.collections.map' call
|
|
1870
|
-
var this_0 = s.
|
|
1856
|
+
var this_0 = s.az_1;
|
|
1871
1857
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1872
1858
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1873
1859
|
var _iterator__ex2g4s = this_0.t();
|
|
1874
1860
|
while (_iterator__ex2g4s.u()) {
|
|
1875
1861
|
var item = _iterator__ex2g4s.v();
|
|
1876
|
-
var tmp_0 = item.
|
|
1862
|
+
var tmp_0 = item.hz_1;
|
|
1877
1863
|
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.
|
|
1864
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.ru_1;
|
|
1865
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.du();
|
|
1880
1866
|
var tmp_1;
|
|
1881
|
-
if (!(typeName == null) && get_rustResponsePattern().
|
|
1882
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1867
|
+
if (!(typeName == null) && get_rustResponsePattern().sc(typeName)) {
|
|
1868
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.cz_1).eu() + ')');
|
|
1883
1869
|
// Inline function 'kotlin.collections.map' call
|
|
1884
|
-
var this_1 = item.
|
|
1870
|
+
var this_1 = item.gz_1;
|
|
1885
1871
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1886
1872
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1887
1873
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1888
1874
|
while (_iterator__ex2g4s_0.u()) {
|
|
1889
1875
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1890
|
-
var tmp$ret$5 = t.
|
|
1876
|
+
var tmp$ret$5 = t.y18(item_0);
|
|
1891
1877
|
destination_0.x(tmp$ret$5);
|
|
1892
1878
|
}
|
|
1893
1879
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1894
1880
|
} else {
|
|
1895
|
-
var tmp_3 = t.
|
|
1881
|
+
var tmp_3 = t.z18(item.fz_1);
|
|
1896
1882
|
// Inline function 'kotlin.collections.map' call
|
|
1897
|
-
var this_2 = item.
|
|
1883
|
+
var this_2 = item.gz_1;
|
|
1898
1884
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1899
1885
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1900
1886
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1901
1887
|
while (_iterator__ex2g4s_1.u()) {
|
|
1902
1888
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1903
|
-
var tmp$ret$8 = t.
|
|
1889
|
+
var tmp$ret$8 = t.y18(item_1);
|
|
1904
1890
|
destination_1.x(tmp$ret$8);
|
|
1905
1891
|
}
|
|
1906
1892
|
var tmp_4 = destination_1;
|
|
1907
|
-
var tmp2_safe_receiver = item.
|
|
1893
|
+
var tmp2_safe_receiver = item.hz_1;
|
|
1908
1894
|
var tmp_5;
|
|
1909
1895
|
if (tmp2_safe_receiver == null) {
|
|
1910
1896
|
tmp_5 = null;
|
|
1911
1897
|
} else {
|
|
1912
1898
|
// Inline function 'kotlin.let' call
|
|
1913
|
-
tmp_5 = t.
|
|
1899
|
+
tmp_5 = t.w18(tmp2_safe_receiver);
|
|
1914
1900
|
}
|
|
1915
1901
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1916
1902
|
}
|
|
@@ -1918,13 +1904,13 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1918
1904
|
destination.x(tmp$ret$2);
|
|
1919
1905
|
}
|
|
1920
1906
|
var transformedCases = destination;
|
|
1921
|
-
return s.
|
|
1907
|
+
return s.ez(t.z18(s.zy_1), transformedCases, null);
|
|
1922
1908
|
}
|
|
1923
1909
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1924
1910
|
return function (element, transformer) {
|
|
1925
1911
|
var tmp;
|
|
1926
1912
|
if (element instanceof Struct) {
|
|
1927
|
-
tmp = element.
|
|
1913
|
+
tmp = element.qx(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1928
1914
|
} else {
|
|
1929
1915
|
tmp = element;
|
|
1930
1916
|
}
|
|
@@ -1936,7 +1922,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1936
1922
|
return function (element, transformer) {
|
|
1937
1923
|
var tmp;
|
|
1938
1924
|
if (element instanceof Namespace) {
|
|
1939
|
-
tmp = element.
|
|
1925
|
+
tmp = element.qv(VOID, plus(element.mv_1, listOf(buildApiStruct($endpoint))));
|
|
1940
1926
|
} else {
|
|
1941
1927
|
tmp = element;
|
|
1942
1928
|
}
|
|
@@ -1949,7 +1935,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1949
1935
|
var tmp;
|
|
1950
1936
|
if (element instanceof File) {
|
|
1951
1937
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1952
|
-
var tmp0 = element.
|
|
1938
|
+
var tmp0 = element.gv_1;
|
|
1953
1939
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1954
1940
|
var destination = ArrayList_init_$Create$_0();
|
|
1955
1941
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1959,26 +1945,26 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1959
1945
|
var tmp_1;
|
|
1960
1946
|
var tmp_2;
|
|
1961
1947
|
if (element_0 instanceof Union_0) {
|
|
1962
|
-
tmp_2 = element_0.
|
|
1948
|
+
tmp_2 = element_0.lw_1.du() === 'Response';
|
|
1963
1949
|
} else {
|
|
1964
1950
|
tmp_2 = false;
|
|
1965
1951
|
}
|
|
1966
1952
|
if (tmp_2) {
|
|
1967
1953
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1968
|
-
tmp_1 = !element_0.
|
|
1954
|
+
tmp_1 = !element_0.nw_1.r();
|
|
1969
1955
|
} else {
|
|
1970
1956
|
tmp_1 = false;
|
|
1971
1957
|
}
|
|
1972
1958
|
if (tmp_1) {
|
|
1973
1959
|
var tmp_3 = listOf(element_0);
|
|
1974
1960
|
// Inline function 'kotlin.collections.map' call
|
|
1975
|
-
var this_0 = element_0.
|
|
1961
|
+
var this_0 = element_0.nw_1;
|
|
1976
1962
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1977
1963
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1978
1964
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1979
1965
|
while (_iterator__ex2g4s_0.u()) {
|
|
1980
1966
|
var item = _iterator__ex2g4s_0.v();
|
|
1981
|
-
var memberName = item.
|
|
1967
|
+
var memberName = item.ru_1.du();
|
|
1982
1968
|
var tmp$ret$7 = new RawElement('impl From<' + memberName + '> for Response { fn from(value: ' + memberName + ') -> Self { Response::' + memberName + '(value) } }\n');
|
|
1983
1969
|
destination_0.x(tmp$ret$7);
|
|
1984
1970
|
}
|
|
@@ -1989,7 +1975,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1989
1975
|
var list = tmp_0;
|
|
1990
1976
|
addAll(destination, list);
|
|
1991
1977
|
}
|
|
1992
|
-
tmp = element.
|
|
1978
|
+
tmp = element.jv(VOID, destination);
|
|
1993
1979
|
} else {
|
|
1994
1980
|
tmp = element;
|
|
1995
1981
|
}
|
|
@@ -2003,7 +1989,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2003
1989
|
var tmp$ret$0;
|
|
2004
1990
|
$l$block_1: {
|
|
2005
1991
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
2006
|
-
var tmp0 = element.
|
|
1992
|
+
var tmp0 = element.mv_1;
|
|
2007
1993
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
2008
1994
|
var destination = ArrayList_init_$Create$_0();
|
|
2009
1995
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -2019,7 +2005,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2019
2005
|
var _iterator__ex2g4s_0 = destination.t();
|
|
2020
2006
|
while (_iterator__ex2g4s_0.u()) {
|
|
2021
2007
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
2022
|
-
if (element_1.
|
|
2008
|
+
if (element_1.rv_1.equals(Companion_getInstance().au('Handler'))) {
|
|
2023
2009
|
tmp$ret$3 = element_1;
|
|
2024
2010
|
break $l$block;
|
|
2025
2011
|
}
|
|
@@ -2036,7 +2022,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2036
2022
|
}
|
|
2037
2023
|
var handler = tmp_0;
|
|
2038
2024
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
2039
|
-
var tmp0_0 = handler.
|
|
2025
|
+
var tmp0_0 = handler.sv_1;
|
|
2040
2026
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
2041
2027
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
2042
2028
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
@@ -2055,8 +2041,8 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2055
2041
|
tmp_1 = tmp1_elvis_lhs;
|
|
2056
2042
|
}
|
|
2057
2043
|
var method = tmp_1;
|
|
2058
|
-
var methodName = method.
|
|
2059
|
-
tmp$ret$0 = element.
|
|
2044
|
+
var methodName = method.rx_1.eu();
|
|
2045
|
+
tmp$ret$0 = element.qv(VOID, plus(element.mv_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
2046
|
}
|
|
2061
2047
|
tmp = tmp$ret$0;
|
|
2062
2048
|
} else {
|
|
@@ -2071,7 +2057,7 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2071
2057
|
if (element instanceof Interface) {
|
|
2072
2058
|
var tmp$ret$0;
|
|
2073
2059
|
$l$block: {
|
|
2074
|
-
if (!element.
|
|
2060
|
+
if (!element.rv_1.equals(Companion_getInstance().au('Handler')) && !element.rv_1.equals(Companion_getInstance().au('Call'))) {
|
|
2075
2061
|
tmp$ret$0 = element;
|
|
2076
2062
|
break $l$block;
|
|
2077
2063
|
}
|
|
@@ -2080,14 +2066,14 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2080
2066
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
2081
2067
|
var tmp_0 = scope;
|
|
2082
2068
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
2083
|
-
var this_0 = scope.
|
|
2069
|
+
var this_0 = scope.e19_1;
|
|
2084
2070
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2085
2071
|
// Inline function 'kotlin.apply' call
|
|
2086
2072
|
var this_1 = new TransformerBuilder();
|
|
2087
|
-
this_1.
|
|
2088
|
-
var tmp$ret$5 = this_1.
|
|
2089
|
-
tmp_0.
|
|
2090
|
-
var tmp_1 = scope.
|
|
2073
|
+
this_1.y19(injectSelfToHandlerMethods$lambda$lambda);
|
|
2074
|
+
var tmp$ret$5 = this_1.t19();
|
|
2075
|
+
tmp_0.e19_1 = transform(this_0, tmp$ret$5);
|
|
2076
|
+
var tmp_1 = scope.e19_1;
|
|
2091
2077
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2092
2078
|
}
|
|
2093
2079
|
tmp = tmp$ret$0;
|
|
@@ -2101,7 +2087,7 @@ function injectSelfToHandlerMethods$lambda$lambda(element, transformer) {
|
|
|
2101
2087
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2102
2088
|
var tmp;
|
|
2103
2089
|
if (element instanceof Function_0) {
|
|
2104
|
-
tmp = element.
|
|
2090
|
+
tmp = element.dy(Companion_getInstance().au(element.rx_1.eu()), VOID, plus(listOf(get_rustSelfParam()), element.tx_1));
|
|
2105
2091
|
} else {
|
|
2106
2092
|
tmp = element;
|
|
2107
2093
|
}
|
|
@@ -2114,14 +2100,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2114
2100
|
if (type instanceof Custom) {
|
|
2115
2101
|
var tmp_0;
|
|
2116
2102
|
var tmp_1;
|
|
2117
|
-
if (startsWith(type.
|
|
2103
|
+
if (startsWith(type.ru_1.du(), 'Response')) {
|
|
2118
2104
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2119
|
-
tmp_1 = !type.
|
|
2105
|
+
tmp_1 = !type.su_1.r();
|
|
2120
2106
|
} else {
|
|
2121
2107
|
tmp_1 = false;
|
|
2122
2108
|
}
|
|
2123
2109
|
if (tmp_1) {
|
|
2124
|
-
tmp_0 = type.
|
|
2110
|
+
tmp_0 = type.uu(VOID, emptyList());
|
|
2125
2111
|
} else {
|
|
2126
2112
|
tmp_0 = type;
|
|
2127
2113
|
}
|
|
@@ -2136,7 +2122,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2136
2122
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2137
2123
|
var tmp;
|
|
2138
2124
|
if (element instanceof Interface) {
|
|
2139
|
-
tmp = element.
|
|
2125
|
+
tmp = element.rv_1.equals(Companion_getInstance().au('Handler')) || element.rv_1.equals(Companion_getInstance().au('Call')) ? element.zv(VOID, VOID, emptyList()) : element;
|
|
2140
2126
|
} else {
|
|
2141
2127
|
tmp = element;
|
|
2142
2128
|
}
|
|
@@ -2149,17 +2135,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2149
2135
|
var tmp_0;
|
|
2150
2136
|
var tmp_1;
|
|
2151
2137
|
if (s instanceof RawExpression) {
|
|
2152
|
-
tmp_1 = $identifierPattern.
|
|
2138
|
+
tmp_1 = $identifierPattern.sc(s.gy_1);
|
|
2153
2139
|
} else {
|
|
2154
2140
|
tmp_1 = false;
|
|
2155
2141
|
}
|
|
2156
2142
|
if (tmp_1) {
|
|
2157
|
-
tmp_0 = !contains(s.
|
|
2143
|
+
tmp_0 = !contains(s.gy_1, '.');
|
|
2158
2144
|
} else {
|
|
2159
2145
|
tmp_0 = false;
|
|
2160
2146
|
}
|
|
2161
2147
|
if (tmp_0) {
|
|
2162
|
-
tmp = new VariableReference(Companion_getInstance().
|
|
2148
|
+
tmp = new VariableReference(Companion_getInstance().au(s.gy_1));
|
|
2163
2149
|
} else {
|
|
2164
2150
|
tmp = transformChildren(s, t);
|
|
2165
2151
|
}
|
|
@@ -2170,10 +2156,10 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2170
2156
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2171
2157
|
var tmp;
|
|
2172
2158
|
if (type instanceof Custom) {
|
|
2173
|
-
var pascalName = type.
|
|
2159
|
+
var pascalName = type.ru_1.du();
|
|
2174
2160
|
var tmp_0;
|
|
2175
2161
|
if (startsWith(pascalName, 'Wirespec.')) {
|
|
2176
|
-
tmp_0 = type.
|
|
2162
|
+
tmp_0 = type.uu(Companion_getInstance().au(removePrefix(pascalName, 'Wirespec.')));
|
|
2177
2163
|
} else {
|
|
2178
2164
|
tmp_0 = type;
|
|
2179
2165
|
}
|
|
@@ -2188,38 +2174,38 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2188
2174
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2189
2175
|
if (!(s instanceof ConstructorStatement))
|
|
2190
2176
|
return transformChildren(s, t);
|
|
2191
|
-
var tmp = s.
|
|
2177
|
+
var tmp = s.gu_1;
|
|
2192
2178
|
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.
|
|
2179
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ru_1;
|
|
2180
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.du();
|
|
2195
2181
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2196
|
-
var this_0 = s.
|
|
2182
|
+
var this_0 = s.hu_1;
|
|
2197
2183
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2198
|
-
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.
|
|
2184
|
+
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.c1()));
|
|
2199
2185
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
2200
2186
|
var _iterator__ex2g4s = this_0.m1().t();
|
|
2201
2187
|
while (_iterator__ex2g4s.u()) {
|
|
2202
2188
|
var element = _iterator__ex2g4s.v();
|
|
2203
2189
|
var tmp_0 = element.n1();
|
|
2204
|
-
var tmp$ret$4 = t.
|
|
2205
|
-
destination.
|
|
2190
|
+
var tmp$ret$4 = t.z18(element.o1());
|
|
2191
|
+
destination.w2(tmp_0, tmp$ret$4);
|
|
2206
2192
|
}
|
|
2207
2193
|
var transformedArgs = destination;
|
|
2208
|
-
return !(typeName == null) && get_rustResponsePattern().
|
|
2194
|
+
return !(typeName == null) && get_rustResponsePattern().sc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().au('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
2195
|
}
|
|
2210
2196
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2211
2197
|
return function ($this$function) {
|
|
2212
|
-
$this$function.
|
|
2213
|
-
$this$function.
|
|
2214
|
-
$this$function.
|
|
2198
|
+
$this$function.a14('&self', Custom_init_$Create$(''));
|
|
2199
|
+
$this$function.x13(Boolean_instance);
|
|
2200
|
+
$this$function.d14($constraintExpr);
|
|
2215
2201
|
return Unit_instance;
|
|
2216
2202
|
};
|
|
2217
2203
|
}
|
|
2218
2204
|
function buildToStringFunction$lambda($expr) {
|
|
2219
2205
|
return function ($this$function) {
|
|
2220
|
-
$this$function.
|
|
2221
|
-
$this$function.
|
|
2222
|
-
$this$function.
|
|
2206
|
+
$this$function.a14('&self', Custom_init_$Create$(''));
|
|
2207
|
+
$this$function.x13(String_instance);
|
|
2208
|
+
$this$function.d14(new RawExpression($expr));
|
|
2223
2209
|
return Unit_instance;
|
|
2224
2210
|
};
|
|
2225
2211
|
}
|
|
@@ -2227,10 +2213,10 @@ function generateApiStructCode$lambda(segment) {
|
|
|
2227
2213
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2228
2214
|
var tmp;
|
|
2229
2215
|
if (segment instanceof Literal) {
|
|
2230
|
-
tmp = segment.
|
|
2216
|
+
tmp = segment.e1b_1;
|
|
2231
2217
|
} else {
|
|
2232
2218
|
if (segment instanceof Param) {
|
|
2233
|
-
tmp = '{' + segment.
|
|
2219
|
+
tmp = '{' + segment.nr_1.o1() + '}';
|
|
2234
2220
|
} else {
|
|
2235
2221
|
noWhenBranchMatchedException();
|
|
2236
2222
|
}
|
|
@@ -2241,39 +2227,39 @@ var properties_initialized_RustIrTransformer_kt_hr6k9w;
|
|
|
2241
2227
|
function _init_properties_RustIrTransformer_kt__rrvmwq() {
|
|
2242
2228
|
if (!properties_initialized_RustIrTransformer_kt_hr6k9w) {
|
|
2243
2229
|
properties_initialized_RustIrTransformer_kt_hr6k9w = true;
|
|
2244
|
-
rustSelfParam = new Parameter(Companion_getInstance().
|
|
2230
|
+
rustSelfParam = new Parameter(Companion_getInstance().au('&self'), Custom_init_$Create$(''));
|
|
2245
2231
|
rustResponsePattern = Regex_init_$Create$('Response(\\d+|Default)');
|
|
2246
2232
|
}
|
|
2247
2233
|
}
|
|
2248
2234
|
function borrowParamsOf($this, fn) {
|
|
2249
2235
|
// Inline function 'kotlin.collections.map' call
|
|
2250
|
-
var this_0 = fn.
|
|
2236
|
+
var this_0 = fn.tx_1;
|
|
2251
2237
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2252
2238
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2253
2239
|
var _iterator__ex2g4s = this_0.t();
|
|
2254
2240
|
while (_iterator__ex2g4s.u()) {
|
|
2255
2241
|
var item = _iterator__ex2g4s.v();
|
|
2256
2242
|
var tmp;
|
|
2257
|
-
if (RustTransform_getInstance().
|
|
2243
|
+
if (RustTransform_getInstance().c39(item.oz_1)) {
|
|
2258
2244
|
tmp = item;
|
|
2259
2245
|
} else {
|
|
2260
|
-
tmp = item.
|
|
2246
|
+
tmp = item.sz(VOID, applyBorrowRule(RustTransform_getInstance(), item.pz_1));
|
|
2261
2247
|
}
|
|
2262
2248
|
var tmp$ret$2 = tmp;
|
|
2263
2249
|
destination.x(tmp$ret$2);
|
|
2264
2250
|
}
|
|
2265
|
-
return fn.
|
|
2251
|
+
return fn.dy(VOID, VOID, destination);
|
|
2266
2252
|
}
|
|
2267
2253
|
function applyBorrowRule($this, type) {
|
|
2268
2254
|
var tmp;
|
|
2269
2255
|
if (type instanceof Nullable) {
|
|
2270
|
-
tmp = new Nullable(applyBorrowRule($this, type.
|
|
2256
|
+
tmp = new Nullable(applyBorrowRule($this, type.vu_1));
|
|
2271
2257
|
} else {
|
|
2272
2258
|
if (equals(type, String_instance)) {
|
|
2273
2259
|
tmp = Custom_init_$Create$('&str');
|
|
2274
2260
|
} else {
|
|
2275
2261
|
if (type instanceof Custom) {
|
|
2276
|
-
tmp = $this.
|
|
2262
|
+
tmp = $this.f39(type) ? type : $this.e39(type) ? borrowImpl(type) : $this.d39(type) ? ownedImpl(type) : type;
|
|
2277
2263
|
} else {
|
|
2278
2264
|
tmp = type;
|
|
2279
2265
|
}
|
|
@@ -2285,15 +2271,15 @@ function toBorrowedRaw($this, $receiver) {
|
|
|
2285
2271
|
return new RawExpression('&' + toRawCode($this, $receiver));
|
|
2286
2272
|
}
|
|
2287
2273
|
function sanitizeKeywords_0($this, $receiver) {
|
|
2288
|
-
return Companion_getInstance_0().
|
|
2274
|
+
return Companion_getInstance_0().n37().i1($receiver) ? 'r#' + $receiver : $receiver;
|
|
2289
2275
|
}
|
|
2290
2276
|
function toRawCode($this, $receiver) {
|
|
2291
2277
|
var tmp;
|
|
2292
2278
|
if ($receiver instanceof VariableReference) {
|
|
2293
|
-
tmp = sanitizeKeywords_0($this, $receiver.
|
|
2279
|
+
tmp = sanitizeKeywords_0($this, $receiver.ev_1.eu());
|
|
2294
2280
|
} else {
|
|
2295
2281
|
if ($receiver instanceof FieldCall) {
|
|
2296
|
-
var tmp1_safe_receiver = $receiver.
|
|
2282
|
+
var tmp1_safe_receiver = $receiver.kz_1;
|
|
2297
2283
|
var tmp_0;
|
|
2298
2284
|
if (tmp1_safe_receiver == null) {
|
|
2299
2285
|
tmp_0 = null;
|
|
@@ -2303,20 +2289,20 @@ function toRawCode($this, $receiver) {
|
|
|
2303
2289
|
}
|
|
2304
2290
|
var tmp2_elvis_lhs = tmp_0;
|
|
2305
2291
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2306
|
-
tmp = recv + sanitizeKeywords_0($this, $receiver.
|
|
2292
|
+
tmp = recv + sanitizeKeywords_0($this, $receiver.lz_1.eu());
|
|
2307
2293
|
} else {
|
|
2308
2294
|
if ($receiver instanceof ArrayIndexCall) {
|
|
2309
|
-
var tmp_1 = $receiver.
|
|
2295
|
+
var tmp_1 = $receiver.c10_1;
|
|
2310
2296
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2311
2297
|
var tmp_2;
|
|
2312
2298
|
var tmp_3;
|
|
2313
2299
|
if (!(lit == null)) {
|
|
2314
2300
|
var tmp_4;
|
|
2315
|
-
var tmp_5 = lit.
|
|
2301
|
+
var tmp_5 = lit.wy_1;
|
|
2316
2302
|
if (tmp_5 instanceof Integer) {
|
|
2317
2303
|
tmp_4 = true;
|
|
2318
2304
|
} else {
|
|
2319
|
-
var tmp_6 = lit.
|
|
2305
|
+
var tmp_6 = lit.wy_1;
|
|
2320
2306
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2321
2307
|
}
|
|
2322
2308
|
tmp_3 = tmp_4;
|
|
@@ -2324,31 +2310,31 @@ function toRawCode($this, $receiver) {
|
|
|
2324
2310
|
tmp_3 = false;
|
|
2325
2311
|
}
|
|
2326
2312
|
if (tmp_3) {
|
|
2327
|
-
tmp_2 = toString_0(lit.
|
|
2313
|
+
tmp_2 = toString_0(lit.vy_1);
|
|
2328
2314
|
} else {
|
|
2329
2315
|
var tmp_7;
|
|
2330
2316
|
if (!(lit == null)) {
|
|
2331
|
-
var tmp_8 = lit.
|
|
2317
|
+
var tmp_8 = lit.wy_1;
|
|
2332
2318
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2333
2319
|
} else {
|
|
2334
2320
|
tmp_7 = false;
|
|
2335
2321
|
}
|
|
2336
2322
|
if (tmp_7) {
|
|
2337
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2323
|
+
tmp_2 = '"' + toString_0(lit.vy_1) + '"';
|
|
2338
2324
|
} else {
|
|
2339
|
-
tmp_2 = toRawCode($this, $receiver.
|
|
2325
|
+
tmp_2 = toRawCode($this, $receiver.c10_1);
|
|
2340
2326
|
}
|
|
2341
2327
|
}
|
|
2342
2328
|
var idx = tmp_2;
|
|
2343
|
-
tmp = toRawCode($this, $receiver.
|
|
2329
|
+
tmp = toRawCode($this, $receiver.b10_1) + '[' + idx + ']';
|
|
2344
2330
|
} else {
|
|
2345
2331
|
if ($receiver instanceof ConstructorStatement) {
|
|
2346
|
-
var tmp_9 = $receiver.
|
|
2332
|
+
var tmp_9 = $receiver.gu_1;
|
|
2347
2333
|
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.
|
|
2334
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.ru_1;
|
|
2335
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.du();
|
|
2336
|
+
var typeName = tmp5_elvis_lhs == null ? toString_0($receiver.gu_1) : tmp5_elvis_lhs;
|
|
2337
|
+
var tmp_10 = $receiver.hu_1.m1();
|
|
2352
2338
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2353
2339
|
var tmp_11;
|
|
2354
2340
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2361,23 +2347,23 @@ function toRawCode($this, $receiver) {
|
|
|
2361
2347
|
} else {
|
|
2362
2348
|
if ($receiver instanceof Literal_0) {
|
|
2363
2349
|
var tmp_12;
|
|
2364
|
-
var tmp_13 = $receiver.
|
|
2350
|
+
var tmp_13 = $receiver.wy_1;
|
|
2365
2351
|
if (tmp_13 instanceof String_1) {
|
|
2366
|
-
tmp_12 = 'String::from("' + toString_0($receiver.
|
|
2352
|
+
tmp_12 = 'String::from("' + toString_0($receiver.vy_1) + '")';
|
|
2367
2353
|
} else {
|
|
2368
|
-
var tmp_14 = $receiver.
|
|
2354
|
+
var tmp_14 = $receiver.wy_1;
|
|
2369
2355
|
if (tmp_14 instanceof Boolean_0) {
|
|
2370
|
-
tmp_12 = toString_0($receiver.
|
|
2356
|
+
tmp_12 = toString_0($receiver.vy_1);
|
|
2371
2357
|
} else {
|
|
2372
|
-
var tmp_15 = $receiver.
|
|
2358
|
+
var tmp_15 = $receiver.wy_1;
|
|
2373
2359
|
if (tmp_15 instanceof Integer) {
|
|
2374
|
-
tmp_12 = toString_0($receiver.
|
|
2360
|
+
tmp_12 = toString_0($receiver.vy_1);
|
|
2375
2361
|
} else {
|
|
2376
|
-
var tmp_16 = $receiver.
|
|
2362
|
+
var tmp_16 = $receiver.wy_1;
|
|
2377
2363
|
if (tmp_16 instanceof Number_0) {
|
|
2378
|
-
tmp_12 = toString_0($receiver.
|
|
2364
|
+
tmp_12 = toString_0($receiver.vy_1);
|
|
2379
2365
|
} else {
|
|
2380
|
-
tmp_12 = toString_0($receiver.
|
|
2366
|
+
tmp_12 = toString_0($receiver.vy_1);
|
|
2381
2367
|
}
|
|
2382
2368
|
}
|
|
2383
2369
|
}
|
|
@@ -2385,7 +2371,7 @@ function toRawCode($this, $receiver) {
|
|
|
2385
2371
|
tmp = tmp_12;
|
|
2386
2372
|
} else {
|
|
2387
2373
|
if ($receiver instanceof RawExpression) {
|
|
2388
|
-
tmp = $receiver.
|
|
2374
|
+
tmp = $receiver.gy_1;
|
|
2389
2375
|
} else {
|
|
2390
2376
|
// Inline function 'kotlin.error' call
|
|
2391
2377
|
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression($receiver).o();
|
|
@@ -2431,11 +2417,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2431
2417
|
var tmp;
|
|
2432
2418
|
if (element instanceof Interface) {
|
|
2433
2419
|
var tmp_0;
|
|
2434
|
-
if (element.
|
|
2420
|
+
if (element.rv_1.equals(Companion_getInstance().au('Call'))) {
|
|
2435
2421
|
tmp_0 = element;
|
|
2436
2422
|
} else {
|
|
2437
2423
|
// Inline function 'kotlin.collections.map' call
|
|
2438
|
-
var this_0 = element.
|
|
2424
|
+
var this_0 = element.sv_1;
|
|
2439
2425
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2440
2426
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2441
2427
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2451,7 +2437,7 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2451
2437
|
destination.x(tmp$ret$2);
|
|
2452
2438
|
}
|
|
2453
2439
|
var borrowed = destination;
|
|
2454
|
-
tmp_0 = transformChildren_0(element.
|
|
2440
|
+
tmp_0 = transformChildren_0(element.zv(VOID, borrowed), tr);
|
|
2455
2441
|
}
|
|
2456
2442
|
tmp = tmp_0;
|
|
2457
2443
|
} else {
|
|
@@ -2467,13 +2453,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2467
2453
|
var tmp;
|
|
2468
2454
|
var tmp_0;
|
|
2469
2455
|
if (s instanceof FunctionCall) {
|
|
2470
|
-
tmp_0 = RustTransform_getInstance().
|
|
2456
|
+
tmp_0 = RustTransform_getInstance().y38_1.i1(s.qy_1.eu());
|
|
2471
2457
|
} else {
|
|
2472
2458
|
tmp_0 = false;
|
|
2473
2459
|
}
|
|
2474
2460
|
if (tmp_0) {
|
|
2475
2461
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2476
|
-
var this_0 = s.
|
|
2462
|
+
var this_0 = s.ry_1.m1();
|
|
2477
2463
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2478
2464
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2479
2465
|
var index = 0;
|
|
@@ -2487,13 +2473,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2487
2473
|
var key = item.n1();
|
|
2488
2474
|
// Inline function 'kotlin.collections.component2' call
|
|
2489
2475
|
var value = item.o1();
|
|
2490
|
-
var transformed = t.
|
|
2476
|
+
var transformed = t.z18(value);
|
|
2491
2477
|
var tmp_1;
|
|
2492
2478
|
var tmp_2;
|
|
2493
2479
|
if (idx === 0) {
|
|
2494
2480
|
var tmp_3;
|
|
2495
2481
|
if (transformed instanceof VariableReference) {
|
|
2496
|
-
tmp_3 = transformed.
|
|
2482
|
+
tmp_3 = transformed.ev_1.bu() === 'it';
|
|
2497
2483
|
} else {
|
|
2498
2484
|
tmp_3 = false;
|
|
2499
2485
|
}
|
|
@@ -2510,20 +2496,20 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2510
2496
|
destination.x(tmp$ret$2);
|
|
2511
2497
|
}
|
|
2512
2498
|
var newArgs = toMap(destination);
|
|
2513
|
-
tmp = s.
|
|
2499
|
+
tmp = s.uy(VOID, VOID, VOID, newArgs);
|
|
2514
2500
|
} else {
|
|
2515
2501
|
tmp = transformChildren(s, t);
|
|
2516
2502
|
}
|
|
2517
2503
|
return tmp;
|
|
2518
2504
|
}
|
|
2519
2505
|
function RustTransform$rustName$lambda(it) {
|
|
2520
|
-
return RustTransform_getInstance().
|
|
2506
|
+
return RustTransform_getInstance().a39(it);
|
|
2521
2507
|
}
|
|
2522
2508
|
function RustTransform$rustName$lambda_0(it) {
|
|
2523
|
-
return RustTransform_getInstance().
|
|
2509
|
+
return RustTransform_getInstance().a39(it);
|
|
2524
2510
|
}
|
|
2525
2511
|
function RustTransform$toRawCode$lambda(it) {
|
|
2526
|
-
return it.n1().
|
|
2512
|
+
return it.n1().eu() + ': ' + toRawCode(RustTransform_getInstance(), it.o1());
|
|
2527
2513
|
}
|
|
2528
2514
|
function RustTransform() {
|
|
2529
2515
|
RustTransform_instance = this;
|
|
@@ -2531,57 +2517,57 @@ function RustTransform() {
|
|
|
2531
2517
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2532
2518
|
// Inline function 'kotlin.apply' call
|
|
2533
2519
|
var this_0 = new TransformerBuilder();
|
|
2534
|
-
this_0.
|
|
2535
|
-
tmp.
|
|
2520
|
+
this_0.k19(RustTransform$primitivesToCustom$lambda);
|
|
2521
|
+
tmp.v38_1 = this_0.t19();
|
|
2536
2522
|
var tmp_0 = this;
|
|
2537
2523
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2538
2524
|
// Inline function 'kotlin.apply' call
|
|
2539
2525
|
var this_1 = new TransformerBuilder();
|
|
2540
|
-
this_1.
|
|
2541
|
-
tmp_0.
|
|
2526
|
+
this_1.y19(RustTransform$borrow$lambda);
|
|
2527
|
+
tmp_0.w38_1 = this_1.t19();
|
|
2542
2528
|
var tmp_1 = this;
|
|
2543
2529
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2544
2530
|
// Inline function 'kotlin.apply' call
|
|
2545
|
-
tmp_1.
|
|
2546
|
-
this.
|
|
2531
|
+
tmp_1.x38_1 = (new TransformerBuilder()).t19();
|
|
2532
|
+
this.y38_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2547
2533
|
var tmp_2 = this;
|
|
2548
2534
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2549
2535
|
// Inline function 'kotlin.apply' call
|
|
2550
2536
|
var this_2 = new TransformerBuilder();
|
|
2551
|
-
this_2.
|
|
2552
|
-
tmp_2.
|
|
2537
|
+
this_2.w19(RustTransform$serializationArgs$lambda);
|
|
2538
|
+
tmp_2.z38_1 = this_2.t19();
|
|
2553
2539
|
}
|
|
2554
|
-
protoOf(RustTransform).
|
|
2540
|
+
protoOf(RustTransform).b39 = function (element) {
|
|
2555
2541
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2556
2542
|
var scope = new TransformScope(element);
|
|
2557
|
-
scope.
|
|
2558
|
-
var tmp = scope.
|
|
2543
|
+
scope.j19(RustTransform_getInstance().v38_1);
|
|
2544
|
+
var tmp = scope.e19_1;
|
|
2559
2545
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2560
2546
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2561
2547
|
var scope_0 = new TransformScope(this_0);
|
|
2562
|
-
scope_0.
|
|
2563
|
-
var tmp_0 = scope_0.
|
|
2548
|
+
scope_0.j19(RustTransform_getInstance().w38_1);
|
|
2549
|
+
var tmp_0 = scope_0.e19_1;
|
|
2564
2550
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2565
2551
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2566
2552
|
var scope_1 = new TransformScope(this_1);
|
|
2567
|
-
scope_1.
|
|
2568
|
-
var tmp_1 = scope_1.
|
|
2553
|
+
scope_1.j19(RustTransform_getInstance().x38_1);
|
|
2554
|
+
var tmp_1 = scope_1.e19_1;
|
|
2569
2555
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2570
2556
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2571
2557
|
var scope_2 = new TransformScope(this_2);
|
|
2572
|
-
scope_2.
|
|
2573
|
-
var tmp_2 = scope_2.
|
|
2558
|
+
scope_2.j19(RustTransform_getInstance().z38_1);
|
|
2559
|
+
var tmp_2 = scope_2.e19_1;
|
|
2574
2560
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2575
2561
|
};
|
|
2576
|
-
protoOf(RustTransform).
|
|
2562
|
+
protoOf(RustTransform).a39 = function (_this__u8e3s4) {
|
|
2577
2563
|
var tmp;
|
|
2578
2564
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2579
|
-
var pascalName = _this__u8e3s4.
|
|
2565
|
+
var pascalName = _this__u8e3s4.ru_1.du();
|
|
2580
2566
|
var tmp_0;
|
|
2581
|
-
if (_this__u8e3s4.
|
|
2567
|
+
if (_this__u8e3s4.su_1.r()) {
|
|
2582
2568
|
tmp_0 = pascalName;
|
|
2583
2569
|
} else {
|
|
2584
|
-
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.
|
|
2570
|
+
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.su_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda) + '>';
|
|
2585
2571
|
}
|
|
2586
2572
|
tmp = tmp_0;
|
|
2587
2573
|
} else {
|
|
@@ -2589,13 +2575,13 @@ protoOf(RustTransform).m36 = function (_this__u8e3s4) {
|
|
|
2589
2575
|
tmp = 'String';
|
|
2590
2576
|
} else {
|
|
2591
2577
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2592
|
-
tmp = 'Option<' + this.
|
|
2578
|
+
tmp = 'Option<' + this.a39(_this__u8e3s4.vu_1) + '>';
|
|
2593
2579
|
} else {
|
|
2594
2580
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2595
|
-
tmp = 'Vec<' + this.
|
|
2581
|
+
tmp = 'Vec<' + this.a39(_this__u8e3s4.mu_1) + '>';
|
|
2596
2582
|
} else {
|
|
2597
2583
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2598
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2584
|
+
tmp = 'std::collections::HashMap<' + this.a39(_this__u8e3s4.ou_1) + ', ' + this.a39(_this__u8e3s4.pu_1) + '>';
|
|
2599
2585
|
} else {
|
|
2600
2586
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2601
2587
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2617,7 +2603,7 @@ protoOf(RustTransform).m36 = function (_this__u8e3s4) {
|
|
|
2617
2603
|
} else {
|
|
2618
2604
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2619
2605
|
var tmp_1;
|
|
2620
|
-
switch (_this__u8e3s4.
|
|
2606
|
+
switch (_this__u8e3s4.ku_1.f3_1) {
|
|
2621
2607
|
case 0:
|
|
2622
2608
|
tmp_1 = 'i32';
|
|
2623
2609
|
break;
|
|
@@ -2632,7 +2618,7 @@ protoOf(RustTransform).m36 = function (_this__u8e3s4) {
|
|
|
2632
2618
|
} else {
|
|
2633
2619
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2634
2620
|
var tmp_2;
|
|
2635
|
-
switch (_this__u8e3s4.
|
|
2621
|
+
switch (_this__u8e3s4.lu_1.f3_1) {
|
|
2636
2622
|
case 0:
|
|
2637
2623
|
tmp_2 = 'f32';
|
|
2638
2624
|
break;
|
|
@@ -2652,7 +2638,7 @@ protoOf(RustTransform).m36 = function (_this__u8e3s4) {
|
|
|
2652
2638
|
tmp = 'String';
|
|
2653
2639
|
} else {
|
|
2654
2640
|
if (_this__u8e3s4 instanceof Function) {
|
|
2655
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2641
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.yu_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.a39(_this__u8e3s4.zu_1) + '>';
|
|
2656
2642
|
} else {
|
|
2657
2643
|
noWhenBranchMatchedException();
|
|
2658
2644
|
}
|
|
@@ -2673,27 +2659,27 @@ protoOf(RustTransform).m36 = function (_this__u8e3s4) {
|
|
|
2673
2659
|
}
|
|
2674
2660
|
return tmp;
|
|
2675
2661
|
};
|
|
2676
|
-
protoOf(RustTransform).
|
|
2662
|
+
protoOf(RustTransform).f39 = function (_this__u8e3s4) {
|
|
2677
2663
|
var tmp;
|
|
2678
2664
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2679
2665
|
// Inline function 'kotlin.let' call
|
|
2680
|
-
var it = _this__u8e3s4.
|
|
2666
|
+
var it = _this__u8e3s4.ru_1.du();
|
|
2681
2667
|
tmp = startsWith(it, '&') || startsWith(it, '&dyn ') || startsWith(it, '&impl ') || startsWith(it, '&mut ');
|
|
2682
2668
|
} else {
|
|
2683
2669
|
tmp = false;
|
|
2684
2670
|
}
|
|
2685
2671
|
return tmp;
|
|
2686
2672
|
};
|
|
2687
|
-
protoOf(RustTransform).
|
|
2673
|
+
protoOf(RustTransform).e39 = function (_this__u8e3s4) {
|
|
2688
2674
|
// Inline function 'kotlin.let' call
|
|
2689
|
-
var it = _this__u8e3s4.
|
|
2675
|
+
var it = _this__u8e3s4.ru_1.du();
|
|
2690
2676
|
return it === 'Serializer' || it === 'Deserializer';
|
|
2691
2677
|
};
|
|
2692
|
-
protoOf(RustTransform).
|
|
2693
|
-
return _this__u8e3s4.
|
|
2678
|
+
protoOf(RustTransform).d39 = function (_this__u8e3s4) {
|
|
2679
|
+
return _this__u8e3s4.ru_1.du() === 'GeneratorField';
|
|
2694
2680
|
};
|
|
2695
|
-
protoOf(RustTransform).
|
|
2696
|
-
var v = _this__u8e3s4.
|
|
2681
|
+
protoOf(RustTransform).c39 = function (_this__u8e3s4) {
|
|
2682
|
+
var v = _this__u8e3s4.bu();
|
|
2697
2683
|
switch (v) {
|
|
2698
2684
|
case 'self':
|
|
2699
2685
|
case '&self':
|
|
@@ -2709,22 +2695,22 @@ function RustTransform_getInstance() {
|
|
|
2709
2695
|
return RustTransform_instance;
|
|
2710
2696
|
}
|
|
2711
2697
|
function borrow(_this__u8e3s4) {
|
|
2712
|
-
return _this__u8e3s4.
|
|
2698
|
+
return _this__u8e3s4.uu(new Name(listOf('&' + _this__u8e3s4.ru_1.du())));
|
|
2713
2699
|
}
|
|
2714
2700
|
function borrowDyn(_this__u8e3s4) {
|
|
2715
|
-
return _this__u8e3s4.
|
|
2701
|
+
return _this__u8e3s4.uu(new Name(listOf('&dyn ' + _this__u8e3s4.ru_1.du())));
|
|
2716
2702
|
}
|
|
2717
2703
|
function borrowImpl(_this__u8e3s4) {
|
|
2718
|
-
return _this__u8e3s4.
|
|
2704
|
+
return _this__u8e3s4.uu(new Name(listOf('&impl ' + _this__u8e3s4.ru_1.du())));
|
|
2719
2705
|
}
|
|
2720
2706
|
function ownedImpl(_this__u8e3s4) {
|
|
2721
|
-
return _this__u8e3s4.
|
|
2707
|
+
return _this__u8e3s4.uu(new Name(listOf('impl ' + _this__u8e3s4.ru_1.du())));
|
|
2722
2708
|
}
|
|
2723
2709
|
//region block: post-declaration
|
|
2724
|
-
protoOf(RustEmitter).
|
|
2725
|
-
protoOf(RustEmitter).
|
|
2726
|
-
protoOf(RustEmitter).
|
|
2727
|
-
protoOf(RustEmitter).
|
|
2710
|
+
protoOf(RustEmitter).i1b = get_extensions;
|
|
2711
|
+
protoOf(RustEmitter).uo = emit_1;
|
|
2712
|
+
protoOf(RustEmitter).k1b = beforeGenerate;
|
|
2713
|
+
protoOf(RustEmitter).wp = get_supportsDefaults;
|
|
2728
2714
|
//endregion
|
|
2729
2715
|
//region block: exports
|
|
2730
2716
|
export {
|