kaitai-struct-compiler 0.10.0-SNAPSHOT20220409.5702.c4cb01b0 → 0.10.0-SNAPSHOT20220415.194636.880ae970

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-SNAPSHOT20220409.005702.c4cb01b0";
4419
- this.gitCommit$1 = "c4cb01b0";
4420
- this.gitTime$1 = "2022-04-09T00:57:02+00:00";
4433
+ this.version$1 = "0.10-SNAPSHOT20220415.194636.880ae970";
4434
+ this.gitCommit$1 = "880ae970";
4435
+ this.gitTime$1 = "2022-04-15T19:46:36+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)
@@ -20939,8 +20959,8 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileClass__Lio_kaitai_s
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 {
@@ -69976,6 +69994,9 @@ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.init___Lio_kaitai
69976
69994
  $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList.call(this, provider, importList);
69977
69995
  return this
69978
69996
  });
69997
+ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
69998
+ return (("'" + label) + "'")
69999
+ });
69979
70000
  var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initClass({
69980
70001
  Lio_kaitai_struct_translators_ConstructTranslator: 0
69981
70002
  }, false, "io.kaitai.struct.translators.ConstructTranslator", {
@@ -72354,6 +72375,14 @@ function $h_Lio_kaitai_struct_languages_CppCompiler() {
72354
72375
  /*<skip>*/
72355
72376
  }
72356
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
+ });
72357
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) {
72358
72387
  this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$());
72359
72388
  this.outHdr$2.puts__T__V((("bool " + this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
@@ -72372,23 +72401,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.stdMoveWrap__T__T = (functi
72372
72401
  return expr
72373
72402
  }
72374
72403
  });
72375
- $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) {
72376
- this.importListHdr$2.addSystem__T__V("vector");
72377
- if ((needRaw.level__I() >= 1)) {
72378
- 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$())) + ";"));
72379
- if (needRaw.hasIO__Z()) {
72380
- 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$())) + ";"))
72381
- }
72382
- };
72383
- if ((needRaw.level__I() >= 2)) {
72384
- 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$())) + ";"))
72385
- };
72386
- 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) {
72387
72405
  this.outSrc$2.puts__T__V("{");
72388
72406
  this.outSrc$2.inc__V();
72389
72407
  this.outSrc$2.puts__T__V("int i = 0;");
72390
- 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("_")) + ";"));
72391
- this.outSrc$2.puts__T__V("do {");
72408
+ this.outSrc$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
72392
72409
  this.outSrc$2.inc__V()
72393
72410
  });
72394
72411
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.needsDestruction__Lio_kaitai_struct_datatype_DataType__Z = (function(t) {
@@ -72436,6 +72453,19 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.switchIfElseStart__V = (fun
72436
72453
  this.outSrc$2.puts__T__V("else {");
72437
72454
  this.outSrc$2.inc__V()
72438
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
+ });
72439
72469
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.importDataType__Lio_kaitai_struct_datatype_DataType__V = (function(dt) {
72440
72470
  if ((dt instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
72441
72471
  var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dt);
@@ -72513,24 +72543,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.destructVector__T__T__V = (
72513
72543
  this.outSrc$2.dec__V();
72514
72544
  this.outSrc$2.puts__T__V("}")
72515
72545
  });
72516
- $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) {
72517
- this.importListHdr$2.addSystem__T__V("vector");
72518
- if ((needRaw.level__I() >= 1)) {
72519
- 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$())) + ";"));
72520
- if (needRaw.hasIO__Z()) {
72521
- 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$())) + ";"))
72522
- }
72523
- };
72524
- if ((needRaw.level__I() >= 2)) {
72525
- 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$())) + ";"))
72526
- };
72527
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"));
72528
- this.outSrc$2.puts__T__V("{");
72529
- this.outSrc$2.inc__V();
72530
- this.outSrc$2.puts__T__V("int i = 0;");
72531
- this.outSrc$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
72532
- this.outSrc$2.inc__V()
72533
- });
72534
72546
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
72535
72547
  return ("m_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
72536
72548
  });
@@ -73089,6 +73101,12 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.destructWithSafeguardHeader
73089
73101
  this.outSrc$2.puts__T__V((("if (" + ptr) + ") {"));
73090
73102
  this.outSrc$2.inc__V()
73091
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
+ });
73092
73110
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
73093
73111
  return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
73094
73112
  });
@@ -73183,7 +73201,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentRepeatEos__
73183
73201
  this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "->push_back(") + this.stdMoveWrap__T__T(expr)) + ");"))
73184
73202
  });
73185
73203
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
73186
- 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)
73187
73205
  });
73188
73206
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classHeader__sci_List__V = (function(name) {
73189
73207
  var jsx$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
@@ -73297,6 +73315,14 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classConstructorFooter__V =
73297
73315
  this.outSrc$2.dec__V();
73298
73316
  this.outSrc$2.puts__T__V("}")
73299
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
+ });
73300
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) {
73301
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)
73302
73328
  });
@@ -73351,30 +73377,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.readFooter__V = (function()
73351
73377
  this.outSrc$2.dec__V();
73352
73378
  this.outSrc$2.puts__T__V("}")
73353
73379
  });
73354
- $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) {
73355
- this.importListHdr$2.addSystem__T__V("vector");
73356
- var lenVar = ("l_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id));
73357
- 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)) + ";"));
73358
- if ((needRaw.level__I() >= 1)) {
73359
- var rawId = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id));
73360
- this.outSrc$2.puts__T__V((((rawId + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
73361
- this.outSrc$2.puts__T__V((((rawId + "->reserve(") + lenVar) + ");"));
73362
- if (needRaw.hasIO__Z()) {
73363
- 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)));
73364
- this.outSrc$2.puts__T__V((((ioId + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$())) + ";"));
73365
- this.outSrc$2.puts__T__V((((ioId + "->reserve(") + lenVar) + ");"))
73366
- }
73367
- };
73368
- if ((needRaw.level__I() >= 2)) {
73369
- 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)));
73370
- this.outSrc$2.puts__T__V((((rawId$2 + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
73371
- this.outSrc$2.puts__T__V((((rawId$2 + "->reserve(") + lenVar) + ");"))
73372
- };
73373
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"));
73374
- this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "->reserve(") + lenVar) + ");"));
73375
- this.outSrc$2.puts__T__V((("for (int i = 0; i < " + lenVar) + "; i++) {"));
73376
- this.outSrc$2.inc__V()
73377
- });
73378
73380
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
73379
73381
  var x = $m_Lio_kaitai_struct_datatype_EndOfStreamError$();
73380
73382
  if ((x === err)) {
@@ -73757,14 +73759,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.translator__Lio_kaitai_stru
73757
73759
  $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classDestructorFooter__V = (function() {
73758
73760
  this.classConstructorFooter__V()
73759
73761
  });
73760
- $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) {
73761
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
73762
- this.outSrc$2.puts__T__V("i++;");
73763
- this.outSrc$2.dec__V();
73764
- this.outSrc$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
73765
- this.outSrc$2.dec__V();
73766
- this.outSrc$2.puts__T__V("}")
73767
- });
73768
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) {
73769
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)
73770
73764
  });
@@ -74404,6 +74398,16 @@ function $h_Lio_kaitai_struct_languages_GoCompiler() {
74404
74398
  /*<skip>*/
74405
74399
  }
74406
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
+ });
74407
74411
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchEnd__V = (function() {
74408
74412
  this.out$2.puts__T__V("}")
74409
74413
  });
@@ -74411,15 +74415,17 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceDeclaration__Lio_kai
74411
74415
  this.out$2.puts__T__V((this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName) + " bool"));
74412
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)))
74413
74417
  });
74414
- $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) {
74415
- if ((needRaw.level__I() >= 1)) {
74416
- 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);"))
74417
- };
74418
- if ((needRaw.level__I() >= 2)) {
74419
- 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);"))
74420
- };
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) {
74421
74419
  this.out$2.puts__T__V("for i := 1;; i++ {");
74422
- 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("}")
74423
74429
  });
