kaitai-struct-compiler 0.10.0-SNAPSHOT20211114.125610.9878485e → 0.10.0-SNAPSHOT20220317.110343.7ff2eda3

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.
Files changed (2) hide show
  1. package/kaitai-struct-compiler.js +1821 -1599
  2. package/package.json +1 -1
@@ -4104,6 +4104,7 @@ function $m_Lio_kaitai_struct_TypeProcessor$() {
4104
4104
  /** @constructor */
4105
4105
  function $c_Lio_kaitai_struct_Utils$() {
4106
4106
  $c_O.call(this);
4107
+ this.MAX$undUINT32$1 = null;
4107
4108
  this.MAX$undUINT64$1 = null;
4108
4109
  this.RDecimal$1 = null;
4109
4110
  this.RHex$1 = null
@@ -4117,6 +4118,7 @@ function $h_Lio_kaitai_struct_Utils$() {
4117
4118
  $h_Lio_kaitai_struct_Utils$.prototype = $c_Lio_kaitai_struct_Utils$.prototype;
4118
4119
  $c_Lio_kaitai_struct_Utils$.prototype.init___ = (function() {
4119
4120
  $n_Lio_kaitai_struct_Utils$ = this;
4121
+ this.MAX$undUINT32$1 = $m_s_package$().BigInt__s_math_BigInt$().apply__T__s_math_BigInt("4294967295");
4120
4122
  this.MAX$undUINT64$1 = $m_s_package$().BigInt__s_math_BigInt$().apply__T__s_math_BigInt("18446744073709551615");
4121
4123
  var this$2 = new $c_sci_StringOps().init___T("^(-?[0-9]+)$");
4122
4124
  var groupNames = $m_sci_Nil$();
@@ -4241,6 +4243,55 @@ $c_Lio_kaitai_struct_Utils$.prototype.addUniqueAttr__scm_ListBuffer__O__V = (fun
4241
4243
  $c_Lio_kaitai_struct_Utils$.prototype.join__sc_TraversableOnce__T__T__T__T = (function(coll, start, sep, end) {
4242
4244
  return (coll.isEmpty__Z() ? "" : coll.mkString__T__T__T__T(start, sep, end))
4243
4245
  });
4246
+ $c_Lio_kaitai_struct_Utils$.prototype.hexEscapeByteArray__sc_Seq__T = (function(arr) {
4247
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
4248
+ return (function(x$2) {
4249
+ var x = $uB(x$2);
4250
+ var this$4 = new $c_sci_StringOps().init___T("\\x%02X");
4251
+ var array = [(255 & x)];
4252
+ var jsx$3 = $m_sjsr_RuntimeString$();
4253
+ var $$this = this$4.repr$1;
4254
+ $m_sc_Seq$();
4255
+ $m_sjs_js_WrappedArray$();
4256
+ var array$1 = [];
4257
+ var x1 = $uI(array.length);
4258
+ switch (x1) {
4259
+ case (-1): {
4260
+ break
4261
+ }
4262
+ };
4263
+ var i = 0;
4264
+ var len = $uI(array.length);
4265
+ while ((i < len)) {
4266
+ var index = i;
4267
+ var arg1 = array[index];
4268
+ var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
4269
+ array$1.push(elem);
4270
+ i = ((1 + i) | 0)
4271
+ };
4272
+ $m_s_reflect_ManifestFactory$ObjectManifest$();
4273
+ var len$1 = $uI(array$1.length);
4274
+ var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
4275
+ var len$2 = result.u.length;
4276
+ var i$1 = 0;
4277
+ var j = 0;
4278
+ var x$1 = $uI(array$1.length);
4279
+ var x$3 = ((x$1 < len$2) ? x$1 : len$2);
4280
+ var that = result.u.length;
4281
+ var end = ((x$3 < that) ? x$3 : that);
4282
+ while ((i$1 < end)) {
4283
+ var jsx$2 = j;
4284
+ var index$1 = i$1;
4285
+ result.set(jsx$2, array$1[index$1]);
4286
+ i$1 = ((1 + i$1) | 0);
4287
+ j = ((1 + j) | 0)
4288
+ };
4289
+ return jsx$3.format__T__AO__T($$this, result)
4290
+ })
4291
+ })(this));
4292
+ var this$18 = $m_sc_Seq$();
4293
+ return $as_sc_TraversableOnce(arr.map__F1__scg_CanBuildFrom__O(jsx$1, this$18.ReusableCBFInstance$2)).mkString__T()
4294
+ });
4244
4295
  $c_Lio_kaitai_struct_Utils$.prototype.upperCamelCase__T__T = (function(s) {
4245
4296
  if ((($uI(s.length) >= 0) && ($as_T(s.substring(0, $uI("_".length))) === "_"))) {
4246
4297
  return ("_" + this.upperCamelCase__T__T($as_T(s.substring(1))))
@@ -4333,55 +4384,6 @@ $c_Lio_kaitai_struct_Utils$.prototype.lowerCamelCase__T__T = (function(s) {
4333
4384
  return $f_sc_TraversableOnce__mkString__T__T__T__T(this$17, "", "", "")
4334
4385
  }
4335
4386
  });
4336
- $c_Lio_kaitai_struct_Utils$.prototype.hexEscapeByteArray__sc_Seq__T = (function(arr) {
4337
- var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
4338
- return (function(x$2) {
4339
- var x = $uB(x$2);
4340
- var this$4 = new $c_sci_StringOps().init___T("\\x%02X");
4341
- var array = [(255 & x)];
4342
- var jsx$3 = $m_sjsr_RuntimeString$();
4343
- var $$this = this$4.repr$1;
4344
- $m_sc_Seq$();
4345
- $m_sjs_js_WrappedArray$();
4346
- var array$1 = [];
4347
- var x1 = $uI(array.length);
4348
- switch (x1) {
4349
- case (-1): {
4350
- break
4351
- }
4352
- };
4353
- var i = 0;
4354
- var len = $uI(array.length);
4355
- while ((i < len)) {
4356
- var index = i;
4357
- var arg1 = array[index];
4358
- var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
4359
- array$1.push(elem);
4360
- i = ((1 + i) | 0)
4361
- };
4362
- $m_s_reflect_ManifestFactory$ObjectManifest$();
4363
- var len$1 = $uI(array$1.length);
4364
- var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
4365
- var len$2 = result.u.length;
4366
- var i$1 = 0;
4367
- var j = 0;
4368
- var x$1 = $uI(array$1.length);
4369
- var x$3 = ((x$1 < len$2) ? x$1 : len$2);
4370
- var that = result.u.length;
4371
- var end = ((x$3 < that) ? x$3 : that);
4372
- while ((i$1 < end)) {
4373
- var jsx$2 = j;
4374
- var index$1 = i$1;
4375
- result.set(jsx$2, array$1[index$1]);
4376
- i$1 = ((1 + i$1) | 0);
4377
- j = ((1 + j) | 0)
4378
- };
4379
- return jsx$3.format__T__AO__T($$this, result)
4380
- })
4381
- })(this));
4382
- var this$18 = $m_sc_Seq$();
4383
- return $as_sc_TraversableOnce(arr.map__F1__scg_CanBuildFrom__O(jsx$1, this$18.ReusableCBFInstance$2)).mkString__T()
4384
- });
4385
4387
  var $d_Lio_kaitai_struct_Utils$ = new $TypeData().initClass({
4386
4388
  Lio_kaitai_struct_Utils$: 0
4387
4389
  }, false, "io.kaitai.struct.Utils$", {
@@ -4413,9 +4415,9 @@ function $h_Lio_kaitai_struct_Version$() {
4413
4415
  $h_Lio_kaitai_struct_Version$.prototype = $c_Lio_kaitai_struct_Version$.prototype;
4414
4416
  $c_Lio_kaitai_struct_Version$.prototype.init___ = (function() {
4415
4417
  this.name$1 = "kaitai-struct-compiler-js";
4416
- this.version$1 = "0.10-SNAPSHOT20211114.125610.9878485e";
4417
- this.gitCommit$1 = "9878485e";
4418
- this.gitTime$1 = "2021-11-14T12:56:10+00:00";
4418
+ this.version$1 = "0.10-SNAPSHOT20220317.110343.7ff2eda3";
4419
+ this.gitCommit$1 = "7ff2eda3";
4420
+ this.gitTime$1 = "2022-03-17T11:03:43+00:00";
4419
4421
  return this
4420
4422
  });
4421
4423
  var $d_Lio_kaitai_struct_Version$ = new $TypeData().initClass({
@@ -23747,6 +23749,18 @@ function $isArrayOf_Lio_kaitai_struct_problems_CompilationProblem(obj, depth) {
23747
23749
  function $asArrayOf_Lio_kaitai_struct_problems_CompilationProblem(obj, depth) {
23748
23750
  return (($isArrayOf_Lio_kaitai_struct_problems_CompilationProblem(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.problems.CompilationProblem;", depth))
23749
23751
  }
23752
+ function $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_math_BigInt__T($thiz, n) {
23753
+ if (($m_sr_BoxesRunTime$().equalsNumObject__jl_Number__O__Z(n, new $c_sjsr_RuntimeLong().init___I__I(0, (-2147483648))) || $m_sr_BoxesRunTime$().equalsNumObject__jl_Number__O__Z(n, (-2147483648)))) {
23754
+ var this$1 = $m_s_math_BigInt$();
23755
+ var jsx$2 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum().init___s_math_BigInt(n.$$plus__s_math_BigInt__s_math_BigInt(this$1.apply__I__s_math_BigInt(1)));
23756
+ var jsx$1 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Sub$();
23757
+ var this$2 = $m_s_math_BigInt$();
23758
+ return $thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(new $c_Lio_kaitai_struct_exprlang_Ast$expr$BinOp().init___Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr(jsx$2, jsx$1, new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum().init___s_math_BigInt(this$2.apply__I__s_math_BigInt(1))))
23759
+ } else {
23760
+ var this$3 = n.bigInteger$3;
23761
+ return $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$3)
23762
+ }
23763
+ }
23750
23764
  /** @constructor */
23751
23765
  function $c_Ljava_nio_charset_Charset() {
23752
23766
  $c_O.call(this);
@@ -62884,7 +62898,15 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
62884
62898
  var inner = x9.operand$1;
62885
62899
  if ((op !== null)) {
62886
62900
  if ((inner !== null)) {
62887
- return (("" + this.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(op)) + (((inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum) || (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$FloatNum)) ? this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(inner) : (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(inner)) + ")")))
62901
+ var opStr = this.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(op);
62902
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Minus$();
62903
+ if (((x === op) && (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum))) {
62904
+ var x4$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(inner);
62905
+ var n$4 = x4$2.n$1;
62906
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum().init___s_math_BigInt(n$4.unary$und$minus__s_math_BigInt()))
62907
+ } else {
62908
+ return (((inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum) || (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$FloatNum)) ? (("" + opStr) + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(inner)) : (((opStr + "(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(inner)) + ")"))
62909
+ }
62888
62910
  }
62889
62911
  }
62890
62912
  };
@@ -62902,12 +62924,12 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
62902
62924
  return this.doNumericCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T(left, op$2, right)
62903
62925
  };
62904
62926
  if (((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$BooleanType) && (_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$BooleanType))) {
62905
- var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
62906
- if ((x === op$2)) {
62927
+ var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
62928
+ if ((x$3 === op$2)) {
62907
62929
  var jsx$1 = true
62908
62930
  } else {
62909
- var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
62910
- var jsx$1 = (x$3 === op$2)
62931
+ var x$5 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
62932
+ var jsx$1 = (x$5 === op$2)
62911
62933
  };
62912
62934
  if (jsx$1) {
62913
62935
  return this.doNumericCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T(left, op$2, right)
@@ -62957,8 +62979,8 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
62957
62979
  } else {
62958
62980
  if ((_1$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
62959
62981
  if ((_2$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
62960
- var x$7 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
62961
- var jsx$3 = (x$7 === op$3)
62982
+ var x$9 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
62983
+ var jsx$3 = (x$9 === op$3)
62962
62984
  } else {
62963
62985
  var jsx$3 = false
62964
62986
  }
@@ -63714,8 +63736,21 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
63714
63736
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp)) {
63715
63737
  var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp(v);
63716
63738
  var op = x9.op$1;
63717
- var operand = x9.operand$1;
63718
- return new $c_Lio_kaitai_struct_translators_ResultString().init___T((("" + this.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(op)) + (((operand instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum) || (operand instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$FloatNum)) ? this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(operand) : (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(operand)) + ")"))))
63739
+ var inner = x9.operand$1;
63740
+ if ((op !== null)) {
63741
+ if ((inner !== null)) {
63742
+ var opStr = this.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(op);
63743
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Minus$();
63744
+ if (((x === op) && (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum))) {
63745
+ var x4$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(inner);
63746
+ var n$4 = x4$2.n$1;
63747
+ var jsx$1 = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum().init___s_math_BigInt(n$4.unary$und$minus__s_math_BigInt()))
63748
+ } else {
63749
+ var jsx$1 = (((inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum) || (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$FloatNum)) ? (("" + opStr) + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(inner)) : (((opStr + "(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(inner)) + ")"))
63750
+ };
63751
+ return new $c_Lio_kaitai_struct_translators_ResultString().init___T(jsx$1)
63752
+ }
63753
+ }
63719
63754
  };
63720
63755
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare)) {
63721
63756
  var x10 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Compare(v);
@@ -63753,15 +63788,15 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
63753
63788
  } else {
63754
63789
  if ((_1$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
63755
63790
  if ((_2$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
63756
- var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
63757
- var jsx$1 = (x === op$3)
63791
+ var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
63792
+ var jsx$2 = (x$3 === op$3)
63758
63793
  } else {
63759
- var jsx$1 = false
63794
+ var jsx$2 = false
63760
63795
  }
63761
63796
  } else {
63762
- var jsx$1 = false
63797
+ var jsx$2 = false
63763
63798
  };
63764
- if (jsx$1) {
63799
+ if (jsx$2) {
63765
63800
  return this.trStrConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult(left$2, right$2)
63766
63801
  } else {
63767
63802
  throw new $c_Lio_kaitai_struct_precompile_TypeMismatchError().init___T(((((("can't do " + _1$1) + " ") + op$3) + " ") + _2$1))
@@ -63791,12 +63826,12 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
63791
63826
  return this.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultString(container, idx)
63792
63827
  };
63793
63828
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Attribute)) {
63794
- var x22 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Attribute(v);
63795
- return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonMethods__translateAttribute__Lio_kaitai_struct_exprlang_Ast$expr$Attribute__O(this, x22))
63829
+ var x24 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Attribute(v);
63830
+ return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonMethods__translateAttribute__Lio_kaitai_struct_exprlang_Ast$expr$Attribute__O(this, x24))
63796
63831
  };
63797
63832
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Call)) {
63798
- var x23 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Call(v);
63799
- return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonMethods__translateCall__Lio_kaitai_struct_exprlang_Ast$expr$Call__O(this, x23))
63833
+ var x25 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Call(v);
63834
+ return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonMethods__translateCall__Lio_kaitai_struct_exprlang_Ast$expr$Call__O(this, x25))
63800
63835
  };
63801
63836
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$List)) {
63802
63837
  var x15 = $as_Lio_kaitai_struct_exprlang_Ast$expr$List(v);
@@ -63804,8 +63839,8 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
63804
63839
  return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonArraysAndCast__doGuessArrayLiteral__sc_Seq__O(this, elts))
63805
63840
  };
63806
63841
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$CastToType)) {
63807
- var x24 = $as_Lio_kaitai_struct_exprlang_Ast$expr$CastToType(v);
63808
- return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonArraysAndCast__doCastOrArray__Lio_kaitai_struct_exprlang_Ast$expr$CastToType__O(this, x24))
63842
+ var x26 = $as_Lio_kaitai_struct_exprlang_Ast$expr$CastToType(v);
63843
+ return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonArraysAndCast__doCastOrArray__Lio_kaitai_struct_exprlang_Ast$expr$CastToType__O(this, x26))
63809
63844
  };
63810
63845
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$ByteSizeOfType)) {
63811
63846
  var x16 = $as_Lio_kaitai_struct_exprlang_Ast$expr$ByteSizeOfType(v);
@@ -65988,378 +66023,6 @@ var $d_Lio_kaitai_struct_translators_CSharpTranslator = new $TypeData().initClas
65988
66023
  });
65989
66024
  $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_CSharpTranslator;
65990
66025
  /** @constructor */
