@flock/wirespec 0.9.21 → 0.9.23

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.21",
3
+ "version": "0.9.23",
4
4
  "main": "wirespec-src-plugin-npm.js",
5
5
  "types": "wirespec-src-plugin-npm.d.ts",
6
6
  "devDependencies": {
@@ -401,7 +401,7 @@
401
401
  }
402
402
  function WirespecSpec() {
403
403
  WirespecSpec_instance = this;
404
- this.v20_1 = listOf([to(Regex_init_$Create$('^type'), WsTypeDef_instance), to(Regex_init_$Create$('^enum'), WsEnumTypeDef_instance), to(Regex_init_$Create$('^endpoint'), WsEndpointDef_instance), to(Regex_init_$Create$('^[^\\S\\r\\n]+'), WhiteSpaceExceptNewLine_instance), to(Regex_init_$Create$('^[\\r\\n]'), NewLine_instance), to(Regex_init_$Create$('^\\{'), LeftCurly_instance), to(Regex_init_$Create$('^\\}'), RightCurly_instance), to(Regex_init_$Create$('^->'), Arrow_instance), to(Regex_init_$Create$('^='), Equals_instance), to(Regex_init_$Create$('^\\|'), Pipe_instance), to(Regex_init_$Create$('^:'), Colon_instance), to(Regex_init_$Create$('^,'), Comma_instance), to(Regex_init_$Create$('^\\?'), QuestionMark_instance), to(Regex_init_$Create$('^#'), Hash_instance), to(Regex_init_$Create$('^\\[\\]'), Brackets_instance), to(Regex_init_$Create$('^String'), WsString_instance), to(Regex_init_$Create$('^Integer'), WsInteger_instance), to(Regex_init_$Create$('^Number'), WsNumber_instance), to(Regex_init_$Create$('^Boolean'), WsBoolean_instance), to(Regex_init_$Create$('^Unit'), WsUnit_instance), to(Regex_init_$Create$('^GET|^POST|^PUT|^DELETE|^OPTIONS|^HEAD|^PATCH|^TRACE'), Method_instance), to(Regex_init_$Create$('^/.*/g'), CustomRegex_instance), to(Regex_init_$Create$('^[1-5][0-9][0-9]'), StatusCode_instance), to(Regex_init_$Create$('^[a-z`][a-zA-Z0-9`]*'), CustomValue_instance), to(Regex_init_$Create$('^[A-Z][a-zA-Z0-9_]*'), CustomType_instance), to(Regex_init_$Create$('^/[a-zA-Z-_]+'), Path_instance), to(Regex_init_$Create$('^\\/\\*(\\*(?!\\/)|[^*])*\\*\\/'), WsComment_instance), to(Regex_init_$Create$('^/'), ForwardSlash_instance), to(Regex_init_$Create$('^.'), Invalid_instance)]);
404
+ this.v20_1 = listOf([to(Regex_init_$Create$('^type'), WsTypeDef_instance), to(Regex_init_$Create$('^enum'), WsEnumTypeDef_instance), to(Regex_init_$Create$('^endpoint'), WsEndpointDef_instance), to(Regex_init_$Create$('^[^\\S\\r\\n]+'), WhiteSpaceExceptNewLine_instance), to(Regex_init_$Create$('^[\\r\\n]'), NewLine_instance), to(Regex_init_$Create$('^\\{'), LeftCurly_instance), to(Regex_init_$Create$('^\\}'), RightCurly_instance), to(Regex_init_$Create$('^->'), Arrow_instance), to(Regex_init_$Create$('^='), Equals_instance), to(Regex_init_$Create$('^\\|'), Pipe_instance), to(Regex_init_$Create$('^:'), Colon_instance), to(Regex_init_$Create$('^,'), Comma_instance), to(Regex_init_$Create$('^\\?'), QuestionMark_instance), to(Regex_init_$Create$('^#'), Hash_instance), to(Regex_init_$Create$('^\\[\\]'), Brackets_instance), to(Regex_init_$Create$('^String'), WsString_instance), to(Regex_init_$Create$('^Integer'), WsInteger_instance), to(Regex_init_$Create$('^Number'), WsNumber_instance), to(Regex_init_$Create$('^Boolean'), WsBoolean_instance), to(Regex_init_$Create$('^Unit'), WsUnit_instance), to(Regex_init_$Create$('^GET|^POST|^PUT|^DELETE|^OPTIONS|^HEAD|^PATCH|^TRACE'), Method_instance), to(Regex_init_$Create$('^/.*/g'), CustomRegex_instance), to(Regex_init_$Create$('^[1-5][0-9][0-9]'), StatusCode_instance), to(Regex_init_$Create$('^[a-z`][a-zA-Z0-9`]*'), CustomValue_instance), to(Regex_init_$Create$('^[A-Z][a-zA-Z0-9_]*'), CustomType_instance), to(Regex_init_$Create$('^/[a-zA-Z0-9-_]+'), Path_instance), to(Regex_init_$Create$('^\\/\\*(\\*(?!\\/)|[^*])*\\*\\/'), WsComment_instance), to(Regex_init_$Create$('^/'), ForwardSlash_instance), to(Regex_init_$Create$('^.'), Invalid_instance)]);
405
405
  }
