@flock/wirespec 0.22.6 → 0.22.8
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 +150 -150
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1488 -1488
- package/colormath-root-colormath.mjs +441 -441
- package/kotlin-kotlin-stdlib.mjs +1626 -1604
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10134 -10134
- package/kotlin-rgxgen.mjs +1802 -1802
- package/kotlinx-io-kotlinx-io-core.mjs +414 -414
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1816 -1816
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1570 -1570
- package/mordant-mordant.mjs +1280 -1280
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +6797 -6957
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +177 -177
- package/wirespec-src-compiler-emitters-kotlin.mjs +132 -132
- package/wirespec-src-compiler-emitters-python.mjs +166 -166
- package/wirespec-src-compiler-emitters-rust.mjs +1501 -2116
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +165 -165
- package/wirespec-src-compiler-emitters-typescript.mjs +214 -214
- package/wirespec-src-compiler-emitters-wirespec.mjs +178 -198
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +282 -282
- package/wirespec-src-converter-asyncapi.mjs +849 -767
- package/wirespec-src-converter-asyncapi.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +596 -595
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +18 -18
- package/wirespec-src-converter-graphql.mjs +1064 -1064
- package/wirespec-src-converter-openapi.mjs +774 -662
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1375 -1375
- package/wirespec-src-plugin-arguments.mjs +200 -190
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +112 -112
- package/wirespec-src-plugin-extensions.mjs +1034 -998
- package/wirespec-src-plugin-extensions.mjs.map +1 -1
- package/wirespec-src-plugin-npm.mjs +54 -54
- package/wirespec-src-tools-generator.mjs +32 -32
|
@@ -25,9 +25,8 @@ import {
|
|
|
25
25
|
getOrNull1cdnsfrisdp41 as getOrNull,
|
|
26
26
|
Char19o2r8palgjof as Char,
|
|
27
27
|
toString22rbkbhdb5cl2 as toString,
|
|
28
|
-
contains3ue2qo8xhmpf1 as contains,
|
|
29
|
-
equals2au1ep9vhcato as equals,
|
|
30
28
|
replace3le3ie7l9k8aq as replace,
|
|
29
|
+
contains3ue2qo8xhmpf1 as contains,
|
|
31
30
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
32
31
|
import {
|
|
33
32
|
HasAnnotations19ciafy30ttxa as HasAnnotations,
|
|
@@ -36,6 +35,7 @@ import {
|
|
|
36
35
|
FileExtension_Wirespec_getInstance3awesett59616 as FileExtension_Wirespec_getInstance,
|
|
37
36
|
Emitted12h24rpo4uifw as Emitted,
|
|
38
37
|
Bound2mp7s0560derz as Bound,
|
|
38
|
+
Companion_instance1ed4scihh5yo7 as Companion_instance,
|
|
39
39
|
_RegExp___get_value__impl__7o7618olm3t8d4plkj as _RegExp___get_value__impl__7o7618,
|
|
40
40
|
RegExpiyof7szm5zfu as RegExp_0,
|
|
41
41
|
Spacer_instance2xdqev5aku2zw as Spacer_instance,
|
|
@@ -50,11 +50,6 @@ import {
|
|
|
50
50
|
Array3mbygx5cfsbdr as Array_0,
|
|
51
51
|
Singleuujp8ld3qd71 as Single,
|
|
52
52
|
_Comment___get_value__impl__8r3pla1b4ywrwtg22m7 as _Comment___get_value__impl__8r3pla,
|
|
53
|
-
Bytes_instance1cqd1xiwjq94x as Bytes_instance,
|
|
54
|
-
Boolean_instance15wa4iqeayn6f as Boolean_instance,
|
|
55
|
-
String1czvr8pxnm6on as String_0,
|
|
56
|
-
Number1mui0heypwdhp as Number_0,
|
|
57
|
-
Integer39lqx4uc63u28 as Integer,
|
|
58
53
|
NullValue1yefsnnipmi9o as NullValue,
|
|
59
54
|
EnumValue2b3i6n6mki85b as EnumValue,
|
|
60
55
|
BooleanValue16k4clmclm2vt as BooleanValue,
|
|
@@ -63,8 +58,11 @@ import {
|
|
|
63
58
|
StringValue1xt3p65w95v1r as StringValue,
|
|
64
59
|
Spread2iwdfqumb33es as Spread,
|
|
65
60
|
Field2nwjpxu9j2svq as Field,
|
|
61
|
+
Number1mui0heypwdhp as Number_0,
|
|
62
|
+
Integer39lqx4uc63u28 as Integer,
|
|
66
63
|
Bytes3eoc50vgt1uem as Bytes,
|
|
67
64
|
Boolean1fpfi8m5jt3fg as Boolean_0,
|
|
65
|
+
String1czvr8pxnm6on as String_0,
|
|
68
66
|
Primitive1i8my14jkp3nk as Primitive,
|
|
69
67
|
Custom1lu6o8txpimqz as Custom,
|
|
70
68
|
Anyv7qdq63z63rc as Any,
|
|
@@ -84,11 +82,11 @@ function emit(identifier) {
|
|
|
84
82
|
var tmp;
|
|
85
83
|
if (identifier instanceof DefinitionIdentifier) {
|
|
86
84
|
// Inline function 'kotlin.run' call
|
|
87
|
-
tmp = Companion_getInstance().
|
|
85
|
+
tmp = Companion_getInstance().q39_1.i1(identifier.o1()) ? addBackticks(identifier.o1()) : identifier.o1();
|
|
88
86
|
} else {
|
|
89
87
|
if (identifier instanceof FieldIdentifier) {
|
|
90
88
|
// Inline function 'kotlin.run' call
|
|
91
|
-
tmp = Companion_getInstance().
|
|
89
|
+
tmp = Companion_getInstance().q39_1.i1(identifier.o1()) || !Companion_getInstance().r39_1.sc(identifier.o1()) ? addBackticks(identifier.o1()) : identifier.o1();
|
|
92
90
|
} else {
|
|
93
91
|
noWhenBranchMatchedException();
|
|
94
92
|
}
|
|
@@ -98,7 +96,7 @@ function emit(identifier) {
|
|
|
98
96
|
initMetadataForInterface(WirespecIdentifierEmitter, 'WirespecIdentifierEmitter');
|
|
99
97
|
function emit_0(_this__u8e3s4) {
|
|
100
98
|
// Inline function 'kotlin.takeIf' call
|
|
101
|
-
var this_0 = _this__u8e3s4.
|
|
99
|
+
var this_0 = _this__u8e3s4.r1a_1;
|
|
102
100
|
var tmp;
|
|
103
101
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
104
102
|
if (!this_0.r()) {
|
|
@@ -116,28 +114,28 @@ function emit_0(_this__u8e3s4) {
|
|
|
116
114
|
// Inline function 'kotlin.text.orEmpty' call
|
|
117
115
|
var tmp0_elvis_lhs = tmp_0;
|
|
118
116
|
var tmp$ret$3 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
|
|
119
|
-
return '@' + _this__u8e3s4.
|
|
117
|
+
return '@' + _this__u8e3s4.q1a_1 + tmp$ret$3;
|
|
120
118
|
}
|
|
121
119
|
function emit_1(_this__u8e3s4) {
|
|
122
120
|
return '/* ' + _Comment___get_value__impl__8r3pla(_this__u8e3s4) + ' */';
|
|
123
121
|
}
|
|
124
122
|
initMetadataForInterface(WirespecMetaDataEmitter, 'WirespecMetaDataEmitter');
|
|
125
123
|
function emit_2(type, module_0) {
|
|
126
|
-
return trimMargin('\n |type ' + this.
|
|
124
|
+
return trimMargin('\n |type ' + this.fs(type.lp_1) + ' {\n |' + this.ws(type.mp_1) + '\n |}\n |');
|
|
127
125
|
}
|
|
128
126
|
function emit_3(_this__u8e3s4) {
|
|
129
|
-
return joinToString(_this__u8e3s4.
|
|
127
|
+
return joinToString(_this__u8e3s4.ip_1, ',\n', VOID, VOID, VOID, VOID, WirespecTypeDefinitionEmitter$emit$lambda(this));
|
|
130
128
|
}
|
|
131
129
|
function emit_4(_this__u8e3s4) {
|
|
132
|
-
return joinToString(_this__u8e3s4.
|
|
130
|
+
return joinToString(_this__u8e3s4.op_1, '', VOID, VOID, VOID, VOID, WirespecTypeDefinitionEmitter$emit$lambda_0(this)) + emitDeclaration(this, _this__u8e3s4);
|
|
133
131
|
}
|
|
134
132
|
function emit_5(_this__u8e3s4) {
|
|
135
133
|
var tmp;
|
|
136
134
|
if (_this__u8e3s4 instanceof Field) {
|
|
137
|
-
tmp = this.
|
|
135
|
+
tmp = this.xs(_this__u8e3s4);
|
|
138
136
|
} else {
|
|
139
137
|
if (_this__u8e3s4 instanceof Spread) {
|
|
140
|
-
tmp = '...' + this.
|
|
138
|
+
tmp = '...' + this.ys(_this__u8e3s4.t1e_1);
|
|
141
139
|
} else {
|
|
142
140
|
noWhenBranchMatchedException();
|
|
143
141
|
}
|
|
@@ -147,61 +145,80 @@ function emit_5(_this__u8e3s4) {
|
|
|
147
145
|
function emit_6(_this__u8e3s4) {
|
|
148
146
|
var tmp;
|
|
149
147
|
if (_this__u8e3s4 instanceof Dict_0) {
|
|
150
|
-
tmp = '{ ' + this.
|
|
148
|
+
tmp = '{ ' + this.ys(_this__u8e3s4.cq_1) + ' }' + emitNullable(this, _this__u8e3s4);
|
|
151
149
|
} else {
|
|
152
150
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
153
|
-
tmp = this.
|
|
151
|
+
tmp = this.ys(_this__u8e3s4.zp_1) + '[]' + emitNullable(this, _this__u8e3s4);
|
|
154
152
|
} else {
|
|
155
153
|
if (_this__u8e3s4 instanceof Unit) {
|
|
156
|
-
tmp = 'Unit';
|
|
154
|
+
tmp = 'Unit' + emitNullable(this, _this__u8e3s4);
|
|
157
155
|
} else {
|
|
158
156
|
if (_this__u8e3s4 instanceof Any) {
|
|
159
|
-
tmp = 'Any';
|
|
157
|
+
tmp = 'Any' + emitNullable(this, _this__u8e3s4);
|
|
160
158
|
} else {
|
|
161
159
|
if (_this__u8e3s4 instanceof Custom) {
|
|
162
|
-
tmp = _this__u8e3s4.
|
|
160
|
+
tmp = _this__u8e3s4.b1a_1 + emitNullable(this, _this__u8e3s4);
|
|
163
161
|
} else {
|
|
164
162
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
165
|
-
var t = _this__u8e3s4.
|
|
163
|
+
var t = _this__u8e3s4.d1a_1;
|
|
166
164
|
var tmp_0;
|
|
167
165
|
if (t instanceof String_0) {
|
|
168
|
-
|
|
166
|
+
var tmp_1 = emitNullable(this, _this__u8e3s4);
|
|
167
|
+
var tmp1_safe_receiver = t.o1a_1;
|
|
168
|
+
var tmp_2;
|
|
169
|
+
var tmp_3 = tmp1_safe_receiver;
|
|
170
|
+
if ((tmp_3 == null ? null : new RegExp_0(tmp_3)) == null) {
|
|
171
|
+
tmp_2 = null;
|
|
172
|
+
} else {
|
|
173
|
+
tmp_2 = this.zs(new RegExp_0(tmp1_safe_receiver));
|
|
174
|
+
}
|
|
175
|
+
// Inline function 'kotlin.text.orEmpty' call
|
|
176
|
+
var tmp0_elvis_lhs = tmp_2;
|
|
177
|
+
tmp_0 = 'String' + tmp_1 + (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
|
|
169
178
|
} else {
|
|
170
179
|
if (t instanceof Boolean_0) {
|
|
171
|
-
tmp_0 = 'Boolean';
|
|
180
|
+
tmp_0 = 'Boolean' + emitNullable(this, _this__u8e3s4);
|
|
172
181
|
} else {
|
|
173
182
|
if (t instanceof Bytes) {
|
|
174
|
-
tmp_0 = 'Bytes';
|
|
183
|
+
tmp_0 = 'Bytes' + emitNullable(this, _this__u8e3s4);
|
|
175
184
|
} else {
|
|
176
185
|
if (t instanceof Integer) {
|
|
177
|
-
var
|
|
178
|
-
switch (t.
|
|
186
|
+
var tmp_4;
|
|
187
|
+
switch (t.l1a_1.f3_1) {
|
|
179
188
|
case 0:
|
|
180
|
-
|
|
189
|
+
tmp_4 = 'Integer32';
|
|
181
190
|
break;
|
|
182
191
|
case 1:
|
|
183
|
-
|
|
192
|
+
tmp_4 = 'Integer';
|
|
184
193
|
break;
|
|
185
194
|
default:
|
|
186
195
|
noWhenBranchMatchedException();
|
|
187
196
|
break;
|
|
188
197
|
}
|
|
189
|
-
|
|
198
|
+
var tmp_5 = tmp_4;
|
|
199
|
+
var tmp3_safe_receiver = t.m1a_1;
|
|
200
|
+
// Inline function 'kotlin.text.orEmpty' call
|
|
201
|
+
var tmp0_elvis_lhs_0 = tmp3_safe_receiver == null ? null : this.zs(tmp3_safe_receiver);
|
|
202
|
+
tmp_0 = tmp_5 + (tmp0_elvis_lhs_0 == null ? '' : tmp0_elvis_lhs_0) + emitNullable(this, _this__u8e3s4);
|
|
190
203
|
} else {
|
|
191
204
|
if (t instanceof Number_0) {
|
|
192
|
-
var
|
|
193
|
-
switch (t.
|
|
205
|
+
var tmp_6;
|
|
206
|
+
switch (t.g1a_1.f3_1) {
|
|
194
207
|
case 0:
|
|
195
|
-
|
|
208
|
+
tmp_6 = 'Number32';
|
|
196
209
|
break;
|
|
197
210
|
case 1:
|
|
198
|
-
|
|
211
|
+
tmp_6 = 'Number';
|
|
199
212
|
break;
|
|
200
213
|
default:
|
|
201
214
|
noWhenBranchMatchedException();
|
|
202
215
|
break;
|
|
203
216
|
}
|
|
204
|
-
|
|
217
|
+
var tmp_7 = tmp_6;
|
|
218
|
+
var tmp5_safe_receiver = t.h1a_1;
|
|
219
|
+
// Inline function 'kotlin.text.orEmpty' call
|
|
220
|
+
var tmp0_elvis_lhs_1 = tmp5_safe_receiver == null ? null : emitDecimal(this, tmp5_safe_receiver);
|
|
221
|
+
tmp_0 = tmp_7 + (tmp0_elvis_lhs_1 == null ? '' : tmp0_elvis_lhs_1) + emitNullable(this, _this__u8e3s4);
|
|
205
222
|
} else {
|
|
206
223
|
noWhenBranchMatchedException();
|
|
207
224
|
}
|
|
@@ -218,88 +235,47 @@ function emit_6(_this__u8e3s4) {
|
|
|
218
235
|
}
|
|
219
236
|
}
|
|
220
237
|
}
|
|
221
|
-
|
|
222
|
-
var it = tmp;
|
|
223
|
-
return _this__u8e3s4.ot() ? it + '?' : it;
|
|
238
|
+
return tmp;
|
|
224
239
|
}
|
|
225
240
|
initMetadataForInterface(WirespecTypeDefinitionEmitter, 'WirespecTypeDefinitionEmitter', VOID, VOID, [WirespecIdentifierEmitter, WirespecMetaDataEmitter]);
|
|
226
241
|
function emit_7(channel) {
|
|
227
|
-
return 'channel ' + this.
|
|
242
|
+
return 'channel ' + this.fs(channel.yq_1) + ' -> ' + this.ys(channel.zq_1) + '\n';
|
|
228
243
|
}
|
|
229
244
|
initMetadataForInterface(WirespecChannelDefinitionEmitter, 'WirespecChannelDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
|
|
230
|
-
function emit_8(
|
|
231
|
-
|
|
232
|
-
|
|
245
|
+
function emit_8(part) {
|
|
246
|
+
return trimMargin('\n |part ' + this.fs(part.oq_1) + ' {\n |' + this.ws(part.pq_1) + '\n |}\n |');
|
|
247
|
+
}
|
|
248
|
+
initMetadataForInterface(WirespecPartDefinitionEmitter, 'WirespecPartDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
|
|
249
|
+
function emit_9(rpc) {
|
|
250
|
+
return rpc.tq_1.ip_1.r() ? 'rpc ' + this.fs(rpc.sq_1) + ' {} -> ' + emitReturn(this, rpc) + '\n' : trimMargin('\n |rpc ' + this.fs(rpc.sq_1) + ' {\n |' + this.ws(rpc.tq_1) + '\n |} -> ' + emitReturn(this, rpc) + '\n |');
|
|
251
|
+
}
|
|
252
|
+
initMetadataForInterface(WirespecRpcDefinitionEmitter, 'WirespecRpcDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
|
|
253
|
+
function emit_10(union) {
|
|
254
|
+
var tmp = this.fs(union.cr_1);
|
|
255
|
+
return 'type ' + tmp + ' = ' + joinToString(union.dr_1, ' | ', VOID, VOID, VOID, VOID, WirespecUnionDefinitionEmitter$emit$lambda(this)) + '\n';
|
|
233
256
|
}
|
|
234
257
|
initMetadataForInterface(WirespecUnionDefinitionEmitter, 'WirespecUnionDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
|
|
235
|
-
function
|
|
236
|
-
|
|
258
|
+
function emit_11(endpoint) {
|
|
259
|
+
var tmp = this.fs(endpoint.gr_1);
|
|
260
|
+
var tmp_0 = endpoint.hr_1.toString();
|
|
261
|
+
var tmp_1 = emitRequest(this, endpoint.lr_1);
|
|
262
|
+
var tmp_2 = emitPath(this, endpoint.ir_1);
|
|
263
|
+
var tmp_3 = emitQuery(this, endpoint.jr_1);
|
|
264
|
+
var tmp_4 = emitHeader(this, endpoint.kr_1);
|
|
265
|
+
return trimMargin('\n |endpoint ' + tmp + ' ' + tmp_0 + tmp_1 + ' ' + tmp_2 + tmp_3 + tmp_4 + ' -> {\n |' + joinToString(endpoint.mr_1, '\n', VOID, VOID, VOID, VOID, WirespecEndpointDefinitionEmitter$emit$lambda(this)) + '\n |}\n |\n ');
|
|
237
266
|
}
|
|
238
|
-
initMetadataForInterface(
|
|
239
|
-
function
|
|
240
|
-
var tmp = this.
|
|
267
|
+
initMetadataForInterface(WirespecEndpointDefinitionEmitter, 'WirespecEndpointDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
|
|
268
|
+
function emit_12(enum_0, module_0) {
|
|
269
|
+
var tmp = this.fs(enum_0.rs_1);
|
|
241
270
|
var tmp_0 = Spacer_instance.toString();
|
|
242
|
-
return 'enum ' + tmp + ' {\n' + tmp_0 + joinToString(enum_0.
|
|
271
|
+
return 'enum ' + tmp + ' {\n' + tmp_0 + joinToString(enum_0.ss_1, ', ', VOID, VOID, VOID, VOID, WirespecEnumDefinitionEmitter$emit$lambda) + '\n}\n';
|
|
243
272
|
}
|
|
244
273
|
initMetadataForInterface(WirespecEnumDefinitionEmitter, 'WirespecEnumDefinitionEmitter', VOID, VOID, [WirespecIdentifierEmitter]);
|
|
245
|
-
function
|
|
246
|
-
return
|
|
247
|
-
}
|
|
248
|
-
initMetadataForInterface(WirespecRpcDefinitionEmitter, 'WirespecRpcDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
|
|
249
|
-
function emit_12(refined) {
|
|
250
|
-
return 'type ' + this.es(refined.ls_1) + ' = ' + this.xs(refined.ms_1.u1f(VOID, false)) + this.zs(refined) + '\n';
|
|
251
|
-
}
|
|
252
|
-
function emitValidator(_this__u8e3s4) {
|
|
253
|
-
var type = _this__u8e3s4.ms_1.z19_1;
|
|
254
|
-
var tmp;
|
|
255
|
-
if (type instanceof Integer) {
|
|
256
|
-
var tmp0_safe_receiver = type.i1a_1;
|
|
257
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.ys(tmp0_safe_receiver);
|
|
258
|
-
tmp = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
|
|
259
|
-
} else {
|
|
260
|
-
if (type instanceof Number_0) {
|
|
261
|
-
var tmp2_safe_receiver = type.d1a_1;
|
|
262
|
-
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : emitDecimal(this, tmp2_safe_receiver);
|
|
263
|
-
tmp = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
|
|
264
|
-
} else {
|
|
265
|
-
if (type instanceof String_0) {
|
|
266
|
-
var tmp4_safe_receiver = type.k1a_1;
|
|
267
|
-
var tmp_0;
|
|
268
|
-
var tmp_1 = tmp4_safe_receiver;
|
|
269
|
-
if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
|
|
270
|
-
tmp_0 = null;
|
|
271
|
-
} else {
|
|
272
|
-
tmp_0 = this.ys(new RegExp_0(tmp4_safe_receiver));
|
|
273
|
-
}
|
|
274
|
-
var tmp5_elvis_lhs = tmp_0;
|
|
275
|
-
tmp = tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs;
|
|
276
|
-
} else {
|
|
277
|
-
if (equals(type, Boolean_instance)) {
|
|
278
|
-
tmp = '';
|
|
279
|
-
} else {
|
|
280
|
-
if (equals(type, Bytes_instance)) {
|
|
281
|
-
tmp = '';
|
|
282
|
-
} else {
|
|
283
|
-
noWhenBranchMatchedException();
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
return tmp;
|
|
274
|
+
function emit_13(refined) {
|
|
275
|
+
return 'type ' + this.fs(refined.ms_1) + ' = ' + this.ys(refined.ns_1.y1f(VOID, false)) + '\n';
|
|
290
276
|
}
|
|
291
277
|
initMetadataForInterface(WirespecRefinedTypeDefinitionEmitter, 'WirespecRefinedTypeDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
|
|
292
|
-
|
|
293
|
-
var tmp = this.es(endpoint.fr_1);
|
|
294
|
-
var tmp_0 = endpoint.gr_1.toString();
|
|
295
|
-
var tmp_1 = emitRequest(this, endpoint.kr_1);
|
|
296
|
-
var tmp_2 = emitPath(this, endpoint.hr_1);
|
|
297
|
-
var tmp_3 = emitQuery(this, endpoint.ir_1);
|
|
298
|
-
var tmp_4 = emitHeader(this, endpoint.jr_1);
|
|
299
|
-
return trimMargin('\n |endpoint ' + tmp + ' ' + tmp_0 + tmp_1 + ' ' + tmp_2 + tmp_3 + tmp_4 + ' -> {\n |' + joinToString(endpoint.lr_1, '\n', VOID, VOID, VOID, VOID, WirespecEndpointDefinitionEmitter$emit$lambda(this)) + '\n |}\n |\n ');
|
|
300
|
-
}
|
|
301
|
-
initMetadataForInterface(WirespecEndpointDefinitionEmitter, 'WirespecEndpointDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
|
|
302
|
-
initMetadataForClass(WirespecEmitter, 'WirespecEmitter', WirespecEmitter, LanguageEmitter, [WirespecChannelDefinitionEmitter, WirespecUnionDefinitionEmitter, WirespecPartDefinitionEmitter, WirespecEnumDefinitionEmitter, WirespecIdentifierEmitter, WirespecTypeDefinitionEmitter, WirespecRpcDefinitionEmitter, WirespecRefinedTypeDefinitionEmitter, WirespecEndpointDefinitionEmitter]);
|
|
278
|
+
initMetadataForClass(WirespecEmitter, 'WirespecEmitter', WirespecEmitter, LanguageEmitter, [WirespecPartDefinitionEmitter, WirespecRpcDefinitionEmitter, WirespecUnionDefinitionEmitter, WirespecEndpointDefinitionEmitter, WirespecChannelDefinitionEmitter, WirespecEnumDefinitionEmitter, WirespecTypeDefinitionEmitter, WirespecRefinedTypeDefinitionEmitter, WirespecIdentifierEmitter]);
|
|
303
279
|
initMetadataForCompanion(Companion);
|
|
304
280
|
//endregion
|
|
305
281
|
function WirespecChannelDefinitionEmitter() {
|
|
@@ -307,7 +283,7 @@ function WirespecChannelDefinitionEmitter() {
|
|
|
307
283
|
function emitMetaData($this, $receiver) {
|
|
308
284
|
var tmp0_safe_receiver = isInterface($receiver, HasAnnotations) ? $receiver : null;
|
|
309
285
|
// Inline function 'kotlin.collections.orEmpty' call
|
|
310
|
-
var tmp0_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
286
|
+
var tmp0_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m1e();
|
|
311
287
|
// Inline function 'kotlin.collections.map' call
|
|
312
288
|
var this_0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
313
289
|
// Inline function 'kotlin.collections.mapTo' call
|
|
@@ -315,17 +291,17 @@ function emitMetaData($this, $receiver) {
|
|
|
315
291
|
var _iterator__ex2g4s = this_0.t();
|
|
316
292
|
while (_iterator__ex2g4s.u()) {
|
|
317
293
|
var item = _iterator__ex2g4s.v();
|
|
318
|
-
var tmp$ret$3 = $this.
|
|
294
|
+
var tmp$ret$3 = $this.k39(item);
|
|
319
295
|
destination.x(tmp$ret$3);
|
|
320
296
|
}
|
|
321
297
|
var tmp = destination;
|
|
322
|
-
var tmp1_safe_receiver = $receiver.
|
|
298
|
+
var tmp1_safe_receiver = $receiver.l1e();
|
|
323
299
|
var tmp_0;
|
|
324
300
|
var tmp_1 = tmp1_safe_receiver;
|
|
325
301
|
if ((tmp_1 == null ? null : new Comment(tmp_1)) == null) {
|
|
326
302
|
tmp_0 = null;
|
|
327
303
|
} else {
|
|
328
|
-
tmp_0 = $this.
|
|
304
|
+
tmp_0 = $this.l39(tmp1_safe_receiver);
|
|
329
305
|
}
|
|
330
306
|
var tmp_2 = plus(tmp, listOfNotNull(tmp_0));
|
|
331
307
|
return joinToString(tmp_2, '', VOID, VOID, VOID, VOID, WirespecEmitter$emitMetaData$lambda);
|
|
@@ -335,21 +311,21 @@ function WirespecEmitter$emitMetaData$lambda(it) {
|
|
|
335
311
|
}
|
|
336
312
|
function WirespecEmitter() {
|
|
337
313
|
LanguageEmitter.call(this);
|
|
338
|
-
this.
|
|
339
|
-
this.
|
|
340
|
-
this.
|
|
341
|
-
this.
|
|
314
|
+
this.m39_1 = FileExtension_Wirespec_getInstance();
|
|
315
|
+
this.n39_1 = true;
|
|
316
|
+
this.o39_1 = null;
|
|
317
|
+
this.p39_1 = '\n';
|
|
342
318
|
}
|
|
343
|
-
protoOf(WirespecEmitter).
|
|
344
|
-
return this.
|
|
319
|
+
protoOf(WirespecEmitter).xp = function () {
|
|
320
|
+
return this.m39_1;
|
|
345
321
|
};
|
|
346
|
-
protoOf(WirespecEmitter).
|
|
347
|
-
return this.
|
|
322
|
+
protoOf(WirespecEmitter).wp = function () {
|
|
323
|
+
return this.n39_1;
|
|
348
324
|
};
|
|
349
|
-
protoOf(WirespecEmitter).
|
|
325
|
+
protoOf(WirespecEmitter).uo = function (ast, logger) {
|
|
350
326
|
// Inline function 'kotlin.let' call
|
|
351
|
-
var e = protoOf(LanguageEmitter).
|
|
352
|
-
var tmp = 'wirespec.' + this.
|
|
327
|
+
var e = protoOf(LanguageEmitter).uo.call(this, ast, logger);
|
|
328
|
+
var tmp = 'wirespec.' + this.xp().yr_1;
|
|
353
329
|
// Inline function 'arrow.core.NonEmptyList.map' call
|
|
354
330
|
// Inline function 'kotlin.collections.map' call
|
|
355
331
|
var this_0 = _NonEmptyList___get_all__impl__pmf509(e);
|
|
@@ -358,7 +334,7 @@ protoOf(WirespecEmitter).to = function (ast, logger) {
|
|
|
358
334
|
var _iterator__ex2g4s = this_0.t();
|
|
359
335
|
while (_iterator__ex2g4s.u()) {
|
|
360
336
|
var item = _iterator__ex2g4s.v();
|
|
361
|
-
var tmp$ret$5 = item.
|
|
337
|
+
var tmp$ret$5 = item.jq_1;
|
|
362
338
|
destination.x(tmp$ret$5);
|
|
363
339
|
}
|
|
364
340
|
var tmp$ret$2 = _NonEmptyList___init__impl__fxd0xp(destination);
|
|
@@ -366,21 +342,23 @@ protoOf(WirespecEmitter).to = function (ast, logger) {
|
|
|
366
342
|
var this_1 = new Emitted(tmp, joinToString(new NonEmptyList(tmp$ret$2), '\n'));
|
|
367
343
|
return _NonEmptyList___init__impl__fxd0xp(listOf(this_1));
|
|
368
344
|
};
|
|
369
|
-
protoOf(WirespecEmitter).
|
|
345
|
+
protoOf(WirespecEmitter).ds = function (definition, module_0, logger) {
|
|
370
346
|
// Inline function 'kotlin.let' call
|
|
371
|
-
var emitted = protoOf(LanguageEmitter).
|
|
372
|
-
return emitted.
|
|
347
|
+
var emitted = protoOf(LanguageEmitter).ds.call(this, definition, module_0, logger);
|
|
348
|
+
return emitted.mq(VOID, emitMetaData(this, definition) + emitted.jq_1);
|
|
373
349
|
};
|
|
374
|
-
protoOf(WirespecEmitter).
|
|
350
|
+
protoOf(WirespecEmitter).zs = function (_this__u8e3s4) {
|
|
375
351
|
var tmp;
|
|
376
352
|
if (_this__u8e3s4 instanceof RegExp_0) {
|
|
377
|
-
|
|
353
|
+
var tmp1_safe_receiver = Companion_instance.b1g(_this__u8e3s4.d1b_1);
|
|
354
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rt_1;
|
|
355
|
+
tmp = '(' + (tmp2_elvis_lhs == null ? _RegExp___get_value__impl__7o7618(_this__u8e3s4.d1b_1) : tmp2_elvis_lhs) + ')';
|
|
378
356
|
} else {
|
|
379
357
|
if (_this__u8e3s4 instanceof Bound) {
|
|
380
|
-
var
|
|
381
|
-
var tmp_0 =
|
|
382
|
-
var
|
|
383
|
-
tmp = '(' + tmp_0 + ', ' + (
|
|
358
|
+
var tmp3_elvis_lhs = _this__u8e3s4.j1a_1;
|
|
359
|
+
var tmp_0 = tmp3_elvis_lhs == null ? '_' : tmp3_elvis_lhs;
|
|
360
|
+
var tmp4_elvis_lhs = _this__u8e3s4.k1a_1;
|
|
361
|
+
tmp = '(' + tmp_0 + ', ' + (tmp4_elvis_lhs == null ? '_' : tmp4_elvis_lhs) + ')';
|
|
384
362
|
} else {
|
|
385
363
|
noWhenBranchMatchedException();
|
|
386
364
|
}
|
|
@@ -392,9 +370,9 @@ function emitPath($this, $receiver) {
|
|
|
392
370
|
}
|
|
393
371
|
function emitRequest($this, $receiver) {
|
|
394
372
|
var tmp0_safe_receiver = firstOrNull($receiver);
|
|
395
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
396
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
397
|
-
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : $this.
|
|
373
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pr_1;
|
|
374
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rr_1;
|
|
375
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : $this.ys(tmp2_safe_receiver);
|
|
398
376
|
var tmp;
|
|
399
377
|
if (tmp3_safe_receiver == null) {
|
|
400
378
|
tmp = null;
|
|
@@ -408,7 +386,7 @@ function emitRequest($this, $receiver) {
|
|
|
408
386
|
}
|
|
409
387
|
function emitQuery($this, $receiver) {
|
|
410
388
|
// Inline function 'kotlin.takeIf' call
|
|
411
|
-
var this_0 = $receiver.
|
|
389
|
+
var this_0 = $receiver.ip_1;
|
|
412
390
|
var tmp;
|
|
413
391
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
414
392
|
if (!this_0.r()) {
|
|
@@ -437,7 +415,7 @@ function emitQuery($this, $receiver) {
|
|
|
437
415
|
}
|
|
438
416
|
function emitHeader($this, $receiver) {
|
|
439
417
|
// Inline function 'kotlin.takeIf' call
|
|
440
|
-
var this_0 = $receiver.
|
|
418
|
+
var this_0 = $receiver.ip_1;
|
|
441
419
|
var tmp;
|
|
442
420
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
443
421
|
if (!this_0.r()) {
|
|
@@ -466,28 +444,28 @@ function emitHeader($this, $receiver) {
|
|
|
466
444
|
}
|
|
467
445
|
function WirespecEndpointDefinitionEmitter$emit$lambda$lambda(this$0) {
|
|
468
446
|
return function (annotation) {
|
|
469
|
-
return this$0.
|
|
447
|
+
return this$0.k39(annotation) + ' ';
|
|
470
448
|
};
|
|
471
449
|
}
|
|
472
450
|
function WirespecEndpointDefinitionEmitter$emit$lambda(this$0) {
|
|
473
451
|
return function (it) {
|
|
474
452
|
var tmp = Spacer_instance.toString();
|
|
475
|
-
var tmp_0 = joinToString(it.
|
|
476
|
-
var tmp_1 = fixStatus(it.
|
|
477
|
-
var tmp0_safe_receiver = it.
|
|
478
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
479
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : this$0.
|
|
480
|
-
return tmp + tmp_0 + tmp_1 + ' -> ' + (tmp2_elvis_lhs == null ? 'Unit' : tmp2_elvis_lhs) + emitHeader(this$0, it.
|
|
453
|
+
var tmp_0 = joinToString(it.vr_1, '', VOID, VOID, VOID, VOID, WirespecEndpointDefinitionEmitter$emit$lambda$lambda(this$0));
|
|
454
|
+
var tmp_1 = fixStatus(it.sr_1);
|
|
455
|
+
var tmp0_safe_receiver = it.ur_1;
|
|
456
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rr_1;
|
|
457
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : this$0.ys(tmp1_safe_receiver);
|
|
458
|
+
return tmp + tmp_0 + tmp_1 + ' -> ' + (tmp2_elvis_lhs == null ? 'Unit' : tmp2_elvis_lhs) + emitHeader(this$0, it.tr_1);
|
|
481
459
|
};
|
|
482
460
|
}
|
|
483
461
|
function WirespecEndpointDefinitionEmitter$emitPath$lambda(this$0) {
|
|
484
462
|
return function (it) {
|
|
485
463
|
var tmp;
|
|
486
464
|
if (it instanceof Param) {
|
|
487
|
-
tmp = '{' + it.
|
|
465
|
+
tmp = '{' + it.nr_1.o1() + ': ' + this$0.ys(it.or_1) + '}';
|
|
488
466
|
} else {
|
|
489
467
|
if (it instanceof Literal) {
|
|
490
|
-
tmp = it.
|
|
468
|
+
tmp = it.e1b_1;
|
|
491
469
|
} else {
|
|
492
470
|
noWhenBranchMatchedException();
|
|
493
471
|
}
|
|
@@ -497,12 +475,12 @@ function WirespecEndpointDefinitionEmitter$emitPath$lambda(this$0) {
|
|
|
497
475
|
}
|
|
498
476
|
function WirespecEndpointDefinitionEmitter$emitQuery$lambda(this$0) {
|
|
499
477
|
return function (it) {
|
|
500
|
-
return this$0.
|
|
478
|
+
return this$0.j39(it);
|
|
501
479
|
};
|
|
502
480
|
}
|
|
503
481
|
function WirespecEndpointDefinitionEmitter$emitHeader$lambda(this$0) {
|
|
504
482
|
return function (it) {
|
|
505
|
-
return this$0.
|
|
483
|
+
return this$0.j39(it);
|
|
506
484
|
};
|
|
507
485
|
}
|
|
508
486
|
function WirespecEndpointDefinitionEmitter() {
|
|
@@ -524,7 +502,7 @@ function WirespecEnumDefinitionEmitter() {
|
|
|
524
502
|
}
|
|
525
503
|
function emitEnumEntry(_this__u8e3s4) {
|
|
526
504
|
_init_properties_WirespecEnumDefinitionEmitter_kt__y5oa4o();
|
|
527
|
-
return get_entry().
|
|
505
|
+
return get_entry().sc(_this__u8e3s4) && !get_methods().i1(_this__u8e3s4) ? _this__u8e3s4 : addBackticks(_this__u8e3s4);
|
|
528
506
|
}
|
|
529
507
|
var properties_initialized_WirespecEnumDefinitionEmitter_kt_wa4jx2;
|
|
530
508
|
function _init_properties_WirespecEnumDefinitionEmitter_kt__y5oa4o() {
|
|
@@ -538,22 +516,22 @@ function _init_properties_WirespecEnumDefinitionEmitter_kt__y5oa4o() {
|
|
|
538
516
|
var _iterator__ex2g4s = this_0.t();
|
|
539
517
|
while (_iterator__ex2g4s.u()) {
|
|
540
518
|
var item = _iterator__ex2g4s.v();
|
|
541
|
-
var tmp$ret$2 = item.
|
|
519
|
+
var tmp$ret$2 = item.e3_1;
|
|
542
520
|
destination.x(tmp$ret$2);
|
|
543
521
|
}
|
|
544
522
|
methods = toSet(destination);
|
|
545
523
|
}
|
|
546
524
|
}
|
|
547
525
|
function Companion() {
|
|
548
|
-
|
|
549
|
-
this.
|
|
550
|
-
this.
|
|
526
|
+
Companion_instance_0 = this;
|
|
527
|
+
this.q39_1 = setOf(['type', 'enum', 'endpoint', 'channel', 'rpc', 'part']);
|
|
528
|
+
this.r39_1 = Regex_init_$Create$('[a-z][a-zA-Z0-9_\\-]*');
|
|
551
529
|
}
|
|
552
|
-
var
|
|
530
|
+
var Companion_instance_0;
|
|
553
531
|
function Companion_getInstance() {
|
|
554
|
-
if (
|
|
532
|
+
if (Companion_instance_0 == null)
|
|
555
533
|
new Companion();
|
|
556
|
-
return
|
|
534
|
+
return Companion_instance_0;
|
|
557
535
|
}
|
|
558
536
|
function WirespecIdentifierEmitter() {
|
|
559
537
|
}
|
|
@@ -563,27 +541,27 @@ function get_KEY() {
|
|
|
563
541
|
}
|
|
564
542
|
var KEY;
|
|
565
543
|
function emit_14($this, $receiver) {
|
|
566
|
-
return $receiver.
|
|
544
|
+
return $receiver.s1a_1 === 'default' ? emit_15($this, $receiver.t1a_1) : emitEntry($this, $receiver);
|
|
567
545
|
}
|
|
568
546
|
function emitEntry($this, $receiver) {
|
|
569
|
-
return emitKey($this, $receiver.
|
|
547
|
+
return emitKey($this, $receiver.s1a_1) + ': ' + emit_15($this, $receiver.t1a_1);
|
|
570
548
|
}
|
|
571
549
|
function emit_15($this, $receiver) {
|
|
572
550
|
var tmp;
|
|
573
551
|
if ($receiver instanceof Single) {
|
|
574
|
-
tmp = '"' + escapeQuotes($this, $receiver.
|
|
552
|
+
tmp = '"' + escapeQuotes($this, $receiver.w1a_1) + '"';
|
|
575
553
|
} else {
|
|
576
554
|
if ($receiver instanceof Array_0) {
|
|
577
555
|
var tmp_0;
|
|
578
|
-
if ($receiver.
|
|
556
|
+
if ($receiver.v1a_1.r()) {
|
|
579
557
|
tmp_0 = '[ ]';
|
|
580
558
|
} else {
|
|
581
|
-
tmp_0 = joinToString($receiver.
|
|
559
|
+
tmp_0 = joinToString($receiver.v1a_1, ', ', '[', ']', VOID, VOID, WirespecMetaDataEmitter$emit$lambda_0($this));
|
|
582
560
|
}
|
|
583
561
|
tmp = tmp_0;
|
|
584
562
|
} else {
|
|
585
563
|
if ($receiver instanceof Dict) {
|
|
586
|
-
tmp = joinToString($receiver.
|
|
564
|
+
tmp = joinToString($receiver.u1a_1, ', ', '{ ', ' }', VOID, VOID, WirespecMetaDataEmitter$emit$lambda_1($this));
|
|
587
565
|
} else {
|
|
588
566
|
noWhenBranchMatchedException();
|
|
589
567
|
}
|
|
@@ -592,7 +570,7 @@ function emit_15($this, $receiver) {
|
|
|
592
570
|
return tmp;
|
|
593
571
|
}
|
|
594
572
|
function emitKey($this, $receiver) {
|
|
595
|
-
return get_KEY().
|
|
573
|
+
return get_KEY().sc($receiver) ? $receiver : '"' + escapeQuotes($this, $receiver) + '"';
|
|
596
574
|
}
|
|
597
575
|
function escapeQuotes($this, $receiver) {
|
|
598
576
|
// Inline function 'kotlin.text.buildString' call
|
|
@@ -651,23 +629,17 @@ function _init_properties_WirespecMetaDataEmitter_kt__6x4knh() {
|
|
|
651
629
|
}
|
|
652
630
|
function WirespecPartDefinitionEmitter() {
|
|
653
631
|
}
|
|
654
|
-
function emitDecimal($this, $receiver) {
|
|
655
|
-
return '(' + toBoundDecimal($this, $receiver.f1a_1) + ', ' + toBoundDecimal($this, $receiver.g1a_1) + ')';
|
|
656
|
-
}
|
|
657
|
-
function toBoundDecimal($this, $receiver) {
|
|
658
|
-
return $receiver == null ? '_' : contains($receiver, '.') ? $receiver : $receiver + '.0';
|
|
659
|
-
}
|
|
660
632
|
function WirespecRefinedTypeDefinitionEmitter() {
|
|
661
633
|
}
|
|
662
634
|
function emitReturn($this, $receiver) {
|
|
663
|
-
var tmp = $this.
|
|
664
|
-
var tmp0_safe_receiver = $receiver.
|
|
635
|
+
var tmp = $this.ys($receiver.uq_1);
|
|
636
|
+
var tmp0_safe_receiver = $receiver.vq_1;
|
|
665
637
|
var tmp_0;
|
|
666
638
|
if (tmp0_safe_receiver == null) {
|
|
667
639
|
tmp_0 = null;
|
|
668
640
|
} else {
|
|
669
641
|
// Inline function 'kotlin.let' call
|
|
670
|
-
tmp_0 = ' ! ' + $this.
|
|
642
|
+
tmp_0 = ' ! ' + $this.ys(tmp0_safe_receiver);
|
|
671
643
|
}
|
|
672
644
|
// Inline function 'kotlin.text.orEmpty' call
|
|
673
645
|
var tmp0_elvis_lhs = tmp_0;
|
|
@@ -676,9 +648,9 @@ function emitReturn($this, $receiver) {
|
|
|
676
648
|
function WirespecRpcDefinitionEmitter() {
|
|
677
649
|
}
|
|
678
650
|
function emitDeclaration($this, $receiver) {
|
|
679
|
-
var tmp = $this.
|
|
680
|
-
var tmp_0 = $this.
|
|
681
|
-
var tmp0_safe_receiver = $receiver.
|
|
651
|
+
var tmp = $this.fs($receiver.pp_1);
|
|
652
|
+
var tmp_0 = $this.ys($receiver.qp_1);
|
|
653
|
+
var tmp0_safe_receiver = $receiver.rp_1;
|
|
682
654
|
var tmp_1;
|
|
683
655
|
if (tmp0_safe_receiver == null) {
|
|
684
656
|
tmp_1 = null;
|
|
@@ -693,19 +665,19 @@ function emitDeclaration($this, $receiver) {
|
|
|
693
665
|
function emit_16($this, $receiver) {
|
|
694
666
|
var tmp;
|
|
695
667
|
if ($receiver instanceof StringValue) {
|
|
696
|
-
tmp = '"' + escape($this, $receiver.
|
|
668
|
+
tmp = '"' + escape($this, $receiver.c1b_1) + '"';
|
|
697
669
|
} else {
|
|
698
670
|
if ($receiver instanceof IntegerValue) {
|
|
699
|
-
tmp = $receiver.
|
|
671
|
+
tmp = $receiver.a1b_1;
|
|
700
672
|
} else {
|
|
701
673
|
if ($receiver instanceof NumberValue) {
|
|
702
|
-
tmp = $receiver.
|
|
674
|
+
tmp = $receiver.z1a_1;
|
|
703
675
|
} else {
|
|
704
676
|
if ($receiver instanceof BooleanValue) {
|
|
705
|
-
tmp = $receiver.
|
|
677
|
+
tmp = $receiver.b1b_1.toString();
|
|
706
678
|
} else {
|
|
707
679
|
if ($receiver instanceof EnumValue) {
|
|
708
|
-
tmp = emitEnumEntry($receiver.
|
|
680
|
+
tmp = emitEnumEntry($receiver.y1a_1);
|
|
709
681
|
} else {
|
|
710
682
|
if ($receiver instanceof NullValue) {
|
|
711
683
|
tmp = 'null';
|
|
@@ -722,19 +694,28 @@ function emit_16($this, $receiver) {
|
|
|
722
694
|
function escape($this, $receiver) {
|
|
723
695
|
return replace(replace(replace(replace(replace($receiver, '\\', '\\\\'), '"', '\\"'), '\n', '\\n'), '\r', '\\r'), '\t', '\\t');
|
|
724
696
|
}
|
|
697
|
+
function emitNullable($this, $receiver) {
|
|
698
|
+
return $receiver.ot() ? '?' : '';
|
|
699
|
+
}
|
|
700
|
+
function emitDecimal($this, $receiver) {
|
|
701
|
+
return '(' + toBoundDecimal($this, $receiver.j1a_1) + ', ' + toBoundDecimal($this, $receiver.k1a_1) + ')';
|
|
702
|
+
}
|
|
703
|
+
function toBoundDecimal($this, $receiver) {
|
|
704
|
+
return $receiver == null ? '_' : contains($receiver, '.') ? $receiver : $receiver + '.0';
|
|
705
|
+
}
|
|
725
706
|
function WirespecTypeDefinitionEmitter$emit$lambda$lambda(this$0) {
|
|
726
707
|
return function (it) {
|
|
727
|
-
return Spacer_instance.toString() + this$0.
|
|
708
|
+
return Spacer_instance.toString() + this$0.k39(it) + '\n';
|
|
728
709
|
};
|
|
729
710
|
}
|
|
730
711
|
function WirespecTypeDefinitionEmitter$emit$lambda(this$0) {
|
|
731
712
|
return function (entry) {
|
|
732
713
|
var tmp;
|
|
733
714
|
if (entry instanceof Field) {
|
|
734
|
-
tmp = joinToString(entry.
|
|
715
|
+
tmp = joinToString(entry.op_1, '', VOID, VOID, VOID, VOID, WirespecTypeDefinitionEmitter$emit$lambda$lambda(this$0)) + (Spacer_instance.toString() + emitDeclaration(this$0, entry));
|
|
735
716
|
} else {
|
|
736
717
|
if (entry instanceof Spread) {
|
|
737
|
-
tmp = Spacer_instance.toString() + this$0.
|
|
718
|
+
tmp = Spacer_instance.toString() + this$0.j39(entry);
|
|
738
719
|
} else {
|
|
739
720
|
noWhenBranchMatchedException();
|
|
740
721
|
}
|
|
@@ -744,35 +725,34 @@ function WirespecTypeDefinitionEmitter$emit$lambda(this$0) {
|
|
|
744
725
|
}
|
|
745
726
|
function WirespecTypeDefinitionEmitter$emit$lambda_0(this$0) {
|
|
746
727
|
return function (it) {
|
|
747
|
-
return this$0.
|
|
728
|
+
return this$0.k39(it) + ' ';
|
|
748
729
|
};
|
|
749
730
|
}
|
|
750
731
|
function WirespecTypeDefinitionEmitter() {
|
|
751
732
|
}
|
|
752
733
|
function WirespecUnionDefinitionEmitter$emit$lambda(this$0) {
|
|
753
734
|
return function (it) {
|
|
754
|
-
return this$0.
|
|
735
|
+
return this$0.ys(it);
|
|
755
736
|
};
|
|
756
737
|
}
|
|
757
738
|
function WirespecUnionDefinitionEmitter() {
|
|
758
739
|
}
|
|
759
740
|
//region block: post-declaration
|
|
760
|
-
protoOf(WirespecEmitter).
|
|
761
|
-
protoOf(WirespecEmitter).
|
|
762
|
-
protoOf(WirespecEmitter).
|
|
763
|
-
protoOf(WirespecEmitter).
|
|
764
|
-
protoOf(WirespecEmitter).
|
|
765
|
-
protoOf(WirespecEmitter).
|
|
766
|
-
protoOf(WirespecEmitter).
|
|
767
|
-
protoOf(WirespecEmitter).
|
|
768
|
-
protoOf(WirespecEmitter).
|
|
769
|
-
protoOf(WirespecEmitter).
|
|
770
|
-
protoOf(WirespecEmitter).
|
|
771
|
-
protoOf(WirespecEmitter).
|
|
772
|
-
protoOf(WirespecEmitter).
|
|
773
|
-
protoOf(WirespecEmitter).
|
|
774
|
-
protoOf(WirespecEmitter).
|
|
775
|
-
protoOf(WirespecEmitter).zs = emitValidator;
|
|
741
|
+
protoOf(WirespecEmitter).vs = emit_2;
|
|
742
|
+
protoOf(WirespecEmitter).ws = emit_3;
|
|
743
|
+
protoOf(WirespecEmitter).xs = emit_4;
|
|
744
|
+
protoOf(WirespecEmitter).ys = emit_6;
|
|
745
|
+
protoOf(WirespecEmitter).ts = emit_12;
|
|
746
|
+
protoOf(WirespecEmitter).os = emit_13;
|
|
747
|
+
protoOf(WirespecEmitter).us = emit_11;
|
|
748
|
+
protoOf(WirespecEmitter).js = emit_10;
|
|
749
|
+
protoOf(WirespecEmitter).fs = emit;
|
|
750
|
+
protoOf(WirespecEmitter).is = emit_7;
|
|
751
|
+
protoOf(WirespecEmitter).hs = emit_9;
|
|
752
|
+
protoOf(WirespecEmitter).gs = emit_8;
|
|
753
|
+
protoOf(WirespecEmitter).j39 = emit_5;
|
|
754
|
+
protoOf(WirespecEmitter).k39 = emit_0;
|
|
755
|
+
protoOf(WirespecEmitter).l39 = emit_1;
|
|
776
756
|
//endregion
|
|
777
757
|
//region block: exports
|
|
778
758
|
export {
|