kaitai-struct-compiler 0.10.0-SNAPSHOT20220205.181311.1b9e1fdf → 0.10.0-SNAPSHOT20220312.201918.860afd0c

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 +1800 -1645
  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-SNAPSHOT20220205.181311.1b9e1fdf";
4417
- this.gitCommit$1 = "1b9e1fdf";
4418
- this.gitTime$1 = "2022-02-05T18:13:11+00:00";
4418
+ this.version$1 = "0.10-SNAPSHOT20220312.201918.860afd0c";
4419
+ this.gitCommit$1 = "860afd0c";
4420
+ this.gitTime$1 = "2022-03-12T20:19:18+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,15 +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((-2147483648));
66627
- if ($f_s_math_Ordered__$$less__O__Z(n, that$1)) {
66628
- var jsx$1 = true
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
66629
66298
  } else {
66630
66299
  var this$5 = $m_s_math_BigInt$();
66631
- var that$2 = this$5.apply__I__s_math_BigInt(2147483647);
66632
- var jsx$1 = $f_s_math_Ordered__$$greater__O__Z(n, that$2)
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)
66633
66302
  };
66634
- if (jsx$1) {
66303
+ if (jsx$2) {
66635
66304
  var suffix = "L"
66636
66305
  } else {
66637
66306
  var suffix = ""
@@ -66924,440 +66593,6 @@ var $d_Lio_kaitai_struct_translators_JavaTranslator = new $TypeData().initClass(
66924
66593
  });
66925
66594
  $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_JavaTranslator;
66926
66595
  /** @constructor */
66927
- function $c_Lio_kaitai_struct_translators_LuaTranslator() {
66928
- $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
66929
- this.importList$3 = null;
66930
- this.asciiCharQuoteMap$3 = null
66931
- }
66932
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
66933
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_LuaTranslator;
66934
- /** @constructor */
66935
- function $h_Lio_kaitai_struct_translators_LuaTranslator() {
66936
- /*<skip>*/
66937
- }
66938
- $h_Lio_kaitai_struct_translators_LuaTranslator.prototype = $c_Lio_kaitai_struct_translators_LuaTranslator.prototype;
66939
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
66940
- var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
66941
- var add = ((baseStr === "10") ? "" : (", " + baseStr));
66942
- return ((("tonumber(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + add) + ")")
66943
- });
66944
- $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) {
66945
- var f = (function($this) {
66946
- return (function(n$2) {
66947
- var n = $uZ(n$2);
66948
- return (n ? "1" : "0")
66949
- })
66950
- })(this);
66951
- if ((left instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
66952
- var x4 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(left);
66953
- var l = x4.n$1;
66954
- if ((right instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
66955
- var x5 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(right);
66956
- var r = x5.n$1;
66957
- return ((((f(l) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + f(r))
66958
- }
66959
- };
66960
- if ((left instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
66961
- var x7 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(left);
66962
- var l$2 = x7.n$1;
66963
- return ((((f(l$2) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
66964
- };
66965
- if ((right instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
66966
- var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(right);
66967
- var r$3 = x9.n$1;
66968
- return ((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + f(r$3))
66969
- };
66970
- 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)
66971
- });
66972
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
66973
- return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
66974
- });
66975
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
66976
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v) + ".value")
66977
- });
66978
- $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) {
66979
- 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)
66980
- });
66981
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66982
- return ("#" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a))
66983
- });
66984
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66985
- return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66986
- });
66987
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66988
- return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66989
- });
66990
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
66991
- return (("string.reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
66992
- });
66993
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
66994
- return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
66995
- });
66996
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
66997
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":pos()")
66998
- });
66999
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67000
- return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67001
- });
67002
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67003
- return (("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ", 1)")
67004
- });
67005
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67006
- var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
67007
- return (((table + "[#") + table) + "]")
67008
- });
67009
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67010
- return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67011
- });
67012
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67013
- return this.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67014
- });
67015
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLiteralUnicode__C__T = (function(code) {
67016
- var this$4 = new $c_sci_StringOps().init___T("\\u{%04x}");
67017
- var array = [code];
67018
- var jsx$2 = $m_sjsr_RuntimeString$();
67019
- var $$this = this$4.repr$1;
67020
- $m_sc_Seq$();
67021
- $m_sjs_js_WrappedArray$();
67022
- var array$1 = [];
67023
- var x1 = $uI(array.length);
67024
- switch (x1) {
67025
- case (-1): {
67026
- break
67027
- }
67028
- };
67029
- var i = 0;
67030
- var len = $uI(array.length);
67031
- while ((i < len)) {
67032
- var index = i;
67033
- var arg1 = array[index];
67034
- var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
67035
- array$1.push(elem);
67036
- i = ((1 + i) | 0)
67037
- };
67038
- $m_s_reflect_ManifestFactory$ObjectManifest$();
67039
- var len$1 = $uI(array$1.length);
67040
- var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
67041
- var len$2 = result.u.length;
67042
- var i$1 = 0;
67043
- var j = 0;
67044
- var x = $uI(array$1.length);
67045
- var x$1 = ((x < len$2) ? x : len$2);
67046
- var that = result.u.length;
67047
- var end = ((x$1 < that) ? x$1 : that);
67048
- while ((i$1 < end)) {
67049
- var jsx$1 = j;
67050
- var index$1 = i$1;
67051
- result.set(jsx$1, array$1[index$1]);
67052
- i$1 = ((1 + i$1) | 0);
67053
- j = ((1 + j) | 0)
67054
- };
67055
- return jsx$2.format__T__AO__T($$this, result)
67056
- });
67057
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doBoolLiteral__Z__T = (function(n) {
67058
- return (n ? "true" : "false")
67059
- });
67060
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67061
- var this$1 = this.importList$3;
67062
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
67063
- return (("utils.array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67064
- });
67065
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67066
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "[1]")
67067
- });
67068
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
67069
- return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
67070
- });
67071
- $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) {
67072
- var this$1 = this.importList$3;
67073
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
67074
- 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)) + "))")
67075
- });
67076
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
67077
- return this.asciiCharQuoteMap$3
67078
- });
67079
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.binOp__Lio_kaitai_struct_exprlang_Ast$operator__T = (function(op) {
67080
- var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitXor$();
67081
- if ((x === op)) {
67082
- return "~"
67083
- } else {
67084
- return $f_Lio_kaitai_struct_translators_CommonOps__binOp__Lio_kaitai_struct_exprlang_Ast$operator__T(this, op)
67085
- }
67086
- });
67087
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
67088
- return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
67089
- });
67090
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T = (function(t, value) {
67091
- var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
67092
- return (function(v$2) {
67093
- var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
67094
- return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
67095
- })
67096
- })(this));
67097
- var this$1 = $m_sc_Seq$();
67098
- return (("{" + $as_sc_TraversableOnce(value.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "}")
67099
- });
67100
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
67101
- return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + " and 1 or 0)")
67102
- });
67103
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
67104
- return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + " + 1]")
67105
- });
67106
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67107
- return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67108
- });
67109
- $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) {
67110
- 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)) + ")")
67111
- });
67112
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67113
- var this$1 = this.importList$3;
67114
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
67115
- return (("utils.byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67116
- });
67117
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67118
- var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
67119
- return (((("string.byte(" + table) + ", #") + table) + ")")
67120
- });
67121
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
67122
- 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)) + ")")
67123
- });
67124
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doLocalName__T__T = (function(s) {
67125
- return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "_" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "i" : ("self." + s)))
67126
- });
67127
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
67128
- return (("string.len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
67129
- });
67130
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T = (function(op) {
67131
- var x = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Not$();
67132
- if ((x === op)) {
67133
- return "not"
67134
- } else {
67135
- return $f_Lio_kaitai_struct_translators_CommonOps__unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(this, op)
67136
- }
67137
- });
67138
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
67139
- return this.doByteArrayLiteral__sc_Seq__T(arr)
67140
- });
67141
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67142
- var this$1 = this.importList$3;
67143
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
67144
- return (("utils.array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67145
- });
67146
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.booleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__T = (function(op) {
67147
- var x = $m_Lio_kaitai_struct_exprlang_Ast$boolop$Or$();
67148
- if ((x === op)) {
67149
- return "or"
67150
- } else {
67151
- var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$boolop$And$();
67152
- if ((x$3 === op)) {
67153
- return "and"
67154
- } else {
67155
- throw new $c_s_MatchError().init___O(op)
67156
- }
67157
- }
67158
- });
67159
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
67160
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":size()")
67161
- });
67162
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67163
- return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67164
- });
67165
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
67166
- var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
67167
- if ((baseStr === "10")) {
67168
- return (("tostring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")")
67169
- } else {
67170
- throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
67171
- }
67172
- });
67173
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
67174
- return (((("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + " + 1)")
67175
- });
67176
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doName__T__T = (function(s) {
67177
- return s
67178
- });
67179
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
67180
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":is_eof()")
67181
- });
67182
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
67183
- return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
67184
- });
67185
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
67186
- var this$1 = this.importList$3;
67187
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local str_decode = require(\"string_decode\")");
67188
- return (((("str_decode.decode(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
67189
- });
67190
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T = (function(op) {
67191
- var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
67192
- if ((x === op)) {
67193
- return "~="
67194
- } else {
67195
- return $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)
67196
- }
67197
- });
67198
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
67199
- return this.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T(value, et)
67200
- });
67201
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.decEscapeByteArray__p3__sc_Seq__T = (function(arr) {
67202
- var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
67203
- return (function(x$2) {
67204
- var x = $uB(x$2);
67205
- var this$4 = new $c_sci_StringOps().init___T("\\%03d");
67206
- var array = [(255 & x)];
67207
- var jsx$3 = $m_sjsr_RuntimeString$();
67208
- var $$this = this$4.repr$1;
67209
- $m_sc_Seq$();
67210
- $m_sjs_js_WrappedArray$();
67211
- var array$1 = [];
67212
- var x1 = $uI(array.length);
67213
- switch (x1) {
67214
- case (-1): {
67215
- break
67216
- }
67217
- };
67218
- var i = 0;
67219
- var len = $uI(array.length);
67220
- while ((i < len)) {
67221
- var index = i;
67222
- var arg1 = array[index];
67223
- var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
67224
- array$1.push(elem);
67225
- i = ((1 + i) | 0)
67226
- };
67227
- $m_s_reflect_ManifestFactory$ObjectManifest$();
67228
- var len$1 = $uI(array$1.length);
67229
- var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
67230
- var len$2 = result.u.length;
67231
- var i$1 = 0;
67232
- var j = 0;
67233
- var x$1 = $uI(array$1.length);
67234
- var x$3 = ((x$1 < len$2) ? x$1 : len$2);
67235
- var that = result.u.length;
67236
- var end = ((x$3 < that) ? x$3 : that);
67237
- while ((i$1 < end)) {
67238
- var jsx$2 = j;
67239
- var index$1 = i$1;
67240
- result.set(jsx$2, array$1[index$1]);
67241
- i$1 = ((1 + i$1) | 0);
67242
- j = ((1 + j) | 0)
67243
- };
67244
- return jsx$3.format__T__AO__T($$this, result)
67245
- })
67246
- })(this));
67247
- var this$18 = $m_sc_Seq$();
67248
- return $as_sc_TraversableOnce(arr.map__F1__scg_CanBuildFrom__O(jsx$1, this$18.ReusableCBFInstance$2)).mkString__T()
67249
- });
67250
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67251
- return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67252
- });
67253
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
67254
- return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
67255
- });
67256
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67257
- return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67258
- });
67259
- $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) {
67260
- var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
67261
- var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
67262
- if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67263
- if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67264
- var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
67265
- var jsx$1 = (x === op)
67266
- } else {
67267
- var jsx$1 = false
67268
- }
67269
- } else {
67270
- var jsx$1 = false
67271
- };
67272
- if (jsx$1) {
67273
- return (((("math.floor(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
67274
- } else {
67275
- 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)
67276
- }
67277
- });
67278
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
67279
- return (("\"" + this.decEscapeByteArray__p3__sc_Seq__T(arr)) + "\"")
67280
- });
67281
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67282
- return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67283
- });
67284
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
67285
- return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
67286
- });
67287
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67288
- return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67289
- });
67290
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67291
- var this$1 = this.importList$3;
67292
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
67293
- return (("utils.byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67294
- });
67295
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67296
- return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67297
- });
67298
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
67299
- return (($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + ".") + label)
67300
- });
67301
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList = (function(provider, importList) {
67302
- this.importList$3 = importList;
67303
- $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
67304
- var self = new $c_jl_Character().init___C(9);
67305
- var jsx$9 = new $c_T2().init___O__O(self, "\\t");
67306
- var self$1 = new $c_jl_Character().init___C(10);
67307
- var jsx$8 = new $c_T2().init___O__O(self$1, "\\n");
67308
- var self$2 = new $c_jl_Character().init___C(13);
67309
- var jsx$7 = new $c_T2().init___O__O(self$2, "\\r");
67310
- var self$3 = new $c_jl_Character().init___C(34);
67311
- var jsx$6 = new $c_T2().init___O__O(self$3, "\\\"");
67312
- var self$4 = new $c_jl_Character().init___C(92);
67313
- var jsx$5 = new $c_T2().init___O__O(self$4, "\\\\");
67314
- var self$5 = new $c_jl_Character().init___C(7);
67315
- var jsx$4 = new $c_T2().init___O__O(self$5, "\\a");
67316
- var self$6 = new $c_jl_Character().init___C(8);
67317
- var jsx$3 = new $c_T2().init___O__O(self$6, "\\b");
67318
- var self$7 = new $c_jl_Character().init___C(11);
67319
- var jsx$2 = new $c_T2().init___O__O(self$7, "\\v");
67320
- var self$8 = new $c_jl_Character().init___C(12);
67321
- var jsx$1 = new $c_T2().init___O__O(self$8, "\\f");
67322
- var self$9 = new $c_jl_Character().init___C(27);
67323
- 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")];
67324
- var this$44 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
67325
- var i = 0;
67326
- var len = $uI(array.length);
67327
- while ((i < len)) {
67328
- var index = i;
67329
- var arg1 = array[index];
67330
- this$44.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
67331
- i = ((1 + i) | 0)
67332
- };
67333
- this.asciiCharQuoteMap$3 = $as_sci_Map(this$44.elems$1);
67334
- return this
67335
- });
67336
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67337
- return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67338
- });
67339
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
67340
- return ((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + "(") + id) + ")")
67341
- });
67342
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, right) {
67343
- return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " .. ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
67344
- });
67345
- var $d_Lio_kaitai_struct_translators_LuaTranslator = new $TypeData().initClass({
67346
- Lio_kaitai_struct_translators_LuaTranslator: 0
67347
- }, false, "io.kaitai.struct.translators.LuaTranslator", {
67348
- Lio_kaitai_struct_translators_LuaTranslator: 1,
67349
- Lio_kaitai_struct_translators_BaseTranslator: 1,
67350
- Lio_kaitai_struct_translators_TypeDetector: 1,
67351
- O: 1,
67352
- Lio_kaitai_struct_translators_AbstractTranslator: 1,
67353
- Lio_kaitai_struct_translators_CommonLiterals: 1,
67354
- Lio_kaitai_struct_translators_CommonOps: 1,
67355
- Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
67356
- Lio_kaitai_struct_translators_CommonMethods: 1,
67357
- Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
67358
- });
67359
- $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_LuaTranslator;
67360
- /** @constructor */
67361
66596
  function $c_Lio_kaitai_struct_translators_NimTranslator() {
67362
66597
  $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
67363
66598
  this.importList$3 = null
@@ -67669,368 +66904,47 @@ var $d_Lio_kaitai_struct_translators_NimTranslator = new $TypeData().initClass({
67669
66904
  });
67670
66905
  $c_Lio_kaitai_struct_translators_NimTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_NimTranslator;
67671
66906
  /** @constructor */
67672
- function $c_Lio_kaitai_struct_translators_PHPTranslator() {
66907
+ function $c_Lio_kaitai_struct_translators_PerlTranslator() {
67673
66908
  $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
67674
- this.asciiCharQuoteMap$3 = null;
67675
- this.namespaceRef$3 = null
66909
+ this.importList$3 = null;
66910
+ this.asciiCharQuoteMap$3 = null
67676
66911
  }
67677
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
67678
- $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;
67679
66914
  /** @constructor */
67680
- function $h_Lio_kaitai_struct_translators_PHPTranslator() {
66915
+ function $h_Lio_kaitai_struct_translators_PerlTranslator() {
67681
66916
  /*<skip>*/
67682
66917
  }
67683
- $h_Lio_kaitai_struct_translators_PHPTranslator.prototype = $c_Lio_kaitai_struct_translators_PHPTranslator.prototype;
67684
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
67685
- 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
+ }
67686
66930
  });
