kaitai-struct-compiler 0.10.0-SNAPSHOT20220205.181311.1b9e1fdf → 0.10.0-SNAPSHOT20220409.5702.c4cb01b0

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 +1777 -1614
  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-SNAPSHOT20220409.005702.c4cb01b0";
4419
+ this.gitCommit$1 = "c4cb01b0";
4420
+ this.gitTime$1 = "2022-04-09T00:57:02+00:00";
4419
4421
  return this
4420
4422
  });
4421
4423
  var $d_Lio_kaitai_struct_Version$ = new $TypeData().initClass({
@@ -20914,23 +20916,23 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrBytesTerminatedType__L
20914
20916
  return (((((((("NullTerminated(" + subcon) + ", ") + ("term=b'" + termStr)) + "', ") + ("include=" + this.translator$1.doBoolLiteral__Z__T(btt.include$2))) + ", ") + ("consume=" + this.translator$1.doBoolLiteral__Z__T(btt.consume$2))) + ")")
20915
20917
  });
20916
20918
  $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileClass__Lio_kaitai_struct_format_ClassSpec__V = (function(cs) {
20917
- cs.types$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
20919
+ cs.enums$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
20918
20920
  return (function(x0$1$2) {
20919
20921
  var x0$1 = $as_T2(x0$1$2);
20920
20922
  if ((x0$1 !== null)) {
20921
- var typeSpec = $as_Lio_kaitai_struct_format_ClassSpec(x0$1.$$und2__O());
20922
- $this.compileClass__Lio_kaitai_struct_format_ClassSpec__V(typeSpec)
20923
+ var enumSpec = $as_Lio_kaitai_struct_format_EnumSpec(x0$1.$$und2__O());
20924
+ $this.compileEnum__Lio_kaitai_struct_format_EnumSpec__V(enumSpec)
20923
20925
  } else {
20924
20926
  throw new $c_s_MatchError().init___O(x0$1)
20925
20927
  }
20926
20928
  })
20927
20929
  })(this)));
20928
- cs.enums$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2) {
20930
+ cs.types$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2) {
20929
20931
  return (function(x0$2$2) {
20930
20932
  var x0$2 = $as_T2(x0$2$2);
20931
20933
  if ((x0$2 !== null)) {
20932
- var enumSpec = $as_Lio_kaitai_struct_format_EnumSpec(x0$2.$$und2__O());
20933
- this$2.compileEnum__Lio_kaitai_struct_format_EnumSpec__V(enumSpec)
20934
+ var typeSpec = $as_Lio_kaitai_struct_format_ClassSpec(x0$2.$$und2__O());
20935
+ this$2.compileClass__Lio_kaitai_struct_format_ClassSpec__V(typeSpec)
20934
20936
  } else {
20935
20937
  throw new $c_s_MatchError().init___O(x0$2)
20936
20938
  }
@@ -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
  }
@@ -63196,29 +63218,33 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.init___Lio_kaitai_struct
63196
63218
  this.returnRes$2 = $m_s_None$();
63197
63219
  this.IMPORT$undCHARMAP$2 = "golang.org/x/text/encoding/charmap";
63198
63220
  var y = new $c_T2().init___O__O("charmap.CodePage437", this.IMPORT$undCHARMAP$2);
63199
- var jsx$6 = new $c_T2().init___O__O("cp437", y);
63221
+ var jsx$8 = new $c_T2().init___O__O("cp437", y);
63200
63222
  var y$1 = new $c_T2().init___O__O("charmap.ISO8859_1", this.IMPORT$undCHARMAP$2);
63201
- var jsx$5 = new $c_T2().init___O__O("iso8859-1", y$1);
63223
+ var jsx$7 = new $c_T2().init___O__O("iso8859-1", y$1);
63202
63224
  var y$2 = new $c_T2().init___O__O("charmap.ISO8859_2", this.IMPORT$undCHARMAP$2);
63203
- var jsx$4 = new $c_T2().init___O__O("iso8859-2", y$2);
63225
+ var jsx$6 = new $c_T2().init___O__O("iso8859-2", y$2);
63204
63226
  var y$3 = new $c_T2().init___O__O("charmap.ISO8859_3", this.IMPORT$undCHARMAP$2);
63205
- var jsx$3 = new $c_T2().init___O__O("iso8859-3", y$3);
63227
+ var jsx$5 = new $c_T2().init___O__O("iso8859-3", y$3);
63206
63228
  var y$4 = new $c_T2().init___O__O("charmap.ISO8859_4", this.IMPORT$undCHARMAP$2);
63207
- var jsx$2 = new $c_T2().init___O__O("iso8859-4", y$4);
63229
+ var jsx$4 = new $c_T2().init___O__O("iso8859-4", y$4);
63208
63230
  var y$5 = new $c_T2().init___O__O("japanese.ShiftJIS", "golang.org/x/text/encoding/japanese");
63209
- var jsx$1 = new $c_T2().init___O__O("sjis", y$5);
63231
+ var jsx$3 = new $c_T2().init___O__O("sjis", y$5);
63210
63232
  var y$6 = new $c_T2().init___O__O("traditionalchinese.Big5", "golang.org/x/text/encoding/traditionalchinese");
63211
- var array = [jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O("big5", y$6)];
63212
- var this$18 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
63233
+ var jsx$2 = new $c_T2().init___O__O("big5", y$6);
63234
+ var y$7 = new $c_T2().init___O__O("unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM)", "golang.org/x/text/encoding/unicode");
63235
+ var jsx$1 = new $c_T2().init___O__O("utf-16le", y$7);
63236
+ var y$8 = new $c_T2().init___O__O("unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM)", "golang.org/x/text/encoding/unicode");
63237
+ var array = [jsx$8, jsx$7, jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O("utf-16be", y$8)];
63238
+ var this$22 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
63213
63239
  var i = 0;
63214
63240
  var len = $uI(array.length);
63215
63241
  while ((i < len)) {
63216
63242
  var index = i;
63217
63243
  var arg1 = array[index];
63218
- this$18.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
63244
+ this$22.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
63219
63245
  i = ((1 + i) | 0)
63220
63246
  };
63221
- this.ENCODINGS$2 = $as_sci_Map(this$18.elems$1);
63247
+ this.ENCODINGS$2 = $as_sci_Map(this$22.elems$1);
63222
63248
  this.localVarNum$2 = 0;
63223
63249
  return this
63224
63250
  });
@@ -63714,8 +63740,21 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
63714
63740
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp)) {
63715
63741
  var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp(v);
63716
63742
  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)) + ")"))))
63743
+ var inner = x9.operand$1;
63744
+ if ((op !== null)) {
63745
+ if ((inner !== null)) {
63746
+ var opStr = this.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(op);
63747
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Minus$();
63748
+ if (((x === op) && (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum))) {
63749
+ var x4$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(inner);
63750
+ var n$4 = x4$2.n$1;
63751
+ 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()))
63752
+ } else {
63753
+ 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)) + ")"))
63754
+ };
63755
+ return new $c_Lio_kaitai_struct_translators_ResultString().init___T(jsx$1)
63756
+ }
63757
+ }
63719
63758
  };
63720
63759
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare)) {
63721
63760
  var x10 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Compare(v);
@@ -63753,15 +63792,15 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
63753
63792
  } else {
63754
63793
  if ((_1$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
63755
63794
  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)
63795
+ var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
63796
+ var jsx$2 = (x$3 === op$3)
63758
63797
  } else {
63759
- var jsx$1 = false
63798
+ var jsx$2 = false
63760
63799
  }
63761
63800
  } else {
63762
- var jsx$1 = false
63801
+ var jsx$2 = false
63763
63802
  };
63764
- if (jsx$1) {
63803
+ if (jsx$2) {
63765
63804
  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
63805
  } else {
63767
63806
  throw new $c_Lio_kaitai_struct_precompile_TypeMismatchError().init___T(((((("can't do " + _1$1) + " ") + op$3) + " ") + _2$1))
@@ -63791,12 +63830,12 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
63791
63830
  return this.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultString(container, idx)
63792
63831
  };
63793
63832
  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))
63833
+ var x24 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Attribute(v);
63834
+ 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
63835
  };
63797
63836
  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))
63837
+ var x25 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Call(v);
63838
+ 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
63839
  };
63801
63840
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$List)) {
63802
63841
  var x15 = $as_Lio_kaitai_struct_exprlang_Ast$expr$List(v);
@@ -63804,8 +63843,8 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
63804
63843
  return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonArraysAndCast__doGuessArrayLiteral__sc_Seq__O(this, elts))
63805
63844
  };
63806
63845
  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))
63846
+ var x26 = $as_Lio_kaitai_struct_exprlang_Ast$expr$CastToType(v);
63847
+ 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
63848
  };
63810
63849
  if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$ByteSizeOfType)) {
63811
63850
  var x16 = $as_Lio_kaitai_struct_exprlang_Ast$expr$ByteSizeOfType(v);
@@ -65988,378 +66027,6 @@ var $d_Lio_kaitai_struct_translators_CSharpTranslator = new $TypeData().initClas
65988
66027
  });
65989
66028
  $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_CSharpTranslator;
65990
66029
  /** @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
66030
  function $c_Lio_kaitai_struct_translators_JavaScriptTranslator() {
66364
66031
  $c_Lio_kaitai_struct_translators_BaseTranslator.call(this)
66365
66032
  }
@@ -66616,6 +66283,12 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doIntLiteral__s_math_B
66616
66283
  var this$1 = $m_s_math_BigInt$();
66617
66284
  var that = this$1.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
66618
66285
  if ($f_s_math_Ordered__$$greater__O__Z(n, that)) {
66286
+ var that$1 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
66287
+ var jsx$1 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
66288
+ } else {
66289
+ var jsx$1 = false
66290
+ };
66291
+ if (jsx$1) {
66619
66292
  var this$2 = n.bigInteger$3;
66620
66293
  var literal = ("0x" + $m_Ljava_math_Conversion$().bigInteger2String__Ljava_math_BigInteger__I__T(this$2, 16))
66621
66294
  } else {
@@ -66623,15 +66296,15 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doIntLiteral__s_math_B
66623
66296
  var literal = $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$3)
66624
66297
  };
66625
66298
  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
66299
+ var that$2 = this$4.apply__I__s_math_BigInt((-2147483648));
66300
+ if ($f_s_math_Ordered__$$less__O__Z(n, that$2)) {
66301
+ var jsx$2 = true
66629
66302
  } else {
66630
66303
  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)
66304
+ var that$3 = this$5.apply__I__s_math_BigInt(2147483647);
66305
+ var jsx$2 = $f_s_math_Ordered__$$greater__O__Z(n, that$3)
66633
66306
  };
66634
- if (jsx$1) {
66307
+ if (jsx$2) {
66635
66308
  var suffix = "L"
66636
66309
  } else {
66637
66310
  var suffix = ""
@@ -66924,440 +66597,6 @@ var $d_Lio_kaitai_struct_translators_JavaTranslator = new $TypeData().initClass(
66924
66597
  });
66925
66598
  $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_JavaTranslator;
66926
66599
  /** @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
66600
  function $c_Lio_kaitai_struct_translators_NimTranslator() {
67362
66601
  $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
67363
66602
  this.importList$3 = null
@@ -67669,368 +66908,47 @@ var $d_Lio_kaitai_struct_translators_NimTranslator = new $TypeData().initClass({
67669
66908
  });
67670
66909
  $c_Lio_kaitai_struct_translators_NimTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_NimTranslator;
67671
66910
  /** @constructor */