74424
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) {
74425
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)) + "):"));
@@ -74428,6 +74434,9 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchCaseStartCompareFn__T_
74428
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) {
74429
74435
  this.outHeader$2 = x$1
74430
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
+ });
74431
74440
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
74432
74441
  this.out$2.puts__T__V((("switch " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_EndianIdentifier$())) + " {"));
74433
74442
  this.out$2.puts__T__V("case 0:");
@@ -74449,24 +74458,6 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceHeader__sci_List__Li
74449
74458
  this.out$2.inc__V();
74450
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"))))
74451
74460
  });
74452
- $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) {
74453
- if ((needRaw.level__I() >= 1)) {
74454
- 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);"))
74455
- };
74456
- if ((needRaw.level__I() >= 2)) {
74457
- 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);"))
74458
- };
74459
- this.out$2.puts__T__V("for i := 1;; i++ {");
74460
- this.out$2.inc__V();
74461
- var eofVar = this.translator$2.allocateLocalVar__I();
74462
- this.out$2.puts__T__V((this.translator$2.localVarName__I__T(eofVar) + ", err := this._io.EOF()"));
74463
- this.translator$2.outAddErrCheck__V();
74464
- this.out$2.puts__T__V((("if " + this.translator$2.localVarName__I__T(eofVar)) + " {"));
74465
- this.out$2.inc__V();
74466
- this.out$2.puts__T__V("break");
74467
- this.out$2.dec__V();
74468
- this.out$2.puts__T__V("}")
74469
- });
74470
74461
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
74471
74462
  return ("this." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
74472
74463
  });
@@ -74715,10 +74706,10 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.idToStr__Lio_kaitai_struct_f
74715
74706
  throw new $c_s_MatchError().init___O(id)
74716
74707
  }
74717
74708
  });
74718
- $c_Lio_kaitai_struct_languages_GoCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__V = (function(id, r) {
74719
- var name = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
74720
- var expr = this.translator$2.resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(r);
74721
- 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")
74722
74713
  });
74723
74714
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.alignToByte__T__V = (function(io) {
74724
74715
  this.out$2.puts__T__V((io + ".AlignToByte()"))
@@ -74821,6 +74812,10 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchCaseStart__Lio_kaitai_
74821
74812
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.classConstructorFooter__V = (function() {
74822
74813
  /*<skip>*/
74823
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
+ });
74824
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) {
74825
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)
74826
74821
  });
@@ -74871,17 +74866,6 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.readFooter__V = (function()
74871
74866
  this.out$2.puts__T__V("return err");
74872
74867
  this.universalFooter__V()
74873
74868
  });
74874
- $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) {
74875
- if ((needRaw.level__I() >= 1)) {
74876
- 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)) + ")"))
74877
- };
74878
- if ((needRaw.level__I() >= 2)) {
74879
- 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)) + ")"))
74880
- };
74881
- 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)) + ")"));
74882
- this.out$2.puts__T__V((("for i := range " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + " {"));
74883
- this.out$2.inc__V()
74884
- });
74885
74869
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
74886
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)) + ") {"))
74887
74871
  });
@@ -75010,7 +74994,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.normalIO__T = (function() {
75010
74994
  });
75011
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) {
75012
74996
  var expr = this.translator$2.resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(r);
75013
- 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));
75014
74998
  this.out$2.puts__T__V(((tempVar + " := ") + expr));
75015
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) + ")"))
75016
75000
  });
@@ -75110,16 +75094,6 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.calculatedFlagForName__Lio_k
75110
75094
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
75111
75095
  return this.translator$2
75112
75096
  });
75113
- $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) {
75114
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
75115
- this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + " {"));
75116
- this.out$2.inc__V();
75117
- this.out$2.puts__T__V("break");
75118
- this.out$2.dec__V();
75119
- this.out$2.puts__T__V("}");
75120
- this.out$2.dec__V();
75121
- this.out$2.puts__T__V("}")
75122
- });
75123
75097
  $c_Lio_kaitai_struct_languages_GoCompiler.prototype.universalFooter__V = (function() {
75124
75098
  this.out$2.dec__V();
75125
75099
  this.out$2.puts__T__V("}")
@@ -75274,6 +75248,12 @@ function $h_Lio_kaitai_struct_languages_JavaScriptCompiler() {
75274
75248
  /*<skip>*/
75275
75249
  }
75276
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
+ });
75277
75257
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchEnd__V = (function() {
75278
75258
  this.out$2.puts__T__V("}")
75279
75259
  });
@@ -75292,19 +75272,9 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classToString__Lio_k
75292
75272
  this.out$2.dec__V();
75293
75273
  this.out$2.puts__T__V("}")
75294
75274
  });
75295
- $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) {
75296
- if ((needRaw.level__I() >= 1)) {
75297
- 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)) + " = []"))
75298
- };
75299
- if ((needRaw.level__I() >= 2)) {
75300
- 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))) + " = [];"))
75301
- };
75302
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
75303
- if (this.config$1.readStoresPos$1) {
75304
- this.out$2.puts__T__V((("this._debug." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + ".arr = [];"))
75305
- };
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) {
75306
75276
  this.out$2.puts__T__V("var i = 0;");
75307
- this.out$2.puts__T__V("do {");
75277
+ this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
75308
75278
  this.out$2.inc__V()
75309
75279
  });
75310
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) {
@@ -75314,6 +75284,18 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchIfElseStart__V
75314
75284
  this.out$2.puts__T__V("else {");
75315
75285
  this.out$2.inc__V()
75316
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
+ });
75317
75299
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
75318
75300
  this.out$2.puts__T__V("if (this._is_le) {");
75319
75301
  this.out$2.inc__V();
@@ -75336,21 +75318,6 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceHeader__sci_
75336
75318
  this.out$2.puts__T__V("get: function() {");
75337
75319
  this.out$2.inc__V()
75338
75320
  });
75339
- $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) {
75340
- if ((needRaw.level__I() >= 1)) {
75341
- 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)) + " = [];"))
75342
- };
75343
- if ((needRaw.level__I() >= 2)) {
75344
- 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))) + " = [];"))
75345
- };
75346
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
75347
- if (this.config$1.readStoresPos$1) {
75348
- this.out$2.puts__T__V((("this._debug." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + ".arr = [];"))
75349
- };
75350
- this.out$2.puts__T__V("var i = 0;");
75351
- this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
75352
- this.out$2.inc__V()
75353
- });
75354
75321
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
75355
75322
  return ("this." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
75356
75323
  });
@@ -75821,6 +75788,10 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.idToStr__Lio_kaitai_
75821
75788
  throw new $c_s_MatchError().init___O(id)
75822
75789
  }
75823
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
+ });
75824
75795
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
75825
75796
  return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
75826
75797
  });
@@ -75866,7 +75837,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentRepe
75866
75837
  this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".push(") + expr) + ");"))
75867
75838
  });
75868
75839
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
75869
- 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)
75870
75841
  });
75871
75842
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
75872
75843
  if ((endian instanceof $c_s_Some)) {
@@ -75921,6 +75892,11 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classConstructorFoot
75921
75892
  this.out$2.dec__V();
75922
75893
  this.out$2.puts__T__V("}")
75923
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
+ });
75924
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) {
75925
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)
75926
75902
  });
@@ -75963,20 +75939,6 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.readFooter__V = (fun
75963
75939
  this.out$2.dec__V();
75964
75940
  this.out$2.puts__T__V("}")
75965
75941
  });