67687
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67688
- 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)
67689
66933
  });
67690
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67691
- 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)) + "})")
67692
66936
  });
67693
- $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) {
67694
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)
67695
66939
  });
67696
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67697
- 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)) + "))")
67698
66942
  });
67699
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
67700
- 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)
67701
66945
  });
67702
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67703
- return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67704
- });
67705
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_RuntimeConfig = (function(provider, config) {
67706
- $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
67707
- var self = new $c_jl_Character().init___C(9);
67708
- var jsx$8 = new $c_T2().init___O__O(self, "\\t");
67709
- var self$1 = new $c_jl_Character().init___C(10);
67710
- var jsx$7 = new $c_T2().init___O__O(self$1, "\\n");
67711
- var self$2 = new $c_jl_Character().init___C(13);
67712
- var jsx$6 = new $c_T2().init___O__O(self$2, "\\r");
67713
- var self$3 = new $c_jl_Character().init___C(34);
67714
- var jsx$5 = new $c_T2().init___O__O(self$3, "\\\"");
67715
- var self$4 = new $c_jl_Character().init___C(92);
67716
- var jsx$4 = new $c_T2().init___O__O(self$4, "\\\\");
67717
- var self$5 = new $c_jl_Character().init___C(36);
67718
- var jsx$3 = new $c_T2().init___O__O(self$5, "\\$");
67719
- var self$6 = new $c_jl_Character().init___C(12);
67720
- var jsx$2 = new $c_T2().init___O__O(self$6, "\\f");
67721
- var self$7 = new $c_jl_Character().init___C(11);
67722
- var jsx$1 = new $c_T2().init___O__O(self$7, "\\v");
67723
- var self$8 = new $c_jl_Character().init___C(27);
67724
- 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")];
67725
- var this$40 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
67726
- var i = 0;
67727
- var len = $uI(array.length);
67728
- while ((i < len)) {
67729
- var index = i;
67730
- var arg1 = array[index];
67731
- this$40.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
67732
- i = ((1 + i) | 0)
67733
- };
67734
- this.asciiCharQuoteMap$3 = $as_sci_Map(this$40.elems$1);
67735
- var thiz = config.phpNamespace$1;
67736
- if ((thiz === null)) {
67737
- throw new $c_jl_NullPointerException().init___()
67738
- };
67739
- this.namespaceRef$3 = ((thiz === "") ? "" : ("\\" + config.phpNamespace$1));
67740
- return this
67741
- });
67742
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
67743
- return this.doByteArrayNonLiteral__sc_Seq__T(elts)
67744
- });
67745
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
67746
- return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
67747
- });
67748
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
67749
- return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67750
- });
67751
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
67752
- return (("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + "[0])")
67753
- });
67754
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.types2classAbs__sci_List__T = (function(names) {
67755
- $m_sci_List$();
67756
- var o9 = new $c_s_Some().init___O(names);
67757
- if ((o9.value$2 !== null)) {
67758
- var this$2 = $as_sc_LinearSeqOptimized(o9.value$2);
67759
- var jsx$1 = ($f_sc_LinearSeqOptimized__lengthCompare__I__I(this$2, 1) === 0)
67760
- } else {
67761
- var jsx$1 = false
67762
- };
67763
- if (jsx$1) {
67764
- var this$3 = $as_sc_LinearSeqOptimized(o9.value$2);
67765
- var p3 = $as_T($f_sc_LinearSeqOptimized__apply__I__O(this$3, 0));
67766
- if ((p3 === "kaitai_struct")) {
67767
- return "\\Kaitai\\Struct\\Struct"
67768
- }
67769
- };
67770
- return ((this.namespaceRef$3 + "\\") + $m_Lio_kaitai_struct_languages_PHPCompiler$().types2classRel__sci_List__T(names))
67771
- });
67772
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67773
- var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
67774
- return (((v + "[count(") + v) + ") - 1]")
67775
- });
67776
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67777
- return this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67778
- });
67779
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67780
- return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67781
- });
67782
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLiteralUnicode__C__T = (function(code) {
67783
- var this$4 = new $c_sci_StringOps().init___T("\\u{%x}");
67784
- var array = [code];
67785
- var jsx$2 = $m_sjsr_RuntimeString$();
67786
- var $$this = this$4.repr$1;
67787
- $m_sc_Seq$();
67788
- $m_sjs_js_WrappedArray$();
67789
- var array$1 = [];
67790
- var x1 = $uI(array.length);
67791
- switch (x1) {
67792
- case (-1): {
67793
- break
67794
- }
67795
- };
67796
- var i = 0;
67797
- var len = $uI(array.length);
67798
- while ((i < len)) {
67799
- var index = i;
67800
- var arg1 = array[index];
67801
- var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
67802
- array$1.push(elem);
67803
- i = ((1 + i) | 0)
67804
- };
67805
- $m_s_reflect_ManifestFactory$ObjectManifest$();
67806
- var len$1 = $uI(array$1.length);
67807
- var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
67808
- var len$2 = result.u.length;
67809
- var i$1 = 0;
67810
- var j = 0;
67811
- var x = $uI(array$1.length);
67812
- var x$1 = ((x < len$2) ? x : len$2);
67813
- var that = result.u.length;
67814
- var end = ((x$1 < that) ? x$1 : that);
67815
- while ((i$1 < end)) {
67816
- var jsx$1 = j;
67817
- var index$1 = i$1;
67818
- result.set(jsx$1, array$1[index$1]);
67819
- i$1 = ((1 + i$1) | 0);
67820
- j = ((1 + j) | 0)
67821
- };
67822
- return jsx$2.format__T__AO__T($$this, result)
67823
- });
67824
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67825
- return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67826
- });
67827
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67828
- return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "[0]")
67829
- });
67830
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
67831
- return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
67832
- });
67833
- $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) {
67834
- 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)) + ")")
67835
- });
67836
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
67837
- return this.asciiCharQuoteMap$3
67838
- });
67839
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
67840
- return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
67841
- });
67842
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
67843
- return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
67844
- });
67845
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
67846
- return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
67847
- });
67848
- $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) {
67849
- 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)) + ")")
67850
- });
67851
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
67852
- return (("\\Kaitai\\Struct\\Stream::byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
67853
- });
67854
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
67855
- return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + "[") + this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + " - 1])")
67856
- });
67857
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__T = (function(elts) {
67858
- var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
67859
- return (function(v$2) {
67860
- var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
67861
- return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
67862
- })
67863
- })(this));
67864
- var this$1 = $m_sc_Seq$();
67865
- return (("pack('C*', " + $as_sc_TraversableOnce(elts.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + ")")
67866
- });
67867
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
67868
- return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
67869
- });
67870
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doLocalName__T__T = (function(s) {
67871
- 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)))))
67872
- });
67873
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
67874
- return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
67875
- });
67876
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
67877
- return this.doByteArrayLiteral__sc_Seq__T(arr)
67878
- });
67879
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
67880
- return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
67881
- });
67882
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
67883
- return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
67884
- });
67885
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67886
- return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67887
- });
67888
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
67889
- var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
67890
- 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) + ")"))
67891
- });
67892
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
67893
- return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container)) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "])")
67894
- });
67895
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doName__T__T = (function(s) {
67896
- return ($m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(s) + "()")
67897
- });
67898
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
67899
- return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
67900
- });
67901
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
67902
- return (((("\\Kaitai\\Struct\\Stream::bytesToStr(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
67903
- });
67904
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
67905
- return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67906
- });
67907
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
67908
- return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + "->") + this.doName__T__T(attrName))
67909
- });
67910
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67911
- return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67912
- });
67913
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
67914
- return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
67915
- });
67916
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
67917
- return (("\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\"")
67918
- });
67919
- $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) {
67920
- var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
67921
- var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
67922
- if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67923
- if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67924
- var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
67925
- var jsx$1 = (x === op)
67926
- } else {
67927
- var jsx$1 = false
67928
- }
67929
- } else {
67930
- var jsx$1 = false
67931
- };
67932
- if (jsx$1) {
67933
- return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
67934
- } else {
67935
- if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67936
- if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
67937
- var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
67938
- var jsx$2 = (x$3 === op)
67939
- } else {
67940
- var jsx$2 = false
67941
- }
67942
- } else {
67943
- var jsx$2 = false
67944
- };
67945
- if (jsx$2) {
67946
- 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)) + ")")
67947
- } else {
67948
- 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)
67949
- }
67950
- }
67951
- });
67952
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
67953
- return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
67954
- });
67955
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67956
- return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67957
- });
67958
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
67959
- return (("\\Kaitai\\Struct\\Stream::byteArrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
67960
- });
67961
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67962
- return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67963
- });
67964
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
67965
- var enumClass = this.types2classAbs__sci_List__T(enumTypeAbs);
67966
- return ((enumClass + "::") + ($m_Lio_kaitai_struct_Utils$(), $as_T(label.toUpperCase())))
67967
- });
67968
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
67969
- return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
67970
- });
67971
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
67972
- return id
67973
- });
67974
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, right) {
67975
- return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " . ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
67976
- });
67977
- var $d_Lio_kaitai_struct_translators_PHPTranslator = new $TypeData().initClass({
67978
- Lio_kaitai_struct_translators_PHPTranslator: 0
67979
- }, false, "io.kaitai.struct.translators.PHPTranslator", {
67980
- Lio_kaitai_struct_translators_PHPTranslator: 1,
67981
- Lio_kaitai_struct_translators_BaseTranslator: 1,
67982
- Lio_kaitai_struct_translators_TypeDetector: 1,
67983
- O: 1,
67984
- Lio_kaitai_struct_translators_AbstractTranslator: 1,
67985
- Lio_kaitai_struct_translators_CommonLiterals: 1,
67986
- Lio_kaitai_struct_translators_CommonOps: 1,
67987
- Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
67988
- Lio_kaitai_struct_translators_CommonMethods: 1,
67989
- Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
67990
- });
67991
- $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_PHPTranslator;
67992
- /** @constructor */
67993
- function $c_Lio_kaitai_struct_translators_PerlTranslator() {
67994
- $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
67995
- this.importList$3 = null;
67996
- this.asciiCharQuoteMap$3 = null
67997
- }
67998
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
67999
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_PerlTranslator;
68000
- /** @constructor */
68001
- function $h_Lio_kaitai_struct_translators_PerlTranslator() {
68002
- /*<skip>*/
68003
- }
68004
- $h_Lio_kaitai_struct_translators_PerlTranslator.prototype = $c_Lio_kaitai_struct_translators_PerlTranslator.prototype;
68005
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
68006
- var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
68007
- if ((baseStr === "8")) {
68008
- return (("oct(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
68009
- } else if ((baseStr === "10")) {
68010
- return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
68011
- } else if ((baseStr === "16")) {
68012
- return (("hex(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
68013
- } else {
68014
- throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
68015
- }
68016
- });
68017
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
68018
- return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
68019
- });
68020
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
68021
- return (("scalar(@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + "})")
68022
- });
68023
- $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) {
68024
- 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)
68025
- });
68026
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
68027
- return (("scalar(reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + "))")
68028
- });
68029
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
68030
- return this.doByteArrayNonLiteral__sc_Seq__T(elts)
68031
- });
68032
- $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
68033
- 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)
68034
66948
  });
68035
66949
  $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
68036
66950
  return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
@@ -70630,436 +69544,1639 @@ var $d_Lfastparse_parsers_Intrinsics$ElemIn = new $TypeData().initClass({
70630
69544
  s_Serializable: 1,
70631
69545
  Ljava_io_Serializable: 1
70632
69546
  });
