@flock/wirespec 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +13 -13
- package/arrow-arrow-atomic.mjs.map +1 -1
- package/arrow-arrow-core.mjs +166 -167
- package/arrow-arrow-core.mjs.map +1 -1
- package/clikt-clikt-mordant.mjs +88 -88
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1545 -1547
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +463 -463
- package/colormath-root-colormath.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +1192 -1311
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10323 -10296
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1811 -1815
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +454 -454
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1985 -1993
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1768 -1737
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1357 -1360
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +26678 -4523
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +373 -469
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +322 -377
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +345 -344
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +738 -736
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +357 -357
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +472 -459
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +211 -128
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +403 -336
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +713 -708
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +267 -0
- package/wirespec-src-converter-common.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +1156 -1086
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1720 -1634
- package/wirespec-src-ide-lsp.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +274 -233
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +153 -128
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-npm.d.mts +23 -10
- package/wirespec-src-plugin-npm.mjs +79 -81
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +59 -51
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +0 -18912
- package/wirespec-src-compiler-ir.mjs.map +0 -1
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
|
|
4
4
|
split2bvyvnrlcifjv as split,
|
|
5
5
|
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
6
|
-
ArrayList_init_$Create$
|
|
6
|
+
ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$,
|
|
7
7
|
checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
|
|
8
|
-
|
|
8
|
+
Unit_instancev9v8hjid95df as Unit_instance,
|
|
9
9
|
joinToString1cxrrlmo0chqs as joinToString,
|
|
10
|
-
StringBuilder_init_$Create$
|
|
10
|
+
StringBuilder_init_$Create$3ds9zx2kx9u4d as StringBuilder_init_$Create$,
|
|
11
11
|
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
12
12
|
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
13
13
|
isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
|
|
14
|
-
|
|
14
|
+
_Char___init__impl__6a9atx2gndcvjvc5pke as _Char___init__impl__6a9atx,
|
|
15
15
|
firstOrNulltrxqttxfxqju as firstOrNull,
|
|
16
16
|
isDigit3mimrri4wkzop as isDigit,
|
|
17
17
|
Char19o2r8palgjof as Char,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
toMap1vec9topfei08 as toMap,
|
|
31
31
|
setOf45ia9pnfhe90 as setOf,
|
|
32
32
|
minus165a8u1e0x1lu as minus,
|
|
33
|
-
ArrayList_init_$Create$
|
|
33
|
+
ArrayList_init_$Create$37gc04va6yfo2 as ArrayList_init_$Create$_0,
|
|
34
34
|
first58ocm7j58k3q as first,
|
|
35
35
|
listOfvhqybd2zx248 as listOf,
|
|
36
36
|
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
charCodeAt1yspne1d8erbm as charCodeAt,
|
|
48
48
|
uppercaseChar6lahngw3wvwg as uppercaseChar,
|
|
49
49
|
substring3saq8ornu0luv as substring,
|
|
50
|
-
|
|
50
|
+
toString22rbkbhdb5cl2 as toString,
|
|
51
51
|
lazy2hsh8ze7j6ikd as lazy,
|
|
52
52
|
listOf1jh22dvmctj1r as listOf_0,
|
|
53
53
|
mapOf1xd03cq9cnmy8 as mapOf,
|
|
@@ -62,147 +62,147 @@ import {
|
|
|
62
62
|
mapsbvh18eqox7a as map,
|
|
63
63
|
distinct17vua5ffe1cfv as distinct,
|
|
64
64
|
toListx6x8nvfmvvht as toList,
|
|
65
|
-
LinkedHashSet_init_$Create$
|
|
65
|
+
LinkedHashSet_init_$Create$t7gzf3ihb6pk as LinkedHashSet_init_$Create$,
|
|
66
66
|
distinct10qe1scfdvu5k as distinct_0,
|
|
67
67
|
toSet2orjxp16sotqu as toSet,
|
|
68
|
-
HashSet_init_$Create$
|
|
69
|
-
Regex_init_$Create$
|
|
68
|
+
HashSet_init_$Create$2w31ptb4ree5i as HashSet_init_$Create$,
|
|
69
|
+
Regex_init_$Create$17zqsmfd15n8x as Regex_init_$Create$,
|
|
70
70
|
trimIndent1qytc1wvt8suh as trimIndent,
|
|
71
71
|
contains3ue2qo8xhmpf1 as contains,
|
|
72
72
|
removePrefix279df90bhrqqg as removePrefix,
|
|
73
73
|
mapCapacity1h45rc3eh9p2l as mapCapacity,
|
|
74
|
-
LinkedHashMap_init_$Create$
|
|
74
|
+
LinkedHashMap_init_$Create$1gzy1x4a46gd4 as LinkedHashMap_init_$Create$,
|
|
75
75
|
mapOf2zpbbmyqk8xpf as mapOf_0,
|
|
76
76
|
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
77
77
|
getKClassFromExpression348iqjl4fnx2f as getKClassFromExpression,
|
|
78
78
|
toString1pkumu07cwy4m as toString_0,
|
|
79
|
-
IllegalStateException_init_$Create$
|
|
79
|
+
IllegalStateException_init_$Create$1h4bcfod21ri0 as IllegalStateException_init_$Create$,
|
|
80
80
|
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
81
81
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
82
82
|
import {
|
|
83
|
-
|
|
83
|
+
Companion_instance27ueeez2qu1l as Companion_instance,
|
|
84
84
|
FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
Companion_getInstance34fvro4h6bumb as Companion_getInstance,
|
|
86
|
+
Dict27tp4weviyg4b as Dict,
|
|
87
|
+
Array2vay9bq78aua1 as Array_0,
|
|
88
|
+
Nullable3he31tqc4yy1q as Nullable,
|
|
89
|
+
Custom1ct1lu66hij6o as Custom,
|
|
90
|
+
Wildcard_instance1x48vpete4k7w as Wildcard_instance,
|
|
91
|
+
Function6mdi096lkwmv as Function,
|
|
92
|
+
Reflect_instance2hvndzkpwulla as Reflect_instance,
|
|
93
|
+
Any_instance2d4twy8sq7tlx as Any_instance,
|
|
94
|
+
requestParameters17h8t6jwwzr7s as requestParameters,
|
|
95
|
+
RustGenerator_getInstancezg1a9dx9j7v4 as RustGenerator_getInstance,
|
|
96
|
+
Name1ijtblv1phm3y as Name,
|
|
97
|
+
transformChildren34heehtlmzzif as transformChildren,
|
|
98
|
+
sanitizeFieldName333wgwu6tt90n as sanitizeFieldName,
|
|
99
|
+
ConstructorStatement1edouznvc71xv as ConstructorStatement,
|
|
100
|
+
SanitizationConfigunh0ok3qg1q3 as SanitizationConfig,
|
|
101
|
+
Custom_init_$Create$kfegfgqdjj1p as Custom_init_$Create$,
|
|
102
|
+
Namespacex2gpe17ntoag as Namespace,
|
|
103
|
+
File12q75sqvz964e as File,
|
|
104
|
+
transformChildren14suh59vxsgt as transformChildren_0,
|
|
105
|
+
RawElement3huqlgf21e29z as RawElement,
|
|
106
|
+
Enumoqsp4e7al89r as Enum,
|
|
107
|
+
Interface2g99rmjjt5ne as Interface,
|
|
108
|
+
TransformScope3fhztkr2eyk36 as TransformScope,
|
|
109
|
+
TransformerBuilder26pbjl5nmg6wa as TransformerBuilder,
|
|
110
|
+
transformhd96z3w1u5uc as transform,
|
|
111
|
+
Element3p1xrn21d2w4b as Element,
|
|
112
|
+
Function1wme41sk2huri as Function_0,
|
|
113
|
+
sortKey2zu9zi2nc4wzk as sortKey,
|
|
114
|
+
RawExpressionfqemfbo6j6cq as RawExpression,
|
|
115
|
+
transformChildren21ucrga4lv4sn as transformChildren_1,
|
|
116
|
+
Companion_instance21vwhhqsaytqt as Companion_instance_0,
|
|
117
|
+
Companion_instance2oq66qbk0c5g8 as Companion_instance_1,
|
|
118
|
+
FileExtension_Rust_getInstancelfr0mas05dph as FileExtension_Rust_getInstance,
|
|
119
|
+
import3bym2b49e642p as import_0,
|
|
120
|
+
interface44jdw6t56okg as interface_0,
|
|
121
|
+
convert37y165c07dvpq as convert,
|
|
122
|
+
Structakfq94wrq695 as Struct,
|
|
123
|
+
fieldList2mdp34yzu6ln6 as fieldList,
|
|
124
|
+
Import5xihcpubhtyd as Import,
|
|
125
|
+
emit3e40nagyc4qho as emit,
|
|
88
126
|
Endpoint1jsq06yr3xdhp as Endpoint,
|
|
89
127
|
Model1nx3had6rojzt as Model,
|
|
90
128
|
plus3lrm73de10b42 as plus_1,
|
|
129
|
+
emit1w04jgbmswnni as emit_0,
|
|
130
|
+
convertToGenerator115obo0n49kco as convertToGenerator,
|
|
91
131
|
Unionccsavx6nrdr2 as Union,
|
|
132
|
+
convertToGenerator1x32vg5qdleq8 as convertToGenerator_0,
|
|
92
133
|
Refined1lkzc0dg6wey7 as Refined,
|
|
93
|
-
|
|
134
|
+
convertToGenerator33dm40iimoy3x as convertToGenerator_1,
|
|
135
|
+
Enum3l2iuc342kle6 as Enum_0,
|
|
136
|
+
convertToGenerator1arvbkvdv4bro as convertToGenerator_2,
|
|
94
137
|
Type12n1gx16iqtcu as Type,
|
|
138
|
+
sanitizeNames1v55mz1p84psg as sanitizeNames,
|
|
139
|
+
collectCustomTypeNames2atsrip288ol4 as collectCustomTypeNames,
|
|
95
140
|
plus14o24vdaiongg as plus_2,
|
|
141
|
+
convertWithValidation24mbxf4x2u6w4 as convertWithValidation,
|
|
142
|
+
get_fields25a89ltbcl7gz as get_fields,
|
|
143
|
+
injectSelfReceiverToValidate17yidn7t1g367 as injectSelfReceiverToValidate,
|
|
144
|
+
convert1ke01d6gmcvu7 as convert_0,
|
|
145
|
+
sanitizeEnumEntries28cw6g8cmlq5s as sanitizeEnumEntries,
|
|
146
|
+
convert29zpebhuxz599 as convert_1,
|
|
147
|
+
convert39lmqftdnlhsy as convert_2,
|
|
148
|
+
convert333pgxr2q05n as convert_3,
|
|
149
|
+
convert86y6uioox2cl as convert_4,
|
|
150
|
+
convert1o5h4ulxoqycg as convert_5,
|
|
96
151
|
importReferencesy4xv7r53sjjs as importReferences,
|
|
152
|
+
get_extensions1p1y8uybwv35q as get_extensions,
|
|
153
|
+
emit2s9bv7yrx5jcs as emit_1,
|
|
154
|
+
beforeGenerate2eu511tof5fa4 as beforeGenerate,
|
|
155
|
+
get_supportsDefaults2j8lo8mbv0egf as get_supportsDefaults,
|
|
156
|
+
IrEmitter2jy94gp21kviv as IrEmitter,
|
|
157
|
+
Uniontffpdks00nyc as Union_0,
|
|
158
|
+
VariableReferencesji1q1tq3ygo as VariableReference,
|
|
159
|
+
FieldCall2nusnrnm7uuow as FieldCall,
|
|
160
|
+
convertConstraint1tall9wrxeg5k as convertConstraint,
|
|
161
|
+
function3tnfxyozkc8k as function_0,
|
|
97
162
|
String1czvr8pxnm6on as String_0,
|
|
163
|
+
Switch1xeta53lgnle5 as Switch,
|
|
164
|
+
Case35feeoz93frh9 as Case,
|
|
165
|
+
transformChildrenfid5m1x7z1ur as transformChildren_2,
|
|
166
|
+
FunctionCall1a3g4e6bcljl6 as FunctionCall,
|
|
167
|
+
Boolean_instance2uah59h3vb1ch as Boolean_instance,
|
|
168
|
+
String_instance2j5u8j0qc6lge as String_instance,
|
|
98
169
|
Paramvfwnys2w6aj1 as Param,
|
|
99
170
|
Literal331hu9r04vptz as Literal,
|
|
171
|
+
Parameter37d5p43ul6u79 as Parameter,
|
|
172
|
+
Number2bo3d41wdfzde as Number_0,
|
|
173
|
+
Integer3hago8kqppnkb as Integer,
|
|
174
|
+
Booleanz31i2i22ldw9 as Boolean_0,
|
|
175
|
+
String3gpv4dw3d0slq as String_1,
|
|
176
|
+
Literal1ddgfbf7tp4wt as Literal_0,
|
|
177
|
+
ArrayIndexCallza9minnmbuvj as ArrayIndexCall,
|
|
178
|
+
StringLiteral3ok9p8g9pwd8t as StringLiteral,
|
|
179
|
+
IntegerLiteral2ol3gjjph591c as IntegerLiteral,
|
|
180
|
+
Bytes_instance1wj5048pbkky0 as Bytes_instance,
|
|
181
|
+
Unit_instance25jwel3twibm6 as Unit_instance_0,
|
|
100
182
|
} from './wirespec-src-compiler-core.mjs';
|
|
101
|
-
import {
|
|
102
|
-
Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
|
|
103
|
-
Dict22iqrhoo0g8et as Dict,
|
|
104
|
-
Array2goj74t0aak7b as Array_0,
|
|
105
|
-
Nullable3wjn6l6q3h6o as Nullable,
|
|
106
|
-
Custom2si7lto3wompr as Custom,
|
|
107
|
-
Wildcard_instance2ga1ytfwj78ra as Wildcard_instance,
|
|
108
|
-
Function3skv20gkzqsy2 as Function,
|
|
109
|
-
Reflect_instance3i17lxiopj78t as Reflect_instance,
|
|
110
|
-
Any_instance2998xag3cdzh3 as Any_instance,
|
|
111
|
-
requestParameters1z8fdizgtviyb as requestParameters,
|
|
112
|
-
RustGenerator_getInstance1rev22pt9d7o8 as RustGenerator_getInstance,
|
|
113
|
-
Nameoqr8dt2fim9d as Name,
|
|
114
|
-
transformChildren2mszeagj5nq4c as transformChildren,
|
|
115
|
-
sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
|
|
116
|
-
ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
|
|
117
|
-
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
118
|
-
Custom_init_$Create$2enn7oyj71j1t as Custom_init_$Create$,
|
|
119
|
-
Namespace345pal554qu3j as Namespace,
|
|
120
|
-
File3dimy4iqmuock as File,
|
|
121
|
-
transformChildrend9p91tpcqdkx as transformChildren_0,
|
|
122
|
-
RawElement2yts1x2rbem1g as RawElement,
|
|
123
|
-
Enumlszg09mwd24f as Enum_0,
|
|
124
|
-
Interface3pn84xq686t2r as Interface,
|
|
125
|
-
TransformScopeyrd3lf4zrk76 as TransformScope,
|
|
126
|
-
TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
|
|
127
|
-
transform3eti8i2bqvifx as transform,
|
|
128
|
-
Elementitq62jg6fid3 as Element,
|
|
129
|
-
Function21cuq8qizkin7 as Function_0,
|
|
130
|
-
sortKey2uc13shubz5xy as sortKey,
|
|
131
|
-
RawExpression2bo7ldfrptjia as RawExpression,
|
|
132
|
-
transformChildren3n5cjwmxlhwx9 as transformChildren_1,
|
|
133
|
-
import5uhkz67bd8tt as import_0,
|
|
134
|
-
interface24qlavvm81r6z as interface_0,
|
|
135
|
-
convertnty9x0e63d0u as convert,
|
|
136
|
-
Struct39wf79cwtn4ty as Struct,
|
|
137
|
-
fieldList3dg35dj9v5h4v as fieldList,
|
|
138
|
-
Importdjdfxu3pjkxa as Import,
|
|
139
|
-
emit3bzdcd0f6nwtj as emit,
|
|
140
|
-
emitn3eihixilqyh as emit_0,
|
|
141
|
-
convertToGenerator2wzjrmaavxhph as convertToGenerator,
|
|
142
|
-
convertToGeneratorkggw47cqose7 as convertToGenerator_0,
|
|
143
|
-
convertToGenerator3rjr3azp4vdsx as convertToGenerator_1,
|
|
144
|
-
convertToGenerator2msmr3acdd5nx as convertToGenerator_2,
|
|
145
|
-
sanitizeNames2wqmyf8vafp9x as sanitizeNames,
|
|
146
|
-
collectCustomTypeNames373f3lwl9sqd5 as collectCustomTypeNames,
|
|
147
|
-
convertWithValidation3ar3nbcqsbkpn as convertWithValidation,
|
|
148
|
-
injectSelfReceiverToValidate4xgr9r5gl5n3 as injectSelfReceiverToValidate,
|
|
149
|
-
convert11ert2po54h1y as convert_0,
|
|
150
|
-
sanitizeEnumEntries3pphrvzq8r9fn as sanitizeEnumEntries,
|
|
151
|
-
convert37aabdzvtv9vg as convert_1,
|
|
152
|
-
convert17zcptkz4mhr4 as convert_2,
|
|
153
|
-
convert32tuiui3czihh as convert_3,
|
|
154
|
-
convert1cn4bolzoed8c as convert_4,
|
|
155
|
-
convert3ewo9inue7gua as convert_5,
|
|
156
|
-
get_extensions31c4or738wbxz as get_extensions,
|
|
157
|
-
emit1oxjujel6f3jb as emit_1,
|
|
158
|
-
beforeGenerate3o8idb3hey1b0 as beforeGenerate,
|
|
159
|
-
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
160
|
-
Union38f3pecvfcpxh as Union_0,
|
|
161
|
-
VariableReference2vlynnhaw1i64 as VariableReference,
|
|
162
|
-
FieldCall1iz7z2fx2xo4p as FieldCall,
|
|
163
|
-
convertConstraintkgpvomct0x0s as convertConstraint,
|
|
164
|
-
function12vu2kapzno4w as function_0,
|
|
165
|
-
Switch3a1zi3na98deu as Switch,
|
|
166
|
-
Case2i7oahw4alz6h as Case,
|
|
167
|
-
transformChildren2m3cpkz6zusq1 as transformChildren_2,
|
|
168
|
-
FunctionCall30872kpnbr7op as FunctionCall,
|
|
169
|
-
Boolean_instance27opaqtiiiysz as Boolean_instance,
|
|
170
|
-
String_instance3uxvo48ki208u as String_instance,
|
|
171
|
-
Parameteruqoxd4rzw7ga as Parameter,
|
|
172
|
-
Number3azxs9q1cyulb as Number_0,
|
|
173
|
-
Integer1uwg1wvo5lp6z as Integer,
|
|
174
|
-
Boolean3l1woojgw3q17 as Boolean_0,
|
|
175
|
-
String4gxjl3f3e5ya as String_1,
|
|
176
|
-
Literal50s1y3607cdv as Literal_0,
|
|
177
|
-
ArrayIndexCall31gemxjfuldqy as ArrayIndexCall,
|
|
178
|
-
StringLiteral3ffeojfhsbsmg as StringLiteral,
|
|
179
|
-
IntegerLiteral32u4pkji3telv as IntegerLiteral,
|
|
180
|
-
Bytes_instance3edm2lhbrwd51 as Bytes_instance,
|
|
181
|
-
Unit_instanceyaei45a6t5rv as Unit_instance_0,
|
|
182
|
-
} from './wirespec-src-compiler-ir.mjs';
|
|
183
183
|
import {
|
|
184
184
|
NonEmptyList3ak25ihy2gcvs as NonEmptyList,
|
|
185
185
|
toNonEmptyListOrNull2ovnnazjb3msz as toNonEmptyListOrNull,
|
|
186
|
-
|
|
186
|
+
NonEmptyList__plus_impl_xqmb9ex47xkkmsdbi as NonEmptyList__plus_impl_xqmb9,
|
|
187
187
|
} from './arrow-arrow-core.mjs';
|
|
188
188
|
//region block: imports
|
|
189
189
|
//endregion
|
|
190
190
|
//region block: pre-declaration
|
|
191
191
|
initMetadataForCompanion(Companion);
|
|
192
192
|
initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
|
|
193
|
-
initMetadataForClass(
|
|
193
|
+
initMetadataForClass(RustEmitter, 'RustEmitter', RustEmitter, VOID, [IrEmitter]);
|
|
194
194
|
initMetadataForObject(RustTransform, 'RustTransform');
|
|
195
195
|
//endregion
|
|
196
196
|
function _get_sanitizationConfig__sns434($this) {
|
|
197
|
-
var tmp0 = $this.
|
|
197
|
+
var tmp0 = $this.b20_1;
|
|
198
198
|
var tmp = KProperty1;
|
|
199
199
|
// Inline function 'kotlin.getValue' call
|
|
200
|
-
getPropertyCallableRef('sanitizationConfig', 1, tmp,
|
|
200
|
+
getPropertyCallableRef('sanitizationConfig', 1, tmp, RustEmitter$_get_sanitizationConfig_$ref_1dtj2x(), null);
|
|
201
201
|
return tmp0.m1();
|
|
202
202
|
}
|
|
203
|
-
function sanitize($this,
|
|
203
|
+
function sanitize($this, $receiver) {
|
|
204
204
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
205
|
-
var this_0 = split(
|
|
205
|
+
var this_0 = split($receiver.m1(), ['.', ' ']);
|
|
206
206
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
207
207
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
208
208
|
var index = 0;
|
|
@@ -211,8 +211,8 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
211
211
|
var item = _iterator__ex2g4s.v();
|
|
212
212
|
var _unary__edvuaz = index;
|
|
213
213
|
index = _unary__edvuaz + 1 | 0;
|
|
214
|
-
var tmp$ret$
|
|
215
|
-
destination.x(tmp$ret$
|
|
214
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.or(item) : item;
|
|
215
|
+
destination.x(tmp$ret$2);
|
|
216
216
|
}
|
|
217
217
|
// Inline function 'kotlin.text.filter' call
|
|
218
218
|
var tmp0 = joinToString(destination, '');
|
|
@@ -249,27 +249,27 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
249
249
|
// Inline function 'kotlin.let' call
|
|
250
250
|
var it_0 = tmp;
|
|
251
251
|
var tmp_2;
|
|
252
|
-
if (
|
|
252
|
+
if ($receiver instanceof FieldIdentifier) {
|
|
253
253
|
tmp_2 = sanitizeKeywords($this, it_0);
|
|
254
254
|
} else {
|
|
255
255
|
tmp_2 = it_0;
|
|
256
256
|
}
|
|
257
|
-
var tmp$ret$
|
|
258
|
-
return toSnakeCase($this, tmp$ret$
|
|
257
|
+
var tmp$ret$8 = tmp_2;
|
|
258
|
+
return toSnakeCase($this, tmp$ret$8);
|
|
259
259
|
}
|
|
260
|
-
function toSnakeCase($this,
|
|
261
|
-
return Companion_getInstance().
|
|
260
|
+
function toSnakeCase($this, $receiver) {
|
|
261
|
+
return Companion_getInstance().mt($receiver).qt();
|
|
262
262
|
}
|
|
263
|
-
function toPascalCase($this,
|
|
264
|
-
var tmp = split(
|
|
265
|
-
return joinToString(tmp, '', VOID, VOID, VOID, VOID,
|
|
263
|
+
function toPascalCase($this, $receiver) {
|
|
264
|
+
var tmp = split($receiver, ['_']);
|
|
265
|
+
return joinToString(tmp, '', VOID, VOID, VOID, VOID, RustEmitter$toPascalCase$lambda);
|
|
266
266
|
}
|
|
267
|
-
function sanitizeKeywords($this,
|
|
268
|
-
return Companion_getInstance_0().
|
|
267
|
+
function sanitizeKeywords($this, $receiver) {
|
|
268
|
+
return Companion_getInstance_0().y1y().v1($receiver) ? 'r#' + $receiver : $receiver;
|
|
269
269
|
}
|
|
270
|
-
function sanitizeEnum($this,
|
|
270
|
+
function sanitizeEnum($this, $receiver) {
|
|
271
271
|
// Inline function 'kotlin.let' call
|
|
272
|
-
var it = toPascalCase($this, joinToString(split(
|
|
272
|
+
var it = toPascalCase($this, joinToString(split($receiver, ['-', ', ', '.', ' ', '//']), '_'));
|
|
273
273
|
var tmp;
|
|
274
274
|
var tmp0_safe_receiver = firstOrNull(it);
|
|
275
275
|
var tmp_0;
|
|
@@ -286,13 +286,13 @@ function sanitizeEnum($this, _this__u8e3s4) {
|
|
|
286
286
|
}
|
|
287
287
|
return tmp;
|
|
288
288
|
}
|
|
289
|
-
function prependImports($this,
|
|
289
|
+
function prependImports($this, $receiver, imports) {
|
|
290
290
|
var tmp;
|
|
291
291
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
292
292
|
if (!imports.r()) {
|
|
293
|
-
tmp =
|
|
293
|
+
tmp = $receiver.bv(VOID, plus(imports, $receiver.yu_1));
|
|
294
294
|
} else {
|
|
295
|
-
tmp =
|
|
295
|
+
tmp = $receiver;
|
|
296
296
|
}
|
|
297
297
|
return tmp;
|
|
298
298
|
}
|
|
@@ -302,7 +302,7 @@ function containsWildcard($this, type) {
|
|
|
302
302
|
tmp = true;
|
|
303
303
|
} else {
|
|
304
304
|
if (type instanceof Custom) {
|
|
305
|
-
var tmp0 = type.
|
|
305
|
+
var tmp0 = type.hu_1;
|
|
306
306
|
var tmp$ret$0;
|
|
307
307
|
$l$block_0: {
|
|
308
308
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -329,13 +329,13 @@ function containsWildcard($this, type) {
|
|
|
329
329
|
tmp = tmp$ret$0;
|
|
330
330
|
} else {
|
|
331
331
|
if (type instanceof Nullable) {
|
|
332
|
-
tmp = containsWildcard($this, type.
|
|
332
|
+
tmp = containsWildcard($this, type.ku_1);
|
|
333
333
|
} else {
|
|
334
334
|
if (type instanceof Array_0) {
|
|
335
|
-
tmp = containsWildcard($this, type.
|
|
335
|
+
tmp = containsWildcard($this, type.bu_1);
|
|
336
336
|
} else {
|
|
337
337
|
if (type instanceof Dict) {
|
|
338
|
-
tmp = containsWildcard($this, type.
|
|
338
|
+
tmp = containsWildcard($this, type.du_1) || containsWildcard($this, type.eu_1);
|
|
339
339
|
} else {
|
|
340
340
|
tmp = false;
|
|
341
341
|
}
|
|
@@ -357,7 +357,7 @@ function containsUnderiveable($this, type) {
|
|
|
357
357
|
tmp = true;
|
|
358
358
|
} else {
|
|
359
359
|
if (type instanceof Custom) {
|
|
360
|
-
var tmp0 = type.
|
|
360
|
+
var tmp0 = type.hu_1;
|
|
361
361
|
var tmp$ret$0;
|
|
362
362
|
$l$block_0: {
|
|
363
363
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -384,13 +384,13 @@ function containsUnderiveable($this, type) {
|
|
|
384
384
|
tmp = tmp$ret$0;
|
|
385
385
|
} else {
|
|
386
386
|
if (type instanceof Nullable) {
|
|
387
|
-
tmp = containsUnderiveable($this, type.
|
|
387
|
+
tmp = containsUnderiveable($this, type.ku_1);
|
|
388
388
|
} else {
|
|
389
389
|
if (type instanceof Array_0) {
|
|
390
|
-
tmp = containsUnderiveable($this, type.
|
|
390
|
+
tmp = containsUnderiveable($this, type.bu_1);
|
|
391
391
|
} else {
|
|
392
392
|
if (type instanceof Dict) {
|
|
393
|
-
tmp = containsUnderiveable($this, type.
|
|
393
|
+
tmp = containsUnderiveable($this, type.du_1) || containsUnderiveable($this, type.eu_1);
|
|
394
394
|
} else {
|
|
395
395
|
tmp = false;
|
|
396
396
|
}
|
|
@@ -402,24 +402,24 @@ function containsUnderiveable($this, type) {
|
|
|
402
402
|
}
|
|
403
403
|
return tmp;
|
|
404
404
|
}
|
|
405
|
-
function buildClientParams($this,
|
|
406
|
-
var params = requestParameters(
|
|
407
|
-
var argsStr = joinToString(params, ', ', VOID, VOID, VOID, VOID,
|
|
405
|
+
function buildClientParams($this, $receiver) {
|
|
406
|
+
var params = requestParameters($receiver);
|
|
407
|
+
var argsStr = joinToString(params, ', ', VOID, VOID, VOID, VOID, RustEmitter$buildClientParams$lambda($this));
|
|
408
408
|
var tmp;
|
|
409
409
|
if (params.r()) {
|
|
410
410
|
tmp = '';
|
|
411
411
|
} else {
|
|
412
|
-
tmp = ', ' + joinToString(params, ', ', VOID, VOID, VOID, VOID,
|
|
412
|
+
tmp = ', ' + joinToString(params, ', ', VOID, VOID, VOID, VOID, RustEmitter$buildClientParams$lambda_0($this));
|
|
413
413
|
}
|
|
414
414
|
var paramsStr = tmp;
|
|
415
415
|
return to(paramsStr, argsStr);
|
|
416
416
|
}
|
|
417
417
|
function Companion() {
|
|
418
418
|
Companion_instance_2 = this;
|
|
419
|
-
this.
|
|
419
|
+
this.e20_1 = RustGenerator_getInstance();
|
|
420
420
|
}
|
|
421
|
-
protoOf(Companion).
|
|
422
|
-
return this.
|
|
421
|
+
protoOf(Companion).y1y = function () {
|
|
422
|
+
return this.e20_1.f1a_1;
|
|
423
423
|
};
|
|
424
424
|
var Companion_instance_2;
|
|
425
425
|
function Companion_getInstance_0() {
|
|
@@ -428,16 +428,16 @@ function Companion_getInstance_0() {
|
|
|
428
428
|
return Companion_instance_2;
|
|
429
429
|
}
|
|
430
430
|
function sam$kotlin_Comparator$0(function_0) {
|
|
431
|
-
this.
|
|
431
|
+
this.f20_1 = function_0;
|
|
432
432
|
}
|
|
433
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
434
|
-
return this.
|
|
433
|
+
protoOf(sam$kotlin_Comparator$0).wd = function (a, b) {
|
|
434
|
+
return this.f20_1(a, b);
|
|
435
435
|
};
|
|
436
436
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
437
|
-
return this.
|
|
437
|
+
return this.wd(a, b);
|
|
438
438
|
};
|
|
439
439
|
protoOf(sam$kotlin_Comparator$0).m3 = function () {
|
|
440
|
-
return this.
|
|
440
|
+
return this.f20_1;
|
|
441
441
|
};
|
|
442
442
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
443
443
|
var tmp;
|
|
@@ -457,23 +457,23 @@ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
|
457
457
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
458
458
|
return hashCode(this.m3());
|
|
459
459
|
};
|
|
460
|
-
function
|
|
460
|
+
function RustEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
461
461
|
return 'r#' + it;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
return Companion_getInstance().
|
|
463
|
+
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
464
|
+
return Companion_getInstance().mt((new Name(name.kt_1)).qt());
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
var value = name.
|
|
466
|
+
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
467
|
+
var value = name.nt();
|
|
468
468
|
switch (value) {
|
|
469
469
|
case 'self':
|
|
470
470
|
case '&self':
|
|
471
471
|
return name;
|
|
472
472
|
default:
|
|
473
|
-
return Companion_getInstance().
|
|
473
|
+
return Companion_getInstance().mt((new Name(name.kt_1)).qt());
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
477
477
|
var tmp;
|
|
478
478
|
var tmp0_safe_receiver = firstOrNull(it);
|
|
479
479
|
var tmp_0;
|
|
@@ -490,13 +490,13 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
|
490
490
|
}
|
|
491
491
|
return tmp;
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function RustEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
494
494
|
return function (stmt, tr) {
|
|
495
495
|
var tmp;
|
|
496
496
|
if (stmt instanceof ConstructorStatement) {
|
|
497
|
-
var tmp_0 = tr.
|
|
497
|
+
var tmp_0 = tr.c17(stmt.tu_1);
|
|
498
498
|
// Inline function 'kotlin.collections.map' call
|
|
499
|
-
var this_0 = stmt.
|
|
499
|
+
var this_0 = stmt.uu_1;
|
|
500
500
|
// Inline function 'kotlin.collections.mapTo' call
|
|
501
501
|
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
502
502
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -507,7 +507,7 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
507
507
|
var k = item.l1();
|
|
508
508
|
// Inline function 'kotlin.collections.component2' call
|
|
509
509
|
var v = item.m1();
|
|
510
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
510
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.f17(v));
|
|
511
511
|
destination.x(tmp$ret$3);
|
|
512
512
|
}
|
|
513
513
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -517,93 +517,93 @@ function RustIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
517
517
|
return tmp;
|
|
518
518
|
};
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function RustEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
521
521
|
return function () {
|
|
522
|
-
var tmp0_reservedKeywords = minus(Companion_getInstance_0().
|
|
523
|
-
var tmp =
|
|
524
|
-
var tmp_0 =
|
|
525
|
-
var tmp_1 =
|
|
526
|
-
var tmp_2 =
|
|
527
|
-
return new SanitizationConfig(tmp0_reservedKeywords, tmp, tmp_0, tmp_1, tmp_2,
|
|
522
|
+
var tmp0_reservedKeywords = minus(Companion_getInstance_0().y1y(), setOf(['self', 'Self']));
|
|
523
|
+
var tmp = RustEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
524
|
+
var tmp_0 = RustEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
525
|
+
var tmp_1 = RustEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
526
|
+
var tmp_2 = RustEmitter$sanitizationConfig$delegate$lambda$lambda_2;
|
|
527
|
+
return new SanitizationConfig(tmp0_reservedKeywords, tmp, tmp_0, tmp_1, tmp_2, RustEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0), true);
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function RustEmitter$_get_sanitizationConfig_$ref_1dtj2x() {
|
|
531
531
|
return function (p0) {
|
|
532
532
|
return _get_sanitizationConfig__sns434(p0);
|
|
533
533
|
};
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
$this$interface.
|
|
535
|
+
function RustEmitter$emitShared$lambda($this$interface) {
|
|
536
|
+
$this$interface.u15(Custom_init_$Create$('Headers'));
|
|
537
537
|
return Unit_instance;
|
|
538
538
|
}
|
|
539
|
-
function
|
|
540
|
-
$this$interface.
|
|
539
|
+
function RustEmitter$emitShared$lambda_0($this$interface) {
|
|
540
|
+
$this$interface.u15(Custom_init_$Create$('Headers'));
|
|
541
541
|
return Unit_instance;
|
|
542
542
|
}
|
|
543
|
-
function
|
|
544
|
-
$this$interface.
|
|
545
|
-
$this$interface.
|
|
546
|
-
$this$interface.
|
|
543
|
+
function RustEmitter$emitShared$lambda_1($this$interface) {
|
|
544
|
+
$this$interface.u15(Custom_init_$Create$('Sized'));
|
|
545
|
+
$this$interface.q14('label', VOID, VOID, RustEmitter$emitShared$lambda$lambda);
|
|
546
|
+
$this$interface.q14('from_label', true, VOID, RustEmitter$emitShared$lambda$lambda_0);
|
|
547
547
|
return Unit_instance;
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
$this$function.
|
|
551
|
-
$this$function.
|
|
549
|
+
function RustEmitter$emitShared$lambda$lambda($this$function) {
|
|
550
|
+
$this$function.a13('&self', Custom_init_$Create$(''));
|
|
551
|
+
$this$function.z12(Custom_init_$Create$('&str'));
|
|
552
552
|
return Unit_instance;
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
$this$function.
|
|
556
|
-
$this$function.
|
|
554
|
+
function RustEmitter$emitShared$lambda$lambda_0($this$function) {
|
|
555
|
+
$this$function.a13('s', Custom_init_$Create$('&str'));
|
|
556
|
+
$this$function.z12(Custom_init_$Create$('Option<Self>'));
|
|
557
557
|
return Unit_instance;
|
|
558
558
|
}
|
|
559
|
-
function
|
|
560
|
-
$this$interface.
|
|
561
|
-
$this$interface.
|
|
562
|
-
$this$interface.
|
|
559
|
+
function RustEmitter$emitShared$lambda_2($this$interface) {
|
|
560
|
+
$this$interface.y12($this$interface.v13('T', []), []);
|
|
561
|
+
$this$interface.q14('value', VOID, VOID, RustEmitter$emitShared$lambda$lambda_1);
|
|
562
|
+
$this$interface.q14('validate', VOID, VOID, RustEmitter$emitShared$lambda$lambda_2);
|
|
563
563
|
return Unit_instance;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
566
|
-
$this$function.
|
|
567
|
-
$this$function.
|
|
565
|
+
function RustEmitter$emitShared$lambda$lambda_1($this$function) {
|
|
566
|
+
$this$function.a13('&self', Custom_init_$Create$(''));
|
|
567
|
+
$this$function.z12(borrow($this$function.v13('T', [])));
|
|
568
568
|
return Unit_instance;
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
$this$function.
|
|
572
|
-
$this$function.
|
|
570
|
+
function RustEmitter$emitShared$lambda$lambda_2($this$function) {
|
|
571
|
+
$this$function.a13('&self', Custom_init_$Create$(''));
|
|
572
|
+
$this$function.z12($this$function.p13());
|
|
573
573
|
return Unit_instance;
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
$this$interface.
|
|
577
|
-
$this$interface.
|
|
578
|
-
$this$interface.
|
|
579
|
-
$this$interface.
|
|
580
|
-
$this$interface.
|
|
581
|
-
$this$interface.
|
|
575
|
+
function RustEmitter$emitShared$lambda_3($this$interface) {
|
|
576
|
+
$this$interface.y12($this$interface.v13('T', []), []);
|
|
577
|
+
$this$interface.v15('path', borrowDyn($this$interface.v13('Path', [])));
|
|
578
|
+
$this$interface.v15('method', borrow($this$interface.v13('Method', [])));
|
|
579
|
+
$this$interface.v15('queries', borrowDyn($this$interface.v13('Queries', [])));
|
|
580
|
+
$this$interface.v15('headers', borrowDyn($this$interface.v13('RequestHeaders', [])));
|
|
581
|
+
$this$interface.v15('body', borrow($this$interface.v13('T', [])));
|
|
582
582
|
return Unit_instance;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
$this$interface.
|
|
586
|
-
$this$interface.
|
|
587
|
-
$this$interface.
|
|
588
|
-
$this$interface.
|
|
584
|
+
function RustEmitter$emitShared$lambda_4($this$interface) {
|
|
585
|
+
$this$interface.y12($this$interface.v13('T', []), []);
|
|
586
|
+
$this$interface.v15('status', $this$interface.i15());
|
|
587
|
+
$this$interface.v15('headers', borrowDyn($this$interface.v13('ResponseHeaders', [])));
|
|
588
|
+
$this$interface.v15('body', borrow($this$interface.v13('T', [])));
|
|
589
589
|
return Unit_instance;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
592
|
-
$this$interface.
|
|
591
|
+
function RustEmitter$emitShared$lambda_5($this$interface) {
|
|
592
|
+
$this$interface.u14('transport', VOID, VOID, RustEmitter$emitShared$lambda$lambda_3);
|
|
593
593
|
return Unit_instance;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
$this$asyncFunction.
|
|
597
|
-
$this$asyncFunction.
|
|
598
|
-
$this$asyncFunction.
|
|
595
|
+
function RustEmitter$emitShared$lambda$lambda_3($this$asyncFunction) {
|
|
596
|
+
$this$asyncFunction.a13('&self', Custom_init_$Create$(''));
|
|
597
|
+
$this$asyncFunction.a13('request', borrow($this$asyncFunction.v13('RawRequest', [])));
|
|
598
|
+
$this$asyncFunction.z12($this$asyncFunction.v13('RawResponse', []));
|
|
599
599
|
return Unit_instance;
|
|
600
600
|
}
|
|
601
|
-
function
|
|
601
|
+
function RustEmitter$emitShared$lambda_6($rustImports) {
|
|
602
602
|
return function (element, transformer) {
|
|
603
603
|
var tmp;
|
|
604
604
|
if (element instanceof File) {
|
|
605
605
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
606
|
-
var tmp0 = element.
|
|
606
|
+
var tmp0 = element.yu_1;
|
|
607
607
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
608
608
|
var destination = ArrayList_init_$Create$_0();
|
|
609
609
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -614,7 +614,7 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
var namespace = first(destination);
|
|
617
|
-
tmp = element.
|
|
617
|
+
tmp = element.bv(VOID, plus($rustImports, namespace.ev_1));
|
|
618
618
|
} else {
|
|
619
619
|
tmp = element;
|
|
620
620
|
}
|
|
@@ -622,11 +622,11 @@ function RustIrEmitter$emitShared$lambda_6($rustImports) {
|
|
|
622
622
|
return transformChildren_0(transformed, transformer);
|
|
623
623
|
};
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function RustEmitter$emitShared$lambda_7(element, transformer) {
|
|
626
626
|
var tmp;
|
|
627
|
-
if (element instanceof
|
|
627
|
+
if (element instanceof Enum) {
|
|
628
628
|
var tmp_0;
|
|
629
|
-
if (element.
|
|
629
|
+
if (element.ow_1.equals(Companion_getInstance().mt('Method'))) {
|
|
630
630
|
tmp_0 = new RawElement('#[derive(Debug, Clone, Default, PartialEq)]\npub enum Method {\n #[default]\n GET,\n PUT,\n POST,\n DELETE,\n OPTIONS,\n HEAD,\n PATCH,\n TRACE,\n}');
|
|
631
631
|
} else {
|
|
632
632
|
tmp_0 = element;
|
|
@@ -638,24 +638,24 @@ function RustIrEmitter$emitShared$lambda_7(element, transformer) {
|
|
|
638
638
|
var transformed = tmp;
|
|
639
639
|
return transformChildren_0(transformed, transformer);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function RustEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $responseHeaders, $rawElementInterfaces, $client, $server) {
|
|
642
642
|
return function (element, transformer) {
|
|
643
643
|
var tmp;
|
|
644
644
|
if (element instanceof File) {
|
|
645
645
|
// Inline function 'kotlin.collections.flatMap' call
|
|
646
|
-
var tmp0 = element.
|
|
646
|
+
var tmp0 = element.yu_1;
|
|
647
647
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
648
648
|
var destination = ArrayList_init_$Create$_0();
|
|
649
649
|
var _iterator__ex2g4s = tmp0.t();
|
|
650
650
|
while (_iterator__ex2g4s.u()) {
|
|
651
651
|
var element_0 = _iterator__ex2g4s.v();
|
|
652
|
-
var tmp$ret$
|
|
652
|
+
var tmp$ret$3;
|
|
653
653
|
$l$block: {
|
|
654
654
|
if (!(element_0 instanceof Interface)) {
|
|
655
|
-
tmp$ret$
|
|
655
|
+
tmp$ret$3 = listOf(element_0);
|
|
656
656
|
break $l$block;
|
|
657
657
|
}
|
|
658
|
-
var name = element_0.
|
|
658
|
+
var name = element_0.jv_1.pt();
|
|
659
659
|
var tmp_0;
|
|
660
660
|
// Inline function 'kotlin.collections.contains' call
|
|
661
661
|
// Inline function 'kotlin.collections.containsKey' call
|
|
@@ -683,13 +683,13 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
683
683
|
tmp_0 = listOf(element_0);
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
|
-
tmp$ret$
|
|
686
|
+
tmp$ret$3 = tmp_0;
|
|
687
687
|
}
|
|
688
|
-
var list = tmp$ret$
|
|
688
|
+
var list = tmp$ret$3;
|
|
689
689
|
addAll(destination, list);
|
|
690
690
|
}
|
|
691
691
|
var newElements = plus_0(plus_0(destination, $client), $server);
|
|
692
|
-
tmp = element.
|
|
692
|
+
tmp = element.bv(VOID, newElements);
|
|
693
693
|
} else {
|
|
694
694
|
tmp = element;
|
|
695
695
|
}
|
|
@@ -697,22 +697,22 @@ function RustIrEmitter$emitShared$lambda_8($dslTraits, $requestHeaders, $respons
|
|
|
697
697
|
return transformChildren_0(transformed, transformer);
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function RustEmitter$emitShared$lambda_9(element, transformer) {
|
|
701
701
|
var tmp;
|
|
702
702
|
if (element instanceof Interface) {
|
|
703
|
-
// Inline function 'community.flock.wirespec.
|
|
703
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
704
704
|
var scope = new TransformScope(element);
|
|
705
|
-
// Inline function 'community.flock.wirespec.
|
|
705
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
706
706
|
var tmp_0 = scope;
|
|
707
|
-
// Inline function 'community.flock.wirespec.
|
|
708
|
-
var this_0 = scope.
|
|
709
|
-
// Inline function 'community.flock.wirespec.
|
|
707
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
708
|
+
var this_0 = scope.k17_1;
|
|
709
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
710
710
|
// Inline function 'kotlin.apply' call
|
|
711
711
|
var this_1 = new TransformerBuilder();
|
|
712
|
-
this_1.
|
|
713
|
-
var tmp$ret$
|
|
714
|
-
tmp_0.
|
|
715
|
-
var tmp_1 = scope.
|
|
712
|
+
this_1.e18(RustEmitter$emitShared$lambda$lambda_4);
|
|
713
|
+
var tmp$ret$5 = this_1.z17();
|
|
714
|
+
tmp_0.k17_1 = transform(this_0, tmp$ret$5);
|
|
715
|
+
var tmp_1 = scope.k17_1;
|
|
716
716
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
717
717
|
} else {
|
|
718
718
|
tmp = element;
|
|
@@ -720,11 +720,11 @@ function RustIrEmitter$emitShared$lambda_9(element, transformer) {
|
|
|
720
720
|
var transformed = tmp;
|
|
721
721
|
return transformChildren_0(transformed, transformer);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function RustEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
724
724
|
var tmp;
|
|
725
725
|
if (element instanceof Function_0) {
|
|
726
|
-
var tmp0 = element.
|
|
727
|
-
var tmp$ret$
|
|
726
|
+
var tmp0 = element.lx_1;
|
|
727
|
+
var tmp$ret$1;
|
|
728
728
|
$l$block_0: {
|
|
729
729
|
// Inline function 'kotlin.collections.any' call
|
|
730
730
|
var tmp_0;
|
|
@@ -734,96 +734,96 @@ function RustIrEmitter$emitShared$lambda$lambda_4(element, transformer) {
|
|
|
734
734
|
tmp_0 = false;
|
|
735
735
|
}
|
|
736
736
|
if (tmp_0) {
|
|
737
|
-
tmp$ret$
|
|
737
|
+
tmp$ret$1 = false;
|
|
738
738
|
break $l$block_0;
|
|
739
739
|
}
|
|
740
740
|
var _iterator__ex2g4s = tmp0.t();
|
|
741
741
|
while (_iterator__ex2g4s.u()) {
|
|
742
742
|
var element_0 = _iterator__ex2g4s.v();
|
|
743
|
-
if (element_0.
|
|
744
|
-
tmp$ret$
|
|
743
|
+
if (element_0.zy_1.nt() === '&self' || element_0.zy_1.nt() === 'self') {
|
|
744
|
+
tmp$ret$1 = true;
|
|
745
745
|
break $l$block_0;
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
|
-
tmp$ret$
|
|
748
|
+
tmp$ret$1 = false;
|
|
749
749
|
}
|
|
750
|
-
var hasSelf = tmp$ret$
|
|
751
|
-
tmp = hasSelf || element.
|
|
750
|
+
var hasSelf = tmp$ret$1;
|
|
751
|
+
tmp = hasSelf || element.px_1 ? element : element.vx(VOID, VOID, plus(listOf(get_rustSelfParam()), element.lx_1));
|
|
752
752
|
} else {
|
|
753
753
|
tmp = element;
|
|
754
754
|
}
|
|
755
755
|
var transformed = tmp;
|
|
756
756
|
return transformChildren_0(transformed, transformer);
|
|
757
757
|
}
|
|
758
|
-
function
|
|
759
|
-
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID,
|
|
758
|
+
function RustEmitter$emitShared$lambda_10(group) {
|
|
759
|
+
return trimEnd(joinToString(group, '', VOID, VOID, VOID, VOID, RustEmitter$emitShared$lambda$lambda_5), charArrayOf([_Char___init__impl__6a9atx(10)]));
|
|
760
760
|
}
|
|
761
|
-
function
|
|
762
|
-
return RustGenerator_getInstance().
|
|
761
|
+
function RustEmitter$emitShared$lambda$lambda_5(it) {
|
|
762
|
+
return RustGenerator_getInstance().y19(it);
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function RustEmitter$emit$lambda(a, b) {
|
|
765
765
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
766
766
|
var tmp = sortKey(a);
|
|
767
|
-
var tmp$ret$
|
|
768
|
-
return compareValues(tmp, tmp$ret$
|
|
767
|
+
var tmp$ret$2 = sortKey(b);
|
|
768
|
+
return compareValues(tmp, tmp$ret$2);
|
|
769
769
|
}
|
|
770
770
|
function emit$emitMod(this$0, def) {
|
|
771
|
-
return 'pub mod ' + sanitize(this$0, def.
|
|
771
|
+
return 'pub mod ' + sanitize(this$0, def.tr()) + ';';
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function RustEmitter$emit$lambda_0(this$0) {
|
|
774
774
|
return function (it) {
|
|
775
775
|
return emit$emitMod(this$0, it);
|
|
776
776
|
};
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function RustEmitter$emit$lambda_1(this$0) {
|
|
779
779
|
return function (it) {
|
|
780
780
|
return emit$emitMod(this$0, it);
|
|
781
781
|
};
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function RustEmitter$emitGenerator$lambda(it) {
|
|
784
784
|
return startsWith(it, 'Wirespec.') || it === 'Wirespec';
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function RustEmitter$emitGenerator$lambda_0($generatorOwnName) {
|
|
787
787
|
return function (it) {
|
|
788
788
|
return it === $generatorOwnName;
|
|
789
789
|
};
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function RustEmitter$emitGenerator$lambda_1(it) {
|
|
792
792
|
return substringBefore(it, _Char___init__impl__6a9atx(60));
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function RustEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs) {
|
|
795
795
|
return function (expr, t) {
|
|
796
796
|
var tmp;
|
|
797
797
|
var tmp_0;
|
|
798
798
|
var tmp_1;
|
|
799
799
|
if (expr instanceof RawExpression) {
|
|
800
|
-
tmp_1 = endsWith(expr.
|
|
800
|
+
tmp_1 = endsWith(expr.yx_1, 'Generator');
|
|
801
801
|
} else {
|
|
802
802
|
tmp_1 = false;
|
|
803
803
|
}
|
|
804
804
|
if (tmp_1) {
|
|
805
|
-
tmp_0 = !(expr.
|
|
805
|
+
tmp_0 = !(expr.yx_1 === $generatorOwnName);
|
|
806
806
|
} else {
|
|
807
807
|
tmp_0 = false;
|
|
808
808
|
}
|
|
809
809
|
if (tmp_0) {
|
|
810
|
-
$generatorRefs.x(expr.
|
|
810
|
+
$generatorRefs.x(expr.yx_1);
|
|
811
811
|
tmp = Unit_instance;
|
|
812
812
|
}
|
|
813
813
|
return transformChildren_1(expr, t);
|
|
814
814
|
};
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function RustEmitter$emit$lambda_2(this$0) {
|
|
817
817
|
return function (it) {
|
|
818
818
|
return sanitizeKeywords(this$0, sanitizeEnum(this$0, it));
|
|
819
819
|
};
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function RustEmitter$emitClient$lambda(this$0) {
|
|
822
822
|
return function (endpoint) {
|
|
823
|
-
return 'pub mod ' + toSnakeCase(this$0, endpoint.
|
|
823
|
+
return 'pub mod ' + toSnakeCase(this$0, endpoint.vq_1.m1() + 'Client') + ';';
|
|
824
824
|
};
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function RustEmitter$toPascalCase$lambda(s) {
|
|
827
827
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
828
828
|
var tmp;
|
|
829
829
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
@@ -838,105 +838,105 @@ function RustIrEmitter$toPascalCase$lambda(s) {
|
|
|
838
838
|
}
|
|
839
839
|
return tmp;
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function RustEmitter$buildClientParams$lambda(this$0) {
|
|
842
842
|
return function (_destruct__k2r9zo) {
|
|
843
|
-
var name = _destruct__k2r9zo.
|
|
844
|
-
return sanitizeKeywords(this$0, name.
|
|
843
|
+
var name = _destruct__k2r9zo.ve();
|
|
844
|
+
return sanitizeKeywords(this$0, name.qt());
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function RustEmitter$buildClientParams$lambda_0(this$0) {
|
|
848
848
|
return function (_destruct__k2r9zo) {
|
|
849
|
-
var name = _destruct__k2r9zo.
|
|
850
|
-
var type = _destruct__k2r9zo.
|
|
851
|
-
var tmp = sanitizeKeywords(this$0, name.
|
|
849
|
+
var name = _destruct__k2r9zo.ve();
|
|
850
|
+
var type = _destruct__k2r9zo.we();
|
|
851
|
+
var tmp = sanitizeKeywords(this$0, name.qt());
|
|
852
852
|
// Inline function 'kotlin.with' call
|
|
853
|
-
return tmp + ': ' + RustTransform_getInstance().
|
|
853
|
+
return tmp + ': ' + RustTransform_getInstance().l20(type);
|
|
854
854
|
};
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function RustEmitter(packageName, emitShared) {
|
|
857
857
|
Companion_getInstance_0();
|
|
858
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
859
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
858
|
+
packageName = packageName === VOID ? Companion_instance_0.qs('community.flock.wirespec.generated') : packageName;
|
|
859
|
+
emitShared = emitShared === VOID ? Companion_instance_1.xp() : emitShared;
|
|
860
|
+
this.x1z_1 = packageName;
|
|
861
|
+
this.y1z_1 = emitShared;
|
|
862
|
+
this.z1z_1 = RustGenerator_getInstance();
|
|
863
|
+
this.a20_1 = FileExtension_Rust_getInstance();
|
|
864
864
|
var tmp = this;
|
|
865
|
-
tmp.
|
|
866
|
-
this.
|
|
867
|
-
this.
|
|
865
|
+
tmp.b20_1 = lazy(RustEmitter$sanitizationConfig$delegate$lambda(this));
|
|
866
|
+
this.c20_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
867
|
+
this.d20_1 = listOf_0([import_0('super::super::wirespec', '*'), import_0('', 'regex')]);
|
|
868
868
|
}
|
|
869
|
-
protoOf(
|
|
870
|
-
return this.
|
|
869
|
+
protoOf(RustEmitter).x19 = function () {
|
|
870
|
+
return this.z1z_1;
|
|
871
871
|
};
|
|
872
|
-
protoOf(
|
|
873
|
-
return this.
|
|
872
|
+
protoOf(RustEmitter).op = function () {
|
|
873
|
+
return this.a20_1;
|
|
874
874
|
};
|
|
875
|
-
protoOf(
|
|
875
|
+
protoOf(RustEmitter).s19 = function () {
|
|
876
876
|
var rustImports = listOf_0([import_0('std::any', 'TypeId'), import_0('std::collections', 'HashMap')]);
|
|
877
|
-
var requestHeaders = interface_0('RequestHeaders', VOID,
|
|
878
|
-
var responseHeaders = interface_0('ResponseHeaders', VOID,
|
|
877
|
+
var requestHeaders = interface_0('RequestHeaders', VOID, RustEmitter$emitShared$lambda);
|
|
878
|
+
var responseHeaders = interface_0('ResponseHeaders', VOID, RustEmitter$emitShared$lambda_0);
|
|
879
879
|
var client = new RawElement('pub trait Client {\n type Transport: Transportation;\n type Ser: Serialization;\n fn transport(&self) -> &Self::Transport;\n fn serialization(&self) -> &Self::Ser;\n}');
|
|
880
880
|
var server = new RawElement("pub trait Server {\n type Req;\n type Res;\n fn path_template(&self) -> &'static str;\n fn method(&self) -> Method;\n}");
|
|
881
|
-
var enumTrait = interface_0('Enum', VOID,
|
|
882
|
-
var refinedTrait = interface_0('Refined', VOID,
|
|
883
|
-
var requestTrait = interface_0('Request', VOID,
|
|
884
|
-
var responseTrait = interface_0('Response', VOID,
|
|
881
|
+
var enumTrait = interface_0('Enum', VOID, RustEmitter$emitShared$lambda_1);
|
|
882
|
+
var refinedTrait = interface_0('Refined', VOID, RustEmitter$emitShared$lambda_2);
|
|
883
|
+
var requestTrait = interface_0('Request', VOID, RustEmitter$emitShared$lambda_3);
|
|
884
|
+
var responseTrait = interface_0('Response', VOID, RustEmitter$emitShared$lambda_4);
|
|
885
885
|
var rawElementInterfaces = mapOf([to('BodySerializer', new RawElement("pub trait BodySerializer {\n fn serialize_body<T: 'static>(&self, t: &T, r#type: TypeId) -> Vec<u8>;\n}")), to('BodyDeserializer', new RawElement("pub trait BodyDeserializer {\n fn deserialize_body<T: 'static>(&self, raw: &[u8], r#type: TypeId) -> T;\n}")), to('PathSerializer', new RawElement('pub trait PathSerializer {\n fn serialize_path<T: std::fmt::Display>(&self, t: &T, r#type: TypeId) -> String;\n}')), to('PathDeserializer', new RawElement('pub trait PathDeserializer {\n fn deserialize_path<T: std::str::FromStr>(&self, raw: &str, r#type: TypeId) -> T where T::Err: std::fmt::Debug;\n}')), to('ParamSerializer', new RawElement("pub trait ParamSerializer {\n fn serialize_param<T: 'static>(&self, value: &T, r#type: TypeId) -> Vec<String>;\n}")), to('ParamDeserializer', new RawElement("pub trait ParamDeserializer {\n fn deserialize_param<T: 'static>(&self, values: &[String], r#type: TypeId) -> T;\n}"))]);
|
|
886
|
-
var transportationTrait = interface_0('Transportation', VOID,
|
|
886
|
+
var transportationTrait = interface_0('Transportation', VOID, RustEmitter$emitShared$lambda_5);
|
|
887
887
|
var dslTraits = mapOf([to('Enum', enumTrait), to('Refined', refinedTrait), to('Request', requestTrait), to('Response', responseTrait), to('Transportation', transportationTrait)]);
|
|
888
|
-
// Inline function 'community.flock.wirespec.
|
|
889
|
-
var this_0 = convert(Companion_instance_0.
|
|
888
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
889
|
+
var this_0 = convert(Companion_instance_0.qs('shared'));
|
|
890
890
|
var scope = new TransformScope(this_0);
|
|
891
|
-
// Inline function 'community.flock.wirespec.
|
|
891
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
892
892
|
var tmp = scope;
|
|
893
|
-
// Inline function 'community.flock.wirespec.
|
|
894
|
-
var this_1 = scope.
|
|
895
|
-
// Inline function 'community.flock.wirespec.
|
|
893
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
894
|
+
var this_1 = scope.k17_1;
|
|
895
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
896
896
|
// Inline function 'kotlin.apply' call
|
|
897
897
|
var this_2 = new TransformerBuilder();
|
|
898
|
-
this_2.
|
|
899
|
-
var tmp$ret$
|
|
900
|
-
tmp.
|
|
901
|
-
// Inline function 'community.flock.wirespec.
|
|
898
|
+
this_2.e18(RustEmitter$emitShared$lambda_6(rustImports));
|
|
899
|
+
var tmp$ret$4 = this_2.z17();
|
|
900
|
+
tmp.k17_1 = transform(this_1, tmp$ret$4);
|
|
901
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
902
902
|
var tmp_0 = scope;
|
|
903
|
-
// Inline function 'community.flock.wirespec.
|
|
904
|
-
var this_3 = scope.
|
|
905
|
-
// Inline function 'community.flock.wirespec.
|
|
903
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
904
|
+
var this_3 = scope.k17_1;
|
|
905
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
906
906
|
// Inline function 'kotlin.apply' call
|
|
907
907
|
var this_4 = new TransformerBuilder();
|
|
908
|
-
this_4.
|
|
909
|
-
var tmp$ret$
|
|
910
|
-
tmp_0.
|
|
911
|
-
// Inline function 'community.flock.wirespec.
|
|
908
|
+
this_4.e18(RustEmitter$emitShared$lambda_7);
|
|
909
|
+
var tmp$ret$9 = this_4.z17();
|
|
910
|
+
tmp_0.k17_1 = transform(this_3, tmp$ret$9);
|
|
911
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
912
912
|
var tmp_1 = scope;
|
|
913
|
-
// Inline function 'community.flock.wirespec.
|
|
914
|
-
var this_5 = scope.
|
|
915
|
-
// Inline function 'community.flock.wirespec.
|
|
913
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
914
|
+
var this_5 = scope.k17_1;
|
|
915
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
916
916
|
// Inline function 'kotlin.apply' call
|
|
917
917
|
var this_6 = new TransformerBuilder();
|
|
918
|
-
this_6.
|
|
919
|
-
var tmp$ret$
|
|
920
|
-
tmp_1.
|
|
921
|
-
var tmp_2 = scope.
|
|
918
|
+
this_6.e18(RustEmitter$emitShared$lambda_8(dslTraits, requestHeaders, responseHeaders, rawElementInterfaces, client, server));
|
|
919
|
+
var tmp$ret$14 = this_6.z17();
|
|
920
|
+
tmp_1.k17_1 = transform(this_5, tmp$ret$14);
|
|
921
|
+
var tmp_2 = scope.k17_1;
|
|
922
922
|
// Inline function 'kotlin.let' call
|
|
923
923
|
var file = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
924
924
|
// Inline function 'kotlin.collections.flatMap' call
|
|
925
|
-
var tmp0 = file.
|
|
925
|
+
var tmp0 = file.yu_1;
|
|
926
926
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
927
927
|
var destination = ArrayList_init_$Create$_0();
|
|
928
928
|
var _iterator__ex2g4s = tmp0.t();
|
|
929
929
|
while (_iterator__ex2g4s.u()) {
|
|
930
930
|
var element = _iterator__ex2g4s.v();
|
|
931
|
-
var tmp$ret$
|
|
931
|
+
var tmp$ret$21;
|
|
932
932
|
$l$block: {
|
|
933
933
|
if (!(element instanceof Struct)) {
|
|
934
|
-
tmp$ret$
|
|
934
|
+
tmp$ret$21 = listOf(element);
|
|
935
935
|
break $l$block;
|
|
936
936
|
}
|
|
937
937
|
var structFields = fieldList(element);
|
|
938
938
|
var tmp_3;
|
|
939
|
-
var tmp$ret$
|
|
939
|
+
var tmp$ret$22;
|
|
940
940
|
$l$block_1: {
|
|
941
941
|
// Inline function 'kotlin.collections.any' call
|
|
942
942
|
var tmp_4;
|
|
@@ -946,23 +946,23 @@ protoOf(RustIrEmitter).r1w = function () {
|
|
|
946
946
|
tmp_4 = false;
|
|
947
947
|
}
|
|
948
948
|
if (tmp_4) {
|
|
949
|
-
tmp$ret$
|
|
949
|
+
tmp$ret$22 = false;
|
|
950
950
|
break $l$block_1;
|
|
951
951
|
}
|
|
952
952
|
var _iterator__ex2g4s_0 = structFields.t();
|
|
953
953
|
while (_iterator__ex2g4s_0.u()) {
|
|
954
954
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
955
|
-
if (containsUnderiveable(this, element_0.
|
|
956
|
-
tmp$ret$
|
|
955
|
+
if (containsUnderiveable(this, element_0.tv_1)) {
|
|
956
|
+
tmp$ret$22 = true;
|
|
957
957
|
break $l$block_1;
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
|
-
tmp$ret$
|
|
960
|
+
tmp$ret$22 = false;
|
|
961
961
|
}
|
|
962
|
-
if (tmp$ret$
|
|
962
|
+
if (tmp$ret$22) {
|
|
963
963
|
tmp_3 = '';
|
|
964
964
|
} else {
|
|
965
|
-
var tmp$ret$
|
|
965
|
+
var tmp$ret$24;
|
|
966
966
|
$l$block_3: {
|
|
967
967
|
// Inline function 'kotlin.collections.any' call
|
|
968
968
|
var tmp_5;
|
|
@@ -972,23 +972,23 @@ protoOf(RustIrEmitter).r1w = function () {
|
|
|
972
972
|
tmp_5 = false;
|
|
973
973
|
}
|
|
974
974
|
if (tmp_5) {
|
|
975
|
-
tmp$ret$
|
|
975
|
+
tmp$ret$24 = false;
|
|
976
976
|
break $l$block_3;
|
|
977
977
|
}
|
|
978
978
|
var _iterator__ex2g4s_1 = structFields.t();
|
|
979
979
|
while (_iterator__ex2g4s_1.u()) {
|
|
980
980
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
981
|
-
if (containsWildcard(this, element_1.
|
|
982
|
-
tmp$ret$
|
|
981
|
+
if (containsWildcard(this, element_1.tv_1)) {
|
|
982
|
+
tmp$ret$24 = true;
|
|
983
983
|
break $l$block_3;
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
|
-
tmp$ret$
|
|
986
|
+
tmp$ret$24 = false;
|
|
987
987
|
}
|
|
988
|
-
if (tmp$ret$
|
|
988
|
+
if (tmp$ret$24) {
|
|
989
989
|
tmp_3 = '#[derive(Debug, Default)]';
|
|
990
990
|
} else {
|
|
991
|
-
if (setOf(['RawRequest', 'RawResponse']).v1(element.
|
|
991
|
+
if (setOf(['RawRequest', 'RawResponse']).v1(element.xw_1.pt())) {
|
|
992
992
|
tmp_3 = '#[derive(Debug, Clone, PartialEq)]';
|
|
993
993
|
} else {
|
|
994
994
|
tmp_3 = '#[derive(Debug, Clone, Default, PartialEq)]';
|
|
@@ -1004,29 +1004,29 @@ protoOf(RustIrEmitter).r1w = function () {
|
|
|
1004
1004
|
tmp_6 = listOf(new RawElement(derive));
|
|
1005
1005
|
}
|
|
1006
1006
|
var prefix = tmp_6;
|
|
1007
|
-
tmp$ret$
|
|
1007
|
+
tmp$ret$21 = listOf(new File(element.xw_1, plus_0(prefix, element)));
|
|
1008
1008
|
}
|
|
1009
|
-
var list = tmp$ret$
|
|
1009
|
+
var list = tmp$ret$21;
|
|
1010
1010
|
addAll(destination, list);
|
|
1011
1011
|
}
|
|
1012
|
-
var tmp0_0 = new File(file.
|
|
1012
|
+
var tmp0_0 = new File(file.xu_1, destination);
|
|
1013
1013
|
// Inline function 'kotlin.let' call
|
|
1014
|
-
var wirespecFile = RustTransform_getInstance().
|
|
1015
|
-
// Inline function 'community.flock.wirespec.
|
|
1014
|
+
var wirespecFile = RustTransform_getInstance().m20(tmp0_0);
|
|
1015
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1016
1016
|
var scope_0 = new TransformScope(wirespecFile);
|
|
1017
|
-
// Inline function 'community.flock.wirespec.
|
|
1017
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1018
1018
|
var tmp_7 = scope_0;
|
|
1019
|
-
// Inline function 'community.flock.wirespec.
|
|
1020
|
-
var this_7 = scope_0.
|
|
1021
|
-
// Inline function 'community.flock.wirespec.
|
|
1019
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1020
|
+
var this_7 = scope_0.k17_1;
|
|
1021
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1022
1022
|
// Inline function 'kotlin.apply' call
|
|
1023
1023
|
var this_8 = new TransformerBuilder();
|
|
1024
|
-
this_8.
|
|
1025
|
-
var tmp$ret$
|
|
1026
|
-
tmp_7.
|
|
1027
|
-
var tmp_8 = scope_0.
|
|
1024
|
+
this_8.e18(RustEmitter$emitShared$lambda_9);
|
|
1025
|
+
var tmp$ret$33 = this_8.z17();
|
|
1026
|
+
tmp_7.k17_1 = transform(this_7, tmp$ret$33);
|
|
1027
|
+
var tmp_8 = scope_0.k17_1;
|
|
1028
1028
|
// Inline function 'kotlin.let' call
|
|
1029
|
-
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).
|
|
1029
|
+
var tmp0_1 = (isInterface(tmp_8, Element) ? tmp_8 : THROW_CCE()).yu_1;
|
|
1030
1030
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1031
1031
|
// Inline function 'kotlin.collections.fold' call
|
|
1032
1032
|
var accumulator = ArrayList_init_$Create$_0();
|
|
@@ -1045,28 +1045,28 @@ protoOf(RustIrEmitter).r1w = function () {
|
|
|
1045
1045
|
accumulator = acc;
|
|
1046
1046
|
}
|
|
1047
1047
|
var groups = accumulator;
|
|
1048
|
-
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID,
|
|
1048
|
+
var source = joinToString(groups, '\n\n', VOID, VOID, VOID, VOID, RustEmitter$emitShared$lambda_10) + '\n';
|
|
1049
1049
|
var tmp_10;
|
|
1050
|
-
if (this.
|
|
1051
|
-
tmp_10 = new File(Companion_getInstance().
|
|
1050
|
+
if (this.y1z_1.yp_1) {
|
|
1051
|
+
tmp_10 = new File(Companion_getInstance().mt(this.x1z_1.ts() + 'wirespec'), listOf(new RawElement(source)));
|
|
1052
1052
|
} else {
|
|
1053
1053
|
tmp_10 = null;
|
|
1054
1054
|
}
|
|
1055
1055
|
return tmp_10;
|
|
1056
1056
|
};
|
|
1057
|
-
protoOf(
|
|
1057
|
+
protoOf(RustEmitter).r19 = function (module_0, logger) {
|
|
1058
1058
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
1059
|
-
var this_0 = new NonEmptyList(module_0.
|
|
1059
|
+
var this_0 = new NonEmptyList(module_0.zo_1);
|
|
1060
1060
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
1061
|
-
var tmp =
|
|
1062
|
-
var tmp$ret$
|
|
1063
|
-
var tmp$ret$
|
|
1064
|
-
var tmp_0 = toNonEmptyListOrNull(tmp$ret$
|
|
1065
|
-
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).
|
|
1061
|
+
var tmp = RustEmitter$emit$lambda;
|
|
1062
|
+
var tmp$ret$1 = new sam$kotlin_Comparator$0(tmp);
|
|
1063
|
+
var tmp$ret$0 = sortedWith(this_0, tmp$ret$1);
|
|
1064
|
+
var tmp_0 = toNonEmptyListOrNull(tmp$ret$0);
|
|
1065
|
+
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).wm_1;
|
|
1066
1066
|
// Inline function 'kotlin.let' call
|
|
1067
|
-
var files = emit.call(this, module_0.
|
|
1067
|
+
var files = emit.call(this, module_0.lp(VOID, statements), logger);
|
|
1068
1068
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1069
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
1069
|
+
var tmp0 = new NonEmptyList(module_0.zo_1);
|
|
1070
1070
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1071
1071
|
var destination = ArrayList_init_$Create$_0();
|
|
1072
1072
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1077,7 +1077,7 @@ protoOf(RustIrEmitter).q1w = function (module_0, logger) {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
1079
|
var endpoints = destination;
|
|
1080
|
-
var endpointMods = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID,
|
|
1080
|
+
var endpointMods = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustEmitter$emit$lambda_0(this));
|
|
1081
1081
|
var tmp_1;
|
|
1082
1082
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1083
1083
|
if (!endpoints.r()) {
|
|
@@ -1086,11 +1086,11 @@ protoOf(RustIrEmitter).q1w = function (module_0, logger) {
|
|
|
1086
1086
|
tmp_1 = '';
|
|
1087
1087
|
}
|
|
1088
1088
|
var clientMod = tmp_1;
|
|
1089
|
-
var modRs = new File(Companion_getInstance().
|
|
1090
|
-
var modEndpoint = new File(Companion_getInstance().
|
|
1091
|
-
var tmp_2 = Companion_getInstance().
|
|
1089
|
+
var modRs = new File(Companion_getInstance().mt(this.x1z_1.ts() + 'mod'), listOf(new RawElement('#![allow(warnings)]\npub mod model;\npub mod endpoint;' + clientMod + '\npub mod wirespec;')));
|
|
1090
|
+
var modEndpoint = new File(Companion_getInstance().mt(this.x1z_1.ts() + 'endpoint/' + 'mod'), listOf(new RawElement(endpointMods)));
|
|
1091
|
+
var tmp_2 = Companion_getInstance().mt(this.x1z_1.ts() + 'model/' + 'mod');
|
|
1092
1092
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1093
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
1093
|
+
var tmp0_0 = new NonEmptyList(module_0.zo_1);
|
|
1094
1094
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1095
1095
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1096
1096
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1101,24 +1101,24 @@ protoOf(RustIrEmitter).q1w = function (module_0, logger) {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
var tmp_3 = destination_0;
|
|
1104
|
-
var modModel = new File(tmp_2, listOf(new RawElement(joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID,
|
|
1105
|
-
return this.
|
|
1104
|
+
var modModel = new File(tmp_2, listOf(new RawElement(joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID, RustEmitter$emit$lambda_1(this)))));
|
|
1105
|
+
return this.y1z_1.yp_1 ? NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(files, modRs), modEndpoint), modModel) : NonEmptyList__plus_impl_xqmb9(files, modRs);
|
|
1106
1106
|
};
|
|
1107
|
-
protoOf(
|
|
1108
|
-
var subPackageName = plus_1(this.
|
|
1107
|
+
protoOf(RustEmitter).sr = function (definition, module_0, logger) {
|
|
1108
|
+
var subPackageName = plus_1(this.x1z_1, definition);
|
|
1109
1109
|
var tmp;
|
|
1110
1110
|
if (definition instanceof Endpoint) {
|
|
1111
|
-
tmp = this.
|
|
1111
|
+
tmp = this.d20_1;
|
|
1112
1112
|
} else {
|
|
1113
|
-
tmp = this.
|
|
1113
|
+
tmp = this.c20_1;
|
|
1114
1114
|
}
|
|
1115
1115
|
var importHeader = tmp;
|
|
1116
1116
|
var tmp0 = emit_0.call(this, definition, module_0, logger);
|
|
1117
1117
|
// Inline function 'kotlin.let' call
|
|
1118
|
-
var file = RustTransform_getInstance().
|
|
1119
|
-
var tmp_0 = Companion_getInstance().
|
|
1118
|
+
var file = RustTransform_getInstance().m20(tmp0);
|
|
1119
|
+
var tmp_0 = Companion_getInstance().mt(subPackageName.ts() + toSnakeCase(this, file.xu_1.pt()));
|
|
1120
1120
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1121
|
-
var tmp0_0 = file.
|
|
1121
|
+
var tmp0_0 = file.yu_1;
|
|
1122
1122
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1123
1123
|
var destination = ArrayList_init_$Create$_0();
|
|
1124
1124
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -1135,12 +1135,12 @@ protoOf(RustIrEmitter).lr = function (definition, module_0, logger) {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
return new File(tmp_0, plus(importHeader, destination));
|
|
1137
1137
|
};
|
|
1138
|
-
protoOf(
|
|
1138
|
+
protoOf(RustEmitter).a1a = function (definition, module_0) {
|
|
1139
1139
|
var tmp;
|
|
1140
1140
|
if (definition instanceof Type) {
|
|
1141
1141
|
tmp = convertToGenerator_2(definition, module_0);
|
|
1142
1142
|
} else {
|
|
1143
|
-
if (definition instanceof
|
|
1143
|
+
if (definition instanceof Enum_0) {
|
|
1144
1144
|
tmp = convertToGenerator_1(definition);
|
|
1145
1145
|
} else {
|
|
1146
1146
|
if (definition instanceof Refined) {
|
|
@@ -1155,17 +1155,17 @@ protoOf(RustIrEmitter).w1w = function (definition, module_0) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
1157
|
var generatorFile = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
|
|
1158
|
-
var generatorOwnName = definition.
|
|
1158
|
+
var generatorOwnName = definition.tr().m1() + 'Generator';
|
|
1159
1159
|
var tmp_0 = asSequence(collectCustomTypeNames(generatorFile));
|
|
1160
|
-
var tmp_1 = filterNot(tmp_0,
|
|
1161
|
-
var tmp_2 = filterNot(tmp_1,
|
|
1162
|
-
var customNames = toList(distinct(map(tmp_2,
|
|
1160
|
+
var tmp_1 = filterNot(tmp_0, RustEmitter$emitGenerator$lambda);
|
|
1161
|
+
var tmp_2 = filterNot(tmp_1, RustEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
1162
|
+
var customNames = toList(distinct(map(tmp_2, RustEmitter$emitGenerator$lambda_1)));
|
|
1163
1163
|
// Inline function 'kotlin.collections.mutableSetOf' call
|
|
1164
1164
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
1165
|
-
// Inline function 'community.flock.wirespec.
|
|
1165
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1166
1166
|
var scope = new TransformScope(generatorFile);
|
|
1167
|
-
scope.
|
|
1168
|
-
var tmp_3 = scope.
|
|
1167
|
+
scope.b18(RustEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
1168
|
+
var tmp_3 = scope.k17_1;
|
|
1169
1169
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
1170
1170
|
// Inline function 'kotlin.collections.filter' call
|
|
1171
1171
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1184,8 +1184,8 @@ protoOf(RustIrEmitter).w1w = function (definition, module_0) {
|
|
|
1184
1184
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1185
1185
|
while (_iterator__ex2g4s_0.u()) {
|
|
1186
1186
|
var item = _iterator__ex2g4s_0.v();
|
|
1187
|
-
var tmp$ret$
|
|
1188
|
-
destination_0.x(tmp$ret$
|
|
1187
|
+
var tmp$ret$8 = import_0('super::' + toSnakeCase(this, item), item);
|
|
1188
|
+
destination_0.x(tmp$ret$8);
|
|
1189
1189
|
}
|
|
1190
1190
|
var generatorImports = destination_0;
|
|
1191
1191
|
// Inline function 'kotlin.collections.filterNot' call
|
|
@@ -1204,55 +1204,55 @@ protoOf(RustIrEmitter).w1w = function (definition, module_0) {
|
|
|
1204
1204
|
var _iterator__ex2g4s_2 = destination_1.t();
|
|
1205
1205
|
while (_iterator__ex2g4s_2.u()) {
|
|
1206
1206
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
1207
|
-
var tmp$ret$
|
|
1208
|
-
destination_2.x(tmp$ret$
|
|
1207
|
+
var tmp$ret$14 = import_0('super::super::model::' + toSnakeCase(this, item_0), item_0);
|
|
1208
|
+
destination_2.x(tmp$ret$14);
|
|
1209
1209
|
}
|
|
1210
1210
|
var typeImports = destination_2;
|
|
1211
|
-
var subPackageName = plus_2(this.
|
|
1212
|
-
return new File(Companion_getInstance().
|
|
1211
|
+
var subPackageName = plus_2(this.x1z_1, 'generator');
|
|
1212
|
+
return new File(Companion_getInstance().mt(subPackageName.ts() + toSnakeCase(this, generatorFile.xu_1.pt())), plus(plus(plus(this.c20_1, typeImports), generatorImports), generatorFile.yu_1));
|
|
1213
1213
|
};
|
|
1214
|
-
protoOf(
|
|
1214
|
+
protoOf(RustEmitter).ks = function (type, module_0) {
|
|
1215
1215
|
var tmp = convertWithValidation(type, module_0);
|
|
1216
1216
|
// Inline function 'kotlin.collections.map' call
|
|
1217
|
-
var this_0 = type.
|
|
1217
|
+
var this_0 = get_fields(type.dp_1);
|
|
1218
1218
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1219
1219
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1220
1220
|
var _iterator__ex2g4s = this_0.t();
|
|
1221
1221
|
while (_iterator__ex2g4s.u()) {
|
|
1222
1222
|
var item = _iterator__ex2g4s.v();
|
|
1223
|
-
var tmp$ret$
|
|
1224
|
-
destination.x(tmp$ret$
|
|
1223
|
+
var tmp$ret$2 = item.gp_1.m1();
|
|
1224
|
+
destination.x(tmp$ret$2);
|
|
1225
1225
|
}
|
|
1226
1226
|
return prependImports(this, sanitizeNames(injectSelfReceiverToValidate(tmp, toSet(destination), '&self'), _get_sanitizationConfig__sns434(this)), buildModelImports(type));
|
|
1227
1227
|
};
|
|
1228
|
-
protoOf(
|
|
1228
|
+
protoOf(RustEmitter).is = function (enum_0, module_0) {
|
|
1229
1229
|
var tmp = convert_0(enum_0);
|
|
1230
|
-
return sanitizeEnumEntries(tmp,
|
|
1230
|
+
return sanitizeEnumEntries(tmp, RustEmitter$emit$lambda_2(this));
|
|
1231
1231
|
};
|
|
1232
|
-
protoOf(
|
|
1232
|
+
protoOf(RustEmitter).yr = function (union) {
|
|
1233
1233
|
return convert_1(union);
|
|
1234
1234
|
};
|
|
1235
|
-
protoOf(
|
|
1235
|
+
protoOf(RustEmitter).ds = function (refined) {
|
|
1236
1236
|
return replaceStructWithRefinedFunctions(convert_2(refined), refined);
|
|
1237
1237
|
};
|
|
1238
|
-
protoOf(
|
|
1239
|
-
// Inline function 'community.flock.wirespec.
|
|
1238
|
+
protoOf(RustEmitter).js = function (endpoint) {
|
|
1239
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1240
1240
|
var this_0 = stripResponseGenerics(stripHandlerExtends(convertSimpleRawExpressionsToVariableRefs(stripWirespecPrefix(flattenForRust(convert_3(endpoint))))));
|
|
1241
1241
|
var scope = new TransformScope(this_0);
|
|
1242
|
-
scope.
|
|
1243
|
-
var tmp = scope.
|
|
1244
|
-
// Inline function 'community.flock.wirespec.
|
|
1242
|
+
scope.p17(fixResponseSwitchPatterns());
|
|
1243
|
+
var tmp = scope.k17_1;
|
|
1244
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1245
1245
|
var this_1 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1246
1246
|
var scope_0 = new TransformScope(this_1);
|
|
1247
|
-
scope_0.
|
|
1248
|
-
var tmp_0 = scope_0.
|
|
1249
|
-
var tmp$ret$
|
|
1250
|
-
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$
|
|
1247
|
+
scope_0.p17(fixConstructorCalls());
|
|
1248
|
+
var tmp_0 = scope_0.k17_1;
|
|
1249
|
+
var tmp$ret$2 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1250
|
+
return prependImports(this, sanitizeNames(injectApiStruct(injectResponseFromImpls(injectHandlerImplForClient(injectSelfToHandlerMethods(tmp$ret$2))), endpoint), _get_sanitizationConfig__sns434(this)), buildEndpointImports(endpoint));
|
|
1251
1251
|
};
|
|
1252
|
-
protoOf(
|
|
1252
|
+
protoOf(RustEmitter).xr = function (channel) {
|
|
1253
1253
|
return convert_4(channel);
|
|
1254
1254
|
};
|
|
1255
|
-
protoOf(
|
|
1255
|
+
protoOf(RustEmitter).wr = function (rpc) {
|
|
1256
1256
|
// Inline function 'kotlin.let' call
|
|
1257
1257
|
var file = convert_5(rpc);
|
|
1258
1258
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -1262,7 +1262,7 @@ protoOf(RustIrEmitter).or = function (rpc) {
|
|
|
1262
1262
|
var _iterator__ex2g4s = this_0.t();
|
|
1263
1263
|
while (_iterator__ex2g4s.u()) {
|
|
1264
1264
|
var e = _iterator__ex2g4s.v();
|
|
1265
|
-
var key = e.
|
|
1265
|
+
var key = e.h18_1;
|
|
1266
1266
|
if (set.x(key)) {
|
|
1267
1267
|
list.x(e);
|
|
1268
1268
|
}
|
|
@@ -1273,12 +1273,12 @@ protoOf(RustIrEmitter).or = function (rpc) {
|
|
|
1273
1273
|
var _iterator__ex2g4s_0 = list.t();
|
|
1274
1274
|
while (_iterator__ex2g4s_0.u()) {
|
|
1275
1275
|
var item = _iterator__ex2g4s_0.v();
|
|
1276
|
-
var tmp$ret$
|
|
1277
|
-
destination.x(tmp$ret$
|
|
1276
|
+
var tmp$ret$6 = import_0('super::super::model::' + toSnakeCase(this, item.h18_1), Companion_getInstance().mt(item.h18_1).pt());
|
|
1277
|
+
destination.x(tmp$ret$6);
|
|
1278
1278
|
}
|
|
1279
1279
|
var rpcImports = destination;
|
|
1280
1280
|
// Inline function 'kotlin.collections.map' call
|
|
1281
|
-
var this_1 = file.
|
|
1281
|
+
var this_1 = file.yu_1;
|
|
1282
1282
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1283
1283
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1284
1284
|
var _iterator__ex2g4s_1 = this_1.t();
|
|
@@ -1287,7 +1287,7 @@ protoOf(RustIrEmitter).or = function (rpc) {
|
|
|
1287
1287
|
var tmp;
|
|
1288
1288
|
if (item_0 instanceof Namespace) {
|
|
1289
1289
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1290
|
-
var tmp0 = item_0.
|
|
1290
|
+
var tmp0 = item_0.ev_1;
|
|
1291
1291
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1292
1292
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
1293
1293
|
var _iterator__ex2g4s_2 = tmp0.t();
|
|
@@ -1302,23 +1302,23 @@ protoOf(RustIrEmitter).or = function (rpc) {
|
|
|
1302
1302
|
var list_0 = tmp_0;
|
|
1303
1303
|
addAll(destination_1, list_0);
|
|
1304
1304
|
}
|
|
1305
|
-
tmp = item_0.
|
|
1305
|
+
tmp = item_0.iv(VOID, destination_1);
|
|
1306
1306
|
} else {
|
|
1307
1307
|
tmp = item_0;
|
|
1308
1308
|
}
|
|
1309
|
-
var tmp$ret$
|
|
1310
|
-
destination_0.x(tmp$ret$
|
|
1309
|
+
var tmp$ret$9 = tmp;
|
|
1310
|
+
destination_0.x(tmp$ret$9);
|
|
1311
1311
|
}
|
|
1312
|
-
return file.
|
|
1312
|
+
return file.bv(VOID, plus(rpcImports, destination_0));
|
|
1313
1313
|
};
|
|
1314
|
-
protoOf(
|
|
1315
|
-
var endpointName = endpoint.
|
|
1314
|
+
protoOf(RustEmitter).z19 = function (endpoint) {
|
|
1315
|
+
var endpointName = endpoint.vq_1.m1();
|
|
1316
1316
|
var endpointModuleName = toSnakeCase(this, endpointName);
|
|
1317
1317
|
var clientName = endpointName + 'Client';
|
|
1318
1318
|
var methodName = toSnakeCase(this, endpointName);
|
|
1319
1319
|
var _destruct__k2r9zo = buildClientParams(this, endpoint);
|
|
1320
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1321
|
-
var requestArgs = _destruct__k2r9zo.
|
|
1320
|
+
var paramsStr = _destruct__k2r9zo.ve();
|
|
1321
|
+
var requestArgs = _destruct__k2r9zo.we();
|
|
1322
1322
|
var requestConstruction = endpointModuleName + '::Request::new(' + requestArgs + ')';
|
|
1323
1323
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1324
1324
|
var this_0 = importReferences(endpoint);
|
|
@@ -1327,7 +1327,7 @@ protoOf(RustIrEmitter).v1w = function (endpoint) {
|
|
|
1327
1327
|
var _iterator__ex2g4s = this_0.t();
|
|
1328
1328
|
while (_iterator__ex2g4s.u()) {
|
|
1329
1329
|
var e = _iterator__ex2g4s.v();
|
|
1330
|
-
var key = e.
|
|
1330
|
+
var key = e.h18_1;
|
|
1331
1331
|
if (set.x(key)) {
|
|
1332
1332
|
list.x(e);
|
|
1333
1333
|
}
|
|
@@ -1338,8 +1338,8 @@ protoOf(RustIrEmitter).v1w = function (endpoint) {
|
|
|
1338
1338
|
var _iterator__ex2g4s_0 = list.t();
|
|
1339
1339
|
while (_iterator__ex2g4s_0.u()) {
|
|
1340
1340
|
var item = _iterator__ex2g4s_0.v();
|
|
1341
|
-
var tmp$ret$
|
|
1342
|
-
destination.x(tmp$ret$
|
|
1341
|
+
var tmp$ret$4 = import_0('super::super::model::' + toSnakeCase(this, item.h18_1), item.h18_1);
|
|
1342
|
+
destination.x(tmp$ret$4);
|
|
1343
1343
|
}
|
|
1344
1344
|
var modelImports = destination;
|
|
1345
1345
|
var namespacePath = endpointModuleName + '::' + endpointName;
|
|
@@ -1359,10 +1359,10 @@ protoOf(RustIrEmitter).v1w = function (endpoint) {
|
|
|
1359
1359
|
this_1.x(' ' + namespacePath + '::from_raw_response(self.serialization, raw_response)');
|
|
1360
1360
|
this_1.x(' }');
|
|
1361
1361
|
this_1.x('}');
|
|
1362
|
-
var tmp$ret$
|
|
1363
|
-
var code = joinToString(tmp$ret$
|
|
1364
|
-
var subPackageName = plus_2(this.
|
|
1365
|
-
var tmp = Companion_getInstance().
|
|
1362
|
+
var tmp$ret$5 = this_1.p5();
|
|
1363
|
+
var code = joinToString(tmp$ret$5, '\n');
|
|
1364
|
+
var subPackageName = plus_2(this.x1z_1, 'client');
|
|
1365
|
+
var tmp = Companion_getInstance().mt(subPackageName.ts() + toSnakeCase(this, clientName));
|
|
1366
1366
|
// Inline function 'kotlin.collections.buildList' call
|
|
1367
1367
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1368
1368
|
// Inline function 'kotlin.apply' call
|
|
@@ -1371,12 +1371,12 @@ protoOf(RustIrEmitter).v1w = function (endpoint) {
|
|
|
1371
1371
|
this_2.x(import_0('super::super::endpoint', endpointModuleName));
|
|
1372
1372
|
this_2.g1(modelImports);
|
|
1373
1373
|
this_2.x(new RawElement(code));
|
|
1374
|
-
var tmp$ret$
|
|
1375
|
-
return new File(tmp, tmp$ret$
|
|
1374
|
+
var tmp$ret$9 = this_2.p5();
|
|
1375
|
+
return new File(tmp, tmp$ret$9);
|
|
1376
1376
|
};
|
|
1377
|
-
protoOf(
|
|
1378
|
-
logger.
|
|
1379
|
-
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID,
|
|
1377
|
+
protoOf(RustEmitter).t19 = function (endpoints, logger) {
|
|
1378
|
+
logger.qr('Emitting main Client for ' + endpoints.b1() + ' endpoints');
|
|
1379
|
+
var modDeclarations = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, RustEmitter$emitClient$lambda(this));
|
|
1380
1380
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1381
1381
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1382
1382
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -1392,7 +1392,7 @@ protoOf(RustIrEmitter).s1w = function (endpoints, logger) {
|
|
|
1392
1392
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1393
1393
|
while (_iterator__ex2g4s_0.u()) {
|
|
1394
1394
|
var e = _iterator__ex2g4s_0.v();
|
|
1395
|
-
var key = e.
|
|
1395
|
+
var key = e.h18_1;
|
|
1396
1396
|
if (set.x(key)) {
|
|
1397
1397
|
list_0.x(e);
|
|
1398
1398
|
}
|
|
@@ -1403,7 +1403,7 @@ protoOf(RustIrEmitter).s1w = function (endpoints, logger) {
|
|
|
1403
1403
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
1404
1404
|
while (_iterator__ex2g4s_1.u()) {
|
|
1405
1405
|
var element_0 = _iterator__ex2g4s_1.v();
|
|
1406
|
-
var tmp$ret$
|
|
1406
|
+
var tmp$ret$8;
|
|
1407
1407
|
$l$block_0: {
|
|
1408
1408
|
// Inline function 'kotlin.collections.none' call
|
|
1409
1409
|
var tmp;
|
|
@@ -1413,20 +1413,20 @@ protoOf(RustIrEmitter).s1w = function (endpoints, logger) {
|
|
|
1413
1413
|
tmp = false;
|
|
1414
1414
|
}
|
|
1415
1415
|
if (tmp) {
|
|
1416
|
-
tmp$ret$
|
|
1416
|
+
tmp$ret$8 = true;
|
|
1417
1417
|
break $l$block_0;
|
|
1418
1418
|
}
|
|
1419
1419
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1420
1420
|
while (_iterator__ex2g4s_2.u()) {
|
|
1421
1421
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1422
|
-
if (element_1.
|
|
1423
|
-
tmp$ret$
|
|
1422
|
+
if (element_1.vq_1.m1() === element_0.h18_1) {
|
|
1423
|
+
tmp$ret$8 = false;
|
|
1424
1424
|
break $l$block_0;
|
|
1425
1425
|
}
|
|
1426
1426
|
}
|
|
1427
|
-
tmp$ret$
|
|
1427
|
+
tmp$ret$8 = true;
|
|
1428
1428
|
}
|
|
1429
|
-
if (tmp$ret$
|
|
1429
|
+
if (tmp$ret$8) {
|
|
1430
1430
|
destination_0.x(element_0);
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
@@ -1436,8 +1436,8 @@ protoOf(RustIrEmitter).s1w = function (endpoints, logger) {
|
|
|
1436
1436
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1437
1437
|
while (_iterator__ex2g4s_3.u()) {
|
|
1438
1438
|
var item = _iterator__ex2g4s_3.v();
|
|
1439
|
-
var tmp$ret$
|
|
1440
|
-
destination_1.x(tmp$ret$
|
|
1439
|
+
var tmp$ret$12 = import_0('super::model::' + toSnakeCase(this, item.h18_1), item.h18_1);
|
|
1440
|
+
destination_1.x(tmp$ret$12);
|
|
1441
1441
|
}
|
|
1442
1442
|
var modelImports = destination_1;
|
|
1443
1443
|
// Inline function 'kotlin.collections.flatMap' call
|
|
@@ -1446,9 +1446,9 @@ protoOf(RustIrEmitter).s1w = function (endpoints, logger) {
|
|
|
1446
1446
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1447
1447
|
while (_iterator__ex2g4s_4.u()) {
|
|
1448
1448
|
var element_2 = _iterator__ex2g4s_4.v();
|
|
1449
|
-
var endpointModuleName = toSnakeCase(this, element_2.
|
|
1450
|
-
var clientModuleName = toSnakeCase(this, element_2.
|
|
1451
|
-
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.
|
|
1449
|
+
var endpointModuleName = toSnakeCase(this, element_2.vq_1.m1());
|
|
1450
|
+
var clientModuleName = toSnakeCase(this, element_2.vq_1.m1() + 'Client');
|
|
1451
|
+
var list_1 = listOf_0([import_0('super::endpoint', endpointModuleName), import_0(clientModuleName, element_2.vq_1.m1() + 'Client')]);
|
|
1452
1452
|
addAll(destination_2, list_1);
|
|
1453
1453
|
}
|
|
1454
1454
|
var endpointAndClientImports = destination_2;
|
|
@@ -1458,20 +1458,20 @@ protoOf(RustIrEmitter).s1w = function (endpoints, logger) {
|
|
|
1458
1458
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1459
1459
|
while (_iterator__ex2g4s_5.u()) {
|
|
1460
1460
|
var element_3 = _iterator__ex2g4s_5.v();
|
|
1461
|
-
var endpointName = element_3.
|
|
1461
|
+
var endpointName = element_3.vq_1.m1();
|
|
1462
1462
|
var endpointModuleName_0 = toSnakeCase(this, endpointName);
|
|
1463
1463
|
var namespacePath = endpointModuleName_0 + '::' + endpointName;
|
|
1464
1464
|
var methodName = toSnakeCase(this, endpointName);
|
|
1465
1465
|
var _destruct__k2r9zo = buildClientParams(this, element_3);
|
|
1466
|
-
var paramsStr = _destruct__k2r9zo.
|
|
1467
|
-
var callArgs = _destruct__k2r9zo.
|
|
1466
|
+
var paramsStr = _destruct__k2r9zo.ve();
|
|
1467
|
+
var callArgs = _destruct__k2r9zo.we();
|
|
1468
1468
|
var delegateCall = endpointName + 'Client { serialization: &self.serialization, transportation: &self.transportation }\n' + (' .' + methodName + '(' + callArgs + ').await');
|
|
1469
1469
|
var list_2 = listOf_0(['impl<S: Serialization, T: Transportation> ' + namespacePath + '::Call for Client<S, T> {', ' async fn ' + methodName + '(&self' + paramsStr + ') -> ' + endpointModuleName_0 + '::Response {', ' ' + delegateCall, ' }', '}']);
|
|
1470
1470
|
addAll(destination_3, list_2);
|
|
1471
1471
|
}
|
|
1472
1472
|
var implBlocks = destination_3;
|
|
1473
1473
|
var code = joinToString(plus(listOf_0(['pub struct Client<S: Serialization, T: Transportation> {', ' pub serialization: S,', ' pub transportation: T,', '}']), implBlocks), '\n');
|
|
1474
|
-
var tmp_0 = Companion_getInstance().
|
|
1474
|
+
var tmp_0 = Companion_getInstance().mt(this.x1z_1.ts() + 'client');
|
|
1475
1475
|
// Inline function 'kotlin.collections.buildList' call
|
|
1476
1476
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1477
1477
|
// Inline function 'kotlin.apply' call
|
|
@@ -1481,8 +1481,8 @@ protoOf(RustIrEmitter).s1w = function (endpoints, logger) {
|
|
|
1481
1481
|
this_0.g1(modelImports);
|
|
1482
1482
|
this_0.g1(endpointAndClientImports);
|
|
1483
1483
|
this_0.x(new RawElement(code));
|
|
1484
|
-
var tmp$ret$
|
|
1485
|
-
return new File(tmp_0, tmp$ret$
|
|
1484
|
+
var tmp$ret$19 = this_0.p5();
|
|
1485
|
+
return new File(tmp_0, tmp$ret$19);
|
|
1486
1486
|
};
|
|
1487
1487
|
function get_rustSelfParam() {
|
|
1488
1488
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1496,11 +1496,11 @@ function get_rustResponsePattern() {
|
|
|
1496
1496
|
var rustResponsePattern;
|
|
1497
1497
|
function fixResponseSwitchPatterns() {
|
|
1498
1498
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1499
|
-
// Inline function 'community.flock.wirespec.
|
|
1499
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1500
1500
|
// Inline function 'kotlin.apply' call
|
|
1501
1501
|
var this_0 = new TransformerBuilder();
|
|
1502
|
-
this_0.
|
|
1503
|
-
return this_0.
|
|
1502
|
+
this_0.a18(fixResponseSwitchPatterns$lambda);
|
|
1503
|
+
return this_0.z17();
|
|
1504
1504
|
}
|
|
1505
1505
|
function buildModelImports(_this__u8e3s4) {
|
|
1506
1506
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1511,7 +1511,7 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1511
1511
|
var _iterator__ex2g4s = this_0.t();
|
|
1512
1512
|
while (_iterator__ex2g4s.u()) {
|
|
1513
1513
|
var e = _iterator__ex2g4s.v();
|
|
1514
|
-
var key = e.
|
|
1514
|
+
var key = e.h18_1;
|
|
1515
1515
|
if (set.x(key)) {
|
|
1516
1516
|
list.x(e);
|
|
1517
1517
|
}
|
|
@@ -1522,161 +1522,161 @@ function buildModelImports(_this__u8e3s4) {
|
|
|
1522
1522
|
var _iterator__ex2g4s_0 = list.t();
|
|
1523
1523
|
while (_iterator__ex2g4s_0.u()) {
|
|
1524
1524
|
var item = _iterator__ex2g4s_0.v();
|
|
1525
|
-
var tmp$ret$
|
|
1526
|
-
destination.x(tmp$ret$
|
|
1525
|
+
var tmp$ret$4 = import_0('super::' + toRustSnakeCase(item.h18_1), Companion_getInstance().mt(item.h18_1).pt());
|
|
1526
|
+
destination.x(tmp$ret$4);
|
|
1527
1527
|
}
|
|
1528
1528
|
return destination;
|
|
1529
1529
|
}
|
|
1530
1530
|
function replaceStructWithRefinedFunctions(_this__u8e3s4, refined) {
|
|
1531
1531
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1532
|
-
// Inline function 'community.flock.wirespec.
|
|
1532
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1533
1533
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1534
|
-
// Inline function 'community.flock.wirespec.
|
|
1534
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1535
1535
|
var tmp = scope;
|
|
1536
|
-
// Inline function 'community.flock.wirespec.
|
|
1537
|
-
var this_0 = scope.
|
|
1538
|
-
// Inline function 'community.flock.wirespec.
|
|
1536
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1537
|
+
var this_0 = scope.k17_1;
|
|
1538
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1539
1539
|
// Inline function 'kotlin.apply' call
|
|
1540
1540
|
var this_1 = new TransformerBuilder();
|
|
1541
|
-
this_1.
|
|
1542
|
-
var tmp$ret$
|
|
1543
|
-
tmp.
|
|
1544
|
-
var tmp_0 = scope.
|
|
1541
|
+
this_1.e18(replaceStructWithRefinedFunctions$lambda(refined));
|
|
1542
|
+
var tmp$ret$4 = this_1.z17();
|
|
1543
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
1544
|
+
var tmp_0 = scope.k17_1;
|
|
1545
1545
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1546
1546
|
}
|
|
1547
1547
|
function injectApiStruct(_this__u8e3s4, endpoint) {
|
|
1548
1548
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1549
|
-
// Inline function 'community.flock.wirespec.
|
|
1549
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1550
1550
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1551
|
-
// Inline function 'community.flock.wirespec.
|
|
1551
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1552
1552
|
var tmp = scope;
|
|
1553
|
-
// Inline function 'community.flock.wirespec.
|
|
1554
|
-
var this_0 = scope.
|
|
1555
|
-
// Inline function 'community.flock.wirespec.
|
|
1553
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1554
|
+
var this_0 = scope.k17_1;
|
|
1555
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1556
1556
|
// Inline function 'kotlin.apply' call
|
|
1557
1557
|
var this_1 = new TransformerBuilder();
|
|
1558
|
-
this_1.
|
|
1559
|
-
var tmp$ret$
|
|
1560
|
-
tmp.
|
|
1561
|
-
var tmp_0 = scope.
|
|
1558
|
+
this_1.e18(injectApiStruct$lambda(endpoint));
|
|
1559
|
+
var tmp$ret$4 = this_1.z17();
|
|
1560
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
1561
|
+
var tmp_0 = scope.k17_1;
|
|
1562
1562
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1563
1563
|
}
|
|
1564
1564
|
function injectResponseFromImpls(_this__u8e3s4) {
|
|
1565
1565
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1566
|
-
// Inline function 'community.flock.wirespec.
|
|
1566
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1567
1567
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1568
|
-
// Inline function 'community.flock.wirespec.
|
|
1568
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1569
1569
|
var tmp = scope;
|
|
1570
|
-
// Inline function 'community.flock.wirespec.
|
|
1571
|
-
var this_0 = scope.
|
|
1572
|
-
// Inline function 'community.flock.wirespec.
|
|
1570
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1571
|
+
var this_0 = scope.k17_1;
|
|
1572
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1573
1573
|
// Inline function 'kotlin.apply' call
|
|
1574
1574
|
var this_1 = new TransformerBuilder();
|
|
1575
|
-
this_1.
|
|
1576
|
-
var tmp$ret$
|
|
1577
|
-
tmp.
|
|
1578
|
-
var tmp_0 = scope.
|
|
1575
|
+
this_1.e18(injectResponseFromImpls$lambda);
|
|
1576
|
+
var tmp$ret$4 = this_1.z17();
|
|
1577
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
1578
|
+
var tmp_0 = scope.k17_1;
|
|
1579
1579
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1580
1580
|
}
|
|
1581
1581
|
function injectHandlerImplForClient(_this__u8e3s4) {
|
|
1582
1582
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1583
|
-
// Inline function 'community.flock.wirespec.
|
|
1583
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1584
1584
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1585
|
-
// Inline function 'community.flock.wirespec.
|
|
1585
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1586
1586
|
var tmp = scope;
|
|
1587
|
-
// Inline function 'community.flock.wirespec.
|
|
1588
|
-
var this_0 = scope.
|
|
1589
|
-
// Inline function 'community.flock.wirespec.
|
|
1587
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1588
|
+
var this_0 = scope.k17_1;
|
|
1589
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1590
1590
|
// Inline function 'kotlin.apply' call
|
|
1591
1591
|
var this_1 = new TransformerBuilder();
|
|
1592
|
-
this_1.
|
|
1593
|
-
var tmp$ret$
|
|
1594
|
-
tmp.
|
|
1595
|
-
var tmp_0 = scope.
|
|
1592
|
+
this_1.e18(injectHandlerImplForClient$lambda);
|
|
1593
|
+
var tmp$ret$4 = this_1.z17();
|
|
1594
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
1595
|
+
var tmp_0 = scope.k17_1;
|
|
1596
1596
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1597
1597
|
}
|
|
1598
1598
|
function injectSelfToHandlerMethods(_this__u8e3s4) {
|
|
1599
1599
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1600
|
-
// Inline function 'community.flock.wirespec.
|
|
1600
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1601
1601
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1602
|
-
// Inline function 'community.flock.wirespec.
|
|
1602
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1603
1603
|
var tmp = scope;
|
|
1604
|
-
// Inline function 'community.flock.wirespec.
|
|
1605
|
-
var this_0 = scope.
|
|
1606
|
-
// Inline function 'community.flock.wirespec.
|
|
1604
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1605
|
+
var this_0 = scope.k17_1;
|
|
1606
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1607
1607
|
// Inline function 'kotlin.apply' call
|
|
1608
1608
|
var this_1 = new TransformerBuilder();
|
|
1609
|
-
this_1.
|
|
1610
|
-
var tmp$ret$
|
|
1611
|
-
tmp.
|
|
1612
|
-
var tmp_0 = scope.
|
|
1609
|
+
this_1.e18(injectSelfToHandlerMethods$lambda);
|
|
1610
|
+
var tmp$ret$4 = this_1.z17();
|
|
1611
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
1612
|
+
var tmp_0 = scope.k17_1;
|
|
1613
1613
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1614
1614
|
}
|
|
1615
1615
|
function stripResponseGenerics(_this__u8e3s4) {
|
|
1616
1616
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1617
|
-
// Inline function 'community.flock.wirespec.
|
|
1617
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1618
1618
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1619
|
-
// Inline function 'community.flock.wirespec.
|
|
1619
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
1620
1620
|
var tmp = scope;
|
|
1621
|
-
// Inline function 'community.flock.wirespec.
|
|
1622
|
-
var this_0 = scope.
|
|
1623
|
-
// Inline function 'community.flock.wirespec.
|
|
1621
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
1622
|
+
var this_0 = scope.k17_1;
|
|
1623
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1624
1624
|
// Inline function 'kotlin.apply' call
|
|
1625
1625
|
var this_1 = new TransformerBuilder();
|
|
1626
|
-
this_1.
|
|
1627
|
-
var tmp$ret$
|
|
1628
|
-
tmp.
|
|
1629
|
-
var tmp_0 = scope.
|
|
1626
|
+
this_1.q17(stripResponseGenerics$lambda);
|
|
1627
|
+
var tmp$ret$4 = this_1.z17();
|
|
1628
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
1629
|
+
var tmp_0 = scope.k17_1;
|
|
1630
1630
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1631
1631
|
}
|
|
1632
1632
|
function stripHandlerExtends(_this__u8e3s4) {
|
|
1633
1633
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1634
|
-
// Inline function 'community.flock.wirespec.
|
|
1634
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1635
1635
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1636
|
-
// Inline function 'community.flock.wirespec.
|
|
1636
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1637
1637
|
var tmp = scope;
|
|
1638
|
-
// Inline function 'community.flock.wirespec.
|
|
1639
|
-
var this_0 = scope.
|
|
1640
|
-
// Inline function 'community.flock.wirespec.
|
|
1638
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1639
|
+
var this_0 = scope.k17_1;
|
|
1640
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1641
1641
|
// Inline function 'kotlin.apply' call
|
|
1642
1642
|
var this_1 = new TransformerBuilder();
|
|
1643
|
-
this_1.
|
|
1644
|
-
var tmp$ret$
|
|
1645
|
-
tmp.
|
|
1646
|
-
var tmp_0 = scope.
|
|
1643
|
+
this_1.e18(stripHandlerExtends$lambda);
|
|
1644
|
+
var tmp$ret$4 = this_1.z17();
|
|
1645
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
1646
|
+
var tmp_0 = scope.k17_1;
|
|
1647
1647
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1648
1648
|
}
|
|
1649
1649
|
function convertSimpleRawExpressionsToVariableRefs(_this__u8e3s4) {
|
|
1650
1650
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1651
|
-
// Inline function 'community.flock.wirespec.
|
|
1651
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1652
1652
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1653
1653
|
var identifierPattern = Regex_init_$Create$('[a-zA-Z_][a-zA-Z0-9_]*');
|
|
1654
|
-
scope.
|
|
1655
|
-
var tmp = scope.
|
|
1654
|
+
scope.c18(convertSimpleRawExpressionsToVariableRefs$lambda(identifierPattern));
|
|
1655
|
+
var tmp = scope.k17_1;
|
|
1656
1656
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1657
1657
|
}
|
|
1658
1658
|
function stripWirespecPrefix(_this__u8e3s4) {
|
|
1659
1659
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1660
|
-
// Inline function 'community.flock.wirespec.
|
|
1660
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1661
1661
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1662
|
-
// Inline function 'community.flock.wirespec.
|
|
1662
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
1663
1663
|
var tmp = scope;
|
|
1664
|
-
// Inline function 'community.flock.wirespec.
|
|
1665
|
-
var this_0 = scope.
|
|
1666
|
-
// Inline function 'community.flock.wirespec.
|
|
1664
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
1665
|
+
var this_0 = scope.k17_1;
|
|
1666
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1667
1667
|
// Inline function 'kotlin.apply' call
|
|
1668
1668
|
var this_1 = new TransformerBuilder();
|
|
1669
|
-
this_1.
|
|
1670
|
-
var tmp$ret$
|
|
1671
|
-
tmp.
|
|
1672
|
-
var tmp_0 = scope.
|
|
1669
|
+
this_1.q17(stripWirespecPrefix$lambda);
|
|
1670
|
+
var tmp$ret$4 = this_1.z17();
|
|
1671
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
1672
|
+
var tmp_0 = scope.k17_1;
|
|
1673
1673
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1674
1674
|
}
|
|
1675
1675
|
function flattenForRust(_this__u8e3s4) {
|
|
1676
1676
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1677
|
-
// Inline function 'community.flock.wirespec.
|
|
1677
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
1678
1678
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1679
|
-
var tmp0 = _this__u8e3s4.
|
|
1679
|
+
var tmp0 = _this__u8e3s4.zu();
|
|
1680
1680
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1681
1681
|
var destination = ArrayList_init_$Create$_0();
|
|
1682
1682
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1686,10 +1686,10 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1686
1686
|
destination.x(element);
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
|
-
var tmp$ret$
|
|
1690
|
-
var namespace = ensureNotNull(tmp$ret$
|
|
1689
|
+
var tmp$ret$0 = firstOrNull_0(destination);
|
|
1690
|
+
var namespace = ensureNotNull(tmp$ret$0);
|
|
1691
1691
|
// Inline function 'kotlin.collections.filter' call
|
|
1692
|
-
var tmp0_0 = namespace.
|
|
1692
|
+
var tmp0_0 = namespace.ev_1;
|
|
1693
1693
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1694
1694
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
1695
1695
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -1714,13 +1714,13 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1714
1714
|
var tmp_0;
|
|
1715
1715
|
var tmp_1;
|
|
1716
1716
|
if (item instanceof Union_0) {
|
|
1717
|
-
tmp_1 = item.
|
|
1717
|
+
tmp_1 = item.dw_1.pt() === 'Response';
|
|
1718
1718
|
} else {
|
|
1719
1719
|
tmp_1 = false;
|
|
1720
1720
|
}
|
|
1721
1721
|
if (tmp_1) {
|
|
1722
1722
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1723
|
-
var tmp0_1 = namespace.
|
|
1723
|
+
var tmp0_1 = namespace.ev_1;
|
|
1724
1724
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1725
1725
|
var destination_2 = ArrayList_init_$Create$_0();
|
|
1726
1726
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -1736,8 +1736,8 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1736
1736
|
var _iterator__ex2g4s_3 = destination_2.t();
|
|
1737
1737
|
while (_iterator__ex2g4s_3.u()) {
|
|
1738
1738
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1739
|
-
var tmp$ret$
|
|
1740
|
-
destination_3.x(tmp$ret$
|
|
1739
|
+
var tmp$ret$13 = item_0.xw_1.pt();
|
|
1740
|
+
destination_3.x(tmp$ret$13);
|
|
1741
1741
|
}
|
|
1742
1742
|
// Inline function 'kotlin.collections.filter' call
|
|
1743
1743
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1755,24 +1755,24 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1755
1755
|
var _iterator__ex2g4s_5 = destination_4.t();
|
|
1756
1756
|
while (_iterator__ex2g4s_5.u()) {
|
|
1757
1757
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
1758
|
-
var tmp$ret$
|
|
1759
|
-
destination_5.x(tmp$ret$
|
|
1758
|
+
var tmp$ret$19 = Custom_init_$Create$(item_1);
|
|
1759
|
+
destination_5.x(tmp$ret$19);
|
|
1760
1760
|
}
|
|
1761
1761
|
var members = destination_5;
|
|
1762
|
-
tmp_0 = item.
|
|
1762
|
+
tmp_0 = item.jw(VOID, VOID, members, emptyList());
|
|
1763
1763
|
} else {
|
|
1764
1764
|
if (item instanceof Union_0) {
|
|
1765
|
-
tmp_0 = item.
|
|
1765
|
+
tmp_0 = item.jw(VOID, VOID, VOID, emptyList());
|
|
1766
1766
|
} else {
|
|
1767
1767
|
tmp_0 = item;
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
|
-
var tmp$ret$
|
|
1771
|
-
destination_1.x(tmp$ret$
|
|
1770
|
+
var tmp$ret$8 = tmp_0;
|
|
1771
|
+
destination_1.x(tmp$ret$8);
|
|
1772
1772
|
}
|
|
1773
1773
|
var moduleElements = destination_1;
|
|
1774
1774
|
// Inline function 'kotlin.collections.filterNot' call
|
|
1775
|
-
var tmp0_2 = namespace.
|
|
1775
|
+
var tmp0_2 = namespace.ev_1;
|
|
1776
1776
|
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1777
1777
|
var destination_6 = ArrayList_init_$Create$_0();
|
|
1778
1778
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
@@ -1789,15 +1789,15 @@ function flattenForRust(_this__u8e3s4) {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
1791
|
var classElements = destination_6;
|
|
1792
|
-
return new File(namespace.
|
|
1792
|
+
return new File(namespace.dv_1, plus_0(moduleElements, new Namespace(namespace.dv_1, classElements, namespace.fv_1)));
|
|
1793
1793
|
}
|
|
1794
1794
|
function fixConstructorCalls() {
|
|
1795
1795
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1796
|
-
// Inline function 'community.flock.wirespec.
|
|
1796
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1797
1797
|
// Inline function 'kotlin.apply' call
|
|
1798
1798
|
var this_0 = new TransformerBuilder();
|
|
1799
|
-
this_0.
|
|
1800
|
-
return this_0.
|
|
1799
|
+
this_0.c18(fixConstructorCalls$lambda);
|
|
1800
|
+
return this_0.z17();
|
|
1801
1801
|
}
|
|
1802
1802
|
function buildEndpointImports(_this__u8e3s4) {
|
|
1803
1803
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
@@ -1808,7 +1808,7 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1808
1808
|
var _iterator__ex2g4s = this_0.t();
|
|
1809
1809
|
while (_iterator__ex2g4s.u()) {
|
|
1810
1810
|
var e = _iterator__ex2g4s.v();
|
|
1811
|
-
var key = e.
|
|
1811
|
+
var key = e.h18_1;
|
|
1812
1812
|
if (set.x(key)) {
|
|
1813
1813
|
list.x(e);
|
|
1814
1814
|
}
|
|
@@ -1819,24 +1819,24 @@ function buildEndpointImports(_this__u8e3s4) {
|
|
|
1819
1819
|
var _iterator__ex2g4s_0 = list.t();
|
|
1820
1820
|
while (_iterator__ex2g4s_0.u()) {
|
|
1821
1821
|
var item = _iterator__ex2g4s_0.v();
|
|
1822
|
-
var tmp$ret$
|
|
1823
|
-
destination.x(tmp$ret$
|
|
1822
|
+
var tmp$ret$4 = import_0('super::super::model::' + toRustSnakeCase(item.h18_1), Companion_getInstance().mt(item.h18_1).pt());
|
|
1823
|
+
destination.x(tmp$ret$4);
|
|
1824
1824
|
}
|
|
1825
1825
|
return destination;
|
|
1826
1826
|
}
|
|
1827
1827
|
function toRustSnakeCase(_this__u8e3s4) {
|
|
1828
1828
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1829
|
-
return Companion_getInstance().
|
|
1829
|
+
return Companion_getInstance().mt(_this__u8e3s4).qt();
|
|
1830
1830
|
}
|
|
1831
1831
|
function buildValidateFunction(refined) {
|
|
1832
1832
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1833
|
-
var constraintExpr = convertConstraint(refined.
|
|
1833
|
+
var constraintExpr = convertConstraint(refined.cs_1, new FieldCall(new VariableReference(Companion_getInstance().mt('self')), Companion_getInstance().mt('value')));
|
|
1834
1834
|
return function_0('validate', VOID, VOID, buildValidateFunction$lambda(constraintExpr));
|
|
1835
1835
|
}
|
|
1836
1836
|
function buildToStringFunction(refined) {
|
|
1837
1837
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1838
1838
|
var tmp;
|
|
1839
|
-
if (refined.
|
|
1839
|
+
if (refined.cs_1.j18_1 instanceof String_0) {
|
|
1840
1840
|
tmp = 'self.value.clone()';
|
|
1841
1841
|
} else {
|
|
1842
1842
|
tmp = 'format!("{}", self.value)';
|
|
@@ -1851,8 +1851,8 @@ function buildApiStruct(endpoint) {
|
|
|
1851
1851
|
function generateApiStructCode(_this__u8e3s4) {
|
|
1852
1852
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
1853
1853
|
// Inline function 'kotlin.let' call
|
|
1854
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
1855
|
-
var methodName = _this__u8e3s4.
|
|
1854
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.xq_1, '/', VOID, VOID, VOID, VOID, generateApiStructCode$lambda);
|
|
1855
|
+
var methodName = _this__u8e3s4.wq_1.b3_1;
|
|
1856
1856
|
return trimIndent('\n pub struct Api;\n impl Server for Api {\n type Req = Request;\n type Res = Response;\n fn path_template(&self) -> &\'static str { "' + pathTemplate + '" }\n fn method(&self) -> Method { Method::' + methodName + ' }\n }\n ');
|
|
1857
1857
|
}
|
|
1858
1858
|
function fixResponseSwitchPatterns$lambda(s, t) {
|
|
@@ -1861,70 +1861,70 @@ function fixResponseSwitchPatterns$lambda(s, t) {
|
|
|
1861
1861
|
if (!(s instanceof Switch)) {
|
|
1862
1862
|
tmp = true;
|
|
1863
1863
|
} else {
|
|
1864
|
-
var tmp0_safe_receiver = s.
|
|
1865
|
-
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1864
|
+
var tmp0_safe_receiver = s.ny_1;
|
|
1865
|
+
tmp = !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ot()) === 'r');
|
|
1866
1866
|
}
|
|
1867
1867
|
if (tmp)
|
|
1868
1868
|
return transformChildren(s, t);
|
|
1869
1869
|
// Inline function 'kotlin.collections.map' call
|
|
1870
|
-
var this_0 = s.
|
|
1870
|
+
var this_0 = s.ly_1;
|
|
1871
1871
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1872
1872
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1873
1873
|
var _iterator__ex2g4s = this_0.t();
|
|
1874
1874
|
while (_iterator__ex2g4s.u()) {
|
|
1875
1875
|
var item = _iterator__ex2g4s.v();
|
|
1876
|
-
var tmp_0 = item.
|
|
1876
|
+
var tmp_0 = item.sy_1;
|
|
1877
1877
|
var tmp0_safe_receiver_0 = tmp_0 instanceof Custom ? tmp_0 : null;
|
|
1878
|
-
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.
|
|
1879
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1878
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.gu_1;
|
|
1879
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.pt();
|
|
1880
1880
|
var tmp_1;
|
|
1881
1881
|
if (!(typeName == null) && get_rustResponsePattern().pc(typeName)) {
|
|
1882
|
-
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.
|
|
1882
|
+
var tmp_2 = new RawExpression('Response::' + typeName + '(' + ensureNotNull(s.ny_1).qt() + ')');
|
|
1883
1883
|
// Inline function 'kotlin.collections.map' call
|
|
1884
|
-
var this_1 = item.
|
|
1884
|
+
var this_1 = item.ry_1;
|
|
1885
1885
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1886
1886
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1887
1887
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1888
1888
|
while (_iterator__ex2g4s_0.u()) {
|
|
1889
1889
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1890
|
-
var tmp$ret$
|
|
1891
|
-
destination_0.x(tmp$ret$
|
|
1890
|
+
var tmp$ret$5 = t.e17(item_0);
|
|
1891
|
+
destination_0.x(tmp$ret$5);
|
|
1892
1892
|
}
|
|
1893
1893
|
tmp_1 = new Case(tmp_2, destination_0, null);
|
|
1894
1894
|
} else {
|
|
1895
|
-
var tmp_3 = t.
|
|
1895
|
+
var tmp_3 = t.f17(item.qy_1);
|
|
1896
1896
|
// Inline function 'kotlin.collections.map' call
|
|
1897
|
-
var this_2 = item.
|
|
1897
|
+
var this_2 = item.ry_1;
|
|
1898
1898
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1899
1899
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
1900
1900
|
var _iterator__ex2g4s_1 = this_2.t();
|
|
1901
1901
|
while (_iterator__ex2g4s_1.u()) {
|
|
1902
1902
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
1903
|
-
var tmp$ret$
|
|
1904
|
-
destination_1.x(tmp$ret$
|
|
1903
|
+
var tmp$ret$8 = t.e17(item_1);
|
|
1904
|
+
destination_1.x(tmp$ret$8);
|
|
1905
1905
|
}
|
|
1906
1906
|
var tmp_4 = destination_1;
|
|
1907
|
-
var tmp2_safe_receiver = item.
|
|
1907
|
+
var tmp2_safe_receiver = item.sy_1;
|
|
1908
1908
|
var tmp_5;
|
|
1909
1909
|
if (tmp2_safe_receiver == null) {
|
|
1910
1910
|
tmp_5 = null;
|
|
1911
1911
|
} else {
|
|
1912
1912
|
// Inline function 'kotlin.let' call
|
|
1913
|
-
tmp_5 = t.
|
|
1913
|
+
tmp_5 = t.c17(tmp2_safe_receiver);
|
|
1914
1914
|
}
|
|
1915
1915
|
tmp_1 = new Case(tmp_3, tmp_4, tmp_5);
|
|
1916
1916
|
}
|
|
1917
|
-
var tmp$ret$
|
|
1918
|
-
destination.x(tmp$ret$
|
|
1917
|
+
var tmp$ret$2 = tmp_1;
|
|
1918
|
+
destination.x(tmp$ret$2);
|
|
1919
1919
|
}
|
|
1920
1920
|
var transformedCases = destination;
|
|
1921
|
-
return s.
|
|
1921
|
+
return s.py(t.f17(s.ky_1), transformedCases, null);
|
|
1922
1922
|
}
|
|
1923
1923
|
function replaceStructWithRefinedFunctions$lambda($refined) {
|
|
1924
1924
|
return function (element, transformer) {
|
|
1925
1925
|
var tmp;
|
|
1926
1926
|
if (element instanceof Struct) {
|
|
1927
|
-
tmp = element.
|
|
1927
|
+
tmp = element.ix(VOID, VOID, VOID, VOID, listOf_0([buildValidateFunction($refined), buildToStringFunction($refined)]));
|
|
1928
1928
|
} else {
|
|
1929
1929
|
tmp = element;
|
|
1930
1930
|
}
|
|
@@ -1936,7 +1936,7 @@ function injectApiStruct$lambda($endpoint) {
|
|
|
1936
1936
|
return function (element, transformer) {
|
|
1937
1937
|
var tmp;
|
|
1938
1938
|
if (element instanceof Namespace) {
|
|
1939
|
-
tmp = element.
|
|
1939
|
+
tmp = element.iv(VOID, plus(element.ev_1, listOf(buildApiStruct($endpoint))));
|
|
1940
1940
|
} else {
|
|
1941
1941
|
tmp = element;
|
|
1942
1942
|
}
|
|
@@ -1949,7 +1949,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1949
1949
|
var tmp;
|
|
1950
1950
|
if (element instanceof File) {
|
|
1951
1951
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1952
|
-
var tmp0 = element.
|
|
1952
|
+
var tmp0 = element.yu_1;
|
|
1953
1953
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1954
1954
|
var destination = ArrayList_init_$Create$_0();
|
|
1955
1955
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1959,28 +1959,28 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1959
1959
|
var tmp_1;
|
|
1960
1960
|
var tmp_2;
|
|
1961
1961
|
if (element_0 instanceof Union_0) {
|
|
1962
|
-
tmp_2 = element_0.
|
|
1962
|
+
tmp_2 = element_0.dw_1.pt() === 'Response';
|
|
1963
1963
|
} else {
|
|
1964
1964
|
tmp_2 = false;
|
|
1965
1965
|
}
|
|
1966
1966
|
if (tmp_2) {
|
|
1967
1967
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1968
|
-
tmp_1 = !element_0.
|
|
1968
|
+
tmp_1 = !element_0.fw_1.r();
|
|
1969
1969
|
} else {
|
|
1970
1970
|
tmp_1 = false;
|
|
1971
1971
|
}
|
|
1972
1972
|
if (tmp_1) {
|
|
1973
1973
|
var tmp_3 = listOf(element_0);
|
|
1974
1974
|
// Inline function 'kotlin.collections.map' call
|
|
1975
|
-
var this_0 = element_0.
|
|
1975
|
+
var this_0 = element_0.fw_1;
|
|
1976
1976
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1977
1977
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1978
1978
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1979
1979
|
while (_iterator__ex2g4s_0.u()) {
|
|
1980
1980
|
var item = _iterator__ex2g4s_0.v();
|
|
1981
|
-
var memberName = item.
|
|
1982
|
-
var tmp$ret$
|
|
1983
|
-
destination_0.x(tmp$ret$
|
|
1981
|
+
var memberName = item.gu_1.pt();
|
|
1982
|
+
var tmp$ret$7 = new RawElement('impl From<' + memberName + '> for Response { fn from(value: ' + memberName + ') -> Self { Response::' + memberName + '(value) } }\n');
|
|
1983
|
+
destination_0.x(tmp$ret$7);
|
|
1984
1984
|
}
|
|
1985
1985
|
tmp_0 = plus(tmp_3, destination_0);
|
|
1986
1986
|
} else {
|
|
@@ -1989,7 +1989,7 @@ function injectResponseFromImpls$lambda(element, transformer) {
|
|
|
1989
1989
|
var list = tmp_0;
|
|
1990
1990
|
addAll(destination, list);
|
|
1991
1991
|
}
|
|
1992
|
-
tmp = element.
|
|
1992
|
+
tmp = element.bv(VOID, destination);
|
|
1993
1993
|
} else {
|
|
1994
1994
|
tmp = element;
|
|
1995
1995
|
}
|
|
@@ -2000,10 +2000,10 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2000
2000
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2001
2001
|
var tmp;
|
|
2002
2002
|
if (element instanceof Namespace) {
|
|
2003
|
-
var tmp$ret$
|
|
2003
|
+
var tmp$ret$0;
|
|
2004
2004
|
$l$block_1: {
|
|
2005
2005
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
2006
|
-
var tmp0 = element.
|
|
2006
|
+
var tmp0 = element.ev_1;
|
|
2007
2007
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
2008
2008
|
var destination = ArrayList_init_$Create$_0();
|
|
2009
2009
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -2019,7 +2019,7 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2019
2019
|
var _iterator__ex2g4s_0 = destination.t();
|
|
2020
2020
|
while (_iterator__ex2g4s_0.u()) {
|
|
2021
2021
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
2022
|
-
if (element_1.
|
|
2022
|
+
if (element_1.jv_1.equals(Companion_getInstance().mt('Handler'))) {
|
|
2023
2023
|
tmp$ret$3 = element_1;
|
|
2024
2024
|
break $l$block;
|
|
2025
2025
|
}
|
|
@@ -2029,14 +2029,14 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2029
2029
|
var tmp0_elvis_lhs = tmp$ret$3;
|
|
2030
2030
|
var tmp_0;
|
|
2031
2031
|
if (tmp0_elvis_lhs == null) {
|
|
2032
|
-
tmp$ret$
|
|
2032
|
+
tmp$ret$0 = element;
|
|
2033
2033
|
break $l$block_1;
|
|
2034
2034
|
} else {
|
|
2035
2035
|
tmp_0 = tmp0_elvis_lhs;
|
|
2036
2036
|
}
|
|
2037
2037
|
var handler = tmp_0;
|
|
2038
2038
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
2039
|
-
var tmp0_0 = handler.
|
|
2039
|
+
var tmp0_0 = handler.kv_1;
|
|
2040
2040
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
2041
2041
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
2042
2042
|
var _iterator__ex2g4s_1 = tmp0_0.t();
|
|
@@ -2049,16 +2049,16 @@ function injectHandlerImplForClient$lambda(element, transformer) {
|
|
|
2049
2049
|
var tmp1_elvis_lhs = firstOrNull_0(destination_0);
|
|
2050
2050
|
var tmp_1;
|
|
2051
2051
|
if (tmp1_elvis_lhs == null) {
|
|
2052
|
-
tmp$ret$
|
|
2052
|
+
tmp$ret$0 = element;
|
|
2053
2053
|
break $l$block_1;
|
|
2054
2054
|
} else {
|
|
2055
2055
|
tmp_1 = tmp1_elvis_lhs;
|
|
2056
2056
|
}
|
|
2057
2057
|
var method = tmp_1;
|
|
2058
|
-
var methodName = method.
|
|
2059
|
-
tmp$ret$
|
|
2058
|
+
var methodName = method.jx_1.qt();
|
|
2059
|
+
tmp$ret$0 = element.iv(VOID, plus(element.ev_1, listOf(new RawElement(trimIndent('\n impl<C: Client> Handler for C {\n async fn ' + methodName + '(&self, request: Request) -> Response {\n let raw = to_raw_request(self.serialization(), request);\n let resp = self.transport().transport(&raw).await;\n from_raw_response(self.serialization(), resp)\n }\n }\n ')))));
|
|
2060
2060
|
}
|
|
2061
|
-
tmp = tmp$ret$
|
|
2061
|
+
tmp = tmp$ret$0;
|
|
2062
2062
|
} else {
|
|
2063
2063
|
tmp = element;
|
|
2064
2064
|
}
|
|
@@ -2071,23 +2071,23 @@ function injectSelfToHandlerMethods$lambda(element, transformer) {
|
|
|
2071
2071
|
if (element instanceof Interface) {
|
|
2072
2072
|
var tmp$ret$0;
|
|
2073
2073
|
$l$block: {
|
|
2074
|
-
if (!element.
|
|
2074
|
+
if (!element.jv_1.equals(Companion_getInstance().mt('Handler')) && !element.jv_1.equals(Companion_getInstance().mt('Call'))) {
|
|
2075
2075
|
tmp$ret$0 = element;
|
|
2076
2076
|
break $l$block;
|
|
2077
2077
|
}
|
|
2078
|
-
// Inline function 'community.flock.wirespec.
|
|
2078
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2079
2079
|
var scope = new TransformScope(element);
|
|
2080
|
-
// Inline function 'community.flock.wirespec.
|
|
2080
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
2081
2081
|
var tmp_0 = scope;
|
|
2082
|
-
// Inline function 'community.flock.wirespec.
|
|
2083
|
-
var this_0 = scope.
|
|
2084
|
-
// Inline function 'community.flock.wirespec.
|
|
2082
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
2083
|
+
var this_0 = scope.k17_1;
|
|
2084
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2085
2085
|
// Inline function 'kotlin.apply' call
|
|
2086
2086
|
var this_1 = new TransformerBuilder();
|
|
2087
|
-
this_1.
|
|
2088
|
-
var tmp$ret$
|
|
2089
|
-
tmp_0.
|
|
2090
|
-
var tmp_1 = scope.
|
|
2087
|
+
this_1.e18(injectSelfToHandlerMethods$lambda$lambda);
|
|
2088
|
+
var tmp$ret$5 = this_1.z17();
|
|
2089
|
+
tmp_0.k17_1 = transform(this_0, tmp$ret$5);
|
|
2090
|
+
var tmp_1 = scope.k17_1;
|
|
2091
2091
|
tmp$ret$0 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2092
2092
|
}
|
|
2093
2093
|
tmp = tmp$ret$0;
|
|
@@ -2101,7 +2101,7 @@ function injectSelfToHandlerMethods$lambda$lambda(element, transformer) {
|
|
|
2101
2101
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2102
2102
|
var tmp;
|
|
2103
2103
|
if (element instanceof Function_0) {
|
|
2104
|
-
tmp = element.
|
|
2104
|
+
tmp = element.vx(Companion_getInstance().mt(element.jx_1.qt()), VOID, plus(listOf(get_rustSelfParam()), element.lx_1));
|
|
2105
2105
|
} else {
|
|
2106
2106
|
tmp = element;
|
|
2107
2107
|
}
|
|
@@ -2114,14 +2114,14 @@ function stripResponseGenerics$lambda(type, transformer) {
|
|
|
2114
2114
|
if (type instanceof Custom) {
|
|
2115
2115
|
var tmp_0;
|
|
2116
2116
|
var tmp_1;
|
|
2117
|
-
if (startsWith(type.
|
|
2117
|
+
if (startsWith(type.gu_1.pt(), 'Response')) {
|
|
2118
2118
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2119
|
-
tmp_1 = !type.
|
|
2119
|
+
tmp_1 = !type.hu_1.r();
|
|
2120
2120
|
} else {
|
|
2121
2121
|
tmp_1 = false;
|
|
2122
2122
|
}
|
|
2123
2123
|
if (tmp_1) {
|
|
2124
|
-
tmp_0 = type.
|
|
2124
|
+
tmp_0 = type.ju(VOID, emptyList());
|
|
2125
2125
|
} else {
|
|
2126
2126
|
tmp_0 = type;
|
|
2127
2127
|
}
|
|
@@ -2136,7 +2136,7 @@ function stripHandlerExtends$lambda(element, transformer) {
|
|
|
2136
2136
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2137
2137
|
var tmp;
|
|
2138
2138
|
if (element instanceof Interface) {
|
|
2139
|
-
tmp = element.
|
|
2139
|
+
tmp = element.jv_1.equals(Companion_getInstance().mt('Handler')) || element.jv_1.equals(Companion_getInstance().mt('Call')) ? element.rv(VOID, VOID, emptyList()) : element;
|
|
2140
2140
|
} else {
|
|
2141
2141
|
tmp = element;
|
|
2142
2142
|
}
|
|
@@ -2149,17 +2149,17 @@ function convertSimpleRawExpressionsToVariableRefs$lambda($identifierPattern) {
|
|
|
2149
2149
|
var tmp_0;
|
|
2150
2150
|
var tmp_1;
|
|
2151
2151
|
if (s instanceof RawExpression) {
|
|
2152
|
-
tmp_1 = $identifierPattern.pc(s.
|
|
2152
|
+
tmp_1 = $identifierPattern.pc(s.yx_1);
|
|
2153
2153
|
} else {
|
|
2154
2154
|
tmp_1 = false;
|
|
2155
2155
|
}
|
|
2156
2156
|
if (tmp_1) {
|
|
2157
|
-
tmp_0 = !contains(s.
|
|
2157
|
+
tmp_0 = !contains(s.yx_1, '.');
|
|
2158
2158
|
} else {
|
|
2159
2159
|
tmp_0 = false;
|
|
2160
2160
|
}
|
|
2161
2161
|
if (tmp_0) {
|
|
2162
|
-
tmp = new VariableReference(Companion_getInstance().
|
|
2162
|
+
tmp = new VariableReference(Companion_getInstance().mt(s.yx_1));
|
|
2163
2163
|
} else {
|
|
2164
2164
|
tmp = transformChildren(s, t);
|
|
2165
2165
|
}
|
|
@@ -2170,10 +2170,10 @@ function stripWirespecPrefix$lambda(type, transformer) {
|
|
|
2170
2170
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2171
2171
|
var tmp;
|
|
2172
2172
|
if (type instanceof Custom) {
|
|
2173
|
-
var pascalName = type.
|
|
2173
|
+
var pascalName = type.gu_1.pt();
|
|
2174
2174
|
var tmp_0;
|
|
2175
2175
|
if (startsWith(pascalName, 'Wirespec.')) {
|
|
2176
|
-
tmp_0 = type.
|
|
2176
|
+
tmp_0 = type.ju(Companion_getInstance().mt(removePrefix(pascalName, 'Wirespec.')));
|
|
2177
2177
|
} else {
|
|
2178
2178
|
tmp_0 = type;
|
|
2179
2179
|
}
|
|
@@ -2188,12 +2188,12 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2188
2188
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2189
2189
|
if (!(s instanceof ConstructorStatement))
|
|
2190
2190
|
return transformChildren(s, t);
|
|
2191
|
-
var tmp = s.
|
|
2191
|
+
var tmp = s.tu_1;
|
|
2192
2192
|
var tmp0_safe_receiver = tmp instanceof Custom ? tmp : null;
|
|
2193
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2194
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
2193
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gu_1;
|
|
2194
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.pt();
|
|
2195
2195
|
// Inline function 'kotlin.collections.mapValues' call
|
|
2196
|
-
var this_0 = s.
|
|
2196
|
+
var this_0 = s.uu_1;
|
|
2197
2197
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
2198
2198
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.b1()));
|
|
2199
2199
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -2201,25 +2201,25 @@ function fixConstructorCalls$lambda(s, t) {
|
|
|
2201
2201
|
while (_iterator__ex2g4s.u()) {
|
|
2202
2202
|
var element = _iterator__ex2g4s.v();
|
|
2203
2203
|
var tmp_0 = element.l1();
|
|
2204
|
-
var tmp$ret$
|
|
2205
|
-
destination.t2(tmp_0, tmp$ret$
|
|
2204
|
+
var tmp$ret$4 = t.f17(element.m1());
|
|
2205
|
+
destination.t2(tmp_0, tmp$ret$4);
|
|
2206
2206
|
}
|
|
2207
2207
|
var transformedArgs = destination;
|
|
2208
|
-
return !(typeName == null) && get_rustResponsePattern().pc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().
|
|
2208
|
+
return !(typeName == null) && get_rustResponsePattern().pc(typeName) ? new FunctionCall(VOID, VOID, new Name(listOf('Response::' + typeName)), mapOf_0(to(Companion_getInstance().mt('inner'), new FunctionCall(VOID, VOID, new Name(listOf(typeName + '::new')), transformedArgs)))) : typeName === 'Request' ? new FunctionCall(VOID, VOID, new Name(listOf('Request::new')), transformedArgs) : transformChildren(s, t);
|
|
2209
2209
|
}
|
|
2210
2210
|
function buildValidateFunction$lambda($constraintExpr) {
|
|
2211
2211
|
return function ($this$function) {
|
|
2212
|
-
$this$function.
|
|
2213
|
-
$this$function.
|
|
2214
|
-
$this$function.
|
|
2212
|
+
$this$function.a13('&self', Custom_init_$Create$(''));
|
|
2213
|
+
$this$function.z12(Boolean_instance);
|
|
2214
|
+
$this$function.c13($constraintExpr);
|
|
2215
2215
|
return Unit_instance;
|
|
2216
2216
|
};
|
|
2217
2217
|
}
|
|
2218
2218
|
function buildToStringFunction$lambda($expr) {
|
|
2219
2219
|
return function ($this$function) {
|
|
2220
|
-
$this$function.
|
|
2221
|
-
$this$function.
|
|
2222
|
-
$this$function.
|
|
2220
|
+
$this$function.a13('&self', Custom_init_$Create$(''));
|
|
2221
|
+
$this$function.z12(String_instance);
|
|
2222
|
+
$this$function.c13(new RawExpression($expr));
|
|
2223
2223
|
return Unit_instance;
|
|
2224
2224
|
};
|
|
2225
2225
|
}
|
|
@@ -2227,10 +2227,10 @@ function generateApiStructCode$lambda(segment) {
|
|
|
2227
2227
|
_init_properties_RustIrTransformer_kt__rrvmwq();
|
|
2228
2228
|
var tmp;
|
|
2229
2229
|
if (segment instanceof Literal) {
|
|
2230
|
-
tmp = segment.
|
|
2230
|
+
tmp = segment.q19_1;
|
|
2231
2231
|
} else {
|
|
2232
2232
|
if (segment instanceof Param) {
|
|
2233
|
-
tmp = '{' + segment.
|
|
2233
|
+
tmp = '{' + segment.cr_1.m1() + '}';
|
|
2234
2234
|
} else {
|
|
2235
2235
|
noWhenBranchMatchedException();
|
|
2236
2236
|
}
|
|
@@ -2241,39 +2241,39 @@ var properties_initialized_RustIrTransformer_kt_hr6k9w;
|
|
|
2241
2241
|
function _init_properties_RustIrTransformer_kt__rrvmwq() {
|
|
2242
2242
|
if (!properties_initialized_RustIrTransformer_kt_hr6k9w) {
|
|
2243
2243
|
properties_initialized_RustIrTransformer_kt_hr6k9w = true;
|
|
2244
|
-
rustSelfParam = new Parameter(Companion_getInstance().
|
|
2244
|
+
rustSelfParam = new Parameter(Companion_getInstance().mt('&self'), Custom_init_$Create$(''));
|
|
2245
2245
|
rustResponsePattern = Regex_init_$Create$('Response(\\d+|Default)');
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
2248
|
function borrowParamsOf($this, fn) {
|
|
2249
2249
|
// Inline function 'kotlin.collections.map' call
|
|
2250
|
-
var this_0 = fn.
|
|
2250
|
+
var this_0 = fn.lx_1;
|
|
2251
2251
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2252
2252
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2253
2253
|
var _iterator__ex2g4s = this_0.t();
|
|
2254
2254
|
while (_iterator__ex2g4s.u()) {
|
|
2255
2255
|
var item = _iterator__ex2g4s.v();
|
|
2256
2256
|
var tmp;
|
|
2257
|
-
if (RustTransform_getInstance().
|
|
2257
|
+
if (RustTransform_getInstance().n20(item.zy_1)) {
|
|
2258
2258
|
tmp = item;
|
|
2259
2259
|
} else {
|
|
2260
|
-
tmp = item.
|
|
2260
|
+
tmp = item.dz(VOID, applyBorrowRule(RustTransform_getInstance(), item.az_1));
|
|
2261
2261
|
}
|
|
2262
|
-
var tmp$ret$
|
|
2263
|
-
destination.x(tmp$ret$
|
|
2262
|
+
var tmp$ret$2 = tmp;
|
|
2263
|
+
destination.x(tmp$ret$2);
|
|
2264
2264
|
}
|
|
2265
|
-
return fn.
|
|
2265
|
+
return fn.vx(VOID, VOID, destination);
|
|
2266
2266
|
}
|
|
2267
2267
|
function applyBorrowRule($this, type) {
|
|
2268
2268
|
var tmp;
|
|
2269
2269
|
if (type instanceof Nullable) {
|
|
2270
|
-
tmp = new Nullable(applyBorrowRule($this, type.
|
|
2270
|
+
tmp = new Nullable(applyBorrowRule($this, type.ku_1));
|
|
2271
2271
|
} else {
|
|
2272
2272
|
if (equals(type, String_instance)) {
|
|
2273
2273
|
tmp = Custom_init_$Create$('&str');
|
|
2274
2274
|
} else {
|
|
2275
2275
|
if (type instanceof Custom) {
|
|
2276
|
-
tmp = $this.
|
|
2276
|
+
tmp = $this.q20(type) ? type : $this.p20(type) ? borrowImpl(type) : $this.o20(type) ? ownedImpl(type) : type;
|
|
2277
2277
|
} else {
|
|
2278
2278
|
tmp = type;
|
|
2279
2279
|
}
|
|
@@ -2281,19 +2281,19 @@ function applyBorrowRule($this, type) {
|
|
|
2281
2281
|
}
|
|
2282
2282
|
return tmp;
|
|
2283
2283
|
}
|
|
2284
|
-
function toBorrowedRaw($this,
|
|
2285
|
-
return new RawExpression('&' + toRawCode($this,
|
|
2284
|
+
function toBorrowedRaw($this, $receiver) {
|
|
2285
|
+
return new RawExpression('&' + toRawCode($this, $receiver));
|
|
2286
2286
|
}
|
|
2287
|
-
function sanitizeKeywords_0($this,
|
|
2288
|
-
return Companion_getInstance_0().
|
|
2287
|
+
function sanitizeKeywords_0($this, $receiver) {
|
|
2288
|
+
return Companion_getInstance_0().y1y().v1($receiver) ? 'r#' + $receiver : $receiver;
|
|
2289
2289
|
}
|
|
2290
|
-
function toRawCode($this,
|
|
2290
|
+
function toRawCode($this, $receiver) {
|
|
2291
2291
|
var tmp;
|
|
2292
|
-
if (
|
|
2293
|
-
tmp = sanitizeKeywords_0($this,
|
|
2292
|
+
if ($receiver instanceof VariableReference) {
|
|
2293
|
+
tmp = sanitizeKeywords_0($this, $receiver.wu_1.qt());
|
|
2294
2294
|
} else {
|
|
2295
|
-
if (
|
|
2296
|
-
var tmp1_safe_receiver =
|
|
2295
|
+
if ($receiver instanceof FieldCall) {
|
|
2296
|
+
var tmp1_safe_receiver = $receiver.vy_1;
|
|
2297
2297
|
var tmp_0;
|
|
2298
2298
|
if (tmp1_safe_receiver == null) {
|
|
2299
2299
|
tmp_0 = null;
|
|
@@ -2303,20 +2303,20 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2303
2303
|
}
|
|
2304
2304
|
var tmp2_elvis_lhs = tmp_0;
|
|
2305
2305
|
var recv = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
2306
|
-
tmp = recv + sanitizeKeywords_0($this,
|
|
2306
|
+
tmp = recv + sanitizeKeywords_0($this, $receiver.wy_1.qt());
|
|
2307
2307
|
} else {
|
|
2308
|
-
if (
|
|
2309
|
-
var tmp_1 =
|
|
2308
|
+
if ($receiver instanceof ArrayIndexCall) {
|
|
2309
|
+
var tmp_1 = $receiver.nz_1;
|
|
2310
2310
|
var lit = tmp_1 instanceof Literal_0 ? tmp_1 : null;
|
|
2311
2311
|
var tmp_2;
|
|
2312
2312
|
var tmp_3;
|
|
2313
2313
|
if (!(lit == null)) {
|
|
2314
2314
|
var tmp_4;
|
|
2315
|
-
var tmp_5 = lit.
|
|
2315
|
+
var tmp_5 = lit.hy_1;
|
|
2316
2316
|
if (tmp_5 instanceof Integer) {
|
|
2317
2317
|
tmp_4 = true;
|
|
2318
2318
|
} else {
|
|
2319
|
-
var tmp_6 = lit.
|
|
2319
|
+
var tmp_6 = lit.hy_1;
|
|
2320
2320
|
tmp_4 = tmp_6 instanceof Number_0;
|
|
2321
2321
|
}
|
|
2322
2322
|
tmp_3 = tmp_4;
|
|
@@ -2324,31 +2324,31 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2324
2324
|
tmp_3 = false;
|
|
2325
2325
|
}
|
|
2326
2326
|
if (tmp_3) {
|
|
2327
|
-
tmp_2 = toString_0(lit.
|
|
2327
|
+
tmp_2 = toString_0(lit.gy_1);
|
|
2328
2328
|
} else {
|
|
2329
2329
|
var tmp_7;
|
|
2330
2330
|
if (!(lit == null)) {
|
|
2331
|
-
var tmp_8 = lit.
|
|
2331
|
+
var tmp_8 = lit.hy_1;
|
|
2332
2332
|
tmp_7 = tmp_8 instanceof String_1;
|
|
2333
2333
|
} else {
|
|
2334
2334
|
tmp_7 = false;
|
|
2335
2335
|
}
|
|
2336
2336
|
if (tmp_7) {
|
|
2337
|
-
tmp_2 = '"' + toString_0(lit.
|
|
2337
|
+
tmp_2 = '"' + toString_0(lit.gy_1) + '"';
|
|
2338
2338
|
} else {
|
|
2339
|
-
tmp_2 = toRawCode($this,
|
|
2339
|
+
tmp_2 = toRawCode($this, $receiver.nz_1);
|
|
2340
2340
|
}
|
|
2341
2341
|
}
|
|
2342
2342
|
var idx = tmp_2;
|
|
2343
|
-
tmp = toRawCode($this,
|
|
2343
|
+
tmp = toRawCode($this, $receiver.mz_1) + '[' + idx + ']';
|
|
2344
2344
|
} else {
|
|
2345
|
-
if (
|
|
2346
|
-
var tmp_9 =
|
|
2345
|
+
if ($receiver instanceof ConstructorStatement) {
|
|
2346
|
+
var tmp_9 = $receiver.tu_1;
|
|
2347
2347
|
var tmp3_safe_receiver = tmp_9 instanceof Custom ? tmp_9 : null;
|
|
2348
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
2349
|
-
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
2350
|
-
var typeName = tmp5_elvis_lhs == null ? toString_0(
|
|
2351
|
-
var tmp_10 =
|
|
2348
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.gu_1;
|
|
2349
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.pt();
|
|
2350
|
+
var typeName = tmp5_elvis_lhs == null ? toString_0($receiver.tu_1) : tmp5_elvis_lhs;
|
|
2351
|
+
var tmp_10 = $receiver.uu_1.k1();
|
|
2352
2352
|
var args = joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, RustTransform$toRawCode$lambda);
|
|
2353
2353
|
var tmp_11;
|
|
2354
2354
|
// Inline function 'kotlin.text.isEmpty' call
|
|
@@ -2359,35 +2359,36 @@ function toRawCode($this, _this__u8e3s4) {
|
|
|
2359
2359
|
}
|
|
2360
2360
|
tmp = tmp_11;
|
|
2361
2361
|
} else {
|
|
2362
|
-
if (
|
|
2362
|
+
if ($receiver instanceof Literal_0) {
|
|
2363
2363
|
var tmp_12;
|
|
2364
|
-
var tmp_13 =
|
|
2364
|
+
var tmp_13 = $receiver.hy_1;
|
|
2365
2365
|
if (tmp_13 instanceof String_1) {
|
|
2366
|
-
tmp_12 = 'String::from("' + toString_0(
|
|
2366
|
+
tmp_12 = 'String::from("' + toString_0($receiver.gy_1) + '")';
|
|
2367
2367
|
} else {
|
|
2368
|
-
var tmp_14 =
|
|
2368
|
+
var tmp_14 = $receiver.hy_1;
|
|
2369
2369
|
if (tmp_14 instanceof Boolean_0) {
|
|
2370
|
-
tmp_12 = toString_0(
|
|
2370
|
+
tmp_12 = toString_0($receiver.gy_1);
|
|
2371
2371
|
} else {
|
|
2372
|
-
var tmp_15 =
|
|
2372
|
+
var tmp_15 = $receiver.hy_1;
|
|
2373
2373
|
if (tmp_15 instanceof Integer) {
|
|
2374
|
-
tmp_12 = toString_0(
|
|
2374
|
+
tmp_12 = toString_0($receiver.gy_1);
|
|
2375
2375
|
} else {
|
|
2376
|
-
var tmp_16 =
|
|
2376
|
+
var tmp_16 = $receiver.hy_1;
|
|
2377
2377
|
if (tmp_16 instanceof Number_0) {
|
|
2378
|
-
tmp_12 = toString_0(
|
|
2378
|
+
tmp_12 = toString_0($receiver.gy_1);
|
|
2379
2379
|
} else {
|
|
2380
|
-
tmp_12 = toString_0(
|
|
2380
|
+
tmp_12 = toString_0($receiver.gy_1);
|
|
2381
2381
|
}
|
|
2382
2382
|
}
|
|
2383
2383
|
}
|
|
2384
2384
|
}
|
|
2385
2385
|
tmp = tmp_12;
|
|
2386
2386
|
} else {
|
|
2387
|
-
if (
|
|
2388
|
-
tmp =
|
|
2387
|
+
if ($receiver instanceof RawExpression) {
|
|
2388
|
+
tmp = $receiver.yx_1;
|
|
2389
2389
|
} else {
|
|
2390
|
-
|
|
2390
|
+
// Inline function 'kotlin.error' call
|
|
2391
|
+
var message = 'Unsupported expression type in toRawCode: ' + getKClassFromExpression($receiver).o();
|
|
2391
2392
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
2392
2393
|
}
|
|
2393
2394
|
}
|
|
@@ -2430,11 +2431,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2430
2431
|
var tmp;
|
|
2431
2432
|
if (element instanceof Interface) {
|
|
2432
2433
|
var tmp_0;
|
|
2433
|
-
if (element.
|
|
2434
|
+
if (element.jv_1.equals(Companion_getInstance().mt('Call'))) {
|
|
2434
2435
|
tmp_0 = element;
|
|
2435
2436
|
} else {
|
|
2436
2437
|
// Inline function 'kotlin.collections.map' call
|
|
2437
|
-
var this_0 = element.
|
|
2438
|
+
var this_0 = element.kv_1;
|
|
2438
2439
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2439
2440
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2440
2441
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -2446,11 +2447,11 @@ function RustTransform$borrow$lambda(element, tr) {
|
|
|
2446
2447
|
} else {
|
|
2447
2448
|
tmp_1 = item;
|
|
2448
2449
|
}
|
|
2449
|
-
var tmp$ret$
|
|
2450
|
-
destination.x(tmp$ret$
|
|
2450
|
+
var tmp$ret$2 = tmp_1;
|
|
2451
|
+
destination.x(tmp$ret$2);
|
|
2451
2452
|
}
|
|
2452
2453
|
var borrowed = destination;
|
|
2453
|
-
tmp_0 = transformChildren_0(element.
|
|
2454
|
+
tmp_0 = transformChildren_0(element.rv(VOID, borrowed), tr);
|
|
2454
2455
|
}
|
|
2455
2456
|
tmp = tmp_0;
|
|
2456
2457
|
} else {
|
|
@@ -2466,13 +2467,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2466
2467
|
var tmp;
|
|
2467
2468
|
var tmp_0;
|
|
2468
2469
|
if (s instanceof FunctionCall) {
|
|
2469
|
-
tmp_0 = RustTransform_getInstance().
|
|
2470
|
+
tmp_0 = RustTransform_getInstance().j20_1.v1(s.ut_1.qt());
|
|
2470
2471
|
} else {
|
|
2471
2472
|
tmp_0 = false;
|
|
2472
2473
|
}
|
|
2473
2474
|
if (tmp_0) {
|
|
2474
2475
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
2475
|
-
var this_0 = s.
|
|
2476
|
+
var this_0 = s.vt_1.k1();
|
|
2476
2477
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
2477
2478
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2478
2479
|
var index = 0;
|
|
@@ -2486,13 +2487,13 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2486
2487
|
var key = item.l1();
|
|
2487
2488
|
// Inline function 'kotlin.collections.component2' call
|
|
2488
2489
|
var value = item.m1();
|
|
2489
|
-
var transformed = t.
|
|
2490
|
+
var transformed = t.f17(value);
|
|
2490
2491
|
var tmp_1;
|
|
2491
2492
|
var tmp_2;
|
|
2492
2493
|
if (idx === 0) {
|
|
2493
2494
|
var tmp_3;
|
|
2494
2495
|
if (transformed instanceof VariableReference) {
|
|
2495
|
-
tmp_3 = transformed.
|
|
2496
|
+
tmp_3 = transformed.wu_1.nt() === 'it';
|
|
2496
2497
|
} else {
|
|
2497
2498
|
tmp_3 = false;
|
|
2498
2499
|
}
|
|
@@ -2509,78 +2510,78 @@ function RustTransform$serializationArgs$lambda(s, t) {
|
|
|
2509
2510
|
destination.x(tmp$ret$2);
|
|
2510
2511
|
}
|
|
2511
2512
|
var newArgs = toMap(destination);
|
|
2512
|
-
tmp = s.
|
|
2513
|
+
tmp = s.yt(VOID, VOID, VOID, newArgs);
|
|
2513
2514
|
} else {
|
|
2514
2515
|
tmp = transformChildren(s, t);
|
|
2515
2516
|
}
|
|
2516
2517
|
return tmp;
|
|
2517
2518
|
}
|
|
2518
2519
|
function RustTransform$rustName$lambda(it) {
|
|
2519
|
-
return RustTransform_getInstance().
|
|
2520
|
+
return RustTransform_getInstance().l20(it);
|
|
2520
2521
|
}
|
|
2521
2522
|
function RustTransform$rustName$lambda_0(it) {
|
|
2522
|
-
return RustTransform_getInstance().
|
|
2523
|
+
return RustTransform_getInstance().l20(it);
|
|
2523
2524
|
}
|
|
2524
2525
|
function RustTransform$toRawCode$lambda(it) {
|
|
2525
|
-
return it.l1().
|
|
2526
|
+
return it.l1().qt() + ': ' + toRawCode(RustTransform_getInstance(), it.m1());
|
|
2526
2527
|
}
|
|
2527
2528
|
function RustTransform() {
|
|
2528
2529
|
RustTransform_instance = this;
|
|
2529
2530
|
var tmp = this;
|
|
2530
|
-
// Inline function 'community.flock.wirespec.
|
|
2531
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2531
2532
|
// Inline function 'kotlin.apply' call
|
|
2532
2533
|
var this_0 = new TransformerBuilder();
|
|
2533
|
-
this_0.
|
|
2534
|
-
tmp.
|
|
2534
|
+
this_0.q17(RustTransform$primitivesToCustom$lambda);
|
|
2535
|
+
tmp.g20_1 = this_0.z17();
|
|
2535
2536
|
var tmp_0 = this;
|
|
2536
|
-
// Inline function 'community.flock.wirespec.
|
|
2537
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2537
2538
|
// Inline function 'kotlin.apply' call
|
|
2538
2539
|
var this_1 = new TransformerBuilder();
|
|
2539
|
-
this_1.
|
|
2540
|
-
tmp_0.
|
|
2540
|
+
this_1.e18(RustTransform$borrow$lambda);
|
|
2541
|
+
tmp_0.h20_1 = this_1.z17();
|
|
2541
2542
|
var tmp_1 = this;
|
|
2542
|
-
// Inline function 'community.flock.wirespec.
|
|
2543
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2543
2544
|
// Inline function 'kotlin.apply' call
|
|
2544
|
-
tmp_1.
|
|
2545
|
-
this.
|
|
2545
|
+
tmp_1.i20_1 = (new TransformerBuilder()).z17();
|
|
2546
|
+
this.j20_1 = setOf(['serialize_path', 'serialize_param', 'serialize_body', 'deserialize_path', 'deserialize_param', 'deserialize_body']);
|
|
2546
2547
|
var tmp_2 = this;
|
|
2547
|
-
// Inline function 'community.flock.wirespec.
|
|
2548
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
2548
2549
|
// Inline function 'kotlin.apply' call
|
|
2549
2550
|
var this_2 = new TransformerBuilder();
|
|
2550
|
-
this_2.
|
|
2551
|
-
tmp_2.
|
|
2551
|
+
this_2.c18(RustTransform$serializationArgs$lambda);
|
|
2552
|
+
tmp_2.k20_1 = this_2.z17();
|
|
2552
2553
|
}
|
|
2553
|
-
protoOf(RustTransform).
|
|
2554
|
-
// Inline function 'community.flock.wirespec.
|
|
2554
|
+
protoOf(RustTransform).m20 = function (element) {
|
|
2555
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2555
2556
|
var scope = new TransformScope(element);
|
|
2556
|
-
scope.
|
|
2557
|
-
var tmp = scope.
|
|
2558
|
-
// Inline function 'community.flock.wirespec.
|
|
2557
|
+
scope.p17(RustTransform_getInstance().g20_1);
|
|
2558
|
+
var tmp = scope.k17_1;
|
|
2559
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2559
2560
|
var this_0 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
2560
2561
|
var scope_0 = new TransformScope(this_0);
|
|
2561
|
-
scope_0.
|
|
2562
|
-
var tmp_0 = scope_0.
|
|
2563
|
-
// Inline function 'community.flock.wirespec.
|
|
2562
|
+
scope_0.p17(RustTransform_getInstance().h20_1);
|
|
2563
|
+
var tmp_0 = scope_0.k17_1;
|
|
2564
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2564
2565
|
var this_1 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
2565
2566
|
var scope_1 = new TransformScope(this_1);
|
|
2566
|
-
scope_1.
|
|
2567
|
-
var tmp_1 = scope_1.
|
|
2568
|
-
// Inline function 'community.flock.wirespec.
|
|
2567
|
+
scope_1.p17(RustTransform_getInstance().i20_1);
|
|
2568
|
+
var tmp_1 = scope_1.k17_1;
|
|
2569
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
2569
2570
|
var this_2 = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
2570
2571
|
var scope_2 = new TransformScope(this_2);
|
|
2571
|
-
scope_2.
|
|
2572
|
-
var tmp_2 = scope_2.
|
|
2572
|
+
scope_2.p17(RustTransform_getInstance().k20_1);
|
|
2573
|
+
var tmp_2 = scope_2.k17_1;
|
|
2573
2574
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
2574
2575
|
};
|
|
2575
|
-
protoOf(RustTransform).
|
|
2576
|
+
protoOf(RustTransform).l20 = function (_this__u8e3s4) {
|
|
2576
2577
|
var tmp;
|
|
2577
2578
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2578
|
-
var pascalName = _this__u8e3s4.
|
|
2579
|
+
var pascalName = _this__u8e3s4.gu_1.pt();
|
|
2579
2580
|
var tmp_0;
|
|
2580
|
-
if (_this__u8e3s4.
|
|
2581
|
+
if (_this__u8e3s4.hu_1.r()) {
|
|
2581
2582
|
tmp_0 = pascalName;
|
|
2582
2583
|
} else {
|
|
2583
|
-
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.
|
|
2584
|
+
tmp_0 = pascalName + '<' + joinToString(_this__u8e3s4.hu_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda) + '>';
|
|
2584
2585
|
}
|
|
2585
2586
|
tmp = tmp_0;
|
|
2586
2587
|
} else {
|
|
@@ -2588,13 +2589,13 @@ protoOf(RustTransform).h1z = function (_this__u8e3s4) {
|
|
|
2588
2589
|
tmp = 'String';
|
|
2589
2590
|
} else {
|
|
2590
2591
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
2591
|
-
tmp = 'Option<' + this.
|
|
2592
|
+
tmp = 'Option<' + this.l20(_this__u8e3s4.ku_1) + '>';
|
|
2592
2593
|
} else {
|
|
2593
2594
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
2594
|
-
tmp = 'Vec<' + this.
|
|
2595
|
+
tmp = 'Vec<' + this.l20(_this__u8e3s4.bu_1) + '>';
|
|
2595
2596
|
} else {
|
|
2596
2597
|
if (_this__u8e3s4 instanceof Dict) {
|
|
2597
|
-
tmp = 'std::collections::HashMap<' + this.
|
|
2598
|
+
tmp = 'std::collections::HashMap<' + this.l20(_this__u8e3s4.du_1) + ', ' + this.l20(_this__u8e3s4.eu_1) + '>';
|
|
2598
2599
|
} else {
|
|
2599
2600
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
2600
2601
|
tmp = 'Box<dyn std::any::Any>';
|
|
@@ -2616,7 +2617,7 @@ protoOf(RustTransform).h1z = function (_this__u8e3s4) {
|
|
|
2616
2617
|
} else {
|
|
2617
2618
|
if (_this__u8e3s4 instanceof Integer) {
|
|
2618
2619
|
var tmp_1;
|
|
2619
|
-
switch (_this__u8e3s4.
|
|
2620
|
+
switch (_this__u8e3s4.zt_1.c3_1) {
|
|
2620
2621
|
case 0:
|
|
2621
2622
|
tmp_1 = 'i32';
|
|
2622
2623
|
break;
|
|
@@ -2631,7 +2632,7 @@ protoOf(RustTransform).h1z = function (_this__u8e3s4) {
|
|
|
2631
2632
|
} else {
|
|
2632
2633
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
2633
2634
|
var tmp_2;
|
|
2634
|
-
switch (_this__u8e3s4.
|
|
2635
|
+
switch (_this__u8e3s4.au_1.c3_1) {
|
|
2635
2636
|
case 0:
|
|
2636
2637
|
tmp_2 = 'f32';
|
|
2637
2638
|
break;
|
|
@@ -2651,7 +2652,7 @@ protoOf(RustTransform).h1z = function (_this__u8e3s4) {
|
|
|
2651
2652
|
tmp = 'String';
|
|
2652
2653
|
} else {
|
|
2653
2654
|
if (_this__u8e3s4 instanceof Function) {
|
|
2654
|
-
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.
|
|
2655
|
+
tmp = 'Box<dyn Fn(' + joinToString(_this__u8e3s4.nu_1, ', ', VOID, VOID, VOID, VOID, RustTransform$rustName$lambda_0) + ') -> ' + this.l20(_this__u8e3s4.ou_1) + '>';
|
|
2655
2656
|
} else {
|
|
2656
2657
|
noWhenBranchMatchedException();
|
|
2657
2658
|
}
|
|
@@ -2672,27 +2673,27 @@ protoOf(RustTransform).h1z = function (_this__u8e3s4) {
|
|
|
2672
2673
|
}
|
|
2673
2674
|
return tmp;
|
|
2674
2675
|
};
|
|
2675
|
-
protoOf(RustTransform).
|
|
2676
|
+
protoOf(RustTransform).q20 = function (_this__u8e3s4) {
|
|
2676
2677
|
var tmp;
|
|
2677
2678
|
if (_this__u8e3s4 instanceof Custom) {
|
|
2678
2679
|
// Inline function 'kotlin.let' call
|
|
2679
|
-
var it = _this__u8e3s4.
|
|
2680
|
+
var it = _this__u8e3s4.gu_1.pt();
|
|
2680
2681
|
tmp = startsWith(it, '&') || startsWith(it, '&dyn ') || startsWith(it, '&impl ') || startsWith(it, '&mut ');
|
|
2681
2682
|
} else {
|
|
2682
2683
|
tmp = false;
|
|
2683
2684
|
}
|
|
2684
2685
|
return tmp;
|
|
2685
2686
|
};
|
|
2686
|
-
protoOf(RustTransform).
|
|
2687
|
+
protoOf(RustTransform).p20 = function (_this__u8e3s4) {
|
|
2687
2688
|
// Inline function 'kotlin.let' call
|
|
2688
|
-
var it = _this__u8e3s4.
|
|
2689
|
+
var it = _this__u8e3s4.gu_1.pt();
|
|
2689
2690
|
return it === 'Serializer' || it === 'Deserializer';
|
|
2690
2691
|
};
|
|
2691
|
-
protoOf(RustTransform).
|
|
2692
|
-
return _this__u8e3s4.
|
|
2692
|
+
protoOf(RustTransform).o20 = function (_this__u8e3s4) {
|
|
2693
|
+
return _this__u8e3s4.gu_1.pt() === 'GeneratorField';
|
|
2693
2694
|
};
|
|
2694
|
-
protoOf(RustTransform).
|
|
2695
|
-
var v = _this__u8e3s4.
|
|
2695
|
+
protoOf(RustTransform).n20 = function (_this__u8e3s4) {
|
|
2696
|
+
var v = _this__u8e3s4.nt();
|
|
2696
2697
|
switch (v) {
|
|
2697
2698
|
case 'self':
|
|
2698
2699
|
case '&self':
|
|
@@ -2708,25 +2709,26 @@ function RustTransform_getInstance() {
|
|
|
2708
2709
|
return RustTransform_instance;
|
|
2709
2710
|
}
|
|
2710
2711
|
function borrow(_this__u8e3s4) {
|
|
2711
|
-
return _this__u8e3s4.
|
|
2712
|
+
return _this__u8e3s4.ju(new Name(listOf('&' + _this__u8e3s4.gu_1.pt())));
|
|
2712
2713
|
}
|
|
2713
2714
|
function borrowDyn(_this__u8e3s4) {
|
|
2714
|
-
return _this__u8e3s4.
|
|
2715
|
+
return _this__u8e3s4.ju(new Name(listOf('&dyn ' + _this__u8e3s4.gu_1.pt())));
|
|
2715
2716
|
}
|
|
2716
2717
|
function borrowImpl(_this__u8e3s4) {
|
|
2717
|
-
return _this__u8e3s4.
|
|
2718
|
+
return _this__u8e3s4.ju(new Name(listOf('&impl ' + _this__u8e3s4.gu_1.pt())));
|
|
2718
2719
|
}
|
|
2719
2720
|
function ownedImpl(_this__u8e3s4) {
|
|
2720
|
-
return _this__u8e3s4.
|
|
2721
|
+
return _this__u8e3s4.ju(new Name(listOf('impl ' + _this__u8e3s4.gu_1.pt())));
|
|
2721
2722
|
}
|
|
2722
2723
|
//region block: post-declaration
|
|
2723
|
-
protoOf(
|
|
2724
|
-
protoOf(
|
|
2725
|
-
protoOf(
|
|
2724
|
+
protoOf(RustEmitter).u19 = get_extensions;
|
|
2725
|
+
protoOf(RustEmitter).mo = emit_1;
|
|
2726
|
+
protoOf(RustEmitter).w19 = beforeGenerate;
|
|
2727
|
+
protoOf(RustEmitter).np = get_supportsDefaults;
|
|
2726
2728
|
//endregion
|
|
2727
2729
|
//region block: exports
|
|
2728
2730
|
export {
|
|
2729
|
-
|
|
2731
|
+
RustEmitter as RustEmitter1jgbjguzalmhv,
|
|
2730
2732
|
};
|
|
2731
2733
|
//endregion
|
|
2732
2734
|
|