kaitai-struct-compiler 0.12.0-SNAPSHOT20251018.14640.fac2ac9 → 0.12.0-SNAPSHOT20251110.202039.1a11e75
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 +187 -95
- package/package.json +1 -1
|
@@ -3038,8 +3038,8 @@ function $m_Lio_kaitai_struct_Utils$() {
|
|
|
3038
3038
|
function $c_Lio_kaitai_struct_Version$() {
|
|
3039
3039
|
this.Lio_kaitai_struct_Version$__f_version = null;
|
|
3040
3040
|
this.Lio_kaitai_struct_Version$__f_gitTime = null;
|
|
3041
|
-
this.Lio_kaitai_struct_Version$__f_version = "0.12-
|
|
3042
|
-
this.Lio_kaitai_struct_Version$__f_gitTime = "2025-
|
|
3041
|
+
this.Lio_kaitai_struct_Version$__f_version = "0.12-SNAPSHOT20251110.202039.1a11e75";
|
|
3042
|
+
this.Lio_kaitai_struct_Version$__f_gitTime = "2025-11-10T20:20:39Z"
|
|
3043
3043
|
}
|
|
3044
3044
|
$c_Lio_kaitai_struct_Version$.prototype = new $h_O();
|
|
3045
3045
|
$c_Lio_kaitai_struct_Version$.prototype.constructor = $c_Lio_kaitai_struct_Version$;
|
|
@@ -34794,7 +34794,7 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.compileInstance__sci_List__Lio_kait
|
|
|
34794
34794
|
} else {
|
|
34795
34795
|
throw new $c_s_MatchError(instSpec)
|
|
34796
34796
|
};
|
|
34797
|
-
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).
|
|
34797
|
+
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, $n(instSpec).isNullable__Z());
|
|
34798
34798
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceFooter__V();
|
|
34799
34799
|
if ($n(this.Lio_kaitai_struct_ClassCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_readWrite) {
|
|
34800
34800
|
if ((instSpec instanceof $c_Lio_kaitai_struct_format_ParseInstanceSpec)) {
|
|
@@ -44531,7 +44531,7 @@ $c_Lio_kaitai_struct_GoClassCompiler.prototype.compileInstance__sci_List__Lio_ka
|
|
|
44531
44531
|
} else {
|
|
44532
44532
|
throw new $c_s_MatchError(instSpec)
|
|
44533
44533
|
};
|
|
44534
|
-
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).
|
|
44534
|
+
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, $n(instSpec).isNullable__Z());
|
|
44535
44535
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceFooter__V()
|
|
44536
44536
|
});
|
|
44537
44537
|
$c_Lio_kaitai_struct_GoClassCompiler.prototype.compileCalcEndian__Lio_kaitai_struct_datatype_CalcEndian__V = (function(ce) {
|
|
@@ -44853,7 +44853,7 @@ $c_Lio_kaitai_struct_NimClassCompiler.prototype.compileInstance__sci_List__Lio_k
|
|
|
44853
44853
|
} else {
|
|
44854
44854
|
throw new $c_s_MatchError(instSpec)
|
|
44855
44855
|
};
|
|
44856
|
-
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).
|
|
44856
|
+
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, $n(instSpec).isNullable__Z());
|
|
44857
44857
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceFooter__V()
|
|
44858
44858
|
});
|
|
44859
44859
|
$c_Lio_kaitai_struct_NimClassCompiler.prototype.compileTypes__Lio_kaitai_struct_format_ClassSpec__V = (function(curClass) {
|
|
@@ -45156,7 +45156,7 @@ $c_Lio_kaitai_struct_RustClassCompiler.prototype.compileInstance__sci_List__Lio_
|
|
|
45156
45156
|
} else {
|
|
45157
45157
|
throw new $c_s_MatchError(instSpec)
|
|
45158
45158
|
};
|
|
45159
|
-
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).
|
|
45159
|
+
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, $n(instSpec).isNullable__Z());
|
|
45160
45160
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceFooter__V()
|
|
45161
45161
|
});
|
|
45162
45162
|
var $d_Lio_kaitai_struct_RustClassCompiler = new $TypeData().initClass({
|
|
@@ -52783,7 +52783,7 @@ $c_Lio_kaitai_struct_languages_ZigCompiler$.prototype.idToStr__Lio_kaitai_struct
|
|
|
52783
52783
|
}
|
|
52784
52784
|
});
|
|
52785
52785
|
$c_Lio_kaitai_struct_languages_ZigCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
52786
|
-
return ("self." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
52786
|
+
return ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier) ? "_v" : ("self." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)))
|
|
52787
52787
|
});
|
|
52788
52788
|
$c_Lio_kaitai_struct_languages_ZigCompiler$.prototype.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_format_ClassSpec__T = (function(attrType, importList, curClass) {
|
|
52789
52789
|
while (true) {
|
|
@@ -52919,10 +52919,10 @@ $c_Lio_kaitai_struct_languages_ZigCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
52919
52919
|
return "f64"
|
|
52920
52920
|
};
|
|
52921
52921
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
|
|
52922
|
-
return "[]u8"
|
|
52922
|
+
return "[]const u8"
|
|
52923
52923
|
};
|
|
52924
52924
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType)) {
|
|
52925
|
-
return "[]u8"
|
|
52925
|
+
return "[]const u8"
|
|
52926
52926
|
};
|
|
52927
52927
|
var x$21 = $m_Lio_kaitai_struct_datatype_DataType$KaitaiStreamType$();
|
|
52928
52928
|
if ((x$21 === x1)) {
|
|
@@ -52932,7 +52932,7 @@ $c_Lio_kaitai_struct_languages_ZigCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
52932
52932
|
var $$x7 = (x$23 === x1)
|
|
52933
52933
|
};
|
|
52934
52934
|
if ($$x7) {
|
|
52935
|
-
return "*
|
|
52935
|
+
return "*_imp_kaitai_struct.KaitaiStream"
|
|
52936
52936
|
};
|
|
52937
52937
|
var x$25 = $m_Lio_kaitai_struct_datatype_DataType$AnyType$();
|
|
52938
52938
|
if ((x$25 === x1)) {
|
|
@@ -52966,7 +52966,7 @@ $c_Lio_kaitai_struct_languages_ZigCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
52966
52966
|
};
|
|
52967
52967
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
52968
52968
|
var x68 = $as_Lio_kaitai_struct_datatype_DataType$ArrayType(x1);
|
|
52969
|
-
return (("*
|
|
52969
|
+
return (("*_imp_std.ArrayList(" + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_format_ClassSpec__T($n(x68).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType, importList, curClass)) + ")")
|
|
52970
52970
|
};
|
|
52971
52971
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
52972
52972
|
var x69 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
@@ -52981,7 +52981,7 @@ $c_Lio_kaitai_struct_languages_ZigCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
52981
52981
|
return (isNullable ? ("?" + nonNullable) : nonNullable)
|
|
52982
52982
|
});
|
|
52983
52983
|
$c_Lio_kaitai_struct_languages_ZigCompiler$.prototype.types2class__sci_List__Z__T = (function(name, isExternal) {
|
|
52984
|
-
var prefix = (isExternal ? ($n(name).head__O() + ".") : "");
|
|
52984
|
+
var prefix = (isExternal ? (("_imp_" + $n(name).head__O()) + ".") : "");
|
|
52985
52985
|
var this$3 = $n(name);
|
|
52986
52986
|
var f = ((x$2) => {
|
|
52987
52987
|
var x = $as_T(x$2);
|
|
@@ -53009,7 +53009,7 @@ $c_Lio_kaitai_struct_languages_ZigCompiler$.prototype.types2class__sci_List__Z__
|
|
|
53009
53009
|
$c_Lio_kaitai_struct_languages_ZigCompiler$.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__Lio_kaitai_struct_ImportList__V = (function(extType, importList) {
|
|
53010
53010
|
var moduleName = $as_T($n($n(extType).name__sci_List()).head__O());
|
|
53011
53011
|
var this$1 = $n(importList);
|
|
53012
|
-
var s = (((("const " + moduleName) + " = @import(\"") + moduleName) + ".zig\");");
|
|
53012
|
+
var s = (((("const _imp_" + moduleName) + " = @import(\"") + moduleName) + ".zig\");");
|
|
53013
53013
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, s)
|
|
53014
53014
|
});
|
|
53015
53015
|
var $d_Lio_kaitai_struct_languages_ZigCompiler$ = new $TypeData().initClass({
|
|
@@ -53062,14 +53062,14 @@ function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrPa
|
|
|
53062
53062
|
var $$x1 = $n($thiz.translator__Lio_kaitai_struct_translators_BaseTranslator());
|
|
53063
53063
|
var dataType$1 = $n(x5).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_bytes;
|
|
53064
53064
|
var expr = $n($$x1).bytesToStr__T__T__T($f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__parseExprBytes__Lio_kaitai_struct_datatype_DataType$BytesType__T__T($thiz, dataType$1, io), $n(x5).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding);
|
|
53065
|
-
$
|
|
53065
|
+
$thiz.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(id, expr, rep, isRaw)
|
|
53066
53066
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
53067
53067
|
var x6 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(dataType);
|
|
53068
53068
|
var expr$2 = $n($thiz.translator__Lio_kaitai_struct_translators_BaseTranslator()).doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T($as_Lio_kaitai_struct_format_EnumSpec($n($n(x6).Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec).get__O()), $thiz.parseExpr__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__T__s_Option__T($n(x6).Lio_kaitai_struct_datatype_DataType$EnumType__f_basedOn, $n(x6).Lio_kaitai_struct_datatype_DataType$EnumType__f_basedOn, io, defEndian));
|
|
53069
|
-
$
|
|
53069
|
+
$thiz.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(id, expr$2, rep, isRaw)
|
|
53070
53070
|
} else {
|
|
53071
53071
|
var expr$3 = $thiz.parseExpr__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__T__s_Option__T(dataType, assignType, io, defEndian);
|
|
53072
|
-
$
|
|
53072
|
+
$thiz.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(id, expr$3, rep, isRaw)
|
|
53073
53073
|
}
|
|
53074
53074
|
}
|
|
53075
53075
|
function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrBytesTypeParse__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__Z__V($thiz, id, dataType, io, rep, isRaw) {
|
|
@@ -53084,7 +53084,7 @@ function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrBy
|
|
|
53084
53084
|
var rawId = new $c_Lio_kaitai_struct_format_RawIdentifier(id)
|
|
53085
53085
|
};
|
|
53086
53086
|
var expr = $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__parseExprBytes__Lio_kaitai_struct_datatype_DataType$BytesType__T__T($thiz, dataType, io);
|
|
53087
|
-
$
|
|
53087
|
+
$thiz.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(rawId, expr, rep, isRaw);
|
|
53088
53088
|
var this$1 = $n($n(dataType).process__s_Option());
|
|
53089
53089
|
if ((!this$1.isEmpty__Z())) {
|
|
53090
53090
|
var arg1 = this$1.get__O();
|
|
@@ -53122,7 +53122,7 @@ function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrUs
|
|
|
53122
53122
|
};
|
|
53123
53123
|
var expr = $thiz.parseExpr__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__T__s_Option__T(dataType, dataType, newIO, defEndian);
|
|
53124
53124
|
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) {
|
|
53125
|
-
$
|
|
53125
|
+
$thiz.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(id, expr, rep, false)
|
|
53126
53126
|
} else {
|
|
53127
53127
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
53128
53128
|
if ((x === rep)) {
|
|
@@ -53134,7 +53134,7 @@ function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrUs
|
|
|
53134
53134
|
$thiz.tryFinally__F0__F0__V(new $c_sjsr_AnonFunction0((() => {
|
|
53135
53135
|
$thiz.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V(tempVarName, dataType, assignType)
|
|
53136
53136
|
})), new $c_sjsr_AnonFunction0((() => {
|
|
53137
|
-
$
|
|
53137
|
+
$thiz.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(id, tempVarName, rep, false)
|
|
53138
53138
|
})))
|
|
53139
53139
|
}
|
|
53140
53140
|
}
|
|
@@ -92960,7 +92960,7 @@ $c_Lio_kaitai_struct_translators_ZigTranslator.prototype.doArrayLiteral__Lio_kai
|
|
|
92960
92960
|
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
92961
92961
|
})))));
|
|
92962
92962
|
var commaStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "");
|
|
92963
|
-
return (((((((("
|
|
92963
|
+
return (((((((("_imp_std.ArrayList(" + nativeType) + "){ .items = @constCast(@as([]const ") + nativeType) + ", &.{ ") + commaStr) + " })), .capacity = ") + $n(value).length__I()) + " }")
|
|
92964
92964
|
});
|
|
92965
92965
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.doByteArrayLiteral__sci_Seq__T = (function(arr) {
|
|
92966
92966
|
var this$2 = $n($as_sc_IterableOnceOps($n(arr).map__F1__O(new $c_sjsr_AnonFunction1(((x$1$2) => {
|
|
@@ -93006,8 +93006,8 @@ $c_Lio_kaitai_struct_translators_ZigTranslator.prototype.strLiteralGenericCC__C_
|
|
|
93006
93006
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$binaryop__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
93007
93007
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
93008
93008
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
93009
|
-
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$
|
|
93010
|
-
if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$
|
|
93009
|
+
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType)) {
|
|
93010
|
+
if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType)) {
|
|
93011
93011
|
var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
|
|
93012
93012
|
var $$x1 = (x === op)
|
|
93013
93013
|
} else {
|
|
@@ -93017,7 +93017,7 @@ $c_Lio_kaitai_struct_translators_ZigTranslator.prototype.genericBinOp__Lio_kaita
|
|
|
93017
93017
|
var $$x1 = false
|
|
93018
93018
|
};
|
|
93019
93019
|
if ($$x1) {
|
|
93020
|
-
return (((("
|
|
93020
|
+
return (((("@mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
93021
93021
|
} else {
|
|
93022
93022
|
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$binaryop__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec)
|
|
93023
93023
|
}
|
|
@@ -93077,27 +93077,27 @@ $c_Lio_kaitai_struct_translators_ZigTranslator.prototype.doStrCompareOp__Lio_kai
|
|
|
93077
93077
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.doBytesCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
93078
93078
|
var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
|
|
93079
93079
|
if ((x === op)) {
|
|
93080
|
-
return (((("
|
|
93080
|
+
return (((("_imp_std.mem.eql(u8, " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
93081
93081
|
} else {
|
|
93082
93082
|
var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
|
|
93083
93083
|
if ((x$3 === op)) {
|
|
93084
|
-
return (((("!
|
|
93084
|
+
return (((("!_imp_std.mem.eql(u8, " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
93085
93085
|
} else {
|
|
93086
93086
|
var x$5 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Lt$();
|
|
93087
93087
|
if ((x$5 === op)) {
|
|
93088
|
-
return (((("(
|
|
93088
|
+
return (((("(_imp_std.mem.order(u8, " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ") == .lt)")
|
|
93089
93089
|
} else {
|
|
93090
93090
|
var x$7 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Gt$();
|
|
93091
93091
|
if ((x$7 === op)) {
|
|
93092
|
-
return (((("(
|
|
93092
|
+
return (((("(_imp_std.mem.order(u8, " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ") == .gt)")
|
|
93093
93093
|
} else {
|
|
93094
93094
|
var x$9 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$LtE$();
|
|
93095
93095
|
if ((x$9 === op)) {
|
|
93096
|
-
return (((("
|
|
93096
|
+
return (((("_imp_std.mem.order(u8, " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ").compare(.lte)")
|
|
93097
93097
|
} else {
|
|
93098
93098
|
var x$11 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$GtE$();
|
|
93099
93099
|
if ((x$11 === op)) {
|
|
93100
|
-
return (((("
|
|
93100
|
+
return (((("_imp_std.mem.order(u8, " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ").compare(.gte)")
|
|
93101
93101
|
} else {
|
|
93102
93102
|
throw new $c_s_MatchError(op)
|
|
93103
93103
|
}
|
|
@@ -93130,10 +93130,10 @@ $c_Lio_kaitai_struct_translators_ZigTranslator.prototype.doCast__Lio_kaitai_stru
|
|
|
93130
93130
|
return (((("@as(" + $m_Lio_kaitai_struct_languages_ZigCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_format_ClassSpec__T(typeName, this.Lio_kaitai_struct_translators_ZigTranslator__f_importList, $n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
93131
93131
|
});
|
|
93132
93132
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, right, extPrec) {
|
|
93133
|
-
return (((("(try
|
|
93133
|
+
return (((("(try _imp_std.mem.concat(self._allocator(), u8, &[_][]const u8{ " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + " }))")
|
|
93134
93134
|
});
|
|
93135
93135
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
93136
|
-
return (((("(try
|
|
93136
|
+
return (((("(try _imp_std.fmt.parseInt(i32, " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0)) + "))")
|
|
93137
93137
|
});
|
|
93138
93138
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
|
|
93139
93139
|
return (("@intFromEnum(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
@@ -93145,10 +93145,10 @@ $c_Lio_kaitai_struct_translators_ZigTranslator.prototype.boolToInt__Lio_kaitai_s
|
|
|
93145
93145
|
return (("@intFromBool(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
93146
93146
|
});
|
|
93147
93147
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
93148
|
-
return (("(try
|
|
93148
|
+
return (("(try _imp_std.fmt.allocPrint(self._allocator(), \"{d}\", .{ " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, 0)) + " }))")
|
|
93149
93149
|
});
|
|
93150
93150
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
93151
|
-
return (((("
|
|
93151
|
+
return (((("(try _imp_kaitai_struct.KaitaiStream.bytesToStr(self._allocator(), " + bytesExpr) + ", ") + $f_Lio_kaitai_struct_translators_CommonLiterals__doStringLiteral__T__T(this, encoding)) + "))")
|
|
93152
93152
|
});
|
|
93153
93153
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
93154
93154
|
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 999) + ".len")
|
|
@@ -93167,10 +93167,10 @@ $c_Lio_kaitai_struct_translators_ZigTranslator.prototype.bytesLast__Lio_kaitai_s
|
|
|
93167
93167
|
return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(b, new $c_Lio_kaitai_struct_exprlang_Ast$expr$BinOp($$x2, $$x1, new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(this$1.apply__I__s_math_BigInt(1))))
|
|
93168
93168
|
});
|
|
93169
93169
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
93170
|
-
return (("
|
|
93170
|
+
return (("_imp_std.mem.min(u8, " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
93171
93171
|
});
|
|
93172
93172
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
93173
|
-
return (("
|
|
93173
|
+
return (("_imp_std.mem.max(u8, " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
93174
93174
|
});
|
|
93175
93175
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
93176
93176
|
return (("new StringBuilder(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ").reverse().toString()")
|
|
@@ -93191,12 +93191,12 @@ $c_Lio_kaitai_struct_translators_ZigTranslator.prototype.arraySize__Lio_kaitai_s
|
|
|
93191
93191
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
93192
93192
|
var t = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(a);
|
|
93193
93193
|
var elType = $n($as_Lio_kaitai_struct_datatype_DataType$ArrayType(t)).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
93194
|
-
return (((("
|
|
93194
|
+
return (((("_imp_std.mem.min(" + $m_Lio_kaitai_struct_languages_ZigCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_format_ClassSpec__T(elType, this.Lio_kaitai_struct_translators_ZigTranslator__f_importList, $n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 999)) + ".items)")
|
|
93195
93195
|
});
|
|
93196
93196
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
93197
93197
|
var t = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(a);
|
|
93198
93198
|
var elType = $n($as_Lio_kaitai_struct_datatype_DataType$ArrayType(t)).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
93199
|
-
return (((("
|
|
93199
|
+
return (((("_imp_std.mem.max(" + $m_Lio_kaitai_struct_languages_ZigCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_format_ClassSpec__T(elType, this.Lio_kaitai_struct_translators_ZigTranslator__f_importList, $n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 999)) + ".items)")
|
|
93200
93200
|
});
|
|
93201
93201
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
93202
93202
|
return (("(try " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 999)) + ".size())")
|
|
@@ -93207,6 +93207,29 @@ $c_Lio_kaitai_struct_translators_ZigTranslator.prototype.kaitaiStreamEof__Lio_ka
|
|
|
93207
93207
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
93208
93208
|
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 999) + ".pos()")
|
|
93209
93209
|
});
|
|
93210
|
+
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.doInterpolatedStringLiteral__sci_Seq__T = (function(exprs) {
|
|
93211
|
+
if ($n(exprs).isEmpty__Z()) {
|
|
93212
|
+
return $f_Lio_kaitai_struct_translators_CommonLiterals__doStringLiteral__T__T(this, "")
|
|
93213
|
+
} else {
|
|
93214
|
+
var this$2 = $n($as_sc_IterableOnceOps($n(exprs).map__F1__O(new $c_sjsr_AnonFunction1(((expr$2) => {
|
|
93215
|
+
var expr = $as_Lio_kaitai_struct_exprlang_Ast$expr(expr$2);
|
|
93216
|
+
var x1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(expr);
|
|
93217
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
93218
|
+
return "{d}"
|
|
93219
|
+
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
|
|
93220
|
+
return "{s}"
|
|
93221
|
+
} else {
|
|
93222
|
+
throw $ct_jl_UnsupportedOperationException__T__(new $c_jl_UnsupportedOperationException(), (("unable to convert " + x1) + " to string in format string (only integers and strings are supported)"))
|
|
93223
|
+
}
|
|
93224
|
+
})))));
|
|
93225
|
+
var fmtString = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", "", "");
|
|
93226
|
+
var this$3 = $n($as_sc_IterableOnceOps($n(exprs).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
93227
|
+
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
93228
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
93229
|
+
})))));
|
|
93230
|
+
return (((("(try _imp_std.fmt.allocPrint(self._allocator(), \"" + fmtString) + "\", .{ ") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$3, "", ", ", "")) + " }))")
|
|
93231
|
+
}
|
|
93232
|
+
});
|
|
93210
93233
|
$c_Lio_kaitai_struct_translators_ZigTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
|
|
93211
93234
|
return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
93212
93235
|
});
|
|
@@ -95871,6 +95894,9 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.createSubstream__Lio_kaitai
|
|
|
95871
95894
|
$c_Lio_kaitai_struct_languages_CppCompiler.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) {
|
|
95872
95895
|
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)
|
|
95873
95896
|
});
|
|
95897
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
95898
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
95899
|
+
});
|
|
95874
95900
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrParse__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_format_Identifier__s_Option__V = (function(attr, id, defEndian) {
|
|
95875
95901
|
$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)
|
|
95876
95902
|
});
|
|
@@ -96980,10 +97006,10 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceFooter__V = (functi
|
|
|
96980
97006
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
96981
97007
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((("if (" + this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(instName)) + ")"));
|
|
96982
97008
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).inc__V();
|
|
96983
|
-
this.
|
|
97009
|
+
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, false);
|
|
96984
97010
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).dec__V()
|
|
96985
97011
|
});
|
|
96986
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.
|
|
97012
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
96987
97013
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((("return " + this.nonOwningPointer__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T(instName, attrType)) + ";"))
|
|
96988
97014
|
});
|
|
96989
97015
|
$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) {
|
|
@@ -98015,6 +98041,9 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.createSubstream__Lio
|
|
|
98015
98041
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.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) {
|
|
98016
98042
|
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)
|
|
98017
98043
|
});
|
|
98044
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
98045
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
98046
|
+
});
|
|
98018
98047
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
98019
98048
|
$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)
|
|
98020
98049
|
});
|
|
@@ -98765,10 +98794,10 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceFooter__V =
|
|
|
98765
98794
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
98766
98795
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((("if (" + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + " !== undefined)"));
|
|
98767
98796
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V();
|
|
98768
|
-
this.
|
|
98797
|
+
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, false);
|
|
98769
98798
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).dec__V()
|
|
98770
98799
|
});
|
|
98771
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.
|
|
98800
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
98772
98801
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((("return " + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ";"))
|
|
98773
98802
|
});
|
|
98774
98803
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci_List__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
@@ -98971,6 +99000,9 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.createSubstream__Lio_kaitai
|
|
|
98971
99000
|
$c_Lio_kaitai_struct_languages_PHPCompiler.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) {
|
|
98972
99001
|
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)
|
|
98973
99002
|
});
|
|
99003
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
99004
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
99005
|
+
});
|
|
98974
99006
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
98975
99007
|
$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)
|
|
98976
99008
|
});
|
|
@@ -99614,10 +99646,10 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceHeader__sci_List__L
|
|
|
99614
99646
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
99615
99647
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((("if (" + $m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + " !== null)"));
|
|
99616
99648
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V();
|
|
99617
|
-
this.
|
|
99649
|
+
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, false);
|
|
99618
99650
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).dec__V()
|
|
99619
99651
|
});
|
|
99620
|
-
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.
|
|
99652
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
99621
99653
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((("return " + $m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ";"))
|
|
99622
99654
|
});
|
|
99623
99655
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.enumDeclaration__sci_List__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
@@ -99813,6 +99845,9 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.createSubstream__Lio_kaita
|
|
|
99813
99845
|
$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) {
|
|
99814
99846
|
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)
|
|
99815
99847
|
});
|
|
99848
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
99849
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
99850
|
+
});
|
|
99816
99851
|
$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) {
|
|
99817
99852
|
$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)
|
|
99818
99853
|
});
|
|
@@ -100393,7 +100428,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceHeader__sci_List__
|
|
|
100393
100428
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
100394
100429
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((((("return " + $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + " if (") + $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ");"))
|
|
100395
100430
|
});
|
|
100396
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.
|
|
100431
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
100397
100432
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((("return " + $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ";"))
|
|
100398
100433
|
});
|
|
100399
100434
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumDeclaration__sci_List__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
@@ -100623,6 +100658,9 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.createSubstream__Lio_kai
|
|
|
100623
100658
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.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) {
|
|
100624
100659
|
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)
|
|
100625
100660
|
});
|
|
100661
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
100662
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
100663
|
+
});
|
|
100626
100664
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attrParse__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_format_Identifier__s_Option__V = (function(attr, id, defEndian) {
|
|
100627
100665
|
$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)
|
|
100628
100666
|
});
|
|
@@ -101304,10 +101342,10 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceFooter__V = (fun
|
|
|
101304
101342
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
101305
101343
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((("if (" + this.flagForInstName__Lio_kaitai_struct_format_Identifier__T(instName)) + ")"));
|
|
101306
101344
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
101307
|
-
this.
|
|
101345
|
+
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, false);
|
|
101308
101346
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).dec__V()
|
|
101309
101347
|
});
|
|
101310
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.
|
|
101348
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
101311
101349
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((("return " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ";"))
|
|
101312
101350
|
});
|
|
101313
101351
|
$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) {
|
|
@@ -102165,10 +102203,10 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceCalculate__Lio_kaita
|
|
|
102165
102203
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
102166
102204
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((("if (this." + this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(instName)) + ") {"));
|
|
102167
102205
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).inc__V();
|
|
102168
|
-
this.
|
|
102206
|
+
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, false);
|
|
102169
102207
|
this.universalFooter__V()
|
|
102170
102208
|
});
|
|
102171
|
-
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.
|
|
102209
|
+
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
102172
102210
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((("return " + $m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ", nil"))
|
|
102173
102211
|
});
|
|
102174
102212
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceSetCalculated__Lio_kaitai_struct_format_InstanceIdentifier__V = (function(instName) {
|
|
@@ -102382,6 +102420,9 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.createSubstream__Lio_kaitai
|
|
|
102382
102420
|
$c_Lio_kaitai_struct_languages_LuaCompiler.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) {
|
|
102383
102421
|
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)
|
|
102384
102422
|
});
|
|
102423
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
102424
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
102425
|
+
});
|
|
102385
102426
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
102386
102427
|
$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)
|
|
102387
102428
|
});
|
|
@@ -102769,13 +102810,13 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceFooter__V = (functi
|
|
|
102769
102810
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
102770
102811
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((("if self." + $m_Lio_kaitai_struct_languages_LuaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + " ~= nil then"));
|
|
102771
102812
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).inc__V();
|
|
102772
|
-
this.
|
|
102813
|
+
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, false);
|
|
102773
102814
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).dec__V();
|
|
102774
102815
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("end");
|
|
102775
102816
|
var this$1 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out);
|
|
102776
102817
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
102777
102818
|
});
|
|
102778
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.
|
|
102819
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
102779
102820
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(("return " + $m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)))
|
|
102780
102821
|
});
|
|
102781
102822
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.enumDeclaration__sci_List__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
@@ -103140,6 +103181,9 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.createSubstream__Lio_kaitai
|
|
|
103140
103181
|
$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) {
|
|
103141
103182
|
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)
|
|
103142
103183
|
});
|
|
103184
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
103185
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
103186
|
+
});
|
|
103143
103187
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
103144
103188
|
$m_s_Predef$().$qmark$qmark$qmark__E()
|
|
103145
103189
|
});
|
|
@@ -103479,7 +103523,7 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceFooter__V = (functi
|
|
|
103479
103523
|
var this$1 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_out);
|
|
103480
103524
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
103481
103525
|
});
|
|
103482
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.
|
|
103526
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
103483
103527
|
$n(this.Lio_kaitai_struct_languages_NimCompiler__f_out).puts__T__V((("this." + this.instanceFlagIdentifier__Lio_kaitai_struct_format_InstanceIdentifier__T(instName)) + " = true"));
|
|
103484
103528
|
$n(this.Lio_kaitai_struct_languages_NimCompiler__f_out).puts__T__V(("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)))
|
|
103485
103529
|
});
|
|
@@ -104043,6 +104087,9 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrParse2$default$7__s_Op
|
|
|
104043
104087
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.createSubstream__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T = (function(id, bt, io, rep, defEndian) {
|
|
104044
104088
|
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstream__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T(this, id, bt, io, rep, defEndian)
|
|
104045
104089
|
});
|
|
104090
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
104091
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
104092
|
+
});
|
|
104046
104093
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
104047
104094
|
$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)
|
|
104048
104095
|
});
|
|
@@ -104663,7 +104710,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceHeader__T__Lio_kai
|
|
|
104663
104710
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
104664
104711
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((((("return " + $m_Lio_kaitai_struct_languages_RubyCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + " unless ") + $m_Lio_kaitai_struct_languages_RubyCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ".nil?"))
|
|
104665
104712
|
});
|
|
104666
|
-
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.
|
|
104713
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
104667
104714
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V($m_Lio_kaitai_struct_languages_RubyCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName))
|
|
104668
104715
|
});
|
|
104669
104716
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumDeclaration__T__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
@@ -104869,6 +104916,9 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.results__Lio_kaitai_struct
|
|
|
104869
104916
|
$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) {
|
|
104870
104917
|
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)
|
|
104871
104918
|
});
|
|
104919
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
104920
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
104921
|
+
});
|
|
104872
104922
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.tryFinally__F0__F0__V = (function(tryBlock, finallyBlock) {
|
|
104873
104923
|
$m_s_Predef$().$qmark$qmark$qmark__E()
|
|
104874
104924
|
});
|
|
@@ -105514,7 +105564,7 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.instanceCalculate__Lio_kai
|
|
|
105514
105564
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(instName, ((("(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, value)) + ") as ") + $m_Lio_kaitai_struct_languages_RustCompiler$().kaitaiPrimitiveToNativeType__Lio_kaitai_struct_datatype_DataType__T(dataType)))
|
|
105515
105565
|
}
|
|
105516
105566
|
});
|
|
105517
|
-
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.
|
|
105567
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
105518
105568
|
$n(this.Lio_kaitai_struct_languages_RustCompiler__f_out).puts__T__V((("Ok(" + $m_Lio_kaitai_struct_languages_RustCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__Z__T(instName, false)) + ")"))
|
|
105519
105569
|
});
|
|
105520
105570
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.enumDeclaration__sci_List__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
@@ -107031,9 +107081,9 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.fileHeader__T__V = (functio
|
|
|
107031
107081
|
var this$1 = $n(this.Lio_kaitai_struct_languages_ZigCompiler__f_outHeader);
|
|
107032
107082
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
107033
107083
|
var this$2 = $n(this.Lio_kaitai_struct_languages_ZigCompiler__f_importList);
|
|
107034
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, "const
|
|
107084
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, "const _imp_std = @import(\"std\");");
|
|
107035
107085
|
var this$3 = $n(this.Lio_kaitai_struct_languages_ZigCompiler__f_importList);
|
|
107036
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$3.Lio_kaitai_struct_ImportList__f_list, "const
|
|
107086
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$3.Lio_kaitai_struct_ImportList__f_list, "const _imp_kaitai_struct = @import(\"kaitai_struct\");");
|
|
107037
107087
|
var this$4 = $n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out);
|
|
107038
107088
|
$n(this$4.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
107039
107089
|
});
|
|
@@ -107056,8 +107106,8 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.classHeader__T__V = (functi
|
|
|
107056
107106
|
}
|
|
107057
107107
|
});
|
|
107058
107108
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.classFooter__sci_List__V = (function(name) {
|
|
107059
|
-
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("_arena: *
|
|
107060
|
-
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("_io: *
|
|
107109
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("_arena: *_imp_std.heap.ArenaAllocator,");
|
|
107110
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("_io: *_imp_kaitai_struct.KaitaiStream,");
|
|
107061
107111
|
var rc9 = false;
|
|
107062
107112
|
var x2 = null;
|
|
107063
107113
|
var x1 = $n($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_meta).Lio_kaitai_struct_format_MetaSpec__f_endian;
|
|
@@ -107106,7 +107156,7 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.classConstructorHeader__T__
|
|
|
107106
107156
|
};
|
|
107107
107157
|
var paramsArg = $n($$x2).join__sc_IterableOnce__T__T__T__T($$x1, ", ", ", ", "");
|
|
107108
107158
|
var endianSuffix = (isHybrid ? ", _is_le: ?bool" : "");
|
|
107109
|
-
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((((((((("pub fn create(_arena: *
|
|
107159
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((((((((("pub fn create(_arena: *_imp_std.heap.ArenaAllocator, _io: *_imp_kaitai_struct.KaitaiStream, _parent: ?" + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(parentType)) + ", _root: ?*") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(rootClassName)) + endianSuffix) + paramsArg) + ") !*") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " {"));
|
|
107110
107160
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).inc__V();
|
|
107111
107161
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((("const self = try _arena.allocator().create(" + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + ");"));
|
|
107112
107162
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("self.* = .{");
|
|
@@ -107140,7 +107190,7 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.classConstructorFooter__V =
|
|
|
107140
107190
|
this.universalFooter__V();
|
|
107141
107191
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out);
|
|
107142
107192
|
var name = $as_T($n($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_name).last__O());
|
|
107143
|
-
$n($$x1).puts__T__V((("fn _allocator(self: *const " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + ")
|
|
107193
|
+
$n($$x1).puts__T__V((("fn _allocator(self: *const " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + ") _imp_std.mem.Allocator {"));
|
|
107144
107194
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).inc__V();
|
|
107145
107195
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("return self._arena.allocator();");
|
|
107146
107196
|
this.universalFooter__V()
|
|
@@ -107188,6 +107238,9 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.readHeader__s_Option__Z__V
|
|
|
107188
107238
|
}
|
|
107189
107239
|
});
|
|
107190
107240
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
107241
|
+
if ((attrName instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
107242
|
+
return (void 0)
|
|
107243
|
+
};
|
|
107191
107244
|
var x$2 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
107192
107245
|
if (((attrName !== null) && $n(attrName).equals__O__Z(x$2))) {
|
|
107193
107246
|
var $$x1 = true
|
|
@@ -107269,23 +107322,33 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.attrParseHybrid__F0__F0__V
|
|
|
107269
107322
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("}")
|
|
107270
107323
|
});
|
|
107271
107324
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.attrProcess__Lio_kaitai_struct_format_ProcessExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__V = (function(proc, varSrc, varDest, rep) {
|
|
107272
|
-
var srcExpr =
|
|
107325
|
+
var srcExpr = $m_Lio_kaitai_struct_languages_ZigCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varSrc);
|
|
107326
|
+
var minArgs = ("self._allocator(), " + srcExpr);
|
|
107273
107327
|
if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessXor)) {
|
|
107274
107328
|
var x2 = $as_Lio_kaitai_struct_format_ProcessXor(proc);
|
|
107275
107329
|
var xorValue = $n(x2).Lio_kaitai_struct_format_ProcessXor__f_key;
|
|
107276
107330
|
var x1$2 = $n(this.Lio_kaitai_struct_languages_ZigCompiler__f_translator).detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(xorValue);
|
|
107277
|
-
|
|
107278
|
-
|
|
107331
|
+
if ((x1$2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
107332
|
+
var procName = "processXorOne"
|
|
107333
|
+
} else {
|
|
107334
|
+
if ((!(x1$2 instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType))) {
|
|
107335
|
+
throw new $c_s_MatchError(x1$2)
|
|
107336
|
+
};
|
|
107337
|
+
var procName = "processXorMany"
|
|
107338
|
+
};
|
|
107339
|
+
var x1$3 = $n(this.Lio_kaitai_struct_languages_ZigCompiler__f_translator).detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(xorValue);
|
|
107340
|
+
var xorValueStr = ((x1$3 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType) ? $n(this.Lio_kaitai_struct_languages_ZigCompiler__f_translator).doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(xorValue, new $c_Lio_kaitai_struct_datatype_DataType$Int1Type(false)) : $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, xorValue));
|
|
107341
|
+
var expr$2 = (((((("try _imp_kaitai_struct.KaitaiStream." + procName) + "(") + minArgs) + ", ") + xorValueStr) + ")")
|
|
107279
107342
|
} else {
|
|
107280
107343
|
var x = $m_Lio_kaitai_struct_format_ProcessZlib$();
|
|
107281
107344
|
if ((x === proc)) {
|
|
107282
|
-
var expr$2 = (("
|
|
107345
|
+
var expr$2 = (("try _imp_kaitai_struct.KaitaiStream.processZlib(" + minArgs) + ")")
|
|
107283
107346
|
} else if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessRotate)) {
|
|
107284
107347
|
var x4 = $as_Lio_kaitai_struct_format_ProcessRotate(proc);
|
|
107285
107348
|
var isLeft = $n(x4).Lio_kaitai_struct_format_ProcessRotate__f_left;
|
|
107286
107349
|
var rotValue = $n(x4).Lio_kaitai_struct_format_ProcessRotate__f_key;
|
|
107287
107350
|
var expr = (isLeft ? $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, rotValue) : (("8 - (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, rotValue)) + ")"));
|
|
107288
|
-
var expr$2 = (((("
|
|
107351
|
+
var expr$2 = (((("try _imp_kaitai_struct.KaitaiStream.processRotateLeft(" + minArgs) + ", ") + expr) + ")")
|
|
107289
107352
|
} else {
|
|
107290
107353
|
if ((!(proc instanceof $c_Lio_kaitai_struct_format_ProcessCustom))) {
|
|
107291
107354
|
throw new $c_s_MatchError(proc)
|
|
@@ -107304,35 +107367,26 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
107304
107367
|
};
|
|
107305
107368
|
var name$1 = $as_T($n(name).last__O());
|
|
107306
107369
|
var procClass = ((namespace + $$x1) + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$1));
|
|
107307
|
-
var procName = ("_process_" + $m_Lio_kaitai_struct_languages_ZigCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varSrc));
|
|
107370
|
+
var procName$2 = ("_process_" + $m_Lio_kaitai_struct_languages_ZigCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varSrc));
|
|
107308
107371
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out);
|
|
107309
107372
|
var this$6 = $n($as_sc_IterableOnceOps($n(args).map__F1__O(new $c_sjsr_AnonFunction1(((e$2) => {
|
|
107310
107373
|
var e = $as_Lio_kaitai_struct_exprlang_Ast$expr(e$2);
|
|
107311
107374
|
return $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, e)
|
|
107312
107375
|
})))));
|
|
107313
|
-
$n($$x2).puts__T__V((((((((procClass + " ") + procName) + " = new ") + procClass) + "(") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$6, "", ", ", "")) + ");"));
|
|
107314
|
-
var expr$2 = (((procName + ".decode(") +
|
|
107376
|
+
$n($$x2).puts__T__V((((((((procClass + " ") + procName$2) + " = new ") + procClass) + "(") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$6, "", ", ", "")) + ");"));
|
|
107377
|
+
var expr$2 = (((procName$2 + ".decode(") + minArgs) + ")")
|
|
107315
107378
|
}
|
|
107316
107379
|
};
|
|
107317
|
-
|
|
107380
|
+
this.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(varDest, expr$2, rep, false)
|
|
107318
107381
|
});
|
|
107319
107382
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
107320
107383
|
var id = new $c_Lio_kaitai_struct_format_IoStorageIdentifier(varName);
|
|
107321
107384
|
var ioName = $m_Lio_kaitai_struct_languages_ZigCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id);
|
|
107322
|
-
var args =
|
|
107323
|
-
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((("const " + ioName) + " = try self._allocator().create(
|
|
107324
|
-
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((((ioName + ".* =
|
|
107385
|
+
var args = $m_Lio_kaitai_struct_languages_ZigCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
107386
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((("const " + ioName) + " = try self._allocator().create(_imp_kaitai_struct.KaitaiStream);"));
|
|
107387
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((((ioName + ".* = _imp_kaitai_struct.KaitaiStream.fromBytes(") + args) + ");"));
|
|
107325
107388
|
return ioName
|
|
107326
107389
|
});
|
|
107327
|
-
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
107328
|
-
var memberName = $m_Lio_kaitai_struct_languages_ZigCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
107329
|
-
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
107330
|
-
if ((x === rep)) {
|
|
107331
|
-
return memberName
|
|
107332
|
-
} else {
|
|
107333
|
-
return (memberName + ".items[i]")
|
|
107334
|
-
}
|
|
107335
|
-
});
|
|
107336
107390
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.useIO__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(ioEx) {
|
|
107337
107391
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((("const io = " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, ioEx)) + ";"));
|
|
107338
107392
|
return "io"
|
|
@@ -107354,9 +107408,19 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.condIfHeader__Lio_kaitai_st
|
|
|
107354
107408
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).inc__V()
|
|
107355
107409
|
});
|
|
107356
107410
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
107357
|
-
|
|
107411
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
107412
|
+
return (void 0)
|
|
107413
|
+
};
|
|
107414
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_ZigCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = try self._allocator().create(_imp_std.ArrayList(") + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType)) + "));"));
|
|
107358
107415
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V(($m_Lio_kaitai_struct_languages_ZigCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".* = .empty;"))
|
|
107359
107416
|
});
|
|
107417
|
+
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
107418
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
107419
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((((("const " + $m_Lio_kaitai_struct_languages_ZigCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + " = ") + expr) + ";"))
|
|
107420
|
+
} else {
|
|
107421
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
107422
|
+
}
|
|
107423
|
+
});
|
|
107360
107424
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
107361
107425
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("{");
|
|
107362
107426
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).inc__V();
|
|
@@ -107409,8 +107473,7 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.condRepeatUntilFooter__Lio_
|
|
|
107409
107473
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("}")
|
|
107410
107474
|
});
|
|
107411
107475
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
107412
|
-
|
|
107413
|
-
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((((lhs + " = ") + expr) + ";"))
|
|
107476
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_ZigCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr) + ";"))
|
|
107414
107477
|
});
|
|
107415
107478
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
107416
107479
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((((("const " + id) + " = ") + expr) + ";"))
|
|
@@ -107534,7 +107597,7 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.bytesPadTermExpr__T__s_Opti
|
|
|
107534
107597
|
};
|
|
107535
107598
|
var this$2 = $n($$x1);
|
|
107536
107599
|
if ($uZ((this$2.isEmpty__Z() || this$2.get__O()))) {
|
|
107537
|
-
var expr1 = (((("
|
|
107600
|
+
var expr1 = (((("_imp_kaitai_struct.KaitaiStream.bytesStripRight(" + expr0) + ", ") + padByte) + ")");
|
|
107538
107601
|
break matchEnd4
|
|
107539
107602
|
}
|
|
107540
107603
|
};
|
|
@@ -107545,9 +107608,9 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.bytesPadTermExpr__T__s_Opti
|
|
|
107545
107608
|
var term$3 = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
107546
107609
|
if (($n(term$3).length__I() === 1)) {
|
|
107547
107610
|
var t = (255 & $uB($n(term$3).head__O()));
|
|
107548
|
-
var expr2 = (((((("
|
|
107611
|
+
var expr2 = (((((("_imp_kaitai_struct.KaitaiStream.bytesTerminate(" + expr1) + ", ") + t) + ", ") + include) + ")")
|
|
107549
107612
|
} else {
|
|
107550
|
-
var expr2 = (((((("
|
|
107613
|
+
var expr2 = (((((("_imp_kaitai_struct.KaitaiStream.bytesTerminateMulti(" + expr1) + ", ") + $n(this.Lio_kaitai_struct_languages_ZigCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term$3)) + ", ") + include) + ")")
|
|
107551
107614
|
}
|
|
107552
107615
|
} else {
|
|
107553
107616
|
var x = $m_s_None$();
|
|
@@ -107671,18 +107734,41 @@ $c_Lio_kaitai_struct_languages_ZigCompiler.prototype.instanceHeader__T__Lio_kait
|
|
|
107671
107734
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).inc__V()
|
|
107672
107735
|
});
|
|
107673
107736
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
107674
|
-
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((("if (" + $m_Lio_kaitai_struct_languages_ZigCompiler$().
|
|
107737
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((("if (self." + $m_Lio_kaitai_struct_languages_ZigCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + ") |_v|"));
|
|
107675
107738
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).inc__V();
|
|
107676
107739
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("return _v;");
|
|
107677
107740
|
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).dec__V()
|
|
107678
107741
|
});
|
|
107679
107742
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.instanceTempVarDeclaration__Lio_kaitai_struct_datatype_DataType__Z__V = (function(dataType, isNullable) {
|
|
107680
|
-
var
|
|
107681
|
-
|
|
107743
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((("var _v: " + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType)) + " = undefined;"))
|
|
107744
|
+
});
|
|
107745
|
+
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
107746
|
+
if (isNullable) {
|
|
107747
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("if (_n) {");
|
|
107748
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).inc__V();
|
|
107749
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((((("self." + $m_Lio_kaitai_struct_languages_ZigCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + " = @as(") + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, isNullable)) + ", null);"));
|
|
107750
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("return null;");
|
|
107751
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).dec__V();
|
|
107752
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("} else {");
|
|
107753
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).inc__V()
|
|
107754
|
+
};
|
|
107755
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V((("self." + $m_Lio_kaitai_struct_languages_ZigCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + " = _v;"));
|
|
107756
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("return _v;");
|
|
107757
|
+
if (isNullable) {
|
|
107758
|
+
this.universalFooter__V()
|
|
107759
|
+
}
|
|
107760
|
+
});
|
|
107761
|
+
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.condIfSetNull__Lio_kaitai_struct_format_Identifier__V = (function(instName) {
|
|
107762
|
+
if ((!(instName instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier))) {
|
|
107763
|
+
return (void 0)
|
|
107764
|
+
};
|
|
107765
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("var _n = true;")
|
|
107682
107766
|
});
|
|
107683
|
-
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.
|
|
107684
|
-
|
|
107685
|
-
|
|
107767
|
+
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.condIfSetNonNull__Lio_kaitai_struct_format_Identifier__V = (function(instName) {
|
|
107768
|
+
if ((!(instName instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier))) {
|
|
107769
|
+
return (void 0)
|
|
107770
|
+
};
|
|
107771
|
+
$n(this.Lio_kaitai_struct_languages_ZigCompiler__f_out).puts__T__V("_n = false;")
|
|
107686
107772
|
});
|
|
107687
107773
|
$c_Lio_kaitai_struct_languages_ZigCompiler.prototype.enumDeclaration__T__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
107688
107774
|
var enumClass = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(enumName);
|
|
@@ -109366,6 +109452,9 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrParse2$default$7__s_Op
|
|
|
109366
109452
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.createSubstream__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T = (function(id, bt, io, rep, defEndian) {
|
|
109367
109453
|
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstream__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T(this, id, bt, io, rep, defEndian)
|
|
109368
109454
|
});
|
|
109455
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
109456
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
109457
|
+
});
|
|
109369
109458
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrParse__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_format_Identifier__s_Option__V = (function(attr, id, defEndian) {
|
|
109370
109459
|
$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)
|
|
109371
109460
|
});
|
|
@@ -110551,7 +110640,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceHeader__T__Lio_kai
|
|
|
110551
110640
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
110552
110641
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("if (" + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + " != null)"));
|
|
110553
110642
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
110554
|
-
this.
|
|
110643
|
+
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V(instName, dataType, false);
|
|
110555
110644
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).dec__V()
|
|
110556
110645
|
});
|
|
110557
110646
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceCheckWriteFlagAndWrite__Lio_kaitai_struct_format_InstanceIdentifier__V = (function(instName) {
|
|
@@ -110573,7 +110662,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceHasValueIfHeader__
|
|
|
110573
110662
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceHasValueIfFooter__V = (function() {
|
|
110574
110663
|
this.universalFooter__V()
|
|
110575
110664
|
});
|
|
110576
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.
|
|
110665
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
110577
110666
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ";"))
|
|
110578
110667
|
});
|
|
110579
110668
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
@@ -111039,6 +111128,9 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.createSubstream__Lio_kai
|
|
|
111039
111128
|
$c_Lio_kaitai_struct_languages_PythonCompiler.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) {
|
|
111040
111129
|
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)
|
|
111041
111130
|
});
|
|
111131
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V = (function(id, expr, rep, isRaw) {
|
|
111132
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, id, expr, rep, isRaw)
|
|
111133
|
+
});
|
|
111042
111134
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
111043
111135
|
$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)
|
|
111044
111136
|
});
|
|
@@ -112008,7 +112100,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceHasValueIfHeader
|
|
|
112008
112100
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceHasValueIfFooter__V = (function() {
|
|
112009
112101
|
this.universalFooter__V()
|
|
112010
112102
|
});
|
|
112011
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.
|
|
112103
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(instName, attrType, isNullable) {
|
|
112012
112104
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((("return getattr(self, '" + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "', None)"))
|
|
112013
112105
|
});
|
|
112014
112106
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceInvalidate__Lio_kaitai_struct_format_InstanceIdentifier__V = (function(instName) {
|
package/package.json
CHANGED