@flock/wirespec 0.18.5 → 0.18.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +11 -11
- package/arrow-arrow-core.mjs +141 -141
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1395 -1395
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +442 -442
- package/kotlin-kotlin-stdlib.mjs +1055 -947
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +20835 -6841
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1797 -1797
- package/kotlinx-io-kotlinx-io-core.mjs +405 -405
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1967 -1770
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1881 -1406
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1269 -1269
- package/package.json +3 -2
- package/wirespec-lsp.mjs +7 -0
- package/wirespec-src-compiler-core.mjs +1709 -1645
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +378 -377
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +289 -289
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +333 -332
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +388 -377
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +158 -157
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +415 -412
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +83 -83
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3239 -3199
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +399 -399
- package/wirespec-src-converter-avro.mjs +507 -507
- package/wirespec-src-converter-openapi.mjs +1487 -1413
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +4928 -0
- package/wirespec-src-ide-lsp.mjs.map +1 -0
- package/wirespec-src-plugin-arguments.mjs +175 -175
- package/wirespec-src-plugin-cli.mjs +102 -102
- package/wirespec-src-plugin-npm.d.mts +2 -0
- package/wirespec-src-plugin-npm.mjs +42 -37
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +32 -32
|
@@ -156,6 +156,7 @@ import {
|
|
|
156
156
|
RawExpression2bo7ldfrptjia as RawExpression,
|
|
157
157
|
TypeDescriptor1hvcpxrtxcqsx as TypeDescriptor,
|
|
158
158
|
convert2loxpwk8n2r8c as convert_5,
|
|
159
|
+
Custom_init_$Create$2enn7oyj71j1t as Custom_init_$Create$,
|
|
159
160
|
Function21cuq8qizkin7 as Function,
|
|
160
161
|
plusd54zq6f7l8fy as plus_3,
|
|
161
162
|
Struct39wf79cwtn4ty as Struct,
|
|
@@ -169,10 +170,10 @@ import {
|
|
|
169
170
|
//endregion
|
|
170
171
|
//region block: pre-declaration
|
|
171
172
|
function emit_3(type, module_0) {
|
|
172
|
-
var tmp = this.
|
|
173
|
-
var tmp_0 = this.
|
|
173
|
+
var tmp = this.br(type.zo_1);
|
|
174
|
+
var tmp_0 = this.zp(type.ap_1);
|
|
174
175
|
// Inline function 'kotlin.run' call
|
|
175
|
-
var $this$run = type.
|
|
176
|
+
var $this$run = type.bp_1;
|
|
176
177
|
var tmp_1;
|
|
177
178
|
if ($this$run.r()) {
|
|
178
179
|
tmp_1 = '';
|
|
@@ -183,23 +184,23 @@ function emit_3(type, module_0) {
|
|
|
183
184
|
return trimMargin('\n |public record ' + tmp + ' (\n |' + tmp_0 + '\n |)' + tmp$ret$1 + ' {\n |};\n |\n ');
|
|
184
185
|
}
|
|
185
186
|
function emit_4(_this__u8e3s4) {
|
|
186
|
-
return dropLast_0(joinToString(_this__u8e3s4.
|
|
187
|
+
return dropLast_0(joinToString(_this__u8e3s4.wo_1, '\n', VOID, VOID, VOID, VOID, JavaTypeDefinitionEmitter$emit$lambda_0(this)), 1);
|
|
187
188
|
}
|
|
188
189
|
function emit_5(_this__u8e3s4) {
|
|
189
|
-
return this.
|
|
190
|
+
return this.bq(_this__u8e3s4.fp_1) + ' ' + this.br(_this__u8e3s4.ep_1);
|
|
190
191
|
}
|
|
191
192
|
function emit_6(_this__u8e3s4) {
|
|
192
193
|
// Inline function 'kotlin.let' call
|
|
193
194
|
var it = emitType(this, _this__u8e3s4);
|
|
194
|
-
return _this__u8e3s4.
|
|
195
|
+
return _this__u8e3s4.hu() ? 'java.util.Optional<' + it + '>' : it;
|
|
195
196
|
}
|
|
196
197
|
function emitRoot(_this__u8e3s4, void_0) {
|
|
197
198
|
var tmp;
|
|
198
199
|
if (_this__u8e3s4 instanceof Dict) {
|
|
199
|
-
tmp = this.
|
|
200
|
+
tmp = this.j1v(_this__u8e3s4.go_1);
|
|
200
201
|
} else {
|
|
201
202
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
202
|
-
tmp = this.
|
|
203
|
+
tmp = this.j1v(_this__u8e3s4.do_1);
|
|
203
204
|
} else {
|
|
204
205
|
if (_this__u8e3s4 instanceof Unit) {
|
|
205
206
|
tmp = void_0;
|
|
@@ -228,15 +229,15 @@ function emitRoot(_this__u8e3s4, void_0) {
|
|
|
228
229
|
}
|
|
229
230
|
function emitRoot$default(_this__u8e3s4, void_0, $super) {
|
|
230
231
|
void_0 = void_0 === VOID ? 'void' : void_0;
|
|
231
|
-
return $super === VOID ? this.
|
|
232
|
+
return $super === VOID ? this.k1v(_this__u8e3s4, void_0) : emitRoot(_this__u8e3s4, void_0);
|
|
232
233
|
}
|
|
233
234
|
function emit_7(_this__u8e3s4) {
|
|
234
235
|
var tmp;
|
|
235
236
|
if (_this__u8e3s4 instanceof RegExp_0) {
|
|
236
|
-
tmp = 'return java.util.regex.Pattern.compile("' + replace(this.
|
|
237
|
+
tmp = 'return java.util.regex.Pattern.compile("' + replace(this.dq(_this__u8e3s4.dt_1), '\\', '\\\\') + '").matcher(value).find();';
|
|
237
238
|
} else {
|
|
238
239
|
if (_this__u8e3s4 instanceof Bound) {
|
|
239
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
240
|
+
var tmp1_safe_receiver = _this__u8e3s4.tt_1;
|
|
240
241
|
var tmp_0;
|
|
241
242
|
if (tmp1_safe_receiver == null) {
|
|
242
243
|
tmp_0 = null;
|
|
@@ -245,7 +246,7 @@ function emit_7(_this__u8e3s4) {
|
|
|
245
246
|
tmp_0 = tmp1_safe_receiver + ' < value';
|
|
246
247
|
}
|
|
247
248
|
var minCheck = tmp_0;
|
|
248
|
-
var tmp2_safe_receiver = _this__u8e3s4.
|
|
249
|
+
var tmp2_safe_receiver = _this__u8e3s4.ut_1;
|
|
249
250
|
var tmp_1;
|
|
250
251
|
if (tmp2_safe_receiver == null) {
|
|
251
252
|
tmp_1 = null;
|
|
@@ -271,59 +272,59 @@ function emit_7(_this__u8e3s4) {
|
|
|
271
272
|
}
|
|
272
273
|
initMetadataForInterface(JavaTypeDefinitionEmitter, 'JavaTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter]);
|
|
273
274
|
function emit_8(channel) {
|
|
274
|
-
return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |@FunctionalInterface\n |public interface ' + this.
|
|
275
|
+
return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |@FunctionalInterface\n |public interface ' + this.br(channel.qo_1) + ' {\n | void invoke(' + emitFullyQualified(this, channel, channel.ro_1) + this.j1v(channel.ro_1) + ' message);\n |}\n |\n ');
|
|
275
276
|
}
|
|
276
277
|
initMetadataForInterface(JavaChannelDefinitionEmitter, 'JavaChannelDefinitionEmitter', VOID, VOID, [JavaTypeDefinitionEmitter]);
|
|
277
278
|
function emit_9(endpoint) {
|
|
278
279
|
var tmp = emitImports_0(this, endpoint);
|
|
279
|
-
var tmp_0 = this.
|
|
280
|
+
var tmp_0 = this.br(endpoint.ip_1);
|
|
280
281
|
var tmp_1 = get_pathParams(endpoint);
|
|
281
282
|
var tmp_2 = emitObject(this, tmp_1, 'Path', 'Wirespec.Path', JavaEndpointDefinitionEmitter$emit$lambda(this));
|
|
282
|
-
var tmp_3 = emitObject(this, endpoint.
|
|
283
|
-
var tmp_4 = emitObject(this, endpoint.
|
|
284
|
-
var tmp_5 = this.
|
|
283
|
+
var tmp_3 = emitObject(this, endpoint.lp_1, 'Queries', 'Wirespec.Queries', JavaEndpointDefinitionEmitter$emit$lambda_0(this));
|
|
284
|
+
var tmp_4 = emitObject(this, endpoint.mp_1, 'RequestHeaders', 'Wirespec.Request.Headers', JavaEndpointDefinitionEmitter$emit$lambda_1(this));
|
|
285
|
+
var tmp_5 = this.v1v(first_0(endpoint.np_1), endpoint);
|
|
285
286
|
var tmp_6 = Spacer_instance.toString();
|
|
286
287
|
var tmp_7 = emitStatusInterfaces(this, endpoint);
|
|
287
288
|
var tmp_8 = emitResponseInterfaces(this, endpoint);
|
|
288
|
-
var tmp_9 = distinctByStatus(endpoint.
|
|
289
|
+
var tmp_9 = distinctByStatus(endpoint.op_1);
|
|
289
290
|
var tmp_10 = joinToString(tmp_9, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_2(this));
|
|
290
291
|
var tmp_11 = Spacer_instance.toString();
|
|
291
|
-
var tmp_12 = emitRequestFunctions(this, first_0(endpoint.
|
|
292
|
-
var tmp_13 = Spacer_instance.
|
|
293
|
-
var tmp_14 = distinctByStatus(endpoint.
|
|
292
|
+
var tmp_12 = emitRequestFunctions(this, first_0(endpoint.np_1), endpoint);
|
|
293
|
+
var tmp_13 = Spacer_instance.vr(2);
|
|
294
|
+
var tmp_14 = distinctByStatus(endpoint.op_1);
|
|
294
295
|
var tmp_15 = joinToString(tmp_14, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_3(this));
|
|
295
|
-
var tmp_16 = Spacer_instance.
|
|
296
|
-
var tmp_17 = Spacer_instance.
|
|
297
|
-
var tmp_18 = Spacer_instance.
|
|
296
|
+
var tmp_16 = Spacer_instance.vr(3);
|
|
297
|
+
var tmp_17 = Spacer_instance.vr(2);
|
|
298
|
+
var tmp_18 = Spacer_instance.vr(2);
|
|
298
299
|
var tmp_19 = emitFromResponse(this, endpoint);
|
|
299
|
-
var tmp_20 = Spacer_instance.
|
|
300
|
-
var tmp_21 = Spacer_instance.
|
|
301
|
-
var tmp_22 = this.
|
|
302
|
-
var tmp_23 = Spacer_instance.
|
|
303
|
-
var tmp_24 = Spacer_instance.
|
|
304
|
-
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.
|
|
300
|
+
var tmp_20 = Spacer_instance.vr(2);
|
|
301
|
+
var tmp_21 = Spacer_instance.vr(2);
|
|
302
|
+
var tmp_22 = this.z1v(endpoint);
|
|
303
|
+
var tmp_23 = Spacer_instance.vr(2);
|
|
304
|
+
var tmp_24 = Spacer_instance.vr(3);
|
|
305
|
+
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.kp_1, '/', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_4) + '"; }\n |' + Spacer_instance.vr(3) + '@Override public String getMethod() { return "' + endpoint.jp_1.toString() + '"; }\n |' + Spacer_instance.vr(3) + '@Override public Wirespec.ServerEdge<Request, Response<?>> getServer(Wirespec.Serialization serialization) {\n |' + Spacer_instance.vr(4) + 'return new Wirespec.ServerEdge<>() {\n |' + Spacer_instance.vr(5) + '@Override public Request from(Wirespec.RawRequest request) { return fromRequest(serialization, request); }\n |' + Spacer_instance.vr(5) + '@Override public Wirespec.RawResponse to(Response<?> response) { return toResponse(serialization, response); }\n |' + Spacer_instance.vr(4) + '};\n |' + Spacer_instance.vr(3) + '}\n |' + Spacer_instance.vr(3) + '@Override public Wirespec.ClientEdge<Request, Response<?>> getClient(Wirespec.Serialization serialization) {\n |' + Spacer_instance.vr(4) + 'return new Wirespec.ClientEdge<>() {\n |' + Spacer_instance.vr(5) + '@Override public Wirespec.RawRequest to(Request request) { return toRequest(serialization, request); }\n |' + Spacer_instance.vr(5) + '@Override public Response<?> from(Wirespec.RawResponse response) { return fromResponse(serialization, response); }\n |' + Spacer_instance.vr(4) + '};\n |' + Spacer_instance.vr(3) + '}\n |' + Spacer_instance.vr(2) + '}\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
305
306
|
}
|
|
306
307
|
function emitHandleFunction(endpoint) {
|
|
307
|
-
return 'java.util.concurrent.CompletableFuture<Response<?>> ' + Companion_instance_1.
|
|
308
|
+
return 'java.util.concurrent.CompletableFuture<Response<?>> ' + Companion_instance_1.tq(this.br(endpoint.ip_1)) + '(Request request);';
|
|
308
309
|
}
|
|
309
310
|
function emit_10(_this__u8e3s4, endpoint) {
|
|
310
|
-
return trimMargin('\n |' + Spacer_instance.toString() + 'record Request (\n |' + Spacer_instance.
|
|
311
|
+
return trimMargin('\n |' + Spacer_instance.toString() + 'record Request (\n |' + Spacer_instance.vr(2) + 'Path path,\n |' + Spacer_instance.vr(2) + 'Wirespec.Method method,\n |' + Spacer_instance.vr(2) + 'Queries queries,\n |' + Spacer_instance.vr(2) + 'RequestHeaders headers,\n |' + Spacer_instance.vr(2) + emit_16(this, _this__u8e3s4.rp_1) + ' body\n |' + Spacer_instance.toString() + ') implements Wirespec.Request<' + emit_16(this, _this__u8e3s4.rp_1) + '> {\n |' + Spacer_instance.vr(2) + emitConstructor(this, _this__u8e3s4, endpoint) + '\n |' + Spacer_instance.toString() + '}\n ');
|
|
311
312
|
}
|
|
312
313
|
function emit_11(_this__u8e3s4) {
|
|
313
314
|
var tmp = Spacer_instance.toString();
|
|
314
|
-
var tmp_0 = Companion_instance_1.
|
|
315
|
-
var tmp_1 = Spacer_instance.
|
|
316
|
-
var tmp_2 = Spacer_instance.
|
|
317
|
-
var tmp_3 = Spacer_instance.
|
|
318
|
-
var tmp_4 = emit_16(this, _this__u8e3s4.
|
|
315
|
+
var tmp_0 = Companion_instance_1.sq(_this__u8e3s4.up_1);
|
|
316
|
+
var tmp_1 = Spacer_instance.vr(2);
|
|
317
|
+
var tmp_2 = Spacer_instance.vr(2);
|
|
318
|
+
var tmp_3 = Spacer_instance.vr(2);
|
|
319
|
+
var tmp_4 = emit_16(this, _this__u8e3s4.wp_1);
|
|
319
320
|
var tmp_5 = Spacer_instance.toString();
|
|
320
|
-
var tmp_6 = toString_0(first(_this__u8e3s4.
|
|
321
|
-
var tmp_7 = emit_16(this, _this__u8e3s4.
|
|
322
|
-
var tmp_8 = concatGenerics(emit_16(this, _this__u8e3s4.
|
|
323
|
-
var tmp_9 = Spacer_instance.
|
|
324
|
-
var tmp_10 = Companion_instance_1.
|
|
325
|
-
var tmp_11 = orNull(joinToString(_this__u8e3s4.
|
|
326
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
321
|
+
var tmp_6 = toString_0(first(_this__u8e3s4.up_1));
|
|
322
|
+
var tmp_7 = emit_16(this, _this__u8e3s4.wp_1);
|
|
323
|
+
var tmp_8 = concatGenerics(emit_16(this, _this__u8e3s4.wp_1));
|
|
324
|
+
var tmp_9 = Spacer_instance.vr(2);
|
|
325
|
+
var tmp_10 = Companion_instance_1.sq(_this__u8e3s4.up_1);
|
|
326
|
+
var tmp_11 = orNull(joinToString(_this__u8e3s4.vp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_5(this)));
|
|
327
|
+
var tmp0_safe_receiver = _this__u8e3s4.wp_1;
|
|
327
328
|
var tmp_12;
|
|
328
329
|
if (tmp0_safe_receiver == null) {
|
|
329
330
|
tmp_12 = null;
|
|
@@ -332,23 +333,23 @@ function emit_11(_this__u8e3s4) {
|
|
|
332
333
|
tmp_12 = emit_16(this, tmp0_safe_receiver) + ' body';
|
|
333
334
|
}
|
|
334
335
|
var tmp_13 = joinToString(listOfNotNull([tmp_11, tmp_12]));
|
|
335
|
-
var tmp_14 = Spacer_instance.
|
|
336
|
-
var tmp_15 = fixStatus(_this__u8e3s4.
|
|
336
|
+
var tmp_14 = Spacer_instance.vr(3);
|
|
337
|
+
var tmp_15 = fixStatus(_this__u8e3s4.up_1);
|
|
337
338
|
// Inline function 'kotlin.let' call
|
|
338
|
-
var tmp_16 = 'new Headers(' + joinToString(_this__u8e3s4.
|
|
339
|
-
var tmp_17 = _this__u8e3s4.
|
|
340
|
-
var tmp_18 = Spacer_instance.
|
|
341
|
-
var tmp_19 = Spacer_instance.
|
|
342
|
-
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.
|
|
339
|
+
var tmp_16 = 'new Headers(' + joinToString(_this__u8e3s4.vp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_6(this)) + ')';
|
|
340
|
+
var tmp_17 = _this__u8e3s4.wp_1 == null ? 'null' : 'body';
|
|
341
|
+
var tmp_18 = Spacer_instance.vr(2);
|
|
342
|
+
var tmp_19 = Spacer_instance.vr(1);
|
|
343
|
+
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.vp_1, 'Headers', 'Wirespec.Response.Headers', JavaEndpointDefinitionEmitter$emit$lambda_7(this)) + '\n |' + Spacer_instance.toString() + '}\n ');
|
|
343
344
|
}
|
|
344
345
|
initMetadataForInterface(JavaEndpointDefinitionEmitter, 'JavaEndpointDefinitionEmitter', VOID, VOID, [JavaTypeDefinitionEmitter]);
|
|
345
346
|
function emit_12(identifier) {
|
|
346
347
|
var tmp;
|
|
347
348
|
if (identifier instanceof DefinitionIdentifier) {
|
|
348
|
-
tmp = this.
|
|
349
|
+
tmp = this.u1v(identifier.l1());
|
|
349
350
|
} else {
|
|
350
351
|
if (identifier instanceof FieldIdentifier) {
|
|
351
|
-
tmp = this.
|
|
352
|
+
tmp = this.y1v(this.u1v(identifier.l1()));
|
|
352
353
|
} else {
|
|
353
354
|
noWhenBranchMatchedException();
|
|
354
355
|
}
|
|
@@ -366,11 +367,11 @@ function sanitizeSymbol(_this__u8e3s4) {
|
|
|
366
367
|
var item = _iterator__ex2g4s.v();
|
|
367
368
|
var _unary__edvuaz = index;
|
|
368
369
|
index = _unary__edvuaz + 1 | 0;
|
|
369
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.
|
|
370
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.sq(item) : item;
|
|
370
371
|
destination.x(tmp$ret$0);
|
|
371
372
|
}
|
|
372
373
|
var tmp = asSequence(joinToString(destination, ''));
|
|
373
|
-
return this.
|
|
374
|
+
return this.x1v(joinToString_0(filter(tmp, JavaIdentifierEmitter$sanitizeSymbol$lambda), ''));
|
|
374
375
|
}
|
|
375
376
|
function sanitizeFirstIsDigit(_this__u8e3s4) {
|
|
376
377
|
var tmp;
|
|
@@ -390,39 +391,44 @@ function sanitizeFirstIsDigit(_this__u8e3s4) {
|
|
|
390
391
|
return tmp;
|
|
391
392
|
}
|
|
392
393
|
function sanitizeKeywords(_this__u8e3s4) {
|
|
393
|
-
return Companion_getInstance_0().
|
|
394
|
+
return Companion_getInstance_0().a1w_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
|
|
394
395
|
}
|
|
395
396
|
initMetadataForInterface(JavaIdentifierEmitter, 'JavaIdentifierEmitter');
|
|
396
|
-
function emit_13(
|
|
397
|
-
var tmp = this.
|
|
398
|
-
return trimMargin('\n |public
|
|
397
|
+
function emit_13(enum_0, module_0) {
|
|
398
|
+
var tmp = this.br(enum_0.lr_1);
|
|
399
|
+
return trimMargin('\n |public enum ' + tmp + ' implements Wirespec.Enum {\n |' + spacer(joinToString(enum_0.mr_1, ',\n', VOID, VOID, VOID, VOID, JavaEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'public final String label;\n |' + Spacer_instance.toString() + this.br(enum_0.lr_1) + '(String label) {\n |' + Spacer_instance.vr(2) + 'this.label = label;\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + '@Override\n |' + Spacer_instance.toString() + 'public String toString() {\n |' + Spacer_instance.vr(2) + 'return label;\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + '@Override\n |' + Spacer_instance.toString() + 'public String label() {\n |' + Spacer_instance.vr(2) + 'return label;\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
400
|
+
}
|
|
401
|
+
initMetadataForInterface(JavaEnumDefinitionEmitter, 'JavaEnumDefinitionEmitter', VOID, VOID, [JavaIdentifierEmitter]);
|
|
402
|
+
function emit_14(union) {
|
|
403
|
+
var tmp = this.br(union.uo_1);
|
|
404
|
+
return trimMargin('\n |public sealed interface ' + tmp + ' permits ' + joinToString(union.vo_1, VOID, VOID, VOID, VOID, VOID, JavaUnionDefinitionEmitter$emit$lambda) + ' {}\n |\n ');
|
|
399
405
|
}
|
|
400
406
|
initMetadataForInterface(JavaUnionDefinitionEmitter, 'JavaUnionDefinitionEmitter', VOID, VOID, [JavaIdentifierEmitter]);
|
|
401
|
-
function
|
|
402
|
-
return trimMargin('\n |public record ' + this.
|
|
407
|
+
function emit_15(refined) {
|
|
408
|
+
return trimMargin('\n |public record ' + this.br(refined.gr_1) + ' (' + this.bq(refined.hr_1) + ' value) implements Wirespec.Refined<' + this.bq(refined.hr_1) + '> {\n |' + Spacer_instance.toString() + '@Override\n |' + Spacer_instance.toString() + 'public String toString() { return value.toString(); }\n |' + Spacer_instance.toString() + 'public boolean validate() {\n |' + Spacer_instance.toString() + Spacer_instance.toString() + this.pr(refined) + '\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + '@Override\n |' + Spacer_instance.toString() + 'public ' + this.bq(refined.hr_1) + ' value() { return value; }\n |}\n |\n ');
|
|
403
409
|
}
|
|
404
410
|
function emitValidator(_this__u8e3s4) {
|
|
405
411
|
var defaultReturn = 'return true;';
|
|
406
|
-
var type = _this__u8e3s4.
|
|
412
|
+
var type = _this__u8e3s4.hr_1.tu_1;
|
|
407
413
|
var tmp;
|
|
408
414
|
if (type instanceof Integer) {
|
|
409
|
-
var tmp0_safe_receiver = type.
|
|
410
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.
|
|
415
|
+
var tmp0_safe_receiver = type.yt_1;
|
|
416
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.cq(tmp0_safe_receiver);
|
|
411
417
|
tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
|
|
412
418
|
} else {
|
|
413
419
|
if (type instanceof Number_0) {
|
|
414
|
-
var tmp2_safe_receiver = type.
|
|
415
|
-
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.
|
|
420
|
+
var tmp2_safe_receiver = type.bu_1;
|
|
421
|
+
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.cq(tmp2_safe_receiver);
|
|
416
422
|
tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
|
|
417
423
|
} else {
|
|
418
424
|
if (type instanceof String_0) {
|
|
419
|
-
var tmp4_safe_receiver = type.
|
|
425
|
+
var tmp4_safe_receiver = type.vt_1;
|
|
420
426
|
var tmp_0;
|
|
421
427
|
var tmp_1 = tmp4_safe_receiver;
|
|
422
428
|
if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
|
|
423
429
|
tmp_0 = null;
|
|
424
430
|
} else {
|
|
425
|
-
tmp_0 = this.
|
|
431
|
+
tmp_0 = this.cq(new RegExp_0(tmp4_safe_receiver));
|
|
426
432
|
}
|
|
427
433
|
var tmp5_elvis_lhs = tmp_0;
|
|
428
434
|
tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
|
|
@@ -442,12 +448,7 @@ function emitValidator(_this__u8e3s4) {
|
|
|
442
448
|
return tmp;
|
|
443
449
|
}
|
|
444
450
|
initMetadataForInterface(JavaRefinedTypeDefinitionEmitter, 'JavaRefinedTypeDefinitionEmitter', VOID, VOID, [JavaTypeDefinitionEmitter]);
|
|
445
|
-
|
|
446
|
-
var tmp = this.wq(enum_0.gr_1);
|
|
447
|
-
return trimMargin('\n |public enum ' + tmp + ' implements Wirespec.Enum {\n |' + spacer(joinToString(enum_0.hr_1, ',\n', VOID, VOID, VOID, VOID, JavaEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'public final String label;\n |' + Spacer_instance.toString() + this.wq(enum_0.gr_1) + '(String label) {\n |' + Spacer_instance.qr(2) + 'this.label = label;\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + '@Override\n |' + Spacer_instance.toString() + 'public String toString() {\n |' + Spacer_instance.qr(2) + 'return label;\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + '@Override\n |' + Spacer_instance.toString() + 'public String label() {\n |' + Spacer_instance.qr(2) + 'return label;\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
448
|
-
}
|
|
449
|
-
initMetadataForInterface(JavaEnumDefinitionEmitter, 'JavaEnumDefinitionEmitter', VOID, VOID, [JavaIdentifierEmitter]);
|
|
450
|
-
initMetadataForClass(JavaEmitter, 'JavaEmitter', JavaEmitter, LanguageEmitter, [JavaEndpointDefinitionEmitter, JavaChannelDefinitionEmitter, JavaIdentifierEmitter, JavaTypeDefinitionEmitter, JavaUnionDefinitionEmitter, JavaRefinedTypeDefinitionEmitter, JavaEnumDefinitionEmitter, LanguageEmitter]);
|
|
451
|
+
initMetadataForClass(JavaEmitter, 'JavaEmitter', JavaEmitter, LanguageEmitter, [JavaEndpointDefinitionEmitter, JavaTypeDefinitionEmitter, JavaEnumDefinitionEmitter, JavaUnionDefinitionEmitter, JavaChannelDefinitionEmitter, JavaRefinedTypeDefinitionEmitter, JavaIdentifierEmitter, LanguageEmitter]);
|
|
451
452
|
initMetadataForCompanion(Companion);
|
|
452
453
|
initMetadataForCompanion(Companion_0);
|
|
453
454
|
initMetadataForClass(JavaIrEmitter, 'JavaIrEmitter', JavaIrEmitter, VOID, [IrEmitter]);
|
|
@@ -461,7 +462,7 @@ function emitImports($this, _this__u8e3s4) {
|
|
|
461
462
|
var _iterator__ex2g4s = tmp0.t();
|
|
462
463
|
while (_iterator__ex2g4s.u()) {
|
|
463
464
|
var element = _iterator__ex2g4s.v();
|
|
464
|
-
if (!(_this__u8e3s4.
|
|
465
|
+
if (!(_this__u8e3s4.ar().l1() === element.pu_1)) {
|
|
465
466
|
destination.x(element);
|
|
466
467
|
}
|
|
467
468
|
}
|
|
@@ -471,7 +472,7 @@ function emitImports($this, _this__u8e3s4) {
|
|
|
471
472
|
var _iterator__ex2g4s_0 = destination.t();
|
|
472
473
|
while (_iterator__ex2g4s_0.u()) {
|
|
473
474
|
var item = _iterator__ex2g4s_0.v();
|
|
474
|
-
var tmp$ret$3 = 'import ' + $this.
|
|
475
|
+
var tmp$ret$3 = 'import ' + $this.i1v().rr_1 + '.model.' + item.pu_1 + ';';
|
|
475
476
|
destination_0.x(tmp$ret$3);
|
|
476
477
|
}
|
|
477
478
|
var tmp = destination_0;
|
|
@@ -479,8 +480,8 @@ function emitImports($this, _this__u8e3s4) {
|
|
|
479
480
|
}
|
|
480
481
|
function emitFullyQualified($this, _this__u8e3s4, reference) {
|
|
481
482
|
var tmp;
|
|
482
|
-
if (_this__u8e3s4.
|
|
483
|
-
tmp = $this.
|
|
483
|
+
if (_this__u8e3s4.ar().l1() === reference.l1()) {
|
|
484
|
+
tmp = $this.i1v().rr_1 + '.model.';
|
|
484
485
|
} else {
|
|
485
486
|
tmp = '';
|
|
486
487
|
}
|
|
@@ -493,49 +494,49 @@ function JavaChannelDefinitionEmitter$emitImports$lambda(it) {
|
|
|
493
494
|
function JavaChannelDefinitionEmitter() {
|
|
494
495
|
}
|
|
495
496
|
function JavaEmitter(packageName, emitShared) {
|
|
496
|
-
packageName = packageName === VOID ? Companion_instance.
|
|
497
|
-
emitShared = emitShared === VOID ? Companion_instance_0.
|
|
497
|
+
packageName = packageName === VOID ? Companion_instance.qr('community.flock.wirespec.generated') : packageName;
|
|
498
|
+
emitShared = emitShared === VOID ? Companion_instance_0.ko() : emitShared;
|
|
498
499
|
LanguageEmitter.call(this);
|
|
499
|
-
this.
|
|
500
|
-
this.
|
|
501
|
-
this.
|
|
502
|
-
this.
|
|
503
|
-
this.
|
|
504
|
-
this.
|
|
505
|
-
}
|
|
506
|
-
protoOf(JavaEmitter).
|
|
507
|
-
return this.
|
|
500
|
+
this.l1v_1 = packageName;
|
|
501
|
+
this.m1v_1 = emitShared;
|
|
502
|
+
this.n1v_1 = '\nimport community.flock.wirespec.java.Wirespec;\n';
|
|
503
|
+
this.o1v_1 = FileExtension_Java_getInstance();
|
|
504
|
+
this.p1v_1 = JavaShared_getInstance();
|
|
505
|
+
this.q1v_1 = '//';
|
|
506
|
+
}
|
|
507
|
+
protoOf(JavaEmitter).i1v = function () {
|
|
508
|
+
return this.l1v_1;
|
|
508
509
|
};
|
|
509
|
-
protoOf(JavaEmitter).
|
|
510
|
-
return this.
|
|
510
|
+
protoOf(JavaEmitter).iq = function () {
|
|
511
|
+
return this.o1v_1;
|
|
511
512
|
};
|
|
512
|
-
protoOf(JavaEmitter).
|
|
513
|
-
return this.
|
|
513
|
+
protoOf(JavaEmitter).r1v = function () {
|
|
514
|
+
return this.p1v_1;
|
|
514
515
|
};
|
|
515
|
-
protoOf(JavaEmitter).
|
|
516
|
-
return this.
|
|
516
|
+
protoOf(JavaEmitter).jq = function () {
|
|
517
|
+
return this.q1v_1;
|
|
517
518
|
};
|
|
518
|
-
protoOf(JavaEmitter).
|
|
519
|
+
protoOf(JavaEmitter).yq = function (module_0, logger) {
|
|
519
520
|
// Inline function 'kotlin.let' call
|
|
520
|
-
var it = protoOf(LanguageEmitter).
|
|
521
|
-
return this.
|
|
521
|
+
var it = protoOf(LanguageEmitter).yq.call(this, module_0, logger);
|
|
522
|
+
return this.m1v_1.lo_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.qr('community.flock.wirespec.java').tr() + 'Wirespec', this.r1v().t1v_1)) : it;
|
|
522
523
|
};
|
|
523
|
-
protoOf(JavaEmitter).
|
|
524
|
+
protoOf(JavaEmitter).zq = function (definition, module_0, logger) {
|
|
524
525
|
// Inline function 'kotlin.let' call
|
|
525
|
-
var it = protoOf(LanguageEmitter).
|
|
526
|
-
var subPackageName = plus(this.
|
|
527
|
-
var tmp = subPackageName.
|
|
526
|
+
var it = protoOf(LanguageEmitter).zq.call(this, definition, module_0, logger);
|
|
527
|
+
var subPackageName = plus(this.i1v(), definition);
|
|
528
|
+
var tmp = subPackageName.tr() + this.u1v(it.mo_1);
|
|
528
529
|
// Inline function 'kotlin.text.trimStart' call
|
|
529
|
-
var this_0 = trimMargin('\n |package ' + subPackageName.toString() + ';\n |' + (Companion_instance_1.
|
|
530
|
+
var this_0 = trimMargin('\n |package ' + subPackageName.toString() + ';\n |' + (Companion_instance_1.uq(module_0) ? this.n1v_1 : '') + '\n |' + it.no_1 + '\n ');
|
|
530
531
|
var tmp$ret$0 = toString(trimStart(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
531
532
|
return new Emitted(tmp, tmp$ret$0);
|
|
532
533
|
};
|
|
533
534
|
function emitGetType($this, _this__u8e3s4) {
|
|
534
|
-
return 'Wirespec.getType(' + $this.
|
|
535
|
+
return 'Wirespec.getType(' + $this.k1v(_this__u8e3s4, 'Void') + '.class, ' + emitGetTypeRaw($this, _this__u8e3s4) + ')';
|
|
535
536
|
}
|
|
536
537
|
function emitGetTypeRaw($this, _this__u8e3s4) {
|
|
537
538
|
var tmp;
|
|
538
|
-
var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : _this__u8e3s4.
|
|
539
|
+
var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : _this__u8e3s4.hu();
|
|
539
540
|
if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {
|
|
540
541
|
tmp = 'java.util.Optional.class';
|
|
541
542
|
} else {
|
|
@@ -550,9 +551,9 @@ function emitGetTypeRaw($this, _this__u8e3s4) {
|
|
|
550
551
|
function emitConstructor($this, _this__u8e3s4, endpoint) {
|
|
551
552
|
var tmp = get_pathParams(endpoint);
|
|
552
553
|
var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda($this)));
|
|
553
|
-
var tmp_1 = orNull(joinToString(endpoint.
|
|
554
|
-
var tmp_2 = orNull(joinToString(endpoint.
|
|
555
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
554
|
+
var tmp_1 = orNull(joinToString(endpoint.lp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda_0($this)));
|
|
555
|
+
var tmp_2 = orNull(joinToString(endpoint.mp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda_1($this)));
|
|
556
|
+
var tmp0_safe_receiver = _this__u8e3s4.rp_1;
|
|
556
557
|
var tmp_3;
|
|
557
558
|
if (tmp0_safe_receiver == null) {
|
|
558
559
|
tmp_3 = null;
|
|
@@ -561,112 +562,112 @@ function emitConstructor($this, _this__u8e3s4, endpoint) {
|
|
|
561
562
|
tmp_3 = emit_16($this, tmp0_safe_receiver) + ' body';
|
|
562
563
|
}
|
|
563
564
|
var tmp_4 = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]));
|
|
564
|
-
var tmp_5 = Spacer_instance.
|
|
565
|
+
var tmp_5 = Spacer_instance.vr(3);
|
|
565
566
|
var tmp_6 = get_pathParams(endpoint);
|
|
566
567
|
// Inline function 'kotlin.let' call
|
|
567
568
|
var tmp$ret$3 = 'new Path(' + joinToString(tmp_6, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda_2($this)) + ')';
|
|
568
569
|
var tmp1_elvis_lhs = orNull(tmp$ret$3);
|
|
569
570
|
var tmp_7 = tmp1_elvis_lhs == null ? 'new Path()' : tmp1_elvis_lhs;
|
|
570
|
-
var tmp_8 = 'Wirespec.Method.' + endpoint.
|
|
571
|
+
var tmp_8 = 'Wirespec.Method.' + endpoint.jp_1.a3_1;
|
|
571
572
|
// Inline function 'kotlin.let' call
|
|
572
|
-
var tmp$ret$5 = 'new Queries(' + joinToString(endpoint.
|
|
573
|
+
var tmp$ret$5 = 'new Queries(' + joinToString(endpoint.lp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda_3($this)) + ')';
|
|
573
574
|
var tmp2_elvis_lhs = orNull(tmp$ret$5);
|
|
574
575
|
var tmp_9 = tmp2_elvis_lhs == null ? 'new Queries()' : tmp2_elvis_lhs;
|
|
575
576
|
// Inline function 'kotlin.let' call
|
|
576
|
-
var tmp$ret$7 = 'new RequestHeaders(' + joinToString(endpoint.
|
|
577
|
+
var tmp$ret$7 = 'new RequestHeaders(' + joinToString(endpoint.mp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda_4($this)) + ')';
|
|
577
578
|
var tmp3_elvis_lhs = orNull(tmp$ret$7);
|
|
578
579
|
var tmp_10 = tmp3_elvis_lhs == null ? 'new RequestHeaders()' : tmp3_elvis_lhs;
|
|
579
580
|
var tmp_11;
|
|
580
|
-
if (_this__u8e3s4.
|
|
581
|
+
if (_this__u8e3s4.rp_1 == null) {
|
|
581
582
|
tmp_11 = null;
|
|
582
583
|
} else {
|
|
583
584
|
// Inline function 'kotlin.let' call
|
|
584
585
|
tmp_11 = 'body';
|
|
585
586
|
}
|
|
586
587
|
var tmp5_elvis_lhs = tmp_11;
|
|
587
|
-
return 'public Request(' + tmp_4 + ') {\n' + tmp_5 + 'this(' + joinToString(listOfNotNull([tmp_7, tmp_8, tmp_9, tmp_10, tmp5_elvis_lhs == null ? 'null' : tmp5_elvis_lhs])) + ');\n' + Spacer_instance.
|
|
588
|
+
return 'public Request(' + tmp_4 + ') {\n' + tmp_5 + 'this(' + joinToString(listOfNotNull([tmp_7, tmp_8, tmp_9, tmp_10, tmp5_elvis_lhs == null ? 'null' : tmp5_elvis_lhs])) + ');\n' + Spacer_instance.vr(2) + '}';
|
|
588
589
|
}
|
|
589
590
|
function emitDeserializedParams($this, _this__u8e3s4, endpoint) {
|
|
590
591
|
var tmp = get_indexedPathParams(endpoint);
|
|
591
592
|
var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda($this)));
|
|
592
|
-
var tmp_1 = orNull(joinToString(endpoint.
|
|
593
|
-
var tmp_2 = orNull(joinToString(endpoint.
|
|
594
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
593
|
+
var tmp_1 = orNull(joinToString(endpoint.lp_1, ',\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_0($this)));
|
|
594
|
+
var tmp_2 = orNull(joinToString(endpoint.mp_1, ',\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_1($this)));
|
|
595
|
+
var tmp0_safe_receiver = _this__u8e3s4.rp_1;
|
|
595
596
|
var tmp_3;
|
|
596
597
|
if (tmp0_safe_receiver == null) {
|
|
597
598
|
tmp_3 = null;
|
|
598
599
|
} else {
|
|
599
600
|
// Inline function 'kotlin.let' call
|
|
600
|
-
tmp_3 = Spacer_instance.
|
|
601
|
+
tmp_3 = Spacer_instance.vr(4) + 'request.body().<' + emit_16($this, tmp0_safe_receiver) + '>map(body -> serialization.deserializeBody(body, ' + emitGetType($this, tmp0_safe_receiver.tp_1) + ')).orElse(null)';
|
|
601
602
|
}
|
|
602
603
|
// Inline function 'kotlin.let' call
|
|
603
604
|
var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
|
|
604
|
-
return isBlank(it) ? '' : '\n' + it + '\n' + Spacer_instance.
|
|
605
|
+
return isBlank(it) ? '' : '\n' + it + '\n' + Spacer_instance.vr(3);
|
|
605
606
|
}
|
|
606
607
|
function emitDeserializedParams_0($this, _this__u8e3s4) {
|
|
607
|
-
var tmp = orNull(joinToString(_this__u8e3s4.
|
|
608
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
608
|
+
var tmp = orNull(joinToString(_this__u8e3s4.vp_1, ',\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_2($this)));
|
|
609
|
+
var tmp0_safe_receiver = _this__u8e3s4.wp_1;
|
|
609
610
|
var tmp_0;
|
|
610
611
|
if (tmp0_safe_receiver == null) {
|
|
611
612
|
tmp_0 = null;
|
|
612
613
|
} else {
|
|
613
614
|
// Inline function 'kotlin.let' call
|
|
614
|
-
tmp_0 = Spacer_instance.
|
|
615
|
+
tmp_0 = Spacer_instance.vr(5) + 'response.body().<' + emit_16($this, tmp0_safe_receiver) + '>map(body -> serialization.deserializeBody(body, ' + emitGetType($this, tmp0_safe_receiver.tp_1) + ')).orElse(null)';
|
|
615
616
|
}
|
|
616
617
|
// Inline function 'kotlin.let' call
|
|
617
618
|
var it = joinToString(listOfNotNull([tmp, tmp_0]), ',\n');
|
|
618
|
-
return isBlank(it) ? '' : '\n' + it + '\n' + Spacer_instance.
|
|
619
|
+
return isBlank(it) ? '' : '\n' + it + '\n' + Spacer_instance.vr(4);
|
|
619
620
|
}
|
|
620
621
|
function emitSerialized($this, _this__u8e3s4) {
|
|
621
622
|
var tmp;
|
|
622
|
-
if (!(_this__u8e3s4.
|
|
623
|
-
tmp = 'java.util.Optional.ofNullable(serialization.serializeBody(r.body, ' + emitGetType($this, ensureNotNull(_this__u8e3s4.
|
|
623
|
+
if (!(_this__u8e3s4.wp_1 == null)) {
|
|
624
|
+
tmp = 'java.util.Optional.ofNullable(serialization.serializeBody(r.body, ' + emitGetType($this, ensureNotNull(_this__u8e3s4.wp_1).tp_1) + '))';
|
|
624
625
|
} else {
|
|
625
626
|
tmp = 'java.util.Optional.empty()';
|
|
626
627
|
}
|
|
627
628
|
var body = tmp;
|
|
628
629
|
var tmp_0;
|
|
629
630
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
630
|
-
if (!_this__u8e3s4.
|
|
631
|
-
tmp_0 = 'java.util.Map.ofEntries(' + joinToString(_this__u8e3s4.
|
|
631
|
+
if (!_this__u8e3s4.vp_1.r()) {
|
|
632
|
+
tmp_0 = 'java.util.Map.ofEntries(' + joinToString(_this__u8e3s4.vp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitSerialized$lambda($this)) + ')';
|
|
632
633
|
} else {
|
|
633
634
|
tmp_0 = 'java.util.Collections.emptyMap()';
|
|
634
635
|
}
|
|
635
636
|
var headers = tmp_0;
|
|
636
|
-
return Spacer_instance.
|
|
637
|
+
return Spacer_instance.vr(3) + 'if (response instanceof Response' + Companion_instance_1.sq(_this__u8e3s4.up_1) + ' r) { return new Wirespec.RawResponse(r.status(), ' + headers + ', ' + body + '); }';
|
|
637
638
|
}
|
|
638
639
|
function emitDeserialized($this, _this__u8e3s4) {
|
|
639
|
-
return Spacer_instance.
|
|
640
|
+
return Spacer_instance.vr(4) + 'case ' + _this__u8e3s4.up_1 + ' -> new Response' + Companion_instance_1.sq(_this__u8e3s4.up_1) + '(' + emitDeserializedParams_0($this, _this__u8e3s4) + ');';
|
|
640
641
|
}
|
|
641
642
|
function emitSerializedParams($this, _this__u8e3s4, fields) {
|
|
642
|
-
return 'java.util.Map.entry("' + _this__u8e3s4.
|
|
643
|
+
return 'java.util.Map.entry("' + _this__u8e3s4.ep_1.l1() + '", serialization.serializeParam(request.' + (fields === 'queries' ? 'queries' : 'headers') + '().' + $this.br(_this__u8e3s4.ep_1) + '(), ' + emitGetType($this, _this__u8e3s4.fp_1) + '))';
|
|
643
644
|
}
|
|
644
645
|
function emitDeserialized_0($this, _this__u8e3s4) {
|
|
645
|
-
return Spacer_instance.
|
|
646
|
+
return Spacer_instance.vr(4) + 'serialization.deserializePath(request.path().get(' + _this__u8e3s4.oe_1 + '), ' + emitGetType($this, _this__u8e3s4.pe_1.qp_1) + ')';
|
|
646
647
|
}
|
|
647
648
|
function emitDeserializedParams_1($this, _this__u8e3s4, fields, caseSensitive) {
|
|
648
649
|
var tmp;
|
|
649
650
|
if (caseSensitive) {
|
|
650
|
-
tmp = 'request.' + fields + '().getOrDefault("' + _this__u8e3s4.
|
|
651
|
+
tmp = 'request.' + fields + '().getOrDefault("' + _this__u8e3s4.ep_1.l1() + '", java.util.Collections.emptyList())';
|
|
651
652
|
} else {
|
|
652
|
-
tmp = 'request.' + fields + '().entrySet().stream().filter(e -> e.getKey().equalsIgnoreCase("' + _this__u8e3s4.
|
|
653
|
+
tmp = 'request.' + fields + '().entrySet().stream().filter(e -> e.getKey().equalsIgnoreCase("' + _this__u8e3s4.ep_1.l1() + '")).findFirst().map(java.util.Map.Entry::getValue).orElse(java.util.Collections.emptyList())';
|
|
653
654
|
}
|
|
654
655
|
var valuesFromField = tmp;
|
|
655
|
-
return Spacer_instance.
|
|
656
|
+
return Spacer_instance.vr(4) + 'serialization.<' + $this.bq(_this__u8e3s4.fp_1) + '>deserializeParam(' + valuesFromField + ', ' + emitGetType($this, _this__u8e3s4.fp_1) + ')';
|
|
656
657
|
}
|
|
657
658
|
function emitSerializedHeader($this, _this__u8e3s4) {
|
|
658
|
-
return 'java.util.Map.entry("' + _this__u8e3s4.
|
|
659
|
+
return 'java.util.Map.entry("' + _this__u8e3s4.ep_1.l1() + '", serialization.<' + $this.bq(_this__u8e3s4.fp_1) + '>serializeParam(r.headers().' + $this.br(_this__u8e3s4.ep_1) + '(), ' + emitGetType($this, _this__u8e3s4.fp_1) + '))';
|
|
659
660
|
}
|
|
660
661
|
function emitIdentifier($this, _this__u8e3s4) {
|
|
661
|
-
return 'serialization.serializePath(request.path().' + Companion_instance_1.
|
|
662
|
+
return 'serialization.serializePath(request.path().' + Companion_instance_1.tq($this.br(_this__u8e3s4.pp_1)) + '(), ' + emitGetType($this, _this__u8e3s4.qp_1) + ')';
|
|
662
663
|
}
|
|
663
664
|
function emit_16($this, _this__u8e3s4) {
|
|
664
|
-
var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.
|
|
665
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.
|
|
665
|
+
var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.tp_1;
|
|
666
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.bq(tmp1_safe_receiver);
|
|
666
667
|
return tmp2_elvis_lhs == null ? 'Void' : tmp2_elvis_lhs;
|
|
667
668
|
}
|
|
668
669
|
function emit_17($this, _this__u8e3s4) {
|
|
669
|
-
return $this.
|
|
670
|
+
return $this.bq(_this__u8e3s4.qp_1) + ' ' + $this.br(_this__u8e3s4.pp_1);
|
|
670
671
|
}
|
|
671
672
|
function emitImports_0($this, _this__u8e3s4) {
|
|
672
673
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -676,7 +677,7 @@ function emitImports_0($this, _this__u8e3s4) {
|
|
|
676
677
|
var _iterator__ex2g4s = tmp0.t();
|
|
677
678
|
while (_iterator__ex2g4s.u()) {
|
|
678
679
|
var element = _iterator__ex2g4s.v();
|
|
679
|
-
if (!(_this__u8e3s4.
|
|
680
|
+
if (!(_this__u8e3s4.ar().l1() === element.pu_1)) {
|
|
680
681
|
destination.x(element);
|
|
681
682
|
}
|
|
682
683
|
}
|
|
@@ -686,46 +687,46 @@ function emitImports_0($this, _this__u8e3s4) {
|
|
|
686
687
|
var _iterator__ex2g4s_0 = destination.t();
|
|
687
688
|
while (_iterator__ex2g4s_0.u()) {
|
|
688
689
|
var item = _iterator__ex2g4s_0.v();
|
|
689
|
-
var tmp$ret$3 = 'import ' + $this.
|
|
690
|
+
var tmp$ret$3 = 'import ' + $this.i1v().rr_1 + '.model.' + item.pu_1 + ';';
|
|
690
691
|
destination_0.x(tmp$ret$3);
|
|
691
692
|
}
|
|
692
693
|
var tmp = destination_0;
|
|
693
694
|
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitImports$lambda);
|
|
694
695
|
}
|
|
695
696
|
function emitRequestFunctions($this, _this__u8e3s4, endpoint) {
|
|
696
|
-
var tmp = Spacer_instance.
|
|
697
|
-
var tmp_0 = Spacer_instance.
|
|
698
|
-
var tmp_1 = Spacer_instance.
|
|
699
|
-
var tmp_2 = Spacer_instance.
|
|
700
|
-
var tmp_3 = joinToString(endpoint.
|
|
701
|
-
var tmp_4 = Spacer_instance.
|
|
697
|
+
var tmp = Spacer_instance.vr(2);
|
|
698
|
+
var tmp_0 = Spacer_instance.vr(3);
|
|
699
|
+
var tmp_1 = Spacer_instance.vr(4);
|
|
700
|
+
var tmp_2 = Spacer_instance.vr(4);
|
|
701
|
+
var tmp_3 = joinToString(endpoint.kp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda($this));
|
|
702
|
+
var tmp_4 = Spacer_instance.vr(4);
|
|
702
703
|
var tmp_5;
|
|
703
704
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
704
|
-
if (!endpoint.
|
|
705
|
-
tmp_5 = 'java.util.Map.ofEntries(' + joinToString(endpoint.
|
|
705
|
+
if (!endpoint.lp_1.r()) {
|
|
706
|
+
tmp_5 = 'java.util.Map.ofEntries(' + joinToString(endpoint.lp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda_0($this)) + ')';
|
|
706
707
|
} else {
|
|
707
708
|
tmp_5 = 'java.util.Collections.emptyMap()';
|
|
708
709
|
}
|
|
709
710
|
var tmp_6 = tmp_5;
|
|
710
|
-
var tmp_7 = Spacer_instance.
|
|
711
|
+
var tmp_7 = Spacer_instance.vr(4);
|
|
711
712
|
var tmp_8;
|
|
712
713
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
713
|
-
if (!endpoint.
|
|
714
|
-
tmp_8 = 'java.util.Map.ofEntries(' + joinToString(endpoint.
|
|
714
|
+
if (!endpoint.mp_1.r()) {
|
|
715
|
+
tmp_8 = 'java.util.Map.ofEntries(' + joinToString(endpoint.mp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda_1($this)) + ')';
|
|
715
716
|
} else {
|
|
716
717
|
tmp_8 = 'java.util.Collections.emptyMap()';
|
|
717
718
|
}
|
|
718
719
|
var tmp_9 = tmp_8;
|
|
719
|
-
var tmp_10 = Spacer_instance.
|
|
720
|
+
var tmp_10 = Spacer_instance.vr(4);
|
|
720
721
|
var tmp_11;
|
|
721
|
-
if (!(_this__u8e3s4.
|
|
722
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
723
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
722
|
+
if (!(_this__u8e3s4.rp_1 == null)) {
|
|
723
|
+
var tmp0_safe_receiver = _this__u8e3s4.rp_1;
|
|
724
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tp_1;
|
|
724
725
|
tmp_11 = 'java.util.Optional.ofNullable(serialization.serializeBody(request.body(), ' + (tmp1_safe_receiver == null ? null : emitGetType($this, tmp1_safe_receiver)) + '))';
|
|
725
726
|
} else {
|
|
726
727
|
tmp_11 = 'java.util.Optional.empty()';
|
|
727
728
|
}
|
|
728
|
-
return trimMargin('\n |' + tmp + 'static Wirespec.RawRequest toRequest(Wirespec.Serializer serialization, Request request) {\n |' + tmp_0 + 'return new Wirespec.RawRequest(\n |' + tmp_1 + 'request.method().name(),\n |' + tmp_2 + 'java.util.List.of(' + tmp_3 + '),\n |' + tmp_4 + tmp_6 + ',\n |' + tmp_7 + tmp_9 + ',\n |' + tmp_10 + tmp_11 + '\n |' + Spacer_instance.
|
|
729
|
+
return trimMargin('\n |' + tmp + 'static Wirespec.RawRequest toRequest(Wirespec.Serializer serialization, Request request) {\n |' + tmp_0 + 'return new Wirespec.RawRequest(\n |' + tmp_1 + 'request.method().name(),\n |' + tmp_2 + 'java.util.List.of(' + tmp_3 + '),\n |' + tmp_4 + tmp_6 + ',\n |' + tmp_7 + tmp_9 + ',\n |' + tmp_10 + tmp_11 + '\n |' + Spacer_instance.vr(3) + ');\n |' + Spacer_instance.vr(2) + '}\n |\n |' + Spacer_instance.vr(2) + 'static Request fromRequest(Wirespec.Deserializer serialization, Wirespec.RawRequest request) {\n |' + Spacer_instance.vr(3) + 'return new Request(' + emitDeserializedParams($this, _this__u8e3s4, endpoint) + ');\n |' + Spacer_instance.vr(2) + '}\n ');
|
|
729
730
|
}
|
|
730
731
|
function emitObject($this, _this__u8e3s4, name, extends_0, block) {
|
|
731
732
|
var tmp;
|
|
@@ -739,13 +740,13 @@ function emitObject($this, _this__u8e3s4, name, extends_0, block) {
|
|
|
739
740
|
}
|
|
740
741
|
function emitResponseInterfaces($this, _this__u8e3s4) {
|
|
741
742
|
// Inline function 'kotlin.collections.map' call
|
|
742
|
-
var this_0 = distinctByStatus(_this__u8e3s4.
|
|
743
|
+
var this_0 = distinctByStatus(_this__u8e3s4.op_1);
|
|
743
744
|
// Inline function 'kotlin.collections.mapTo' call
|
|
744
745
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
745
746
|
var _iterator__ex2g4s = this_0.t();
|
|
746
747
|
while (_iterator__ex2g4s.u()) {
|
|
747
748
|
var item = _iterator__ex2g4s.v();
|
|
748
|
-
var tmp$ret$0 = emit_16($this, item.
|
|
749
|
+
var tmp$ret$0 = emit_16($this, item.wp_1);
|
|
749
750
|
destination.x(tmp$ret$0);
|
|
750
751
|
}
|
|
751
752
|
var tmp = distinct(destination);
|
|
@@ -753,13 +754,13 @@ function emitResponseInterfaces($this, _this__u8e3s4) {
|
|
|
753
754
|
}
|
|
754
755
|
function emitStatusInterfaces($this, _this__u8e3s4) {
|
|
755
756
|
// Inline function 'kotlin.collections.map' call
|
|
756
|
-
var this_0 = _this__u8e3s4.
|
|
757
|
+
var this_0 = _this__u8e3s4.op_1;
|
|
757
758
|
// Inline function 'kotlin.collections.mapTo' call
|
|
758
759
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
759
760
|
var _iterator__ex2g4s = this_0.t();
|
|
760
761
|
while (_iterator__ex2g4s.u()) {
|
|
761
762
|
var item = _iterator__ex2g4s.v();
|
|
762
|
-
var tmp$ret$0 = new Char(first(item.
|
|
763
|
+
var tmp$ret$0 = new Char(first(item.up_1));
|
|
763
764
|
destination.x(tmp$ret$0);
|
|
764
765
|
}
|
|
765
766
|
var tmp = distinct(destination);
|
|
@@ -767,26 +768,26 @@ function emitStatusInterfaces($this, _this__u8e3s4) {
|
|
|
767
768
|
}
|
|
768
769
|
function emitFromResponse($this, _this__u8e3s4) {
|
|
769
770
|
// Inline function 'kotlin.collections.filter' call
|
|
770
|
-
var tmp0 = distinctByStatus(_this__u8e3s4.
|
|
771
|
+
var tmp0 = distinctByStatus(_this__u8e3s4.op_1);
|
|
771
772
|
// Inline function 'kotlin.collections.filterTo' call
|
|
772
773
|
var destination = ArrayList_init_$Create$();
|
|
773
774
|
var _iterator__ex2g4s = tmp0.t();
|
|
774
775
|
while (_iterator__ex2g4s.u()) {
|
|
775
776
|
var element = _iterator__ex2g4s.v();
|
|
776
|
-
if (Companion_instance_1.
|
|
777
|
+
if (Companion_instance_1.wq(element.up_1)) {
|
|
777
778
|
destination.x(element);
|
|
778
779
|
}
|
|
779
780
|
}
|
|
780
781
|
var statusResponses = destination;
|
|
781
782
|
var tmp;
|
|
782
783
|
if (statusResponses.r()) {
|
|
783
|
-
tmp = trimMargin('\n |' + Spacer_instance.
|
|
784
|
+
tmp = trimMargin('\n |' + Spacer_instance.vr(3) + 'throw new IllegalStateException("Cannot match response with status: " + response.statusCode());\n ');
|
|
784
785
|
} else if (statusResponses.a1() === 1) {
|
|
785
786
|
var response = first_0(statusResponses);
|
|
786
|
-
tmp = trimMargin('\n |' + Spacer_instance.
|
|
787
|
+
tmp = trimMargin('\n |' + Spacer_instance.vr(3) + 'if (response.statusCode() == ' + response.up_1 + ') {\n |' + Spacer_instance.vr(4) + 'return new Response' + Companion_instance_1.sq(response.up_1) + '(' + emitDeserializedParams_0($this, response) + ');\n |' + Spacer_instance.vr(3) + '} else {\n |' + Spacer_instance.vr(4) + 'throw new IllegalStateException("Cannot match response with status: " + response.statusCode());\n |' + Spacer_instance.vr(3) + '}\n ');
|
|
787
788
|
} else {
|
|
788
|
-
var tmp_0 = Spacer_instance.
|
|
789
|
-
tmp = trimMargin('\n |' + tmp_0 + 'return switch (response.statusCode()) {\n |' + joinToString(statusResponses, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitFromResponse$lambda($this)) + '\n |' + Spacer_instance.
|
|
789
|
+
var tmp_0 = Spacer_instance.vr(3);
|
|
790
|
+
tmp = trimMargin('\n |' + tmp_0 + 'return switch (response.statusCode()) {\n |' + joinToString(statusResponses, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitFromResponse$lambda($this)) + '\n |' + Spacer_instance.vr(4) + 'default -> throw new IllegalStateException("Cannot match response with status: " + response.statusCode());\n |' + Spacer_instance.vr(3) + '};\n ');
|
|
790
791
|
}
|
|
791
792
|
return tmp;
|
|
792
793
|
}
|
|
@@ -797,17 +798,17 @@ function JavaEndpointDefinitionEmitter$emit$lambda(this$0) {
|
|
|
797
798
|
}
|
|
798
799
|
function JavaEndpointDefinitionEmitter$emit$lambda_0(this$0) {
|
|
799
800
|
return function (it) {
|
|
800
|
-
return this$0.
|
|
801
|
+
return this$0.aq(it);
|
|
801
802
|
};
|
|
802
803
|
}
|
|
803
804
|
function JavaEndpointDefinitionEmitter$emit$lambda_1(this$0) {
|
|
804
805
|
return function (it) {
|
|
805
|
-
return this$0.
|
|
806
|
+
return this$0.aq(it);
|
|
806
807
|
};
|
|
807
808
|
}
|
|
808
809
|
function JavaEndpointDefinitionEmitter$emit$lambda_2(this$0) {
|
|
809
810
|
return function (it) {
|
|
810
|
-
return this$0.
|
|
811
|
+
return this$0.w1v(it);
|
|
811
812
|
};
|
|
812
813
|
}
|
|
813
814
|
function JavaEndpointDefinitionEmitter$emit$lambda_3(this$0) {
|
|
@@ -825,27 +826,27 @@ function JavaEndpointDefinitionEmitter$emitConstructor$lambda(this$0) {
|
|
|
825
826
|
}
|
|
826
827
|
function JavaEndpointDefinitionEmitter$emitConstructor$lambda_0(this$0) {
|
|
827
828
|
return function (it) {
|
|
828
|
-
return this$0.
|
|
829
|
+
return this$0.aq(it);
|
|
829
830
|
};
|
|
830
831
|
}
|
|
831
832
|
function JavaEndpointDefinitionEmitter$emitConstructor$lambda_1(this$0) {
|
|
832
833
|
return function (it) {
|
|
833
|
-
return this$0.
|
|
834
|
+
return this$0.aq(it);
|
|
834
835
|
};
|
|
835
836
|
}
|
|
836
837
|
function JavaEndpointDefinitionEmitter$emitConstructor$lambda_2(this$0) {
|
|
837
838
|
return function (it) {
|
|
838
|
-
return this$0.
|
|
839
|
+
return this$0.br(it.pp_1);
|
|
839
840
|
};
|
|
840
841
|
}
|
|
841
842
|
function JavaEndpointDefinitionEmitter$emitConstructor$lambda_3(this$0) {
|
|
842
843
|
return function (it) {
|
|
843
|
-
return this$0.
|
|
844
|
+
return this$0.br(it.ep_1);
|
|
844
845
|
};
|
|
845
846
|
}
|
|
846
847
|
function JavaEndpointDefinitionEmitter$emitConstructor$lambda_4(this$0) {
|
|
847
848
|
return function (it) {
|
|
848
|
-
return this$0.
|
|
849
|
+
return this$0.br(it.ep_1);
|
|
849
850
|
};
|
|
850
851
|
}
|
|
851
852
|
function JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda(this$0) {
|
|
@@ -865,22 +866,22 @@ function JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_1(this$0) {
|
|
|
865
866
|
}
|
|
866
867
|
function JavaEndpointDefinitionEmitter$emit$lambda_5(this$0) {
|
|
867
868
|
return function (it) {
|
|
868
|
-
return this$0.
|
|
869
|
+
return this$0.aq(it);
|
|
869
870
|
};
|
|
870
871
|
}
|
|
871
872
|
function JavaEndpointDefinitionEmitter$emit$lambda_6(this$0) {
|
|
872
873
|
return function (it) {
|
|
873
|
-
return this$0.
|
|
874
|
+
return this$0.br(it.ep_1);
|
|
874
875
|
};
|
|
875
876
|
}
|
|
876
877
|
function JavaEndpointDefinitionEmitter$emit$lambda_7(this$0) {
|
|
877
878
|
return function (it) {
|
|
878
|
-
return this$0.
|
|
879
|
+
return this$0.aq(it);
|
|
879
880
|
};
|
|
880
881
|
}
|
|
881
882
|
function JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_2(this$0) {
|
|
882
883
|
return function (it) {
|
|
883
|
-
return Spacer_instance.
|
|
884
|
+
return Spacer_instance.vr(5) + 'serialization.<' + this$0.bq(it.fp_1) + '>deserializeParam(response.headers().entrySet().stream().filter(e -> e.getKey().equalsIgnoreCase("' + it.ep_1.l1() + '")).findFirst().map(java.util.Map.Entry::getValue).orElse(java.util.Collections.emptyList()), ' + emitGetType(this$0, it.fp_1) + ')';
|
|
884
885
|
};
|
|
885
886
|
}
|
|
886
887
|
function JavaEndpointDefinitionEmitter$emitSerialized$lambda(this$0) {
|
|
@@ -896,7 +897,7 @@ function JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda(this$0) {
|
|
|
896
897
|
return function (it) {
|
|
897
898
|
var tmp;
|
|
898
899
|
if (it instanceof Literal) {
|
|
899
|
-
tmp = '"' + it.
|
|
900
|
+
tmp = '"' + it.lq_1 + '"';
|
|
900
901
|
} else {
|
|
901
902
|
if (it instanceof Param) {
|
|
902
903
|
tmp = emitIdentifier(this$0, it);
|
|
@@ -919,7 +920,7 @@ function JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda_1(this$0) {
|
|
|
919
920
|
}
|
|
920
921
|
function JavaEndpointDefinitionEmitter$emitObject$lambda($block) {
|
|
921
922
|
return function (it) {
|
|
922
|
-
return Spacer_instance.
|
|
923
|
+
return Spacer_instance.vr(2) + $block(it);
|
|
923
924
|
};
|
|
924
925
|
}
|
|
925
926
|
function JavaEndpointDefinitionEmitter$emitResponseInterfaces$lambda(it) {
|
|
@@ -939,7 +940,7 @@ function sanitizeNegative($this, _this__u8e3s4) {
|
|
|
939
940
|
return startsWith(_this__u8e3s4, '-') ? '__' + substring(_this__u8e3s4, 1) : _this__u8e3s4;
|
|
940
941
|
}
|
|
941
942
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
942
|
-
return $this.
|
|
943
|
+
return $this.y1v($this.x1v(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_')));
|
|
943
944
|
}
|
|
944
945
|
function JavaEnumDefinitionEmitter$emit$lambda(this$0) {
|
|
945
946
|
return function (it) {
|
|
@@ -950,7 +951,7 @@ function JavaEnumDefinitionEmitter() {
|
|
|
950
951
|
}
|
|
951
952
|
function Companion() {
|
|
952
953
|
Companion_instance_2 = this;
|
|
953
|
-
this.
|
|
954
|
+
this.a1w_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']);
|
|
954
955
|
}
|
|
955
956
|
var Companion_instance_2;
|
|
956
957
|
function Companion_getInstance_0() {
|
|
@@ -974,7 +975,7 @@ function sanitizeSymbol_0($this, _this__u8e3s4) {
|
|
|
974
975
|
var item = _iterator__ex2g4s.v();
|
|
975
976
|
var _unary__edvuaz = index;
|
|
976
977
|
index = _unary__edvuaz + 1 | 0;
|
|
977
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.
|
|
978
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.sq(item) : item;
|
|
978
979
|
destination.x(tmp$ret$0);
|
|
979
980
|
}
|
|
980
981
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -1014,14 +1015,14 @@ function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
|
|
|
1014
1015
|
return tmp;
|
|
1015
1016
|
}
|
|
1016
1017
|
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
1017
|
-
return Companion_getInstance_1().
|
|
1018
|
+
return Companion_getInstance_1().b1w_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
|
|
1018
1019
|
}
|
|
1019
1020
|
function sanitizeEnum_0($this, _this__u8e3s4) {
|
|
1020
1021
|
return sanitizeKeywords_0($this, sanitizeFirstIsDigit_0($this, joinToString(split(_this__u8e3s4, ['-', ', ', '.', ' ', '//']), '_')));
|
|
1021
1022
|
}
|
|
1022
1023
|
function Companion_0() {
|
|
1023
1024
|
Companion_instance_3 = this;
|
|
1024
|
-
this.
|
|
1025
|
+
this.b1w_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']);
|
|
1025
1026
|
}
|
|
1026
1027
|
var Companion_instance_3;
|
|
1027
1028
|
function Companion_getInstance_1() {
|
|
@@ -1033,10 +1034,10 @@ function JavaIrEmitter$sanitizationConfig$lambda(it) {
|
|
|
1033
1034
|
return '_' + it;
|
|
1034
1035
|
}
|
|
1035
1036
|
function JavaIrEmitter$sanitizationConfig$lambda_0(name) {
|
|
1036
|
-
return name.
|
|
1037
|
+
return name.l1h_1.a1() > 1 ? new Name(listOf(name.x1l())) : name;
|
|
1037
1038
|
}
|
|
1038
1039
|
function JavaIrEmitter$sanitizationConfig$lambda_1(name) {
|
|
1039
|
-
return new Name(listOf(name.
|
|
1040
|
+
return new Name(listOf(name.x1l()));
|
|
1040
1041
|
}
|
|
1041
1042
|
function JavaIrEmitter$sanitizationConfig$lambda_2(this$0) {
|
|
1042
1043
|
return function (it) {
|
|
@@ -1047,23 +1048,23 @@ function JavaIrEmitter$sanitizationConfig$lambda_3(stmt, tr) {
|
|
|
1047
1048
|
var tmp;
|
|
1048
1049
|
var tmp_0;
|
|
1049
1050
|
if (stmt instanceof FunctionCall) {
|
|
1050
|
-
tmp_0 = stmt.
|
|
1051
|
+
tmp_0 = stmt.g1m_1.x1h() === 'validate';
|
|
1051
1052
|
} else {
|
|
1052
1053
|
tmp_0 = false;
|
|
1053
1054
|
}
|
|
1054
1055
|
if (tmp_0) {
|
|
1055
|
-
tmp = transformChildren(stmt.
|
|
1056
|
+
tmp = transformChildren(stmt.k1m(VOID, emptyList()), tr);
|
|
1056
1057
|
} else {
|
|
1057
1058
|
tmp = transformChildren(stmt, tr);
|
|
1058
1059
|
}
|
|
1059
1060
|
return tmp;
|
|
1060
1061
|
}
|
|
1061
1062
|
function JavaIrEmitter$emitShared$lambda(name) {
|
|
1062
|
-
switch (name.
|
|
1063
|
+
switch (name.x1h()) {
|
|
1063
1064
|
case 'client':
|
|
1064
|
-
return Companion_getInstance().
|
|
1065
|
+
return Companion_getInstance().k1h('getClient');
|
|
1065
1066
|
case 'server':
|
|
1066
|
-
return Companion_getInstance().
|
|
1067
|
+
return Companion_getInstance().k1h('getServer');
|
|
1067
1068
|
default:
|
|
1068
1069
|
return null;
|
|
1069
1070
|
}
|
|
@@ -1073,7 +1074,7 @@ function JavaIrEmitter$emitShared$lambda_0($imports) {
|
|
|
1073
1074
|
var tmp;
|
|
1074
1075
|
if (element instanceof File) {
|
|
1075
1076
|
// Inline function 'kotlin.collections.partition' call
|
|
1076
|
-
var this_0 = element.
|
|
1077
|
+
var this_0 = element.y1m_1;
|
|
1077
1078
|
var first = ArrayList_init_$Create$();
|
|
1078
1079
|
var second = ArrayList_init_$Create$();
|
|
1079
1080
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1086,9 +1087,9 @@ function JavaIrEmitter$emitShared$lambda_0($imports) {
|
|
|
1086
1087
|
}
|
|
1087
1088
|
}
|
|
1088
1089
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
1089
|
-
var packageElements = _destruct__k2r9zo.
|
|
1090
|
-
var rest = _destruct__k2r9zo.
|
|
1091
|
-
tmp = element.
|
|
1090
|
+
var packageElements = _destruct__k2r9zo.qe();
|
|
1091
|
+
var rest = _destruct__k2r9zo.re();
|
|
1092
|
+
tmp = element.b1n(VOID, plus_1(plus_1(packageElements, $imports), rest));
|
|
1092
1093
|
} else {
|
|
1093
1094
|
tmp = element;
|
|
1094
1095
|
}
|
|
@@ -1100,11 +1101,11 @@ function JavaIrEmitter$emitShared$lambda_1($clientServer) {
|
|
|
1100
1101
|
return function (element, transformer) {
|
|
1101
1102
|
var tmp;
|
|
1102
1103
|
if (element instanceof Namespace) {
|
|
1103
|
-
var injected = element.
|
|
1104
|
+
var injected = element.d1n_1.equals(Companion_getInstance().k1h('Wirespec')) ? $clientServer : emptyList();
|
|
1104
1105
|
var tmp_0;
|
|
1105
1106
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1106
1107
|
if (!injected.r()) {
|
|
1107
|
-
tmp_0 = withElements(element, plus_1(element.
|
|
1108
|
+
tmp_0 = withElements(element, plus_1(element.z1m(), injected));
|
|
1108
1109
|
} else {
|
|
1109
1110
|
tmp_0 = element;
|
|
1110
1111
|
}
|
|
@@ -1125,38 +1126,38 @@ function JavaIrEmitter$emit$lambda_0(it) {
|
|
|
1125
1126
|
return listOf(function_0('label', VOID, VOID, JavaIrEmitter$emit$lambda$lambda));
|
|
1126
1127
|
}
|
|
1127
1128
|
function JavaIrEmitter$emit$lambda$lambda($this$function) {
|
|
1128
|
-
$this$function.
|
|
1129
|
-
$this$function.
|
|
1129
|
+
$this$function.p1i(String_instance);
|
|
1130
|
+
$this$function.o1k(new VariableReference(Companion_getInstance().k1h('label')));
|
|
1130
1131
|
return Unit_instance;
|
|
1131
1132
|
}
|
|
1132
1133
|
function JavaIrEmitter(packageName, emitShared) {
|
|
1133
1134
|
Companion_getInstance_1();
|
|
1134
|
-
packageName = packageName === VOID ? Companion_instance.
|
|
1135
|
-
emitShared = emitShared === VOID ? Companion_instance_0.
|
|
1136
|
-
this.
|
|
1137
|
-
this.
|
|
1138
|
-
this.
|
|
1139
|
-
this.
|
|
1140
|
-
this.
|
|
1135
|
+
packageName = packageName === VOID ? Companion_instance.qr('community.flock.wirespec.generated') : packageName;
|
|
1136
|
+
emitShared = emitShared === VOID ? Companion_instance_0.ko() : emitShared;
|
|
1137
|
+
this.c1w_1 = packageName;
|
|
1138
|
+
this.d1w_1 = emitShared;
|
|
1139
|
+
this.e1w_1 = JavaGenerator_instance;
|
|
1140
|
+
this.f1w_1 = FileExtension_Java_getInstance();
|
|
1141
|
+
this.g1w_1 = listOf(import_0('community.flock.wirespec.java', 'Wirespec'));
|
|
1141
1142
|
var tmp = this;
|
|
1142
|
-
var tmp_0 = Companion_getInstance_1().
|
|
1143
|
+
var tmp_0 = Companion_getInstance_1().b1w_1;
|
|
1143
1144
|
var tmp_1 = JavaIrEmitter$sanitizationConfig$lambda;
|
|
1144
1145
|
var tmp_2 = JavaIrEmitter$sanitizationConfig$lambda_0;
|
|
1145
1146
|
var tmp_3 = JavaIrEmitter$sanitizationConfig$lambda_1;
|
|
1146
1147
|
var tmp_4 = JavaIrEmitter$sanitizationConfig$lambda_2(this);
|
|
1147
|
-
tmp.
|
|
1148
|
+
tmp.h1w_1 = new SanitizationConfig(tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, JavaIrEmitter$sanitizationConfig$lambda_3);
|
|
1148
1149
|
}
|
|
1149
|
-
protoOf(JavaIrEmitter).
|
|
1150
|
-
return this.
|
|
1150
|
+
protoOf(JavaIrEmitter).i1v = function () {
|
|
1151
|
+
return this.c1w_1;
|
|
1151
1152
|
};
|
|
1152
|
-
protoOf(JavaIrEmitter).
|
|
1153
|
-
return this.
|
|
1153
|
+
protoOf(JavaIrEmitter).p1u = function () {
|
|
1154
|
+
return this.e1w_1;
|
|
1154
1155
|
};
|
|
1155
|
-
protoOf(JavaIrEmitter).
|
|
1156
|
-
return this.
|
|
1156
|
+
protoOf(JavaIrEmitter).iq = function () {
|
|
1157
|
+
return this.f1w_1;
|
|
1157
1158
|
};
|
|
1158
|
-
protoOf(JavaIrEmitter).
|
|
1159
|
-
var packageName = Companion_instance.
|
|
1159
|
+
protoOf(JavaIrEmitter).s1u = function () {
|
|
1160
|
+
var packageName = Companion_instance.qr('community.flock.wirespec.java');
|
|
1160
1161
|
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
1162
|
// Inline function 'kotlin.collections.map' call
|
|
1162
1163
|
var this_0 = convertClientServer(packageName);
|
|
@@ -1175,66 +1176,66 @@ protoOf(JavaIrEmitter).m1u = function () {
|
|
|
1175
1176
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1176
1177
|
var tmp = scope;
|
|
1177
1178
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1178
|
-
var this_2 = scope.
|
|
1179
|
+
var this_2 = scope.c1u_1;
|
|
1179
1180
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1180
1181
|
// Inline function 'kotlin.apply' call
|
|
1181
1182
|
var this_3 = new TransformerBuilder();
|
|
1182
|
-
this_3.
|
|
1183
|
-
var tmp$ret$5 = this_3.
|
|
1184
|
-
tmp.
|
|
1183
|
+
this_3.h1h(JavaIrEmitter$emitShared$lambda_0(imports));
|
|
1184
|
+
var tmp$ret$5 = this_3.i1h();
|
|
1185
|
+
tmp.c1u_1 = transform(this_2, tmp$ret$5);
|
|
1185
1186
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1186
1187
|
var tmp_0 = scope;
|
|
1187
1188
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1188
1189
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1189
|
-
var this_4 = scope.
|
|
1190
|
+
var this_4 = scope.c1u_1;
|
|
1190
1191
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1191
1192
|
// Inline function 'kotlin.apply' call
|
|
1192
1193
|
var this_5 = new TransformerBuilder();
|
|
1193
|
-
this_5.
|
|
1194
|
-
var tmp$ret$10 = this_5.
|
|
1195
|
-
tmp_0.
|
|
1196
|
-
var tmp_1 = scope.
|
|
1194
|
+
this_5.h1h(JavaIrEmitter$emitShared$lambda_1(clientServer));
|
|
1195
|
+
var tmp$ret$10 = this_5.i1h();
|
|
1196
|
+
tmp_0.c1u_1 = transform(this_4, tmp$ret$10);
|
|
1197
|
+
var tmp_1 = scope.c1u_1;
|
|
1197
1198
|
var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1198
1199
|
var tmp_2;
|
|
1199
|
-
if (this.
|
|
1200
|
+
if (this.d1w_1.lo_1) {
|
|
1200
1201
|
tmp_2 = wirespecShared;
|
|
1201
1202
|
} else {
|
|
1202
1203
|
tmp_2 = null;
|
|
1203
1204
|
}
|
|
1204
1205
|
return tmp_2;
|
|
1205
1206
|
};
|
|
1206
|
-
protoOf(JavaIrEmitter).
|
|
1207
|
+
protoOf(JavaIrEmitter).zq = function (definition, module_0, logger) {
|
|
1207
1208
|
var file = emit_0.call(this, definition, module_0, logger);
|
|
1208
|
-
var tmp = file.
|
|
1209
|
+
var tmp = file.b1n(Companion_getInstance().k1h(sanitizeSymbol_0(this, file.x1m_1.m1h())));
|
|
1209
1210
|
// Inline function 'kotlin.takeIf' call
|
|
1210
|
-
var this_0 = this.
|
|
1211
|
+
var this_0 = this.g1w_1;
|
|
1211
1212
|
var tmp_0;
|
|
1212
|
-
if (Companion_instance_1.
|
|
1213
|
+
if (Companion_instance_1.vq(module_0)) {
|
|
1213
1214
|
tmp_0 = this_0;
|
|
1214
1215
|
} else {
|
|
1215
1216
|
tmp_0 = null;
|
|
1216
1217
|
}
|
|
1217
1218
|
var tmp$ret$1 = tmp_0;
|
|
1218
|
-
return placeInPackage(prependImports(tmp, tmp$ret$1), this.
|
|
1219
|
+
return placeInPackage(prependImports(tmp, tmp$ret$1), this.i1v(), definition);
|
|
1219
1220
|
};
|
|
1220
|
-
protoOf(JavaIrEmitter).
|
|
1221
|
-
return sanitizeNames(convertWithValidation(type, module_0), this.
|
|
1221
|
+
protoOf(JavaIrEmitter).yp = function (type, module_0) {
|
|
1222
|
+
return sanitizeNames(convertWithValidation(type, module_0), this.h1w_1);
|
|
1222
1223
|
};
|
|
1223
|
-
protoOf(JavaIrEmitter).
|
|
1224
|
+
protoOf(JavaIrEmitter).nr = function (enum_0, module_0) {
|
|
1224
1225
|
var tmp = convert_0(enum_0);
|
|
1225
1226
|
var tmp_0 = JavaIrEmitter$emit$lambda(this);
|
|
1226
|
-
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaIrEmitter$emit$lambda_0), this.
|
|
1227
|
+
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaIrEmitter$emit$lambda_0), this.h1w_1);
|
|
1227
1228
|
};
|
|
1228
|
-
protoOf(JavaIrEmitter).
|
|
1229
|
-
return sanitizeNames(convert_1(union), this.
|
|
1229
|
+
protoOf(JavaIrEmitter).dr = function (union) {
|
|
1230
|
+
return sanitizeNames(convert_1(union), this.h1w_1);
|
|
1230
1231
|
};
|
|
1231
|
-
protoOf(JavaIrEmitter).
|
|
1232
|
-
return sanitizeNames(applyRefinedStructShape(convert_2(refined), refined), this.
|
|
1232
|
+
protoOf(JavaIrEmitter).ir = function (refined) {
|
|
1233
|
+
return sanitizeNames(applyRefinedStructShape(convert_2(refined), refined), this.h1w_1);
|
|
1233
1234
|
};
|
|
1234
|
-
protoOf(JavaIrEmitter).
|
|
1235
|
-
var tmp = sanitizeNames(transformTypeDescriptors(injectHandleFunction(convert_3(endpoint), endpoint)), this.
|
|
1235
|
+
protoOf(JavaIrEmitter).or = function (endpoint) {
|
|
1236
|
+
var tmp = sanitizeNames(transformTypeDescriptors(injectHandleFunction(convert_3(endpoint), endpoint)), this.h1w_1);
|
|
1236
1237
|
// Inline function 'kotlin.takeIf' call
|
|
1237
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
1238
|
+
var this_0 = buildModelImports(endpoint, this.i1v());
|
|
1238
1239
|
var tmp_0;
|
|
1239
1240
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1240
1241
|
if (!this_0.r()) {
|
|
@@ -1245,25 +1246,25 @@ protoOf(JavaIrEmitter).jr = function (endpoint) {
|
|
|
1245
1246
|
var tmp$ret$2 = tmp_0;
|
|
1246
1247
|
return prependImports(tmp, tmp$ret$2);
|
|
1247
1248
|
};
|
|
1248
|
-
protoOf(JavaIrEmitter).
|
|
1249
|
+
protoOf(JavaIrEmitter).cr = function (channel) {
|
|
1249
1250
|
var tmp;
|
|
1250
|
-
if (channel.
|
|
1251
|
-
tmp = this.
|
|
1251
|
+
if (channel.qo_1.l1() === channel.ro_1.l1()) {
|
|
1252
|
+
tmp = this.i1v().rr_1 + '.model.';
|
|
1252
1253
|
} else {
|
|
1253
1254
|
tmp = '';
|
|
1254
1255
|
}
|
|
1255
1256
|
var fullyQualifiedPrefix = tmp;
|
|
1256
|
-
return applyFunctionalInterface(sanitizeNames(convert_4(channel), this.
|
|
1257
|
+
return applyFunctionalInterface(sanitizeNames(convert_4(channel), this.h1w_1), fullyQualifiedPrefix);
|
|
1257
1258
|
};
|
|
1258
|
-
protoOf(JavaIrEmitter).
|
|
1259
|
-
var imports = buildModelImports(endpoint, this.
|
|
1260
|
-
var endpointImport = import_0(this.
|
|
1261
|
-
var endpointName = endpoint.
|
|
1262
|
-
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.
|
|
1263
|
-
var subPackageName = plus_0(this.
|
|
1264
|
-
return new File(Companion_getInstance().
|
|
1259
|
+
protoOf(JavaIrEmitter).u1u = function (endpoint) {
|
|
1260
|
+
var imports = buildModelImports(endpoint, this.i1v());
|
|
1261
|
+
var endpointImport = import_0(this.i1v().rr_1 + '.endpoint', endpoint.ip_1.l1());
|
|
1262
|
+
var endpointName = endpoint.ip_1.l1();
|
|
1263
|
+
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.h1w_1)), endpointName);
|
|
1264
|
+
var subPackageName = plus_0(this.i1v(), 'client');
|
|
1265
|
+
return new File(Companion_getInstance().k1h(subPackageName.tr() + sanitizeSymbol_0(this, file.x1m_1.m1h())), plus_1(plus_1(plus_1(plus_1(listOf(new Package(subPackageName.rr_1)), this.g1w_1), imports), listOf(endpointImport)), file.y1m_1));
|
|
1265
1266
|
};
|
|
1266
|
-
protoOf(JavaIrEmitter).
|
|
1267
|
+
protoOf(JavaIrEmitter).t1u = function (endpoints, logger) {
|
|
1267
1268
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1268
1269
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1269
1270
|
var destination = ArrayList_init_$Create$();
|
|
@@ -1279,7 +1280,7 @@ protoOf(JavaIrEmitter).n1u = function (endpoints, logger) {
|
|
|
1279
1280
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1280
1281
|
while (_iterator__ex2g4s_0.u()) {
|
|
1281
1282
|
var e = _iterator__ex2g4s_0.v();
|
|
1282
|
-
var key = e.
|
|
1283
|
+
var key = e.pu_1;
|
|
1283
1284
|
if (set.x(key)) {
|
|
1284
1285
|
list_0.x(e);
|
|
1285
1286
|
}
|
|
@@ -1306,7 +1307,7 @@ protoOf(JavaIrEmitter).n1u = function (endpoints, logger) {
|
|
|
1306
1307
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1307
1308
|
while (_iterator__ex2g4s_2.u()) {
|
|
1308
1309
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1309
|
-
if (element_1.
|
|
1310
|
+
if (element_1.ip_1.l1() === element_0.pu_1) {
|
|
1310
1311
|
tmp$ret$5 = false;
|
|
1311
1312
|
break $l$block_0;
|
|
1312
1313
|
}
|
|
@@ -1323,7 +1324,7 @@ protoOf(JavaIrEmitter).n1u = function (endpoints, logger) {
|
|
|
1323
1324
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1324
1325
|
while (_iterator__ex2g4s_3.u()) {
|
|
1325
1326
|
var item = _iterator__ex2g4s_3.v();
|
|
1326
|
-
var tmp$ret$10 = import_0(this.
|
|
1327
|
+
var tmp$ret$10 = import_0(this.i1v().rr_1 + '.model', item.pu_1);
|
|
1327
1328
|
destination_1.x(tmp$ret$10);
|
|
1328
1329
|
}
|
|
1329
1330
|
var imports = destination_1;
|
|
@@ -1333,7 +1334,7 @@ protoOf(JavaIrEmitter).n1u = function (endpoints, logger) {
|
|
|
1333
1334
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1334
1335
|
while (_iterator__ex2g4s_4.u()) {
|
|
1335
1336
|
var item_0 = _iterator__ex2g4s_4.v();
|
|
1336
|
-
var tmp$ret$13 = import_0(this.
|
|
1337
|
+
var tmp$ret$13 = import_0(this.i1v().rr_1 + '.endpoint', item_0.ip_1.l1());
|
|
1337
1338
|
destination_2.x(tmp$ret$13);
|
|
1338
1339
|
}
|
|
1339
1340
|
var endpointImports = destination_2;
|
|
@@ -1343,19 +1344,19 @@ protoOf(JavaIrEmitter).n1u = function (endpoints, logger) {
|
|
|
1343
1344
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1344
1345
|
while (_iterator__ex2g4s_5.u()) {
|
|
1345
1346
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
1346
|
-
var tmp$ret$16 = import_0(this.
|
|
1347
|
+
var tmp$ret$16 = import_0(this.i1v().rr_1 + '.client', item_1.ip_1.l1() + 'Client');
|
|
1347
1348
|
destination_3.x(tmp$ret$16);
|
|
1348
1349
|
}
|
|
1349
1350
|
var clientImports = destination_3;
|
|
1350
1351
|
var allImports = plus_1(plus_1(imports, endpointImports), clientImports);
|
|
1351
|
-
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.
|
|
1352
|
-
return new File(Companion_getInstance().
|
|
1352
|
+
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.h1w_1);
|
|
1353
|
+
return new File(Companion_getInstance().k1h(this.i1v().tr() + sanitizeSymbol_0(this, file.x1m_1.m1h())), plus_1(plus_1(plus_1(listOf(new Package(this.i1v().rr_1)), this.g1w_1), allImports), file.y1m_1));
|
|
1353
1354
|
};
|
|
1354
1355
|
function transformTypeDescriptors(_this__u8e3s4) {
|
|
1355
1356
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1356
1357
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1357
|
-
scope.
|
|
1358
|
-
var tmp = scope.
|
|
1358
|
+
scope.l1u(transformTypeDescriptors$lambda);
|
|
1359
|
+
var tmp = scope.c1u_1;
|
|
1359
1360
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1360
1361
|
}
|
|
1361
1362
|
function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
@@ -1364,14 +1365,14 @@ function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
|
1364
1365
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1365
1366
|
var tmp = scope;
|
|
1366
1367
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1367
|
-
var this_0 = scope.
|
|
1368
|
+
var this_0 = scope.c1u_1;
|
|
1368
1369
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1369
1370
|
// Inline function 'kotlin.apply' call
|
|
1370
1371
|
var this_1 = new TransformerBuilder();
|
|
1371
|
-
this_1.
|
|
1372
|
-
var tmp$ret$2 = this_1.
|
|
1373
|
-
tmp.
|
|
1374
|
-
var tmp_0 = scope.
|
|
1372
|
+
this_1.h1h(applyRefinedStructShape$lambda(refined));
|
|
1373
|
+
var tmp$ret$2 = this_1.i1h();
|
|
1374
|
+
tmp.c1u_1 = transform(this_0, tmp$ret$2);
|
|
1375
|
+
var tmp_0 = scope.c1u_1;
|
|
1375
1376
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1376
1377
|
}
|
|
1377
1378
|
function injectHandleFunction(_this__u8e3s4, endpoint) {
|
|
@@ -1381,14 +1382,14 @@ function injectHandleFunction(_this__u8e3s4, endpoint) {
|
|
|
1381
1382
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1382
1383
|
var tmp = scope;
|
|
1383
1384
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1384
|
-
var this_0 = scope.
|
|
1385
|
+
var this_0 = scope.c1u_1;
|
|
1385
1386
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1386
1387
|
// Inline function 'kotlin.apply' call
|
|
1387
1388
|
var this_1 = new TransformerBuilder();
|
|
1388
|
-
this_1.
|
|
1389
|
-
var tmp$ret$2 = this_1.
|
|
1390
|
-
tmp.
|
|
1391
|
-
var tmp_0 = scope.
|
|
1389
|
+
this_1.h1h(injectHandleFunction$lambda(handlersStruct));
|
|
1390
|
+
var tmp$ret$2 = this_1.i1h();
|
|
1391
|
+
tmp.c1u_1 = transform(this_0, tmp$ret$2);
|
|
1392
|
+
var tmp_0 = scope.c1u_1;
|
|
1392
1393
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1393
1394
|
}
|
|
1394
1395
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
@@ -1399,7 +1400,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
1399
1400
|
var _iterator__ex2g4s = tmp0.t();
|
|
1400
1401
|
while (_iterator__ex2g4s.u()) {
|
|
1401
1402
|
var element = _iterator__ex2g4s.v();
|
|
1402
|
-
if (!(_this__u8e3s4.
|
|
1403
|
+
if (!(_this__u8e3s4.ar().l1() === element.pu_1)) {
|
|
1403
1404
|
destination.x(element);
|
|
1404
1405
|
}
|
|
1405
1406
|
}
|
|
@@ -1409,7 +1410,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
1409
1410
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1410
1411
|
while (_iterator__ex2g4s_0.u()) {
|
|
1411
1412
|
var item = _iterator__ex2g4s_0.v();
|
|
1412
|
-
var tmp$ret$3 = import_0(packageName.
|
|
1413
|
+
var tmp$ret$3 = import_0(packageName.rr_1 + '.model', Companion_getInstance().k1h(item.pu_1).m1h());
|
|
1413
1414
|
destination_0.x(tmp$ret$3);
|
|
1414
1415
|
}
|
|
1415
1416
|
return destination_0;
|
|
@@ -1420,24 +1421,24 @@ function applyFunctionalInterface(_this__u8e3s4, fullyQualifiedPrefix) {
|
|
|
1420
1421
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1421
1422
|
var tmp = scope;
|
|
1422
1423
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1423
|
-
var this_0 = scope.
|
|
1424
|
+
var this_0 = scope.c1u_1;
|
|
1424
1425
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1425
1426
|
// Inline function 'kotlin.apply' call
|
|
1426
1427
|
var this_1 = new TransformerBuilder();
|
|
1427
|
-
this_1.
|
|
1428
|
-
var tmp$ret$2 = this_1.
|
|
1429
|
-
tmp.
|
|
1428
|
+
this_1.h1h(applyFunctionalInterface$lambda(fullyQualifiedPrefix));
|
|
1429
|
+
var tmp$ret$2 = this_1.i1h();
|
|
1430
|
+
tmp.c1u_1 = transform(this_0, tmp$ret$2);
|
|
1430
1431
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1431
1432
|
var tmp_0 = scope;
|
|
1432
1433
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1433
|
-
var this_2 = scope.
|
|
1434
|
+
var this_2 = scope.c1u_1;
|
|
1434
1435
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1435
1436
|
// Inline function 'kotlin.apply' call
|
|
1436
1437
|
var this_3 = new TransformerBuilder();
|
|
1437
|
-
this_3.
|
|
1438
|
-
var tmp$ret$7 = this_3.
|
|
1439
|
-
tmp_0.
|
|
1440
|
-
var tmp_1 = scope.
|
|
1438
|
+
this_3.h1h(applyFunctionalInterface$lambda_0);
|
|
1439
|
+
var tmp$ret$7 = this_3.i1h();
|
|
1440
|
+
tmp_0.c1u_1 = transform(this_2, tmp$ret$7);
|
|
1441
|
+
var tmp_1 = scope.c1u_1;
|
|
1441
1442
|
return isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1442
1443
|
}
|
|
1443
1444
|
function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
@@ -1446,26 +1447,26 @@ function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
|
1446
1447
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1447
1448
|
var tmp = scope;
|
|
1448
1449
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1449
|
-
var this_0 = scope.
|
|
1450
|
+
var this_0 = scope.c1u_1;
|
|
1450
1451
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1451
1452
|
// Inline function 'kotlin.apply' call
|
|
1452
1453
|
var this_1 = new TransformerBuilder();
|
|
1453
|
-
this_1.
|
|
1454
|
-
var tmp$ret$2 = this_1.
|
|
1455
|
-
tmp.
|
|
1456
|
-
var tmp_0 = scope.
|
|
1454
|
+
this_1.h1h(wrapAsyncReturnInThenApply$lambda(endpointName));
|
|
1455
|
+
var tmp$ret$2 = this_1.i1h();
|
|
1456
|
+
tmp.c1u_1 = transform(this_0, tmp$ret$2);
|
|
1457
|
+
var tmp_0 = scope.c1u_1;
|
|
1457
1458
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1458
1459
|
}
|
|
1459
1460
|
function findRoot(_this__u8e3s4) {
|
|
1460
1461
|
var tmp;
|
|
1461
1462
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
1462
|
-
tmp = findRoot(_this__u8e3s4.
|
|
1463
|
+
tmp = findRoot(_this__u8e3s4.t1h_1);
|
|
1463
1464
|
} else {
|
|
1464
1465
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
1465
|
-
tmp = findRoot(_this__u8e3s4.
|
|
1466
|
+
tmp = findRoot(_this__u8e3s4.u1h_1);
|
|
1466
1467
|
} else {
|
|
1467
1468
|
if (_this__u8e3s4 instanceof Dict_0) {
|
|
1468
|
-
tmp = findRoot(_this__u8e3s4.
|
|
1469
|
+
tmp = findRoot(_this__u8e3s4.p1m_1);
|
|
1469
1470
|
} else {
|
|
1470
1471
|
tmp = _this__u8e3s4;
|
|
1471
1472
|
}
|
|
@@ -1494,7 +1495,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
1494
1495
|
var tmp;
|
|
1495
1496
|
if (_this__u8e3s4 instanceof Integer_0) {
|
|
1496
1497
|
var tmp_0;
|
|
1497
|
-
switch (_this__u8e3s4.
|
|
1498
|
+
switch (_this__u8e3s4.l1m_1.b3_1) {
|
|
1498
1499
|
case 0:
|
|
1499
1500
|
tmp_0 = 'Integer';
|
|
1500
1501
|
break;
|
|
@@ -1509,7 +1510,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
1509
1510
|
} else {
|
|
1510
1511
|
if (_this__u8e3s4 instanceof Number_1) {
|
|
1511
1512
|
var tmp_1;
|
|
1512
|
-
switch (_this__u8e3s4.
|
|
1513
|
+
switch (_this__u8e3s4.m1m_1.b3_1) {
|
|
1513
1514
|
case 0:
|
|
1514
1515
|
tmp_1 = 'Float';
|
|
1515
1516
|
break;
|
|
@@ -1538,7 +1539,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
1538
1539
|
tmp = 'Void';
|
|
1539
1540
|
} else {
|
|
1540
1541
|
if (_this__u8e3s4 instanceof Custom_0) {
|
|
1541
|
-
tmp = _this__u8e3s4.
|
|
1542
|
+
tmp = _this__u8e3s4.v1h_1.m1h();
|
|
1542
1543
|
} else {
|
|
1543
1544
|
tmp = 'Object';
|
|
1544
1545
|
}
|
|
@@ -1552,7 +1553,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
1552
1553
|
return tmp;
|
|
1553
1554
|
}
|
|
1554
1555
|
function buildHandlersStruct(_this__u8e3s4) {
|
|
1555
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
1556
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.kp_1, '/', VOID, VOID, VOID, VOID, buildHandlersStruct$lambda);
|
|
1556
1557
|
return struct('Handlers', buildHandlersStruct$lambda_0(pathTemplate, _this__u8e3s4));
|
|
1557
1558
|
}
|
|
1558
1559
|
function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
@@ -1562,8 +1563,8 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
1562
1563
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1563
1564
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1564
1565
|
var tmp_0 = withFullyQualifiedPrefix$lambda;
|
|
1565
|
-
scope.
|
|
1566
|
-
var tmp_1 = scope.
|
|
1566
|
+
scope.f1u(tmp_0, withFullyQualifiedPrefix$lambda_0(prefix));
|
|
1567
|
+
var tmp_1 = scope.c1u_1;
|
|
1567
1568
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1568
1569
|
} else {
|
|
1569
1570
|
tmp = _this__u8e3s4;
|
|
@@ -1573,8 +1574,8 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
1573
1574
|
function transformTypeDescriptors$lambda(stmt, tr) {
|
|
1574
1575
|
var tmp;
|
|
1575
1576
|
if (stmt instanceof TypeDescriptor) {
|
|
1576
|
-
var rootType = findRoot(stmt.
|
|
1577
|
-
var containerStr = rawContainerClass(stmt.
|
|
1577
|
+
var rootType = findRoot(stmt.m1o_1);
|
|
1578
|
+
var containerStr = rawContainerClass(stmt.m1o_1);
|
|
1578
1579
|
var rootStr = toJavaName(rootType) + '.class';
|
|
1579
1580
|
var tmp_0;
|
|
1580
1581
|
if (containerStr == null) {
|
|
@@ -1593,8 +1594,8 @@ function transformTypeDescriptors$lambda(stmt, tr) {
|
|
|
1593
1594
|
}
|
|
1594
1595
|
function applyRefinedStructShape$lambda$lambda($refined) {
|
|
1595
1596
|
return function ($this$function) {
|
|
1596
|
-
$this$function.
|
|
1597
|
-
$this$function.
|
|
1597
|
+
$this$function.p1i(convert_5($refined.hr_1));
|
|
1598
|
+
$this$function.o1k(new VariableReference(Companion_getInstance().k1h('value')));
|
|
1598
1599
|
return Unit_instance;
|
|
1599
1600
|
};
|
|
1600
1601
|
}
|
|
@@ -1602,20 +1603,20 @@ function applyRefinedStructShape$lambda($refined) {
|
|
|
1602
1603
|
return function (element, transformer) {
|
|
1603
1604
|
var tmp;
|
|
1604
1605
|
if (element instanceof Struct) {
|
|
1605
|
-
var tmp_0 = listOf(
|
|
1606
|
+
var tmp_0 = listOf(Custom_init_$Create$('Wirespec.Refined'));
|
|
1606
1607
|
// Inline function 'kotlin.collections.map' call
|
|
1607
|
-
var this_0 = element.
|
|
1608
|
+
var this_0 = element.m1n_1;
|
|
1608
1609
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1609
1610
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1610
1611
|
var _iterator__ex2g4s = this_0.t();
|
|
1611
1612
|
while (_iterator__ex2g4s.u()) {
|
|
1612
1613
|
var item = _iterator__ex2g4s.v();
|
|
1613
1614
|
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
1614
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1615
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g1k(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
|
|
1615
1616
|
var tmp$ret$0 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
1616
1617
|
destination.x(tmp$ret$0);
|
|
1617
1618
|
}
|
|
1618
|
-
var tmp_1 = element.
|
|
1619
|
+
var tmp_1 = element.o1n(VOID, VOID, VOID, tmp_0, destination);
|
|
1619
1620
|
tmp = plus_3(tmp_1, function_0('value', VOID, true, applyRefinedStructShape$lambda$lambda($refined)));
|
|
1620
1621
|
} else {
|
|
1621
1622
|
tmp = element;
|
|
@@ -1632,7 +1633,7 @@ function injectHandleFunction$lambda$lambda($handlersStruct) {
|
|
|
1632
1633
|
var tmp_0;
|
|
1633
1634
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1634
1635
|
if (!injected.r()) {
|
|
1635
|
-
tmp_0 = withElements(element, plus_1(element.
|
|
1636
|
+
tmp_0 = withElements(element, plus_1(element.z1m(), injected));
|
|
1636
1637
|
} else {
|
|
1637
1638
|
tmp_0 = element;
|
|
1638
1639
|
}
|
|
@@ -1649,21 +1650,21 @@ function injectHandleFunction$lambda($handlersStruct) {
|
|
|
1649
1650
|
var tmp;
|
|
1650
1651
|
if (element instanceof Interface) {
|
|
1651
1652
|
var tmp_0;
|
|
1652
|
-
if (element.
|
|
1653
|
+
if (element.p1n_1.equals(Companion_getInstance().k1h('Handler'))) {
|
|
1653
1654
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1654
1655
|
var scope = new TransformScope(element);
|
|
1655
1656
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1656
1657
|
var tmp_1 = scope;
|
|
1657
1658
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1658
1659
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1659
|
-
var this_0 = scope.
|
|
1660
|
+
var this_0 = scope.c1u_1;
|
|
1660
1661
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1661
1662
|
// Inline function 'kotlin.apply' call
|
|
1662
1663
|
var this_1 = new TransformerBuilder();
|
|
1663
|
-
this_1.
|
|
1664
|
-
var tmp$ret$2 = this_1.
|
|
1665
|
-
tmp_1.
|
|
1666
|
-
var tmp_2 = scope.
|
|
1664
|
+
this_1.h1h(injectHandleFunction$lambda$lambda($handlersStruct));
|
|
1665
|
+
var tmp$ret$2 = this_1.i1h();
|
|
1666
|
+
tmp_1.c1u_1 = transform(this_0, tmp$ret$2);
|
|
1667
|
+
var tmp_2 = scope.c1u_1;
|
|
1667
1668
|
tmp_0 = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
1668
1669
|
} else {
|
|
1669
1670
|
tmp_0 = element;
|
|
@@ -1693,7 +1694,7 @@ function applyFunctionalInterface$lambda_0(element, transformer) {
|
|
|
1693
1694
|
if (element instanceof File) {
|
|
1694
1695
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1695
1696
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1696
|
-
var tmp0 = element.
|
|
1697
|
+
var tmp0 = element.z1m();
|
|
1697
1698
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1698
1699
|
var destination = ArrayList_init_$Create$();
|
|
1699
1700
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -1705,7 +1706,7 @@ function applyFunctionalInterface$lambda_0(element, transformer) {
|
|
|
1705
1706
|
}
|
|
1706
1707
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1707
1708
|
var interfaceElement = ensureNotNull(tmp$ret$2);
|
|
1708
|
-
tmp = element.
|
|
1709
|
+
tmp = element.b1n(VOID, listOf_0([new RawElement('@FunctionalInterface\n'), interfaceElement]));
|
|
1709
1710
|
} else {
|
|
1710
1711
|
tmp = element;
|
|
1711
1712
|
}
|
|
@@ -1718,11 +1719,11 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1718
1719
|
if (element instanceof Function) {
|
|
1719
1720
|
var tmp$ret$0;
|
|
1720
1721
|
$l$block_1: {
|
|
1721
|
-
if (!element.
|
|
1722
|
+
if (!element.d1k_1 || element.c1k_1.a1() < 2) {
|
|
1722
1723
|
tmp$ret$0 = element;
|
|
1723
1724
|
break $l$block_1;
|
|
1724
1725
|
}
|
|
1725
|
-
var tmp_0 = element.
|
|
1726
|
+
var tmp_0 = element.c1k_1.b1(element.c1k_1.a1() - 2 | 0);
|
|
1726
1727
|
var tmp0_elvis_lhs = tmp_0 instanceof Assignment ? tmp_0 : null;
|
|
1727
1728
|
var tmp_1;
|
|
1728
1729
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -1732,16 +1733,16 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1732
1733
|
tmp_1 = tmp0_elvis_lhs;
|
|
1733
1734
|
}
|
|
1734
1735
|
var transportAssign = tmp_1;
|
|
1735
|
-
var tmp_2 = last(element.
|
|
1736
|
+
var tmp_2 = last(element.c1k_1);
|
|
1736
1737
|
if (!(tmp_2 instanceof ReturnStatement)) {
|
|
1737
1738
|
tmp$ret$0 = element;
|
|
1738
1739
|
break $l$block_1;
|
|
1739
1740
|
}
|
|
1740
|
-
var tmp_3 = dropLast(element.
|
|
1741
|
-
var tmp1_name = Companion_getInstance().
|
|
1742
|
-
var tmp2_receiver = transportAssign.
|
|
1743
|
-
var tmp3_arguments = mapOf(to(Companion_getInstance().
|
|
1744
|
-
tmp$ret$0 = element.
|
|
1741
|
+
var tmp_3 = dropLast(element.c1k_1, 2);
|
|
1742
|
+
var tmp1_name = Companion_getInstance().k1h('thenApply');
|
|
1743
|
+
var tmp2_receiver = transportAssign.p1o_1;
|
|
1744
|
+
var tmp3_arguments = mapOf(to(Companion_getInstance().k1h('mapper'), new RawExpression('rawResponse -> ' + $endpointName + '.fromRawResponse(serialization(), rawResponse)')));
|
|
1745
|
+
tmp$ret$0 = element.g1k(VOID, VOID, VOID, VOID, plus_2(tmp_3, new ReturnStatement(new FunctionCall(tmp2_receiver, VOID, tmp1_name, tmp3_arguments))));
|
|
1745
1746
|
}
|
|
1746
1747
|
tmp = tmp$ret$0;
|
|
1747
1748
|
} else {
|
|
@@ -1754,10 +1755,10 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1754
1755
|
function buildHandlersStruct$lambda(it) {
|
|
1755
1756
|
var tmp;
|
|
1756
1757
|
if (it instanceof Literal) {
|
|
1757
|
-
tmp = it.
|
|
1758
|
+
tmp = it.lq_1;
|
|
1758
1759
|
} else {
|
|
1759
1760
|
if (it instanceof Param) {
|
|
1760
|
-
tmp = '{' + it.
|
|
1761
|
+
tmp = '{' + it.pp_1.l1() + '}';
|
|
1761
1762
|
} else {
|
|
1762
1763
|
noWhenBranchMatchedException();
|
|
1763
1764
|
}
|
|
@@ -1766,50 +1767,50 @@ function buildHandlersStruct$lambda(it) {
|
|
|
1766
1767
|
}
|
|
1767
1768
|
function buildHandlersStruct$lambda$lambda($pathTemplate) {
|
|
1768
1769
|
return function ($this$function) {
|
|
1769
|
-
$this$function.
|
|
1770
|
-
$this$function.
|
|
1770
|
+
$this$function.p1i(String_instance);
|
|
1771
|
+
$this$function.o1k($this$function.f1t($pathTemplate));
|
|
1771
1772
|
return Unit_instance;
|
|
1772
1773
|
};
|
|
1773
1774
|
}
|
|
1774
1775
|
function buildHandlersStruct$lambda$lambda_0($this_buildHandlersStruct) {
|
|
1775
1776
|
return function ($this$function) {
|
|
1776
|
-
$this$function.
|
|
1777
|
-
$this$function.
|
|
1777
|
+
$this$function.p1i(String_instance);
|
|
1778
|
+
$this$function.o1k($this$function.f1t($this_buildHandlersStruct.jp_1.a3_1));
|
|
1778
1779
|
return Unit_instance;
|
|
1779
1780
|
};
|
|
1780
1781
|
}
|
|
1781
1782
|
function buildHandlersStruct$lambda$lambda_1($this$function) {
|
|
1782
|
-
$this$function.
|
|
1783
|
-
$this$function.
|
|
1784
|
-
$this$function.
|
|
1783
|
+
$this$function.p1i($this$function.y1h('Wirespec.ServerEdge', [$this$function.y1h('Request', []), $this$function.y1h('Response', [Wildcard_instance])]));
|
|
1784
|
+
$this$function.q1i('serialization', $this$function.y1h('Wirespec.Serialization', []));
|
|
1785
|
+
$this$function.o1k(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
1786
|
return Unit_instance;
|
|
1786
1787
|
}
|
|
1787
1788
|
function buildHandlersStruct$lambda$lambda_2($this$function) {
|
|
1788
|
-
$this$function.
|
|
1789
|
-
$this$function.
|
|
1790
|
-
$this$function.
|
|
1789
|
+
$this$function.p1i($this$function.y1h('Wirespec.ClientEdge', [$this$function.y1h('Request', []), $this$function.y1h('Response', [Wildcard_instance])]));
|
|
1790
|
+
$this$function.q1i('serialization', $this$function.y1h('Wirespec.Serialization', []));
|
|
1791
|
+
$this$function.o1k(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
1792
|
return Unit_instance;
|
|
1792
1793
|
}
|
|
1793
1794
|
function buildHandlersStruct$lambda_0($pathTemplate, $this_buildHandlersStruct) {
|
|
1794
1795
|
return function ($this$struct) {
|
|
1795
|
-
$this$struct.
|
|
1796
|
-
$this$struct.
|
|
1797
|
-
$this$struct.
|
|
1798
|
-
$this$struct.
|
|
1799
|
-
$this$struct.
|
|
1800
|
-
$this$struct.
|
|
1796
|
+
$this$struct.p1k($this$struct.y1h('Wirespec.Server', [$this$struct.y1h('Request', []), $this$struct.y1h('Response', [Wildcard_instance])]));
|
|
1797
|
+
$this$struct.p1k($this$struct.y1h('Wirespec.Client', [$this$struct.y1h('Request', []), $this$struct.y1h('Response', [Wildcard_instance])]));
|
|
1798
|
+
$this$struct.g1i('getPathTemplate', VOID, true, buildHandlersStruct$lambda$lambda($pathTemplate));
|
|
1799
|
+
$this$struct.g1i('getMethod', VOID, true, buildHandlersStruct$lambda$lambda_0($this_buildHandlersStruct));
|
|
1800
|
+
$this$struct.g1i('getServer', VOID, true, buildHandlersStruct$lambda$lambda_1);
|
|
1801
|
+
$this$struct.g1i('getClient', VOID, true, buildHandlersStruct$lambda$lambda_2);
|
|
1801
1802
|
return Unit_instance;
|
|
1802
1803
|
};
|
|
1803
1804
|
}
|
|
1804
1805
|
function withFullyQualifiedPrefix$lambda(it) {
|
|
1805
|
-
return it.
|
|
1806
|
+
return it.z1o_1.equals(Companion_getInstance().k1h('message'));
|
|
1806
1807
|
}
|
|
1807
1808
|
function withFullyQualifiedPrefix$lambda_0($prefix) {
|
|
1808
1809
|
return function (param) {
|
|
1809
|
-
var t = param.
|
|
1810
|
+
var t = param.a1p_1;
|
|
1810
1811
|
var tmp;
|
|
1811
1812
|
if (t instanceof Custom_0) {
|
|
1812
|
-
tmp = param.
|
|
1813
|
+
tmp = param.c1p(VOID, t.s1m(Companion_getInstance().k1h($prefix + t.v1h_1.m1h())));
|
|
1813
1814
|
} else {
|
|
1814
1815
|
tmp = param;
|
|
1815
1816
|
}
|
|
@@ -1820,8 +1821,8 @@ function JavaRefinedTypeDefinitionEmitter() {
|
|
|
1820
1821
|
}
|
|
1821
1822
|
function JavaShared() {
|
|
1822
1823
|
JavaShared_instance = this;
|
|
1823
|
-
this.
|
|
1824
|
-
this.
|
|
1824
|
+
this.s1v_1 = 'community.flock.wirespec.java';
|
|
1825
|
+
this.t1v_1 = trimMargin('\n |package ' + this.s1v_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.vr(2) + 'Req from(RawRequest request);\n |' + Spacer_instance.vr(2) + 'RawResponse to(Res response);\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface ClientEdge<Req extends Request<?>, Res extends Response<?>> {\n |' + Spacer_instance.vr(2) + 'RawRequest to(Req request);\n |' + Spacer_instance.vr(2) + 'Res from(RawResponse response);\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req extends Request<?>, Res extends Response<?>> {\n |' + Spacer_instance.vr(2) + 'String getPathTemplate();\n |' + Spacer_instance.vr(2) + 'String getMethod();\n |' + Spacer_instance.vr(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.vr(2) + 'String getPathTemplate();\n |' + Spacer_instance.vr(2) + 'String getMethod();\n |' + Spacer_instance.vr(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.vr(2) + 'if(rawType != null) {\n |' + Spacer_instance.vr(3) + 'return new ParameterizedType() {\n |' + Spacer_instance.vr(4) + 'public Type getRawType() { return rawType; }\n |' + Spacer_instance.vr(4) + 'public Type[] getActualTypeArguments() { return new Class<?>[]{actualTypeArguments}; }\n |' + Spacer_instance.vr(4) + 'public Type getOwnerType() { return null; }\n |' + Spacer_instance.vr(3) + '};\n |' + Spacer_instance.vr(2) + '}\n |' + Spacer_instance.vr(2) + 'else { return actualTypeArguments; }\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
1825
1826
|
}
|
|
1826
1827
|
protoOf(JavaShared).toString = function () {
|
|
1827
1828
|
return 'JavaShared';
|
|
@@ -1845,10 +1846,10 @@ function JavaShared_getInstance() {
|
|
|
1845
1846
|
function emitType($this, _this__u8e3s4) {
|
|
1846
1847
|
var tmp;
|
|
1847
1848
|
if (_this__u8e3s4 instanceof Dict) {
|
|
1848
|
-
tmp = 'java.util.Map<String, ' + $this.
|
|
1849
|
+
tmp = 'java.util.Map<String, ' + $this.bq(_this__u8e3s4.go_1) + '>';
|
|
1849
1850
|
} else {
|
|
1850
1851
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
1851
|
-
tmp = 'java.util.List<' + $this.
|
|
1852
|
+
tmp = 'java.util.List<' + $this.bq(_this__u8e3s4.do_1) + '>';
|
|
1852
1853
|
} else {
|
|
1853
1854
|
if (_this__u8e3s4 instanceof Unit) {
|
|
1854
1855
|
tmp = 'void';
|
|
@@ -1857,7 +1858,7 @@ function emitType($this, _this__u8e3s4) {
|
|
|
1857
1858
|
tmp = 'Object';
|
|
1858
1859
|
} else {
|
|
1859
1860
|
if (_this__u8e3s4 instanceof Custom) {
|
|
1860
|
-
tmp = _this__u8e3s4.
|
|
1861
|
+
tmp = _this__u8e3s4.pu_1;
|
|
1861
1862
|
} else {
|
|
1862
1863
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
1863
1864
|
tmp = emit_18($this, _this__u8e3s4);
|
|
@@ -1872,14 +1873,14 @@ function emitType($this, _this__u8e3s4) {
|
|
|
1872
1873
|
return tmp;
|
|
1873
1874
|
}
|
|
1874
1875
|
function emit_18($this, _this__u8e3s4) {
|
|
1875
|
-
var t = _this__u8e3s4.
|
|
1876
|
+
var t = _this__u8e3s4.tu_1;
|
|
1876
1877
|
var tmp;
|
|
1877
1878
|
if (t instanceof String_0) {
|
|
1878
1879
|
tmp = 'String';
|
|
1879
1880
|
} else {
|
|
1880
1881
|
if (t instanceof Integer) {
|
|
1881
1882
|
var tmp_0;
|
|
1882
|
-
switch (t.
|
|
1883
|
+
switch (t.xt_1.b3_1) {
|
|
1883
1884
|
case 0:
|
|
1884
1885
|
tmp_0 = 'Integer';
|
|
1885
1886
|
break;
|
|
@@ -1894,7 +1895,7 @@ function emit_18($this, _this__u8e3s4) {
|
|
|
1894
1895
|
} else {
|
|
1895
1896
|
if (t instanceof Number_0) {
|
|
1896
1897
|
var tmp_1;
|
|
1897
|
-
switch (t.
|
|
1898
|
+
switch (t.au_1.b3_1) {
|
|
1898
1899
|
case 0:
|
|
1899
1900
|
tmp_1 = 'Float';
|
|
1900
1901
|
break;
|
|
@@ -1923,12 +1924,12 @@ function emit_18($this, _this__u8e3s4) {
|
|
|
1923
1924
|
}
|
|
1924
1925
|
function JavaTypeDefinitionEmitter$emit$lambda(this$0) {
|
|
1925
1926
|
return function (it) {
|
|
1926
|
-
return this$0.
|
|
1927
|
+
return this$0.bq(it);
|
|
1927
1928
|
};
|
|
1928
1929
|
}
|
|
1929
1930
|
function JavaTypeDefinitionEmitter$emit$lambda_0(this$0) {
|
|
1930
1931
|
return function (it) {
|
|
1931
|
-
return Spacer_instance.toString() + this$0.
|
|
1932
|
+
return Spacer_instance.toString() + this$0.aq(it) + ',';
|
|
1932
1933
|
};
|
|
1933
1934
|
}
|
|
1934
1935
|
function JavaTypeDefinitionEmitter() {
|
|
@@ -1939,28 +1940,28 @@ function JavaUnionDefinitionEmitter$emit$lambda(it) {
|
|
|
1939
1940
|
function JavaUnionDefinitionEmitter() {
|
|
1940
1941
|
}
|
|
1941
1942
|
//region block: post-declaration
|
|
1942
|
-
protoOf(JavaEmitter).
|
|
1943
|
-
protoOf(JavaEmitter).
|
|
1944
|
-
protoOf(JavaEmitter).
|
|
1945
|
-
protoOf(JavaEmitter).
|
|
1946
|
-
protoOf(JavaEmitter).
|
|
1947
|
-
protoOf(JavaEmitter).
|
|
1948
|
-
protoOf(JavaEmitter).
|
|
1949
|
-
protoOf(JavaEmitter).
|
|
1950
|
-
protoOf(JavaEmitter).
|
|
1951
|
-
protoOf(JavaEmitter).
|
|
1952
|
-
protoOf(JavaEmitter).
|
|
1953
|
-
protoOf(JavaEmitter).yq = emit_13;
|
|
1943
|
+
protoOf(JavaEmitter).br = emit_12;
|
|
1944
|
+
protoOf(JavaEmitter).yp = emit_3;
|
|
1945
|
+
protoOf(JavaEmitter).zp = emit_4;
|
|
1946
|
+
protoOf(JavaEmitter).aq = emit_5;
|
|
1947
|
+
protoOf(JavaEmitter).bq = emit_6;
|
|
1948
|
+
protoOf(JavaEmitter).cq = emit_7;
|
|
1949
|
+
protoOf(JavaEmitter).or = emit_9;
|
|
1950
|
+
protoOf(JavaEmitter).v1v = emit_10;
|
|
1951
|
+
protoOf(JavaEmitter).w1v = emit_11;
|
|
1952
|
+
protoOf(JavaEmitter).cr = emit_8;
|
|
1953
|
+
protoOf(JavaEmitter).nr = emit_13;
|
|
1954
1954
|
protoOf(JavaEmitter).dr = emit_14;
|
|
1955
|
-
protoOf(JavaEmitter).
|
|
1956
|
-
protoOf(JavaEmitter).
|
|
1957
|
-
protoOf(JavaEmitter).
|
|
1958
|
-
protoOf(JavaEmitter).
|
|
1959
|
-
protoOf(JavaEmitter).
|
|
1960
|
-
protoOf(JavaEmitter).
|
|
1961
|
-
protoOf(JavaEmitter).
|
|
1962
|
-
protoOf(
|
|
1963
|
-
protoOf(JavaIrEmitter).
|
|
1955
|
+
protoOf(JavaEmitter).ir = emit_15;
|
|
1956
|
+
protoOf(JavaEmitter).u1v = sanitizeSymbol;
|
|
1957
|
+
protoOf(JavaEmitter).x1v = sanitizeFirstIsDigit;
|
|
1958
|
+
protoOf(JavaEmitter).y1v = sanitizeKeywords;
|
|
1959
|
+
protoOf(JavaEmitter).k1v = emitRoot;
|
|
1960
|
+
protoOf(JavaEmitter).j1v = emitRoot$default;
|
|
1961
|
+
protoOf(JavaEmitter).z1v = emitHandleFunction;
|
|
1962
|
+
protoOf(JavaEmitter).pr = emitValidator;
|
|
1963
|
+
protoOf(JavaIrEmitter).sn = emit_1;
|
|
1964
|
+
protoOf(JavaIrEmitter).r1u = emit_2;
|
|
1964
1965
|
//endregion
|
|
1965
1966
|
//region block: exports
|
|
1966
1967
|
export {
|