65991
- function $c_Lio_kaitai_struct_translators_CppTranslator() {
65992
- $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
65993
- this.importListSrc$3 = null;
65994
- this.importListHdr$3 = null;
65995
- this.config$3 = null;
65996
- this.CHARSET$undUTF8$3 = null;
65997
- this.asciiCharQuoteMap$3 = null
65998
- }
65999
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
66000
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_CppTranslator;
66001
- /** @constructor */
66002
- function $h_Lio_kaitai_struct_translators_CppTranslator() {
66003
- /*<skip>*/
66004
- }
66005
- $h_Lio_kaitai_struct_translators_CppTranslator.prototype = $c_Lio_kaitai_struct_translators_CppTranslator.prototype;
66006
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
66007
- var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
66008
- return ((("std::stoi(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ((baseStr === "10") ? "" : (", 0, " + baseStr))) + ")")
66009
- });
66010
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
66011
- return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
66012
- });
66013
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
66014
- var this$1 = $m_s_math_BigInt$();
66015
- var that = this$1.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(0, (-2147483648)));
66016
- if ($f_s_math_Ordered__$$less__O__Z(n, that)) {
66017
- var suffix = ""
66018
- } else {
66019
- var this$2 = $m_s_math_BigInt$();
66020
- var that$1 = this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(2147483647, (-1)));
66021
- if ($f_s_math_Ordered__$$less$eq__O__Z(n, that$1)) {
66022
- var suffix = "LL"
66023
- } else {
66024
- var this$3 = $m_s_math_BigInt$();
66025
- var that$2 = this$3.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(2147483647, 0));
66026
- if ($f_s_math_Ordered__$$less$eq__O__Z(n, that$2)) {
66027
- var suffix = ""
66028
- } else {
66029
- var this$4 = $m_s_math_BigInt$();
66030
- var that$3 = this$4.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 0));
66031
- if ($f_s_math_Ordered__$$less$eq__O__Z(n, that$3)) {
66032
- var suffix = "UL"
66033
- } else {
66034
- var this$5 = $m_s_math_BigInt$();
66035
- var that$4 = this$5.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
66036
- if ($f_s_math_Ordered__$$less$eq__O__Z(n, that$4)) {
66037
- var suffix = "LL"
66038
- } else {
66039
- var that$5 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
66040
- if ($f_s_math_Ordered__$$less$eq__O__Z(n, that$5)) {
66041
- var suffix = "ULL"
66042
- } else {
66043
- var suffix = ""
66044
- }
66045
- }
66046
- }
66047
- }
66048
- }
66049
- };
66050
- return (n + suffix)
66051
- });
66052
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66053
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->size()")
66054
- });
66055
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, from, to) {
66056
- return this.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, from, to)
66057
- });
66058
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66059
- return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66060
- });
66061
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
66062
- return (("kaitai::kstream::reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
66063
- });
66064
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66065
- return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66066
- });
66067
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
66068
- return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
66069
- });
66070
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
66071
- return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
66072
- });
66073
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
66074
- var x1 = this.config$3.cppConfig$1.stdStringFrontBack$1;
66075
- if ((x1 === true)) {
66076
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".front()")
66077
- } else if ((x1 === false)) {
66078
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + "[0]")
66079
- } else {
66080
- throw new $c_s_MatchError().init___O(x1)
66081
- }
66082
- });
66083
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__O = (function(value, typeName) {
66084
- return this.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
66085
- });
66086
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66087
- return this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66088
- });
66089
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66090
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->back()")
66091
- });
66092
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
66093
- return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
66094
- });
66095
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66096
- this.importListSrc$3.addSystem__T__V("algorithm");
66097
- var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
66098
- return (((("*std::min_element(" + v) + "->begin(), ") + v) + "->end())")
66099
- });
66100
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66101
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->front()")
66102
- });
66103
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
66104
- return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
66105
- });
66106
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
66107
- return (((((("((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + ") ? (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifTrue)) + ") : (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifFalse)) + "))")
66108
- });
66109
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
66110
- return this.asciiCharQuoteMap$3
66111
- });
66112
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
66113
- return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
66114
- });
66115
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T = (function(t, values) {
66116
- if (this.config$3.cppConfig$1.useListInitializers$1) {
66117
- this.importListHdr$3.addSystem__T__V("vector");
66118
- var cppElType = $m_Lio_kaitai_struct_languages_CppCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_datatype_DataType__Z__T(this.config$3.cppConfig$1, t, false);
66119
- var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
66120
- return (function(value$2) {
66121
- var value = $as_Lio_kaitai_struct_exprlang_Ast$expr(value$2);
66122
- return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
66123
- })
66124
- })(this));
66125
- var this$1 = $m_sc_Seq$();
66126
- var rawInit = (((("new std::vector<" + cppElType) + ">{") + $as_sc_TraversableOnce(values.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "}");
66127
- var x1 = this.config$3.cppConfig$1.pointers$1;
66128
- var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
66129
- if ((x === x1)) {
66130
- return rawInit
66131
- } else {
66132
- var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
66133
- if ((x$3 === x1)) {
66134
- return (((("std::unique_ptr<std::vector<" + cppElType) + ">>(") + rawInit) + ")")
66135
- } else {
66136
- throw new $c_s_MatchError().init___O(x1)
66137
- }
66138
- }
66139
- } else {
66140
- throw $m_sjsr_package$().unwrapJavaScriptException__jl_Throwable__O(new $c_jl_RuntimeException().init___T("C++ literal arrays are not implemented yet"))
66141
- }
66142
- });
66143
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
66144
- return (("((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ") ? 1 : 0)")
66145
- });
66146
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
66147
- return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "->at(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + ")")
66148
- });
66149
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
66150
- return (((((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s) + ".substr(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(from)) + ", (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(to)) + ") - (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(from)) + "))")
66151
- });
66152
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
66153
- return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_datatype_DataType__Z__T(this.config$3.cppConfig$1, typeName, false)) + ">(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
66154
- });
66155
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
66156
- var x1 = this.config$3.cppConfig$1.stdStringFrontBack$1;
66157
- if ((x1 === true)) {
66158
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".back()")
66159
- } else if ((x1 === false)) {
66160
- return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ".length() - 1]")
66161
- } else {
66162
- throw new $c_s_MatchError().init___O(x1)
66163
- }
66164
- });
66165
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
66166
- return (("kaitai::kstream::byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
66167
- });
66168
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
66169
- return (("static_cast<int>(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
66170
- });
66171
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
66172
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s) + ".length()")
66173
- });
66174
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
66175
- var x1 = this.config$3.cppConfig$1.pointers$1;
66176
- var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
66177
- if ((x === x1)) {
66178
- var jsx$1 = true
66179
- } else {
66180
- var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
66181
- var jsx$1 = (x$3 === x1)
66182
- };
66183
- if (jsx$1) {
66184
- return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
66185
- } else {
66186
- var x$5 = $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$();
66187
- if ((x$5 === x1)) {
66188
- if ((typeName instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
66189
- var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(typeName);
66190
- return (((("std::static_pointer_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($as_Lio_kaitai_struct_format_ClassSpec(x2.classSpec$3.get__O()).name$1)) + ">(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
66191
- } else {
66192
- return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
66193
- }
66194
- } else {
66195
- throw new $c_s_MatchError().init___O(x1)
66196
- }
66197
- }
66198
- });
66199
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
66200
- return this.doByteArrayLiteral__sc_Seq__T(arr)
66201
- });
66202
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
66203
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".length()")
66204
- });
66205
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66206
- this.importListSrc$3.addSystem__T__V("algorithm");
66207
- var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
66208
- return (((("*std::max_element(" + v) + "->begin(), ") + v) + "->end())")
66209
- });
66210
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66211
- return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66212
- });
66213
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
66214
- var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
66215
- if ((baseStr === "10")) {
66216
- return (("kaitai::kstream::to_string(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")")
66217
- } else {
66218
- throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
66219
- }
66220
- });
66221
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
66222
- return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
66223
- });
66224
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doName__T__T = (function(s) {
66225
- return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "_" : (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1 === s) ? "_buf" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "i" : (s + "()"))))
66226
- });
66227
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_languages_components_CppImportList__Lio_kaitai_struct_languages_components_CppImportList__Lio_kaitai_struct_RuntimeConfig = (function(provider, importListSrc, importListHdr, config) {
66228
- this.importListSrc$3 = importListSrc;
66229
- this.importListHdr$3 = importListHdr;
66230
- this.config$3 = config;
66231
- $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
66232
- this.CHARSET$undUTF8$3 = $m_Ljava_nio_charset_Charset$().forName__T__Ljava_nio_charset_Charset("UTF-8");
66233
- var self = new $c_jl_Character().init___C(9);
66234
- var jsx$8 = new $c_T2().init___O__O(self, "\\t");
66235
- var self$1 = new $c_jl_Character().init___C(10);
66236
- var jsx$7 = new $c_T2().init___O__O(self$1, "\\n");
66237
- var self$2 = new $c_jl_Character().init___C(13);
66238
- var jsx$6 = new $c_T2().init___O__O(self$2, "\\r");
66239
- var self$3 = new $c_jl_Character().init___C(34);
66240
- var jsx$5 = new $c_T2().init___O__O(self$3, "\\\"");
66241
- var self$4 = new $c_jl_Character().init___C(92);
66242
- var jsx$4 = new $c_T2().init___O__O(self$4, "\\\\");
66243
- var self$5 = new $c_jl_Character().init___C(7);
66244
- var jsx$3 = new $c_T2().init___O__O(self$5, "\\a");
66245
- var self$6 = new $c_jl_Character().init___C(12);
66246
- var jsx$2 = new $c_T2().init___O__O(self$6, "\\f");
66247
- var self$7 = new $c_jl_Character().init___C(11);
66248
- var jsx$1 = new $c_T2().init___O__O(self$7, "\\v");
66249
- var self$8 = new $c_jl_Character().init___C(8);
66250
- var array = [jsx$8, jsx$7, jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O(self$8, "\\b")];
66251
- var this$40 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
66252
- var i = 0;
66253
- var len = $uI(array.length);
66254
- while ((i < len)) {
66255
- var index = i;
66256
- var arg1 = array[index];
66257
- this$40.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
66258
- i = ((1 + i) | 0)
66259
- };
66260
- this.asciiCharQuoteMap$3 = $as_sci_Map(this$40.elems$1);
66261
- return this
66262
- });
66263
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
66264
- return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
66265
- });
66266
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
66267
- return (((("kaitai::kstream::bytes_to_str(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
66268
- });
66269
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
66270
- return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
66271
- });
66272
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
66273
- return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + "->") + this.doName__T__T(attrName))
66274
- });
66275
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
66276
- return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
66277
- });
66278
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doStrCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
66279
- var x$2 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
66280
- if (((op !== null) && (op === x$2))) {
66281
- return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " == (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
66282
- } else {
66283
- var x$4 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
66284
- if (((op !== null) && (op === x$4))) {
66285
- return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " != ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
66286
- } else {
66287
- return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + ".compare(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ") ") + $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)) + " 0)")
66288
- }
66289
- }
66290
- });
66291
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
66292
- return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
66293
- });
66294
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
66295
- return (((("std::string(\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\", ") + arr.length__I()) + ")")
66296
- });
66297
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
66298
- var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
66299
- var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
66300
- if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
66301
- if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
66302
- var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
66303
- var jsx$1 = (x === op)
66304
- } else {
66305
- var jsx$1 = false
66306
- }
66307
- } else {
66308
- var jsx$1 = false
66309
- };
66310
- if (jsx$1) {
66311
- return (((("kaitai::kstream::mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
66312
- } else {
66313
- return $f_Lio_kaitai_struct_translators_CommonOps__numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right)
66314
- }
66315
- });
66316
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66317
- return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66318
- });
66319
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
66320
- return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
66321
- });
66322
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
66323
- return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
66324
- });
66325
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
66326
- return (("kaitai::kstream::byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
66327
- });
66328
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
66329
- return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
66330
- });
66331
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumType, label) {
66332
- var jsx$1 = $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($as_sci_List($f_sc_LinearSeqOptimized__dropRight__I__sc_LinearSeqOptimized(enumType, 1)));
66333
- $m_Lio_kaitai_struct_Utils$();
66334
- var s = (($as_T($f_sc_LinearSeqOptimized__last__O(enumType)) + "_") + label);
66335
- return ((jsx$1 + "::") + $as_T(s.toUpperCase()))
66336
- });
66337
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
66338
- return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
66339
- });
66340
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumById__sci_List__T__T = (function(enumType, id) {
66341
- return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(enumType)) + ">(") + id) + ")")
66342
- });
66343
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doStringLiteral__T__T = (function(s) {
66344
- var lenSuffix = (($uI(s.indexOf("\u0000")) !== (-1)) ? (", " + $m_sjsr_RuntimeString$().getBytes__T__Ljava_nio_charset_Charset__AB(s, this.CHARSET$undUTF8$3).u.length) : "");
66345
- return ((("std::string(" + $f_Lio_kaitai_struct_translators_CommonLiterals__doStringLiteral__T__T(this, s)) + lenSuffix) + ")")
66346
- });
66347
- var $d_Lio_kaitai_struct_translators_CppTranslator = new $TypeData().initClass({
66348
- Lio_kaitai_struct_translators_CppTranslator: 0
66349
- }, false, "io.kaitai.struct.translators.CppTranslator", {
66350
- Lio_kaitai_struct_translators_CppTranslator: 1,
66351
- Lio_kaitai_struct_translators_BaseTranslator: 1,
66352
- Lio_kaitai_struct_translators_TypeDetector: 1,
66353
- O: 1,
66354
- Lio_kaitai_struct_translators_AbstractTranslator: 1,
66355
- Lio_kaitai_struct_translators_CommonLiterals: 1,
66356
- Lio_kaitai_struct_translators_CommonOps: 1,
66357
- Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
66358
- Lio_kaitai_struct_translators_CommonMethods: 1,
66359
- Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
66360
- });
66361
- $c_Lio_kaitai_struct_translators_CppTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_CppTranslator;
66362
- /** @constructor */
66363
66026
  function $c_Lio_kaitai_struct_translators_JavaScriptTranslator() {
66364
66027
  $c_Lio_kaitai_struct_translators_BaseTranslator.call(this)
66365
66028
  }
@@ -66616,6 +66279,12 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doIntLiteral__s_math_B
66616
66279
  var this$1 = $m_s_math_BigInt$();
66617
66280
  var that = this$1.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
66618
66281
  if ($f_s_math_Ordered__$$greater__O__Z(n, that)) {
66282
+ var that$1 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
66283
+ var jsx$1 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
66284
+ } else {
66285
+ var jsx$1 = false
66286
+ };
66287
+ if (jsx$1) {
66619
66288
  var this$2 = n.bigInteger$3;
66620
66289
  var literal = ("0x" + $m_Ljava_math_Conversion$().bigInteger2String__Ljava_math_BigInteger__I__T(this$2, 16))
66621
66290
  } else {
@@ -66623,8 +66292,15 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doIntLiteral__s_math_B
66623
66292
  var literal = $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$3)
66624
66293
  };
66625
66294
  var this$4 = $m_s_math_BigInt$();