75966
- $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) {
75967
- if ((needRaw.level__I() >= 1)) {
75968
- 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)) + ");"))
75969
- };
75970
- if ((needRaw.level__I() >= 2)) {
75971
- 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)) + ");"))
75972
- };
75973
- 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)) + ");"));
75974
- if (this.config$1.readStoresPos$1) {
75975
- 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)) + ");"))
75976
- };
75977
- 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++) {"));
75978
- this.out$2.inc__V()
75979
- });
75980
75942
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
75981
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)) + ") {"))
75982
75944
  });
@@ -76234,12 +76196,6 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.translator__Lio_kait
76234
76196
  $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
76235
76197
  return this.translator$2
76236
76198
  });
76237
- $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) {
76238
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
76239
- this.out$2.puts__T__V("i++;");
76240
- this.out$2.dec__V();
76241
- this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
76242
- });
76243
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) {
76244
76200
  var x = $m_Lio_kaitai_struct_format_NoRepeat$();
76245
76201
  if ((x === rep)) {
@@ -76350,19 +76306,18 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.classHeader__sci_List__s_Op
76350
76306
  jsx$1.puts__T__V(((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$1)) + ext) + " {"));
76351
76307
  this.out$2.inc__V()
76352
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
+ });
76353
76315
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.switchEnd__V = (function() {
76354
76316
  this.universalFooter__V()
76355
76317
  });
76356
- $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) {
76357
- if ((needRaw.level__I() >= 1)) {
76358
- 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)) + " = [];"))
76359
- };
76360
- if ((needRaw.level__I() >= 2)) {
76361
- 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))) + " = [];"))
76362
- };
76363
- 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) {
76364
76319
  this.out$2.puts__T__V("$i = 0;");
76365
- this.out$2.puts__T__V("do {");
76320
+ this.out$2.puts__T__V((("while (!" + io) + "->isEof()) {"));
76366
76321
  this.out$2.inc__V()
76367
76322
  });
76368
76323
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
@@ -76426,6 +76381,15 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.kaitaiType2NativeType__Lio_
76426
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) {
76427
76382
  this.outHeader$2 = x$1
76428
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
+ });
76429
76393
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
76430
76394
  this.out$2.puts__T__V("if ($this->_m__is_le) {");
76431
76395
  this.out$2.inc__V();
@@ -76441,18 +76405,6 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceHeader__sci_List__L
76441
76405
  this.out$2.puts__T__V((("public function " + this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "() {"));
76442
76406
  this.out$2.inc__V()
76443
76407
  });
76444
- $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) {
76445
- if ((needRaw.level__I() >= 1)) {
76446
- 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)) + " = [];"))
76447
- };
76448
- if ((needRaw.level__I() >= 2)) {
76449
- 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))) + " = [];"))
76450
- };
76451
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
76452
- this.out$2.puts__T__V("$i = 0;");
76453
- this.out$2.puts__T__V((("while (!" + io) + "->isEof()) {"));
76454
- this.out$2.inc__V()
76455
- });
76456
76408
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
76457
76409
  var x = $m_Lio_kaitai_struct_format_IoIdentifier$();
76458
76410
  if (x.equals__O__Z(id)) {
@@ -76761,6 +76713,11 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.idToStr__Lio_kaitai_struct_
76761
76713
  throw new $c_s_MatchError().init___O(id)
76762
76714
  }
76763
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
+ });
76764
76721
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.alignToByte__T__V = (function(io) {
76765
76722
  this.out$2.puts__T__V((io + "->alignToByte();"))
76766
76723
  });
@@ -76816,7 +76773,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatEos__
76816
76773
  this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[] = ") + expr) + ";"))
76817
76774
  });
76818
76775
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
76819
- 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)
76820
76777
  });
76821
76778
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
76822
76779
  if ((endian instanceof $c_s_Some)) {
@@ -76854,6 +76811,11 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.switchCaseStart__Lio_kaitai
76854
76811
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.classConstructorFooter__V = (function() {
76855
76812
  this.universalFooter__V()
76856
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
+ });
76857
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) {
76858
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)
76859
76821
  });
@@ -76895,18 +76857,6 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.io$kaitai$struct$languages$
76895
76857
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.readFooter__V = (function() {
76896
76858
  this.universalFooter__V()
76897
76859
  });
76898
- $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) {
76899
- if ((needRaw.level__I() >= 1)) {
76900
- 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)) + " = [];"))
76901
- };
76902
- if ((needRaw.level__I() >= 2)) {
76903
- 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))) + " = [];"))
76904
- };
76905
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
76906
- this.out$2.puts__T__V((("$n = " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
76907
- this.out$2.puts__T__V("for ($i = 0; $i < $n; $i++) {");
76908
- this.out$2.inc__V()
76909
- });
76910
76860
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
76911
76861
  this.translator$2.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(on);
76912
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)) + ") {"));
@@ -77119,12 +77069,6 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.translator__Lio_kaitai_stru
77119
77069
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
77120
77070
  return this.translator$2
77121
77071
  });
77122
- $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) {
77123
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
77124
- this.out$2.puts__T__V("$i++;");
77125
- this.out$2.dec__V();
77126
- this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
77127
- });
77128
77072
  $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.universalFooter__V = (function() {
77129
77073
  this.out$2.dec__V();
77130
77074
  this.out$2.puts__T__V("}")
@@ -77194,18 +77138,16 @@ function $h_Lio_kaitai_struct_languages_PerlCompiler() {
77194
77138
  /*<skip>*/
77195
77139
  }
77196
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
+ });
77197
77146
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchEnd__V = (function() {
77198
77147
  /*<skip>*/
77199
77148
  });
77200
- $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) {
77201
- if ((needRaw.level__I() >= 1)) {
77202
- 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)) + " = ();"))
77203
- };
77204
- if ((needRaw.level__I() >= 2)) {
77205
- 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))) + " = ();"))
77206
- };
77207
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"));
77208
- 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()) {"));
77209
77151
  this.out$2.inc__V()
77210
77152
  });
77211
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) {
@@ -77215,6 +77157,15 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchIfElseStart__V = (fu
77215
77157
  this.out$2.puts__T__V("else {");
77216
77158
  this.out$2.inc__V()
77217
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
+ });
77218
77169
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
77219
77170
  this.out$2.puts__T__V((("if (" + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_EndianIdentifier$())) + ") {"));
77220
77171
  this.out$2.inc__V();
@@ -77236,17 +77187,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceHeader__sci_List__
77236
77187
  this.out$2.inc__V();
77237
77188
  this.out$2.puts__T__V("my ($self) = @_;")
77238
77189
  });
77239
- $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) {
77240
- if ((needRaw.level__I() >= 1)) {
77241
- 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)) + " = ();"))
77242
- };
77243
- if ((needRaw.level__I() >= 2)) {
77244
- 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))) + " = ();"))
77245
- };
77246
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"));
77247
- this.out$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
77248
- this.out$2.inc__V()
77249
- });
77250
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) {
77251
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));
77252
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)) + ";"))
@@ -77443,6 +77383,12 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.idToStr__Lio_kaitai_struct
77443
77383
  throw new $c_s_MatchError().init___O(id)
77444
77384
  }
77445
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
+ });
77446
77392
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.alignToByte__T__V = (function(io) {
77447
77393
  this.out$2.puts__T__V((io + "->align_to_byte();"))
77448
77394
  });
@@ -77495,7 +77441,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatEos_
77495
77441
  this.out$2.puts__T__V((((("push @{" + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + "}, ") + expr) + ";"))
77496
77442
  });
77497
77443
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
77498
- 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)
77499
77445
  });
77500
77446
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classHeader__sci_List__V = (function(name) {
77501
77447
  var this$1 = this.out$2;
@@ -77553,6 +77499,10 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classConstructorFooter__V
77553
77499
  this.out$2.puts__T__V("return $self;");
77554
77500
  this.universalFooter__V()
77555
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
+ });
77556
77506
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.onComparisonExpr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr$Compare = (function(condition) {
77557
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)
77558
77508
  });