67672
- function $c_Lio_kaitai_struct_translators_PHPTranslator() {
66911
+ function $c_Lio_kaitai_struct_translators_PerlTranslator() {
67673
66912
  $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
67674
- this.asciiCharQuoteMap$3 = null;
67675
- this.namespaceRef$3 = null
66913
+ this.importList$3 = null;
66914
+ this.asciiCharQuoteMap$3 = null
67676
66915
  }
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;
66916
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
66917
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_PerlTranslator;
67679
66918
  /** @constructor */
67680
- function $h_Lio_kaitai_struct_translators_PHPTranslator() {
66919
+ function $h_Lio_kaitai_struct_translators_PerlTranslator() {
67681
66920
  /*<skip>*/
67682
66921
  }
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)) + ")")
66922
+ $h_Lio_kaitai_struct_translators_PerlTranslator.prototype = $c_Lio_kaitai_struct_translators_PerlTranslator.prototype;
66923
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
66924
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
66925
+ if ((baseStr === "8")) {
66926
+ return (("oct(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
66927
+ } else if ((baseStr === "10")) {
66928
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
66929
+ } else if ((baseStr === "16")) {
66930
+ return (("hex(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
66931
+ } else {
66932
+ throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
66933
+ }
67686
66934
  });
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)
66935
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
66936
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
67689
66937
  });
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)) + ")")
66938
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
66939
+ return (("scalar(@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + "})")
67692
66940
  });
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) {
66941
+ $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
66942
  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
66943
  });
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)
66944
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
66945
+ return (("scalar(reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + "))")
67698
66946
  });
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)) + ")")
66947
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
66948
+ return this.doByteArrayNonLiteral__sc_Seq__T(elts)
67701
66949
  });
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)
66950
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
66951
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
68034
66952
  });
68035
66953
  $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
68036
66954
  return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
@@ -68038,6 +66956,9 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.floatToInt__Lio_kaitai
68038
66956
  $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
68039
66957
  return (("@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + "}[-1]")
68040
66958
  });
66959
+ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
66960
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
66961
+ });
68041
66962
  $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
68042
66963
  return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
68043
66964
  });
@@ -68116,7 +67037,7 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doArrayLiteral__Lio_ka
68116
67037
  })
68117
67038
  })(this));
68118
67039
  var this$1 = $m_sc_Seq$();