70633
- $c_Lfastparse_parsers_Intrinsics$ElemIn.prototype.$classData = $d_Lfastparse_parsers_Intrinsics$ElemIn;
70634
- /** @constructor */
70635
- function $c_Lfastparse_parsers_Intrinsics$ElemsWhile() {
70636
- $c_Lfastparse_parsers_Intrinsics$PrecomputableParser.call(this);
70637
- this.name$3 = null;
70638
- this.predicate$3 = null;
70639
- this.min$3 = 0;
70640
- this.precompute$3 = false
70641
- }
70642
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype = new $h_Lfastparse_parsers_Intrinsics$PrecomputableParser();
70643
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.constructor = $c_Lfastparse_parsers_Intrinsics$ElemsWhile;
70644
- /** @constructor */
70645
- function $h_Lfastparse_parsers_Intrinsics$ElemsWhile() {
70646
- /*<skip>*/
70647
- }
70648
- $h_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype = $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype;
70649
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productPrefix__T = (function() {
70650
- return "ElemsWhile"
69547
+ $c_Lfastparse_parsers_Intrinsics$ElemIn.prototype.$classData = $d_Lfastparse_parsers_Intrinsics$ElemIn;
69548
+ /** @constructor */
69549
+ function $c_Lfastparse_parsers_Intrinsics$ElemsWhile() {
69550
+ $c_Lfastparse_parsers_Intrinsics$PrecomputableParser.call(this);
69551
+ this.name$3 = null;
69552
+ this.predicate$3 = null;
69553
+ this.min$3 = 0;
69554
+ this.precompute$3 = false
69555
+ }
69556
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype = new $h_Lfastparse_parsers_Intrinsics$PrecomputableParser();
69557
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.constructor = $c_Lfastparse_parsers_Intrinsics$ElemsWhile;
69558
+ /** @constructor */
69559
+ function $h_Lfastparse_parsers_Intrinsics$ElemsWhile() {
69560
+ /*<skip>*/
69561
+ }
69562
+ $h_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype = $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype;
69563
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productPrefix__T = (function() {
69564
+ return "ElemsWhile"
69565
+ });
69566
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productArity__I = (function() {
69567
+ return 4
69568
+ });
69569
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.equals__O__Z = (function(x$1) {
69570
+ if ((this === x$1)) {
69571
+ return true
69572
+ } else if ((x$1 instanceof $c_Lfastparse_parsers_Intrinsics$ElemsWhile)) {
69573
+ var ElemsWhile$1 = $as_Lfastparse_parsers_Intrinsics$ElemsWhile(x$1);
69574
+ if ((this.name$3 === ElemsWhile$1.name$3)) {
69575
+ var x = this.predicate$3;
69576
+ var x$2 = ElemsWhile$1.predicate$3;
69577
+ var jsx$1 = ((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))
69578
+ } else {
69579
+ var jsx$1 = false
69580
+ };
69581
+ if ((jsx$1 && (this.min$3 === ElemsWhile$1.min$3))) {
69582
+ return (this.precompute$3 === ElemsWhile$1.precompute$3)
69583
+ } else {
69584
+ return false
69585
+ }
69586
+ } else {
69587
+ return false
69588
+ }
69589
+ });
69590
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productElement__I__O = (function(x$1) {
69591
+ switch (x$1) {
69592
+ case 0: {
69593
+ return this.name$3;
69594
+ break
69595
+ }
69596
+ case 1: {
69597
+ return this.predicate$3;
69598
+ break
69599
+ }
69600
+ case 2: {
69601
+ return this.min$3;
69602
+ break
69603
+ }
69604
+ case 3: {
69605
+ return this.precompute$3;
69606
+ break
69607
+ }
69608
+ default: {
69609
+ throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
69610
+ }
69611
+ }
69612
+ });
69613
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.init___T__F1__I__Z__Lfastparse_utils_ElemSetHelper__Lfastparse_utils_ReprOps = (function(name, predicate, min, precompute, helper, repr) {
69614
+ this.name$3 = name;
69615
+ this.predicate$3 = predicate;
69616
+ this.min$3 = min;
69617
+ this.precompute$3 = precompute;
69618
+ $c_Lfastparse_parsers_Intrinsics$PrecomputableParser.prototype.init___s_util_Either__Lfastparse_utils_ElemSetHelper__Lfastparse_utils_ReprOps.call(this, $m_Lfastparse_parsers_Intrinsics$().makeGenOrPred__F1__Z__Lfastparse_utils_ElemSetHelper__s_util_Either(predicate, precompute, helper), helper, repr);
69619
+ return this
69620
+ });
69621
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.toString__T = (function() {
69622
+ return new $c_s_StringContext().init___sc_Seq(new $c_sjs_js_WrappedArray().init___sjs_js_Array(["", "(", ")"])).s__sc_Seq__T(new $c_sjs_js_WrappedArray().init___sjs_js_Array([this.name$3, this.predicate$3]))
69623
+ });
69624
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.hashCode__I = (function() {
69625
+ var acc = (-889275714);
69626
+ acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.name$3));
69627
+ acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.predicate$3));
69628
+ acc = $m_sr_Statics$().mix__I__I__I(acc, this.min$3);
69629
+ acc = $m_sr_Statics$().mix__I__I__I(acc, (this.precompute$3 ? 1231 : 1237));
69630
+ return $m_sr_Statics$().finalizeHash__I__I__I(acc, 4)
69631
+ });
69632
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.parseRec__Lfastparse_core_ParseCtx__I__Lfastparse_core_Mutable = (function(cfg, index) {
69633
+ return $f_Lfastparse_parsers_Intrinsics$WhileParser__parseRec__Lfastparse_core_ParseCtx__I__Lfastparse_core_Mutable(this, cfg, index)
69634
+ });
69635
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productIterator__sc_Iterator = (function() {
69636
+ return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
69637
+ });
69638
+ function $as_Lfastparse_parsers_Intrinsics$ElemsWhile(obj) {
69639
+ return (((obj instanceof $c_Lfastparse_parsers_Intrinsics$ElemsWhile) || (obj === null)) ? obj : $throwClassCastException(obj, "fastparse.parsers.Intrinsics$ElemsWhile"))
69640
+ }
69641
+ function $isArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) {
69642
+ return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lfastparse_parsers_Intrinsics$ElemsWhile)))
69643
+ }
69644
+ function $asArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) {
69645
+ return (($isArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lfastparse.parsers.Intrinsics$ElemsWhile;", depth))
69646
+ }
69647
+ var $d_Lfastparse_parsers_Intrinsics$ElemsWhile = new $TypeData().initClass({
69648
+ Lfastparse_parsers_Intrinsics$ElemsWhile: 0
69649
+ }, false, "fastparse.parsers.Intrinsics$ElemsWhile", {
69650
+ Lfastparse_parsers_Intrinsics$ElemsWhile: 1,
69651
+ Lfastparse_parsers_Intrinsics$PrecomputableParser: 1,
69652
+ Lfastparse_core_Parser: 1,
69653
+ O: 1,
69654
+ Lfastparse_core_ParserResults: 1,
69655
+ Lfastparse_core_Precedence: 1,
69656
+ Lfastparse_parsers_Intrinsics$WhileParser: 1,
69657
+ s_Product: 1,
69658
+ s_Equals: 1,
69659
+ s_Serializable: 1,
69660
+ Ljava_io_Serializable: 1
69661
+ });
69662
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.$classData = $d_Lfastparse_parsers_Intrinsics$ElemsWhile;
69663
+ /** @constructor */
69664
+ function $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes() {
69665
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.call(this);
69666
+ this.$$undargs$4 = null;
69667
+ this.bytes$4 = null;
69668
+ this.process$4 = null
69669
+ }
69670
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype = new $h_Lio_kaitai_struct_datatype_DataType$UserType();
69671
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes;
69672
+ /** @constructor */
69673
+ function $h_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes() {
69674
+ /*<skip>*/
69675
+ }
69676
+ $h_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype = $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype;
69677
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productPrefix__T = (function() {
69678
+ return "CalcUserTypeFromBytes"
69679
+ });
69680
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productArity__I = (function() {
69681
+ return 5
69682
+ });
69683
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.equals__O__Z = (function(x$1) {
69684
+ if ((this === x$1)) {
69685
+ return true
69686
+ } else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)) {
69687
+ var CalcUserTypeFromBytes$1 = $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(x$1);
69688
+ var x = this.name$3;
69689
+ var x$2 = CalcUserTypeFromBytes$1.name$3;
69690
+ if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
69691
+ var x$3 = this.forcedParent$3;
69692
+ var x$4 = CalcUserTypeFromBytes$1.forcedParent$3;
69693
+ var jsx$3 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
69694
+ } else {
69695
+ var jsx$3 = false
69696
+ };
69697
+ if (jsx$3) {
69698
+ var x$5 = this.$$undargs$4;
69699
+ var x$6 = CalcUserTypeFromBytes$1.$$undargs$4;
69700
+ var jsx$2 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
69701
+ } else {
69702
+ var jsx$2 = false
69703
+ };
69704
+ if (jsx$2) {
69705
+ var x$7 = this.bytes$4;
69706
+ var x$8 = CalcUserTypeFromBytes$1.bytes$4;
69707
+ var jsx$1 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
69708
+ } else {
69709
+ var jsx$1 = false
69710
+ };
69711
+ if (jsx$1) {
69712
+ var x$9 = this.process$4;
69713
+ var x$10 = CalcUserTypeFromBytes$1.process$4;
69714
+ return ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
69715
+ } else {
69716
+ return false
69717
+ }
69718
+ } else {
69719
+ return false
69720
+ }
69721
+ });
69722
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productElement__I__O = (function(x$1) {
69723
+ switch (x$1) {
69724
+ case 0: {
69725
+ return this.name$3;
69726
+ break
69727
+ }
69728
+ case 1: {
69729
+ return this.forcedParent$3;
69730
+ break
69731
+ }
69732
+ case 2: {
69733
+ return this.$$undargs$4;
69734
+ break
69735
+ }
69736
+ case 3: {
69737
+ return this.bytes$4;
69738
+ break
69739
+ }
69740
+ case 4: {
69741
+ return this.process$4;
69742
+ break
69743
+ }
69744
+ default: {
69745
+ throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
69746
+ }
69747
+ }
69748
+ });
69749
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.toString__T = (function() {
69750
+ return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
69751
+ });
69752
+ $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) {
69753
+ this.$$undargs$4 = _args;
69754
+ this.bytes$4 = bytes;
69755
+ this.process$4 = process;
69756
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.init___sci_List__s_Option__sc_Seq.call(this, _name, _forcedParent, _args);
69757
+ return this
69758
+ });
69759
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.isOwning__Z = (function() {
69760
+ return false
69761
+ });
69762
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.hashCode__I = (function() {
69763
+ var this$2 = $m_s_util_hashing_MurmurHash3$();
69764
+ return this$2.productHash__s_Product__I__I(this, (-889275714))
69765
+ });
69766
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productIterator__sc_Iterator = (function() {
69767
+ return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
69768
+ });
69769
+ function $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj) {
69770
+ return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes"))
69771
+ }
69772
+ function $isArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) {
69773
+ return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)))
69774
+ }
69775
+ function $asArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) {
69776
+ return (($isArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes;", depth))
69777
+ }
69778
+ var $d_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes = new $TypeData().initClass({
69779
+ Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes: 0
69780
+ }, false, "io.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes", {
69781
+ Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes: 1,
69782
+ Lio_kaitai_struct_datatype_DataType$UserType: 1,
69783
+ Lio_kaitai_struct_datatype_DataType$StructType: 1,
69784
+ Lio_kaitai_struct_datatype_DataType$ComplexDataType: 1,
69785
+ O: 1,
69786
+ Lio_kaitai_struct_datatype_DataType: 1,
69787
+ Lio_kaitai_struct_datatype_DataType$Processing: 1,
69788
+ s_Product: 1,
69789
+ s_Equals: 1,
69790
+ s_Serializable: 1,
69791
+ Ljava_io_Serializable: 1
69792
+ });
69793
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes;
69794
+ /** @constructor */
69795
+ function $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes() {
69796
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.call(this);
69797
+ this.$$undargs$4 = null;
69798
+ this.bytes$4 = null;
69799
+ this.process$4 = null
69800
+ }
69801
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype = new $h_Lio_kaitai_struct_datatype_DataType$UserType();
69802
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes;
69803
+ /** @constructor */
69804
+ function $h_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes() {
69805
+ /*<skip>*/
69806
+ }
69807
+ $h_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype = $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype;
69808
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productPrefix__T = (function() {
69809
+ return "UserTypeFromBytes"
69810
+ });
69811
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productArity__I = (function() {
69812
+ return 5
69813
+ });
69814
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.asNonOwning__Lio_kaitai_struct_datatype_DataType = (function() {
69815
+ return this.asNonOwning__Lio_kaitai_struct_datatype_DataType$UserType()
69816
+ });
69817
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.equals__O__Z = (function(x$1) {
69818
+ if ((this === x$1)) {
69819
+ return true
69820
+ } else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
69821
+ var UserTypeFromBytes$1 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(x$1);
69822
+ var x = this.name$3;
69823
+ var x$2 = UserTypeFromBytes$1.name$3;
69824
+ if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
69825
+ var x$3 = this.forcedParent$3;
69826
+ var x$4 = UserTypeFromBytes$1.forcedParent$3;
69827
+ var jsx$3 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
69828
+ } else {
69829
+ var jsx$3 = false
69830
+ };
69831
+ if (jsx$3) {
69832
+ var x$5 = this.$$undargs$4;
69833
+ var x$6 = UserTypeFromBytes$1.$$undargs$4;
69834
+ var jsx$2 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
69835
+ } else {
69836
+ var jsx$2 = false
69837
+ };
69838
+ if (jsx$2) {
69839
+ var x$7 = this.bytes$4;
69840
+ var x$8 = UserTypeFromBytes$1.bytes$4;
69841
+ var jsx$1 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
69842
+ } else {
69843
+ var jsx$1 = false
69844
+ };
69845
+ if (jsx$1) {
69846
+ var x$9 = this.process$4;
69847
+ var x$10 = UserTypeFromBytes$1.process$4;
69848
+ return ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
69849
+ } else {
69850
+ return false
69851
+ }
69852
+ } else {
69853
+ return false
69854
+ }
69855
+ });
69856
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.asNonOwning__Lio_kaitai_struct_datatype_DataType$UserType = (function() {
69857
+ 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);
69858
+ r.classSpec$3 = this.classSpec$3;
69859
+ return r
69860
+ });
69861
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productElement__I__O = (function(x$1) {
69862
+ switch (x$1) {
69863
+ case 0: {
69864
+ return this.name$3;
69865
+ break
69866
+ }
69867
+ case 1: {
69868
+ return this.forcedParent$3;
69869
+ break
69870
+ }
69871
+ case 2: {
69872
+ return this.$$undargs$4;
69873
+ break
69874
+ }
69875
+ case 3: {
69876
+ return this.bytes$4;
69877
+ break
69878
+ }
69879
+ case 4: {
69880
+ return this.process$4;
69881
+ break
69882
+ }
69883
+ default: {
69884
+ throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
69885
+ }
69886
+ }
69887
+ });
69888
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.toString__T = (function() {
69889
+ return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
69890
+ });
69891
+ $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) {
69892
+ this.$$undargs$4 = _args;
69893
+ this.bytes$4 = bytes;
69894
+ this.process$4 = process;
69895
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.init___sci_List__s_Option__sc_Seq.call(this, _name, _forcedParent, _args);
69896
+ return this
69897
+ });
69898
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.isOwning__Z = (function() {
69899
+ return true
69900
+ });
69901
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.hashCode__I = (function() {
69902
+ var this$2 = $m_s_util_hashing_MurmurHash3$();
69903
+ return this$2.productHash__s_Product__I__I(this, (-889275714))
69904
+ });
69905
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productIterator__sc_Iterator = (function() {
69906
+ return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
69907
+ });
69908
+ function $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj) {
69909
+ return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$UserTypeFromBytes"))
69910
+ }
69911
+ function $isArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) {
69912
+ return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)))
69913
+ }
69914
+ function $asArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) {
69915
+ return (($isArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.datatype.DataType$UserTypeFromBytes;", depth))
69916
+ }
69917
+ var $d_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes = new $TypeData().initClass({
69918
+ Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes: 0
69919
+ }, false, "io.kaitai.struct.datatype.DataType$UserTypeFromBytes", {
69920
+ Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes: 1,
69921
+ Lio_kaitai_struct_datatype_DataType$UserType: 1,
69922
+ Lio_kaitai_struct_datatype_DataType$StructType: 1,
69923
+ Lio_kaitai_struct_datatype_DataType$ComplexDataType: 1,
69924
+ O: 1,
69925
+ Lio_kaitai_struct_datatype_DataType: 1,
69926
+ Lio_kaitai_struct_datatype_DataType$Processing: 1,
69927
+ s_Product: 1,
69928
+ s_Equals: 1,
69929
+ s_Serializable: 1,
69930
+ Ljava_io_Serializable: 1
69931
+ });
69932
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes;
69933
+ /** @constructor */
69934
+ function $c_Lio_kaitai_struct_translators_ConstructTranslator() {
69935
+ $c_Lio_kaitai_struct_translators_PythonTranslator.call(this)
69936
+ }
69937
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype = new $h_Lio_kaitai_struct_translators_PythonTranslator();
69938
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_ConstructTranslator;
69939
+ /** @constructor */
69940
+ function $h_Lio_kaitai_struct_translators_ConstructTranslator() {
69941
+ /*<skip>*/
69942
+ }
69943
+ $h_Lio_kaitai_struct_translators_ConstructTranslator.prototype = $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype;
69944
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
69945
+ return (("stream_tell(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
69946
+ });
69947
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
69948
+ return this.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
69949
+ });
69950
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
69951
+ return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
69952
+ });
69953
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doLocalName__T__T = (function(s) {
69954
+ 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))))))
69955
+ });
69956
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
69957
+ return (("stream_size(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
69958
+ });
69959
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
69960
+ return (("stream_iseof(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
69961
+ });
69962
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doName__T__T = (function(s) {
69963
+ return (($m_Lio_kaitai_struct_format_Identifier$().PARENT$1 === s) ? "_" : s)
69964
+ });
69965
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
69966
+ return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
69967
+ });
69968
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList = (function(provider, importList) {
69969
+ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList.call(this, provider, importList);
69970
+ return this
69971
+ });
69972
+ var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initClass({
69973
+ Lio_kaitai_struct_translators_ConstructTranslator: 0
69974
+ }, false, "io.kaitai.struct.translators.ConstructTranslator", {
69975
+ Lio_kaitai_struct_translators_ConstructTranslator: 1,
69976
+ Lio_kaitai_struct_translators_PythonTranslator: 1,
69977
+ Lio_kaitai_struct_translators_BaseTranslator: 1,
69978
+ Lio_kaitai_struct_translators_TypeDetector: 1,
69979
+ O: 1,
69980
+ Lio_kaitai_struct_translators_AbstractTranslator: 1,
69981
+ Lio_kaitai_struct_translators_CommonLiterals: 1,
69982
+ Lio_kaitai_struct_translators_CommonOps: 1,
69983
+ Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
69984
+ Lio_kaitai_struct_translators_CommonMethods: 1,
69985
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
69986
+ });
69987
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_ConstructTranslator;
69988
+ /** @constructor */
69989
+ function $c_Lio_kaitai_struct_translators_CppTranslator() {
69990
+ $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
69991
+ this.importListSrc$3 = null;
69992
+ this.importListHdr$3 = null;
69993
+ this.config$3 = null;
69994
+ this.CHARSET$undUTF8$3 = null;
69995
+ this.asciiCharQuoteMap$3 = null
69996
+ }
69997
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
69998
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_CppTranslator;
69999
+ /** @constructor */
70000
+ function $h_Lio_kaitai_struct_translators_CppTranslator() {
70001
+ /*<skip>*/
70002
+ }
70003
+ $h_Lio_kaitai_struct_translators_CppTranslator.prototype = $c_Lio_kaitai_struct_translators_CppTranslator.prototype;
70004
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
70005
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70006
+ return ((("std::stoi(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ((baseStr === "10") ? "" : (", 0, " + baseStr))) + ")")
70007
+ });
70008
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70009
+ return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70010
+ });
70011
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
70012
+ var this$1 = $m_s_math_BigInt$();
70013
+ var that = this$1.apply__I__s_math_BigInt((-2147483647));
70014
+ if ($f_s_math_Ordered__$$greater$eq__O__Z(n, that)) {
70015
+ var this$2 = $m_s_math_BigInt$();
70016
+ var that$1 = this$2.apply__I__s_math_BigInt(2147483647);
70017
+ var jsx$1 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
70018
+ } else {
70019
+ var jsx$1 = false
70020
+ };
70021
+ if (jsx$1) {
70022
+ var suffixOpt = new $c_s_Some().init___O("")
70023
+ } else {
70024
+ var this$3 = $m_s_math_BigInt$();
70025
+ var that$2 = this$3.apply__I__s_math_BigInt(2147483647);
70026
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that$2)) {
70027
+ var that$3 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT32$1;
70028
+ var jsx$2 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$3)
70029
+ } else {
70030
+ var jsx$2 = false
70031
+ };
70032
+ if (jsx$2) {
70033
+ var suffixOpt = new $c_s_Some().init___O("UL")
70034
+ } else {
70035
+ var this$4 = $m_s_math_BigInt$();
70036
+ var that$4 = this$4.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(1, (-2147483648)));
70037
+ if ($f_s_math_Ordered__$$greater$eq__O__Z(n, that$4)) {
70038
+ var this$5 = $m_s_math_BigInt$();
70039
+ var that$5 = this$5.apply__I__s_math_BigInt((-2147483648));
70040
+ var jsx$4 = $f_s_math_Ordered__$$less__O__Z(n, that$5)
70041
+ } else {
70042
+ var jsx$4 = false
70043
+ };
70044
+ if (jsx$4) {
70045
+ var jsx$3 = true
70046
+ } else {
70047
+ var that$6 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT32$1;
70048
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that$6)) {
70049
+ var this$6 = $m_s_math_BigInt$();
70050
+ var that$7 = this$6.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
70051
+ var jsx$3 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$7)
70052
+ } else {
70053
+ var jsx$3 = false
70054
+ }
70055
+ };
70056
+ if (jsx$3) {
70057
+ var suffixOpt = new $c_s_Some().init___O("LL")
70058
+ } else {
70059
+ var this$7 = $m_s_math_BigInt$();
70060
+ var that$8 = this$7.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
70061
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that$8)) {
70062
+ var that$9 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
70063
+ var jsx$5 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$9)
70064
+ } else {
70065
+ var jsx$5 = false
70066
+ };
70067
+ if (jsx$5) {
70068
+ var suffixOpt = new $c_s_Some().init___O("ULL")
70069
+ } else {
70070
+ var suffixOpt = $m_s_None$()
70071
+ }
70072
+ }
70073
+ }
70074
+ };
70075
+ if ((suffixOpt instanceof $c_s_Some)) {
70076
+ var x2 = $as_s_Some(suffixOpt);
70077
+ var suffix = $as_T(x2.value$2);
70078
+ return (("" + n) + suffix)
70079
+ } else {
70080
+ var x = $m_s_None$();
70081
+ if ((x === suffixOpt)) {
70082
+ return $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_math_BigInt__T(this, n)
70083
+ } else {
70084
+ throw new $c_s_MatchError().init___O(suffixOpt)
70085
+ }
70086
+ }
70087
+ });
70088
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70089
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->size()")
70090
+ });
70091
+ $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) {
70092
+ 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)
70093
+ });
70094
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70095
+ return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70096
+ });
70097
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70098
+ return (("kaitai::kstream::reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70099
+ });
70100
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70101
+ return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70102
+ });
70103
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70104
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70105
+ });
70106
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70107
+ return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70108
+ });
70109
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70110
+ var x1 = this.config$3.cppConfig$1.stdStringFrontBack$1;
70111
+ if ((x1 === true)) {
70112
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".front()")
70113
+ } else if ((x1 === false)) {
70114
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + "[0]")
70115
+ } else {
70116
+ throw new $c_s_MatchError().init___O(x1)
70117
+ }
70118
+ });
70119
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__O = (function(value, typeName) {
70120
+ return this.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
70121
+ });
70122
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70123
+ return this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70124
+ });
70125
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70126
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->back()")
70127
+ });
70128
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70129
+ return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70130
+ });
70131
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70132
+ this.importListSrc$3.addSystem__T__V("algorithm");
70133
+ var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70134
+ return (((("*std::min_element(" + v) + "->begin(), ") + v) + "->end())")
70135
+ });
70136
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70137
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->front()")
70138
+ });
70139
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
70140
+ return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
70141
+ });
70142
+ $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) {
70143
+ 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)) + "))")
70144
+ });
70145
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
70146
+ return this.asciiCharQuoteMap$3
70147
+ });
70148
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
70149
+ return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
70150
+ });
70151
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T = (function(t, values) {
70152
+ if (this.config$3.cppConfig$1.useListInitializers$1) {
70153
+ this.importListHdr$3.addSystem__T__V("vector");
70154
+ 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);
70155
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
70156
+ return (function(value$2) {
70157
+ var value = $as_Lio_kaitai_struct_exprlang_Ast$expr(value$2);
70158
+ return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70159
+ })
70160
+ })(this));
70161
+ var this$1 = $m_sc_Seq$();
70162
+ var rawInit = (((("new std::vector<" + cppElType) + ">{") + $as_sc_TraversableOnce(values.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "}");
70163
+ var x1 = this.config$3.cppConfig$1.pointers$1;
70164
+ var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
70165
+ if ((x === x1)) {
70166
+ return rawInit
70167
+ } else {
70168
+ var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
70169
+ if ((x$3 === x1)) {
70170
+ return (((("std::unique_ptr<std::vector<" + cppElType) + ">>(") + rawInit) + ")")
70171
+ } else {
70172
+ throw new $c_s_MatchError().init___O(x1)
70173
+ }
70174
+ }
70175
+ } else {
70176
+ throw $m_sjsr_package$().unwrapJavaScriptException__jl_Throwable__O(new $c_jl_RuntimeException().init___T("C++ literal arrays are not implemented yet"))
70177
+ }
70178
+ });
70179
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70180
+ return (("((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ") ? 1 : 0)")
70181
+ });
70182
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70183
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "->at(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + ")")
70184
+ });
70185
+ $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) {
70186
+ 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)) + "))")
70187
+ });
70188
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
70189
+ 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)) + ")")
70190
+ });
70191
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70192
+ var x1 = this.config$3.cppConfig$1.stdStringFrontBack$1;
70193
+ if ((x1 === true)) {
70194
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".back()")
70195
+ } else if ((x1 === false)) {
70196
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ".length() - 1]")
70197
+ } else {
70198
+ throw new $c_s_MatchError().init___O(x1)
70199
+ }
70200
+ });
70201
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70202
+ return (("kaitai::kstream::byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70203
+ });
70204
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70205
+ return (("static_cast<int>(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
70206
+ });
70207
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70208
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s) + ".length()")
70209
+ });
70210
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
70211
+ var x1 = this.config$3.cppConfig$1.pointers$1;
70212
+ var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
70213
+ if ((x === x1)) {
70214
+ var jsx$1 = true
70215
+ } else {
70216
+ var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
70217
+ var jsx$1 = (x$3 === x1)
70218
+ };
70219
+ if (jsx$1) {
70220
+ return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
70221
+ } else {
70222
+ var x$5 = $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$();
70223
+ if ((x$5 === x1)) {
70224
+ if ((typeName instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
70225
+ var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(typeName);
70226
+ 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)) + ")")
70227
+ } else {
70228
+ return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
70229
+ }
70230
+ } else {
70231
+ throw new $c_s_MatchError().init___O(x1)
70232
+ }
70233
+ }
70234
+ });
70235
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
70236
+ return this.doByteArrayLiteral__sc_Seq__T(arr)
70237
+ });
70238
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70239
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".length()")
70240
+ });
70241
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70242
+ this.importListSrc$3.addSystem__T__V("algorithm");
70243
+ var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70244
+ return (((("*std::max_element(" + v) + "->begin(), ") + v) + "->end())")
70245
+ });
70246
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70247
+ return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70248
+ });
70249
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
70250
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70251
+ if ((baseStr === "10")) {
70252
+ return (("kaitai::kstream::to_string(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")")
70253
+ } else {
70254
+ throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
70255
+ }
70256
+ });
70257
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70258
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
70259
+ });
70260
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doName__T__T = (function(s) {
70261
+ 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 + "()"))))
70262
+ });
70263
+ $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) {
70264
+ this.importListSrc$3 = importListSrc;
70265
+ this.importListHdr$3 = importListHdr;
70266
+ this.config$3 = config;
70267
+ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
70268
+ this.CHARSET$undUTF8$3 = $m_Ljava_nio_charset_Charset$().forName__T__Ljava_nio_charset_Charset("UTF-8");
70269
+ var self = new $c_jl_Character().init___C(9);
70270
+ var jsx$8 = new $c_T2().init___O__O(self, "\\t");
70271
+ var self$1 = new $c_jl_Character().init___C(10);
70272
+ var jsx$7 = new $c_T2().init___O__O(self$1, "\\n");
70273
+ var self$2 = new $c_jl_Character().init___C(13);
70274
+ var jsx$6 = new $c_T2().init___O__O(self$2, "\\r");
70275
+ var self$3 = new $c_jl_Character().init___C(34);
70276
+ var jsx$5 = new $c_T2().init___O__O(self$3, "\\\"");
70277
+ var self$4 = new $c_jl_Character().init___C(92);
70278
+ var jsx$4 = new $c_T2().init___O__O(self$4, "\\\\");
70279
+ var self$5 = new $c_jl_Character().init___C(7);
70280
+ var jsx$3 = new $c_T2().init___O__O(self$5, "\\a");
70281
+ var self$6 = new $c_jl_Character().init___C(12);
70282
+ var jsx$2 = new $c_T2().init___O__O(self$6, "\\f");
70283
+ var self$7 = new $c_jl_Character().init___C(11);
70284
+ var jsx$1 = new $c_T2().init___O__O(self$7, "\\v");
70285
+ var self$8 = new $c_jl_Character().init___C(8);
70286
+ 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")];
70287
+ var this$40 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
70288
+ var i = 0;
70289
+ var len = $uI(array.length);
70290
+ while ((i < len)) {
70291
+ var index = i;
70292
+ var arg1 = array[index];
70293
+ this$40.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
70294
+ i = ((1 + i) | 0)
70295
+ };
70296
+ this.asciiCharQuoteMap$3 = $as_sci_Map(this$40.elems$1);
70297
+ return this
70298
+ });
70299
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
70300
+ return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
70301
+ });
70302
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
70303
+ return (((("kaitai::kstream::bytes_to_str(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
70304
+ });
70305
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
70306
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70307
+ });
70308
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
70309
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + "->") + this.doName__T__T(attrName))
70310
+ });
70311
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70312
+ return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70313
+ });
70314
+ $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) {
70315
+ var x$2 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
70316
+ if (((op !== null) && (op === x$2))) {
70317
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " == (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
70318
+ } else {
70319
+ var x$4 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
70320
+ if (((op !== null) && (op === x$4))) {
70321
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " != ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
70322
+ } else {
70323
+ 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)")
70324
+ }
70325
+ }
70326
+ });
70327
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70328
+ return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70329
+ });
70330
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
70331
+ return (((("std::string(\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\", ") + arr.length__I()) + ")")
70332
+ });
70333
+ $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) {
70334
+ var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
70335
+ var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
70336
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70337
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70338
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
70339
+ var jsx$1 = (x === op)
70340
+ } else {
70341
+ var jsx$1 = false
70342
+ }
70343
+ } else {
70344
+ var jsx$1 = false
70345
+ };
70346
+ if (jsx$1) {
70347
+ return (((("kaitai::kstream::mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
70348
+ } else {
70349
+ 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)
70350
+ }
70351
+ });
70352
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70353
+ return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70354
+ });
70355
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
70356
+ return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
70357
+ });
70358
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70359
+ return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70360
+ });
70361
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70362
+ return (("kaitai::kstream::byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70363
+ });
70364
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70365
+ return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70366
+ });
70367
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumType, label) {
70368
+ 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)));
70369
+ $m_Lio_kaitai_struct_Utils$();
70370
+ var s = (($as_T($f_sc_LinearSeqOptimized__last__O(enumType)) + "_") + label);
70371
+ return ((jsx$1 + "::") + $as_T(s.toUpperCase()))
70372
+ });
70373
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70374
+ return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70375
+ });
70376
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumById__sci_List__T__T = (function(enumType, id) {
70377
+ return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(enumType)) + ">(") + id) + ")")
70378
+ });
70379
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doStringLiteral__T__T = (function(s) {
70380
+ var lenSuffix = (($uI(s.indexOf("\u0000")) !== (-1)) ? (", " + $m_sjsr_RuntimeString$().getBytes__T__Ljava_nio_charset_Charset__AB(s, this.CHARSET$undUTF8$3).u.length) : "");
70381
+ return ((("std::string(" + $f_Lio_kaitai_struct_translators_CommonLiterals__doStringLiteral__T__T(this, s)) + lenSuffix) + ")")
70382
+ });
70383
+ var $d_Lio_kaitai_struct_translators_CppTranslator = new $TypeData().initClass({
70384
+ Lio_kaitai_struct_translators_CppTranslator: 0
70385
+ }, false, "io.kaitai.struct.translators.CppTranslator", {
70386
+ Lio_kaitai_struct_translators_CppTranslator: 1,
70387
+ Lio_kaitai_struct_translators_BaseTranslator: 1,
70388
+ Lio_kaitai_struct_translators_TypeDetector: 1,
70389
+ O: 1,
70390
+ Lio_kaitai_struct_translators_AbstractTranslator: 1,
70391
+ Lio_kaitai_struct_translators_CommonLiterals: 1,
70392
+ Lio_kaitai_struct_translators_CommonOps: 1,
70393
+ Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
70394
+ Lio_kaitai_struct_translators_CommonMethods: 1,
70395
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1,
70396
+ Lio_kaitai_struct_translators_MinSignedIntegers: 1
70397
+ });
70398
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_CppTranslator;
70399
+ /** @constructor */
70400
+ function $c_Lio_kaitai_struct_translators_LuaTranslator() {
70401
+ $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
70402
+ this.importList$3 = null;
70403
+ this.asciiCharQuoteMap$3 = null
70404
+ }
70405
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
70406
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_LuaTranslator;
70407
+ /** @constructor */
70408
+ function $h_Lio_kaitai_struct_translators_LuaTranslator() {
70409
+ /*<skip>*/
70410
+ }
70411
+ $h_Lio_kaitai_struct_translators_LuaTranslator.prototype = $c_Lio_kaitai_struct_translators_LuaTranslator.prototype;
70412
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
70413
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70414
+ var add = ((baseStr === "10") ? "" : (", " + baseStr));
70415
+ return ((("tonumber(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + add) + ")")
70416
+ });
70417
+ $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) {
70418
+ var f = (function($this) {
70419
+ return (function(n$2) {
70420
+ var n = $uZ(n$2);
70421
+ return (n ? "1" : "0")
70422
+ })
70423
+ })(this);
70424
+ if ((left instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70425
+ var x4 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(left);
70426
+ var l = x4.n$1;
70427
+ if ((right instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70428
+ var x5 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(right);
70429
+ var r = x5.n$1;
70430
+ return ((((f(l) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + f(r))
70431
+ }
70432
+ };
70433
+ if ((left instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70434
+ var x7 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(left);
70435
+ var l$2 = x7.n$1;
70436
+ return ((((f(l$2) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
70437
+ };
70438
+ if ((right instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70439
+ var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(right);
70440
+ var r$3 = x9.n$1;
70441
+ return ((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + f(r$3))
70442
+ };
70443
+ 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)
70444
+ });
70445
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70446
+ return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70447
+ });
70448
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
70449
+ var this$1 = $m_s_math_BigInt$();
70450
+ var that = this$1.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
70451
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that)) {
70452
+ var that$1 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
70453
+ var jsx$1 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
70454
+ } else {
70455
+ var jsx$1 = false
70456
+ };
70457
+ if (jsx$1) {
70458
+ var this$2 = n.bigInteger$3;
70459
+ return ("0x" + $m_Ljava_math_Conversion$().bigInteger2String__Ljava_math_BigInteger__I__T(this$2, 16))
70460
+ } else {
70461
+ return $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_math_BigInt__T(this, n)
70462
+ }
70463
+ });
70464
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
70465
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v) + ".value")
70466
+ });
70467
+ $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) {
70468
+ 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)
70469
+ });
70470
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70471
+ return ("#" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a))
70472
+ });
70473
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70474
+ return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70475
+ });
70476
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70477
+ return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70478
+ });
70479
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70480
+ return (("string.reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70481
+ });
70482
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70483
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70484
+ });
70485
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
70486
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":pos()")
70487
+ });
70488
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70489
+ return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70490
+ });
70491
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70492
+ return (("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ", 1)")
70493
+ });
70494
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70495
+ var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70496
+ return (((table + "[#") + table) + "]")
70497
+ });
70498
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70499
+ return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70500
+ });
70501
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70502
+ return this.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70503
+ });
70504
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLiteralUnicode__C__T = (function(code) {
70505
+ var this$4 = new $c_sci_StringOps().init___T("\\u{%04x}");
70506
+ var array = [code];
70507
+ var jsx$2 = $m_sjsr_RuntimeString$();
70508
+ var $$this = this$4.repr$1;
70509
+ $m_sc_Seq$();
70510
+ $m_sjs_js_WrappedArray$();
70511
+ var array$1 = [];
70512
+ var x1 = $uI(array.length);
70513
+ switch (x1) {
70514
+ case (-1): {
70515
+ break
70516
+ }
70517
+ };
70518
+ var i = 0;
70519
+ var len = $uI(array.length);
70520
+ while ((i < len)) {
70521
+ var index = i;
70522
+ var arg1 = array[index];
70523
+ var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
70524
+ array$1.push(elem);
70525
+ i = ((1 + i) | 0)
70526
+ };
70527
+ $m_s_reflect_ManifestFactory$ObjectManifest$();
70528
+ var len$1 = $uI(array$1.length);
70529
+ var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
70530
+ var len$2 = result.u.length;
70531
+ var i$1 = 0;
70532
+ var j = 0;
70533
+ var x = $uI(array$1.length);
70534
+ var x$1 = ((x < len$2) ? x : len$2);
70535
+ var that = result.u.length;
70536
+ var end = ((x$1 < that) ? x$1 : that);
70537
+ while ((i$1 < end)) {
70538
+ var jsx$1 = j;
70539
+ var index$1 = i$1;
70540
+ result.set(jsx$1, array$1[index$1]);
70541
+ i$1 = ((1 + i$1) | 0);
70542
+ j = ((1 + j) | 0)
70543
+ };
70544
+ return jsx$2.format__T__AO__T($$this, result)
70545
+ });
70546
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doBoolLiteral__Z__T = (function(n) {
70547
+ return (n ? "true" : "false")
70548
+ });
70549
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70550
+ var this$1 = this.importList$3;
70551
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70552
+ return (("utils.array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70553
+ });
70554
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70555
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "[1]")
70556
+ });
70557
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
70558
+ return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
70559
+ });
70560
+ $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) {
70561
+ var this$1 = this.importList$3;
70562
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70563
+ 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)) + "))")
70564
+ });
70565
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
70566
+ return this.asciiCharQuoteMap$3
70567
+ });
70568
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.binOp__Lio_kaitai_struct_exprlang_Ast$operator__T = (function(op) {
70569
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitXor$();
70570
+ if ((x === op)) {
70571
+ return "~"
70572
+ } else {
70573
+ return $f_Lio_kaitai_struct_translators_CommonOps__binOp__Lio_kaitai_struct_exprlang_Ast$operator__T(this, op)
70574
+ }
70575
+ });
70576
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
70577
+ return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
70578
+ });
70579
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T = (function(t, value) {
70580
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
70581
+ return (function(v$2) {
70582
+ var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
70583
+ return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
70584
+ })
70585
+ })(this));
70586
+ var this$1 = $m_sc_Seq$();
70587
+ return (("{" + $as_sc_TraversableOnce(value.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "}")
70588
+ });
70589
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70590
+ return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + " and 1 or 0)")
70591
+ });
70592
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70593
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + " + 1]")
70594
+ });
70595
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70596
+ return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70597
+ });
70598
+ $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) {
70599
+ 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)) + ")")
70600
+ });
70601
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70602
+ var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70603
+ return (((("string.byte(" + table) + ", #") + table) + ")")
70604
+ });
70605
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70606
+ var this$1 = this.importList$3;
70607
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70608
+ return (("utils.byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70609
+ });
70610
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70611
+ 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)) + ")")
70612
+ });
70613
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doLocalName__T__T = (function(s) {
70614
+ return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "_" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "i" : ("self." + s)))
70615
+ });
70616
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70617
+ return (("string.len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70618
+ });
70619
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T = (function(op) {
70620
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Not$();
70621
+ if ((x === op)) {
70622
+ return "not"
70623
+ } else {
70624
+ return $f_Lio_kaitai_struct_translators_CommonOps__unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(this, op)
70625
+ }
70626
+ });
70627
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
70628
+ return this.doByteArrayLiteral__sc_Seq__T(arr)
70629
+ });
70630
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70631
+ var this$1 = this.importList$3;
70632
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70633
+ return (("utils.array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70634
+ });
70635
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.booleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__T = (function(op) {
70636
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$boolop$Or$();
70637
+ if ((x === op)) {
70638
+ return "or"
70639
+ } else {
70640
+ var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$boolop$And$();
70641
+ if ((x$3 === op)) {
70642
+ return "and"
70643
+ } else {
70644
+ throw new $c_s_MatchError().init___O(op)
70645
+ }
70646
+ }
70647
+ });
70648
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
70649
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":size()")
70650
+ });
70651
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70652
+ return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70653
+ });
70654
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
70655
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70656
+ if ((baseStr === "10")) {
70657
+ return (("tostring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")")
70658
+ } else {
70659
+ throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
70660
+ }
70661
+ });
70662
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70663
+ return (((("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + " + 1)")
70664
+ });
70665
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doName__T__T = (function(s) {
70666
+ return s
70667
+ });
70668
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
70669
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":is_eof()")
70670
+ });
70671
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
70672
+ return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
70673
+ });
70674
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
70675
+ var this$1 = this.importList$3;
70676
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local str_decode = require(\"string_decode\")");
70677
+ return (((("str_decode.decode(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
70678
+ });
70679
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T = (function(op) {
70680
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
70681
+ if ((x === op)) {
70682
+ return "~="
70683
+ } else {
70684
+ return $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)
70685
+ }
70686
+ });
70687
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
70688
+ return this.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T(value, et)
70689
+ });
70690
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.decEscapeByteArray__p3__sc_Seq__T = (function(arr) {
70691
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
70692
+ return (function(x$2) {
70693
+ var x = $uB(x$2);
70694
+ var this$4 = new $c_sci_StringOps().init___T("\\%03d");
70695
+ var array = [(255 & x)];
70696
+ var jsx$3 = $m_sjsr_RuntimeString$();
70697
+ var $$this = this$4.repr$1;
70698
+ $m_sc_Seq$();
70699
+ $m_sjs_js_WrappedArray$();
70700
+ var array$1 = [];
70701
+ var x1 = $uI(array.length);
70702
+ switch (x1) {
70703
+ case (-1): {
70704
+ break
70705
+ }
70706
+ };
70707
+ var i = 0;
70708
+ var len = $uI(array.length);
70709
+ while ((i < len)) {
70710
+ var index = i;
70711
+ var arg1 = array[index];
70712
+ var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
70713
+ array$1.push(elem);
70714
+ i = ((1 + i) | 0)
70715
+ };
70716
+ $m_s_reflect_ManifestFactory$ObjectManifest$();
70717
+ var len$1 = $uI(array$1.length);
70718
+ var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
70719
+ var len$2 = result.u.length;
70720
+ var i$1 = 0;
70721
+ var j = 0;
70722
+ var x$1 = $uI(array$1.length);
70723
+ var x$3 = ((x$1 < len$2) ? x$1 : len$2);
70724
+ var that = result.u.length;
70725
+ var end = ((x$3 < that) ? x$3 : that);
70726
+ while ((i$1 < end)) {
70727
+ var jsx$2 = j;
70728
+ var index$1 = i$1;
70729
+ result.set(jsx$2, array$1[index$1]);
70730
+ i$1 = ((1 + i$1) | 0);
70731
+ j = ((1 + j) | 0)
70732
+ };
70733
+ return jsx$3.format__T__AO__T($$this, result)
70734
+ })
70735
+ })(this));
70736
+ var this$18 = $m_sc_Seq$();
70737
+ return $as_sc_TraversableOnce(arr.map__F1__scg_CanBuildFrom__O(jsx$1, this$18.ReusableCBFInstance$2)).mkString__T()
70738
+ });
70739
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70740
+ return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70741
+ });
70742
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70743
+ return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70744
+ });
70745
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70746
+ return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70747
+ });
70748
+ $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) {
70749
+ var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
70750
+ var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
70751
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70752
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70753
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
70754
+ var jsx$1 = (x === op)
70755
+ } else {
70756
+ var jsx$1 = false
70757
+ }
70758
+ } else {
70759
+ var jsx$1 = false
70760
+ };
70761
+ if (jsx$1) {
70762
+ return (((("math.floor(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
70763
+ } else {
70764
+ 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)
70765
+ }
70766
+ });
70767
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
70768
+ return (("\"" + this.decEscapeByteArray__p3__sc_Seq__T(arr)) + "\"")
70769
+ });
70770
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70771
+ return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70772
+ });
70773
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
70774
+ return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
70775
+ });
70776
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70777
+ return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70778
+ });
70779
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70780
+ var this$1 = this.importList$3;
70781
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70782
+ return (("utils.byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70783
+ });
70784
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70785
+ return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70786
+ });
70787
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
70788
+ return (($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + ".") + label)
70789
+ });
70790
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList = (function(provider, importList) {
70791
+ this.importList$3 = importList;
70792
+ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
70793
+ var self = new $c_jl_Character().init___C(9);
70794
+ var jsx$9 = new $c_T2().init___O__O(self, "\\t");
70795
+ var self$1 = new $c_jl_Character().init___C(10);
70796
+ var jsx$8 = new $c_T2().init___O__O(self$1, "\\n");
70797
+ var self$2 = new $c_jl_Character().init___C(13);
70798
+ var jsx$7 = new $c_T2().init___O__O(self$2, "\\r");
70799
+ var self$3 = new $c_jl_Character().init___C(34);
70800
+ var jsx$6 = new $c_T2().init___O__O(self$3, "\\\"");
70801
+ var self$4 = new $c_jl_Character().init___C(92);
70802
+ var jsx$5 = new $c_T2().init___O__O(self$4, "\\\\");
70803
+ var self$5 = new $c_jl_Character().init___C(7);
70804
+ var jsx$4 = new $c_T2().init___O__O(self$5, "\\a");
70805
+ var self$6 = new $c_jl_Character().init___C(8);
70806
+ var jsx$3 = new $c_T2().init___O__O(self$6, "\\b");
70807
+ var self$7 = new $c_jl_Character().init___C(11);
70808
+ var jsx$2 = new $c_T2().init___O__O(self$7, "\\v");
70809
+ var self$8 = new $c_jl_Character().init___C(12);
70810
+ var jsx$1 = new $c_T2().init___O__O(self$8, "\\f");
70811
+ var self$9 = new $c_jl_Character().init___C(27);
70812
+ 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")];
70813
+ var this$44 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
70814
+ var i = 0;
70815
+ var len = $uI(array.length);
70816
+ while ((i < len)) {
70817
+ var index = i;
70818
+ var arg1 = array[index];
70819
+ this$44.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
70820
+ i = ((1 + i) | 0)
70821
+ };
70822
+ this.asciiCharQuoteMap$3 = $as_sci_Map(this$44.elems$1);
70823
+ return this
70824
+ });
70825
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70826
+ return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70827
+ });
70828
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
70829
+ return ((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + "(") + id) + ")")
70830
+ });
70831
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, right) {
70832
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " .. ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
70833
+ });
70834
+ var $d_Lio_kaitai_struct_translators_LuaTranslator = new $TypeData().initClass({
70835
+ Lio_kaitai_struct_translators_LuaTranslator: 0
70836
+ }, false, "io.kaitai.struct.translators.LuaTranslator", {
70837
+ Lio_kaitai_struct_translators_LuaTranslator: 1,
70838
+ Lio_kaitai_struct_translators_BaseTranslator: 1,
70839
+ Lio_kaitai_struct_translators_TypeDetector: 1,
70840
+ O: 1,
70841
+ Lio_kaitai_struct_translators_AbstractTranslator: 1,
70842
+ Lio_kaitai_struct_translators_CommonLiterals: 1,
70843
+ Lio_kaitai_struct_translators_CommonOps: 1,
70844
+ Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
70845
+ Lio_kaitai_struct_translators_CommonMethods: 1,
70846
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1,
70847
+ Lio_kaitai_struct_translators_MinSignedIntegers: 1
70848
+ });
70849
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_LuaTranslator;
70850
+ /** @constructor */
70851
+ function $c_Lio_kaitai_struct_translators_PHPTranslator() {
70852
+ $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
70853
+ this.asciiCharQuoteMap$3 = null;
70854
+ this.namespaceRef$3 = null
70855
+ }
70856
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
70857
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_PHPTranslator;
70858
+ /** @constructor */
70859
+ function $h_Lio_kaitai_struct_translators_PHPTranslator() {
70860
+ /*<skip>*/
70861
+ }
70862
+ $h_Lio_kaitai_struct_translators_PHPTranslator.prototype = $c_Lio_kaitai_struct_translators_PHPTranslator.prototype;
70863
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
70864
+ return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base)) + ")")
70865
+ });
70866
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70867
+ return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70868
+ });
70869
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
70870
+ var this$1 = $m_s_math_BigInt$();
70871
+ var that = this$1.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(0, (-2147483648)));
70872
+ if ($f_s_math_Ordered__$$greater$eq__O__Z(n, that)) {
70873
+ var that$1 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
70874
+ var jsx$2 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
70875
+ } else {
70876
+ var jsx$2 = false
70877
+ };
70878
+ if (jsx$2) {
70879
+ var this$2 = $m_s_math_BigInt$();
70880
+ var t = n.bigInteger$3.longValue__J();
70881
+ var lo = t.lo$2;
70882
+ var hi = t.hi$2;
70883
+ var jsx$1 = this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi))
70884
+ } else {
70885
+ var jsx$1 = n
70886
+ };
70887
+ return $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_math_BigInt__T(this, jsx$1)
70888
+ });
70889
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70890
+ return (("count(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70891
+ });
70892
+ $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) {
70893
+ 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)
70894
+ });
70895
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70896
+ return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70897
+ });
70898
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70899
+ return (("strrev(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70900
+ });
70901
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70902
+ return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70903
+ });
70904
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_RuntimeConfig = (function(provider, config) {
70905
+ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
70906
+ var self = new $c_jl_Character().init___C(9);
70907
+ var jsx$8 = new $c_T2().init___O__O(self, "\\t");
70908
+ var self$1 = new $c_jl_Character().init___C(10);
70909
+ var jsx$7 = new $c_T2().init___O__O(self$1, "\\n");
70910
+ var self$2 = new $c_jl_Character().init___C(13);
70911
+ var jsx$6 = new $c_T2().init___O__O(self$2, "\\r");
70912
+ var self$3 = new $c_jl_Character().init___C(34);
70913
+ var jsx$5 = new $c_T2().init___O__O(self$3, "\\\"");
70914
+ var self$4 = new $c_jl_Character().init___C(92);
70915
+ var jsx$4 = new $c_T2().init___O__O(self$4, "\\\\");
70916
+ var self$5 = new $c_jl_Character().init___C(36);
70917
+ var jsx$3 = new $c_T2().init___O__O(self$5, "\\$");
70918
+ var self$6 = new $c_jl_Character().init___C(12);
70919
+ var jsx$2 = new $c_T2().init___O__O(self$6, "\\f");
70920
+ var self$7 = new $c_jl_Character().init___C(11);
70921
+ var jsx$1 = new $c_T2().init___O__O(self$7, "\\v");
70922
+ var self$8 = new $c_jl_Character().init___C(27);
70923
+ 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")];
70924
+ var this$40 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
70925
+ var i = 0;
70926
+ var len = $uI(array.length);
70927
+ while ((i < len)) {
70928
+ var index = i;
70929
+ var arg1 = array[index];
70930
+ this$40.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
70931
+ i = ((1 + i) | 0)
70932
+ };
70933
+ this.asciiCharQuoteMap$3 = $as_sci_Map(this$40.elems$1);
70934
+ var thiz = config.phpNamespace$1;
70935
+ if ((thiz === null)) {
70936
+ throw new $c_jl_NullPointerException().init___()
70937
+ };
70938
+ this.namespaceRef$3 = ((thiz === "") ? "" : ("\\" + config.phpNamespace$1));
70939
+ return this
70940
+ });
70941
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
70942
+ return this.doByteArrayNonLiteral__sc_Seq__T(elts)
70943
+ });
70944
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70945
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70946
+ });
70947
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70948
+ return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70949
+ });
70950
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70951
+ return (("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + "[0])")
70952
+ });
70953
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.types2classAbs__sci_List__T = (function(names) {
70954
+ $m_sci_List$();
70955
+ var o9 = new $c_s_Some().init___O(names);
70956
+ if ((o9.value$2 !== null)) {
70957
+ var this$2 = $as_sc_LinearSeqOptimized(o9.value$2);
70958
+ var jsx$1 = ($f_sc_LinearSeqOptimized__lengthCompare__I__I(this$2, 1) === 0)
70959
+ } else {
70960
+ var jsx$1 = false
70961
+ };
70962
+ if (jsx$1) {
70963
+ var this$3 = $as_sc_LinearSeqOptimized(o9.value$2);
70964
+ var p3 = $as_T($f_sc_LinearSeqOptimized__apply__I__O(this$3, 0));
70965
+ if ((p3 === "kaitai_struct")) {
70966
+ return "\\Kaitai\\Struct\\Struct"
70967
+ }
70968
+ };
70969
+ return ((this.namespaceRef$3 + "\\") + $m_Lio_kaitai_struct_languages_PHPCompiler$().types2classRel__sci_List__T(names))
70970
+ });
70971
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70972
+ return this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70973
+ });
70974
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70975
+ var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70976
+ return (((v + "[count(") + v) + ") - 1]")
70977
+ });
70978
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70979
+ return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70980
+ });
70981
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLiteralUnicode__C__T = (function(code) {
70982
+ var this$4 = new $c_sci_StringOps().init___T("\\u{%x}");
70983
+ var array = [code];
70984
+ var jsx$2 = $m_sjsr_RuntimeString$();
70985
+ var $$this = this$4.repr$1;
70986
+ $m_sc_Seq$();
70987
+ $m_sjs_js_WrappedArray$();
70988
+ var array$1 = [];
70989
+ var x1 = $uI(array.length);
70990
+ switch (x1) {
70991
+ case (-1): {
70992
+ break
70993
+ }
70994
+ };
70995
+ var i = 0;
70996
+ var len = $uI(array.length);
70997
+ while ((i < len)) {
70998
+ var index = i;
70999
+ var arg1 = array[index];
71000
+ var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
71001
+ array$1.push(elem);
71002
+ i = ((1 + i) | 0)
71003
+ };
71004
+ $m_s_reflect_ManifestFactory$ObjectManifest$();
71005
+ var len$1 = $uI(array$1.length);
71006
+ var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
71007
+ var len$2 = result.u.length;
71008
+ var i$1 = 0;
71009
+ var j = 0;
71010
+ var x = $uI(array$1.length);
71011
+ var x$1 = ((x < len$2) ? x : len$2);
71012
+ var that = result.u.length;
71013
+ var end = ((x$1 < that) ? x$1 : that);
71014
+ while ((i$1 < end)) {
71015
+ var jsx$1 = j;
71016
+ var index$1 = i$1;
71017
+ result.set(jsx$1, array$1[index$1]);
71018
+ i$1 = ((1 + i$1) | 0);
71019
+ j = ((1 + j) | 0)
71020
+ };
71021
+ return jsx$2.format__T__AO__T($$this, result)
71022
+ });
71023
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
71024
+ return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
71025
+ });
71026
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
71027
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "[0]")
71028
+ });
71029
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
71030
+ return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
71031
+ });
71032
+ $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) {
71033
+ 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)) + ")")
71034
+ });
71035
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
71036
+ return this.asciiCharQuoteMap$3
70651
71037
  });