@@ -77596,19 +77546,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.io$kaitai$struct$languages
77596
77546
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.readFooter__V = (function() {
77597
77547
  this.universalFooter__V()
77598
77548
  });
77599
- $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) {
77600
- if ((needRaw.level__I() >= 1)) {
77601
- 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)) + " = ();"))
77602
- };
77603
- if ((needRaw.level__I() >= 2)) {
77604
- 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))) + " = ();"))
77605
- };
77606
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"));
77607
- var nVar = ("$n_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id));
77608
- 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)) + ";"));
77609
- this.out$2.puts__T__V((("for (my $i = 0; $i < " + nVar) + "; $i++) {"));
77610
- this.out$2.inc__V()
77611
- });
77612
77549
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
77613
77550
  /*<skip>*/
77614
77551
  });
@@ -77756,11 +77693,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.translator__Lio_kaitai_str
77756
77693
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
77757
77694
  return this.translator$2
77758
77695
  });
77759
- $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) {
77760
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
77761
- this.out$2.dec__V();
77762
- this.out$2.puts__T__V((("} until (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ");"))
77763
- });
77764
77696
  $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.universalFooter__V = (function() {
77765
77697
  this.out$2.dec__V();
77766
77698
  this.out$2.puts__T__V("}")
@@ -77865,21 +77797,20 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.classHeader__sci_List__s_O
77865
77797
  this.out$2.puts__T__V("#[derive(Default)]");
77866
77798
  this.out$2.puts__T__V((("pub struct " + $m_Lio_kaitai_struct_languages_RustCompiler$().types2classRel__sci_List__T(name)) + " {"))
77867
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
+ });
77868
77806
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchEnd__V = (function() {
77869
77807
  this.universalFooter__V()
77870
77808
  });
77871
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) {
77872
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)) + ">,"))
77873
77811
  });
77874
- $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) {
77875
- if ((needRaw.level__I() >= 1)) {
77876
- 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!();"))
77877
- };
77878
- if ((needRaw.level__I() >= 2)) {
77879
- 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!();"))
77880
- };
77881
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = vec!();"));
77882
- 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() {"));
77883
77814
  this.out$2.inc__V()
77884
77815
  });
77885
77816
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
@@ -78091,6 +78022,15 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.kaitaiType2NativeType__Lio
78091
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) {
78092
78023
  this.outHeader$2 = x$1
78093
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
+ });
78094
78034
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
78095
78035
  this.out$2.puts__T__V("if ($this->_m__is_le) {");
78096
78036
  this.out$2.inc__V();
@@ -78106,17 +78046,6 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.instanceHeader__sci_List__
78106
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)) + " {"));
78107
78047
  this.out$2.inc__V()
78108
78048
  });
78109
- $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) {
78110
- if ((needRaw.level__I() >= 1)) {
78111
- 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)) + " = [];"))
78112
- };
78113
- if ((needRaw.level__I() >= 2)) {
78114
- 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))) + " = [];"))
78115
- };
78116
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
78117
- this.out$2.puts__T__V((("while !" + io) + ".isEof() {"));
78118
- this.out$2.inc__V()
78119
- });
78120
78049
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
78121
78050
  var x = $m_Lio_kaitai_struct_format_IoIdentifier$();
78122
78051
  if (x.equals__O__Z(id)) {
@@ -78371,6 +78300,10 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.idToStr__Lio_kaitai_struct
78371
78300
  throw new $c_s_MatchError().init___O(id)
78372
78301
  }
78373
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
+ });
78374
78307
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.alignToByte__T__V = (function(io) {
78375
78308
  this.out$2.puts__T__V((io + ".alignToByte();"))
78376
78309
  });
@@ -78395,7 +78328,7 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchCaseEnd__V = (functi
78395
78328
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__T__Z__V = (function(id, expr, isRaw) {
78396
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));
78397
78330
  this.out$2.puts__T__V((((("let " + tempVar) + " = ") + expr) + ";"));
78398
- 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) + ");"))
78399
78332
  });
78400
78333
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.opaqueClassDeclaration__Lio_kaitai_struct_format_ClassSpec__V = (function(classSpec) {
78401
78334
  var this$1 = classSpec.name$1;
@@ -78443,10 +78376,10 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condIfHeader__Lio_kaitai_s
78443
78376
  this.out$2.inc__V()
78444
78377
  });
78445
78378
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
78446
- 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) + ");"))
78447
78380
  });
78448
78381
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
78449
- 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)
78450
78383
  });
78451
78384
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.classHeader__sci_List__V = (function(name) {
78452
78385
  this.classHeader__sci_List__s_Option__V(name, new $c_s_Some().init___O("&Option<Box<KaitaiStruct>>"))
@@ -78480,6 +78413,10 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchCaseStart__Lio_kaita
78480
78413
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.classConstructorFooter__V = (function() {
78481
78414
  this.universalFooter__V()
78482
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
+ });
78483
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) {
78484
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)
78485
78422
  });
@@ -78519,17 +78456,6 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.readFooter__V = (function(
78519
78456
  this.out$2.dec__V();
78520
78457
  this.out$2.puts__T__V("}")
78521
78458
  });
78522
- $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) {
78523
- if ((needRaw.level__I() >= 1)) {
78524
- 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!();"))
78525
- };
78526
- if ((needRaw.level__I() >= 2)) {
78527
- 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!();"))
78528
- };
78529
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = vec!();"));
78530
- 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)) + " {"));
78531
- this.out$2.inc__V()
78532
- });
78533
78459
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
78534
78460
  var onType = this.translator$2.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(on);
78535
78461
  this.switchIfs$2 = ((onType instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream) || (onType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType));
@@ -78729,12 +78655,6 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.translator__Lio_kaitai_str
78729
78655
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
78730
78656
  return this.translator$2
78731
78657
  });
78732
- $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) {
78733
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
78734
- this.out$2.puts__T__V((("!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ")"));
78735
- this.out$2.dec__V();
78736
- this.out$2.puts__T__V("} { }")
78737
- });
78738
78658
  $c_Lio_kaitai_struct_languages_RustCompiler.prototype.universalFooter__V = (function() {
78739
78659
  this.out$2.dec__V();
78740
78660
  this.out$2.puts__T__V("}")
@@ -78824,13 +78744,21 @@ function $h_Lio_kaitai_struct_languages_CSharpCompiler() {
78824
78744
  /*<skip>*/
78825
78745
  }
78826
78746
  $h_Lio_kaitai_struct_languages_CSharpCompiler.prototype = $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype;
78827
- $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();
78828
78753
  this.out$2.puts__T__V("}")
78829
78754
  });
78830
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) {
78831
78756
  this.out$2.puts__T__V((("private bool " + this.flagForInstName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
78832
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)) + ";"))
78833
78758
  });
78759
+ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchEnd__V = (function() {
78760
+ this.out$2.puts__T__V("}")
78761
+ });
78834
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) {
78835
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)));
78836
78764
  this.out$2.puts__T__V("{");
@@ -78839,21 +78767,11 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceHeader__T__Lio_k
78839
78767
  this.out$2.puts__T__V("{");
78840
78768
  this.out$2.inc__V()
78841
78769
  });
78842
- $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) {
78843
- var this$1 = this.importList$2;
78844
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
78845
- if ((needRaw.level__I() >= 1)) {
78846
- 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[]>();"))
78847
- };
78848
- if ((needRaw.level__I() >= 2)) {
78849
- 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[]>();"))
78850
- };
78851
- 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) {
78852
78771
  this.out$2.puts__T__V("{");
78853
78772
  this.out$2.inc__V();
78854
78773
  this.out$2.puts__T__V("var i = 0;");
78855
- 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("_")) + ";"));
78856
- this.out$2.puts__T__V("do {");
78774
+ this.out$2.puts__T__V((("while (!" + io) + ".IsEof) {"));
78857
78775
  this.out$2.inc__V()
78858
78776
  });