68119
- return (("(" + $as_sc_TraversableOnce(value.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + ")")
67040
+ return (("[" + $as_sc_TraversableOnce(value.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "]")
68120
67041
  });
68121
67042
  $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
68122
67043
  return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
@@ -70691,375 +69612,1578 @@ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productElement__I__O = (fu
70691
69612
  return this.precompute$3;
70692
69613
  break
70693
69614
  }
70694
- default: {
70695
- throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
70696
- }
70697
- }
69615
+ default: {
69616
+ throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
69617
+ }
69618
+ }
69619
+ });
69620
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.init___T__F1__I__Z__Lfastparse_utils_ElemSetHelper__Lfastparse_utils_ReprOps = (function(name, predicate, min, precompute, helper, repr) {
69621
+ this.name$3 = name;
69622
+ this.predicate$3 = predicate;
69623
+ this.min$3 = min;
69624
+ this.precompute$3 = precompute;
69625
+ $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);
69626
+ return this
69627
+ });
69628
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.toString__T = (function() {
69629
+ 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]))
69630
+ });
69631
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.hashCode__I = (function() {
69632
+ var acc = (-889275714);
69633
+ acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.name$3));
69634
+ acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.predicate$3));
69635
+ acc = $m_sr_Statics$().mix__I__I__I(acc, this.min$3);
69636
+ acc = $m_sr_Statics$().mix__I__I__I(acc, (this.precompute$3 ? 1231 : 1237));
69637
+ return $m_sr_Statics$().finalizeHash__I__I__I(acc, 4)
69638
+ });
69639
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.parseRec__Lfastparse_core_ParseCtx__I__Lfastparse_core_Mutable = (function(cfg, index) {
69640
+ return $f_Lfastparse_parsers_Intrinsics$WhileParser__parseRec__Lfastparse_core_ParseCtx__I__Lfastparse_core_Mutable(this, cfg, index)
69641
+ });
69642
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productIterator__sc_Iterator = (function() {
69643
+ return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
69644
+ });
69645
+ function $as_Lfastparse_parsers_Intrinsics$ElemsWhile(obj) {
69646
+ return (((obj instanceof $c_Lfastparse_parsers_Intrinsics$ElemsWhile) || (obj === null)) ? obj : $throwClassCastException(obj, "fastparse.parsers.Intrinsics$ElemsWhile"))
69647
+ }
69648
+ function $isArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) {
69649
+ return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lfastparse_parsers_Intrinsics$ElemsWhile)))
69650
+ }
69651
+ function $asArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) {
69652
+ return (($isArrayOf_Lfastparse_parsers_Intrinsics$ElemsWhile(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lfastparse.parsers.Intrinsics$ElemsWhile;", depth))
69653
+ }
69654
+ var $d_Lfastparse_parsers_Intrinsics$ElemsWhile = new $TypeData().initClass({
69655
+ Lfastparse_parsers_Intrinsics$ElemsWhile: 0
69656
+ }, false, "fastparse.parsers.Intrinsics$ElemsWhile", {
69657
+ Lfastparse_parsers_Intrinsics$ElemsWhile: 1,
69658
+ Lfastparse_parsers_Intrinsics$PrecomputableParser: 1,
69659
+ Lfastparse_core_Parser: 1,
69660
+ O: 1,
69661
+ Lfastparse_core_ParserResults: 1,
69662
+ Lfastparse_core_Precedence: 1,
69663
+ Lfastparse_parsers_Intrinsics$WhileParser: 1,
69664
+ s_Product: 1,
69665
+ s_Equals: 1,
69666
+ s_Serializable: 1,
69667
+ Ljava_io_Serializable: 1
69668
+ });
69669
+ $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.$classData = $d_Lfastparse_parsers_Intrinsics$ElemsWhile;
69670
+ /** @constructor */
69671
+ function $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes() {
69672
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.call(this);
69673
+ this.$$undargs$4 = null;
69674
+ this.bytes$4 = null;
69675
+ this.process$4 = null
69676
+ }
69677
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype = new $h_Lio_kaitai_struct_datatype_DataType$UserType();
69678
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes;
69679
+ /** @constructor */
69680
+ function $h_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes() {
69681
+ /*<skip>*/
69682
+ }
69683
+ $h_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype = $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype;
69684
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productPrefix__T = (function() {
69685
+ return "CalcUserTypeFromBytes"
69686
+ });
69687
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productArity__I = (function() {
69688
+ return 5
69689
+ });
69690
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.equals__O__Z = (function(x$1) {
69691
+ if ((this === x$1)) {
69692
+ return true
69693
+ } else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)) {
69694
+ var CalcUserTypeFromBytes$1 = $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(x$1);
69695
+ var x = this.name$3;
69696
+ var x$2 = CalcUserTypeFromBytes$1.name$3;
69697
+ if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
69698
+ var x$3 = this.forcedParent$3;
69699
+ var x$4 = CalcUserTypeFromBytes$1.forcedParent$3;
69700
+ var jsx$3 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
69701
+ } else {
69702
+ var jsx$3 = false
69703
+ };
69704
+ if (jsx$3) {
69705
+ var x$5 = this.$$undargs$4;
69706
+ var x$6 = CalcUserTypeFromBytes$1.$$undargs$4;
69707
+ var jsx$2 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
69708
+ } else {
69709
+ var jsx$2 = false
69710
+ };
69711
+ if (jsx$2) {
69712
+ var x$7 = this.bytes$4;
69713
+ var x$8 = CalcUserTypeFromBytes$1.bytes$4;
69714
+ var jsx$1 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
69715
+ } else {
69716
+ var jsx$1 = false
69717
+ };
69718
+ if (jsx$1) {
69719
+ var x$9 = this.process$4;
69720
+ var x$10 = CalcUserTypeFromBytes$1.process$4;
69721
+ return ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
69722
+ } else {
69723
+ return false
69724
+ }
69725
+ } else {
69726
+ return false
69727
+ }
69728
+ });
69729
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productElement__I__O = (function(x$1) {
69730
+ switch (x$1) {
69731
+ case 0: {
69732
+ return this.name$3;
69733
+ break
69734
+ }
69735
+ case 1: {
69736
+ return this.forcedParent$3;
69737
+ break
69738
+ }
69739
+ case 2: {
69740
+ return this.$$undargs$4;
69741
+ break
69742
+ }
69743
+ case 3: {
69744
+ return this.bytes$4;
69745
+ break
69746
+ }
69747
+ case 4: {
69748
+ return this.process$4;
69749
+ break
69750
+ }
69751
+ default: {
69752
+ throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
69753
+ }
69754
+ }
69755
+ });
69756
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.toString__T = (function() {
69757
+ return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
69758
+ });
69759
+ $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) {
69760
+ this.$$undargs$4 = _args;
69761
+ this.bytes$4 = bytes;
69762
+ this.process$4 = process;
69763
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.init___sci_List__s_Option__sc_Seq.call(this, _name, _forcedParent, _args);
69764
+ return this
69765
+ });
69766
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.isOwning__Z = (function() {
69767
+ return false
69768
+ });
69769
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.hashCode__I = (function() {
69770
+ var this$2 = $m_s_util_hashing_MurmurHash3$();
69771
+ return this$2.productHash__s_Product__I__I(this, (-889275714))
69772
+ });
69773
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productIterator__sc_Iterator = (function() {
69774
+ return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
69775
+ });
69776
+ function $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj) {
69777
+ return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes"))
69778
+ }
69779
+ function $isArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) {
69780
+ return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)))
69781
+ }
69782
+ function $asArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) {
69783
+ return (($isArrayOf_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes;", depth))
69784
+ }
69785
+ var $d_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes = new $TypeData().initClass({
69786
+ Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes: 0
69787
+ }, false, "io.kaitai.struct.datatype.DataType$CalcUserTypeFromBytes", {
69788
+ Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes: 1,
69789
+ Lio_kaitai_struct_datatype_DataType$UserType: 1,
69790
+ Lio_kaitai_struct_datatype_DataType$StructType: 1,
69791
+ Lio_kaitai_struct_datatype_DataType$ComplexDataType: 1,
69792
+ O: 1,
69793
+ Lio_kaitai_struct_datatype_DataType: 1,
69794
+ Lio_kaitai_struct_datatype_DataType$Processing: 1,
69795
+ s_Product: 1,
69796
+ s_Equals: 1,
69797
+ s_Serializable: 1,
69798
+ Ljava_io_Serializable: 1
69799
+ });
69800
+ $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes;
69801
+ /** @constructor */
69802
+ function $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes() {
69803
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.call(this);
69804
+ this.$$undargs$4 = null;
69805
+ this.bytes$4 = null;
69806
+ this.process$4 = null
69807
+ }
69808
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype = new $h_Lio_kaitai_struct_datatype_DataType$UserType();
69809
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes;
69810
+ /** @constructor */
69811
+ function $h_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes() {
69812
+ /*<skip>*/
69813
+ }
69814
+ $h_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype = $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype;
69815
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productPrefix__T = (function() {
69816
+ return "UserTypeFromBytes"
69817
+ });
69818
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productArity__I = (function() {
69819
+ return 5
69820
+ });
69821
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.asNonOwning__Lio_kaitai_struct_datatype_DataType = (function() {
69822
+ return this.asNonOwning__Lio_kaitai_struct_datatype_DataType$UserType()
69823
+ });
69824
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.equals__O__Z = (function(x$1) {
69825
+ if ((this === x$1)) {
69826
+ return true
69827
+ } else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
69828
+ var UserTypeFromBytes$1 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(x$1);
69829
+ var x = this.name$3;
69830
+ var x$2 = UserTypeFromBytes$1.name$3;
69831
+ if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
69832
+ var x$3 = this.forcedParent$3;
69833
+ var x$4 = UserTypeFromBytes$1.forcedParent$3;
69834
+ var jsx$3 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
69835
+ } else {
69836
+ var jsx$3 = false
69837
+ };
69838
+ if (jsx$3) {
69839
+ var x$5 = this.$$undargs$4;
69840
+ var x$6 = UserTypeFromBytes$1.$$undargs$4;
69841
+ var jsx$2 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
69842
+ } else {
69843
+ var jsx$2 = false
69844
+ };
69845
+ if (jsx$2) {
69846
+ var x$7 = this.bytes$4;
69847
+ var x$8 = UserTypeFromBytes$1.bytes$4;
69848
+ var jsx$1 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
69849
+ } else {
69850
+ var jsx$1 = false
69851
+ };
69852
+ if (jsx$1) {
69853
+ var x$9 = this.process$4;
69854
+ var x$10 = UserTypeFromBytes$1.process$4;
69855
+ return ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
69856
+ } else {
69857
+ return false
69858
+ }
69859
+ } else {
69860
+ return false
69861
+ }
69862
+ });
69863
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.asNonOwning__Lio_kaitai_struct_datatype_DataType$UserType = (function() {
69864
+ 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);
69865
+ r.classSpec$3 = this.classSpec$3;
69866
+ return r
69867
+ });
69868
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productElement__I__O = (function(x$1) {
69869
+ switch (x$1) {
69870
+ case 0: {
69871
+ return this.name$3;
69872
+ break
69873
+ }
69874
+ case 1: {
69875
+ return this.forcedParent$3;
69876
+ break
69877
+ }
69878
+ case 2: {
69879
+ return this.$$undargs$4;
69880
+ break
69881
+ }
69882
+ case 3: {
69883
+ return this.bytes$4;
69884
+ break
69885
+ }
69886
+ case 4: {
69887
+ return this.process$4;
69888
+ break
69889
+ }
69890
+ default: {
69891
+ throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
69892
+ }
69893
+ }
69894
+ });
69895
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.toString__T = (function() {
69896
+ return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
69897
+ });
69898
+ $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) {
69899
+ this.$$undargs$4 = _args;
69900
+ this.bytes$4 = bytes;
69901
+ this.process$4 = process;
69902
+ $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.init___sci_List__s_Option__sc_Seq.call(this, _name, _forcedParent, _args);
69903
+ return this
69904
+ });
69905
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.isOwning__Z = (function() {
69906
+ return true
69907
+ });
69908
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.hashCode__I = (function() {
69909
+ var this$2 = $m_s_util_hashing_MurmurHash3$();
69910
+ return this$2.productHash__s_Product__I__I(this, (-889275714))
69911
+ });
69912
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productIterator__sc_Iterator = (function() {
69913
+ return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
69914
+ });
69915
+ function $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj) {
69916
+ return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$UserTypeFromBytes"))
69917
+ }
69918
+ function $isArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) {
69919
+ return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)))
69920
+ }
69921
+ function $asArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) {
69922
+ return (($isArrayOf_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.datatype.DataType$UserTypeFromBytes;", depth))
69923
+ }
69924
+ var $d_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes = new $TypeData().initClass({
69925
+ Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes: 0
69926
+ }, false, "io.kaitai.struct.datatype.DataType$UserTypeFromBytes", {
69927
+ Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes: 1,
69928
+ Lio_kaitai_struct_datatype_DataType$UserType: 1,
69929
+ Lio_kaitai_struct_datatype_DataType$StructType: 1,
69930
+ Lio_kaitai_struct_datatype_DataType$ComplexDataType: 1,
69931
+ O: 1,
69932
+ Lio_kaitai_struct_datatype_DataType: 1,
69933
+ Lio_kaitai_struct_datatype_DataType$Processing: 1,
69934
+ s_Product: 1,
69935
+ s_Equals: 1,
69936
+ s_Serializable: 1,
69937
+ Ljava_io_Serializable: 1
69938
+ });
69939
+ $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes;
69940
+ /** @constructor */
69941
+ function $c_Lio_kaitai_struct_translators_ConstructTranslator() {
69942
+ $c_Lio_kaitai_struct_translators_PythonTranslator.call(this)
69943
+ }
69944
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype = new $h_Lio_kaitai_struct_translators_PythonTranslator();
69945
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_ConstructTranslator;
69946
+ /** @constructor */
69947
+ function $h_Lio_kaitai_struct_translators_ConstructTranslator() {
69948
+ /*<skip>*/
69949
+ }
69950
+ $h_Lio_kaitai_struct_translators_ConstructTranslator.prototype = $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype;
69951
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
69952
+ return (("stream_tell(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
69953
+ });
69954
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
69955
+ return this.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
69956
+ });
69957
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
69958
+ return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
69959
+ });
69960
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doLocalName__T__T = (function(s) {
69961
+ 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))))))
69962
+ });
69963
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
69964
+ return (("stream_size(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
69965
+ });
69966
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
69967
+ return (("stream_iseof(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
69968
+ });
69969
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doName__T__T = (function(s) {
69970
+ return (($m_Lio_kaitai_struct_format_Identifier$().PARENT$1 === s) ? "_" : s)
69971
+ });
69972
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
69973
+ return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
69974
+ });
69975
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList = (function(provider, importList) {
69976
+ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList.call(this, provider, importList);
69977
+ return this
69978
+ });
69979
+ var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initClass({
69980
+ Lio_kaitai_struct_translators_ConstructTranslator: 0
69981
+ }, false, "io.kaitai.struct.translators.ConstructTranslator", {
69982
+ Lio_kaitai_struct_translators_ConstructTranslator: 1,
69983
+ Lio_kaitai_struct_translators_PythonTranslator: 1,
69984
+ Lio_kaitai_struct_translators_BaseTranslator: 1,
69985
+ Lio_kaitai_struct_translators_TypeDetector: 1,
69986
+ O: 1,
69987
+ Lio_kaitai_struct_translators_AbstractTranslator: 1,
69988
+ Lio_kaitai_struct_translators_CommonLiterals: 1,
69989
+ Lio_kaitai_struct_translators_CommonOps: 1,
69990
+ Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
69991
+ Lio_kaitai_struct_translators_CommonMethods: 1,
69992
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
69993
+ });
69994
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_ConstructTranslator;
69995
+ /** @constructor */
69996
+ function $c_Lio_kaitai_struct_translators_CppTranslator() {
69997
+ $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
69998
+ this.importListSrc$3 = null;
69999
+ this.importListHdr$3 = null;
70000
+ this.config$3 = null;
70001
+ this.CHARSET$undUTF8$3 = null;
70002
+ this.asciiCharQuoteMap$3 = null
70003
+ }
70004
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
70005
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_CppTranslator;
70006
+ /** @constructor */
70007
+ function $h_Lio_kaitai_struct_translators_CppTranslator() {
70008
+ /*<skip>*/
70009
+ }
70010
+ $h_Lio_kaitai_struct_translators_CppTranslator.prototype = $c_Lio_kaitai_struct_translators_CppTranslator.prototype;
70011
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
70012
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70013
+ return ((("std::stoi(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ((baseStr === "10") ? "" : (", 0, " + baseStr))) + ")")
70014
+ });
70015
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70016
+ return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70017
+ });
70018
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
70019
+ var this$1 = $m_s_math_BigInt$();
70020
+ var that = this$1.apply__I__s_math_BigInt((-2147483647));
70021
+ if ($f_s_math_Ordered__$$greater$eq__O__Z(n, that)) {
70022
+ var this$2 = $m_s_math_BigInt$();
70023
+ var that$1 = this$2.apply__I__s_math_BigInt(2147483647);
70024
+ var jsx$1 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
70025
+ } else {
70026
+ var jsx$1 = false
70027
+ };
70028
+ if (jsx$1) {
70029
+ var suffixOpt = new $c_s_Some().init___O("")
70030
+ } else {
70031
+ var this$3 = $m_s_math_BigInt$();
70032
+ var that$2 = this$3.apply__I__s_math_BigInt(2147483647);
70033
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that$2)) {
70034
+ var that$3 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT32$1;
70035
+ var jsx$2 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$3)
70036
+ } else {
70037
+ var jsx$2 = false
70038
+ };
70039
+ if (jsx$2) {
70040
+ var suffixOpt = new $c_s_Some().init___O("UL")
70041
+ } else {
70042
+ var this$4 = $m_s_math_BigInt$();
70043
+ var that$4 = this$4.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(1, (-2147483648)));
70044
+ if ($f_s_math_Ordered__$$greater$eq__O__Z(n, that$4)) {
70045
+ var this$5 = $m_s_math_BigInt$();
70046
+ var that$5 = this$5.apply__I__s_math_BigInt((-2147483648));
70047
+ var jsx$4 = $f_s_math_Ordered__$$less__O__Z(n, that$5)
70048
+ } else {
70049
+ var jsx$4 = false
70050
+ };
70051
+ if (jsx$4) {
70052
+ var jsx$3 = true
70053
+ } else {
70054
+ var that$6 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT32$1;
70055
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that$6)) {
70056
+ var this$6 = $m_s_math_BigInt$();
70057
+ var that$7 = this$6.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
70058
+ var jsx$3 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$7)
70059
+ } else {
70060
+ var jsx$3 = false
70061
+ }
70062
+ };
70063
+ if (jsx$3) {
70064
+ var suffixOpt = new $c_s_Some().init___O("LL")
70065
+ } else {
70066
+ var this$7 = $m_s_math_BigInt$();
70067
+ var that$8 = this$7.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
70068
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that$8)) {
70069
+ var that$9 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
70070
+ var jsx$5 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$9)
70071
+ } else {
70072
+ var jsx$5 = false
70073
+ };
70074
+ if (jsx$5) {
70075
+ var suffixOpt = new $c_s_Some().init___O("ULL")
70076
+ } else {
70077
+ var suffixOpt = $m_s_None$()
70078
+ }
70079
+ }
70080
+ }
70081
+ };
70082
+ if ((suffixOpt instanceof $c_s_Some)) {
70083
+ var x2 = $as_s_Some(suffixOpt);
70084
+ var suffix = $as_T(x2.value$2);
70085
+ return (("" + n) + suffix)
70086
+ } else {
70087
+ var x = $m_s_None$();
70088
+ if ((x === suffixOpt)) {
70089
+ return $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_math_BigInt__T(this, n)
70090
+ } else {
70091
+ throw new $c_s_MatchError().init___O(suffixOpt)
70092
+ }
70093
+ }
70094
+ });
70095
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70096
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->size()")
70097
+ });
70098
+ $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) {
70099
+ 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)
70100
+ });
70101
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70102
+ return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70103
+ });
70104
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70105
+ return (("kaitai::kstream::reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70106
+ });
70107
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70108
+ return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70109
+ });
70110
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70111
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70112
+ });
70113
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70114
+ return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70115
+ });
70116
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70117
+ var x1 = this.config$3.cppConfig$1.stdStringFrontBack$1;
70118
+ if ((x1 === true)) {
70119
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".front()")
70120
+ } else if ((x1 === false)) {
70121
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + "[0]")
70122
+ } else {
70123
+ throw new $c_s_MatchError().init___O(x1)
70124
+ }
70125
+ });
70126
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__O = (function(value, typeName) {
70127
+ return this.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
70128
+ });
70129
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70130
+ return this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70131
+ });
70132
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70133
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->back()")
70134
+ });
70135
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70136
+ return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70137
+ });
70138
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70139
+ this.importListSrc$3.addSystem__T__V("algorithm");
70140
+ var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70141
+ return (((("*std::min_element(" + v) + "->begin(), ") + v) + "->end())")
70142
+ });
70143
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70144
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "->front()")
70145
+ });
70146
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
70147
+ return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
70148
+ });
70149
+ $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) {
70150
+ 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)) + "))")
70151
+ });
70152
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
70153
+ return this.asciiCharQuoteMap$3
70154
+ });
70155
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
70156
+ return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
70157
+ });
70158
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T = (function(t, values) {
70159
+ if (this.config$3.cppConfig$1.useListInitializers$1) {
70160
+ this.importListHdr$3.addSystem__T__V("vector");
70161
+ 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);
70162
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
70163
+ return (function(value$2) {
70164
+ var value = $as_Lio_kaitai_struct_exprlang_Ast$expr(value$2);
70165
+ return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70166
+ })
70167
+ })(this));
70168
+ var this$1 = $m_sc_Seq$();
70169
+ var rawInit = (((("new std::vector<" + cppElType) + ">{") + $as_sc_TraversableOnce(values.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "}");
70170
+ var x1 = this.config$3.cppConfig$1.pointers$1;
70171
+ var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
70172
+ if ((x === x1)) {
70173
+ return rawInit
70174
+ } else {
70175
+ var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
70176
+ if ((x$3 === x1)) {
70177
+ return (((("std::unique_ptr<std::vector<" + cppElType) + ">>(") + rawInit) + ")")
70178
+ } else {
70179
+ throw new $c_s_MatchError().init___O(x1)
70180
+ }
70181
+ }
70182
+ } else {
70183
+ throw $m_sjsr_package$().unwrapJavaScriptException__jl_Throwable__O(new $c_jl_RuntimeException().init___T("C++ literal arrays are not implemented yet"))
70184
+ }
70185
+ });
70186
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70187
+ return (("((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ") ? 1 : 0)")
70188
+ });
70189
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70190
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "->at(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + ")")
70191
+ });
70192
+ $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) {
70193
+ 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)) + "))")
70194
+ });
70195
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
70196
+ 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)) + ")")
70197
+ });
70198
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70199
+ var x1 = this.config$3.cppConfig$1.stdStringFrontBack$1;
70200
+ if ((x1 === true)) {
70201
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".back()")
70202
+ } else if ((x1 === false)) {
70203
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ".length() - 1]")
70204
+ } else {
70205
+ throw new $c_s_MatchError().init___O(x1)
70206
+ }
70207
+ });
70208
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70209
+ return (("kaitai::kstream::byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70210
+ });
70211
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70212
+ return (("static_cast<int>(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
70213
+ });
70214
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70215
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s) + ".length()")
70216
+ });
70217
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
70218
+ var x1 = this.config$3.cppConfig$1.pointers$1;
70219
+ var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
70220
+ if ((x === x1)) {
70221
+ var jsx$1 = true
70222
+ } else {
70223
+ var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
70224
+ var jsx$1 = (x$3 === x1)
70225
+ };
70226
+ if (jsx$1) {
70227
+ return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
70228
+ } else {
70229
+ var x$5 = $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$();
70230
+ if ((x$5 === x1)) {
70231
+ if ((typeName instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
70232
+ var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(typeName);
70233
+ 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)) + ")")
70234
+ } else {
70235
+ return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
70236
+ }
70237
+ } else {
70238
+ throw new $c_s_MatchError().init___O(x1)
70239
+ }
70240
+ }
70241
+ });
70242
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
70243
+ return this.doByteArrayLiteral__sc_Seq__T(arr)
70244
+ });
70245
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70246
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + ".length()")
70247
+ });
70248
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70249
+ this.importListSrc$3.addSystem__T__V("algorithm");
70250
+ var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70251
+ return (((("*std::max_element(" + v) + "->begin(), ") + v) + "->end())")
70252
+ });
70253
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70254
+ return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70255
+ });
70256
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
70257
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70258
+ if ((baseStr === "10")) {
70259
+ return (("kaitai::kstream::to_string(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")")
70260
+ } else {
70261
+ throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
70262
+ }
70263
+ });
70264
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70265
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
70266
+ });
70267
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doName__T__T = (function(s) {
70268
+ 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 + "()"))))
70269
+ });
70270
+ $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) {
70271
+ this.importListSrc$3 = importListSrc;
70272
+ this.importListHdr$3 = importListHdr;
70273
+ this.config$3 = config;
70274
+ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
70275
+ this.CHARSET$undUTF8$3 = $m_Ljava_nio_charset_Charset$().forName__T__Ljava_nio_charset_Charset("UTF-8");
70276
+ var self = new $c_jl_Character().init___C(9);
70277
+ var jsx$8 = new $c_T2().init___O__O(self, "\\t");
70278
+ var self$1 = new $c_jl_Character().init___C(10);
70279
+ var jsx$7 = new $c_T2().init___O__O(self$1, "\\n");
70280
+ var self$2 = new $c_jl_Character().init___C(13);
70281
+ var jsx$6 = new $c_T2().init___O__O(self$2, "\\r");
70282
+ var self$3 = new $c_jl_Character().init___C(34);
70283
+ var jsx$5 = new $c_T2().init___O__O(self$3, "\\\"");
70284
+ var self$4 = new $c_jl_Character().init___C(92);
70285
+ var jsx$4 = new $c_T2().init___O__O(self$4, "\\\\");
70286
+ var self$5 = new $c_jl_Character().init___C(7);
70287
+ var jsx$3 = new $c_T2().init___O__O(self$5, "\\a");
70288
+ var self$6 = new $c_jl_Character().init___C(12);
70289
+ var jsx$2 = new $c_T2().init___O__O(self$6, "\\f");
70290
+ var self$7 = new $c_jl_Character().init___C(11);
70291
+ var jsx$1 = new $c_T2().init___O__O(self$7, "\\v");
70292
+ var self$8 = new $c_jl_Character().init___C(8);
70293
+ 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")];
70294
+ var this$40 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
70295
+ var i = 0;
70296
+ var len = $uI(array.length);
70297
+ while ((i < len)) {
70298
+ var index = i;
70299
+ var arg1 = array[index];
70300
+ this$40.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
70301
+ i = ((1 + i) | 0)
70302
+ };
70303
+ this.asciiCharQuoteMap$3 = $as_sci_Map(this$40.elems$1);
70304
+ return this
70305
+ });
70306
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
70307
+ return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
70308
+ });
70309
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
70310
+ return (((("kaitai::kstream::bytes_to_str(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
70311
+ });
70312
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
70313
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70314
+ });
70315
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
70316
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + "->") + this.doName__T__T(attrName))
70317
+ });
70318
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70319
+ return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70320
+ });
70321
+ $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) {
70322
+ var x$2 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
70323
+ if (((op !== null) && (op === x$2))) {
70324
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " == (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
70325
+ } else {
70326
+ var x$4 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
70327
+ if (((op !== null) && (op === x$4))) {
70328
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " != ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
70329
+ } else {
70330
+ 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)")
70331
+ }
70332
+ }
70333
+ });
70334
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70335
+ return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70336
+ });
70337
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
70338
+ return (((("std::string(\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\", ") + arr.length__I()) + ")")
70339
+ });
70340
+ $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) {
70341
+ var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
70342
+ var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
70343
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70344
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70345
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
70346
+ var jsx$1 = (x === op)
70347
+ } else {
70348
+ var jsx$1 = false
70349
+ }
70350
+ } else {
70351
+ var jsx$1 = false
70352
+ };
70353
+ if (jsx$1) {
70354
+ return (((("kaitai::kstream::mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
70355
+ } else {
70356
+ 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)
70357
+ }
70358
+ });
70359
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70360
+ return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70361
+ });
70362
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
70363
+ return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
70364
+ });
70365
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70366
+ return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70367
+ });
70368
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70369
+ return (("kaitai::kstream::byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70370
+ });
70371
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70372
+ return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70373
+ });
70374
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumType, label) {
70375
+ 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)));
70376
+ $m_Lio_kaitai_struct_Utils$();
70377
+ var s = (($as_T($f_sc_LinearSeqOptimized__last__O(enumType)) + "_") + label);
70378
+ return ((jsx$1 + "::") + $as_T(s.toUpperCase()))
70379
+ });
70380
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70381
+ return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70382
+ });
70383
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumById__sci_List__T__T = (function(enumType, id) {
70384
+ return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(enumType)) + ">(") + id) + ")")
70385
+ });
70386
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doStringLiteral__T__T = (function(s) {
70387
+ var lenSuffix = (($uI(s.indexOf("\u0000")) !== (-1)) ? (", " + $m_sjsr_RuntimeString$().getBytes__T__Ljava_nio_charset_Charset__AB(s, this.CHARSET$undUTF8$3).u.length) : "");
70388
+ return ((("std::string(" + $f_Lio_kaitai_struct_translators_CommonLiterals__doStringLiteral__T__T(this, s)) + lenSuffix) + ")")
70389
+ });
70390
+ var $d_Lio_kaitai_struct_translators_CppTranslator = new $TypeData().initClass({
70391
+ Lio_kaitai_struct_translators_CppTranslator: 0
70392
+ }, false, "io.kaitai.struct.translators.CppTranslator", {
70393
+ Lio_kaitai_struct_translators_CppTranslator: 1,
70394
+ Lio_kaitai_struct_translators_BaseTranslator: 1,
70395
+ Lio_kaitai_struct_translators_TypeDetector: 1,
70396
+ O: 1,
70397
+ Lio_kaitai_struct_translators_AbstractTranslator: 1,
70398
+ Lio_kaitai_struct_translators_CommonLiterals: 1,
70399
+ Lio_kaitai_struct_translators_CommonOps: 1,
70400
+ Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
70401
+ Lio_kaitai_struct_translators_CommonMethods: 1,
70402
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1,
70403
+ Lio_kaitai_struct_translators_MinSignedIntegers: 1
70404
+ });
70405
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_CppTranslator;
70406
+ /** @constructor */
70407
+ function $c_Lio_kaitai_struct_translators_LuaTranslator() {
70408
+ $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
70409
+ this.importList$3 = null;
70410
+ this.asciiCharQuoteMap$3 = null
70411
+ }
70412
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
70413
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_LuaTranslator;
70414
+ /** @constructor */
70415
+ function $h_Lio_kaitai_struct_translators_LuaTranslator() {
70416
+ /*<skip>*/
70417
+ }
70418
+ $h_Lio_kaitai_struct_translators_LuaTranslator.prototype = $c_Lio_kaitai_struct_translators_LuaTranslator.prototype;
70419
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
70420
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70421
+ var add = ((baseStr === "10") ? "" : (", " + baseStr));
70422
+ return ((("tonumber(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + add) + ")")
70423
+ });
70424
+ $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) {
70425
+ var f = (function($this) {
70426
+ return (function(n$2) {
70427
+ var n = $uZ(n$2);
70428
+ return (n ? "1" : "0")
70429
+ })
70430
+ })(this);
70431
+ if ((left instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70432
+ var x4 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(left);
70433
+ var l = x4.n$1;
70434
+ if ((right instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70435
+ var x5 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(right);
70436
+ var r = x5.n$1;
70437
+ return ((((f(l) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + f(r))
70438
+ }
70439
+ };
70440
+ if ((left instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70441
+ var x7 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(left);
70442
+ var l$2 = x7.n$1;
70443
+ return ((((f(l$2) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
70444
+ };
70445
+ if ((right instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
70446
+ var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(right);
70447
+ var r$3 = x9.n$1;
70448
+ return ((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " ") + this.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + f(r$3))
70449
+ };
70450
+ 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)
70451
+ });
70452
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70453
+ return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70454
+ });
70455
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
70456
+ var this$1 = $m_s_math_BigInt$();
70457
+ var that = this$1.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I((-1), 2147483647));
70458
+ if ($f_s_math_Ordered__$$greater__O__Z(n, that)) {
70459
+ var that$1 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
70460
+ var jsx$1 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
70461
+ } else {
70462
+ var jsx$1 = false
70463
+ };
70464
+ if (jsx$1) {
70465
+ var this$2 = n.bigInteger$3;
70466
+ return ("0x" + $m_Ljava_math_Conversion$().bigInteger2String__Ljava_math_BigInteger__I__T(this$2, 16))
70467
+ } else {
70468
+ return $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_math_BigInt__T(this, n)
70469
+ }
70470
+ });
70471
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
70472
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v) + ".value")
70473
+ });
70474
+ $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) {
70475
+ 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)
70476
+ });
70477
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70478
+ return ("#" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a))
70479
+ });
70480
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70481
+ return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70482
+ });
70483
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70484
+ return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70485
+ });
70486
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70487
+ return (("string.reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70488
+ });
70489
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70490
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70491
+ });
70492
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
70493
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":pos()")
70494
+ });
70495
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70496
+ return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70497
+ });
70498
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70499
+ return (("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ", 1)")
70500
+ });
70501
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70502
+ var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70503
+ return (((table + "[#") + table) + "]")
70504
+ });
70505
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70506
+ return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70507
+ });
70508
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70509
+ return this.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70510
+ });
70511
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLiteralUnicode__C__T = (function(code) {
70512
+ var this$4 = new $c_sci_StringOps().init___T("\\u{%04x}");
70513
+ var array = [code];
70514
+ var jsx$2 = $m_sjsr_RuntimeString$();
70515
+ var $$this = this$4.repr$1;
70516
+ $m_sc_Seq$();
70517
+ $m_sjs_js_WrappedArray$();
70518
+ var array$1 = [];
70519
+ var x1 = $uI(array.length);
70520
+ switch (x1) {
70521
+ case (-1): {
70522
+ break
70523
+ }
70524
+ };
70525
+ var i = 0;
70526
+ var len = $uI(array.length);
70527
+ while ((i < len)) {
70528
+ var index = i;
70529
+ var arg1 = array[index];
70530
+ var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
70531
+ array$1.push(elem);
70532
+ i = ((1 + i) | 0)
70533
+ };
70534
+ $m_s_reflect_ManifestFactory$ObjectManifest$();
70535
+ var len$1 = $uI(array$1.length);
70536
+ var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
70537
+ var len$2 = result.u.length;
70538
+ var i$1 = 0;
70539
+ var j = 0;
70540
+ var x = $uI(array$1.length);
70541
+ var x$1 = ((x < len$2) ? x : len$2);
70542
+ var that = result.u.length;
70543
+ var end = ((x$1 < that) ? x$1 : that);
70544
+ while ((i$1 < end)) {
70545
+ var jsx$1 = j;
70546
+ var index$1 = i$1;
70547
+ result.set(jsx$1, array$1[index$1]);
70548
+ i$1 = ((1 + i$1) | 0);
70549
+ j = ((1 + j) | 0)
70550
+ };
70551
+ return jsx$2.format__T__AO__T($$this, result)
70552
+ });
70553
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doBoolLiteral__Z__T = (function(n) {
70554
+ return (n ? "true" : "false")
70555
+ });
70556
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70557
+ var this$1 = this.importList$3;
70558
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70559
+ return (("utils.array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70560
+ });
70561
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70562
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "[1]")
70563
+ });
70564
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
70565
+ return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
70566
+ });
70567
+ $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) {
70568
+ var this$1 = this.importList$3;
70569
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70570
+ 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)) + "))")
70571
+ });
70572
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
70573
+ return this.asciiCharQuoteMap$3
70574
+ });
70575
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.binOp__Lio_kaitai_struct_exprlang_Ast$operator__T = (function(op) {
70576
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitXor$();
70577
+ if ((x === op)) {
70578
+ return "~"
70579
+ } else {
70580
+ return $f_Lio_kaitai_struct_translators_CommonOps__binOp__Lio_kaitai_struct_exprlang_Ast$operator__T(this, op)
70581
+ }
70582
+ });
70583
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
70584
+ return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
70585
+ });
70586
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T = (function(t, value) {
70587
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
70588
+ return (function(v$2) {
70589
+ var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
70590
+ return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
70591
+ })
70592
+ })(this));
70593
+ var this$1 = $m_sc_Seq$();
70594
+ return (("{" + $as_sc_TraversableOnce(value.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "}")
70595
+ });
70596
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70597
+ return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + " and 1 or 0)")
70598
+ });
70599
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70600
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + " + 1]")
70601
+ });
70602
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70603
+ return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70604
+ });
70605
+ $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) {
70606
+ 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)) + ")")
70607
+ });
70608
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70609
+ var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70610
+ return (((("string.byte(" + table) + ", #") + table) + ")")
70611
+ });
70612
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70613
+ var this$1 = this.importList$3;
70614
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70615
+ return (("utils.byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70616
+ });
70617
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
70618
+ 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)) + ")")
70619
+ });
70620
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doLocalName__T__T = (function(s) {
70621
+ return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "_" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "i" : ("self." + s)))
70622
+ });
70623
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70624
+ return (("string.len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70625
+ });
70626
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T = (function(op) {
70627
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Not$();
70628
+ if ((x === op)) {
70629
+ return "not"
70630
+ } else {
70631
+ return $f_Lio_kaitai_struct_translators_CommonOps__unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(this, op)
70632
+ }
70633
+ });
70634
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
70635
+ return this.doByteArrayLiteral__sc_Seq__T(arr)
70636
+ });
70637
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70638
+ var this$1 = this.importList$3;
70639
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70640
+ return (("utils.array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70641
+ });
70642
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.booleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__T = (function(op) {
70643
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$boolop$Or$();
70644
+ if ((x === op)) {
70645
+ return "or"
70646
+ } else {
70647
+ var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$boolop$And$();
70648
+ if ((x$3 === op)) {
70649
+ return "and"
70650
+ } else {
70651
+ throw new $c_s_MatchError().init___O(op)
70652
+ }
70653
+ }
70654
+ });
70655
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
70656
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":size()")
70657
+ });
70658
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70659
+ return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70660
+ });
70661
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
70662
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
70663
+ if ((baseStr === "10")) {
70664
+ return (("tostring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ")")
70665
+ } else {
70666
+ throw new $c_jl_UnsupportedOperationException().init___T(baseStr)
70667
+ }
70668
+ });
70669
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
70670
+ return (((("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + " + 1)")
70671
+ });
70672
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doName__T__T = (function(s) {
70673
+ return s
70674
+ });
70675
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
70676
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ":is_eof()")
70677
+ });
70678
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
70679
+ return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
70680
+ });
70681
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
70682
+ var this$1 = this.importList$3;
70683
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local str_decode = require(\"string_decode\")");
70684
+ return (((("str_decode.decode(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
70685
+ });
70686
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T = (function(op) {
70687
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
70688
+ if ((x === op)) {
70689
+ return "~="
70690
+ } else {
70691
+ return $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)
70692
+ }
70693
+ });
70694
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
70695
+ return this.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T(value, et)
70696
+ });
70697
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.decEscapeByteArray__p3__sc_Seq__T = (function(arr) {
70698
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
70699
+ return (function(x$2) {
70700
+ var x = $uB(x$2);
70701
+ var this$4 = new $c_sci_StringOps().init___T("\\%03d");
70702
+ var array = [(255 & x)];
70703
+ var jsx$3 = $m_sjsr_RuntimeString$();
70704
+ var $$this = this$4.repr$1;
70705
+ $m_sc_Seq$();
70706
+ $m_sjs_js_WrappedArray$();
70707
+ var array$1 = [];
70708
+ var x1 = $uI(array.length);
70709
+ switch (x1) {
70710
+ case (-1): {
70711
+ break
70712
+ }
70713
+ };
70714
+ var i = 0;
70715
+ var len = $uI(array.length);
70716
+ while ((i < len)) {
70717
+ var index = i;
70718
+ var arg1 = array[index];
70719
+ var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
70720
+ array$1.push(elem);
70721
+ i = ((1 + i) | 0)
70722
+ };
70723
+ $m_s_reflect_ManifestFactory$ObjectManifest$();
70724
+ var len$1 = $uI(array$1.length);
70725
+ var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
70726
+ var len$2 = result.u.length;
70727
+ var i$1 = 0;
70728
+ var j = 0;
70729
+ var x$1 = $uI(array$1.length);
70730
+ var x$3 = ((x$1 < len$2) ? x$1 : len$2);
70731
+ var that = result.u.length;
70732
+ var end = ((x$3 < that) ? x$3 : that);
70733
+ while ((i$1 < end)) {
70734
+ var jsx$2 = j;
70735
+ var index$1 = i$1;
70736
+ result.set(jsx$2, array$1[index$1]);
70737
+ i$1 = ((1 + i$1) | 0);
70738
+ j = ((1 + j) | 0)
70739
+ };
70740
+ return jsx$3.format__T__AO__T($$this, result)
70741
+ })
70742
+ })(this));
70743
+ var this$18 = $m_sc_Seq$();
70744
+ return $as_sc_TraversableOnce(arr.map__F1__scg_CanBuildFrom__O(jsx$1, this$18.ReusableCBFInstance$2)).mkString__T()
70745
+ });
70746
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70747
+ return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70748
+ });
70749
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70750
+ return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70751
+ });
70752
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70753
+ return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70754
+ });
70755
+ $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) {
70756
+ var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
70757
+ var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
70758
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70759
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
70760
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
70761
+ var jsx$1 = (x === op)
70762
+ } else {
70763
+ var jsx$1 = false
70764
+ }
70765
+ } else {
70766
+ var jsx$1 = false
70767
+ };
70768
+ if (jsx$1) {
70769
+ return (((("math.floor(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
70770
+ } else {
70771
+ 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)
70772
+ }
70773
+ });
70774
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
70775
+ return (("\"" + this.decEscapeByteArray__p3__sc_Seq__T(arr)) + "\"")
70776
+ });
70777
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70778
+ return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70779
+ });
70780
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
70781
+ return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
70782
+ });
70783
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70784
+ return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70785
+ });
70786
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70787
+ var this$1 = this.importList$3;
70788
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "local utils = require(\"utils\")");
70789
+ return (("utils.byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70790
+ });
70791
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70792
+ return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70793
+ });
70794
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
70795
+ return (($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + ".") + label)
70796
+ });
70797
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList = (function(provider, importList) {
70798
+ this.importList$3 = importList;
70799
+ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
70800
+ var self = new $c_jl_Character().init___C(9);
70801
+ var jsx$9 = new $c_T2().init___O__O(self, "\\t");
70802
+ var self$1 = new $c_jl_Character().init___C(10);
70803
+ var jsx$8 = new $c_T2().init___O__O(self$1, "\\n");
70804
+ var self$2 = new $c_jl_Character().init___C(13);
70805
+ var jsx$7 = new $c_T2().init___O__O(self$2, "\\r");
70806
+ var self$3 = new $c_jl_Character().init___C(34);
70807
+ var jsx$6 = new $c_T2().init___O__O(self$3, "\\\"");
70808
+ var self$4 = new $c_jl_Character().init___C(92);
70809
+ var jsx$5 = new $c_T2().init___O__O(self$4, "\\\\");
70810
+ var self$5 = new $c_jl_Character().init___C(7);
70811
+ var jsx$4 = new $c_T2().init___O__O(self$5, "\\a");
70812
+ var self$6 = new $c_jl_Character().init___C(8);
70813
+ var jsx$3 = new $c_T2().init___O__O(self$6, "\\b");
70814
+ var self$7 = new $c_jl_Character().init___C(11);
70815
+ var jsx$2 = new $c_T2().init___O__O(self$7, "\\v");
70816
+ var self$8 = new $c_jl_Character().init___C(12);
70817
+ var jsx$1 = new $c_T2().init___O__O(self$8, "\\f");
70818
+ var self$9 = new $c_jl_Character().init___C(27);
70819
+ 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")];
70820
+ var this$44 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
70821
+ var i = 0;
70822
+ var len = $uI(array.length);
70823
+ while ((i < len)) {
70824
+ var index = i;
70825
+ var arg1 = array[index];
70826
+ this$44.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
70827
+ i = ((1 + i) | 0)
70828
+ };
70829
+ this.asciiCharQuoteMap$3 = $as_sci_Map(this$44.elems$1);
70830
+ return this
70831
+ });
70832
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70833
+ return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70834
+ });
70835
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
70836
+ return ((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + "(") + id) + ")")
70837
+ });
70838
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, right) {
70839
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " .. ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
70840
+ });
70841
+ var $d_Lio_kaitai_struct_translators_LuaTranslator = new $TypeData().initClass({
70842
+ Lio_kaitai_struct_translators_LuaTranslator: 0
70843
+ }, false, "io.kaitai.struct.translators.LuaTranslator", {
70844
+ Lio_kaitai_struct_translators_LuaTranslator: 1,
70845
+ Lio_kaitai_struct_translators_BaseTranslator: 1,
70846
+ Lio_kaitai_struct_translators_TypeDetector: 1,
70847
+ O: 1,
70848
+ Lio_kaitai_struct_translators_AbstractTranslator: 1,
70849
+ Lio_kaitai_struct_translators_CommonLiterals: 1,
70850
+ Lio_kaitai_struct_translators_CommonOps: 1,
70851
+ Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
70852
+ Lio_kaitai_struct_translators_CommonMethods: 1,
70853
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1,
70854
+ Lio_kaitai_struct_translators_MinSignedIntegers: 1
70855
+ });
70856
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_LuaTranslator;
70857
+ /** @constructor */
70858
+ function $c_Lio_kaitai_struct_translators_PHPTranslator() {
70859
+ $c_Lio_kaitai_struct_translators_BaseTranslator.call(this);
70860
+ this.asciiCharQuoteMap$3 = null;
70861
+ this.namespaceRef$3 = null
70862
+ }
70863
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
70864
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_PHPTranslator;
70865
+ /** @constructor */
70866
+ function $h_Lio_kaitai_struct_translators_PHPTranslator() {
70867
+ /*<skip>*/
70868
+ }
70869
+ $h_Lio_kaitai_struct_translators_PHPTranslator.prototype = $c_Lio_kaitai_struct_translators_PHPTranslator.prototype;
70870
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
70871
+ return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base)) + ")")
70872
+ });
70873
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70874
+ return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70875
+ });
70876
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
70877
+ var this$1 = $m_s_math_BigInt$();
70878
+ var that = this$1.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(0, (-2147483648)));
70879
+ if ($f_s_math_Ordered__$$greater$eq__O__Z(n, that)) {
70880
+ var that$1 = $m_Lio_kaitai_struct_Utils$().MAX$undUINT64$1;
70881
+ var jsx$2 = $f_s_math_Ordered__$$less$eq__O__Z(n, that$1)
70882
+ } else {
70883
+ var jsx$2 = false
70884
+ };
70885
+ if (jsx$2) {
70886
+ var this$2 = $m_s_math_BigInt$();
70887
+ var t = n.bigInteger$3.longValue__J();
70888
+ var lo = t.lo$2;
70889
+ var hi = t.hi$2;
70890
+ var jsx$1 = this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi))
70891
+ } else {
70892
+ var jsx$1 = n
70893
+ };
70894
+ return $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_math_BigInt__T(this, jsx$1)
70895
+ });
70896
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70897
+ return (("count(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70898
+ });
70899
+ $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) {
70900
+ 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)
70901
+ });
70902
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70903
+ return this.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70904
+ });
70905
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
70906
+ return (("strrev(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70907
+ });
70908
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70909
+ return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70910
+ });
70911
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_RuntimeConfig = (function(provider, config) {
70912
+ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider.call(this, provider);
70913
+ var self = new $c_jl_Character().init___C(9);
70914
+ var jsx$8 = new $c_T2().init___O__O(self, "\\t");
70915
+ var self$1 = new $c_jl_Character().init___C(10);
70916
+ var jsx$7 = new $c_T2().init___O__O(self$1, "\\n");
70917
+ var self$2 = new $c_jl_Character().init___C(13);
70918
+ var jsx$6 = new $c_T2().init___O__O(self$2, "\\r");
70919
+ var self$3 = new $c_jl_Character().init___C(34);
70920
+ var jsx$5 = new $c_T2().init___O__O(self$3, "\\\"");
70921
+ var self$4 = new $c_jl_Character().init___C(92);
70922
+ var jsx$4 = new $c_T2().init___O__O(self$4, "\\\\");
70923
+ var self$5 = new $c_jl_Character().init___C(36);
70924
+ var jsx$3 = new $c_T2().init___O__O(self$5, "\\$");
70925
+ var self$6 = new $c_jl_Character().init___C(12);
70926
+ var jsx$2 = new $c_T2().init___O__O(self$6, "\\f");
70927
+ var self$7 = new $c_jl_Character().init___C(11);
70928
+ var jsx$1 = new $c_T2().init___O__O(self$7, "\\v");
70929
+ var self$8 = new $c_jl_Character().init___C(27);
70930
+ 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")];
70931
+ var this$40 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
70932
+ var i = 0;
70933
+ var len = $uI(array.length);
70934
+ while ((i < len)) {
70935
+ var index = i;
70936
+ var arg1 = array[index];
70937
+ this$40.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
70938
+ i = ((1 + i) | 0)
70939
+ };
70940
+ this.asciiCharQuoteMap$3 = $as_sci_Map(this$40.elems$1);
70941
+ var thiz = config.phpNamespace$1;
70942
+ if ((thiz === null)) {
70943
+ throw new $c_jl_NullPointerException().init___()
70944
+ };
70945
+ this.namespaceRef$3 = ((thiz === "") ? "" : ("\\" + config.phpNamespace$1));
70946
+ return this
70947
+ });
70948
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
70949
+ return this.doByteArrayNonLiteral__sc_Seq__T(elts)
70950
+ });
70951
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
70952
+ return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
70953
+ });
70954
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
70955
+ return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70956
+ });
70957
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
70958
+ return (("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + "[0])")
70959
+ });
70960
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.types2classAbs__sci_List__T = (function(names) {
70961
+ $m_sci_List$();
70962
+ var o9 = new $c_s_Some().init___O(names);
70963
+ if ((o9.value$2 !== null)) {
70964
+ var this$2 = $as_sc_LinearSeqOptimized(o9.value$2);
70965
+ var jsx$1 = ($f_sc_LinearSeqOptimized__lengthCompare__I__I(this$2, 1) === 0)
70966
+ } else {
70967
+ var jsx$1 = false
70968
+ };
70969
+ if (jsx$1) {
70970
+ var this$3 = $as_sc_LinearSeqOptimized(o9.value$2);
70971
+ var p3 = $as_T($f_sc_LinearSeqOptimized__apply__I__O(this$3, 0));
70972
+ if ((p3 === "kaitai_struct")) {
70973
+ return "\\Kaitai\\Struct\\Struct"
70974
+ }
70975
+ };
70976
+ return ((this.namespaceRef$3 + "\\") + $m_Lio_kaitai_struct_languages_PHPCompiler$().types2classRel__sci_List__T(names))
70977
+ });
70978
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
70979
+ return this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70980
+ });
70981
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
70982
+ var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a);
70983
+ return (((v + "[count(") + v) + ") - 1]")
70984
+ });
70985
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
70986
+ return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70987
+ });
70988
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLiteralUnicode__C__T = (function(code) {
70989
+ var this$4 = new $c_sci_StringOps().init___T("\\u{%x}");
70990
+ var array = [code];
70991
+ var jsx$2 = $m_sjsr_RuntimeString$();
70992
+ var $$this = this$4.repr$1;
70993
+ $m_sc_Seq$();
70994
+ $m_sjs_js_WrappedArray$();
70995
+ var array$1 = [];
70996
+ var x1 = $uI(array.length);
70997
+ switch (x1) {
70998
+ case (-1): {
70999
+ break
71000
+ }
71001
+ };
71002
+ var i = 0;
71003
+ var len = $uI(array.length);
71004
+ while ((i < len)) {
71005
+ var index = i;
71006
+ var arg1 = array[index];
71007
+ var elem = $f_sci_StringLike__unwrapArg__psci_StringLike__O__O(this$4, arg1);
71008
+ array$1.push(elem);
71009
+ i = ((1 + i) | 0)
71010
+ };
71011
+ $m_s_reflect_ManifestFactory$ObjectManifest$();
71012
+ var len$1 = $uI(array$1.length);
71013
+ var result = $newArrayObject($d_O.getArrayOf(), [len$1]);
71014
+ var len$2 = result.u.length;
71015
+ var i$1 = 0;
71016
+ var j = 0;
71017
+ var x = $uI(array$1.length);
71018
+ var x$1 = ((x < len$2) ? x : len$2);
71019
+ var that = result.u.length;
71020
+ var end = ((x$1 < that) ? x$1 : that);
71021
+ while ((i$1 < end)) {
71022
+ var jsx$1 = j;
71023
+ var index$1 = i$1;
71024
+ result.set(jsx$1, array$1[index$1]);
71025
+ i$1 = ((1 + i$1) | 0);
71026
+ j = ((1 + j) | 0)
71027
+ };
71028
+ return jsx$2.format__T__AO__T($$this, result)
70698
71029
  });
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
71030
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
71031
+ return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70706
71032
  });
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]))
71033
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
71034
+ return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a) + "[0]")
70709
71035
  });
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)
71036
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
71037
+ return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(value, num)
70717
71038
  });
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)
71039
+ $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) {
71040
+ 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)) + ")")
70720
71041
  });
