kaitai-struct-compiler 0.10.0-SNAPSHOT20220317.110343.7ff2eda3 → 0.10.0-SNAPSHOT20220505.181132.b0125311

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.
@@ -1505,28 +1505,26 @@ function $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kai
1505
1505
  return (((rawIo === true) && (rawProcess === false)) ? $m_Lio_kaitai_struct_datatype_RawIo$() : (((rawIo === false) && (rawProcess === true)) ? $m_Lio_kaitai_struct_datatype_RawProcess$() : (((rawIo === true) && (rawProcess === true)) ? $m_Lio_kaitai_struct_datatype_RawIoProcess$() : $m_Lio_kaitai_struct_datatype_NotRaw$())))
1506
1506
  }
1507
1507
  function $f_Lio_kaitai_struct_languages_components_CommonReads__attrParse0__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__T__s_Option__V($thiz, id, attr, io, defEndian) {
1508
+ var x = attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1;
1509
+ var x$2 = $m_Lio_kaitai_struct_format_NoRepeat$();
1510
+ if ((!((x !== null) && x.equals__O__Z(x$2)))) {
1511
+ var jsx$2 = $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz);
1512
+ var jsx$1 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
1513
+ var dataType = attr.dataType__Lio_kaitai_struct_datatype_DataType();
1514
+ jsx$2.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V(id, jsx$1, $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw($thiz, dataType))
1515
+ };
1508
1516
  var x1 = attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1;
1509
1517
  matchEnd9: {
1510
- var x = $m_Lio_kaitai_struct_format_RepeatEos$();
1511
- if ((x === x1)) {
1512
- var jsx$2 = $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz);
1513
- var jsx$1 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
1514
- var dataType = attr.dataType__Lio_kaitai_struct_datatype_DataType();
1515
- jsx$2.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V(id, io, jsx$1, $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw($thiz, dataType));
1516
- $thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, attr.dataType__Lio_kaitai_struct_datatype_DataType(), io, attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1, false, defEndian, $thiz.attrParse2$default$7__s_Option());
1517
- $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatEosFooter__V();
1518
+ var x$3 = $m_Lio_kaitai_struct_format_RepeatEos$();
1519
+ if ((x$3 === x1)) {
1520
+ $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V(id, io, attr.dataType__Lio_kaitai_struct_datatype_DataType());
1518
1521
  break matchEnd9
1519
1522
  };
1520
1523
  if ((x1 instanceof $c_Lio_kaitai_struct_format_RepeatExpr)) {
1521
1524
  var x2 = $as_Lio_kaitai_struct_format_RepeatExpr(x1);
1522
1525
  var repeatExpr = x2.expr$1;
1523
1526
  if ((repeatExpr !== null)) {
1524
- var jsx$4 = $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz);
1525
- var jsx$3 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
1526
- var dataType$1 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
1527
- jsx$4.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, jsx$3, $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw($thiz, dataType$1), repeatExpr);
1528
- $thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, attr.dataType__Lio_kaitai_struct_datatype_DataType(), io, attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1, false, defEndian, $thiz.attrParse2$default$7__s_Option());
1529
- $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatExprFooter__V();
1527
+ $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, attr.dataType__Lio_kaitai_struct_datatype_DataType(), repeatExpr);
1530
1528
  break matchEnd9
1531
1529
  }
1532
1530
  };
@@ -1534,24 +1532,41 @@ function $f_Lio_kaitai_struct_languages_components_CommonReads__attrParse0__Lio_
1534
1532
  var x3 = $as_Lio_kaitai_struct_format_RepeatUntil(x1);
1535
1533
  var untilExpr = x3.expr$1;
1536
1534
  if ((untilExpr !== null)) {
1537
- var jsx$6 = $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz);
1538
- var jsx$5 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
1539
- var dataType$2 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
1540
- jsx$6.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, jsx$5, $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw($thiz, dataType$2), untilExpr);
1541
- $thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, attr.dataType__Lio_kaitai_struct_datatype_DataType(), io, attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1, false, defEndian, $thiz.attrParse2$default$7__s_Option());
1542
- var jsx$8 = $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz);
1543
- var jsx$7 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
1544
- var dataType$3 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
1545
- jsx$8.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, jsx$7, $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw($thiz, dataType$3), untilExpr);
1535
+ $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, attr.dataType__Lio_kaitai_struct_datatype_DataType(), untilExpr);
1546
1536
  break matchEnd9
1547
1537
  }
1548
1538
  };
1549
- var x$3 = $m_Lio_kaitai_struct_format_NoRepeat$();
1550
- if ((x$3 === x1)) {
1551
- $thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, attr.dataType__Lio_kaitai_struct_datatype_DataType(), io, attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1, false, defEndian, $thiz.attrParse2$default$7__s_Option());
1539
+ var x$5 = $m_Lio_kaitai_struct_format_NoRepeat$();
1540
+ if ((x$5 === x1)) {
1552
1541
  break matchEnd9
1553
1542
  };
1554
1543
  throw new $c_s_MatchError().init___O(x1)
1544
+ };
1545
+ $thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, attr.dataType__Lio_kaitai_struct_datatype_DataType(), io, attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1, false, defEndian, $thiz.attrParse2$default$7__s_Option());
1546
+ var x1$2 = attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1;
1547
+ matchEnd8: {
1548
+ var x$7 = $m_Lio_kaitai_struct_format_RepeatEos$();
1549
+ if ((x$7 === x1$2)) {
1550
+ $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatEosFooter__V();
1551
+ break matchEnd8
1552
+ };
1553
+ if ((x1$2 instanceof $c_Lio_kaitai_struct_format_RepeatExpr)) {
1554
+ $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatExprFooter__V();
1555
+ break matchEnd8
1556
+ };
1557
+ if ((x1$2 instanceof $c_Lio_kaitai_struct_format_RepeatUntil)) {
1558
+ var x2$2 = $as_Lio_kaitai_struct_format_RepeatUntil(x1$2);
1559
+ var untilExpr$2 = x2$2.expr$1;
1560
+ if ((untilExpr$2 !== null)) {
1561
+ $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, attr.dataType__Lio_kaitai_struct_datatype_DataType(), untilExpr$2);
1562
+ break matchEnd8
1563
+ }
1564
+ };
1565
+ var x$9 = $m_Lio_kaitai_struct_format_NoRepeat$();
1566
+ if ((x$9 === x1$2)) {
1567
+ break matchEnd8
1568
+ };
1569
+ throw new $c_s_MatchError().init___O(x1$2)
1555
1570
  }
1556
1571
  }
1557
1572
  function $f_Lio_kaitai_struct_languages_components_CommonReads__attrValidateAll__Lio_kaitai_struct_format_AttrLikeSpec__V($thiz, attr) {
@@ -4415,9 +4430,9 @@ function $h_Lio_kaitai_struct_Version$() {
4415
4430
  $h_Lio_kaitai_struct_Version$.prototype = $c_Lio_kaitai_struct_Version$.prototype;
4416
4431
  $c_Lio_kaitai_struct_Version$.prototype.init___ = (function() {
4417
4432
  this.name$1 = "kaitai-struct-compiler-js";
4418
- this.version$1 = "0.10-SNAPSHOT20220317.110343.7ff2eda3";
4419
- this.gitCommit$1 = "7ff2eda3";
4420
- this.gitTime$1 = "2022-03-17T11:03:43+00:00";
4433
+ this.version$1 = "0.10-SNAPSHOT20220505.181132.b0125311";
4434
+ this.gitCommit$1 = "b0125311";
4435
+ this.gitTime$1 = "2022-05-05T18:11:32+00:00";
4421
4436
  return this
4422
4437
  });
4423
4438
  var $d_Lio_kaitai_struct_Version$ = new $TypeData().initClass({
@@ -20698,11 +20713,11 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileParseInstance__Lio_
20698
20713
  }
20699
20714
  });
20700
20715
  $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileEnum__Lio_kaitai_struct_format_EnumSpec__V = (function(enumSpec) {
20716
+ var this$1 = this.importList$1;
20717
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "import enum");
20701
20718
  var jsx$1 = this.out$1;
20702
- var this$1 = enumSpec.name$1;
20703
- jsx$1.puts__T__V((("def " + $f_sc_TraversableOnce__mkString__T__T__T__T(this$1, "", "__", "")) + "(subcon):"));
20704
- this.out$1.inc__V();
20705
- this.out$1.puts__T__V("return Enum(subcon,");
20719
+ var name = enumSpec.name$1;
20720
+ jsx$1.puts__T__V((("class " + $f_sc_TraversableOnce__mkString__T__T__T__T(name, "", "__", "")) + "(enum.IntEnum):"));
20706
20721
  this.out$1.inc__V();
20707
20722
  enumSpec.sortedSeq__sc_Seq().foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
20708
20723
  return (function(x0$1$2) {
@@ -20712,17 +20727,20 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileEnum__Lio_kaitai_st
20712
20727
  var lo = t.lo$2;
20713
20728
  var hi = t.hi$2;
20714
20729
  var valueSpec = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
20715
- $this.out$1.puts__T__V((((valueSpec.name$1 + "=") + new $c_sjsr_RuntimeLong().init___I__I(lo, hi)) + ","))
20730
+ var jsx$3 = $this.out$1;
20731
+ var jsx$2 = valueSpec.name$1;
20732
+ var this$3 = $m_s_math_BigInt$();
20733
+ var n = this$3.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
20734
+ var this$5 = n.bigInteger$3;
20735
+ jsx$3.puts__T__V(((jsx$2 + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$5)))
20716
20736
  } else {
20717
20737
  throw new $c_s_MatchError().init___O(x0$1)
20718
20738
  }
20719
20739
  })
20720
20740
  })(this)));
20721
20741
  this.out$1.dec__V();
20722
- this.out$1.puts__T__V(")");
20723
- this.out$1.dec__V();
20724
- var this$2 = this.out$1;
20725
- this$2.sb$2.append__T__scm_StringBuilder("\n")
20742
+ var this$6 = this.out$1;
20743
+ this$6.sb$2.append__T__scm_StringBuilder("\n")
20726
20744
  });
20727
20745
  $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.fixedEndianToStr__Lio_kaitai_struct_datatype_FixedEndian__T = (function(e) {
20728
20746
  var x = $m_Lio_kaitai_struct_datatype_LittleEndian$();
@@ -20738,29 +20756,31 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.fixedEndianToStr__Lio_kait
20738
20756
  }
20739
20757
  });
20740
20758
  $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compile__Lio_kaitai_struct_CompileLog$SpecSuccess = (function() {
20741
- this.out$1.puts__T__V("from construct import *");
20742
- this.out$1.puts__T__V("from construct.lib import *");
20743
- var this$1 = this.out$1;
20744
- this$1.sb$2.append__T__scm_StringBuilder("\n");
20759
+ var this$1 = this.importList$1;
20760
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "from construct import *");
20761
+ var this$2 = this.importList$1;
20762
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "from construct.lib import *");
20745
20763
  this.compileClass__Lio_kaitai_struct_format_ClassSpec__V(this.topClass$1);
20746
20764
  var jsx$1 = this.out$1;
20747
- var cs = this.topClass$1;
20748
- var this$2 = cs.name$1;
20749
- jsx$1.puts__T__V(("_schema = " + $f_sc_TraversableOnce__mkString__T__T__T__T(this$2, "", "__", "")));
20765
+ var name = this.topClass$1.name$1;
20766
+ jsx$1.puts__T__V(("_schema = " + $f_sc_TraversableOnce__mkString__T__T__T__T(name, "", "__", "")));
20750
20767
  $m_sci_List$();
20751
- var this$3 = this.topClass$1;
20752
- var this$4 = this$3.name$1;
20753
- var jsx$2 = this.outFileName__T__T($f_sc_TraversableOnce__mkString__T__T__T__T(this$4, "", "::", ""));
20754
- var this$5 = this.out$1;
20755
- var this$6 = this$5.sb$2;
20756
- var array = [new $c_Lio_kaitai_struct_CompileLog$FileSuccess().init___T__T(jsx$2, this$6.underlying$5.java$lang$StringBuilder$$content$f)];
20768
+ var this$4 = this.topClass$1;
20769
+ var this$5 = this$4.name$1;
20770
+ var jsx$3 = this.outFileName__T__T($f_sc_TraversableOnce__mkString__T__T__T__T(this$5, "", "::", ""));
20771
+ var this$6 = this.importList$1;
20772
+ var this$7 = this$6.list$1.toList__sci_List();
20773
+ var jsx$2 = $f_sc_TraversableOnce__mkString__T__T__T__T(this$7, "", "\n", "");
20774
+ var this$8 = this.out$1;
20775
+ var this$9 = this$8.sb$2;
20776
+ var array = [new $c_Lio_kaitai_struct_CompileLog$FileSuccess().init___T__T(jsx$3, ((jsx$2 + "\n\n") + this$9.underlying$5.java$lang$StringBuilder$$content$f))];
20757
20777
  var i = (((-1) + $uI(array.length)) | 0);