78859
78777
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
@@ -78867,6 +78785,17 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchIfElseStart__V = (
78867
78785
  this.out$2.puts__T__V("{");
78868
78786
  this.out$2.inc__V()
78869
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
+ });
78870
78799
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classHeader__T__V = (function(name) {
78871
78800
  this.out$2.puts__T__V((("public partial class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " : KaitaiStruct"));
78872
78801
  this.out$2.puts__T__V("{");
@@ -78899,22 +78828,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchCasesUsingIf__Lio_
78899
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) {
78900
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)
78901
78830
  });
78902
- $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) {
78903
- var this$1 = this.importList$2;
78904
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
78905
- if ((needRaw.level__I() >= 1)) {
78906
- 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[]>();"))
78907
- };
78908
- if ((needRaw.level__I() >= 2)) {
78909
- 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[]>();"))
78910
- };
78911
- 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))) + "();"));
78912
- this.out$2.puts__T__V("{");
78913
- this.out$2.inc__V();
78914
- this.out$2.puts__T__V("var i = 0;");
78915
- this.out$2.puts__T__V((("while (!" + io) + ".IsEof) {"));
78916
- this.out$2.inc__V()
78917
- });
78918
78831
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
78919
78832
  if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
78920
78833
  var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
@@ -79196,6 +79109,11 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.idToStr__Lio_kaitai_stru
79196
79109
  throw new $c_s_MatchError().init___O(id)
79197
79110
  }
79198
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
+ });
79199
79117
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
79200
79118
  return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
79201
79119
  });
@@ -79245,7 +79163,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentRepeatEo
79245
79163
  this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".Add(") + expr) + ");"))
79246
79164
  });
79247
79165
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
79248
- 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)
79249
79167
  });
79250
79168
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
79251
79169
  var readAccessAndType = ((!this.config$1.autoRead$1) ? "public" : "private");
@@ -79279,6 +79197,14 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchCaseStart__Lio_kai
79279
79197
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorFooter__V = (function() {
79280
79198
  this.fileFooter__T__V(null)
79281
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
+ });
79282
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) {
79283
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)
79284
79210
  });
@@ -79324,20 +79250,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.io$kaitai$struct$languag
79324
79250
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readFooter__V = (function() {
79325
79251
  this.fileFooter__T__V("")
79326
79252
  });
79327
- $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) {
79328
- var this$1 = this.importList$2;
79329
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
79330
- if ((needRaw.level__I() >= 1)) {
79331
- 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)) + "));"))
79332
- };
79333
- if ((needRaw.level__I() >= 2)) {
79334
- 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)) + "));"))
79335
- };
79336
- 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)) + "));"));
79337
- 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++)"));
79338
- this.out$2.puts__T__V("{");
79339
- this.out$2.inc__V()
79340
- });
79341
79253
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
79342
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)) + ") {"))
79343
79255
  });
@@ -79666,14 +79578,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorHeader__
79666
79578
  $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.flagForInstName__Lio_kaitai_struct_format_Identifier__T = (function(ksName) {
79667
79579
  return ("f_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(ksName))
79668
79580
  });
79669
- $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) {
79670
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
79671
- this.out$2.puts__T__V("i++;");
79672
- this.out$2.dec__V();
79673
- this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
79674
- this.out$2.dec__V();
79675
- this.out$2.puts__T__V("}")
79676
- });
79677
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) {
79678
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)) + ")"))
79679
79583
  });
@@ -79752,19 +79656,24 @@ function $h_Lio_kaitai_struct_languages_LuaCompiler() {
79752
79656
  /*<skip>*/
79753
79657
  }
79754
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
+ });
79755
79671
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchEnd__V = (function() {
79756
79672
  /*<skip>*/
79757
79673
  });
79758
- $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) {
79759
- if ((needRaw.level__I() >= 1)) {
79760
- 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)) + " = {}"))
79761
- };
79762
- if ((needRaw.level__I() >= 2)) {
79763
- 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))) + " = {}"))
79764
- };
79765
- 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) {
79766
79675
  this.out$2.puts__T__V("local i = 0");
79767
- this.out$2.puts__T__V("while true do");
79676
+ this.out$2.puts__T__V((("while not " + io) + ":is_eof() do"));
79768
79677
  this.out$2.inc__V()
79769
79678
  });
79770
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) {
@@ -79774,6 +79683,15 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfElseStart__V = (fun
79774
79683
  this.out$2.puts__T__V("else");
79775
79684
  this.out$2.inc__V()
79776
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
+ });
79777
79695
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
79778
79696
  this.out$2.puts__T__V("if self._is_le then");
79779
79697
  this.out$2.inc__V();
@@ -79793,18 +79711,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceHeader__sci_List__L
79793
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()"));
79794
79712
  this.out$2.inc__V()
79795
79713
  });
79796
- $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) {
79797
- if ((needRaw.level__I() >= 1)) {
79798
- 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)) + " = {}"))
79799
- };
79800
- if ((needRaw.level__I() >= 2)) {
79801
- 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))) + " = {}"))
79802
- };
79803
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"));
79804
- this.out$2.puts__T__V("local i = 0");
79805
- this.out$2.puts__T__V((("while not " + io) + ":is_eof() do"));
79806
- this.out$2.inc__V()
79807
- });
79808
79714
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
79809
79715
  return ("self." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
79810
79716
  });
@@ -80095,6 +80001,10 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.idToStr__Lio_kaitai_struct_
80095
80001
  throw new $c_s_MatchError().init___O(id)
80096
80002
  }
80097
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
+ });
80098
80008
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.alignToByte__T__V = (function(io) {
80099
80009
  this.out$2.puts__T__V((io + ":align_to_byte()"))
80100
80010
  });
@@ -80175,6 +80085,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classConstructorFooter__V =
80175
80085
  var this$1 = this.out$2;
80176
80086
  this$1.sb$2.append__T__scm_StringBuilder("\n")
80177
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, repeatExpr) {
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
+ });
80178
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) {
80179
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)
80180
80095
  });
@@ -80219,17 +80134,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.readFooter__V = (function()
80219
80134
  var this$1 = this.out$2;
80220
80135
  this$1.sb$2.append__T__scm_StringBuilder("\n")
80221
80136
  });
80222
- $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) {
80223
- if ((needRaw.level__I() >= 1)) {
80224
- 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)) + " = {}"))
80225
- };
80226
- if ((needRaw.level__I() >= 2)) {
80227
- 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))) + " = {}"))
80228
- };
80229
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"));
80230
- 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"));
80231
- this.out$2.inc__V()
80232
- });
80233
80137
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
80234
80138
  /*<skip>*/
80235
80139
  });
@@ -80520,18 +80424,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.translator__Lio_kaitai_stru
80520
80424
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
80521
80425
  return this.translator$2
80522
80426
  });
80523
- $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) {
80524
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
80525
- 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"));
80526
- this.out$2.inc__V();
80527
- this.out$2.puts__T__V("break");
80528
- this.out$2.dec__V();
80529
- this.out$2.puts__T__V("end");
80530
- this.out$2.puts__T__V("i = i + 1");
80531
- this.out$2.dec__V();
80532
- this.out$2.puts__T__V("end");
80533
- this.out$2.dec__V()
80534
- });
80535
80427
  $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
80536
80428
  return this.outHeader$2
80537
80429
  });
@@ -80599,6 +80491,16 @@ function $h_Lio_kaitai_struct_languages_NimCompiler() {
80599
80491
  /*<skip>*/
80600
80492
  }
80601
80493
  $h_Lio_kaitai_struct_languages_NimCompiler.prototype = $c_Lio_kaitai_struct_languages_NimCompiler.prototype;
80494
+ $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, repeatExpr) {
80495
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
80496
+ this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ":"));
80497
+ this.out$2.inc__V();
80498
+ this.out$2.puts__T__V("break");
80499
+ this.out$2.dec__V();
80500
+ this.out$2.puts__T__V("inc i");
80501
+ this.out$2.dec__V();
80502
+ this.out$2.dec__V()
80503
+ });
80602
80504
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
80603
80505
  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)));