70652
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productArity__I = (function() {
70653
- return 4
71038
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
71039
+ return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
70654
71040
  });
70655
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.equals__O__Z = (function(x$1) {
70656
- if ((this === x$1)) {
70657
- return true
70658
- } else if ((x$1 instanceof $c_Lfastparse_parsers_Intrinsics$ElemsWhile)) {
70659
- var ElemsWhile$1 = $as_Lfastparse_parsers_Intrinsics$ElemsWhile(x$1);
70660
- if ((this.name$3 === ElemsWhile$1.name$3)) {
70661
- var x = this.predicate$3;
70662
- var x$2 = ElemsWhile$1.predicate$3;
70663
- var jsx$1 = ((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))
70664
- } else {
70665
- var jsx$1 = false
70666
- };
70667
- if ((jsx$1 && (this.min$3 === ElemsWhile$1.min$3))) {
70668
- return (this.precompute$3 === ElemsWhile$1.precompute$3)
70669
- } else {
70670
- return false
70671
- }
70672
- } else {
70673
- return false
70674
- }
71041
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
71042
+ return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
70675
71043
  });
70676
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productElement__I__O = (function(x$1) {
70677
- switch (x$1) {
70678
- case 0: {
70679
- return this.name$3;
70680
- break
70681
- }
70682
- case 1: {
70683
- return this.predicate$3;
70684
- break
70685
- }
70686
- case 2: {
70687
- return this.min$3;
70688
- break
70689
- }
70690
- case 3: {
70691
- return this.precompute$3;
70692
- break
70693
- }
70694
- default: {
70695
- throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
70696
- }
70697
- }
71044
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
71045
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
70698
71046
  });
