@flock/wirespec 0.9.9 → 0.9.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flock/wirespec",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "main": "wirespec-src-plugin-npm.js",
5
5
  "types": "wirespec-src-plugin-npm.d.ts",
6
6
  "devDependencies": {
@@ -5546,10 +5546,10 @@
5546
5546
  Type_initEntries();
5547
5547
  return Type_Boolean_instance;
5548
5548
  }
5549
- function Any(isIterable, isMap) {
5550
- isMap = isMap === VOID ? false : isMap;
5549
+ function Any(isIterable, isDictionary) {
5550
+ isDictionary = isDictionary === VOID ? false : isDictionary;
5551
5551
  this.u29_1 = isIterable;
5552
- this.v29_1 = isMap;
5552
+ this.v29_1 = isDictionary;
5553
5553
  this.w29_1 = 'Any';
5554
5554
  }
5555
5555
  protoOf(Any).t20 = function () {
@@ -5561,16 +5561,16 @@
5561
5561
  protoOf(Any).p2 = function () {
5562
5562
  return this.w29_1;
5563
5563
  };
5564
- protoOf(Any).x29 = function (isIterable, isMap) {
5565
- return new Any(isIterable, isMap);
5564
+ protoOf(Any).x29 = function (isIterable, isDictionary) {
5565
+ return new Any(isIterable, isDictionary);
5566
5566
  };
5567
- protoOf(Any).y29 = function (isIterable, isMap, $super) {
5567
+ protoOf(Any).y29 = function (isIterable, isDictionary, $super) {
5568
5568
  isIterable = isIterable === VOID ? this.u29_1 : isIterable;
5569
- isMap = isMap === VOID ? this.v29_1 : isMap;
5570
- return $super === VOID ? this.x29(isIterable, isMap) : $super.x29.call(this, isIterable, isMap);
5569
+ isDictionary = isDictionary === VOID ? this.v29_1 : isDictionary;
5570
+ return $super === VOID ? this.x29(isIterable, isDictionary) : $super.x29.call(this, isIterable, isDictionary);
5571
5571
  };
5572
5572
  protoOf(Any).toString = function () {
5573
- return 'Any(isIterable=' + this.u29_1 + ', isMap=' + this.v29_1 + ')';
5573
+ return 'Any(isIterable=' + this.u29_1 + ', isDictionary=' + this.v29_1 + ')';
5574
5574
  };
5575
5575
  protoOf(Any).hashCode = function () {
5576
5576
  var result = this.u29_1 | 0;
@@ -5589,10 +5589,10 @@
5589
5589
  return false;
5590
5590
  return true;
5591
5591
  };
5592
- function Unit(isIterable, isMap) {
5593
- isMap = isMap === VOID ? false : isMap;
5592
+ function Unit(isIterable, isDictionary) {
5593
+ isDictionary = isDictionary === VOID ? false : isDictionary;
5594
5594
  this.z29_1 = isIterable;
5595
- this.a2a_1 = isMap;
5595
+ this.a2a_1 = isDictionary;
5596
5596
  this.b2a_1 = 'Unit';
5597
5597
  }
5598
5598
  protoOf(Unit).t20 = function () {
@@ -5604,16 +5604,16 @@
5604
5604
  protoOf(Unit).p2 = function () {
5605
5605
  return this.b2a_1;
5606
5606
  };
5607
- protoOf(Unit).x29 = function (isIterable, isMap) {
5608
- return new Unit(isIterable, isMap);
5607
+ protoOf(Unit).x29 = function (isIterable, isDictionary) {
5608
+ return new Unit(isIterable, isDictionary);
5609
5609
  };
5610
- protoOf(Unit).c2a = function (isIterable, isMap, $super) {
5610
+ protoOf(Unit).c2a = function (isIterable, isDictionary, $super) {
5611
5611
  isIterable = isIterable === VOID ? this.z29_1 : isIterable;
5612
- isMap = isMap === VOID ? this.a2a_1 : isMap;
5613
- return $super === VOID ? this.x29(isIterable, isMap) : $super.x29.call(this, isIterable, isMap);
5612
+ isDictionary = isDictionary === VOID ? this.a2a_1 : isDictionary;
5613
+ return $super === VOID ? this.x29(isIterable, isDictionary) : $super.x29.call(this, isIterable, isDictionary);
5614
5614
  };
5615
5615
  protoOf(Unit).toString = function () {
5616
- return 'Unit(isIterable=' + this.z29_1 + ', isMap=' + this.a2a_1 + ')';
5616
+ return 'Unit(isIterable=' + this.z29_1 + ', isDictionary=' + this.a2a_1 + ')';
5617
5617
  };
5618
5618
  protoOf(Unit).hashCode = function () {
5619
5619
  var result = this.z29_1 | 0;
@@ -5632,11 +5632,11 @@
5632
5632
  return false;
5633
5633
  return true;
5634
5634
  };
5635
- function Custom_0(value, isIterable, isMap) {
5636
- isMap = isMap === VOID ? false : isMap;
5635
+ function Custom_0(value, isIterable, isDictionary) {
5636
+ isDictionary = isDictionary === VOID ? false : isDictionary;
5637
5637
  this.d2a_1 = value;
5638
5638
  this.e2a_1 = isIterable;
5639
- this.f2a_1 = isMap;
5639
+ this.f2a_1 = isDictionary;
5640
5640
  }
5641
5641
  protoOf(Custom_0).p2 = function () {
5642
5642
  return this.d2a_1;
@@ -5647,17 +5647,17 @@
5647
5647
  protoOf(Custom_0).l28 = function () {
5648
5648
  return this.f2a_1;
5649
5649
  };
5650
- protoOf(Custom_0).g2a = function (value, isIterable, isMap) {
5651
- return new Custom_0(value, isIterable, isMap);
5650
+ protoOf(Custom_0).g2a = function (value, isIterable, isDictionary) {
5651
+ return new Custom_0(value, isIterable, isDictionary);
5652
5652
  };
5653
- protoOf(Custom_0).h2a = function (value, isIterable, isMap, $super) {
5653
+ protoOf(Custom_0).h2a = function (value, isIterable, isDictionary, $super) {
5654
5654
  value = value === VOID ? this.d2a_1 : value;
5655
5655
  isIterable = isIterable === VOID ? this.e2a_1 : isIterable;
5656
- isMap = isMap === VOID ? this.f2a_1 : isMap;
5657
- return $super === VOID ? this.g2a(value, isIterable, isMap) : $super.g2a.call(this, value, isIterable, isMap);
5656
+ isDictionary = isDictionary === VOID ? this.f2a_1 : isDictionary;
5657
+ return $super === VOID ? this.g2a(value, isIterable, isDictionary) : $super.g2a.call(this, value, isIterable, isDictionary);
5658
5658
  };
5659
5659
  protoOf(Custom_0).toString = function () {
5660
- return 'Custom(value=' + this.d2a_1 + ', isIterable=' + this.e2a_1 + ', isMap=' + this.f2a_1 + ')';
5660
+ return 'Custom(value=' + this.d2a_1 + ', isIterable=' + this.e2a_1 + ', isDictionary=' + this.f2a_1 + ')';
5661
5661
  };
5662
5662
  protoOf(Custom_0).hashCode = function () {
5663
5663
  var result = getStringHashCode(this.d2a_1);
@@ -5679,12 +5679,12 @@
5679
5679
  return false;
5680
5680
  return true;
5681
5681
  };
5682
- function Primitive_0(type, isIterable, isMap) {
5682
+ function Primitive_0(type, isIterable, isDictionary) {
5683
5683
  isIterable = isIterable === VOID ? false : isIterable;
5684
- isMap = isMap === VOID ? false : isMap;
5684
+ isDictionary = isDictionary === VOID ? false : isDictionary;
5685
5685
  this.e27_1 = type;
5686
5686
  this.f27_1 = isIterable;
5687
- this.g27_1 = isMap;
5687
+ this.g27_1 = isDictionary;
5688
5688
  this.h27_1 = this.e27_1.c9_1;
5689
5689
  }
5690
5690
  protoOf(Primitive_0).t20 = function () {
@@ -5696,17 +5696,17 @@
5696
5696
  protoOf(Primitive_0).p2 = function () {
5697
5697
  return this.h27_1;
5698
5698
  };
5699
- protoOf(Primitive_0).i2a = function (type, isIterable, isMap) {
5700
- return new Primitive_0(type, isIterable, isMap);
5699
+ protoOf(Primitive_0).i2a = function (type, isIterable, isDictionary) {
5700
+ return new Primitive_0(type, isIterable, isDictionary);
5701
5701
  };
5702
- protoOf(Primitive_0).j2a = function (type, isIterable, isMap, $super) {
5702
+ protoOf(Primitive_0).j2a = function (type, isIterable, isDictionary, $super) {
5703
5703
  type = type === VOID ? this.e27_1 : type;
5704
5704
  isIterable = isIterable === VOID ? this.f27_1 : isIterable;
5705
- isMap = isMap === VOID ? this.g27_1 : isMap;
5706
- return $super === VOID ? this.i2a(type, isIterable, isMap) : $super.i2a.call(this, type, isIterable, isMap);
5705
+ isDictionary = isDictionary === VOID ? this.g27_1 : isDictionary;
5706
+ return $super === VOID ? this.i2a(type, isIterable, isDictionary) : $super.i2a.call(this, type, isIterable, isDictionary);
5707
5707
  };
5708
5708
  protoOf(Primitive_0).toString = function () {
5709
- return 'Primitive(type=' + this.e27_1 + ', isIterable=' + this.f27_1 + ', isMap=' + this.g27_1 + ')';
5709
+ return 'Primitive(type=' + this.e27_1 + ', isIterable=' + this.f27_1 + ', isDictionary=' + this.g27_1 + ')';
5710
5710
  };
5711
5711
  protoOf(Primitive_0).hashCode = function () {
5712
5712
  var result = this.e27_1.hashCode();
@@ -6392,41 +6392,71 @@
6392
6392
  raise.q1z(_this__u8e3s4.i29());
6393
6393
  raise.p1z(tmp2_also);
6394
6394
  }
6395
- var type = _this__u8e3s4.f29_1.v28_1;
6396
6395
  var tmp_0;
6396
+ if (_this__u8e3s4.f29_1.v28_1 instanceof LeftCurly) {
6397
+ // Inline function 'kotlin.also' call
6398
+ // Inline function 'kotlin.contracts.contract' call
6399
+ // Inline function 'community.flock.wirespec.compiler.core.parse.TypeParser.parseField.<anonymous>.<anonymous>' call
6400
+ raise.q1z(_this__u8e3s4.i29());
6401
+ tmp_0 = true;
6402
+ } else {
6403
+ tmp_0 = false;
6404
+ }
6405
+ var isDict = tmp_0;
6406
+ var type = _this__u8e3s4.f29_1.v28_1;
6407
+ var tmp_1;
6397
6408
  if (isInterface(type, WirespecType)) {
6398
- var tmp_1 = raise.q1z(parseFieldValue(_this__u8e3s4, $this, type, _this__u8e3s4.f29_1.u28_1));
6399
6409
  // Inline function 'kotlin.also' call
6400
- var tmp_2 = _this__u8e3s4.f29_1.v28_1;
6401
- var tmp3_also = tmp_2 instanceof QuestionMark;
6410
+ var tmp_2 = raise.q1z(parseFieldValue(_this__u8e3s4, $this, type, _this__u8e3s4.f29_1.u28_1, isDict));
6411
+ // Inline function 'kotlin.also' call
6412
+ var tmp_3 = _this__u8e3s4.f29_1.v28_1;
6413
+ var tmp3_also = tmp_3 instanceof QuestionMark;
6402
6414
  // Inline function 'kotlin.contracts.contract' call
6403
6415
  // Inline function 'community.flock.wirespec.compiler.core.parse.TypeParser.parseField.<anonymous>.<anonymous>' call
6404
6416
  if (tmp3_also)
6405
6417
  raise.q1z(_this__u8e3s4.i29());
6406
- tmp_0 = new Field(identifier, tmp_1, tmp3_also);
6418
+ var tmp4_also = new Field(identifier, tmp_2, tmp3_also);
6419
+ // Inline function 'kotlin.contracts.contract' call
6420
+ // Inline function 'community.flock.wirespec.compiler.core.parse.TypeParser.parseField.<anonymous>.<anonymous>' call
6421
+ if (isDict) {
6422
+ if (_this__u8e3s4.f29_1.v28_1 instanceof RightCurly)
6423
+ raise.q1z(_this__u8e3s4.i29());
6424
+ else {
6425
+ // Inline function 'kotlin.also' call
6426
+ // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
6427
+ Companion_getInstance_5();
6428
+ var tmp1_invoke_0 = _this__u8e3s4.f29_1;
6429
+ var tmp2_also_0 = new WrongTokenException(getKClass(RightCurly), tmp1_invoke_0);
6430
+ // Inline function 'kotlin.contracts.contract' call
6431
+ // Inline function 'community.flock.wirespec.compiler.core.parse.TypeParser.parseField.<anonymous>.<anonymous>.<anonymous>' call
6432
+ raise.q1z(_this__u8e3s4.i29());
6433
+ raise.p1z(tmp2_also_0);
6434
+ }
6435
+ }
6436
+ tmp_1 = tmp4_also;
6407
6437
  } else {
6408
6438
  // Inline function 'kotlin.also' call
6409
6439
  // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
6410
6440
  Companion_getInstance_5();
6411
- var tmp5_invoke = _this__u8e3s4.f29_1;
6412
- var tmp6_also = new WrongTokenException(getKClass(CustomType), tmp5_invoke);
6441
+ var tmp6_invoke = _this__u8e3s4.f29_1;
6442
+ var tmp7_also = new WrongTokenException(getKClass(CustomType), tmp6_invoke);
6413
6443
  // Inline function 'kotlin.contracts.contract' call
6414
6444
  // Inline function 'community.flock.wirespec.compiler.core.parse.TypeParser.parseField.<anonymous>.<anonymous>' call
6415
6445
  raise.q1z(_this__u8e3s4.i29());
6416
- raise.p1z(tmp6_also);
6446
+ raise.p1z(tmp7_also);
6417
6447
  }
6418
- var res = tmp_0;
6448
+ var res = tmp_1;
6419
6449
  raise.n1z();
6420
6450
  // Inline function 'arrow.core.raise.either.<anonymous>' call
6421
6451
  tmp = new Right(res);
6422
6452
  } catch ($p) {
6423
- var tmp_3;
6453
+ var tmp_4;
6424
6454
  if ($p instanceof CancellationException) {
6425
6455
  var e = $p;
6426
6456
  raise.n1z();
6427
6457
  // Inline function 'arrow.core.raise.either.<anonymous>' call
6428
6458
  var tmp0_anonymous = raisedOrRethrow(e, raise);
6429
- tmp_3 = new Left(tmp0_anonymous);
6459
+ tmp_4 = new Left(tmp0_anonymous);
6430
6460
  } else {
6431
6461
  if ($p instanceof Error) {
6432
6462
  var e_0 = $p;
@@ -6436,11 +6466,11 @@
6436
6466
  throw $p;
6437
6467
  }
6438
6468
  }
6439
- tmp = tmp_3;
6469
+ tmp = tmp_4;
6440
6470
  }
6441
6471
  return tmp;
6442
6472
  }
6443
- function parseFieldValue(_this__u8e3s4, $this, wsType, value) {
6473
+ function parseFieldValue(_this__u8e3s4, $this, wsType, value, isDict) {
6444
6474
  // Inline function 'arrow.core.raise.either' call
6445
6475
  // Inline function 'arrow.core.raise.fold' call
6446
6476
  // Inline function 'kotlin.contracts.contract' call
@@ -6464,23 +6494,23 @@
6464
6494
  var isIterable = tmp0_also;
6465
6495
  var tmp_1;
6466
6496
  if (wsType instanceof WsString) {
6467
- tmp_1 = new Primitive_0(Type_String_getInstance(), isIterable);
6497
+ tmp_1 = new Primitive_0(Type_String_getInstance(), isIterable, isDict);
6468
6498
  } else {
6469
6499
  if (wsType instanceof WsInteger) {
6470
- tmp_1 = new Primitive_0(Type_Integer_getInstance(), isIterable);
6500
+ tmp_1 = new Primitive_0(Type_Integer_getInstance(), isIterable, isDict);
6471
6501
  } else {
6472
6502
  if (wsType instanceof WsNumber) {
6473
- tmp_1 = new Primitive_0(Type_Number_getInstance(), isIterable);
6503
+ tmp_1 = new Primitive_0(Type_Number_getInstance(), isIterable, isDict);
6474
6504
  } else {
6475
6505
  if (wsType instanceof WsBoolean) {
6476
- tmp_1 = new Primitive_0(Type_Boolean_getInstance(), isIterable);
6506
+ tmp_1 = new Primitive_0(Type_Boolean_getInstance(), isIterable, isDict);
6477
6507
  } else {
6478
6508
  if (wsType instanceof WsUnit) {
6479
- tmp_1 = new Unit(isIterable);
6509
+ tmp_1 = new Unit(isIterable, isDict);
6480
6510
  } else {
6481
6511
  if (wsType instanceof CustomType) {
6482
6512
  raise.q1z(_this__u8e3s4.p29(previousToken));
6483
- tmp_1 = new Custom_0(value, isIterable);
6513
+ tmp_1 = new Custom_0(value, isIterable, isDict);
6484
6514
  } else {
6485
6515
  noWhenBranchMatchedException();
6486
6516
  }