80604
80506
  this.out$2.puts__T__V((("`" + this.instanceFlagIdentifier__Lio_kaitai_struct_format_InstanceIdentifier__T(attrName)) + "`: bool"))
@@ -80606,11 +80508,11 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceDeclaration__Lio_ka
80606
80508
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchEnd__V = (function() {
80607
80509
  /*<skip>*/
80608
80510
  });
80609
- $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) {
80511
+ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
80610
80512
  this.out$2.puts__T__V("block:");
80611
80513
  this.out$2.inc__V();
80612
80514
  this.out$2.puts__T__V("var i: int");
80613
- this.out$2.puts__T__V("while true:");
80515
+ this.out$2.puts__T__V((("while not " + io) + ".isEof:"));
80614
80516
  this.out$2.inc__V()
80615
80517
  });
80616
80518
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchIfElseStart__V = (function() {
@@ -80620,6 +80522,9 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchIfElseStart__V = (fun
80620
80522
  $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) {
80621
80523
  this.outHeader$2 = x$1
80622
80524
  });
80525
+ $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) {
80526
+ /*<skip>*/
80527
+ });
80623
80528
  $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) {
80624
80529
  var jsx$1 = this.out$2;
80625
80530
  var x = this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName);
@@ -80683,13 +80588,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceHeader__sci_List__L
80683
80588
  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)) + " = "));
80684
80589
  this.out$2.inc__V()
80685
80590
  });
80686
- $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) {
80687
- this.out$2.puts__T__V("block:");
80688
- this.out$2.inc__V();
80689
- this.out$2.puts__T__V("var i: int");
80690
- this.out$2.puts__T__V((("while not " + io) + ".isEof:"));
80691
- this.out$2.inc__V()
80692
- });
80693
80591
  $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) {
80694
80592
  this.out$2.puts__T__V("block:");
80695
80593
  this.out$2.inc__V();
@@ -80971,6 +80869,10 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.classForwardDeclaration__sc
80971
80869
  var paramsArg = jsx$3.join__sc_TraversableOnce__T__T__T__T($as_sc_TraversableOnce(jsx$2), ", ", ", ", "");
80972
80870
  this.out$2.puts__T__V((((((("proc read*(_: typedesc[" + t) + "], io: KaitaiStream, root: KaitaiStruct, parent: ") + p) + paramsArg) + "): ") + t))
80973
80871
  });
80872
+ $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) {
80873
+ 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)) + "):"));
80874
+ this.out$2.inc__V()
80875
+ });
80974
80876
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.alignToByte__T__V = (function(io) {
80975
80877
  this.out$2.puts__T__V((("alignToByte(" + io) + ")"))
80976
80878
  });
@@ -81179,6 +81081,13 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchCaseStart__Lio_kaitai
81179
81081
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.classConstructorFooter__V = (function() {
81180
81082
  this.out$2.dec__V()
81181
81083
  });
81084
+ $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, repeatExpr) {
81085
+ this.out$2.puts__T__V("block:");
81086
+ this.out$2.inc__V();
81087
+ this.out$2.puts__T__V("var i: int");
81088
+ this.out$2.puts__T__V("while true:");
81089
+ this.out$2.inc__V()
81090
+ });
81182
81091
  $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) {
81183
81092
  $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)
81184
81093
  });
@@ -81206,10 +81115,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.outFileName__T__T = (functi
81206
81115
  $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) {
81207
81116
  this.importList$2 = x$1
81208
81117
  });
81209
- $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) {
81210
- 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)) + "):"));
81211
- this.out$2.inc__V()
81212
- });
81213
81118
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.readFooter__V = (function() {
81214
81119
  this.out$2.dec__V();
81215
81120
  var this$1 = this.out$2;
@@ -81427,16 +81332,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.translator__Lio_kaitai_stru
81427
81332
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
81428
81333
  return this.translator$2
81429
81334
  });
81430
- $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) {
81431
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
81432
- this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ":"));
81433
- this.out$2.inc__V();
81434
- this.out$2.puts__T__V("break");
81435
- this.out$2.dec__V();
81436
- this.out$2.puts__T__V("inc i");
81437
- this.out$2.dec__V();
81438
- this.out$2.dec__V()
81439
- });
81440
81335
  $c_Lio_kaitai_struct_languages_NimCompiler.prototype.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
81441
81336
  return this.outHeader$2
81442
81337
  });
@@ -81516,6 +81411,12 @@ function $h_Lio_kaitai_struct_languages_RubyCompiler() {
81516
81411
  /*<skip>*/
81517
81412
  }
81518
81413
  $h_Lio_kaitai_struct_languages_RubyCompiler.prototype = $c_Lio_kaitai_struct_languages_RubyCompiler.prototype;
81414
+ $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) {
81415
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
81416
+ this.out$2.puts__T__V("i += 1");
81417
+ this.out$2.dec__V();
81418
+ 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)))
81419
+ });
81519
81420
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.switchEnd__V = (function() {
81520
81421
  this.out$2.puts__T__V("end")
81521
81422
  });
@@ -81573,16 +81474,9 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceHeader__T__Lio_kai
81573
81474
  this.out$2.puts__T__V(("def " + instName.name$2));
81574
81475
  this.out$2.inc__V()
81575
81476
  });
81576
- $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) {
81577
- if ((needRaw.level__I() >= 1)) {
81578
- 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)) + " = []"))
81579
- };
81580
- if ((needRaw.level__I() >= 2)) {
81581
- 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))) + " = []"))
81582
- };
81583
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
81477
+ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
81584
81478
  this.out$2.puts__T__V("i = 0");
81585
- this.out$2.puts__T__V("begin");
81479
+ this.out$2.puts__T__V((("while not " + io) + ".eof?"));
81586
81480
  this.out$2.inc__V()
81587
81481
  });
81588
81482
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.types2class__sci_List__T = (function(names) {
@@ -81628,6 +81522,15 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.types2class__sci_List__T =
81628
81522
  $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) {
81629
81523
  this.outHeader$2 = x$1
81630
81524
  });
81525
+ $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) {
81526
+ if ((needRaw.level__I() >= 1)) {
81527
+ 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)) + " = []"))
81528
+ };
81529
+ if ((needRaw.level__I() >= 2)) {
81530
+ 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))) + " = []"))
81531
+ };
81532
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"))
81533
+ });
81631
81534
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classHeader__T__V = (function(name) {
81632
81535
  this.out$2.puts__T__V((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " < Kaitai::Struct::Struct"));
81633
81536
  this.out$2.inc__V();
@@ -81649,18 +81552,6 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrParseHybrid__F0__F0__V
81649
81552
  $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) {
81650
81553
  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)
81651
81554
  });
81652
- $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) {
81653
- if ((needRaw.level__I() >= 1)) {
81654
- 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)) + " = []"))
81655
- };
81656
- if ((needRaw.level__I() >= 2)) {
81657
- 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))) + " = []"))
81658
- };
81659
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
81660
- this.out$2.puts__T__V("i = 0");
81661
- this.out$2.puts__T__V((("while not " + io) + ".eof?"));
81662
- this.out$2.inc__V()
81663
- });
81664
81555
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
81665
81556
  return ("@" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
81666
81557
  });
@@ -81941,6 +81832,10 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.idToStr__Lio_kaitai_struct
81941
81832
  throw new $c_s_MatchError().init___O(id)
81942
81833
  }
81943
81834
  });
81835
+ $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) {
81836
+ 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|"));
81837
+ this.out$2.inc__V()
81838
+ });
81944
81839
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.alignToByte__T__V = (function(io) {
81945
81840
  this.out$2.puts__T__V((io + ".align_to_byte"))
81946
81841
  });
