kaitai-struct-compiler 0.10.0-SNAPSHOT20220317.110343.7ff2eda3 → 0.10.0-SNAPSHOT20220409.5702.c4cb01b0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4415,9 +4415,9 @@ function $h_Lio_kaitai_struct_Version$() {
4415
4415
  $h_Lio_kaitai_struct_Version$.prototype = $c_Lio_kaitai_struct_Version$.prototype;
4416
4416
  $c_Lio_kaitai_struct_Version$.prototype.init___ = (function() {
4417
4417
  this.name$1 = "kaitai-struct-compiler-js";
4418
- this.version$1 = "0.10-SNAPSHOT20220317.110343.7ff2eda3";
4419
- this.gitCommit$1 = "7ff2eda3";
4420
- this.gitTime$1 = "2022-03-17T11:03:43+00:00";
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";
4421
4421
  return this
4422
4422
  });
4423
4423
  var $d_Lio_kaitai_struct_Version$ = new $TypeData().initClass({
@@ -20916,23 +20916,23 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrBytesTerminatedType__L
20916
20916
  return (((((((("NullTerminated(" + subcon) + ", ") + ("term=b'" + termStr)) + "', ") + ("include=" + this.translator$1.doBoolLiteral__Z__T(btt.include$2))) + ", ") + ("consume=" + this.translator$1.doBoolLiteral__Z__T(btt.consume$2))) + ")")
20917
20917
  });
20918
20918
  $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileClass__Lio_kaitai_struct_format_ClassSpec__V = (function(cs) {
20919
- cs.types$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
20919
+ cs.enums$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
20920
20920
  return (function(x0$1$2) {
20921
20921
  var x0$1 = $as_T2(x0$1$2);
20922
20922
  if ((x0$1 !== null)) {
20923
- var typeSpec = $as_Lio_kaitai_struct_format_ClassSpec(x0$1.$$und2__O());
20924
- $this.compileClass__Lio_kaitai_struct_format_ClassSpec__V(typeSpec)
20923
+ var enumSpec = $as_Lio_kaitai_struct_format_EnumSpec(x0$1.$$und2__O());
20924
+ $this.compileEnum__Lio_kaitai_struct_format_EnumSpec__V(enumSpec)
20925
20925
  } else {
20926
20926
  throw new $c_s_MatchError().init___O(x0$1)
20927
20927
  }
20928
20928
  })
20929
20929
  })(this)));