70721
- $c_Lfastparse_parsers_Intrinsics$ElemsWhile.prototype.productIterator__sc_Iterator = (function() {
70722
- return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
71042
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
71043
+ return this.asciiCharQuoteMap$3
70723
71044
  });
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
71045
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(container, idx) {
71046
+ return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(container, idx)
70747
71047
  });
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"
71048
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
71049
+ return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
70765
71050
  });
70766
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.productArity__I = (function() {
70767
- return 5
71051
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
71052
+ return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
70768
71053
  });
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
- }
71054
+ $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) {
71055
+ 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)) + ")")
70807
71056
  });
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
- }
71057
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71058
+ return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + "[") + this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + " - 1])")
70834
71059
  });
70835
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.toString__T = (function() {
70836
- return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
71060
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71061
+ return (("\\Kaitai\\Struct\\Stream::byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70837
71062
  });
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
71063
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__T = (function(elts) {
71064
+ var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
71065
+ return (function(v$2) {
71066
+ var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
71067
+ return $this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)
71068
+ })
71069
+ })(this));
71070
+ var this$1 = $m_sc_Seq$();
71071
+ return (("pack('C*', " + $as_sc_TraversableOnce(elts.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + ")")
70844
71072
  });
70845
- $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes.prototype.isOwning__Z = (function() {
70846
- return false
71073
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
71074
+ return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
70847
71075
  });
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))
71076
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doLocalName__T__T = (function(s) {
71077
+ 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)))))
70851
71078
  });
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)
71079
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
71080
+ return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
70854
71081
  });
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
71082
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
71083
+ return this.doByteArrayLiteral__sc_Seq__T(arr)
70878
71084
  });
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"
71085
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71086
+ return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
70896
71087
  });