20758
20778
  var result = $m_sci_Nil$();
20759
20779
  while ((i >= 0)) {
20760
- var this$10 = result;
20780
+ var this$13 = result;
20761
20781
  var index = i;
20762
20782
  var x = array[index];
20763
- result = new $c_sci_$colon$colon().init___O__sci_List(x, this$10);
20783
+ result = new $c_sci_$colon$colon().init___O__sci_List(x, this$13);
20764
20784
  i = (((-1) + i) | 0)
20765
20785
  };
20766
20786
  return new $c_Lio_kaitai_struct_CompileLog$SpecSuccess().init___T__sci_List("", result)
@@ -20916,31 +20936,31 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrBytesTerminatedType__L
20916
20936
  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))) + ")")
20917
20937
  });
20918
20938
  $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileClass__Lio_kaitai_struct_format_ClassSpec__V = (function(cs) {
20919
- cs.types$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
20939
+ cs.enums$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
20920
20940
  return (function(x0$1$2) {
20921
20941
  var x0$1 = $as_T2(x0$1$2);
20922
20942
  if ((x0$1 !== null)) {
20923
- var typeSpec = $as_Lio_kaitai_struct_format_ClassSpec(x0$1.$$und2__O());
20924
- $this.compileClass__Lio_kaitai_struct_format_ClassSpec__V(typeSpec)
20943
+ var enumSpec = $as_Lio_kaitai_struct_format_EnumSpec(x0$1.$$und2__O());
20944
+ $this.compileEnum__Lio_kaitai_struct_format_EnumSpec__V(enumSpec)
20925
20945
  } else {
20926
20946
  throw new $c_s_MatchError().init___O(x0$1)
20927
20947
  }
20928
20948
  })
20929
20949
  })(this)));
20930
- cs.enums$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2) {
20950
+ cs.types$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2) {
20931
20951
  return (function(x0$2$2) {
20932
20952
  var x0$2 = $as_T2(x0$2$2);
20933
20953
  if ((x0$2 !== null)) {
20934
- var enumSpec = $as_Lio_kaitai_struct_format_EnumSpec(x0$2.$$und2__O());
20935
- this$2.compileEnum__Lio_kaitai_struct_format_EnumSpec__V(enumSpec)
20954
+ var typeSpec = $as_Lio_kaitai_struct_format_ClassSpec(x0$2.$$und2__O());
20955
+ this$2.compileClass__Lio_kaitai_struct_format_ClassSpec__V(typeSpec)
20936
20956
  } else {
20937
20957
  throw new $c_s_MatchError().init___O(x0$2)
20938
20958
  }
20939
20959
  })
20940
20960
  })(this)));
20941
20961
  var jsx$1 = this.out$1;
20942
- var this$1 = cs.name$1;
20943
- jsx$1.puts__T__V(($f_sc_TraversableOnce__mkString__T__T__T__T(this$1, "", "__", "") + " = Struct("));
20962
+ var name = cs.name$1;
20963
+ jsx$1.puts__T__V(($f_sc_TraversableOnce__mkString__T__T__T__T(name, "", "__", "") + " = Struct("));
20944
20964
  this.out$1.inc__V();
20945
20965
  this.provider$1.nowClass$1 = cs;
20946
20966
  var this$3 = cs.seq$1;
@@ -21118,9 +21138,8 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.typeToStr__Lio_kaitai_stru
21118
21138
  }
21119
21139
  } else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeInstream)) {
21120
21140
  var x9 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeInstream(dataType);
21121
- var cs = $as_Lio_kaitai_struct_format_ClassSpec(x9.classSpec$3.get__O());
21122
- var this$1 = cs.name$1;
21123
- return (("LazyBound(lambda: " + $f_sc_TraversableOnce__mkString__T__T__T__T(this$1, "", "__", "")) + ")")
21141
+ var name = $as_Lio_kaitai_struct_format_ClassSpec(x9.classSpec$3.get__O()).name$1;
21142
+ return (("LazyBound(lambda: " + $f_sc_TraversableOnce__mkString__T__T__T__T(name, "", "__", "")) + ")")
21124
21143
  } else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
21125
21144
  var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(dataType);
21126
21145
  var x1$3 = x10.bytes$4;
@@ -21128,17 +21147,16 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.typeToStr__Lio_kaitai_stru
21128
21147
  var x2$2 = $as_Lio_kaitai_struct_datatype_DataType$BytesLimitType(x1$3);
21129
21148
  var size = x2$2.size$2;
21130
21149
  var jsx$1 = this.translator$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(size);
21131
- var cs$1 = $as_Lio_kaitai_struct_format_ClassSpec(x10.classSpec$3.get__O());
21132
- var this$2 = cs$1.name$1;
21133
- return (((("FixedSized(" + jsx$1) + ", LazyBound(lambda: ") + $f_sc_TraversableOnce__mkString__T__T__T__T(this$2, "", "__", "")) + "))")
21150
+ var name$1 = $as_Lio_kaitai_struct_format_ClassSpec(x10.classSpec$3.get__O()).name$1;
21151
+ return (((("FixedSized(" + jsx$1) + ", LazyBound(lambda: ") + $f_sc_TraversableOnce__mkString__T__T__T__T(name$1, "", "__", "")) + "))")
21134
21152
  } else {
21135
21153
  return "???"
21136
21154
  }
21137
21155
  } else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
21138
21156
  var x11 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(dataType);
21139
- var enumSpec = $as_Lio_kaitai_struct_format_EnumSpec(x11.enumSpec$1.get__O());
21140
- var this$3 = enumSpec.name$1;
21141
- return ((($f_sc_TraversableOnce__mkString__T__T__T__T(this$3, "", "__", "") + "(") + this.typeToStr__Lio_kaitai_struct_datatype_DataType__T(x11.basedOn$1)) + ")")
21157
+ var jsx$2 = this.typeToStr__Lio_kaitai_struct_datatype_DataType__T(x11.basedOn$1);
21158
+ var name$2 = $as_Lio_kaitai_struct_format_EnumSpec(x11.enumSpec$1.get__O()).name$1;
21159
+ return (((("Enum(" + jsx$2) + ", ") + $f_sc_TraversableOnce__mkString__T__T__T__T(name$2, "", "__", "")) + ")")
21142
21160
  } else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
21143
21161
  var x12 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(dataType);
21144
21162
  return this.attrSwitchType__Lio_kaitai_struct_datatype_DataType$SwitchType__T(x12)
@@ -34561,7 +34579,7 @@ function $f_Lio_kaitai_struct_languages_components_GoReads__handleAssignment__Li
34561
34579
  if ((x === rep)) {
34562
34580
  $thiz.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__V(id, expr)
34563
34581
  } else if ((rep instanceof $c_Lio_kaitai_struct_format_RepeatExpr)) {
34564
- $thiz.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__V(id, expr)
34582
+ $thiz.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__V(id, expr)
34565
34583
  } else if ((rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil)) {
34566
34584
  $thiz.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__Z__V(id, expr, isRaw)
34567
34585
  } else {
@@ -63218,29 +63236,33 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.init___Lio_kaitai_struct
63218
63236
  this.returnRes$2 = $m_s_None$();
63219
63237
  this.IMPORT$undCHARMAP$2 = "golang.org/x/text/encoding/charmap";
63220
63238
  var y = new $c_T2().init___O__O("charmap.CodePage437", this.IMPORT$undCHARMAP$2);
63221
- var jsx$6 = new $c_T2().init___O__O("cp437", y);
63239
+ var jsx$8 = new $c_T2().init___O__O("cp437", y);
63222
63240
  var y$1 = new $c_T2().init___O__O("charmap.ISO8859_1", this.IMPORT$undCHARMAP$2);
63223
- var jsx$5 = new $c_T2().init___O__O("iso8859-1", y$1);
63241
+ var jsx$7 = new $c_T2().init___O__O("iso8859-1", y$1);
63224
63242
  var y$2 = new $c_T2().init___O__O("charmap.ISO8859_2", this.IMPORT$undCHARMAP$2);
63225
- var jsx$4 = new $c_T2().init___O__O("iso8859-2", y$2);
63243
+ var jsx$6 = new $c_T2().init___O__O("iso8859-2", y$2);
63226
63244
  var y$3 = new $c_T2().init___O__O("charmap.ISO8859_3", this.IMPORT$undCHARMAP$2);
63227
- var jsx$3 = new $c_T2().init___O__O("iso8859-3", y$3);
63245
+ var jsx$5 = new $c_T2().init___O__O("iso8859-3", y$3);
63228
63246
  var y$4 = new $c_T2().init___O__O("charmap.ISO8859_4", this.IMPORT$undCHARMAP$2);
63229
- var jsx$2 = new $c_T2().init___O__O("iso8859-4", y$4);
63247
+ var jsx$4 = new $c_T2().init___O__O("iso8859-4", y$4);
63230
63248
  var y$5 = new $c_T2().init___O__O("japanese.ShiftJIS", "golang.org/x/text/encoding/japanese");
63231
- var jsx$1 = new $c_T2().init___O__O("sjis", y$5);
63249
+ var jsx$3 = new $c_T2().init___O__O("sjis", y$5);
63232
63250
  var y$6 = new $c_T2().init___O__O("traditionalchinese.Big5", "golang.org/x/text/encoding/traditionalchinese");
63233
- var array = [jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O("big5", y$6)];
63234
- var this$18 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
63251
+ var jsx$2 = new $c_T2().init___O__O("big5", y$6);
63252
+ var y$7 = new $c_T2().init___O__O("unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM)", "golang.org/x/text/encoding/unicode");
63253
+ var jsx$1 = new $c_T2().init___O__O("utf-16le", y$7);
63254
+ var y$8 = new $c_T2().init___O__O("unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM)", "golang.org/x/text/encoding/unicode");
63255
+ 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)];
63256
+ var this$22 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
63235
63257
  var i = 0;
63236
63258
  var len = $uI(array.length);
63237
63259
  while ((i < len)) {
63238
63260
  var index = i;
63239
63261
  var arg1 = array[index];
63240
- this$18.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
63262
+ this$22.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
63241
63263
  i = ((1 + i) | 0)
63242
63264
  };
63243
- this.ENCODINGS$2 = $as_sci_Map(this$18.elems$1);
63265
+ this.ENCODINGS$2 = $as_sci_Map(this$22.elems$1);
63244
63266
  this.localVarNum$2 = 0;
63245
63267
  return this
63246
63268
  });
@@ -69972,6 +69994,9 @@ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.init___Lio_kaitai
69972
69994
  $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList.call(this, provider, importList);
69973
69995
  return this
69974
69996
  });
69997
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
69998
+ return (("'" + label) + "'")
69999
+ });
69975
70000
  var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initClass({
69976
70001
  Lio_kaitai_struct_translators_ConstructTranslator: 0
69977
70002
  }, false, "io.kaitai.struct.translators.ConstructTranslator", {
@@ -72350,6 +72375,14 @@ function $h_Lio_kaitai_struct_languages_CppCompiler() {
72350
72375
  /*<skip>*/
72351
72376
  }
72352
72377
  $h_Lio_kaitai_struct_languages_CppCompiler.prototype = $c_Lio_kaitai_struct_languages_CppCompiler.prototype;
72378
+ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
72379
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
72380
+ this.outSrc$2.puts__T__V("i++;");
72381
+ this.outSrc$2.dec__V();
72382
+ this.outSrc$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
72383
+ this.outSrc$2.dec__V();
72384
+ this.outSrc$2.puts__T__V("}")
72385
+ });
72353
72386
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
72354
72387
  this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$());
72355
72388
  this.outHdr$2.puts__T__V((("bool " + this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
@@ -72368,23 +72401,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.stdMoveWrap__T__T = (functi
72368
72401
  return expr
72369
72402
  }
72370
72403
  });
72371
- $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
72372
- this.importListHdr$2.addSystem__T__V("vector");
72373
- if ((needRaw.level__I() >= 1)) {
72374
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
72375
- if (needRaw.hasIO__Z()) {
72376
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$())) + ";"))
72377
- }
72378
- };
72379
- if ((needRaw.level__I() >= 2)) {
72380
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"))
72381
- };
72382
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"));
72404
+ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
72383
72405
  this.outSrc$2.puts__T__V("{");
72384
72406
  this.outSrc$2.inc__V();
72385
72407
  this.outSrc$2.puts__T__V("int i = 0;");