406
406
  protoOf(WirespecSpec).w20 = function () {
407
407
  return this.v20_1;
@@ -4154,118 +4154,146 @@
4154
4154
  // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointDefinition.<anonymous>.<anonymous>' call
4155
4155
  raise.ck(_this__u8e3s4.v29());
4156
4156
  var method = this_0;
4157
- // Inline function 'kotlin.collections.map' call
4158
- var tmp1_subject = _this__u8e3s4.s29_1.i29_1;
4159
4157
  var tmp_1;
4160
- if (isInterface(tmp1_subject, WirespecType)) {
4161
- var tmp_2 = _this__u8e3s4.s29_1.i29_1;
4162
- tmp_1 = raise.ck(parseReference(_this__u8e3s4, $this, isInterface(tmp_2, WirespecType) ? tmp_2 : THROW_CCE(), _this__u8e3s4.s29_1.h29_1));
4158
+ if (_this__u8e3s4.s29_1.i29_1 instanceof LeftCurly) {
4159
+ // Inline function 'kotlin.also' call
4160
+ // Inline function 'kotlin.contracts.contract' call
4161
+ // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointDefinition.<anonymous>.<anonymous>' call
4162
+ raise.ck(_this__u8e3s4.v29());
4163
+ tmp_1 = true;
4163
4164
  } else {
4164
- tmp_1 = null;
4165
+ tmp_1 = false;
4166
+ }
4167
+ var isDict = tmp_1;
4168
+ // Inline function 'kotlin.collections.map' call
4169
+ // Inline function 'kotlin.also' call
4170
+ var tmp2_subject = _this__u8e3s4.s29_1.i29_1;
4171
+ var tmp_2;
4172
+ if (isInterface(tmp2_subject, WirespecType)) {
4173
+ var tmp_3 = _this__u8e3s4.s29_1.i29_1;
4174
+ tmp_2 = raise.ck(parseReference(_this__u8e3s4, $this, isInterface(tmp_3, WirespecType) ? tmp_3 : THROW_CCE(), _this__u8e3s4.s29_1.h29_1, isDict));
4175
+ } else {
4176
+ tmp_2 = null;
4177
+ }
4178
+ var this_1 = listOf_0(tmp_2);
4179
+ // Inline function 'kotlin.contracts.contract' call
4180
+ // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointDefinition.<anonymous>.<anonymous>' call
4181
+ if (isDict) {
4182
+ if (_this__u8e3s4.s29_1.i29_1 instanceof RightCurly)
4183
+ raise.ck(_this__u8e3s4.v29());
4184
+ else {
4185
+ // Inline function 'kotlin.also' call
4186
+ // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
4187
+ var actual_0 = _this__u8e3s4.s29_1;
4188
+ var this_2 = new WrongTokenException(getKClass(RightCurly), actual_0);
4189
+ // Inline function 'kotlin.contracts.contract' call
4190
+ // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointDefinition.<anonymous>.<anonymous>.<anonymous>' call
4191
+ raise.ck(_this__u8e3s4.v29());
4192
+ raise.bk(this_2);
4193
+ }
4165
4194
  }
4166
- var this_1 = listOf_0(tmp_1);
4167
4195
  // Inline function 'kotlin.collections.mapTo' call
4168
4196
  var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
4169
4197
  var tmp0_iterator = this_1.v();
4170
4198
  while (tmp0_iterator.w()) {
4171
4199
  var item = tmp0_iterator.y();
4172
4200
  // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointDefinition.<anonymous>.<anonymous>' call
4173
- var tmp_3;
4201
+ var tmp_4;
4174
4202
  if (item == null) {
4175
- tmp_3 = null;
4203
+ tmp_4 = null;
4176
4204
  } else {
4177
4205
  // Inline function 'kotlin.let' call
4178
4206
  // Inline function 'kotlin.contracts.contract' call
4179
4207
  // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointDefinition.<anonymous>.<anonymous>.<anonymous>' call
4180
- tmp_3 = new Content_0('application/json', item, false);
4208
+ tmp_4 = new Content_0('application/json', item, false);
4181
4209
  }
4182
- var tmp$ret$4 = new Request(tmp_3);
4183
- destination.s(tmp$ret$4);
4210
+ var tmp$ret$8 = new Request(tmp_4);
4211
+ destination.s(tmp$ret$8);
4184
4212
  }
4185
4213
  var requests = destination;
4186
4214
  // Inline function 'kotlin.apply' call
4187
4215
  // Inline function 'kotlin.collections.mutableListOf' call
4188
- var this_2 = ArrayList_init_$Create$_0();
4216
+ var this_3 = ArrayList_init_$Create$_0();
4189
4217
  // Inline function 'kotlin.contracts.contract' call
4190
4218
  // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointDefinition.<anonymous>.<anonymous>' call
4191
4219
  $l$loop: while (true) {
4192
- var tmp_4;
4193
4220
  var tmp_5;
4194
- var tmp_6 = _this__u8e3s4.s29_1.i29_1;
4195
- if (!(tmp_6 instanceof QuestionMark)) {
4196
- var tmp_7 = _this__u8e3s4.s29_1.i29_1;
4197
- tmp_5 = !(tmp_7 instanceof Hash);
4221
+ var tmp_6;
4222
+ var tmp_7 = _this__u8e3s4.s29_1.i29_1;
4223
+ if (!(tmp_7 instanceof QuestionMark)) {
4224
+ var tmp_8 = _this__u8e3s4.s29_1.i29_1;
4225
+ tmp_6 = !(tmp_8 instanceof Hash);
4198
4226
  } else {
4199
- tmp_5 = false;
4227
+ tmp_6 = false;
4200
4228
  }
4201
- if (tmp_5) {
4202
- var tmp_8 = _this__u8e3s4.s29_1.i29_1;
4203
- tmp_4 = !(tmp_8 instanceof Arrow);
4229
+ if (tmp_6) {
4230
+ var tmp_9 = _this__u8e3s4.s29_1.i29_1;
4231
+ tmp_5 = !(tmp_9 instanceof Arrow);
4204
4232
  } else {
4205
- tmp_4 = false;
4233
+ tmp_5 = false;
4206
4234
  }
4207
- if (!tmp_4) {
4235
+ if (!tmp_5) {
4208
4236
  break $l$loop;
4209
4237
  }
4210
- this_2.s(raise.ck(parseEndpointSegments(_this__u8e3s4, $this)));
4238
+ this_3.s(raise.ck(parseEndpointSegments(_this__u8e3s4, $this)));
4211
4239
  }
4212
- var segments = this_2;
4213
- var tmp_9;
4240
+ var segments = this_3;
4241
+ var tmp_10;
4214
4242
  if (_this__u8e3s4.s29_1.i29_1 instanceof QuestionMark) {
4215
4243
  raise.ck(_this__u8e3s4.v29());
4216
- var tmp_10;
4244
+ var tmp_11;
4217
4245
  if (_this__u8e3s4.s29_1.i29_1 instanceof LeftCurly) {
4218
4246
  // Inline function 'kotlin.with' call
4219
4247
  // Inline function 'kotlin.contracts.contract' call
4220
4248
  // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointDefinition.<anonymous>.<anonymous>' call
4221
4249
  var $this$with = $this.z29_1;
4222
- tmp_10 = raise.ck($this$with.b2a(_this__u8e3s4)).l27_1;
4250
+ tmp_11 = raise.ck($this$with.b2a(_this__u8e3s4)).l27_1;
4223
4251
  } else {
4224
4252
  // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
4225
- var actual_0 = _this__u8e3s4.s29_1;
4226
- var tmp$ret$11 = new WrongTokenException(getKClass(LeftCurly), actual_0);
4227
- raise.bk(tmp$ret$11);
4253
+ var actual_1 = _this__u8e3s4.s29_1;
4254
+ var tmp$ret$15 = new WrongTokenException(getKClass(LeftCurly), actual_1);
4255
+ raise.bk(tmp$ret$15);
4228
4256
  }
4229
- tmp_9 = tmp_10;
4257
+ tmp_10 = tmp_11;
4230
4258
  } else {
4231
- tmp_9 = emptyList();
4259
+ tmp_10 = emptyList();
4232
4260
  }
4233
- var queryParams = tmp_9;
4234
- var tmp_11;
4261
+ var queryParams = tmp_10;
4262
+ var tmp_12;
4235
4263
  if (_this__u8e3s4.s29_1.i29_1 instanceof Hash) {
4236
4264
  raise.ck(_this__u8e3s4.v29());
4237
- var tmp_12;
4265
+ var tmp_13;
4238
4266
  if (_this__u8e3s4.s29_1.i29_1 instanceof LeftCurly) {
4239
4267
  // Inline function 'kotlin.with' call
4240
4268
  // Inline function 'kotlin.contracts.contract' call
4241
4269
  // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointDefinition.<anonymous>.<anonymous>' call
4242
4270
  var $this$with_0 = $this.z29_1;
4243
- tmp_12 = raise.ck($this$with_0.b2a(_this__u8e3s4)).l27_1;
4271
+ tmp_13 = raise.ck($this$with_0.b2a(_this__u8e3s4)).l27_1;
4244
4272
  } else {
4245
4273
  // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
4246
- var actual_1 = _this__u8e3s4.s29_1;
4247
- var tmp$ret$14 = new WrongTokenException(getKClass(LeftCurly), actual_1);
4248
- raise.bk(tmp$ret$14);
4274
+ var actual_2 = _this__u8e3s4.s29_1;
4275
+ var tmp$ret$18 = new WrongTokenException(getKClass(LeftCurly), actual_2);
4276
+ raise.bk(tmp$ret$18);
4249
4277
  }
4250
- tmp_11 = tmp_12;
4278
+ tmp_12 = tmp_13;
4251
4279
  } else {
4252
- tmp_11 = emptyList();
4280
+ tmp_12 = emptyList();
4253
4281
  }
4254
- var headers = tmp_11;
4282
+ var headers = tmp_12;
4255
4283
  if (_this__u8e3s4.s29_1.i29_1 instanceof Arrow)
4256
4284
  raise.ck(_this__u8e3s4.v29());
4257
4285
  else {
4258
4286
  // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
4259
- var actual_2 = _this__u8e3s4.s29_1;
4260
- var tmp$ret$15 = new WrongTokenException(getKClass(Arrow), actual_2);
4261
- raise.bk(tmp$ret$15);
4287
+ var actual_3 = _this__u8e3s4.s29_1;
4288
+ var tmp$ret$19 = new WrongTokenException(getKClass(Arrow), actual_3);
4289
+ raise.bk(tmp$ret$19);
4262
4290
  }
4263
4291
  // Inline function 'kotlin.also' call
4264
4292
  if (!(_this__u8e3s4.s29_1.i29_1 instanceof LeftCurly)) {
4265
4293
  // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
4266
- var actual_3 = _this__u8e3s4.s29_1;
4267
- var tmp$ret$16 = new WrongTokenException(getKClass(LeftCurly), actual_3);
4268
- raise.bk(tmp$ret$16);
4294
+ var actual_4 = _this__u8e3s4.s29_1;
4295
+ var tmp$ret$20 = new WrongTokenException(getKClass(LeftCurly), actual_4);
4296
+ raise.bk(tmp$ret$20);
4269
4297
  }
4270
4298
  // Inline function 'kotlin.contracts.contract' call
4271
4299
  // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointDefinition.<anonymous>.<anonymous>' call
@@ -4276,13 +4304,13 @@
4276
4304
  // Inline function 'arrow.core.raise.either.<anonymous>' call
4277
4305
  tmp = new Right(res);
4278
4306
  } catch ($p) {
4279
- var tmp_13;
4307
+ var tmp_14;
4280
4308
  if ($p instanceof CancellationException) {
4281
4309
  var e = $p;
4282
4310
  raise.zj();
4283
4311
  // Inline function 'arrow.core.raise.either.<anonymous>' call
4284
4312
  var it = raisedOrRethrow(e, raise);
4285
- tmp_13 = new Left(it);
4313
+ tmp_14 = new Left(it);
4286
4314
  } else {
4287
4315
  if ($p instanceof Error) {
4288
4316
  var e_0 = $p;
@@ -4292,7 +4320,7 @@
4292
4320
  throw $p;
4293
4321
  }
4294
4322
  }
4295
- tmp = tmp_13;
4323
+ tmp = tmp_14;
4296
4324
  }
4297
4325
  return tmp;
4298
4326
  }
@@ -4396,38 +4424,67 @@
4396
4424
  var tmp$ret$3 = new WrongTokenException(getKClass(Colon), actual_1);
4397
4425
  raise.bk(tmp$ret$3);
4398
4426
  }
4399
- var tmp3_subject = _this__u8e3s4.s29_1.i29_1;
4400
4427
  var tmp_1;
4401
- if (isInterface(tmp3_subject, WirespecType)) {
4402
- var tmp_2 = _this__u8e3s4.s29_1.i29_1;
4403
- tmp_1 = raise.ck(parseReference(_this__u8e3s4, $this, isInterface(tmp_2, WirespecType) ? tmp_2 : THROW_CCE(), _this__u8e3s4.s29_1.h29_1));
4428
+ if (_this__u8e3s4.s29_1.i29_1 instanceof LeftCurly) {
4429
+ // Inline function 'kotlin.also' call
4430
+ // Inline function 'kotlin.contracts.contract' call
4431
+ // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointSegmentParam.<anonymous>.<anonymous>' call
4432
+ raise.ck(_this__u8e3s4.v29());
4433
+ tmp_1 = true;
4434
+ } else {
4435
+ tmp_1 = false;
4436
+ }
4437
+ var isDict = tmp_1;
4438
+ // Inline function 'kotlin.also' call
4439
+ var tmp4_subject = _this__u8e3s4.s29_1.i29_1;
4440
+ var tmp_2;
4441
+ if (isInterface(tmp4_subject, WirespecType)) {
4442
+ var tmp_3 = _this__u8e3s4.s29_1.i29_1;
4443
+ tmp_2 = raise.ck(parseReference(_this__u8e3s4, $this, isInterface(tmp_3, WirespecType) ? tmp_3 : THROW_CCE(), _this__u8e3s4.s29_1.h29_1, isDict));
4404
4444
  } else {
4405
4445
  // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
4406
4446
  var actual_2 = _this__u8e3s4.s29_1;
4407
- var tmp$ret$4 = new WrongTokenException(getKClass(WirespecType), actual_2);
4408
- raise.bk(tmp$ret$4);
4447
+ var tmp$ret$5 = new WrongTokenException(getKClass(WirespecType), actual_2);
4448
+ raise.bk(tmp$ret$5);
4409
4449
  }
4410
- var reference = tmp_1;
4450
+ var this_1 = tmp_2;
4451
+ // Inline function 'kotlin.contracts.contract' call
4452
+ // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointSegmentParam.<anonymous>.<anonymous>' call
4453
+ if (isDict) {
4454
+ if (_this__u8e3s4.s29_1.i29_1 instanceof RightCurly)
4455
+ raise.ck(_this__u8e3s4.v29());
4456
+ else {
4457
+ // Inline function 'kotlin.also' call
4458
+ // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
4459
+ var actual_3 = _this__u8e3s4.s29_1;
4460
+ var this_2 = new WrongTokenException(getKClass(RightCurly), actual_3);
4461
+ // Inline function 'kotlin.contracts.contract' call
4462
+ // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointSegmentParam.<anonymous>.<anonymous>.<anonymous>' call
4463
+ raise.ck(_this__u8e3s4.v29());
4464
+ raise.bk(this_2);
4465
+ }
4466
+ }
4467
+ var reference = this_1;
4411
4468
  if (_this__u8e3s4.s29_1.i29_1 instanceof RightCurly)
4412
4469
  raise.ck(_this__u8e3s4.v29());
4413
4470
  else {
4414
4471
  // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
4415
- var actual_3 = _this__u8e3s4.s29_1;
4416
- var tmp$ret$5 = new WrongTokenException(getKClass(RightCurly), actual_3);
4417
- raise.bk(tmp$ret$5);
4472
+ var actual_4 = _this__u8e3s4.s29_1;
4473
+ var tmp$ret$9 = new WrongTokenException(getKClass(RightCurly), actual_4);
4474
+ raise.bk(tmp$ret$9);
4418
4475
  }
4419
4476
  var res = new Param(identifier, reference);
4420
4477
  raise.zj();
4421
4478
  // Inline function 'arrow.core.raise.either.<anonymous>' call
4422
4479
  tmp = new Right(res);
4423
4480
  } catch ($p) {
4424
- var tmp_3;
4481
+ var tmp_4;
4425
4482
  if ($p instanceof CancellationException) {
4426
4483
  var e = $p;
4427
4484
  raise.zj();
4428
4485
  // Inline function 'arrow.core.raise.either.<anonymous>' call
4429
4486
  var it = raisedOrRethrow(e, raise);
4430
- tmp_3 = new Left(it);
4487
+ tmp_4 = new Left(it);
4431
4488
  } else {
4432
4489
  if ($p instanceof Error) {
4433
4490
  var e_0 = $p;
@@ -4437,7 +4494,7 @@
4437
4494
  throw $p;
4438
4495
  }
4439
4496
  }
4440
- tmp = tmp_3;
4497
+ tmp = tmp_4;
4441
4498
  }
4442
4499
  return tmp;
4443
4500
  }
@@ -4525,30 +4582,59 @@
4525
4582
  }