@@ -81978,7 +81873,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatEos_
81978
81873
  this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " << ") + expr))
81979
81874
  });
81980
81875
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
81981
- this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i] = ") + expr))
81876
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
81982
81877
  });
81983
81878
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
81984
81879
  if ((endian instanceof $c_s_Some)) {
@@ -82010,6 +81905,11 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.switchCaseStart__Lio_kaita
82010
81905
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classConstructorFooter__V = (function() {
82011
81906
  this.universalFooter__V()
82012
81907
  });
81908
+ $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) {
81909
+ this.out$2.puts__T__V("i = 0");
81910
+ this.out$2.puts__T__V("begin");
81911
+ this.out$2.inc__V()
81912
+ });
82013
81913
  $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) {
82014
81914
  $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)
82015
81915
  });
@@ -82056,17 +81956,6 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.readFooter__V = (function(
82056
81956
  this.out$2.puts__T__V("self");
82057
81957
  this.universalFooter__V()
82058
81958
  });
82059
- $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) {
82060
- if ((needRaw.level__I() >= 1)) {
82061
- 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)) + ")"))
82062
- };
82063
- if ((needRaw.level__I() >= 2)) {
82064
- 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)) + ")"))
82065
- };
82066
- 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)) + ")"));
82067
- 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|"));
82068
- this.out$2.inc__V()
82069
- });
82070
81959
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
82071
81960
  this.out$2.puts__T__V(("case " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)))
82072
81961
  });
@@ -82363,12 +82252,6 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classConstructorHeader__T_
82363
82252
  this.out$2.puts__T__V("@_debug = {}")
82364
82253
  }
82365
82254
  });
82366
- $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) {
82367
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
82368
- this.out$2.puts__T__V("i += 1");
82369
- this.out$2.dec__V();
82370
- 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)))
82371
- });
82372
82255
  $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.universalFooter__V = (function() {
82373
82256
  this.out$2.dec__V();
82374
82257
  this.out$2.puts__T__V("end")
@@ -82613,6 +82496,14 @@ function $h_Lio_kaitai_struct_languages_JavaCompiler() {
82613
82496
  /*<skip>*/
82614
82497
  }
82615
82498
  $h_Lio_kaitai_struct_languages_JavaCompiler.prototype = $c_Lio_kaitai_struct_languages_JavaCompiler.prototype;
82499
+ $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) {
82500
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
82501
+ this.out$2.puts__T__V("i++;");
82502
+ this.out$2.dec__V();
82503
+ this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
82504
+ this.out$2.dec__V();
82505
+ this.out$2.puts__T__V("}")
82506
+ });
82616
82507
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
82617
82508
  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)) + ";"))
82618
82509
  });
@@ -82664,28 +82555,14 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceHeader__T__Lio_kai
82664
82555
  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)) + "() {"));
82665
82556
  this.out$2.inc__V()
82666
82557
  });
82667
- $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) {
82668
- if ((needRaw.level__I() >= 1)) {
82669
- 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[]>();"))
82670
- };
82671
- if ((needRaw.level__I() >= 2)) {
82672
- 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[]>();"))
82673
- };
82674
- var jsx$2 = this.out$2;
82675
- var jsx$1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
82676
- var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
82677
- var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
82678
- jsx$2.puts__T__V((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "();"));
82558
+ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
82679
82559
  this.out$2.puts__T__V("{");
82680
82560
  this.out$2.inc__V();
82681
- var jsx$3 = this.out$2;
82682
- var this$2 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
82683
- jsx$3.puts__T__V((((this$2.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(dataType) + " ") + this.translator$2.doName__T__T("_")) + ";"));
82684
82561
  this.out$2.puts__T__V("int i = 0;");
82685
- this.out$2.puts__T__V("do {");
82562
+ this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
82686
82563
  this.out$2.inc__V();
82687
- var this$3 = this.importList$2;
82688
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$3.list$1, "java.util.ArrayList")
82564
+ var this$1 = this.importList$2;
82565
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "java.util.ArrayList")
82689
82566
  });
82690
82567
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfElseStart__V = (function() {
82691
82568
  this.out$2.puts__T__V("else {");
@@ -82694,6 +82571,19 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfElseStart__V = (fu
82694
82571
  $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) {
82695
82572
  this.outHeader$2 = x$1
82696
82573
  });
82574
+ $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) {
82575
+ if ((needRaw.level__I() >= 1)) {
82576
+ 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[]>();"))
82577
+ };
82578
+ if ((needRaw.level__I() >= 2)) {
82579
+ 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[]>();"))
82580
+ };
82581
+ var jsx$2 = this.out$2;
82582
+ var jsx$1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
82583
+ var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
82584
+ var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
82585
+ jsx$2.puts__T__V((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "();"))
82586
+ });
82697
82587
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classHeader__T__V = (function(name) {
82698
82588
  var staticStr = ((this.out$2.indentLevel$1 > 0) ? "static " : "");
82699
82589
  this.out$2.puts__T__V((((("public " + staticStr) + "class ") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " extends KaitaiStruct {"));
@@ -82760,26 +82650,6 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCasesUsingIf__Lio_ka
82760
82650
  $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) {
82761
82651
  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)
82762
82652
  });
82763
- $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) {
82764
- if ((needRaw.level__I() >= 1)) {
82765
- 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[]>();"))
82766
- };
82767
- if ((needRaw.level__I() >= 2)) {
82768
- 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[]>();"))
82769
- };
82770
- var jsx$2 = this.out$2;
82771
- var jsx$1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
82772
- var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
82773
- var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
82774
- jsx$2.puts__T__V((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "();"));
82775
- this.out$2.puts__T__V("{");
82776
- this.out$2.inc__V();
82777
- this.out$2.puts__T__V("int i = 0;");
82778
- this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
82779
- this.out$2.inc__V();
82780
- var this$2 = this.importList$2;
82781
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "java.util.ArrayList")
82782
- });
82783
82653
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
82784
82654
  return ("this." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
82785
82655
  });
@@ -83130,6 +83000,12 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.idToStr__Lio_kaitai_struct
83130
83000
  throw new $c_s_MatchError().init___O(id)
83131
83001
  }
83132
83002
  });
83003
+ $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) {
83004
+ 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++) {"));
83005
+ this.out$2.inc__V();
83006
+ var this$1 = this.importList$2;
83007
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "java.util.ArrayList")
83008
+ });
83133
83009
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
83134
83010
  return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
83135
83011
  });
@@ -83179,7 +83055,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatEos_
83179
83055
  this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".add(") + expr) + ");"))
83180
83056
  });
83181
83057
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
83182
- this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".add(") + expr) + ");"))
83058
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
83183
83059
  });
83184
83060
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classHeader__sci_List__V = (function(name) {
83185
83061
  this.classHeader__T__V($as_T($f_sc_LinearSeqOptimized__last__O(name)))
@@ -83220,6 +83096,18 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCaseStart__Lio_kaita
83220
83096
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorFooter__V = (function() {
83221
83097
  this.universalFooter__V()
83222
83098
  });
83099
+ $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) {
83100
+ this.out$2.puts__T__V("{");
83101
+ this.out$2.inc__V();
83102
+ var jsx$1 = this.out$2;
83103
+ var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
83104
+ jsx$1.puts__T__V((((this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(dataType) + " ") + this.translator$2.doName__T__T("_")) + ";"));
83105
+ this.out$2.puts__T__V("int i = 0;");
83106
+ this.out$2.puts__T__V("do {");
83107
+ this.out$2.inc__V();
83108
+ var this$2 = this.importList$2;
83109
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "java.util.ArrayList")
83110
+ });
83223
83111
  $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) {
83224
83112
  $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)
83225
83113
  });
@@ -83264,23 +83152,6 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.io$kaitai$struct$languages
83264
83152
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.readFooter__V = (function() {
83265
83153
  this.universalFooter__V()
83266
83154
  });