66626
- var that$1 = this$4.apply__I__s_math_BigInt(2147483647);
66627
- if ($f_s_math_Ordered__$$greater__O__Z(n, that$1)) {
66295
+ var that$2 = this$4.apply__I__s_math_BigInt((-2147483648));
66296
+ if ($f_s_math_Ordered__$$less__O__Z(n, that$2)) {
66297
+ var jsx$2 = true
66298
+ } else {
66299
+ var this$5 = $m_s_math_BigInt$();
66300
+ var that$3 = this$5.apply__I__s_math_BigInt(2147483647);
66301
+ var jsx$2 = $f_s_math_Ordered__$$greater__O__Z(n, that$3)
66302
+ };
66303
+ if (jsx$2) {
66628
66304
  var suffix = "L"
66629
66305
  } else {
66630
66306
  var suffix = ""
@@ -66917,440 +66593,6 @@ var $d_Lio_kaitai_struct_translators_JavaTranslator = new $TypeData().initClass(
66917
66593
  });
66918
66594
  $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_JavaTranslator;
66919
66595
  /** @constructor */
66920
- function $c_Lio_kaitai_struct_translators_LuaTranslator() {
66921
- $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
66922
- this.importList$3 = null;
66923
- this.asciiCharQuoteMap$3 = null
66924
- }
66925
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
66926
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_LuaTranslator;
66927
- /** @constructor */
66928
- function $h_Lio_kaitai_struct_translators_LuaTranslator() {
66929
- /*<skip>*/
66930
- }
66931
- $h_Lio_kaitai_struct_translators_LuaTranslator.prototype = $c_Lio_kaitai_struct_translators_LuaTranslator.prototype;
66932
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
66933
- var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
66934
- var add = ((baseStr === "10") ? "" : (", " + baseStr));
66935
- return ((("tonumber(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + add) + ")")
66936
- });
66937
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doNumericCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
66938
- var f = (function($this) {
66939
- return (function(n$2) {
66940
- var n = $uZ(n$2);
66941
- return (n ? "1" : "0")
66942
- })
66943
- })(this);
66944
- if ((left instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
66945
- var x4 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(left);
66946
- var l = x4.n$1;
66947
- if ((right instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
66948
- var x5 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(right);
66949
- var r = x5.n$1;
66950
- return ((((f(l) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + f(r))
66951
- }
66952
- };
66953
- if ((left instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
66954
- var x7 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(left);
66955
- var l$2 = x7.n$1;
66956
- return ((((f(l$2) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
66957
- };
66958
- if ((right instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
66959
- var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(right);
66960
- var r$3 = x9.n$1;
66961
- return ((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + f(r$3))
66962
- };
66963
- return $f_Lio_kaitai_struct_translators_CommonOps__doNumericCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right)
66964
- });
66965
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
66966
- return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
66967
- });
66968
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
66969
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v) + ".value")
66970
- });
66971
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, from, to) {
66972
- return this.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, from, to)
66973
- });
66974
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66975
- return ("#" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a))
66976
- });
66977
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66978
- return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66979
- });
66980
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66981
- return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66982
- });
66983
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
66984
- return (("string.reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
66985
- });
66986
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
66987
- return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
66988
- });
66989
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
66990
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":pos()")
66991
- });
66992
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
66993
- return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
66994
- });
66995
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66996
- return (("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ", 1)")
66997
- });
66998
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66999
- var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
67000
- return (((table + "[#") + table) + "]")
67001
- });
67002
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67003
- return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67004
- });
67005
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67006
- return this.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67007
- });
67008
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLiteralUnicode__C__T = (function(code) {
67009
- var this$4 = new $c_sci_StringOps().init___T("\\u{%04x}");
67010
- var array = [code];
67011
- var jsx$2 = $m_sjsr_RuntimeString$();
67012
- var $$this = this$4.repr$1;
67013
- $m_sc_Seq$();
67014
- $m_sjs_js_WrappedArray$();
67015
- var array$1 = [];
67016
- var x1 = $uI(array.length);
67017
- switch (x1) {
67018
- case (-1): {
67019
- break
67020
- }
67021
- };
67022
- var i = 0;
67023
- var len = $uI(array.length);
67024
- while ((i < len)) {
67025
- var index = i;
67026
- var arg1 = array[index];
67027
- var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
67028
- array$1.push(elem);
67029
- i = ((1 + i) | 0)
67030
- };
67031
- $m_s_reflect_ManifestFactory$ObjectManifest$();
67032
- var len$1 = $uI(array$1.length);
67033
- var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
67034
- var len$2 = result.u.length;
67035
- var i$1 = 0;
67036
- var j = 0;
67037
- var x = $uI(array$1.length);
67038
- var x$1 = ((x < len$2) ? x : len$2);
67039
- var that = result.u.length;
67040
- var end = ((x$1 < that) ? x$1 : that);
67041
- while ((i$1 < end)) {
67042
- var jsx$1 = j;
67043
- var index$1 = i$1;
67044
- result.set(jsx$1, array$1[index$1]);
67045
- i$1 = ((1 + i$1) | 0);
67046
- j = ((1 + j) | 0)
67047
- };
67048
- return jsx$2.format__T__AO__T($$this, result)
67049
- });
67050
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doBoolLiteral__Z__T = (function(n) {
67051
- return (n ? "true" : "false")
67052
- });
67053
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67054
- var this$1 = this.importList$3;
67055
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
67056
- return (("utils.array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67057
- });
67058
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67059
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "[1]")
67060
- });
67061
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
67062
- return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
67063
- });
67064
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
67065
- var this$1 = this.importList$3;
67066
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
67067
- return (((((("utils.box_unwrap((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + ") and utils.box_wrap(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifTrue)) + ") or (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifFalse)) + "))")
67068
- });
67069
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
67070
- return this.asciiCharQuoteMap$3
67071
- });
67072
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.binOp__Lio_kaitai_struct_exprlang_Ast$operator__T = (function(op) {
67073
- var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitXor$();
67074
- if ((x === op)) {
67075
- return "~"
67076
- } else {
67077
- return $f_Lio_kaitai_struct_translators_CommonOps__binOp__Lio_kaitai_struct_exprlang_Ast$operator__T(this, op)
67078
- }
67079
- });
67080
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
67081
- return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
67082
- });
67083
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T = (function(t, value) {
67084
- var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
67085
- return (function(v$2) {
67086
- var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
67087
- return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
67088
- })
67089
- })(this));
67090
- var this$1 = $m_sc_Seq$();
67091
- return (("{" + $as_sc_TraversableOnce(value.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "}")
67092
- });
67093
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
67094
- return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + " and 1 or 0)")
67095
- });
67096
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
67097
- return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + " + 1]")
67098
- });
67099
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67100
- return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67101
- });
67102
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
67103
- return (((((("string.sub(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(from)) + " + 1, ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(to)) + ")")
67104
- });
67105
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67106
- var this$1 = this.importList$3;
67107
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
67108
- return (("utils.byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67109
- });
67110
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67111
- var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
67112
- return (((("string.byte(" + table) + ", #") + table) + ")")
67113
- });
67114
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
67115
- return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + " > 0) and math.floor(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ") or math.ceil(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
67116
- });
67117
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doLocalName__T__T = (function(s) {
67118
- return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "_" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "i" : ("self." + s)))
67119
- });
67120
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
67121
- return (("string.len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
67122
- });
67123
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T = (function(op) {
67124
- var x = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Not$();
67125
- if ((x === op)) {
67126
- return "not"
67127
- } else {
67128
- return $f_Lio_kaitai_struct_translators_CommonOps__unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(this, op)
67129
- }
67130
- });
67131
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
67132
- return this.doByteArrayLiteral__sc_Seq__T(arr)
67133
- });
67134
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67135
- var this$1 = this.importList$3;
67136
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
67137
- return (("utils.array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67138
- });
67139
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.booleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__T = (function(op) {
67140
- var x = $m_Lio_kaitai_struct_exprlang_Ast$boolop$Or$();
67141
- if ((x === op)) {
67142
- return "or"
67143
- } else {
67144
- var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$boolop$And$();
67145
- if ((x$3 === op)) {
67146
- return "and"
67147
- } else {
67148
- throw new $c_s_MatchError().init___O(op)
67149
- }
67150
- }
67151
- });
67152
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
67153
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":size()")
67154
- });
67155
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67156
- return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67157
- });
67158
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
67159
- var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
67160
- if ((baseStr === "10")) {
67161
- return (("tostring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")")
67162
- } else {
67163
- throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
67164
- }
67165
- });
67166
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
67167
- return (((("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + " + 1)")
67168
- });
67169
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doName__T__T = (function(s) {
67170
- return s
67171
- });
67172
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
67173
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":is_eof()")
67174
- });
67175
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
67176
- return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
67177
- });
67178
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
67179
- var this$1 = this.importList$3;
67180
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local str_decode = require(\"string_decode\")");
67181
- return (((("str_decode.decode(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
67182
- });
67183
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T = (function(op) {
67184
- var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
67185
- if ((x === op)) {
67186
- return "~="
67187
- } else {
67188
- return $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)
67189
- }
67190
- });
67191
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
67192
- return this.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T(value, et)
67193
- });
67194
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.decEscapeByteArray__p3__sc_Seq__T = (function(arr) {
67195
- var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
67196
- return (function(x$2) {
67197
- var x = $uB(x$2);
67198
- var this$4 = new $c_sci_StringOps().init___T("\\%03d");
67199
- var array = [(255 & x)];
67200
- var jsx$3 = $m_sjsr_RuntimeString$();
67201
- var $$this = this$4.repr$1;
67202
- $m_sc_Seq$();
67203
- $m_sjs_js_WrappedArray$();
67204
- var array$1 = [];
67205
- var x1 = $uI(array.length);
67206
- switch (x1) {
67207
- case (-1): {
67208
- break
67209
- }
67210
- };
67211
- var i = 0;
67212
- var len = $uI(array.length);
67213
- while ((i < len)) {
67214
- var index = i;
67215
- var arg1 = array[index];
67216
- var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
67217
- array$1.push(elem);
67218
- i = ((1 + i) | 0)
67219
- };
67220
- $m_s_reflect_ManifestFactory$ObjectManifest$();
67221
- var len$1 = $uI(array$1.length);
67222
- var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
67223
- var len$2 = result.u.length;
67224
- var i$1 = 0;
67225
- var j = 0;
67226
- var x$1 = $uI(array$1.length);
67227
- var x$3 = ((x$1 < len$2) ? x$1 : len$2);
67228
- var that = result.u.length;
67229
- var end = ((x$3 < that) ? x$3 : that);
67230
- while ((i$1 < end)) {
67231
- var jsx$2 = j;
67232
- var index$1 = i$1;
67233
- result.set(jsx$2, array$1[index$1]);
67234
- i$1 = ((1 + i$1) | 0);
67235
- j = ((1 + j) | 0)
67236
- };
67237
- return jsx$3.format__T__AO__T($$this, result)
67238
- })
67239
- })(this));
67240
- var this$18 = $m_sc_Seq$();
67241
- return $as_sc_TraversableOnce(arr.map__F1__scg_CanBuildFrom__O(jsx$1, this$18.ReusableCBFInstance$2)).mkString__T()
67242
- });
67243
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67244
- return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67245
- });
67246
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
67247
- return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
67248
- });
67249
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67250
- return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67251
- });
67252
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
67253
- var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
67254
- var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
67255
- if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67256
- if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67257
- var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
67258
- var jsx$1 = (x === op)
67259
- } else {
67260
- var jsx$1 = false
67261
- }
67262
- } else {
67263
- var jsx$1 = false
67264
- };
67265
- if (jsx$1) {
67266
- return (((("math.floor(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
67267
- } else {
67268
- return $f_Lio_kaitai_struct_translators_CommonOps__numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right)
67269
- }
67270
- });
67271
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
67272
- return (("\"" + this.decEscapeByteArray__p3__sc_Seq__T(arr)) + "\"")
67273
- });
67274
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67275
- return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67276
- });
67277
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
67278
- return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
67279
- });
67280
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67281
- return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67282
- });
67283
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67284
- var this$1 = this.importList$3;
67285
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
67286
- return (("utils.byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67287
- });
67288
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67289
- return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67290
- });
67291
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
67292
- return (($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + ".") + label)
67293
- });
67294
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList = (function(provider, importList) {
67295
- this.importList$3 = importList;
67296
- $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
67297
- var self = new $c_jl_Character().init___C(9);
67298
- var jsx$9 = new $c_T2().init___O__O(self, "\\t");
67299
- var self$1 = new $c_jl_Character().init___C(10);
67300
- var jsx$8 = new $c_T2().init___O__O(self$1, "\\n");
67301
- var self$2 = new $c_jl_Character().init___C(13);
67302
- var jsx$7 = new $c_T2().init___O__O(self$2, "\\r");
67303
- var self$3 = new $c_jl_Character().init___C(34);
67304
- var jsx$6 = new $c_T2().init___O__O(self$3, "\\\"");
67305
- var self$4 = new $c_jl_Character().init___C(92);
67306
- var jsx$5 = new $c_T2().init___O__O(self$4, "\\\\");
67307
- var self$5 = new $c_jl_Character().init___C(7);
67308
- var jsx$4 = new $c_T2().init___O__O(self$5, "\\a");
67309
- var self$6 = new $c_jl_Character().init___C(8);
67310
- var jsx$3 = new $c_T2().init___O__O(self$6, "\\b");
67311
- var self$7 = new $c_jl_Character().init___C(11);
67312
- var jsx$2 = new $c_T2().init___O__O(self$7, "\\v");
67313
- var self$8 = new $c_jl_Character().init___C(12);
67314
- var jsx$1 = new $c_T2().init___O__O(self$8, "\\f");
67315
- var self$9 = new $c_jl_Character().init___C(27);
67316
- var array = [jsx$9, jsx$8, jsx$7, jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O(self$9, "\\027")];
67317
- var this$44 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
67318
- var i = 0;
67319
- var len = $uI(array.length);
67320
- while ((i < len)) {
67321
- var index = i;
67322
- var arg1 = array[index];
67323
- this$44.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
67324
- i = ((1 + i) | 0)
67325
- };
67326
- this.asciiCharQuoteMap$3 = $as_sci_Map(this$44.elems$1);
67327
- return this
67328
- });
67329
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67330
- return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67331
- });
67332
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
67333
- return ((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + "(") + id) + ")")
67334
- });
67335
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, right) {
67336
- return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " .. ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
67337
- });
67338
- var $d_Lio_kaitai_struct_translators_LuaTranslator = new $TypeData().initClass({
67339
- Lio_kaitai_struct_translators_LuaTranslator: 0
67340
- }, false, "io.kaitai.struct.translators.LuaTranslator", {
67341
- Lio_kaitai_struct_translators_LuaTranslator: 1,
67342
- Lio_kaitai_struct_translators_BaseTranslator: 1,
67343
- Lio_kaitai_struct_translators_TypeDetector: 1,
67344
- O: 1,
67345
- Lio_kaitai_struct_translators_AbstractTranslator: 1,
67346
- Lio_kaitai_struct_translators_CommonLiterals: 1,
67347
- Lio_kaitai_struct_translators_CommonOps: 1,
67348
- Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
67349
- Lio_kaitai_struct_translators_CommonMethods: 1,
67350
- Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
67351
- });
67352
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_LuaTranslator;
67353
- /** @constructor */
67354
66596
  function $c_Lio_kaitai_struct_translators_NimTranslator() {
67355
66597
  $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
67356
66598
  this.importList$3 = null
@@ -67606,7 +66848,19 @@ $c_Lio_kaitai_struct_translators_NimTranslator.prototype.strReverse__Lio_kaitai_
67606
66848
  return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
67607
66849
  });
67608
66850
  $c_Lio_kaitai_struct_translators_NimTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
67609
- return ((arr.size__I() === 0) ? "@[]" : (("@[" + arr.mkString__T__T("'u8, ")) + "'u8]"))
66851
+ if ((arr.size__I() === 0)) {
66852
+ return "@[]"
66853
+ } else {
66854
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
66855
+ return (function(b$2) {
66856
+ var b = $uB(b$2);
66857
+ var ub = (255 & b);
66858
+ return ub
66859
+ })
66860
+ })(this));
66861
+ var this$1 = $m_sc_Seq$();
66862
+ return (("@[" + $as_sc_TraversableOnce(arr.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T("'u8, ")) + "'u8]")
66863
+ }
67610
66864
  });
67611
66865
  $c_Lio_kaitai_struct_translators_NimTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
67612
66866
  return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
@@ -67650,368 +66904,47 @@ var $d_Lio_kaitai_struct_translators_NimTranslator = new $TypeData().initClass({
67650
66904
  });
67651
66905
  $c_Lio_kaitai_struct_translators_NimTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_NimTranslator;
67652
66906
  /** @constructor */
67653
- function $c_Lio_kaitai_struct_translators_PHPTranslator() {
66907
+ function $c_Lio_kaitai_struct_translators_PerlTranslator() {
67654
66908
  $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
67655
- this.asciiCharQuoteMap$3 = null;
67656
- this.namespaceRef$3 = null
66909
+ this.importList$3 = null;
66910
+ this.asciiCharQuoteMap$3 = null
67657
66911
  }
67658
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
67659
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_PHPTranslator;
66912
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
66913
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_PerlTranslator;
67660
66914
  /** @constructor */
67661
- function $h_Lio_kaitai_struct_translators_PHPTranslator() {
66915
+ function $h_Lio_kaitai_struct_translators_PerlTranslator() {
67662
66916
  /*<skip>*/
67663
66917
  }
67664
- $h_Lio_kaitai_struct_translators_PHPTranslator.prototype = $c_Lio_kaitai_struct_translators_PHPTranslator.prototype;
67665
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
67666
- return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base)) + ")")
66918
+ $h_Lio_kaitai_struct_translators_PerlTranslator.prototype = $c_Lio_kaitai_struct_translators_PerlTranslator.prototype;
66919
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
66920
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
66921
+ if ((baseStr === "8")) {
66922
+ return (("oct(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
66923
+ } else if ((baseStr === "10")) {
66924
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
66925
+ } else if ((baseStr === "16")) {
66926
+ return (("hex(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
66927
+ } else {
66928
+ throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
66929
+ }
67667
66930
  });
67668
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67669
- return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
66931
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
66932
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67670
66933
  });
67671
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67672
- return (("count(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
66934
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66935
+ return (("scalar(@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + "})")
67673
66936
  });
67674
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, from, to) {
66937
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, from, to) {
67675
66938
  return this.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, from, to)
67676
66939
  });
67677
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67678
- return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66940
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
66941
+ return (("scalar(reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + "))")
67679
66942
  });
67680
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
67681
- return (("strrev(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
66943
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
66944
+ return this.doByteArrayNonLiteral__sc_Seq__T(elts)
67682
66945
  });
67683
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67684
- return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67685
- });
67686
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_RuntimeConfig = (function(provider, config) {
67687
- $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
67688
- var self = new $c_jl_Character().init___C(9);
67689
- var jsx$8 = new $c_T2().init___O__O(self, "\\t");
67690
- var self$1 = new $c_jl_Character().init___C(10);
67691
- var jsx$7 = new $c_T2().init___O__O(self$1, "\\n");
67692
- var self$2 = new $c_jl_Character().init___C(13);
67693
- var jsx$6 = new $c_T2().init___O__O(self$2, "\\r");
67694
- var self$3 = new $c_jl_Character().init___C(34);
67695
- var jsx$5 = new $c_T2().init___O__O(self$3, "\\\"");
67696
- var self$4 = new $c_jl_Character().init___C(92);
67697
- var jsx$4 = new $c_T2().init___O__O(self$4, "\\\\");
67698
- var self$5 = new $c_jl_Character().init___C(36);
67699
- var jsx$3 = new $c_T2().init___O__O(self$5, "\\$");
67700
- var self$6 = new $c_jl_Character().init___C(12);
67701
- var jsx$2 = new $c_T2().init___O__O(self$6, "\\f");
67702
- var self$7 = new $c_jl_Character().init___C(11);
67703
- var jsx$1 = new $c_T2().init___O__O(self$7, "\\v");
67704
- var self$8 = new $c_jl_Character().init___C(27);
67705
- var array = [jsx$8, jsx$7, jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O(self$8, "\\e")];
67706
- var this$40 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
67707
- var i = 0;
67708
- var len = $uI(array.length);
67709
- while ((i < len)) {
67710
- var index = i;
67711
- var arg1 = array[index];
67712
- this$40.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
67713
- i = ((1 + i) | 0)
67714
- };
67715
- this.asciiCharQuoteMap$3 = $as_sci_Map(this$40.elems$1);
67716
- var thiz = config.phpNamespace$1;
67717
- if ((thiz === null)) {
67718
- throw new $c_jl_NullPointerException().init___()
67719
- };
67720
- this.namespaceRef$3 = ((thiz === "") ? "" : ("\\" + config.phpNamespace$1));
67721
- return this
67722
- });
67723
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
67724
- return this.doByteArrayNonLiteral__sc_Seq__T(elts)
67725
- });
67726
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
67727
- return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
67728
- });
67729
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67730
- return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67731
- });
67732
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
67733
- return (("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + "[0])")
67734
- });
67735
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.types2classAbs__sci_List__T = (function(names) {
67736
- $m_sci_List$();
67737
- var o9 = new $c_s_Some().init___O(names);
67738
- if ((o9.value$2 !== null)) {
67739
- var this$2 = $as_sc_LinearSeqOptimized(o9.value$2);
67740
- var jsx$1 = ($f_sc_LinearSeqOptimized__lengthCompare__I__I(this$2, 1) === 0)
67741
- } else {
67742
- var jsx$1 = false
67743
- };
67744
- if (jsx$1) {
67745
- var this$3 = $as_sc_LinearSeqOptimized(o9.value$2);
67746
- var p3 = $as_T($f_sc_LinearSeqOptimized__apply__I__O(this$3, 0));
67747
- if ((p3 === "kaitai_struct")) {
67748
- return "\\Kaitai\\Struct\\Struct"
67749
- }
67750
- };
67751
- return ((this.namespaceRef$3 + "\\") + $m_Lio_kaitai_struct_languages_PHPCompiler$().types2classRel__sci_List__T(names))
67752
- });
67753
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67754
- var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
67755
- return (((v + "[count(") + v) + ") - 1]")
67756
- });
67757
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67758
- return this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67759
- });
67760
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67761
- return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67762
- });
67763
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLiteralUnicode__C__T = (function(code) {
67764
- var this$4 = new $c_sci_StringOps().init___T("\\u{%x}");
67765
- var array = [code];
67766
- var jsx$2 = $m_sjsr_RuntimeString$();
67767
- var $$this = this$4.repr$1;
67768
- $m_sc_Seq$();
67769
- $m_sjs_js_WrappedArray$();
67770
- var array$1 = [];
67771
- var x1 = $uI(array.length);
67772
- switch (x1) {
67773
- case (-1): {
67774
- break
67775
- }
67776
- };
67777
- var i = 0;
67778
- var len = $uI(array.length);
67779
- while ((i < len)) {
67780
- var index = i;
67781
- var arg1 = array[index];
67782
- var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
67783
- array$1.push(elem);
67784
- i = ((1 + i) | 0)
67785
- };
67786
- $m_s_reflect_ManifestFactory$ObjectManifest$();
67787
- var len$1 = $uI(array$1.length);
67788
- var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
67789
- var len$2 = result.u.length;
67790
- var i$1 = 0;
67791
- var j = 0;
67792
- var x = $uI(array$1.length);
67793
- var x$1 = ((x < len$2) ? x : len$2);
67794
- var that = result.u.length;
67795
- var end = ((x$1 < that) ? x$1 : that);
67796
- while ((i$1 < end)) {
67797
- var jsx$1 = j;
67798
- var index$1 = i$1;
67799
- result.set(jsx$1, array$1[index$1]);
67800
- i$1 = ((1 + i$1) | 0);
67801
- j = ((1 + j) | 0)
67802
- };
67803
- return jsx$2.format__T__AO__T($$this, result)
67804
- });
67805
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67806
- return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67807
- });
67808
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67809
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "[0]")
67810
- });
67811
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
67812
- return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
67813
- });
67814
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
67815
- return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + " ? ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifTrue)) + " : ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifFalse)) + ")")
67816
- });
67817
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
67818
- return this.asciiCharQuoteMap$3
67819
- });
67820
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
67821
- return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
67822
- });
67823
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
67824
- return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
67825
- });
67826
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
67827
- return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
67828
- });
67829
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
67830
- return (((((("\\Kaitai\\Struct\\Stream::substring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(from)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(to)) + ")")
67831
- });
67832
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
67833
- return (("\\Kaitai\\Struct\\Stream::byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
67834
- });
67835
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
67836
- return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + "[") + this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + " - 1])")
67837
- });
67838
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__T = (function(elts) {
67839
- var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
67840
- return (function(v$2) {
67841
- var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
67842
- return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
67843
- })
67844
- })(this));
67845
- var this$1 = $m_sc_Seq$();
67846
- return (("pack('C*', " + $as_sc_TraversableOnce(elts.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + ")")
67847
- });
67848
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
67849
- return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
67850
- });
67851
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doLocalName__T__T = (function(s) {
67852
- return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "$_" : (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1 === s) ? "$_buf" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "$i" : ("$this->" + this.doName__T__T(s)))))
67853
- });
67854
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
67855
- return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
67856
- });
67857
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
67858
- return this.doByteArrayLiteral__sc_Seq__T(arr)
67859
- });
67860
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
67861
- return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
67862
- });
67863
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67864
- return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67865
- });
67866
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67867
- return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67868
- });
67869
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
67870
- var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
67871
- return ((baseStr === "10") ? (("strval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")") : (((("base_convert(strval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + "), 10, ") + baseStr) + ")"))
67872
- });
67873
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
67874
- return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container)) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "])")
67875
- });
67876
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doName__T__T = (function(s) {
67877
- return ($m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(s) + "()")
67878
- });
67879
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
67880
- return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
67881
- });
67882
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
67883
- return (((("\\Kaitai\\Struct\\Stream::bytesToStr(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
67884
- });
67885
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
67886
- return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67887
- });
67888
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
67889
- return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + "->") + this.doName__T__T(attrName))
67890
- });
67891
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67892
- return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67893
- });
67894
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
67895
- return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
67896
- });
67897
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
67898
- return (("\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\"")
67899
- });
67900
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
67901
- var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
67902
- var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
67903
- if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67904
- if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67905
- var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
67906
- var jsx$1 = (x === op)
67907
- } else {
67908
- var jsx$1 = false
67909
- }
67910
- } else {
67911
- var jsx$1 = false
67912
- };
67913
- if (jsx$1) {
67914
- return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
67915
- } else {
67916
- if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67917
- if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67918
- var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
67919
- var jsx$2 = (x$3 === op)
67920
- } else {
67921
- var jsx$2 = false
67922
- }
67923
- } else {
67924
- var jsx$2 = false
67925
- };
67926
- if (jsx$2) {
67927
- return (((("\\Kaitai\\Struct\\Stream::mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
67928
- } else {
67929
- return $f_Lio_kaitai_struct_translators_CommonOps__numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right)
67930
- }
67931
- }
67932
- });
67933
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67934
- return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67935
- });
67936
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67937
- return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67938
- });
67939
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
67940
- return (("\\Kaitai\\Struct\\Stream::byteArrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
67941
- });
67942
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67943
- return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67944
- });
67945
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
67946
- var enumClass = this.types2classAbs__sci_List__T(enumTypeAbs);
67947
- return ((enumClass + "::") + ($m_Lio_kaitai_struct_Utils$(), $as_T(label.toUpperCase())))
67948
- });
67949
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67950
- return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67951
- });
67952
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
67953
- return id
67954
- });
67955
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, right) {
67956
- return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " . ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
67957
- });
67958
- var $d_Lio_kaitai_struct_translators_PHPTranslator = new $TypeData().initClass({
67959
- Lio_kaitai_struct_translators_PHPTranslator: 0
67960
- }, false, "io.kaitai.struct.translators.PHPTranslator", {
67961
- Lio_kaitai_struct_translators_PHPTranslator: 1,
67962
- Lio_kaitai_struct_translators_BaseTranslator: 1,
67963
- Lio_kaitai_struct_translators_TypeDetector: 1,
67964
- O: 1,
67965
- Lio_kaitai_struct_translators_AbstractTranslator: 1,
67966
- Lio_kaitai_struct_translators_CommonLiterals: 1,
67967
- Lio_kaitai_struct_translators_CommonOps: 1,
67968
- Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
67969
- Lio_kaitai_struct_translators_CommonMethods: 1,
67970
- Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
67971
- });
67972
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_PHPTranslator;
67973
- /** @constructor */
67974
- function $c_Lio_kaitai_struct_translators_PerlTranslator() {
67975
- $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
67976
- this.importList$3 = null;
67977
- this.asciiCharQuoteMap$3 = null
67978
- }
67979
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
67980
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_PerlTranslator;
67981
- /** @constructor */
67982
- function $h_Lio_kaitai_struct_translators_PerlTranslator() {
67983
- /*<skip>*/
67984
- }
67985
- $h_Lio_kaitai_struct_translators_PerlTranslator.prototype = $c_Lio_kaitai_struct_translators_PerlTranslator.prototype;
67986
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
67987
- var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
67988
- if ((baseStr === "8")) {
67989
- return (("oct(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
67990
- } else if ((baseStr === "10")) {
67991
- return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
67992
- } else if ((baseStr === "16")) {
67993
- return (("hex(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
67994
- } else {
67995
- throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
67996
- }
67997
- });
67998
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67999
- return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
68000
- });
68001
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
68002
- return (("scalar(@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + "})")
68003
- });
68004
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, from, to) {
68005
- return this.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, from, to)
68006
- });
68007
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
68008
- return (("scalar(reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + "))")
68009
- });
68010
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
68011
- return this.doByteArrayNonLiteral__sc_Seq__T(elts)
68012
- });
68013
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
68014
- return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
66946
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
66947
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
68015
66948
  });
