kaitai-struct-compiler 0.11.0-SNAPSHOT20240713.903.983060d → 0.11.0-SNAPSHOT20240807.132950.9fb3a2f
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 +717 -512
- package/package.json +1 -1
|
@@ -3012,8 +3012,8 @@ function $m_Lio_kaitai_struct_Utils$() {
|
|
|
3012
3012
|
function $c_Lio_kaitai_struct_Version$() {
|
|
3013
3013
|
this.Lio_kaitai_struct_Version$__f_version = null;
|
|
3014
3014
|
this.Lio_kaitai_struct_Version$__f_gitTime = null;
|
|
3015
|
-
this.Lio_kaitai_struct_Version$__f_version = "0.11-
|
|
3016
|
-
this.Lio_kaitai_struct_Version$__f_gitTime = "2024-
|
|
3015
|
+
this.Lio_kaitai_struct_Version$__f_version = "0.11-SNAPSHOT20240807.132950.9fb3a2f";
|
|
3016
|
+
this.Lio_kaitai_struct_Version$__f_gitTime = "2024-08-07T13:29:50Z"
|
|
3017
3017
|
}
|
|
3018
3018
|
$c_Lio_kaitai_struct_Version$.prototype = new $h_O();
|
|
3019
3019
|
$c_Lio_kaitai_struct_Version$.prototype.constructor = $c_Lio_kaitai_struct_Version$;
|
|
@@ -3404,32 +3404,70 @@ $c_Lio_kaitai_struct_datatype_DataType$.prototype.fromYaml__s_Option__sci_List__
|
|
|
3404
3404
|
if (((dt === "str") || (dt === "strz"))) {
|
|
3405
3405
|
var enc = this.getEncoding__s_Option__Lio_kaitai_struct_format_MetaSpec__sci_List__T($n(arg).Lio_kaitai_struct_format_YamlAttrArgs__f_encoding, metaDef, path);
|
|
3406
3406
|
if ((dt === "strz")) {
|
|
3407
|
-
var
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3407
|
+
var x1$8 = $n(arg).Lio_kaitai_struct_format_YamlAttrArgs__f_terminator;
|
|
3408
|
+
if ((x1$8 instanceof $c_s_Some)) {
|
|
3409
|
+
var x2$2 = $as_s_Some(x1$8);
|
|
3410
|
+
var t = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
3411
|
+
var term = t
|
|
3412
|
+
} else {
|
|
3413
|
+
var x$5 = $m_s_None$();
|
|
3414
|
+
if ((!(x$5 === x1$8))) {
|
|
3415
|
+
throw new $c_s_MatchError(x1$8)
|
|
3416
|
+
};
|
|
3417
|
+
var x1$9 = $m_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$().canonicalizeName__T__T2(enc);
|
|
3418
|
+
if ((x1$9 === null)) {
|
|
3419
|
+
throw new $c_s_MatchError(x1$9)
|
|
3420
|
+
};
|
|
3421
|
+
var newEncoding = $as_T($n(x1$9).T2__f__1);
|
|
3422
|
+
$as_s_Option($n(x1$9).T2__f__2);
|
|
3423
|
+
switch (newEncoding) {
|
|
3424
|
+
case "UTF-16LE":
|
|
3425
|
+
case "UTF-16BE": {
|
|
3426
|
+
var $$x5 = $m_s_package$().s_package$__f_Seq;
|
|
3427
|
+
var array = [0, 0];
|
|
3428
|
+
var nullTerm = $as_sci_Seq($n($$x5).apply__sci_Seq__sc_SeqOps($ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array)));
|
|
3429
|
+
break
|
|
3430
|
+
}
|
|
3431
|
+
case "UTF-32LE":
|
|
3432
|
+
case "UTF-32BE": {
|
|
3433
|
+
var $$x6 = $m_s_package$().s_package$__f_Seq;
|
|
3434
|
+
var array$1 = [0, 0, 0, 0];
|
|
3435
|
+
var nullTerm = $as_sci_Seq($n($$x6).apply__sci_Seq__sc_SeqOps($ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1)));
|
|
3436
|
+
break
|
|
3437
|
+
}
|
|
3438
|
+
default: {
|
|
3439
|
+
var $$x7 = $m_s_package$().s_package$__f_Seq;
|
|
3440
|
+
var array$2 = [0];
|
|
3441
|
+
var nullTerm = $as_sci_Seq($n($$x7).apply__sci_Seq__sc_SeqOps($ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$2)))
|
|
3442
|
+
}
|
|
3443
|
+
};
|
|
3444
|
+
var term = nullTerm
|
|
3445
|
+
};
|
|
3446
|
+
var x$1 = new $c_s_Some(term);
|
|
3425
3447
|
var this$21 = $n(arg);
|
|
3426
|
-
var x$
|
|
3448
|
+
var x$2$2 = this$21.Lio_kaitai_struct_format_YamlAttrArgs__f_size;
|
|
3427
3449
|
var this$22 = $n(arg);
|
|
3428
|
-
var x$
|
|
3450
|
+
var x$3$2 = this$22.Lio_kaitai_struct_format_YamlAttrArgs__f_sizeEos;
|
|
3429
3451
|
var this$23 = $n(arg);
|
|
3430
|
-
var x$
|
|
3452
|
+
var x$4$3 = this$23.Lio_kaitai_struct_format_YamlAttrArgs__f_encoding;
|
|
3453
|
+
var this$24 = $n(arg);
|
|
3454
|
+
var x$5$2 = this$24.Lio_kaitai_struct_format_YamlAttrArgs__f_include;
|
|
3455
|
+
var this$25 = $n(arg);
|
|
3456
|
+
var x$6$2 = this$25.Lio_kaitai_struct_format_YamlAttrArgs__f_consume;
|
|
3457
|
+
var this$26 = $n(arg);
|
|
3458
|
+
var x$7 = this$26.Lio_kaitai_struct_format_YamlAttrArgs__f_eosError;
|
|
3459
|
+
var this$27 = $n(arg);
|
|
3460
|
+
var x$8 = this$27.Lio_kaitai_struct_format_YamlAttrArgs__f_padRight;
|
|
3461
|
+
var this$28 = $n(arg);
|
|
3462
|
+
var x$9 = this$28.Lio_kaitai_struct_format_YamlAttrArgs__f_contents;
|
|
3463
|
+
var this$29 = $n(arg);
|
|
3464
|
+
var x$10 = this$29.Lio_kaitai_struct_format_YamlAttrArgs__f_enumRef;
|
|
3465
|
+
var this$30 = $n(arg);
|
|
3466
|
+
var x$11 = this$30.Lio_kaitai_struct_format_YamlAttrArgs__f_parent;
|
|
3467
|
+
var this$31 = $n(arg);
|
|
3468
|
+
var x$12 = this$31.Lio_kaitai_struct_format_YamlAttrArgs__f_process;
|
|
3431
3469
|
$n(arg);
|
|
3432
|
-
var arg2 = new $c_Lio_kaitai_struct_format_YamlAttrArgs(x$2$2, x$3$2, x$4$
|
|
3470
|
+
var arg2 = new $c_Lio_kaitai_struct_format_YamlAttrArgs(x$2$2, x$3$2, x$4$3, x$1, x$5$2, x$6$2, x$7, x$8, x$9, x$10, x$11, x$12)
|
|
3433
3471
|
} else {
|
|
3434
3472
|
var arg2 = arg
|
|
3435
3473
|
};
|
|
@@ -3439,10 +3477,10 @@ $c_Lio_kaitai_struct_datatype_DataType$.prototype.fromYaml__s_Option__sci_List__
|
|
|
3439
3477
|
};
|
|
3440
3478
|
var typeWithArgs = $m_Lio_kaitai_struct_exprlang_Expressions$().parseTypeRef__T__Lio_kaitai_struct_exprlang_Ast$TypeWithArguments(dt);
|
|
3441
3479
|
if ((($n($n(arg).Lio_kaitai_struct_format_YamlAttrArgs__f_size).isEmpty__Z() && (!$n(arg).Lio_kaitai_struct_format_YamlAttrArgs__f_sizeEos)) && $n($n(arg).Lio_kaitai_struct_format_YamlAttrArgs__f_terminator).isEmpty__Z())) {
|
|
3442
|
-
var this$
|
|
3443
|
-
if ((!this$
|
|
3444
|
-
var this$
|
|
3445
|
-
throw new $c_Lio_kaitai_struct_problems_CompilationProblemException(this$
|
|
3480
|
+
var this$33 = $n($n(arg).Lio_kaitai_struct_format_YamlAttrArgs__f_process);
|
|
3481
|
+
if ((!this$33.isEmpty__Z())) {
|
|
3482
|
+
var this$35 = new $c_Lio_kaitai_struct_problems_KSYParseError((("user type '" + dt) + "': need 'size' / 'size-eos' / 'terminator' if 'process' is used"), path, $m_s_None$());
|
|
3483
|
+
throw new $c_Lio_kaitai_struct_problems_CompilationProblemException(this$35)
|
|
3446
3484
|
};
|
|
3447
3485
|
var r = new $c_Lio_kaitai_struct_datatype_DataType$UserTypeInstream($n($n($n(typeWithArgs).Lio_kaitai_struct_exprlang_Ast$TypeWithArguments__f_typeName).Lio_kaitai_struct_exprlang_Ast$typeId__f_names).toList__sci_List(), $n(arg).Lio_kaitai_struct_format_YamlAttrArgs__f_parent, $n($n(typeWithArgs).Lio_kaitai_struct_exprlang_Ast$TypeWithArguments__f_arguments).Lio_kaitai_struct_exprlang_Ast$expr$List__f_elts)
|
|
3448
3486
|
} else {
|
|
@@ -16982,6 +17020,15 @@ $c_Lio_kaitai_struct_format_Identifier$.prototype.checkIdentifierSource__T__T__s
|
|
|
16982
17020
|
};
|
|
16983
17021
|
throw $n($m_Lio_kaitai_struct_problems_KSYParseError$().invalidId__T__T__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(id, entity, path))
|
|
16984
17022
|
});
|
|
17023
|
+
$c_Lio_kaitai_struct_format_Identifier$.prototype.itemExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__Lio_kaitai_struct_exprlang_Ast$expr = (function(id, rep) {
|
|
17024
|
+
var astId = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(id);
|
|
17025
|
+
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
17026
|
+
if ((x === rep)) {
|
|
17027
|
+
return astId
|
|
17028
|
+
} else {
|
|
17029
|
+
return new $c_Lio_kaitai_struct_exprlang_Ast$expr$Subscript(astId, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Name(new $c_Lio_kaitai_struct_exprlang_Ast$identifier($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX)))
|
|
17030
|
+
}
|
|
17031
|
+
});
|
|
16985
17032
|
var $d_Lio_kaitai_struct_format_Identifier$ = new $TypeData().initClass({
|
|
16986
17033
|
Lio_kaitai_struct_format_Identifier$: 0
|
|
16987
17034
|
}, false, "io.kaitai.struct.format.Identifier$", {
|
|
@@ -17328,6 +17375,25 @@ $c_Lio_kaitai_struct_format_ParseUtils$.prototype.getOptValueInt__sci_Map__T__sc
|
|
|
17328
17375
|
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
17329
17376
|
throw $n($n($$x1).badType__T__O__sci_List__Lio_kaitai_struct_problems_CompilationProblemException("int", x1, this$5.appendedAll__sc_IterableOnce__sci_List(suffix)))
|
|
17330
17377
|
});
|
|
17378
|
+
$c_Lio_kaitai_struct_format_ParseUtils$.prototype.getOptValueByte__sci_Map__T__sci_List__s_Option = (function(src, field, path) {
|
|
17379
|
+
var this$1 = $n(this.getOptValueInt__sci_Map__T__sci_List__s_Option(src, field, path));
|
|
17380
|
+
if (this$1.isEmpty__Z()) {
|
|
17381
|
+
return $m_s_None$()
|
|
17382
|
+
} else {
|
|
17383
|
+
var arg1 = this$1.get__O();
|
|
17384
|
+
var value = $uI(arg1);
|
|
17385
|
+
if (((value < 0) || (value > 255))) {
|
|
17386
|
+
var $$x1 = $m_Lio_kaitai_struct_problems_KSYParseError$();
|
|
17387
|
+
var this$6 = $n(path);
|
|
17388
|
+
$n($m_s_package$().s_package$__f_List);
|
|
17389
|
+
var array = [field];
|
|
17390
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
17391
|
+
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
17392
|
+
throw $n($n($$x1).withText__T__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(("expected an integer from 0 to 255, got " + value), this$6.appendedAll__sc_IterableOnce__sci_List(suffix)))
|
|
17393
|
+
};
|
|
17394
|
+
return new $c_s_Some(value)
|
|
17395
|
+
}
|
|
17396
|
+
});
|
|
17331
17397
|
$c_Lio_kaitai_struct_format_ParseUtils$.prototype.getValueIdentifier__sci_Map__I__T__sci_List__Lio_kaitai_struct_format_Identifier = (function(src, idx, entityName, path) {
|
|
17332
17398
|
var x1 = this.getOptValueStr__sci_Map__T__sci_List__s_Option(src, "id", path);
|
|
17333
17399
|
if ((x1 instanceof $c_s_Some)) {
|
|
@@ -18054,7 +18120,6 @@ function $f_Lio_kaitai_struct_languages_components_CommonReads__attrParse__Lio_k
|
|
|
18054
18120
|
};
|
|
18055
18121
|
$n($as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz)).instanceSetCalculated__Lio_kaitai_struct_format_InstanceIdentifier__V($n(x2$3).Lio_kaitai_struct_format_ParseInstanceSpec__f_id)
|
|
18056
18122
|
};
|
|
18057
|
-
$f_Lio_kaitai_struct_languages_components_CommonReads__attrValidateAll__Lio_kaitai_struct_format_AttrLikeSpec__V($thiz, attr);
|
|
18058
18123
|
$n($as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz)).attrParseIfFooter__s_Option__V($n($n(attr).cond__Lio_kaitai_struct_format_ConditionalSpec()).Lio_kaitai_struct_format_ConditionalSpec__f_ifExpr)
|
|
18059
18124
|
}
|
|
18060
18125
|
function $f_Lio_kaitai_struct_languages_components_CommonReads__attrParse0__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__T__s_Option__V($thiz, id, attr, io, defEndian) {
|
|
@@ -18106,6 +18171,7 @@ function $f_Lio_kaitai_struct_languages_components_CommonReads__attrParse0__Lio_
|
|
|
18106
18171
|
throw new $c_s_MatchError(x1)
|
|
18107
18172
|
};
|
|
18108
18173
|
$thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, $n(attr).dataType__Lio_kaitai_struct_datatype_DataType(), io, $n($n(attr).cond__Lio_kaitai_struct_format_ConditionalSpec()).Lio_kaitai_struct_format_ConditionalSpec__f_repeat, false, defEndian, $thiz.attrParse2$default$7__s_Option());
|
|
18174
|
+
$f_Lio_kaitai_struct_languages_components_CommonReads__attrValidateAll__Lio_kaitai_struct_format_AttrLikeSpec__V($thiz, attr);
|
|
18109
18175
|
var x1$2 = $n($n(attr).cond__Lio_kaitai_struct_format_ConditionalSpec()).Lio_kaitai_struct_format_ConditionalSpec__f_repeat;
|
|
18110
18176
|
matchEnd8: {
|
|
18111
18177
|
var x$7 = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
@@ -34749,11 +34815,8 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrBytesLimitType__Lio_ka
|
|
|
34749
34815
|
throw new $c_s_MatchError(x1)
|
|
34750
34816
|
};
|
|
34751
34817
|
var x3 = $as_s_Some(x1);
|
|
34752
|
-
var term = $
|
|
34753
|
-
var
|
|
34754
|
-
var array = [(255 & term)];
|
|
34755
|
-
var termStr = $n($$x1).format$extension__T__sci_Seq__T("\\x%02X", $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array));
|
|
34756
|
-
var subcon2 = (((((("NullTerminated(" + subcon) + ", term=b'") + termStr) + "', include=") + $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator).doBoolLiteral__Z__T($n(blt).Lio_kaitai_struct_datatype_DataType$BytesLimitType__f_include)) + ")")
|
|
34818
|
+
var term = $as_sci_Seq($n(x3).s_Some__f_value);
|
|
34819
|
+
var subcon2 = (((((("NullTerminated(" + subcon) + ", term=") + $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", include=") + $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator).doBoolLiteral__Z__T($n(blt).Lio_kaitai_struct_datatype_DataType$BytesLimitType__f_include)) + ")")
|
|
34757
34820
|
};
|
|
34758
34821
|
var x1$2 = $n(blt).Lio_kaitai_struct_datatype_DataType$BytesLimitType__f_padRight;
|
|
34759
34822
|
var x$3 = $m_s_None$();
|
|
@@ -34765,20 +34828,17 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrBytesLimitType__Lio_ka
|
|
|
34765
34828
|
};
|
|
34766
34829
|
var x3$2 = $as_s_Some(x1$2);
|
|
34767
34830
|
var padRight = $uI($n(x3$2).s_Some__f_value);
|
|
34768
|
-
var $$
|
|
34769
|
-
var array
|
|
34770
|
-
var padStr = $n($$
|
|
34831
|
+
var $$x1 = $m_sc_StringOps$();
|
|
34832
|
+
var array = [(255 & padRight)];
|
|
34833
|
+
var padStr = $n($$x1).format$extension__T__sci_Seq__T("\\x%02X", $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array));
|
|
34771
34834
|
var subcon3 = (((("NullStripped(" + subcon2) + ", pad=b'") + padStr) + "')")
|
|
34772
34835
|
};
|
|
34773
|
-
var this$
|
|
34836
|
+
var this$5 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator);
|
|
34774
34837
|
var v = $n(blt).Lio_kaitai_struct_datatype_DataType$BytesLimitType__f_size;
|
|
34775
|
-
return (((("FixedSized(" + this$
|
|
34838
|
+
return (((("FixedSized(" + this$5.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ", ") + subcon3) + ")")
|
|
34776
34839
|
});
|
|
34777
34840
|
$c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrBytesTerminatedType__Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__T__T = (function(btt, subcon) {
|
|
34778
|
-
|
|
34779
|
-
var array = [(255 & $n(btt).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_terminator)];
|
|
34780
|
-
var termStr = $n($$x1).format$extension__T__sci_Seq__T("\\x%02X", $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array));
|
|
34781
|
-
return (((((((("NullTerminated(" + subcon) + ", ") + ("term=b'" + termStr)) + "', ") + ("include=" + $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator).doBoolLiteral__Z__T($n(btt).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include))) + ", ") + ("consume=" + $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator).doBoolLiteral__Z__T($n(btt).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume))) + ")")
|
|
34841
|
+
return (((((((("NullTerminated(" + subcon) + ", ") + ("term=" + $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator).doByteArrayLiteral__sci_Seq__T($n(btt).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_terminator))) + ", ") + ("include=" + $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator).doBoolLiteral__Z__T($n(btt).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include))) + ", ") + ("consume=" + $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator).doBoolLiteral__Z__T($n(btt).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume))) + ")")
|
|
34782
34842
|
});
|
|
34783
34843
|
$c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrSwitchType__Lio_kaitai_struct_datatype_DataType$SwitchType__T = (function(st) {
|
|
34784
34844
|
var this$2 = $n($n(st).Lio_kaitai_struct_datatype_DataType$SwitchType__f_cases);
|
|
@@ -35628,25 +35688,28 @@ $c_Lio_kaitai_struct_GraphvizClassCompiler$.prototype.dataTypeName__Lio_kaitai_s
|
|
|
35628
35688
|
var eosError = $n(x4).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
35629
35689
|
var elems = $m_sci_Nil$();
|
|
35630
35690
|
var args = new $c_scm_ListBuffer().scala$collection$mutable$ListBuffer$$freshFrom__sc_IterableOnce__scm_ListBuffer(elems);
|
|
35631
|
-
|
|
35632
|
-
var
|
|
35633
|
-
|
|
35634
|
-
|
|
35635
|
-
|
|
35691
|
+
var this$3 = $n($as_sc_IterableOnceOps($n(terminator).map__F1__O(new $c_sjsr_AnonFunction1(((x$3$2) => {
|
|
35692
|
+
var x$3 = $uB(x$3$2);
|
|
35693
|
+
return (255 & x$3)
|
|
35694
|
+
})))));
|
|
35695
|
+
var termStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$3, "", ", ", "");
|
|
35696
|
+
var this$4 = $n(args);
|
|
35697
|
+
var elem = ("term=" + (($n(terminator).length__I() === 1) ? termStr : (("[" + termStr) + "]")));
|
|
35698
|
+
this$4.addOne__O__scm_ListBuffer(elem);
|
|
35636
35699
|
if (include) {
|
|
35637
|
-
var this$
|
|
35638
|
-
this$
|
|
35700
|
+
var this$5 = $n(args);
|
|
35701
|
+
this$5.addOne__O__scm_ListBuffer("include")
|
|
35639
35702
|
};
|
|
35640
35703
|
if ((!consume)) {
|
|
35641
|
-
var this$
|
|
35642
|
-
this$
|
|
35704
|
+
var this$6 = $n(args);
|
|
35705
|
+
this$6.addOne__O__scm_ListBuffer("don't consume")
|
|
35643
35706
|
};
|
|
35644
35707
|
if ((!eosError)) {
|
|
35645
|
-
var this$
|
|
35646
|
-
this$
|
|
35708
|
+
var this$7 = $n(args);
|
|
35709
|
+
this$7.addOne__O__scm_ListBuffer("ignore EOS")
|
|
35647
35710
|
};
|
|
35648
|
-
var this$
|
|
35649
|
-
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$
|
|
35711
|
+
var this$8 = $n(args);
|
|
35712
|
+
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$8, "", ", ", "")
|
|
35650
35713
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType)) {
|
|
35651
35714
|
return ""
|
|
35652
35715
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType)) {
|
|
@@ -35654,8 +35717,8 @@ $c_Lio_kaitai_struct_GraphvizClassCompiler$.prototype.dataTypeName__Lio_kaitai_s
|
|
|
35654
35717
|
var basedOn = $n(x7).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_bytes;
|
|
35655
35718
|
var encoding = $n(x7).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding;
|
|
35656
35719
|
var bytesStr = this.dataTypeName__Lio_kaitai_struct_datatype_DataType__T(basedOn);
|
|
35657
|
-
var this$
|
|
35658
|
-
if ((this$
|
|
35720
|
+
var this$9 = $n(bytesStr);
|
|
35721
|
+
if ((this$9 === "")) {
|
|
35659
35722
|
var comma = ""
|
|
35660
35723
|
} else {
|
|
35661
35724
|
var comma = ", "
|
|
@@ -36206,28 +36269,37 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36206
36269
|
var sizeEos = $uZ((this$12.isEmpty__Z() ? false : this$12.get__O()));
|
|
36207
36270
|
var ifExpr = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueExpression__sci_Map__T__sci_List__s_Option(srcMap, "if", path);
|
|
36208
36271
|
var encoding = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueStr__sci_Map__T__sci_List__s_Option(srcMap, "encoding", path);
|
|
36209
|
-
var
|
|
36210
|
-
|
|
36211
|
-
|
|
36212
|
-
|
|
36213
|
-
|
|
36214
|
-
|
|
36215
|
-
|
|
36216
|
-
|
|
36272
|
+
var this$13 = $n($m_Lio_kaitai_struct_format_ParseUtils$().getOptValueByte__sci_Map__T__sci_List__s_Option(srcMap, "terminator", path));
|
|
36273
|
+
if (this$13.isEmpty__Z()) {
|
|
36274
|
+
var terminator = $m_s_None$()
|
|
36275
|
+
} else {
|
|
36276
|
+
var arg1$1 = this$13.get__O();
|
|
36277
|
+
var value = $uI(arg1$1);
|
|
36278
|
+
var $$x4 = $m_s_package$().s_package$__f_Seq;
|
|
36279
|
+
var array$2 = [((value << 24) >> 24)];
|
|
36280
|
+
var terminator = new $c_s_Some($as_sci_Seq($n($$x4).apply__sci_Seq__sc_SeqOps($ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$2))))
|
|
36281
|
+
};
|
|
36282
|
+
var this$17 = $n($m_Lio_kaitai_struct_format_ParseUtils$().getOptValueBool__sci_Map__T__sci_List__s_Option(srcMap, "consume", path));
|
|
36283
|
+
var consume = $uZ((this$17.isEmpty__Z() || this$17.get__O()));
|
|
36284
|
+
var this$18 = $n($m_Lio_kaitai_struct_format_ParseUtils$().getOptValueBool__sci_Map__T__sci_List__s_Option(srcMap, "include", path));
|
|
36285
|
+
var include = $uZ((this$18.isEmpty__Z() ? false : this$18.get__O()));
|
|
36286
|
+
var this$19 = $n($m_Lio_kaitai_struct_format_ParseUtils$().getOptValueBool__sci_Map__T__sci_List__s_Option(srcMap, "eos-error", path));
|
|
36287
|
+
var eosError = $uZ((this$19.isEmpty__Z() || this$19.get__O()));
|
|
36288
|
+
var padRight = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueByte__sci_Map__T__sci_List__s_Option(srcMap, "pad-right", path);
|
|
36217
36289
|
var enumOpt = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueStr__sci_Map__T__sci_List__s_Option(srcMap, "enum", path);
|
|
36218
36290
|
var parent = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueExpression__sci_Map__T__sci_List__s_Option(srcMap, "parent", path);
|
|
36219
|
-
var this$
|
|
36220
|
-
if (this$
|
|
36291
|
+
var this$20 = $n($n(srcMap).get__O__s_Option("valid"));
|
|
36292
|
+
if (this$20.isEmpty__Z()) {
|
|
36221
36293
|
var valid = $m_s_None$()
|
|
36222
36294
|
} else {
|
|
36223
|
-
var arg1$
|
|
36224
|
-
var $$
|
|
36225
|
-
var this$
|
|
36295
|
+
var arg1$2 = this$20.get__O();
|
|
36296
|
+
var $$x5 = $m_Lio_kaitai_struct_format_ValidationSpec$();
|
|
36297
|
+
var this$25 = $n(path);
|
|
36226
36298
|
$n($m_s_package$().s_package$__f_List);
|
|
36227
|
-
var array$
|
|
36228
|
-
var elems$2 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$
|
|
36299
|
+
var array$3 = ["valid"];
|
|
36300
|
+
var elems$2 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$3);
|
|
36229
36301
|
var suffix$2 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$2);
|
|
36230
|
-
var valid = new $c_s_Some($n($$
|
|
36302
|
+
var valid = new $c_s_Some($n($$x5).fromYaml__O__sci_List__Lio_kaitai_struct_format_ValidationSpec(arg1$2, this$25.appendedAll__sc_IterableOnce__sci_List(suffix$2)))
|
|
36231
36303
|
};
|
|
36232
36304
|
var x1 = new $c_T2(contents, valid);
|
|
36233
36305
|
matchEnd16: {
|
|
@@ -36245,13 +36317,13 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36245
36317
|
var byteArray = $asArrayOf_B($n(x7).s_Some__f_value, 1);
|
|
36246
36318
|
var x$4 = $m_s_None$();
|
|
36247
36319
|
if ((x$4 === p6)) {
|
|
36248
|
-
var $$
|
|
36320
|
+
var $$x15 = $m_s_Predef$();
|
|
36249
36321
|
$m_sc_ArrayOps$();
|
|
36250
36322
|
var f = ((x$6$2) => {
|
|
36251
36323
|
var x$6 = $uB(x$6$2);
|
|
36252
|
-
var this$
|
|
36324
|
+
var this$27 = $m_s_math_BigInt$();
|
|
36253
36325
|
var i = (255 & x$6);
|
|
36254
|
-
return new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(this$
|
|
36326
|
+
return new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(this$27.apply__I__s_math_BigInt(i))
|
|
36255
36327
|
});
|
|
36256
36328
|
var len = $n(byteArray).u.length;
|
|
36257
36329
|
var ys = new ($d_Lio_kaitai_struct_exprlang_Ast$expr$IntNum.getArrayOf().constr)(len);
|
|
@@ -36260,81 +36332,81 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36260
36332
|
if ((byteArray instanceof $ac_O)) {
|
|
36261
36333
|
var x2 = $asArrayOf_O(byteArray, 1);
|
|
36262
36334
|
while ((i$1 < len)) {
|
|
36263
|
-
var $$
|
|
36264
|
-
var arg1$
|
|
36265
|
-
ys.set($$
|
|
36335
|
+
var $$x6 = i$1;
|
|
36336
|
+
var arg1$3 = $n(x2).get(i$1);
|
|
36337
|
+
ys.set($$x6, f(arg1$3));
|
|
36266
36338
|
i$1 = ((1 + i$1) | 0)
|
|
36267
36339
|
}
|
|
36268
36340
|
} else if ((byteArray instanceof $ac_I)) {
|
|
36269
36341
|
var x3 = $asArrayOf_I(byteArray, 1);
|
|
36270
36342
|
while ((i$1 < len)) {
|
|
36271
|
-
var $$
|
|
36272
|
-
var arg1$
|
|
36273
|
-
ys.set($$
|
|
36343
|
+
var $$x7 = i$1;
|
|
36344
|
+
var arg1$4 = $n(x3).get(i$1);
|
|
36345
|
+
ys.set($$x7, f(arg1$4));
|
|
36274
36346
|
i$1 = ((1 + i$1) | 0)
|
|
36275
36347
|
}
|
|
36276
36348
|
} else if ((byteArray instanceof $ac_D)) {
|
|
36277
36349
|
var x4 = $asArrayOf_D(byteArray, 1);
|
|
36278
36350
|
while ((i$1 < len)) {
|
|
36279
|
-
var $$
|
|
36280
|
-
var arg1$
|
|
36281
|
-
ys.set($$
|
|
36351
|
+
var $$x8 = i$1;
|
|
36352
|
+
var arg1$5 = $n(x4).get(i$1);
|
|
36353
|
+
ys.set($$x8, f(arg1$5));
|
|
36282
36354
|
i$1 = ((1 + i$1) | 0)
|
|
36283
36355
|
}
|
|
36284
36356
|
} else if ((byteArray instanceof $ac_J)) {
|
|
36285
36357
|
var x5 = $asArrayOf_J(byteArray, 1);
|
|
36286
36358
|
while ((i$1 < len)) {
|
|
36287
|
-
var $$
|
|
36359
|
+
var $$x9 = i$1;
|
|
36288
36360
|
var t = $n(x5).get(i$1);
|
|
36289
36361
|
var lo = t.RTLong__f_lo;
|
|
36290
36362
|
var hi = t.RTLong__f_hi;
|
|
36291
|
-
ys.set($$
|
|
36363
|
+
ys.set($$x9, f(new $c_RTLong(lo, hi)));
|
|
36292
36364
|
i$1 = ((1 + i$1) | 0)
|
|
36293
36365
|
}
|
|
36294
36366
|
} else if ((byteArray instanceof $ac_F)) {
|
|
36295
36367
|
var x6 = $asArrayOf_F(byteArray, 1);
|
|
36296
36368
|
while ((i$1 < len)) {
|
|
36297
|
-
var $$
|
|
36298
|
-
var arg1$
|
|
36299
|
-
ys.set($$
|
|
36369
|
+
var $$x10 = i$1;
|
|
36370
|
+
var arg1$6 = $n(x6).get(i$1);
|
|
36371
|
+
ys.set($$x10, f(arg1$6));
|
|
36300
36372
|
i$1 = ((1 + i$1) | 0)
|
|
36301
36373
|
}
|
|
36302
36374
|
} else if ((byteArray instanceof $ac_C)) {
|
|
36303
36375
|
var x7$1 = $asArrayOf_C(byteArray, 1);
|
|
36304
36376
|
while ((i$1 < len)) {
|
|
36305
|
-
var $$
|
|
36306
|
-
var arg1$
|
|
36307
|
-
ys.set($$
|
|
36377
|
+
var $$x11 = i$1;
|
|
36378
|
+
var arg1$7 = $n(x7$1).get(i$1);
|
|
36379
|
+
ys.set($$x11, f($bC(arg1$7)));
|
|
36308
36380
|
i$1 = ((1 + i$1) | 0)
|
|
36309
36381
|
}
|
|
36310
36382
|
} else if ((byteArray !== null)) {
|
|
36311
36383
|
while ((i$1 < len)) {
|
|
36312
|
-
var $$
|
|
36313
|
-
var arg1$
|
|
36314
|
-
ys.set($$
|
|
36384
|
+
var $$x12 = i$1;
|
|
36385
|
+
var arg1$8 = $n(byteArray).get(i$1);
|
|
36386
|
+
ys.set($$x12, f(arg1$8));
|
|
36315
36387
|
i$1 = ((1 + i$1) | 0)
|
|
36316
36388
|
}
|
|
36317
36389
|
} else if ((byteArray instanceof $ac_S)) {
|
|
36318
36390
|
var x9 = $asArrayOf_S(byteArray, 1);
|
|
36319
36391
|
while ((i$1 < len)) {
|
|
36320
|
-
var $$
|
|
36321
|
-
var arg1$
|
|
36322
|
-
ys.set($$
|
|
36392
|
+
var $$x13 = i$1;
|
|
36393
|
+
var arg1$9 = $n(x9).get(i$1);
|
|
36394
|
+
ys.set($$x13, f(arg1$9));
|
|
36323
36395
|
i$1 = ((1 + i$1) | 0)
|
|
36324
36396
|
}
|
|
36325
36397
|
} else if ((byteArray instanceof $ac_Z)) {
|
|
36326
36398
|
var x10 = $asArrayOf_Z(byteArray, 1);
|
|
36327
36399
|
while ((i$1 < len)) {
|
|
36328
|
-
var $$
|
|
36329
|
-
var arg1$
|
|
36330
|
-
ys.set($$
|
|
36400
|
+
var $$x14 = i$1;
|
|
36401
|
+
var arg1$10 = $n(x10).get(i$1);
|
|
36402
|
+
ys.set($$x14, f(arg1$10));
|
|
36331
36403
|
i$1 = ((1 + i$1) | 0)
|
|
36332
36404
|
}
|
|
36333
36405
|
} else {
|
|
36334
36406
|
throw new $c_s_MatchError(byteArray)
|
|
36335
36407
|
}
|
|
36336
36408
|
};
|
|
36337
|
-
var valid2 = new $c_s_Some(new $c_Lio_kaitai_struct_format_ValidationEq(new $c_Lio_kaitai_struct_exprlang_Ast$expr$List($n($$
|
|
36409
|
+
var valid2 = new $c_s_Some(new $c_Lio_kaitai_struct_format_ValidationEq(new $c_Lio_kaitai_struct_exprlang_Ast$expr$List($n($$x15).copyArrayToImmutableIndexedSeq__O__sci_IndexedSeq(ys))));
|
|
36338
36410
|
break matchEnd16
|
|
36339
36411
|
}
|
|
36340
36412
|
};
|
|
@@ -36361,22 +36433,22 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36361
36433
|
var dataType = $m_Lio_kaitai_struct_datatype_DataType$().fromYaml__s_Option__sci_List__Lio_kaitai_struct_format_MetaSpec__Lio_kaitai_struct_format_YamlAttrArgs__Lio_kaitai_struct_datatype_DataType(new $c_s_Some(x2$1), path, metaDef, yamlAttrArgs)
|
|
36362
36434
|
} else {
|
|
36363
36435
|
if ((!$is_sci_Map(x$9))) {
|
|
36364
|
-
var $$
|
|
36365
|
-
var this$
|
|
36436
|
+
var $$x16 = $m_Lio_kaitai_struct_problems_KSYParseError$();
|
|
36437
|
+
var this$39 = $n(path);
|
|
36366
36438
|
$n($m_s_package$().s_package$__f_List);
|
|
36367
|
-
var array$
|
|
36368
|
-
var elems$4 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$
|
|
36439
|
+
var array$5 = ["type"];
|
|
36440
|
+
var elems$4 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$5);
|
|
36369
36441
|
var suffix$4 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$4);
|
|
36370
|
-
throw $n($n($$
|
|
36442
|
+
throw $n($n($$x16).withText__T__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(("expected map or string, found " + x$9), this$39.appendedAll__sc_IterableOnce__sci_List(suffix$4)))
|
|
36371
36443
|
};
|
|
36372
36444
|
var x3$2 = $as_sci_Map(x$9);
|
|
36373
36445
|
var switchMapStr = $m_Lio_kaitai_struct_format_ParseUtils$().anyMapToStrMap__sci_Map__sci_List__sci_Map(x3$2, path);
|
|
36374
|
-
var this$
|
|
36446
|
+
var this$34 = $n(path);
|
|
36375
36447
|
$n($m_s_package$().s_package$__f_List);
|
|
36376
|
-
var array$
|
|
36377
|
-
var elems$3 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$
|
|
36448
|
+
var array$4 = ["type"];
|
|
36449
|
+
var elems$3 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$4);
|
|
36378
36450
|
var suffix$3 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$3);
|
|
36379
|
-
var dataType = $p_Lio_kaitai_struct_format_AttrSpec$__parseSwitch__sci_Map__sci_List__Lio_kaitai_struct_format_MetaSpec__Lio_kaitai_struct_format_YamlAttrArgs__Lio_kaitai_struct_datatype_DataType(this, switchMapStr, this$
|
|
36451
|
+
var dataType = $p_Lio_kaitai_struct_format_AttrSpec$__parseSwitch__sci_Map__sci_List__Lio_kaitai_struct_format_MetaSpec__Lio_kaitai_struct_format_YamlAttrArgs__Lio_kaitai_struct_datatype_DataType(this, switchMapStr, this$34.appendedAll__sc_IterableOnce__sci_List(suffix$3), metaDef, yamlAttrArgs)
|
|
36380
36452
|
}
|
|
36381
36453
|
};
|
|
36382
36454
|
var x1$4 = $m_Lio_kaitai_struct_format_RepeatSpec$().fromYaml__sci_Map__sci_List__T2(srcMap, path);
|
|
@@ -36385,8 +36457,8 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36385
36457
|
};
|
|
36386
36458
|
var repeatSpec = $as_Lio_kaitai_struct_format_RepeatSpec($n(x1$4).T2__f__1);
|
|
36387
36459
|
var legalRepeatKeys = $as_sci_Set($n(x1$4).T2__f__2);
|
|
36388
|
-
var this$
|
|
36389
|
-
var this$
|
|
36460
|
+
var this$40 = $n(this.Lio_kaitai_struct_format_AttrSpec$__f_LEGAL_KEYS);
|
|
36461
|
+
var this$42 = $n(this$40.concat__sc_IterableOnce__sc_SetOps(legalRepeatKeys));
|
|
36390
36462
|
if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType)) {
|
|
36391
36463
|
var that = this.Lio_kaitai_struct_format_AttrSpec$__f_LEGAL_KEYS_BYTES
|
|
36392
36464
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType)) {
|
|
@@ -36398,11 +36470,11 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36398
36470
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
36399
36471
|
var that = this.Lio_kaitai_struct_format_AttrSpec$__f_LEGAL_KEYS_BYTES
|
|
36400
36472
|
} else {
|
|
36401
|
-
var this$
|
|
36473
|
+
var this$41 = $n($m_s_Predef$().s_Predef$__f_Set);
|
|
36402
36474
|
var elems$5 = $m_sci_Nil$();
|
|
36403
|
-
var that = this$
|
|
36475
|
+
var that = this$41.from__sc_IterableOnce__sci_Set(elems$5)
|
|
36404
36476
|
};
|
|
36405
|
-
var legalKeys = $as_sci_Set(this$
|
|
36477
|
+
var legalKeys = $as_sci_Set(this$42.concat__sc_IterableOnce__sc_SetOps(that));
|
|
36406
36478
|
$m_Lio_kaitai_struct_format_ParseUtils$().ensureLegalKeys__sci_Map__sci_Set__sci_List__s_Option__V(srcMap, legalKeys, path, $m_s_None$());
|
|
36407
36479
|
return new $c_Lio_kaitai_struct_format_AttrSpec(path, id, dataType, new $c_Lio_kaitai_struct_format_ConditionalSpec(ifExpr, repeatSpec), valid2, doc)
|
|
36408
36480
|
});
|
|
@@ -37746,55 +37818,51 @@ function $f_Lio_kaitai_struct_languages_components_SwitchIfOps__switchCasesUsing
|
|
|
37746
37818
|
}
|
|
37747
37819
|
}
|
|
37748
37820
|
function $f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_format_ValidationSpec__V($thiz, attrId, attr, valid) {
|
|
37821
|
+
var itemValue = $m_Lio_kaitai_struct_format_Identifier$().itemExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__Lio_kaitai_struct_exprlang_Ast$expr(attrId, $n($n(attr).cond__Lio_kaitai_struct_format_ConditionalSpec()).Lio_kaitai_struct_format_ConditionalSpec__f_repeat);
|
|
37749
37822
|
if ((valid instanceof $c_Lio_kaitai_struct_format_ValidationEq)) {
|
|
37750
37823
|
var x2 = $as_Lio_kaitai_struct_format_ValidationEq(valid);
|
|
37751
37824
|
var expected = $n(x2).Lio_kaitai_struct_format_ValidationEq__f_value;
|
|
37752
37825
|
var op = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
|
|
37753
|
-
var
|
|
37754
|
-
var err = new $c_Lio_kaitai_struct_datatype_ValidationNotEqualError($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$1));
|
|
37826
|
+
var err = new $c_Lio_kaitai_struct_datatype_ValidationNotEqualError($n(attr).dataType__Lio_kaitai_struct_datatype_DataType());
|
|
37755
37827
|
$f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidateExprCompare__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__V($thiz, attrId, attr, op, expected, err)
|
|
37756
37828
|
} else if ((valid instanceof $c_Lio_kaitai_struct_format_ValidationMin)) {
|
|
37757
37829
|
var x3 = $as_Lio_kaitai_struct_format_ValidationMin(valid);
|
|
37758
37830
|
var min = $n(x3).Lio_kaitai_struct_format_ValidationMin__f_min;
|
|
37759
37831
|
var op$1 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$GtE$();
|
|
37760
|
-
var
|
|
37761
|
-
var err$1 = new $c_Lio_kaitai_struct_datatype_ValidationLessThanError($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$2));
|
|
37832
|
+
var err$1 = new $c_Lio_kaitai_struct_datatype_ValidationLessThanError($n(attr).dataType__Lio_kaitai_struct_datatype_DataType());
|
|
37762
37833
|
$f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidateExprCompare__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__V($thiz, attrId, attr, op$1, min, err$1)
|
|
37763
37834
|
} else if ((valid instanceof $c_Lio_kaitai_struct_format_ValidationMax)) {
|
|
37764
37835
|
var x4 = $as_Lio_kaitai_struct_format_ValidationMax(valid);
|
|
37765
37836
|
var max = $n(x4).Lio_kaitai_struct_format_ValidationMax__f_max;
|
|
37766
37837
|
var op$2 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$LtE$();
|
|
37767
|
-
var
|
|
37768
|
-
var err$2 = new $c_Lio_kaitai_struct_datatype_ValidationGreaterThanError($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$3));
|
|
37838
|
+
var err$2 = new $c_Lio_kaitai_struct_datatype_ValidationGreaterThanError($n(attr).dataType__Lio_kaitai_struct_datatype_DataType());
|
|
37769
37839
|
$f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidateExprCompare__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__V($thiz, attrId, attr, op$2, max, err$2)
|
|
37770
37840
|
} else if ((valid instanceof $c_Lio_kaitai_struct_format_ValidationRange)) {
|
|
37771
37841
|
var x5 = $as_Lio_kaitai_struct_format_ValidationRange(valid);
|
|
37772
37842
|
var min$2 = $n(x5).Lio_kaitai_struct_format_ValidationRange__f_min;
|
|
37773
37843
|
var max$2 = $n(x5).Lio_kaitai_struct_format_ValidationRange__f_max;
|
|
37774
37844
|
var op$3 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$GtE$();
|
|
37775
|
-
var
|
|
37776
|
-
var err$3 = new $c_Lio_kaitai_struct_datatype_ValidationLessThanError($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$4));
|
|
37845
|
+
var err$3 = new $c_Lio_kaitai_struct_datatype_ValidationLessThanError($n(attr).dataType__Lio_kaitai_struct_datatype_DataType());
|
|
37777
37846
|
$f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidateExprCompare__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__V($thiz, attrId, attr, op$3, min$2, err$3);
|
|
37778
37847
|
var op$4 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$LtE$();
|
|
37779
|
-
var
|
|
37780
|
-
var err$4 = new $c_Lio_kaitai_struct_datatype_ValidationGreaterThanError($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$5));
|
|
37848
|
+
var err$4 = new $c_Lio_kaitai_struct_datatype_ValidationGreaterThanError($n(attr).dataType__Lio_kaitai_struct_datatype_DataType());
|
|
37781
37849
|
$f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidateExprCompare__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__V($thiz, attrId, attr, op$4, max$2, err$4)
|
|
37782
37850
|
} else if ((valid instanceof $c_Lio_kaitai_struct_format_ValidationAnyOf)) {
|
|
37783
37851
|
var x6 = $as_Lio_kaitai_struct_format_ValidationAnyOf(valid);
|
|
37784
37852
|
var values = $n(x6).Lio_kaitai_struct_format_ValidationAnyOf__f_values;
|
|
37785
37853
|
var $$x2 = $m_Lio_kaitai_struct_exprlang_Ast$boolop$Or$();
|
|
37786
|
-
var this$
|
|
37854
|
+
var this$2 = $n(values);
|
|
37787
37855
|
var f = ((expected$2$2) => {
|
|
37788
37856
|
var expected$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr(expected$2$2);
|
|
37789
|
-
return new $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare(
|
|
37857
|
+
return new $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare(itemValue, $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$(), expected$2)
|
|
37790
37858
|
});
|
|
37791
|
-
if ((this$
|
|
37859
|
+
if ((this$2 === $m_sci_Nil$())) {
|
|
37792
37860
|
var $$x1 = $m_sci_Nil$()
|
|
37793
37861
|
} else {
|
|
37794
|
-
var arg1 = this$
|
|
37862
|
+
var arg1 = this$2.head__O();
|
|
37795
37863
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
37796
37864
|
var t = h;
|
|
37797
|
-
var rest = $as_sci_List(this$
|
|
37865
|
+
var rest = $as_sci_List(this$2.tail__O());
|
|
37798
37866
|
while ((rest !== $m_sci_Nil$())) {
|
|
37799
37867
|
var arg1$1 = $n(rest).head__O();
|
|
37800
37868
|
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
@@ -37805,59 +37873,48 @@ function $f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidate__Li
|
|
|
37805
37873
|
var $$x1 = h
|
|
37806
37874
|
};
|
|
37807
37875
|
var bigOrExpr = new $c_Lio_kaitai_struct_exprlang_Ast$expr$BoolOp($$x2, $$x1);
|
|
37808
|
-
var
|
|
37809
|
-
var $$
|
|
37810
|
-
var this$9 = $n(attr);
|
|
37811
|
-
var $$x5 = new $c_Lio_kaitai_struct_datatype_ValidationNotAnyOfError($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$9));
|
|
37876
|
+
var $$x5 = $n(attr).dataType__Lio_kaitai_struct_datatype_DataType();
|
|
37877
|
+
var $$x4 = new $c_Lio_kaitai_struct_datatype_ValidationNotAnyOfError($n(attr).dataType__Lio_kaitai_struct_datatype_DataType());
|
|
37812
37878
|
$n($m_s_package$().s_package$__f_List);
|
|
37813
|
-
var $$x4 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(attrId);
|
|
37814
37879
|
var $$x3 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName($m_Lio_kaitai_struct_format_IoIdentifier$());
|
|
37815
|
-
var this$
|
|
37816
|
-
var array = [
|
|
37880
|
+
var this$3 = $n($n(attr).path__sci_List());
|
|
37881
|
+
var array = [itemValue, $$x3, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str($f_sc_IterableOnceOps__mkString__T__T__T__T(this$3, "/", "/", ""))];
|
|
37817
37882
|
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
37818
|
-
$thiz.attrValidateExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__sci_List__V(attrId, $$
|
|
37883
|
+
$thiz.attrValidateExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__sci_List__V(attrId, $$x5, bigOrExpr, $$x4, $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems))
|
|
37819
37884
|
} else if ((valid instanceof $c_Lio_kaitai_struct_format_ValidationExpr)) {
|
|
37820
37885
|
var x7 = $as_Lio_kaitai_struct_format_ValidationExpr(valid);
|
|
37821
37886
|
var expr = $n(x7).Lio_kaitai_struct_format_ValidationExpr__f_checkExpr;
|
|
37822
37887
|
$thiz.blockScopeHeader__V();
|
|
37823
|
-
|
|
37824
|
-
var
|
|
37825
|
-
|
|
37826
|
-
var this$16 = $n(attr);
|
|
37827
|
-
var $$x9 = $f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$16);
|
|
37828
|
-
var this$17 = $n($thiz.translator__Lio_kaitai_struct_translators_AbstractTranslator());
|
|
37888
|
+
$n($thiz.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some($n(attr).dataType__Lio_kaitai_struct_datatype_DataType());
|
|
37889
|
+
var $$x7 = $n(attr).dataType__Lio_kaitai_struct_datatype_DataType();
|
|
37890
|
+
var this$8 = $n($thiz.translator__Lio_kaitai_struct_translators_AbstractTranslator());
|
|
37829
37891
|
var v = new $c_Lio_kaitai_struct_exprlang_Ast$expr$Name(new $c_Lio_kaitai_struct_exprlang_Ast$identifier($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR));
|
|
37830
|
-
var $$
|
|
37831
|
-
var this$
|
|
37832
|
-
|
|
37833
|
-
|
|
37834
|
-
var
|
|
37835
|
-
var $$x13 = $f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$19);
|
|
37836
|
-
var this$20 = $n(attr);
|
|
37837
|
-
var $$x12 = new $c_Lio_kaitai_struct_datatype_ValidationExprError($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$20));
|
|
37892
|
+
var $$x6 = this$8.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0);
|
|
37893
|
+
var this$9 = $n($thiz.translator__Lio_kaitai_struct_translators_AbstractTranslator());
|
|
37894
|
+
$thiz.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V($$x7, $$x6, this$9.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(itemValue, 0));
|
|
37895
|
+
var $$x10 = $n(attr).dataType__Lio_kaitai_struct_datatype_DataType();
|
|
37896
|
+
var $$x9 = new $c_Lio_kaitai_struct_datatype_ValidationExprError($n(attr).dataType__Lio_kaitai_struct_datatype_DataType());
|
|
37838
37897
|
$n($m_s_package$().s_package$__f_List);
|
|
37839
|
-
var $$
|
|
37840
|
-
var
|
|
37841
|
-
var
|
|
37842
|
-
var array$1 = [$$x11, $$x10, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str($f_sc_IterableOnceOps__mkString__T__T__T__T(this$21, "/", "/", ""))];
|
|
37898
|
+
var $$x8 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName($m_Lio_kaitai_struct_format_IoIdentifier$());
|
|
37899
|
+
var this$10 = $n($n(attr).path__sci_List());
|
|
37900
|
+
var array$1 = [itemValue, $$x8, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str($f_sc_IterableOnceOps__mkString__T__T__T__T(this$10, "/", "/", ""))];
|
|
37843
37901
|
var elems$1 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1);
|
|
37844
|
-
$thiz.attrValidateExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__sci_List__V(attrId, $$
|
|
37902
|
+
$thiz.attrValidateExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__sci_List__V(attrId, $$x10, expr, $$x9, $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$1));
|
|
37845
37903
|
$thiz.blockScopeFooter__V()
|
|
37846
37904
|
} else {
|
|
37847
37905
|
throw new $c_s_MatchError(valid)
|
|
37848
37906
|
}
|
|
37849
37907
|
}
|
|
37850
37908
|
function $f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidateExprCompare__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__V($thiz, attrId, attr, op, expected, err) {
|
|
37851
|
-
var
|
|
37852
|
-
var $$
|
|
37853
|
-
var $$
|
|
37909
|
+
var itemValue = $m_Lio_kaitai_struct_format_Identifier$().itemExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__Lio_kaitai_struct_exprlang_Ast$expr(attrId, $n($n(attr).cond__Lio_kaitai_struct_format_ConditionalSpec()).Lio_kaitai_struct_format_ConditionalSpec__f_repeat);
|
|
37910
|
+
var $$x3 = $n(attr).dataType__Lio_kaitai_struct_datatype_DataType();
|
|
37911
|
+
var $$x2 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare(itemValue, op, expected);
|
|
37854
37912
|
$n($m_s_package$().s_package$__f_List);
|
|
37855
|
-
var $$x2 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(attrId);
|
|
37856
37913
|
var $$x1 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName($m_Lio_kaitai_struct_format_IoIdentifier$());
|
|
37857
|
-
var this$
|
|
37858
|
-
var array = [expected,
|
|
37914
|
+
var this$1 = $n($n(attr).path__sci_List());
|
|
37915
|
+
var array = [expected, itemValue, $$x1, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str($f_sc_IterableOnceOps__mkString__T__T__T__T(this$1, "/", "/", ""))];
|
|
37859
37916
|
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
37860
|
-
$thiz.attrValidateExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__sci_List__V(attrId, $$
|
|
37917
|
+
$thiz.attrValidateExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__sci_List__V(attrId, $$x3, $$x2, err, $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems))
|
|
37861
37918
|
}
|
|
37862
37919
|
function $is_Lio_kaitai_struct_languages_components_ValidateOps(obj) {
|
|
37863
37920
|
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.Lio_kaitai_struct_languages_components_ValidateOps)))
|
|
@@ -44219,6 +44276,9 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.idToStr__Lio_kaitai_struct
|
|
|
44219
44276
|
throw new $c_s_MatchError(id)
|
|
44220
44277
|
}
|
|
44221
44278
|
});
|
|
44279
|
+
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
44280
|
+
return ("m_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
44281
|
+
});
|
|
44222
44282
|
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_languages_components_CppImportList__Lio_kaitai_struct_datatype_DataType__Z__T = (function(config, importListHdr, attrType, absolute) {
|
|
44223
44283
|
while (true) {
|
|
44224
44284
|
var rc70 = false;
|
|
@@ -50221,7 +50281,7 @@ $c_Lio_kaitai_struct_format_YamlAttrArgs.prototype.getByteArrayType__sci_List__L
|
|
|
50221
50281
|
var x1$2 = this.Lio_kaitai_struct_format_YamlAttrArgs__f_terminator;
|
|
50222
50282
|
if ((x1$2 instanceof $c_s_Some)) {
|
|
50223
50283
|
var x2 = $as_s_Some(x1$2);
|
|
50224
|
-
var term = $
|
|
50284
|
+
var term = $as_sci_Seq($n(x2).s_Some__f_value);
|
|
50225
50285
|
return new $c_Lio_kaitai_struct_datatype_DataType$BytesTerminatedType(term, this.Lio_kaitai_struct_format_YamlAttrArgs__f_include, this.Lio_kaitai_struct_format_YamlAttrArgs__f_consume, this.Lio_kaitai_struct_format_YamlAttrArgs__f_eosError, this.Lio_kaitai_struct_format_YamlAttrArgs__f_process)
|
|
50226
50286
|
} else {
|
|
50227
50287
|
var x$5 = $m_s_None$();
|
|
@@ -50492,6 +50552,9 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.idToStr__Lio_kaitai_struc
|
|
|
50492
50552
|
throw new $c_s_MatchError(id)
|
|
50493
50553
|
}
|
|
50494
50554
|
});
|
|
50555
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
50556
|
+
return ("this." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
50557
|
+
});
|
|
50495
50558
|
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__Lio_kaitai_struct_ImportList__T = (function(attrType, isNullable, importList) {
|
|
50496
50559
|
return (isNullable ? this.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, importList) : this.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, importList))
|
|
50497
50560
|
});
|
|
@@ -50935,6 +50998,9 @@ $c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.idToStr__Lio_kaitai_struc
|
|
|
50935
50998
|
throw new $c_s_MatchError(id)
|
|
50936
50999
|
}
|
|
50937
51000
|
});
|
|
51001
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
51002
|
+
return ("@" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
51003
|
+
});
|
|
50938
51004
|
$c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
|
|
50939
51005
|
var x = $m_Lio_kaitai_struct_datatype_EndOfStreamError$();
|
|
50940
51006
|
if ((x === err)) {
|
|
@@ -62536,33 +62602,40 @@ $h_Lio_kaitai_struct_languages_CSharpCompiler$.prototype = $c_Lio_kaitai_struct_
|
|
|
62536
62602
|
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.getCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_languages_components_LanguageCompiler = (function(tp, config) {
|
|
62537
62603
|
return new $c_Lio_kaitai_struct_languages_CSharpCompiler(tp, config)
|
|
62538
62604
|
});
|
|
62539
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.
|
|
62605
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
62540
62606
|
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
62541
62607
|
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
62542
62608
|
var name = $n(x2).Lio_kaitai_struct_format_SpecialIdentifier__f_name;
|
|
62543
|
-
return
|
|
62609
|
+
return name
|
|
62544
62610
|
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
62545
62611
|
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
62546
62612
|
var name$2 = $n(x3).Lio_kaitai_struct_format_NamedIdentifier__f_name;
|
|
62547
|
-
return $m_Lio_kaitai_struct_Utils$().
|
|
62613
|
+
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$2)
|
|
62548
62614
|
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
62549
62615
|
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
62550
62616
|
var idx = $n(x4).Lio_kaitai_struct_format_NumberedIdentifier__f_idx;
|
|
62551
|
-
|
|
62552
|
-
var x = $m_Lio_kaitai_struct_format_NumberedIdentifier$().Lio_kaitai_struct_format_NumberedIdentifier$__f_TEMPLATE;
|
|
62553
|
-
return (($n($$x1).capitalize$extension__T__T(x) + "_") + idx)
|
|
62617
|
+
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().Lio_kaitai_struct_format_NumberedIdentifier$__f_TEMPLATE) + idx)
|
|
62554
62618
|
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
62555
62619
|
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
62556
62620
|
var name$3 = $n(x5).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
62557
|
-
return $m_Lio_kaitai_struct_Utils$().
|
|
62621
|
+
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$3)
|
|
62558
62622
|
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
62559
62623
|
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
62560
62624
|
var innerId = $n(x6).Lio_kaitai_struct_format_RawIdentifier__f_innerId;
|
|
62561
|
-
return ("
|
|
62625
|
+
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
62562
62626
|
} else {
|
|
62563
62627
|
throw new $c_s_MatchError(id)
|
|
62564
62628
|
}
|
|
62565
62629
|
});
|
|
62630
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
62631
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
62632
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
62633
|
+
var name = $n(x2).Lio_kaitai_struct_format_SpecialIdentifier__f_name;
|
|
62634
|
+
return ("m" + $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name))
|
|
62635
|
+
} else {
|
|
62636
|
+
return ("_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
62637
|
+
}
|
|
62638
|
+
});
|
|
62566
62639
|
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T = (function(importList, attrType) {
|
|
62567
62640
|
while (true) {
|
|
62568
62641
|
var rc72 = false;
|
|
@@ -62908,27 +62981,8 @@ $c_Lio_kaitai_struct_languages_GoCompiler$.prototype.idToStr__Lio_kaitai_struct_
|
|
|
62908
62981
|
throw new $c_s_MatchError(id)
|
|
62909
62982
|
}
|
|
62910
62983
|
});
|
|
62911
|
-
$c_Lio_kaitai_struct_languages_GoCompiler$.prototype.
|
|
62912
|
-
|
|
62913
|
-
if (x.equals__O__Z(id)) {
|
|
62914
|
-
return "_IO"
|
|
62915
|
-
} else {
|
|
62916
|
-
var x$3 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
62917
|
-
if (x$3.equals__O__Z(id)) {
|
|
62918
|
-
return "_Root"
|
|
62919
|
-
} else {
|
|
62920
|
-
var x$5 = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
62921
|
-
if (x$5.equals__O__Z(id)) {
|
|
62922
|
-
return "_Parent"
|
|
62923
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
62924
|
-
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
62925
|
-
var name = $n(x5).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
62926
|
-
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
62927
|
-
} else {
|
|
62928
|
-
return this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
62929
|
-
}
|
|
62930
|
-
}
|
|
62931
|
-
}
|
|
62984
|
+
$c_Lio_kaitai_struct_languages_GoCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
62985
|
+
return ("this." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
62932
62986
|
});
|
|
62933
62987
|
$c_Lio_kaitai_struct_languages_GoCompiler$.prototype.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T = (function(attrType) {
|
|
62934
62988
|
while (true) {
|
|
@@ -63212,14 +63266,8 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.idToStr__Lio_kaitai
|
|
|
63212
63266
|
throw new $c_s_MatchError(id)
|
|
63213
63267
|
}
|
|
63214
63268
|
});
|
|
63215
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.
|
|
63216
|
-
|
|
63217
|
-
var x2 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
63218
|
-
var name = $n(x2).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
63219
|
-
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name)
|
|
63220
|
-
} else {
|
|
63221
|
-
return this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
63222
|
-
}
|
|
63269
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
63270
|
+
return ("this." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
63223
63271
|
});
|
|
63224
63272
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
|
|
63225
63273
|
var x = $m_Lio_kaitai_struct_datatype_EndOfStreamError$();
|
|
@@ -63317,14 +63365,8 @@ $c_Lio_kaitai_struct_languages_LuaCompiler$.prototype.idToStr__Lio_kaitai_struct
|
|
|
63317
63365
|
throw new $c_s_MatchError(id)
|
|
63318
63366
|
}
|
|
63319
63367
|
});
|
|
63320
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler$.prototype.
|
|
63321
|
-
|
|
63322
|
-
var x2 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
63323
|
-
var name = $n(x2).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
63324
|
-
return name
|
|
63325
|
-
} else {
|
|
63326
|
-
return this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
63327
|
-
}
|
|
63368
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
63369
|
+
return ("self." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
63328
63370
|
});
|
|
63329
63371
|
$c_Lio_kaitai_struct_languages_LuaCompiler$.prototype.types2class__sci_List__T = (function(name) {
|
|
63330
63372
|
var this$3 = $n(name);
|
|
@@ -63798,6 +63840,24 @@ $c_Lio_kaitai_struct_languages_PHPCompiler$.prototype.idToStr__Lio_kaitai_struct
|
|
|
63798
63840
|
throw new $c_s_MatchError(id)
|
|
63799
63841
|
}
|
|
63800
63842
|
});
|
|
63843
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
63844
|
+
var x = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
63845
|
+
if (x.equals__O__Z(id)) {
|
|
63846
|
+
return "$this->_io"
|
|
63847
|
+
} else {
|
|
63848
|
+
var x$3 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
63849
|
+
if (x$3.equals__O__Z(id)) {
|
|
63850
|
+
return "$this->_root"
|
|
63851
|
+
} else {
|
|
63852
|
+
var x$5 = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
63853
|
+
if (x$5.equals__O__Z(id)) {
|
|
63854
|
+
return "$this->_parent"
|
|
63855
|
+
} else {
|
|
63856
|
+
return ("$this->_m_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
63857
|
+
}
|
|
63858
|
+
}
|
|
63859
|
+
}
|
|
63860
|
+
});
|
|
63801
63861
|
$c_Lio_kaitai_struct_languages_PHPCompiler$.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
|
|
63802
63862
|
return ("\\Kaitai\\Struct\\Error\\" + $n(err).name__T())
|
|
63803
63863
|
});
|
|
@@ -63883,6 +63943,9 @@ $c_Lio_kaitai_struct_languages_PerlCompiler$.prototype.idToStr__Lio_kaitai_struc
|
|
|
63883
63943
|
throw new $c_s_MatchError(id)
|
|
63884
63944
|
}
|
|
63885
63945
|
});
|
|
63946
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
63947
|
+
return (("$self->{" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "}")
|
|
63948
|
+
});
|
|
63886
63949
|
$c_Lio_kaitai_struct_languages_PerlCompiler$.prototype.kstreamName__T = (function() {
|
|
63887
63950
|
return "IO::KaitaiStruct::Stream"
|
|
63888
63951
|
});
|
|
@@ -63979,14 +64042,8 @@ $c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.idToStr__Lio_kaitai_str
|
|
|
63979
64042
|
throw new $c_s_MatchError(id)
|
|
63980
64043
|
}
|
|
63981
64044
|
});
|
|
63982
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.
|
|
63983
|
-
|
|
63984
|
-
var x2 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
63985
|
-
var name = $n(x2).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
63986
|
-
return name
|
|
63987
|
-
} else {
|
|
63988
|
-
return this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
63989
|
-
}
|
|
64045
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
64046
|
+
return ("self." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
63990
64047
|
});
|
|
63991
64048
|
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
|
|
63992
64049
|
var x = $m_Lio_kaitai_struct_datatype_EndOfStreamError$();
|
|
@@ -64338,8 +64395,13 @@ function $f_Lio_kaitai_struct_languages_components_GoReads__bytesPadTermExpr__Li
|
|
|
64338
64395
|
};
|
|
64339
64396
|
if ((terminator instanceof $c_s_Some)) {
|
|
64340
64397
|
var x2$2 = $as_s_Some(terminator);
|
|
64341
|
-
var term = $
|
|
64342
|
-
|
|
64398
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
64399
|
+
if (($n(term).length__I() === 1)) {
|
|
64400
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
64401
|
+
var expr2 = (((((("kaitai.BytesTerminate(" + expr1) + ", ") + t) + ", ") + include) + ")")
|
|
64402
|
+
} else {
|
|
64403
|
+
var expr2 = (((((("kaitai.BytesTerminateMulti(" + expr1) + ", ") + $n($thiz.Lio_kaitai_struct_languages_GoCompiler__f_translator).resToStr__Lio_kaitai_struct_translators_TranslatorResult__T($n($thiz.Lio_kaitai_struct_languages_GoCompiler__f_translator).doByteArrayLiteral__sci_Seq__Lio_kaitai_struct_translators_TranslatorResult(term))) + ", ") + include) + ")")
|
|
64404
|
+
}
|
|
64343
64405
|
} else {
|
|
64344
64406
|
var x$3 = $m_s_None$();
|
|
64345
64407
|
if ((!(x$3 === terminator))) {
|
|
@@ -78178,7 +78240,7 @@ var $d_Lio_kaitai_struct_datatype_DataType$BytesLimitType = new $TypeData().init
|
|
|
78178
78240
|
$c_Lio_kaitai_struct_datatype_DataType$BytesLimitType.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$BytesLimitType;
|
|
78179
78241
|
/** @constructor */
|
|
78180
78242
|
function $c_Lio_kaitai_struct_datatype_DataType$BytesTerminatedType(terminator, include, consume, eosError, process) {
|
|
78181
|
-
this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_terminator =
|
|
78243
|
+
this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_terminator = null;
|
|
78182
78244
|
this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include = false;
|
|
78183
78245
|
this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume = false;
|
|
78184
78246
|
this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError = false;
|
|
@@ -78241,7 +78303,8 @@ $c_Lio_kaitai_struct_datatype_DataType$BytesTerminatedType.prototype.hashCode__I
|
|
|
78241
78303
|
var data = $f_T__hashCode__I("BytesTerminatedType");
|
|
78242
78304
|
acc = $m_sr_Statics$().mix__I__I__I(hash, data);
|
|
78243
78305
|
var hash$1 = acc;
|
|
78244
|
-
var
|
|
78306
|
+
var x = this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_terminator;
|
|
78307
|
+
var data$1 = $m_sr_Statics$().anyHash__O__I(x);
|
|
78245
78308
|
acc = $m_sr_Statics$().mix__I__I__I(hash$1, data$1);
|
|
78246
78309
|
var hash$2 = acc;
|
|
78247
78310
|
var data$2 = (this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include ? 1231 : 1237);
|
|
@@ -78253,8 +78316,8 @@ $c_Lio_kaitai_struct_datatype_DataType$BytesTerminatedType.prototype.hashCode__I
|
|
|
78253
78316
|
var data$4 = (this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError ? 1231 : 1237);
|
|
78254
78317
|
acc = $m_sr_Statics$().mix__I__I__I(hash$4, data$4);
|
|
78255
78318
|
var hash$5 = acc;
|
|
78256
|
-
var x = this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_process;
|
|
78257
|
-
var data$5 = $m_sr_Statics$().anyHash__O__I(x);
|
|
78319
|
+
var x$1 = this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_process;
|
|
78320
|
+
var data$5 = $m_sr_Statics$().anyHash__O__I(x$1);
|
|
78258
78321
|
acc = $m_sr_Statics$().mix__I__I__I(hash$5, data$5);
|
|
78259
78322
|
var hash$6 = acc;
|
|
78260
78323
|
return $m_sr_Statics$().finalizeHash__I__I__I(hash$6, 5)
|
|
@@ -78267,11 +78330,13 @@ $c_Lio_kaitai_struct_datatype_DataType$BytesTerminatedType.prototype.equals__O__
|
|
|
78267
78330
|
return true
|
|
78268
78331
|
} else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesTerminatedType)) {
|
|
78269
78332
|
var BytesTerminatedType$1 = $as_Lio_kaitai_struct_datatype_DataType$BytesTerminatedType(x$1);
|
|
78270
|
-
if (((this.Lio_kaitai_struct_datatype_DataType$
|
|
78271
|
-
|
|
78272
|
-
|
|
78273
|
-
|
|
78274
|
-
|
|
78333
|
+
if (((this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include === $n(BytesTerminatedType$1).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include) && ((this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume === $n(BytesTerminatedType$1).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume) && (this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError === $n(BytesTerminatedType$1).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError)))) {
|
|
78334
|
+
var x = this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_terminator;
|
|
78335
|
+
var x$2 = $n(BytesTerminatedType$1).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_terminator;
|
|
78336
|
+
if (((x === null) ? (x$2 === null) : $n(x).equals__O__Z(x$2))) {
|
|
78337
|
+
var x$3 = this.Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_process;
|
|
78338
|
+
var x$4 = $n(BytesTerminatedType$1).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_process;
|
|
78339
|
+
if (((x$3 === null) ? (x$4 === null) : $n(x$3).equals__O__Z(x$4))) {
|
|
78275
78340
|
$n(BytesTerminatedType$1);
|
|
78276
78341
|
return true
|
|
78277
78342
|
} else {
|
|
@@ -83548,21 +83613,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.trLocalName__T__Lio_kait
|
|
|
83548
83613
|
}
|
|
83549
83614
|
});
|
|
83550
83615
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trInternalName__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult = (function(id) {
|
|
83551
|
-
|
|
83552
|
-
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
83553
|
-
var name = $n(x2).Lio_kaitai_struct_format_SpecialIdentifier__f_name;
|
|
83554
|
-
return this.trLocalName__T__Lio_kaitai_struct_translators_TranslatorResult(name)
|
|
83555
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
83556
|
-
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
83557
|
-
var name$2 = $n(x3).Lio_kaitai_struct_format_NamedIdentifier__f_name;
|
|
83558
|
-
return this.trLocalName__T__Lio_kaitai_struct_translators_TranslatorResult(name$2)
|
|
83559
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
83560
|
-
var x4 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
83561
|
-
var name$3 = $n(x4).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
83562
|
-
return this.trLocalName__T__Lio_kaitai_struct_translators_TranslatorResult(name$3)
|
|
83563
|
-
} else {
|
|
83564
|
-
return new $c_Lio_kaitai_struct_translators_ResultString(("this." + $m_Lio_kaitai_struct_languages_GoCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id)))
|
|
83565
|
-
}
|
|
83616
|
+
return new $c_Lio_kaitai_struct_translators_ResultString($m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
83566
83617
|
});
|
|
83567
83618
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.specialName__T__T = (function(id) {
|
|
83568
83619
|
if ((($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ROOT === id) || (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_PARENT === id) || ($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_IO === id)))) {
|
|
@@ -85527,7 +85578,7 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doName__T__T = (func
|
|
|
85527
85578
|
}
|
|
85528
85579
|
});
|
|
85529
85580
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
85530
|
-
return
|
|
85581
|
+
return $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
85531
85582
|
});
|
|
85532
85583
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
85533
85584
|
return ((this.enumClass__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + ".") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(label))
|
|
@@ -85790,7 +85841,7 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doName__T__T = (
|
|
|
85790
85841
|
}
|
|
85791
85842
|
});
|
|
85792
85843
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
85793
|
-
return
|
|
85844
|
+
return $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
85794
85845
|
});
|
|
85795
85846
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
85796
85847
|
var isExternal = $n(enumSpec).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass);
|
|
@@ -86023,8 +86074,7 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doName__T__T = (functi
|
|
|
86023
86074
|
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_SWITCH_ON === s) ? "on" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX === s) ? "i" : ($m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(s) + "()")))))
|
|
86024
86075
|
});
|
|
86025
86076
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
86026
|
-
|
|
86027
|
-
return (this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id) + "()")
|
|
86077
|
+
return $m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
86028
86078
|
});
|
|
86029
86079
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
86030
86080
|
var $$x1 = this.enumClass__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name);
|
|
@@ -86670,8 +86720,7 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doName__T__T = (functi
|
|
|
86670
86720
|
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_ITERATOR2 === s) ? "$_buf" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX === s) ? "$i" : (s + "()"))))
|
|
86671
86721
|
});
|
|
86672
86722
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
86673
|
-
|
|
86674
|
-
return (("$self->" + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "()")
|
|
86723
|
+
return $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
86675
86724
|
});
|
|
86676
86725
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
86677
86726
|
var isExternal = $n(enumSpec).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass);
|
|
@@ -87009,7 +87058,7 @@ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doName__T__T = (func
|
|
|
87009
87058
|
return s
|
|
87010
87059
|
});
|
|
87011
87060
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
87012
|
-
return
|
|
87061
|
+
return $m_Lio_kaitai_struct_languages_PythonCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
87013
87062
|
});
|
|
87014
87063
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
87015
87064
|
var isExternal = $n(enumSpec).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass);
|
|
@@ -87247,8 +87296,7 @@ $c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doName__T__T = (functi
|
|
|
87247
87296
|
return (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX === s) ? "i" : s)
|
|
87248
87297
|
});
|
|
87249
87298
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
87250
|
-
|
|
87251
|
-
return this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
87299
|
+
return $m_Lio_kaitai_struct_languages_RubyCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
87252
87300
|
});
|
|
87253
87301
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
87254
87302
|
return $m_Lio_kaitai_struct_languages_RubyCompiler$().enumValue__T__T__T($as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).last__O()), label)
|
|
@@ -88488,8 +88536,7 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doName__T__T = (functio
|
|
|
88488
88536
|
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_ITERATOR2 === s) ? "_buf" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX === s) ? "i" : (s + "()"))))
|
|
88489
88537
|
});
|
|
88490
88538
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
88491
|
-
|
|
88492
|
-
return (this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id) + "()")
|
|
88539
|
+
return $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
88493
88540
|
});
|
|
88494
88541
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
88495
88542
|
var isExternal = $n(enumSpec).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass);
|
|
@@ -88806,7 +88853,7 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doName__T__T = (functio
|
|
|
88806
88853
|
return s
|
|
88807
88854
|
});
|
|
88808
88855
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
88809
|
-
return
|
|
88856
|
+
return $m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
88810
88857
|
});
|
|
88811
88858
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
88812
88859
|
return (($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + ".") + label)
|
|
@@ -89142,8 +89189,7 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doName__T__T = (functio
|
|
|
89142
89189
|
return ($m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(s) + "()")
|
|
89143
89190
|
});
|
|
89144
89191
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
89145
|
-
|
|
89146
|
-
return (("$this->" + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "()")
|
|
89192
|
+
return $m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
89147
89193
|
});
|
|
89148
89194
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
89149
89195
|
var enumClass = this.types2classAbs__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name);
|
|
@@ -90295,7 +90341,8 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.extraAttrForIO__Lio_kaitai_
|
|
|
90295
90341
|
return $f_Lio_kaitai_struct_languages_components_AllocateAndStoreIO__extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List(this, id, rep)
|
|
90296
90342
|
});
|
|
90297
90343
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.normalIO__T = (function() {
|
|
90298
|
-
|
|
90344
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
90345
|
+
return $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
90299
90346
|
});
|
|
90300
90347
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$ = (function() {
|
|
90301
90348
|
if ((this.Lio_kaitai_struct_languages_CppCompiler__f_PrivateAccess$module === null)) {
|
|
@@ -90637,7 +90684,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.readFooter__V = (function()
|
|
|
90637
90684
|
});
|
|
90638
90685
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
90639
90686
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$());
|
|
90640
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, false) + " ") +
|
|
90687
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, false) + " ") + $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
90641
90688
|
this.declareNullFlag__Lio_kaitai_struct_format_Identifier__Z__V(attrName, isNullable)
|
|
90642
90689
|
});
|
|
90643
90690
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V = (function(newMode) {
|
|
@@ -90682,10 +90729,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.ensureMode__Lio_kaitai_stru
|
|
|
90682
90729
|
});
|
|
90683
90730
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
90684
90731
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PublicAccess__Lio_kaitai_struct_languages_CppCompiler$PublicAccess$());
|
|
90685
|
-
|
|
90686
|
-
var $$x1 = this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T($n(attrType).asNonOwning__Z__Lio_kaitai_struct_datatype_DataType($n(attrType).asNonOwning$default$1__Z()), false);
|
|
90687
|
-
var this$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
90688
|
-
$n($$x2).puts__T__V(((((($$x1 + " ") + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "() const { return ") + this.nonOwningPointer__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T(attrName, attrType)) + "; }"))
|
|
90732
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T($n(attrType).asNonOwning__Z__Lio_kaitai_struct_datatype_DataType($n(attrType).asNonOwning$default$1__Z()), false) + " ") + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "() const { return ") + this.nonOwningPointer__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T(attrName, attrType)) + "; }"))
|
|
90689
90733
|
});
|
|
90690
90734
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.universalDoc__Lio_kaitai_struct_format_DocSpec__V = (function(doc) {
|
|
90691
90735
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PublicAccess__Lio_kaitai_struct_languages_CppCompiler$PublicAccess$());
|
|
@@ -90731,7 +90775,9 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrInit__Lio_kaitai_struct
|
|
|
90731
90775
|
var $$x1 = (x === x1)
|
|
90732
90776
|
};
|
|
90733
90777
|
if ($$x1) {
|
|
90734
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc)
|
|
90778
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc);
|
|
90779
|
+
var id = $n(attr).id__Lio_kaitai_struct_format_Identifier();
|
|
90780
|
+
$n($$x2).puts__T__V(((($m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.nullPtr__T()) + ";"))
|
|
90735
90781
|
}
|
|
90736
90782
|
});
|
|
90737
90783
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrDestructor__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_format_Identifier__V = (function(attr, id) {
|
|
@@ -90795,7 +90841,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.destructMember__Lio_kaitai_
|
|
|
90795
90841
|
if ((!$$x1)) {
|
|
90796
90842
|
return (void 0)
|
|
90797
90843
|
};
|
|
90798
|
-
var ptr =
|
|
90844
|
+
var ptr = $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
90799
90845
|
var innerNeedsDestruct = this.needsDestruction__Lio_kaitai_struct_datatype_DataType__Z(innerType);
|
|
90800
90846
|
if (((!isArray) && (!innerNeedsDestruct))) {
|
|
90801
90847
|
return (void 0)
|
|
@@ -90925,7 +90971,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
90925
90971
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, varDest, expr$2, rep, false)
|
|
90926
90972
|
});
|
|
90927
90973
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(id, rep) {
|
|
90928
|
-
|
|
90974
|
+
$m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
90929
90975
|
var ioId = new $c_Lio_kaitai_struct_format_IoStorageIdentifier(id);
|
|
90930
90976
|
var args = ((rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil) ? $n(this.Lio_kaitai_struct_languages_CppCompiler__f_translator).doName__T__T($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2) : this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(id, rep));
|
|
90931
90977
|
var newStreamRaw = (("new kaitai::kstream(" + args) + ")");
|
|
@@ -90944,17 +90990,17 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.allocateIO__Lio_kaitai_stru
|
|
|
90944
90990
|
} else {
|
|
90945
90991
|
var newStream = newStreamRaw
|
|
90946
90992
|
};
|
|
90947
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((
|
|
90993
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V(((($m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(ioId) + " = ") + newStream) + ";"));
|
|
90948
90994
|
var x1$3 = $n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
90949
90995
|
var x$5 = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
90950
90996
|
if ((x$5 === x1$3)) {
|
|
90951
|
-
var ioName =
|
|
90997
|
+
var ioName = $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(ioId)
|
|
90952
90998
|
} else {
|
|
90953
90999
|
var x$7 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
90954
91000
|
if ((!(x$7 === x1$3))) {
|
|
90955
91001
|
throw new $c_s_MatchError(x1$3)
|
|
90956
91002
|
};
|
|
90957
|
-
var ioName = (
|
|
91003
|
+
var ioName = ($m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(ioId) + ".get()")
|
|
90958
91004
|
}
|
|
90959
91005
|
} else {
|
|
90960
91006
|
var localIO = ("io_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
@@ -90968,16 +91014,16 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.allocateIO__Lio_kaitai_stru
|
|
|
90968
91014
|
var $$x2 = false
|
|
90969
91015
|
};
|
|
90970
91016
|
if ($$x2) {
|
|
90971
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((
|
|
91017
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V(((($m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(ioId) + "->emplace_back(") + localIO) + ");"))
|
|
90972
91018
|
} else {
|
|
90973
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((
|
|
91019
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V(((($m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(ioId) + "->push_back(") + localIO) + ");"))
|
|
90974
91020
|
};
|
|
90975
91021
|
var ioName = localIO
|
|
90976
91022
|
};
|
|
90977
91023
|
return ioName
|
|
90978
91024
|
});
|
|
90979
91025
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
90980
|
-
var memberName =
|
|
91026
|
+
var memberName = $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
90981
91027
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
90982
91028
|
if ((x === rep)) {
|
|
90983
91029
|
return memberName
|
|
@@ -91023,7 +91069,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condIfFooter__Lio_kaitai_st
|
|
|
91023
91069
|
});
|
|
91024
91070
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
91025
91071
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListHdr).addSystem__T__V("vector");
|
|
91026
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((
|
|
91072
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V(((($m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"))
|
|
91027
91073
|
});
|
|
91028
91074
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
91029
91075
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V("{");
|
|
@@ -91033,7 +91079,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatEosHeader__Lio_ka
|
|
|
91033
91079
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).inc__V()
|
|
91034
91080
|
});
|
|
91035
91081
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
91036
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((
|
|
91082
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V(((($m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "->push_back(") + this.stdMoveWrap__T__T(expr)) + ");"))
|
|
91037
91083
|
});
|
|
91038
91084
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatEosFooter__V = (function() {
|
|
91039
91085
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V("i++;");
|
|
@@ -91110,7 +91156,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentRepeatUntil
|
|
|
91110
91156
|
var wrappedTempVar = $as_T(x1$3___1);
|
|
91111
91157
|
var rawPtrExpr = $as_T(x1$3___2);
|
|
91112
91158
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V(((((("" + typeDecl) + tempVar) + " = ") + rawPtrExpr) + ";"));
|
|
91113
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((
|
|
91159
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V(((($m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "->push_back(") + wrappedTempVar) + ");"))
|
|
91114
91160
|
});
|
|
91115
91161
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
91116
91162
|
$n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
@@ -91121,7 +91167,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatUntilFooter__Lio_
|
|
|
91121
91167
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V("}")
|
|
91122
91168
|
});
|
|
91123
91169
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
91124
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((
|
|
91170
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V(((($m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr) + ";"))
|
|
91125
91171
|
});
|
|
91126
91172
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
91127
91173
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(dataType, false) + " ") + id) + " = ") + expr) + ";"))
|
|
@@ -91150,7 +91196,12 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
91150
91196
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
91151
91197
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
91152
91198
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
91153
|
-
|
|
91199
|
+
if (($n(terminator).length__I() === 1)) {
|
|
91200
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
91201
|
+
return (((((((((io + "->read_bytes_term(") + term) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
91202
|
+
} else {
|
|
91203
|
+
return (((((((((io + "->read_bytes_term_multi(") + $n(this.Lio_kaitai_struct_languages_CppCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(terminator)) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
91204
|
+
}
|
|
91154
91205
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
91155
91206
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
91156
91207
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -91212,7 +91263,8 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
91212
91263
|
};
|
|
91213
91264
|
var addEndian = ""
|
|
91214
91265
|
};
|
|
91215
|
-
var
|
|
91266
|
+
var id = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
91267
|
+
var addArgs = ((((", " + parent) + ", ") + $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + addEndian)
|
|
91216
91268
|
};
|
|
91217
91269
|
var x1$4 = $n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
91218
91270
|
var x$7 = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
@@ -91259,8 +91311,13 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.bytesPadTermExpr__T__s_Opti
|
|
|
91259
91311
|
};
|
|
91260
91312
|
if ((terminator instanceof $c_s_Some)) {
|
|
91261
91313
|
var x2$2 = $as_s_Some(terminator);
|
|
91262
|
-
var term = $
|
|
91263
|
-
|
|
91314
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
91315
|
+
if (($n(term).length__I() === 1)) {
|
|
91316
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
91317
|
+
var expr2 = (((((("kaitai::kstream::bytes_terminate(" + expr1) + ", ") + t) + ", ") + include) + ")")
|
|
91318
|
+
} else {
|
|
91319
|
+
var expr2 = (((((("kaitai::kstream::bytes_terminate_multi(" + expr1) + ", ") + $n(this.Lio_kaitai_struct_languages_CppCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", ") + include) + ")")
|
|
91320
|
+
}
|
|
91264
91321
|
} else {
|
|
91265
91322
|
var x$3 = $m_s_None$();
|
|
91266
91323
|
if ((!(x$3 === terminator))) {
|
|
@@ -91331,22 +91388,15 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.switchBytesOnlyAsRaw__Z = (
|
|
|
91331
91388
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
91332
91389
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$());
|
|
91333
91390
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((("bool " + this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
91334
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, false) + " ") +
|
|
91391
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, false) + " ") + $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
91335
91392
|
this.declareNullFlag__Lio_kaitai_struct_format_Identifier__Z__V(attrName, isNullable)
|
|
91336
91393
|
});
|
|
91337
91394
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
91338
91395
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PublicAccess__Lio_kaitai_struct_languages_CppCompiler$PublicAccess$());
|
|
91339
|
-
|
|
91340
|
-
var
|
|
91341
|
-
|
|
91342
|
-
$n(
|
|
91343
|
-
var this$2 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc);
|
|
91344
|
-
$n(this$2.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
91345
|
-
var $$x5 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc);
|
|
91346
|
-
var $$x4 = this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T($n(dataType).asNonOwning__Z__Lio_kaitai_struct_datatype_DataType($n(dataType).asNonOwning$default$1__Z()), true);
|
|
91347
|
-
var $$x3 = $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(className);
|
|
91348
|
-
var this$3 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
91349
|
-
$n($$x5).puts__T__V(((((($$x4 + " ") + $$x3) + "::") + this$3.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "() {"));
|
|
91396
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T($n(dataType).asNonOwning__Z__Lio_kaitai_struct_datatype_DataType($n(dataType).asNonOwning$default$1__Z()), false) + " ") + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "();"));
|
|
91397
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc);
|
|
91398
|
+
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
91399
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T($n(dataType).asNonOwning__Z__Lio_kaitai_struct_datatype_DataType($n(dataType).asNonOwning$default$1__Z()), true) + " ") + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(className)) + "::") + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "() {"));
|
|
91350
91400
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).inc__V()
|
|
91351
91401
|
});
|
|
91352
91402
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceFooter__V = (function() {
|
|
@@ -91475,7 +91525,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.nullFlagForName__Lio_kaitai
|
|
|
91475
91525
|
return ("n_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(ksName))
|
|
91476
91526
|
});
|
|
91477
91527
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
91478
|
-
return
|
|
91528
|
+
return $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
91479
91529
|
});
|
|
91480
91530
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
91481
91531
|
return ("_t_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
@@ -91487,10 +91537,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.declareNullFlag__Lio_kaitai
|
|
|
91487
91537
|
if (isNullable) {
|
|
91488
91538
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((("bool " + this.nullFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
91489
91539
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PublicAccess__Lio_kaitai_struct_languages_CppCompiler$PublicAccess$());
|
|
91490
|
-
|
|
91491
|
-
var $$x1 = $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName);
|
|
91492
|
-
var this$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
91493
|
-
$n($$x2).puts__T__V((((((("bool _is_null_" + $$x1) + "() { ") + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "(); return ") + this.nullFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; };"));
|
|
91540
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((((((("bool _is_null_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "() { ") + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "(); return ") + this.nullFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; };"));
|
|
91494
91541
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$())
|
|
91495
91542
|
}
|
|
91496
91543
|
});
|
|
@@ -91518,7 +91565,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.nonOwningPointer__Lio_kaita
|
|
|
91518
91565
|
var x1 = $n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
91519
91566
|
var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
91520
91567
|
if ((x === x1)) {
|
|
91521
|
-
return
|
|
91568
|
+
return $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)
|
|
91522
91569
|
} else {
|
|
91523
91570
|
var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
91524
91571
|
if ((x$3 === x1)) {
|
|
@@ -91527,9 +91574,9 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.nonOwningPointer__Lio_kaita
|
|
|
91527
91574
|
return this.nonOwningPointer__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T(attrName, $m_Lio_kaitai_struct_languages_CppCompiler$().combineSwitchType__Lio_kaitai_struct_datatype_DataType$SwitchType__Lio_kaitai_struct_datatype_DataType(x2))
|
|
91528
91575
|
} else if ((attrType instanceof $c_Lio_kaitai_struct_datatype_DataType$ComplexDataType)) {
|
|
91529
91576
|
var x3 = $as_Lio_kaitai_struct_datatype_DataType$ComplexDataType(attrType);
|
|
91530
|
-
return ($n(x3).isOwning__Z() ? (
|
|
91577
|
+
return ($n(x3).isOwning__Z() ? ($m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName) + ".get()") : $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName))
|
|
91531
91578
|
} else {
|
|
91532
|
-
return
|
|
91579
|
+
return $m_Lio_kaitai_struct_languages_CppCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)
|
|
91533
91580
|
}
|
|
91534
91581
|
} else {
|
|
91535
91582
|
throw new $c_s_MatchError(x1)
|
|
@@ -92206,7 +92253,8 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceFooter__V = (functio
|
|
|
92206
92253
|
this.universalFooter__V()
|
|
92207
92254
|
});
|
|
92208
92255
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.normalIO__T = (function() {
|
|
92209
|
-
|
|
92256
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
92257
|
+
return $m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
92210
92258
|
});
|
|
92211
92259
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.type2class__T__T = (function(name) {
|
|
92212
92260
|
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
@@ -92388,7 +92436,9 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.runRead__sci_List__V = (func
|
|
|
92388
92436
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.runReadCalc__V = (function() {
|
|
92389
92437
|
var this$1 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_out);
|
|
92390
92438
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
92391
|
-
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out)
|
|
92439
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_out);
|
|
92440
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
92441
|
+
$n($$x1).puts__T__V((("switch " + $m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + " {"));
|
|
92392
92442
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V("case 0:");
|
|
92393
92443
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).inc__V();
|
|
92394
92444
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V("err = this._read_be()");
|
|
@@ -92414,9 +92464,15 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.readHeader__s_Option__Z__V =
|
|
|
92414
92464
|
var this$2 = $n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass);
|
|
92415
92465
|
$n($$x3).puts__T__V((((((("func (this *" + $$x2) + ") Read(io *kaitai.Stream, ") + ("parent " + $n($$x1).kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T($n(this$2.Lio_kaitai_struct_format_ClassSpec__f_parentClass).toDataType__Lio_kaitai_struct_datatype_DataType()))) + ", ") + ("root *" + $m_Lio_kaitai_struct_languages_GoCompiler$().types2class__sci_List__T($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_topClass).Lio_kaitai_struct_format_ClassSpec__f_name))) + ") (err error) {"));
|
|
92416
92466
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).inc__V();
|
|
92417
|
-
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out)
|
|
92418
|
-
|
|
92419
|
-
$n(
|
|
92467
|
+
var $$x4 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_out);
|
|
92468
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
92469
|
+
$n($$x4).puts__T__V(($m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = io"));
|
|
92470
|
+
var $$x5 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_out);
|
|
92471
|
+
var id$1 = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
92472
|
+
$n($$x5).puts__T__V(($m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$1) + " = parent"));
|
|
92473
|
+
var $$x6 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_out);
|
|
92474
|
+
var id$2 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
92475
|
+
$n($$x6).puts__T__V(($m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$2) + " = root"));
|
|
92420
92476
|
var rc9 = false;
|
|
92421
92477
|
var x2 = null;
|
|
92422
92478
|
var x1$2 = $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;
|
|
@@ -92425,7 +92481,9 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.readHeader__s_Option__Z__V =
|
|
|
92425
92481
|
rc9 = true;
|
|
92426
92482
|
x2 = $as_s_Some(x1$2);
|
|
92427
92483
|
if (($n(x2).s_Some__f_value instanceof $c_Lio_kaitai_struct_datatype_CalcEndian)) {
|
|
92428
|
-
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out)
|
|
92484
|
+
var $$x7 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_out);
|
|
92485
|
+
var id$3 = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
92486
|
+
$n($$x7).puts__T__V(($m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$3) + " = -1"));
|
|
92429
92487
|
break matchEnd10
|
|
92430
92488
|
}
|
|
92431
92489
|
};
|
|
@@ -92433,11 +92491,13 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.readHeader__s_Option__Z__V =
|
|
|
92433
92491
|
var p6 = $as_Lio_kaitai_struct_datatype_Endianness($n(x2).s_Some__f_value);
|
|
92434
92492
|
var x$3 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
|
|
92435
92493
|
if ((x$3 === p6)) {
|
|
92436
|
-
var $$
|
|
92437
|
-
var
|
|
92438
|
-
var $$
|
|
92439
|
-
var id = $
|
|
92440
|
-
|
|
92494
|
+
var $$x10 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_out);
|
|
92495
|
+
var id$4 = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
92496
|
+
var $$x9 = $m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$4);
|
|
92497
|
+
var id$5 = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
92498
|
+
var $$x8 = $m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$5);
|
|
92499
|
+
var id$6 = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
92500
|
+
$n($$x10).puts__T__V(((((($$x9 + " = ") + $$x8) + ".") + "") + $m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id$6)));
|
|
92441
92501
|
break matchEnd10
|
|
92442
92502
|
}
|
|
92443
92503
|
}
|
|
@@ -92496,7 +92556,9 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.universalDoc__Lio_kaitai_str
|
|
|
92496
92556
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V(" */")
|
|
92497
92557
|
});
|
|
92498
92558
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
|
|
92499
|
-
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out)
|
|
92559
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_out);
|
|
92560
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
92561
|
+
$n($$x1).puts__T__V((("switch " + $m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + " {"));
|
|
92500
92562
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V("case 0:");
|
|
92501
92563
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).inc__V();
|
|
92502
92564
|
var this$1 = $n(beProc);
|
|
@@ -92548,7 +92610,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrProcess__Lio_kaitai_stru
|
|
|
92548
92610
|
$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(this, varDest, expr$1, rep, false)
|
|
92549
92611
|
});
|
|
92550
92612
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
92551
|
-
|
|
92613
|
+
$m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
92552
92614
|
var id = new $c_Lio_kaitai_struct_format_IoStorageIdentifier(varName);
|
|
92553
92615
|
var ioName = $m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id);
|
|
92554
92616
|
var args = ((rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil) ? $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).specialName__T__T($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2) : this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(varName, rep));
|
|
@@ -92558,7 +92620,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.allocateIO__Lio_kaitai_struc
|
|
|
92558
92620
|
return ioName
|
|
92559
92621
|
});
|
|
92560
92622
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
92561
|
-
var memberName =
|
|
92623
|
+
var memberName = $m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
92562
92624
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
92563
92625
|
if ((x === rep)) {
|
|
92564
92626
|
return memberName
|
|
@@ -92597,7 +92659,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatInitAttr__Lio_kait
|
|
|
92597
92659
|
/*<skip>*/
|
|
92598
92660
|
});
|
|
92599
92661
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
92600
|
-
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V("for i :=
|
|
92662
|
+
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V("for i := 0;; i++ {");
|
|
92601
92663
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).inc__V();
|
|
92602
92664
|
var eofVar = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).allocateLocalVar__I();
|
|
92603
92665
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V(($n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).localVarName__I__T(eofVar) + ", err := this._io.EOF()"));
|
|
@@ -92609,7 +92671,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatEosHeader__Lio_kai
|
|
|
92609
92671
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V("}")
|
|
92610
92672
|
});
|
|
92611
92673
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__V = (function(id, r) {
|
|
92612
|
-
var name =
|
|
92674
|
+
var name = $m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
92613
92675
|
var expr = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(r);
|
|
92614
92676
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((((((name + " = append(") + name) + ", ") + expr) + ")"))
|
|
92615
92677
|
});
|
|
@@ -92626,7 +92688,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.handleAssignmentRepeatUntil_
|
|
|
92626
92688
|
var expr = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(r);
|
|
92627
92689
|
var tempVar = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).specialName__T__T((isRaw ? $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2 : $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR));
|
|
92628
92690
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V(((tempVar + " := ") + expr));
|
|
92629
|
-
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((((((
|
|
92691
|
+
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V(((((($m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = append(") + $m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + ", ") + tempVar) + ")"))
|
|
92630
92692
|
});
|
|
92631
92693
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
92632
92694
|
$n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
@@ -92640,7 +92702,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatUntilFooter__Lio_k
|
|
|
92640
92702
|
});
|
|
92641
92703
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__V = (function(id, r) {
|
|
92642
92704
|
var expr = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).resToStr__Lio_kaitai_struct_translators_TranslatorResult__T($p_Lio_kaitai_struct_languages_GoCompiler__handleCompositeTypeCast__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__Lio_kaitai_struct_translators_TranslatorResult(this, id, r));
|
|
92643
|
-
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V(((
|
|
92705
|
+
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((($m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr))
|
|
92644
92706
|
});
|
|
92645
92707
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
92646
92708
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V(((id + " := ") + expr))
|
|
@@ -92668,7 +92730,12 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.parseExpr__Lio_kaitai_struct
|
|
|
92668
92730
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
92669
92731
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
92670
92732
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
92671
|
-
|
|
92733
|
+
if (($n(terminator).length__I() === 1)) {
|
|
92734
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
92735
|
+
return (((((((((io + ".ReadBytesTerm(") + term) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
92736
|
+
} else {
|
|
92737
|
+
return (((((((((io + ".ReadBytesTermMulti(") + $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).resToStr__Lio_kaitai_struct_translators_TranslatorResult__T($n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).doByteArrayLiteral__sci_Seq__Lio_kaitai_struct_translators_TranslatorResult(terminator))) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
92738
|
+
}
|
|
92672
92739
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
92673
92740
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
92674
92741
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -92750,7 +92817,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceDeclaration__Lio_kai
|
|
|
92750
92817
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((($m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName) + " ") + $m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(attrType)))
|
|
92751
92818
|
});
|
|
92752
92819
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
92753
|
-
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((((((("func (this *" + $m_Lio_kaitai_struct_languages_GoCompiler$().types2class__sci_List__T(className)) + ") ") +
|
|
92820
|
+
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((((((("func (this *" + $m_Lio_kaitai_struct_languages_GoCompiler$().types2class__sci_List__T(className)) + ") ") + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + "() (v ") + $m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ", err error) {"));
|
|
92754
92821
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).inc__V();
|
|
92755
92822
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).Lio_kaitai_struct_translators_GoTranslator__f_returnRes = new $c_s_Some(((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType) ? "0" : ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BooleanType) ? "false" : ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType) ? "\"\"" : "nil"))))
|
|
92756
92823
|
});
|
|
@@ -92758,7 +92825,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceCalculate__Lio_kaita
|
|
|
92758
92825
|
var this$1 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator);
|
|
92759
92826
|
var r = this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0);
|
|
92760
92827
|
var converted = ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType) ? r : ((($m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType) + "(") + r) + ")"));
|
|
92761
|
-
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V(((
|
|
92828
|
+
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((($m_Lio_kaitai_struct_languages_GoCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName) + " = ") + converted))
|
|
92762
92829
|
});
|
|
92763
92830
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
92764
92831
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((("if (this." + this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(instName)) + ") {"));
|
|
@@ -92767,7 +92834,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceCheckCacheAndReturn_
|
|
|
92767
92834
|
this.universalFooter__V()
|
|
92768
92835
|
});
|
|
92769
92836
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
|
|
92770
|
-
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((("return " +
|
|
92837
|
+
$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"))
|
|
92771
92838
|
});
|
|
92772
92839
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceSetCalculated__Lio_kaitai_struct_format_InstanceIdentifier__V = (function(instName) {
|
|
92773
92840
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((("this." + this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(instName)) + " = true"))
|
|
@@ -92812,8 +92879,27 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.classToString__Lio_kaitai_st
|
|
|
92812
92879
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).dec__V();
|
|
92813
92880
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V("}")
|
|
92814
92881
|
});
|
|
92815
|
-
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.
|
|
92816
|
-
|
|
92882
|
+
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
92883
|
+
var x = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
92884
|
+
if (x.equals__O__Z(id)) {
|
|
92885
|
+
return "_IO"
|
|
92886
|
+
} else {
|
|
92887
|
+
var x$3 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
92888
|
+
if (x$3.equals__O__Z(id)) {
|
|
92889
|
+
return "_Root"
|
|
92890
|
+
} else {
|
|
92891
|
+
var x$5 = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
92892
|
+
if (x$5.equals__O__Z(id)) {
|
|
92893
|
+
return "_Parent"
|
|
92894
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
92895
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
92896
|
+
var name = $n(x5).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
92897
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
92898
|
+
} else {
|
|
92899
|
+
return $m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
92900
|
+
}
|
|
92901
|
+
}
|
|
92902
|
+
}
|
|
92817
92903
|
});
|
|
92818
92904
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
92819
92905
|
return ("_f_" + $m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
@@ -92959,7 +93045,8 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.type2class__T__T = (
|
|
|
92959
93045
|
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
92960
93046
|
});
|
|
92961
93047
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.normalIO__T = (function() {
|
|
92962
|
-
|
|
93048
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
93049
|
+
return $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
92963
93050
|
});
|
|
92964
93051
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
92965
93052
|
return this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_outHeader
|
|
@@ -93359,14 +93446,14 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrProcess__Lio_kai
|
|
|
93359
93446
|
});
|
|
93360
93447
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
93361
93448
|
var langName = $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
93362
|
-
|
|
93449
|
+
$m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
93363
93450
|
var ioName = ("_io_" + langName);
|
|
93364
93451
|
var args = this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(varName, rep);
|
|
93365
93452
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((((("var " + ioName) + " = new KaitaiStream(") + args) + ");"));
|
|
93366
93453
|
return ioName
|
|
93367
93454
|
});
|
|
93368
93455
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
93369
|
-
var memberName =
|
|
93456
|
+
var memberName = $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
93370
93457
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
93371
93458
|
if ((x === rep)) {
|
|
93372
93459
|
return memberName
|
|
@@ -93427,7 +93514,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condIfFooter__Lio_ka
|
|
|
93427
93514
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("}")
|
|
93428
93515
|
});
|
|
93429
93516
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
93430
|
-
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((
|
|
93517
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V(($m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"))
|
|
93431
93518
|
});
|
|
93432
93519
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
93433
93520
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("var i = 0;");
|
|
@@ -93435,7 +93522,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatEosHeader_
|
|
|
93435
93522
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V()
|
|
93436
93523
|
});
|
|
93437
93524
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
93438
|
-
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((((
|
|
93525
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".push(") + expr) + ");"))
|
|
93439
93526
|
});
|
|
93440
93527
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatEosFooter__V = (function() {
|
|
93441
93528
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("i++;");
|
|
@@ -93461,7 +93548,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatUntilHeade
|
|
|
93461
93548
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__T__Z__V = (function(id, expr, isRaw) {
|
|
93462
93549
|
var tmpName = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator).doName__T__T((isRaw ? $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2 : $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR));
|
|
93463
93550
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((((("var " + tmpName) + " = ") + expr) + ";"));
|
|
93464
|
-
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((((
|
|
93551
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".push(") + tmpName) + ");"))
|
|
93465
93552
|
});
|
|
93466
93553
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
93467
93554
|
$n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
@@ -93470,7 +93557,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatUntilFoote
|
|
|
93470
93557
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
|
|
93471
93558
|
});
|
|
93472
93559
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
93473
|
-
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((((
|
|
93560
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr) + ";"))
|
|
93474
93561
|
});
|
|
93475
93562
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
93476
93563
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((((("var " + id) + " = ") + expr) + ";"))
|
|
@@ -93491,7 +93578,12 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.parseExpr__Lio_kaita
|
|
|
93491
93578
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
93492
93579
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
93493
93580
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
93494
|
-
|
|
93581
|
+
if (($n(terminator).length__I() === 1)) {
|
|
93582
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
93583
|
+
return (((((((((io + ".readBytesTerm(") + term) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
93584
|
+
} else {
|
|
93585
|
+
return (((((((((io + ".readBytesTermMulti(") + $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(terminator)) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
93586
|
+
}
|
|
93495
93587
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
93496
93588
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
93497
93589
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -93578,8 +93670,13 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.bytesPadTermExpr__T_
|
|
|
93578
93670
|
};
|
|
93579
93671
|
if ((terminator instanceof $c_s_Some)) {
|
|
93580
93672
|
var x2$2 = $as_s_Some(terminator);
|
|
93581
|
-
var term = $
|
|
93582
|
-
|
|
93673
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
93674
|
+
if (($n(term).length__I() === 1)) {
|
|
93675
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
93676
|
+
var expr2 = (((((("KaitaiStream.bytesTerminate(" + expr1) + ", ") + t) + ", ") + include) + ")")
|
|
93677
|
+
} else {
|
|
93678
|
+
var expr2 = (((((("KaitaiStream.bytesTerminateMulti(" + expr1) + ", ") + $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", ") + include) + ")")
|
|
93679
|
+
}
|
|
93583
93680
|
} else {
|
|
93584
93681
|
var x$3 = $m_s_None$();
|
|
93585
93682
|
if ((!(x$3 === terminator))) {
|
|
@@ -93644,11 +93741,9 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchIfEnd__V = (fu
|
|
|
93644
93741
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("}")
|
|
93645
93742
|
});
|
|
93646
93743
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
93647
|
-
var $$
|
|
93744
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out);
|
|
93648
93745
|
var name = $as_T($n(className).last__O());
|
|
93649
|
-
|
|
93650
|
-
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
93651
|
-
$n($$x2).puts__T__V((((("Object.defineProperty(" + $$x1) + ".prototype, '") + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "', {"));
|
|
93746
|
+
$n($$x1).puts__T__V((((("Object.defineProperty(" + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + ".prototype, '") + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + "', {"));
|
|
93652
93747
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V();
|
|
93653
93748
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("get: function() {");
|
|
93654
93749
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V()
|
|
@@ -93660,13 +93755,13 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceFooter__V =
|
|
|
93660
93755
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("});")
|
|
93661
93756
|
});
|
|
93662
93757
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
93663
|
-
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((("if (" +
|
|
93758
|
+
$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)"));
|
|
93664
93759
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V();
|
|
93665
93760
|
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V(instName, dataType);
|
|
93666
93761
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).dec__V()
|
|
93667
93762
|
});
|
|
93668
93763
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
|
|
93669
|
-
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((("return " +
|
|
93764
|
+
$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)) + ";"))
|
|
93670
93765
|
});
|
|
93671
93766
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.enumDeclaration__sci_List__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
93672
93767
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out);
|
|
@@ -93735,8 +93830,17 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classToString__Lio_k
|
|
|
93735
93830
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).dec__V();
|
|
93736
93831
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("}")
|
|
93737
93832
|
});
|
|
93833
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
93834
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
93835
|
+
var x2 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
93836
|
+
var name = $n(x2).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
93837
|
+
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name)
|
|
93838
|
+
} else {
|
|
93839
|
+
return $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
93840
|
+
}
|
|
93841
|
+
});
|
|
93738
93842
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
93739
|
-
return
|
|
93843
|
+
return $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
93740
93844
|
});
|
|
93741
93845
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
93742
93846
|
return ("_t_" + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
@@ -93793,7 +93897,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrDebugName__Lio_k
|
|
|
93793
93897
|
if ((!((x$3 === rep) || (rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil)))) {
|
|
93794
93898
|
throw new $c_s_MatchError(rep)
|
|
93795
93899
|
};
|
|
93796
|
-
var arrIndexExpr = ((((".arr[" +
|
|
93900
|
+
var arrIndexExpr = ((((".arr[" + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrId)) + ".length") + (end ? " - 1" : "")) + "]")
|
|
93797
93901
|
};
|
|
93798
93902
|
return (("this._debug." + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrId)) + arrIndexExpr)
|
|
93799
93903
|
});
|
|
@@ -93897,7 +94001,8 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.type2class__T__T = (functio
|
|
|
93897
94001
|
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
93898
94002
|
});
|
|
93899
94003
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.normalIO__T = (function() {
|
|
93900
|
-
|
|
94004
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
94005
|
+
return $m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
93901
94006
|
});
|
|
93902
94007
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
93903
94008
|
return this.Lio_kaitai_struct_languages_PHPCompiler__f_outHeader
|
|
@@ -94133,9 +94238,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attributeReader__Lio_kaitai
|
|
|
94133
94238
|
var $$x1 = x$3.equals__O__Z(attrName)
|
|
94134
94239
|
};
|
|
94135
94240
|
if ((!$$x1)) {
|
|
94136
|
-
|
|
94137
|
-
var this$1 = $m_Lio_kaitai_struct_languages_PHPCompiler$();
|
|
94138
|
-
$n($$x2).puts__T__V((((("public function " + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "() { return ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; }"))
|
|
94241
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((("public function " + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "() { return ") + $m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; }"))
|
|
94139
94242
|
}
|
|
94140
94243
|
});
|
|
94141
94244
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.universalDoc__Lio_kaitai_struct_format_DocSpec__V = (function(doc) {
|
|
@@ -94235,14 +94338,14 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
94235
94338
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, varDest, expr$2, rep, false)
|
|
94236
94339
|
});
|
|
94237
94340
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(id, rep) {
|
|
94238
|
-
|
|
94341
|
+
$m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
94239
94342
|
var ioName = ("$_io_" + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
94240
94343
|
var args = ((rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil) ? $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator).doLocalName__T__T($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2) : this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(id, rep));
|
|
94241
94344
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((ioName + " = new \\Kaitai\\Struct\\Stream(") + args) + ");"));
|
|
94242
94345
|
return ioName
|
|
94243
94346
|
});
|
|
94244
94347
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
94245
|
-
var memberName =
|
|
94348
|
+
var memberName = $m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
94246
94349
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
94247
94350
|
if ((x === rep)) {
|
|
94248
94351
|
return memberName
|
|
@@ -94271,7 +94374,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condIfHeader__Lio_kaitai_st
|
|
|
94271
94374
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V()
|
|
94272
94375
|
});
|
|
94273
94376
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
94274
|
-
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((
|
|
94377
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V(($m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"))
|
|
94275
94378
|
});
|
|
94276
94379
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
94277
94380
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V("$i = 0;");
|
|
@@ -94279,7 +94382,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatEosHeader__Lio_ka
|
|
|
94279
94382
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V()
|
|
94280
94383
|
});
|
|
94281
94384
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
94282
|
-
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((
|
|
94385
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[] = ") + expr) + ";"))
|
|
94283
94386
|
});
|
|
94284
94387
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatEosFooter__V = (function() {
|
|
94285
94388
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V("$i++;");
|
|
@@ -94301,7 +94404,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatUntilHeader__Lio_
|
|
|
94301
94404
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__T__Z__V = (function(id, expr, isRaw) {
|
|
94302
94405
|
var tmpName = $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator).doLocalName__T__T((isRaw ? $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2 : $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR));
|
|
94303
94406
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((tmpName + " = ") + expr) + ";"));
|
|
94304
|
-
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((
|
|
94407
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[] = ") + tmpName) + ";"))
|
|
94305
94408
|
});
|
|
94306
94409
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
94307
94410
|
$n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
@@ -94310,7 +94413,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatUntilFooter__Lio_
|
|
|
94310
94413
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
|
|
94311
94414
|
});
|
|
94312
94415
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
94313
|
-
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((
|
|
94416
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr) + ";"))
|
|
94314
94417
|
});
|
|
94315
94418
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
94316
94419
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((id + " = ") + expr) + ";"))
|
|
@@ -94331,7 +94434,12 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
94331
94434
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
94332
94435
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
94333
94436
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
94334
|
-
|
|
94437
|
+
if (($n(terminator).length__I() === 1)) {
|
|
94438
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
94439
|
+
return (((((((((io + "->readBytesTerm(") + term) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
94440
|
+
} else {
|
|
94441
|
+
return (((((((((io + "->readBytesTermMulti(") + $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(terminator)) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
94442
|
+
}
|
|
94335
94443
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
94336
94444
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
94337
94445
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -94387,13 +94495,15 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
94387
94495
|
var p3$2 = $as_Lio_kaitai_struct_datatype_Endianness($n(x2$3).s_Some__f_value);
|
|
94388
94496
|
var x$5 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
|
|
94389
94497
|
if ((x$5 === p3$2)) {
|
|
94390
|
-
var
|
|
94498
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
94499
|
+
var addEndian = (", " + $m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id));
|
|
94391
94500
|
break matchEnd6
|
|
94392
94501
|
}
|
|
94393
94502
|
};
|
|
94394
94503
|
var addEndian = ""
|
|
94395
94504
|
};
|
|
94396
|
-
var
|
|
94505
|
+
var id$1 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
94506
|
+
var addArgs = ((((", " + parent) + ", ") + $m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$1)) + addEndian)
|
|
94397
94507
|
};
|
|
94398
94508
|
return (((((("new " + $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator).types2classAbs__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) + io) + addArgs) + ")")
|
|
94399
94509
|
} else {
|
|
@@ -94414,8 +94524,13 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.bytesPadTermExpr__T__s_Opti
|
|
|
94414
94524
|
};
|
|
94415
94525
|
if ((terminator instanceof $c_s_Some)) {
|
|
94416
94526
|
var x2$2 = $as_s_Some(terminator);
|
|
94417
|
-
var term = $
|
|
94418
|
-
|
|
94527
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
94528
|
+
if (($n(term).length__I() === 1)) {
|
|
94529
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
94530
|
+
var expr2 = (((((("\\Kaitai\\Struct\\Stream::bytesTerminate(" + expr1) + ", ") + t) + ", ") + include) + ")")
|
|
94531
|
+
} else {
|
|
94532
|
+
var expr2 = (((((("\\Kaitai\\Struct\\Stream::bytesTerminateMulti(" + expr1) + ", ") + $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", ") + include) + ")")
|
|
94533
|
+
}
|
|
94419
94534
|
} else {
|
|
94420
94535
|
var x$3 = $m_s_None$();
|
|
94421
94536
|
if ((!(x$3 === terminator))) {
|
|
@@ -94453,13 +94568,13 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceHeader__sci_List__L
|
|
|
94453
94568
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V()
|
|
94454
94569
|
});
|
|
94455
94570
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
94456
|
-
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((("if (" +
|
|
94571
|
+
$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)"));
|
|
94457
94572
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V();
|
|
94458
94573
|
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V(instName, dataType);
|
|
94459
94574
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).dec__V()
|
|
94460
94575
|
});
|
|
94461
94576
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
|
|
94462
|
-
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((("return " +
|
|
94577
|
+
$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)) + ";"))
|
|
94463
94578
|
});
|
|
94464
94579
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.enumDeclaration__sci_List__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
94465
94580
|
$n($m_s_package$().s_package$__f_List);
|
|
@@ -94502,22 +94617,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.classToString__Lio_kaitai_s
|
|
|
94502
94617
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V("}")
|
|
94503
94618
|
});
|
|
94504
94619
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
94505
|
-
|
|
94506
|
-
if (x.equals__O__Z(id)) {
|
|
94507
|
-
return "$this->_io"
|
|
94508
|
-
} else {
|
|
94509
|
-
var x$3 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
94510
|
-
if (x$3.equals__O__Z(id)) {
|
|
94511
|
-
return "$this->_root"
|
|
94512
|
-
} else {
|
|
94513
|
-
var x$5 = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
94514
|
-
if (x$5.equals__O__Z(id)) {
|
|
94515
|
-
return "$this->_parent"
|
|
94516
|
-
} else {
|
|
94517
|
-
return ("$this->_m_" + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
94518
|
-
}
|
|
94519
|
-
}
|
|
94520
|
-
}
|
|
94620
|
+
return $m_Lio_kaitai_struct_languages_PHPCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
94521
94621
|
});
|
|
94522
94622
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
94523
94623
|
return ("$_t_" + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
@@ -94684,7 +94784,8 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.attrDebugEnd__Lio_kaitai_s
|
|
|
94684
94784
|
/*<skip>*/
|
|
94685
94785
|
});
|
|
94686
94786
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.normalIO__T = (function() {
|
|
94687
|
-
|
|
94787
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
94788
|
+
return $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
94688
94789
|
});
|
|
94689
94790
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchCases__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__sci_Map__F1__F1__V = (function(id, on, cases, normalCaseProc, elseCaseProc) {
|
|
94690
94791
|
$f_Lio_kaitai_struct_languages_components_SwitchIfOps__switchCases__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__sci_Map__F1__F1__V(this, id, on, cases, normalCaseProc, elseCaseProc)
|
|
@@ -94844,7 +94945,8 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.runRead__sci_List__V = (fu
|
|
|
94844
94945
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("$self->_read();")
|
|
94845
94946
|
});
|
|
94846
94947
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.runReadCalc__V = (function() {
|
|
94847
|
-
var
|
|
94948
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
94949
|
+
var isLe = $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
94848
94950
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((("if (!(defined " + isLe) + ")) {"));
|
|
94849
94951
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V();
|
|
94850
94952
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("die \"Unable to decide on endianness\";");
|
|
@@ -94896,17 +94998,17 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.attributeReader__Lio_kaita
|
|
|
94896
94998
|
if ((!$$x1)) {
|
|
94897
94999
|
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
94898
95000
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
94899
|
-
|
|
94900
|
-
var this$2 = $m_Lio_kaitai_struct_languages_PerlCompiler$();
|
|
94901
|
-
$n($$x2).puts__T__V((("sub " + this$2.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + " {"));
|
|
95001
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((("sub " + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + " {"));
|
|
94902
95002
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V();
|
|
94903
95003
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("my ($self) = @_;");
|
|
94904
|
-
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((("return " +
|
|
95004
|
+
$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(attrName)) + ";"));
|
|
94905
95005
|
this.universalFooter__V()
|
|
94906
95006
|
}
|
|
94907
95007
|
});
|
|
94908
95008
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
|
|
94909
|
-
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out)
|
|
95009
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
95010
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
95011
|
+
$n($$x1).puts__T__V((("if (" + $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + ") {"));
|
|
94910
95012
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V();
|
|
94911
95013
|
var this$1 = $n(leProc);
|
|
94912
95014
|
this$1.apply__O();
|
|
@@ -94953,14 +95055,14 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.attrProcess__Lio_kaitai_st
|
|
|
94953
95055
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, varDest, expr$2, rep, false)
|
|
94954
95056
|
});
|
|
94955
95057
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(id, rep) {
|
|
94956
|
-
|
|
95058
|
+
$m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
94957
95059
|
var args = ((rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil) ? $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doName__T__T($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2) : this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(id, rep));
|
|
94958
95060
|
var ioName = ("$io_" + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
94959
95061
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((((((("my " + ioName) + " = ") + $m_Lio_kaitai_struct_languages_PerlCompiler$().kstreamName__T()) + "->new(") + args) + ");"));
|
|
94960
95062
|
return ioName
|
|
94961
95063
|
});
|
|
94962
95064
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
94963
|
-
var memberName =
|
|
95065
|
+
var memberName = $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
94964
95066
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
94965
95067
|
if ((x === rep)) {
|
|
94966
95068
|
return memberName
|
|
@@ -94989,14 +95091,14 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condIfHeader__Lio_kaitai_s
|
|
|
94989
95091
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V()
|
|
94990
95092
|
});
|
|
94991
95093
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
94992
|
-
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((
|
|
95094
|
+
$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) + " = [];"))
|
|
94993
95095
|
});
|
|
94994
95096
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
94995
95097
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((("while (!" + io) + "->is_eof()) {"));
|
|
94996
95098
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V()
|
|
94997
95099
|
});
|
|
94998
95100
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
94999
|
-
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((((("push @{" +
|
|
95101
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((((("push @{" + $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + "}, ") + expr) + ";"))
|
|
95000
95102
|
});
|
|
95001
95103
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
95002
95104
|
var nVar = ("$n_" + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
@@ -95024,7 +95126,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatUnti
|
|
|
95024
95126
|
var decl = $as_T(x1___1);
|
|
95025
95127
|
var tmpName = $as_T(x1___2);
|
|
95026
95128
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V(((((("" + decl) + tmpName) + " = ") + expr) + ";"));
|
|
95027
|
-
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((((("push @{" +
|
|
95129
|
+
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((((("push @{" + $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + "}, ") + tmpName) + ";"))
|
|
95028
95130
|
});
|
|
95029
95131
|
$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) {
|
|
95030
95132
|
$n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
@@ -95032,7 +95134,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatUntilFooter__Lio
|
|
|
95032
95134
|
$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)) + ");"))
|
|
95033
95135
|
});
|
|
95034
95136
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
95035
|
-
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((((
|
|
95137
|
+
$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) + ";"))
|
|
95036
95138
|
});
|
|
95037
95139
|
$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) {
|
|
95038
95140
|
if ($is_Lio_kaitai_struct_datatype_DataType$ReadableType(dataType)) {
|
|
@@ -95050,7 +95152,12 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
95050
95152
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
95051
95153
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
95052
95154
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
95053
|
-
|
|
95155
|
+
if (($n(terminator).length__I() === 1)) {
|
|
95156
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
95157
|
+
return (((((((((io + "->read_bytes_term(") + term) + ", ") + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doBoolLiteral__Z__T(include)) + ", ") + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doBoolLiteral__Z__T(consume)) + ", ") + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doBoolLiteral__Z__T(eosError)) + ")")
|
|
95158
|
+
} else {
|
|
95159
|
+
return (((((((((io + "->read_bytes_term_multi(") + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(terminator)) + ", ") + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doBoolLiteral__Z__T(include)) + ", ") + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doBoolLiteral__Z__T(consume)) + ", ") + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doBoolLiteral__Z__T(eosError)) + ")")
|
|
95160
|
+
}
|
|
95054
95161
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
95055
95162
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
95056
95163
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -95086,13 +95193,15 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
95086
95193
|
var p3 = $as_Lio_kaitai_struct_datatype_Endianness($n(x2$3).s_Some__f_value);
|
|
95087
95194
|
var x$3 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
|
|
95088
95195
|
if ((x$3 === p3)) {
|
|
95089
|
-
var
|
|
95196
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
95197
|
+
var addEndian = (", " + $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id));
|
|
95090
95198
|
break matchEnd6
|
|
95091
95199
|
}
|
|
95092
95200
|
};
|
|
95093
95201
|
var addEndian = ""
|
|
95094
95202
|
};
|
|
95095
|
-
var
|
|
95203
|
+
var id$1 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
95204
|
+
var addArgs = ((((", " + parent) + ", ") + $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$1)) + addEndian)
|
|
95096
95205
|
};
|
|
95097
95206
|
return (((($m_Lio_kaitai_struct_languages_PerlCompiler$().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) + "->new(") + io) + addArgs) + ")")
|
|
95098
95207
|
} else {
|
|
@@ -95113,8 +95222,13 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.bytesPadTermExpr__T__s_Opt
|
|
|
95113
95222
|
};
|
|
95114
95223
|
if ((terminator instanceof $c_s_Some)) {
|
|
95115
95224
|
var x2$2 = $as_s_Some(terminator);
|
|
95116
|
-
var term = $
|
|
95117
|
-
|
|
95225
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
95226
|
+
if (($n(term).length__I() === 1)) {
|
|
95227
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
95228
|
+
var expr2 = ((((((($m_Lio_kaitai_struct_languages_PerlCompiler$().kstreamName__T() + "::bytes_terminate(") + expr1) + ", ") + t) + ", ") + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doBoolLiteral__Z__T(include)) + ")")
|
|
95229
|
+
} else {
|
|
95230
|
+
var expr2 = ((((((($m_Lio_kaitai_struct_languages_PerlCompiler$().kstreamName__T() + "::bytes_terminate_multi(") + expr1) + ", ") + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", ") + $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator).doBoolLiteral__Z__T(include)) + ")")
|
|
95231
|
+
}
|
|
95118
95232
|
} else {
|
|
95119
95233
|
var x$3 = $m_s_None$();
|
|
95120
95234
|
if ((!(x$3 === terminator))) {
|
|
@@ -95179,10 +95293,10 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceHeader__sci_List__
|
|
|
95179
95293
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("my ($self) = @_;")
|
|
95180
95294
|
});
|
|
95181
95295
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
95182
|
-
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((((("return " +
|
|
95296
|
+
$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)) + ");"))
|
|
95183
95297
|
});
|
|
95184
95298
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
|
|
95185
|
-
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V((("return " +
|
|
95299
|
+
$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)) + ";"))
|
|
95186
95300
|
});
|
|
95187
95301
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumDeclaration__sci_List__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
95188
95302
|
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
@@ -95222,7 +95336,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classToString__Lio_kaitai_
|
|
|
95222
95336
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("}")
|
|
95223
95337
|
});
|
|
95224
95338
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
95225
|
-
return
|
|
95339
|
+
return $m_Lio_kaitai_struct_languages_PerlCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
95226
95340
|
});
|
|
95227
95341
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
95228
95342
|
return ("$_t_" + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
@@ -95693,7 +95807,8 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
95693
95807
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
95694
95808
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
95695
95809
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
95696
|
-
|
|
95810
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
95811
|
+
return (((((((((io + ".read_bytes_term(") + term) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")?")
|
|
95697
95812
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
95698
95813
|
return (io + ".read_bits_int(1)? != 0")
|
|
95699
95814
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType)) {
|
|
@@ -95773,8 +95888,9 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.bytesPadTermExpr__T__s_Opt
|
|
|
95773
95888
|
};
|
|
95774
95889
|
if ((terminator instanceof $c_s_Some)) {
|
|
95775
95890
|
var x2$2 = $as_s_Some(terminator);
|
|
95776
|
-
var term = $
|
|
95777
|
-
var
|
|
95891
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
95892
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
95893
|
+
var expr2 = (((((("&mut S::bytesTerminate(" + expr1) + ", ") + t) + ", ") + include) + ")")
|
|
95778
95894
|
} else {
|
|
95779
95895
|
var x$3 = $m_s_None$();
|
|
95780
95896
|
if ((!(x$3 === terminator))) {
|
|
@@ -96608,7 +96724,8 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.results__Lio_kaitai_stru
|
|
|
96608
96724
|
return $f_Lio_kaitai_struct_languages_components_SingleOutputFile__results__Lio_kaitai_struct_format_ClassSpec__sci_Map(this, topClass)
|
|
96609
96725
|
});
|
|
96610
96726
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.normalIO__T = (function() {
|
|
96611
|
-
|
|
96727
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
96728
|
+
return $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
96612
96729
|
});
|
|
96613
96730
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.type2class__T__T = (function(name) {
|
|
96614
96731
|
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
@@ -96721,13 +96838,15 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorHeader__
|
|
|
96721
96838
|
var $$x1 = false
|
|
96722
96839
|
};
|
|
96723
96840
|
if ($$x1) {
|
|
96724
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out)
|
|
96841
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96842
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
96843
|
+
$n($$x2).puts__T__V((("private bool? " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + ";"))
|
|
96725
96844
|
};
|
|
96726
96845
|
var addEndian = (isHybrid ? ", bool? isLe = null" : "");
|
|
96727
96846
|
var pIo = this.paramName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_IoIdentifier$());
|
|
96728
96847
|
var pParent = this.paramName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_ParentIdentifier$());
|
|
96729
96848
|
var pRoot = this.paramName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_RootIdentifier$());
|
|
96730
|
-
var $$
|
|
96849
|
+
var $$x4 = $m_Lio_kaitai_struct_Utils$();
|
|
96731
96850
|
var this$2 = $n(params);
|
|
96732
96851
|
var f = ((p$2) => {
|
|
96733
96852
|
var p = $as_Lio_kaitai_struct_format_ParamDefSpec(p$2);
|
|
@@ -96735,7 +96854,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorHeader__
|
|
|
96735
96854
|
return (($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, attrType) + " ") + this.paramName__Lio_kaitai_struct_format_Identifier__T($n(p).Lio_kaitai_struct_format_ParamDefSpec__f_id))
|
|
96736
96855
|
});
|
|
96737
96856
|
if ((this$2 === $m_sci_Nil$())) {
|
|
96738
|
-
var $$
|
|
96857
|
+
var $$x3 = $m_sci_Nil$()
|
|
96739
96858
|
} else {
|
|
96740
96859
|
var arg1 = this$2.head__O();
|
|
96741
96860
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
@@ -96748,9 +96867,9 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorHeader__
|
|
|
96748
96867
|
t = nx;
|
|
96749
96868
|
rest = $as_sci_List($n(rest).tail__O())
|
|
96750
96869
|
};
|
|
96751
|
-
var $$
|
|
96870
|
+
var $$x3 = h
|
|
96752
96871
|
};
|
|
96753
|
-
var paramsArg = $n($$
|
|
96872
|
+
var paramsArg = $n($$x4).join__sc_IterableOnce__T__T__T__T($$x3, "", ", ", ", ");
|
|
96754
96873
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((((((("public " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + "(") + paramsArg) + ("KaitaiStream " + pIo)) + ", ") + (($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, parentType) + " ") + pParent)) + " = null, ") + (((((($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(rootClassName) + " ") + pRoot) + " = null") + addEndian) + ") : base(") + pIo)) + ")"));
|
|
96755
96874
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
96756
96875
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
@@ -96777,15 +96896,19 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.runRead__sci_List__V = (
|
|
|
96777
96896
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.runReadCalc__V = (function() {
|
|
96778
96897
|
var this$1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96779
96898
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
96780
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((("if (" + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_EndianIdentifier$())) + " == null) {"));
|
|
96781
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
96782
96899
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96900
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
96901
|
+
$n($$x1).puts__T__V((("if (" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + " == null) {"));
|
|
96902
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
96903
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96783
96904
|
var err = $m_Lio_kaitai_struct_datatype_UndecidedEndiannessError$();
|
|
96784
|
-
$n($$
|
|
96905
|
+
$n($$x2).puts__T__V((("throw new " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().ksErrorName__Lio_kaitai_struct_datatype_KSError__T(err)) + "();"));
|
|
96785
96906
|
var this$2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList);
|
|
96786
96907
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, "System");
|
|
96787
96908
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).dec__V();
|
|
96788
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out)
|
|
96909
|
+
var $$x3 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96910
|
+
var id$1 = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
96911
|
+
$n($$x3).puts__T__V((("} else if (" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$1)) + " == true) {"));
|
|
96789
96912
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
96790
96913
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("_readLE();");
|
|
96791
96914
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).dec__V();
|
|
@@ -96819,10 +96942,10 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readFooter__V = (functio
|
|
|
96819
96942
|
this.fileFooter__T__V("")
|
|
96820
96943
|
});
|
|
96821
96944
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
96822
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") +
|
|
96945
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
96823
96946
|
});
|
|
96824
96947
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
96825
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") +
|
|
96948
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + " { get { return ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; } }"))
|
|
96826
96949
|
});
|
|
96827
96950
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.universalDoc__Lio_kaitai_struct_format_DocSpec__V = (function(doc) {
|
|
96828
96951
|
var this$1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
@@ -96858,7 +96981,9 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.universalDoc__Lio_kaitai
|
|
|
96858
96981
|
}
|
|
96859
96982
|
});
|
|
96860
96983
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
|
|
96861
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out)
|
|
96984
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96985
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
96986
|
+
$n($$x1).puts__T__V((("if (" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + " == true) {"));
|
|
96862
96987
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
96863
96988
|
var this$1 = $n(leProc);
|
|
96864
96989
|
this$1.apply__O();
|
|
@@ -96875,17 +97000,20 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attrProcess__Lio_kaitai_
|
|
|
96875
97000
|
if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessXor)) {
|
|
96876
97001
|
var x2 = $as_Lio_kaitai_struct_format_ProcessXor(proc);
|
|
96877
97002
|
var xorValue = $n(x2).Lio_kaitai_struct_format_ProcessXor__f_key;
|
|
96878
|
-
var
|
|
97003
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
97004
|
+
var expr$2 = ((((($m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".ProcessXor(") + srcExpr) + ", ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, xorValue)) + ")")
|
|
96879
97005
|
} else {
|
|
96880
97006
|
var x = $m_Lio_kaitai_struct_format_ProcessZlib$();
|
|
96881
97007
|
if ((x === proc)) {
|
|
96882
|
-
var
|
|
97008
|
+
var id$1 = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
97009
|
+
var expr$2 = ((($m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$1) + ".ProcessZlib(") + srcExpr) + ")")
|
|
96883
97010
|
} else if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessRotate)) {
|
|
96884
97011
|
var x4 = $as_Lio_kaitai_struct_format_ProcessRotate(proc);
|
|
96885
97012
|
var isLeft = $n(x4).Lio_kaitai_struct_format_ProcessRotate__f_left;
|
|
96886
97013
|
var rotValue = $n(x4).Lio_kaitai_struct_format_ProcessRotate__f_key;
|
|
96887
97014
|
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)) + ")"));
|
|
96888
|
-
var
|
|
97015
|
+
var id$2 = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
97016
|
+
var expr$2 = ((((($m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$2) + ".ProcessRotateLeft(") + srcExpr) + ", ") + expr) + ", 1)")
|
|
96889
97017
|
} else {
|
|
96890
97018
|
if ((!(proc instanceof $c_Lio_kaitai_struct_format_ProcessCustom))) {
|
|
96891
97019
|
throw new $c_s_MatchError(proc)
|
|
@@ -96894,7 +97022,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attrProcess__Lio_kaitai_
|
|
|
96894
97022
|
var name = $n(x5).Lio_kaitai_struct_format_ProcessCustom__f_name;
|
|
96895
97023
|
var args = $n(x5).Lio_kaitai_struct_format_ProcessCustom__f_args;
|
|
96896
97024
|
var procClass = $m_Lio_kaitai_struct_languages_CSharpCompiler$().types2class__sc_Iterable__T(name);
|
|
96897
|
-
var procName = ("_process_" +
|
|
97025
|
+
var procName = ("_process_" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varSrc));
|
|
96898
97026
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96899
97027
|
var this$2 = $n($as_sc_IterableOnceOps($n(args).map__F1__O(new $c_sjsr_AnonFunction1(((e$2) => {
|
|
96900
97028
|
var e = $as_Lio_kaitai_struct_exprlang_Ast$expr(e$2);
|
|
@@ -96907,14 +97035,14 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attrProcess__Lio_kaitai_
|
|
|
96907
97035
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, varDest, expr$2, rep, false)
|
|
96908
97036
|
});
|
|
96909
97037
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
96910
|
-
var privateVarName =
|
|
97038
|
+
var privateVarName = $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
96911
97039
|
var ioName = ("io_" + privateVarName);
|
|
96912
97040
|
var args = ((rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil) ? $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_translator).doName__T__T($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2) : this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(varName, rep));
|
|
96913
97041
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("var " + ioName) + " = new KaitaiStream(") + args) + ");"));
|
|
96914
97042
|
return ioName
|
|
96915
97043
|
});
|
|
96916
97044
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
96917
|
-
var memberName =
|
|
97045
|
+
var memberName = $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
96918
97046
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
96919
97047
|
if ((x === rep)) {
|
|
96920
97048
|
return memberName
|
|
@@ -96955,7 +97083,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatInitAttr__Lio_
|
|
|
96955
97083
|
var this$1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList);
|
|
96956
97084
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "System.Collections.Generic");
|
|
96957
97085
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96958
|
-
var $$x1 =
|
|
97086
|
+
var $$x1 = $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
96959
97087
|
var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream(dataType);
|
|
96960
97088
|
$n($$x2).puts__T__V(((($$x1 + " = new ") + $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, attrType)) + "();"))
|
|
96961
97089
|
});
|
|
@@ -96967,7 +97095,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatEosHeader__Lio
|
|
|
96967
97095
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V()
|
|
96968
97096
|
});
|
|
96969
97097
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
96970
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((
|
|
97098
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".Add(") + expr) + ");"))
|
|
96971
97099
|
});
|
|
96972
97100
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatEosFooter__V = (function() {
|
|
96973
97101
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("i++;");
|
|
@@ -97008,7 +97136,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentRepeatUn
|
|
|
97008
97136
|
var typeDecl = $as_T(x1___1);
|
|
97009
97137
|
var tempVar = $as_T(x1___2);
|
|
97010
97138
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((("" + typeDecl) + tempVar) + " = ") + expr) + ";"));
|
|
97011
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((
|
|
97139
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".Add(") + tempVar) + ");"))
|
|
97012
97140
|
});
|
|
97013
97141
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
97014
97142
|
$n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
@@ -97019,7 +97147,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilFooter__L
|
|
|
97019
97147
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("}")
|
|
97020
97148
|
});
|
|
97021
97149
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
97022
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((
|
|
97150
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr) + ";"))
|
|
97023
97151
|
});
|
|
97024
97152
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
97025
97153
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((($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) + " = ") + expr) + ";"))
|
|
@@ -97048,7 +97176,12 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.parseExpr__Lio_kaitai_st
|
|
|
97048
97176
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
97049
97177
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
97050
97178
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
97051
|
-
|
|
97179
|
+
if (($n(terminator).length__I() === 1)) {
|
|
97180
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
97181
|
+
return (((((((((io + ".ReadBytesTerm(") + term) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
97182
|
+
} else {
|
|
97183
|
+
return (((((((((io + ".ReadBytesTermMulti(") + $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(terminator)) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
97184
|
+
}
|
|
97052
97185
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
97053
97186
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
97054
97187
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -97104,13 +97237,15 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.parseExpr__Lio_kaitai_st
|
|
|
97104
97237
|
var p3$2 = $as_Lio_kaitai_struct_datatype_Endianness($n(x2$3).s_Some__f_value);
|
|
97105
97238
|
var x$5 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
|
|
97106
97239
|
if ((x$5 === p3$2)) {
|
|
97107
|
-
var
|
|
97240
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
97241
|
+
var addEndian = (", " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id));
|
|
97108
97242
|
break matchEnd6
|
|
97109
97243
|
}
|
|
97110
97244
|
};
|
|
97111
97245
|
var addEndian = ""
|
|
97112
97246
|
};
|
|
97113
|
-
var
|
|
97247
|
+
var id$1 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
97248
|
+
var addArgs = ((((", " + parent) + ", ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id$1)) + addEndian)
|
|
97114
97249
|
};
|
|
97115
97250
|
return (((((("new " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().types2class__sc_Iterable__T($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name)) + "(") + addParams) + io) + addArgs) + ")")
|
|
97116
97251
|
} else {
|
|
@@ -97131,8 +97266,13 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.bytesPadTermExpr__T__s_O
|
|
|
97131
97266
|
};
|
|
97132
97267
|
if ((terminator instanceof $c_s_Some)) {
|
|
97133
97268
|
var x2$2 = $as_s_Some(terminator);
|
|
97134
|
-
var term = $
|
|
97135
|
-
|
|
97269
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
97270
|
+
if (($n(term).length__I() === 1)) {
|
|
97271
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
97272
|
+
var expr2 = (((((("KaitaiStream.BytesTerminate(" + expr1) + ", ") + t) + ", ") + include) + ")")
|
|
97273
|
+
} else {
|
|
97274
|
+
var expr2 = (((((("KaitaiStream.BytesTerminateMulti(" + expr1) + ", ") + $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", ") + include) + ")")
|
|
97275
|
+
}
|
|
97136
97276
|
} else {
|
|
97137
97277
|
var x$3 = $m_s_None$();
|
|
97138
97278
|
if ((!(x$3 === terminator))) {
|
|
@@ -97208,10 +97348,10 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchIfEnd__V = (functi
|
|
|
97208
97348
|
});
|
|
97209
97349
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
97210
97350
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((("private bool " + this.flagForInstName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
97211
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") +
|
|
97351
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
97212
97352
|
});
|
|
97213
97353
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
97214
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType, isNullable)) + " ") +
|
|
97354
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType, isNullable)) + " ") + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)));
|
|
97215
97355
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
97216
97356
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
97217
97357
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("get");
|
|
@@ -97231,13 +97371,13 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceCheckCacheAndRet
|
|
|
97231
97371
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).dec__V()
|
|
97232
97372
|
});
|
|
97233
97373
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
|
|
97234
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((("return " +
|
|
97374
|
+
$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)) + ";"))
|
|
97235
97375
|
});
|
|
97236
97376
|
$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) {
|
|
97237
97377
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(instName, (((("(" + $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)) + ") (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, value)) + ")"))
|
|
97238
97378
|
});
|
|
97239
97379
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.flagForInstName__Lio_kaitai_struct_format_Identifier__T = (function(ksName) {
|
|
97240
|
-
return ("f_" +
|
|
97380
|
+
return ("f_" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(ksName))
|
|
97241
97381
|
});
|
|
97242
97382
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.enumDeclaration__T__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
97243
97383
|
var enumClass = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(enumName);
|
|
@@ -97279,45 +97419,41 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classToString__Lio_kaita
|
|
|
97279
97419
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).dec__V();
|
|
97280
97420
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("}")
|
|
97281
97421
|
});
|
|
97282
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.
|
|
97422
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
97283
97423
|
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
97284
97424
|
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
97285
97425
|
var name = $n(x2).Lio_kaitai_struct_format_SpecialIdentifier__f_name;
|
|
97286
|
-
return name
|
|
97426
|
+
return ("M" + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name))
|
|
97287
97427
|
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
97288
97428
|
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
97289
97429
|
var name$2 = $n(x3).Lio_kaitai_struct_format_NamedIdentifier__f_name;
|
|
97290
|
-
return $m_Lio_kaitai_struct_Utils$().
|
|
97430
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$2)
|
|
97291
97431
|
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
97292
97432
|
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
97293
97433
|
var idx = $n(x4).Lio_kaitai_struct_format_NumberedIdentifier__f_idx;
|
|
97294
|
-
|
|
97434
|
+
var $$x1 = $m_sc_StringOps$();
|
|
97435
|
+
var x = $m_Lio_kaitai_struct_format_NumberedIdentifier$().Lio_kaitai_struct_format_NumberedIdentifier$__f_TEMPLATE;
|
|
97436
|
+
return (($n($$x1).capitalize$extension__T__T(x) + "_") + idx)
|
|
97295
97437
|
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
97296
97438
|
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
97297
97439
|
var name$3 = $n(x5).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
97298
|
-
return $m_Lio_kaitai_struct_Utils$().
|
|
97440
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$3)
|
|
97299
97441
|
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
97300
97442
|
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
97301
97443
|
var innerId = $n(x6).Lio_kaitai_struct_format_RawIdentifier__f_innerId;
|
|
97302
|
-
return ("
|
|
97444
|
+
return ("M_Raw" + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
97303
97445
|
} else {
|
|
97304
97446
|
throw new $c_s_MatchError(id)
|
|
97305
97447
|
}
|
|
97306
97448
|
});
|
|
97307
97449
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
97308
|
-
|
|
97309
|
-
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
97310
|
-
var name = $n(x2).Lio_kaitai_struct_format_SpecialIdentifier__f_name;
|
|
97311
|
-
return ("m" + $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name))
|
|
97312
|
-
} else {
|
|
97313
|
-
return ("_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
97314
|
-
}
|
|
97450
|
+
return $m_Lio_kaitai_struct_languages_CSharpCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
97315
97451
|
});
|
|
97316
97452
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
97317
|
-
return ("_t_" +
|
|
97453
|
+
return ("_t_" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
97318
97454
|
});
|
|
97319
97455
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
97320
|
-
return ("p_" +
|
|
97456
|
+
return ("p_" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
97321
97457
|
});
|
|
97322
97458
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attrValidateExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__sci_List__V = (function(attrId, attrType, checkExpr, err, errArgs) {
|
|
97323
97459
|
var this$3 = $n(errArgs);
|
|
@@ -97443,7 +97579,8 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrDebugEnd__Lio_kaitai_st
|
|
|
97443
97579
|
/*<skip>*/
|
|
97444
97580
|
});
|
|
97445
97581
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.normalIO__T = (function() {
|
|
97446
|
-
|
|
97582
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
97583
|
+
return $m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
97447
97584
|
});
|
|
97448
97585
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List = (function(id, rep) {
|
|
97449
97586
|
return $m_sci_Nil$()
|
|
@@ -97687,7 +97824,7 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condIfFooter__Lio_kaitai_st
|
|
|
97687
97824
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("end")
|
|
97688
97825
|
});
|
|
97689
97826
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
97690
|
-
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((
|
|
97827
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(($m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"))
|
|
97691
97828
|
});
|
|
97692
97829
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
97693
97830
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("local i = 0");
|
|
@@ -97772,7 +97909,7 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
97772
97909
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, varDest, expr$2, rep, false)
|
|
97773
97910
|
});
|
|
97774
97911
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
97775
|
-
var memberName =
|
|
97912
|
+
var memberName = $m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
97776
97913
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
97777
97914
|
if ((x === rep)) {
|
|
97778
97915
|
return memberName
|
|
@@ -97797,8 +97934,8 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.alignToByte__T__V = (functi
|
|
|
97797
97934
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((io + ":align_to_byte()"))
|
|
97798
97935
|
});
|
|
97799
97936
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
97800
|
-
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(className) + ".property.") +
|
|
97801
|
-
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((((("function " + $m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(className)) + ".property.") +
|
|
97937
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(className) + ".property.") + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + " = {}"));
|
|
97938
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((((("function " + $m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(className)) + ".property.") + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ":get()"));
|
|
97802
97939
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).inc__V()
|
|
97803
97940
|
});
|
|
97804
97941
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceFooter__V = (function() {
|
|
@@ -97817,7 +97954,7 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceCheckCacheAndReturn
|
|
|
97817
97954
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
97818
97955
|
});
|
|
97819
97956
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
|
|
97820
|
-
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(("return " +
|
|
97957
|
+
$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)))
|
|
97821
97958
|
});
|
|
97822
97959
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.enumDeclaration__sci_List__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
97823
97960
|
var this$1 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_importList);
|
|
@@ -97846,26 +97983,35 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.enumDeclaration__sci_List__
|
|
|
97846
97983
|
var this$5 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out);
|
|
97847
97984
|
$n(this$5.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
97848
97985
|
});
|
|
97986
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
97987
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
97988
|
+
var x2 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
97989
|
+
var name = $n(x2).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
97990
|
+
return name
|
|
97991
|
+
} else {
|
|
97992
|
+
return $m_Lio_kaitai_struct_languages_LuaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
97993
|
+
}
|
|
97994
|
+
});
|
|
97849
97995
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
97850
|
-
return
|
|
97996
|
+
return $m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
97851
97997
|
});
|
|
97852
97998
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
97853
97999
|
return ("_t_" + $m_Lio_kaitai_struct_languages_LuaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
97854
98000
|
});
|
|
97855
98001
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
97856
|
-
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(((
|
|
98002
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((($m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i + 1] = ") + expr))
|
|
97857
98003
|
});
|
|
97858
98004
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
97859
|
-
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(((
|
|
98005
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((($m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i + 1] = ") + expr))
|
|
97860
98006
|
});
|
|
97861
98007
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__T__Z__V = (function(id, expr, isRaw) {
|
|
97862
98008
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_translator);
|
|
97863
98009
|
var s = (isRaw ? $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2 : $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR);
|
|
97864
98010
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(((("local " + s) + " = ") + expr));
|
|
97865
|
-
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(((
|
|
98011
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((($m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i + 1] = ") + s))
|
|
97866
98012
|
});
|
|
97867
98013
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
97868
|
-
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(((
|
|
98014
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((($m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr))
|
|
97869
98015
|
});
|
|
97870
98016
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
97871
98017
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V(((("local " + id) + " = ") + expr))
|
|
@@ -97886,7 +98032,12 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
97886
98032
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
97887
98033
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
97888
98034
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
97889
|
-
|
|
98035
|
+
if (($n(terminator).length__I() === 1)) {
|
|
98036
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
98037
|
+
return (((((((((io + ":read_bytes_term(") + term) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
98038
|
+
} else {
|
|
98039
|
+
return (((((((((io + ":read_bytes_term_multi(") + $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(terminator)) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
98040
|
+
}
|
|
97890
98041
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
97891
98042
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
97892
98043
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -97969,8 +98120,13 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.bytesPadTermExpr__T__s_Opti
|
|
|
97969
98120
|
};
|
|
97970
98121
|
if ((terminator instanceof $c_s_Some)) {
|
|
97971
98122
|
var x2$2 = $as_s_Some(terminator);
|
|
97972
|
-
var term = $
|
|
97973
|
-
|
|
98123
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
98124
|
+
if (($n(term).length__I() === 1)) {
|
|
98125
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
98126
|
+
var expr2 = (((((("KaitaiStream.bytes_terminate(" + expr1) + ", ") + t) + ", ") + include) + ")")
|
|
98127
|
+
} else {
|
|
98128
|
+
var expr2 = (((((("KaitaiStream.bytes_terminate_multi(" + expr1) + ", ") + $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", ") + include) + ")")
|
|
98129
|
+
}
|
|
97974
98130
|
} else {
|
|
97975
98131
|
var x$3 = $m_s_None$();
|
|
97976
98132
|
if ((!(x$3 === terminator))) {
|
|
@@ -98023,7 +98179,7 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfEnd__V = (function(
|
|
|
98023
98179
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("end")
|
|
98024
98180
|
});
|
|
98025
98181
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
98026
|
-
|
|
98182
|
+
$m_Lio_kaitai_struct_languages_LuaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
98027
98183
|
var args = this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(varName, rep);
|
|
98028
98184
|
var this$1 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_importList);
|
|
98029
98185
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "local stringstream = require(\"string_stream\")");
|
|
@@ -98710,8 +98866,13 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.bytesPadTermExpr__T__s_Opti
|
|
|
98710
98866
|
};
|
|
98711
98867
|
if ((terminator instanceof $c_s_Some)) {
|
|
98712
98868
|
var x2$2 = $as_s_Some(terminator);
|
|
98713
|
-
var term = $
|
|
98714
|
-
|
|
98869
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
98870
|
+
if (($n(term).length__I() === 1)) {
|
|
98871
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
98872
|
+
var expr2 = (((((expr1 + ".bytesTerminate(") + t) + ", ") + include) + ")")
|
|
98873
|
+
} else {
|
|
98874
|
+
var expr2 = (((((expr1 + ".bytesTerminateMulti(") + $n(this.Lio_kaitai_struct_languages_NimCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", ") + include) + ")")
|
|
98875
|
+
}
|
|
98715
98876
|
} else {
|
|
98716
98877
|
var x$3 = $m_s_None$();
|
|
98717
98878
|
if ((!(x$3 === terminator))) {
|
|
@@ -98759,7 +98920,12 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
98759
98920
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
98760
98921
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
98761
98922
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
98762
|
-
|
|
98923
|
+
if (($n(terminator).length__I() === 1)) {
|
|
98924
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
98925
|
+
var expr = (((((((((io + ".readBytesTerm(") + term) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
98926
|
+
} else {
|
|
98927
|
+
var expr = (((((((((io + ".readBytesTermMulti(") + $n(this.Lio_kaitai_struct_languages_NimCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(terminator)) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
98928
|
+
}
|
|
98763
98929
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
98764
98930
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
98765
98931
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -99054,7 +99220,8 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.results__Lio_kaitai_struct
|
|
|
99054
99220
|
return $f_Lio_kaitai_struct_languages_components_SingleOutputFile__results__Lio_kaitai_struct_format_ClassSpec__sci_Map(this, topClass)
|
|
99055
99221
|
});
|
|
99056
99222
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.normalIO__T = (function() {
|
|
99057
|
-
|
|
99223
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
99224
|
+
return $m_Lio_kaitai_struct_languages_RubyCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
99058
99225
|
});
|
|
99059
99226
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
99060
99227
|
return this.Lio_kaitai_struct_languages_RubyCompiler__f_outHeader
|
|
@@ -99221,9 +99388,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attributeReader__Lio_kaita
|
|
|
99221
99388
|
var $$x1 = x$3.equals__O__Z(attrName)
|
|
99222
99389
|
};
|
|
99223
99390
|
if ((!$$x1)) {
|
|
99224
|
-
|
|
99225
|
-
var this$1 = $m_Lio_kaitai_struct_languages_RubyCompiler$();
|
|
99226
|
-
$n($$x2).puts__T__V(("attr_reader :" + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)))
|
|
99391
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(("attr_reader :" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)))
|
|
99227
99392
|
}
|
|
99228
99393
|
});
|
|
99229
99394
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.universalDoc__Lio_kaitai_struct_format_DocSpec__V = (function(doc) {
|
|
@@ -99338,14 +99503,14 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrProcess__Lio_kaitai_st
|
|
|
99338
99503
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, varDest, expr$2, rep, false)
|
|
99339
99504
|
});
|
|
99340
99505
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(id, rep) {
|
|
99341
|
-
|
|
99506
|
+
$m_Lio_kaitai_struct_languages_RubyCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
99342
99507
|
var ioName = ("_io_" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
99343
99508
|
var args = this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(id, rep);
|
|
99344
99509
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((((ioName + " = Kaitai::Struct::Stream.new(") + args) + ")"));
|
|
99345
99510
|
return ioName
|
|
99346
99511
|
});
|
|
99347
99512
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
99348
|
-
var memberName =
|
|
99513
|
+
var memberName = $m_Lio_kaitai_struct_languages_RubyCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
99349
99514
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
99350
99515
|
if ((x === rep)) {
|
|
99351
99516
|
return memberName
|
|
@@ -99383,7 +99548,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrDebugStart__Lio_kaitai
|
|
|
99383
99548
|
} else {
|
|
99384
99549
|
var x$3 = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
99385
99550
|
if (((x$3 === rep) || (rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil))) {
|
|
99386
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((((((("@_debug['" + name) + "'][:arr][") +
|
|
99551
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((((((("@_debug['" + name) + "'][:arr][") + $m_Lio_kaitai_struct_languages_RubyCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrId)) + ".size] = {:start => ") + io) + ".pos}"))
|
|
99387
99552
|
} else {
|
|
99388
99553
|
throw new $c_s_MatchError(rep)
|
|
99389
99554
|
}
|
|
@@ -99403,7 +99568,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrDebugEnd__Lio_kaitai_s
|
|
|
99403
99568
|
} else {
|
|
99404
99569
|
var x$3 = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
99405
99570
|
if (((x$3 === rep) || (rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil))) {
|
|
99406
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((((((("@_debug['" + name) + "'][:arr][") +
|
|
99571
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((((((("@_debug['" + name) + "'][:arr][") + $m_Lio_kaitai_struct_languages_RubyCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrId)) + ".size - 1][:end] = ") + io) + ".pos"))
|
|
99407
99572
|
} else {
|
|
99408
99573
|
throw new $c_s_MatchError(rep)
|
|
99409
99574
|
}
|
|
@@ -99414,7 +99579,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condIfHeader__Lio_kaitai_s
|
|
|
99414
99579
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).inc__V()
|
|
99415
99580
|
});
|
|
99416
99581
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
99417
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((
|
|
99582
|
+
$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(id) + " = []"))
|
|
99418
99583
|
});
|
|
99419
99584
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
99420
99585
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("i = 0");
|
|
@@ -99422,7 +99587,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatEosHeader__Lio_k
|
|
|
99422
99587
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).inc__V()
|
|
99423
99588
|
});
|
|
99424
99589
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
99425
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(((
|
|
99590
|
+
$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(id) + " << ") + expr))
|
|
99426
99591
|
});
|
|
99427
99592
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatEosFooter__V = (function() {
|
|
99428
99593
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("i += 1");
|
|
@@ -99447,7 +99612,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatUntilHeader__Lio
|
|
|
99447
99612
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__T__Z__V = (function(id, expr, isRaw) {
|
|
99448
99613
|
var tmpName = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator).doName__T__T((isRaw ? $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2 : $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR));
|
|
99449
99614
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(((tmpName + " = ") + expr));
|
|
99450
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(((
|
|
99615
|
+
$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(id) + " << ") + tmpName))
|
|
99451
99616
|
});
|
|
99452
99617
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
99453
99618
|
$n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
@@ -99456,7 +99621,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatUntilFooter__Lio
|
|
|
99456
99621
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(("end until " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)))
|
|
99457
99622
|
});
|
|
99458
99623
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
99459
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(((
|
|
99624
|
+
$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(id) + " = ") + expr))
|
|
99460
99625
|
});
|
|
99461
99626
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
99462
99627
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(((id + " = ") + expr))
|
|
@@ -99477,7 +99642,12 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
99477
99642
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
99478
99643
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
99479
99644
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
99480
|
-
|
|
99645
|
+
if (($n(terminator).length__I() === 1)) {
|
|
99646
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
99647
|
+
return (((((((((io + ".read_bytes_term(") + term) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
99648
|
+
} else {
|
|
99649
|
+
return (((((((((io + ".read_bytes_term_multi(") + $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(terminator)) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
99650
|
+
}
|
|
99481
99651
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
99482
99652
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
99483
99653
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -99568,8 +99738,13 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.bytesPadTermExpr__T__s_Opt
|
|
|
99568
99738
|
};
|
|
99569
99739
|
if ((terminator instanceof $c_s_Some)) {
|
|
99570
99740
|
var x2$2 = $as_s_Some(terminator);
|
|
99571
|
-
var term = $
|
|
99572
|
-
|
|
99741
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
99742
|
+
if (($n(term).length__I() === 1)) {
|
|
99743
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
99744
|
+
var expr2 = (((((("Kaitai::Struct::Stream::bytes_terminate(" + expr1) + ", ") + t) + ", ") + include) + ")")
|
|
99745
|
+
} else {
|
|
99746
|
+
var expr2 = (((((("Kaitai::Struct::Stream::bytes_terminate_multi(" + expr1) + ", ") + $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", ") + include) + ")")
|
|
99747
|
+
}
|
|
99573
99748
|
} else {
|
|
99574
99749
|
var x$3 = $m_s_None$();
|
|
99575
99750
|
if ((!(x$3 === terminator))) {
|
|
@@ -99604,10 +99779,10 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceHeader__T__Lio_kai
|
|
|
99604
99779
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).inc__V()
|
|
99605
99780
|
});
|
|
99606
99781
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
99607
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((((("return " +
|
|
99782
|
+
$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?"))
|
|
99608
99783
|
});
|
|
99609
99784
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
|
|
99610
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(
|
|
99785
|
+
$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))
|
|
99611
99786
|
});
|
|
99612
99787
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumDeclaration__T__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
99613
99788
|
$m_Lio_kaitai_struct_Utils$();
|
|
@@ -99677,7 +99852,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classToString__Lio_kaitai_
|
|
|
99677
99852
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("end")
|
|
99678
99853
|
});
|
|
99679
99854
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
99680
|
-
return
|
|
99855
|
+
return $m_Lio_kaitai_struct_languages_RubyCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
99681
99856
|
});
|
|
99682
99857
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
99683
99858
|
return ("_t_" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
@@ -100266,7 +100441,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrDebugNeeded__Lio_kaita
|
|
|
100266
100441
|
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrDebugNeeded__Lio_kaitai_struct_format_Identifier__Z(this, attrId)
|
|
100267
100442
|
});
|
|
100268
100443
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.normalIO__T = (function() {
|
|
100269
|
-
|
|
100444
|
+
var id = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
100445
|
+
return $m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
100270
100446
|
});
|
|
100271
100447
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.type2class__T__T = (function(name) {
|
|
100272
100448
|
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
@@ -100777,7 +100953,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condIfHeader__Lio_kaitai_s
|
|
|
100777
100953
|
});
|
|
100778
100954
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
100779
100955
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100780
|
-
var $$x1 =
|
|
100956
|
+
var $$x1 = $m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
100781
100957
|
var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream(dataType);
|
|
100782
100958
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100783
100959
|
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
@@ -100793,7 +100969,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatEosHeader__Lio_k
|
|
|
100793
100969
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "java.util.ArrayList")
|
|
100794
100970
|
});
|
|
100795
100971
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
100796
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((
|
|
100972
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".add(") + expr) + ");"))
|
|
100797
100973
|
});
|
|
100798
100974
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatEosFooter__V = (function() {
|
|
100799
100975
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("i++;");
|
|
@@ -100837,7 +101013,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatUnti
|
|
|
100837
101013
|
var typeDecl = $as_T(x1___1);
|
|
100838
101014
|
var tempVar = $as_T(x1___2);
|
|
100839
101015
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V(((((("" + typeDecl) + tempVar) + " = ") + expr) + ";"));
|
|
100840
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((
|
|
101016
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".add(") + tempVar) + ");"))
|
|
100841
101017
|
});
|
|
100842
101018
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
100843
101019
|
$n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
@@ -100848,7 +101024,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilFooter__Lio
|
|
|
100848
101024
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("}")
|
|
100849
101025
|
});
|
|
100850
101026
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
100851
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((
|
|
101027
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr) + ";"))
|
|
100852
101028
|
});
|
|
100853
101029
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
100854
101030
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
@@ -100879,7 +101055,12 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
100879
101055
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
100880
101056
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
100881
101057
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
100882
|
-
|
|
101058
|
+
if (($n(terminator).length__I() === 1)) {
|
|
101059
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
101060
|
+
var expr = (((((((((io + ".readBytesTerm((byte) ") + term) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
101061
|
+
} else {
|
|
101062
|
+
var expr = (((((((((io + ".readBytesTermMulti(") + $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(terminator)) + ", ") + include) + ", ") + consume) + ", ") + eosError) + ")")
|
|
101063
|
+
}
|
|
100883
101064
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
100884
101065
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
100885
101066
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -101008,8 +101189,13 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.bytesPadTermExpr__T__s_Opt
|
|
|
101008
101189
|
};
|
|
101009
101190
|
if ((terminator instanceof $c_s_Some)) {
|
|
101010
101191
|
var x2$2 = $as_s_Some(terminator);
|
|
101011
|
-
var term = $
|
|
101012
|
-
|
|
101192
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
101193
|
+
if (($n(term).length__I() === 1)) {
|
|
101194
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
101195
|
+
var expr2 = (((((("KaitaiStream.bytesTerminate(" + expr1) + ", (byte) ") + t) + ", ") + include) + ")")
|
|
101196
|
+
} else {
|
|
101197
|
+
var expr2 = (((((("KaitaiStream.bytesTerminateMulti(" + expr1) + ", ") + $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", ") + include) + ")")
|
|
101198
|
+
}
|
|
101013
101199
|
} else {
|
|
101014
101200
|
var x$3 = $m_s_None$();
|
|
101015
101201
|
if ((!(x$3 === terminator))) {
|
|
@@ -101144,22 +101330,22 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceHeader__T__Lio_kai
|
|
|
101144
101330
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V()
|
|
101145
101331
|
});
|
|
101146
101332
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
101147
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("if (" +
|
|
101333
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("if (" + $m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + " != null)"));
|
|
101148
101334
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
101149
101335
|
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V(instName, dataType);
|
|
101150
101336
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).dec__V()
|
|
101151
101337
|
});
|
|
101152
101338
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
|
|
101153
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("return " +
|
|
101339
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("return " + $m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ";"))
|
|
101154
101340
|
});
|
|
101155
101341
|
$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) {
|
|
101156
101342
|
var primType = $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, this.Lio_kaitai_struct_languages_JavaCompiler__f_importList);
|
|
101157
101343
|
var boxedType = $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, this.Lio_kaitai_struct_languages_JavaCompiler__f_importList);
|
|
101158
101344
|
if ((primType !== boxedType)) {
|
|
101159
101345
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((((primType + " _tmp = (") + primType) + ") (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, value)) + ");"));
|
|
101160
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((
|
|
101346
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V(($m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName) + " = _tmp;"))
|
|
101161
101347
|
} else {
|
|
101162
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((
|
|
101348
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, value)) + ";"))
|
|
101163
101349
|
}
|
|
101164
101350
|
});
|
|
101165
101351
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.enumDeclaration__T__T__sci_Seq__V = (function(curClass, enumName, enumColl) {
|
|
@@ -101271,7 +101457,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classToString__Lio_kaitai_
|
|
|
101271
101457
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("}")
|
|
101272
101458
|
});
|
|
101273
101459
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
101274
|
-
return
|
|
101460
|
+
return $m_Lio_kaitai_struct_languages_JavaCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
101275
101461
|
});
|
|
101276
101462
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
101277
101463
|
return ("_t_" + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
@@ -101737,14 +101923,14 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.normalIO__T = (function(
|
|
|
101737
101923
|
return "self._io"
|
|
101738
101924
|
});
|
|
101739
101925
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
101740
|
-
|
|
101926
|
+
$m_Lio_kaitai_struct_languages_PythonCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
101741
101927
|
var ioName = ("_io_" + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varName));
|
|
101742
101928
|
var args = this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(varName, rep);
|
|
101743
101929
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((((ioName + " = KaitaiStream(BytesIO(") + args) + "))"));
|
|
101744
101930
|
return ioName
|
|
101745
101931
|
});
|
|
101746
101932
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
101747
|
-
var memberName =
|
|
101933
|
+
var memberName = $m_Lio_kaitai_struct_languages_PythonCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
101748
101934
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
101749
101935
|
if ((x === rep)) {
|
|
101750
101936
|
return memberName
|
|
@@ -101809,7 +101995,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attrDebugEnd__Lio_kaitai
|
|
|
101809
101995
|
} else {
|
|
101810
101996
|
var x$3 = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
101811
101997
|
if (((x$3 === rep) || (rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil))) {
|
|
101812
|
-
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((((((("self._debug['" + name) + "']['arr'][len(") +
|
|
101998
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((((((("self._debug['" + name) + "']['arr'][len(") + $m_Lio_kaitai_struct_languages_PythonCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrId)) + ") - 1]['end'] = ") + io) + ".pos()"))
|
|
101813
101999
|
} else {
|
|
101814
102000
|
throw new $c_s_MatchError(rep)
|
|
101815
102001
|
}
|
|
@@ -101820,7 +102006,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condIfHeader__Lio_kaitai
|
|
|
101820
102006
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).inc__V()
|
|
101821
102007
|
});
|
|
101822
102008
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
101823
|
-
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((
|
|
102009
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V(($m_Lio_kaitai_struct_languages_PythonCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"))
|
|
101824
102010
|
});
|
|
101825
102011
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
101826
102012
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("i = 0");
|
|
@@ -101828,7 +102014,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatEosHeader__Lio
|
|
|
101828
102014
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).inc__V()
|
|
101829
102015
|
});
|
|
101830
102016
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
101831
|
-
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((((
|
|
102017
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_PythonCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + expr) + ")"))
|
|
101832
102018
|
});
|
|
101833
102019
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatEosFooter__V = (function() {
|
|
101834
102020
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("i += 1");
|
|
@@ -101849,7 +102035,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatUntilHeader__L
|
|
|
101849
102035
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__T__Z__V = (function(id, expr, isRaw) {
|
|
101850
102036
|
var tmpName = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_translator).doName__T__T((isRaw ? $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2 : $m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR));
|
|
101851
102037
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V(((tmpName + " = ") + expr));
|
|
101852
|
-
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((((
|
|
102038
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_PythonCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + tmpName) + ")"))
|
|
101853
102039
|
});
|
|
101854
102040
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
101855
102041
|
$n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
@@ -101861,7 +102047,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatUntilFooter__L
|
|
|
101861
102047
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).dec__V()
|
|
101862
102048
|
});
|
|
101863
102049
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
101864
|
-
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V(((
|
|
102050
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((($m_Lio_kaitai_struct_languages_PythonCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr))
|
|
101865
102051
|
});
|
|
101866
102052
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
101867
102053
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V(((id + " = ") + expr))
|
|
@@ -101882,7 +102068,12 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.parseExpr__Lio_kaitai_st
|
|
|
101882
102068
|
var include = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_include;
|
|
101883
102069
|
var consume = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_consume;
|
|
101884
102070
|
var eosError = $n(x5).Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__f_eosError;
|
|
101885
|
-
|
|
102071
|
+
if (($n(terminator).length__I() === 1)) {
|
|
102072
|
+
var term = (255 & $uB($n(terminator).head__O()));
|
|
102073
|
+
return (((((((((io + ".read_bytes_term(") + term) + ", ") + this.bool2Py__Z__T(include)) + ", ") + this.bool2Py__Z__T(consume)) + ", ") + this.bool2Py__Z__T(eosError)) + ")")
|
|
102074
|
+
} else {
|
|
102075
|
+
return (((((((((io + ".read_bytes_term_multi(") + $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(terminator)) + ", ") + this.bool2Py__Z__T(include)) + ", ") + this.bool2Py__Z__T(consume)) + ", ") + this.bool2Py__Z__T(eosError)) + ")")
|
|
102076
|
+
}
|
|
101886
102077
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType1)) {
|
|
101887
102078
|
var x7 = $as_Lio_kaitai_struct_datatype_DataType$BitsType1(dataType);
|
|
101888
102079
|
var bitEndian = $n(x7).Lio_kaitai_struct_datatype_DataType$BitsType1__f_bitEndian;
|
|
@@ -101965,8 +102156,13 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.bytesPadTermExpr__T__s_O
|
|
|
101965
102156
|
};
|
|
101966
102157
|
if ((terminator instanceof $c_s_Some)) {
|
|
101967
102158
|
var x2$2 = $as_s_Some(terminator);
|
|
101968
|
-
var term = $
|
|
101969
|
-
|
|
102159
|
+
var term = $as_sci_Seq($n(x2$2).s_Some__f_value);
|
|
102160
|
+
if (($n(term).length__I() === 1)) {
|
|
102161
|
+
var t = (255 & $uB($n(term).head__O()));
|
|
102162
|
+
var expr2 = (((((("KaitaiStream.bytes_terminate(" + expr1) + ", ") + t) + ", ") + this.bool2Py__Z__T(include)) + ")")
|
|
102163
|
+
} else {
|
|
102164
|
+
var expr2 = (((((("KaitaiStream.bytes_terminate_multi(" + expr1) + ", ") + $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_translator).doByteArrayLiteral__sci_Seq__T(term)) + ", ") + this.bool2Py__Z__T(include)) + ")")
|
|
102165
|
+
}
|
|
101970
102166
|
} else {
|
|
101971
102167
|
var x$3 = $m_s_None$();
|
|
101972
102168
|
if ((!(x$3 === terminator))) {
|
|
@@ -102020,13 +102216,13 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchIfEnd__V = (functi
|
|
|
102020
102216
|
});
|
|
102021
102217
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
102022
102218
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("@property");
|
|
102023
|
-
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((("def " +
|
|
102219
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((("def " + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + "(self):"));
|
|
102024
102220
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).inc__V()
|
|
102025
102221
|
});
|
|
102026
102222
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
102027
102223
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((("if hasattr(self, '" + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "'):"));
|
|
102028
102224
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).inc__V();
|
|
102029
|
-
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V(("return " +
|
|
102225
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V(("return " + $m_Lio_kaitai_struct_languages_PythonCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)));
|
|
102030
102226
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).dec__V();
|
|
102031
102227
|
var this$1 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out);
|
|
102032
102228
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
@@ -102104,8 +102300,17 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classToString__Lio_kaita
|
|
|
102104
102300
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.bool2Py__Z__T = (function(b) {
|
|
102105
102301
|
return (b ? "True" : "False")
|
|
102106
102302
|
});
|
|
102303
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
102304
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
102305
|
+
var x2 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
102306
|
+
var name = $n(x2).Lio_kaitai_struct_format_InstanceIdentifier__f_name;
|
|
102307
|
+
return name
|
|
102308
|
+
} else {
|
|
102309
|
+
return $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
102310
|
+
}
|
|
102311
|
+
});
|
|
102107
102312
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
102108
|
-
return
|
|
102313
|
+
return $m_Lio_kaitai_struct_languages_PythonCompiler$().privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)
|
|
102109
102314
|
});
|
|
102110
102315
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
102111
102316
|
return ("_t_" + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|