20930
- cs.enums$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2) {
20930
+ cs.types$1.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2) {
20931
20931
  return (function(x0$2$2) {
20932
20932
  var x0$2 = $as_T2(x0$2$2);
20933
20933
  if ((x0$2 !== null)) {
20934
- var enumSpec = $as_Lio_kaitai_struct_format_EnumSpec(x0$2.$$und2__O());
20935
- this$2.compileEnum__Lio_kaitai_struct_format_EnumSpec__V(enumSpec)
20934
+ var typeSpec = $as_Lio_kaitai_struct_format_ClassSpec(x0$2.$$und2__O());
20935
+ this$2.compileClass__Lio_kaitai_struct_format_ClassSpec__V(typeSpec)
20936
20936
  } else {
20937
20937
  throw new $c_s_MatchError().init___O(x0$2)
20938
20938
  }
@@ -63218,29 +63218,33 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.init___Lio_kaitai_struct
63218
63218
  this.returnRes$2 = $m_s_None$();
63219
63219
  this.IMPORT$undCHARMAP$2 = "golang.org/x/text/encoding/charmap";
63220
63220
  var y = new $c_T2().init___O__O("charmap.CodePage437", this.IMPORT$undCHARMAP$2);
63221
- var jsx$6 = new $c_T2().init___O__O("cp437", y);
63221
+ var jsx$8 = new $c_T2().init___O__O("cp437", y);
63222
63222
  var y$1 = new $c_T2().init___O__O("charmap.ISO8859_1", this.IMPORT$undCHARMAP$2);
63223
- var jsx$5 = new $c_T2().init___O__O("iso8859-1", y$1);
63223
+ var jsx$7 = new $c_T2().init___O__O("iso8859-1", y$1);
63224
63224
  var y$2 = new $c_T2().init___O__O("charmap.ISO8859_2", this.IMPORT$undCHARMAP$2);
63225
- var jsx$4 = new $c_T2().init___O__O("iso8859-2", y$2);
63225
+ var jsx$6 = new $c_T2().init___O__O("iso8859-2", y$2);
63226
63226
  var y$3 = new $c_T2().init___O__O("charmap.ISO8859_3", this.IMPORT$undCHARMAP$2);
63227
- var jsx$3 = new $c_T2().init___O__O("iso8859-3", y$3);
63227
+ var jsx$5 = new $c_T2().init___O__O("iso8859-3", y$3);
63228
63228
  var y$4 = new $c_T2().init___O__O("charmap.ISO8859_4", this.IMPORT$undCHARMAP$2);
63229
- var jsx$2 = new $c_T2().init___O__O("iso8859-4", y$4);
63229
+ var jsx$4 = new $c_T2().init___O__O("iso8859-4", y$4);
63230
63230
  var y$5 = new $c_T2().init___O__O("japanese.ShiftJIS", "golang.org/x/text/encoding/japanese");
63231
- var jsx$1 = new $c_T2().init___O__O("sjis", y$5);
63231
+ var jsx$3 = new $c_T2().init___O__O("sjis", y$5);
63232
63232
  var y$6 = new $c_T2().init___O__O("traditionalchinese.Big5", "golang.org/x/text/encoding/traditionalchinese");
63233
- var array = [jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O("big5", y$6)];
63234
- var this$18 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
63233
+ var jsx$2 = new $c_T2().init___O__O("big5", y$6);
63234
+ var y$7 = new $c_T2().init___O__O("unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM)", "golang.org/x/text/encoding/unicode");
63235
+ var jsx$1 = new $c_T2().init___O__O("utf-16le", y$7);
63236
+ var y$8 = new $c_T2().init___O__O("unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM)", "golang.org/x/text/encoding/unicode");
63237
+ var array = [jsx$8, jsx$7, jsx$6, jsx$5, jsx$4, jsx$3, jsx$2, jsx$1, new $c_T2().init___O__O("utf-16be", y$8)];
63238
+ var this$22 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
63235
63239
  var i = 0;
63236
63240
  var len = $uI(array.length);
63237
63241
  while ((i < len)) {
63238
63242
  var index = i;
63239
63243
  var arg1 = array[index];
63240
- this$18.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
63244
+ this$22.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
63241
63245
  i = ((1 + i) | 0)
63242
63246
  };
63243
- this.ENCODINGS$2 = $as_sci_Map(this$18.elems$1);
63247
+ this.ENCODINGS$2 = $as_sci_Map(this$22.elems$1);
63244
63248
  this.localVarNum$2 = 0;
63245
63249
  return this
63246
63250
  });
@@ -84782,21 +84786,22 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.fileHeader__T__V = (func
84782
84786
  var this$1 = this.outHeader$2;
84783
84787
  this$1.sb$2.append__T__scm_StringBuilder("\n");
84784
84788
  var this$2 = this.importList$2;
84785
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "from pkg_resources import parse_version");
84789
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "import kaitaistruct");
84786
84790
  var this$3 = this.importList$2;
84787
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$3.list$1, "import kaitaistruct");
84788
- var this$4 = this.importList$2;
84789
- $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$4.list$1, "from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO");
84791
+ $m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$3.list$1, "from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO");
84792
+ var this$4 = this.out$2;
84793
+ this$4.sb$2.append__T__scm_StringBuilder("\n");
84790
84794
  var this$5 = this.out$2;
84791
84795
  this$5.sb$2.append__T__scm_StringBuilder("\n");
84792
- var this$6 = this.out$2;
84793
- this$6.sb$2.append__T__scm_StringBuilder("\n");
84794
- this.out$2.puts__T__V((("if parse_version(kaitaistruct.__version__) < parse_version('" + $m_Lio_kaitai_struct_format_KSVersion$().minimalRuntime$1) + "'):"));
84796
+ var jsx$1 = this.out$2;
84797
+ var this$6 = $m_Lio_kaitai_struct_format_KSVersion$().minimalRuntime$1;
84798
+ var this$7 = this$6.nums$1;
84799
+ jsx$1.puts__T__V((("if getattr(kaitaistruct, 'API_VERSION', (0, 9)) < " + $f_sc_TraversableOnce__mkString__T__T__T__T(this$7, "(", ", ", ")")) + ":"));
84795
84800
  this.out$2.inc__V();
84796
84801
  this.out$2.puts__T__V((("raise Exception(\"Incompatible Kaitai Struct Python API: " + $m_Lio_kaitai_struct_format_KSVersion$().minimalRuntime$1) + " or later is required, but you have %s\" % (kaitaistruct.__version__))"));
84797
84802
  this.out$2.dec__V();
84798
- var this$7 = this.out$2;
84799
- this$7.sb$2.append__T__scm_StringBuilder("\n")
84803
+ var this$8 = this.out$2;
84804
+ this$8.sb$2.append__T__scm_StringBuilder("\n")
84800
84805
  });
84801
84806
  $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
84802
84807
  /*<skip>*/
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "scripts": {
36
36
  "test": "echo \"Error: no test specified\" && exit 1"
37
37
  },
38
- "version": "0.10.0-SNAPSHOT20220317.110343.7ff2eda3"
38
+ "version": "0.10.0-SNAPSHOT20220409.005702.c4cb01b0"
39
39
  }