kaitai-struct-compiler 0.11.0-SNAPSHOT20240928.155559.cc4e73b → 0.11.0-SNAPSHOT20241002.233639.542b241

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.
@@ -3027,8 +3027,8 @@ function $m_Lio_kaitai_struct_Utils$() {
3027
3027
  function $c_Lio_kaitai_struct_Version$() {
3028
3028
  this.Lio_kaitai_struct_Version$__f_version = null;
3029
3029
  this.Lio_kaitai_struct_Version$__f_gitTime = null;
3030
- this.Lio_kaitai_struct_Version$__f_version = "0.11-SNAPSHOT20240928.155559.cc4e73b";
3031
- this.Lio_kaitai_struct_Version$__f_gitTime = "2024-09-28T15:55:59Z"
3030
+ this.Lio_kaitai_struct_Version$__f_version = "0.11-SNAPSHOT20241002.233639.542b241";
3031
+ this.Lio_kaitai_struct_Version$__f_gitTime = "2024-10-02T23:36:39Z"
3032
3032
  }
3033
3033
  $c_Lio_kaitai_struct_Version$.prototype = new $h_O();
3034
3034
  $c_Lio_kaitai_struct_Version$.prototype.constructor = $c_Lio_kaitai_struct_Version$;
@@ -84239,9 +84239,6 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doArrayLiteral__Lio_ka
84239
84239
  })))));
84240
84240
  return (("[" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "]")
84241
84241
  });
84242
- $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(elts) {
84243
- $m_s_Predef$().$qmark$qmark$qmark__E()
84244
- });
84245
84242
  $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doLocalName__T__T = (function(s) {
84246
84243
  return this.doName__T__T(s)
84247
84244
  });
@@ -84314,9 +84311,6 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.kaitaiStructField__Lio
84314
84311
  $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.userTypeField__Lio_kaitai_struct_datatype_DataType$UserType__Lio_kaitai_struct_exprlang_Ast$expr__T__O = (function(ut, value, name) {
84315
84312
  return this.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T(value, name)
84316
84313
  });
84317
- $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doByteArrayNonLiteral__sci_Seq__O = (function(elts) {
84318
- return this.doByteArrayNonLiteral__sci_Seq__T(elts)
84319
- });
84320
84314
  $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__O = (function(t, value) {
84321
84315
  return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T(t, value)
84322
84316
  });
@@ -90346,12 +90340,23 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kai
90346
90340
  }
90347
90341
  }
90348
90342
  } else {
90349
- throw $ct_jl_RuntimeException__T__(new $c_jl_RuntimeException(), "C++ literal arrays are not implemented yet")
90343
+ throw $ct_jl_RuntimeException__T__(new $c_jl_RuntimeException(), "literal arrays are not yet implemented for C++98 (pass `--cpp-standard 11` to target C++11)")
90350
90344
  }
90351
90345
  });
90352
90346
  $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sci_Seq__T = (function(arr) {
90353
90347
  return (((("std::string(\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sci_Seq__T(arr)) + "\", ") + $n(arr).length__I()) + ")")
90354
90348
  });
90349
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(values) {
90350
+ if ($n($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_useListInitializers) {
90351
+ var this$2 = $n($as_sc_IterableOnceOps($n(values).map__F1__O(new $c_sjsr_AnonFunction1(((value$2) => {
90352
+ var value = $as_Lio_kaitai_struct_exprlang_Ast$expr(value$2);
90353
+ return (("static_cast<char>(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
90354
+ })))));
90355
+ return (("std::string({" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "})")
90356
+ } else {
90357
+ throw $ct_jl_RuntimeException__T__(new $c_jl_RuntimeException(), "non-literal byte arrays are not yet implemented for C++98 (pass `--cpp-standard 11` to target C++11)")
90358
+ }
90359
+ });
90355
90360
  $c_Lio_kaitai_struct_translators_CppTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
90356
90361
  var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
90357
90362
  var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
@@ -90567,6 +90572,9 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_st
90567
90572
  $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__O = (function(value, typeName) {
90568
90573
  return this.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
90569
90574
  });
90575
+ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayNonLiteral__sci_Seq__O = (function(elts) {
90576
+ return this.doByteArrayNonLiteral__sci_Seq__T(elts)
90577
+ });
90570
90578
  $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sci_Seq__O = (function(arr) {
90571
90579
  return this.doByteArrayLiteral__sci_Seq__T(arr)
90572
90580
  });
@@ -90689,6 +90697,13 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kai
90689
90697
  $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sci_Seq__T = (function(arr) {
90690
90698
  return (("\"" + $p_Lio_kaitai_struct_translators_LuaTranslator__decEscapeByteArray__sci_Seq__T(this, arr)) + "\"")
90691
90699
  });
90700
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(values) {
90701
+ var this$2 = $n($as_sc_IterableOnceOps($n(values).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
90702
+ var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
90703
+ return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
90704
+ })))));
90705
+ return (("string.char(" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + ")")
90706
+ });
90692
90707
  $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doLocalName__T__T = (function(s) {
90693
90708
  return (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR === s) ? "_" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX === s) ? "i" : ("self." + s)))
90694
90709
  });
@@ -90901,6 +90916,9 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_s
90901
90916
  $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
90902
90917
  return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
90903
90918
  });
90919
+ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayNonLiteral__sci_Seq__O = (function(elts) {
90920
+ return this.doByteArrayNonLiteral__sci_Seq__T(elts)
90921
+ });
90904
90922
  $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sci_Seq__O = (function(arr) {
90905
90923
  return this.doByteArrayLiteral__sci_Seq__T(arr)
90906
90924
  });
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.11.0-SNAPSHOT20240928.155559.cc4e73b"
38
+ "version": "0.11.0-SNAPSHOT20241002.233639.542b241"
39
39
  }