72386
- this.outSrc$2.puts__T__V((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(dataType.asNonOwning__Lio_kaitai_struct_datatype_DataType(), false) + " ") + this.translator$2.doName__T__T("_")) + ";"));
72387
- this.outSrc$2.puts__T__V("do {");
72408
+ this.outSrc$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
72388
72409
  this.outSrc$2.inc__V()
72389
72410
  });
72390
72411
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.needsDestruction__Lio_kaitai_struct_datatype_DataType__Z = (function(t) {
@@ -72432,6 +72453,19 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.switchIfElseStart__V = (fun
72432
72453
  this.outSrc$2.puts__T__V("else {");
72433
72454
  this.outSrc$2.inc__V()
72434
72455
  });
72456
+ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
72457
+ this.importListHdr$2.addSystem__T__V("vector");
72458
+ if ((needRaw.level__I() >= 1)) {
72459
+ this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
72460
+ if (needRaw.hasIO__Z()) {
72461
+ this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$())) + ";"))
72462
+ }
72463
+ };
72464
+ if ((needRaw.level__I() >= 2)) {
72465
+ this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"))
72466
+ };
72467
+ this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"))
72468
+ });
72435
72469
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.importDataType__Lio_kaitai_struct_datatype_DataType__V = (function(dt) {
72436
72470
  if ((dt instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
72437
72471
  var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dt);
@@ -72509,24 +72543,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.destructVector__T__T__V = (
72509
72543
  this.outSrc$2.dec__V();
72510
72544
  this.outSrc$2.puts__T__V("}")
72511
72545
  });
72512
- $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
72513
- this.importListHdr$2.addSystem__T__V("vector");
72514
- if ((needRaw.level__I() >= 1)) {
72515
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
72516
- if (needRaw.hasIO__Z()) {
72517
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$())) + ";"))
72518
- }
72519
- };
72520
- if ((needRaw.level__I() >= 2)) {
72521
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"))
72522
- };
72523
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"));
72524
- this.outSrc$2.puts__T__V("{");
72525
- this.outSrc$2.inc__V();
72526
- this.outSrc$2.puts__T__V("int i = 0;");
72527
- this.outSrc$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
72528
- this.outSrc$2.inc__V()
72529
- });
72530
72546
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
72531
72547
  return ("m_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
72532
72548
  });
@@ -73085,6 +73101,12 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.destructWithSafeguardHeader
73085
73101
  this.outSrc$2.puts__T__V((("if (" + ptr) + ") {"));
73086
73102
  this.outSrc$2.inc__V()
73087
73103
  });
73104
+ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
73105
+ var lenVar = ("l_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id));
73106
+ this.outSrc$2.puts__T__V((((("const int " + lenVar) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
73107
+ this.outSrc$2.puts__T__V((("for (int i = 0; i < " + lenVar) + "; i++) {"));
73108
+ this.outSrc$2.inc__V()
73109
+ });
73088
73110
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
73089
73111
  return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
73090
73112
  });
@@ -73179,7 +73201,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentRepeatEos__
73179
73201
  this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "->push_back(") + this.stdMoveWrap__T__T(expr)) + ");"))
73180
73202
  });
73181
73203
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
73182
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "->push_back(") + this.stdMoveWrap__T__T(expr)) + ");"))
73204
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
73183
73205
  });
73184
73206
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classHeader__sci_List__V = (function(name) {
73185
73207
  var jsx$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
@@ -73293,6 +73315,14 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classConstructorFooter__V =
73293
73315
  this.outSrc$2.dec__V();
73294
73316
  this.outSrc$2.puts__T__V("}")
73295
73317
  });
73318
+ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
73319
+ this.outSrc$2.puts__T__V("{");
73320
+ this.outSrc$2.inc__V();
73321
+ this.outSrc$2.puts__T__V("int i = 0;");
73322
+ this.outSrc$2.puts__T__V((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(dataType.asNonOwning__Lio_kaitai_struct_datatype_DataType(), false) + " ") + this.translator$2.doName__T__T("_")) + ";"));
73323
+ this.outSrc$2.puts__T__V("do {");
73324
+ this.outSrc$2.inc__V()
73325
+ });
73296
73326
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
73297
73327
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
73298
73328
  });
@@ -73347,30 +73377,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.readFooter__V = (function()
73347
73377
  this.outSrc$2.dec__V();
73348
73378
  this.outSrc$2.puts__T__V("}")
73349
73379
  });
73350
- $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
73351
- this.importListHdr$2.addSystem__T__V("vector");
73352
- var lenVar = ("l_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id));
73353
- this.outSrc$2.puts__T__V((((("int " + lenVar) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
73354
- if ((needRaw.level__I() >= 1)) {
73355
- var rawId = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id));
73356
- this.outSrc$2.puts__T__V((((rawId + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
73357
- this.outSrc$2.puts__T__V((((rawId + "->reserve(") + lenVar) + ");"));
73358
- if (needRaw.hasIO__Z()) {
73359
- var ioId = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)));
73360
- this.outSrc$2.puts__T__V((((ioId + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$())) + ";"));
73361
- this.outSrc$2.puts__T__V((((ioId + "->reserve(") + lenVar) + ");"))
73362
- }
73363
- };
73364
- if ((needRaw.level__I() >= 2)) {
73365
- var rawId$2 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)));
73366
- this.outSrc$2.puts__T__V((((rawId$2 + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
73367
- this.outSrc$2.puts__T__V((((rawId$2 + "->reserve(") + lenVar) + ");"))
73368
- };
73369
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"));
73370
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "->reserve(") + lenVar) + ");"));
73371
- this.outSrc$2.puts__T__V((("for (int i = 0; i < " + lenVar) + "; i++) {"));
73372
- this.outSrc$2.inc__V()
73373
- });
73374
73380
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
73375
73381
  var x = $m_Lio_kaitai_struct_datatype_EndOfStreamError$();
73376
73382
  if ((x === err)) {
@@ -73753,14 +73759,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.translator__Lio_kaitai_stru
73753
73759
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classDestructorFooter__V = (function() {
73754
73760
  this.classConstructorFooter__V()
73755
73761
  });
73756
- $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
73757
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
73758
- this.outSrc$2.puts__T__V("i++;");
73759
- this.outSrc$2.dec__V();
73760
- this.outSrc$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
73761
- this.outSrc$2.dec__V();
73762
- this.outSrc$2.puts__T__V("}")
73763
- });
73764
73762
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
73765
73763
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V(this, instName, dataType, value)
73766
73764
  });
@@ -74400,6 +74398,16 @@ function $h_Lio_kaitai_struct_languages_GoCompiler() {
74400
74398
  /*<skip>*/
74401
74399
  }
74402
74400
  $h_Lio_kaitai_struct_languages_GoCompiler.prototype = $c_Lio_kaitai_struct_languages_GoCompiler.prototype;
74401
+ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
74402
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
74403
+ this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + " {"));
74404
+ this.out$2.inc__V();
74405
+ this.out$2.puts__T__V("break");
74406
+ this.out$2.dec__V();
74407
+ this.out$2.puts__T__V("}");
74408
+ this.out$2.dec__V();
74409
+ this.out$2.puts__T__V("}")
74410
+ });
74403
74411
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchEnd__V = (function() {
74404
74412
  this.out$2.puts__T__V("}")
74405
74413
  });
@@ -74407,15 +74415,17 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceDeclaration__Lio_kai
74407
74415
  this.out$2.puts__T__V((this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName) + " bool"));
74408
74416
  this.out$2.puts__T__V(((this.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName) + " ") + $m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(attrType)))
74409
74417
  });
74410
- $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
74411
- if ((needRaw.level__I() >= 1)) {
74412
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = make([][]byte, 0);"))
74413
- };
74414
- if ((needRaw.level__I() >= 2)) {
74415
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = make([][]byte, 0);"))
74416
- };
74418
+ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
74417
74419
  this.out$2.puts__T__V("for i := 1;; i++ {");
74418
- this.out$2.inc__V()
74420
+ this.out$2.inc__V();
74421
+ var eofVar = this.translator$2.allocateLocalVar__I();
74422
+ this.out$2.puts__T__V((this.translator$2.localVarName__I__T(eofVar) + ", err := this._io.EOF()"));
74423
+ this.translator$2.outAddErrCheck__V();
74424
+ this.out$2.puts__T__V((("if " + this.translator$2.localVarName__I__T(eofVar)) + " {"));
74425
+ this.out$2.inc__V();
74426
+ this.out$2.puts__T__V("break");
74427
+ this.out$2.dec__V();
74428
+ this.out$2.puts__T__V("}")
74419
74429
  });
74420
74430
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchCaseStartCompareFn__T__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(compareFn, switchOn, condition) {
74421
74431
  this.out$2.puts__T__V((((((("case " + compareFn) + "(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, switchOn)) + ", ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, condition)) + "):"));
@@ -74424,6 +74434,9 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchCaseStartCompareFn__T_
74424
74434
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
74425
74435
  this.outHeader$2 = x$1
74426
74436
  });
74437
+ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
74438
+ /*<skip>*/
74439
+ });
74427
74440
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
74428
74441
  this.out$2.puts__T__V((("switch " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_EndianIdentifier$())) + " {"));
74429
74442
  this.out$2.puts__T__V("case 0:");
@@ -74445,24 +74458,6 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceHeader__sci_List__Li
74445
74458
  this.out$2.inc__V();
74446
74459
  this.translator$2.returnRes$2 = new $c_s_Some().init___O(((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType) ? "0" : ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BooleanType) ? "false" : ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType) ? "\"\"" : "nil"))))
74447
74460
  });
74448
- $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
74449
- if ((needRaw.level__I() >= 1)) {
74450
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = make([][]byte, 0);"))
74451
- };
74452
- if ((needRaw.level__I() >= 2)) {
74453
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = make([][]byte, 0);"))
74454
- };
74455
- this.out$2.puts__T__V("for i := 1;; i++ {");
74456
- this.out$2.inc__V();
74457
- var eofVar = this.translator$2.allocateLocalVar__I();
74458
- this.out$2.puts__T__V((this.translator$2.localVarName__I__T(eofVar) + ", err := this._io.EOF()"));
74459
- this.translator$2.outAddErrCheck__V();
74460
- this.out$2.puts__T__V((("if " + this.translator$2.localVarName__I__T(eofVar)) + " {"));
74461
- this.out$2.inc__V();
74462
- this.out$2.puts__T__V("break");
74463
- this.out$2.dec__V();
74464
- this.out$2.puts__T__V("}")
74465
- });
74466
74461
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
74467
74462
  return ("this." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
74468
74463
  });
@@ -74711,10 +74706,10 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.idToStr__Lio_kaitai_struct_f
74711
74706
  throw new $c_s_MatchError().init___O(id)
74712
74707
  }
74713
74708
  });
74714
- $c_Lio_kaitai_struct_languages_GoCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__V = (function(id, r) {
74715
- var name = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
74716
- var expr = this.translator$2.resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(r);
74717
- this.out$2.puts__T__V(((name + "[i] = ") + expr))
74709
+ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
74710
+ this.out$2.puts__T__V((("for i := 0; i < int(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "); i++ {"));
74711
+ this.out$2.inc__V();
74712
+ this.out$2.puts__T__V("_ = i")
74718
74713
  });
74719
74714
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.alignToByte__T__V = (function(io) {
74720
74715
  this.out$2.puts__T__V((io + ".AlignToByte()"))
@@ -74817,6 +74812,10 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchCaseStart__Lio_kaitai_
74817
74812
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.classConstructorFooter__V = (function() {
74818
74813
  /*<skip>*/
74819
74814
  });
74815
+ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
74816
+ this.out$2.puts__T__V("for i := 1;; i++ {");
74817
+ this.out$2.inc__V()
74818
+ });
74820
74819
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignType) {
74821
74820
  $f_Lio_kaitai_struct_languages_components_GoReads__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignType)
74822
74821
  });
@@ -74867,17 +74866,6 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.readFooter__V = (function()
74867
74866
  this.out$2.puts__T__V("return err");
74868
74867
  this.universalFooter__V()
74869
74868
  });