70699
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.init___T__F1__I__Z__Lfastparse_utils_ElemSetHelper__Lfastparse_utils_ReprOps = (function(name, predicate, min, precompute, helper, repr) {
70700
- this.name$3 = name;
70701
- this.predicate$3 = predicate;
70702
- this.min$3 = min;
70703
- this.precompute$3 = precompute;
70704
- $c_Lfastparse_parsers_Intrinsics$PrecomputableParser.prototype.init___s_util_Either__Lfastparse_utils_ElemSetHelper__Lfastparse_utils_ReprOps.call(this, $m_Lfastparse_parsers_Intrinsics$().makeGenOrPred__F1__Z__Lfastparse_utils_ElemSetHelper__s_util_Either(predicate, precompute, helper), helper, repr);
70705
- return this
71047
+ $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) {
71048
+ 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)) + ")")
70706
71049
  });
70707
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.toString__T = (function() {
70708
- return new $c_s_StringContext().init___sc_Seq(new $c_sjs_js_WrappedArray().init___sjs_js_Array(["", "(", ")"])).s__sc_Seq__T(new $c_sjs_js_WrappedArray().init___sjs_js_Array([this.name$3, this.predicate$3]))
71050
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71051
+ return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + "[") + this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + " - 1])")
70709
71052
  });