68016
66949
  $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
68017
66950
  return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
@@ -68019,6 +66952,9 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.floatToInt__Lio_kaitai
68019
66952
  $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
68020
66953
  return (("@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + "}[-1]")
68021
66954
  });
66955
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66956
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66957
+ });
68022
66958
  $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
68023
66959
  return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
68024
66960
  });
@@ -68097,7 +67033,7 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doArrayLiteral__Lio_ka
68097
67033
  })
68098
67034
  })(this));
68099
67035
  var this$1 = $m_sc_Seq$();
68100
- return (("(" + $as_sc_TraversableOnce(value.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + ")")
67036
+ return (("[" + $as_sc_TraversableOnce(value.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "]")
68101
67037
  });
68102
67038
  $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
68103
67039
  return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
@@ -70702,345 +69638,1548 @@ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.parseRec__Lfastparse_core_
70702
69638
  $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productIterator__sc_Iterator = (function() {
70703
69639
  return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
70704
69640
  });
70705
- function $as_Lfastparse_parsers_Intrinsics$ElemsWhile(obj) {
70706
- return (((obj instanceof $c_Lfastparse_parsers_Intrinsics$ElemsWhile) || (obj === null)) ? obj : $throwClassCastException(obj, "fastparse.parsers.Intrinsics$ElemsWhile"))
70707
- }
70708
- function $isArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) {
70709
- return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lfastparse_parsers_Intrinsics$ElemsWhile)))
70710
- }
70711
- function $asArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) {
70712
- return (($isArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lfastparse.parsers.Intrinsics$ElemsWhile;", depth))
70713
- }
70714
- var $d_Lfastparse_parsers_Intrinsics$ElemsWhile = new $TypeData().initClass({
70715
- Lfastparse_parsers_Intrinsics$ElemsWhile: 0
70716
- }, false, "fastparse.parsers.Intrinsics$ElemsWhile", {
70717
- Lfastparse_parsers_Intrinsics$ElemsWhile: 1,
70718
- Lfastparse_parsers_Intrinsics$PrecomputableParser: 1,
70719
- Lfastparse_core_Parser: 1,
70720
- O: 1,
70721
- Lfastparse_core_ParserResults: 1,
70722
- Lfastparse_core_Precedence: 1,
70723
- Lfastparse_parsers_Intrinsics$WhileParser: 1,
70724
- s_Product: 1,
70725
- s_Equals: 1,
70726
- s_Serializable: 1,
70727
- Ljava_io_Serializable: 1
69641
+ function $as_Lfastparse_parsers_Intrinsics$ElemsWhile(obj) {
69642
+ return (((obj instanceof $c_Lfastparse_parsers_Intrinsics$ElemsWhile) || (obj === null)) ? obj : $throwClassCastException(obj, "fastparse.parsers.Intrinsics$ElemsWhile"))
69643
+ }
69644
+ function $isArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) {
69645
+ return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lfastparse_parsers_Intrinsics$ElemsWhile)))
69646
+ }
69647
+ function $asArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) {
69648
+ return (($isArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lfastparse.parsers.Intrinsics$ElemsWhile;", depth))
69649
+ }
69650
+ var $d_Lfastparse_parsers_Intrinsics$ElemsWhile = new $TypeData().initClass({
69651
+ Lfastparse_parsers_Intrinsics$ElemsWhile: 0
69652
+ }, false, "fastparse.parsers.Intrinsics$ElemsWhile", {
69653
+ Lfastparse_parsers_Intrinsics$ElemsWhile: 1,
69654
+ Lfastparse_parsers_Intrinsics$PrecomputableParser: 1,
69655
+ Lfastparse_core_Parser: 1,
69656
+ O: 1,
69657
+ Lfastparse_core_ParserResults: 1,
69658
+ Lfastparse_core_Precedence: 1,
69659
+ Lfastparse_parsers_Intrinsics$WhileParser: 1,
69660
+ s_Product: 1,
69661
+ s_Equals: 1,
69662
+ s_Serializable: 1,
69663
+ Ljava_io_Serializable: 1
69664
+ });
69665
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.$classData = $d_Lfastparse_parsers_Intrinsics$ElemsWhile;
69666
+ /** @constructor */
69667
+ function $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes() {
69668
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.call(this);
69669
+ this.$$undargs$4 = null;
69670
+ this.bytes$4 = null;
69671
+ this.process$4 = null
69672
+ }
69673
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype = new $h_Lio_kaitai_struct_datatype_DataType$UserType();
69674
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes;
69675
+ /** @constructor */
69676
+ function $h_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes() {
69677
+ /*<skip>*/
69678
+ }
69679
+ $h_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype = $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype;
69680
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productPrefix__T = (function() {
69681
+ return "CalcUserTypeFromBytes"
69682
+ });
69683
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productArity__I = (function() {
69684
+ return 5
69685
+ });
69686
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.equals__O__Z = (function(x$1) {
69687
+ if ((this === x$1)) {
69688
+ return true
69689
+ } else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)) {
69690
+ var CalcUserTypeFromBytes$1 = $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(x$1);
69691
+ var x = this.name$3;
69692
+ var x$2 = CalcUserTypeFromBytes$1.name$3;
69693
+ if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
69694
+ var x$3 = this.forcedParent$3;
69695
+ var x$4 = CalcUserTypeFromBytes$1.forcedParent$3;
69696
+ var jsx$3 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
69697
+ } else {
69698
+ var jsx$3 = false
69699
+ };
69700
+ if (jsx$3) {
69701
+ var x$5 = this.$$undargs$4;
69702
+ var x$6 = CalcUserTypeFromBytes$1.$$undargs$4;
69703
+ var jsx$2 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
69704
+ } else {
69705
+ var jsx$2 = false
69706
+ };
69707
+ if (jsx$2) {
69708
+ var x$7 = this.bytes$4;
69709
+ var x$8 = CalcUserTypeFromBytes$1.bytes$4;
69710
+ var jsx$1 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
69711
+ } else {
69712
+ var jsx$1 = false
69713
+ };
69714
+ if (jsx$1) {
69715
+ var x$9 = this.process$4;
69716
+ var x$10 = CalcUserTypeFromBytes$1.process$4;
69717
+ return ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
69718
+ } else {
69719
+ return false
69720
+ }
69721
+ } else {
69722
+ return false
69723
+ }
69724
+ });
69725
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productElement__I__O = (function(x$1) {
69726
+ switch (x$1) {
69727
+ case 0: {
69728
+ return this.name$3;
69729
+ break
69730
+ }
69731
+ case 1: {
69732
+ return this.forcedParent$3;
69733
+ break
69734
+ }
69735
+ case 2: {
69736
+ return this.$$undargs$4;
69737
+ break
69738
+ }
69739
+ case 3: {
69740
+ return this.bytes$4;
69741
+ break
69742
+ }
69743
+ case 4: {
69744
+ return this.process$4;
69745
+ break
69746
+ }
69747
+ default: {
69748
+ throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
69749
+ }
69750
+ }
69751
+ });
69752
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.toString__T = (function() {
69753
+ return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
69754
+ });
69755
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.init___sci_List__s_Option__sc_Seq__Lio_kaitai_struct_datatype_DataType$BytesType__s_Option = (function(_name, _forcedParent, _args, bytes, process) {
69756
+ this.$$undargs$4 = _args;
69757
+ this.bytes$4 = bytes;
69758
+ this.process$4 = process;
69759
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.init___sci_List__s_Option__sc_Seq.call(this, _name, _forcedParent, _args);
69760
+ return this
69761
+ });
69762
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.isOwning__Z = (function() {
69763
+ return false
69764
+ });
69765
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.hashCode__I = (function() {
69766
+ var this$2 = $m_s_util_hashing_MurmurHash3$();
69767
+ return this$2.productHash__s_Product__I__I(this, (-889275714))
69768
+ });
69769
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productIterator__sc_Iterator = (function() {
69770
+ return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
69771
+ });
69772
+ function $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj) {
69773
+ return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes"))
69774
+ }
69775
+ function $isArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) {
69776
+ return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)))
69777
+ }
69778
+ function $asArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) {
69779
+ return (($isArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes;", depth))
69780
+ }
69781
+ var $d_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes = new $TypeData().initClass({
69782
+ Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes: 0
69783
+ }, false, "io.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes", {
69784
+ Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes: 1,
69785
+ Lio_kaitai_struct_datatype_DataType$UserType: 1,
69786
+ Lio_kaitai_struct_datatype_DataType$StructType: 1,
69787
+ Lio_kaitai_struct_datatype_DataType$ComplexDataType: 1,
69788
+ O: 1,
69789
+ Lio_kaitai_struct_datatype_DataType: 1,
69790
+ Lio_kaitai_struct_datatype_DataType$Processing: 1,
69791
+ s_Product: 1,
69792
+ s_Equals: 1,
69793
+ s_Serializable: 1,
69794
+ Ljava_io_Serializable: 1
69795
+ });
69796
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes;
69797
+ /** @constructor */
69798
+ function $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes() {
69799
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.call(this);
69800
+ this.$$undargs$4 = null;
69801
+ this.bytes$4 = null;
69802
+ this.process$4 = null
69803
+ }
69804
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype = new $h_Lio_kaitai_struct_datatype_DataType$UserType();
69805
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes;
69806
+ /** @constructor */
69807
+ function $h_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes() {
69808
+ /*<skip>*/
69809
+ }
69810
+ $h_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype = $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype;
69811
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productPrefix__T = (function() {
69812
+ return "UserTypeFromBytes"
69813
+ });
69814
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productArity__I = (function() {
69815
+ return 5
69816
+ });
69817
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.asNonOwning__Lio_kaitai_struct_datatype_DataType = (function() {
69818
+ return this.asNonOwning__Lio_kaitai_struct_datatype_DataType$UserType()
69819
+ });
69820
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.equals__O__Z = (function(x$1) {
69821
+ if ((this === x$1)) {
69822
+ return true
69823
+ } else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
69824
+ var UserTypeFromBytes$1 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(x$1);
69825
+ var x = this.name$3;
69826
+ var x$2 = UserTypeFromBytes$1.name$3;
69827
+ if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
69828
+ var x$3 = this.forcedParent$3;
69829
+ var x$4 = UserTypeFromBytes$1.forcedParent$3;
69830
+ var jsx$3 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
69831
+ } else {
69832
+ var jsx$3 = false
69833
+ };
69834
+ if (jsx$3) {
69835
+ var x$5 = this.$$undargs$4;
69836
+ var x$6 = UserTypeFromBytes$1.$$undargs$4;
69837
+ var jsx$2 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
69838
+ } else {
69839
+ var jsx$2 = false
69840
+ };
69841
+ if (jsx$2) {
69842
+ var x$7 = this.bytes$4;
69843
+ var x$8 = UserTypeFromBytes$1.bytes$4;
69844
+ var jsx$1 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
69845
+ } else {
69846
+ var jsx$1 = false
69847
+ };
69848
+ if (jsx$1) {
69849
+ var x$9 = this.process$4;
69850
+ var x$10 = UserTypeFromBytes$1.process$4;
69851
+ return ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
69852
+ } else {
69853
+ return false
69854
+ }
69855
+ } else {
69856
+ return false
69857
+ }
69858
+ });
69859
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.asNonOwning__Lio_kaitai_struct_datatype_DataType$UserType = (function() {
69860
+ var r = new $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes().init___sci_List__s_Option__sc_Seq__Lio_kaitai_struct_datatype_DataType$BytesType__s_Option(this.name$3, this.forcedParent$3, this.args$3, this.bytes$4, this.process$4);
69861
+ r.classSpec$3 = this.classSpec$3;
69862
+ return r
69863
+ });
69864
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productElement__I__O = (function(x$1) {
69865
+ switch (x$1) {
69866
+ case 0: {
69867
+ return this.name$3;
69868
+ break
69869
+ }
69870
+ case 1: {
69871
+ return this.forcedParent$3;
69872
+ break
69873
+ }
69874
+ case 2: {
69875
+ return this.$$undargs$4;
69876
+ break
69877
+ }
69878
+ case 3: {
69879
+ return this.bytes$4;
69880
+ break
69881
+ }
69882
+ case 4: {
69883
+ return this.process$4;
69884
+ break
69885
+ }
69886
+ default: {
69887
+ throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
69888
+ }
69889
+ }
69890
+ });
69891
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.toString__T = (function() {
69892
+ return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
69893
+ });
69894
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.init___sci_List__s_Option__sc_Seq__Lio_kaitai_struct_datatype_DataType$BytesType__s_Option = (function(_name, _forcedParent, _args, bytes, process) {
69895
+ this.$$undargs$4 = _args;
69896
+ this.bytes$4 = bytes;
69897
+ this.process$4 = process;
69898
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.init___sci_List__s_Option__sc_Seq.call(this, _name, _forcedParent, _args);
69899
+ return this
69900
+ });
69901
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.isOwning__Z = (function() {
69902
+ return true
69903
+ });
69904
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.hashCode__I = (function() {
69905
+ var this$2 = $m_s_util_hashing_MurmurHash3$();
69906
+ return this$2.productHash__s_Product__I__I(this, (-889275714))
69907
+ });
69908
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productIterator__sc_Iterator = (function() {
69909
+ return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
69910
+ });
69911
+ function $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj) {
69912
+ return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$UserTypeFromBytes"))
69913
+ }
69914
+ function $isArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) {
69915
+ return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)))
69916
+ }
69917
+ function $asArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) {
69918
+ return (($isArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.datatype.DataType$UserTypeFromBytes;", depth))
69919
+ }
69920
+ var $d_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes = new $TypeData().initClass({
69921
+ Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes: 0
69922
+ }, false, "io.kaitai.struct.datatype.DataType$UserTypeFromBytes", {
69923
+ Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes: 1,
69924
+ Lio_kaitai_struct_datatype_DataType$UserType: 1,
69925
+ Lio_kaitai_struct_datatype_DataType$StructType: 1,
69926
+ Lio_kaitai_struct_datatype_DataType$ComplexDataType: 1,
69927
+ O: 1,
69928
+ Lio_kaitai_struct_datatype_DataType: 1,
69929
+ Lio_kaitai_struct_datatype_DataType$Processing: 1,
69930
+ s_Product: 1,
69931
+ s_Equals: 1,
69932
+ s_Serializable: 1,
69933
+ Ljava_io_Serializable: 1
69934
+ });
69935
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes;
69936
+ /** @constructor */
69937
+ function $c_Lio_kaitai_struct_translators_ConstructTranslator() {
69938
+ $c_Lio_kaitai_struct_translators_PythonTranslator.call(this)
69939
+ }
69940
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype = new $h_Lio_kaitai_struct_translators_PythonTranslator();
69941
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_ConstructTranslator;
69942
+ /** @constructor */
69943
+ function $h_Lio_kaitai_struct_translators_ConstructTranslator() {
69944
+ /*<skip>*/
69945
+ }
69946
+ $h_Lio_kaitai_struct_translators_ConstructTranslator.prototype = $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype;
69947
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
69948
+ return (("stream_tell(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
69949
+ });
69950
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
69951
+ return this.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
69952
+ });
69953
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
69954
+ return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
69955
+ });
69956
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doLocalName__T__T = (function(s) {
69957
+ return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "obj_" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "i" : (($m_Lio_kaitai_struct_format_Identifier$().ROOT$1 === s) ? "this._root" : (($m_Lio_kaitai_struct_format_Identifier$().IO$1 === s) ? "_io" : ("this." + this.doName__T__T(s))))))
69958
+ });
69959
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
69960
+ return (("stream_size(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
69961
+ });
69962
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
69963
+ return (("stream_iseof(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
69964
+ });
69965
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doName__T__T = (function(s) {
69966
+ return (($m_Lio_kaitai_struct_format_Identifier$().PARENT$1 === s) ? "_" : s)
69967
+ });
69968
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
69969
+ return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
69970
+ });
69971
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList = (function(provider, importList) {
69972
+ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList.call(this, provider, importList);
69973
+ return this
69974
+ });
69975
+ var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initClass({
69976
+ Lio_kaitai_struct_translators_ConstructTranslator: 0
69977
+ }, false, "io.kaitai.struct.translators.ConstructTranslator", {
69978
+ Lio_kaitai_struct_translators_ConstructTranslator: 1,
69979
+ Lio_kaitai_struct_translators_PythonTranslator: 1,
69980
+ Lio_kaitai_struct_translators_BaseTranslator: 1,
69981
+ Lio_kaitai_struct_translators_TypeDetector: 1,
69982
+ O: 1,
69983
+ Lio_kaitai_struct_translators_AbstractTranslator: 1,
69984
+ Lio_kaitai_struct_translators_CommonLiterals: 1,
69985
+ Lio_kaitai_struct_translators_CommonOps: 1,
69986
+ Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
69987
+ Lio_kaitai_struct_translators_CommonMethods: 1,
69988
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
69989
+ });
69990
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_ConstructTranslator;
69991
+ /** @constructor */
69992
+ function $c_Lio_kaitai_struct_translators_CppTranslator() {
69993
+ $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
69994
+ this.importListSrc$3 = null;
69995
+ this.importListHdr$3 = null;
69996
+ this.config$3 = null;
69997
+ this.CHARSET$undUTF8$3 = null;
69998
+ this.asciiCharQuoteMap$3 = null
69999
+ }
70000
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
70001
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_CppTranslator;
70002
+ /** @constructor */
70003
+ function $h_Lio_kaitai_struct_translators_CppTranslator() {
70004
+ /*<skip>*/
70005
+ }
70006
+ $h_Lio_kaitai_struct_translators_CppTranslator.prototype = $c_Lio_kaitai_struct_translators_CppTranslator.prototype;
70007
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
70008
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70009
+ return ((("std::stoi(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ((baseStr === "10") ? "" : (", 0, " + baseStr))) + ")")
70010
+ });
70011
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70012
+ return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70013
+ });
70014
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
70015
+ var this$1 = $m_s_math_BigInt$();
70016
+ var that = this$1.apply__I__s_math_BigInt((-2147483647));
70017
+ if ($f_s_math_Ordered__$$greater$eq__O__Z(n, that)) {
70018
+ var this$2 = $m_s_math_BigInt$();
70019
+ var that$1 = this$2.apply__I__s_math_BigInt(2147483647);
70020
+ var jsx$1 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
70021
+ } else {
70022
+ var jsx$1 = false
70023
+ };
70024
+ if (jsx$1) {
70025
+ var suffixOpt = new $c_s_Some().init___O("")
70026
+ } else {
70027
+ var this$3 = $m_s_math_BigInt$();
70028
+ var that$2 = this$3.apply__I__s_math_BigInt(2147483647);
70029
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that$2)) {
70030
+ var that$3 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT32$1;
70031
+ var jsx$2 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$3)
70032
+ } else {
70033
+ var jsx$2 = false
70034
+ };
70035
+ if (jsx$2) {
70036
+ var suffixOpt = new $c_s_Some().init___O("UL")
70037
+ } else {
70038
+ var this$4 = $m_s_math_BigInt$();
70039
+ var that$4 = this$4.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(1, (-2147483648)));
70040
+ if ($f_s_math_Ordered__$$greater$eq__O__Z(n, that$4)) {
70041
+ var this$5 = $m_s_math_BigInt$();
70042
+ var that$5 = this$5.apply__I__s_math_BigInt((-2147483648));
70043
+ var jsx$4 = $f_s_math_Ordered__$$less__O__Z(n, that$5)
70044
+ } else {
70045
+ var jsx$4 = false
70046
+ };
70047
+ if (jsx$4) {
70048
+ var jsx$3 = true
70049
+ } else {
70050
+ var that$6 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT32$1;
70051
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that$6)) {
70052
+ var this$6 = $m_s_math_BigInt$();
70053
+ var that$7 = this$6.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
70054
+ var jsx$3 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$7)
70055
+ } else {
70056
+ var jsx$3 = false
70057
+ }
70058
+ };
70059
+ if (jsx$3) {
70060
+ var suffixOpt = new $c_s_Some().init___O("LL")
70061
+ } else {
70062
+ var this$7 = $m_s_math_BigInt$();
70063
+ var that$8 = this$7.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
70064
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that$8)) {
70065
+ var that$9 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
70066
+ var jsx$5 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$9)
70067
+ } else {
70068
+ var jsx$5 = false
70069
+ };
70070
+ if (jsx$5) {
70071
+ var suffixOpt = new $c_s_Some().init___O("ULL")
70072
+ } else {
70073
+ var suffixOpt = $m_s_None$()
70074
+ }
70075
+ }
70076
+ }
70077
+ };
70078
+ if ((suffixOpt instanceof $c_s_Some)) {
70079
+ var x2 = $as_s_Some(suffixOpt);
70080
+ var suffix = $as_T(x2.value$2);
70081
+ return (("" + n) + suffix)
70082
+ } else {
70083
+ var x = $m_s_None$();
70084
+ if ((x === suffixOpt)) {
70085
+ return $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_math_BigInt__T(this, n)
70086
+ } else {
70087
+ throw new $c_s_MatchError().init___O(suffixOpt)
70088
+ }
70089
+ }
70090
+ });
70091
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70092
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->size()")
70093
+ });
70094
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, from, to) {
70095
+ return this.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, from, to)
70096
+ });
70097
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70098
+ return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70099
+ });
70100
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70101
+ return (("kaitai::kstream::reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70102
+ });
70103
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70104
+ return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70105
+ });
70106
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70107
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70108
+ });
70109
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70110
+ return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70111
+ });
70112
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70113
+ var x1 = this.config$3.cppConfig$1.stdStringFrontBack$1;
70114
+ if ((x1 === true)) {
70115
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".front()")
70116
+ } else if ((x1 === false)) {
70117
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + "[0]")
70118
+ } else {
70119
+ throw new $c_s_MatchError().init___O(x1)
70120
+ }
70121
+ });
70122
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__O = (function(value, typeName) {
70123
+ return this.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
70124
+ });
70125
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70126
+ return this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70127
+ });
70128
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70129
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->back()")
70130
+ });
70131
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70132
+ return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70133
+ });
70134
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70135
+ this.importListSrc$3.addSystem__T__V("algorithm");
70136
+ var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70137
+ return (((("*std::min_element(" + v) + "->begin(), ") + v) + "->end())")
70138
+ });
70139
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70140
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->front()")
70141
+ });
70142
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
70143
+ return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
70144
+ });
70145
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
70146
+ return (((((("((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + ") ? (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifTrue)) + ") : (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifFalse)) + "))")
70147
+ });
70148
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
70149
+ return this.asciiCharQuoteMap$3
70150
+ });
70151
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
70152
+ return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
70153
+ });
70154
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T = (function(t, values) {
70155
+ if (this.config$3.cppConfig$1.useListInitializers$1) {
70156
+ this.importListHdr$3.addSystem__T__V("vector");
70157
+ var cppElType = $m_Lio_kaitai_struct_languages_CppCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_datatype_DataType__Z__T(this.config$3.cppConfig$1, t, false);
70158
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
70159
+ return (function(value$2) {
70160
+ var value = $as_Lio_kaitai_struct_exprlang_Ast$expr(value$2);
70161
+ return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70162
+ })
70163
+ })(this));
70164
+ var this$1 = $m_sc_Seq$();
70165
+ var rawInit = (((("new std::vector<" + cppElType) + ">{") + $as_sc_TraversableOnce(values.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "}");
70166
+ var x1 = this.config$3.cppConfig$1.pointers$1;
70167
+ var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
70168
+ if ((x === x1)) {
70169
+ return rawInit
70170
+ } else {
70171
+ var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
70172
+ if ((x$3 === x1)) {
70173
+ return (((("std::unique_ptr<std::vector<" + cppElType) + ">>(") + rawInit) + ")")
70174
+ } else {
70175
+ throw new $c_s_MatchError().init___O(x1)
70176
+ }
70177
+ }
70178
+ } else {
70179
+ throw $m_sjsr_package$().unwrapJavaScriptException__jl_Throwable__O(new $c_jl_RuntimeException().init___T("C++ literal arrays are not implemented yet"))
70180
+ }
70181
+ });
70182
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70183
+ return (("((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ") ? 1 : 0)")
70184
+ });
70185
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70186
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "->at(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + ")")
70187
+ });
70188
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
70189
+ return (((((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s) + ".substr(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(from)) + ", (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(to)) + ") - (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(from)) + "))")
70190
+ });
70191
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
70192
+ return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_datatype_DataType__Z__T(this.config$3.cppConfig$1, typeName, false)) + ">(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
70193
+ });
70194
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70195
+ var x1 = this.config$3.cppConfig$1.stdStringFrontBack$1;
70196
+ if ((x1 === true)) {
70197
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".back()")
70198
+ } else if ((x1 === false)) {
70199
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ".length() - 1]")
70200
+ } else {
70201
+ throw new $c_s_MatchError().init___O(x1)
70202
+ }
70203
+ });
70204
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70205
+ return (("kaitai::kstream::byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70206
+ });
70207
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70208
+ return (("static_cast<int>(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
70209
+ });
70210
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70211
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s) + ".length()")
70212
+ });
70213
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
70214
+ var x1 = this.config$3.cppConfig$1.pointers$1;
70215
+ var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
70216
+ if ((x === x1)) {
70217
+ var jsx$1 = true
70218
+ } else {
70219
+ var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
70220
+ var jsx$1 = (x$3 === x1)
70221
+ };
70222
+ if (jsx$1) {
70223
+ return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
70224
+ } else {
70225
+ var x$5 = $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$();
70226
+ if ((x$5 === x1)) {
70227
+ if ((typeName instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
70228
+ var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(typeName);
70229
+ return (((("std::static_pointer_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($as_Lio_kaitai_struct_format_ClassSpec(x2.classSpec$3.get__O()).name$1)) + ">(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
70230
+ } else {
70231
+ return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
70232
+ }
70233
+ } else {
70234
+ throw new $c_s_MatchError().init___O(x1)
70235
+ }
70236
+ }
70237
+ });
70238
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
70239
+ return this.doByteArrayLiteral__sc_Seq__T(arr)
70240
+ });
70241
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70242
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".length()")
70243
+ });
70244
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70245
+ this.importListSrc$3.addSystem__T__V("algorithm");
70246
+ var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70247
+ return (((("*std::max_element(" + v) + "->begin(), ") + v) + "->end())")
70248
+ });
70249
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70250
+ return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70251
+ });
70252
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
70253
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70254
+ if ((baseStr === "10")) {
70255
+ return (("kaitai::kstream::to_string(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")")
70256
+ } else {
70257
+ throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
70258
+ }
70259
+ });
70260
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70261
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
70262
+ });
70263
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doName__T__T = (function(s) {
70264
+ return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "_" : (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1 === s) ? "_buf" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "i" : (s + "()"))))
70265
+ });
70266
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_languages_components_CppImportList__Lio_kaitai_struct_languages_components_CppImportList__Lio_kaitai_struct_RuntimeConfig = (function(provider, importListSrc, importListHdr, config) {
70267
+ this.importListSrc$3 = importListSrc;
70268
+ this.importListHdr$3 = importListHdr;
70269
+ this.config$3 = config;
70270
+ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
70271
+ this.CHARSET$undUTF8$3 = $m_Ljava_nio_charset_Charset$().forName__T__Ljava_nio_charset_Charset("UTF-8");
70272
+ var self = new $c_jl_Character().init___C(9);
70273
+ var jsx$8 = new $c_T2().init___O__O(self, "\\t");
70274
+ var self$1 = new $c_jl_Character().init___C(10);
70275
+ var jsx$7 = new $c_T2().init___O__O(self$1, "\\n");
70276
+ var self$2 = new $c_jl_Character().init___C(13);
70277
+ var jsx$6 = new $c_T2().init___O__O(self$2, "\\r");
70278
+ var self$3 = new $c_jl_Character().init___C(34);
70279
+ var jsx$5 = new $c_T2().init___O__O(self$3, "\\\"");
70280
+ var self$4 = new $c_jl_Character().init___C(92);
70281
+ var jsx$4 = new $c_T2().init___O__O(self$4, "\\\\");
70282
+ var self$5 = new $c_jl_Character().init___C(7);
70283
+ var jsx$3 = new $c_T2().init___O__O(self$5, "\\a");
70284
+ var self$6 = new $c_jl_Character().init___C(12);
70285
+ var jsx$2 = new $c_T2().init___O__O(self$6, "\\f");
70286
+ var self$7 = new $c_jl_Character().init___C(11);
70287
+ var jsx$1 = new $c_T2().init___O__O(self$7, "\\v");
70288
+ var self$8 = new $c_jl_Character().init___C(8);
70289
+ var array = [jsx$8, jsx$7, jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O(self$8, "\\b")];
70290
+ var this$40 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
70291
+ var i = 0;
70292
+ var len = $uI(array.length);
70293
+ while ((i < len)) {
70294
+ var index = i;
70295
+ var arg1 = array[index];
70296
+ this$40.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
70297
+ i = ((1 + i) | 0)
70298
+ };
70299
+ this.asciiCharQuoteMap$3 = $as_sci_Map(this$40.elems$1);
70300
+ return this
70301
+ });
70302
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
70303
+ return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
70304
+ });
70305
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
70306
+ return (((("kaitai::kstream::bytes_to_str(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
70307
+ });
70308
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
70309
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70310
+ });
70311
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
70312
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + "->") + this.doName__T__T(attrName))
70313
+ });
70314
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70315
+ return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70316
+ });
70317
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doStrCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
70318
+ var x$2 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
70319
+ if (((op !== null) && (op === x$2))) {
70320
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " == (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
70321
+ } else {
70322
+ var x$4 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
70323
+ if (((op !== null) && (op === x$4))) {
70324
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " != ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
70325
+ } else {
70326
+ return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + ".compare(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ") ") + $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)) + " 0)")
70327
+ }
70328
+ }
70329
+ });
70330
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70331
+ return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70332
+ });
70333
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
70334
+ return (((("std::string(\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\", ") + arr.length__I()) + ")")
70335
+ });
70336
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
70337
+ var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
70338
+ var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
70339
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70340
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70341
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
70342
+ var jsx$1 = (x === op)
70343
+ } else {
70344
+ var jsx$1 = false
70345
+ }
70346
+ } else {
70347
+ var jsx$1 = false
70348
+ };
70349
+ if (jsx$1) {
70350
+ return (((("kaitai::kstream::mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
70351
+ } else {
70352
+ return $f_Lio_kaitai_struct_translators_CommonOps__numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right)
70353
+ }
70354
+ });
70355
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70356
+ return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70357
+ });
70358
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
70359
+ return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
70360
+ });
70361
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70362
+ return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70363
+ });
70364
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70365
+ return (("kaitai::kstream::byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70366
+ });
70367
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70368
+ return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70369
+ });
70370
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumType, label) {
70371
+ var jsx$1 = $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($as_sci_List($f_sc_LinearSeqOptimized__dropRight__I__sc_LinearSeqOptimized(enumType, 1)));
70372
+ $m_Lio_kaitai_struct_Utils$();
70373
+ var s = (($as_T($f_sc_LinearSeqOptimized__last__O(enumType)) + "_") + label);
70374
+ return ((jsx$1 + "::") + $as_T(s.toUpperCase()))
70375
+ });
70376
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70377
+ return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70378
+ });
70379
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumById__sci_List__T__T = (function(enumType, id) {
70380
+ return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(enumType)) + ">(") + id) + ")")
70381
+ });
70382
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doStringLiteral__T__T = (function(s) {
70383
+ var lenSuffix = (($uI(s.indexOf("\u0000")) !== (-1)) ? (", " + $m_sjsr_RuntimeString$().getBytes__T__Ljava_nio_charset_Charset__AB(s, this.CHARSET$undUTF8$3).u.length) : "");
70384
+ return ((("std::string(" + $f_Lio_kaitai_struct_translators_CommonLiterals__doStringLiteral__T__T(this, s)) + lenSuffix) + ")")
70385
+ });
70386
+ var $d_Lio_kaitai_struct_translators_CppTranslator = new $TypeData().initClass({
70387
+ Lio_kaitai_struct_translators_CppTranslator: 0
70388
+ }, false, "io.kaitai.struct.translators.CppTranslator", {
70389
+ Lio_kaitai_struct_translators_CppTranslator: 1,
70390
+ Lio_kaitai_struct_translators_BaseTranslator: 1,
70391
+ Lio_kaitai_struct_translators_TypeDetector: 1,
70392
+ O: 1,
70393
+ Lio_kaitai_struct_translators_AbstractTranslator: 1,
70394
+ Lio_kaitai_struct_translators_CommonLiterals: 1,
70395
+ Lio_kaitai_struct_translators_CommonOps: 1,
70396
+ Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
70397
+ Lio_kaitai_struct_translators_CommonMethods: 1,
70398
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1,
70399
+ Lio_kaitai_struct_translators_MinSignedIntegers: 1
70400
+ });
70401
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_CppTranslator;
70402
+ /** @constructor */
70403
+ function $c_Lio_kaitai_struct_translators_LuaTranslator() {
70404
+ $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
70405
+ this.importList$3 = null;
70406
+ this.asciiCharQuoteMap$3 = null
70407
+ }
70408
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
70409
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_LuaTranslator;
70410
+ /** @constructor */
70411
+ function $h_Lio_kaitai_struct_translators_LuaTranslator() {
70412
+ /*<skip>*/
70413
+ }
70414
+ $h_Lio_kaitai_struct_translators_LuaTranslator.prototype = $c_Lio_kaitai_struct_translators_LuaTranslator.prototype;
70415
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
70416
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70417
+ var add = ((baseStr === "10") ? "" : (", " + baseStr));
70418
+ return ((("tonumber(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + add) + ")")
70419
+ });
70420
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doNumericCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
70421
+ var f = (function($this) {
70422
+ return (function(n$2) {
70423
+ var n = $uZ(n$2);
70424
+ return (n ? "1" : "0")
70425
+ })
70426
+ })(this);
70427
+ if ((left instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70428
+ var x4 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(left);
70429
+ var l = x4.n$1;
70430
+ if ((right instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70431
+ var x5 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(right);
70432
+ var r = x5.n$1;
70433
+ return ((((f(l) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + f(r))
70434
+ }
70435
+ };
70436
+ if ((left instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70437
+ var x7 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(left);
70438
+ var l$2 = x7.n$1;
70439
+ return ((((f(l$2) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
70440
+ };
70441
+ if ((right instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70442
+ var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(right);
70443
+ var r$3 = x9.n$1;
70444
+ return ((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + f(r$3))
70445
+ };
70446
+ return $f_Lio_kaitai_struct_translators_CommonOps__doNumericCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right)
70447
+ });
70448
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70449
+ return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70450
+ });
70451
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
70452
+ var this$1 = $m_s_math_BigInt$();
70453
+ var that = this$1.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
70454
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that)) {
70455
+ var that$1 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
70456
+ var jsx$1 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
70457
+ } else {
70458
+ var jsx$1 = false
70459
+ };
70460
+ if (jsx$1) {
70461
+ var this$2 = n.bigInteger$3;
70462
+ return ("0x" + $m_Ljava_math_Conversion$().bigInteger2String__Ljava_math_BigInteger__I__T(this$2, 16))
70463
+ } else {
70464
+ return $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_math_BigInt__T(this, n)
70465
+ }
70466
+ });
70467
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
70468
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v) + ".value")
70469
+ });
70470
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, from, to) {
70471
+ return this.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, from, to)
70472
+ });
70473
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70474
+ return ("#" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a))
70475
+ });
70476
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70477
+ return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70478
+ });
70479
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70480
+ return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70481
+ });
70482
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70483
+ return (("string.reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70484
+ });
70485
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70486
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70487
+ });
70488
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
70489
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":pos()")
70490
+ });
70491
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70492
+ return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70493
+ });
70494
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70495
+ return (("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ", 1)")
70496
+ });
70497
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70498
+ var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70499
+ return (((table + "[#") + table) + "]")
70500
+ });
70501
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70502
+ return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70503
+ });
70504
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70505
+ return this.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70506
+ });
70507
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLiteralUnicode__C__T = (function(code) {
70508
+ var this$4 = new $c_sci_StringOps().init___T("\\u{%04x}");
70509
+ var array = [code];
70510
+ var jsx$2 = $m_sjsr_RuntimeString$();
70511
+ var $$this = this$4.repr$1;
70512
+ $m_sc_Seq$();
70513
+ $m_sjs_js_WrappedArray$();
70514
+ var array$1 = [];
70515
+ var x1 = $uI(array.length);
70516
+ switch (x1) {
70517
+ case (-1): {
70518
+ break
70519
+ }
70520
+ };
70521
+ var i = 0;
70522
+ var len = $uI(array.length);
70523
+ while ((i < len)) {
70524
+ var index = i;
70525
+ var arg1 = array[index];
70526
+ var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
70527
+ array$1.push(elem);
70528
+ i = ((1 + i) | 0)
70529
+ };
70530
+ $m_s_reflect_ManifestFactory$ObjectManifest$();
70531
+ var len$1 = $uI(array$1.length);
70532
+ var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
70533
+ var len$2 = result.u.length;
70534
+ var i$1 = 0;
70535
+ var j = 0;
70536
+ var x = $uI(array$1.length);
70537
+ var x$1 = ((x < len$2) ? x : len$2);
70538
+ var that = result.u.length;
70539
+ var end = ((x$1 < that) ? x$1 : that);
70540
+ while ((i$1 < end)) {
70541
+ var jsx$1 = j;
70542
+ var index$1 = i$1;
70543
+ result.set(jsx$1, array$1[index$1]);
70544
+ i$1 = ((1 + i$1) | 0);
70545
+ j = ((1 + j) | 0)
70546
+ };
70547
+ return jsx$2.format__T__AO__T($$this, result)
70548
+ });
70549
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doBoolLiteral__Z__T = (function(n) {
70550
+ return (n ? "true" : "false")
70551
+ });
70552
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70553
+ var this$1 = this.importList$3;
70554
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70555
+ return (("utils.array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70556
+ });
70557
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70558
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "[1]")
70559
+ });
70560
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
70561
+ return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
70562
+ });
70563
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
70564
+ var this$1 = this.importList$3;
70565
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70566
+ return (((((("utils.box_unwrap((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + ") and utils.box_wrap(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifTrue)) + ") or (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifFalse)) + "))")
70567
+ });
70568
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
70569
+ return this.asciiCharQuoteMap$3
70570
+ });
70571
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.binOp__Lio_kaitai_struct_exprlang_Ast$operator__T = (function(op) {
70572
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitXor$();
70573
+ if ((x === op)) {
70574
+ return "~"
70575
+ } else {
70576
+ return $f_Lio_kaitai_struct_translators_CommonOps__binOp__Lio_kaitai_struct_exprlang_Ast$operator__T(this, op)
70577
+ }
70578
+ });
70579
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
70580
+ return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
70581
+ });
70582
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T = (function(t, value) {
70583
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
70584
+ return (function(v$2) {
70585
+ var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
70586
+ return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
70587
+ })
70588
+ })(this));
70589
+ var this$1 = $m_sc_Seq$();
70590
+ return (("{" + $as_sc_TraversableOnce(value.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "}")
70591
+ });
70592
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70593
+ return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + " and 1 or 0)")
70594
+ });
70595
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70596
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + " + 1]")
70597
+ });
70598
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70599
+ return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70600
+ });
70601
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
70602
+ return (((((("string.sub(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(from)) + " + 1, ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(to)) + ")")
70603
+ });
70604
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70605
+ var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70606
+ return (((("string.byte(" + table) + ", #") + table) + ")")
70607
+ });
70608
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70609
+ var this$1 = this.importList$3;
70610
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70611
+ return (("utils.byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70612
+ });
70613
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70614
+ return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + " > 0) and math.floor(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ") or math.ceil(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
70615
+ });
70616
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doLocalName__T__T = (function(s) {
70617
+ return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "_" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "i" : ("self." + s)))
70618
+ });
70619
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70620
+ return (("string.len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70621
+ });
70622
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T = (function(op) {
70623
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Not$();
70624
+ if ((x === op)) {
70625
+ return "not"
70626
+ } else {
70627
+ return $f_Lio_kaitai_struct_translators_CommonOps__unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(this, op)
70628
+ }
70629
+ });
70630
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
70631
+ return this.doByteArrayLiteral__sc_Seq__T(arr)
70632
+ });
70633
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70634
+ var this$1 = this.importList$3;
70635
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70636
+ return (("utils.array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70637
+ });
70638
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.booleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__T = (function(op) {
70639
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$boolop$Or$();
70640
+ if ((x === op)) {
70641
+ return "or"
70642
+ } else {
70643
+ var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$boolop$And$();
70644
+ if ((x$3 === op)) {
70645
+ return "and"
70646
+ } else {
70647
+ throw new $c_s_MatchError().init___O(op)
70648
+ }
70649
+ }
70650
+ });
70651
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
70652
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":size()")
70653
+ });
70654
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70655
+ return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70656
+ });
70657
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
70658
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70659
+ if ((baseStr === "10")) {
70660
+ return (("tostring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")")
70661
+ } else {
70662
+ throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
70663
+ }
70664
+ });
70665
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70666
+ return (((("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + " + 1)")
70667
+ });
70668
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doName__T__T = (function(s) {
70669
+ return s
70670
+ });
70671
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
70672
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":is_eof()")
70673
+ });
70674
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
70675
+ return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
70676
+ });
70677
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
70678
+ var this$1 = this.importList$3;
70679
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local str_decode = require(\"string_decode\")");
70680
+ return (((("str_decode.decode(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
70681
+ });
70682
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T = (function(op) {
70683
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
70684
+ if ((x === op)) {
70685
+ return "~="
70686
+ } else {
70687
+ return $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)
70688
+ }
70689
+ });
70690
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
70691
+ return this.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T(value, et)
70692
+ });
70693
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.decEscapeByteArray__p3__sc_Seq__T = (function(arr) {
70694
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
70695
+ return (function(x$2) {
70696
+ var x = $uB(x$2);
70697
+ var this$4 = new $c_sci_StringOps().init___T("\\%03d");
70698
+ var array = [(255 & x)];
70699
+ var jsx$3 = $m_sjsr_RuntimeString$();
70700
+ var $$this = this$4.repr$1;
70701
+ $m_sc_Seq$();
70702
+ $m_sjs_js_WrappedArray$();
70703
+ var array$1 = [];
70704
+ var x1 = $uI(array.length);
70705
+ switch (x1) {
70706
+ case (-1): {
70707
+ break
70708
+ }
70709
+ };
70710
+ var i = 0;
70711
+ var len = $uI(array.length);
70712
+ while ((i < len)) {
70713
+ var index = i;
70714
+ var arg1 = array[index];
70715
+ var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
70716
+ array$1.push(elem);
70717
+ i = ((1 + i) | 0)
70718
+ };
70719
+ $m_s_reflect_ManifestFactory$ObjectManifest$();
70720
+ var len$1 = $uI(array$1.length);
70721
+ var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
70722
+ var len$2 = result.u.length;
70723
+ var i$1 = 0;
70724
+ var j = 0;
70725
+ var x$1 = $uI(array$1.length);
70726
+ var x$3 = ((x$1 < len$2) ? x$1 : len$2);
70727
+ var that = result.u.length;
70728
+ var end = ((x$3 < that) ? x$3 : that);
70729
+ while ((i$1 < end)) {
70730
+ var jsx$2 = j;
70731
+ var index$1 = i$1;
70732
+ result.set(jsx$2, array$1[index$1]);
70733
+ i$1 = ((1 + i$1) | 0);
70734
+ j = ((1 + j) | 0)
70735
+ };
70736
+ return jsx$3.format__T__AO__T($$this, result)
70737
+ })
70738
+ })(this));
70739
+ var this$18 = $m_sc_Seq$();
70740
+ return $as_sc_TraversableOnce(arr.map__F1__scg_CanBuildFrom__O(jsx$1, this$18.ReusableCBFInstance$2)).mkString__T()
70741
+ });
70742
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70743
+ return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70744
+ });
70745
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70746
+ return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70747
+ });
70748
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70749
+ return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70750
+ });
70751
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
70752
+ var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
70753
+ var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
70754
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70755
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70756
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
70757
+ var jsx$1 = (x === op)
70758
+ } else {
70759
+ var jsx$1 = false
70760
+ }
70761
+ } else {
70762
+ var jsx$1 = false
70763
+ };
70764
+ if (jsx$1) {
70765
+ return (((("math.floor(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
70766
+ } else {
70767
+ return $f_Lio_kaitai_struct_translators_CommonOps__numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right)
70768
+ }
70769
+ });
70770
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
70771
+ return (("\"" + this.decEscapeByteArray__p3__sc_Seq__T(arr)) + "\"")
70772
+ });
70773
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70774
+ return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70775
+ });
70776
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
70777
+ return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
70778
+ });
70779
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70780
+ return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70781
+ });
70782
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70783
+ var this$1 = this.importList$3;
70784
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70785
+ return (("utils.byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70786
+ });
70787
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70788
+ return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70789
+ });
70790
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
70791
+ return (($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + ".") + label)
70792
+ });
70793
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList = (function(provider, importList) {
70794
+ this.importList$3 = importList;
70795
+ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
70796
+ var self = new $c_jl_Character().init___C(9);
70797
+ var jsx$9 = new $c_T2().init___O__O(self, "\\t");
70798
+ var self$1 = new $c_jl_Character().init___C(10);
70799
+ var jsx$8 = new $c_T2().init___O__O(self$1, "\\n");
70800
+ var self$2 = new $c_jl_Character().init___C(13);
70801
+ var jsx$7 = new $c_T2().init___O__O(self$2, "\\r");
70802
+ var self$3 = new $c_jl_Character().init___C(34);
70803
+ var jsx$6 = new $c_T2().init___O__O(self$3, "\\\"");
70804
+ var self$4 = new $c_jl_Character().init___C(92);
70805
+ var jsx$5 = new $c_T2().init___O__O(self$4, "\\\\");
70806
+ var self$5 = new $c_jl_Character().init___C(7);
70807
+ var jsx$4 = new $c_T2().init___O__O(self$5, "\\a");
70808
+ var self$6 = new $c_jl_Character().init___C(8);
70809
+ var jsx$3 = new $c_T2().init___O__O(self$6, "\\b");
70810
+ var self$7 = new $c_jl_Character().init___C(11);
70811
+ var jsx$2 = new $c_T2().init___O__O(self$7, "\\v");
70812
+ var self$8 = new $c_jl_Character().init___C(12);
70813
+ var jsx$1 = new $c_T2().init___O__O(self$8, "\\f");
70814
+ var self$9 = new $c_jl_Character().init___C(27);
70815
+ var array = [jsx$9, jsx$8, jsx$7, jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O(self$9, "\\027")];
70816
+ var this$44 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
70817
+ var i = 0;
70818
+ var len = $uI(array.length);
70819
+ while ((i < len)) {
70820
+ var index = i;
70821
+ var arg1 = array[index];
70822
+ this$44.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
70823
+ i = ((1 + i) | 0)
70824
+ };
70825
+ this.asciiCharQuoteMap$3 = $as_sci_Map(this$44.elems$1);
70826
+ return this
70827
+ });
70828
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70829
+ return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70830
+ });
70831
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
70832
+ return ((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + "(") + id) + ")")
70833
+ });
70834
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, right) {
70835
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " .. ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
70836
+ });
70837
+ var $d_Lio_kaitai_struct_translators_LuaTranslator = new $TypeData().initClass({
70838
+ Lio_kaitai_struct_translators_LuaTranslator: 0
70839
+ }, false, "io.kaitai.struct.translators.LuaTranslator", {
70840
+ Lio_kaitai_struct_translators_LuaTranslator: 1,
70841
+ Lio_kaitai_struct_translators_BaseTranslator: 1,
70842
+ Lio_kaitai_struct_translators_TypeDetector: 1,
70843
+ O: 1,
70844
+ Lio_kaitai_struct_translators_AbstractTranslator: 1,
70845
+ Lio_kaitai_struct_translators_CommonLiterals: 1,
70846
+ Lio_kaitai_struct_translators_CommonOps: 1,
70847
+ Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
70848
+ Lio_kaitai_struct_translators_CommonMethods: 1,
70849
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1,
70850
+ Lio_kaitai_struct_translators_MinSignedIntegers: 1
70851
+ });
70852
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_LuaTranslator;
70853
+ /** @constructor */
70854
+ function $c_Lio_kaitai_struct_translators_PHPTranslator() {
70855
+ $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
70856
+ this.asciiCharQuoteMap$3 = null;
70857
+ this.namespaceRef$3 = null
70858
+ }
70859
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
70860
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_PHPTranslator;
70861
+ /** @constructor */
70862
+ function $h_Lio_kaitai_struct_translators_PHPTranslator() {
70863
+ /*<skip>*/
70864
+ }
70865
+ $h_Lio_kaitai_struct_translators_PHPTranslator.prototype = $c_Lio_kaitai_struct_translators_PHPTranslator.prototype;
70866
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
70867
+ return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base)) + ")")
70868
+ });
70869
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70870
+ return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70871
+ });
70872
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
70873
+ var this$1 = $m_s_math_BigInt$();
70874
+ var that = this$1.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(0, (-2147483648)));
70875
+ if ($f_s_math_Ordered__$$greater$eq__O__Z(n, that)) {
70876
+ var that$1 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
70877
+ var jsx$2 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
70878
+ } else {
70879
+ var jsx$2 = false
70880
+ };
70881
+ if (jsx$2) {
70882
+ var this$2 = $m_s_math_BigInt$();
70883
+ var t = n.bigInteger$3.longValue__J();
70884
+ var lo = t.lo$2;
70885
+ var hi = t.hi$2;
70886
+ var jsx$1 = this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi))
70887
+ } else {
70888
+ var jsx$1 = n
70889
+ };
70890
+ return $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_math_BigInt__T(this, jsx$1)
70891
+ });
70892
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70893
+ return (("count(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70894
+ });
70895
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, from, to) {
70896
+ return this.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, from, to)
70897
+ });
70898
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70899
+ return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70900
+ });
70901
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70902
+ return (("strrev(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70903
+ });
70904
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70905
+ return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70906
+ });
70907
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_RuntimeConfig = (function(provider, config) {
70908
+ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
70909
+ var self = new $c_jl_Character().init___C(9);
70910
+ var jsx$8 = new $c_T2().init___O__O(self, "\\t");
70911
+ var self$1 = new $c_jl_Character().init___C(10);
70912
+ var jsx$7 = new $c_T2().init___O__O(self$1, "\\n");
70913
+ var self$2 = new $c_jl_Character().init___C(13);
70914
+ var jsx$6 = new $c_T2().init___O__O(self$2, "\\r");
70915
+ var self$3 = new $c_jl_Character().init___C(34);
70916
+ var jsx$5 = new $c_T2().init___O__O(self$3, "\\\"");
70917
+ var self$4 = new $c_jl_Character().init___C(92);
70918
+ var jsx$4 = new $c_T2().init___O__O(self$4, "\\\\");
70919
+ var self$5 = new $c_jl_Character().init___C(36);
70920
+ var jsx$3 = new $c_T2().init___O__O(self$5, "\\$");
70921
+ var self$6 = new $c_jl_Character().init___C(12);
70922
+ var jsx$2 = new $c_T2().init___O__O(self$6, "\\f");
70923
+ var self$7 = new $c_jl_Character().init___C(11);
70924
+ var jsx$1 = new $c_T2().init___O__O(self$7, "\\v");
70925
+ var self$8 = new $c_jl_Character().init___C(27);
70926
+ var array = [jsx$8, jsx$7, jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O(self$8, "\\e")];
70927
+ var this$40 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
70928
+ var i = 0;
70929
+ var len = $uI(array.length);
70930
+ while ((i < len)) {
70931
+ var index = i;
70932
+ var arg1 = array[index];
70933
+ this$40.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
70934
+ i = ((1 + i) | 0)
70935
+ };
70936
+ this.asciiCharQuoteMap$3 = $as_sci_Map(this$40.elems$1);
70937
+ var thiz = config.phpNamespace$1;
70938
+ if ((thiz === null)) {
70939
+ throw new $c_jl_NullPointerException().init___()
70940
+ };
70941
+ this.namespaceRef$3 = ((thiz === "") ? "" : ("\\" + config.phpNamespace$1));
70942
+ return this
70943
+ });
70944
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
70945
+ return this.doByteArrayNonLiteral__sc_Seq__T(elts)
70946
+ });
70947
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70948
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70949
+ });
70950
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70951
+ return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70952
+ });
70953
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70954
+ return (("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + "[0])")
70955
+ });
70956
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.types2classAbs__sci_List__T = (function(names) {
70957
+ $m_sci_List$();
70958
+ var o9 = new $c_s_Some().init___O(names);
70959
+ if ((o9.value$2 !== null)) {
70960
+ var this$2 = $as_sc_LinearSeqOptimized(o9.value$2);
70961
+ var jsx$1 = ($f_sc_LinearSeqOptimized__lengthCompare__I__I(this$2, 1) === 0)
70962
+ } else {
70963
+ var jsx$1 = false
70964
+ };
70965
+ if (jsx$1) {
70966
+ var this$3 = $as_sc_LinearSeqOptimized(o9.value$2);
70967
+ var p3 = $as_T($f_sc_LinearSeqOptimized__apply__I__O(this$3, 0));
70968
+ if ((p3 === "kaitai_struct")) {
70969
+ return "\\Kaitai\\Struct\\Struct"
70970
+ }
70971
+ };
70972
+ return ((this.namespaceRef$3 + "\\") + $m_Lio_kaitai_struct_languages_PHPCompiler$().types2classRel__sci_List__T(names))
70973
+ });
70974
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70975
+ return this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70976
+ });
70977
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70978
+ var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70979
+ return (((v + "[count(") + v) + ") - 1]")
70980
+ });
70981
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70982
+ return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70983
+ });
70984
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLiteralUnicode__C__T = (function(code) {
70985
+ var this$4 = new $c_sci_StringOps().init___T("\\u{%x}");
70986
+ var array = [code];
70987
+ var jsx$2 = $m_sjsr_RuntimeString$();
70988
+ var $$this = this$4.repr$1;
70989
+ $m_sc_Seq$();
70990
+ $m_sjs_js_WrappedArray$();
70991
+ var array$1 = [];
70992
+ var x1 = $uI(array.length);
70993
+ switch (x1) {
70994
+ case (-1): {
70995
+ break
70996
+ }
70997
+ };
70998
+ var i = 0;
70999
+ var len = $uI(array.length);
71000
+ while ((i < len)) {
71001
+ var index = i;
71002
+ var arg1 = array[index];
71003
+ var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
71004
+ array$1.push(elem);
71005
+ i = ((1 + i) | 0)
71006
+ };
71007
+ $m_s_reflect_ManifestFactory$ObjectManifest$();
71008
+ var len$1 = $uI(array$1.length);
71009
+ var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
71010
+ var len$2 = result.u.length;
71011
+ var i$1 = 0;
71012
+ var j = 0;
71013
+ var x = $uI(array$1.length);
71014
+ var x$1 = ((x < len$2) ? x : len$2);
71015
+ var that = result.u.length;
71016
+ var end = ((x$1 < that) ? x$1 : that);
71017
+ while ((i$1 < end)) {
71018
+ var jsx$1 = j;
71019
+ var index$1 = i$1;
71020
+ result.set(jsx$1, array$1[index$1]);
71021
+ i$1 = ((1 + i$1) | 0);
71022
+ j = ((1 + j) | 0)
71023
+ };
71024
+ return jsx$2.format__T__AO__T($$this, result)
71025
+ });
71026
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
71027
+ return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
71028
+ });
71029
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
71030
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "[0]")
71031
+ });
71032
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
71033
+ return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
71034
+ });
71035
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
71036
+ return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + " ? ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifTrue)) + " : ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifFalse)) + ")")
71037
+ });
71038
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
71039
+ return this.asciiCharQuoteMap$3
71040
+ });
71041
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
71042
+ return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
71043
+ });
71044
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
71045
+ return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
71046
+ });
71047
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
71048
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
71049
+ });
71050
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
71051
+ return (((((("\\Kaitai\\Struct\\Stream::substring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(from)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(to)) + ")")
71052
+ });
71053
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71054
+ return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + "[") + this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + " - 1])")
71055
+ });
71056
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71057
+ return (("\\Kaitai\\Struct\\Stream::byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
71058
+ });
71059
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__T = (function(elts) {
71060
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
71061
+ return (function(v$2) {
71062
+ var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
71063
+ return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
71064
+ })
71065
+ })(this));
71066
+ var this$1 = $m_sc_Seq$();
71067
+ return (("pack('C*', " + $as_sc_TraversableOnce(elts.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + ")")
71068
+ });
71069
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
71070
+ return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
71071
+ });
71072
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doLocalName__T__T = (function(s) {
71073
+ return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "$_" : (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1 === s) ? "$_buf" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "$i" : ("$this->" + this.doName__T__T(s)))))
71074
+ });
71075
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
71076
+ return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
71077
+ });
71078
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
71079
+ return this.doByteArrayLiteral__sc_Seq__T(arr)
70728
71080
  });
