kaitai-struct-compiler 0.11.0-SNAPSHOT20240928.155559.cc4e73b → 0.11.0-SNAPSHOT20241226.230133.d3b189e
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.
- package/kaitai-struct-compiler.js +248 -104
- package/package.json +1 -1
|
@@ -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-
|
|
3031
|
-
this.Lio_kaitai_struct_Version$__f_gitTime = "2024-
|
|
3030
|
+
this.Lio_kaitai_struct_Version$__f_version = "0.11-SNAPSHOT20241226.230133.d3b189e";
|
|
3031
|
+
this.Lio_kaitai_struct_Version$__f_gitTime = "2024-12-26T23:01:33Z"
|
|
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$;
|
|
@@ -51869,8 +51869,11 @@ function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrUs
|
|
|
51869
51869
|
} else {
|
|
51870
51870
|
var tempVarName = $thiz.localTemporaryName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
51871
51871
|
$thiz.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V(dataType, tempVarName, expr);
|
|
51872
|
-
$
|
|
51873
|
-
|
|
51872
|
+
$thiz.tryFinally__F0__F0__V(new $c_sjsr_AnonFunction0((() => {
|
|
51873
|
+
$thiz.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V(tempVarName, dataType, assignType)
|
|
51874
|
+
})), new $c_sjsr_AnonFunction0((() => {
|
|
51875
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V($thiz, id, tempVarName, rep, false)
|
|
51876
|
+
})))
|
|
51874
51877
|
}
|
|
51875
51878
|
}
|
|
51876
51879
|
}
|
|
@@ -65519,8 +65522,20 @@ function $f_Lio_kaitai_struct_languages_components_GoReads__attrUserTypeParse__L
|
|
|
65519
65522
|
};
|
|
65520
65523
|
var newIO = io
|
|
65521
65524
|
};
|
|
65522
|
-
var expr = $
|
|
65523
|
-
$
|
|
65525
|
+
var expr = $thiz.parseExpr__Lio_kaitai_struct_datatype_DataType__T__s_Option__T(dataType, newIO, defEndian);
|
|
65526
|
+
var v = new $c_Lio_kaitai_struct_translators_ResultLocalVar($n($thiz.Lio_kaitai_struct_languages_GoCompiler__f_translator).allocateLocalVar__I());
|
|
65527
|
+
var tempVarName = $n($thiz.Lio_kaitai_struct_languages_GoCompiler__f_translator).resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(v);
|
|
65528
|
+
if ($n($n($as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz)).Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_autoRead) {
|
|
65529
|
+
$n($as_Lio_kaitai_struct_languages_components_ValidateOps($thiz)).handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V(dataType, tempVarName, expr);
|
|
65530
|
+
$thiz.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType$UserType__T__V(tempVarName, dataType, newIO);
|
|
65531
|
+
$n($thiz.Lio_kaitai_struct_languages_GoCompiler__f_translator).outAddErrCheck__V();
|
|
65532
|
+
$f_Lio_kaitai_struct_languages_components_GoReads__handleAssignment__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__Lio_kaitai_struct_format_RepeatSpec__Z__V($thiz, id, v, rep, false)
|
|
65533
|
+
} else {
|
|
65534
|
+
$n($as_Lio_kaitai_struct_languages_components_ValidateOps($thiz)).handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V(dataType, tempVarName, expr);
|
|
65535
|
+
$thiz.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType$UserType__T__V(tempVarName, dataType, newIO);
|
|
65536
|
+
$f_Lio_kaitai_struct_languages_components_GoReads__handleAssignment__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__Lio_kaitai_struct_format_RepeatSpec__Z__V($thiz, id, v, rep, false);
|
|
65537
|
+
$n($thiz.Lio_kaitai_struct_languages_GoCompiler__f_translator).outAddErrCheck__V()
|
|
65538
|
+
}
|
|
65524
65539
|
}
|
|
65525
65540
|
function $f_Lio_kaitai_struct_languages_components_GoReads__handleAssignment__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__Lio_kaitai_struct_format_RepeatSpec__Z__V($thiz, id, expr, rep, isRaw) {
|
|
65526
65541
|
var x = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
@@ -84239,9 +84254,6 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doArrayLiteral__Lio_ka
|
|
|
84239
84254
|
})))));
|
|
84240
84255
|
return (("[" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "]")
|
|
84241
84256
|
});
|
|
84242
|
-
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(elts) {
|
|
84243
|
-
$m_s_Predef$().$qmark$qmark$qmark__E()
|
|
84244
|
-
});
|
|
84245
84257
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doLocalName__T__T = (function(s) {
|
|
84246
84258
|
return this.doName__T__T(s)
|
|
84247
84259
|
});
|
|
@@ -84314,9 +84326,6 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.kaitaiStructField__Lio
|
|
|
84314
84326
|
$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
84327
|
return this.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T(value, name)
|
|
84316
84328
|
});
|
|
84317
|
-
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doByteArrayNonLiteral__sci_Seq__O = (function(elts) {
|
|
84318
|
-
return this.doByteArrayNonLiteral__sci_Seq__T(elts)
|
|
84319
|
-
});
|
|
84320
84329
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__O = (function(t, value) {
|
|
84321
84330
|
return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T(t, value)
|
|
84322
84331
|
});
|
|
@@ -85029,54 +85038,6 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.boolToInt__Lio_kaitai_st
|
|
|
85029
85038
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V("}");
|
|
85030
85039
|
return new $c_Lio_kaitai_struct_translators_ResultLocalVar(v)
|
|
85031
85040
|
});
|
|
85032
|
-
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.userType__Lio_kaitai_struct_datatype_DataType$UserType__T__Lio_kaitai_struct_translators_ResultLocalVar = (function(t, io) {
|
|
85033
|
-
var v = this.allocateLocalVar__I();
|
|
85034
|
-
if ($n(t).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_translators_GoTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass)) {
|
|
85035
|
-
var x1$2___1 = "nil";
|
|
85036
|
-
var x1$2___2 = "nil"
|
|
85037
|
-
} else {
|
|
85038
|
-
var rc8 = false;
|
|
85039
|
-
var x2 = null;
|
|
85040
|
-
var x1 = $n(t).Lio_kaitai_struct_datatype_DataType$UserType__f_forcedParent;
|
|
85041
|
-
matchEnd9: {
|
|
85042
|
-
var parent;
|
|
85043
|
-
if ((x1 instanceof $c_s_Some)) {
|
|
85044
|
-
rc8 = true;
|
|
85045
|
-
x2 = $as_s_Some(x1);
|
|
85046
|
-
var p3 = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2).s_Some__f_value);
|
|
85047
|
-
var x = $m_Lio_kaitai_struct_datatype_DataType$().Lio_kaitai_struct_datatype_DataType$__f_USER_TYPE_NO_PARENT;
|
|
85048
|
-
if (((x === null) ? (p3 === null) : $n(x).equals__O__Z(p3))) {
|
|
85049
|
-
var parent = "nil";
|
|
85050
|
-
break matchEnd9
|
|
85051
|
-
}
|
|
85052
|
-
};
|
|
85053
|
-
if (rc8) {
|
|
85054
|
-
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2).s_Some__f_value);
|
|
85055
|
-
var parent = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
85056
|
-
break matchEnd9
|
|
85057
|
-
};
|
|
85058
|
-
var x$3 = $m_s_None$();
|
|
85059
|
-
if ((x$3 === x1)) {
|
|
85060
|
-
var parent = "this";
|
|
85061
|
-
break matchEnd9
|
|
85062
|
-
};
|
|
85063
|
-
throw new $c_s_MatchError(x1)
|
|
85064
|
-
};
|
|
85065
|
-
var x1$2___1 = parent;
|
|
85066
|
-
var x1$2___2 = "this._root"
|
|
85067
|
-
};
|
|
85068
|
-
var parent$2 = $as_T(x1$2___1);
|
|
85069
|
-
var root = $as_T(x1$2___2);
|
|
85070
|
-
var this$2 = $n($as_sc_IterableOnceOps($n($n(t).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
85071
|
-
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
85072
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
85073
|
-
})))));
|
|
85074
|
-
var addParams = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "");
|
|
85075
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((((this.localVarName__I__T(v) + " := New") + $m_Lio_kaitai_struct_languages_GoCompiler$().types2class__sci_List__T($n($as_Lio_kaitai_struct_format_ClassSpec($n($n(t).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O())).Lio_kaitai_struct_format_ClassSpec__f_name)) + "(") + addParams) + ")"));
|
|
85076
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((((((("err = " + this.localVarName__I__T(v)) + ".Read(") + io) + ", ") + parent$2) + ", ") + root) + ")"));
|
|
85077
|
-
this.outAddErrCheck__V();
|
|
85078
|
-
return new $c_Lio_kaitai_struct_translators_ResultLocalVar(v)
|
|
85079
|
-
});
|
|
85080
85041
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trInterpolatedStringLiteral__sci_Seq__Lio_kaitai_struct_translators_TranslatorResult = (function(exprs) {
|
|
85081
85042
|
if ((exprs !== null)) {
|
|
85082
85043
|
$n($m_s_package$().s_package$__f_Seq);
|
|
@@ -87942,10 +87903,10 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.anyField__Lio_kaitai_s
|
|
|
87942
87903
|
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0) + "->") + this.doName__T__T(attrName))
|
|
87943
87904
|
});
|
|
87944
87905
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doLocalName__T__T = (function(s) {
|
|
87945
|
-
return (((
|
|
87906
|
+
return (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_SWITCH_ON === s) ? "$_on" : ((($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)) ? this.doName__T__T(s) : ("$self->" + this.doName__T__T(s))))
|
|
87946
87907
|
});
|
|
87947
87908
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doName__T__T = (function(s) {
|
|
87948
|
-
return (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR === s) ? "$
|
|
87909
|
+
return (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR === s) ? "$_it" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2 === s) ? "$_buf" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX === s) ? "$i" : (s + "()"))))
|
|
87949
87910
|
});
|
|
87950
87911
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
87951
87912
|
return $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
@@ -90346,12 +90307,23 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kai
|
|
|
90346
90307
|
}
|
|
90347
90308
|
}
|
|
90348
90309
|
} else {
|
|
90349
|
-
throw $ct_jl_RuntimeException__T__(new $c_jl_RuntimeException(), "
|
|
90310
|
+
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
90311
|
}
|
|
90351
90312
|
});
|
|
90352
90313
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sci_Seq__T = (function(arr) {
|
|
90353
90314
|
return (((("std::string(\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sci_Seq__T(arr)) + "\", ") + $n(arr).length__I()) + ")")
|
|
90354
90315
|
});
|
|
90316
|
+
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(values) {
|
|
90317
|
+
if ($n($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_useListInitializers) {
|
|
90318
|
+
var this$2 = $n($as_sc_IterableOnceOps($n(values).map__F1__O(new $c_sjsr_AnonFunction1(((value$2) => {
|
|
90319
|
+
var value = $as_Lio_kaitai_struct_exprlang_Ast$expr(value$2);
|
|
90320
|
+
return (("static_cast<char>(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
90321
|
+
})))));
|
|
90322
|
+
return (("std::string({" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "})")
|
|
90323
|
+
} else {
|
|
90324
|
+
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)")
|
|
90325
|
+
}
|
|
90326
|
+
});
|
|
90355
90327
|
$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
90328
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
90357
90329
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
@@ -90567,6 +90539,9 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_st
|
|
|
90567
90539
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__O = (function(value, typeName) {
|
|
90568
90540
|
return this.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
|
|
90569
90541
|
});
|
|
90542
|
+
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayNonLiteral__sci_Seq__O = (function(elts) {
|
|
90543
|
+
return this.doByteArrayNonLiteral__sci_Seq__T(elts)
|
|
90544
|
+
});
|
|
90570
90545
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sci_Seq__O = (function(arr) {
|
|
90571
90546
|
return this.doByteArrayLiteral__sci_Seq__T(arr)
|
|
90572
90547
|
});
|
|
@@ -90689,6 +90664,13 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kai
|
|
|
90689
90664
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sci_Seq__T = (function(arr) {
|
|
90690
90665
|
return (("\"" + $p_Lio_kaitai_struct_translators_LuaTranslator__decEscapeByteArray__sci_Seq__T(this, arr)) + "\"")
|
|
90691
90666
|
});
|
|
90667
|
+
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(values) {
|
|
90668
|
+
var this$2 = $n($as_sc_IterableOnceOps($n(values).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
90669
|
+
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
90670
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
90671
|
+
})))));
|
|
90672
|
+
return (("string.char(" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + ")")
|
|
90673
|
+
});
|
|
90692
90674
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doLocalName__T__T = (function(s) {
|
|
90693
90675
|
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
90676
|
});
|
|
@@ -90901,6 +90883,9 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_s
|
|
|
90901
90883
|
$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
90884
|
return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
|
|
90903
90885
|
});
|
|
90886
|
+
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayNonLiteral__sci_Seq__O = (function(elts) {
|
|
90887
|
+
return this.doByteArrayNonLiteral__sci_Seq__T(elts)
|
|
90888
|
+
});
|
|
90904
90889
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doByteArrayLiteral__sci_Seq__O = (function(arr) {
|
|
90905
90890
|
return this.doByteArrayLiteral__sci_Seq__T(arr)
|
|
90906
90891
|
});
|
|
@@ -93219,6 +93204,22 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.userTypeDebugRead__T__Lio_k
|
|
|
93219
93204
|
var expr = ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType))) ? (((("static_cast<" + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(dataType, false)) + ">(") + id) + ")") : id);
|
|
93220
93205
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((expr + "->_read();"))
|
|
93221
93206
|
});
|
|
93207
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
93208
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V("try {");
|
|
93209
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).inc__V();
|
|
93210
|
+
var this$1 = $n(tryBlock);
|
|
93211
|
+
this$1.apply__O();
|
|
93212
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).dec__V();
|
|
93213
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V("} catch(...) {");
|
|
93214
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).inc__V();
|
|
93215
|
+
var this$2 = $n(finallyBlock);
|
|
93216
|
+
this$2.apply__O();
|
|
93217
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V("throw;");
|
|
93218
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).dec__V();
|
|
93219
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V("}");
|
|
93220
|
+
var this$3 = $n(finallyBlock);
|
|
93221
|
+
this$3.apply__O()
|
|
93222
|
+
});
|
|
93222
93223
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.switchRequiresIfs__Lio_kaitai_struct_datatype_DataType__Z = (function(onType) {
|
|
93223
93224
|
return (!((onType instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType) || (onType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)))
|
|
93224
93225
|
});
|
|
@@ -94706,44 +94707,55 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.parseExpr__Lio_kaitai_struct
|
|
|
94706
94707
|
return (((((io + ".ReadBitsInt") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T($n(bitEndian$2).toSuffix__T())) + "(") + width) + ")")
|
|
94707
94708
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
94708
94709
|
var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dataType);
|
|
94709
|
-
|
|
94710
|
-
var
|
|
94711
|
-
|
|
94712
|
-
|
|
94713
|
-
|
|
94714
|
-
|
|
94715
|
-
matchEnd9: {
|
|
94716
|
-
var parent;
|
|
94717
|
-
if ((x1$2 instanceof $c_s_Some)) {
|
|
94718
|
-
rc8 = true;
|
|
94719
|
-
x2$2 = $as_s_Some(x1$2);
|
|
94720
|
-
var p3 = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
94721
|
-
var x = $m_Lio_kaitai_struct_datatype_DataType$().Lio_kaitai_struct_datatype_DataType$__f_USER_TYPE_NO_PARENT;
|
|
94722
|
-
if (((x === null) ? (p3 === null) : $n(x).equals__O__Z(p3))) {
|
|
94723
|
-
var parent = "null";
|
|
94724
|
-
break matchEnd9
|
|
94725
|
-
}
|
|
94726
|
-
};
|
|
94727
|
-
if (rc8) {
|
|
94728
|
-
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
94729
|
-
var this$1 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator);
|
|
94730
|
-
var parent = this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
94731
|
-
break matchEnd9
|
|
94732
|
-
};
|
|
94733
|
-
var x$3 = $m_s_None$();
|
|
94734
|
-
if ((x$3 === x1$2)) {
|
|
94735
|
-
var parent = "this";
|
|
94736
|
-
break matchEnd9
|
|
94737
|
-
};
|
|
94738
|
-
throw new $c_s_MatchError(x1$2)
|
|
94739
|
-
};
|
|
94740
|
-
var addArgs = ((", " + parent) + ", _root")
|
|
94741
|
-
};
|
|
94742
|
-
return (((($m_Lio_kaitai_struct_languages_GoCompiler$().types2class__sci_List__T($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name) + "(") + io) + addArgs) + ")")
|
|
94710
|
+
var this$2 = $n($as_sc_IterableOnceOps($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
94711
|
+
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
94712
|
+
return $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, a)
|
|
94713
|
+
})))));
|
|
94714
|
+
var addParams = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "");
|
|
94715
|
+
return (((("New" + $m_Lio_kaitai_struct_languages_GoCompiler$().types2class__sci_List__T($n($as_Lio_kaitai_struct_format_ClassSpec($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O())).Lio_kaitai_struct_format_ClassSpec__f_name)) + "(") + addParams) + ")")
|
|
94743
94716
|
} else {
|
|
94744
94717
|
throw new $c_s_MatchError(dataType)
|
|
94745
94718
|
}
|
|
94746
94719
|
});
|
|
94720
|
+
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType$UserType__T__V = (function(id, t, io) {
|
|
94721
|
+
if ($n(t).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass)) {
|
|
94722
|
+
var x1$2___1 = "nil";
|
|
94723
|
+
var x1$2___2 = "nil"
|
|
94724
|
+
} else {
|
|
94725
|
+
var rc8 = false;
|
|
94726
|
+
var x2 = null;
|
|
94727
|
+
var x1 = $n(t).Lio_kaitai_struct_datatype_DataType$UserType__f_forcedParent;
|
|
94728
|
+
matchEnd9: {
|
|
94729
|
+
var parent;
|
|
94730
|
+
if ((x1 instanceof $c_s_Some)) {
|
|
94731
|
+
rc8 = true;
|
|
94732
|
+
x2 = $as_s_Some(x1);
|
|
94733
|
+
var p3 = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2).s_Some__f_value);
|
|
94734
|
+
var x = $m_Lio_kaitai_struct_datatype_DataType$().Lio_kaitai_struct_datatype_DataType$__f_USER_TYPE_NO_PARENT;
|
|
94735
|
+
if (((x === null) ? (p3 === null) : $n(x).equals__O__Z(p3))) {
|
|
94736
|
+
var parent = "nil";
|
|
94737
|
+
break matchEnd9
|
|
94738
|
+
}
|
|
94739
|
+
};
|
|
94740
|
+
if (rc8) {
|
|
94741
|
+
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2).s_Some__f_value);
|
|
94742
|
+
var parent = $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, fp);
|
|
94743
|
+
break matchEnd9
|
|
94744
|
+
};
|
|
94745
|
+
var x$3 = $m_s_None$();
|
|
94746
|
+
if ((x$3 === x1)) {
|
|
94747
|
+
var parent = "this";
|
|
94748
|
+
break matchEnd9
|
|
94749
|
+
};
|
|
94750
|
+
throw new $c_s_MatchError(x1)
|
|
94751
|
+
};
|
|
94752
|
+
var x1$2___1 = parent;
|
|
94753
|
+
var x1$2___2 = "this._root"
|
|
94754
|
+
};
|
|
94755
|
+
var parent$2 = $as_T(x1$2___1);
|
|
94756
|
+
var root = $as_T(x1$2___2);
|
|
94757
|
+
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((((((((("err = " + id) + ".Read(") + io) + ", ") + parent$2) + ", ") + root) + ")"))
|
|
94758
|
+
});
|
|
94747
94759
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
94748
94760
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
|
|
94749
94761
|
});
|
|
@@ -95673,6 +95685,19 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.bytesPadTermExpr__T_
|
|
|
95673
95685
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
95674
95686
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((id + "._read();"))
|
|
95675
95687
|
});
|
|
95688
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
95689
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("try {");
|
|
95690
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V();
|
|
95691
|
+
var this$1 = $n(tryBlock);
|
|
95692
|
+
this$1.apply__O();
|
|
95693
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).dec__V();
|
|
95694
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("} finally {");
|
|
95695
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V();
|
|
95696
|
+
var this$2 = $n(finallyBlock);
|
|
95697
|
+
this$2.apply__O();
|
|
95698
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).dec__V();
|
|
95699
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("}")
|
|
95700
|
+
});
|
|
95676
95701
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchRequiresIfs__Lio_kaitai_struct_datatype_DataType__Z = (function(onType) {
|
|
95677
95702
|
return (!((onType instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType) || ((onType instanceof $c_Lio_kaitai_struct_datatype_DataType$BooleanType) || ((onType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType) || (onType instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)))))
|
|
95678
95703
|
});
|
|
@@ -96530,6 +96555,19 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.bytesPadTermExpr__T__s_Opti
|
|
|
96530
96555
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
96531
96556
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((id + "->_read();"))
|
|
96532
96557
|
});
|
|
96558
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
96559
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V("try {");
|
|
96560
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V();
|
|
96561
|
+
var this$1 = $n(tryBlock);
|
|
96562
|
+
this$1.apply__O();
|
|
96563
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).dec__V();
|
|
96564
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V("} finally {");
|
|
96565
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V();
|
|
96566
|
+
var this$2 = $n(finallyBlock);
|
|
96567
|
+
this$2.apply__O();
|
|
96568
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).dec__V();
|
|
96569
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V("}")
|
|
96570
|
+
});
|
|
96533
96571
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
96534
96572
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator).detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(on);
|
|
96535
96573
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"));
|
|
@@ -96754,12 +96792,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.createSubstream__Lio_kaita
|
|
|
96754
96792
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesLimitType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T = (function(id, blt, io, rep, defEndian) {
|
|
96755
96793
|
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamBuffered__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T(this, id, blt, io, rep, defEndian)
|
|
96756
96794
|
});
|
|
96757
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
96758
|
-
$m_s_Predef$().$qmark$qmark$qmark__E()
|
|
96759
|
-
});
|
|
96760
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
96761
|
-
$m_s_Predef$().$qmark$qmark$qmark__E()
|
|
96762
|
-
});
|
|
96763
96795
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
96764
96796
|
$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)
|
|
96765
96797
|
});
|
|
@@ -97102,6 +97134,8 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatExpr
|
|
|
97102
97134
|
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
97103
97135
|
});
|
|
97104
97136
|
$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) {
|
|
97137
|
+
this.blockScopeHeader__V();
|
|
97138
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((("my " + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doName__T__T("_")) + ";"));
|
|
97105
97139
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("do {");
|
|
97106
97140
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V()
|
|
97107
97141
|
});
|
|
@@ -97123,11 +97157,22 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatUnti
|
|
|
97123
97157
|
$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) {
|
|
97124
97158
|
$n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
97125
97159
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).dec__V();
|
|
97126
|
-
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((("} until (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ");"))
|
|
97160
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((("} until (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ");"));
|
|
97161
|
+
this.universalFooter__V()
|
|
97127
97162
|
});
|
|
97128
97163
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
97129
97164
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr) + ";"))
|
|
97130
97165
|
});
|
|
97166
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
97167
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((((("my " + id) + " = ") + expr) + ";"))
|
|
97168
|
+
});
|
|
97169
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.blockScopeHeader__V = (function() {
|
|
97170
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("{");
|
|
97171
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V()
|
|
97172
|
+
});
|
|
97173
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.blockScopeFooter__V = (function() {
|
|
97174
|
+
this.universalFooter__V()
|
|
97175
|
+
});
|
|
97131
97176
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.parseExpr__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__T__s_Option__T = (function(dataType, assignType, io, defEndian) {
|
|
97132
97177
|
if ($is_Lio_kaitai_struct_datatype_DataType$ReadableType(dataType)) {
|
|
97133
97178
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$ReadableType(dataType);
|
|
@@ -97230,6 +97275,30 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.bytesPadTermExpr__T__s_Opt
|
|
|
97230
97275
|
};
|
|
97231
97276
|
return expr2
|
|
97232
97277
|
});
|
|
97278
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
97279
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((id + "->_read();"))
|
|
97280
|
+
});
|
|
97281
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
97282
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("eval {");
|
|
97283
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V();
|
|
97284
|
+
var this$1 = $n(tryBlock);
|
|
97285
|
+
this$1.apply__O();
|
|
97286
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("1;");
|
|
97287
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).dec__V();
|
|
97288
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("} or do {");
|
|
97289
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V();
|
|
97290
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("$failed = 1;");
|
|
97291
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("$err = $@;");
|
|
97292
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).dec__V();
|
|
97293
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("};");
|
|
97294
|
+
var this$2 = $n(finallyBlock);
|
|
97295
|
+
this$2.apply__O();
|
|
97296
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("if ($failed) {");
|
|
97297
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V();
|
|
97298
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("die $err;");
|
|
97299
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).dec__V();
|
|
97300
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("}")
|
|
97301
|
+
});
|
|
97233
97302
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
97234
97303
|
/*<skip>*/
|
|
97235
97304
|
});
|
|
@@ -98402,6 +98471,22 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.userTypeDebugRead__T__Li
|
|
|
98402
98471
|
var expr = ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType))) ? (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType)) + ") (") + id) + "))") : id);
|
|
98403
98472
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((expr + "._read();"))
|
|
98404
98473
|
});
|
|
98474
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
98475
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("try");
|
|
98476
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
98477
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
98478
|
+
var this$1 = $n(tryBlock);
|
|
98479
|
+
this$1.apply__O();
|
|
98480
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).dec__V();
|
|
98481
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("}");
|
|
98482
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("finally");
|
|
98483
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
98484
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
98485
|
+
var this$2 = $n(finallyBlock);
|
|
98486
|
+
this$2.apply__O();
|
|
98487
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).dec__V();
|
|
98488
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("}")
|
|
98489
|
+
});
|
|
98405
98490
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchRequiresIfs__Lio_kaitai_struct_datatype_DataType__Z = (function(onType) {
|
|
98406
98491
|
return (!((onType instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType) || ((onType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType) || (onType instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType))))
|
|
98407
98492
|
});
|
|
@@ -99279,6 +99364,21 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.bytesPadTermExpr__T__s_Opti
|
|
|
99279
99364
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
99280
99365
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((id + ":_read()"))
|
|
99281
99366
|
});
|
|
99367
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
99368
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("local success, err = pcall(function()");
|
|
99369
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).inc__V();
|
|
99370
|
+
var this$1 = $n(tryBlock);
|
|
99371
|
+
this$1.apply__O();
|
|
99372
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).dec__V();
|
|
99373
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("end)");
|
|
99374
|
+
var this$2 = $n(finallyBlock);
|
|
99375
|
+
this$2.apply__O();
|
|
99376
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("if not success then");
|
|
99377
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).inc__V();
|
|
99378
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("error(err)");
|
|
99379
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).dec__V();
|
|
99380
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("end")
|
|
99381
|
+
});
|
|
99282
99382
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
99283
99383
|
/*<skip>*/
|
|
99284
99384
|
});
|
|
@@ -99426,6 +99526,9 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.createSubstream__Lio_kaitai
|
|
|
99426
99526
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesLimitType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T = (function(id, blt, io, rep, defEndian) {
|
|
99427
99527
|
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamBuffered__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T(this, id, blt, io, rep, defEndian)
|
|
99428
99528
|
});
|
|
99529
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
99530
|
+
$m_s_Predef$().$qmark$qmark$qmark__E()
|
|
99531
|
+
});
|
|
99429
99532
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.attrParse__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_format_Identifier__s_Option__V = (function(attr, id, defEndian) {
|
|
99430
99533
|
$f_Lio_kaitai_struct_languages_components_CommonReads__attrParse__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_format_Identifier__s_Option__V(this, attr, id, defEndian)
|
|
99431
99534
|
});
|
|
@@ -100892,6 +100995,19 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.bytesPadTermExpr__T__s_Opt
|
|
|
100892
100995
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
100893
100996
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((id + "._read"))
|
|
100894
100997
|
});
|
|
100998
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
100999
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("begin");
|
|
101000
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).inc__V();
|
|
101001
|
+
var this$1 = $n(tryBlock);
|
|
101002
|
+
this$1.apply__O();
|
|
101003
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).dec__V();
|
|
101004
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("ensure");
|
|
101005
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).inc__V();
|
|
101006
|
+
var this$2 = $n(finallyBlock);
|
|
101007
|
+
this$2.apply__O();
|
|
101008
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).dec__V();
|
|
101009
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("end")
|
|
101010
|
+
});
|
|
100895
101011
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
100896
101012
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(("case " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)))
|
|
100897
101013
|
});
|
|
@@ -101108,6 +101224,9 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.results__Lio_kaitai_struct
|
|
|
101108
101224
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesLimitType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T = (function(id, blt, io, rep, defEndian) {
|
|
101109
101225
|
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamBuffered__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T(this, id, blt, io, rep, defEndian)
|
|
101110
101226
|
});
|
|
101227
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
101228
|
+
$m_s_Predef$().$qmark$qmark$qmark__E()
|
|
101229
|
+
});
|
|
101111
101230
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.attrDebugStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__s_Option__Lio_kaitai_struct_format_RepeatSpec__V = (function(attrId, attrType, io, repeat) {
|
|
101112
101231
|
/*<skip>*/
|
|
101113
101232
|
});
|
|
@@ -103982,6 +104101,19 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.userTypeDebugRead__T__Lio_
|
|
|
103982
104101
|
};
|
|
103983
104102
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((expr + "._read();"))
|
|
103984
104103
|
});
|
|
104104
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
104105
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("try {");
|
|
104106
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
104107
|
+
var this$1 = $n(tryBlock);
|
|
104108
|
+
this$1.apply__O();
|
|
104109
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).dec__V();
|
|
104110
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("} finally {");
|
|
104111
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
104112
|
+
var this$2 = $n(finallyBlock);
|
|
104113
|
+
this$2.apply__O();
|
|
104114
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).dec__V();
|
|
104115
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("}")
|
|
104116
|
+
});
|
|
103985
104117
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCasesRender__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__sci_Map__F1__F1__V = (function(id, on, cases, normalCaseProc, elseCaseProc) {
|
|
103986
104118
|
var onType = $as_Lio_kaitai_struct_datatype_DataType($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentSwitchType).get__O());
|
|
103987
104119
|
var isNullable = (onType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType);
|
|
@@ -104950,6 +105082,18 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.bytesPadTermExpr__T__s_O
|
|
|
104950
105082
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
104951
105083
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((id + "._read()"))
|
|
104952
105084
|
});
|
|
105085
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
105086
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("try:");
|
|
105087
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).inc__V();
|
|
105088
|
+
var this$1 = $n(tryBlock);
|
|
105089
|
+
this$1.apply__O();
|
|
105090
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).dec__V();
|
|
105091
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("finally:");
|
|
105092
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).inc__V();
|
|
105093
|
+
var this$2 = $n(finallyBlock);
|
|
105094
|
+
this$2.apply__O();
|
|
105095
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).dec__V()
|
|
105096
|
+
});
|
|
104953
105097
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
104954
105098
|
/*<skip>*/
|
|
104955
105099
|
});
|
package/package.json
CHANGED