70710
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.hashCode__I = (function() {
70711
- var acc = (-889275714);
70712
- acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.name$3));
70713
- acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.predicate$3));
70714
- acc = $m_sr_Statics$().mix__I__I__I(acc, this.min$3);
70715
- acc = $m_sr_Statics$().mix__I__I__I(acc, (this.precompute$3 ? 1231 : 1237));
70716
- return $m_sr_Statics$().finalizeHash__I__I__I(acc, 4)
71053
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71054
+ return (("\\Kaitai\\Struct\\Stream::byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70717
71055
  });
70718
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.parseRec__Lfastparse_core_ParseCtx__I__Lfastparse_core_Mutable = (function(cfg, index) {
70719
- return $f_Lfastparse_parsers_Intrinsics$WhileParser__parseRec__Lfastparse_core_ParseCtx__I__Lfastparse_core_Mutable(this, cfg, index)
71056
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__T = (function(elts) {
71057
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
71058
+ return (function(v$2) {
71059
+ var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
71060
+ return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
71061
+ })
71062
+ })(this));
71063
+ var this$1 = $m_sc_Seq$();
71064
+ return (("pack('C*', " + $as_sc_TraversableOnce(elts.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + ")")
70720
71065
  });
70721
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productIterator__sc_Iterator = (function() {
70722
- return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
71066
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
71067
+ return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
70723
71068
  });
70724
- function $as_Lfastparse_parsers_Intrinsics$ElemsWhile(obj) {
70725
- return (((obj instanceof $c_Lfastparse_parsers_Intrinsics$ElemsWhile) || (obj === null)) ? obj : $throwClassCastException(obj, "fastparse.parsers.Intrinsics$ElemsWhile"))
70726
- }
70727
- function $isArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) {
70728
- return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lfastparse_parsers_Intrinsics$ElemsWhile)))
70729
- }
70730
- function $asArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) {
70731
- return (($isArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lfastparse.parsers.Intrinsics$ElemsWhile;", depth))
70732
- }
70733
- var $d_Lfastparse_parsers_Intrinsics$ElemsWhile = new $TypeData().initClass({
70734
- Lfastparse_parsers_Intrinsics$ElemsWhile: 0
70735
- }, false, "fastparse.parsers.Intrinsics$ElemsWhile", {
70736
- Lfastparse_parsers_Intrinsics$ElemsWhile: 1,
70737
- Lfastparse_parsers_Intrinsics$PrecomputableParser: 1,
70738
- Lfastparse_core_Parser: 1,
70739
- O: 1,
70740
- Lfastparse_core_ParserResults: 1,
70741
- Lfastparse_core_Precedence: 1,
70742
- Lfastparse_parsers_Intrinsics$WhileParser: 1,
70743
- s_Product: 1,
70744
- s_Equals: 1,
70745
- s_Serializable: 1,
70746
- Ljava_io_Serializable: 1
71069
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doLocalName__T__T = (function(s) {
71070
+ 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)))))
70747
71071
  });