70729
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.$classData = $d_Lfastparse_parsers_Intrinsics$ElemsWhile;
70730
- /** @constructor */
70731
- function $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes() {
70732
- $c_Lio_kaitai_struct_datatype_DataType$UserType.call(this);
70733
- this.$$undargs$4 = null;
70734
- this.bytes$4 = null;
70735
- this.process$4 = null
70736
- }
70737
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype = new $h_Lio_kaitai_struct_datatype_DataType$UserType();
70738
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes;
70739
- /** @constructor */
70740
- function $h_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes() {
70741
- /*<skip>*/
70742
- }
70743
- $h_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype = $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype;
70744
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productPrefix__T = (function() {
70745
- return "CalcUserTypeFromBytes"
71081
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71082
+ return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70746
71083
  });
70747
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productArity__I = (function() {
70748
- return 5
71084
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
71085
+ return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70749
71086
  });
70750
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.equals__O__Z = (function(x$1) {
70751
- if ((this === x$1)) {
70752
- return true
70753
- } else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)) {
70754
- var CalcUserTypeFromBytes$1 = $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(x$1);
70755
- var x = this.name$3;
70756
- var x$2 = CalcUserTypeFromBytes$1.name$3;
70757
- if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
70758
- var x$3 = this.forcedParent$3;
70759
- var x$4 = CalcUserTypeFromBytes$1.forcedParent$3;
70760
- var jsx$3 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
70761
- } else {
70762
- var jsx$3 = false
70763
- };
70764
- if (jsx$3) {
70765
- var x$5 = this.$$undargs$4;
70766
- var x$6 = CalcUserTypeFromBytes$1.$$undargs$4;
70767
- var jsx$2 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
70768
- } else {
70769
- var jsx$2 = false
70770
- };
70771
- if (jsx$2) {
70772
- var x$7 = this.bytes$4;
70773
- var x$8 = CalcUserTypeFromBytes$1.bytes$4;
70774
- var jsx$1 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
70775
- } else {
70776
- var jsx$1 = false
70777
- };
70778
- if (jsx$1) {
70779
- var x$9 = this.process$4;
70780
- var x$10 = CalcUserTypeFromBytes$1.process$4;
70781
- return ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
70782
- } else {
70783
- return false
70784
- }
70785
- } else {
70786
- return false
70787
- }
71087
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
71088
+ return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70788
71089
  });