4526
4583
  raise.ck(_this__u8e3s4.v29());
4527
4584
  $this.x29(_this__u8e3s4.s29_1);
4528
- var tmp1_subject = _this__u8e3s4.s29_1.i29_1;
4529
4585
  var tmp_0;
4530
- if (isInterface(tmp1_subject, WirespecType)) {
4531
- var tmp_1 = _this__u8e3s4.s29_1.i29_1;
4532
- tmp_0 = raise.ck(parseContent(_this__u8e3s4, $this, isInterface(tmp_1, WirespecType) ? tmp_1 : THROW_CCE(), _this__u8e3s4.s29_1.h29_1));
4586
+ if (_this__u8e3s4.s29_1.i29_1 instanceof LeftCurly) {
4587
+ // Inline function 'kotlin.also' call
4588
+ // Inline function 'kotlin.contracts.contract' call
4589
+ // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointResponse.<anonymous>.<anonymous>' call
4590
+ raise.ck(_this__u8e3s4.v29());
4591
+ tmp_0 = true;
4592
+ } else {
4593
+ tmp_0 = false;
4594
+ }
4595
+ var isDict = tmp_0;
4596
+ // Inline function 'kotlin.also' call
4597
+ var tmp2_subject = _this__u8e3s4.s29_1.i29_1;
4598
+ var tmp_1;
4599
+ if (isInterface(tmp2_subject, WirespecType)) {
4600
+ var tmp_2 = _this__u8e3s4.s29_1.i29_1;
4601
+ tmp_1 = raise.ck(parseContent(_this__u8e3s4, $this, isInterface(tmp_2, WirespecType) ? tmp_2 : THROW_CCE(), _this__u8e3s4.s29_1.h29_1, isDict));
4533
4602
  } else {
4534
4603
  // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
4535
4604
  var actual_0 = _this__u8e3s4.s29_1;
4536
- var tmp$ret$1 = new WrongTokenException(getKClass(WirespecType), actual_0);
4537
- raise.bk(tmp$ret$1);
4605
+ var tmp$ret$2 = new WrongTokenException(getKClass(WirespecType), actual_0);
4606
+ raise.bk(tmp$ret$2);
4538
4607
  }
4539
- var content = tmp_0;
4608
+ var this_0 = tmp_1;
4609
+ // Inline function 'kotlin.contracts.contract' call
4610
+ // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointResponse.<anonymous>.<anonymous>' call
4611
+ if (isDict) {
4612
+ if (_this__u8e3s4.s29_1.i29_1 instanceof RightCurly)
4613
+ raise.ck(_this__u8e3s4.v29());
4614
+ else {
4615
+ // Inline function 'kotlin.also' call
4616
+ // Inline function 'community.flock.wirespec.compiler.core.exceptions.Companion.invoke' call
4617
+ var actual_1 = _this__u8e3s4.s29_1;
4618
+ var this_1 = new WrongTokenException(getKClass(RightCurly), actual_1);
4619
+ // Inline function 'kotlin.contracts.contract' call
4620
+ // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseEndpointResponse.<anonymous>.<anonymous>.<anonymous>' call
4621
+ raise.ck(_this__u8e3s4.v29());
4622
+ raise.bk(this_1);
4623
+ }
4624
+ }
4625
+ var content = this_0;
4540
4626
  var res = new Response(statusCode, emptyList(), content);
4541
4627
  raise.zj();
4542
4628
  // Inline function 'arrow.core.raise.either.<anonymous>' call
4543
4629
  tmp = new Right(res);
4544
4630
  } catch ($p) {
4545
- var tmp_2;
4631
+ var tmp_3;
4546
4632
  if ($p instanceof CancellationException) {
4547
4633
  var e = $p;
4548
4634
  raise.zj();
4549
4635
  // Inline function 'arrow.core.raise.either.<anonymous>' call
4550
4636
  var it = raisedOrRethrow(e, raise);
4551
- tmp_2 = new Left(it);
4637
+ tmp_3 = new Left(it);
4552
4638
  } else {
4553
4639
  if ($p instanceof Error) {
4554
4640
  var e_0 = $p;
@@ -4558,11 +4644,11 @@
4558
4644
  throw $p;
4559
4645
  }
4560
4646
  }
4561
- tmp = tmp_2;
4647
+ tmp = tmp_3;
4562
4648
  }