74870
- $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
74871
- if ((needRaw.level__I() >= 1)) {
74872
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = make([][]byte, ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
74873
- };
74874
- if ((needRaw.level__I() >= 2)) {
74875
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = make([][]byte, ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
74876
- };
74877
- this.out$2.puts__T__V((((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = make(") + $m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType))) + ", ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"));
74878
- this.out$2.puts__T__V((("for i := range " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + " {"));
74879
- this.out$2.inc__V()
74880
- });
74881
74869
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
74882
74870
  this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
74883
74871
  });
@@ -75006,7 +74994,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.normalIO__T = (function() {
75006
74994
  });
75007
74995
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__Z__V = (function(id, r, isRaw) {
75008
74996
  var expr = this.translator$2.resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(r);
75009
- var tempVar = this.translator$2.specialName__T__T($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1);
74997
+ var tempVar = this.translator$2.specialName__T__T((isRaw ? $m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1 : $m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1));
75010
74998
  this.out$2.puts__T__V(((tempVar + " := ") + expr));
75011
74999
  this.out$2.puts__T__V((((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = append(") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + ", ") + tempVar) + ")"))
75012
75000
  });
@@ -75106,16 +75094,6 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.calculatedFlagForName__Lio_k
75106
75094
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
75107
75095
  return this.translator$2
75108
75096
  });
75109
- $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
75110
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
75111
- this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + " {"));
75112
- this.out$2.inc__V();
75113
- this.out$2.puts__T__V("break");
75114
- this.out$2.dec__V();
75115
- this.out$2.puts__T__V("}");
75116
- this.out$2.dec__V();
75117
- this.out$2.puts__T__V("}")
75118
- });
75119
75097
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.universalFooter__V = (function() {
75120
75098
  this.out$2.dec__V();
75121
75099
  this.out$2.puts__T__V("}")
@@ -75270,6 +75248,12 @@ function $h_Lio_kaitai_struct_languages_JavaScriptCompiler() {
75270
75248
  /*<skip>*/
75271
75249
  }
75272
75250
  $h_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype = $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype;
75251
+ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
75252
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
75253
+ this.out$2.puts__T__V("i++;");
75254
+ this.out$2.dec__V();
75255
+ this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
75256
+ });
75273
75257
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchEnd__V = (function() {
75274
75258
  this.out$2.puts__T__V("}")
75275
75259
  });
@@ -75288,19 +75272,9 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classToString__Lio_k
75288
75272
  this.out$2.dec__V();
75289
75273
  this.out$2.puts__T__V("}")
75290
75274
  });
75291
- $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
75292
- if ((needRaw.level__I() >= 1)) {
75293
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = []"))
75294
- };
75295
- if ((needRaw.level__I() >= 2)) {
75296
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
75297
- };
75298
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
75299
- if (this.config$1.readStoresPos$1) {
75300
- this.out$2.puts__T__V((("this._debug." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + ".arr = [];"))
75301
- };
75275
+ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
75302
75276
  this.out$2.puts__T__V("var i = 0;");
75303
- this.out$2.puts__T__V("do {");
75277
+ this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
75304
75278
  this.out$2.inc__V()
75305
75279
  });
75306
75280
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
@@ -75310,6 +75284,18 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchIfElseStart__V
75310
75284
  this.out$2.puts__T__V("else {");
75311
75285
  this.out$2.inc__V()
75312
75286
  });
75287
+ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
75288
+ if ((needRaw.level__I() >= 1)) {
75289
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = [];"))
75290
+ };
75291
+ if ((needRaw.level__I() >= 2)) {
75292
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
75293
+ };
75294
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
75295
+ if (this.config$1.readStoresPos$1) {
75296
+ this.out$2.puts__T__V((("this._debug." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + ".arr = [];"))
75297
+ }
75298
+ });
75313
75299
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
75314
75300
  this.out$2.puts__T__V("if (this._is_le) {");
75315
75301
  this.out$2.inc__V();
@@ -75332,21 +75318,6 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceHeader__sci_
75332
75318
  this.out$2.puts__T__V("get: function() {");
75333
75319
  this.out$2.inc__V()
75334
75320
  });
75335
- $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
75336
- if ((needRaw.level__I() >= 1)) {
75337
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = [];"))
75338
- };
75339
- if ((needRaw.level__I() >= 2)) {
75340
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
75341
- };
75342
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
75343
- if (this.config$1.readStoresPos$1) {
75344
- this.out$2.puts__T__V((("this._debug." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + ".arr = [];"))
75345
- };
75346
- this.out$2.puts__T__V("var i = 0;");
75347
- this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
75348
- this.out$2.inc__V()
75349
- });
75350
75321
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
75351
75322
  return ("this." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
75352
75323
  });
@@ -75817,6 +75788,10 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.idToStr__Lio_kaitai_
75817
75788
  throw new $c_s_MatchError().init___O(id)
75818
75789
  }
75819
75790
  });
75791
+ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
75792
+ this.out$2.puts__T__V((("for (var i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++) {"));
75793
+ this.out$2.inc__V()
75794
+ });
75820
75795
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
75821
75796
  return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
75822
75797
  });
@@ -75862,7 +75837,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentRepe
75862
75837
  this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".push(") + expr) + ");"))
75863
75838
  });
75864
75839
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
75865
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i] = ") + expr) + ";"))
75840
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
75866
75841
  });
75867
75842
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
75868
75843
  if ((endian instanceof $c_s_Some)) {
@@ -75917,6 +75892,11 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classConstructorFoot
75917
75892
  this.out$2.dec__V();
75918
75893
  this.out$2.puts__T__V("}")
75919
75894
  });
75895
+ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
75896
+ this.out$2.puts__T__V("var i = 0;");
75897
+ this.out$2.puts__T__V("do {");
75898
+ this.out$2.inc__V()
75899
+ });
75920
75900
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
75921
75901
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
75922
75902
  });
@@ -75959,20 +75939,6 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.readFooter__V = (fun
75959
75939
  this.out$2.dec__V();
75960
75940
  this.out$2.puts__T__V("}")
75961
75941
  });
75962
- $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
75963
- if ((needRaw.level__I() >= 1)) {
75964
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = new Array(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ");"))
75965
- };
75966
- if ((needRaw.level__I() >= 2)) {
75967
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new Array(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ");"))
75968
- };
75969
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = new Array(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ");"));
75970
- if (this.config$1.readStoresPos$1) {
75971
- this.out$2.puts__T__V((((("this._debug." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + ".arr = new Array(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ");"))
75972
- };
75973
- this.out$2.puts__T__V((("for (var i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++) {"));
75974
- this.out$2.inc__V()
75975
- });
75976
75942
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
75977
75943
  this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
75978
75944
  });
@@ -76230,12 +76196,6 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.translator__Lio_kait
76230
76196
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
76231
76197
  return this.translator$2
76232
76198
  });
76233
- $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
76234
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
76235
- this.out$2.puts__T__V("i++;");
76236
- this.out$2.dec__V();
76237
- this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
76238
- });
76239
76199
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrDebugName__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__Z__T = (function(attrId, rep, end) {
76240
76200
  var x = $m_Lio_kaitai_struct_format_NoRepeat$();
76241
76201
  if ((x === rep)) {
@@ -76346,19 +76306,18 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.classHeader__sci_List__s_Op
76346
76306
  jsx$1.puts__T__V(((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$1)) + ext) + " {"));
76347
76307
  this.out$2.inc__V()
76348
76308
  });
76309
+ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
76310
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
76311
+ this.out$2.puts__T__V("$i++;");
76312
+ this.out$2.dec__V();
76313
+ this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
76314
+ });
76349
76315
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.switchEnd__V = (function() {
76350
76316
  this.universalFooter__V()
76351
76317
  });
76352
- $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
76353
- if ((needRaw.level__I() >= 1)) {
76354
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = [];"))
76355
- };
76356
- if ((needRaw.level__I() >= 2)) {
76357
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
76358
- };
76359
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
76318
+ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
76360
76319
  this.out$2.puts__T__V("$i = 0;");
76361
- this.out$2.puts__T__V("do {");
76320
+ this.out$2.puts__T__V((("while (!" + io) + "->isEof()) {"));
76362
76321
  this.out$2.inc__V()
76363
76322
  });
76364
76323
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
@@ -76422,6 +76381,15 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.kaitaiType2NativeType__Lio_
76422
76381
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
76423
76382
  this.outHeader$2 = x$1
76424
76383
  });
76384
+ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
76385
+ if ((needRaw.level__I() >= 1)) {
76386
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = [];"))
76387
+ };
76388
+ if ((needRaw.level__I() >= 2)) {
76389
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
76390
+ };
76391
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"))
76392
+ });
76425
76393
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
76426
76394
  this.out$2.puts__T__V("if ($this->_m__is_le) {");
76427
76395
  this.out$2.inc__V();
@@ -76437,18 +76405,6 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceHeader__sci_List__L
76437
76405
  this.out$2.puts__T__V((("public function " + this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "() {"));
76438
76406
  this.out$2.inc__V()
76439
76407
  });
76440
- $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
76441
- if ((needRaw.level__I() >= 1)) {
76442
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = [];"))
76443
- };
76444
- if ((needRaw.level__I() >= 2)) {
76445
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
76446
- };
76447
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
76448
- this.out$2.puts__T__V("$i = 0;");
76449
- this.out$2.puts__T__V((("while (!" + io) + "->isEof()) {"));
76450
- this.out$2.inc__V()
76451
- });
76452
76408
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
76453
76409
  var x = $m_Lio_kaitai_struct_format_IoIdentifier$();
76454
76410
  if (x.equals__O__Z(id)) {
@@ -76757,6 +76713,11 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.idToStr__Lio_kaitai_struct_
76757
76713
  throw new $c_s_MatchError().init___O(id)
76758
76714
  }
76759
76715
  });
76716
+ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
76717
+ this.out$2.puts__T__V((("$n = " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
76718
+ this.out$2.puts__T__V("for ($i = 0; $i < $n; $i++) {");
76719
+ this.out$2.inc__V()
76720
+ });
76760
76721
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.alignToByte__T__V = (function(io) {
76761
76722
  this.out$2.puts__T__V((io + "->alignToByte();"))
76762
76723
  });
@@ -76812,7 +76773,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatEos__
76812
76773
  this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[] = ") + expr) + ";"))
76813
76774
  });
76814
76775
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
76815
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[] = ") + expr) + ";"))
76776
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
76816
76777
  });
76817
76778
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
76818
76779
  if ((endian instanceof $c_s_Some)) {
@@ -76850,6 +76811,11 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.switchCaseStart__Lio_kaitai
76850
76811
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.classConstructorFooter__V = (function() {
76851
76812
  this.universalFooter__V()
76852
76813
  });
76814
+ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
76815
+ this.out$2.puts__T__V("$i = 0;");
76816
+ this.out$2.puts__T__V("do {");
76817
+ this.out$2.inc__V()
76818
+ });
76853
76819
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
76854
76820
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
76855
76821
  });
@@ -76891,18 +76857,6 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.io$kaitai$struct$languages$
76891
76857
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.readFooter__V = (function() {
76892
76858
  this.universalFooter__V()
76893
76859
  });
76894
- $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
76895
- if ((needRaw.level__I() >= 1)) {
76896
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = [];"))
76897
- };
76898
- if ((needRaw.level__I() >= 2)) {
76899
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
76900
- };
76901
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
76902
- this.out$2.puts__T__V((("$n = " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
76903
- this.out$2.puts__T__V("for ($i = 0; $i < $n; $i++) {");
76904
- this.out$2.inc__V()
76905
- });
76906
76860
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
76907
76861
  this.translator$2.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(on);
76908
76862
  this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"));
@@ -77115,12 +77069,6 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.translator__Lio_kaitai_stru
77115
77069
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
77116
77070
  return this.translator$2
77117
77071
  });
77118
- $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
77119
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
77120
- this.out$2.puts__T__V("$i++;");
77121
- this.out$2.dec__V();
77122
- this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
77123
- });
77124
77072
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.universalFooter__V = (function() {
77125
77073
  this.out$2.dec__V();
77126
77074
  this.out$2.puts__T__V("}")
@@ -77190,18 +77138,16 @@ function $h_Lio_kaitai_struct_languages_PerlCompiler() {
77190
77138
  /*<skip>*/
77191
77139
  }
77192
77140
  $h_Lio_kaitai_struct_languages_PerlCompiler.prototype = $c_Lio_kaitai_struct_languages_PerlCompiler.prototype;
77141
+ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
77142
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
77143
+ this.out$2.dec__V();
77144
+ this.out$2.puts__T__V((("} until (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ");"))
77145
+ });
77193
77146
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchEnd__V = (function() {
77194
77147
  /*<skip>*/
77195
77148
  });
77196
- $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
77197
- if ((needRaw.level__I() >= 1)) {
77198
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = ();"))
77199
- };
77200
- if ((needRaw.level__I() >= 2)) {
77201
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ();"))
77202
- };
77203
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"));
77204
- this.out$2.puts__T__V("do {");
77149
+ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
77150
+ this.out$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
77205
77151
  this.out$2.inc__V()
77206
77152
  });