70897
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.productArity__I = (function() {
70898
- return 5
71088
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
71089
+ return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(a)) + ")")
70899
71090
  });
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()
71091
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
71092
+ return this.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
70902
71093
  });
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))
70914
- } 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))
70921
- } else {
70922
- var jsx$2 = false
70923
- };
70924
- 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))
70935
- } else {
70936
- return false
70937
- }
70938
- } else {
70939
- return false
70940
- }
71094
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
71095
+ var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base);
71096
+ 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) + ")"))
70941
71097
  });
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
71098
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
71099
+ return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container)) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "])")
70946
71100
  });
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))
70971
- }
70972
- }
71101
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doName__T__T = (function(s) {
71102
+ return ($m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(s) + "()")
70973
71103
  });
70974
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.toString__T = (function() {
70975
- return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
71104
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
71105
+ return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
70976
71106
  });
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
71107
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
71108
+ return (((("\\Kaitai\\Struct\\Stream::bytesToStr(" + bytesExpr) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")")
70983
71109
  });
70984
- $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes.prototype.isOwning__Z = (function() {
70985
- return true
71110
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
71111
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
70986
71112
  });
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))
71113
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
71114
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + "->") + this.doName__T__T(attrName))
70990
71115
  });
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)
71116
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71117
+ return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
70993
71118
  });
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
71119
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
71120
+ return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
71017
71121
  });
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)) + ")")
71122
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
71123
+ return (("\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\"")
71032
71124
  });
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)
71125
+ $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) {
71126
+ var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
71127
+ var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
71128
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71129
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71130
+ var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
71131
+ var jsx$1 = (x === op)
71132
+ } else {
71133
+ var jsx$1 = false
71134
+ }
71135
+ } else {
71136
+ var jsx$1 = false
71137
+ };
71138
+ if (jsx$1) {
71139
+ return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
71140
+ } else {
71141
+ if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71142
+ if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
71143
+ var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
71144
+ var jsx$2 = (x$3 === op)
71145
+ } else {
71146
+ var jsx$2 = false
71147
+ }
71148
+ } else {
71149
+ var jsx$2 = false
71150
+ };
71151
+ if (jsx$2) {
71152
+ 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)) + ")")
71153
+ } else {
71154
+ 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)
71155
+ }
71156
+ }
71035
71157
  });
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)
71158
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
71159
+ return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
71038
71160
  });
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))))))
71161
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71162
+ return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
71041
71163
  });
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)) + ")")
71164
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
71165
+ return (("\\Kaitai\\Struct\\Stream::byteArrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
71044
71166
  });
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)) + ")")
71167
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71168
+ return this.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
71047
71169
  });
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)
71170
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
71171
+ var enumClass = this.types2classAbs__sci_List__T(enumTypeAbs);
71172
+ return ((enumClass + "::") + ($m_Lio_kaitai_struct_Utils$(), $as_T(label.toUpperCase())))
71050
71173
  });
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)
71174
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
71175
+ return this.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
71053
71176
  });
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
71177
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
71178
+ return id
71057
71179
  });
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,
71180
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, right) {
71181
+ return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " . ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
71182
+ });
71183
+ var $d_Lio_kaitai_struct_translators_PHPTranslator = new $TypeData().initClass({
71184
+ Lio_kaitai_struct_translators_PHPTranslator: 0
71185
+ }, false, "io.kaitai.struct.translators.PHPTranslator", {
71186
+ Lio_kaitai_struct_translators_PHPTranslator: 1,
71063
71187
  Lio_kaitai_struct_translators_BaseTranslator: 1,
71064
71188
  Lio_kaitai_struct_translators_TypeDetector: 1,
71065
71189
  O: 1,
@@ -71068,9 +71192,10 @@ var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initC
71068
71192
  Lio_kaitai_struct_translators_CommonOps: 1,
71069
71193
  Lio_kaitai_struct_translators_CommonArraysAndCast: 1,
71070
71194
  Lio_kaitai_struct_translators_CommonMethods: 1,
71071
- Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
71195
+ Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1,
71196
+ Lio_kaitai_struct_translators_MinSignedIntegers: 1
71072
71197
  });
