@flock/wirespec 0.18.1-RC.3 → 0.18.4
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/clikt-clikt-mordant.mjs +79 -79
- package/clikt-clikt.mjs +1265 -1265
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +433 -433
- package/kotlin-kotlin-stdlib.mjs +34 -28
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +5407 -5405
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1760 -1760
- package/kotlinx-io-kotlinx-io-core.mjs +404 -404
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1701 -1701
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1320 -1319
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1198 -1198
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +192 -205
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +711 -777
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +311 -418
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +640 -769
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +1582 -1708
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +680 -635
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +579 -562
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +20 -20
- package/wirespec-src-compiler-ir.mjs +5428 -6057
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +279 -279
- package/wirespec-src-converter-avro.mjs +559 -559
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +802 -404
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +144 -144
- package/wirespec-src-plugin-cli.mjs +87 -87
- package/wirespec-src-plugin-npm.mjs +44 -25
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +13 -13
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
spacer28p2fwyb64afn as spacer,
|
|
22
22
|
FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
|
|
23
23
|
DefinitionIdentifiervfasqdb33qef as DefinitionIdentifier,
|
|
24
|
-
Shared1uygqfbd22ukz as Shared,
|
|
25
24
|
plus14o24vdaiongg as plus_0,
|
|
26
25
|
Bytes_instance1o9u095wd3kx6 as Bytes_instance,
|
|
27
26
|
Boolean_instance237vwt01w3hs8 as Boolean_instance,
|
|
@@ -77,24 +76,24 @@ import {
|
|
|
77
76
|
joinToStringooja5rkatz3u as joinToString_0,
|
|
78
77
|
firstOrNulltrxqttxfxqju as firstOrNull,
|
|
79
78
|
isDigit3mimrri4wkzop as isDigit,
|
|
80
|
-
Paire9pteg33gng7 as Pair,
|
|
81
|
-
plus310ted5e4i90h as plus_1,
|
|
82
|
-
emptyList1g2z5xcrvp2zy as emptyList,
|
|
83
79
|
StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
|
|
84
80
|
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
85
81
|
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
82
|
+
emptyList1g2z5xcrvp2zy as emptyList,
|
|
83
|
+
Paire9pteg33gng7 as Pair,
|
|
84
|
+
plus310ted5e4i90h as plus_1,
|
|
85
|
+
listOf1jh22dvmctj1r as listOf_0,
|
|
86
|
+
plus20p0vtfmu0596 as plus_2,
|
|
86
87
|
isInterface3d6p8outrmvmk as isInterface,
|
|
88
|
+
addAll1k27qatfgp3k5 as addAll,
|
|
89
|
+
HashSet_init_$Create$33p49hmosnvr4 as HashSet_init_$Create$,
|
|
90
|
+
Collection1k04j3hzsbod0 as Collection,
|
|
87
91
|
equals2au1ep9vhcato as equals,
|
|
88
|
-
listOf1jh22dvmctj1r as listOf_0,
|
|
89
92
|
firstOrNull1982767dljvdy as firstOrNull_0,
|
|
90
93
|
last1vo29oleiqj36 as last,
|
|
91
94
|
dropLast1vpiyky649o34 as dropLast,
|
|
92
95
|
to2cs3ny02qtbcb as to,
|
|
93
96
|
mapOf2zpbbmyqk8xpf as mapOf,
|
|
94
|
-
plus20p0vtfmu0596 as plus_2,
|
|
95
|
-
addAll1k27qatfgp3k5 as addAll,
|
|
96
|
-
HashSet_init_$Create$33p49hmosnvr4 as HashSet_init_$Create$,
|
|
97
|
-
Collection1k04j3hzsbod0 as Collection,
|
|
98
97
|
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
99
98
|
dropLastlqc2oyv04br0 as dropLast_0,
|
|
100
99
|
replace3le3ie7l9k8aq as replace,
|
|
@@ -104,18 +103,45 @@ import {
|
|
|
104
103
|
NonEmptyList__plus_impl_xqmb92tle8a7jcf2wm as NonEmptyList__plus_impl_xqmb9,
|
|
105
104
|
} from './arrow-arrow-core.mjs';
|
|
106
105
|
import {
|
|
106
|
+
Nameoqr8dt2fim9d as Name,
|
|
107
|
+
FunctionCall30872kpnbr7op as FunctionCall,
|
|
108
|
+
transformChildren2mszeagj5nq4c as transformChildren,
|
|
107
109
|
Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
|
|
108
110
|
Package2tniq694j1763 as Package,
|
|
109
111
|
File3dimy4iqmuock as File,
|
|
110
|
-
transformChildrend9p91tpcqdkx as
|
|
112
|
+
transformChildrend9p91tpcqdkx as transformChildren_0,
|
|
111
113
|
withElements2toq84v08e72 as withElements,
|
|
112
114
|
Namespace345pal554qu3j as Namespace,
|
|
115
|
+
function12vu2kapzno4w as function_0,
|
|
116
|
+
String_instance3uxvo48ki208u as String_instance,
|
|
117
|
+
VariableReference2vlynnhaw1i64 as VariableReference,
|
|
118
|
+
JavaGenerator_instance753fwcs3a4n9 as JavaGenerator_instance,
|
|
113
119
|
import5uhkz67bd8tt as import_0,
|
|
120
|
+
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
121
|
+
convertClientServer1w4pgeabrnbb9 as convertClientServer,
|
|
122
|
+
toGetterAccessors2z6mndbqwlczg as toGetterAccessors,
|
|
123
|
+
rawttvqxl50flj9 as raw,
|
|
124
|
+
convertnty9x0e63d0u as convert,
|
|
114
125
|
TransformScopeyrd3lf4zrk76 as TransformScope,
|
|
115
126
|
TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
|
|
116
127
|
transform3eti8i2bqvifx as transform,
|
|
117
128
|
Elementitq62jg6fid3 as Element,
|
|
118
|
-
|
|
129
|
+
emitn3eihixilqyh as emit_0,
|
|
130
|
+
prependImports32gcj3yb8voha as prependImports,
|
|
131
|
+
placeInPackage1ffljbk9me4ug as placeInPackage,
|
|
132
|
+
convertWithValidation3ar3nbcqsbkpn as convertWithValidation,
|
|
133
|
+
sanitizeNames2wqmyf8vafp9x as sanitizeNames,
|
|
134
|
+
convert11ert2po54h1y as convert_0,
|
|
135
|
+
injectEnumLabelFieldyfohidz6c88i as injectEnumLabelField,
|
|
136
|
+
convert37aabdzvtv9vg as convert_1,
|
|
137
|
+
convert17zcptkz4mhr4 as convert_2,
|
|
138
|
+
convert32tuiui3czihh as convert_3,
|
|
139
|
+
convert1cn4bolzoed8c as convert_4,
|
|
140
|
+
emitEndpointClient1meajc90wf3el as emitEndpointClient,
|
|
141
|
+
emitClient32kfwzg2hm5vj as emitClient,
|
|
142
|
+
emit1oxjujel6f3jb as emit_1,
|
|
143
|
+
emit3bzdcd0f6nwtj as emit_2,
|
|
144
|
+
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
119
145
|
Dict22iqrhoo0g8et as Dict_0,
|
|
120
146
|
Array2goj74t0aak7b as Array_0,
|
|
121
147
|
Nullable3wjn6l6q3h6o as Nullable,
|
|
@@ -124,50 +150,20 @@ import {
|
|
|
124
150
|
Any_instance2998xag3cdzh3 as Any_instance,
|
|
125
151
|
Bytes_instance3edm2lhbrwd51 as Bytes_instance_0,
|
|
126
152
|
Boolean_instance27opaqtiiiysz as Boolean_instance_0,
|
|
127
|
-
String_instance3uxvo48ki208u as String_instance,
|
|
128
153
|
Number3azxs9q1cyulb as Number_1,
|
|
129
154
|
Integer1uwg1wvo5lp6z as Integer_0,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
convertClientServer3s89ijty7q130 as convertClientServer,
|
|
135
|
-
toGetterAccessors2z6mndbqwlczg as toGetterAccessors,
|
|
136
|
-
rawttvqxl50flj9 as raw,
|
|
137
|
-
generateJavaxqkwhkjcf0ke as generateJava,
|
|
138
|
-
RawElement2yts1x2rbem1g as RawElement,
|
|
139
|
-
VariableReference2vlynnhaw1i64 as VariableReference,
|
|
140
|
-
withLabelField33ehya4zusm70 as withLabelField,
|
|
141
|
-
function12vu2kapzno4w as function_0,
|
|
142
|
-
plusd54zq6f7l8fy as plus_3,
|
|
143
|
-
Enumlszg09mwd24f as Enum,
|
|
144
|
-
convert2loxpwk8n2r8c as convert_0,
|
|
155
|
+
structo1silz79n3nu as struct,
|
|
156
|
+
RawExpression2bo7ldfrptjia as RawExpression,
|
|
157
|
+
TypeDescriptor1hvcpxrtxcqsx as TypeDescriptor,
|
|
158
|
+
convert2loxpwk8n2r8c as convert_5,
|
|
145
159
|
Function21cuq8qizkin7 as Function,
|
|
160
|
+
plusd54zq6f7l8fy as plus_3,
|
|
146
161
|
Struct39wf79cwtn4ty as Struct,
|
|
147
162
|
Interface3pn84xq686t2r as Interface,
|
|
148
|
-
|
|
163
|
+
RawElement2yts1x2rbem1g as RawElement,
|
|
149
164
|
Assignment3kcxc8wlcbmkn as Assignment,
|
|
150
|
-
|
|
165
|
+
ReturnStatement29qlfkn9kpy10 as ReturnStatement,
|
|
151
166
|
Wildcard_instance2ga1ytfwj78ra as Wildcard_instance,
|
|
152
|
-
TypeDescriptor1hvcpxrtxcqsx as TypeDescriptor,
|
|
153
|
-
JavaGenerator_instance753fwcs3a4n9 as JavaGenerator_instance,
|
|
154
|
-
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
155
|
-
emit3bzdcd0f6nwtj as emit_0,
|
|
156
|
-
withSharedSource1qgrajaccojj3 as withSharedSource,
|
|
157
|
-
emitn3eihixilqyh as emit_1,
|
|
158
|
-
prependImports32gcj3yb8voha as prependImports,
|
|
159
|
-
placeInPackage1ffljbk9me4ug as placeInPackage,
|
|
160
|
-
convertWithValidation3ar3nbcqsbkpn as convertWithValidation,
|
|
161
|
-
sanitizeNames2wqmyf8vafp9x as sanitizeNames,
|
|
162
|
-
convert11ert2po54h1y as convert_1,
|
|
163
|
-
convert37aabdzvtv9vg as convert_2,
|
|
164
|
-
convert17zcptkz4mhr4 as convert_3,
|
|
165
|
-
convert32tuiui3czihh as convert_4,
|
|
166
|
-
convert1cn4bolzoed8c as convert_5,
|
|
167
|
-
emitEndpointClient1meajc90wf3el as emitEndpointClient,
|
|
168
|
-
emitClient32kfwzg2hm5vj as emitClient,
|
|
169
|
-
emit1oxjujel6f3jb as emit_2,
|
|
170
|
-
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
171
167
|
} from './wirespec-src-compiler-ir.mjs';
|
|
172
168
|
//region block: imports
|
|
173
169
|
//endregion
|
|
@@ -195,15 +191,15 @@ function emit_5(_this__u8e3s4) {
|
|
|
195
191
|
function emit_6(_this__u8e3s4) {
|
|
196
192
|
// Inline function 'kotlin.let' call
|
|
197
193
|
var it = emitType(this, _this__u8e3s4);
|
|
198
|
-
return _this__u8e3s4.
|
|
194
|
+
return _this__u8e3s4.cu() ? 'java.util.Optional<' + it + '>' : it;
|
|
199
195
|
}
|
|
200
196
|
function emitRoot(_this__u8e3s4, void_0) {
|
|
201
197
|
var tmp;
|
|
202
198
|
if (_this__u8e3s4 instanceof Dict) {
|
|
203
|
-
tmp = this.
|
|
199
|
+
tmp = this.d1v(_this__u8e3s4.co_1);
|
|
204
200
|
} else {
|
|
205
201
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
206
|
-
tmp = this.
|
|
202
|
+
tmp = this.d1v(_this__u8e3s4.zn_1);
|
|
207
203
|
} else {
|
|
208
204
|
if (_this__u8e3s4 instanceof Unit) {
|
|
209
205
|
tmp = void_0;
|
|
@@ -232,7 +228,7 @@ function emitRoot(_this__u8e3s4, void_0) {
|
|
|
232
228
|
}
|
|
233
229
|
function emitRoot$default(_this__u8e3s4, void_0, $super) {
|
|
234
230
|
void_0 = void_0 === VOID ? 'void' : void_0;
|
|
235
|
-
return $super === VOID ? this.
|
|
231
|
+
return $super === VOID ? this.e1v(_this__u8e3s4, void_0) : emitRoot(_this__u8e3s4, void_0);
|
|
236
232
|
}
|
|
237
233
|
function emit_7(_this__u8e3s4) {
|
|
238
234
|
var tmp;
|
|
@@ -240,7 +236,7 @@ function emit_7(_this__u8e3s4) {
|
|
|
240
236
|
tmp = 'return java.util.regex.Pattern.compile("' + replace(this.zp(_this__u8e3s4.ys_1), '\\', '\\\\') + '").matcher(value).find();';
|
|
241
237
|
} else {
|
|
242
238
|
if (_this__u8e3s4 instanceof Bound) {
|
|
243
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
239
|
+
var tmp1_safe_receiver = _this__u8e3s4.ot_1;
|
|
244
240
|
var tmp_0;
|
|
245
241
|
if (tmp1_safe_receiver == null) {
|
|
246
242
|
tmp_0 = null;
|
|
@@ -249,7 +245,7 @@ function emit_7(_this__u8e3s4) {
|
|
|
249
245
|
tmp_0 = tmp1_safe_receiver + ' < value';
|
|
250
246
|
}
|
|
251
247
|
var minCheck = tmp_0;
|
|
252
|
-
var tmp2_safe_receiver = _this__u8e3s4.
|
|
248
|
+
var tmp2_safe_receiver = _this__u8e3s4.pt_1;
|
|
253
249
|
var tmp_1;
|
|
254
250
|
if (tmp2_safe_receiver == null) {
|
|
255
251
|
tmp_1 = null;
|
|
@@ -275,16 +271,16 @@ function emit_7(_this__u8e3s4) {
|
|
|
275
271
|
}
|
|
276
272
|
initMetadataForInterface(JavaTypeDefinitionEmitter, 'JavaTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter]);
|
|
277
273
|
function emit_8(channel) {
|
|
278
|
-
return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |@FunctionalInterface\n |public interface ' + this.wq(channel.mo_1) + ' {\n | void invoke(' + emitFullyQualified(this, channel, channel.no_1) + this.
|
|
274
|
+
return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |@FunctionalInterface\n |public interface ' + this.wq(channel.mo_1) + ' {\n | void invoke(' + emitFullyQualified(this, channel, channel.no_1) + this.d1v(channel.no_1) + ' message);\n |}\n |\n ');
|
|
279
275
|
}
|
|
280
276
|
initMetadataForInterface(JavaChannelDefinitionEmitter, 'JavaChannelDefinitionEmitter', VOID, VOID, [JavaTypeDefinitionEmitter]);
|
|
281
277
|
function emit_9(identifier) {
|
|
282
278
|
var tmp;
|
|
283
279
|
if (identifier instanceof DefinitionIdentifier) {
|
|
284
|
-
tmp = this.
|
|
280
|
+
tmp = this.o1v(identifier.l1());
|
|
285
281
|
} else {
|
|
286
282
|
if (identifier instanceof FieldIdentifier) {
|
|
287
|
-
tmp = this.
|
|
283
|
+
tmp = this.s1v(this.o1v(identifier.l1()));
|
|
288
284
|
} else {
|
|
289
285
|
noWhenBranchMatchedException();
|
|
290
286
|
}
|
|
@@ -306,7 +302,7 @@ function sanitizeSymbol(_this__u8e3s4) {
|
|
|
306
302
|
destination.x(tmp$ret$0);
|
|
307
303
|
}
|
|
308
304
|
var tmp = asSequence(joinToString(destination, ''));
|
|
309
|
-
return this.
|
|
305
|
+
return this.r1v(joinToString_0(filter(tmp, JavaIdentifierEmitter$sanitizeSymbol$lambda), ''));
|
|
310
306
|
}
|
|
311
307
|
function sanitizeFirstIsDigit(_this__u8e3s4) {
|
|
312
308
|
var tmp;
|
|
@@ -326,7 +322,7 @@ function sanitizeFirstIsDigit(_this__u8e3s4) {
|
|
|
326
322
|
return tmp;
|
|
327
323
|
}
|
|
328
324
|
function sanitizeKeywords(_this__u8e3s4) {
|
|
329
|
-
return Companion_getInstance_0().
|
|
325
|
+
return Companion_getInstance_0().u1v_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
|
|
330
326
|
}
|
|
331
327
|
initMetadataForInterface(JavaIdentifierEmitter, 'JavaIdentifierEmitter');
|
|
332
328
|
function emit_10(enum_0, module_0) {
|
|
@@ -339,20 +335,20 @@ function emit_11(refined) {
|
|
|
339
335
|
}
|
|
340
336
|
function emitValidator(_this__u8e3s4) {
|
|
341
337
|
var defaultReturn = 'return true;';
|
|
342
|
-
var type = _this__u8e3s4.cr_1.
|
|
338
|
+
var type = _this__u8e3s4.cr_1.ou_1;
|
|
343
339
|
var tmp;
|
|
344
340
|
if (type instanceof Integer) {
|
|
345
|
-
var tmp0_safe_receiver = type.
|
|
341
|
+
var tmp0_safe_receiver = type.tt_1;
|
|
346
342
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.yp(tmp0_safe_receiver);
|
|
347
343
|
tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
|
|
348
344
|
} else {
|
|
349
345
|
if (type instanceof Number_0) {
|
|
350
|
-
var tmp2_safe_receiver = type.
|
|
346
|
+
var tmp2_safe_receiver = type.wt_1;
|
|
351
347
|
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.yp(tmp2_safe_receiver);
|
|
352
348
|
tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
|
|
353
349
|
} else {
|
|
354
350
|
if (type instanceof String_0) {
|
|
355
|
-
var tmp4_safe_receiver = type.
|
|
351
|
+
var tmp4_safe_receiver = type.qt_1;
|
|
356
352
|
var tmp_0;
|
|
357
353
|
var tmp_1 = tmp4_safe_receiver;
|
|
358
354
|
if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
|
|
@@ -390,7 +386,7 @@ function emit_13(endpoint) {
|
|
|
390
386
|
var tmp_2 = emitObject(this, tmp_1, 'Path', 'Wirespec.Path', JavaEndpointDefinitionEmitter$emit$lambda(this));
|
|
391
387
|
var tmp_3 = emitObject(this, endpoint.hp_1, 'Queries', 'Wirespec.Queries', JavaEndpointDefinitionEmitter$emit$lambda_0(this));
|
|
392
388
|
var tmp_4 = emitObject(this, endpoint.ip_1, 'RequestHeaders', 'Wirespec.Request.Headers', JavaEndpointDefinitionEmitter$emit$lambda_1(this));
|
|
393
|
-
var tmp_5 = this.
|
|
389
|
+
var tmp_5 = this.p1v(first_0(endpoint.jp_1), endpoint);
|
|
394
390
|
var tmp_6 = Spacer_instance.toString();
|
|
395
391
|
var tmp_7 = emitStatusInterfaces(this, endpoint);
|
|
396
392
|
var tmp_8 = emitResponseInterfaces(this, endpoint);
|
|
@@ -407,7 +403,7 @@ function emit_13(endpoint) {
|
|
|
407
403
|
var tmp_19 = emitFromResponse(this, endpoint);
|
|
408
404
|
var tmp_20 = Spacer_instance.qr(2);
|
|
409
405
|
var tmp_21 = Spacer_instance.qr(2);
|
|
410
|
-
var tmp_22 = this.
|
|
406
|
+
var tmp_22 = this.t1v(endpoint);
|
|
411
407
|
var tmp_23 = Spacer_instance.qr(2);
|
|
412
408
|
var tmp_24 = Spacer_instance.qr(3);
|
|
413
409
|
return trimMargin('\n |' + tmp + '\n |\n |public interface ' + tmp_0 + ' extends Wirespec.Endpoint {\n |' + tmp_2 + '\n |\n |' + tmp_3 + '\n |\n |' + tmp_4 + '\n |\n |' + tmp_5 + '\n |\n |' + tmp_6 + 'sealed interface Response<T> extends Wirespec.Response<T> {}\n |' + tmp_7 + '\n |' + tmp_8 + '\n |\n |' + tmp_10 + '\n |\n |' + tmp_11 + 'interface Handler extends Wirespec.Handler {\n |\n |' + tmp_12 + '\n |\n |' + tmp_13 + 'static Wirespec.RawResponse toResponse(Wirespec.Serializer serialization, Response<?> response) {\n |' + tmp_15 + '\n |' + tmp_16 + 'else { throw new IllegalStateException("Cannot match response with status: " + response.status());}\n |' + tmp_17 + '}\n |\n |' + tmp_18 + 'static Response<?> fromResponse(Wirespec.Deserializer serialization, Wirespec.RawResponse response) {\n |' + tmp_19 + '\n |' + tmp_20 + '}\n |\n |' + tmp_21 + tmp_22 + '\n |' + tmp_23 + 'class Handlers implements Wirespec.Server<Request, Response<?>>, Wirespec.Client<Request, Response<?>> {\n |' + tmp_24 + '@Override public String getPathTemplate() { return "/' + joinToString(endpoint.gp_1, '/', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_4) + '"; }\n |' + Spacer_instance.qr(3) + '@Override public String getMethod() { return "' + endpoint.fp_1.toString() + '"; }\n |' + Spacer_instance.qr(3) + '@Override public Wirespec.ServerEdge<Request, Response<?>> getServer(Wirespec.Serialization serialization) {\n |' + Spacer_instance.qr(4) + 'return new Wirespec.ServerEdge<>() {\n |' + Spacer_instance.qr(5) + '@Override public Request from(Wirespec.RawRequest request) { return fromRequest(serialization, request); }\n |' + Spacer_instance.qr(5) + '@Override public Wirespec.RawResponse to(Response<?> response) { return toResponse(serialization, response); }\n |' + Spacer_instance.qr(4) + '};\n |' + Spacer_instance.qr(3) + '}\n |' + Spacer_instance.qr(3) + '@Override public Wirespec.ClientEdge<Request, Response<?>> getClient(Wirespec.Serialization serialization) {\n |' + Spacer_instance.qr(4) + 'return new Wirespec.ClientEdge<>() {\n |' + Spacer_instance.qr(5) + '@Override public Wirespec.RawRequest to(Request request) { return toRequest(serialization, request); }\n |' + Spacer_instance.qr(5) + '@Override public Response<?> from(Wirespec.RawResponse response) { return fromResponse(serialization, response); }\n |' + Spacer_instance.qr(4) + '};\n |' + Spacer_instance.qr(3) + '}\n |' + Spacer_instance.qr(2) + '}\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
@@ -451,10 +447,9 @@ function emit_15(_this__u8e3s4) {
|
|
|
451
447
|
return trimMargin('\n |' + tmp + 'record Response' + tmp_0 + '(\n |' + tmp_1 + 'Integer status,\n |' + tmp_2 + 'Headers headers,\n |' + tmp_3 + tmp_4 + ' body\n |' + tmp_5 + ') implements Response' + tmp_6 + 'XX<' + tmp_7 + '>, Response' + tmp_8 + ' {\n |' + tmp_9 + 'public Response' + tmp_10 + '(' + tmp_13 + ') {\n |' + tmp_14 + 'this(' + tmp_15 + ', ' + tmp_16 + ', ' + tmp_17 + ');\n |' + tmp_18 + '}\n |' + tmp_19 + emitObject(this, _this__u8e3s4.rp_1, 'Headers', 'Wirespec.Response.Headers', JavaEndpointDefinitionEmitter$emit$lambda_7(this)) + '\n |' + Spacer_instance.toString() + '}\n ');
|
|
452
448
|
}
|
|
453
449
|
initMetadataForInterface(JavaEndpointDefinitionEmitter, 'JavaEndpointDefinitionEmitter', VOID, VOID, [JavaTypeDefinitionEmitter]);
|
|
454
|
-
initMetadataForClass(JavaEmitter, 'JavaEmitter', JavaEmitter, LanguageEmitter, [JavaEnumDefinitionEmitter, JavaRefinedTypeDefinitionEmitter, JavaIdentifierEmitter,
|
|
450
|
+
initMetadataForClass(JavaEmitter, 'JavaEmitter', JavaEmitter, LanguageEmitter, [JavaEnumDefinitionEmitter, JavaRefinedTypeDefinitionEmitter, JavaIdentifierEmitter, JavaChannelDefinitionEmitter, JavaUnionDefinitionEmitter, JavaEndpointDefinitionEmitter, JavaTypeDefinitionEmitter, LanguageEmitter]);
|
|
455
451
|
initMetadataForCompanion(Companion);
|
|
456
452
|
initMetadataForCompanion(Companion_0);
|
|
457
|
-
initMetadataForClass(JavaIrEmitter$shared$1);
|
|
458
453
|
initMetadataForClass(JavaIrEmitter, 'JavaIrEmitter', JavaIrEmitter, VOID, [IrEmitter]);
|
|
459
454
|
initMetadataForObject(JavaShared, 'JavaShared');
|
|
460
455
|
//endregion
|
|
@@ -466,7 +461,7 @@ function emitImports($this, _this__u8e3s4) {
|
|
|
466
461
|
var _iterator__ex2g4s = tmp0.t();
|
|
467
462
|
while (_iterator__ex2g4s.u()) {
|
|
468
463
|
var element = _iterator__ex2g4s.v();
|
|
469
|
-
if (!(_this__u8e3s4.vq().l1() === element.
|
|
464
|
+
if (!(_this__u8e3s4.vq().l1() === element.ku_1)) {
|
|
470
465
|
destination.x(element);
|
|
471
466
|
}
|
|
472
467
|
}
|
|
@@ -476,7 +471,7 @@ function emitImports($this, _this__u8e3s4) {
|
|
|
476
471
|
var _iterator__ex2g4s_0 = destination.t();
|
|
477
472
|
while (_iterator__ex2g4s_0.u()) {
|
|
478
473
|
var item = _iterator__ex2g4s_0.v();
|
|
479
|
-
var tmp$ret$3 = 'import ' + $this.
|
|
474
|
+
var tmp$ret$3 = 'import ' + $this.c1v().mr_1 + '.model.' + item.ku_1 + ';';
|
|
480
475
|
destination_0.x(tmp$ret$3);
|
|
481
476
|
}
|
|
482
477
|
var tmp = destination_0;
|
|
@@ -485,7 +480,7 @@ function emitImports($this, _this__u8e3s4) {
|
|
|
485
480
|
function emitFullyQualified($this, _this__u8e3s4, reference) {
|
|
486
481
|
var tmp;
|
|
487
482
|
if (_this__u8e3s4.vq().l1() === reference.l1()) {
|
|
488
|
-
tmp = $this.
|
|
483
|
+
tmp = $this.c1v().mr_1 + '.model.';
|
|
489
484
|
} else {
|
|
490
485
|
tmp = '';
|
|
491
486
|
}
|
|
@@ -501,46 +496,46 @@ function JavaEmitter(packageName, emitShared) {
|
|
|
501
496
|
packageName = packageName === VOID ? Companion_instance.lr('community.flock.wirespec.generated') : packageName;
|
|
502
497
|
emitShared = emitShared === VOID ? Companion_instance_0.go() : emitShared;
|
|
503
498
|
LanguageEmitter.call(this);
|
|
504
|
-
this.
|
|
505
|
-
this.
|
|
506
|
-
this.
|
|
507
|
-
this.
|
|
508
|
-
this.
|
|
509
|
-
this.
|
|
510
|
-
}
|
|
511
|
-
protoOf(JavaEmitter).
|
|
512
|
-
return this.
|
|
499
|
+
this.f1v_1 = packageName;
|
|
500
|
+
this.g1v_1 = emitShared;
|
|
501
|
+
this.h1v_1 = '\nimport community.flock.wirespec.java.Wirespec;\n';
|
|
502
|
+
this.i1v_1 = FileExtension_Java_getInstance();
|
|
503
|
+
this.j1v_1 = JavaShared_getInstance();
|
|
504
|
+
this.k1v_1 = '//';
|
|
505
|
+
}
|
|
506
|
+
protoOf(JavaEmitter).c1v = function () {
|
|
507
|
+
return this.f1v_1;
|
|
513
508
|
};
|
|
514
509
|
protoOf(JavaEmitter).eq = function () {
|
|
515
|
-
return this.
|
|
510
|
+
return this.i1v_1;
|
|
516
511
|
};
|
|
517
|
-
protoOf(JavaEmitter).
|
|
518
|
-
return this.
|
|
512
|
+
protoOf(JavaEmitter).l1v = function () {
|
|
513
|
+
return this.j1v_1;
|
|
519
514
|
};
|
|
520
515
|
protoOf(JavaEmitter).fq = function () {
|
|
521
|
-
return this.
|
|
516
|
+
return this.k1v_1;
|
|
522
517
|
};
|
|
523
518
|
protoOf(JavaEmitter).tq = function (module_0, logger) {
|
|
524
519
|
// Inline function 'kotlin.let' call
|
|
525
520
|
var it = protoOf(LanguageEmitter).tq.call(this, module_0, logger);
|
|
526
|
-
return this.
|
|
521
|
+
return this.g1v_1.ho_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.lr('community.flock.wirespec.java').or() + 'Wirespec', this.l1v().n1v_1)) : it;
|
|
527
522
|
};
|
|
528
523
|
protoOf(JavaEmitter).uq = function (definition, module_0, logger) {
|
|
529
524
|
// Inline function 'kotlin.let' call
|
|
530
525
|
var it = protoOf(LanguageEmitter).uq.call(this, definition, module_0, logger);
|
|
531
|
-
var subPackageName = plus(this.
|
|
532
|
-
var tmp = subPackageName.or() + this.
|
|
526
|
+
var subPackageName = plus(this.c1v(), definition);
|
|
527
|
+
var tmp = subPackageName.or() + this.o1v(it.io_1);
|
|
533
528
|
// Inline function 'kotlin.text.trimStart' call
|
|
534
|
-
var this_0 = trimMargin('\n |package ' + subPackageName.toString() + ';\n |' + (Companion_instance_1.qq(module_0) ? this.
|
|
529
|
+
var this_0 = trimMargin('\n |package ' + subPackageName.toString() + ';\n |' + (Companion_instance_1.qq(module_0) ? this.h1v_1 : '') + '\n |' + it.jo_1 + '\n ');
|
|
535
530
|
var tmp$ret$0 = toString(trimStart(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
536
531
|
return new Emitted(tmp, tmp$ret$0);
|
|
537
532
|
};
|
|
538
533
|
function emitGetType($this, _this__u8e3s4) {
|
|
539
|
-
return 'Wirespec.getType(' + $this.
|
|
534
|
+
return 'Wirespec.getType(' + $this.e1v(_this__u8e3s4, 'Void') + '.class, ' + emitGetTypeRaw($this, _this__u8e3s4) + ')';
|
|
540
535
|
}
|
|
541
536
|
function emitGetTypeRaw($this, _this__u8e3s4) {
|
|
542
537
|
var tmp;
|
|
543
|
-
var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : _this__u8e3s4.
|
|
538
|
+
var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : _this__u8e3s4.cu();
|
|
544
539
|
if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {
|
|
545
540
|
tmp = 'java.util.Optional.class';
|
|
546
541
|
} else {
|
|
@@ -681,7 +676,7 @@ function emitImports_0($this, _this__u8e3s4) {
|
|
|
681
676
|
var _iterator__ex2g4s = tmp0.t();
|
|
682
677
|
while (_iterator__ex2g4s.u()) {
|
|
683
678
|
var element = _iterator__ex2g4s.v();
|
|
684
|
-
if (!(_this__u8e3s4.vq().l1() === element.
|
|
679
|
+
if (!(_this__u8e3s4.vq().l1() === element.ku_1)) {
|
|
685
680
|
destination.x(element);
|
|
686
681
|
}
|
|
687
682
|
}
|
|
@@ -691,7 +686,7 @@ function emitImports_0($this, _this__u8e3s4) {
|
|
|
691
686
|
var _iterator__ex2g4s_0 = destination.t();
|
|
692
687
|
while (_iterator__ex2g4s_0.u()) {
|
|
693
688
|
var item = _iterator__ex2g4s_0.v();
|
|
694
|
-
var tmp$ret$3 = 'import ' + $this.
|
|
689
|
+
var tmp$ret$3 = 'import ' + $this.c1v().mr_1 + '.model.' + item.ku_1 + ';';
|
|
695
690
|
destination_0.x(tmp$ret$3);
|
|
696
691
|
}
|
|
697
692
|
var tmp = destination_0;
|
|
@@ -812,7 +807,7 @@ function JavaEndpointDefinitionEmitter$emit$lambda_1(this$0) {
|
|
|
812
807
|
}
|
|
813
808
|
function JavaEndpointDefinitionEmitter$emit$lambda_2(this$0) {
|
|
814
809
|
return function (it) {
|
|
815
|
-
return this$0.
|
|
810
|
+
return this$0.q1v(it);
|
|
816
811
|
};
|
|
817
812
|
}
|
|
818
813
|
function JavaEndpointDefinitionEmitter$emit$lambda_3(this$0) {
|
|
@@ -944,7 +939,7 @@ function sanitizeNegative($this, _this__u8e3s4) {
|
|
|
944
939
|
return startsWith(_this__u8e3s4, '-') ? '__' + substring(_this__u8e3s4, 1) : _this__u8e3s4;
|
|
945
940
|
}
|
|
946
941
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
947
|
-
return $this.
|
|
942
|
+
return $this.s1v($this.r1v(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_')));
|
|
948
943
|
}
|
|
949
944
|
function JavaEnumDefinitionEmitter$emit$lambda(this$0) {
|
|
950
945
|
return function (it) {
|
|
@@ -955,7 +950,7 @@ function JavaEnumDefinitionEmitter() {
|
|
|
955
950
|
}
|
|
956
951
|
function Companion() {
|
|
957
952
|
Companion_instance_2 = this;
|
|
958
|
-
this.
|
|
953
|
+
this.u1v_1 = setOf(['abstract', 'continue', 'for', 'new', 'switch', 'assert', 'default', 'goto', 'package', 'synchronized', 'boolean', 'do', 'if', 'private', 'this', 'break', 'double', 'implements', 'protected', 'throw', 'byte', 'else', 'import', 'public', 'throws', 'case', 'enum', 'instanceof', 'return', 'transient', 'catch', 'extends', 'int', 'short', 'try', 'char', 'final', 'interface', 'static', 'void', 'class', 'finally', 'long', 'strictfp', 'volatile', 'const', 'float', 'native', 'super', 'while', 'true', 'false']);
|
|
959
954
|
}
|
|
960
955
|
var Companion_instance_2;
|
|
961
956
|
function Companion_getInstance_0() {
|
|
@@ -968,64 +963,6 @@ function JavaIdentifierEmitter$sanitizeSymbol$lambda(it) {
|
|
|
968
963
|
}
|
|
969
964
|
function JavaIdentifierEmitter() {
|
|
970
965
|
}
|
|
971
|
-
function JavaIrEmitter$shared$o$clientServer$lambda(name) {
|
|
972
|
-
switch (name.s1h()) {
|
|
973
|
-
case 'client':
|
|
974
|
-
return Companion_getInstance().m1h('getClient');
|
|
975
|
-
case 'server':
|
|
976
|
-
return Companion_getInstance().m1h('getServer');
|
|
977
|
-
default:
|
|
978
|
-
return null;
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
function JavaIrEmitter$shared$o$wirespecFile$lambda(this$0) {
|
|
982
|
-
return function (element, transformer) {
|
|
983
|
-
var tmp;
|
|
984
|
-
if (element instanceof File) {
|
|
985
|
-
// Inline function 'kotlin.collections.partition' call
|
|
986
|
-
var this_0 = element.u1m_1;
|
|
987
|
-
var first = ArrayList_init_$Create$();
|
|
988
|
-
var second = ArrayList_init_$Create$();
|
|
989
|
-
var _iterator__ex2g4s = this_0.t();
|
|
990
|
-
while (_iterator__ex2g4s.u()) {
|
|
991
|
-
var element_0 = _iterator__ex2g4s.v();
|
|
992
|
-
if (element_0 instanceof Package) {
|
|
993
|
-
first.x(element_0);
|
|
994
|
-
} else {
|
|
995
|
-
second.x(element_0);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
var _destruct__k2r9zo = new Pair(first, second);
|
|
999
|
-
var packageElements = _destruct__k2r9zo.ne();
|
|
1000
|
-
var rest = _destruct__k2r9zo.oe();
|
|
1001
|
-
tmp = element.x1m(VOID, plus_1(plus_1(packageElements, this$0.f1w_1), rest));
|
|
1002
|
-
} else {
|
|
1003
|
-
tmp = element;
|
|
1004
|
-
}
|
|
1005
|
-
var transformed = tmp;
|
|
1006
|
-
return transformChildren(transformed, transformer);
|
|
1007
|
-
};
|
|
1008
|
-
}
|
|
1009
|
-
function JavaIrEmitter$shared$o$wirespecFile$lambda_0(this$0) {
|
|
1010
|
-
return function (element, transformer) {
|
|
1011
|
-
var tmp;
|
|
1012
|
-
if (element instanceof Namespace) {
|
|
1013
|
-
var injected = element.z1m_1.equals(Companion_getInstance().m1h('Wirespec')) ? this$0.g1w_1 : emptyList();
|
|
1014
|
-
var tmp_0;
|
|
1015
|
-
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1016
|
-
if (!injected.r()) {
|
|
1017
|
-
tmp_0 = withElements(element, plus_1(element.v1m(), injected));
|
|
1018
|
-
} else {
|
|
1019
|
-
tmp_0 = element;
|
|
1020
|
-
}
|
|
1021
|
-
tmp = tmp_0;
|
|
1022
|
-
} else {
|
|
1023
|
-
tmp = element;
|
|
1024
|
-
}
|
|
1025
|
-
var transformed = tmp;
|
|
1026
|
-
return transformChildren(transformed, transformer);
|
|
1027
|
-
};
|
|
1028
|
-
}
|
|
1029
966
|
function sanitizeSymbol_0($this, _this__u8e3s4) {
|
|
1030
967
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
1031
968
|
var this_0 = split(_this__u8e3s4, ['.', ' ', '-']);
|
|
@@ -1077,175 +1014,14 @@ function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
|
|
|
1077
1014
|
return tmp;
|
|
1078
1015
|
}
|
|
1079
1016
|
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
1080
|
-
return Companion_getInstance_1().
|
|
1017
|
+
return Companion_getInstance_1().v1v_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
|
|
1081
1018
|
}
|
|
1082
1019
|
function sanitizeEnum_0($this, _this__u8e3s4) {
|
|
1083
1020
|
return sanitizeKeywords_0($this, sanitizeFirstIsDigit_0($this, joinToString(split(_this__u8e3s4, ['-', ', ', '.', ' ', '//']), '_')));
|
|
1084
1021
|
}
|
|
1085
|
-
function buildImports($this, _this__u8e3s4) {
|
|
1086
|
-
// Inline function 'kotlin.collections.filter' call
|
|
1087
|
-
var tmp0 = importReferences(_this__u8e3s4);
|
|
1088
|
-
// Inline function 'kotlin.collections.filterTo' call
|
|
1089
|
-
var destination = ArrayList_init_$Create$();
|
|
1090
|
-
var _iterator__ex2g4s = tmp0.t();
|
|
1091
|
-
while (_iterator__ex2g4s.u()) {
|
|
1092
|
-
var element = _iterator__ex2g4s.v();
|
|
1093
|
-
if (!(_this__u8e3s4.vq().l1() === element.lu_1)) {
|
|
1094
|
-
destination.x(element);
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
// Inline function 'kotlin.collections.map' call
|
|
1098
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
1099
|
-
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
|
|
1100
|
-
var _iterator__ex2g4s_0 = destination.t();
|
|
1101
|
-
while (_iterator__ex2g4s_0.u()) {
|
|
1102
|
-
var item = _iterator__ex2g4s_0.v();
|
|
1103
|
-
var tmp$ret$3 = import_0($this.k1v().mr_1 + '.model', item.lu_1);
|
|
1104
|
-
destination_0.x(tmp$ret$3);
|
|
1105
|
-
}
|
|
1106
|
-
return destination_0;
|
|
1107
|
-
}
|
|
1108
|
-
function injectHandleFunction($this, _this__u8e3s4, endpoint) {
|
|
1109
|
-
var handlersStruct = buildHandlers($this, endpoint);
|
|
1110
|
-
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1111
|
-
var scope = new TransformScope(_this__u8e3s4);
|
|
1112
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1113
|
-
var tmp = scope;
|
|
1114
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1115
|
-
var this_0 = scope.z1t_1;
|
|
1116
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1117
|
-
// Inline function 'kotlin.apply' call
|
|
1118
|
-
var this_1 = new TransformerBuilder();
|
|
1119
|
-
this_1.d1h(JavaIrEmitter$injectHandleFunction$lambda(handlersStruct));
|
|
1120
|
-
var tmp$ret$2 = this_1.e1h();
|
|
1121
|
-
tmp.z1t_1 = transform(this_0, tmp$ret$2);
|
|
1122
|
-
var tmp_0 = scope.z1t_1;
|
|
1123
|
-
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1124
|
-
}
|
|
1125
|
-
function buildHandlers($this, endpoint) {
|
|
1126
|
-
var pathTemplate = '/' + joinToString(endpoint.gp_1, '/', VOID, VOID, VOID, VOID, JavaIrEmitter$buildHandlers$lambda);
|
|
1127
|
-
return struct('Handlers', JavaIrEmitter$buildHandlers$lambda_0(pathTemplate, endpoint));
|
|
1128
|
-
}
|
|
1129
|
-
function withFullyQualifiedPrefix($this, _this__u8e3s4, prefix) {
|
|
1130
|
-
var tmp;
|
|
1131
|
-
// Inline function 'kotlin.text.isNotEmpty' call
|
|
1132
|
-
if (charSequenceLength(prefix) > 0) {
|
|
1133
|
-
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1134
|
-
var scope = new TransformScope(_this__u8e3s4);
|
|
1135
|
-
var tmp_0 = JavaIrEmitter$withFullyQualifiedPrefix$lambda;
|
|
1136
|
-
scope.c1u(tmp_0, JavaIrEmitter$withFullyQualifiedPrefix$lambda_0(prefix));
|
|
1137
|
-
var tmp_1 = scope.z1t_1;
|
|
1138
|
-
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1139
|
-
} else {
|
|
1140
|
-
tmp = _this__u8e3s4;
|
|
1141
|
-
}
|
|
1142
|
-
return tmp;
|
|
1143
|
-
}
|
|
1144
|
-
function transformTypeDescriptors($this, _this__u8e3s4) {
|
|
1145
|
-
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1146
|
-
var scope = new TransformScope(_this__u8e3s4);
|
|
1147
|
-
scope.i1u(JavaIrEmitter$transformTypeDescriptors$lambda($this));
|
|
1148
|
-
var tmp = scope.z1t_1;
|
|
1149
|
-
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1150
|
-
}
|
|
1151
|
-
function findRoot($this, _this__u8e3s4) {
|
|
1152
|
-
var tmp;
|
|
1153
|
-
if (_this__u8e3s4 instanceof Nullable) {
|
|
1154
|
-
tmp = findRoot($this, _this__u8e3s4.o1h_1);
|
|
1155
|
-
} else {
|
|
1156
|
-
if (_this__u8e3s4 instanceof Array_0) {
|
|
1157
|
-
tmp = findRoot($this, _this__u8e3s4.p1h_1);
|
|
1158
|
-
} else {
|
|
1159
|
-
if (_this__u8e3s4 instanceof Dict_0) {
|
|
1160
|
-
tmp = findRoot($this, _this__u8e3s4.k1m_1);
|
|
1161
|
-
} else {
|
|
1162
|
-
tmp = _this__u8e3s4;
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
return tmp;
|
|
1167
|
-
}
|
|
1168
|
-
function rawContainerClass($this, _this__u8e3s4) {
|
|
1169
|
-
var tmp;
|
|
1170
|
-
if (_this__u8e3s4 instanceof Nullable) {
|
|
1171
|
-
tmp = 'java.util.Optional';
|
|
1172
|
-
} else {
|
|
1173
|
-
if (_this__u8e3s4 instanceof Array_0) {
|
|
1174
|
-
tmp = 'java.util.List';
|
|
1175
|
-
} else {
|
|
1176
|
-
if (_this__u8e3s4 instanceof Dict_0) {
|
|
1177
|
-
tmp = 'java.util.Map';
|
|
1178
|
-
} else {
|
|
1179
|
-
tmp = null;
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
return tmp;
|
|
1184
|
-
}
|
|
1185
|
-
function toJavaName($this, _this__u8e3s4) {
|
|
1186
|
-
var tmp;
|
|
1187
|
-
if (_this__u8e3s4 instanceof Integer_0) {
|
|
1188
|
-
var tmp_0;
|
|
1189
|
-
switch (_this__u8e3s4.g1m_1.b3_1) {
|
|
1190
|
-
case 0:
|
|
1191
|
-
tmp_0 = 'Integer';
|
|
1192
|
-
break;
|
|
1193
|
-
case 1:
|
|
1194
|
-
tmp_0 = 'Long';
|
|
1195
|
-
break;
|
|
1196
|
-
default:
|
|
1197
|
-
noWhenBranchMatchedException();
|
|
1198
|
-
break;
|
|
1199
|
-
}
|
|
1200
|
-
tmp = tmp_0;
|
|
1201
|
-
} else {
|
|
1202
|
-
if (_this__u8e3s4 instanceof Number_1) {
|
|
1203
|
-
var tmp_1;
|
|
1204
|
-
switch (_this__u8e3s4.h1m_1.b3_1) {
|
|
1205
|
-
case 0:
|
|
1206
|
-
tmp_1 = 'Float';
|
|
1207
|
-
break;
|
|
1208
|
-
case 1:
|
|
1209
|
-
tmp_1 = 'Double';
|
|
1210
|
-
break;
|
|
1211
|
-
default:
|
|
1212
|
-
noWhenBranchMatchedException();
|
|
1213
|
-
break;
|
|
1214
|
-
}
|
|
1215
|
-
tmp = tmp_1;
|
|
1216
|
-
} else {
|
|
1217
|
-
if (equals(_this__u8e3s4, String_instance)) {
|
|
1218
|
-
tmp = 'String';
|
|
1219
|
-
} else {
|
|
1220
|
-
if (equals(_this__u8e3s4, Boolean_instance_0)) {
|
|
1221
|
-
tmp = 'Boolean';
|
|
1222
|
-
} else {
|
|
1223
|
-
if (equals(_this__u8e3s4, Bytes_instance_0)) {
|
|
1224
|
-
tmp = 'byte[]';
|
|
1225
|
-
} else {
|
|
1226
|
-
if (equals(_this__u8e3s4, Any_instance)) {
|
|
1227
|
-
tmp = 'Object';
|
|
1228
|
-
} else {
|
|
1229
|
-
if (equals(_this__u8e3s4, Unit_instance_0)) {
|
|
1230
|
-
tmp = 'Void';
|
|
1231
|
-
} else {
|
|
1232
|
-
if (_this__u8e3s4 instanceof Custom_0) {
|
|
1233
|
-
tmp = _this__u8e3s4.q1h_1;
|
|
1234
|
-
} else {
|
|
1235
|
-
tmp = 'Object';
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
return tmp;
|
|
1245
|
-
}
|
|
1246
1022
|
function Companion_0() {
|
|
1247
1023
|
Companion_instance_3 = this;
|
|
1248
|
-
this.
|
|
1024
|
+
this.v1v_1 = setOf(['abstract', 'continue', 'for', 'new', 'switch', 'assert', 'default', 'goto', 'package', 'synchronized', 'boolean', 'do', 'if', 'private', 'this', 'break', 'double', 'implements', 'protected', 'throw', 'byte', 'else', 'import', 'public', 'throws', 'case', 'enum', 'instanceof', 'return', 'transient', 'catch', 'extends', 'int', 'short', 'try', 'char', 'final', 'interface', 'static', 'void', 'class', 'finally', 'long', 'strictfp', 'volatile', 'const', 'float', 'native', 'super', 'while', 'true', 'false']);
|
|
1249
1025
|
}
|
|
1250
1026
|
var Companion_instance_3;
|
|
1251
1027
|
function Companion_getInstance_1() {
|
|
@@ -1257,10 +1033,10 @@ function JavaIrEmitter$sanitizationConfig$lambda(it) {
|
|
|
1257
1033
|
return '_' + it;
|
|
1258
1034
|
}
|
|
1259
1035
|
function JavaIrEmitter$sanitizationConfig$lambda_0(name) {
|
|
1260
|
-
return name.
|
|
1036
|
+
return name.m1h_1.a1() > 1 ? new Name(listOf(name.q1l())) : name;
|
|
1261
1037
|
}
|
|
1262
1038
|
function JavaIrEmitter$sanitizationConfig$lambda_1(name) {
|
|
1263
|
-
return new Name(listOf(name.
|
|
1039
|
+
return new Name(listOf(name.q1l()));
|
|
1264
1040
|
}
|
|
1265
1041
|
function JavaIrEmitter$sanitizationConfig$lambda_2(this$0) {
|
|
1266
1042
|
return function (it) {
|
|
@@ -1271,255 +1047,64 @@ function JavaIrEmitter$sanitizationConfig$lambda_3(stmt, tr) {
|
|
|
1271
1047
|
var tmp;
|
|
1272
1048
|
var tmp_0;
|
|
1273
1049
|
if (stmt instanceof FunctionCall) {
|
|
1274
|
-
tmp_0 = stmt.
|
|
1050
|
+
tmp_0 = stmt.a1m_1.r1h() === 'validate';
|
|
1275
1051
|
} else {
|
|
1276
1052
|
tmp_0 = false;
|
|
1277
1053
|
}
|
|
1278
1054
|
if (tmp_0) {
|
|
1279
|
-
tmp =
|
|
1055
|
+
tmp = transformChildren(stmt.e1m(VOID, emptyList()), tr);
|
|
1280
1056
|
} else {
|
|
1281
|
-
tmp =
|
|
1057
|
+
tmp = transformChildren(stmt, tr);
|
|
1282
1058
|
}
|
|
1283
1059
|
return tmp;
|
|
1284
1060
|
}
|
|
1285
|
-
function JavaIrEmitter$
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1294
|
-
var _iterator__ex2g4s = this_0.t();
|
|
1295
|
-
while (_iterator__ex2g4s.u()) {
|
|
1296
|
-
var item = _iterator__ex2g4s.v();
|
|
1297
|
-
var tmp$ret$0 = toGetterAccessors(item, JavaIrEmitter$shared$o$clientServer$lambda);
|
|
1298
|
-
destination.x(tmp$ret$0);
|
|
1061
|
+
function JavaIrEmitter$emitShared$lambda(name) {
|
|
1062
|
+
switch (name.r1h()) {
|
|
1063
|
+
case 'client':
|
|
1064
|
+
return Companion_getInstance().l1h('getClient');
|
|
1065
|
+
case 'server':
|
|
1066
|
+
return Companion_getInstance().l1h('getServer');
|
|
1067
|
+
default:
|
|
1068
|
+
return null;
|
|
1299
1069
|
}
|
|
1300
|
-
tmp.g1w_1 = plus_1(destination, listOf(raw('public static Type getType(final Class<?> actualTypeArguments, final Class<?> rawType) {\n if(rawType != null) {\n return new ParameterizedType() {\n public Type getRawType() { return rawType; }\n public Type[] getActualTypeArguments() { return new Class<?>[]{actualTypeArguments}; }\n public Type getOwnerType() { return null; }\n };\n }\n else { return actualTypeArguments; }\n}')));
|
|
1301
|
-
var tmp_0 = this;
|
|
1302
|
-
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1303
|
-
var this_1 = this.e1w_1;
|
|
1304
|
-
var scope = new TransformScope(this_1);
|
|
1305
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1306
|
-
var tmp_1 = scope;
|
|
1307
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1308
|
-
var this_2 = scope.z1t_1;
|
|
1309
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1310
|
-
// Inline function 'kotlin.apply' call
|
|
1311
|
-
var this_3 = new TransformerBuilder();
|
|
1312
|
-
this_3.d1h(JavaIrEmitter$shared$o$wirespecFile$lambda(this));
|
|
1313
|
-
var tmp$ret$5 = this_3.e1h();
|
|
1314
|
-
tmp_1.z1t_1 = transform(this_2, tmp$ret$5);
|
|
1315
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1316
|
-
var tmp_2 = scope;
|
|
1317
|
-
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1318
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1319
|
-
var this_4 = scope.z1t_1;
|
|
1320
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1321
|
-
// Inline function 'kotlin.apply' call
|
|
1322
|
-
var this_5 = new TransformerBuilder();
|
|
1323
|
-
this_5.d1h(JavaIrEmitter$shared$o$wirespecFile$lambda_0(this));
|
|
1324
|
-
var tmp$ret$10 = this_5.e1h();
|
|
1325
|
-
tmp_2.z1t_1 = transform(this_4, tmp$ret$10);
|
|
1326
|
-
var tmp_3 = scope.z1t_1;
|
|
1327
|
-
tmp_0.h1w_1 = isInterface(tmp_3, Element) ? tmp_3 : THROW_CCE();
|
|
1328
|
-
this.i1w_1 = generateJava(this.h1w_1);
|
|
1329
|
-
}
|
|
1330
|
-
protoOf(JavaIrEmitter$shared$1).r1w = function () {
|
|
1331
|
-
return this.i1w_1;
|
|
1332
|
-
};
|
|
1333
|
-
function JavaIrEmitter$emit$lambda(this$0) {
|
|
1334
|
-
return function () {
|
|
1335
|
-
return new File(Companion_getInstance().m1h(Companion_instance.lr('community.flock.wirespec.java').or() + 'Wirespec'), listOf(new RawElement(this$0.t1v().r1w())));
|
|
1336
|
-
};
|
|
1337
|
-
}
|
|
1338
|
-
function JavaIrEmitter$emit$lambda$lambda(this$0) {
|
|
1339
|
-
return function (it) {
|
|
1340
|
-
return sanitizeEnum_0(this$0, it);
|
|
1341
|
-
};
|
|
1342
|
-
}
|
|
1343
|
-
function JavaIrEmitter$emit$lambda$lambda_0($this$function) {
|
|
1344
|
-
$this$function.k1i(String_instance);
|
|
1345
|
-
$this$function.j1k(new VariableReference(Companion_getInstance().m1h('label')));
|
|
1346
|
-
return Unit_instance;
|
|
1347
1070
|
}
|
|
1348
|
-
function JavaIrEmitter$
|
|
1071
|
+
function JavaIrEmitter$emitShared$lambda_0($imports) {
|
|
1349
1072
|
return function (element, transformer) {
|
|
1350
1073
|
var tmp;
|
|
1351
|
-
if (element instanceof
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
}
|
|
1357
|
-
var transformed = tmp;
|
|
1358
|
-
return transformChildren(transformed, transformer);
|
|
1359
|
-
};
|
|
1360
|
-
}
|
|
1361
|
-
function JavaIrEmitter$emit$lambda$lambda_1($refined) {
|
|
1362
|
-
return function ($this$function) {
|
|
1363
|
-
$this$function.k1i(convert_0($refined.cr_1));
|
|
1364
|
-
$this$function.j1k(new VariableReference(Companion_getInstance().m1h('value')));
|
|
1365
|
-
return Unit_instance;
|
|
1366
|
-
};
|
|
1367
|
-
}
|
|
1368
|
-
function JavaIrEmitter$emit$lambda_1($refined) {
|
|
1369
|
-
return function (element, transformer) {
|
|
1370
|
-
var tmp;
|
|
1371
|
-
if (element instanceof Struct) {
|
|
1372
|
-
var tmp_0 = listOf(new Custom_0('Wirespec.Refined'));
|
|
1373
|
-
// Inline function 'kotlin.collections.map' call
|
|
1374
|
-
var this_0 = element.j1n_1;
|
|
1375
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
1376
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1074
|
+
if (element instanceof File) {
|
|
1075
|
+
// Inline function 'kotlin.collections.partition' call
|
|
1076
|
+
var this_0 = element.s1m_1;
|
|
1077
|
+
var first = ArrayList_init_$Create$();
|
|
1078
|
+
var second = ArrayList_init_$Create$();
|
|
1377
1079
|
var _iterator__ex2g4s = this_0.t();
|
|
1378
1080
|
while (_iterator__ex2g4s.u()) {
|
|
1379
|
-
var
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
tmp_1 = item.b1k(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
|
|
1383
|
-
} else {
|
|
1384
|
-
tmp_1 = item;
|
|
1385
|
-
}
|
|
1386
|
-
var tmp$ret$0 = tmp_1;
|
|
1387
|
-
destination.x(tmp$ret$0);
|
|
1388
|
-
}
|
|
1389
|
-
var tmp_2 = element.l1n(VOID, VOID, VOID, tmp_0, destination);
|
|
1390
|
-
tmp = plus_3(tmp_2, function_0('value', VOID, true, JavaIrEmitter$emit$lambda$lambda_1($refined)));
|
|
1391
|
-
} else {
|
|
1392
|
-
tmp = element;
|
|
1393
|
-
}
|
|
1394
|
-
var transformed = tmp;
|
|
1395
|
-
return transformChildren(transformed, transformer);
|
|
1396
|
-
};
|
|
1397
|
-
}
|
|
1398
|
-
function JavaIrEmitter$emit$lambda_2($imports) {
|
|
1399
|
-
return function (element, transformer) {
|
|
1400
|
-
var tmp;
|
|
1401
|
-
if (element instanceof File) {
|
|
1402
|
-
tmp = element.x1m(VOID, plus_1($imports, element.u1m_1));
|
|
1403
|
-
} else {
|
|
1404
|
-
tmp = element;
|
|
1405
|
-
}
|
|
1406
|
-
var transformed = tmp;
|
|
1407
|
-
return transformChildren(transformed, transformer);
|
|
1408
|
-
};
|
|
1409
|
-
}
|
|
1410
|
-
function JavaIrEmitter$emit$lambda_3(this$0, $fullyQualifiedPrefix) {
|
|
1411
|
-
return function (element, transformer) {
|
|
1412
|
-
var tmp;
|
|
1413
|
-
if (element instanceof Interface) {
|
|
1414
|
-
tmp = withFullyQualifiedPrefix(this$0, element, $fullyQualifiedPrefix);
|
|
1415
|
-
} else {
|
|
1416
|
-
tmp = element;
|
|
1417
|
-
}
|
|
1418
|
-
var transformed = tmp;
|
|
1419
|
-
return transformChildren(transformed, transformer);
|
|
1420
|
-
};
|
|
1421
|
-
}
|
|
1422
|
-
function JavaIrEmitter$emit$lambda_4(element, transformer) {
|
|
1423
|
-
var tmp;
|
|
1424
|
-
if (element instanceof File) {
|
|
1425
|
-
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1426
|
-
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1427
|
-
var tmp0 = element.v1m();
|
|
1428
|
-
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1429
|
-
var destination = ArrayList_init_$Create$();
|
|
1430
|
-
var _iterator__ex2g4s = tmp0.t();
|
|
1431
|
-
while (_iterator__ex2g4s.u()) {
|
|
1432
|
-
var element_0 = _iterator__ex2g4s.v();
|
|
1433
|
-
if (element_0 instanceof Interface) {
|
|
1434
|
-
destination.x(element_0);
|
|
1435
|
-
}
|
|
1436
|
-
}
|
|
1437
|
-
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1438
|
-
var interfaceElement = ensureNotNull(tmp$ret$2);
|
|
1439
|
-
tmp = element.x1m(VOID, listOf_0([new RawElement('@FunctionalInterface\n'), interfaceElement]));
|
|
1440
|
-
} else {
|
|
1441
|
-
tmp = element;
|
|
1442
|
-
}
|
|
1443
|
-
var transformed = tmp;
|
|
1444
|
-
return transformChildren(transformed, transformer);
|
|
1445
|
-
}
|
|
1446
|
-
function JavaIrEmitter$emitEndpointClient$lambda($endpointName) {
|
|
1447
|
-
return function (element, transformer) {
|
|
1448
|
-
var tmp;
|
|
1449
|
-
if (element instanceof Function) {
|
|
1450
|
-
var tmp_0;
|
|
1451
|
-
if (element.y1j_1 && element.x1j_1.a1() >= 2) {
|
|
1452
|
-
var transportAssign = element.x1j_1.f1(element.x1j_1.a1() - 2 | 0);
|
|
1453
|
-
var returnStmt = last(element.x1j_1);
|
|
1454
|
-
var tmp_1;
|
|
1455
|
-
var tmp_2;
|
|
1456
|
-
if (transportAssign instanceof Assignment) {
|
|
1457
|
-
tmp_2 = returnStmt instanceof ReturnStatement;
|
|
1458
|
-
} else {
|
|
1459
|
-
tmp_2 = false;
|
|
1460
|
-
}
|
|
1461
|
-
if (tmp_2) {
|
|
1462
|
-
var bodyPrefix = dropLast(element.x1j_1, 2);
|
|
1463
|
-
var tmp0_name = Companion_getInstance().m1h('thenApply');
|
|
1464
|
-
var tmp1_receiver = transportAssign.w1o_1;
|
|
1465
|
-
var tmp2_arguments = mapOf(to(Companion_getInstance().m1h('mapper'), new RawExpression('rawResponse -> ' + $endpointName + '.fromRawResponse(serialization(), rawResponse)')));
|
|
1466
|
-
tmp_1 = element.b1k(VOID, VOID, VOID, VOID, plus_2(bodyPrefix, new ReturnStatement(new FunctionCall(tmp1_receiver, VOID, tmp0_name, tmp2_arguments))));
|
|
1081
|
+
var element_0 = _iterator__ex2g4s.v();
|
|
1082
|
+
if (element_0 instanceof Package) {
|
|
1083
|
+
first.x(element_0);
|
|
1467
1084
|
} else {
|
|
1468
|
-
|
|
1085
|
+
second.x(element_0);
|
|
1469
1086
|
}
|
|
1470
|
-
tmp_0 = tmp_1;
|
|
1471
|
-
} else {
|
|
1472
|
-
tmp_0 = element;
|
|
1473
1087
|
}
|
|
1474
|
-
|
|
1088
|
+
var _destruct__k2r9zo = new Pair(first, second);
|
|
1089
|
+
var packageElements = _destruct__k2r9zo.ne();
|
|
1090
|
+
var rest = _destruct__k2r9zo.oe();
|
|
1091
|
+
tmp = element.v1m(VOID, plus_1(plus_1(packageElements, $imports), rest));
|
|
1475
1092
|
} else {
|
|
1476
1093
|
tmp = element;
|
|
1477
1094
|
}
|
|
1478
1095
|
var transformed = tmp;
|
|
1479
|
-
return
|
|
1096
|
+
return transformChildren_0(transformed, transformer);
|
|
1480
1097
|
};
|
|
1481
1098
|
}
|
|
1482
|
-
function JavaIrEmitter$
|
|
1099
|
+
function JavaIrEmitter$emitShared$lambda_1($clientServer) {
|
|
1483
1100
|
return function (element, transformer) {
|
|
1484
1101
|
var tmp;
|
|
1485
|
-
if (element instanceof
|
|
1486
|
-
var injected =
|
|
1102
|
+
if (element instanceof Namespace) {
|
|
1103
|
+
var injected = element.x1m_1.equals(Companion_getInstance().l1h('Wirespec')) ? $clientServer : emptyList();
|
|
1487
1104
|
var tmp_0;
|
|
1488
1105
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1489
1106
|
if (!injected.r()) {
|
|
1490
|
-
tmp_0 = withElements(element, plus_1(element.
|
|
1491
|
-
} else {
|
|
1492
|
-
tmp_0 = element;
|
|
1493
|
-
}
|
|
1494
|
-
tmp = tmp_0;
|
|
1495
|
-
} else {
|
|
1496
|
-
tmp = element;
|
|
1497
|
-
}
|
|
1498
|
-
var transformed = tmp;
|
|
1499
|
-
return transformChildren(transformed, transformer);
|
|
1500
|
-
};
|
|
1501
|
-
}
|
|
1502
|
-
function JavaIrEmitter$injectHandleFunction$lambda($handlersStruct) {
|
|
1503
|
-
return function (element, transformer) {
|
|
1504
|
-
var tmp;
|
|
1505
|
-
if (element instanceof Interface) {
|
|
1506
|
-
var tmp_0;
|
|
1507
|
-
if (element.m1o_1.equals(Companion_getInstance().m1h('Handler'))) {
|
|
1508
|
-
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1509
|
-
var scope = new TransformScope(element);
|
|
1510
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1511
|
-
var tmp_1 = scope;
|
|
1512
|
-
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1513
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1514
|
-
var this_0 = scope.z1t_1;
|
|
1515
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1516
|
-
// Inline function 'kotlin.apply' call
|
|
1517
|
-
var this_1 = new TransformerBuilder();
|
|
1518
|
-
this_1.d1h(JavaIrEmitter$injectHandleFunction$lambda$lambda($handlersStruct));
|
|
1519
|
-
var tmp$ret$2 = this_1.e1h();
|
|
1520
|
-
tmp_1.z1t_1 = transform(this_0, tmp$ret$2);
|
|
1521
|
-
var tmp_2 = scope.z1t_1;
|
|
1522
|
-
tmp_0 = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
1107
|
+
tmp_0 = withElements(element, plus_1(element.t1m(), injected));
|
|
1523
1108
|
} else {
|
|
1524
1109
|
tmp_0 = element;
|
|
1525
1110
|
}
|
|
@@ -1528,137 +1113,101 @@ function JavaIrEmitter$injectHandleFunction$lambda($handlersStruct) {
|
|
|
1528
1113
|
tmp = element;
|
|
1529
1114
|
}
|
|
1530
1115
|
var transformed = tmp;
|
|
1531
|
-
return
|
|
1532
|
-
};
|
|
1533
|
-
}
|
|
1534
|
-
function JavaIrEmitter$buildHandlers$lambda(it) {
|
|
1535
|
-
var tmp;
|
|
1536
|
-
if (it instanceof Literal) {
|
|
1537
|
-
tmp = it.hq_1;
|
|
1538
|
-
} else {
|
|
1539
|
-
if (it instanceof Param) {
|
|
1540
|
-
tmp = '{' + it.lp_1.l1() + '}';
|
|
1541
|
-
} else {
|
|
1542
|
-
noWhenBranchMatchedException();
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
return tmp;
|
|
1546
|
-
}
|
|
1547
|
-
function JavaIrEmitter$buildHandlers$lambda$lambda($pathTemplate) {
|
|
1548
|
-
return function ($this$function) {
|
|
1549
|
-
$this$function.k1i(String_instance);
|
|
1550
|
-
$this$function.j1k($this$function.c1t($pathTemplate));
|
|
1551
|
-
return Unit_instance;
|
|
1116
|
+
return transformChildren_0(transformed, transformer);
|
|
1552
1117
|
};
|
|
1553
1118
|
}
|
|
1554
|
-
function JavaIrEmitter$
|
|
1555
|
-
return function (
|
|
1556
|
-
|
|
1557
|
-
$this$function.j1k($this$function.c1t($endpoint.fp_1.a3_1));
|
|
1558
|
-
return Unit_instance;
|
|
1119
|
+
function JavaIrEmitter$emit$lambda(this$0) {
|
|
1120
|
+
return function (it) {
|
|
1121
|
+
return sanitizeEnum_0(this$0, it);
|
|
1559
1122
|
};
|
|
1560
1123
|
}
|
|
1561
|
-
function JavaIrEmitter$
|
|
1562
|
-
|
|
1563
|
-
$this$function.l1i('serialization', $this$function.t1h('Wirespec.Serialization', []));
|
|
1564
|
-
$this$function.j1k(new RawExpression('new Wirespec.ServerEdge<>() {\n@Override public Request from(Wirespec.RawRequest request) {\n return fromRawRequest(serialization, request);\n}\n@Override public Wirespec.RawResponse to(Response<?> response) {\n return toRawResponse(serialization, response);\n}\n}'));
|
|
1565
|
-
return Unit_instance;
|
|
1124
|
+
function JavaIrEmitter$emit$lambda_0(it) {
|
|
1125
|
+
return listOf(function_0('label', VOID, VOID, JavaIrEmitter$emit$lambda$lambda));
|
|
1566
1126
|
}
|
|
1567
|
-
function JavaIrEmitter$
|
|
1568
|
-
$this$function.
|
|
1569
|
-
$this$function.
|
|
1570
|
-
$this$function.j1k(new RawExpression('new Wirespec.ClientEdge<>() {\n@Override public Wirespec.RawRequest to(Request request) {\n return toRawRequest(serialization, request);\n}\n@Override public Response<?> from(Wirespec.RawResponse response) {\n return fromRawResponse(serialization, response);\n}\n}'));
|
|
1127
|
+
function JavaIrEmitter$emit$lambda$lambda($this$function) {
|
|
1128
|
+
$this$function.j1i(String_instance);
|
|
1129
|
+
$this$function.i1k(new VariableReference(Companion_getInstance().l1h('label')));
|
|
1571
1130
|
return Unit_instance;
|
|
1572
1131
|
}
|
|
1573
|
-
function JavaIrEmitter$buildHandlers$lambda_0($pathTemplate, $endpoint) {
|
|
1574
|
-
return function ($this$struct) {
|
|
1575
|
-
$this$struct.k1k($this$struct.t1h('Wirespec.Server', [$this$struct.t1h('Request', []), $this$struct.t1h('Response', [Wildcard_instance])]));
|
|
1576
|
-
$this$struct.k1k($this$struct.t1h('Wirespec.Client', [$this$struct.t1h('Request', []), $this$struct.t1h('Response', [Wildcard_instance])]));
|
|
1577
|
-
$this$struct.b1i('getPathTemplate', VOID, true, JavaIrEmitter$buildHandlers$lambda$lambda($pathTemplate));
|
|
1578
|
-
$this$struct.b1i('getMethod', VOID, true, JavaIrEmitter$buildHandlers$lambda$lambda_0($endpoint));
|
|
1579
|
-
$this$struct.b1i('getServer', VOID, true, JavaIrEmitter$buildHandlers$lambda$lambda_1);
|
|
1580
|
-
$this$struct.b1i('getClient', VOID, true, JavaIrEmitter$buildHandlers$lambda$lambda_2);
|
|
1581
|
-
return Unit_instance;
|
|
1582
|
-
};
|
|
1583
|
-
}
|
|
1584
|
-
function JavaIrEmitter$withFullyQualifiedPrefix$lambda(it) {
|
|
1585
|
-
return it.v1n_1.equals(Companion_getInstance().m1h('message'));
|
|
1586
|
-
}
|
|
1587
|
-
function JavaIrEmitter$withFullyQualifiedPrefix$lambda_0($prefix) {
|
|
1588
|
-
return function (param) {
|
|
1589
|
-
var t = param.w1n_1;
|
|
1590
|
-
var tmp;
|
|
1591
|
-
if (t instanceof Custom_0) {
|
|
1592
|
-
tmp = param.y1n(VOID, t.n1m($prefix + t.q1h_1));
|
|
1593
|
-
} else {
|
|
1594
|
-
tmp = param;
|
|
1595
|
-
}
|
|
1596
|
-
return tmp;
|
|
1597
|
-
};
|
|
1598
|
-
}
|
|
1599
|
-
function JavaIrEmitter$transformTypeDescriptors$lambda(this$0) {
|
|
1600
|
-
return function (stmt, tr) {
|
|
1601
|
-
var tmp;
|
|
1602
|
-
if (stmt instanceof TypeDescriptor) {
|
|
1603
|
-
var rootType = findRoot(this$0, stmt.h1p_1);
|
|
1604
|
-
var containerStr = rawContainerClass(this$0, stmt.h1p_1);
|
|
1605
|
-
var rootStr = toJavaName(this$0, rootType) + '.class';
|
|
1606
|
-
var tmp_0;
|
|
1607
|
-
if (containerStr == null) {
|
|
1608
|
-
tmp_0 = null;
|
|
1609
|
-
} else {
|
|
1610
|
-
// Inline function 'kotlin.let' call
|
|
1611
|
-
tmp_0 = containerStr + '.class';
|
|
1612
|
-
}
|
|
1613
|
-
var tmp2_elvis_lhs = tmp_0;
|
|
1614
|
-
var containerArg = tmp2_elvis_lhs == null ? 'null' : tmp2_elvis_lhs;
|
|
1615
|
-
tmp = new RawExpression('Wirespec.getType(' + rootStr + ', ' + containerArg + ')');
|
|
1616
|
-
} else {
|
|
1617
|
-
tmp = transformChildren_0(stmt, tr);
|
|
1618
|
-
}
|
|
1619
|
-
return tmp;
|
|
1620
|
-
};
|
|
1621
|
-
}
|
|
1622
1132
|
function JavaIrEmitter(packageName, emitShared) {
|
|
1623
1133
|
Companion_getInstance_1();
|
|
1624
1134
|
packageName = packageName === VOID ? Companion_instance.lr('community.flock.wirespec.generated') : packageName;
|
|
1625
1135
|
emitShared = emitShared === VOID ? Companion_instance_0.go() : emitShared;
|
|
1626
|
-
this.
|
|
1627
|
-
this.
|
|
1628
|
-
this.
|
|
1629
|
-
this.
|
|
1630
|
-
this.
|
|
1136
|
+
this.w1v_1 = packageName;
|
|
1137
|
+
this.x1v_1 = emitShared;
|
|
1138
|
+
this.y1v_1 = JavaGenerator_instance;
|
|
1139
|
+
this.z1v_1 = FileExtension_Java_getInstance();
|
|
1140
|
+
this.a1w_1 = listOf(import_0('community.flock.wirespec.java', 'Wirespec'));
|
|
1631
1141
|
var tmp = this;
|
|
1632
|
-
var tmp_0 = Companion_getInstance_1().
|
|
1142
|
+
var tmp_0 = Companion_getInstance_1().v1v_1;
|
|
1633
1143
|
var tmp_1 = JavaIrEmitter$sanitizationConfig$lambda;
|
|
1634
1144
|
var tmp_2 = JavaIrEmitter$sanitizationConfig$lambda_0;
|
|
1635
1145
|
var tmp_3 = JavaIrEmitter$sanitizationConfig$lambda_1;
|
|
1636
1146
|
var tmp_4 = JavaIrEmitter$sanitizationConfig$lambda_2(this);
|
|
1637
|
-
tmp.
|
|
1638
|
-
var tmp_5 = this;
|
|
1639
|
-
tmp_5.q1w_1 = new JavaIrEmitter$shared$1();
|
|
1147
|
+
tmp.b1w_1 = new SanitizationConfig(tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, JavaIrEmitter$sanitizationConfig$lambda_3);
|
|
1640
1148
|
}
|
|
1641
|
-
protoOf(JavaIrEmitter).
|
|
1642
|
-
return this.
|
|
1149
|
+
protoOf(JavaIrEmitter).c1v = function () {
|
|
1150
|
+
return this.w1v_1;
|
|
1643
1151
|
};
|
|
1644
|
-
protoOf(JavaIrEmitter).
|
|
1645
|
-
return this.
|
|
1152
|
+
protoOf(JavaIrEmitter).j1u = function () {
|
|
1153
|
+
return this.y1v_1;
|
|
1646
1154
|
};
|
|
1647
1155
|
protoOf(JavaIrEmitter).eq = function () {
|
|
1648
|
-
return this.
|
|
1649
|
-
};
|
|
1650
|
-
protoOf(JavaIrEmitter).t1v = function () {
|
|
1651
|
-
return this.q1w_1;
|
|
1156
|
+
return this.z1v_1;
|
|
1652
1157
|
};
|
|
1653
|
-
protoOf(JavaIrEmitter).
|
|
1654
|
-
var
|
|
1655
|
-
|
|
1158
|
+
protoOf(JavaIrEmitter).m1u = function () {
|
|
1159
|
+
var packageName = Companion_instance.lr('community.flock.wirespec.java');
|
|
1160
|
+
var imports = listOf_0([import_0('java.lang.reflect', 'Type'), import_0('java.lang.reflect', 'ParameterizedType'), import_0('java.util', 'List'), import_0('java.util', 'Map')]);
|
|
1161
|
+
// Inline function 'kotlin.collections.map' call
|
|
1162
|
+
var this_0 = convertClientServer(packageName);
|
|
1163
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1164
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1165
|
+
var _iterator__ex2g4s = this_0.t();
|
|
1166
|
+
while (_iterator__ex2g4s.u()) {
|
|
1167
|
+
var item = _iterator__ex2g4s.v();
|
|
1168
|
+
var tmp$ret$0 = toGetterAccessors(item, JavaIrEmitter$emitShared$lambda);
|
|
1169
|
+
destination.x(tmp$ret$0);
|
|
1170
|
+
}
|
|
1171
|
+
var clientServer = plus_2(destination, raw('public static Type getType(final Class<?> actualTypeArguments, final Class<?> rawType) {\n if(rawType != null) {\n return new ParameterizedType() {\n public Type getRawType() { return rawType; }\n public Type[] getActualTypeArguments() { return new Class<?>[]{actualTypeArguments}; }\n public Type getOwnerType() { return null; }\n };\n }\n else { return actualTypeArguments; }\n}'));
|
|
1172
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1173
|
+
var this_1 = convert(packageName);
|
|
1174
|
+
var scope = new TransformScope(this_1);
|
|
1175
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1176
|
+
var tmp = scope;
|
|
1177
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1178
|
+
var this_2 = scope.w1t_1;
|
|
1179
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1180
|
+
// Inline function 'kotlin.apply' call
|
|
1181
|
+
var this_3 = new TransformerBuilder();
|
|
1182
|
+
this_3.c1h(JavaIrEmitter$emitShared$lambda_0(imports));
|
|
1183
|
+
var tmp$ret$5 = this_3.d1h();
|
|
1184
|
+
tmp.w1t_1 = transform(this_2, tmp$ret$5);
|
|
1185
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1186
|
+
var tmp_0 = scope;
|
|
1187
|
+
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1188
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1189
|
+
var this_4 = scope.w1t_1;
|
|
1190
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1191
|
+
// Inline function 'kotlin.apply' call
|
|
1192
|
+
var this_5 = new TransformerBuilder();
|
|
1193
|
+
this_5.c1h(JavaIrEmitter$emitShared$lambda_1(clientServer));
|
|
1194
|
+
var tmp$ret$10 = this_5.d1h();
|
|
1195
|
+
tmp_0.w1t_1 = transform(this_4, tmp$ret$10);
|
|
1196
|
+
var tmp_1 = scope.w1t_1;
|
|
1197
|
+
var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1198
|
+
var tmp_2;
|
|
1199
|
+
if (this.x1v_1.ho_1) {
|
|
1200
|
+
tmp_2 = wirespecShared;
|
|
1201
|
+
} else {
|
|
1202
|
+
tmp_2 = null;
|
|
1203
|
+
}
|
|
1204
|
+
return tmp_2;
|
|
1656
1205
|
};
|
|
1657
1206
|
protoOf(JavaIrEmitter).uq = function (definition, module_0, logger) {
|
|
1658
|
-
var file =
|
|
1659
|
-
var tmp = file.
|
|
1207
|
+
var file = emit_0.call(this, definition, module_0, logger);
|
|
1208
|
+
var tmp = file.v1m(Companion_getInstance().l1h(sanitizeSymbol_0(this, file.r1m_1.w1l())));
|
|
1660
1209
|
// Inline function 'kotlin.takeIf' call
|
|
1661
|
-
var this_0 = this.
|
|
1210
|
+
var this_0 = this.a1w_1;
|
|
1662
1211
|
var tmp_0;
|
|
1663
1212
|
if (Companion_instance_1.qq(module_0)) {
|
|
1664
1213
|
tmp_0 = this_0;
|
|
@@ -1666,133 +1215,55 @@ protoOf(JavaIrEmitter).uq = function (definition, module_0, logger) {
|
|
|
1666
1215
|
tmp_0 = null;
|
|
1667
1216
|
}
|
|
1668
1217
|
var tmp$ret$1 = tmp_0;
|
|
1669
|
-
return placeInPackage(prependImports(tmp, tmp$ret$1), this.
|
|
1218
|
+
return placeInPackage(prependImports(tmp, tmp$ret$1), this.c1v(), definition);
|
|
1670
1219
|
};
|
|
1671
1220
|
protoOf(JavaIrEmitter).up = function (type, module_0) {
|
|
1672
|
-
return sanitizeNames(convertWithValidation(type, module_0), this.
|
|
1221
|
+
return sanitizeNames(convertWithValidation(type, module_0), this.b1w_1);
|
|
1673
1222
|
};
|
|
1674
1223
|
protoOf(JavaIrEmitter).ir = function (enum_0, module_0) {
|
|
1675
|
-
|
|
1676
|
-
var
|
|
1677
|
-
|
|
1678
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1679
|
-
var tmp = scope;
|
|
1680
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1681
|
-
var this_1 = scope.z1t_1;
|
|
1682
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1683
|
-
// Inline function 'kotlin.apply' call
|
|
1684
|
-
var this_2 = new TransformerBuilder();
|
|
1685
|
-
this_2.d1h(JavaIrEmitter$emit$lambda_0(this));
|
|
1686
|
-
var tmp$ret$2 = this_2.e1h();
|
|
1687
|
-
tmp.z1t_1 = transform(this_1, tmp$ret$2);
|
|
1688
|
-
var tmp_0 = scope.z1t_1;
|
|
1689
|
-
var tmp$ret$6 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1690
|
-
return sanitizeNames(tmp$ret$6, this.p1w_1);
|
|
1224
|
+
var tmp = convert_0(enum_0);
|
|
1225
|
+
var tmp_0 = JavaIrEmitter$emit$lambda(this);
|
|
1226
|
+
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaIrEmitter$emit$lambda_0), this.b1w_1);
|
|
1691
1227
|
};
|
|
1692
1228
|
protoOf(JavaIrEmitter).yq = function (union) {
|
|
1693
|
-
return sanitizeNames(
|
|
1229
|
+
return sanitizeNames(convert_1(union), this.b1w_1);
|
|
1694
1230
|
};
|
|
1695
1231
|
protoOf(JavaIrEmitter).dr = function (refined) {
|
|
1696
|
-
|
|
1697
|
-
var this_0 = convert_3(refined);
|
|
1698
|
-
var scope = new TransformScope(this_0);
|
|
1699
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1700
|
-
var tmp = scope;
|
|
1701
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1702
|
-
var this_1 = scope.z1t_1;
|
|
1703
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1704
|
-
// Inline function 'kotlin.apply' call
|
|
1705
|
-
var this_2 = new TransformerBuilder();
|
|
1706
|
-
this_2.d1h(JavaIrEmitter$emit$lambda_1(refined));
|
|
1707
|
-
var tmp$ret$2 = this_2.e1h();
|
|
1708
|
-
tmp.z1t_1 = transform(this_1, tmp$ret$2);
|
|
1709
|
-
var tmp_0 = scope.z1t_1;
|
|
1710
|
-
var tmp$ret$6 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1711
|
-
return sanitizeNames(tmp$ret$6, this.p1w_1);
|
|
1232
|
+
return sanitizeNames(applyRefinedStructShape(convert_2(refined), refined), this.b1w_1);
|
|
1712
1233
|
};
|
|
1713
1234
|
protoOf(JavaIrEmitter).jr = function (endpoint) {
|
|
1714
|
-
var
|
|
1715
|
-
// Inline function 'kotlin.
|
|
1716
|
-
var
|
|
1717
|
-
var
|
|
1235
|
+
var tmp = sanitizeNames(transformTypeDescriptors(injectHandleFunction(convert_3(endpoint), endpoint)), this.b1w_1);
|
|
1236
|
+
// Inline function 'kotlin.takeIf' call
|
|
1237
|
+
var this_0 = buildModelImports(endpoint, this.c1v());
|
|
1238
|
+
var tmp_0;
|
|
1718
1239
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1719
|
-
if (!
|
|
1720
|
-
|
|
1721
|
-
var scope = new TransformScope(file);
|
|
1722
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1723
|
-
var tmp_0 = scope;
|
|
1724
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1725
|
-
var this_0 = scope.z1t_1;
|
|
1726
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1727
|
-
// Inline function 'kotlin.apply' call
|
|
1728
|
-
var this_1 = new TransformerBuilder();
|
|
1729
|
-
this_1.d1h(JavaIrEmitter$emit$lambda_2(imports));
|
|
1730
|
-
var tmp$ret$3 = this_1.e1h();
|
|
1731
|
-
tmp_0.z1t_1 = transform(this_0, tmp$ret$3);
|
|
1732
|
-
var tmp_1 = scope.z1t_1;
|
|
1733
|
-
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1240
|
+
if (!this_0.r()) {
|
|
1241
|
+
tmp_0 = this_0;
|
|
1734
1242
|
} else {
|
|
1735
|
-
|
|
1243
|
+
tmp_0 = null;
|
|
1736
1244
|
}
|
|
1737
|
-
|
|
1245
|
+
var tmp$ret$2 = tmp_0;
|
|
1246
|
+
return prependImports(tmp, tmp$ret$2);
|
|
1738
1247
|
};
|
|
1739
1248
|
protoOf(JavaIrEmitter).xq = function (channel) {
|
|
1740
1249
|
var tmp;
|
|
1741
1250
|
if (channel.mo_1.l1() === channel.no_1.l1()) {
|
|
1742
|
-
tmp = this.
|
|
1251
|
+
tmp = this.c1v().mr_1 + '.model.';
|
|
1743
1252
|
} else {
|
|
1744
1253
|
tmp = '';
|
|
1745
1254
|
}
|
|
1746
1255
|
var fullyQualifiedPrefix = tmp;
|
|
1747
|
-
|
|
1748
|
-
var this_0 = sanitizeNames(convert_5(channel), this.p1w_1);
|
|
1749
|
-
var scope = new TransformScope(this_0);
|
|
1750
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1751
|
-
var tmp_0 = scope;
|
|
1752
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1753
|
-
var this_1 = scope.z1t_1;
|
|
1754
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1755
|
-
// Inline function 'kotlin.apply' call
|
|
1756
|
-
var this_2 = new TransformerBuilder();
|
|
1757
|
-
this_2.d1h(JavaIrEmitter$emit$lambda_3(this, fullyQualifiedPrefix));
|
|
1758
|
-
var tmp$ret$2 = this_2.e1h();
|
|
1759
|
-
tmp_0.z1t_1 = transform(this_1, tmp$ret$2);
|
|
1760
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1761
|
-
var tmp_1 = scope;
|
|
1762
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1763
|
-
var this_3 = scope.z1t_1;
|
|
1764
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1765
|
-
// Inline function 'kotlin.apply' call
|
|
1766
|
-
var this_4 = new TransformerBuilder();
|
|
1767
|
-
this_4.d1h(JavaIrEmitter$emit$lambda_4);
|
|
1768
|
-
var tmp$ret$7 = this_4.e1h();
|
|
1769
|
-
tmp_1.z1t_1 = transform(this_3, tmp$ret$7);
|
|
1770
|
-
var tmp_2 = scope.z1t_1;
|
|
1771
|
-
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
1256
|
+
return applyFunctionalInterface(sanitizeNames(convert_4(channel), this.b1w_1), fullyQualifiedPrefix);
|
|
1772
1257
|
};
|
|
1773
|
-
protoOf(JavaIrEmitter).
|
|
1774
|
-
var imports =
|
|
1775
|
-
var endpointImport = import_0(this.
|
|
1776
|
-
var file = transformTypeDescriptors(this, sanitizeNames(emitEndpointClient.call(this, endpoint), this.p1w_1));
|
|
1258
|
+
protoOf(JavaIrEmitter).o1u = function (endpoint) {
|
|
1259
|
+
var imports = buildModelImports(endpoint, this.c1v());
|
|
1260
|
+
var endpointImport = import_0(this.c1v().mr_1 + '.endpoint', endpoint.ep_1.l1());
|
|
1777
1261
|
var endpointName = endpoint.ep_1.l1();
|
|
1778
|
-
|
|
1779
|
-
var
|
|
1780
|
-
|
|
1781
|
-
var tmp = scope;
|
|
1782
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1783
|
-
var this_0 = scope.z1t_1;
|
|
1784
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1785
|
-
// Inline function 'kotlin.apply' call
|
|
1786
|
-
var this_1 = new TransformerBuilder();
|
|
1787
|
-
this_1.d1h(JavaIrEmitter$emitEndpointClient$lambda(endpointName));
|
|
1788
|
-
var tmp$ret$2 = this_1.e1h();
|
|
1789
|
-
tmp.z1t_1 = transform(this_0, tmp$ret$2);
|
|
1790
|
-
var tmp_0 = scope.z1t_1;
|
|
1791
|
-
var transformedFile = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1792
|
-
var subPackageName = plus_0(this.k1v(), 'client');
|
|
1793
|
-
return new File(Companion_getInstance().m1h(subPackageName.or() + sanitizeSymbol_0(this, transformedFile.t1m_1.x1l())), plus_1(plus_1(plus_1(plus_1(listOf(new Package(subPackageName.mr_1)), this.o1w_1), imports), listOf(endpointImport)), transformedFile.u1m_1));
|
|
1262
|
+
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.b1w_1)), endpointName);
|
|
1263
|
+
var subPackageName = plus_0(this.c1v(), 'client');
|
|
1264
|
+
return new File(Companion_getInstance().l1h(subPackageName.or() + sanitizeSymbol_0(this, file.r1m_1.w1l())), plus_1(plus_1(plus_1(plus_1(listOf(new Package(subPackageName.mr_1)), this.a1w_1), imports), listOf(endpointImport)), file.s1m_1));
|
|
1794
1265
|
};
|
|
1795
|
-
protoOf(JavaIrEmitter).
|
|
1266
|
+
protoOf(JavaIrEmitter).n1u = function (endpoints, logger) {
|
|
1796
1267
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1797
1268
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1798
1269
|
var destination = ArrayList_init_$Create$();
|
|
@@ -1808,7 +1279,7 @@ protoOf(JavaIrEmitter).p1u = function (endpoints, logger) {
|
|
|
1808
1279
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1809
1280
|
while (_iterator__ex2g4s_0.u()) {
|
|
1810
1281
|
var e = _iterator__ex2g4s_0.v();
|
|
1811
|
-
var key = e.
|
|
1282
|
+
var key = e.ku_1;
|
|
1812
1283
|
if (set.x(key)) {
|
|
1813
1284
|
list_0.x(e);
|
|
1814
1285
|
}
|
|
@@ -1835,7 +1306,7 @@ protoOf(JavaIrEmitter).p1u = function (endpoints, logger) {
|
|
|
1835
1306
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1836
1307
|
while (_iterator__ex2g4s_2.u()) {
|
|
1837
1308
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1838
|
-
if (element_1.ep_1.l1() === element_0.
|
|
1309
|
+
if (element_1.ep_1.l1() === element_0.ku_1) {
|
|
1839
1310
|
tmp$ret$5 = false;
|
|
1840
1311
|
break $l$block_0;
|
|
1841
1312
|
}
|
|
@@ -1852,7 +1323,7 @@ protoOf(JavaIrEmitter).p1u = function (endpoints, logger) {
|
|
|
1852
1323
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1853
1324
|
while (_iterator__ex2g4s_3.u()) {
|
|
1854
1325
|
var item = _iterator__ex2g4s_3.v();
|
|
1855
|
-
var tmp$ret$10 = import_0(this.
|
|
1326
|
+
var tmp$ret$10 = import_0(this.c1v().mr_1 + '.model', item.ku_1);
|
|
1856
1327
|
destination_1.x(tmp$ret$10);
|
|
1857
1328
|
}
|
|
1858
1329
|
var imports = destination_1;
|
|
@@ -1862,7 +1333,7 @@ protoOf(JavaIrEmitter).p1u = function (endpoints, logger) {
|
|
|
1862
1333
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1863
1334
|
while (_iterator__ex2g4s_4.u()) {
|
|
1864
1335
|
var item_0 = _iterator__ex2g4s_4.v();
|
|
1865
|
-
var tmp$ret$13 = import_0(this.
|
|
1336
|
+
var tmp$ret$13 = import_0(this.c1v().mr_1 + '.endpoint', item_0.ep_1.l1());
|
|
1866
1337
|
destination_2.x(tmp$ret$13);
|
|
1867
1338
|
}
|
|
1868
1339
|
var endpointImports = destination_2;
|
|
@@ -1872,24 +1343,486 @@ protoOf(JavaIrEmitter).p1u = function (endpoints, logger) {
|
|
|
1872
1343
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1873
1344
|
while (_iterator__ex2g4s_5.u()) {
|
|
1874
1345
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
1875
|
-
var tmp$ret$16 = import_0(this.
|
|
1346
|
+
var tmp$ret$16 = import_0(this.c1v().mr_1 + '.client', item_1.ep_1.l1() + 'Client');
|
|
1876
1347
|
destination_3.x(tmp$ret$16);
|
|
1877
1348
|
}
|
|
1878
1349
|
var clientImports = destination_3;
|
|
1879
1350
|
var allImports = plus_1(plus_1(imports, endpointImports), clientImports);
|
|
1880
|
-
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.
|
|
1881
|
-
return new File(Companion_getInstance().
|
|
1351
|
+
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.b1w_1);
|
|
1352
|
+
return new File(Companion_getInstance().l1h(this.c1v().or() + sanitizeSymbol_0(this, file.r1m_1.w1l())), plus_1(plus_1(plus_1(listOf(new Package(this.c1v().mr_1)), this.a1w_1), allImports), file.s1m_1));
|
|
1882
1353
|
};
|
|
1883
|
-
function
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1354
|
+
function transformTypeDescriptors(_this__u8e3s4) {
|
|
1355
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1356
|
+
var scope = new TransformScope(_this__u8e3s4);
|
|
1357
|
+
scope.f1u(transformTypeDescriptors$lambda);
|
|
1358
|
+
var tmp = scope.w1t_1;
|
|
1359
|
+
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1360
|
+
}
|
|
1361
|
+
function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
1362
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1363
|
+
var scope = new TransformScope(_this__u8e3s4);
|
|
1364
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1365
|
+
var tmp = scope;
|
|
1366
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1367
|
+
var this_0 = scope.w1t_1;
|
|
1368
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1369
|
+
// Inline function 'kotlin.apply' call
|
|
1370
|
+
var this_1 = new TransformerBuilder();
|
|
1371
|
+
this_1.c1h(applyRefinedStructShape$lambda(refined));
|
|
1372
|
+
var tmp$ret$2 = this_1.d1h();
|
|
1373
|
+
tmp.w1t_1 = transform(this_0, tmp$ret$2);
|
|
1374
|
+
var tmp_0 = scope.w1t_1;
|
|
1375
|
+
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1376
|
+
}
|
|
1377
|
+
function injectHandleFunction(_this__u8e3s4, endpoint) {
|
|
1378
|
+
var handlersStruct = buildHandlersStruct(endpoint);
|
|
1379
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1380
|
+
var scope = new TransformScope(_this__u8e3s4);
|
|
1381
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1382
|
+
var tmp = scope;
|
|
1383
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1384
|
+
var this_0 = scope.w1t_1;
|
|
1385
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1386
|
+
// Inline function 'kotlin.apply' call
|
|
1387
|
+
var this_1 = new TransformerBuilder();
|
|
1388
|
+
this_1.c1h(injectHandleFunction$lambda(handlersStruct));
|
|
1389
|
+
var tmp$ret$2 = this_1.d1h();
|
|
1390
|
+
tmp.w1t_1 = transform(this_0, tmp$ret$2);
|
|
1391
|
+
var tmp_0 = scope.w1t_1;
|
|
1392
|
+
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1393
|
+
}
|
|
1394
|
+
function buildModelImports(_this__u8e3s4, packageName) {
|
|
1395
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1396
|
+
var tmp0 = importReferences(_this__u8e3s4);
|
|
1397
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
1398
|
+
var destination = ArrayList_init_$Create$();
|
|
1399
|
+
var _iterator__ex2g4s = tmp0.t();
|
|
1400
|
+
while (_iterator__ex2g4s.u()) {
|
|
1401
|
+
var element = _iterator__ex2g4s.v();
|
|
1402
|
+
if (!(_this__u8e3s4.vq().l1() === element.ku_1)) {
|
|
1403
|
+
destination.x(element);
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
// Inline function 'kotlin.collections.map' call
|
|
1407
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1408
|
+
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
|
|
1409
|
+
var _iterator__ex2g4s_0 = destination.t();
|
|
1410
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
1411
|
+
var item = _iterator__ex2g4s_0.v();
|
|
1412
|
+
var tmp$ret$3 = import_0(packageName.mr_1 + '.model', item.ku_1);
|
|
1413
|
+
destination_0.x(tmp$ret$3);
|
|
1414
|
+
}
|
|
1415
|
+
return destination_0;
|
|
1416
|
+
}
|
|
1417
|
+
function applyFunctionalInterface(_this__u8e3s4, fullyQualifiedPrefix) {
|
|
1418
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1419
|
+
var scope = new TransformScope(_this__u8e3s4);
|
|
1420
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1421
|
+
var tmp = scope;
|
|
1422
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1423
|
+
var this_0 = scope.w1t_1;
|
|
1424
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1425
|
+
// Inline function 'kotlin.apply' call
|
|
1426
|
+
var this_1 = new TransformerBuilder();
|
|
1427
|
+
this_1.c1h(applyFunctionalInterface$lambda(fullyQualifiedPrefix));
|
|
1428
|
+
var tmp$ret$2 = this_1.d1h();
|
|
1429
|
+
tmp.w1t_1 = transform(this_0, tmp$ret$2);
|
|
1430
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1431
|
+
var tmp_0 = scope;
|
|
1432
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1433
|
+
var this_2 = scope.w1t_1;
|
|
1434
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1435
|
+
// Inline function 'kotlin.apply' call
|
|
1436
|
+
var this_3 = new TransformerBuilder();
|
|
1437
|
+
this_3.c1h(applyFunctionalInterface$lambda_0);
|
|
1438
|
+
var tmp$ret$7 = this_3.d1h();
|
|
1439
|
+
tmp_0.w1t_1 = transform(this_2, tmp$ret$7);
|
|
1440
|
+
var tmp_1 = scope.w1t_1;
|
|
1441
|
+
return isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1442
|
+
}
|
|
1443
|
+
function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
1444
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1445
|
+
var scope = new TransformScope(_this__u8e3s4);
|
|
1446
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1447
|
+
var tmp = scope;
|
|
1448
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1449
|
+
var this_0 = scope.w1t_1;
|
|
1450
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1451
|
+
// Inline function 'kotlin.apply' call
|
|
1452
|
+
var this_1 = new TransformerBuilder();
|
|
1453
|
+
this_1.c1h(wrapAsyncReturnInThenApply$lambda(endpointName));
|
|
1454
|
+
var tmp$ret$2 = this_1.d1h();
|
|
1455
|
+
tmp.w1t_1 = transform(this_0, tmp$ret$2);
|
|
1456
|
+
var tmp_0 = scope.w1t_1;
|
|
1457
|
+
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1458
|
+
}
|
|
1459
|
+
function findRoot(_this__u8e3s4) {
|
|
1460
|
+
var tmp;
|
|
1461
|
+
if (_this__u8e3s4 instanceof Nullable) {
|
|
1462
|
+
tmp = findRoot(_this__u8e3s4.n1h_1);
|
|
1463
|
+
} else {
|
|
1464
|
+
if (_this__u8e3s4 instanceof Array_0) {
|
|
1465
|
+
tmp = findRoot(_this__u8e3s4.o1h_1);
|
|
1466
|
+
} else {
|
|
1467
|
+
if (_this__u8e3s4 instanceof Dict_0) {
|
|
1468
|
+
tmp = findRoot(_this__u8e3s4.j1m_1);
|
|
1469
|
+
} else {
|
|
1470
|
+
tmp = _this__u8e3s4;
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
return tmp;
|
|
1475
|
+
}
|
|
1476
|
+
function rawContainerClass(_this__u8e3s4) {
|
|
1477
|
+
var tmp;
|
|
1478
|
+
if (_this__u8e3s4 instanceof Nullable) {
|
|
1479
|
+
tmp = 'java.util.Optional';
|
|
1480
|
+
} else {
|
|
1481
|
+
if (_this__u8e3s4 instanceof Array_0) {
|
|
1482
|
+
tmp = 'java.util.List';
|
|
1483
|
+
} else {
|
|
1484
|
+
if (_this__u8e3s4 instanceof Dict_0) {
|
|
1485
|
+
tmp = 'java.util.Map';
|
|
1486
|
+
} else {
|
|
1487
|
+
tmp = null;
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
return tmp;
|
|
1492
|
+
}
|
|
1493
|
+
function toJavaName(_this__u8e3s4) {
|
|
1494
|
+
var tmp;
|
|
1495
|
+
if (_this__u8e3s4 instanceof Integer_0) {
|
|
1496
|
+
var tmp_0;
|
|
1497
|
+
switch (_this__u8e3s4.f1m_1.b3_1) {
|
|
1498
|
+
case 0:
|
|
1499
|
+
tmp_0 = 'Integer';
|
|
1500
|
+
break;
|
|
1501
|
+
case 1:
|
|
1502
|
+
tmp_0 = 'Long';
|
|
1503
|
+
break;
|
|
1504
|
+
default:
|
|
1505
|
+
noWhenBranchMatchedException();
|
|
1506
|
+
break;
|
|
1507
|
+
}
|
|
1508
|
+
tmp = tmp_0;
|
|
1509
|
+
} else {
|
|
1510
|
+
if (_this__u8e3s4 instanceof Number_1) {
|
|
1511
|
+
var tmp_1;
|
|
1512
|
+
switch (_this__u8e3s4.g1m_1.b3_1) {
|
|
1513
|
+
case 0:
|
|
1514
|
+
tmp_1 = 'Float';
|
|
1515
|
+
break;
|
|
1516
|
+
case 1:
|
|
1517
|
+
tmp_1 = 'Double';
|
|
1518
|
+
break;
|
|
1519
|
+
default:
|
|
1520
|
+
noWhenBranchMatchedException();
|
|
1521
|
+
break;
|
|
1522
|
+
}
|
|
1523
|
+
tmp = tmp_1;
|
|
1524
|
+
} else {
|
|
1525
|
+
if (equals(_this__u8e3s4, String_instance)) {
|
|
1526
|
+
tmp = 'String';
|
|
1527
|
+
} else {
|
|
1528
|
+
if (equals(_this__u8e3s4, Boolean_instance_0)) {
|
|
1529
|
+
tmp = 'Boolean';
|
|
1530
|
+
} else {
|
|
1531
|
+
if (equals(_this__u8e3s4, Bytes_instance_0)) {
|
|
1532
|
+
tmp = 'byte[]';
|
|
1533
|
+
} else {
|
|
1534
|
+
if (equals(_this__u8e3s4, Any_instance)) {
|
|
1535
|
+
tmp = 'Object';
|
|
1536
|
+
} else {
|
|
1537
|
+
if (equals(_this__u8e3s4, Unit_instance_0)) {
|
|
1538
|
+
tmp = 'Void';
|
|
1539
|
+
} else {
|
|
1540
|
+
if (_this__u8e3s4 instanceof Custom_0) {
|
|
1541
|
+
tmp = _this__u8e3s4.p1h_1;
|
|
1542
|
+
} else {
|
|
1543
|
+
tmp = 'Object';
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
return tmp;
|
|
1553
|
+
}
|
|
1554
|
+
function buildHandlersStruct(_this__u8e3s4) {
|
|
1555
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.gp_1, '/', VOID, VOID, VOID, VOID, buildHandlersStruct$lambda);
|
|
1556
|
+
return struct('Handlers', buildHandlersStruct$lambda_0(pathTemplate, _this__u8e3s4));
|
|
1557
|
+
}
|
|
1558
|
+
function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
1559
|
+
var tmp;
|
|
1560
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
1561
|
+
if (charSequenceLength(prefix) > 0) {
|
|
1562
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1563
|
+
var scope = new TransformScope(_this__u8e3s4);
|
|
1564
|
+
var tmp_0 = withFullyQualifiedPrefix$lambda;
|
|
1565
|
+
scope.z1t(tmp_0, withFullyQualifiedPrefix$lambda_0(prefix));
|
|
1566
|
+
var tmp_1 = scope.w1t_1;
|
|
1567
|
+
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1568
|
+
} else {
|
|
1569
|
+
tmp = _this__u8e3s4;
|
|
1570
|
+
}
|
|
1571
|
+
return tmp;
|
|
1572
|
+
}
|
|
1573
|
+
function transformTypeDescriptors$lambda(stmt, tr) {
|
|
1574
|
+
var tmp;
|
|
1575
|
+
if (stmt instanceof TypeDescriptor) {
|
|
1576
|
+
var rootType = findRoot(stmt.g1o_1);
|
|
1577
|
+
var containerStr = rawContainerClass(stmt.g1o_1);
|
|
1578
|
+
var rootStr = toJavaName(rootType) + '.class';
|
|
1579
|
+
var tmp_0;
|
|
1580
|
+
if (containerStr == null) {
|
|
1581
|
+
tmp_0 = null;
|
|
1582
|
+
} else {
|
|
1583
|
+
// Inline function 'kotlin.let' call
|
|
1584
|
+
tmp_0 = containerStr + '.class';
|
|
1585
|
+
}
|
|
1586
|
+
var tmp2_elvis_lhs = tmp_0;
|
|
1587
|
+
var containerArg = tmp2_elvis_lhs == null ? 'null' : tmp2_elvis_lhs;
|
|
1588
|
+
tmp = new RawExpression('Wirespec.getType(' + rootStr + ', ' + containerArg + ')');
|
|
1589
|
+
} else {
|
|
1590
|
+
tmp = transformChildren(stmt, tr);
|
|
1591
|
+
}
|
|
1592
|
+
return tmp;
|
|
1593
|
+
}
|
|
1594
|
+
function applyRefinedStructShape$lambda$lambda($refined) {
|
|
1595
|
+
return function ($this$function) {
|
|
1596
|
+
$this$function.j1i(convert_5($refined.cr_1));
|
|
1597
|
+
$this$function.i1k(new VariableReference(Companion_getInstance().l1h('value')));
|
|
1598
|
+
return Unit_instance;
|
|
1599
|
+
};
|
|
1600
|
+
}
|
|
1601
|
+
function applyRefinedStructShape$lambda($refined) {
|
|
1602
|
+
return function (element, transformer) {
|
|
1603
|
+
var tmp;
|
|
1604
|
+
if (element instanceof Struct) {
|
|
1605
|
+
var tmp_0 = listOf(new Custom_0('Wirespec.Refined'));
|
|
1606
|
+
// Inline function 'kotlin.collections.map' call
|
|
1607
|
+
var this_0 = element.g1n_1;
|
|
1608
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1609
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1610
|
+
var _iterator__ex2g4s = this_0.t();
|
|
1611
|
+
while (_iterator__ex2g4s.u()) {
|
|
1612
|
+
var item = _iterator__ex2g4s.v();
|
|
1613
|
+
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
1614
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a1k(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
|
|
1615
|
+
var tmp$ret$0 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
1616
|
+
destination.x(tmp$ret$0);
|
|
1617
|
+
}
|
|
1618
|
+
var tmp_1 = element.i1n(VOID, VOID, VOID, tmp_0, destination);
|
|
1619
|
+
tmp = plus_3(tmp_1, function_0('value', VOID, true, applyRefinedStructShape$lambda$lambda($refined)));
|
|
1620
|
+
} else {
|
|
1621
|
+
tmp = element;
|
|
1622
|
+
}
|
|
1623
|
+
var transformed = tmp;
|
|
1624
|
+
return transformChildren_0(transformed, transformer);
|
|
1625
|
+
};
|
|
1626
|
+
}
|
|
1627
|
+
function injectHandleFunction$lambda$lambda($handlersStruct) {
|
|
1628
|
+
return function (element, transformer) {
|
|
1629
|
+
var tmp;
|
|
1630
|
+
if (element instanceof Interface) {
|
|
1631
|
+
var injected = listOf($handlersStruct);
|
|
1632
|
+
var tmp_0;
|
|
1633
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1634
|
+
if (!injected.r()) {
|
|
1635
|
+
tmp_0 = withElements(element, plus_1(element.t1m(), injected));
|
|
1636
|
+
} else {
|
|
1637
|
+
tmp_0 = element;
|
|
1638
|
+
}
|
|
1639
|
+
tmp = tmp_0;
|
|
1640
|
+
} else {
|
|
1641
|
+
tmp = element;
|
|
1642
|
+
}
|
|
1643
|
+
var transformed = tmp;
|
|
1644
|
+
return transformChildren_0(transformed, transformer);
|
|
1645
|
+
};
|
|
1646
|
+
}
|
|
1647
|
+
function injectHandleFunction$lambda($handlersStruct) {
|
|
1648
|
+
return function (element, transformer) {
|
|
1649
|
+
var tmp;
|
|
1650
|
+
if (element instanceof Interface) {
|
|
1651
|
+
var tmp_0;
|
|
1652
|
+
if (element.j1n_1.equals(Companion_getInstance().l1h('Handler'))) {
|
|
1653
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1654
|
+
var scope = new TransformScope(element);
|
|
1655
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1656
|
+
var tmp_1 = scope;
|
|
1657
|
+
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1658
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1659
|
+
var this_0 = scope.w1t_1;
|
|
1660
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1661
|
+
// Inline function 'kotlin.apply' call
|
|
1662
|
+
var this_1 = new TransformerBuilder();
|
|
1663
|
+
this_1.c1h(injectHandleFunction$lambda$lambda($handlersStruct));
|
|
1664
|
+
var tmp$ret$2 = this_1.d1h();
|
|
1665
|
+
tmp_1.w1t_1 = transform(this_0, tmp$ret$2);
|
|
1666
|
+
var tmp_2 = scope.w1t_1;
|
|
1667
|
+
tmp_0 = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
1668
|
+
} else {
|
|
1669
|
+
tmp_0 = element;
|
|
1670
|
+
}
|
|
1671
|
+
tmp = tmp_0;
|
|
1672
|
+
} else {
|
|
1673
|
+
tmp = element;
|
|
1674
|
+
}
|
|
1675
|
+
var transformed = tmp;
|
|
1676
|
+
return transformChildren_0(transformed, transformer);
|
|
1677
|
+
};
|
|
1678
|
+
}
|
|
1679
|
+
function applyFunctionalInterface$lambda($fullyQualifiedPrefix) {
|
|
1680
|
+
return function (element, transformer) {
|
|
1681
|
+
var tmp;
|
|
1682
|
+
if (element instanceof Interface) {
|
|
1683
|
+
tmp = withFullyQualifiedPrefix(element, $fullyQualifiedPrefix);
|
|
1684
|
+
} else {
|
|
1685
|
+
tmp = element;
|
|
1686
|
+
}
|
|
1687
|
+
var transformed = tmp;
|
|
1688
|
+
return transformChildren_0(transformed, transformer);
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1691
|
+
function applyFunctionalInterface$lambda_0(element, transformer) {
|
|
1692
|
+
var tmp;
|
|
1693
|
+
if (element instanceof File) {
|
|
1694
|
+
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1695
|
+
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1696
|
+
var tmp0 = element.t1m();
|
|
1697
|
+
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1698
|
+
var destination = ArrayList_init_$Create$();
|
|
1699
|
+
var _iterator__ex2g4s = tmp0.t();
|
|
1700
|
+
while (_iterator__ex2g4s.u()) {
|
|
1701
|
+
var element_0 = _iterator__ex2g4s.v();
|
|
1702
|
+
if (element_0 instanceof Interface) {
|
|
1703
|
+
destination.x(element_0);
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1707
|
+
var interfaceElement = ensureNotNull(tmp$ret$2);
|
|
1708
|
+
tmp = element.v1m(VOID, listOf_0([new RawElement('@FunctionalInterface\n'), interfaceElement]));
|
|
1709
|
+
} else {
|
|
1710
|
+
tmp = element;
|
|
1711
|
+
}
|
|
1712
|
+
var transformed = tmp;
|
|
1713
|
+
return transformChildren_0(transformed, transformer);
|
|
1714
|
+
}
|
|
1715
|
+
function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
1716
|
+
return function (element, transformer) {
|
|
1717
|
+
var tmp;
|
|
1718
|
+
if (element instanceof Function) {
|
|
1719
|
+
var tmp$ret$0;
|
|
1720
|
+
$l$block_1: {
|
|
1721
|
+
if (!element.x1j_1 || element.w1j_1.a1() < 2) {
|
|
1722
|
+
tmp$ret$0 = element;
|
|
1723
|
+
break $l$block_1;
|
|
1724
|
+
}
|
|
1725
|
+
var tmp_0 = element.w1j_1.f1(element.w1j_1.a1() - 2 | 0);
|
|
1726
|
+
var tmp0_elvis_lhs = tmp_0 instanceof Assignment ? tmp_0 : null;
|
|
1727
|
+
var tmp_1;
|
|
1728
|
+
if (tmp0_elvis_lhs == null) {
|
|
1729
|
+
tmp$ret$0 = element;
|
|
1730
|
+
break $l$block_1;
|
|
1731
|
+
} else {
|
|
1732
|
+
tmp_1 = tmp0_elvis_lhs;
|
|
1733
|
+
}
|
|
1734
|
+
var transportAssign = tmp_1;
|
|
1735
|
+
var tmp_2 = last(element.w1j_1);
|
|
1736
|
+
if (!(tmp_2 instanceof ReturnStatement)) {
|
|
1737
|
+
tmp$ret$0 = element;
|
|
1738
|
+
break $l$block_1;
|
|
1739
|
+
}
|
|
1740
|
+
var tmp_3 = dropLast(element.w1j_1, 2);
|
|
1741
|
+
var tmp1_name = Companion_getInstance().l1h('thenApply');
|
|
1742
|
+
var tmp2_receiver = transportAssign.j1o_1;
|
|
1743
|
+
var tmp3_arguments = mapOf(to(Companion_getInstance().l1h('mapper'), new RawExpression('rawResponse -> ' + $endpointName + '.fromRawResponse(serialization(), rawResponse)')));
|
|
1744
|
+
tmp$ret$0 = element.a1k(VOID, VOID, VOID, VOID, plus_2(tmp_3, new ReturnStatement(new FunctionCall(tmp2_receiver, VOID, tmp1_name, tmp3_arguments))));
|
|
1745
|
+
}
|
|
1746
|
+
tmp = tmp$ret$0;
|
|
1747
|
+
} else {
|
|
1748
|
+
tmp = element;
|
|
1749
|
+
}
|
|
1750
|
+
var transformed = tmp;
|
|
1751
|
+
return transformChildren_0(transformed, transformer);
|
|
1752
|
+
};
|
|
1753
|
+
}
|
|
1754
|
+
function buildHandlersStruct$lambda(it) {
|
|
1755
|
+
var tmp;
|
|
1756
|
+
if (it instanceof Literal) {
|
|
1757
|
+
tmp = it.hq_1;
|
|
1758
|
+
} else {
|
|
1759
|
+
if (it instanceof Param) {
|
|
1760
|
+
tmp = '{' + it.lp_1.l1() + '}';
|
|
1761
|
+
} else {
|
|
1762
|
+
noWhenBranchMatchedException();
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
return tmp;
|
|
1766
|
+
}
|
|
1767
|
+
function buildHandlersStruct$lambda$lambda($pathTemplate) {
|
|
1768
|
+
return function ($this$function) {
|
|
1769
|
+
$this$function.j1i(String_instance);
|
|
1770
|
+
$this$function.i1k($this$function.z1s($pathTemplate));
|
|
1771
|
+
return Unit_instance;
|
|
1772
|
+
};
|
|
1773
|
+
}
|
|
1774
|
+
function buildHandlersStruct$lambda$lambda_0($this_buildHandlersStruct) {
|
|
1775
|
+
return function ($this$function) {
|
|
1776
|
+
$this$function.j1i(String_instance);
|
|
1777
|
+
$this$function.i1k($this$function.z1s($this_buildHandlersStruct.fp_1.a3_1));
|
|
1778
|
+
return Unit_instance;
|
|
1779
|
+
};
|
|
1780
|
+
}
|
|
1781
|
+
function buildHandlersStruct$lambda$lambda_1($this$function) {
|
|
1782
|
+
$this$function.j1i($this$function.s1h('Wirespec.ServerEdge', [$this$function.s1h('Request', []), $this$function.s1h('Response', [Wildcard_instance])]));
|
|
1783
|
+
$this$function.k1i('serialization', $this$function.s1h('Wirespec.Serialization', []));
|
|
1784
|
+
$this$function.i1k(new RawExpression('new Wirespec.ServerEdge<>() {\n@Override public Request from(Wirespec.RawRequest request) {\n return fromRawRequest(serialization, request);\n}\n@Override public Wirespec.RawResponse to(Response<?> response) {\n return toRawResponse(serialization, response);\n}\n}'));
|
|
1785
|
+
return Unit_instance;
|
|
1786
|
+
}
|
|
1787
|
+
function buildHandlersStruct$lambda$lambda_2($this$function) {
|
|
1788
|
+
$this$function.j1i($this$function.s1h('Wirespec.ClientEdge', [$this$function.s1h('Request', []), $this$function.s1h('Response', [Wildcard_instance])]));
|
|
1789
|
+
$this$function.k1i('serialization', $this$function.s1h('Wirespec.Serialization', []));
|
|
1790
|
+
$this$function.i1k(new RawExpression('new Wirespec.ClientEdge<>() {\n@Override public Wirespec.RawRequest to(Request request) {\n return toRawRequest(serialization, request);\n}\n@Override public Response<?> from(Wirespec.RawResponse response) {\n return fromRawResponse(serialization, response);\n}\n}'));
|
|
1791
|
+
return Unit_instance;
|
|
1792
|
+
}
|
|
1793
|
+
function buildHandlersStruct$lambda_0($pathTemplate, $this_buildHandlersStruct) {
|
|
1794
|
+
return function ($this$struct) {
|
|
1795
|
+
$this$struct.j1k($this$struct.s1h('Wirespec.Server', [$this$struct.s1h('Request', []), $this$struct.s1h('Response', [Wildcard_instance])]));
|
|
1796
|
+
$this$struct.j1k($this$struct.s1h('Wirespec.Client', [$this$struct.s1h('Request', []), $this$struct.s1h('Response', [Wildcard_instance])]));
|
|
1797
|
+
$this$struct.a1i('getPathTemplate', VOID, true, buildHandlersStruct$lambda$lambda($pathTemplate));
|
|
1798
|
+
$this$struct.a1i('getMethod', VOID, true, buildHandlersStruct$lambda$lambda_0($this_buildHandlersStruct));
|
|
1799
|
+
$this$struct.a1i('getServer', VOID, true, buildHandlersStruct$lambda$lambda_1);
|
|
1800
|
+
$this$struct.a1i('getClient', VOID, true, buildHandlersStruct$lambda$lambda_2);
|
|
1801
|
+
return Unit_instance;
|
|
1802
|
+
};
|
|
1803
|
+
}
|
|
1804
|
+
function withFullyQualifiedPrefix$lambda(it) {
|
|
1805
|
+
return it.t1o_1.equals(Companion_getInstance().l1h('message'));
|
|
1806
|
+
}
|
|
1807
|
+
function withFullyQualifiedPrefix$lambda_0($prefix) {
|
|
1808
|
+
return function (param) {
|
|
1809
|
+
var t = param.u1o_1;
|
|
1810
|
+
var tmp;
|
|
1811
|
+
if (t instanceof Custom_0) {
|
|
1812
|
+
tmp = param.w1o(VOID, t.m1m($prefix + t.p1h_1));
|
|
1813
|
+
} else {
|
|
1814
|
+
tmp = param;
|
|
1815
|
+
}
|
|
1816
|
+
return tmp;
|
|
1817
|
+
};
|
|
1818
|
+
}
|
|
1819
|
+
function JavaRefinedTypeDefinitionEmitter() {
|
|
1820
|
+
}
|
|
1821
|
+
function JavaShared() {
|
|
1822
|
+
JavaShared_instance = this;
|
|
1823
|
+
this.m1v_1 = 'community.flock.wirespec.java';
|
|
1824
|
+
this.n1v_1 = trimMargin('\n |package ' + this.m1v_1 + ';\n |\n |import java.lang.reflect.Type;\n |import java.lang.reflect.ParameterizedType;\n |import java.util.List;\n |import java.util.Map;\n |import java.util.Optional;\n |\n |public interface Wirespec {\n |' + Spacer_instance.toString() + 'interface Enum { String label(); }\n |' + Spacer_instance.toString() + 'interface Endpoint {}\n |' + Spacer_instance.toString() + 'interface Refined<T> { T value(); }\n |' + Spacer_instance.toString() + 'interface Path {}\n |' + Spacer_instance.toString() + 'interface Queries {}\n |' + Spacer_instance.toString() + 'interface Headers {}\n |' + Spacer_instance.toString() + 'interface Handler {}\n |' + Spacer_instance.toString() + 'interface ServerEdge<Req extends Request<?>, Res extends Response<?>> {\n |' + Spacer_instance.qr(2) + 'Req from(RawRequest request);\n |' + Spacer_instance.qr(2) + 'RawResponse to(Res response);\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface ClientEdge<Req extends Request<?>, Res extends Response<?>> {\n |' + Spacer_instance.qr(2) + 'RawRequest to(Req request);\n |' + Spacer_instance.qr(2) + 'Res from(RawResponse response);\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req extends Request<?>, Res extends Response<?>> {\n |' + Spacer_instance.qr(2) + 'String getPathTemplate();\n |' + Spacer_instance.qr(2) + 'String getMethod();\n |' + Spacer_instance.qr(2) + 'ClientEdge<Req, Res> getClient(Serialization serialization);\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Server<Req extends Request<?>, Res extends Response<?>> {\n |' + Spacer_instance.qr(2) + 'String getPathTemplate();\n |' + Spacer_instance.qr(2) + 'String getMethod();\n |' + Spacer_instance.qr(2) + 'ServerEdge<Req, Res> getServer(Serialization serialization);\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'enum Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE }\n |' + Spacer_instance.toString() + 'interface Request<T> { Path path(); Method method(); Queries queries(); Headers headers(); T body(); interface Headers extends Wirespec.Headers {} }\n |' + Spacer_instance.toString() + 'interface Response<T> { Integer status(); Headers headers(); T body(); interface Headers extends Wirespec.Headers {} }\n |' + Spacer_instance.toString() + 'interface Serialization extends Serializer, Deserializer {}\n |' + Spacer_instance.toString() + 'interface Serializer extends BodySerializer, PathSerializer, ParamSerializer {}\n |' + Spacer_instance.toString() + 'interface Deserializer extends BodyDeserializer, PathDeserializer, ParamDeserializer {}\n |' + Spacer_instance.toString() + 'interface BodySerialization extends BodySerializer, BodyDeserializer {}\n |' + Spacer_instance.toString() + 'interface BodySerializer { <T> byte[] serializeBody(T t, Type type); }\n |' + Spacer_instance.toString() + 'interface BodyDeserializer { <T> T deserializeBody(byte[] raw, Type type); }\n |' + Spacer_instance.toString() + 'interface PathSerialization extends PathSerializer, PathDeserializer {}\n |' + Spacer_instance.toString() + 'interface PathSerializer { <T> String serializePath(T t, Type type); }\n |' + Spacer_instance.toString() + 'interface PathDeserializer { <T> T deserializePath(String raw, Type type); }\n |' + Spacer_instance.toString() + 'interface ParamSerialization extends ParamSerializer, ParamDeserializer {}\n |' + Spacer_instance.toString() + 'interface ParamSerializer { <T> List<String> serializeParam(T value, Type type); }\n |' + Spacer_instance.toString() + 'interface ParamDeserializer { <T> T deserializeParam(List<String> values, Type type); }\n |' + Spacer_instance.toString() + 'record RawRequest(String method, List<String> path, Map<String, List<String>> queries, Map<String, List<String>> headers, Optional<byte[]> body) {}\n |' + Spacer_instance.toString() + 'record RawResponse(int statusCode, Map<String, List<String>> headers, Optional<byte[]> body) {}\n |' + Spacer_instance.toString() + 'static Type getType(final Class<?> actualTypeArguments, final Class<?> rawType) {\n |' + Spacer_instance.qr(2) + 'if(rawType != null) {\n |' + Spacer_instance.qr(3) + 'return new ParameterizedType() {\n |' + Spacer_instance.qr(4) + 'public Type getRawType() { return rawType; }\n |' + Spacer_instance.qr(4) + 'public Type[] getActualTypeArguments() { return new Class<?>[]{actualTypeArguments}; }\n |' + Spacer_instance.qr(4) + 'public Type getOwnerType() { return null; }\n |' + Spacer_instance.qr(3) + '};\n |' + Spacer_instance.qr(2) + '}\n |' + Spacer_instance.qr(2) + 'else { return actualTypeArguments; }\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
1889
1825
|
}
|
|
1890
|
-
protoOf(JavaShared).r1w = function () {
|
|
1891
|
-
return this.v1v_1;
|
|
1892
|
-
};
|
|
1893
1826
|
protoOf(JavaShared).toString = function () {
|
|
1894
1827
|
return 'JavaShared';
|
|
1895
1828
|
};
|
|
@@ -1924,7 +1857,7 @@ function emitType($this, _this__u8e3s4) {
|
|
|
1924
1857
|
tmp = 'Object';
|
|
1925
1858
|
} else {
|
|
1926
1859
|
if (_this__u8e3s4 instanceof Custom) {
|
|
1927
|
-
tmp = _this__u8e3s4.
|
|
1860
|
+
tmp = _this__u8e3s4.ku_1;
|
|
1928
1861
|
} else {
|
|
1929
1862
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
1930
1863
|
tmp = emit_18($this, _this__u8e3s4);
|
|
@@ -1939,14 +1872,14 @@ function emitType($this, _this__u8e3s4) {
|
|
|
1939
1872
|
return tmp;
|
|
1940
1873
|
}
|
|
1941
1874
|
function emit_18($this, _this__u8e3s4) {
|
|
1942
|
-
var t = _this__u8e3s4.
|
|
1875
|
+
var t = _this__u8e3s4.ou_1;
|
|
1943
1876
|
var tmp;
|
|
1944
1877
|
if (t instanceof String_0) {
|
|
1945
1878
|
tmp = 'String';
|
|
1946
1879
|
} else {
|
|
1947
1880
|
if (t instanceof Integer) {
|
|
1948
1881
|
var tmp_0;
|
|
1949
|
-
switch (t.
|
|
1882
|
+
switch (t.st_1.b3_1) {
|
|
1950
1883
|
case 0:
|
|
1951
1884
|
tmp_0 = 'Integer';
|
|
1952
1885
|
break;
|
|
@@ -1961,7 +1894,7 @@ function emit_18($this, _this__u8e3s4) {
|
|
|
1961
1894
|
} else {
|
|
1962
1895
|
if (t instanceof Number_0) {
|
|
1963
1896
|
var tmp_1;
|
|
1964
|
-
switch (t.
|
|
1897
|
+
switch (t.vt_1.b3_1) {
|
|
1965
1898
|
case 0:
|
|
1966
1899
|
tmp_1 = 'Float';
|
|
1967
1900
|
break;
|
|
@@ -2013,20 +1946,21 @@ protoOf(JavaEmitter).wp = emit_5;
|
|
|
2013
1946
|
protoOf(JavaEmitter).xp = emit_6;
|
|
2014
1947
|
protoOf(JavaEmitter).yp = emit_7;
|
|
2015
1948
|
protoOf(JavaEmitter).jr = emit_13;
|
|
2016
|
-
protoOf(JavaEmitter).
|
|
2017
|
-
protoOf(JavaEmitter).
|
|
1949
|
+
protoOf(JavaEmitter).p1v = emit_14;
|
|
1950
|
+
protoOf(JavaEmitter).q1v = emit_15;
|
|
2018
1951
|
protoOf(JavaEmitter).xq = emit_8;
|
|
2019
1952
|
protoOf(JavaEmitter).ir = emit_10;
|
|
2020
1953
|
protoOf(JavaEmitter).yq = emit_12;
|
|
2021
1954
|
protoOf(JavaEmitter).dr = emit_11;
|
|
2022
|
-
protoOf(JavaEmitter).
|
|
2023
|
-
protoOf(JavaEmitter).
|
|
2024
|
-
protoOf(JavaEmitter).
|
|
2025
|
-
protoOf(JavaEmitter).
|
|
2026
|
-
protoOf(JavaEmitter).
|
|
2027
|
-
protoOf(JavaEmitter).
|
|
1955
|
+
protoOf(JavaEmitter).o1v = sanitizeSymbol;
|
|
1956
|
+
protoOf(JavaEmitter).r1v = sanitizeFirstIsDigit;
|
|
1957
|
+
protoOf(JavaEmitter).s1v = sanitizeKeywords;
|
|
1958
|
+
protoOf(JavaEmitter).e1v = emitRoot;
|
|
1959
|
+
protoOf(JavaEmitter).d1v = emitRoot$default;
|
|
1960
|
+
protoOf(JavaEmitter).t1v = emitHandleFunction;
|
|
2028
1961
|
protoOf(JavaEmitter).kr = emitValidator;
|
|
2029
|
-
protoOf(JavaIrEmitter).on =
|
|
1962
|
+
protoOf(JavaIrEmitter).on = emit_1;
|
|
1963
|
+
protoOf(JavaIrEmitter).l1u = emit_2;
|
|
2030
1964
|
//endregion
|
|
2031
1965
|
//region block: exports
|
|
2032
1966
|
export {
|