@flock/wirespec 0.8.32 → 0.8.34
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/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js +294 -294
- package/kotlin-kotlin-stdlib-js-ir.js +3 -3
- package/package.json +1 -1
- package/wirespec-src-compiler-cli.js +81 -81
- package/wirespec-src-compiler-core.js +308 -189
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.d.ts +10 -0
- package/wirespec-src-compiler-lib.js +204 -146
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-openapi.js +196 -179
- package/wirespec-src-openapi.js.map +1 -1
|
@@ -202,6 +202,7 @@
|
|
|
202
202
|
setMetadataFor(Refined, 'Refined', classMeta);
|
|
203
203
|
setMetadataFor(Type, 'Type', classMeta, Enum);
|
|
204
204
|
setMetadataFor(Any, 'Any', classMeta);
|
|
205
|
+
setMetadataFor(Unit, 'Unit', classMeta);
|
|
205
206
|
setMetadataFor(Custom, 'Custom', classMeta);
|
|
206
207
|
setMetadataFor(Primitive, 'Primitive', classMeta);
|
|
207
208
|
setMetadataFor(Identifier, 'Identifier', classMeta);
|
|
@@ -235,6 +236,7 @@
|
|
|
235
236
|
setMetadataFor(WsInteger, 'WsInteger', objectMeta, VOID, [WirespecType]);
|
|
236
237
|
setMetadataFor(WsNumber, 'WsNumber', objectMeta, VOID, [WirespecType]);
|
|
237
238
|
setMetadataFor(WsBoolean, 'WsBoolean', objectMeta, VOID, [WirespecType]);
|
|
239
|
+
setMetadataFor(WsUnit, 'WsUnit', objectMeta, VOID, [WirespecType]);
|
|
238
240
|
setMetadataFor(Arrow, 'Arrow', objectMeta, VOID, [TokenType]);
|
|
239
241
|
setMetadataFor(Method_0, 'Method', objectMeta, VOID, [TokenType]);
|
|
240
242
|
setMetadataFor(CustomRegex, 'CustomRegex', objectMeta, VOID, [TokenType]);
|
|
@@ -438,7 +440,7 @@
|
|
|
438
440
|
}
|
|
439
441
|
function Wirespec() {
|
|
440
442
|
Wirespec_instance = this;
|
|
441
|
-
this.u20_1 = listOf([to(Regex_init_$Create$('^type'), WsTypeDef_getInstance()), to(Regex_init_$Create$('^enum'), WsEnumTypeDef_getInstance()), to(Regex_init_$Create$('^refined'), WsRefinedTypeDef_getInstance()), to(Regex_init_$Create$('^endpoint'), WsEndpointDef_getInstance()), to(Regex_init_$Create$('^[^\\S\\r\\n]+'), WhiteSpaceExceptNewLine_getInstance()), to(Regex_init_$Create$('^[\\r\\n]'), NewLine_getInstance()), to(Regex_init_$Create$('^\\{'), LeftCurly_getInstance()), to(Regex_init_$Create$('^\\}'), RightCurly_getInstance()), to(Regex_init_$Create$('^:'), Colon_getInstance()), to(Regex_init_$Create$('^,'), Comma_getInstance()), to(Regex_init_$Create$('^\\?'), QuestionMark_getInstance()), to(Regex_init_$Create$('^#'), Hash_getInstance()), to(Regex_init_$Create$('^\\[\\]'), Brackets_getInstance()), to(Regex_init_$Create$('^String'), WsString_getInstance()), to(Regex_init_$Create$('^Integer'), WsInteger_getInstance()), to(Regex_init_$Create$('^Number'), WsNumber_getInstance()), to(Regex_init_$Create$('^Boolean'), WsBoolean_getInstance()), to(Regex_init_$Create$('^->'), Arrow_getInstance()), to(Regex_init_$Create$('^GET|^POST|^PUT|^DELETE|^OPTIONS|^HEAD|^PATCH|^TRACE'), Method_getInstance()), to(Regex_init_$Create$('^/.*/g'), CustomRegex_getInstance()), to(Regex_init_$Create$('^[1-5][0-9][0-9]'), StatusCode_getInstance()), to(Regex_init_$Create$('^[a-z][a-zA-Z]*'), CustomValue_getInstance()), to(Regex_init_$Create$('^[A-Z][a-zA-Z]*'), CustomType_getInstance()), to(Regex_init_$Create$('^/[a-z]+'), Path_getInstance()), to(Regex_init_$Create$('^/'), ForwardSlash_getInstance()), to(Regex_init_$Create$('^.'), Invalid_getInstance())]);
|
|
443
|
+
this.u20_1 = listOf([to(Regex_init_$Create$('^type'), WsTypeDef_getInstance()), to(Regex_init_$Create$('^enum'), WsEnumTypeDef_getInstance()), to(Regex_init_$Create$('^refined'), WsRefinedTypeDef_getInstance()), to(Regex_init_$Create$('^endpoint'), WsEndpointDef_getInstance()), to(Regex_init_$Create$('^[^\\S\\r\\n]+'), WhiteSpaceExceptNewLine_getInstance()), to(Regex_init_$Create$('^[\\r\\n]'), NewLine_getInstance()), to(Regex_init_$Create$('^\\{'), LeftCurly_getInstance()), to(Regex_init_$Create$('^\\}'), RightCurly_getInstance()), to(Regex_init_$Create$('^:'), Colon_getInstance()), to(Regex_init_$Create$('^,'), Comma_getInstance()), to(Regex_init_$Create$('^\\?'), QuestionMark_getInstance()), to(Regex_init_$Create$('^#'), Hash_getInstance()), to(Regex_init_$Create$('^\\[\\]'), Brackets_getInstance()), to(Regex_init_$Create$('^String'), WsString_getInstance()), to(Regex_init_$Create$('^Integer'), WsInteger_getInstance()), to(Regex_init_$Create$('^Number'), WsNumber_getInstance()), to(Regex_init_$Create$('^Boolean'), WsBoolean_getInstance()), to(Regex_init_$Create$('^Unit'), WsUnit_getInstance()), to(Regex_init_$Create$('^->'), Arrow_getInstance()), to(Regex_init_$Create$('^GET|^POST|^PUT|^DELETE|^OPTIONS|^HEAD|^PATCH|^TRACE'), Method_getInstance()), to(Regex_init_$Create$('^/.*/g'), CustomRegex_getInstance()), to(Regex_init_$Create$('^[1-5][0-9][0-9]'), StatusCode_getInstance()), to(Regex_init_$Create$('^[a-z][a-zA-Z]*'), CustomValue_getInstance()), to(Regex_init_$Create$('^[A-Z][a-zA-Z]*'), CustomType_getInstance()), to(Regex_init_$Create$('^/[a-z]+'), Path_getInstance()), to(Regex_init_$Create$('^/'), ForwardSlash_getInstance()), to(Regex_init_$Create$('^.'), Invalid_getInstance())]);
|
|
442
444
|
}
|
|
443
445
|
protoOf(Wirespec).v20 = function () {
|
|
444
446
|
return this.u20_1;
|
|
@@ -897,36 +899,40 @@
|
|
|
897
899
|
return function () {
|
|
898
900
|
var tmp0_subject = $this_emitSymbol;
|
|
899
901
|
var tmp;
|
|
900
|
-
if (tmp0_subject instanceof
|
|
901
|
-
tmp = '
|
|
902
|
+
if (tmp0_subject instanceof Unit) {
|
|
903
|
+
tmp = 'Void';
|
|
902
904
|
} else {
|
|
903
|
-
if (tmp0_subject instanceof
|
|
904
|
-
tmp =
|
|
905
|
+
if (tmp0_subject instanceof Any) {
|
|
906
|
+
tmp = 'Object';
|
|
905
907
|
} else {
|
|
906
|
-
if (tmp0_subject instanceof
|
|
907
|
-
|
|
908
|
-
var tmp0 = tmp1_subject.w4_1;
|
|
909
|
-
var tmp_0;
|
|
910
|
-
switch (tmp0) {
|
|
911
|
-
case 0:
|
|
912
|
-
tmp_0 = 'String';
|
|
913
|
-
break;
|
|
914
|
-
case 1:
|
|
915
|
-
tmp_0 = 'Integer';
|
|
916
|
-
break;
|
|
917
|
-
case 2:
|
|
918
|
-
tmp_0 = 'Double';
|
|
919
|
-
break;
|
|
920
|
-
case 3:
|
|
921
|
-
tmp_0 = 'Boolean';
|
|
922
|
-
break;
|
|
923
|
-
default:
|
|
924
|
-
noWhenBranchMatchedException();
|
|
925
|
-
break;
|
|
926
|
-
}
|
|
927
|
-
tmp = tmp_0;
|
|
908
|
+
if (tmp0_subject instanceof Custom) {
|
|
909
|
+
tmp = $this_emitSymbol.v22_1;
|
|
928
910
|
} else {
|
|
929
|
-
|
|
911
|
+
if (tmp0_subject instanceof Primitive) {
|
|
912
|
+
var tmp1_subject = $this_emitSymbol.s22_1;
|
|
913
|
+
var tmp0 = tmp1_subject.w4_1;
|
|
914
|
+
var tmp_0;
|
|
915
|
+
switch (tmp0) {
|
|
916
|
+
case 0:
|
|
917
|
+
tmp_0 = 'String';
|
|
918
|
+
break;
|
|
919
|
+
case 1:
|
|
920
|
+
tmp_0 = 'Integer';
|
|
921
|
+
break;
|
|
922
|
+
case 2:
|
|
923
|
+
tmp_0 = 'Double';
|
|
924
|
+
break;
|
|
925
|
+
case 3:
|
|
926
|
+
tmp_0 = 'Boolean';
|
|
927
|
+
break;
|
|
928
|
+
default:
|
|
929
|
+
noWhenBranchMatchedException();
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
932
|
+
tmp = tmp_0;
|
|
933
|
+
} else {
|
|
934
|
+
noWhenBranchMatchedException();
|
|
935
|
+
}
|
|
930
936
|
}
|
|
931
937
|
}
|
|
932
938
|
}
|
|
@@ -1598,36 +1604,40 @@
|
|
|
1598
1604
|
return function () {
|
|
1599
1605
|
var tmp0_subject = $this_emitSymbol;
|
|
1600
1606
|
var tmp;
|
|
1601
|
-
if (tmp0_subject instanceof
|
|
1602
|
-
tmp = '
|
|
1607
|
+
if (tmp0_subject instanceof Unit) {
|
|
1608
|
+
tmp = 'Unit';
|
|
1603
1609
|
} else {
|
|
1604
|
-
if (tmp0_subject instanceof
|
|
1605
|
-
tmp =
|
|
1610
|
+
if (tmp0_subject instanceof Any) {
|
|
1611
|
+
tmp = 'Any';
|
|
1606
1612
|
} else {
|
|
1607
|
-
if (tmp0_subject instanceof
|
|
1608
|
-
|
|
1609
|
-
var tmp0 = tmp1_subject.w4_1;
|
|
1610
|
-
var tmp_0;
|
|
1611
|
-
switch (tmp0) {
|
|
1612
|
-
case 0:
|
|
1613
|
-
tmp_0 = 'String';
|
|
1614
|
-
break;
|
|
1615
|
-
case 1:
|
|
1616
|
-
tmp_0 = 'Int';
|
|
1617
|
-
break;
|
|
1618
|
-
case 2:
|
|
1619
|
-
tmp_0 = 'Double';
|
|
1620
|
-
break;
|
|
1621
|
-
case 3:
|
|
1622
|
-
tmp_0 = 'Boolean';
|
|
1623
|
-
break;
|
|
1624
|
-
default:
|
|
1625
|
-
noWhenBranchMatchedException();
|
|
1626
|
-
break;
|
|
1627
|
-
}
|
|
1628
|
-
tmp = tmp_0;
|
|
1613
|
+
if (tmp0_subject instanceof Custom) {
|
|
1614
|
+
tmp = $this_emitSymbol.v22_1;
|
|
1629
1615
|
} else {
|
|
1630
|
-
|
|
1616
|
+
if (tmp0_subject instanceof Primitive) {
|
|
1617
|
+
var tmp1_subject = $this_emitSymbol.s22_1;
|
|
1618
|
+
var tmp0 = tmp1_subject.w4_1;
|
|
1619
|
+
var tmp_0;
|
|
1620
|
+
switch (tmp0) {
|
|
1621
|
+
case 0:
|
|
1622
|
+
tmp_0 = 'String';
|
|
1623
|
+
break;
|
|
1624
|
+
case 1:
|
|
1625
|
+
tmp_0 = 'Int';
|
|
1626
|
+
break;
|
|
1627
|
+
case 2:
|
|
1628
|
+
tmp_0 = 'Double';
|
|
1629
|
+
break;
|
|
1630
|
+
case 3:
|
|
1631
|
+
tmp_0 = 'Boolean';
|
|
1632
|
+
break;
|
|
1633
|
+
default:
|
|
1634
|
+
noWhenBranchMatchedException();
|
|
1635
|
+
break;
|
|
1636
|
+
}
|
|
1637
|
+
tmp = tmp_0;
|
|
1638
|
+
} else {
|
|
1639
|
+
noWhenBranchMatchedException();
|
|
1640
|
+
}
|
|
1631
1641
|
}
|
|
1632
1642
|
}
|
|
1633
1643
|
}
|
|
@@ -2265,30 +2275,47 @@
|
|
|
2265
2275
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
2266
2276
|
// Inline function 'community.flock.wirespec.compiler.core.emit.OpenApiV2Emitter.emit.<anonymous>' call
|
|
2267
2277
|
var tmp_1 = new StatusCode(_StatusCode___init__impl__t1yi9q(element_0.x21_1));
|
|
2278
|
+
var tmp_2 = _this__u8e3s4.p21_1 + ' ' + element_0.x21_1 + ' response';
|
|
2268
2279
|
var tmp0_safe_receiver_0 = element_0.z21_1;
|
|
2269
|
-
var
|
|
2270
|
-
|
|
2280
|
+
var tmp_3;
|
|
2281
|
+
if (tmp0_safe_receiver_0 == null) {
|
|
2282
|
+
tmp_3 = null;
|
|
2283
|
+
} else {
|
|
2284
|
+
// Inline function 'kotlin.takeIf' call
|
|
2285
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2286
|
+
var tmp_4;
|
|
2287
|
+
// Inline function 'community.flock.wirespec.compiler.core.emit.OpenApiV2Emitter.emit.<anonymous>.<anonymous>' call
|
|
2288
|
+
var tmp_5 = tmp0_safe_receiver_0.g21_1;
|
|
2289
|
+
if (!(tmp_5 instanceof Unit)) {
|
|
2290
|
+
tmp_4 = tmp0_safe_receiver_0;
|
|
2291
|
+
} else {
|
|
2292
|
+
tmp_4 = null;
|
|
2293
|
+
}
|
|
2294
|
+
tmp_3 = tmp_4;
|
|
2295
|
+
}
|
|
2296
|
+
var tmp1_safe_receiver = tmp_3;
|
|
2297
|
+
var tmp_6;
|
|
2271
2298
|
if (tmp1_safe_receiver == null) {
|
|
2272
|
-
|
|
2299
|
+
tmp_6 = null;
|
|
2273
2300
|
} else {
|
|
2274
2301
|
// Inline function 'kotlin.let' call
|
|
2275
2302
|
// Inline function 'kotlin.contracts.contract' call
|
|
2276
2303
|
// Inline function 'community.flock.wirespec.compiler.core.emit.OpenApiV2Emitter.emit.<anonymous>.<anonymous>' call
|
|
2277
|
-
var
|
|
2278
|
-
switch (tmp1_safe_receiver.b22()) {
|
|
2304
|
+
var tmp_7;
|
|
2305
|
+
switch (tmp1_safe_receiver.g21_1.b22()) {
|
|
2279
2306
|
case false:
|
|
2280
|
-
|
|
2307
|
+
tmp_7 = $this.o21(tmp1_safe_receiver.g21_1);
|
|
2281
2308
|
break;
|
|
2282
2309
|
case true:
|
|
2283
|
-
|
|
2310
|
+
tmp_7 = new SchemaObject(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Type_ARRAY_getInstance(), $this.o21(tmp1_safe_receiver.g21_1));
|
|
2284
2311
|
break;
|
|
2285
2312
|
default:
|
|
2286
2313
|
noWhenBranchMatchedException();
|
|
2287
2314
|
break;
|
|
2288
2315
|
}
|
|
2289
|
-
|
|
2316
|
+
tmp_6 = tmp_7;
|
|
2290
2317
|
}
|
|
2291
|
-
var tmp0_plusAssign = to(tmp_1, new ResponseObject(
|
|
2318
|
+
var tmp0_plusAssign = to(tmp_1, new ResponseObject(tmp_2, tmp_6));
|
|
2292
2319
|
tmp0_associateTo.l3(tmp0_plusAssign.h3_1, tmp0_plusAssign.i3_1);
|
|
2293
2320
|
}
|
|
2294
2321
|
return new OperationObject(VOID, VOID, VOID, VOID, _this__u8e3s4.p21_1, VOID, VOID, tmp_0, tmp0_associateTo);
|
|
@@ -2328,7 +2355,11 @@
|
|
|
2328
2355
|
if (_this__u8e3s4 instanceof Any) {
|
|
2329
2356
|
tmp = Type_OBJECT_getInstance();
|
|
2330
2357
|
} else {
|
|
2331
|
-
|
|
2358
|
+
if (_this__u8e3s4 instanceof Unit) {
|
|
2359
|
+
tmp = Type_OBJECT_getInstance();
|
|
2360
|
+
} else {
|
|
2361
|
+
noWhenBranchMatchedException();
|
|
2362
|
+
}
|
|
2332
2363
|
}
|
|
2333
2364
|
}
|
|
2334
2365
|
}
|
|
@@ -2552,7 +2583,11 @@
|
|
|
2552
2583
|
if (_this__u8e3s4 instanceof Any) {
|
|
2553
2584
|
throw IllegalStateException_init_$Create$('Cannot map Any');
|
|
2554
2585
|
} else {
|
|
2555
|
-
|
|
2586
|
+
if (_this__u8e3s4 instanceof Unit) {
|
|
2587
|
+
throw IllegalStateException_init_$Create$('Cannot map Unit');
|
|
2588
|
+
} else {
|
|
2589
|
+
noWhenBranchMatchedException();
|
|
2590
|
+
}
|
|
2556
2591
|
}
|
|
2557
2592
|
}
|
|
2558
2593
|
}
|
|
@@ -2600,36 +2635,40 @@
|
|
|
2600
2635
|
// Inline function 'kotlin.let' call
|
|
2601
2636
|
var tmp0_subject = $this_emit;
|
|
2602
2637
|
var tmp;
|
|
2603
|
-
if (tmp0_subject instanceof
|
|
2604
|
-
tmp = '
|
|
2638
|
+
if (tmp0_subject instanceof Unit) {
|
|
2639
|
+
tmp = 'Unit';
|
|
2605
2640
|
} else {
|
|
2606
|
-
if (tmp0_subject instanceof
|
|
2607
|
-
tmp =
|
|
2641
|
+
if (tmp0_subject instanceof Any) {
|
|
2642
|
+
tmp = 'Any';
|
|
2608
2643
|
} else {
|
|
2609
|
-
if (tmp0_subject instanceof
|
|
2610
|
-
|
|
2611
|
-
var tmp0 = tmp1_subject.w4_1;
|
|
2612
|
-
var tmp_0;
|
|
2613
|
-
switch (tmp0) {
|
|
2614
|
-
case 0:
|
|
2615
|
-
tmp_0 = 'String';
|
|
2616
|
-
break;
|
|
2617
|
-
case 1:
|
|
2618
|
-
tmp_0 = 'Int';
|
|
2619
|
-
break;
|
|
2620
|
-
case 2:
|
|
2621
|
-
tmp_0 = 'Double';
|
|
2622
|
-
break;
|
|
2623
|
-
case 3:
|
|
2624
|
-
tmp_0 = 'Boolean';
|
|
2625
|
-
break;
|
|
2626
|
-
default:
|
|
2627
|
-
noWhenBranchMatchedException();
|
|
2628
|
-
break;
|
|
2629
|
-
}
|
|
2630
|
-
tmp = tmp_0;
|
|
2644
|
+
if (tmp0_subject instanceof Custom) {
|
|
2645
|
+
tmp = $this_emit.v22_1;
|
|
2631
2646
|
} else {
|
|
2632
|
-
|
|
2647
|
+
if (tmp0_subject instanceof Primitive) {
|
|
2648
|
+
var tmp1_subject = $this_emit.s22_1;
|
|
2649
|
+
var tmp0 = tmp1_subject.w4_1;
|
|
2650
|
+
var tmp_0;
|
|
2651
|
+
switch (tmp0) {
|
|
2652
|
+
case 0:
|
|
2653
|
+
tmp_0 = 'String';
|
|
2654
|
+
break;
|
|
2655
|
+
case 1:
|
|
2656
|
+
tmp_0 = 'Int';
|
|
2657
|
+
break;
|
|
2658
|
+
case 2:
|
|
2659
|
+
tmp_0 = 'Double';
|
|
2660
|
+
break;
|
|
2661
|
+
case 3:
|
|
2662
|
+
tmp_0 = 'Boolean';
|
|
2663
|
+
break;
|
|
2664
|
+
default:
|
|
2665
|
+
noWhenBranchMatchedException();
|
|
2666
|
+
break;
|
|
2667
|
+
}
|
|
2668
|
+
tmp = tmp_0;
|
|
2669
|
+
} else {
|
|
2670
|
+
noWhenBranchMatchedException();
|
|
2671
|
+
}
|
|
2633
2672
|
}
|
|
2634
2673
|
}
|
|
2635
2674
|
}
|
|
@@ -2854,36 +2893,40 @@
|
|
|
2854
2893
|
// Inline function 'kotlin.let' call
|
|
2855
2894
|
var tmp0_subject = $this_emit;
|
|
2856
2895
|
var tmp;
|
|
2857
|
-
if (tmp0_subject instanceof
|
|
2858
|
-
tmp = '
|
|
2896
|
+
if (tmp0_subject instanceof Unit) {
|
|
2897
|
+
tmp = 'void';
|
|
2859
2898
|
} else {
|
|
2860
|
-
if (tmp0_subject instanceof
|
|
2861
|
-
tmp =
|
|
2899
|
+
if (tmp0_subject instanceof Any) {
|
|
2900
|
+
tmp = 'any';
|
|
2862
2901
|
} else {
|
|
2863
|
-
if (tmp0_subject instanceof
|
|
2864
|
-
|
|
2865
|
-
var tmp0 = tmp1_subject.w4_1;
|
|
2866
|
-
var tmp_0;
|
|
2867
|
-
switch (tmp0) {
|
|
2868
|
-
case 0:
|
|
2869
|
-
tmp_0 = 'string';
|
|
2870
|
-
break;
|
|
2871
|
-
case 1:
|
|
2872
|
-
tmp_0 = 'number';
|
|
2873
|
-
break;
|
|
2874
|
-
case 2:
|
|
2875
|
-
tmp_0 = 'number';
|
|
2876
|
-
break;
|
|
2877
|
-
case 3:
|
|
2878
|
-
tmp_0 = 'boolean';
|
|
2879
|
-
break;
|
|
2880
|
-
default:
|
|
2881
|
-
noWhenBranchMatchedException();
|
|
2882
|
-
break;
|
|
2883
|
-
}
|
|
2884
|
-
tmp = tmp_0;
|
|
2902
|
+
if (tmp0_subject instanceof Custom) {
|
|
2903
|
+
tmp = $this_emit.v22_1;
|
|
2885
2904
|
} else {
|
|
2886
|
-
|
|
2905
|
+
if (tmp0_subject instanceof Primitive) {
|
|
2906
|
+
var tmp1_subject = $this_emit.s22_1;
|
|
2907
|
+
var tmp0 = tmp1_subject.w4_1;
|
|
2908
|
+
var tmp_0;
|
|
2909
|
+
switch (tmp0) {
|
|
2910
|
+
case 0:
|
|
2911
|
+
tmp_0 = 'string';
|
|
2912
|
+
break;
|
|
2913
|
+
case 1:
|
|
2914
|
+
tmp_0 = 'number';
|
|
2915
|
+
break;
|
|
2916
|
+
case 2:
|
|
2917
|
+
tmp_0 = 'number';
|
|
2918
|
+
break;
|
|
2919
|
+
case 3:
|
|
2920
|
+
tmp_0 = 'boolean';
|
|
2921
|
+
break;
|
|
2922
|
+
default:
|
|
2923
|
+
noWhenBranchMatchedException();
|
|
2924
|
+
break;
|
|
2925
|
+
}
|
|
2926
|
+
tmp = tmp_0;
|
|
2927
|
+
} else {
|
|
2928
|
+
noWhenBranchMatchedException();
|
|
2929
|
+
}
|
|
2887
2930
|
}
|
|
2888
2931
|
}
|
|
2889
2932
|
}
|
|
@@ -3368,36 +3411,40 @@
|
|
|
3368
3411
|
// Inline function 'kotlin.let' call
|
|
3369
3412
|
var tmp0_subject = $this_emit;
|
|
3370
3413
|
var tmp;
|
|
3371
|
-
if (tmp0_subject instanceof
|
|
3372
|
-
tmp = '
|
|
3414
|
+
if (tmp0_subject instanceof Unit) {
|
|
3415
|
+
tmp = 'Unit';
|
|
3373
3416
|
} else {
|
|
3374
|
-
if (tmp0_subject instanceof
|
|
3375
|
-
tmp =
|
|
3417
|
+
if (tmp0_subject instanceof Any) {
|
|
3418
|
+
tmp = 'Any';
|
|
3376
3419
|
} else {
|
|
3377
|
-
if (tmp0_subject instanceof
|
|
3378
|
-
|
|
3379
|
-
var tmp0 = tmp1_subject.w4_1;
|
|
3380
|
-
var tmp_0;
|
|
3381
|
-
switch (tmp0) {
|
|
3382
|
-
case 0:
|
|
3383
|
-
tmp_0 = 'String';
|
|
3384
|
-
break;
|
|
3385
|
-
case 1:
|
|
3386
|
-
tmp_0 = 'Integer';
|
|
3387
|
-
break;
|
|
3388
|
-
case 2:
|
|
3389
|
-
tmp_0 = 'Number';
|
|
3390
|
-
break;
|
|
3391
|
-
case 3:
|
|
3392
|
-
tmp_0 = 'Boolean';
|
|
3393
|
-
break;
|
|
3394
|
-
default:
|
|
3395
|
-
noWhenBranchMatchedException();
|
|
3396
|
-
break;
|
|
3397
|
-
}
|
|
3398
|
-
tmp = tmp_0;
|
|
3420
|
+
if (tmp0_subject instanceof Custom) {
|
|
3421
|
+
tmp = $this_emit.v22_1;
|
|
3399
3422
|
} else {
|
|
3400
|
-
|
|
3423
|
+
if (tmp0_subject instanceof Primitive) {
|
|
3424
|
+
var tmp1_subject = $this_emit.s22_1;
|
|
3425
|
+
var tmp0 = tmp1_subject.w4_1;
|
|
3426
|
+
var tmp_0;
|
|
3427
|
+
switch (tmp0) {
|
|
3428
|
+
case 0:
|
|
3429
|
+
tmp_0 = 'String';
|
|
3430
|
+
break;
|
|
3431
|
+
case 1:
|
|
3432
|
+
tmp_0 = 'Integer';
|
|
3433
|
+
break;
|
|
3434
|
+
case 2:
|
|
3435
|
+
tmp_0 = 'Number';
|
|
3436
|
+
break;
|
|
3437
|
+
case 3:
|
|
3438
|
+
tmp_0 = 'Boolean';
|
|
3439
|
+
break;
|
|
3440
|
+
default:
|
|
3441
|
+
noWhenBranchMatchedException();
|
|
3442
|
+
break;
|
|
3443
|
+
}
|
|
3444
|
+
tmp = tmp_0;
|
|
3445
|
+
} else {
|
|
3446
|
+
noWhenBranchMatchedException();
|
|
3447
|
+
}
|
|
3401
3448
|
}
|
|
3402
3449
|
}
|
|
3403
3450
|
}
|
|
@@ -4281,10 +4328,14 @@
|
|
|
4281
4328
|
if (wsType instanceof WsBoolean) {
|
|
4282
4329
|
tmp_1 = new Primitive(Type_Boolean_getInstance(), isIterable);
|
|
4283
4330
|
} else {
|
|
4284
|
-
if (wsType instanceof
|
|
4285
|
-
tmp_1 = new
|
|
4331
|
+
if (wsType instanceof WsUnit) {
|
|
4332
|
+
tmp_1 = new Unit(isIterable);
|
|
4286
4333
|
} else {
|
|
4287
|
-
|
|
4334
|
+
if (wsType instanceof CustomType) {
|
|
4335
|
+
tmp_1 = new Custom(value, isIterable);
|
|
4336
|
+
} else {
|
|
4337
|
+
noWhenBranchMatchedException();
|
|
4338
|
+
}
|
|
4288
4339
|
}
|
|
4289
4340
|
}
|
|
4290
4341
|
}
|
|
@@ -5160,10 +5211,14 @@
|
|
|
5160
5211
|
if (wsType instanceof WsBoolean) {
|
|
5161
5212
|
tmp_1 = new Primitive(Type_Boolean_getInstance(), isIterable);
|
|
5162
5213
|
} else {
|
|
5163
|
-
if (wsType instanceof
|
|
5164
|
-
tmp_1 = new
|
|
5214
|
+
if (wsType instanceof WsUnit) {
|
|
5215
|
+
tmp_1 = new Unit(isIterable);
|
|
5165
5216
|
} else {
|
|
5166
|
-
|
|
5217
|
+
if (wsType instanceof CustomType) {
|
|
5218
|
+
tmp_1 = new Custom(value, isIterable);
|
|
5219
|
+
} else {
|
|
5220
|
+
noWhenBranchMatchedException();
|
|
5221
|
+
}
|
|
5167
5222
|
}
|
|
5168
5223
|
}
|
|
5169
5224
|
}
|
|
@@ -5738,6 +5793,45 @@
|
|
|
5738
5793
|
return false;
|
|
5739
5794
|
return true;
|
|
5740
5795
|
};
|
|
5796
|
+
function Unit(isIterable, isMap) {
|
|
5797
|
+
isMap = isMap === VOID ? false : isMap;
|
|
5798
|
+
this.g26_1 = isIterable;
|
|
5799
|
+
this.h26_1 = isMap;
|
|
5800
|
+
}
|
|
5801
|
+
protoOf(Unit).b22 = function () {
|
|
5802
|
+
return this.g26_1;
|
|
5803
|
+
};
|
|
5804
|
+
protoOf(Unit).y22 = function () {
|
|
5805
|
+
return this.h26_1;
|
|
5806
|
+
};
|
|
5807
|
+
protoOf(Unit).e26 = function (isIterable, isMap) {
|
|
5808
|
+
return new Unit(isIterable, isMap);
|
|
5809
|
+
};
|
|
5810
|
+
protoOf(Unit).i26 = function (isIterable, isMap, $super) {
|
|
5811
|
+
isIterable = isIterable === VOID ? this.g26_1 : isIterable;
|
|
5812
|
+
isMap = isMap === VOID ? this.h26_1 : isMap;
|
|
5813
|
+
return $super === VOID ? this.e26(isIterable, isMap) : $super.e26.call(this, isIterable, isMap);
|
|
5814
|
+
};
|
|
5815
|
+
protoOf(Unit).toString = function () {
|
|
5816
|
+
return 'Unit(isIterable=' + this.g26_1 + ', isMap=' + this.h26_1 + ')';
|
|
5817
|
+
};
|
|
5818
|
+
protoOf(Unit).hashCode = function () {
|
|
5819
|
+
var result = this.g26_1 | 0;
|
|
5820
|
+
result = imul(result, 31) + (this.h26_1 | 0) | 0;
|
|
5821
|
+
return result;
|
|
5822
|
+
};
|
|
5823
|
+
protoOf(Unit).equals = function (other) {
|
|
5824
|
+
if (this === other)
|
|
5825
|
+
return true;
|
|
5826
|
+
if (!(other instanceof Unit))
|
|
5827
|
+
return false;
|
|
5828
|
+
var tmp0_other_with_cast = other instanceof Unit ? other : THROW_CCE();
|
|
5829
|
+
if (!(this.g26_1 === tmp0_other_with_cast.g26_1))
|
|
5830
|
+
return false;
|
|
5831
|
+
if (!(this.h26_1 === tmp0_other_with_cast.h26_1))
|
|
5832
|
+
return false;
|
|
5833
|
+
return true;
|
|
5834
|
+
};
|
|
5741
5835
|
function Custom(value, isIterable, isMap) {
|
|
5742
5836
|
isMap = isMap === VOID ? false : isMap;
|
|
5743
5837
|
this.v22_1 = value;
|
|
@@ -5750,14 +5844,14 @@
|
|
|
5750
5844
|
protoOf(Custom).y22 = function () {
|
|
5751
5845
|
return this.x22_1;
|
|
5752
5846
|
};
|
|
5753
|
-
protoOf(Custom).
|
|
5847
|
+
protoOf(Custom).j26 = function (value, isIterable, isMap) {
|
|
5754
5848
|
return new Custom(value, isIterable, isMap);
|
|
5755
5849
|
};
|
|
5756
|
-
protoOf(Custom).
|
|
5850
|
+
protoOf(Custom).k26 = function (value, isIterable, isMap, $super) {
|
|
5757
5851
|
value = value === VOID ? this.v22_1 : value;
|
|
5758
5852
|
isIterable = isIterable === VOID ? this.w22_1 : isIterable;
|
|
5759
5853
|
isMap = isMap === VOID ? this.x22_1 : isMap;
|
|
5760
|
-
return $super === VOID ? this.
|
|
5854
|
+
return $super === VOID ? this.j26(value, isIterable, isMap) : $super.j26.call(this, value, isIterable, isMap);
|
|
5761
5855
|
};
|
|
5762
5856
|
protoOf(Custom).toString = function () {
|
|
5763
5857
|
return 'Custom(value=' + this.v22_1 + ', isIterable=' + this.w22_1 + ', isMap=' + this.x22_1 + ')';
|
|
@@ -5794,14 +5888,14 @@
|
|
|
5794
5888
|
protoOf(Primitive).y22 = function () {
|
|
5795
5889
|
return this.u22_1;
|
|
5796
5890
|
};
|
|
5797
|
-
protoOf(Primitive).
|
|
5891
|
+
protoOf(Primitive).l26 = function (type, isIterable, isMap) {
|
|
5798
5892
|
return new Primitive(type, isIterable, isMap);
|
|
5799
5893
|
};
|
|
5800
|
-
protoOf(Primitive).
|
|
5894
|
+
protoOf(Primitive).m26 = function (type, isIterable, isMap, $super) {
|
|
5801
5895
|
type = type === VOID ? this.s22_1 : type;
|
|
5802
5896
|
isIterable = isIterable === VOID ? this.t22_1 : isIterable;
|
|
5803
5897
|
isMap = isMap === VOID ? this.u22_1 : isMap;
|
|
5804
|
-
return $super === VOID ? this.
|
|
5898
|
+
return $super === VOID ? this.l26(type, isIterable, isMap) : $super.l26.call(this, type, isIterable, isMap);
|
|
5805
5899
|
};
|
|
5806
5900
|
protoOf(Primitive).toString = function () {
|
|
5807
5901
|
return 'Primitive(type=' + this.s22_1 + ', isIterable=' + this.t22_1 + ', isMap=' + this.u22_1 + ')';
|
|
@@ -5850,14 +5944,14 @@
|
|
|
5850
5944
|
this.n22_1 = reference;
|
|
5851
5945
|
this.o22_1 = isNullable;
|
|
5852
5946
|
}
|
|
5853
|
-
protoOf(Field).
|
|
5947
|
+
protoOf(Field).n26 = function (identifier, reference, isNullable) {
|
|
5854
5948
|
return new Field(identifier, reference, isNullable);
|
|
5855
5949
|
};
|
|
5856
5950
|
protoOf(Field).o24 = function (identifier, reference, isNullable, $super) {
|
|
5857
5951
|
identifier = identifier === VOID ? this.m22_1 : identifier;
|
|
5858
5952
|
reference = reference === VOID ? this.n22_1 : reference;
|
|
5859
5953
|
isNullable = isNullable === VOID ? this.o22_1 : isNullable;
|
|
5860
|
-
return $super === VOID ? this.
|
|
5954
|
+
return $super === VOID ? this.n26(identifier, reference, isNullable) : $super.n26.call(this, identifier, reference, isNullable);
|
|
5861
5955
|
};
|
|
5862
5956
|
protoOf(Field).toString = function () {
|
|
5863
5957
|
return 'Field(identifier=' + this.m22_1 + ', reference=' + this.n22_1 + ', isNullable=' + this.o22_1 + ')';
|
|
@@ -5928,15 +6022,15 @@
|
|
|
5928
6022
|
function IdxAndLength(idx, length) {
|
|
5929
6023
|
idx = idx === VOID ? 0 : idx;
|
|
5930
6024
|
length = length === VOID ? 0 : length;
|
|
5931
|
-
this.
|
|
5932
|
-
this.
|
|
6025
|
+
this.o26_1 = idx;
|
|
6026
|
+
this.p26_1 = length;
|
|
5933
6027
|
}
|
|
5934
6028
|
protoOf(IdxAndLength).toString = function () {
|
|
5935
|
-
return 'IdxAndLength(idx=' + this.
|
|
6029
|
+
return 'IdxAndLength(idx=' + this.o26_1 + ', length=' + this.p26_1 + ')';
|
|
5936
6030
|
};
|
|
5937
6031
|
protoOf(IdxAndLength).hashCode = function () {
|
|
5938
|
-
var result = this.
|
|
5939
|
-
result = imul(result, 31) + this.
|
|
6032
|
+
var result = this.o26_1;
|
|
6033
|
+
result = imul(result, 31) + this.p26_1 | 0;
|
|
5940
6034
|
return result;
|
|
5941
6035
|
};
|
|
5942
6036
|
protoOf(IdxAndLength).equals = function (other) {
|
|
@@ -5945,9 +6039,9 @@
|
|
|
5945
6039
|
if (!(other instanceof IdxAndLength))
|
|
5946
6040
|
return false;
|
|
5947
6041
|
var tmp0_other_with_cast = other instanceof IdxAndLength ? other : THROW_CCE();
|
|
5948
|
-
if (!(this.
|
|
6042
|
+
if (!(this.o26_1 === tmp0_other_with_cast.o26_1))
|
|
5949
6043
|
return false;
|
|
5950
|
-
if (!(this.
|
|
6044
|
+
if (!(this.p26_1 === tmp0_other_with_cast.p26_1))
|
|
5951
6045
|
return false;
|
|
5952
6046
|
return true;
|
|
5953
6047
|
};
|
|
@@ -5959,14 +6053,14 @@
|
|
|
5959
6053
|
this.h25_1 = position;
|
|
5960
6054
|
this.i25_1 = idxAndLength;
|
|
5961
6055
|
}
|
|
5962
|
-
protoOf(Coordinates).
|
|
6056
|
+
protoOf(Coordinates).q26 = function (line, position, idxAndLength) {
|
|
5963
6057
|
return new Coordinates(line, position, idxAndLength);
|
|
5964
6058
|
};
|
|
5965
|
-
protoOf(Coordinates).
|
|
6059
|
+
protoOf(Coordinates).r26 = function (line, position, idxAndLength, $super) {
|
|
5966
6060
|
line = line === VOID ? this.g25_1 : line;
|
|
5967
6061
|
position = position === VOID ? this.h25_1 : position;
|
|
5968
6062
|
idxAndLength = idxAndLength === VOID ? this.i25_1 : idxAndLength;
|
|
5969
|
-
return $super === VOID ? this.
|
|
6063
|
+
return $super === VOID ? this.q26(line, position, idxAndLength) : $super.q26.call(this, line, position, idxAndLength);
|
|
5970
6064
|
};
|
|
5971
6065
|
protoOf(Coordinates).toString = function () {
|
|
5972
6066
|
return 'Coordinates(line=' + this.g25_1 + ', position=' + this.h25_1 + ', idxAndLength=' + this.i25_1 + ')';
|
|
@@ -5996,14 +6090,14 @@
|
|
|
5996
6090
|
this.d25_1 = value;
|
|
5997
6091
|
this.e25_1 = coordinates;
|
|
5998
6092
|
}
|
|
5999
|
-
protoOf(Token).
|
|
6093
|
+
protoOf(Token).s26 = function (type, value, coordinates) {
|
|
6000
6094
|
return new Token(type, value, coordinates);
|
|
6001
6095
|
};
|
|
6002
6096
|
protoOf(Token).k25 = function (type, value, coordinates, $super) {
|
|
6003
6097
|
type = type === VOID ? this.c25_1 : type;
|
|
6004
6098
|
value = value === VOID ? this.d25_1 : value;
|
|
6005
6099
|
coordinates = coordinates === VOID ? this.e25_1 : coordinates;
|
|
6006
|
-
return $super === VOID ? this.
|
|
6100
|
+
return $super === VOID ? this.s26(type, value, coordinates) : $super.s26.call(this, type, value, coordinates);
|
|
6007
6101
|
};
|
|
6008
6102
|
protoOf(Token).toString = function () {
|
|
6009
6103
|
return 'Token(type=' + this.c25_1 + ', value=' + this.d25_1 + ', coordinates=' + this.e25_1 + ')';
|
|
@@ -6029,10 +6123,10 @@
|
|
|
6029
6123
|
return true;
|
|
6030
6124
|
};
|
|
6031
6125
|
function plus_2(_this__u8e3s4, length) {
|
|
6032
|
-
return new IdxAndLength(_this__u8e3s4.
|
|
6126
|
+
return new IdxAndLength(_this__u8e3s4.o26_1 + length | 0, length);
|
|
6033
6127
|
}
|
|
6034
6128
|
function plus_3(_this__u8e3s4, length) {
|
|
6035
|
-
return _this__u8e3s4.
|
|
6129
|
+
return _this__u8e3s4.r26(VOID, _this__u8e3s4.h25_1 + length | 0, plus_2(_this__u8e3s4.i25_1, length));
|
|
6036
6130
|
}
|
|
6037
6131
|
function tokenize(_this__u8e3s4, source) {
|
|
6038
6132
|
return tokenize_0(_this__u8e3s4, source, nonEmptyListOf(new Token(StartOfProgram_getInstance(), '', new Coordinates()), []));
|
|
@@ -6532,6 +6626,29 @@
|
|
|
6532
6626
|
new WsBoolean();
|
|
6533
6627
|
return WsBoolean_instance;
|
|
6534
6628
|
}
|
|
6629
|
+
function WsUnit() {
|
|
6630
|
+
WsUnit_instance = this;
|
|
6631
|
+
}
|
|
6632
|
+
protoOf(WsUnit).toString = function () {
|
|
6633
|
+
return 'WsUnit';
|
|
6634
|
+
};
|
|
6635
|
+
protoOf(WsUnit).hashCode = function () {
|
|
6636
|
+
return 538641116;
|
|
6637
|
+
};
|
|
6638
|
+
protoOf(WsUnit).equals = function (other) {
|
|
6639
|
+
if (this === other)
|
|
6640
|
+
return true;
|
|
6641
|
+
if (!(other instanceof WsUnit))
|
|
6642
|
+
return false;
|
|
6643
|
+
other instanceof WsUnit || THROW_CCE();
|
|
6644
|
+
return true;
|
|
6645
|
+
};
|
|
6646
|
+
var WsUnit_instance;
|
|
6647
|
+
function WsUnit_getInstance() {
|
|
6648
|
+
if (WsUnit_instance == null)
|
|
6649
|
+
new WsUnit();
|
|
6650
|
+
return WsUnit_instance;
|
|
6651
|
+
}
|
|
6535
6652
|
function Arrow() {
|
|
6536
6653
|
Arrow_instance = this;
|
|
6537
6654
|
}
|
|
@@ -6764,7 +6881,7 @@
|
|
|
6764
6881
|
}
|
|
6765
6882
|
function EndOfProgram() {
|
|
6766
6883
|
EndOfProgram_instance = this;
|
|
6767
|
-
this.
|
|
6884
|
+
this.t26_1 = 'EOP';
|
|
6768
6885
|
}
|
|
6769
6886
|
protoOf(EndOfProgram).toString = function () {
|
|
6770
6887
|
return 'EndOfProgram';
|
|
@@ -6897,6 +7014,7 @@
|
|
|
6897
7014
|
protoOf(WsInteger).f25 = name;
|
|
6898
7015
|
protoOf(WsNumber).f25 = name;
|
|
6899
7016
|
protoOf(WsBoolean).f25 = name;
|
|
7017
|
+
protoOf(WsUnit).f25 = name;
|
|
6900
7018
|
protoOf(Arrow).f25 = name;
|
|
6901
7019
|
protoOf(Method_0).f25 = name;
|
|
6902
7020
|
protoOf(CustomRegex).f25 = name;
|
|
@@ -6934,19 +7052,20 @@
|
|
|
6934
7052
|
_.$_$.r = Any;
|
|
6935
7053
|
_.$_$.s = Custom;
|
|
6936
7054
|
_.$_$.t = Primitive;
|
|
6937
|
-
_.$_$.u =
|
|
6938
|
-
_.$_$.v =
|
|
6939
|
-
_.$_$.w =
|
|
6940
|
-
_.$_$.x =
|
|
6941
|
-
_.$_$.y =
|
|
6942
|
-
_.$_$.z =
|
|
6943
|
-
_.$_$.a1 =
|
|
6944
|
-
_.$_$.b1 =
|
|
6945
|
-
_.$_$.c1 =
|
|
6946
|
-
_.$_$.d1 =
|
|
6947
|
-
_.$_$.e1 =
|
|
6948
|
-
_.$_$.f1 =
|
|
6949
|
-
_.$_$.g1 =
|
|
7055
|
+
_.$_$.u = Unit;
|
|
7056
|
+
_.$_$.v = Field;
|
|
7057
|
+
_.$_$.w = Shape;
|
|
7058
|
+
_.$_$.x = Type_0;
|
|
7059
|
+
_.$_$.y = Parser;
|
|
7060
|
+
_.$_$.z = tokenize;
|
|
7061
|
+
_.$_$.a1 = compile;
|
|
7062
|
+
_.$_$.b1 = Logger;
|
|
7063
|
+
_.$_$.c1 = Type_Boolean_getInstance;
|
|
7064
|
+
_.$_$.d1 = Type_Integer_getInstance;
|
|
7065
|
+
_.$_$.e1 = Type_Number_getInstance;
|
|
7066
|
+
_.$_$.f1 = Type_String_getInstance;
|
|
7067
|
+
_.$_$.g1 = Companion_getInstance_4;
|
|
7068
|
+
_.$_$.h1 = Wirespec_getInstance;
|
|
6950
7069
|
//endregion
|
|
6951
7070
|
return _;
|
|
6952
7071
|
}));
|