77207
77153
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
@@ -77211,6 +77157,15 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchIfElseStart__V = (fu
77211
77157
  this.out$2.puts__T__V("else {");
77212
77158
  this.out$2.inc__V()
77213
77159
  });
77160
+ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
77161
+ if ((needRaw.level__I() >= 1)) {
77162
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = ();"))
77163
+ };
77164
+ if ((needRaw.level__I() >= 2)) {
77165
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ();"))
77166
+ };
77167
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"))
77168
+ });
77214
77169
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
77215
77170
  this.out$2.puts__T__V((("if (" + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_EndianIdentifier$())) + ") {"));
77216
77171
  this.out$2.inc__V();
@@ -77232,17 +77187,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceHeader__sci_List__
77232
77187
  this.out$2.inc__V();
77233
77188
  this.out$2.puts__T__V("my ($self) = @_;")
77234
77189
  });
77235
- $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
77236
- if ((needRaw.level__I() >= 1)) {
77237
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = ();"))
77238
- };
77239
- if ((needRaw.level__I() >= 2)) {
77240
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ();"))
77241
- };
77242
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"));
77243
- this.out$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
77244
- this.out$2.inc__V()
77245
- });
77246
77190
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchIfStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__V = (function(id, on, onType) {
77247
77191
  this.typeProvider$1.$$undcurrentSwitchType$1 = new $c_s_Some().init___O(this.translator$2.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(on));
77248
77192
  this.out$2.puts__T__V((("my $_on = " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ";"))
@@ -77439,6 +77383,12 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.idToStr__Lio_kaitai_struct
77439
77383
  throw new $c_s_MatchError().init___O(id)
77440
77384
  }
77441
77385
  });
77386
+ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
77387
+ var nVar = ("$n_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id));
77388
+ this.out$2.puts__T__V((((("my " + nVar) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
77389
+ this.out$2.puts__T__V((("for (my $i = 0; $i < " + nVar) + "; $i++) {"));
77390
+ this.out$2.inc__V()
77391
+ });
77442
77392
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.alignToByte__T__V = (function(io) {
77443
77393
  this.out$2.puts__T__V((io + "->align_to_byte();"))
77444
77394
  });
@@ -77491,7 +77441,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatEos_
77491
77441
  this.out$2.puts__T__V((((("push @{" + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + "}, ") + expr) + ";"))
77492
77442
  });
77493
77443
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
77494
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[$i] = ") + expr) + ";"))
77444
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
77495
77445
  });
77496
77446
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classHeader__sci_List__V = (function(name) {
77497
77447
  var this$1 = this.out$2;
@@ -77549,6 +77499,10 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classConstructorFooter__V
77549
77499
  this.out$2.puts__T__V("return $self;");
77550
77500
  this.universalFooter__V()
77551
77501
  });
77502
+ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
77503
+ this.out$2.puts__T__V("do {");
77504
+ this.out$2.inc__V()
77505
+ });
77552
77506
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.onComparisonExpr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr$Compare = (function(condition) {
77553
77507
  return new $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare().init___Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr(new $c_Lio_kaitai_struct_exprlang_Ast$expr$Name().init___Lio_kaitai_struct_exprlang_Ast$identifier(new $c_Lio_kaitai_struct_exprlang_Ast$identifier().init___T("_on")), $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$(), condition)
77554
77508
  });
@@ -77592,19 +77546,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.io$kaitai$struct$languages
77592
77546
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.readFooter__V = (function() {
77593
77547
  this.universalFooter__V()
77594
77548
  });
77595
- $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
77596
- if ((needRaw.level__I() >= 1)) {
77597
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = ();"))
77598
- };
77599
- if ((needRaw.level__I() >= 2)) {
77600
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ();"))
77601
- };
77602
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"));
77603
- var nVar = ("$n_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id));
77604
- this.out$2.puts__T__V((((("my " + nVar) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
77605
- this.out$2.puts__T__V((("for (my $i = 0; $i < " + nVar) + "; $i++) {"));
77606
- this.out$2.inc__V()
77607
- });
77608
77549
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
77609
77550
  /*<skip>*/
77610
77551
  });
@@ -77752,11 +77693,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.translator__Lio_kaitai_str
77752
77693
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
77753
77694
  return this.translator$2
77754
77695
  });
77755
- $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
77756
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
77757
- this.out$2.dec__V();
77758
- this.out$2.puts__T__V((("} until (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ");"))
77759
- });
77760
77696
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.universalFooter__V = (function() {
77761
77697
  this.out$2.dec__V();
77762
77698
  this.out$2.puts__T__V("}")
@@ -77861,21 +77797,20 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.classHeader__sci_List__s_O
77861
77797
  this.out$2.puts__T__V("#[derive(Default)]");
77862
77798
  this.out$2.puts__T__V((("pub struct " + $m_Lio_kaitai_struct_languages_RustCompiler$().types2classRel__sci_List__T(name)) + " {"))
77863
77799
  });
77800
+ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
77801
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
77802
+ this.out$2.puts__T__V((("!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ")"));
77803
+ this.out$2.dec__V();
77804
+ this.out$2.puts__T__V("} { }")
77805
+ });
77864
77806
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchEnd__V = (function() {
77865
77807
  this.universalFooter__V()
77866
77808
  });
77867
77809
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
77868
77810
  this.out$2.puts__T__V(((((" pub " + this.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + ": Option<") + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(attrType)) + ">,"))
77869
77811
  });
77870
- $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
77871
- if ((needRaw.level__I() >= 1)) {
77872
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = vec!();"))
77873
- };
77874
- if ((needRaw.level__I() >= 2)) {
77875
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = vec!();"))
77876
- };
77877
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = vec!();"));
77878
- this.out$2.puts__T__V("while {");
77812
+ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
77813
+ this.out$2.puts__T__V((("while !" + io) + ".isEof() {"));
77879
77814
  this.out$2.inc__V()
77880
77815
  });
77881
77816
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
@@ -78087,6 +78022,15 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.kaitaiType2NativeType__Lio
78087
78022
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
78088
78023
  this.outHeader$2 = x$1
78089
78024
  });
78025
+ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
78026
+ if ((needRaw.level__I() >= 1)) {
78027
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = vec!();"))
78028
+ };
78029
+ if ((needRaw.level__I() >= 2)) {
78030
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = vec!();"))
78031
+ };
78032
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = vec!();"))
78033
+ });
78090
78034
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
78091
78035
  this.out$2.puts__T__V("if ($this->_m__is_le) {");
78092
78036
  this.out$2.inc__V();
@@ -78102,17 +78046,6 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.instanceHeader__sci_List__
78102
78046
  this.out$2.puts__T__V((((("fn " + this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "(&mut self) -> ") + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType)) + " {"));
78103
78047
  this.out$2.inc__V()
78104
78048
  });
78105
- $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
78106
- if ((needRaw.level__I() >= 1)) {
78107
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = [];"))
78108
- };
78109
- if ((needRaw.level__I() >= 2)) {
78110
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
78111
- };
78112
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
78113
- this.out$2.puts__T__V((("while !" + io) + ".isEof() {"));
78114
- this.out$2.inc__V()
78115
- });
78116
78049
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
78117
78050
  var x = $m_Lio_kaitai_struct_format_IoIdentifier$();
78118
78051
  if (x.equals__O__Z(id)) {
@@ -78367,6 +78300,10 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.idToStr__Lio_kaitai_struct
78367
78300
  throw new $c_s_MatchError().init___O(id)
78368
78301
  }
78369
78302
  });
78303
+ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
78304
+ this.out$2.puts__T__V((("for i in 0.." + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + " {"));
78305
+ this.out$2.inc__V()
78306
+ });
78370
78307
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.alignToByte__T__V = (function(io) {
78371
78308
  this.out$2.puts__T__V((io + ".alignToByte();"))
78372
78309
  });
@@ -78391,7 +78328,7 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchCaseEnd__V = (functi
78391
78328
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__T__Z__V = (function(id, expr, isRaw) {
78392
78329
  var tempVar = (isRaw ? this.translator$2.doLocalName__T__T($m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1) : this.translator$2.doLocalName__T__T($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1));
78393
78330
  this.out$2.puts__T__V((((("let " + tempVar) + " = ") + expr) + ";"));
78394
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + expr) + ");"))
78331
+ this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + tempVar) + ");"))
78395
78332
  });
78396
78333
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.opaqueClassDeclaration__Lio_kaitai_struct_format_ClassSpec__V = (function(classSpec) {
78397
78334
  var this$1 = classSpec.name$1;
@@ -78439,10 +78376,10 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condIfHeader__Lio_kaitai_s
78439
78376
  this.out$2.inc__V()
78440
78377
  });
78441
78378
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
78442
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".push(") + expr) + ");"))
78379
+ this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + expr) + ");"))
78443
78380
  });
78444
78381
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
78445
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".push(") + expr) + ");"))
78382
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
78446
78383
  });
78447
78384
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.classHeader__sci_List__V = (function(name) {
78448
78385
  this.classHeader__sci_List__s_Option__V(name, new $c_s_Some().init___O("&Option<Box<KaitaiStruct>>"))
@@ -78476,6 +78413,10 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchCaseStart__Lio_kaita
78476
78413
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.classConstructorFooter__V = (function() {
78477
78414
  this.universalFooter__V()
78478
78415
  });
78416
+ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
78417
+ this.out$2.puts__T__V("while {");
78418
+ this.out$2.inc__V()
78419
+ });
78479
78420
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
78480
78421
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
78481
78422
  });
@@ -78515,17 +78456,6 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.readFooter__V = (function(
78515
78456
  this.out$2.dec__V();
78516
78457
  this.out$2.puts__T__V("}")
78517
78458
  });
78518
- $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
78519
- if ((needRaw.level__I() >= 1)) {
78520
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = vec!();"))
78521
- };
78522
- if ((needRaw.level__I() >= 2)) {
78523
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = vec!();"))
78524
- };
78525
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = vec!();"));
78526
- this.out$2.puts__T__V((("for i in 0.." + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + " {"));
78527
- this.out$2.inc__V()
78528
- });
78529
78459
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
78530
78460
  var onType = this.translator$2.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(on);
78531
78461
  this.switchIfs$2 = ((onType instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream) || (onType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType));
@@ -78725,12 +78655,6 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.translator__Lio_kaitai_str
78725
78655
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
78726
78656
  return this.translator$2
78727
78657
  });
78728
- $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
78729
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
78730
- this.out$2.puts__T__V((("!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ")"));
78731
- this.out$2.dec__V();
78732
- this.out$2.puts__T__V("} { }")
78733
- });
78734
78658
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.universalFooter__V = (function() {
78735
78659
  this.out$2.dec__V();
78736
78660
  this.out$2.puts__T__V("}")
@@ -78820,13 +78744,21 @@ function $h_Lio_kaitai_struct_languages_CSharpCompiler() {
78820
78744
  /*<skip>*/
78821
78745
  }
78822
78746
  $h_Lio_kaitai_struct_languages_CSharpCompiler.prototype = $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype;
78823
- $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchEnd__V = (function() {
78747
+ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
78748
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
78749
+ this.out$2.puts__T__V("i++;");
78750
+ this.out$2.dec__V();
78751
+ this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
78752
+ this.out$2.dec__V();
78824
78753
  this.out$2.puts__T__V("}")
78825
78754
  });
78826
78755
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
78827
78756
  this.out$2.puts__T__V((("private bool " + this.flagForInstName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
78828
78757
  this.out$2.puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, isNullable)) + " ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
78829
78758
  });
78759
+ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchEnd__V = (function() {
78760
+ this.out$2.puts__T__V("}")
78761
+ });
78830
78762
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
78831
78763
  this.out$2.puts__T__V(((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_datatype_DataType__Z__T(dataType, isNullable)) + " ") + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)));
78832
78764
  this.out$2.puts__T__V("{");
@@ -78835,21 +78767,11 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceHeader__T__Lio_k
78835
78767
  this.out$2.puts__T__V("{");
78836
78768
  this.out$2.inc__V()
78837
78769
  });
78838
- $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
78839
- var this$1 = this.importList$2;
78840
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
78841
- if ((needRaw.level__I() >= 1)) {
78842
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = new List<byte[]>();"))
78843
- };
78844
- if ((needRaw.level__I() >= 2)) {
78845
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new List<byte[]>();"))
78846
- };
78847
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = new ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType))) + "();"));
78770
+ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
78848
78771
  this.out$2.puts__T__V("{");
78849
78772
  this.out$2.inc__V();
78850
78773
  this.out$2.puts__T__V("var i = 0;");
78851
- this.out$2.puts__T__V(((($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType) + " ") + this.translator$2.doName__T__T("_")) + ";"));
78852
- this.out$2.puts__T__V("do {");
78774
+ this.out$2.puts__T__V((("while (!" + io) + ".IsEof) {"));
78853
78775
  this.out$2.inc__V()