71073
- $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_ConstructTranslator;
71198
+ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_PHPTranslator;
71074
71199
  /** @constructor */
71075
71200
  function $c_s_reflect_ManifestFactory$AnyManifest$() {
71076
71201
  $c_s_reflect_ManifestFactory$PhantomManifest.call(this)
@@ -73480,7 +73605,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.enumDeclaration__sci_List__
73480
73605
  var lo = t.lo$2;
73481
73606
  var hi = t.hi$2;
73482
73607
  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)) + ","))
73608
+ var jsx$4 = $this.outHdr$2;
73609
+ var jsx$3 = $this.value2Const__T__T__T(enumName$1, label.name$1);
73610
+ var jsx$2 = $this.translator$2;
73611
+ var this$6 = $m_s_math_BigInt$();
73612
+ 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
73613
  } else {
73485
73614
  throw new $c_s_MatchError().init___O(x0$1)
73486
73615
  }
@@ -73493,7 +73622,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.enumDeclaration__sci_List__
73493
73622
  var lo$1 = t$1.lo$2;
73494
73623
  var hi$1 = t$1.hi$2;
73495
73624
  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)))
73625
+ var jsx$7 = this.outHdr$2;
73626
+ var jsx$6 = this.value2Const__T__T__T(enumName, label$1.name$1);
73627
+ var jsx$5 = this.translator$2;
73628
+ var this$7 = $m_s_math_BigInt$();
73629
+ 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
73630
  } else {
73498
73631
  throw new $c_s_MatchError().init___O(x1)
73499
73632
  };