70748
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.$classData = $d_Lfastparse_parsers_Intrinsics$ElemsWhile;
70749
- /** @constructor */
70750
- function $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes() {
70751
- $c_Lio_kaitai_struct_datatype_DataType$UserType.call(this);
70752
- this.$$undargs$4 = null;
70753
- this.bytes$4 = null;
70754
- this.process$4 = null
70755
- }
70756
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype = new $h_Lio_kaitai_struct_datatype_DataType$UserType();
70757
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes;
70758
- /** @constructor */
70759
- function $h_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes() {
70760
- /*<skip>*/
70761
- }
70762
- $h_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype = $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype;
70763
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productPrefix__T = (function() {
70764
- return "CalcUserTypeFromBytes"
71072
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
71073
+ return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70765
71074
  });
70766
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productArity__I = (function() {
70767
- return 5
71075
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
71076
+ return this.doByteArrayLiteral__sc_Seq__T(arr)
70768
71077
  });
70769
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.equals__O__Z = (function(x$1) {
70770
- if ((this === x$1)) {
70771
- return true
70772
- } else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)) {
70773
- var CalcUserTypeFromBytes$1 = $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(x$1);
70774
- var x = this.name$3;
70775
- var x$2 = CalcUserTypeFromBytes$1.name$3;
70776
- if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
70777
- var x$3 = this.forcedParent$3;
70778
- var x$4 = CalcUserTypeFromBytes$1.forcedParent$3;
70779
- var jsx$3 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
70780
- } else {
70781
- var jsx$3 = false
70782
- };
70783
- if (jsx$3) {
70784
- var x$5 = this.$$undargs$4;
70785
- var x$6 = CalcUserTypeFromBytes$1.$$undargs$4;
70786
- var jsx$2 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
70787
- } else {
70788
- var jsx$2 = false
70789
- };
70790
- if (jsx$2) {
70791
- var x$7 = this.bytes$4;
70792
- var x$8 = CalcUserTypeFromBytes$1.bytes$4;
70793
- var jsx$1 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
70794
- } else {
70795
- var jsx$1 = false
70796
- };
70797
- if (jsx$1) {
70798
- var x$9 = this.process$4;
70799
- var x$10 = CalcUserTypeFromBytes$1.process$4;
70800
- return ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
70801
- } else {
70802
- return false
70803
- }
70804
- } else {
70805
- return false
70806
- }
71078
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71079
+ return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70807
71080
  });
70808
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productElement__I__O = (function(x$1) {
70809
- switch (x$1) {
70810
- case 0: {
70811
- return this.name$3;
70812
- break
70813
- }
70814
- case 1: {
70815
- return this.forcedParent$3;
70816
- break
70817
- }
70818
- case 2: {
70819
- return this.$$undargs$4;
70820
- break
70821
- }
70822
- case 3: {
70823
- return this.bytes$4;
70824
- break
70825
- }
70826
- case 4: {
70827
- return this.process$4;
70828
- break
70829
- }
70830
- default: {
70831
- throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
70832
- }
70833
- }
71081
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
71082
+ return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70834
71083
  });
70835
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.toString__T = (function() {
70836
- return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
71084
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
71085
+ return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70837
71086
  });
70838
- $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) {
70839
- this.$$undargs$4 = _args;
70840
- this.bytes$4 = bytes;
70841
- this.process$4 = process;
70842
- $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.init___sci_List__s_Option__sc_Seq.call(this, _name, _forcedParent, _args);
70843
- return this
71087
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
71088
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
71089
+ 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) + ")"))
70844
71090
  });
70845
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.isOwning__Z = (function() {
70846
- return false
71091
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
71092
+ return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container)) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "])")
70847
71093
  });
70848
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.hashCode__I = (function() {
70849
- var this$2 = $m_s_util_hashing_MurmurHash3$();
70850
- return this$2.productHash__s_Product__I__I(this, (-889275714))
71094
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doName__T__T = (function(s) {
71095
+ return ($m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(s) + "()")
70851
71096
  });
70852
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productIterator__sc_Iterator = (function() {
70853
- return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
71097
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
71098
+ return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
70854
71099
  });
70855
- function $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj) {
70856
- return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes"))
70857
- }
70858
- function $isArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) {
70859
- return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)))
70860
- }
70861
- function $asArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) {
70862
- return (($isArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes;", depth))
70863
- }
70864
- var $d_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes = new $TypeData().initClass({
70865
- Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes: 0
70866
- }, false, "io.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes", {
70867
- Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes: 1,
70868
- Lio_kaitai_struct_datatype_DataType$UserType: 1,
70869
- Lio_kaitai_struct_datatype_DataType$StructType: 1,
70870
- Lio_kaitai_struct_datatype_DataType$ComplexDataType: 1,
70871
- O: 1,
70872
- Lio_kaitai_struct_datatype_DataType: 1,
70873
- Lio_kaitai_struct_datatype_DataType$Processing: 1,
70874
- s_Product: 1,
70875
- s_Equals: 1,
70876
- s_Serializable: 1,
70877
- Ljava_io_Serializable: 1
71100
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
71101
+ return (((("\\Kaitai\\Struct\\Stream::bytesToStr(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
70878
71102
  });
70879
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes;
70880
- /** @constructor */
70881
- function $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes() {
70882
- $c_Lio_kaitai_struct_datatype_DataType$UserType.call(this);
70883
- this.$$undargs$4 = null;
70884
- this.bytes$4 = null;
70885
- this.process$4 = null
70886
- }
70887
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype = new $h_Lio_kaitai_struct_datatype_DataType$UserType();
70888
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes;
70889
- /** @constructor */
70890
- function $h_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes() {
70891
- /*<skip>*/
70892
- }
70893
- $h_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype = $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype;
70894
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productPrefix__T = (function() {
70895
- return "UserTypeFromBytes"
71103
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
71104
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70896
71105
  });
70897
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productArity__I = (function() {
70898
- return 5
71106
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
71107
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + "->") + this.doName__T__T(attrName))
70899
71108
  });
70900
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.asNonOwning__Lio_kaitai_struct_datatype_DataType = (function() {
70901
- return this.asNonOwning__Lio_kaitai_struct_datatype_DataType$UserType()
71109
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71110
+ return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70902
71111
  });
70903
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.equals__O__Z = (function(x$1) {
70904
- if ((this === x$1)) {
70905
- return true
70906
- } else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
70907
- var UserTypeFromBytes$1 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(x$1);
70908
- var x = this.name$3;
70909
- var x$2 = UserTypeFromBytes$1.name$3;
70910
- if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
70911
- var x$3 = this.forcedParent$3;
70912
- var x$4 = UserTypeFromBytes$1.forcedParent$3;
70913
- var jsx$3 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
71112
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
71113
+ return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
71114
+ });
71115
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
71116
+ return (("\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\"")
71117
+ });
71118
+ $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) {
71119
+ var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
71120
+ var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
71121
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71122
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71123
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
71124
+ var jsx$1 = (x === op)
70914
71125
  } else {
70915
- var jsx$3 = false
70916
- };
70917
- if (jsx$3) {
70918
- var x$5 = this.$$undargs$4;
70919
- var x$6 = UserTypeFromBytes$1.$$undargs$4;
70920
- var jsx$2 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
71126
+ var jsx$1 = false
71127
+ }
71128
+ } else {
71129
+ var jsx$1 = false
71130
+ };
71131
+ if (jsx$1) {
71132
+ return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
71133
+ } else {
71134
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71135
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71136
+ var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
71137
+ var jsx$2 = (x$3 === op)
71138
+ } else {
71139
+ var jsx$2 = false
71140
+ }
70921
71141
  } else {
70922
71142
  var jsx$2 = false
70923
71143
  };
70924
71144
  if (jsx$2) {
70925
- var x$7 = this.bytes$4;
70926
- var x$8 = UserTypeFromBytes$1.bytes$4;
70927
- var jsx$1 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
70928
- } else {
70929
- var jsx$1 = false
70930
- };
70931
- if (jsx$1) {
70932
- var x$9 = this.process$4;
70933
- var x$10 = UserTypeFromBytes$1.process$4;
70934
- return ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
71145
+ 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)) + ")")
70935
71146
  } else {
70936
- return false
70937
- }
70938
- } else {
70939
- return false
70940
- }
70941
- });
70942
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.asNonOwning__Lio_kaitai_struct_datatype_DataType$UserType = (function() {
70943
- 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);
70944
- r.classSpec$3 = this.classSpec$3;
70945
- return r
70946
- });
70947
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productElement__I__O = (function(x$1) {
70948
- switch (x$1) {
70949
- case 0: {
70950
- return this.name$3;
70951
- break
70952
- }
70953
- case 1: {
70954
- return this.forcedParent$3;
70955
- break
70956
- }
70957
- case 2: {
70958
- return this.$$undargs$4;
70959
- break
70960
- }
70961
- case 3: {
70962
- return this.bytes$4;
70963
- break
70964
- }
70965
- case 4: {
70966
- return this.process$4;
70967
- break
70968
- }
70969
- default: {
70970
- throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
71147
+ 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)
70971
71148
  }
70972
71149
  }
70973
71150
  });