78854
78776
  });
78855
78777
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
@@ -78863,6 +78785,17 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchIfElseStart__V = (
78863
78785
  this.out$2.puts__T__V("{");
78864
78786
  this.out$2.inc__V()
78865
78787
  });
78788
+ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
78789
+ var this$1 = this.importList$2;
78790
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
78791
+ if ((needRaw.level__I() >= 1)) {
78792
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = new List<byte[]>();"))
78793
+ };
78794
+ if ((needRaw.level__I() >= 2)) {
78795
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new List<byte[]>();"))
78796
+ };
78797
+ this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = new ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType))) + "();"))
78798
+ });
78866
78799
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classHeader__T__V = (function(name) {
78867
78800
  this.out$2.puts__T__V((("public partial class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " : KaitaiStruct"));
78868
78801
  this.out$2.puts__T__V("{");
@@ -78895,22 +78828,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchCasesUsingIf__Lio_
78895
78828
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
78896
78829
  this.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V($as_T($f_sc_LinearSeqOptimized__last__O(className)), instName, dataType, isNullable)
78897
78830
  });
78898
- $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
78899
- var this$1 = this.importList$2;
78900
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
78901
- if ((needRaw.level__I() >= 1)) {
78902
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = new List<byte[]>();"))
78903
- };
78904
- if ((needRaw.level__I() >= 2)) {
78905
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new List<byte[]>();"))
78906
- };
78907
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = new ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType))) + "();"));
78908
- this.out$2.puts__T__V("{");
78909
- this.out$2.inc__V();
78910
- this.out$2.puts__T__V("var i = 0;");
78911
- this.out$2.puts__T__V((("while (!" + io) + ".IsEof) {"));
78912
- this.out$2.inc__V()
78913
- });
78914
78831
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
78915
78832
  if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
78916
78833
  var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
@@ -79192,6 +79109,11 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.idToStr__Lio_kaitai_stru
79192
79109
  throw new $c_s_MatchError().init___O(id)
79193
79110
  }
79194
79111
  });
79112
+ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
79113
+ this.out$2.puts__T__V((("for (var i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++)"));
79114
+ this.out$2.puts__T__V("{");
79115
+ this.out$2.inc__V()
79116
+ });
79195
79117
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
79196
79118
  return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
79197
79119
  });
@@ -79241,7 +79163,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentRepeatEo
79241
79163
  this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".Add(") + expr) + ");"))
79242
79164
  });
79243
79165
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
79244
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".Add(") + expr) + ");"))
79166
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
79245
79167
  });
79246
79168
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
79247
79169
  var readAccessAndType = ((!this.config$1.autoRead$1) ? "public" : "private");
@@ -79275,6 +79197,14 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchCaseStart__Lio_kai
79275
79197
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorFooter__V = (function() {
79276
79198
  this.fileFooter__T__V(null)
79277
79199
  });
79200
+ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
79201
+ this.out$2.puts__T__V("{");
79202
+ this.out$2.inc__V();
79203
+ this.out$2.puts__T__V("var i = 0;");
79204
+ this.out$2.puts__T__V(((($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType) + " ") + this.translator$2.doName__T__T("_")) + ";"));
79205
+ this.out$2.puts__T__V("do {");
79206
+ this.out$2.inc__V()
79207
+ });
79278
79208
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
79279
79209
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
79280
79210
  });
@@ -79320,20 +79250,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.io$kaitai$struct$languag
79320
79250
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readFooter__V = (function() {
79321
79251
  this.fileFooter__T__V("")
79322
79252
  });
79323
- $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
79324
- var this$1 = this.importList$2;
79325
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
79326
- if ((needRaw.level__I() >= 1)) {
79327
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = new List<byte[]>((int) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "));"))
79328
- };
79329
- if ((needRaw.level__I() >= 2)) {
79330
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new List<byte[]>((int) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "));"))
79331
- };
79332
- this.out$2.puts__T__V((((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = new ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType))) + "((int) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "));"));
79333
- this.out$2.puts__T__V((("for (var i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++)"));
79334
- this.out$2.puts__T__V("{");
79335
- this.out$2.inc__V()
79336
- });
79337
79253
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
79338
79254
  this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
79339
79255
  });
@@ -79662,14 +79578,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorHeader__
79662
79578
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.flagForInstName__Lio_kaitai_struct_format_Identifier__T = (function(ksName) {
79663
79579
  return ("f_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(ksName))
79664
79580
  });
79665
- $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
79666
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
79667
- this.out$2.puts__T__V("i++;");
79668
- this.out$2.dec__V();
79669
- this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
79670
- this.out$2.dec__V();
79671
- this.out$2.puts__T__V("}")
79672
- });
79673
79581
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
79674
79582
  this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(instName, (((("(" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ") (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, value)) + ")"))
79675
79583
  });
@@ -79748,19 +79656,24 @@ function $h_Lio_kaitai_struct_languages_LuaCompiler() {
79748
79656
  /*<skip>*/
79749
79657
  }
79750
79658
  $h_Lio_kaitai_struct_languages_LuaCompiler.prototype = $c_Lio_kaitai_struct_languages_LuaCompiler.prototype;
79659
+ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
79660
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
79661
+ this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + " then"));
79662
+ this.out$2.inc__V();
79663
+ this.out$2.puts__T__V("break");
79664
+ this.out$2.dec__V();
79665
+ this.out$2.puts__T__V("end");
79666
+ this.out$2.puts__T__V("i = i + 1");
79667
+ this.out$2.dec__V();
79668
+ this.out$2.puts__T__V("end");
79669
+ this.out$2.dec__V()
79670
+ });
79751
79671
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchEnd__V = (function() {
79752
79672
  /*<skip>*/
79753
79673
  });
79754
- $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, datatype, needRaw, repeatExpr) {
79755
- if ((needRaw.level__I() >= 1)) {
79756
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = {}"))
79757
- };
79758
- if ((needRaw.level__I() >= 2)) {
79759
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = {}"))
79760
- };
79761
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"));
79674
+ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
79762
79675
  this.out$2.puts__T__V("local i = 0");
79763
- this.out$2.puts__T__V("while true do");
79676
+ this.out$2.puts__T__V((("while not " + io) + ":is_eof() do"));
79764
79677
  this.out$2.inc__V()
79765
79678
  });
79766
79679
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
@@ -79770,6 +79683,15 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfElseStart__V = (fun
79770
79683
  this.out$2.puts__T__V("else");
79771
79684
  this.out$2.inc__V()
79772
79685
  });
79686
+ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
79687
+ if ((needRaw.level__I() >= 1)) {
79688
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = {}"))
79689
+ };
79690
+ if ((needRaw.level__I() >= 2)) {
79691
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = {}"))
79692
+ };
79693
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"))
79694
+ });
79773
79695
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
79774
79696
  this.out$2.puts__T__V("if self._is_le then");
79775
79697
  this.out$2.inc__V();
@@ -79789,18 +79711,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceHeader__sci_List__L
79789
79711
  this.out$2.puts__T__V((((("function " + $m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(className)) + ".property.") + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ":get()"));
79790
79712
  this.out$2.inc__V()
79791
79713
  });
79792
- $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
79793
- if ((needRaw.level__I() >= 1)) {
79794
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = {}"))
79795
- };
79796
- if ((needRaw.level__I() >= 2)) {
79797
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = {}"))
79798
- };
79799
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"));
79800
- this.out$2.puts__T__V("local i = 0");
79801
- this.out$2.puts__T__V((("while not " + io) + ":is_eof() do"));
79802
- this.out$2.inc__V()
79803
- });
79804
79714
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
79805
79715
  return ("self." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
79806
79716
  });
@@ -80091,6 +80001,10 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.idToStr__Lio_kaitai_struct_
80091
80001
  throw new $c_s_MatchError().init___O(id)
80092
80002
  }
80093
80003
  });
80004
+ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
80005
+ this.out$2.puts__T__V((("for i = 0, " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + " - 1 do"));
80006
+ this.out$2.inc__V()
80007
+ });
80094
80008
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.alignToByte__T__V = (function(io) {
80095
80009
  this.out$2.puts__T__V((io + ":align_to_byte()"))
80096
80010
  });
@@ -80171,6 +80085,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classConstructorFooter__V =
80171
80085
  var this$1 = this.out$2;
80172
80086
  this$1.sb$2.append__T__scm_StringBuilder("\n")
80173
80087
  });
80088
+ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
80089
+ this.out$2.puts__T__V("local i = 0");
80090
+ this.out$2.puts__T__V("while true do");
80091
+ this.out$2.inc__V()
80092
+ });
80174
80093
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
80175
80094
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
80176
80095
  });
@@ -80215,17 +80134,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.readFooter__V = (function()
80215
80134
  var this$1 = this.out$2;
80216
80135
  this$1.sb$2.append__T__scm_StringBuilder("\n")
80217
80136
  });
80218
- $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
80219
- if ((needRaw.level__I() >= 1)) {
80220
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = {}"))
80221
- };
80222
- if ((needRaw.level__I() >= 2)) {
80223
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = {}"))
80224
- };
80225
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"));
80226
- this.out$2.puts__T__V((("for i = 0, " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + " - 1 do"));
80227
- this.out$2.inc__V()
80228
- });
80229
80137
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
80230
80138
  /*<skip>*/
80231
80139
  });
@@ -80472,9 +80380,8 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrProcess__Lio_kaitai_str
80472
80380
  } else {
80473
80381
  var x = $m_Lio_kaitai_struct_format_ProcessZlib$();
80474
80382
  if ((x === proc)) {
80475
- throw $m_sjsr_package$().unwrapJavaScriptException__jl_Throwable__O(new $c_jl_RuntimeException().init___T("Lua zlib not supported"))
80476
- };
80477
- if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessRotate)) {
80383
+ var expr$2 = (("KaitaiStream.process_zlib(" + srcExpr) + ")")
80384
+ } else if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessRotate)) {
80478
80385
  var x3 = $as_Lio_kaitai_struct_format_ProcessRotate(proc);
80479
80386
  var isLeft = x3.left$1;
80480
80387
  var rotValue = x3.key$1;
@@ -80516,18 +80423,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.translator__Lio_kaitai_stru
80516
80423
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
80517
80424
  return this.translator$2
80518
80425
  });
80519
- $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
80520
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
80521
- this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + " then"));
80522
- this.out$2.inc__V();
80523
- this.out$2.puts__T__V("break");
80524
- this.out$2.dec__V();
80525
- this.out$2.puts__T__V("end");
80526
- this.out$2.puts__T__V("i = i + 1");
80527
- this.out$2.dec__V();
80528
- this.out$2.puts__T__V("end");
80529
- this.out$2.dec__V()
80530
- });
80531
80426
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
80532
80427
  return this.outHeader$2
80533
80428
  });
@@ -80595,6 +80490,16 @@ function $h_Lio_kaitai_struct_languages_NimCompiler() {
80595
80490
  /*<skip>*/
80596
80491
  }
80597
80492
  $h_Lio_kaitai_struct_languages_NimCompiler.prototype = $c_Lio_kaitai_struct_languages_NimCompiler.prototype;
80493
+ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
80494
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
80495
+ this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ":"));
80496
+ this.out$2.inc__V();
80497
+ this.out$2.puts__T__V("break");
80498
+ this.out$2.dec__V();
80499
+ this.out$2.puts__T__V("inc i");
80500
+ this.out$2.dec__V();
80501
+ this.out$2.dec__V()
80502
+ });
80598
80503
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
80599
80504
  this.out$2.puts__T__V(((("`" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "`: ") + $m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T(attrType)));
80600
80505
  this.out$2.puts__T__V((("`" + this.instanceFlagIdentifier__Lio_kaitai_struct_format_InstanceIdentifier__T(attrName)) + "`: bool"))
@@ -80602,11 +80507,11 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceDeclaration__Lio_ka
80602
80507
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchEnd__V = (function() {
80603
80508
  /*<skip>*/
80604
80509
  });
80605
- $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
80510
+ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
80606
80511
  this.out$2.puts__T__V("block:");
80607
80512
  this.out$2.inc__V();
80608
80513
  this.out$2.puts__T__V("var i: int");
80609
- this.out$2.puts__T__V("while true:");
80514
+ this.out$2.puts__T__V((("while not " + io) + ".isEof:"));
80610
80515
  this.out$2.inc__V()
80611
80516
  });