@@ -75984,17 +76117,21 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci
75984
76117
  var lo = t.lo$2;
75985
76118
  var hi = t.hi$2;
75986
76119
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
75987
- var jsx$2 = $this.out$2;
76120
+ var jsx$3 = $this.out$2;
75988
76121
  var label$1 = label.name$1;
75989
76122
  $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)) + ","))
76123
+ var jsx$2 = $as_T(label$1.toUpperCase());
76124
+ var this$4 = $m_s_math_BigInt$();
76125
+ var n = this$4.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
76126
+ var this$6 = n.bigInteger$3;
76127
+ jsx$3.puts__T__V((((jsx$2 + ": ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$6)) + ","))
75991
76128
  } else {
75992
76129
  throw new $c_s_MatchError().init___O(x0$1)
75993
76130
  }
75994
76131
  })
75995
76132
  })(this, enumName)));
75996
- var this$4 = this.out$2;
75997
- this$4.sb$2.append__T__scm_StringBuilder("\n");
76133
+ var this$7 = this.out$2;
76134
+ this$7.sb$2.append__T__scm_StringBuilder("\n");
75998
76135
  enumColl.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2$1, enumName$2) {
75999
76136
  return (function(x0$2$2) {
76000
76137
  var x0$2 = $as_T2(x0$2$2);
@@ -76004,10 +76141,10 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci
76004
76141
  var hi$1 = t$1.hi$2;
76005
76142
  var label$2 = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$2.$$und2__O());
76006
76143
  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;
76144
+ var jsx$4 = this$2$1.out$2;
76008
76145
  var label$3 = label$2.name$1;
76009
76146
  $m_Lio_kaitai_struct_Utils$();
76010
- jsx$3.puts__T__V((((idStr + ": \"") + $as_T(label$3.toUpperCase())) + "\","))
76147
+ jsx$4.puts__T__V((((idStr + ": \"") + $as_T(label$3.toUpperCase())) + "\","))
76011
76148
  } else {
76012
76149
  throw new $c_s_MatchError().init___O(x0$2)
76013
76150
  }
@@ -76015,8 +76152,8 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci
76015
76152
  })(this, enumName)));