70974
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.toString__T = (function() {
70975
- return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
70976
- });
70977
- $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) {
70978
- this.$$undargs$4 = _args;
70979
- this.bytes$4 = bytes;
70980
- this.process$4 = process;
70981
- $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.init___sci_List__s_Option__sc_Seq.call(this, _name, _forcedParent, _args);
70982
- return this
70983
- });
70984
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.isOwning__Z = (function() {
70985
- return true
70986
- });
70987
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.hashCode__I = (function() {
70988
- var this$2 = $m_s_util_hashing_MurmurHash3$();
70989
- return this$2.productHash__s_Product__I__I(this, (-889275714))
70990
- });
70991
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productIterator__sc_Iterator = (function() {
70992
- return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
70993
- });
70994
- function $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj) {
70995
- return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$UserTypeFromBytes"))
70996
- }
70997
- function $isArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) {
70998
- return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)))
70999
- }
71000
- function $asArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) {
71001
- return (($isArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.datatype.DataType$UserTypeFromBytes;", depth))
71002
- }
71003
- var $d_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes = new $TypeData().initClass({
71004
- Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes: 0
71005
- }, false, "io.kaitai.struct.datatype.DataType$UserTypeFromBytes", {
71006
- Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes: 1,
71007
- Lio_kaitai_struct_datatype_DataType$UserType: 1,
71008
- Lio_kaitai_struct_datatype_DataType$StructType: 1,
71009
- Lio_kaitai_struct_datatype_DataType$ComplexDataType: 1,
71010
- O: 1,
71011
- Lio_kaitai_struct_datatype_DataType: 1,
71012
- Lio_kaitai_struct_datatype_DataType$Processing: 1,
71013
- s_Product: 1,
71014
- s_Equals: 1,
71015
- s_Serializable: 1,
71016
- Ljava_io_Serializable: 1
71017
- });
71018
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes;
71019
- /** @constructor */
71020
- function $c_Lio_kaitai_struct_translators_ConstructTranslator() {
71021
- $c_Lio_kaitai_struct_translators_PythonTranslator.call(this)
71022
- }
71023
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype = new $h_Lio_kaitai_struct_translators_PythonTranslator();
71024
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_ConstructTranslator;
71025
- /** @constructor */
71026
- function $h_Lio_kaitai_struct_translators_ConstructTranslator() {
71027
- /*<skip>*/
71028
- }
71029
- $h_Lio_kaitai_struct_translators_ConstructTranslator.prototype = $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype;
71030
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
71031
- return (("stream_tell(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
71032
- });
71033
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
71034
- return this.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
71151
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
71152
+ return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
71035
71153
  });
71036
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
71037
- return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
71154
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71155
+ return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
71038
71156
  });
71039
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doLocalName__T__T = (function(s) {
71040
- 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))))))
71157
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71158
+ return (("\\Kaitai\\Struct\\Stream::byteArrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
71041
71159
  });
71042
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
71043
- return (("stream_size(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
71160
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71161
+ return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
71044
71162
  });
71045
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
71046
- return (("stream_iseof(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
71163
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
71164
+ var enumClass = this.types2classAbs__sci_List__T(enumTypeAbs);
71165
+ return ((enumClass + "::") + ($m_Lio_kaitai_struct_Utils$(), $as_T(label.toUpperCase())))
71047
71166
  });
71048
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doName__T__T = (function(s) {
71049
- return (($m_Lio_kaitai_struct_format_Identifier$().PARENT$1 === s) ? "_" : s)
71167
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71168
+ return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
71050
71169
  });
71051
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
71052
- return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
71170
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
71171
+ return id
71053
71172
  });
71054
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList = (function(provider, importList) {
71055
- $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList.call(this, provider, importList);
71056
- return this
71173
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, right) {
71174
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " . ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
71057
71175
  });
71058
- var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initClass({
71059
- Lio_kaitai_struct_translators_ConstructTranslator: 0
71060
- }, false, "io.kaitai.struct.translators.ConstructTranslator", {
71061
- Lio_kaitai_struct_translators_ConstructTranslator: 1,
71062
- Lio_kaitai_struct_translators_PythonTranslator: 1,
71176
+ var $d_Lio_kaitai_struct_translators_PHPTranslator = new $TypeData().initClass({
71177
+ Lio_kaitai_struct_translators_PHPTranslator: 0
71178
+ }, false, "io.kaitai.struct.translators.PHPTranslator", {
71179
+ Lio_kaitai_struct_translators_PHPTranslator: 1,
71063
71180
  Lio_kaitai_struct_translators_BaseTranslator: 1,
71064
71181
  Lio_kaitai_struct_translators_TypeDetector: 1,
71065
71182
  O: 1,
@@ -71068,9 +71185,10 @@ var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initC
71068
71185
  Lio_kaitai_struct_translators_CommonOps: 1,
71069
71186
  Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
71070
71187
  Lio_kaitai_struct_translators_CommonMethods: 1,
71071
- Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
71188
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1,
71189
+ Lio_kaitai_struct_translators_MinSignedIntegers: 1
71072
71190
  });
71073
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_ConstructTranslator;
71191
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_PHPTranslator;
71074
71192
  /** @constructor */
71075
71193
  function $c_s_reflect_ManifestFactory$AnyManifest$() {
71076
71194
  $c_s_reflect_ManifestFactory$PhantomManifest.call(this)
@@ -73480,7 +73598,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.enumDeclaration__sci_List__
73480
73598
  var lo = t.lo$2;
73481
73599
  var hi = t.hi$2;
73482
73600
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
73483
- $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)) + ","))
73601
+ var jsx$4 = $this.outHdr$2;
73602
+ var jsx$3 = $this.value2Const__T__T__T(enumName$1, label.name$1);
73603
+ var jsx$2 = $this.translator$2;
73604
+ var this$6 = $m_s_math_BigInt$();
73605
+ 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)))) + ","))
73484
73606
  } else {
73485
73607
  throw new $c_s_MatchError().init___O(x0$1)
73486
73608
  }
@@ -73493,7 +73615,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.enumDeclaration__sci_List__
73493
73615
  var lo$1 = t$1.lo$2;
73494
73616
  var hi$1 = t$1.hi$2;
73495
73617
  var label$1 = $as_Lio_kaitai_struct_format_EnumValueSpec(x1.$$und2__O());
73496
- 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)))
73618
+ var jsx$7 = this.outHdr$2;
73619
+ var jsx$6 = this.value2Const__T__T__T(enumName, label$1.name$1);
73620
+ var jsx$5 = this.translator$2;
73621
+ var this$7 = $m_s_math_BigInt$();
73622
+ 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)))))
73497
73623
  } else {
73498
73624
  throw new $c_s_MatchError().init___O(x1)
73499
73625
  };
@@ -75984,17 +76110,21 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci
75984
76110
  var lo = t.lo$2;
75985
76111
  var hi = t.hi$2;
75986
76112
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
75987
- var jsx$2 = $this.out$2;
76113
+ var jsx$3 = $this.out$2;
75988
76114
  var label$1 = label.name$1;
75989
76115
  $m_Lio_kaitai_struct_Utils$();
75990
- jsx$2.puts__T__V(((($as_T(label$1.toUpperCase()) + ": ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ","))
76116
+ var jsx$2 = $as_T(label$1.toUpperCase());
76117
+ var this$4 = $m_s_math_BigInt$();
76118
+ var n = this$4.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
76119
+ var this$6 = n.bigInteger$3;
76120
+ jsx$3.puts__T__V((((jsx$2 + ": ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$6)) + ","))
75991
76121
  } else {
75992
76122
  throw new $c_s_MatchError().init___O(x0$1)
75993
76123
  }
75994
76124
  })
75995
76125
  })(this, enumName)));
75996
- var this$4 = this.out$2;
75997
- this$4.sb$2.append__T__scm_StringBuilder("\n");
76126
+ var this$7 = this.out$2;
76127
+ this$7.sb$2.append__T__scm_StringBuilder("\n");
75998
76128
  enumColl.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2$1, enumName$2) {
75999
76129
  return (function(x0$2$2) {
76000
76130
  var x0$2 = $as_T2(x0$2$2);
@@ -76004,10 +76134,10 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci
76004
76134
  var hi$1 = t$1.hi$2;
76005
76135
  var label$2 = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$2.$$und2__O());
76006
76136
  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));
76007
- var jsx$3 = this$2$1.out$2;
76137
+ var jsx$4 = this$2$1.out$2;
76008
76138
  var label$3 = label$2.name$1;
76009
76139
  $m_Lio_kaitai_struct_Utils$();
76010
- jsx$3.puts__T__V((((idStr + ": \"") + $as_T(label$3.toUpperCase())) + "\","))
76140
+ jsx$4.puts__T__V((((idStr + ": \"") + $as_T(label$3.toUpperCase())) + "\","))
76011
76141
  } else {
76012
76142
  throw new $c_s_MatchError().init___O(x0$2)
76013
76143
  }
@@ -76015,8 +76145,8 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci
76015
76145
  })(this, enumName)));
76016
76146
  this.out$2.dec__V();
76017
76147
  this.out$2.puts__T__V("});");
76018
- var this$8 = this.out$2;
76019
- this$8.sb$2.append__T__scm_StringBuilder("\n")
76148
+ var this$11 = this.out$2;
76149
+ this$11.sb$2.append__T__scm_StringBuilder("\n")
76020
76150
  });
76021
76151
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchIfCaseFirstStart__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(condition) {
76022
76152
  this.out$2.puts__T__V((("if (" + this.switchCmpExpr__p2__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + ") {"));
@@ -76868,10 +76998,13 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.enumDeclaration__sci_List__
76868
76998
  var hi = t.hi$2;
76869
76999
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
76870
77000
  $this.universalDoc__Lio_kaitai_struct_format_DocSpec__V(label.doc$1);
76871
- var jsx$1 = $this.out$2;
77001
+ var jsx$3 = $this.out$2;
76872
77002
  var label$1 = label.name$1;
76873
77003
  $m_Lio_kaitai_struct_Utils$();
76874
- jsx$1.puts__T__V((((("const " + $as_T(label$1.toUpperCase())) + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ";"))
77004
+ var jsx$2 = $as_T(label$1.toUpperCase());
77005
+ var jsx$1 = $this.translator$2;
77006
+ var this$8 = $m_s_math_BigInt$();
77007
+ 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)))) + ";"))
76875
77008
  } else {
76876
77009
  throw new $c_s_MatchError().init___O(x0$1)
76877
77010
  }
@@ -77543,7 +77676,12 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumDeclaration__sci_List_
77543
77676
  var lo = t.lo$2;
77544
77677
  var hi = t.hi$2;
77545
77678
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
77546
- $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)) + ";"))
77679
+ var jsx$2 = $this.out$2;
77680
+ var jsx$1 = $this.enumValue__T__T__T(enumName$1, label.name$1);
77681
+ var this$2 = $m_s_math_BigInt$();
77682
+ var n = this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
77683
+ var this$4 = n.bigInteger$3;
77684
+ jsx$2.puts__T__V((((("our " + jsx$1) + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$4)) + ";"))
77547
77685
  } else {
77548
77686
  throw new $c_s_MatchError().init___O(x0$1)
77549
77687
  }
@@ -79349,7 +79487,12 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.enumDeclaration__T__T__s
79349
79487
  var lo = t.lo$2;
79350
79488
  var hi = t.hi$2;
79351
79489
  var label = $as_T(x0$1.$$und2__O());
79352
- $this.out$2.puts__T__V(((($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(label) + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ","))
79490
+ var jsx$2 = $this.out$2;
79491
+ var jsx$1 = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(label);
79492
+ var this$2 = $m_s_math_BigInt$();
79493
+ var n = this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
79494
+ var this$4 = n.bigInteger$3;
79495
+ jsx$2.puts__T__V((((jsx$1 + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$4)) + ","))
79353
79496
  } else {
79354
79497
  throw new $c_s_MatchError().init___O(x0$1)
79355
79498
  }
@@ -80274,7 +80417,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.enumDeclaration__sci_List__
80274
80417
  var lo = t.lo$2;
80275
80418
  var hi = t.hi$2;
80276
80419
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
80277
- $this.out$2.puts__T__V((((label.name$1 + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ","))
80420
+ var jsx$3 = $this.out$2;
80421
+ var jsx$2 = label.name$1;
80422
+ var jsx$1 = $this.translator$2;
80423
+ var this$2 = $m_s_math_BigInt$();
80424
+ 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)))) + ","))
80278
80425
  } else {
80279
80426
  throw new $c_s_MatchError().init___O(x0$1)
80280
80427
  }
@@ -80282,8 +80429,8 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.enumDeclaration__sci_List__
80282
80429
  })(this)));
80283
80430
  this.out$2.dec__V();
80284
80431
  this.out$2.puts__T__V("}");
80285
- var this$2 = this.out$2;
80286
- this$2.sb$2.append__T__scm_StringBuilder("\n")
80432
+ var this$3 = this.out$2;
80433
+ this$3.sb$2.append__T__scm_StringBuilder("\n")
80287
80434
  });
80288
80435
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfCaseFirstStart__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(condition) {
80289
80436
  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"));
@@ -82035,7 +82182,11 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumDeclaration__T__T__sc_
82035
82182
  var lo = t.lo$2;
82036
82183
  var hi = t.hi$2;
82037
82184
  var label = $as_T(x0$1.$$und2__O());
82038
- $this.out$2.puts__T__V((((new $c_sjsr_RuntimeLong().init___I__I(lo, hi) + " => ") + $this.enumValue__T__T__T(enumName$1, label)) + ","))
82185
+ var jsx$1 = $this.out$2;
82186
+ var this$5 = $m_s_math_BigInt$();
82187
+ var n = this$5.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
82188
+ var this$7 = n.bigInteger$3;
82189
+ jsx$1.puts__T__V(((($m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$7) + " => ") + $this.enumValue__T__T__T(enumName$1, label)) + ","))
82039
82190
  } else {
82040
82191
  throw new $c_s_MatchError().init___O(x0$1)
82041
82192
  }
@@ -84419,7 +84570,11 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.enumDeclaration__T__T__s
84419
84570
  var hi = t.hi$2;
84420
84571
  var label = $as_T(x0$1.$$und2__O());
84421
84572
  if ((label !== null)) {
84422
- $this.out$2.puts__T__V(((label + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)));
84573
+ var jsx$1 = $this.out$2;
84574
+ var this$3 = $m_s_math_BigInt$();
84575
+ var n = this$3.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
84576
+ var this$5 = n.bigInteger$3;
84577
+ jsx$1.puts__T__V(((label + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$5)));
84423
84578
  break matchEnd5
84424
84579
  }
84425
84580
  };