83267
- $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) {
83268
- if ((needRaw.level__I() >= 1)) {
83269
- 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());"))
83270
- };
83271
- if ((needRaw.level__I() >= 2)) {
83272
- 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());"))
83273
- };
83274
- var jsx$2 = this.out$2;
83275
- var jsx$1 = this.idToStr__Lio_kaitai_struct_format_Identifier__T(id);
83276
- var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
83277
- var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
83278
- 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());"));
83279
- 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++) {"));
83280
- this.out$2.inc__V();
83281
- var this$2 = this.importList$2;
83282
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "java.util.ArrayList")
83283
- });
83284
83155
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
83285
83156
  this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
83286
83157
  });
@@ -83761,14 +83632,6 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCasesRender__Lio_kai
83761
83632
  $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)
83762
83633
  }
83763
83634
  });
83764
- $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) {
83765
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
83766
- this.out$2.puts__T__V("i++;");
83767
- this.out$2.dec__V();
83768
- this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
83769
- this.out$2.dec__V();
83770
- this.out$2.puts__T__V("}")
83771
- });
83772
83635
  $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.universalFooter__V = (function() {
83773
83636
  this.out$2.dec__V();
83774
83637
  this.out$2.puts__T__V("}")
@@ -83856,6 +83719,15 @@ function $h_Lio_kaitai_struct_languages_PythonCompiler() {
83856
83719
  /*<skip>*/
83857
83720
  }
83858
83721
  $h_Lio_kaitai_struct_languages_PythonCompiler.prototype = $c_Lio_kaitai_struct_languages_PythonCompiler.prototype;
83722
+ $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) {
83723
+ this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
83724
+ this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ":"));
83725
+ this.out$2.inc__V();
83726
+ this.out$2.puts__T__V("break");
83727
+ this.out$2.dec__V();
83728
+ this.out$2.puts__T__V("i += 1");
83729
+ this.out$2.dec__V()
83730
+ });
83859
83731
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchEnd__V = (function() {
83860
83732
  /*<skip>*/
83861
83733
  });
@@ -83913,16 +83785,9 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceHeader__T__Lio_k
83913
83785
  this.out$2.puts__T__V((("def " + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + "(self):"));
83914
83786
  this.out$2.inc__V()
83915
83787
  });
83916
- $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) {
83917
- if ((needRaw.level__I() >= 1)) {
83918
- 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)) + " = []"))
83919
- };
83920
- if ((needRaw.level__I() >= 2)) {
83921
- 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))) + " = []"))
83922
- };
83923
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
83788
+ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
83924
83789
  this.out$2.puts__T__V("i = 0");
83925
- this.out$2.puts__T__V("while True:");
83790
+ this.out$2.puts__T__V((("while not " + io) + ".is_eof():"));
83926
83791
  this.out$2.inc__V()
83927
83792
  });
83928
83793
  $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) {
@@ -83932,6 +83797,15 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchIfElseStart__V = (
83932
83797
  this.out$2.puts__T__V("else:");
83933
83798
  this.out$2.inc__V()
83934
83799
  });
83800
+ $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) {
83801
+ if ((needRaw.level__I() >= 1)) {
83802
+ 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)) + " = []"))
83803
+ };
83804
+ if ((needRaw.level__I() >= 2)) {
83805
+ 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))) + " = []"))
83806
+ };
83807
+ this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"))
83808
+ });
83935
83809
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classHeader__T__V = (function(name) {
83936
83810
  this.out$2.puts__T__V((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + "(KaitaiStruct):"));
83937
83811
  this.out$2.inc__V()
@@ -83952,18 +83826,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchCasesUsingIf__Lio_
83952
83826
  $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) {
83953
83827
  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)
83954
83828
  });
83955
- $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) {
83956
- if ((needRaw.level__I() >= 1)) {
83957
- 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)) + " = []"))
83958
- };
83959
- if ((needRaw.level__I() >= 2)) {
83960
- 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))) + " = []"))
83961
- };
83962
- this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
83963
- this.out$2.puts__T__V("i = 0");
83964
- this.out$2.puts__T__V((("while not " + io) + ".is_eof():"));
83965
- this.out$2.inc__V()
83966
- });
83967
83829
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
83968
83830
  return ("self." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
83969
83831
  });
@@ -83974,7 +83836,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.seek__T__Lio_kaitai_stru
83974
83836
  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)) + ")"))
83975
83837
  });
83976
83838
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
83977
- 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"))
83839
+ this.out$2.puts__T__V((("return getattr(self, '" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "', None)"))
83978
83840
  });
83979
83841
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.bool2Py__Z__T = (function(b) {
83980
83842
  return (b ? "True" : "False")
@@ -84234,6 +84096,10 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.userType2class__Lio_kait
84234
84096
  var prefix = ((t.isOpaque__Z() && (firstName !== this.translator$2.provider$2.nowClass$1.name$1.head__O())) ? (firstName + ".") : "");
84235
84097
  return (prefix + $m_Lio_kaitai_struct_languages_PythonCompiler$().types2class__sci_List__T(name))
84236
84098
  });
84099
+ $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) {
84100
+ 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)) + "):"));
84101
+ this.out$2.inc__V()
84102
+ });
84237
84103
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
84238
84104
  return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
84239
84105
  });
@@ -84278,7 +84144,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatEo
84278
84144
  this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + expr) + ")"))
84279
84145
  });
84280
84146
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
84281
- this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i] = ") + expr))
84147
+ this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
84282
84148
  });
84283
84149
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classHeader__sci_List__V = (function(name) {
84284
84150
  this.classHeader__T__V($as_T($f_sc_LinearSeqOptimized__last__O(name)))
@@ -84310,6 +84176,11 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchCaseStart__Lio_kai
84310
84176
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classConstructorFooter__V = (function() {
84311
84177
  this.universalFooter__V()
84312
84178
  });
84179
+ $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) {
84180
+ this.out$2.puts__T__V("i = 0");
84181
+ this.out$2.puts__T__V("while True:");
84182
+ this.out$2.inc__V()
84183
+ });
84313
84184
  $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) {
84314
84185
  $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)
84315
84186
  });
@@ -84352,17 +84223,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.io$kaitai$struct$languag
84352
84223
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.readFooter__V = (function() {
84353
84224
  this.universalFooter__V()
84354
84225
  });
84355
- $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) {
84356
- if ((needRaw.level__I() >= 1)) {
84357
- 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)) + ")"))
84358
- };
84359
- if ((needRaw.level__I() >= 2)) {
84360
- 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)) + ")"))
84361
- };
84362
- 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)) + ")"));
84363
- 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)) + "):"));
84364
- this.out$2.inc__V()
84365
- });
84366
84226
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
84367
84227
  /*<skip>*/
84368
84228
  });
@@ -84601,7 +84461,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchIfCaseFirstStart__
84601
84461
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
84602
84462
  this.out$2.puts__T__V((("if hasattr(self, '" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "'):"));
84603
84463
  this.out$2.inc__V();
84604
- this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V(instName, dataType);
84464
+ this.out$2.puts__T__V(("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)));
84605
84465
  this.out$2.dec__V();
84606
84466
  var this$1 = this.out$2;
84607
84467
  this$1.sb$2.append__T__scm_StringBuilder("\n")
@@ -84754,15 +84614,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classConstructorHeader__
84754
84614
  this.out$2.puts__T__V("self._debug = collections.defaultdict(dict)")
84755
84615
  }
84756
84616
  });
84757
- $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) {
84758
- this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
84759
- this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ":"));
84760
- this.out$2.inc__V();
84761
- this.out$2.puts__T__V("break");
84762
- this.out$2.dec__V();
84763
- this.out$2.puts__T__V("i += 1");
84764
- this.out$2.dec__V()
84765
- });
84766
84617
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.universalFooter__V = (function() {
84767
84618
  this.out$2.dec__V();
84768
84619
  var this$1 = this.out$2;