76016
76153
  this.out$2.dec__V();
76017
76154
  this.out$2.puts__T__V("});");
76018
- var this$8 = this.out$2;
76019
- this$8.sb$2.append__T__scm_StringBuilder("\n")
76155
+ var this$11 = this.out$2;
76156
+ this$11.sb$2.append__T__scm_StringBuilder("\n")
76020
76157
  });
76021
76158
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchIfCaseFirstStart__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(condition) {
76022
76159
  this.out$2.puts__T__V((("if (" + this.switchCmpExpr__p2__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + ") {"));
@@ -76868,10 +77005,13 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.enumDeclaration__sci_List__
76868
77005
  var hi = t.hi$2;
76869
77006
  var label = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
76870
77007
  $this.universalDoc__Lio_kaitai_struct_format_DocSpec__V(label.doc$1);
76871
- var jsx$1 = $this.out$2;
77008
+ var jsx$3 = $this.out$2;
76872
77009
  var label$1 = label.name$1;
76873
77010
  $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)) + ";"))
77011
+ var jsx$2 = $as_T(label$1.toUpperCase());
77012
+ var jsx$1 = $this.translator$2;
77013
+ var this$8 = $m_s_math_BigInt$();
77014
+ 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
77015
  } else {
76876
77016
  throw new $c_s_MatchError().init___O(x0$1)
76877
77017
  }
@@ -77543,7 +77683,12 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumDeclaration__sci_List_
77543
77683
  var lo = t.lo$2;
77544
77684
  var hi = t.hi$2;
77545
77685
  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)) + ";"))
77686
+ var jsx$2 = $this.out$2;
77687
+ var jsx$1 = $this.enumValue__T__T__T(enumName$1, label.name$1);
77688
+ var this$2 = $m_s_math_BigInt$();
77689
+ var n = this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
77690
+ var this$4 = n.bigInteger$3;
77691
+ jsx$2.puts__T__V((((("our " + jsx$1) + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$4)) + ";"))
77547
77692
  } else {
77548
77693
  throw new $c_s_MatchError().init___O(x0$1)
77549
77694
  }
@@ -79349,7 +79494,12 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.enumDeclaration__T__T__s
79349
79494
  var lo = t.lo$2;
79350
79495
  var hi = t.hi$2;
79351
79496
  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)) + ","))
79497
+ var jsx$2 = $this.out$2;
79498
+ var jsx$1 = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(label);
79499
+ var this$2 = $m_s_math_BigInt$();
79500
+ var n = this$2.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
79501
+ var this$4 = n.bigInteger$3;
79502
+ jsx$2.puts__T__V((((jsx$1 + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$4)) + ","))
79353
79503
  } else {
79354
79504
  throw new $c_s_MatchError().init___O(x0$1)
79355
79505
  }
@@ -80043,11 +80193,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.getRawIdExpr__Lio_kaitai_st
80043
80193
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.runReadCalc__V = (function() {
80044
80194
  var this$1 = this.out$2;
80045
80195
  this$1.sb$2.append__T__scm_StringBuilder("\n");
80046
- this.out$2.puts__T__V("if self._is_le then");
80196
+ this.out$2.puts__T__V("if self._is_le == true then");
80047
80197
  this.out$2.inc__V();
80048
80198
  this.out$2.puts__T__V("self:_read_le()");
80049
80199
  this.out$2.dec__V();
80050
- this.out$2.puts__T__V("elseif not self._is_le then");
80200
+ this.out$2.puts__T__V("elseif self._is_le == false then");
80051
80201
  this.out$2.inc__V();
80052
80202
  this.out$2.puts__T__V("self:_read_be()");
80053
80203
  this.out$2.dec__V();
@@ -80274,7 +80424,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.enumDeclaration__sci_List__
80274
80424
  var lo = t.lo$2;
80275
80425
  var hi = t.hi$2;
80276
80426
  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)) + ","))
80427
+ var jsx$3 = $this.out$2;
80428
+ var jsx$2 = label.name$1;
80429
+ var jsx$1 = $this.translator$2;
80430
+ var this$2 = $m_s_math_BigInt$();
80431
+ 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
80432
  } else {
80279
80433
  throw new $c_s_MatchError().init___O(x0$1)
80280
80434
  }
@@ -80282,8 +80436,8 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.enumDeclaration__sci_List__
80282
80436
  })(this)));
80283
80437
  this.out$2.dec__V();
80284
80438
  this.out$2.puts__T__V("}");
80285
- var this$2 = this.out$2;
80286
- this$2.sb$2.append__T__scm_StringBuilder("\n")
80439
+ var this$3 = this.out$2;
80440
+ this$3.sb$2.append__T__scm_StringBuilder("\n")
80287
80441
  });
80288
80442
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfCaseFirstStart__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(condition) {
80289
80443
  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 +82189,11 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumDeclaration__T__T__sc_
82035
82189
  var lo = t.lo$2;
82036
82190
  var hi = t.hi$2;
82037
82191
  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)) + ","))
82192
+ var jsx$1 = $this.out$2;
82193
+ var this$5 = $m_s_math_BigInt$();
82194
+ var n = this$5.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
82195
+ var this$7 = n.bigInteger$3;
82196
+ 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
82197
  } else {
82040
82198
  throw new $c_s_MatchError().init___O(x0$1)
82041
82199
  }
@@ -84419,7 +84577,11 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.enumDeclaration__T__T__s
84419
84577
  var hi = t.hi$2;
84420
84578
  var label = $as_T(x0$1.$$und2__O());
84421
84579
  if ((label !== null)) {
84422
- $this.out$2.puts__T__V(((label + " = ") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)));
84580
+ var jsx$1 = $this.out$2;
84581
+ var this$3 = $m_s_math_BigInt$();
84582
+ var n = this$3.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
84583
+ var this$5 = n.bigInteger$3;
84584
+ jsx$1.puts__T__V(((label + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$5)));
84423
84585
  break matchEnd5
84424
84586
  }
84425
84587
  };
@@ -84624,21 +84786,22 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.fileHeader__T__V = (func
84624
84786
  var this$1 = this.outHeader$2;
84625
84787
  this$1.sb$2.append__T__scm_StringBuilder("\n");
84626
84788
  var this$2 = this.importList$2;
84627
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "from pkg_resources import parse_version");
84789
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "import kaitaistruct");
84628
84790
  var this$3 = this.importList$2;
84629
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$3.list$1, "import kaitaistruct");
84630
- var this$4 = this.importList$2;
84631
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$4.list$1, "from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO");
84791
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$3.list$1, "from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO");
84792
+ var this$4 = this.out$2;
84793
+ this$4.sb$2.append__T__scm_StringBuilder("\n");
84632
84794
  var this$5 = this.out$2;
84633
84795
  this$5.sb$2.append__T__scm_StringBuilder("\n");
84634
- var this$6 = this.out$2;
84635
- this$6.sb$2.append__T__scm_StringBuilder("\n");
84636
- this.out$2.puts__T__V((("if parse_version(kaitaistruct.__version__) < parse_version('" + $m_Lio_kaitai_struct_format_KSVersion$().minimalRuntime$1) + "'):"));
84796
+ var jsx$1 = this.out$2;
84797
+ var this$6 = $m_Lio_kaitai_struct_format_KSVersion$().minimalRuntime$1;
84798
+ var this$7 = this$6.nums$1;
84799
+ jsx$1.puts__T__V((("if getattr(kaitaistruct, 'API_VERSION', (0, 9)) < " + $f_sc_TraversableOnce__mkString__T__T__T__T(this$7, "(", ", ", ")")) + ":"));
84637
84800
  this.out$2.inc__V();
84638
84801
  this.out$2.puts__T__V((("raise Exception(\"Incompatible Kaitai Struct Python API: " + $m_Lio_kaitai_struct_format_KSVersion$().minimalRuntime$1) + " or later is required, but you have %s\" % (kaitaistruct.__version__))"));
84639
84802
  this.out$2.dec__V();
84640
- var this$7 = this.out$2;
84641
- this$7.sb$2.append__T__scm_StringBuilder("\n")
84803
+ var this$8 = this.out$2;
84804
+ this$8.sb$2.append__T__scm_StringBuilder("\n")
84642
84805
  });
84643
84806
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
84644
84807
  /*<skip>*/