70789
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productElement__I__O = (function(x$1) {
70790
- switch (x$1) {
70791
- case 0: {
70792
- return this.name$3;
70793
- break
70794
- }
70795
- case 1: {
70796
- return this.forcedParent$3;
70797
- break
70798
- }
70799
- case 2: {
70800
- return this.$$undargs$4;
70801
- break
70802
- }
70803
- case 3: {
70804
- return this.bytes$4;
70805
- break
70806
- }
70807
- case 4: {
70808
- return this.process$4;
70809
- break
70810
- }
70811
- default: {
70812
- throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
70813
- }
70814
- }
71090
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
71091
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
71092
+ return ((baseStr === "10") ? (("strval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")") : (((("base_convert(strval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + "), 10, ") + baseStr) + ")"))
70815
71093
  });
70816
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.toString__T = (function() {
70817
- return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
71094
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
71095
+ return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container)) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "])")
70818
71096
  });
70819
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.init___sci_List__s_Option__sc_Seq__Lio_kaitai_struct_datatype_DataType$BytesType__s_Option = (function(_name, _forcedParent, _args, bytes, process) {
70820
- this.$$undargs$4 = _args;
70821
- this.bytes$4 = bytes;
70822
- this.process$4 = process;
70823
- $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.init___sci_List__s_Option__sc_Seq.call(this, _name, _forcedParent, _args);
70824
- return this
71097
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doName__T__T = (function(s) {
71098
+ return ($m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(s) + "()")
70825
71099
  });
70826
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.isOwning__Z = (function() {
70827
- return false
71100
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
71101
+ return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
70828
71102
  });
70829
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.hashCode__I = (function() {
70830
- var this$2 = $m_s_util_hashing_MurmurHash3$();
70831
- return this$2.productHash__s_Product__I__I(this, (-889275714))
71103
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
71104
+ return (((("\\Kaitai\\Struct\\Stream::bytesToStr(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
70832
71105
  });
70833
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productIterator__sc_Iterator = (function() {
70834
- return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
71106
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
71107
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70835
71108
  });
70836
- function $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj) {
70837
- return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes"))
70838
- }
70839
- function $isArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) {
70840
- return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)))
70841
- }
70842
- function $asArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) {
70843
- return (($isArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes;", depth))
70844
- }
70845
- var $d_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes = new $TypeData().initClass({
70846
- Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes: 0
70847
- }, false, "io.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes", {
70848
- Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes: 1,
70849
- Lio_kaitai_struct_datatype_DataType$UserType: 1,
70850
- Lio_kaitai_struct_datatype_DataType$StructType: 1,
70851
- Lio_kaitai_struct_datatype_DataType$ComplexDataType: 1,
70852
- O: 1,
70853
- Lio_kaitai_struct_datatype_DataType: 1,
70854
- Lio_kaitai_struct_datatype_DataType$Processing: 1,
70855
- s_Product: 1,
70856
- s_Equals: 1,
70857
- s_Serializable: 1,
70858
- Ljava_io_Serializable: 1
71109
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
71110
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + "->") + this.doName__T__T(attrName))
70859
71111
  });