80612
80517
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchIfElseStart__V = (function() {
@@ -80616,6 +80521,9 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchIfElseStart__V = (fun
80616
80521
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
80617
80522
  this.outHeader$2 = x$1
80618
80523
  });
80524
+ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
80525
+ /*<skip>*/
80526
+ });
80619
80527
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceForwardDeclaration__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(className, instName, dataType) {
80620
80528
  var jsx$1 = this.out$2;
80621
80529
  var x = this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName);
@@ -80679,13 +80587,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceHeader__sci_List__L
80679
80587
  jsx$1.puts__T__V((((((("proc " + $f_sc_IndexedSeqOptimized__dropRight__I__O(this$2, 4)) + "(this: ") + this.namespaced__sci_List__T(className)) + "): ") + $m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T(dataType)) + " = "));
80680
80588
  this.out$2.inc__V()
80681
80589
  });
80682
- $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
80683
- this.out$2.puts__T__V("block:");
80684
- this.out$2.inc__V();
80685
- this.out$2.puts__T__V("var i: int");
80686
- this.out$2.puts__T__V((("while not " + io) + ".isEof:"));
80687
- this.out$2.inc__V()
80688
- });
80689
80590
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchIfStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__V = (function(id, on, onType) {
80690
80591
  this.out$2.puts__T__V("block:");
80691
80592
  this.out$2.inc__V();
@@ -80967,6 +80868,10 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.classForwardDeclaration__sc
80967
80868
  var paramsArg = jsx$3.join__sc_TraversableOnce__T__T__T__T($as_sc_TraversableOnce(jsx$2), ", ", ", ", "");
80968
80869
  this.out$2.puts__T__V((((((("proc read*(_: typedesc[" + t) + "], io: KaitaiStream, root: KaitaiStruct, parent: ") + p) + paramsArg) + "): ") + t))
80969
80870
  });
80871
+ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
80872
+ this.out$2.puts__T__V((("for i in 0 ..< int(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "):"));
80873
+ this.out$2.inc__V()
80874
+ });
80970
80875
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.alignToByte__T__V = (function(io) {
80971
80876
  this.out$2.puts__T__V((("alignToByte(" + io) + ")"))
80972
80877
  });
@@ -81175,6 +81080,13 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchCaseStart__Lio_kaitai
81175
81080
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.classConstructorFooter__V = (function() {
81176
81081
  this.out$2.dec__V()
81177
81082
  });
81083
+ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
81084
+ this.out$2.puts__T__V("block:");
81085
+ this.out$2.inc__V();
81086
+ this.out$2.puts__T__V("var i: int");
81087
+ this.out$2.puts__T__V("while true:");
81088
+ this.out$2.inc__V()
81089
+ });
81178
81090
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
81179
81091
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
81180
81092
  });
@@ -81202,10 +81114,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.outFileName__T__T = (functi
81202
81114
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$importList$und$eq__Lio_kaitai_struct_ImportList__V = (function(x$1) {
81203
81115
  this.importList$2 = x$1
81204
81116
  });
81205
- $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
81206
- this.out$2.puts__T__V((("for i in 0 ..< int(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "):"));
81207
- this.out$2.inc__V()
81208
- });
81209
81117
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.readFooter__V = (function() {
81210
81118
  this.out$2.dec__V();
81211
81119
  var this$1 = this.out$2;
@@ -81423,16 +81331,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.translator__Lio_kaitai_stru
81423
81331
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
81424
81332
  return this.translator$2
81425
81333
  });
81426
- $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
81427
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
81428
- this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ":"));
81429
- this.out$2.inc__V();
81430
- this.out$2.puts__T__V("break");
81431
- this.out$2.dec__V();
81432
- this.out$2.puts__T__V("inc i");
81433
- this.out$2.dec__V();
81434
- this.out$2.dec__V()
81435
- });
81436
81334
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
81437
81335
  return this.outHeader$2
81438
81336
  });
@@ -81512,6 +81410,12 @@ function $h_Lio_kaitai_struct_languages_RubyCompiler() {
81512
81410
  /*<skip>*/
81513
81411
  }
81514
81412
  $h_Lio_kaitai_struct_languages_RubyCompiler.prototype = $c_Lio_kaitai_struct_languages_RubyCompiler.prototype;
81413
+ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
81414
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
81415
+ this.out$2.puts__T__V("i += 1");
81416
+ this.out$2.dec__V();
81417
+ this.out$2.puts__T__V(("end until " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)))
81418
+ });
81515
81419
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.switchEnd__V = (function() {
81516
81420
  this.out$2.puts__T__V("end")
81517
81421
  });
@@ -81569,16 +81473,9 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceHeader__T__Lio_kai
81569
81473
  this.out$2.puts__T__V(("def " + instName.name$2));
81570
81474
  this.out$2.inc__V()
81571
81475
  });
81572
- $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
81573
- if ((needRaw.level__I() >= 1)) {
81574
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = []"))
81575
- };
81576
- if ((needRaw.level__I() >= 2)) {
81577
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
81578
- };
81579
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
81476
+ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
81580
81477
  this.out$2.puts__T__V("i = 0");
81581
- this.out$2.puts__T__V("begin");
81478
+ this.out$2.puts__T__V((("while not " + io) + ".eof?"));
81582
81479
  this.out$2.inc__V()
81583
81480
  });
81584
81481
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.types2class__sci_List__T = (function(names) {
@@ -81624,6 +81521,15 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.types2class__sci_List__T =
81624
81521
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
81625
81522
  this.outHeader$2 = x$1
81626
81523
  });
81524
+ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
81525
+ if ((needRaw.level__I() >= 1)) {
81526
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = []"))
81527
+ };
81528
+ if ((needRaw.level__I() >= 2)) {
81529
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
81530
+ };
81531
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"))
81532
+ });
81627
81533
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classHeader__T__V = (function(name) {
81628
81534
  this.out$2.puts__T__V((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " < Kaitai::Struct::Struct"));
81629
81535
  this.out$2.inc__V();
@@ -81645,18 +81551,6 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrParseHybrid__F0__F0__V
81645
81551
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
81646
81552
  this.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V($as_T($f_sc_LinearSeqOptimized__last__O(className)), instName, dataType, isNullable)
81647
81553
  });
81648
- $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
81649
- if ((needRaw.level__I() >= 1)) {
81650
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = []"))
81651
- };
81652
- if ((needRaw.level__I() >= 2)) {
81653
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
81654
- };
81655
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
81656
- this.out$2.puts__T__V("i = 0");
81657
- this.out$2.puts__T__V((("while not " + io) + ".eof?"));
81658
- this.out$2.inc__V()
81659
- });
81660
81554
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
81661
81555
  return ("@" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
81662
81556
  });
@@ -81937,6 +81831,10 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.idToStr__Lio_kaitai_struct
81937
81831
  throw new $c_s_MatchError().init___O(id)
81938
81832
  }
81939
81833
  });
81834
+ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
81835
+ this.out$2.puts__T__V((("(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ").times { |i|"));
81836
+ this.out$2.inc__V()
81837
+ });
81940
81838
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.alignToByte__T__V = (function(io) {
81941
81839
  this.out$2.puts__T__V((io + ".align_to_byte"))
81942
81840
  });
@@ -81974,7 +81872,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatEos_
81974
81872
  this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " << ") + expr))
81975
81873
  });
81976
81874
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
81977
- this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i] = ") + expr))
81875
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
81978
81876
  });
81979
81877
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
81980
81878
  if ((endian instanceof $c_s_Some)) {
@@ -82006,6 +81904,11 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.switchCaseStart__Lio_kaita
82006
81904
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classConstructorFooter__V = (function() {
82007
81905
  this.universalFooter__V()
82008
81906
  });
81907
+ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
81908
+ this.out$2.puts__T__V("i = 0");
81909
+ this.out$2.puts__T__V("begin");
81910
+ this.out$2.inc__V()
81911
+ });
82009
81912
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
82010
81913
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
82011
81914
  });
@@ -82052,17 +81955,6 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.readFooter__V = (function(
82052
81955
  this.out$2.puts__T__V("self");
82053
81956
  this.universalFooter__V()
82054
81957
  });
82055
- $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
82056
- if ((needRaw.level__I() >= 1)) {
82057
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = Array.new(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
82058
- };
82059
- if ((needRaw.level__I() >= 2)) {
82060
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = Array.new(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
82061
- };
82062
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = Array.new(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"));
82063
- this.out$2.puts__T__V((("(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ").times { |i|"));
82064
- this.out$2.inc__V()
82065
- });
82066
81958
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
82067
81959
  this.out$2.puts__T__V(("case " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)))
82068
81960
  });
@@ -82359,12 +82251,6 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classConstructorHeader__T_
82359
82251
  this.out$2.puts__T__V("@_debug = {}")
82360
82252
  }
82361
82253
  });
82362
- $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
82363
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
82364
- this.out$2.puts__T__V("i += 1");
82365
- this.out$2.dec__V();
82366
- this.out$2.puts__T__V(("end until " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)))
82367
- });
82368
82254
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.universalFooter__V = (function() {
82369
82255
  this.out$2.dec__V();
82370
82256
  this.out$2.puts__T__V("end")
@@ -82609,6 +82495,14 @@ function $h_Lio_kaitai_struct_languages_JavaCompiler() {
82609
82495
  /*<skip>*/
82610
82496
  }
82611
82497
  $h_Lio_kaitai_struct_languages_JavaCompiler.prototype = $c_Lio_kaitai_struct_languages_JavaCompiler.prototype;
82498
+ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
82499
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
82500
+ this.out$2.puts__T__V("i++;");
82501
+ this.out$2.dec__V();
82502
+ this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
82503
+ this.out$2.dec__V();
82504
+ this.out$2.puts__T__V("}")
82505
+ });
82612
82506
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
82613
82507
  this.out$2.puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(attrType)) + " ") + this.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
82614
82508
  });
@@ -82660,28 +82554,14 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceHeader__T__Lio_kai
82660
82554
  this.out$2.puts__T__V((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(dataType)) + " ") + this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "() {"));
82661
82555
  this.out$2.inc__V()
82662
82556
  });
82663
- $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
82664
- if ((needRaw.level__I() >= 1)) {
82665
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = new ArrayList<byte[]>();"))
82666
- };
82667
- if ((needRaw.level__I() >= 2)) {
82668
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new ArrayList<byte[]>();"))
82669
- };
82670
- var jsx$2 = this.out$2;
82671
- var jsx$1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
82672
- var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
82673
- var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
82674
- jsx$2.puts__T__V((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "();"));
82557
+ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
82675
82558
  this.out$2.puts__T__V("{");
82676
82559
  this.out$2.inc__V();
82677
- var jsx$3 = this.out$2;
82678
- var this$2 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
82679
- jsx$3.puts__T__V((((this$2.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(dataType) + " ") + this.translator$2.doName__T__T("_")) + ";"));
82680
82560
  this.out$2.puts__T__V("int i = 0;");
82681
- this.out$2.puts__T__V("do {");
82561
+ this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
82682
82562
  this.out$2.inc__V();
82683
- var this$3 = this.importList$2;
82684
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$3.list$1, "java.util.ArrayList")
82563
+ var this$1 = this.importList$2;
82564
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "java.util.ArrayList")
82685
82565
  });
82686
82566
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfElseStart__V = (function() {
82687
82567
  this.out$2.puts__T__V("else {");
@@ -82690,6 +82570,19 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfElseStart__V = (fu
82690
82570
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
82691
82571
  this.outHeader$2 = x$1
82692
82572
  });
82573
+ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
82574
+ if ((needRaw.level__I() >= 1)) {
82575
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = new ArrayList<byte[]>();"))
82576
+ };
82577
+ if ((needRaw.level__I() >= 2)) {
82578
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new ArrayList<byte[]>();"))
82579
+ };
82580
+ var jsx$2 = this.out$2;
82581
+ var jsx$1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
82582
+ var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
82583
+ var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
82584
+ jsx$2.puts__T__V((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "();"))
82585
+ });
82693
82586
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classHeader__T__V = (function(name) {
82694
82587
  var staticStr = ((this.out$2.indentLevel$1 > 0) ? "static " : "");
82695
82588
  this.out$2.puts__T__V((((("public " + staticStr) + "class ") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " extends KaitaiStruct {"));
@@ -82756,26 +82649,6 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCasesUsingIf__Lio_ka
82756
82649
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
82757
82650
  this.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V($as_T($f_sc_LinearSeqOptimized__last__O(className)), instName, dataType, isNullable)
82758
82651
  });
82759
- $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
82760
- if ((needRaw.level__I() >= 1)) {
82761
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = new ArrayList<byte[]>();"))
82762
- };
82763
- if ((needRaw.level__I() >= 2)) {
82764
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new ArrayList<byte[]>();"))
82765
- };
82766
- var jsx$2 = this.out$2;
82767
- var jsx$1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
82768
- var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
82769
- var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
82770
- jsx$2.puts__T__V((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "();"));
82771
- this.out$2.puts__T__V("{");
82772
- this.out$2.inc__V();
82773
- this.out$2.puts__T__V("int i = 0;");
82774
- this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
82775
- this.out$2.inc__V();
82776
- var this$2 = this.importList$2;
82777
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "java.util.ArrayList")
82778
- });
82779
82652
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
82780
82653
  return ("this." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
82781
82654
  });