4563
4649
  return tmp;
4564
4650
  }
4565
- function parseContent(_this__u8e3s4, $this, wsType, value) {
4651
+ function parseContent(_this__u8e3s4, $this, wsType, value, isDict) {
4566
4652
  // Inline function 'arrow.core.raise.either' call
4567
4653
  // Inline function 'arrow.core.raise.fold' call
4568
4654
  // Inline function 'kotlin.contracts.contract' call
@@ -4574,7 +4660,7 @@
4574
4660
  // Inline function 'arrow.core.raise.either.<anonymous>' call
4575
4661
  // Inline function 'community.flock.wirespec.compiler.core.parse.EndpointParser.parseContent.<anonymous>' call
4576
4662
  $this.x29(_this__u8e3s4.s29_1);
4577
- var reference = raise.ck(parseReference(_this__u8e3s4, $this, wsType, value));
4663
+ var reference = raise.ck(parseReference(_this__u8e3s4, $this, wsType, value, isDict));
4578
4664
  var tmp_0;
4579
4665
  if (reference instanceof Unit) {
4580
4666
  tmp_0 = null;
@@ -4606,7 +4692,7 @@
4606
4692
  }
4607
4693
  return tmp;
4608
4694
  }
4609
- function parseReference(_this__u8e3s4, $this, wsType, value) {
4695
+ function parseReference(_this__u8e3s4, $this, wsType, value, isDict) {
4610
4696
  // Inline function 'arrow.core.raise.either' call
4611
4697
  // Inline function 'arrow.core.raise.fold' call
4612
4698
  // Inline function 'kotlin.contracts.contract' call
@@ -4630,16 +4716,16 @@
4630
4716
  var isIterable = this_0;
4631
4717
  var tmp_1;
4632
4718
  if (wsType instanceof WsString) {
4633
- tmp_1 = new Primitive_0(Type_String_getInstance(), isIterable);
4719
+ tmp_1 = new Primitive_0(Type_String_getInstance(), isIterable, isDict);
4634
4720
  } else {
4635
4721
  if (wsType instanceof WsInteger) {
4636
- tmp_1 = new Primitive_0(Type_Integer_getInstance(), isIterable);
4722
+ tmp_1 = new Primitive_0(Type_Integer_getInstance(), isIterable, isDict);
4637
4723
  } else {
4638
4724
  if (wsType instanceof WsNumber) {
4639
- tmp_1 = new Primitive_0(Type_Number_getInstance(), isIterable);
4725
+ tmp_1 = new Primitive_0(Type_Number_getInstance(), isIterable, isDict);
4640
4726
  } else {
4641
4727
  if (wsType instanceof WsBoolean) {
4642
- tmp_1 = new Primitive_0(Type_Boolean_getInstance(), isIterable);
4728
+ tmp_1 = new Primitive_0(Type_Boolean_getInstance(), isIterable, isDict);
4643
4729
  } else {
4644
4730
  if (wsType instanceof WsUnit) {
4645
4731
  tmp_1 = new Unit(isIterable);