70860
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes;
70861
- /** @constructor */
70862
- function $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes() {
70863
- $c_Lio_kaitai_struct_datatype_DataType$UserType.call(this);
70864
- this.$$undargs$4 = null;
70865
- this.bytes$4 = null;
70866
- this.process$4 = null
70867
- }
70868
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype = new $h_Lio_kaitai_struct_datatype_DataType$UserType();
70869
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes;
70870
- /** @constructor */
70871
- function $h_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes() {
70872
- /*<skip>*/
70873
- }
70874
- $h_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype = $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype;
70875
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productPrefix__T = (function() {
70876
- return "UserTypeFromBytes"
71112
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71113
+ return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70877
71114
  });
70878
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productArity__I = (function() {
70879
- return 5
71115
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
71116
+ return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70880
71117
  });
70881
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.asNonOwning__Lio_kaitai_struct_datatype_DataType = (function() {
70882
- return this.asNonOwning__Lio_kaitai_struct_datatype_DataType$UserType()
71118
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
71119
+ return (("\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\"")
70883
71120
  });
70884
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.equals__O__Z = (function(x$1) {
70885
- if ((this === x$1)) {
70886
- return true
70887
- } else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
70888
- var UserTypeFromBytes$1 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(x$1);
70889
- var x = this.name$3;
70890
- var x$2 = UserTypeFromBytes$1.name$3;
70891
- if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
70892
- var x$3 = this.forcedParent$3;
70893
- var x$4 = UserTypeFromBytes$1.forcedParent$3;
70894
- var jsx$3 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
71121
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
71122
+ var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
71123
+ var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
71124
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71125
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71126
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
71127
+ var jsx$1 = (x === op)
70895
71128
  } else {
70896
- var jsx$3 = false
70897
- };
70898
- if (jsx$3) {
70899
- var x$5 = this.$$undargs$4;
70900
- var x$6 = UserTypeFromBytes$1.$$undargs$4;
70901
- var jsx$2 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
71129
+ var jsx$1 = false
71130
+ }
71131
+ } else {
71132
+ var jsx$1 = false
71133
+ };
71134
+ if (jsx$1) {
71135
+ return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
71136
+ } else {
71137
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71138
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71139
+ var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
71140
+ var jsx$2 = (x$3 === op)
71141
+ } else {
71142
+ var jsx$2 = false
71143
+ }
70902
71144
  } else {
70903
71145
  var jsx$2 = false
70904
71146
  };
70905
71147
  if (jsx$2) {
70906
- var x$7 = this.bytes$4;
70907
- var x$8 = UserTypeFromBytes$1.bytes$4;
70908
- var jsx$1 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
70909
- } else {
70910
- var jsx$1 = false
70911
- };
70912
- if (jsx$1) {
70913
- var x$9 = this.process$4;
70914
- var x$10 = UserTypeFromBytes$1.process$4;
70915
- return ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
71148
+ return (((("\\Kaitai\\Struct\\Stream::mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
70916
71149
  } else {
70917
- return false
70918
- }
70919
- } else {
70920
- return false
70921
- }
70922
- });
70923
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.asNonOwning__Lio_kaitai_struct_datatype_DataType$UserType = (function() {
70924
- var r = new $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes().init___sci_List__s_Option__sc_Seq__Lio_kaitai_struct_datatype_DataType$BytesType__s_Option(this.name$3, this.forcedParent$3, this.args$3, this.bytes$4, this.process$4);
70925
- r.classSpec$3 = this.classSpec$3;
70926
- return r
70927
- });
70928
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productElement__I__O = (function(x$1) {
70929
- switch (x$1) {
70930
- case 0: {
70931
- return this.name$3;
70932
- break
70933
- }
70934
- case 1: {
70935
- return this.forcedParent$3;
70936
- break
70937
- }
70938
- case 2: {
70939
- return this.$$undargs$4;
70940
- break
70941
- }
70942
- case 3: {
70943
- return this.bytes$4;
70944
- break
70945
- }
70946
- case 4: {
70947
- return this.process$4;
70948
- break
70949
- }
70950
- default: {
70951
- throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
71150
+ return $f_Lio_kaitai_struct_translators_CommonOps__numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right)
70952
71151
  }
70953
71152
  }
70954
71153
  });
70955
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.toString__T = (function() {
70956
- return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
70957
- });
70958
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.init___sci_List__s_Option__sc_Seq__Lio_kaitai_struct_datatype_DataType$BytesType__s_Option = (function(_name, _forcedParent, _args, bytes, process) {
70959
- this.$$undargs$4 = _args;
70960
- this.bytes$4 = bytes;
70961
- this.process$4 = process;
70962
- $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.init___sci_List__s_Option__sc_Seq.call(this, _name, _forcedParent, _args);
70963
- return this
70964
- });
70965
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.isOwning__Z = (function() {
70966
- return true
70967
- });
70968
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.hashCode__I = (function() {
70969
- var this$2 = $m_s_util_hashing_MurmurHash3$();
70970
- return this$2.productHash__s_Product__I__I(this, (-889275714))
70971
- });
70972
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productIterator__sc_Iterator = (function() {
70973
- return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
70974
- });
70975
- function $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj) {
70976
- return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$UserTypeFromBytes"))
70977
- }
70978
- function $isArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) {
70979
- return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)))
70980
- }
70981
- function $asArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) {
70982
- return (($isArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.datatype.DataType$UserTypeFromBytes;", depth))
70983
- }
70984
- var $d_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes = new $TypeData().initClass({
70985
- Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes: 0
70986
- }, false, "io.kaitai.struct.datatype.DataType$UserTypeFromBytes", {
70987
- Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes: 1,
70988
- Lio_kaitai_struct_datatype_DataType$UserType: 1,
70989
- Lio_kaitai_struct_datatype_DataType$StructType: 1,
70990
- Lio_kaitai_struct_datatype_DataType$ComplexDataType: 1,
70991
- O: 1,
70992
- Lio_kaitai_struct_datatype_DataType: 1,
70993
- Lio_kaitai_struct_datatype_DataType$Processing: 1,
70994
- s_Product: 1,
70995
- s_Equals: 1,
70996
- s_Serializable: 1,
70997
- Ljava_io_Serializable: 1
70998
- });
70999
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes;
71000
- /** @constructor */
71001
- function $c_Lio_kaitai_struct_translators_ConstructTranslator() {
71002
- $c_Lio_kaitai_struct_translators_PythonTranslator.call(this)
71003
- }
71004
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype = new $h_Lio_kaitai_struct_translators_PythonTranslator();
71005
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_ConstructTranslator;
71006
- /** @constructor */
71007
- function $h_Lio_kaitai_struct_translators_ConstructTranslator() {
71008
- /*<skip>*/
71009
- }
71010
- $h_Lio_kaitai_struct_translators_ConstructTranslator.prototype = $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype;
71011
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
71012
- return (("stream_tell(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
71013
- });
71014
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
71015
- return this.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
71154
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
71155
+ return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
71016
71156
  });
71017
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
71018
- return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
71157
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71158
+ return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
71019
71159
  });
71020
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doLocalName__T__T = (function(s) {
71021
- return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "obj_" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "i" : (($m_Lio_kaitai_struct_format_Identifier$().ROOT$1 === s) ? "this._root" : (($m_Lio_kaitai_struct_format_Identifier$().IO$1 === s) ? "_io" : ("this." + this.doName__T__T(s))))))
71160
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71161
+ return (("\\Kaitai\\Struct\\Stream::byteArrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
71022
71162
  });
71023
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
71024
- return (("stream_size(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
71163
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71164
+ return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
71025
71165
  });
71026
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
71027
- return (("stream_iseof(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
71166
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
71167
+ var enumClass = this.types2classAbs__sci_List__T(enumTypeAbs);
71168
+ return ((enumClass + "::") + ($m_Lio_kaitai_struct_Utils$(), $as_T(label.toUpperCase())))
71028
71169
  });
71029
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doName__T__T = (function(s) {
71030
- return (($m_Lio_kaitai_struct_format_Identifier$().PARENT$1 === s) ? "_" : s)
71170
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71171
+ return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
71031
71172
  });
71032
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
71033
- return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
71173
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
71174
+ return id
71034
71175
  });
71035
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList = (function(provider, importList) {
71036
- $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList.call(this, provider, importList);
71037
- return this
71176
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, right) {
71177
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " . ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
71038
71178
  });