@@ -83126,6 +82999,12 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.idToStr__Lio_kaitai_struct
83126
82999
  throw new $c_s_MatchError().init___O(id)
83127
83000
  }
83128
83001
  });
83002
+ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
83003
+ this.out$2.puts__T__V((("for (int i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++) {"));
83004
+ this.out$2.inc__V();
83005
+ var this$1 = this.importList$2;
83006
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "java.util.ArrayList")
83007
+ });
83129
83008
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
83130
83009
  return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
83131
83010
  });
@@ -83175,7 +83054,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatEos_
83175
83054
  this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".add(") + expr) + ");"))
83176
83055
  });
83177
83056
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
83178
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".add(") + expr) + ");"))
83057
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
83179
83058
  });
83180
83059
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classHeader__sci_List__V = (function(name) {
83181
83060
  this.classHeader__T__V($as_T($f_sc_LinearSeqOptimized__last__O(name)))
@@ -83216,6 +83095,18 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCaseStart__Lio_kaita
83216
83095
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorFooter__V = (function() {
83217
83096
  this.universalFooter__V()
83218
83097
  });
83098
+ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
83099
+ this.out$2.puts__T__V("{");
83100
+ this.out$2.inc__V();
83101
+ var jsx$1 = this.out$2;
83102
+ var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
83103
+ jsx$1.puts__T__V((((this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(dataType) + " ") + this.translator$2.doName__T__T("_")) + ";"));
83104
+ this.out$2.puts__T__V("int i = 0;");
83105
+ this.out$2.puts__T__V("do {");
83106
+ this.out$2.inc__V();
83107
+ var this$2 = this.importList$2;
83108
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "java.util.ArrayList")
83109
+ });
83219
83110
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
83220
83111
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
83221
83112
  });
@@ -83260,23 +83151,6 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.io$kaitai$struct$languages
83260
83151
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.readFooter__V = (function() {
83261
83152
  this.universalFooter__V()
83262
83153
  });
83263
- $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
83264
- if ((needRaw.level__I() >= 1)) {
83265
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = new ArrayList<byte[]>(((Number) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")).intValue());"))
83266
- };
83267
- if ((needRaw.level__I() >= 2)) {
83268
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new ArrayList<byte[]>(((Number) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")).intValue());"))
83269
- };
83270
- var jsx$2 = this.out$2;
83271
- var jsx$1 = this.idToStr__Lio_kaitai_struct_format_Identifier__T(id);
83272
- var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
83273
- var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
83274
- jsx$2.puts__T__V((((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "(((Number) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")).intValue());"));
83275
- this.out$2.puts__T__V((("for (int i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++) {"));
83276
- this.out$2.inc__V();
83277
- var this$2 = this.importList$2;
83278
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "java.util.ArrayList")
83279
- });
83280
83154
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
83281
83155
  this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
83282
83156
  });
@@ -83757,14 +83631,6 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCasesRender__Lio_kai
83757
83631
  $f_Lio_kaitai_struct_languages_components_SwitchOps__switchCasesRender__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__sci_Map__F1__F1__V(this, id, on, cases, normalCaseProc, elseCaseProc)
83758
83632
  }
83759
83633
  });
83760
- $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
83761
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
83762
- this.out$2.puts__T__V("i++;");
83763
- this.out$2.dec__V();
83764
- this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
83765
- this.out$2.dec__V();
83766
- this.out$2.puts__T__V("}")
83767
- });
83768
83634
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.universalFooter__V = (function() {
83769
83635
  this.out$2.dec__V();
83770
83636
  this.out$2.puts__T__V("}")
@@ -83852,6 +83718,15 @@ function $h_Lio_kaitai_struct_languages_PythonCompiler() {
83852
83718
  /*<skip>*/
83853
83719
  }
83854
83720
  $h_Lio_kaitai_struct_languages_PythonCompiler.prototype = $c_Lio_kaitai_struct_languages_PythonCompiler.prototype;
83721
+ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
83722
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
83723
+ this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ":"));
83724
+ this.out$2.inc__V();
83725
+ this.out$2.puts__T__V("break");
83726
+ this.out$2.dec__V();
83727
+ this.out$2.puts__T__V("i += 1");
83728
+ this.out$2.dec__V()
83729
+ });
83855
83730
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchEnd__V = (function() {
83856
83731
  /*<skip>*/
83857
83732
  });
@@ -83909,16 +83784,9 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceHeader__T__Lio_k
83909
83784
  this.out$2.puts__T__V((("def " + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + "(self):"));
83910
83785
  this.out$2.inc__V()
83911
83786
  });
83912
- $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
83913
- if ((needRaw.level__I() >= 1)) {
83914
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = []"))
83915
- };
83916
- if ((needRaw.level__I() >= 2)) {
83917
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
83918
- };
83919
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
83787
+ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
83920
83788
  this.out$2.puts__T__V("i = 0");
83921
- this.out$2.puts__T__V("while True:");
83789
+ this.out$2.puts__T__V((("while not " + io) + ".is_eof():"));
83922
83790
  this.out$2.inc__V()
83923
83791
  });
83924
83792
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
@@ -83928,6 +83796,15 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchIfElseStart__V = (
83928
83796
  this.out$2.puts__T__V("else:");
83929
83797
  this.out$2.inc__V()
83930
83798
  });
83799
+ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
83800
+ if ((needRaw.level__I() >= 1)) {
83801
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = []"))
83802
+ };
83803
+ if ((needRaw.level__I() >= 2)) {
83804
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
83805
+ };
83806
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"))
83807
+ });
83931
83808
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classHeader__T__V = (function(name) {
83932
83809
  this.out$2.puts__T__V((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + "(KaitaiStruct):"));
83933
83810
  this.out$2.inc__V()
@@ -83948,18 +83825,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchCasesUsingIf__Lio_
83948
83825
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
83949
83826
  this.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V($as_T($f_sc_LinearSeqOptimized__last__O(className)), instName, dataType, isNullable)
83950
83827
  });
83951
- $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
83952
- if ((needRaw.level__I() >= 1)) {
83953
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = []"))
83954
- };
83955
- if ((needRaw.level__I() >= 2)) {
83956
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
83957
- };
83958
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
83959
- this.out$2.puts__T__V("i = 0");
83960
- this.out$2.puts__T__V((("while not " + io) + ".is_eof():"));
83961
- this.out$2.inc__V()
83962
- });
83963
83828
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
83964
83829
  return ("self." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
83965
83830
  });
@@ -83970,7 +83835,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.seek__T__Lio_kaitai_stru
83970
83835
  this.out$2.puts__T__V((((io + ".seek(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, pos)) + ")"))
83971
83836
  });
83972
83837
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
83973
- this.out$2.puts__T__V((((("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + " if hasattr(self, '") + this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "') else None"))
83838
+ this.out$2.puts__T__V((("return getattr(self, '" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "', None)"))
83974
83839
  });
83975
83840
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.bool2Py__Z__T = (function(b) {
83976
83841
  return (b ? "True" : "False")
@@ -84230,6 +84095,10 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.userType2class__Lio_kait
84230
84095
  var prefix = ((t.isOpaque__Z() && (firstName !== this.translator$2.provider$2.nowClass$1.name$1.head__O())) ? (firstName + ".") : "");
84231
84096
  return (prefix + $m_Lio_kaitai_struct_languages_PythonCompiler$().types2class__sci_List__T(name))
84232
84097
  });
84098
+ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
84099
+ this.out$2.puts__T__V((("for i in range(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "):"));
84100
+ this.out$2.inc__V()
84101
+ });
84233
84102
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
84234
84103
  return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
84235
84104
  });
@@ -84274,7 +84143,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatEo
84274
84143
  this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + expr) + ")"))
84275
84144
  });
84276
84145
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
84277
- this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i] = ") + expr))
84146
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
84278
84147
  });
84279
84148
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classHeader__sci_List__V = (function(name) {
84280
84149
  this.classHeader__T__V($as_T($f_sc_LinearSeqOptimized__last__O(name)))
@@ -84306,6 +84175,11 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchCaseStart__Lio_kai
84306
84175
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classConstructorFooter__V = (function() {
84307
84176
  this.universalFooter__V()
84308
84177
  });
84178
+ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
84179
+ this.out$2.puts__T__V("i = 0");
84180
+ this.out$2.puts__T__V("while True:");
84181
+ this.out$2.inc__V()
84182
+ });
84309
84183
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
84310
84184
  $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
84311
84185
  });
@@ -84348,17 +84222,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.io$kaitai$struct$languag
84348
84222
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.readFooter__V = (function() {
84349
84223
  this.universalFooter__V()
84350
84224
  });
84351
- $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
84352
- if ((needRaw.level__I() >= 1)) {
84353
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = [None] * (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
84354
- };
84355
- if ((needRaw.level__I() >= 2)) {
84356
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [None] * (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
84357
- };
84358
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [None] * (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"));
84359
- this.out$2.puts__T__V((("for i in range(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "):"));
84360
- this.out$2.inc__V()
84361
- });
84362
84225
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
84363
84226
  /*<skip>*/
84364
84227
  });
@@ -84597,7 +84460,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchIfCaseFirstStart__
84597
84460
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
84598
84461
  this.out$2.puts__T__V((("if hasattr(self, '" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "'):"));
84599
84462
  this.out$2.inc__V();
84600
- this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V(instName, dataType);
84463
+ this.out$2.puts__T__V(("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)));
84601
84464
  this.out$2.dec__V();
84602
84465
  var this$1 = this.out$2;
84603
84466
  this$1.sb$2.append__T__scm_StringBuilder("\n")
@@ -84750,15 +84613,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classConstructorHeader__
84750
84613
  this.out$2.puts__T__V("self._debug = collections.defaultdict(dict)")
84751
84614
  }
84752
84615
  });
84753
- $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
84754
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
84755
- this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ":"));
84756
- this.out$2.inc__V();
84757
- this.out$2.puts__T__V("break");
84758
- this.out$2.dec__V();
84759
- this.out$2.puts__T__V("i += 1");
84760
- this.out$2.dec__V()
84761
- });
84762
84616
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.universalFooter__V = (function() {
84763
84617
  this.out$2.dec__V();
84764
84618
  var this$1 = this.out$2;
@@ -84782,21 +84636,22 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.fileHeader__T__V = (func
84782
84636
  var this$1 = this.outHeader$2;
84783
84637
  this$1.sb$2.append__T__scm_StringBuilder("\n");
84784
84638
  var this$2 = this.importList$2;
84785
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "from pkg_resources import parse_version");
84639
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "import kaitaistruct");
84786
84640
  var this$3 = this.importList$2;
84787
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$3.list$1, "import kaitaistruct");
84788
- var this$4 = this.importList$2;
84789
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$4.list$1, "from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO");
84641
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$3.list$1, "from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO");
84642
+ var this$4 = this.out$2;
84643
+ this$4.sb$2.append__T__scm_StringBuilder("\n");
84790
84644
  var this$5 = this.out$2;
84791
84645
  this$5.sb$2.append__T__scm_StringBuilder("\n");
84792
- var this$6 = this.out$2;
84793
- this$6.sb$2.append__T__scm_StringBuilder("\n");
84794
- this.out$2.puts__T__V((("if parse_version(kaitaistruct.__version__) < parse_version('" + $m_Lio_kaitai_struct_format_KSVersion$().minimalRuntime$1) + "'):"));
84646
+ var jsx$1 = this.out$2;
84647
+ var this$6 = $m_Lio_kaitai_struct_format_KSVersion$().minimalRuntime$1;
84648
+ var this$7 = this$6.nums$1;
84649
+ jsx$1.puts__T__V((("if getattr(kaitaistruct, 'API_VERSION', (0, 9)) < " + $f_sc_TraversableOnce__mkString__T__T__T__T(this$7, "(", ", ", ")")) + ":"));
84795
84650
  this.out$2.inc__V();
84796
84651
  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__))"));
84797
84652
  this.out$2.dec__V();
84798
- var this$7 = this.out$2;
84799
- this$7.sb$2.append__T__scm_StringBuilder("\n")
84653
+ var this$8 = this.out$2;
84654
+ this$8.sb$2.append__T__scm_StringBuilder("\n")
84800
84655
  });
84801
84656
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
84802
84657
  /*<skip>*/