71039
- var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initClass({
71040
- Lio_kaitai_struct_translators_ConstructTranslator: 0
71041
- }, false, "io.kaitai.struct.translators.ConstructTranslator", {
71042
- Lio_kaitai_struct_translators_ConstructTranslator: 1,
71043
- Lio_kaitai_struct_translators_PythonTranslator: 1,
71179
+ var $d_Lio_kaitai_struct_translators_PHPTranslator = new $TypeData().initClass({
71180
+ Lio_kaitai_struct_translators_PHPTranslator: 0
71181
+ }, false, "io.kaitai.struct.translators.PHPTranslator", {
71182
+ Lio_kaitai_struct_translators_PHPTranslator: 1,
71044
71183
  Lio_kaitai_struct_translators_BaseTranslator: 1,
71045
71184
  Lio_kaitai_struct_translators_TypeDetector: 1,
71046
71185
  O: 1,
@@ -71049,9 +71188,10 @@ var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initC
71049
71188
  Lio_kaitai_struct_translators_CommonOps: 1,
71050
71189
  Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
71051
71190
  Lio_kaitai_struct_translators_CommonMethods: 1,
71052
- Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
71191
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1,
71192
+ Lio_kaitai_struct_translators_MinSignedIntegers: 1
71053
71193
  });
71054
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_ConstructTranslator;
71194
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_PHPTranslator;
71055
71195
  /** @constructor */
71056
71196
  function $c_s_reflect_ManifestFactory$AnyManifest$() {
71057
71197
  $c_s_reflect_ManifestFactory$PhantomManifest.call(this)
@@ -73461,7 +73601,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.enumDeclaration__sci_List__
73461
73601
  var lo = t.lo$2;
73462
73602
  var hi = t.hi$2;
73463
73603
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
73464
- $this.outHdr$2.puts__T__V(((($this.value2Const__T__T__T(enumName$1, label.name$1) + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ","))
73604
+ var jsx$4 = $this.outHdr$2;
73605
+ var jsx$3 = $this.value2Const__T__T__T(enumName$1, label.name$1);
73606
+ var jsx$2 = $this.translator$2;
73607
+ var this$6 = $m_s_math_BigInt$();
73608
+ jsx$4.puts__T__V((((jsx$3 + " = ") + jsx$2.doIntLiteral__s_math_BigInt__T(this$6.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi)))) + ","))
73465
73609
  } else {
73466
73610
  throw new $c_s_MatchError().init___O(x0$1)
73467
73611
  }
@@ -73474,7 +73618,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.enumDeclaration__sci_List__
73474
73618
  var lo$1 = t$1.lo$2;
73475
73619
  var hi$1 = t$1.hi$2;
73476
73620
  var label$1 = $as_Lio_kaitai_struct_format_EnumValueSpec(x1.$$und2__O());
73477
- this.outHdr$2.puts__T__V(((this.value2Const__T__T__T(enumName, label$1.name$1) + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo$1, hi$1)))
73621
+ var jsx$7 = this.outHdr$2;
73622
+ var jsx$6 = this.value2Const__T__T__T(enumName, label$1.name$1);
73623
+ var jsx$5 = this.translator$2;
73624
+ var this$7 = $m_s_math_BigInt$();
73625
+ jsx$7.puts__T__V(((jsx$6 + " = ") + jsx$5.doIntLiteral__s_math_BigInt__T(this$7.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo$1, hi$1)))))
73478
73626
  } else {
73479
73627
  throw new $c_s_MatchError().init___O(x1)
73480
73628
  };
@@ -75965,17 +76113,21 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci
75965
76113
  var lo = t.lo$2;
75966
76114
  var hi = t.hi$2;
75967
76115
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
75968
- var jsx$2 = $this.out$2;
76116
+ var jsx$3 = $this.out$2;
75969
76117
  var label$1 = label.name$1;
75970
76118
  $m_Lio_kaitai_struct_Utils$();
75971
- jsx$2.puts__T__V(((($as_T(label$1.toUpperCase()) + ": ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ","))
76119
+ var jsx$2 = $as_T(label$1.toUpperCase());
76120
+ var this$4 = $m_s_math_BigInt$();
76121
+ var n = this$4.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
76122
+ var this$6 = n.bigInteger$3;
76123
+ jsx$3.puts__T__V((((jsx$2 + ": ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$6)) + ","))
75972
76124
  } else {
75973
76125
  throw new $c_s_MatchError().init___O(x0$1)
75974
76126
  }
75975
76127
  })
75976
76128
  })(this, enumName)));
75977
- var this$4 = this.out$2;
75978
- this$4.sb$2.append__T__scm_StringBuilder("\n");
76129
+ var this$7 = this.out$2;
76130
+ this$7.sb$2.append__T__scm_StringBuilder("\n");
75979
76131
  enumColl.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2$1, enumName$2) {
75980
76132
  return (function(x0$2$2) {
75981
76133
  var x0$2 = $as_T2(x0$2$2);
@@ -75985,10 +76137,10 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci
75985
76137
  var hi$1 = t$1.hi$2;
75986
76138
  var label$2 = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$2.$$und2__O());
75987
76139
  var idStr = ((hi$1 < 0) ? (("\"" + $m_sjsr_RuntimeLong$().scala$scalajs$runtime$RuntimeLong$$toString__I__I__T(lo$1, hi$1)) + "\"") : $m_sjsr_RuntimeLong$().scala$scalajs$runtime$RuntimeLong$$toString__I__I__T(lo$1, hi$1));
75988
- var jsx$3 = this$2$1.out$2;
76140
+ var jsx$4 = this$2$1.out$2;
75989
76141
  var label$3 = label$2.name$1;
75990
76142
  $m_Lio_kaitai_struct_Utils$();
75991
- jsx$3.puts__T__V((((idStr + ": \"") + $as_T(label$3.toUpperCase())) + "\","))
76143
+ jsx$4.puts__T__V((((idStr + ": \"") + $as_T(label$3.toUpperCase())) + "\","))
75992
76144
  } else {
75993
76145
  throw new $c_s_MatchError().init___O(x0$2)
75994
76146
  }
@@ -75996,8 +76148,8 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci
75996
76148
  })(this, enumName)));
75997
76149
  this.out$2.dec__V();
75998
76150
  this.out$2.puts__T__V("});");
75999
- var this$8 = this.out$2;
76000
- this$8.sb$2.append__T__scm_StringBuilder("\n")
76151
+ var this$11 = this.out$2;
76152
+ this$11.sb$2.append__T__scm_StringBuilder("\n")
76001
76153
  });
76002
76154
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchIfCaseFirstStart__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(condition) {
76003
76155
  this.out$2.puts__T__V((("if (" + this.switchCmpExpr__p2__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + ") {"));
@@ -76849,10 +77001,13 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.enumDeclaration__sci_List__
76849
77001
  var hi = t.hi$2;
76850
77002
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
76851
77003
  $this.universalDoc__Lio_kaitai_struct_format_DocSpec__V(label.doc$1);
76852
- var jsx$1 = $this.out$2;
77004
+ var jsx$3 = $this.out$2;
76853
77005
  var label$1 = label.name$1;
76854
77006
  $m_Lio_kaitai_struct_Utils$();
76855
- jsx$1.puts__T__V((((("const " + $as_T(label$1.toUpperCase())) + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ";"))
77007
+ var jsx$2 = $as_T(label$1.toUpperCase());
77008
+ var jsx$1 = $this.translator$2;
77009
+ var this$8 = $m_s_math_BigInt$();
77010
+ jsx$3.puts__T__V((((("const " + jsx$2) + " = ") + jsx$1.doIntLiteral__s_math_BigInt__T(this$8.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi)))) + ";"))
76856
77011
  } else {
76857
77012
  throw new $c_s_MatchError().init___O(x0$1)
76858
77013
  }
@@ -77524,7 +77679,12 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumDeclaration__sci_List_
77524
77679
  var lo = t.lo$2;
77525
77680
  var hi = t.hi$2;
77526
77681
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
77527
- $this.out$2.puts__T__V((((("our " + $this.enumValue__T__T__T(enumName$1, label.name$1)) + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ";"))
77682
+ var jsx$2 = $this.out$2;
77683
+ var jsx$1 = $this.enumValue__T__T__T(enumName$1, label.name$1);
77684
+ var this$2 = $m_s_math_BigInt$();
77685
+ var n = this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
77686
+ var this$4 = n.bigInteger$3;
77687
+ jsx$2.puts__T__V((((("our " + jsx$1) + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$4)) + ";"))
77528
77688
  } else {
77529
77689
  throw new $c_s_MatchError().init___O(x0$1)
77530
77690
  }
@@ -79330,7 +79490,12 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.enumDeclaration__T__T__s
79330
79490
  var lo = t.lo$2;
79331
79491
  var hi = t.hi$2;
79332
79492
  var label = $as_T(x0$1.$$und2__O());
79333
- $this.out$2.puts__T__V(((($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(label) + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ","))
79493
+ var jsx$2 = $this.out$2;
79494
+ var jsx$1 = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(label);
79495
+ var this$2 = $m_s_math_BigInt$();
79496
+ var n = this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
79497
+ var this$4 = n.bigInteger$3;
79498
+ jsx$2.puts__T__V((((jsx$1 + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$4)) + ","))
79334
79499
  } else {
79335
79500
  throw new $c_s_MatchError().init___O(x0$1)
79336
79501
  }
@@ -79829,26 +79994,41 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.parseExpr__Lio_kaitai_struc
79829
79994
  if (x10.isOpaque__Z()) {
79830
79995
  var addArgs = ""
79831
79996
  } else {
79997
+ var rc8 = false;
79998
+ var x2$2 = null;
79832
79999
  var x1$2 = x10.forcedParent$3;
79833
- if ((x1$2 instanceof $c_s_Some)) {
79834
- var x2$2 = $as_s_Some(x1$2);
79835
- var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
79836
- var parent = this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(fp)
79837
- } else {
79838
- var x = $m_s_None$();
79839
- if ((!(x === x1$2))) {
79840
- throw new $c_s_MatchError().init___O(x1$2)
80000
+ matchEnd9: {
80001
+ var parent;
80002
+ if ((x1$2 instanceof $c_s_Some)) {
80003
+ rc8 = true;
80004
+ x2$2 = $as_s_Some(x1$2);
80005
+ var p3 = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
80006
+ var x = $m_Lio_kaitai_struct_datatype_DataType$().USER$undTYPE$undNO$undPARENT$1;
80007
+ if (((x === null) ? (p3 === null) : x.equals__O__Z(p3))) {
80008
+ var parent = "nil";
80009
+ break matchEnd9
80010
+ }
80011
+ };
80012
+ if (rc8) {
80013
+ var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
80014
+ var parent = this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(fp);
80015
+ break matchEnd9
80016
+ };
80017
+ var x$3 = $m_s_None$();
80018
+ if ((x$3 === x1$2)) {
80019
+ var parent = "self";
80020
+ break matchEnd9
79841
80021
  };
79842
- var parent = "self"
80022
+ throw new $c_s_MatchError().init___O(x1$2)
79843
80023
  };
79844
80024
  var x1$3 = $as_Lio_kaitai_struct_format_ClassSpec(x10.classSpec$3.get__O()).meta$1.endian$1;
79845
80025
  matchEnd6: {
79846
80026
  var addEndian;
79847
80027
  if ((x1$3 instanceof $c_s_Some)) {
79848
80028
  var x2$3 = $as_s_Some(x1$3);
79849
- var p3 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
79850
- var x$3 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
79851
- if ((x$3 === p3)) {
80029
+ var p3$2 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
80030
+ var x$5 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
80031
+ if ((x$5 === p3$2)) {
79852
80032
  var addEndian = ", self._is_le";
79853
80033
  break matchEnd6
79854
80034
  }
@@ -80009,11 +80189,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.getRawIdExpr__Lio_kaitai_st
80009
80189
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.runReadCalc__V = (function() {
80010
80190
  var this$1 = this.out$2;
80011
80191
  this$1.sb$2.append__T__scm_StringBuilder("\n");
80012
- this.out$2.puts__T__V("if self._is_le then");
80192
+ this.out$2.puts__T__V("if self._is_le == true then");
80013
80193
  this.out$2.inc__V();
80014
80194
  this.out$2.puts__T__V("self:_read_le()");
80015
80195
  this.out$2.dec__V();
80016
- this.out$2.puts__T__V("elseif not self._is_le then");
80196
+ this.out$2.puts__T__V("elseif self._is_le == false then");
80017
80197
  this.out$2.inc__V();
80018
80198
  this.out$2.puts__T__V("self:_read_be()");
80019
80199
  this.out$2.dec__V();
@@ -80240,7 +80420,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.enumDeclaration__sci_List__
80240
80420
  var lo = t.lo$2;
80241
80421
  var hi = t.hi$2;
80242
80422
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
80243
- $this.out$2.puts__T__V((((label.name$1 + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ","))
80423
+ var jsx$3 = $this.out$2;
80424
+ var jsx$2 = label.name$1;
80425
+ var jsx$1 = $this.translator$2;
80426
+ var this$2 = $m_s_math_BigInt$();
80427
+ jsx$3.puts__T__V((((jsx$2 + " = ") + jsx$1.doIntLiteral__s_math_BigInt__T(this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi)))) + ","))
80244
80428
  } else {
80245
80429
  throw new $c_s_MatchError().init___O(x0$1)
80246
80430
  }
@@ -80248,8 +80432,8 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.enumDeclaration__sci_List__
80248
80432
  })(this)));
80249
80433
  this.out$2.dec__V();
80250
80434
  this.out$2.puts__T__V("}");
80251
- var this$2 = this.out$2;
80252
- this$2.sb$2.append__T__scm_StringBuilder("\n")
80435
+ var this$3 = this.out$2;
80436
+ this$3.sb$2.append__T__scm_StringBuilder("\n")
80253
80437
  });
80254
80438
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfCaseFirstStart__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(condition) {
80255
80439
  this.out$2.puts__T__V((("if _on == " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, condition)) + " then"));
@@ -81584,26 +81768,41 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.parseExpr__Lio_kaitai_stru
81584
81768
  if (x10.isOpaque__Z()) {
81585
81769
  var addArgs = ""
81586
81770
  } else {
81771
+ var rc8 = false;
81772
+ var x2$2 = null;
81587
81773
  var x1$2 = x10.forcedParent$3;
81588
- if ((x1$2 instanceof $c_s_Some)) {
81589
- var x2$2 = $as_s_Some(x1$2);
81590
- var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
81591
- var parent = this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(fp)
81592
- } else {
81593
- var x = $m_s_None$();
81594
- if ((!(x === x1$2))) {
81595
- throw new $c_s_MatchError().init___O(x1$2)
81774
+ matchEnd9: {
81775
+ var parent;
81776
+ if ((x1$2 instanceof $c_s_Some)) {
81777
+ rc8 = true;
81778
+ x2$2 = $as_s_Some(x1$2);
81779
+ var p3 = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
81780
+ var x = $m_Lio_kaitai_struct_datatype_DataType$().USER$undTYPE$undNO$undPARENT$1;
81781
+ if (((x === null) ? (p3 === null) : x.equals__O__Z(p3))) {
81782
+ var parent = "nil";
81783
+ break matchEnd9
81784
+ }
81785
+ };
81786
+ if (rc8) {
81787
+ var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
81788
+ var parent = this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(fp);
81789
+ break matchEnd9
81790
+ };
81791
+ var x$3 = $m_s_None$();
81792
+ if ((x$3 === x1$2)) {
81793
+ var parent = "self";
81794
+ break matchEnd9
81596
81795
  };
81597
- var parent = "self"
81796
+ throw new $c_s_MatchError().init___O(x1$2)
81598
81797
  };
81599
81798
  var x1$3 = $as_Lio_kaitai_struct_format_ClassSpec(x10.classSpec$3.get__O()).meta$1.endian$1;
81600
81799
  matchEnd6: {
81601
81800
  var addEndian;
81602
81801
  if ((x1$3 instanceof $c_s_Some)) {
81603
81802
  var x2$3 = $as_s_Some(x1$3);
81604
- var p3 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
81605
- var x$3 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
81606
- if ((x$3 === p3)) {
81803
+ var p3$2 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
81804
+ var x$5 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
81805
+ if ((x$5 === p3$2)) {
81607
81806
  var addEndian = ", @_is_le";
81608
81807
  break matchEnd6
81609
81808
  }
@@ -81986,7 +82185,11 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumDeclaration__T__T__sc_
81986
82185
  var lo = t.lo$2;
81987
82186
  var hi = t.hi$2;
81988
82187
  var label = $as_T(x0$1.$$und2__O());
81989
- $this.out$2.puts__T__V((((new $c_sjsr_RuntimeLong().init___I__I(lo, hi) + " => ") + $this.enumValue__T__T__T(enumName$1, label)) + ","))
82188
+ var jsx$1 = $this.out$2;
82189
+ var this$5 = $m_s_math_BigInt$();
82190
+ var n = this$5.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
82191
+ var this$7 = n.bigInteger$3;
82192
+ jsx$1.puts__T__V(((($m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$7) + " => ") + $this.enumValue__T__T__T(enumName$1, label)) + ","))
81990
82193
  } else {
81991
82194
  throw new $c_s_MatchError().init___O(x0$1)
81992
82195
  }
@@ -83880,26 +84083,41 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.parseExpr__Lio_kaitai_st
83880
84083
  if (x10.isOpaque__Z()) {
83881
84084
  var addArgs = ""
83882
84085
  } else {
84086
+ var rc8 = false;
84087
+ var x2$2 = null;
83883
84088
  var x1$2 = x10.forcedParent$3;
83884
- if ((x1$2 instanceof $c_s_Some)) {
83885
- var x2$2 = $as_s_Some(x1$2);
83886
- var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
83887
- var parent = this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(fp)
83888
- } else {
83889
- var x = $m_s_None$();
83890
- if ((!(x === x1$2))) {
83891
- throw new $c_s_MatchError().init___O(x1$2)
84089
+ matchEnd9: {
84090
+ var parent;
84091
+ if ((x1$2 instanceof $c_s_Some)) {
84092
+ rc8 = true;
84093
+ x2$2 = $as_s_Some(x1$2);
84094
+ var p3 = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
84095
+ var x = $m_Lio_kaitai_struct_datatype_DataType$().USER$undTYPE$undNO$undPARENT$1;
84096
+ if (((x === null) ? (p3 === null) : x.equals__O__Z(p3))) {
84097
+ var parent = "None";
84098
+ break matchEnd9
84099
+ }
84100
+ };
84101
+ if (rc8) {
84102
+ var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
84103
+ var parent = this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(fp);
84104
+ break matchEnd9
84105
+ };
84106
+ var x$3 = $m_s_None$();
84107
+ if ((x$3 === x1$2)) {
84108
+ var parent = "self";
84109
+ break matchEnd9
83892
84110
  };
83893
- var parent = "self"
84111
+ throw new $c_s_MatchError().init___O(x1$2)
83894
84112
  };
83895
84113
  var x1$3 = $as_Lio_kaitai_struct_format_ClassSpec(x10.classSpec$3.get__O()).meta$1.endian$1;
83896
84114
  matchEnd6: {
83897
84115
  var addEndian;
83898
84116
  if ((x1$3 instanceof $c_s_Some)) {
83899
84117
  var x2$3 = $as_s_Some(x1$3);
83900
- var p3 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
83901
- var x$3 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
83902
- if ((x$3 === p3)) {
84118
+ var p3$2 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
84119
+ var x$5 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
84120
+ if ((x$5 === p3$2)) {
83903
84121
  var addEndian = ", self._is_le";
83904
84122
  break matchEnd6
83905
84123
  }
@@ -84355,7 +84573,11 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.enumDeclaration__T__T__s
84355
84573
  var hi = t.hi$2;
84356
84574
  var label = $as_T(x0$1.$$und2__O());
84357
84575
  if ((label !== null)) {
84358
- $this.out$2.puts__T__V(((label + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)));
84576
+ var jsx$1 = $this.out$2;
84577
+ var this$3 = $m_s_math_BigInt$();
84578
+ var n = this$3.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
84579
+ var this$5 = n.bigInteger$3;
84580
+ jsx$1.puts__T__V(((label + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$5)));
84359
84581
  break matchEnd5
84360
84582
  }
84361
84583
  };