kaitai-struct-compiler 0.11.0-SNAPSHOT20240310.231805.6aef6fa → 0.11.0-SNAPSHOT20240322.4237.c4672ee
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 +1095 -863
- package/package.json +1 -1
|
@@ -3010,8 +3010,8 @@ function $m_Lio_kaitai_struct_Utils$() {
|
|
|
3010
3010
|
function $c_Lio_kaitai_struct_Version$() {
|
|
3011
3011
|
this.Lio_kaitai_struct_Version$__f_version = null;
|
|
3012
3012
|
this.Lio_kaitai_struct_Version$__f_gitTime = null;
|
|
3013
|
-
this.Lio_kaitai_struct_Version$__f_version = "0.11-
|
|
3014
|
-
this.Lio_kaitai_struct_Version$__f_gitTime = "2024-03-
|
|
3013
|
+
this.Lio_kaitai_struct_Version$__f_version = "0.11-SNAPSHOT20240322.004237.c4672ee";
|
|
3014
|
+
this.Lio_kaitai_struct_Version$__f_gitTime = "2024-03-22T00:42:37+00:00"
|
|
3015
3015
|
}
|
|
3016
3016
|
$c_Lio_kaitai_struct_Version$.prototype = new $h_O();
|
|
3017
3017
|
$c_Lio_kaitai_struct_Version$.prototype.constructor = $c_Lio_kaitai_struct_Version$;
|
|
@@ -3432,7 +3432,7 @@ $c_Lio_kaitai_struct_datatype_DataType$.prototype.fromYaml__s_Option__sci_List__
|
|
|
3432
3432
|
var arg2 = arg
|
|
3433
3433
|
};
|
|
3434
3434
|
var bat = $n(arg2).getByteArrayType__sci_List__Lio_kaitai_struct_datatype_DataType$BytesType(path);
|
|
3435
|
-
var r = new $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType(bat, enc);
|
|
3435
|
+
var r = new $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType(bat, enc, $n($n(arg).Lio_kaitai_struct_format_YamlAttrArgs__f_encoding).isEmpty__Z());
|
|
3436
3436
|
break matchEnd10
|
|
3437
3437
|
};
|
|
3438
3438
|
var typeWithArgs = $m_Lio_kaitai_struct_exprlang_Expressions$().parseTypeRef__T__Lio_kaitai_struct_exprlang_Ast$TypeWithArguments(dt);
|
|
@@ -17030,7 +17030,7 @@ $c_Lio_kaitai_struct_format_InstanceSpec$.prototype.fromYaml__O__sci_List__Lio_k
|
|
|
17030
17030
|
var value2 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$EnumById(new $c_Lio_kaitai_struct_exprlang_Ast$identifier(enumName), value, $m_Lio_kaitai_struct_exprlang_Ast$().Lio_kaitai_struct_exprlang_Ast$__f_EmptyTypeId)
|
|
17031
17031
|
};
|
|
17032
17032
|
var ifExpr = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueExpression__sci_Map__T__sci_List__s_Option(srcMap, "if", path);
|
|
17033
|
-
return new $c_Lio_kaitai_struct_format_ValueInstanceSpec(id, path, $m_Lio_kaitai_struct_format_DocSpec$().fromYaml__sci_Map__sci_List__Lio_kaitai_struct_format_DocSpec(srcMap, path)
|
|
17033
|
+
return new $c_Lio_kaitai_struct_format_ValueInstanceSpec(id, path, value2, ifExpr, $m_s_None$(), $m_Lio_kaitai_struct_format_DocSpec$().fromYaml__sci_Map__sci_List__Lio_kaitai_struct_format_DocSpec(srcMap, path))
|
|
17034
17034
|
} else {
|
|
17035
17035
|
var x$3 = $m_s_None$();
|
|
17036
17036
|
if ((x$3 === x1)) {
|
|
@@ -17059,7 +17059,7 @@ $c_Lio_kaitai_struct_format_InstanceSpec$.prototype.fromYaml__O__sci_List__Lio_k
|
|
|
17059
17059
|
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
17060
17060
|
var valid = new $c_s_Some($n($$x1).fromYaml__O__sci_List__Lio_kaitai_struct_format_ValidationSpec(arg1, this$12.appendedAll__sc_IterableOnce__sci_List(suffix)))
|
|
17061
17061
|
};
|
|
17062
|
-
return new $c_Lio_kaitai_struct_format_ParseInstanceSpec(id, path, $n(a).
|
|
17062
|
+
return new $c_Lio_kaitai_struct_format_ParseInstanceSpec(id, path, $n(a).Lio_kaitai_struct_format_AttrSpec__f_dataType, $n(a).Lio_kaitai_struct_format_AttrSpec__f_cond, pos, io, valid, $n(a).Lio_kaitai_struct_format_AttrSpec__f_doc)
|
|
17063
17063
|
} else {
|
|
17064
17064
|
throw new $c_s_MatchError(x1)
|
|
17065
17065
|
}
|
|
@@ -17232,13 +17232,7 @@ $c_Lio_kaitai_struct_format_ParseUtils$.prototype.getValueStr__sci_Map__T__sci_L
|
|
|
17232
17232
|
} else {
|
|
17233
17233
|
var x = $m_s_None$();
|
|
17234
17234
|
if ((x === x1)) {
|
|
17235
|
-
|
|
17236
|
-
var this$10 = $n(path);
|
|
17237
|
-
$n($m_s_package$().s_package$__f_List);
|
|
17238
|
-
var array$1 = [field];
|
|
17239
|
-
var elems$1 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1);
|
|
17240
|
-
var suffix$1 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$1);
|
|
17241
|
-
throw $n($n($$x1).noKey__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(this$10.appendedAll__sc_IterableOnce__sci_List(suffix$1)))
|
|
17235
|
+
throw $n($m_Lio_kaitai_struct_problems_KSYParseError$().noKey__T__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(field, path))
|
|
17242
17236
|
} else {
|
|
17243
17237
|
throw new $c_s_MatchError(x1)
|
|
17244
17238
|
}
|
|
@@ -17258,13 +17252,7 @@ $c_Lio_kaitai_struct_format_ParseUtils$.prototype.getValueMapStrStr__sci_Map__T_
|
|
|
17258
17252
|
} else {
|
|
17259
17253
|
var x = $m_s_None$();
|
|
17260
17254
|
if ((x === x1)) {
|
|
17261
|
-
|
|
17262
|
-
var this$10 = $n(path);
|
|
17263
|
-
$n($m_s_package$().s_package$__f_List);
|
|
17264
|
-
var array$1 = [field];
|
|
17265
|
-
var elems$1 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1);
|
|
17266
|
-
var suffix$1 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$1);
|
|
17267
|
-
throw $n($n($$x1).noKey__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(this$10.appendedAll__sc_IterableOnce__sci_List(suffix$1)))
|
|
17255
|
+
throw $n($m_Lio_kaitai_struct_problems_KSYParseError$().noKey__T__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(field, path))
|
|
17268
17256
|
} else {
|
|
17269
17257
|
throw new $c_s_MatchError(x1)
|
|
17270
17258
|
}
|
|
@@ -17373,7 +17361,13 @@ $c_Lio_kaitai_struct_format_ParseUtils$.prototype.getValueExpression__sci_Map__T
|
|
|
17373
17361
|
} catch (e) {
|
|
17374
17362
|
if ((e instanceof $c_Lio_kaitai_struct_exprlang_Expressions$ParseException)) {
|
|
17375
17363
|
var epe = $as_Lio_kaitai_struct_exprlang_Expressions$ParseException(e);
|
|
17376
|
-
|
|
17364
|
+
var $$x1 = $m_Lio_kaitai_struct_problems_KSYParseError$();
|
|
17365
|
+
var this$5 = $n(path);
|
|
17366
|
+
$n($m_s_package$().s_package$__f_List);
|
|
17367
|
+
var array = [field];
|
|
17368
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
17369
|
+
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
17370
|
+
throw $n($n($$x1).expression__Lio_kaitai_struct_exprlang_Expressions$ParseException__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(epe, this$5.appendedAll__sc_IterableOnce__sci_List(suffix)))
|
|
17377
17371
|
} else {
|
|
17378
17372
|
throw e
|
|
17379
17373
|
}
|
|
@@ -17392,7 +17386,13 @@ $c_Lio_kaitai_struct_format_ParseUtils$.prototype.getOptValueExpression__sci_Map
|
|
|
17392
17386
|
} catch (e) {
|
|
17393
17387
|
if ((e instanceof $c_Lio_kaitai_struct_exprlang_Expressions$ParseException)) {
|
|
17394
17388
|
var epe = $as_Lio_kaitai_struct_exprlang_Expressions$ParseException(e);
|
|
17395
|
-
|
|
17389
|
+
var $$x1 = $m_Lio_kaitai_struct_problems_KSYParseError$();
|
|
17390
|
+
var this$6 = $n(path);
|
|
17391
|
+
$n($m_s_package$().s_package$__f_List);
|
|
17392
|
+
var array = [field];
|
|
17393
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
17394
|
+
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
17395
|
+
throw $n($n($$x1).expression__Lio_kaitai_struct_exprlang_Expressions$ParseException__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(epe, this$6.appendedAll__sc_IterableOnce__sci_List(suffix)))
|
|
17396
17396
|
} else {
|
|
17397
17397
|
throw e
|
|
17398
17398
|
}
|
|
@@ -18401,7 +18401,8 @@ function $f_Lio_kaitai_struct_languages_components_NoNeedForFullClassPath__enumD
|
|
|
18401
18401
|
})))))
|
|
18402
18402
|
}
|
|
18403
18403
|
function $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T($thiz, e) {
|
|
18404
|
-
|
|
18404
|
+
var this$1 = $n($n($as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz)).translator__Lio_kaitai_struct_translators_AbstractTranslator());
|
|
18405
|
+
return this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(e, 0)
|
|
18405
18406
|
}
|
|
18406
18407
|
function $f_Lio_kaitai_struct_languages_components_SingleOutputFile__results__Lio_kaitai_struct_format_ClassSpec__sci_Map($thiz, topClass) {
|
|
18407
18408
|
var this$12 = $n($m_s_Predef$().s_Predef$__f_Map);
|
|
@@ -18679,11 +18680,11 @@ $c_Lio_kaitai_struct_precompile_CalculateSeqSizes$.prototype.dataTypeByteSize__L
|
|
|
18679
18680
|
var basedOn = $n(x11).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_bytes;
|
|
18680
18681
|
dataType = basedOn
|
|
18681
18682
|
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
|
|
18682
|
-
var
|
|
18683
|
-
dataType = $n(
|
|
18683
|
+
var x14 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(x1);
|
|
18684
|
+
dataType = $n(x14).Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__f_bytes
|
|
18684
18685
|
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes)) {
|
|
18685
|
-
var
|
|
18686
|
-
dataType = $n(
|
|
18686
|
+
var x15 = $as_Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes(x1);
|
|
18687
|
+
dataType = $n(x15).Lio_kaitai_struct_datatype_DataType$CalcUserTypeFromBytes__f_bytes
|
|
18687
18688
|
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
18688
18689
|
return $m_Lio_kaitai_struct_format_DynamicSized$()
|
|
18689
18690
|
} else {
|
|
@@ -18738,7 +18739,125 @@ function $h_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$() {
|
|
|
18738
18739
|
/*<skip>*/
|
|
18739
18740
|
}
|
|
18740
18741
|
$h_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$.prototype = $c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$.prototype;
|
|
18741
|
-
$c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$.prototype.
|
|
18742
|
+
$c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$.prototype.canonicalize__Lio_kaitai_struct_format_ClassSpec__sc_Iterable = (function(curClass) {
|
|
18743
|
+
var metaProblems = this.canonicalizeMeta__Lio_kaitai_struct_format_MetaSpec__sc_Iterable($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_meta);
|
|
18744
|
+
var this$1 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_seq);
|
|
18745
|
+
var rest = this$1;
|
|
18746
|
+
var h = null;
|
|
18747
|
+
var t = null;
|
|
18748
|
+
while ((rest !== $m_sci_Nil$())) {
|
|
18749
|
+
var arg1 = $n(rest).head__O();
|
|
18750
|
+
var attr = $as_Lio_kaitai_struct_format_AttrSpec(arg1);
|
|
18751
|
+
var it = $n($m_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$().canonicalizeMember__Lio_kaitai_struct_format_MemberSpec__sc_Iterable(attr)).iterator__sc_Iterator();
|
|
18752
|
+
while ($n(it).hasNext__Z()) {
|
|
18753
|
+
var nx = new $c_sci_$colon$colon($n(it).next__O(), $m_sci_Nil$());
|
|
18754
|
+
if ((t === null)) {
|
|
18755
|
+
h = nx
|
|
18756
|
+
} else {
|
|
18757
|
+
$n(t).sci_$colon$colon__f_next = nx
|
|
18758
|
+
};
|
|
18759
|
+
t = nx
|
|
18760
|
+
};
|
|
18761
|
+
rest = $as_sci_List($n(rest).tail__O())
|
|
18762
|
+
};
|
|
18763
|
+
var seqProblems = ((h === null) ? $m_sci_Nil$() : h);
|
|
18764
|
+
var this$2 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_instances);
|
|
18765
|
+
var b = $m_sci_Iterable$().newBuilder__scm_Builder();
|
|
18766
|
+
$m_sci_RedBlackTree$();
|
|
18767
|
+
var tree = this$2.sci_TreeMap__f_tree;
|
|
18768
|
+
$m_sci_RedBlackTree$();
|
|
18769
|
+
var start = $m_s_None$();
|
|
18770
|
+
var evidence$16 = this$2.sci_TreeMap__f_ordering;
|
|
18771
|
+
var it$1 = new $c_sci_RedBlackTree$EntriesIterator(tree, start, evidence$16);
|
|
18772
|
+
while (it$1.hasNext__Z()) {
|
|
18773
|
+
var this$5 = $n(b);
|
|
18774
|
+
var arg1$1 = it$1.next__O();
|
|
18775
|
+
var x0$1 = $as_T2(arg1$1);
|
|
18776
|
+
if ((x0$1 === null)) {
|
|
18777
|
+
throw new $c_s_MatchError(x0$1)
|
|
18778
|
+
};
|
|
18779
|
+
var attr$1 = $as_Lio_kaitai_struct_format_InstanceSpec($n(x0$1).T2__f__2);
|
|
18780
|
+
var xs = $m_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$().canonicalizeMember__Lio_kaitai_struct_format_MemberSpec__sc_Iterable(attr$1);
|
|
18781
|
+
this$5.addAll__sc_IterableOnce__scm_Growable(xs)
|
|
18782
|
+
};
|
|
18783
|
+
var instanceProblems = $as_sci_Iterable($n(b).result__O());
|
|
18784
|
+
var this$6 = $n(metaProblems);
|
|
18785
|
+
var this$7 = $n($as_sc_IterableOps(this$6.concat__sc_IterableOnce__O(seqProblems)));
|
|
18786
|
+
return $as_sc_Iterable($n($as_sc_IterableOps(this$7.concat__sc_IterableOnce__O(instanceProblems))).map__F1__O(new $c_sjsr_AnonFunction1(((problem$2) => {
|
|
18787
|
+
var problem = $as_Lio_kaitai_struct_problems_CompilationProblem(problem$2);
|
|
18788
|
+
return $n(problem).localizedInType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_problems_CompilationProblem(curClass)
|
|
18789
|
+
}))))
|
|
18790
|
+
});
|
|
18791
|
+
$c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$.prototype.canonicalizeMeta__Lio_kaitai_struct_format_MetaSpec__sc_Iterable = (function(meta) {
|
|
18792
|
+
var $$x4 = $m_s_Option$();
|
|
18793
|
+
var x1 = $n(meta).Lio_kaitai_struct_format_MetaSpec__f_encoding;
|
|
18794
|
+
if ((x1 instanceof $c_s_Some)) {
|
|
18795
|
+
var x2 = $as_s_Some(x1);
|
|
18796
|
+
var encoding = $as_T($n(x2).s_Some__f_value);
|
|
18797
|
+
var x1$2 = this.canonicalizeName__T__T2(encoding);
|
|
18798
|
+
if ((x1$2 === null)) {
|
|
18799
|
+
throw new $c_s_MatchError(x1$2)
|
|
18800
|
+
};
|
|
18801
|
+
var newEncoding = $as_T($n(x1$2).T2__f__1);
|
|
18802
|
+
var problem1 = $as_s_Option($n(x1$2).T2__f__2);
|
|
18803
|
+
$n(meta).Lio_kaitai_struct_format_MetaSpec__f_encoding = new $c_s_Some(newEncoding);
|
|
18804
|
+
var $$x1 = problem1
|
|
18805
|
+
} else {
|
|
18806
|
+
var x = $m_s_None$();
|
|
18807
|
+
if ((!(x === x1))) {
|
|
18808
|
+
throw new $c_s_MatchError(x1)
|
|
18809
|
+
};
|
|
18810
|
+
var $$x1 = $m_s_None$()
|
|
18811
|
+
};
|
|
18812
|
+
var this$1 = $n($$x1);
|
|
18813
|
+
if (this$1.isEmpty__Z()) {
|
|
18814
|
+
var $$x2 = $m_s_None$()
|
|
18815
|
+
} else {
|
|
18816
|
+
var arg1 = this$1.get__O();
|
|
18817
|
+
var problem = $as_Lio_kaitai_struct_problems_CompilationProblem(arg1);
|
|
18818
|
+
var $$x3 = $as_Lio_kaitai_struct_problems_PathLocalizable(problem);
|
|
18819
|
+
var this$6 = $n($n(meta).Lio_kaitai_struct_format_MetaSpec__f_path);
|
|
18820
|
+
$n($m_s_package$().s_package$__f_List);
|
|
18821
|
+
var array = ["encoding"];
|
|
18822
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
18823
|
+
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
18824
|
+
var $$x2 = new $c_s_Some($n($$x3).localizedInPath__sci_List__Lio_kaitai_struct_problems_CompilationProblem(this$6.appendedAll__sc_IterableOnce__sci_List(suffix)))
|
|
18825
|
+
};
|
|
18826
|
+
return $n($$x4).option2Iterable__s_Option__sc_Iterable($$x2)
|
|
18827
|
+
});
|
|
18828
|
+
$c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$.prototype.canonicalizeMember__Lio_kaitai_struct_format_MemberSpec__sc_Iterable = (function(member) {
|
|
18829
|
+
var $$x4 = $m_s_Option$();
|
|
18830
|
+
var x1 = $n(member).dataType__Lio_kaitai_struct_datatype_DataType();
|
|
18831
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType)) {
|
|
18832
|
+
var x2 = $as_Lio_kaitai_struct_datatype_DataType$StrFromBytesType(x1);
|
|
18833
|
+
var x1$2 = this.canonicalizeName__T__T2($n(x2).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding);
|
|
18834
|
+
if ((x1$2 === null)) {
|
|
18835
|
+
throw new $c_s_MatchError(x1$2)
|
|
18836
|
+
};
|
|
18837
|
+
var newEncoding = $as_T($n(x1$2).T2__f__1);
|
|
18838
|
+
var problem1 = $as_s_Option($n(x1$2).T2__f__2);
|
|
18839
|
+
$n(x2).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding = newEncoding;
|
|
18840
|
+
var $$x1 = ($n(x2).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_isEncodingDerived ? $m_s_None$() : problem1)
|
|
18841
|
+
} else {
|
|
18842
|
+
var $$x1 = $m_s_None$()
|
|
18843
|
+
};
|
|
18844
|
+
var this$1 = $n($$x1);
|
|
18845
|
+
if (this$1.isEmpty__Z()) {
|
|
18846
|
+
var $$x2 = $m_s_None$()
|
|
18847
|
+
} else {
|
|
18848
|
+
var arg1 = this$1.get__O();
|
|
18849
|
+
var problem = $as_Lio_kaitai_struct_problems_CompilationProblem(arg1);
|
|
18850
|
+
var $$x3 = $as_Lio_kaitai_struct_problems_PathLocalizable(problem);
|
|
18851
|
+
var this$6 = $n($n(member).path__sci_List());
|
|
18852
|
+
$n($m_s_package$().s_package$__f_List);
|
|
18853
|
+
var array = ["encoding"];
|
|
18854
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
18855
|
+
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
18856
|
+
var $$x2 = new $c_s_Some($n($$x3).localizedInPath__sci_List__Lio_kaitai_struct_problems_CompilationProblem(this$6.appendedAll__sc_IterableOnce__sci_List(suffix)))
|
|
18857
|
+
};
|
|
18858
|
+
return $n($$x4).option2Iterable__s_Option__sc_Iterable($$x2)
|
|
18859
|
+
});
|
|
18860
|
+
$c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$.prototype.canonicalizeName__T__T2 = (function(original) {
|
|
18742
18861
|
if ($n($m_Lio_kaitai_struct_EncodingList$().Lio_kaitai_struct_EncodingList$__f_canonicalToAlias).contains__O__Z(original)) {
|
|
18743
18862
|
return new $c_T2(original, $m_s_None$())
|
|
18744
18863
|
} else {
|
|
@@ -19986,7 +20105,8 @@ function $f_Lio_kaitai_struct_translators_CommonMethods__$init$__V($thiz) {
|
|
|
19986
20105
|
var y$5 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$5);
|
|
19987
20106
|
var array$6 = [$$x5, $$x4, $$x3, $$x2, $$x1, new $c_T2(self$5, y$5)];
|
|
19988
20107
|
var elems$6 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$6);
|
|
19989
|
-
$thiz.io$kaitai$struct$translators$CommonMethods$_setter_$METHODS_BY_TYPE_$eq__sci_Map__V(this$47.from__sc_IterableOnce__sci_Map(elems$6))
|
|
20108
|
+
$thiz.io$kaitai$struct$translators$CommonMethods$_setter_$METHODS_BY_TYPE_$eq__sci_Map__V(this$47.from__sc_IterableOnce__sci_Map(elems$6));
|
|
20109
|
+
$thiz.io$kaitai$struct$translators$CommonMethods$_setter_$METHOD_PRECEDENCE_$eq__I__V(99)
|
|
19990
20110
|
}
|
|
19991
20111
|
function $is_Lio_kaitai_struct_translators_CommonMethods$MethodSig(obj) {
|
|
19992
20112
|
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.Lio_kaitai_struct_translators_CommonMethods$MethodSig)))
|
|
@@ -34405,7 +34525,9 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileAttr__Lio_kaitai_st
|
|
|
34405
34525
|
$n(this.Lio_kaitai_struct_ConstructClassCompiler__f_out).puts__T__V((((("'" + this.idToStr__Lio_kaitai_struct_format_Identifier__T($n(attr).id__Lio_kaitai_struct_format_Identifier())) + "' / ") + this.compileAttrBody__Lio_kaitai_struct_format_AttrLikeSpec__T(attr)) + ","))
|
|
34406
34526
|
});
|
|
34407
34527
|
$c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileValueInstance__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_ValueInstanceSpec__V = (function(id, vis) {
|
|
34408
|
-
var
|
|
34528
|
+
var this$1 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator);
|
|
34529
|
+
var v = $n(vis).Lio_kaitai_struct_format_ValueInstanceSpec__f_value;
|
|
34530
|
+
var typeStr = (("Computed(lambda this: " + this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")");
|
|
34409
34531
|
var typeStr2 = this.wrapWithIf__T__s_Option__T(typeStr, $n(vis).Lio_kaitai_struct_format_ValueInstanceSpec__f_ifExpr);
|
|
34410
34532
|
$n(this.Lio_kaitai_struct_ConstructClassCompiler__f_out).puts__T__V((((("'" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "' / ") + typeStr2) + ","))
|
|
34411
34533
|
});
|
|
@@ -34417,7 +34539,10 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileParseInstance__Lio_
|
|
|
34417
34539
|
} else if ((x1 instanceof $c_s_Some)) {
|
|
34418
34540
|
var x3 = $as_s_Some(x1);
|
|
34419
34541
|
var pos = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x3).s_Some__f_value);
|
|
34420
|
-
|
|
34542
|
+
var $$x2 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_out);
|
|
34543
|
+
var $$x1 = this.idToStr__Lio_kaitai_struct_format_Identifier__T($n(attr).Lio_kaitai_struct_format_ParseInstanceSpec__f_id);
|
|
34544
|
+
var this$1 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator);
|
|
34545
|
+
$n($$x2).puts__T__V((((("'" + $$x1) + "' / ") + ((("Pointer(" + this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(pos, 0)) + ", ") + this.compileAttrBody__Lio_kaitai_struct_format_AttrLikeSpec__T(attr))) + "),"))
|
|
34421
34546
|
} else {
|
|
34422
34547
|
throw new $c_s_MatchError(x1)
|
|
34423
34548
|
}
|
|
@@ -34431,12 +34556,14 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.wrapWithRepeat__T__Lio_kai
|
|
|
34431
34556
|
if ((repeat instanceof $c_Lio_kaitai_struct_format_RepeatExpr)) {
|
|
34432
34557
|
var x2 = $as_Lio_kaitai_struct_format_RepeatExpr(repeat);
|
|
34433
34558
|
var expr = $n(x2).Lio_kaitai_struct_format_RepeatExpr__f_expr;
|
|
34434
|
-
|
|
34559
|
+
var this$1 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator);
|
|
34560
|
+
return (((("Array(" + this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(expr, 0)) + ", ") + typeStr) + ")")
|
|
34435
34561
|
} else if ((repeat instanceof $c_Lio_kaitai_struct_format_RepeatUntil)) {
|
|
34436
34562
|
var x3 = $as_Lio_kaitai_struct_format_RepeatUntil(repeat);
|
|
34437
34563
|
var expr$2 = $n(x3).Lio_kaitai_struct_format_RepeatUntil__f_expr;
|
|
34438
34564
|
$n(this.Lio_kaitai_struct_ConstructClassCompiler__f_provider).Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some(dataType);
|
|
34439
|
-
|
|
34565
|
+
var this$2 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator);
|
|
34566
|
+
return (((("RepeatUntil(lambda obj_, list_, this: " + this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(expr$2, 0)) + ", ") + typeStr) + ")")
|
|
34440
34567
|
} else {
|
|
34441
34568
|
var x = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
34442
34569
|
if ((x === repeat)) {
|
|
@@ -34455,7 +34582,8 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.wrapWithIf__T__s_Option__T
|
|
|
34455
34582
|
if ((ifExpr instanceof $c_s_Some)) {
|
|
34456
34583
|
var x2 = $as_s_Some(ifExpr);
|
|
34457
34584
|
var expr = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2).s_Some__f_value);
|
|
34458
|
-
|
|
34585
|
+
var this$1 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator);
|
|
34586
|
+
return (((("If(" + this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(expr, 0)) + ", ") + typeStr) + ")")
|
|
34459
34587
|
} else {
|
|
34460
34588
|
var x = $m_s_None$();
|
|
34461
34589
|
if ((x === ifExpr)) {
|
|
@@ -34558,32 +34686,33 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.typeToStr__Lio_kaitai_stru
|
|
|
34558
34686
|
throw new $c_s_MatchError(bytes)
|
|
34559
34687
|
}
|
|
34560
34688
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeInstream)) {
|
|
34561
|
-
var
|
|
34562
|
-
var name = $n($as_Lio_kaitai_struct_format_ClassSpec($n($n(
|
|
34689
|
+
var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeInstream(dataType);
|
|
34690
|
+
var name = $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;
|
|
34563
34691
|
var this$2 = $n(name);
|
|
34564
34692
|
return (("LazyBound(lambda: " + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", "__", "")) + ")")
|
|
34565
34693
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
|
|
34566
|
-
var
|
|
34567
|
-
var x1$3 = $n(
|
|
34694
|
+
var x11 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(dataType);
|
|
34695
|
+
var x1$3 = $n(x11).Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__f_bytes;
|
|
34568
34696
|
if ((x1$3 instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesLimitType)) {
|
|
34569
34697
|
var x2$2 = $as_Lio_kaitai_struct_datatype_DataType$BytesLimitType(x1$3);
|
|
34570
34698
|
var size = $n(x2$2).Lio_kaitai_struct_datatype_DataType$BytesLimitType__f_size;
|
|
34571
|
-
var
|
|
34572
|
-
var
|
|
34573
|
-
var
|
|
34574
|
-
|
|
34699
|
+
var this$3 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator);
|
|
34700
|
+
var $$x1 = this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(size, 0);
|
|
34701
|
+
var name$1 = $n($as_Lio_kaitai_struct_format_ClassSpec($n($n(x11).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O())).Lio_kaitai_struct_format_ClassSpec__f_name;
|
|
34702
|
+
var this$5 = $n(name$1);
|
|
34703
|
+
return (((("FixedSized(" + $$x1) + ", LazyBound(lambda: ") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$5, "", "__", "")) + "))")
|
|
34575
34704
|
} else {
|
|
34576
34705
|
return "???"
|
|
34577
34706
|
}
|
|
34578
34707
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
34579
|
-
var
|
|
34580
|
-
var $$x2 = this.typeToStr__Lio_kaitai_struct_datatype_DataType__T($n(
|
|
34581
|
-
var name$2 = $n($as_Lio_kaitai_struct_format_EnumSpec($n($n(
|
|
34582
|
-
var this$
|
|
34583
|
-
return (((("Enum(" + $$x2) + ", ") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$
|
|
34708
|
+
var x12 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(dataType);
|
|
34709
|
+
var $$x2 = this.typeToStr__Lio_kaitai_struct_datatype_DataType__T($n(x12).Lio_kaitai_struct_datatype_DataType$EnumType__f_basedOn);
|
|
34710
|
+
var name$2 = $n($as_Lio_kaitai_struct_format_EnumSpec($n($n(x12).Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec).get__O())).Lio_kaitai_struct_format_EnumSpec__f_name;
|
|
34711
|
+
var this$7 = $n(name$2);
|
|
34712
|
+
return (((("Enum(" + $$x2) + ", ") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$7, "", "__", "")) + ")")
|
|
34584
34713
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
34585
|
-
var
|
|
34586
|
-
return this.attrSwitchType__Lio_kaitai_struct_datatype_DataType$SwitchType__T(
|
|
34714
|
+
var x13 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(dataType);
|
|
34715
|
+
return this.attrSwitchType__Lio_kaitai_struct_datatype_DataType$SwitchType__T(x13)
|
|
34587
34716
|
} else {
|
|
34588
34717
|
return "???"
|
|
34589
34718
|
}
|
|
@@ -34619,7 +34748,9 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrBytesLimitType__Lio_ka
|
|
|
34619
34748
|
var padStr = $n($$x2).format$extension__T__sci_Seq__T("\\x%02X", $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1));
|
|
34620
34749
|
var subcon3 = (((("NullStripped(" + subcon2) + ", pad=b'") + padStr) + "')")
|
|
34621
34750
|
};
|
|
34622
|
-
|
|
34751
|
+
var this$9 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator);
|
|
34752
|
+
var v = $n(blt).Lio_kaitai_struct_datatype_DataType$BytesLimitType__f_size;
|
|
34753
|
+
return (((("FixedSized(" + this$9.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ", ") + subcon3) + ")")
|
|
34623
34754
|
});
|
|
34624
34755
|
$c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrBytesTerminatedType__Lio_kaitai_struct_datatype_DataType$BytesTerminatedType__T__T = (function(btt, subcon) {
|
|
34625
34756
|
var $$x1 = $m_sc_StringOps$();
|
|
@@ -34648,7 +34779,7 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrSwitchType__Lio_kaitai
|
|
|
34648
34779
|
var evidence$16 = this$3.sci_TreeMap__f_ordering;
|
|
34649
34780
|
var it = new $c_sci_RedBlackTree$EntriesIterator(tree, start, evidence$16);
|
|
34650
34781
|
while (it.hasNext__Z()) {
|
|
34651
|
-
var this$
|
|
34782
|
+
var this$7 = $n(b);
|
|
34652
34783
|
var arg1 = it.next__O();
|
|
34653
34784
|
var x0$2 = $as_T2(arg1);
|
|
34654
34785
|
if ((x0$2 === null)) {
|
|
@@ -34656,25 +34787,28 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.attrSwitchType__Lio_kaitai
|
|
|
34656
34787
|
};
|
|
34657
34788
|
var caseExpr$1 = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x0$2).T2__f__1);
|
|
34658
34789
|
var caseType = $as_Lio_kaitai_struct_datatype_DataType($n(x0$2).T2__f__2);
|
|
34659
|
-
var
|
|
34660
|
-
this$6.
|
|
34790
|
+
var this$6 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator);
|
|
34791
|
+
var elem = (((this$6.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(caseExpr$1, 0) + ": ") + this.typeToStr__Lio_kaitai_struct_datatype_DataType__T(caseType)) + ", ");
|
|
34792
|
+
this$7.addOne__O__scm_Growable(elem)
|
|
34661
34793
|
};
|
|
34662
34794
|
var cases = $as_sci_Iterable($n(b).result__O());
|
|
34663
|
-
var this$
|
|
34795
|
+
var this$8 = $n($n(st).Lio_kaitai_struct_datatype_DataType$SwitchType__f_cases);
|
|
34664
34796
|
var key = $m_Lio_kaitai_struct_datatype_DataType$SwitchType$().Lio_kaitai_struct_datatype_DataType$SwitchType$__f_ELSE_CONST;
|
|
34665
|
-
var this$
|
|
34666
|
-
if (this$
|
|
34797
|
+
var this$9 = $n($m_sci_RedBlackTree$().get__sci_RedBlackTree$Tree__O__s_math_Ordering__s_Option(this$8.sci_TreeMap__f_tree, key, this$8.sci_TreeMap__f_ordering));
|
|
34798
|
+
if (this$9.isEmpty__Z()) {
|
|
34667
34799
|
var $$x1 = $m_s_None$()
|
|
34668
34800
|
} else {
|
|
34669
|
-
var arg1$1 = this$
|
|
34801
|
+
var arg1$1 = this$9.get__O();
|
|
34670
34802
|
var t = $as_Lio_kaitai_struct_datatype_DataType(arg1$1);
|
|
34671
34803
|
var $$x1 = new $c_s_Some((", default=" + this.typeToStr__Lio_kaitai_struct_datatype_DataType__T(t)))
|
|
34672
34804
|
};
|
|
34673
|
-
var this$
|
|
34674
|
-
var defaultSuffix = $as_T((this$
|
|
34675
|
-
var
|
|
34676
|
-
var
|
|
34677
|
-
|
|
34805
|
+
var this$10 = $n($$x1);
|
|
34806
|
+
var defaultSuffix = $as_T((this$10.isEmpty__Z() ? "" : this$10.get__O()));
|
|
34807
|
+
var this$11 = $n(this.Lio_kaitai_struct_ConstructClassCompiler__f_translator);
|
|
34808
|
+
var v = $n(st).Lio_kaitai_struct_datatype_DataType$SwitchType__f_on;
|
|
34809
|
+
var $$x2 = this$11.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0);
|
|
34810
|
+
var this$12 = $n(cases);
|
|
34811
|
+
return (((((("Switch(" + $$x2) + ", {") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$12, "", "", "")) + "}") + defaultSuffix) + ")")
|
|
34678
34812
|
});
|
|
34679
34813
|
$c_Lio_kaitai_struct_ConstructClassCompiler.prototype.signToStr__Z__T = (function(signed) {
|
|
34680
34814
|
return (signed ? "s" : "u")
|
|
@@ -35116,7 +35250,7 @@ $c_Lio_kaitai_struct_GraphvizClassCompiler.prototype.compileSwitch__T__Lio_kaita
|
|
|
35116
35250
|
$n(this.Lio_kaitai_struct_GraphvizClassCompiler__f_extraClusterLines).inc__V();
|
|
35117
35251
|
$n(this.Lio_kaitai_struct_GraphvizClassCompiler__f_extraClusterLines).puts__T__V((((("<TR>" + this.Lio_kaitai_struct_GraphvizClassCompiler__f_SWITCH_TH_START) + "case</TD>") + this.Lio_kaitai_struct_GraphvizClassCompiler__f_SWITCH_TH_START) + "type</TD></TR>"));
|
|
35118
35252
|
var lineNum = new $c_sr_IntRef(0);
|
|
35119
|
-
var this$
|
|
35253
|
+
var this$7 = $n($n(st).Lio_kaitai_struct_datatype_DataType$SwitchType__f_cases);
|
|
35120
35254
|
var f = new $c_sjsr_AnonFunction1(((x0$1$2) => {
|
|
35121
35255
|
var x0$1 = $as_T2(x0$1$2);
|
|
35122
35256
|
if ((x0$1 !== null)) {
|
|
@@ -35124,15 +35258,17 @@ $c_Lio_kaitai_struct_GraphvizClassCompiler.prototype.compileSwitch__T__Lio_kaita
|
|
|
35124
35258
|
var caseType = $as_Lio_kaitai_struct_datatype_DataType($n(x0$1).T2__f__2);
|
|
35125
35259
|
if ((caseType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
35126
35260
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(caseType);
|
|
35127
|
-
var
|
|
35261
|
+
var $$x1 = $m_Lio_kaitai_struct_GraphvizClassCompiler$();
|
|
35262
|
+
var this$4 = $n(this.Lio_kaitai_struct_GraphvizClassCompiler__f_translator);
|
|
35263
|
+
var exprStr = $n($$x1).htmlEscape__T__T(this$4.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(caseExpr, 0));
|
|
35128
35264
|
var portName = ("case" + lineNum.sr_IntRef__f_elem);
|
|
35129
35265
|
lineNum.sr_IntRef__f_elem = ((1 + lineNum.sr_IntRef__f_elem) | 0);
|
|
35130
35266
|
$n(this.Lio_kaitai_struct_GraphvizClassCompiler__f_extraClusterLines).puts__T__V((((((("<TR><TD>" + exprStr) + "</TD><TD PORT=\"") + portName) + "\">") + $m_Lio_kaitai_struct_GraphvizClassCompiler$().type2display__sci_List__T($n(x2).Lio_kaitai_struct_datatype_DataType$UserType__f_name)) + "</TD></TR>"));
|
|
35131
|
-
var this$
|
|
35132
|
-
var $$
|
|
35267
|
+
var this$6 = $n(this.Lio_kaitai_struct_GraphvizClassCompiler__f_links);
|
|
35268
|
+
var $$x2 = this.Lio_kaitai_struct_GraphvizClassCompiler__f_currentTable;
|
|
35133
35269
|
var name = $n(x2).Lio_kaitai_struct_datatype_DataType$UserType__f_name;
|
|
35134
|
-
var elem$1 = new $c_T3((((($$
|
|
35135
|
-
return this$
|
|
35270
|
+
var elem$1 = new $c_T3((((($$x2 + "_") + attrName) + "_switch:") + portName), ($as_T($n(name).last__O()) + "__seq"), this.Lio_kaitai_struct_GraphvizClassCompiler__f_STYLE_EDGE_TYPE);
|
|
35271
|
+
return this$6.addOne__O__scm_ListBuffer(elem$1)
|
|
35136
35272
|
} else {
|
|
35137
35273
|
return (void 0)
|
|
35138
35274
|
}
|
|
@@ -35140,7 +35276,7 @@ $c_Lio_kaitai_struct_GraphvizClassCompiler.prototype.compileSwitch__T__Lio_kaita
|
|
|
35140
35276
|
throw new $c_s_MatchError(x0$1)
|
|
35141
35277
|
}
|
|
35142
35278
|
}));
|
|
35143
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$
|
|
35279
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$7.sci_TreeMap__f_tree, f);
|
|
35144
35280
|
$n(this.Lio_kaitai_struct_GraphvizClassCompiler__f_extraClusterLines).dec__V();
|
|
35145
35281
|
$n(this.Lio_kaitai_struct_GraphvizClassCompiler__f_extraClusterLines).puts__T__V("</TABLE>>];")
|
|
35146
35282
|
});
|
|
@@ -35155,11 +35291,11 @@ $c_Lio_kaitai_struct_GraphvizClassCompiler.prototype.dataTypeSizeAsString__Lio_k
|
|
|
35155
35291
|
var basedOn = $n(x4).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_bytes;
|
|
35156
35292
|
return this.dataTypeSizeAsString__Lio_kaitai_struct_datatype_DataType__T__T(basedOn, attrName)
|
|
35157
35293
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
|
|
35158
|
-
var
|
|
35159
|
-
return this.dataTypeSizeAsString__Lio_kaitai_struct_datatype_DataType__T__T($n(
|
|
35294
|
+
var x7 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(dataType);
|
|
35295
|
+
return this.dataTypeSizeAsString__Lio_kaitai_struct_datatype_DataType__T__T($n(x7).Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__f_bytes, attrName)
|
|
35160
35296
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
35161
|
-
var
|
|
35162
|
-
var basedOn$2 = $n(
|
|
35297
|
+
var x8 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(dataType);
|
|
35298
|
+
var basedOn$2 = $n(x8).Lio_kaitai_struct_datatype_DataType$EnumType__f_basedOn;
|
|
35163
35299
|
return this.dataTypeSizeAsString__Lio_kaitai_struct_datatype_DataType__T__T(basedOn$2, attrName)
|
|
35164
35300
|
} else {
|
|
35165
35301
|
var x1$2 = $m_Lio_kaitai_struct_precompile_CalculateSeqSizes$().dataTypeBitsSize__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_Sized(dataType);
|
|
@@ -35208,7 +35344,9 @@ $c_Lio_kaitai_struct_GraphvizClassCompiler.prototype.expression__Lio_kaitai_stru
|
|
|
35208
35344
|
this$2.addOne__O__scm_ListBuffer(elem);
|
|
35209
35345
|
these = $as_sci_List($n(these).tail__O())
|
|
35210
35346
|
};
|
|
35211
|
-
|
|
35347
|
+
var $$x1 = $m_Lio_kaitai_struct_GraphvizClassCompiler$();
|
|
35348
|
+
var this$3 = $n(this.Lio_kaitai_struct_GraphvizClassCompiler__f_translator);
|
|
35349
|
+
return $n($$x1).htmlEscape__T__T(this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(e, 0))
|
|
35212
35350
|
});
|
|
35213
35351
|
$c_Lio_kaitai_struct_GraphvizClassCompiler.prototype.affectedVars__Lio_kaitai_struct_exprlang_Ast$expr__sci_List = (function(e) {
|
|
35214
35352
|
if ((e instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BoolOp)) {
|
|
@@ -35502,13 +35640,13 @@ $c_Lio_kaitai_struct_GraphvizClassCompiler$.prototype.dataTypeName__Lio_kaitai_s
|
|
|
35502
35640
|
};
|
|
35503
35641
|
return (((("str(" + bytesStr) + comma) + encoding) + ")")
|
|
35504
35642
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
35505
|
-
var
|
|
35506
|
-
var name = $n(
|
|
35507
|
-
var basedOn$2 = $n(
|
|
35643
|
+
var x9 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(dataType);
|
|
35644
|
+
var name = $n(x9).Lio_kaitai_struct_datatype_DataType$EnumType__f_name;
|
|
35645
|
+
var basedOn$2 = $n(x9).Lio_kaitai_struct_datatype_DataType$EnumType__f_basedOn;
|
|
35508
35646
|
return ((this.dataTypeName__Lio_kaitai_struct_datatype_DataType__T(basedOn$2) + "\u2192") + this.type2display__sci_List__T(name))
|
|
35509
35647
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BitsType)) {
|
|
35510
|
-
var
|
|
35511
|
-
var width = $n(
|
|
35648
|
+
var x10 = $as_Lio_kaitai_struct_datatype_DataType$BitsType(dataType);
|
|
35649
|
+
var width = $n(x10).Lio_kaitai_struct_datatype_DataType$BitsType__f_width;
|
|
35512
35650
|
return ("b" + width)
|
|
35513
35651
|
} else {
|
|
35514
35652
|
return $n(dataType).toString__T()
|
|
@@ -36006,7 +36144,13 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml__sci_Map__sci_List__Lio
|
|
|
36006
36144
|
} catch (e) {
|
|
36007
36145
|
if ((e instanceof $c_Lio_kaitai_struct_exprlang_Expressions$ParseException)) {
|
|
36008
36146
|
var epe = $as_Lio_kaitai_struct_exprlang_Expressions$ParseException(e);
|
|
36009
|
-
|
|
36147
|
+
var $$x1 = $m_Lio_kaitai_struct_problems_KSYParseError$();
|
|
36148
|
+
var this$5 = $n(path);
|
|
36149
|
+
$n($m_s_package$().s_package$__f_List);
|
|
36150
|
+
var array = ["type"];
|
|
36151
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
36152
|
+
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
36153
|
+
throw $n($n($$x1).expression__Lio_kaitai_struct_exprlang_Expressions$ParseException__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(epe, this$5.appendedAll__sc_IterableOnce__sci_List(suffix)))
|
|
36010
36154
|
} else {
|
|
36011
36155
|
throw e
|
|
36012
36156
|
}
|
|
@@ -36014,47 +36158,54 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml__sci_Map__sci_List__Lio
|
|
|
36014
36158
|
});
|
|
36015
36159
|
$c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Lio_kaitai_struct_format_MetaSpec__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrSpec = (function(srcMap, path, metaDef, id) {
|
|
36016
36160
|
var doc = $m_Lio_kaitai_struct_format_DocSpec$().fromYaml__sci_Map__sci_List__Lio_kaitai_struct_format_DocSpec(srcMap, path);
|
|
36017
|
-
var
|
|
36018
|
-
var
|
|
36019
|
-
|
|
36161
|
+
var $$x2 = $m_Lio_kaitai_struct_format_ProcessExpr$();
|
|
36162
|
+
var $$x1 = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueStr__sci_Map__T__sci_List__s_Option(srcMap, "process", path);
|
|
36163
|
+
var this$5 = $n(path);
|
|
36164
|
+
$n($m_s_package$().s_package$__f_List);
|
|
36165
|
+
var array = ["process"];
|
|
36166
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
36167
|
+
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
36168
|
+
var process = $n($$x2).fromStr__s_Option__sci_List__s_Option($$x1, this$5.appendedAll__sc_IterableOnce__sci_List(suffix));
|
|
36169
|
+
var this$6 = $n($n(srcMap).get__O__s_Option("contents"));
|
|
36170
|
+
if (this$6.isEmpty__Z()) {
|
|
36020
36171
|
var contents = $m_s_None$()
|
|
36021
36172
|
} else {
|
|
36022
|
-
var arg1 = this$
|
|
36023
|
-
var $$
|
|
36024
|
-
var this$
|
|
36173
|
+
var arg1 = this$6.get__O();
|
|
36174
|
+
var $$x3 = $m_Lio_kaitai_struct_format_AttrSpec$();
|
|
36175
|
+
var this$11 = $n(path);
|
|
36025
36176
|
$n($m_s_package$().s_package$__f_List);
|
|
36026
|
-
var array = ["contents"];
|
|
36027
|
-
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
36028
|
-
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
36029
|
-
var contents = new $c_s_Some($n($$
|
|
36177
|
+
var array$1 = ["contents"];
|
|
36178
|
+
var elems$1 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1);
|
|
36179
|
+
var suffix$1 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$1);
|
|
36180
|
+
var contents = new $c_s_Some($n($$x3).parseContentSpec__O__sci_List__AB(arg1, this$11.appendedAll__sc_IterableOnce__sci_List(suffix$1)))
|
|
36030
36181
|
};
|
|
36031
36182
|
var size = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueExpression__sci_Map__T__sci_List__s_Option(srcMap, "size", path);
|
|
36032
|
-
var this$
|
|
36033
|
-
var sizeEos = $uZ((this$
|
|
36183
|
+
var this$12 = $n($m_Lio_kaitai_struct_format_ParseUtils$().getOptValueBool__sci_Map__T__sci_List__s_Option(srcMap, "size-eos", path));
|
|
36184
|
+
var sizeEos = $uZ((this$12.isEmpty__Z() ? false : this$12.get__O()));
|
|
36034
36185
|
var ifExpr = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueExpression__sci_Map__T__sci_List__s_Option(srcMap, "if", path);
|
|
36035
36186
|
var encoding = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueStr__sci_Map__T__sci_List__s_Option(srcMap, "encoding", path);
|
|
36036
36187
|
var terminator = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueInt__sci_Map__T__sci_List__s_Option(srcMap, "terminator", path);
|
|
36037
|
-
var this$
|
|
36038
|
-
var consume = $uZ((this$
|
|
36039
|
-
var this$
|
|
36040
|
-
var include = $uZ((this$
|
|
36041
|
-
var this$
|
|
36042
|
-
var eosError = $uZ((this$
|
|
36188
|
+
var this$13 = $n($m_Lio_kaitai_struct_format_ParseUtils$().getOptValueBool__sci_Map__T__sci_List__s_Option(srcMap, "consume", path));
|
|
36189
|
+
var consume = $uZ((this$13.isEmpty__Z() || this$13.get__O()));
|
|
36190
|
+
var this$14 = $n($m_Lio_kaitai_struct_format_ParseUtils$().getOptValueBool__sci_Map__T__sci_List__s_Option(srcMap, "include", path));
|
|
36191
|
+
var include = $uZ((this$14.isEmpty__Z() ? false : this$14.get__O()));
|
|
36192
|
+
var this$15 = $n($m_Lio_kaitai_struct_format_ParseUtils$().getOptValueBool__sci_Map__T__sci_List__s_Option(srcMap, "eos-error", path));
|
|
36193
|
+
var eosError = $uZ((this$15.isEmpty__Z() || this$15.get__O()));
|
|
36043
36194
|
var padRight = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueInt__sci_Map__T__sci_List__s_Option(srcMap, "pad-right", path);
|
|
36044
36195
|
var enumOpt = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueStr__sci_Map__T__sci_List__s_Option(srcMap, "enum", path);
|
|
36045
36196
|
var parent = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueExpression__sci_Map__T__sci_List__s_Option(srcMap, "parent", path);
|
|
36046
|
-
var this$
|
|
36047
|
-
if (this$
|
|
36197
|
+
var this$16 = $n($n(srcMap).get__O__s_Option("valid"));
|
|
36198
|
+
if (this$16.isEmpty__Z()) {
|
|
36048
36199
|
var valid = $m_s_None$()
|
|
36049
36200
|
} else {
|
|
36050
|
-
var arg1$1 = this$
|
|
36051
|
-
var $$
|
|
36052
|
-
var this$
|
|
36201
|
+
var arg1$1 = this$16.get__O();
|
|
36202
|
+
var $$x4 = $m_Lio_kaitai_struct_format_ValidationSpec$();
|
|
36203
|
+
var this$21 = $n(path);
|
|
36053
36204
|
$n($m_s_package$().s_package$__f_List);
|
|
36054
|
-
var array$
|
|
36055
|
-
var elems$
|
|
36056
|
-
var suffix$
|
|
36057
|
-
var valid = new $c_s_Some($n($$
|
|
36205
|
+
var array$2 = ["valid"];
|
|
36206
|
+
var elems$2 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$2);
|
|
36207
|
+
var suffix$2 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$2);
|
|
36208
|
+
var valid = new $c_s_Some($n($$x4).fromYaml__O__sci_List__Lio_kaitai_struct_format_ValidationSpec(arg1$1, this$21.appendedAll__sc_IterableOnce__sci_List(suffix$2)))
|
|
36058
36209
|
};
|
|
36059
36210
|
var x1 = new $c_T2(contents, valid);
|
|
36060
36211
|
matchEnd16: {
|
|
@@ -36072,13 +36223,13 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36072
36223
|
var byteArray = $asArrayOf_B($n(x7).s_Some__f_value, 1);
|
|
36073
36224
|
var x$4 = $m_s_None$();
|
|
36074
36225
|
if ((x$4 === p6)) {
|
|
36075
|
-
var $$
|
|
36226
|
+
var $$x14 = $m_s_Predef$();
|
|
36076
36227
|
$m_sc_ArrayOps$();
|
|
36077
36228
|
var f = ((x$6$2) => {
|
|
36078
36229
|
var x$6 = $uB(x$6$2);
|
|
36079
|
-
var this$
|
|
36230
|
+
var this$23 = $m_s_math_BigInt$();
|
|
36080
36231
|
var i = (255 & x$6);
|
|
36081
|
-
return new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(this$
|
|
36232
|
+
return new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(this$23.apply__I__s_math_BigInt(i))
|
|
36082
36233
|
});
|
|
36083
36234
|
var len = $n(byteArray).u.length;
|
|
36084
36235
|
var ys = new ($d_Lio_kaitai_struct_exprlang_Ast$expr$IntNum.getArrayOf().constr)(len);
|
|
@@ -36087,81 +36238,81 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36087
36238
|
if ((byteArray instanceof $ac_O)) {
|
|
36088
36239
|
var x2 = $asArrayOf_O(byteArray, 1);
|
|
36089
36240
|
while ((i$1 < len)) {
|
|
36090
|
-
var $$
|
|
36241
|
+
var $$x5 = i$1;
|
|
36091
36242
|
var arg1$2 = $n(x2).get(i$1);
|
|
36092
|
-
ys.set($$
|
|
36243
|
+
ys.set($$x5, f(arg1$2));
|
|
36093
36244
|
i$1 = ((1 + i$1) | 0)
|
|
36094
36245
|
}
|
|
36095
36246
|
} else if ((byteArray instanceof $ac_I)) {
|
|
36096
36247
|
var x3 = $asArrayOf_I(byteArray, 1);
|
|
36097
36248
|
while ((i$1 < len)) {
|
|
36098
|
-
var $$
|
|
36249
|
+
var $$x6 = i$1;
|
|
36099
36250
|
var arg1$3 = $n(x3).get(i$1);
|
|
36100
|
-
ys.set($$
|
|
36251
|
+
ys.set($$x6, f(arg1$3));
|
|
36101
36252
|
i$1 = ((1 + i$1) | 0)
|
|
36102
36253
|
}
|
|
36103
36254
|
} else if ((byteArray instanceof $ac_D)) {
|
|
36104
36255
|
var x4 = $asArrayOf_D(byteArray, 1);
|
|
36105
36256
|
while ((i$1 < len)) {
|
|
36106
|
-
var $$
|
|
36257
|
+
var $$x7 = i$1;
|
|
36107
36258
|
var arg1$4 = $n(x4).get(i$1);
|
|
36108
|
-
ys.set($$
|
|
36259
|
+
ys.set($$x7, f(arg1$4));
|
|
36109
36260
|
i$1 = ((1 + i$1) | 0)
|
|
36110
36261
|
}
|
|
36111
36262
|
} else if ((byteArray instanceof $ac_J)) {
|
|
36112
36263
|
var x5 = $asArrayOf_J(byteArray, 1);
|
|
36113
36264
|
while ((i$1 < len)) {
|
|
36114
|
-
var $$
|
|
36265
|
+
var $$x8 = i$1;
|
|
36115
36266
|
var t = $n(x5).get(i$1);
|
|
36116
36267
|
var lo = t.RTLong__f_lo;
|
|
36117
36268
|
var hi = t.RTLong__f_hi;
|
|
36118
|
-
ys.set($$
|
|
36269
|
+
ys.set($$x8, f(new $c_RTLong(lo, hi)));
|
|
36119
36270
|
i$1 = ((1 + i$1) | 0)
|
|
36120
36271
|
}
|
|
36121
36272
|
} else if ((byteArray instanceof $ac_F)) {
|
|
36122
36273
|
var x6 = $asArrayOf_F(byteArray, 1);
|
|
36123
36274
|
while ((i$1 < len)) {
|
|
36124
|
-
var $$
|
|
36275
|
+
var $$x9 = i$1;
|
|
36125
36276
|
var arg1$5 = $n(x6).get(i$1);
|
|
36126
|
-
ys.set($$
|
|
36277
|
+
ys.set($$x9, f(arg1$5));
|
|
36127
36278
|
i$1 = ((1 + i$1) | 0)
|
|
36128
36279
|
}
|
|
36129
36280
|
} else if ((byteArray instanceof $ac_C)) {
|
|
36130
36281
|
var x7$1 = $asArrayOf_C(byteArray, 1);
|
|
36131
36282
|
while ((i$1 < len)) {
|
|
36132
|
-
var $$
|
|
36283
|
+
var $$x10 = i$1;
|
|
36133
36284
|
var arg1$6 = $n(x7$1).get(i$1);
|
|
36134
|
-
ys.set($$
|
|
36285
|
+
ys.set($$x10, f($bC(arg1$6)));
|
|
36135
36286
|
i$1 = ((1 + i$1) | 0)
|
|
36136
36287
|
}
|
|
36137
36288
|
} else if ((byteArray !== null)) {
|
|
36138
36289
|
while ((i$1 < len)) {
|
|
36139
|
-
var $$
|
|
36290
|
+
var $$x11 = i$1;
|
|
36140
36291
|
var arg1$7 = $n(byteArray).get(i$1);
|
|
36141
|
-
ys.set($$
|
|
36292
|
+
ys.set($$x11, f(arg1$7));
|
|
36142
36293
|
i$1 = ((1 + i$1) | 0)
|
|
36143
36294
|
}
|
|
36144
36295
|
} else if ((byteArray instanceof $ac_S)) {
|
|
36145
36296
|
var x9 = $asArrayOf_S(byteArray, 1);
|
|
36146
36297
|
while ((i$1 < len)) {
|
|
36147
|
-
var $$
|
|
36298
|
+
var $$x12 = i$1;
|
|
36148
36299
|
var arg1$8 = $n(x9).get(i$1);
|
|
36149
|
-
ys.set($$
|
|
36300
|
+
ys.set($$x12, f(arg1$8));
|
|
36150
36301
|
i$1 = ((1 + i$1) | 0)
|
|
36151
36302
|
}
|
|
36152
36303
|
} else if ((byteArray instanceof $ac_Z)) {
|
|
36153
36304
|
var x10 = $asArrayOf_Z(byteArray, 1);
|
|
36154
36305
|
while ((i$1 < len)) {
|
|
36155
|
-
var $$
|
|
36306
|
+
var $$x13 = i$1;
|
|
36156
36307
|
var arg1$9 = $n(x10).get(i$1);
|
|
36157
|
-
ys.set($$
|
|
36308
|
+
ys.set($$x13, f(arg1$9));
|
|
36158
36309
|
i$1 = ((1 + i$1) | 0)
|
|
36159
36310
|
}
|
|
36160
36311
|
} else {
|
|
36161
36312
|
throw new $c_s_MatchError(byteArray)
|
|
36162
36313
|
}
|
|
36163
36314
|
};
|
|
36164
|
-
var valid2 = new $c_s_Some(new $c_Lio_kaitai_struct_format_ValidationEq(new $c_Lio_kaitai_struct_exprlang_Ast$expr$List($n($$
|
|
36315
|
+
var valid2 = new $c_s_Some(new $c_Lio_kaitai_struct_format_ValidationEq(new $c_Lio_kaitai_struct_exprlang_Ast$expr$List($n($$x14).copyArrayToImmutableIndexedSeq__O__sci_IndexedSeq(ys))));
|
|
36165
36316
|
break matchEnd16
|
|
36166
36317
|
}
|
|
36167
36318
|
};
|
|
@@ -36188,17 +36339,22 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36188
36339
|
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)
|
|
36189
36340
|
} else {
|
|
36190
36341
|
if ((!$is_sci_Map(x$9))) {
|
|
36191
|
-
var $$
|
|
36192
|
-
var this$
|
|
36342
|
+
var $$x15 = $m_Lio_kaitai_struct_problems_KSYParseError$();
|
|
36343
|
+
var this$35 = $n(path);
|
|
36193
36344
|
$n($m_s_package$().s_package$__f_List);
|
|
36194
|
-
var array$
|
|
36195
|
-
var elems$
|
|
36196
|
-
var suffix$
|
|
36197
|
-
throw $n($n($$
|
|
36345
|
+
var array$4 = ["type"];
|
|
36346
|
+
var elems$4 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$4);
|
|
36347
|
+
var suffix$4 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$4);
|
|
36348
|
+
throw $n($n($$x15).withText__T__sci_List__Lio_kaitai_struct_problems_CompilationProblemException(("expected map or string, found " + x$9), this$35.appendedAll__sc_IterableOnce__sci_List(suffix$4)))
|
|
36198
36349
|
};
|
|
36199
36350
|
var x3$2 = $as_sci_Map(x$9);
|
|
36200
36351
|
var switchMapStr = $m_Lio_kaitai_struct_format_ParseUtils$().anyMapToStrMap__sci_Map__sci_List__sci_Map(x3$2, path);
|
|
36201
|
-
var
|
|
36352
|
+
var this$30 = $n(path);
|
|
36353
|
+
$n($m_s_package$().s_package$__f_List);
|
|
36354
|
+
var array$3 = ["type"];
|
|
36355
|
+
var elems$3 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$3);
|
|
36356
|
+
var suffix$3 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$3);
|
|
36357
|
+
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$30.appendedAll__sc_IterableOnce__sci_List(suffix$3), metaDef, yamlAttrArgs)
|
|
36202
36358
|
}
|
|
36203
36359
|
};
|
|
36204
36360
|
var x1$4 = $m_Lio_kaitai_struct_format_RepeatSpec$().fromYaml__sci_Map__sci_List__T2(srcMap, path);
|
|
@@ -36207,8 +36363,8 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36207
36363
|
};
|
|
36208
36364
|
var repeatSpec = $as_Lio_kaitai_struct_format_RepeatSpec($n(x1$4).T2__f__1);
|
|
36209
36365
|
var legalRepeatKeys = $as_sci_Set($n(x1$4).T2__f__2);
|
|
36210
|
-
var this$
|
|
36211
|
-
var this$
|
|
36366
|
+
var this$36 = $n(this.Lio_kaitai_struct_format_AttrSpec$__f_LEGAL_KEYS);
|
|
36367
|
+
var this$38 = $n(this$36.concat__sc_IterableOnce__sc_SetOps(legalRepeatKeys));
|
|
36212
36368
|
if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType)) {
|
|
36213
36369
|
var that = this.Lio_kaitai_struct_format_AttrSpec$__f_LEGAL_KEYS_BYTES
|
|
36214
36370
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType)) {
|
|
@@ -36220,11 +36376,11 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.fromYaml2__sci_Map__sci_List__Li
|
|
|
36220
36376
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
36221
36377
|
var that = this.Lio_kaitai_struct_format_AttrSpec$__f_LEGAL_KEYS_BYTES
|
|
36222
36378
|
} else {
|
|
36223
|
-
var this$
|
|
36224
|
-
var elems$
|
|
36225
|
-
var that = this$
|
|
36379
|
+
var this$37 = $n($m_s_Predef$().s_Predef$__f_Set);
|
|
36380
|
+
var elems$5 = $m_sci_Nil$();
|
|
36381
|
+
var that = this$37.from__sc_IterableOnce__sci_Set(elems$5)
|
|
36226
36382
|
};
|
|
36227
|
-
var legalKeys = $as_sci_Set(this$
|
|
36383
|
+
var legalKeys = $as_sci_Set(this$38.concat__sc_IterableOnce__sc_SetOps(that));
|
|
36228
36384
|
$m_Lio_kaitai_struct_format_ParseUtils$().ensureLegalKeys__sci_Map__sci_Set__sci_List__s_Option__V(srcMap, legalKeys, path, $m_s_None$());
|
|
36229
36385
|
return new $c_Lio_kaitai_struct_format_AttrSpec(path, id, dataType, new $c_Lio_kaitai_struct_format_ConditionalSpec(ifExpr, repeatSpec), valid2, doc)
|
|
36230
36386
|
});
|
|
@@ -36455,7 +36611,7 @@ $c_Lio_kaitai_struct_format_ClassSpec$.prototype.fromYaml__O__s_Option__sci_List
|
|
|
36455
36611
|
var $$x2 = $m_Lio_kaitai_struct_problems_KSYParseError$();
|
|
36456
36612
|
var this$41 = $n(path);
|
|
36457
36613
|
$n($m_s_package$().s_package$__f_List);
|
|
36458
|
-
var array$6 = ["meta"
|
|
36614
|
+
var array$6 = ["meta"];
|
|
36459
36615
|
var elems$6 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$6);
|
|
36460
36616
|
var suffix$7 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$6);
|
|
36461
36617
|
throw $n($n($$x2).withText__T__sci_List__Lio_kaitai_struct_problems_CompilationProblemException("no `meta/id` encountered in top-level class spec", this$41.appendedAll__sc_IterableOnce__sci_List(suffix$7)))
|
|
@@ -37646,18 +37802,24 @@ function $f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidate__Li
|
|
|
37646
37802
|
var this$15 = $n(attr);
|
|
37647
37803
|
$$x7.Lio_kaitai_struct_ClassTypeProvider__f__currentIteratorType = new $c_s_Some($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$15));
|
|
37648
37804
|
var this$16 = $n(attr);
|
|
37649
|
-
$
|
|
37650
|
-
var this$17 = $n(
|
|
37651
|
-
var
|
|
37652
|
-
var
|
|
37653
|
-
var
|
|
37805
|
+
var $$x9 = $f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$16);
|
|
37806
|
+
var this$17 = $n($thiz.translator__Lio_kaitai_struct_translators_AbstractTranslator());
|
|
37807
|
+
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));
|
|
37808
|
+
var $$x8 = this$17.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0);
|
|
37809
|
+
var this$18 = $n($thiz.translator__Lio_kaitai_struct_translators_AbstractTranslator());
|
|
37810
|
+
var v$1 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(attrId);
|
|
37811
|
+
$thiz.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V($$x9, $$x8, this$18.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v$1, 0));
|
|
37812
|
+
var this$19 = $n(attr);
|
|
37813
|
+
var $$x13 = $f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$19);
|
|
37814
|
+
var this$20 = $n(attr);
|
|
37815
|
+
var $$x12 = new $c_Lio_kaitai_struct_datatype_ValidationExprError($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(this$20));
|
|
37654
37816
|
$n($m_s_package$().s_package$__f_List);
|
|
37655
|
-
var $$
|
|
37656
|
-
var $$
|
|
37657
|
-
var this$
|
|
37658
|
-
var array$1 = [$$
|
|
37817
|
+
var $$x11 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(attrId);
|
|
37818
|
+
var $$x10 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName($m_Lio_kaitai_struct_format_IoIdentifier$());
|
|
37819
|
+
var this$21 = $n($n(attr).path__sci_List());
|
|
37820
|
+
var array$1 = [$$x11, $$x10, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str($f_sc_IterableOnceOps__mkString__T__T__T__T(this$21, "/", "/", ""))];
|
|
37659
37821
|
var elems$1 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1);
|
|
37660
|
-
$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, $$
|
|
37822
|
+
$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, $$x13, expr, $$x12, $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$1));
|
|
37661
37823
|
$thiz.blockScopeFooter__V()
|
|
37662
37824
|
} else {
|
|
37663
37825
|
throw new $c_s_MatchError(valid)
|
|
@@ -37702,127 +37864,9 @@ $h_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames.prototype = $c_Lio_kai
|
|
|
37702
37864
|
$c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames.prototype.run__sc_Iterable = (function() {
|
|
37703
37865
|
return $n(this.Lio_kaitai_struct_precompile_CanonicalizeEncodingNames__f_specs).mapRec__F1__sc_Iterable(new $c_sjsr_AnonFunction1(((curClass$2) => {
|
|
37704
37866
|
var curClass = $as_Lio_kaitai_struct_format_ClassSpec(curClass$2);
|
|
37705
|
-
return
|
|
37867
|
+
return $m_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$().canonicalize__Lio_kaitai_struct_format_ClassSpec__sc_Iterable(curClass)
|
|
37706
37868
|
})))
|
|
37707
37869
|
});
|
|
37708
|
-
$c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames.prototype.canonicalize__Lio_kaitai_struct_format_ClassSpec__sc_Iterable = (function(curClass) {
|
|
37709
|
-
var metaProblems = this.canonicalizeMeta__Lio_kaitai_struct_format_MetaSpec__sc_Iterable($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_meta);
|
|
37710
|
-
var this$1 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_seq);
|
|
37711
|
-
var rest = this$1;
|
|
37712
|
-
var h = null;
|
|
37713
|
-
var t = null;
|
|
37714
|
-
while ((rest !== $m_sci_Nil$())) {
|
|
37715
|
-
var arg1 = $n(rest).head__O();
|
|
37716
|
-
var attr = $as_Lio_kaitai_struct_format_AttrSpec(arg1);
|
|
37717
|
-
var it = $n(this.canonicalizeMember__Lio_kaitai_struct_format_MemberSpec__sc_Iterable(attr)).iterator__sc_Iterator();
|
|
37718
|
-
while ($n(it).hasNext__Z()) {
|
|
37719
|
-
var nx = new $c_sci_$colon$colon($n(it).next__O(), $m_sci_Nil$());
|
|
37720
|
-
if ((t === null)) {
|
|
37721
|
-
h = nx
|
|
37722
|
-
} else {
|
|
37723
|
-
$n(t).sci_$colon$colon__f_next = nx
|
|
37724
|
-
};
|
|
37725
|
-
t = nx
|
|
37726
|
-
};
|
|
37727
|
-
rest = $as_sci_List($n(rest).tail__O())
|
|
37728
|
-
};
|
|
37729
|
-
var seqProblems = ((h === null) ? $m_sci_Nil$() : h);
|
|
37730
|
-
var this$2 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_instances);
|
|
37731
|
-
var b = $m_sci_Iterable$().newBuilder__scm_Builder();
|
|
37732
|
-
$m_sci_RedBlackTree$();
|
|
37733
|
-
var tree = this$2.sci_TreeMap__f_tree;
|
|
37734
|
-
$m_sci_RedBlackTree$();
|
|
37735
|
-
var start = $m_s_None$();
|
|
37736
|
-
var evidence$16 = this$2.sci_TreeMap__f_ordering;
|
|
37737
|
-
var it$1 = new $c_sci_RedBlackTree$EntriesIterator(tree, start, evidence$16);
|
|
37738
|
-
while (it$1.hasNext__Z()) {
|
|
37739
|
-
var this$5 = $n(b);
|
|
37740
|
-
var arg1$1 = it$1.next__O();
|
|
37741
|
-
var x0$1 = $as_T2(arg1$1);
|
|
37742
|
-
if ((x0$1 === null)) {
|
|
37743
|
-
throw new $c_s_MatchError(x0$1)
|
|
37744
|
-
};
|
|
37745
|
-
var attr$1 = $as_Lio_kaitai_struct_format_InstanceSpec($n(x0$1).T2__f__2);
|
|
37746
|
-
var xs = this.canonicalizeMember__Lio_kaitai_struct_format_MemberSpec__sc_Iterable(attr$1);
|
|
37747
|
-
this$5.addAll__sc_IterableOnce__scm_Growable(xs)
|
|
37748
|
-
};
|
|
37749
|
-
var instanceProblems = $as_sci_Iterable($n(b).result__O());
|
|
37750
|
-
var this$6 = $n(metaProblems);
|
|
37751
|
-
var this$7 = $n($as_sc_IterableOps(this$6.concat__sc_IterableOnce__O(seqProblems)));
|
|
37752
|
-
return $as_sc_Iterable($n($as_sc_IterableOps(this$7.concat__sc_IterableOnce__O(instanceProblems))).map__F1__O(new $c_sjsr_AnonFunction1(((problem$2) => {
|
|
37753
|
-
var problem = $as_Lio_kaitai_struct_problems_CompilationProblem(problem$2);
|
|
37754
|
-
return $n(problem).localizedInType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_problems_CompilationProblem(curClass)
|
|
37755
|
-
}))))
|
|
37756
|
-
});
|
|
37757
|
-
$c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames.prototype.canonicalizeMeta__Lio_kaitai_struct_format_MetaSpec__sc_Iterable = (function(meta) {
|
|
37758
|
-
var $$x4 = $m_s_Option$();
|
|
37759
|
-
var x1 = $n(meta).Lio_kaitai_struct_format_MetaSpec__f_encoding;
|
|
37760
|
-
if ((x1 instanceof $c_s_Some)) {
|
|
37761
|
-
var x2 = $as_s_Some(x1);
|
|
37762
|
-
var encoding = $as_T($n(x2).s_Some__f_value);
|
|
37763
|
-
var x1$2 = $m_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$().canonicalizeName__T__Z__T2(encoding, ($m_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$(), true));
|
|
37764
|
-
if ((x1$2 === null)) {
|
|
37765
|
-
throw new $c_s_MatchError(x1$2)
|
|
37766
|
-
};
|
|
37767
|
-
var newEncoding = $as_T($n(x1$2).T2__f__1);
|
|
37768
|
-
var problem1 = $as_s_Option($n(x1$2).T2__f__2);
|
|
37769
|
-
$n(meta).Lio_kaitai_struct_format_MetaSpec__f_encoding = new $c_s_Some(newEncoding);
|
|
37770
|
-
var $$x1 = problem1
|
|
37771
|
-
} else {
|
|
37772
|
-
var x = $m_s_None$();
|
|
37773
|
-
if ((!(x === x1))) {
|
|
37774
|
-
throw new $c_s_MatchError(x1)
|
|
37775
|
-
};
|
|
37776
|
-
var $$x1 = $m_s_None$()
|
|
37777
|
-
};
|
|
37778
|
-
var this$1 = $n($$x1);
|
|
37779
|
-
if (this$1.isEmpty__Z()) {
|
|
37780
|
-
var $$x2 = $m_s_None$()
|
|
37781
|
-
} else {
|
|
37782
|
-
var arg1 = this$1.get__O();
|
|
37783
|
-
var problem = $as_Lio_kaitai_struct_problems_CompilationProblem(arg1);
|
|
37784
|
-
var $$x3 = $as_Lio_kaitai_struct_problems_PathLocalizable(problem);
|
|
37785
|
-
var this$6 = $n($n(meta).Lio_kaitai_struct_format_MetaSpec__f_path);
|
|
37786
|
-
$n($m_s_package$().s_package$__f_List);
|
|
37787
|
-
var array = ["encoding"];
|
|
37788
|
-
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
37789
|
-
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
37790
|
-
var $$x2 = new $c_s_Some($n($$x3).localizedInPath__sci_List__Lio_kaitai_struct_problems_CompilationProblem(this$6.appendedAll__sc_IterableOnce__sci_List(suffix)))
|
|
37791
|
-
};
|
|
37792
|
-
return $n($$x4).option2Iterable__s_Option__sc_Iterable($$x2)
|
|
37793
|
-
});
|
|
37794
|
-
$c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames.prototype.canonicalizeMember__Lio_kaitai_struct_format_MemberSpec__sc_Iterable = (function(member) {
|
|
37795
|
-
var $$x4 = $m_s_Option$();
|
|
37796
|
-
var x1 = $n(member).dataType__Lio_kaitai_struct_datatype_DataType();
|
|
37797
|
-
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType)) {
|
|
37798
|
-
var x2 = $as_Lio_kaitai_struct_datatype_DataType$StrFromBytesType(x1);
|
|
37799
|
-
var x1$2 = $m_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$().canonicalizeName__T__Z__T2($n(x2).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding, ($m_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames$(), true));
|
|
37800
|
-
if ((x1$2 === null)) {
|
|
37801
|
-
throw new $c_s_MatchError(x1$2)
|
|
37802
|
-
};
|
|
37803
|
-
var newEncoding = $as_T($n(x1$2).T2__f__1);
|
|
37804
|
-
var problem1 = $as_s_Option($n(x1$2).T2__f__2);
|
|
37805
|
-
$n(x2).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding = newEncoding;
|
|
37806
|
-
var $$x1 = problem1
|
|
37807
|
-
} else {
|
|
37808
|
-
var $$x1 = $m_s_None$()
|
|
37809
|
-
};
|
|
37810
|
-
var this$1 = $n($$x1);
|
|
37811
|
-
if (this$1.isEmpty__Z()) {
|
|
37812
|
-
var $$x2 = $m_s_None$()
|
|
37813
|
-
} else {
|
|
37814
|
-
var arg1 = this$1.get__O();
|
|
37815
|
-
var problem = $as_Lio_kaitai_struct_problems_CompilationProblem(arg1);
|
|
37816
|
-
var $$x3 = $as_Lio_kaitai_struct_problems_PathLocalizable(problem);
|
|
37817
|
-
var this$6 = $n($n(member).path__sci_List());
|
|
37818
|
-
$n($m_s_package$().s_package$__f_List);
|
|
37819
|
-
var array = ["encoding"];
|
|
37820
|
-
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
37821
|
-
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
37822
|
-
var $$x2 = new $c_s_Some($n($$x3).localizedInPath__sci_List__Lio_kaitai_struct_problems_CompilationProblem(this$6.appendedAll__sc_IterableOnce__sci_List(suffix)))
|
|
37823
|
-
};
|
|
37824
|
-
return $n($$x4).option2Iterable__s_Option__sc_Iterable($$x2)
|
|
37825
|
-
});
|
|
37826
37870
|
var $d_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames = new $TypeData().initClass({
|
|
37827
37871
|
Lio_kaitai_struct_precompile_CanonicalizeEncodingNames: 0
|
|
37828
37872
|
}, false, "io.kaitai.struct.precompile.CanonicalizeEncodingNames", {
|
|
@@ -38141,7 +38185,13 @@ $c_Lio_kaitai_struct_precompile_ResolveTypes.prototype.resolveUserTypes__Lio_kai
|
|
|
38141
38185
|
$c_Lio_kaitai_struct_precompile_ResolveTypes.prototype.resolveUserType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType__sci_List__sc_Iterable = (function(curClass, dataType, path) {
|
|
38142
38186
|
if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
38143
38187
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dataType);
|
|
38144
|
-
var x1
|
|
38188
|
+
var $$x1 = $n(x2).Lio_kaitai_struct_datatype_DataType$UserType__f_name;
|
|
38189
|
+
var this$5 = $n(path);
|
|
38190
|
+
$n($m_s_package$().s_package$__f_List);
|
|
38191
|
+
var array = ["type"];
|
|
38192
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
38193
|
+
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
38194
|
+
var x1$2 = this.resolveUserType__Lio_kaitai_struct_format_ClassSpec__sci_List__sci_List__T2(curClass, $$x1, this$5.appendedAll__sc_IterableOnce__sci_List(suffix));
|
|
38145
38195
|
if ((x1$2 === null)) {
|
|
38146
38196
|
throw new $c_s_MatchError(x1$2)
|
|
38147
38197
|
};
|
|
@@ -38152,19 +38202,30 @@ $c_Lio_kaitai_struct_precompile_ResolveTypes.prototype.resolveUserType__Lio_kait
|
|
|
38152
38202
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
38153
38203
|
var x3 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(dataType);
|
|
38154
38204
|
$n(x3).Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec = this.resolveEnumSpec__Lio_kaitai_struct_format_ClassSpec__sci_List__s_Option(curClass, $n(x3).Lio_kaitai_struct_datatype_DataType$EnumType__f_name);
|
|
38155
|
-
|
|
38205
|
+
if ($n($n(x3).Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec).isEmpty__Z()) {
|
|
38206
|
+
var $$x3 = $m_s_Option$();
|
|
38207
|
+
var $$x2 = $n(x3).Lio_kaitai_struct_datatype_DataType$EnumType__f_name;
|
|
38208
|
+
var this$10 = $n(path);
|
|
38209
|
+
$n($m_s_package$().s_package$__f_List);
|
|
38210
|
+
var array$1 = ["enum"];
|
|
38211
|
+
var elems$1 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1);
|
|
38212
|
+
var suffix$1 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$1);
|
|
38213
|
+
return $n($$x3).option2Iterable__s_Option__sc_Iterable(new $c_s_Some(new $c_Lio_kaitai_struct_problems_EnumNotFoundErr($$x2, curClass, this$10.appendedAll__sc_IterableOnce__sci_List(suffix$1), $m_s_None$())))
|
|
38214
|
+
} else {
|
|
38215
|
+
return $m_s_Option$().option2Iterable__s_Option__sc_Iterable($m_s_None$())
|
|
38216
|
+
}
|
|
38156
38217
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
38157
38218
|
var x4 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(dataType);
|
|
38158
|
-
var this$
|
|
38219
|
+
var this$12 = $n($n(x4).Lio_kaitai_struct_datatype_DataType$SwitchType__f_cases);
|
|
38159
38220
|
var b = $m_sci_Iterable$().newBuilder__scm_Builder();
|
|
38160
38221
|
$m_sci_RedBlackTree$();
|
|
38161
|
-
var tree = this$
|
|
38222
|
+
var tree = this$12.sci_TreeMap__f_tree;
|
|
38162
38223
|
$m_sci_RedBlackTree$();
|
|
38163
38224
|
var start = $m_s_None$();
|
|
38164
|
-
var evidence$16 = this$
|
|
38225
|
+
var evidence$16 = this$12.sci_TreeMap__f_ordering;
|
|
38165
38226
|
var it = new $c_sci_RedBlackTree$EntriesIterator(tree, start, evidence$16);
|
|
38166
38227
|
while (it.hasNext__Z()) {
|
|
38167
|
-
var this$
|
|
38228
|
+
var this$20 = $n(b);
|
|
38168
38229
|
var arg1 = it.next__O();
|
|
38169
38230
|
var x0$1 = $as_T2(arg1);
|
|
38170
38231
|
if ((x0$1 === null)) {
|
|
@@ -38172,13 +38233,13 @@ $c_Lio_kaitai_struct_precompile_ResolveTypes.prototype.resolveUserType__Lio_kait
|
|
|
38172
38233
|
};
|
|
38173
38234
|
var caseName = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x0$1).T2__f__1);
|
|
38174
38235
|
var ut = $as_Lio_kaitai_struct_datatype_DataType($n(x0$1).T2__f__2);
|
|
38175
|
-
var this$
|
|
38236
|
+
var this$19 = $n(path);
|
|
38176
38237
|
$n($m_s_package$().s_package$__f_List);
|
|
38177
|
-
var array = ["type", "cases", $n(caseName).toString__T()];
|
|
38178
|
-
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
38179
|
-
var suffix = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
|
|
38180
|
-
var xs = this.resolveUserType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType__sci_List__sc_Iterable(curClass, ut, this$
|
|
38181
|
-
this$
|
|
38238
|
+
var array$2 = ["type", "cases", $n(caseName).toString__T()];
|
|
38239
|
+
var elems$2 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$2);
|
|
38240
|
+
var suffix$2 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$2);
|
|
38241
|
+
var xs = this.resolveUserType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType__sci_List__sc_Iterable(curClass, ut, this$19.appendedAll__sc_IterableOnce__sci_List(suffix$2));
|
|
38242
|
+
this$20.addAll__sc_IterableOnce__scm_Growable(xs)
|
|
38182
38243
|
};
|
|
38183
38244
|
return $as_sc_Iterable($n(b).result__O())
|
|
38184
38245
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
@@ -39069,7 +39130,7 @@ $c_Lio_kaitai_struct_precompile_TypeValidator.prototype.validateSwitchType__Lio_
|
|
|
39069
39130
|
} else {
|
|
39070
39131
|
var problems1 = $m_s_None$()
|
|
39071
39132
|
};
|
|
39072
|
-
var problems2 = this.validateDataType__Lio_kaitai_struct_datatype_DataType__sci_List__sc_Iterable(caseType,
|
|
39133
|
+
var problems2 = this.validateDataType__Lio_kaitai_struct_datatype_DataType__sci_List__sc_Iterable(caseType, path);
|
|
39073
39134
|
var this$10 = $n($m_s_Option$().option2Iterable__s_Option__sc_Iterable(problems1));
|
|
39074
39135
|
var xs = $as_sc_IterableOnce(this$10.concat__sc_IterableOnce__O(problems2));
|
|
39075
39136
|
this$11.addAll__sc_IterableOnce__scm_Growable(xs)
|
|
@@ -39215,8 +39276,8 @@ $c_Lio_kaitai_struct_problems_KSYParseError$.prototype.withText__T__sci_List__Li
|
|
|
39215
39276
|
var this$2 = new $c_Lio_kaitai_struct_problems_KSYParseError(text, path, $m_s_None$());
|
|
39216
39277
|
return new $c_Lio_kaitai_struct_problems_CompilationProblemException(this$2)
|
|
39217
39278
|
});
|
|
39218
|
-
$c_Lio_kaitai_struct_problems_KSYParseError$.prototype.
|
|
39219
|
-
return this.withText__T__sci_List__Lio_kaitai_struct_problems_CompilationProblemException((("missing mandatory argument `" +
|
|
39279
|
+
$c_Lio_kaitai_struct_problems_KSYParseError$.prototype.noKey__T__sci_List__Lio_kaitai_struct_problems_CompilationProblemException = (function(field, path) {
|
|
39280
|
+
return this.withText__T__sci_List__Lio_kaitai_struct_problems_CompilationProblemException((("missing mandatory argument `" + field) + "`"), path)
|
|
39220
39281
|
});
|
|
39221
39282
|
$c_Lio_kaitai_struct_problems_KSYParseError$.prototype.noKeys__sci_List__sci_Set__Lio_kaitai_struct_problems_CompilationProblemException = (function(path, expectedKeys) {
|
|
39222
39283
|
var this$1 = $n(expectedKeys);
|
|
@@ -39319,8 +39380,15 @@ function $m_Lio_kaitai_struct_problems_ProblemCoords$() {
|
|
|
39319
39380
|
};
|
|
39320
39381
|
return $n_Lio_kaitai_struct_problems_ProblemCoords$
|
|
39321
39382
|
}
|
|
39322
|
-
function $
|
|
39323
|
-
|
|
39383
|
+
function $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T($thiz, left, op, right, extPrec) {
|
|
39384
|
+
var opStr = $thiz.binOp__Lio_kaitai_struct_exprlang_Ast$operator__T(op);
|
|
39385
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOpStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__T__Lio_kaitai_struct_exprlang_Ast$expr__I__T($thiz, left, op, opStr, right, extPrec)
|
|
39386
|
+
}
|
|
39387
|
+
function $f_Lio_kaitai_struct_translators_CommonOps__genericBinOpStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__T__Lio_kaitai_struct_exprlang_Ast$expr__I__T($thiz, left, op, opStr, right, extPrec) {
|
|
39388
|
+
var thisPrec = $uI($n($thiz.OPERATOR_PRECEDENCE__sci_Map()).apply__O__O(op));
|
|
39389
|
+
var leftStr = $thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, thisPrec);
|
|
39390
|
+
var rightStr = $thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, thisPrec);
|
|
39391
|
+
return ((thisPrec <= extPrec) ? (((((("(" + leftStr) + " ") + opStr) + " ") + rightStr) + ")") : ((((leftStr + " ") + opStr) + " ") + rightStr))
|
|
39324
39392
|
}
|
|
39325
39393
|
function $f_Lio_kaitai_struct_translators_CommonOps__binOp__Lio_kaitai_struct_exprlang_Ast$operator__T($thiz, op) {
|
|
39326
39394
|
var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
|
|
@@ -39376,16 +39444,16 @@ function $f_Lio_kaitai_struct_translators_CommonOps__binOp__Lio_kaitai_struct_ex
|
|
|
39376
39444
|
}
|
|
39377
39445
|
}
|
|
39378
39446
|
function $f_Lio_kaitai_struct_translators_CommonOps__doNumericCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T($thiz, left, op, right) {
|
|
39379
|
-
return (((($thiz.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
39447
|
+
return (((($thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + " ") + $thiz.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + $thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0))
|
|
39380
39448
|
}
|
|
39381
39449
|
function $f_Lio_kaitai_struct_translators_CommonOps__doStrCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T($thiz, left, op, right) {
|
|
39382
|
-
return (((($thiz.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
39450
|
+
return (((($thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + " ") + $thiz.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + $thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0))
|
|
39383
39451
|
}
|
|
39384
39452
|
function $f_Lio_kaitai_struct_translators_CommonOps__doEnumCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T($thiz, left, op, right) {
|
|
39385
|
-
return (((($thiz.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
39453
|
+
return (((($thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + " ") + $thiz.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + $thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0))
|
|
39386
39454
|
}
|
|
39387
39455
|
function $f_Lio_kaitai_struct_translators_CommonOps__doBytesCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T($thiz, left, op, right) {
|
|
39388
|
-
return (((($thiz.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
39456
|
+
return (((($thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + " ") + $thiz.cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(op)) + " ") + $thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0))
|
|
39389
39457
|
}
|
|
39390
39458
|
function $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T($thiz, op) {
|
|
39391
39459
|
var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Lt$();
|
|
@@ -39425,7 +39493,7 @@ function $f_Lio_kaitai_struct_translators_CommonOps__doBooleanOp__Lio_kaitai_str
|
|
|
39425
39493
|
var dividerStr = ((") " + opStr) + " (");
|
|
39426
39494
|
var this$2 = $n($as_sc_IterableOnceOps($n(values).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
39427
39495
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
39428
|
-
return $thiz.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
39496
|
+
return $thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
39429
39497
|
})))));
|
|
39430
39498
|
var valuesStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "(", dividerStr, ")");
|
|
39431
39499
|
return ((" (" + valuesStr) + ") ")
|
|
@@ -39461,6 +39529,31 @@ function $f_Lio_kaitai_struct_translators_CommonOps__unaryOp__Lio_kaitai_struct_
|
|
|
39461
39529
|
}
|
|
39462
39530
|
}
|
|
39463
39531
|
}
|
|
39532
|
+
function $f_Lio_kaitai_struct_translators_CommonOps__$init$__V($thiz) {
|
|
39533
|
+
var this$24 = $n($m_s_Predef$().s_Predef$__f_Map);
|
|
39534
|
+
var self = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mult$();
|
|
39535
|
+
var $$x9 = new $c_T2(self, 13);
|
|
39536
|
+
var self$1 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
|
|
39537
|
+
var $$x8 = new $c_T2(self$1, 13);
|
|
39538
|
+
var self$2 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
|
|
39539
|
+
var $$x7 = new $c_T2(self$2, 13);
|
|
39540
|
+
var self$3 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
|
|
39541
|
+
var $$x6 = new $c_T2(self$3, 12);
|
|
39542
|
+
var self$4 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Sub$();
|
|
39543
|
+
var $$x5 = new $c_T2(self$4, 12);
|
|
39544
|
+
var self$5 = $m_Lio_kaitai_struct_exprlang_Ast$operator$LShift$();
|
|
39545
|
+
var $$x4 = new $c_T2(self$5, 11);
|
|
39546
|
+
var self$6 = $m_Lio_kaitai_struct_exprlang_Ast$operator$RShift$();
|
|
39547
|
+
var $$x3 = new $c_T2(self$6, 11);
|
|
39548
|
+
var self$7 = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitAnd$();
|
|
39549
|
+
var $$x2 = new $c_T2(self$7, 10);
|
|
39550
|
+
var self$8 = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitXor$();
|
|
39551
|
+
var $$x1 = new $c_T2(self$8, 9);
|
|
39552
|
+
var self$9 = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitOr$();
|
|
39553
|
+
var array = [$$x9, $$x8, $$x7, $$x6, $$x5, $$x4, $$x3, $$x2, $$x1, new $c_T2(self$9, 8)];
|
|
39554
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
39555
|
+
$thiz.io$kaitai$struct$translators$CommonOps$_setter_$OPERATOR_PRECEDENCE_$eq__sci_Map__V(this$24.from__sc_IterableOnce__sci_Map(elems))
|
|
39556
|
+
}
|
|
39464
39557
|
function $p_jl_Character$__getTypeGE256__I__I($thiz, codePoint) {
|
|
39465
39558
|
return $n($p_jl_Character$__charTypes__AI($thiz)).get($p_jl_Character$__findIndexOfRange__AI__I__Z__I($thiz, $p_jl_Character$__charTypeIndices__AI($thiz), codePoint, false))
|
|
39466
39559
|
}
|
|
@@ -43412,7 +43505,8 @@ $c_Lio_kaitai_struct_HtmlClassCompiler.prototype.expression__s_Option__T = (func
|
|
|
43412
43505
|
if ((exOpt instanceof $c_s_Some)) {
|
|
43413
43506
|
var x2 = $as_s_Some(exOpt);
|
|
43414
43507
|
var ex = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2).s_Some__f_value);
|
|
43415
|
-
|
|
43508
|
+
var this$1 = $n(this.Lio_kaitai_struct_DocClassCompiler__f_translator);
|
|
43509
|
+
return this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ex, 0)
|
|
43416
43510
|
} else {
|
|
43417
43511
|
var x = $m_s_None$();
|
|
43418
43512
|
if ((x === exOpt)) {
|
|
@@ -44481,7 +44575,8 @@ function $f_Lio_kaitai_struct_translators_MinSignedIntegers__doIntLiteral__s_mat
|
|
|
44481
44575
|
var $$x2 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum($n(n).$plus__s_math_BigInt__s_math_BigInt(this$1.apply__I__s_math_BigInt(1)));
|
|
44482
44576
|
var $$x1 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Sub$();
|
|
44483
44577
|
var this$2 = $m_s_math_BigInt$();
|
|
44484
|
-
|
|
44578
|
+
var v = new $c_Lio_kaitai_struct_exprlang_Ast$expr$BinOp($$x2, $$x1, new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(this$2.apply__I__s_math_BigInt(1)));
|
|
44579
|
+
return $thiz.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
44485
44580
|
} else {
|
|
44486
44581
|
return $n(n).toString__T()
|
|
44487
44582
|
}
|
|
@@ -51316,6 +51411,9 @@ $c_Lio_kaitai_struct_translators_ExpressionValidator.prototype.METHODS_BY_TYPE__
|
|
|
51316
51411
|
$c_Lio_kaitai_struct_translators_ExpressionValidator.prototype.io$kaitai$struct$translators$CommonMethods$_setter_$METHODS_BY_TYPE_$eq__sci_Map__V = (function(x$1) {
|
|
51317
51412
|
this.Lio_kaitai_struct_translators_ExpressionValidator__f_METHODS_BY_TYPE = x$1
|
|
51318
51413
|
});
|
|
51414
|
+
$c_Lio_kaitai_struct_translators_ExpressionValidator.prototype.io$kaitai$struct$translators$CommonMethods$_setter_$METHOD_PRECEDENCE_$eq__I__V = (function(x$1) {
|
|
51415
|
+
/*<skip>*/
|
|
51416
|
+
});
|
|
51319
51417
|
$c_Lio_kaitai_struct_translators_ExpressionValidator.prototype.validate__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(v) {
|
|
51320
51418
|
if (((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum) || ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$FloatNum) || ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Str) || (v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool))))) {
|
|
51321
51419
|
return (void 0)
|
|
@@ -72523,11 +72621,13 @@ function $m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$() {
|
|
|
72523
72621
|
return $n_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$
|
|
72524
72622
|
}
|
|
72525
72623
|
/** @constructor */
|
|
72526
|
-
function $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType(bytes, encoding) {
|
|
72624
|
+
function $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType(bytes, encoding, isEncodingDerived) {
|
|
72527
72625
|
this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_bytes = null;
|
|
72528
72626
|
this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding = null;
|
|
72627
|
+
this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_isEncodingDerived = false;
|
|
72529
72628
|
this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_bytes = bytes;
|
|
72530
|
-
this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding = encoding
|
|
72629
|
+
this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding = encoding;
|
|
72630
|
+
this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_isEncodingDerived = isEncodingDerived
|
|
72531
72631
|
}
|
|
72532
72632
|
$c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType.prototype = new $h_Lio_kaitai_struct_datatype_DataType$StrType();
|
|
72533
72633
|
$c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType.prototype.constructor = $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType;
|
|
@@ -72540,7 +72640,7 @@ $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType.prototype.productPrefix_
|
|
|
72540
72640
|
return "StrFromBytesType"
|
|
72541
72641
|
});
|
|
72542
72642
|
$c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType.prototype.productArity__I = (function() {
|
|
72543
|
-
return
|
|
72643
|
+
return 3
|
|
72544
72644
|
});
|
|
72545
72645
|
$c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType.prototype.productElement__I__O = (function(x$1) {
|
|
72546
72646
|
switch (x$1) {
|
|
@@ -72552,6 +72652,10 @@ $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType.prototype.productElement
|
|
|
72552
72652
|
return this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding;
|
|
72553
72653
|
break
|
|
72554
72654
|
}
|
|
72655
|
+
case 2: {
|
|
72656
|
+
return this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_isEncodingDerived;
|
|
72657
|
+
break
|
|
72658
|
+
}
|
|
72555
72659
|
default: {
|
|
72556
72660
|
return $m_sr_Statics$().ioobe__I__O(x$1)
|
|
72557
72661
|
}
|
|
@@ -72561,8 +72665,23 @@ $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType.prototype.productIterato
|
|
|
72561
72665
|
return new $c_sr_ScalaRunTime$$anon$1(this)
|
|
72562
72666
|
});
|
|
72563
72667
|
$c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType.prototype.hashCode__I = (function() {
|
|
72564
|
-
var
|
|
72565
|
-
|
|
72668
|
+
var acc = (-889275714);
|
|
72669
|
+
var hash = acc;
|
|
72670
|
+
var data = $f_T__hashCode__I("StrFromBytesType");
|
|
72671
|
+
acc = $m_sr_Statics$().mix__I__I__I(hash, data);
|
|
72672
|
+
var hash$1 = acc;
|
|
72673
|
+
var x = this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_bytes;
|
|
72674
|
+
var data$1 = $m_sr_Statics$().anyHash__O__I(x);
|
|
72675
|
+
acc = $m_sr_Statics$().mix__I__I__I(hash$1, data$1);
|
|
72676
|
+
var hash$2 = acc;
|
|
72677
|
+
var x$1 = this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding;
|
|
72678
|
+
var data$2 = $m_sr_Statics$().anyHash__O__I(x$1);
|
|
72679
|
+
acc = $m_sr_Statics$().mix__I__I__I(hash$2, data$2);
|
|
72680
|
+
var hash$3 = acc;
|
|
72681
|
+
var data$3 = (this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_isEncodingDerived ? 1231 : 1237);
|
|
72682
|
+
acc = $m_sr_Statics$().mix__I__I__I(hash$3, data$3);
|
|
72683
|
+
var hash$4 = acc;
|
|
72684
|
+
return $m_sr_Statics$().finalizeHash__I__I__I(hash$4, 3)
|
|
72566
72685
|
});
|
|
72567
72686
|
$c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType.prototype.toString__T = (function() {
|
|
72568
72687
|
return $m_sr_ScalaRunTime$()._toString__s_Product__T(this)
|
|
@@ -72572,9 +72691,14 @@ $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType.prototype.equals__O__Z =
|
|
|
72572
72691
|
return true
|
|
72573
72692
|
} else if ((x$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType)) {
|
|
72574
72693
|
var StrFromBytesType$1 = $as_Lio_kaitai_struct_datatype_DataType$StrFromBytesType(x$1);
|
|
72575
|
-
|
|
72576
|
-
|
|
72577
|
-
|
|
72694
|
+
if ((this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_isEncodingDerived === $n(StrFromBytesType$1).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_isEncodingDerived)) {
|
|
72695
|
+
var x = this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_bytes;
|
|
72696
|
+
var x$2 = $n(StrFromBytesType$1).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_bytes;
|
|
72697
|
+
var $$x1 = ((x === null) ? (x$2 === null) : $n(x).equals__O__Z(x$2))
|
|
72698
|
+
} else {
|
|
72699
|
+
var $$x1 = false
|
|
72700
|
+
};
|
|
72701
|
+
if ($$x1) {
|
|
72578
72702
|
return ((this.Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding === $n(StrFromBytesType$1).Lio_kaitai_struct_datatype_DataType$StrFromBytesType__f_encoding) && ($n(StrFromBytesType$1), true))
|
|
72579
72703
|
} else {
|
|
72580
72704
|
return false
|
|
@@ -78682,7 +78806,7 @@ var $d_Lio_kaitai_struct_format_InvalidIdentifier = new $TypeData().initClass({
|
|
|
78682
78806
|
});
|
|
78683
78807
|
$c_Lio_kaitai_struct_format_InvalidIdentifier.prototype.$classData = $d_Lio_kaitai_struct_format_InvalidIdentifier;
|
|
78684
78808
|
/** @constructor */
|
|
78685
|
-
function $c_Lio_kaitai_struct_format_ValueInstanceSpec(id, path,
|
|
78809
|
+
function $c_Lio_kaitai_struct_format_ValueInstanceSpec(id, path, value, ifExpr, dataTypeOpt, _doc) {
|
|
78686
78810
|
this.Lio_kaitai_struct_format_InstanceSpec__f_doc = null;
|
|
78687
78811
|
this.Lio_kaitai_struct_format_ValueInstanceSpec__f_id = null;
|
|
78688
78812
|
this.Lio_kaitai_struct_format_ValueInstanceSpec__f_path = null;
|
|
@@ -78749,19 +78873,19 @@ $c_Lio_kaitai_struct_format_ValueInstanceSpec.prototype.productElement__I__O = (
|
|
|
78749
78873
|
break
|
|
78750
78874
|
}
|
|
78751
78875
|
case 2: {
|
|
78752
|
-
return this.
|
|
78876
|
+
return this.Lio_kaitai_struct_format_ValueInstanceSpec__f_value;
|
|
78753
78877
|
break
|
|
78754
78878
|
}
|
|
78755
78879
|
case 3: {
|
|
78756
|
-
return this.
|
|
78880
|
+
return this.Lio_kaitai_struct_format_ValueInstanceSpec__f_ifExpr;
|
|
78757
78881
|
break
|
|
78758
78882
|
}
|
|
78759
78883
|
case 4: {
|
|
78760
|
-
return this.
|
|
78884
|
+
return this.Lio_kaitai_struct_format_ValueInstanceSpec__f_dataTypeOpt;
|
|
78761
78885
|
break
|
|
78762
78886
|
}
|
|
78763
78887
|
case 5: {
|
|
78764
|
-
return this.
|
|
78888
|
+
return this.Lio_kaitai_struct_format_InstanceSpec__f_doc;
|
|
78765
78889
|
break
|
|
78766
78890
|
}
|
|
78767
78891
|
default: {
|
|
@@ -78790,9 +78914,8 @@ $c_Lio_kaitai_struct_format_ValueInstanceSpec.prototype.equals__O__Z = (function
|
|
|
78790
78914
|
var x$3 = this.Lio_kaitai_struct_format_ValueInstanceSpec__f_path;
|
|
78791
78915
|
var x$4 = $n(ValueInstanceSpec$1).Lio_kaitai_struct_format_ValueInstanceSpec__f_path;
|
|
78792
78916
|
if (((x$3 === null) ? (x$4 === null) : $n(x$3).equals__O__Z(x$4))) {
|
|
78793
|
-
var x$5 = this.
|
|
78794
|
-
var
|
|
78795
|
-
var x$6 = this$1.Lio_kaitai_struct_format_InstanceSpec__f_doc;
|
|
78917
|
+
var x$5 = this.Lio_kaitai_struct_format_ValueInstanceSpec__f_value;
|
|
78918
|
+
var x$6 = $n(ValueInstanceSpec$1).Lio_kaitai_struct_format_ValueInstanceSpec__f_value;
|
|
78796
78919
|
var $$x1 = ((x$5 === null) ? (x$6 === null) : $n(x$5).equals__O__Z(x$6))
|
|
78797
78920
|
} else {
|
|
78798
78921
|
var $$x1 = false
|
|
@@ -78801,18 +78924,19 @@ $c_Lio_kaitai_struct_format_ValueInstanceSpec.prototype.equals__O__Z = (function
|
|
|
78801
78924
|
var $$x1 = false
|
|
78802
78925
|
};
|
|
78803
78926
|
if ($$x1) {
|
|
78804
|
-
var x$7 = this.
|
|
78805
|
-
var x$8 = $n(ValueInstanceSpec$1).
|
|
78927
|
+
var x$7 = this.Lio_kaitai_struct_format_ValueInstanceSpec__f_ifExpr;
|
|
78928
|
+
var x$8 = $n(ValueInstanceSpec$1).Lio_kaitai_struct_format_ValueInstanceSpec__f_ifExpr;
|
|
78806
78929
|
if (((x$7 === null) ? (x$8 === null) : $n(x$7).equals__O__Z(x$8))) {
|
|
78807
|
-
var x$9 = this.
|
|
78808
|
-
var x$10 = $n(ValueInstanceSpec$1).
|
|
78930
|
+
var x$9 = this.Lio_kaitai_struct_format_ValueInstanceSpec__f_dataTypeOpt;
|
|
78931
|
+
var x$10 = $n(ValueInstanceSpec$1).Lio_kaitai_struct_format_ValueInstanceSpec__f_dataTypeOpt;
|
|
78809
78932
|
var $$x2 = ((x$9 === null) ? (x$10 === null) : $n(x$9).equals__O__Z(x$10))
|
|
78810
78933
|
} else {
|
|
78811
78934
|
var $$x2 = false
|
|
78812
78935
|
};
|
|
78813
78936
|
if ($$x2) {
|
|
78814
|
-
var x$11 = this.
|
|
78815
|
-
var
|
|
78937
|
+
var x$11 = this.Lio_kaitai_struct_format_InstanceSpec__f_doc;
|
|
78938
|
+
var this$1 = $n(ValueInstanceSpec$1);
|
|
78939
|
+
var x$12 = this$1.Lio_kaitai_struct_format_InstanceSpec__f_doc;
|
|
78816
78940
|
if (((x$11 === null) ? (x$12 === null) : $n(x$11).equals__O__Z(x$12))) {
|
|
78817
78941
|
$n(ValueInstanceSpec$1);
|
|
78818
78942
|
return true
|
|
@@ -82061,7 +82185,7 @@ var $d_Lio_kaitai_struct_datatype_DataType$UserTypeInstream = new $TypeData().in
|
|
|
82061
82185
|
});
|
|
82062
82186
|
$c_Lio_kaitai_struct_datatype_DataType$UserTypeInstream.prototype.$classData = $d_Lio_kaitai_struct_datatype_DataType$UserTypeInstream;
|
|
82063
82187
|
/** @constructor */
|
|
82064
|
-
function $c_Lio_kaitai_struct_format_ParseInstanceSpec(id, path,
|
|
82188
|
+
function $c_Lio_kaitai_struct_format_ParseInstanceSpec(id, path, dataType, cond, pos, io, valid, _doc) {
|
|
82065
82189
|
this.Lio_kaitai_struct_format_InstanceSpec__f_doc = null;
|
|
82066
82190
|
this.Lio_kaitai_struct_format_ParseInstanceSpec__f_id = null;
|
|
82067
82191
|
this.Lio_kaitai_struct_format_ParseInstanceSpec__f_path = null;
|
|
@@ -82127,27 +82251,27 @@ $c_Lio_kaitai_struct_format_ParseInstanceSpec.prototype.productElement__I__O = (
|
|
|
82127
82251
|
break
|
|
82128
82252
|
}
|
|
82129
82253
|
case 2: {
|
|
82130
|
-
return this.
|
|
82254
|
+
return this.Lio_kaitai_struct_format_ParseInstanceSpec__f_dataType;
|
|
82131
82255
|
break
|
|
82132
82256
|
}
|
|
82133
82257
|
case 3: {
|
|
82134
|
-
return this.
|
|
82258
|
+
return this.Lio_kaitai_struct_format_ParseInstanceSpec__f_cond;
|
|
82135
82259
|
break
|
|
82136
82260
|
}
|
|
82137
82261
|
case 4: {
|
|
82138
|
-
return this.
|
|
82262
|
+
return this.Lio_kaitai_struct_format_ParseInstanceSpec__f_pos;
|
|
82139
82263
|
break
|
|
82140
82264
|
}
|
|
82141
82265
|
case 5: {
|
|
82142
|
-
return this.
|
|
82266
|
+
return this.Lio_kaitai_struct_format_ParseInstanceSpec__f_io;
|
|
82143
82267
|
break
|
|
82144
82268
|
}
|
|
82145
82269
|
case 6: {
|
|
82146
|
-
return this.
|
|
82270
|
+
return this.Lio_kaitai_struct_format_ParseInstanceSpec__f_valid;
|
|
82147
82271
|
break
|
|
82148
82272
|
}
|
|
82149
82273
|
case 7: {
|
|
82150
|
-
return this.
|
|
82274
|
+
return this.Lio_kaitai_struct_format_InstanceSpec__f_doc;
|
|
82151
82275
|
break
|
|
82152
82276
|
}
|
|
82153
82277
|
default: {
|
|
@@ -82180,12 +82304,11 @@ $c_Lio_kaitai_struct_format_ParseInstanceSpec.prototype.equals__O__Z = (function
|
|
|
82180
82304
|
var $$x2 = false
|
|
82181
82305
|
};
|
|
82182
82306
|
if ($$x2) {
|
|
82183
|
-
var x$5 = this.
|
|
82184
|
-
var
|
|
82185
|
-
var x$6 = this$1.Lio_kaitai_struct_format_InstanceSpec__f_doc;
|
|
82307
|
+
var x$5 = this.Lio_kaitai_struct_format_ParseInstanceSpec__f_dataType;
|
|
82308
|
+
var x$6 = $n(ParseInstanceSpec$1).Lio_kaitai_struct_format_ParseInstanceSpec__f_dataType;
|
|
82186
82309
|
if (((x$5 === null) ? (x$6 === null) : $n(x$5).equals__O__Z(x$6))) {
|
|
82187
|
-
var x$7 = this.
|
|
82188
|
-
var x$8 = $n(ParseInstanceSpec$1).
|
|
82310
|
+
var x$7 = this.Lio_kaitai_struct_format_ParseInstanceSpec__f_cond;
|
|
82311
|
+
var x$8 = $n(ParseInstanceSpec$1).Lio_kaitai_struct_format_ParseInstanceSpec__f_cond;
|
|
82189
82312
|
var $$x1 = ((x$7 === null) ? (x$8 === null) : $n(x$7).equals__O__Z(x$8))
|
|
82190
82313
|
} else {
|
|
82191
82314
|
var $$x1 = false
|
|
@@ -82194,21 +82317,22 @@ $c_Lio_kaitai_struct_format_ParseInstanceSpec.prototype.equals__O__Z = (function
|
|
|
82194
82317
|
var $$x1 = false
|
|
82195
82318
|
};
|
|
82196
82319
|
if ($$x1) {
|
|
82197
|
-
var x$9 = this.
|
|
82198
|
-
var x$10 = $n(ParseInstanceSpec$1).
|
|
82320
|
+
var x$9 = this.Lio_kaitai_struct_format_ParseInstanceSpec__f_pos;
|
|
82321
|
+
var x$10 = $n(ParseInstanceSpec$1).Lio_kaitai_struct_format_ParseInstanceSpec__f_pos;
|
|
82199
82322
|
if (((x$9 === null) ? (x$10 === null) : $n(x$9).equals__O__Z(x$10))) {
|
|
82200
|
-
var x$11 = this.
|
|
82201
|
-
var x$12 = $n(ParseInstanceSpec$1).
|
|
82323
|
+
var x$11 = this.Lio_kaitai_struct_format_ParseInstanceSpec__f_io;
|
|
82324
|
+
var x$12 = $n(ParseInstanceSpec$1).Lio_kaitai_struct_format_ParseInstanceSpec__f_io;
|
|
82202
82325
|
var $$x3 = ((x$11 === null) ? (x$12 === null) : $n(x$11).equals__O__Z(x$12))
|
|
82203
82326
|
} else {
|
|
82204
82327
|
var $$x3 = false
|
|
82205
82328
|
};
|
|
82206
82329
|
if ($$x3) {
|
|
82207
|
-
var x$13 = this.
|
|
82208
|
-
var x$14 = $n(ParseInstanceSpec$1).
|
|
82330
|
+
var x$13 = this.Lio_kaitai_struct_format_ParseInstanceSpec__f_valid;
|
|
82331
|
+
var x$14 = $n(ParseInstanceSpec$1).Lio_kaitai_struct_format_ParseInstanceSpec__f_valid;
|
|
82209
82332
|
if (((x$13 === null) ? (x$14 === null) : $n(x$13).equals__O__Z(x$14))) {
|
|
82210
|
-
var x$15 = this.
|
|
82211
|
-
var
|
|
82333
|
+
var x$15 = this.Lio_kaitai_struct_format_InstanceSpec__f_doc;
|
|
82334
|
+
var this$1 = $n(ParseInstanceSpec$1);
|
|
82335
|
+
var x$16 = this$1.Lio_kaitai_struct_format_InstanceSpec__f_doc;
|
|
82212
82336
|
if (((x$15 === null) ? (x$16 === null) : $n(x$15).equals__O__Z(x$16))) {
|
|
82213
82337
|
$n(ParseInstanceSpec$1);
|
|
82214
82338
|
return true
|
|
@@ -82391,6 +82515,7 @@ function $ct_Lio_kaitai_struct_translators_BaseTranslator__Lio_kaitai_struct_tra
|
|
|
82391
82515
|
$thiz.Lio_kaitai_struct_translators_BaseTranslator__f_provider = provider;
|
|
82392
82516
|
$ct_Lio_kaitai_struct_translators_TypeDetector__Lio_kaitai_struct_translators_TypeProvider__($thiz, provider);
|
|
82393
82517
|
$f_Lio_kaitai_struct_translators_CommonLiterals__$init$__V($thiz);
|
|
82518
|
+
$f_Lio_kaitai_struct_translators_CommonOps__$init$__V($thiz);
|
|
82394
82519
|
$f_Lio_kaitai_struct_translators_CommonMethods__$init$__V($thiz);
|
|
82395
82520
|
return $thiz
|
|
82396
82521
|
}
|
|
@@ -82399,6 +82524,8 @@ function $c_Lio_kaitai_struct_translators_BaseTranslator() {
|
|
|
82399
82524
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
82400
82525
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
82401
82526
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
82527
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
82528
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
82402
82529
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null
|
|
82403
82530
|
}
|
|
82404
82531
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype = new $h_Lio_kaitai_struct_translators_TypeDetector();
|
|
@@ -82426,8 +82553,8 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.bytesMin__Lio_kaitai_s
|
|
|
82426
82553
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
|
|
82427
82554
|
return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
|
|
82428
82555
|
});
|
|
82429
|
-
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.
|
|
82430
|
-
return $
|
|
82556
|
+
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
82557
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec)
|
|
82431
82558
|
});
|
|
82432
82559
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.binOp__Lio_kaitai_struct_exprlang_Ast$operator__T = (function(op) {
|
|
82433
82560
|
return $f_Lio_kaitai_struct_translators_CommonOps__binOp__Lio_kaitai_struct_exprlang_Ast$operator__T(this, op)
|
|
@@ -82468,13 +82595,22 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.METHODS_BY_TYPE__sci_M
|
|
|
82468
82595
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.io$kaitai$struct$translators$CommonMethods$_setter_$METHODS_BY_TYPE_$eq__sci_Map__V = (function(x$1) {
|
|
82469
82596
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = x$1
|
|
82470
82597
|
});
|
|
82598
|
+
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.io$kaitai$struct$translators$CommonMethods$_setter_$METHOD_PRECEDENCE_$eq__I__V = (function(x$1) {
|
|
82599
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = x$1
|
|
82600
|
+
});
|
|
82601
|
+
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.OPERATOR_PRECEDENCE__sci_Map = (function() {
|
|
82602
|
+
return this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE
|
|
82603
|
+
});
|
|
82604
|
+
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.io$kaitai$struct$translators$CommonOps$_setter_$OPERATOR_PRECEDENCE_$eq__sci_Map__V = (function(x$1) {
|
|
82605
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = x$1
|
|
82606
|
+
});
|
|
82471
82607
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
|
|
82472
82608
|
return this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap
|
|
82473
82609
|
});
|
|
82474
82610
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.io$kaitai$struct$translators$CommonLiterals$_setter_$asciiCharQuoteMap_$eq__sci_Map__V = (function(x$1) {
|
|
82475
82611
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = x$1
|
|
82476
82612
|
});
|
|
82477
|
-
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
82613
|
+
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(v, extPrec) {
|
|
82478
82614
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum)) {
|
|
82479
82615
|
var x2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(v);
|
|
82480
82616
|
var n = $n(x2).Lio_kaitai_struct_exprlang_Ast$expr$IntNum__f_n;
|
|
@@ -82507,7 +82643,7 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
82507
82643
|
var id = $n(x7).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_id;
|
|
82508
82644
|
var inType = $n(x7).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_inType;
|
|
82509
82645
|
var enumSpec = $n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).resolveEnum__Lio_kaitai_struct_exprlang_Ast$typeId__T__Lio_kaitai_struct_format_EnumSpec(inType, $n(enumType).Lio_kaitai_struct_exprlang_Ast$identifier__f_name);
|
|
82510
|
-
return this.doEnumById__sci_List__T__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name, this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
82646
|
+
return this.doEnumById__sci_List__T__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name, this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(id, 0))
|
|
82511
82647
|
};
|
|
82512
82648
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel)) {
|
|
82513
82649
|
var x8 = $as_Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel(v);
|
|
@@ -82542,9 +82678,10 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
82542
82678
|
if (((x === op) && (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum))) {
|
|
82543
82679
|
var x4$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(inner);
|
|
82544
82680
|
var n$4 = $n(x4$2).Lio_kaitai_struct_exprlang_Ast$expr$IntNum__f_n;
|
|
82545
|
-
|
|
82681
|
+
var v$1 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum($n(n$4).unary_$minus__s_math_BigInt());
|
|
82682
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v$1, 0)
|
|
82546
82683
|
} else {
|
|
82547
|
-
return (((inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum) || (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$FloatNum)) ? (("" + opStr) + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
82684
|
+
return (((inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum) || (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$FloatNum)) ? (("" + opStr) + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(inner, 0)) : (((opStr + "(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(inner, 0)) + ")"))
|
|
82548
82685
|
}
|
|
82549
82686
|
}
|
|
82550
82687
|
}
|
|
@@ -82616,7 +82753,7 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
82616
82753
|
var _1$1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left$2);
|
|
82617
82754
|
var _2$1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right$2);
|
|
82618
82755
|
if (((_1$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType) && (_2$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType))) {
|
|
82619
|
-
return this.
|
|
82756
|
+
return this.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left$2, op$3, right$2, extPrec)
|
|
82620
82757
|
} else {
|
|
82621
82758
|
if ((_1$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
|
|
82622
82759
|
if ((_2$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
|
|
@@ -82629,7 +82766,7 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
82629
82766
|
var $$x3 = false
|
|
82630
82767
|
};
|
|
82631
82768
|
if ($$x3) {
|
|
82632
|
-
return this.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$
|
|
82769
|
+
return this.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left$2, right$2, extPrec)
|
|
82633
82770
|
} else {
|
|
82634
82771
|
throw new $c_Lio_kaitai_struct_precompile_TypeMismatchError(((((("can't do " + _1$1) + " ") + op$3) + " ") + _2$1))
|
|
82635
82772
|
}
|
|
@@ -82709,7 +82846,7 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
82709
82846
|
throw new $c_s_MatchError(v)
|
|
82710
82847
|
});
|
|
82711
82848
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
82712
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
82849
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
82713
82850
|
});
|
|
82714
82851
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doByteSizeOfType__Lio_kaitai_struct_exprlang_Ast$typeId__T = (function(typeName) {
|
|
82715
82852
|
var this$1 = $m_s_math_BigInt$();
|
|
@@ -82734,7 +82871,7 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.byteSizeOfClassSpec__L
|
|
|
82734
82871
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T = (function(t, value) {
|
|
82735
82872
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
82736
82873
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
82737
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
82874
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
82738
82875
|
})))));
|
|
82739
82876
|
return (("[" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "]")
|
|
82740
82877
|
});
|
|
@@ -82754,8 +82891,8 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doLocalName__T__T = (f
|
|
|
82754
82891
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
82755
82892
|
$m_s_Predef$().$qmark$qmark$qmark__E()
|
|
82756
82893
|
});
|
|
82757
|
-
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$
|
|
82758
|
-
return
|
|
82894
|
+
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, right, extPrec) {
|
|
82895
|
+
return this.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$(), right, extPrec)
|
|
82759
82896
|
});
|
|
82760
82897
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
82761
82898
|
var this$1 = $m_s_math_BigInt$();
|
|
@@ -82773,10 +82910,10 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.kaitaiStreamPos__Lio_k
|
|
|
82773
82910
|
return this.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T(value, "pos")
|
|
82774
82911
|
});
|
|
82775
82912
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.bytesToStr__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, encoding) {
|
|
82776
|
-
return this.bytesToStr__T__T__T(this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
82913
|
+
return this.bytesToStr__T__T__T(this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0), encoding)
|
|
82777
82914
|
});
|
|
82778
82915
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
|
|
82779
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
82916
|
+
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".") + this.doName__T__T(attrName))
|
|
82780
82917
|
});
|
|
82781
82918
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doInterpolatedStringLiteral__sci_Seq__T = (function(exprs) {
|
|
82782
82919
|
if ($n(exprs).isEmpty__Z()) {
|
|
@@ -82794,7 +82931,7 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.anyToStr__Lio_kaitai_s
|
|
|
82794
82931
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
82795
82932
|
return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
82796
82933
|
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
|
|
82797
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
82934
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
82798
82935
|
} else {
|
|
82799
82936
|
throw $ct_jl_UnsupportedOperationException__T__(new $c_jl_UnsupportedOperationException(), (("unable to convert " + x1) + " to string in format string (only integers and strings are supported)"))
|
|
82800
82937
|
}
|
|
@@ -82846,12 +82983,15 @@ function $c_Lio_kaitai_struct_translators_GoTranslator(out, provider, importList
|
|
|
82846
82983
|
this.Lio_kaitai_struct_translators_GoTranslator__f_ENCODINGS = null;
|
|
82847
82984
|
this.Lio_kaitai_struct_translators_GoTranslator__f_localVarNum = 0;
|
|
82848
82985
|
this.Lio_kaitai_struct_translators_GoTranslator__f_METHODS_BY_TYPE = null;
|
|
82986
|
+
this.Lio_kaitai_struct_translators_GoTranslator__f_METHOD_PRECEDENCE = 0;
|
|
82987
|
+
this.Lio_kaitai_struct_translators_GoTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
82849
82988
|
this.Lio_kaitai_struct_translators_GoTranslator__f_asciiCharQuoteMap = null;
|
|
82850
82989
|
this.Lio_kaitai_struct_translators_GoTranslator__f_out = out;
|
|
82851
82990
|
this.Lio_kaitai_struct_translators_GoTranslator__f_provider = provider;
|
|
82852
82991
|
this.Lio_kaitai_struct_translators_GoTranslator__f_importList = importList;
|
|
82853
82992
|
$ct_Lio_kaitai_struct_translators_TypeDetector__Lio_kaitai_struct_translators_TypeProvider__(this, provider);
|
|
82854
82993
|
$f_Lio_kaitai_struct_translators_CommonLiterals__$init$__V(this);
|
|
82994
|
+
$f_Lio_kaitai_struct_translators_CommonOps__$init$__V(this);
|
|
82855
82995
|
$f_Lio_kaitai_struct_translators_CommonMethods__$init$__V(this);
|
|
82856
82996
|
this.Lio_kaitai_struct_translators_GoTranslator__f_returnRes = $m_s_None$();
|
|
82857
82997
|
this.Lio_kaitai_struct_translators_GoTranslator__f_IMPORT_CHARMAP = "golang.org/x/text/encoding/charmap";
|
|
@@ -82921,14 +83061,23 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.METHODS_BY_TYPE__sci_Map
|
|
|
82921
83061
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.io$kaitai$struct$translators$CommonMethods$_setter_$METHODS_BY_TYPE_$eq__sci_Map__V = (function(x$1) {
|
|
82922
83062
|
this.Lio_kaitai_struct_translators_GoTranslator__f_METHODS_BY_TYPE = x$1
|
|
82923
83063
|
});
|
|
83064
|
+
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.io$kaitai$struct$translators$CommonMethods$_setter_$METHOD_PRECEDENCE_$eq__I__V = (function(x$1) {
|
|
83065
|
+
this.Lio_kaitai_struct_translators_GoTranslator__f_METHOD_PRECEDENCE = x$1
|
|
83066
|
+
});
|
|
83067
|
+
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.OPERATOR_PRECEDENCE__sci_Map = (function() {
|
|
83068
|
+
return this.Lio_kaitai_struct_translators_GoTranslator__f_OPERATOR_PRECEDENCE
|
|
83069
|
+
});
|
|
83070
|
+
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.io$kaitai$struct$translators$CommonOps$_setter_$OPERATOR_PRECEDENCE_$eq__sci_Map__V = (function(x$1) {
|
|
83071
|
+
this.Lio_kaitai_struct_translators_GoTranslator__f_OPERATOR_PRECEDENCE = x$1
|
|
83072
|
+
});
|
|
82924
83073
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
|
|
82925
83074
|
return this.Lio_kaitai_struct_translators_GoTranslator__f_asciiCharQuoteMap
|
|
82926
83075
|
});
|
|
82927
83076
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.io$kaitai$struct$translators$CommonLiterals$_setter_$asciiCharQuoteMap_$eq__sci_Map__V = (function(x$1) {
|
|
82928
83077
|
this.Lio_kaitai_struct_translators_GoTranslator__f_asciiCharQuoteMap = x$1
|
|
82929
83078
|
});
|
|
82930
|
-
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
82931
|
-
return this.resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(this.translateExpr__Lio_kaitai_struct_exprlang_Ast$
|
|
83079
|
+
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(v, extPrec) {
|
|
83080
|
+
return this.resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(this.translateExpr__Lio_kaitai_struct_exprlang_Ast$expr__I__Lio_kaitai_struct_translators_TranslatorResult(v, extPrec))
|
|
82932
83081
|
});
|
|
82933
83082
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.resToStr__Lio_kaitai_struct_translators_TranslatorResult__T = (function(r) {
|
|
82934
83083
|
if ((r instanceof $c_Lio_kaitai_struct_translators_ResultString)) {
|
|
@@ -82943,7 +83092,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.resToStr__Lio_kaitai_str
|
|
|
82943
83092
|
throw new $c_s_MatchError(r)
|
|
82944
83093
|
}
|
|
82945
83094
|
});
|
|
82946
|
-
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaitai_struct_exprlang_Ast$
|
|
83095
|
+
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaitai_struct_exprlang_Ast$expr__I__Lio_kaitai_struct_translators_TranslatorResult = (function(v, extPrec) {
|
|
82947
83096
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum)) {
|
|
82948
83097
|
var x2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(v);
|
|
82949
83098
|
var n = $n(x2).Lio_kaitai_struct_exprlang_Ast$expr$IntNum__f_n;
|
|
@@ -82975,7 +83124,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
|
|
|
82975
83124
|
var id = $n(x7).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_id;
|
|
82976
83125
|
var inType = $n(x7).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_inType;
|
|
82977
83126
|
var enumSpec = $n(this.Lio_kaitai_struct_translators_GoTranslator__f_provider).resolveEnum__Lio_kaitai_struct_exprlang_Ast$typeId__T__Lio_kaitai_struct_format_EnumSpec(inType, $n(enumType).Lio_kaitai_struct_exprlang_Ast$identifier__f_name);
|
|
82978
|
-
return this.trEnumById__sci_List__T__Lio_kaitai_struct_translators_ResultString($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name, this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83127
|
+
return this.trEnumById__sci_List__T__Lio_kaitai_struct_translators_ResultString($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name, this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(id, 0))
|
|
82979
83128
|
};
|
|
82980
83129
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel)) {
|
|
82981
83130
|
var x8 = $as_Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel(v);
|
|
@@ -83010,9 +83159,10 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
|
|
|
83010
83159
|
if (((x === op) && (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum))) {
|
|
83011
83160
|
var x4$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(inner);
|
|
83012
83161
|
var n$4 = $n(x4$2).Lio_kaitai_struct_exprlang_Ast$expr$IntNum__f_n;
|
|
83013
|
-
var
|
|
83162
|
+
var v$1 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum($n(n$4).unary_$minus__s_math_BigInt());
|
|
83163
|
+
var $$x1 = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v$1, 0)
|
|
83014
83164
|
} else {
|
|
83015
|
-
var $$x1 = (((inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum) || (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$FloatNum)) ? (("" + opStr) + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83165
|
+
var $$x1 = (((inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum) || (inner instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$FloatNum)) ? (("" + opStr) + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(inner, 0)) : (((opStr + "(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(inner, 0)) + ")"))
|
|
83016
83166
|
};
|
|
83017
83167
|
return new $c_Lio_kaitai_struct_translators_ResultString($$x1)
|
|
83018
83168
|
}
|
|
@@ -83050,7 +83200,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
|
|
|
83050
83200
|
var _1$1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left$2);
|
|
83051
83201
|
var _2$1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right$2);
|
|
83052
83202
|
if (((_1$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType) && (_2$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType))) {
|
|
83053
|
-
return this.trNumericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$
|
|
83203
|
+
return this.trNumericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__Lio_kaitai_struct_translators_TranslatorResult(left$2, op$3, right$2, extPrec)
|
|
83054
83204
|
} else {
|
|
83055
83205
|
if ((_1$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
|
|
83056
83206
|
if ((_2$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
|
|
@@ -83063,7 +83213,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
|
|
|
83063
83213
|
var $$x2 = false
|
|
83064
83214
|
};
|
|
83065
83215
|
if ($$x2) {
|
|
83066
|
-
return this.trStrConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$
|
|
83216
|
+
return this.trStrConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__I__Lio_kaitai_struct_translators_TranslatorResult(left$2, right$2, extPrec)
|
|
83067
83217
|
} else {
|
|
83068
83218
|
throw new $c_Lio_kaitai_struct_precompile_TypeMismatchError(((((("can't do " + _1$1) + " ") + op$3) + " ") + _2$1))
|
|
83069
83219
|
}
|
|
@@ -83151,7 +83301,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.byteSizeOfClassSpec__Lio
|
|
|
83151
83301
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trBooleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__sci_Seq__Lio_kaitai_struct_translators_ResultString = (function(op, values) {
|
|
83152
83302
|
return new $c_Lio_kaitai_struct_translators_ResultString($f_Lio_kaitai_struct_translators_CommonOps__doBooleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__sci_Seq__T(this, op, values))
|
|
83153
83303
|
});
|
|
83154
|
-
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trNumericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$
|
|
83304
|
+
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trNumericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__Lio_kaitai_struct_translators_TranslatorResult = (function(left, op, right, extPrec) {
|
|
83155
83305
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
83156
83306
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
83157
83307
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -83166,19 +83316,20 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.trNumericBinOp__Lio_kait
|
|
|
83166
83316
|
};
|
|
83167
83317
|
if ($$x1) {
|
|
83168
83318
|
var v1 = this.allocateLocalVar__I();
|
|
83169
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V(((((this.localVarName__I__T(v1) + " := ") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83319
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V(((((this.localVarName__I__T(v1) + " := ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + " % ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)));
|
|
83170
83320
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((("if " + this.localVarName__I__T(v1)) + " < 0 {"));
|
|
83171
83321
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).inc__V();
|
|
83172
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V(((this.localVarName__I__T(v1) + " += ") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83322
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V(((this.localVarName__I__T(v1) + " += ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)));
|
|
83173
83323
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).dec__V();
|
|
83174
83324
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V("}");
|
|
83175
83325
|
return new $c_Lio_kaitai_struct_translators_ResultLocalVar(v1)
|
|
83176
83326
|
} else {
|
|
83177
|
-
return new $c_Lio_kaitai_struct_translators_ResultString($
|
|
83327
|
+
return new $c_Lio_kaitai_struct_translators_ResultString($f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec))
|
|
83178
83328
|
}
|
|
83179
83329
|
});
|
|
83180
|
-
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trStrConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$
|
|
83181
|
-
|
|
83330
|
+
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trStrConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__I__Lio_kaitai_struct_translators_TranslatorResult = (function(left, right, extPrec) {
|
|
83331
|
+
var op = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
|
|
83332
|
+
return new $c_Lio_kaitai_struct_translators_ResultString($f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec))
|
|
83182
83333
|
});
|
|
83183
83334
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trNumericCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult = (function(left, op, right) {
|
|
83184
83335
|
return new $c_Lio_kaitai_struct_translators_ResultString($f_Lio_kaitai_struct_translators_CommonOps__doNumericCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right))
|
|
@@ -83191,9 +83342,9 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.trBytesCompareOp__Lio_ka
|
|
|
83191
83342
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "bytes");
|
|
83192
83343
|
var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
|
|
83193
83344
|
if ((x === op)) {
|
|
83194
|
-
return new $c_Lio_kaitai_struct_translators_ResultString((((("bytes.Equal(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83345
|
+
return new $c_Lio_kaitai_struct_translators_ResultString((((("bytes.Equal(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")"))
|
|
83195
83346
|
} else {
|
|
83196
|
-
return new $c_Lio_kaitai_struct_translators_ResultString((((((("(bytes.Compare(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83347
|
+
return new $c_Lio_kaitai_struct_translators_ResultString((((((("(bytes.Compare(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ") ") + $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)) + " 0)"))
|
|
83197
83348
|
}
|
|
83198
83349
|
});
|
|
83199
83350
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
|
|
@@ -83303,19 +83454,19 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.specialName__T__T = (fun
|
|
|
83303
83454
|
}
|
|
83304
83455
|
});
|
|
83305
83456
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultString = (function(container, idx) {
|
|
83306
|
-
return new $c_Lio_kaitai_struct_translators_ResultString((((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83457
|
+
return new $c_Lio_kaitai_struct_translators_ResultString((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]"))
|
|
83307
83458
|
});
|
|
83308
83459
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultLocalVar = (function(condition, ifTrue, ifFalse) {
|
|
83309
83460
|
var v1 = this.allocateLocalVar__I();
|
|
83310
83461
|
var typ = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(ifTrue);
|
|
83311
83462
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((("var " + this.localVarName__I__T(v1)) + " ") + $m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(typ)) + ";"));
|
|
83312
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((("if (" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83463
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((("if (" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + ") {"));
|
|
83313
83464
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).inc__V();
|
|
83314
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V(((this.localVarName__I__T(v1) + " = ") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83465
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V(((this.localVarName__I__T(v1) + " = ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)));
|
|
83315
83466
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).dec__V();
|
|
83316
83467
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V("} else {");
|
|
83317
83468
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).inc__V();
|
|
83318
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V(((this.localVarName__I__T(v1) + " = ") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83469
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V(((this.localVarName__I__T(v1) + " = ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)));
|
|
83319
83470
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).dec__V();
|
|
83320
83471
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V("}");
|
|
83321
83472
|
return new $c_Lio_kaitai_struct_translators_ResultLocalVar(v1)
|
|
@@ -83330,7 +83481,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.doArrayLiteral__Lio_kait
|
|
|
83330
83481
|
var $$x1 = $m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(t);
|
|
83331
83482
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
83332
83483
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
83333
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83484
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
83334
83485
|
})))));
|
|
83335
83486
|
return new $c_Lio_kaitai_struct_translators_ResultString((((("[]" + $$x1) + "{") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "}"))
|
|
83336
83487
|
});
|
|
@@ -83344,12 +83495,12 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.doByteArrayLiteral__sci_
|
|
|
83344
83495
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.doByteArrayNonLiteral__sci_Seq__Lio_kaitai_struct_translators_TranslatorResult = (function(elts) {
|
|
83345
83496
|
var this$2 = $n($as_sc_IterableOnceOps($n(elts).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
83346
83497
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
83347
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83498
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
83348
83499
|
})))));
|
|
83349
83500
|
return new $c_Lio_kaitai_struct_translators_ResultString((("[]uint8{" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "}"))
|
|
83350
83501
|
});
|
|
83351
83502
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.bytesToStr__Lio_kaitai_struct_exprlang_Ast$expr__T__Lio_kaitai_struct_translators_TranslatorResult = (function(value, encoding) {
|
|
83352
|
-
return this.bytesToStr__T__T__Lio_kaitai_struct_translators_TranslatorResult(this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83503
|
+
return this.bytesToStr__T__T__Lio_kaitai_struct_translators_TranslatorResult(this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0), encoding)
|
|
83353
83504
|
});
|
|
83354
83505
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.bytesToStr__T__T__Lio_kaitai_struct_translators_TranslatorResult = (function(bytesExpr, encoding) {
|
|
83355
83506
|
switch (encoding) {
|
|
@@ -83380,18 +83531,18 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.bytesToStr__T__T__Lio_ka
|
|
|
83380
83531
|
}
|
|
83381
83532
|
});
|
|
83382
83533
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult = (function(a) {
|
|
83383
|
-
return new $c_Lio_kaitai_struct_translators_ResultString((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83534
|
+
return new $c_Lio_kaitai_struct_translators_ResultString((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + "[0]"))
|
|
83384
83535
|
});
|
|
83385
83536
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultString = (function(a) {
|
|
83386
83537
|
var v = this.allocateLocalVar__I();
|
|
83387
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V(((this.localVarName__I__T(v) + " := ") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83538
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V(((this.localVarName__I__T(v) + " := ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)));
|
|
83388
83539
|
return new $c_Lio_kaitai_struct_translators_ResultString((((this.localVarName__I__T(v) + "[len(") + this.localVarName__I__T(v)) + ") - 1]"))
|
|
83389
83540
|
});
|
|
83390
83541
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult = (function(a) {
|
|
83391
|
-
return new $c_Lio_kaitai_struct_translators_ResultString((("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83542
|
+
return new $c_Lio_kaitai_struct_translators_ResultString((("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")"))
|
|
83392
83543
|
});
|
|
83393
83544
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.userTypeField__Lio_kaitai_struct_datatype_DataType$UserType__Lio_kaitai_struct_exprlang_Ast$expr__T__Lio_kaitai_struct_translators_TranslatorResult = (function(ut, value, name) {
|
|
83394
|
-
var valueStr = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83545
|
+
var valueStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0);
|
|
83395
83546
|
if ((($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ROOT === name) || (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_PARENT === name) || ($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_IO === name)))) {
|
|
83396
83547
|
var _1 = this.specialName__T__T(name);
|
|
83397
83548
|
var x1$2___1 = _1;
|
|
@@ -83407,7 +83558,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.userTypeField__Lio_kaita
|
|
|
83407
83558
|
return (twoOuts ? this.outVarCheckRes__T__Lio_kaitai_struct_translators_ResultLocalVar((((valueStr + ".") + call) + "()")) : new $c_Lio_kaitai_struct_translators_ResultString(((valueStr + ".") + call)))
|
|
83408
83559
|
});
|
|
83409
83560
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.kaitaiStructField__Lio_kaitai_struct_exprlang_Ast$expr__T__Lio_kaitai_struct_translators_TranslatorResult = (function(value, name) {
|
|
83410
|
-
var valueStr = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83561
|
+
var valueStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0);
|
|
83411
83562
|
if ((!(($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ROOT === name) || (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_PARENT === name) || ($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_IO === name))))) {
|
|
83412
83563
|
throw new $c_s_MatchError(name)
|
|
83413
83564
|
};
|
|
@@ -83417,41 +83568,41 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.kaitaiStructField__Lio_k
|
|
|
83417
83568
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult = (function(s) {
|
|
83418
83569
|
var this$1 = $n(this.Lio_kaitai_struct_translators_GoTranslator__f_importList);
|
|
83419
83570
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "unicode/utf8");
|
|
83420
|
-
return new $c_Lio_kaitai_struct_translators_ResultString((("utf8.RuneCountInString(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83571
|
+
return new $c_Lio_kaitai_struct_translators_ResultString((("utf8.RuneCountInString(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")"))
|
|
83421
83572
|
});
|
|
83422
83573
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult = (function(s) {
|
|
83423
|
-
return new $c_Lio_kaitai_struct_translators_ResultString((("kaitai.StringReverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83574
|
+
return new $c_Lio_kaitai_struct_translators_ResultString((("kaitai.StringReverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")"))
|
|
83424
83575
|
});
|
|
83425
83576
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult = (function(s, base) {
|
|
83426
83577
|
var this$1 = $n(this.Lio_kaitai_struct_translators_GoTranslator__f_importList);
|
|
83427
83578
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "strconv");
|
|
83428
|
-
return this.outVarCheckRes__T__Lio_kaitai_struct_translators_ResultLocalVar((((("strconv.ParseInt(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83579
|
+
return this.outVarCheckRes__T__Lio_kaitai_struct_translators_ResultLocalVar((((("strconv.ParseInt(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0)) + ", 0)"))
|
|
83429
83580
|
});
|
|
83430
83581
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult = (function(s, from, to) {
|
|
83431
|
-
return new $c_Lio_kaitai_struct_translators_ResultString((((((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83582
|
+
return new $c_Lio_kaitai_struct_translators_ResultString((((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_GoTranslator__f_METHOD_PRECEDENCE) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0)) + ":") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, 0)) + "]"))
|
|
83432
83583
|
});
|
|
83433
83584
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult = (function(value) {
|
|
83434
83585
|
var this$1 = $n(this.Lio_kaitai_struct_translators_GoTranslator__f_importList);
|
|
83435
83586
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "strconv");
|
|
83436
|
-
return new $c_Lio_kaitai_struct_translators_ResultString((("strconv.Itoa(int64(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83587
|
+
return new $c_Lio_kaitai_struct_translators_ResultString((("strconv.Itoa(int64(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + "))"))
|
|
83437
83588
|
});
|
|
83438
83589
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultString = (function(value) {
|
|
83439
|
-
return new $c_Lio_kaitai_struct_translators_ResultString((("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83590
|
+
return new $c_Lio_kaitai_struct_translators_ResultString((("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")"))
|
|
83440
83591
|
});
|
|
83441
83592
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultLocalVar = (function(value) {
|
|
83442
|
-
return this.outVarCheckRes__T__Lio_kaitai_struct_translators_ResultLocalVar((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83593
|
+
return this.outVarCheckRes__T__Lio_kaitai_struct_translators_ResultLocalVar((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_GoTranslator__f_METHOD_PRECEDENCE) + ".Size()"))
|
|
83443
83594
|
});
|
|
83444
83595
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultLocalVar = (function(value) {
|
|
83445
|
-
return this.outVarCheckRes__T__Lio_kaitai_struct_translators_ResultLocalVar((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83596
|
+
return this.outVarCheckRes__T__Lio_kaitai_struct_translators_ResultLocalVar((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_GoTranslator__f_METHOD_PRECEDENCE) + ".EOF()"))
|
|
83446
83597
|
});
|
|
83447
83598
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultLocalVar = (function(value) {
|
|
83448
|
-
return this.outVarCheckRes__T__Lio_kaitai_struct_translators_ResultLocalVar((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83599
|
+
return this.outVarCheckRes__T__Lio_kaitai_struct_translators_ResultLocalVar((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_GoTranslator__f_METHOD_PRECEDENCE) + ".Pos()"))
|
|
83449
83600
|
});
|
|
83450
83601
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultLocalVar = (function(a) {
|
|
83451
83602
|
var min = this.allocateLocalVar__I();
|
|
83452
83603
|
var value = this.allocateLocalVar__I();
|
|
83453
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((this.localVarName__I__T(min) + " := ") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83454
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((("for _, " + this.localVarName__I__T(value)) + " := range ") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83604
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((this.localVarName__I__T(min) + " := ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + "[0]"));
|
|
83605
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((("for _, " + this.localVarName__I__T(value)) + " := range ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + " {"));
|
|
83455
83606
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).inc__V();
|
|
83456
83607
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((("if " + this.localVarName__I__T(min)) + " > ") + this.localVarName__I__T(value)) + " {"));
|
|
83457
83608
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).inc__V();
|
|
@@ -83465,8 +83616,8 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.arrayMin__Lio_kaitai_str
|
|
|
83465
83616
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultLocalVar = (function(a) {
|
|
83466
83617
|
var max = this.allocateLocalVar__I();
|
|
83467
83618
|
var value = this.allocateLocalVar__I();
|
|
83468
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((this.localVarName__I__T(max) + " := ") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83469
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((("for _, " + this.localVarName__I__T(value)) + " := range ") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83619
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((this.localVarName__I__T(max) + " := ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + "[0]"));
|
|
83620
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((("for _, " + this.localVarName__I__T(value)) + " := range ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + " {"));
|
|
83470
83621
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).inc__V();
|
|
83471
83622
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((("if " + this.localVarName__I__T(max)) + " < ") + this.localVarName__I__T(value)) + " {"));
|
|
83472
83623
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).inc__V();
|
|
@@ -83480,7 +83631,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.arrayMax__Lio_kaitai_str
|
|
|
83480
83631
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultLocalVar = (function(value) {
|
|
83481
83632
|
var v = this.allocateLocalVar__I();
|
|
83482
83633
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((this.localVarName__I__T(v) + " := 0"));
|
|
83483
|
-
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((("if " + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83634
|
+
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((("if " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + " {"));
|
|
83484
83635
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).inc__V();
|
|
83485
83636
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((this.localVarName__I__T(v) + " = 1"));
|
|
83486
83637
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).dec__V();
|
|
@@ -83506,7 +83657,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.userType__Lio_kaitai_str
|
|
|
83506
83657
|
};
|
|
83507
83658
|
if (rc8) {
|
|
83508
83659
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2).s_Some__f_value);
|
|
83509
|
-
var parent = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83660
|
+
var parent = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
83510
83661
|
break matchEnd9
|
|
83511
83662
|
};
|
|
83512
83663
|
var x$3 = $m_s_None$();
|
|
@@ -83519,7 +83670,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.userType__Lio_kaitai_str
|
|
|
83519
83670
|
var root = ($n(t).isOpaque__Z() ? "nil" : "this._root");
|
|
83520
83671
|
var this$2 = $n($as_sc_IterableOnceOps($n($n(t).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
83521
83672
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
83522
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83673
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
83523
83674
|
})))));
|
|
83524
83675
|
var addParams = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "");
|
|
83525
83676
|
$n(this.Lio_kaitai_struct_translators_GoTranslator__f_out).puts__T__V((((((this.localVarName__I__T(v) + " := New") + $m_Lio_kaitai_struct_languages_GoCompiler$().types2class__sci_List__T($n($as_Lio_kaitai_struct_format_ClassSpec($n($n(t).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O())).Lio_kaitai_struct_format_ClassSpec__f_name)) + "(") + addParams) + ")"));
|
|
@@ -83550,7 +83701,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.trInterpolatedStringLite
|
|
|
83550
83701
|
var escapedFmtStr = $as_T(this$9.split("%").join("%%"));
|
|
83551
83702
|
return new $c_T2($f_Lio_kaitai_struct_translators_CommonLiterals__doStringLiteralBody__T__T(this, escapedFmtStr), $m_s_None$())
|
|
83552
83703
|
} else {
|
|
83553
|
-
return new $c_T2("%v", new $c_s_Some(this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
83704
|
+
return new $c_T2("%v", new $c_s_Some(this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(x0$1, 0)))
|
|
83554
83705
|
}
|
|
83555
83706
|
}))));
|
|
83556
83707
|
var this$10 = $n($as_sc_IterableOnceOps($n(piecesAndArgs).map__F1__O(new $c_sjsr_AnonFunction1(((x$2) => {
|
|
@@ -83613,7 +83764,7 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.boolToInt__Lio_kaitai_st
|
|
|
83613
83764
|
return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultLocalVar(value)
|
|
83614
83765
|
});
|
|
83615
83766
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
|
|
83616
|
-
return this.translateExpr__Lio_kaitai_struct_exprlang_Ast$
|
|
83767
|
+
return this.translateExpr__Lio_kaitai_struct_exprlang_Ast$expr__I__Lio_kaitai_struct_translators_TranslatorResult(value, 0)
|
|
83617
83768
|
});
|
|
83618
83769
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
|
|
83619
83770
|
return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultLocalVar(a)
|
|
@@ -85168,6 +85319,8 @@ function $c_Lio_kaitai_struct_translators_CSharpTranslator(provider, importList)
|
|
|
85168
85319
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
85169
85320
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
85170
85321
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
85322
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
85323
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
85171
85324
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
85172
85325
|
this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList = null;
|
|
85173
85326
|
this.Lio_kaitai_struct_translators_CSharpTranslator__f_asciiCharQuoteMap = null;
|
|
@@ -85189,7 +85342,7 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doArrayLiteral__Lio_
|
|
|
85189
85342
|
var nativeType = $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(t);
|
|
85190
85343
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
85191
85344
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
85192
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85345
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
85193
85346
|
})))));
|
|
85194
85347
|
var commaStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "");
|
|
85195
85348
|
var this$3 = $n(this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList);
|
|
@@ -85206,7 +85359,7 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doByteArrayLiteral__
|
|
|
85206
85359
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(elts) {
|
|
85207
85360
|
var this$2 = $n($as_sc_IterableOnceOps($n(elts).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
85208
85361
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
85209
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85362
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
85210
85363
|
})))));
|
|
85211
85364
|
return (("new byte[] { " + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + " }")
|
|
85212
85365
|
});
|
|
@@ -85216,7 +85369,7 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.asciiCharQuoteMap__s
|
|
|
85216
85369
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.strLiteralGenericCC__C__T = (function(code) {
|
|
85217
85370
|
return $f_Lio_kaitai_struct_translators_CommonLiterals__strLiteralUnicode__C__T(this, code)
|
|
85218
85371
|
});
|
|
85219
|
-
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.
|
|
85372
|
+
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
85220
85373
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
85221
85374
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
85222
85375
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -85230,9 +85383,9 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.numericBinOp__Lio_ka
|
|
|
85230
85383
|
var $$x1 = false
|
|
85231
85384
|
};
|
|
85232
85385
|
if ($$x1) {
|
|
85233
|
-
return (((("KaitaiStream.Mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85386
|
+
return (((("KaitaiStream.Mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
85234
85387
|
} else {
|
|
85235
|
-
return $
|
|
85388
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec)
|
|
85236
85389
|
}
|
|
85237
85390
|
});
|
|
85238
85391
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doName__T__T = (function(s) {
|
|
@@ -85265,7 +85418,7 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doStrCompareOp__Lio_
|
|
|
85265
85418
|
var $$x1 = false
|
|
85266
85419
|
};
|
|
85267
85420
|
if ($$x1) {
|
|
85268
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85421
|
+
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + " == ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0))
|
|
85269
85422
|
} else {
|
|
85270
85423
|
var x$4 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
|
|
85271
85424
|
if ((op !== null)) {
|
|
@@ -85275,73 +85428,73 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doStrCompareOp__Lio_
|
|
|
85275
85428
|
var $$x2 = false
|
|
85276
85429
|
};
|
|
85277
85430
|
if ($$x2) {
|
|
85278
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85431
|
+
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + " != ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0))
|
|
85279
85432
|
} else {
|
|
85280
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85433
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ".CompareTo(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ") ") + $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)) + " 0)")
|
|
85281
85434
|
}
|
|
85282
85435
|
}
|
|
85283
85436
|
});
|
|
85284
85437
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doBytesCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
|
|
85285
|
-
return (((((("(KaitaiStream.ByteArrayCompare(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85438
|
+
return (((((("(KaitaiStream.ByteArrayCompare(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ") ") + $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)) + " 0)")
|
|
85286
85439
|
});
|
|
85287
85440
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
85288
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85441
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]")
|
|
85289
85442
|
});
|
|
85290
85443
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
85291
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85444
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + " ? ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + " : ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + ")")
|
|
85292
85445
|
});
|
|
85293
85446
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
85294
|
-
return (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(typeName)) + ") (") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85447
|
+
return (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(typeName)) + ") (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + "))")
|
|
85295
85448
|
});
|
|
85296
85449
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
85297
85450
|
var this$1 = $n(this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList);
|
|
85298
85451
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "System");
|
|
85299
|
-
return (((("Convert.ToInt64(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85452
|
+
return (((("Convert.ToInt64(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0)) + ")")
|
|
85300
85453
|
});
|
|
85301
85454
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
85302
|
-
return (("(long) (" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85455
|
+
return (("(long) (" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
85303
85456
|
});
|
|
85304
85457
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
85305
|
-
return (
|
|
85458
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".ToString()")
|
|
85306
85459
|
});
|
|
85307
85460
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
85308
85461
|
return (((("System.Text.Encoding.GetEncoding(\"" + encoding) + "\").GetString(") + bytesExpr) + ")")
|
|
85309
85462
|
});
|
|
85310
85463
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
85311
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85464
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".Length")
|
|
85312
85465
|
});
|
|
85313
85466
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
85314
|
-
return (("KaitaiStream.StringReverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85467
|
+
return (("KaitaiStream.StringReverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")")
|
|
85315
85468
|
});
|
|
85316
85469
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
85317
|
-
return (((((
|
|
85470
|
+
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".Substring(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0)) + ", ") + this.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, $m_Lio_kaitai_struct_exprlang_Ast$operator$Sub$(), from, 0)) + ")")
|
|
85318
85471
|
});
|
|
85319
85472
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
85320
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85473
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".Length")
|
|
85321
85474
|
});
|
|
85322
85475
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
85323
|
-
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85476
|
+
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE);
|
|
85324
85477
|
return (((v + "[") + v) + ".Length - 1]")
|
|
85325
85478
|
});
|
|
85326
85479
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85327
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85480
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "[0]")
|
|
85328
85481
|
});
|
|
85329
85482
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85330
|
-
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85483
|
+
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE);
|
|
85331
85484
|
return (((v + "[") + v) + ".Count - 1]")
|
|
85332
85485
|
});
|
|
85333
85486
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85334
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85487
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".Count")
|
|
85335
85488
|
});
|
|
85336
85489
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85337
85490
|
var this$1 = $n(this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList);
|
|
85338
85491
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "System.Linq");
|
|
85339
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85492
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".Min()")
|
|
85340
85493
|
});
|
|
85341
85494
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85342
85495
|
var this$1 = $n(this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList);
|
|
85343
85496
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "System.Linq");
|
|
85344
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85497
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".Max()")
|
|
85345
85498
|
});
|
|
85346
85499
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
|
|
85347
85500
|
return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
|
|
@@ -85380,7 +85533,7 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.floatToInt__Lio_kait
|
|
|
85380
85533
|
return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
85381
85534
|
});
|
|
85382
85535
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
|
|
85383
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85536
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
85384
85537
|
});
|
|
85385
85538
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
|
|
85386
85539
|
return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
|
|
@@ -85417,6 +85570,8 @@ function $c_Lio_kaitai_struct_translators_JavaScriptTranslator(provider) {
|
|
|
85417
85570
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
85418
85571
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
85419
85572
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
85573
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
85574
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
85420
85575
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
85421
85576
|
$ct_Lio_kaitai_struct_translators_BaseTranslator__Lio_kaitai_struct_translators_TypeProvider__(this, provider)
|
|
85422
85577
|
}
|
|
@@ -85430,7 +85585,7 @@ $h_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype = $c_Lio_kaitai_
|
|
|
85430
85585
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(elts) {
|
|
85431
85586
|
var this$2 = $n($as_sc_IterableOnceOps($n(elts).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
85432
85587
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
85433
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85588
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
85434
85589
|
})))));
|
|
85435
85590
|
return (("new Uint8Array([" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "])")
|
|
85436
85591
|
});
|
|
@@ -85439,7 +85594,7 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.strLiteralGeneri
|
|
|
85439
85594
|
var array = [code];
|
|
85440
85595
|
return $n($$x1).format$extension__T__sci_Seq__T("\\x%02x", $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array))
|
|
85441
85596
|
});
|
|
85442
|
-
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.
|
|
85597
|
+
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
85443
85598
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
85444
85599
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
85445
85600
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -85453,7 +85608,7 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.numericBinOp__Li
|
|
|
85453
85608
|
var $$x1 = false
|
|
85454
85609
|
};
|
|
85455
85610
|
if ($$x1) {
|
|
85456
|
-
return ((
|
|
85611
|
+
return (("Math.floor(" + $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, 0)) + ")")
|
|
85457
85612
|
} else {
|
|
85458
85613
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
85459
85614
|
if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -85466,7 +85621,7 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.numericBinOp__Li
|
|
|
85466
85621
|
var $$x2 = false
|
|
85467
85622
|
};
|
|
85468
85623
|
if ($$x2) {
|
|
85469
|
-
return (((("KaitaiStream.mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85624
|
+
return (((("KaitaiStream.mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
85470
85625
|
} else {
|
|
85471
85626
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
85472
85627
|
if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -85479,9 +85634,9 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.numericBinOp__Li
|
|
|
85479
85634
|
var $$x3 = false
|
|
85480
85635
|
};
|
|
85481
85636
|
if ($$x3) {
|
|
85482
|
-
return (
|
|
85637
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOpStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__T__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, ">>>", right, extPrec)
|
|
85483
85638
|
} else {
|
|
85484
|
-
return $
|
|
85639
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec)
|
|
85485
85640
|
}
|
|
85486
85641
|
}
|
|
85487
85642
|
}
|
|
@@ -85515,56 +85670,56 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doEnumById__sci_
|
|
|
85515
85670
|
return label
|
|
85516
85671
|
});
|
|
85517
85672
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doBytesCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
|
|
85518
|
-
return (((((("(KaitaiStream.byteArrayCompare(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85673
|
+
return (((((("(KaitaiStream.byteArrayCompare(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ") ") + $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)) + " 0)")
|
|
85519
85674
|
});
|
|
85520
85675
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
85521
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85676
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]")
|
|
85522
85677
|
});
|
|
85523
85678
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
85524
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85679
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + " ? ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + " : ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + ")")
|
|
85525
85680
|
});
|
|
85526
85681
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
85527
|
-
return (((("Number.parseInt(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85682
|
+
return (((("Number.parseInt(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0)) + ")")
|
|
85528
85683
|
});
|
|
85529
85684
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
85530
|
-
return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85685
|
+
return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + " | 0)")
|
|
85531
85686
|
});
|
|
85532
85687
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
85533
|
-
return (("Math.trunc(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85688
|
+
return (("Math.trunc(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
85534
85689
|
});
|
|
85535
85690
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
85536
|
-
return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85691
|
+
return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, 0)) + ").toString()")
|
|
85537
85692
|
});
|
|
85538
85693
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
85539
85694
|
return (((("KaitaiStream.bytesToStr(" + bytesExpr) + ", \"") + encoding) + "\")")
|
|
85540
85695
|
});
|
|
85541
85696
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
85542
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85697
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".length")
|
|
85543
85698
|
});
|
|
85544
85699
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
85545
|
-
return (("Array.from(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85700
|
+
return (("Array.from(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ").reverse().join('')")
|
|
85546
85701
|
});
|
|
85547
85702
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
85548
|
-
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85703
|
+
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".substring(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, 0)) + ")")
|
|
85549
85704
|
});
|
|
85550
85705
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85551
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85706
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + "[0]")
|
|
85552
85707
|
});
|
|
85553
85708
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85554
|
-
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85709
|
+
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0);
|
|
85555
85710
|
return (((v + "[") + v) + ".length - 1]")
|
|
85556
85711
|
});
|
|
85557
85712
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85558
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85713
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".length")
|
|
85559
85714
|
});
|
|
85560
85715
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85561
|
-
return (("KaitaiStream.arrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85716
|
+
return (("KaitaiStream.arrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
85562
85717
|
});
|
|
85563
85718
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85564
|
-
return (("KaitaiStream.arrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85719
|
+
return (("KaitaiStream.arrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
85565
85720
|
});
|
|
85566
85721
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
85567
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85722
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".isEof()")
|
|
85568
85723
|
});
|
|
85569
85724
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
|
|
85570
85725
|
return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
@@ -85603,7 +85758,7 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.boolToInt__Lio_k
|
|
|
85603
85758
|
return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
85604
85759
|
});
|
|
85605
85760
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
|
|
85606
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85761
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
85607
85762
|
});
|
|
85608
85763
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
|
|
85609
85764
|
return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
|
|
@@ -85631,6 +85786,8 @@ function $c_Lio_kaitai_struct_translators_JavaTranslator(provider, importList) {
|
|
|
85631
85786
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
85632
85787
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
85633
85788
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
85789
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
85790
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
85634
85791
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
85635
85792
|
this.Lio_kaitai_struct_translators_JavaTranslator__f_importList = null;
|
|
85636
85793
|
this.Lio_kaitai_struct_translators_JavaTranslator__f_importList = importList;
|
|
@@ -85683,7 +85840,7 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doArrayLiteral__Lio_ka
|
|
|
85683
85840
|
var javaType = $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(t);
|
|
85684
85841
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
85685
85842
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
85686
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85843
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
85687
85844
|
})))));
|
|
85688
85845
|
var commaStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "");
|
|
85689
85846
|
var this$3 = $n(this.Lio_kaitai_struct_translators_JavaTranslator__f_importList);
|
|
@@ -85699,11 +85856,11 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doByteArrayLiteral__sc
|
|
|
85699
85856
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(elts) {
|
|
85700
85857
|
var this$2 = $n($as_sc_IterableOnceOps($n(elts).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
85701
85858
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
85702
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85859
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
85703
85860
|
})))));
|
|
85704
85861
|
return (("new byte[] { " + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + " }")
|
|
85705
85862
|
});
|
|
85706
|
-
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.
|
|
85863
|
+
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
85707
85864
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
85708
85865
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
85709
85866
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -85717,9 +85874,9 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.numericBinOp__Lio_kait
|
|
|
85717
85874
|
var $$x1 = false
|
|
85718
85875
|
};
|
|
85719
85876
|
if ($$x1) {
|
|
85720
|
-
return (((("KaitaiStream.mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85877
|
+
return (((("KaitaiStream.mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
85721
85878
|
} else {
|
|
85722
|
-
return $
|
|
85879
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec)
|
|
85723
85880
|
}
|
|
85724
85881
|
});
|
|
85725
85882
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doName__T__T = (function(s) {
|
|
@@ -85767,13 +85924,13 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.enumClass__sci_List__T
|
|
|
85767
85924
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doStrCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
|
|
85768
85925
|
var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
|
|
85769
85926
|
if ((x === op)) {
|
|
85770
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85927
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + ".equals(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
85771
85928
|
} else {
|
|
85772
85929
|
var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
|
|
85773
85930
|
if ((x$3 === op)) {
|
|
85774
|
-
return (((("!(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85931
|
+
return (((("!(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ").equals(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
85775
85932
|
} else {
|
|
85776
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85933
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ".compareTo(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ") ") + $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)) + " 0)")
|
|
85777
85934
|
}
|
|
85778
85935
|
}
|
|
85779
85936
|
});
|
|
@@ -85782,39 +85939,39 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doBytesCompareOp__Lio_
|
|
|
85782
85939
|
if ((x === op)) {
|
|
85783
85940
|
var this$1 = $n(this.Lio_kaitai_struct_translators_JavaTranslator__f_importList);
|
|
85784
85941
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "java.util.Arrays");
|
|
85785
|
-
return (((("Arrays.equals(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85942
|
+
return (((("Arrays.equals(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
85786
85943
|
} else {
|
|
85787
85944
|
var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
|
|
85788
85945
|
if ((x$3 === op)) {
|
|
85789
85946
|
var this$2 = $n(this.Lio_kaitai_struct_translators_JavaTranslator__f_importList);
|
|
85790
85947
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, "java.util.Arrays");
|
|
85791
|
-
return (((("!Arrays.equals(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85948
|
+
return (((("!Arrays.equals(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
85792
85949
|
} else {
|
|
85793
|
-
return (((((("(KaitaiStream.byteArrayCompare(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85950
|
+
return (((((("(KaitaiStream.byteArrayCompare(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ") ") + $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)) + " 0)")
|
|
85794
85951
|
}
|
|
85795
85952
|
}
|
|
85796
85953
|
});
|
|
85797
85954
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
85798
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85955
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0) + ".get((int) ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE)) + ")")
|
|
85799
85956
|
});
|
|
85800
85957
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
85801
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85958
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + " ? ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + " : ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + ")")
|
|
85802
85959
|
});
|
|
85803
85960
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
85804
85961
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
85805
|
-
return (((("((" + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(typeName)) + ") (") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85962
|
+
return (((("((" + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(typeName)) + ") (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + "))")
|
|
85806
85963
|
});
|
|
85807
85964
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
85808
|
-
return (((("Long.parseLong(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85965
|
+
return (((("Long.parseLong(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0)) + ")")
|
|
85809
85966
|
});
|
|
85810
85967
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
|
|
85811
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85968
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0) + ".id()")
|
|
85812
85969
|
});
|
|
85813
85970
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
85814
|
-
return (("(int) (" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85971
|
+
return (("(int) (" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + " + 0)")
|
|
85815
85972
|
});
|
|
85816
85973
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
85817
|
-
return (("Long.toString(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
85974
|
+
return (("Long.toString(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, 0)) + ")")
|
|
85818
85975
|
});
|
|
85819
85976
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
85820
85977
|
var this$14 = $n($m_s_Predef$().s_Predef$__f_Map);
|
|
@@ -85840,51 +85997,51 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesToStr__T__T__T =
|
|
|
85840
85997
|
return (((("new String(" + bytesExpr) + ", ") + charsetExpr) + ")")
|
|
85841
85998
|
});
|
|
85842
85999
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
85843
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86000
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".length")
|
|
85844
86001
|
});
|
|
85845
86002
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
85846
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86003
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]")
|
|
85847
86004
|
});
|
|
85848
86005
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
85849
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86006
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "[0]")
|
|
85850
86007
|
});
|
|
85851
86008
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
85852
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86009
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "[(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ").length - 1]")
|
|
85853
86010
|
});
|
|
85854
86011
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
85855
|
-
return (("KaitaiStream.byteArrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86012
|
+
return (("KaitaiStream.byteArrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
85856
86013
|
});
|
|
85857
86014
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
85858
|
-
return (("KaitaiStream.byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86015
|
+
return (("KaitaiStream.byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
85859
86016
|
});
|
|
85860
86017
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
85861
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86018
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".length()")
|
|
85862
86019
|
});
|
|
85863
86020
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
85864
|
-
return (("new StringBuilder(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86021
|
+
return (("new StringBuilder(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ").reverse().toString()")
|
|
85865
86022
|
});
|
|
85866
86023
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
85867
|
-
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86024
|
+
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".substring(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, 0)) + ")")
|
|
85868
86025
|
});
|
|
85869
86026
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85870
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86027
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".get(0)")
|
|
85871
86028
|
});
|
|
85872
86029
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85873
|
-
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86030
|
+
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE);
|
|
85874
86031
|
return (((v + ".get(") + v) + ".size() - 1)")
|
|
85875
86032
|
});
|
|
85876
86033
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85877
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86034
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".size()")
|
|
85878
86035
|
});
|
|
85879
86036
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85880
86037
|
var this$1 = $n(this.Lio_kaitai_struct_translators_JavaTranslator__f_importList);
|
|
85881
86038
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "java.util.Collections");
|
|
85882
|
-
return (("Collections.min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86039
|
+
return (("Collections.min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
85883
86040
|
});
|
|
85884
86041
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
85885
86042
|
var this$1 = $n(this.Lio_kaitai_struct_translators_JavaTranslator__f_importList);
|
|
85886
86043
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "java.util.Collections");
|
|
85887
|
-
return (("Collections.max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86044
|
+
return (("Collections.max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
85888
86045
|
});
|
|
85889
86046
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
|
|
85890
86047
|
return this.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
|
|
@@ -85972,6 +86129,8 @@ function $c_Lio_kaitai_struct_translators_NimTranslator(provider, importList) {
|
|
|
85972
86129
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
85973
86130
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
85974
86131
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
86132
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
86133
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
85975
86134
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
85976
86135
|
this.Lio_kaitai_struct_translators_NimTranslator__f_importList = null;
|
|
85977
86136
|
this.Lio_kaitai_struct_translators_NimTranslator__f_importList = importList;
|
|
@@ -86011,13 +86170,13 @@ $c_Lio_kaitai_struct_translators_NimTranslator.prototype.doLocalName__T__T = (fu
|
|
|
86011
86170
|
}
|
|
86012
86171
|
});
|
|
86013
86172
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
86014
|
-
return (((((("(if " + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86173
|
+
return (((((("(if " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + ": ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + " else: ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + ")")
|
|
86015
86174
|
});
|
|
86016
86175
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
86017
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86176
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]")
|
|
86018
86177
|
});
|
|
86019
|
-
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$
|
|
86020
|
-
return (((("($" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86178
|
+
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, right, extPrec) {
|
|
86179
|
+
return (((("($" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + " & $") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
86021
86180
|
});
|
|
86022
86181
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T = (function(op) {
|
|
86023
86182
|
var x = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Invert$();
|
|
@@ -86108,9 +86267,9 @@ $c_Lio_kaitai_struct_translators_NimTranslator.prototype.doCast__Lio_kaitai_stru
|
|
|
86108
86267
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$ArrayType(typeName);
|
|
86109
86268
|
var this$1 = $n(this.Lio_kaitai_struct_translators_NimTranslator__f_importList);
|
|
86110
86269
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "sequtils");
|
|
86111
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86270
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0) + ".mapIt(it.") + $m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T($n(x2).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType)) + ")")
|
|
86112
86271
|
} else {
|
|
86113
|
-
return (((("(" + $m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T(typeName)) + "(") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86272
|
+
return (((("(" + $m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T(typeName)) + "(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + "))")
|
|
86114
86273
|
}
|
|
86115
86274
|
});
|
|
86116
86275
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doIntLiteral__s_math_BigInt__T = (function(n) {
|
|
@@ -86146,7 +86305,7 @@ $c_Lio_kaitai_struct_translators_NimTranslator.prototype.doIntLiteral__s_math_Bi
|
|
|
86146
86305
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T = (function(t, value) {
|
|
86147
86306
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
86148
86307
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
86149
|
-
return ((($m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T(t) + "(") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86308
|
+
return ((($m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T(t) + "(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
86150
86309
|
})))));
|
|
86151
86310
|
var contents = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "");
|
|
86152
86311
|
return (("@[" + contents) + "]")
|
|
@@ -86167,49 +86326,49 @@ $c_Lio_kaitai_struct_translators_NimTranslator.prototype.doByteArrayLiteral__sci
|
|
|
86167
86326
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(elts) {
|
|
86168
86327
|
var this$2 = $n($as_sc_IterableOnceOps($n(elts).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
86169
86328
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
86170
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86329
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
86171
86330
|
})))));
|
|
86172
86331
|
return (("@[" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "]")
|
|
86173
86332
|
});
|
|
86174
86333
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86175
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86334
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + "[0]")
|
|
86176
86335
|
});
|
|
86177
86336
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86178
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86337
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + "[^1]")
|
|
86179
86338
|
});
|
|
86180
86339
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86181
|
-
return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86340
|
+
return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
86182
86341
|
});
|
|
86183
86342
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86184
|
-
return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86343
|
+
return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
86185
86344
|
});
|
|
86186
86345
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86187
|
-
return (("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86346
|
+
return (("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
86188
86347
|
});
|
|
86189
86348
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
|
|
86190
|
-
return (("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86349
|
+
return (("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
86191
86350
|
});
|
|
86192
86351
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
86193
|
-
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86352
|
+
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
86194
86353
|
});
|
|
86195
86354
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
86196
86355
|
var this$1 = $n(this.Lio_kaitai_struct_translators_NimTranslator__f_importList);
|
|
86197
86356
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "strutils");
|
|
86198
|
-
return (("intToStr(int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86357
|
+
return (("intToStr(int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + "))")
|
|
86199
86358
|
});
|
|
86200
86359
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
86201
|
-
return (("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86360
|
+
return (("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")")
|
|
86202
86361
|
});
|
|
86203
86362
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
86204
86363
|
var this$1 = $n(this.Lio_kaitai_struct_translators_NimTranslator__f_importList);
|
|
86205
86364
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "unicode");
|
|
86206
|
-
return (("reversed(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86365
|
+
return (("reversed(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")")
|
|
86207
86366
|
});
|
|
86208
86367
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
86209
|
-
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86368
|
+
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0) + ".substr(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, 0)) + " - 1)")
|
|
86210
86369
|
});
|
|
86211
86370
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
86212
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86371
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0) + ".parseInt(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0)) + ")")
|
|
86213
86372
|
});
|
|
86214
86373
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doInterpolatedStringLiteral__sci_Seq__T = (function(exprs) {
|
|
86215
86374
|
if ($n(exprs).isEmpty__Z()) {
|
|
@@ -86290,6 +86449,8 @@ function $c_Lio_kaitai_struct_translators_PerlTranslator(provider, importList) {
|
|
|
86290
86449
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
86291
86450
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
86292
86451
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
86452
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
86453
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
86293
86454
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
86294
86455
|
this.Lio_kaitai_struct_translators_PerlTranslator__f_importList = null;
|
|
86295
86456
|
this.Lio_kaitai_struct_translators_PerlTranslator__f_asciiCharQuoteMap = null;
|
|
@@ -86315,7 +86476,7 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strLiteralUnicode__C__
|
|
|
86315
86476
|
var array = [code];
|
|
86316
86477
|
return $n($$x1).format$extension__T__sci_Seq__T("\\N{U+%04x}", $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array))
|
|
86317
86478
|
});
|
|
86318
|
-
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.
|
|
86479
|
+
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
86319
86480
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
86320
86481
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
86321
86482
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -86329,9 +86490,9 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.numericBinOp__Lio_kait
|
|
|
86329
86490
|
var $$x1 = false
|
|
86330
86491
|
};
|
|
86331
86492
|
if ($$x1) {
|
|
86332
|
-
return ((
|
|
86493
|
+
return (("int(" + $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, 0)) + ")")
|
|
86333
86494
|
} else {
|
|
86334
|
-
return $
|
|
86495
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec)
|
|
86335
86496
|
}
|
|
86336
86497
|
});
|
|
86337
86498
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doBoolLiteral__Z__T = (function(n) {
|
|
@@ -86340,7 +86501,7 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doBoolLiteral__Z__T =
|
|
|
86340
86501
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T = (function(t, value) {
|
|
86341
86502
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
86342
86503
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
86343
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86504
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
86344
86505
|
})))));
|
|
86345
86506
|
return (("[" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "]")
|
|
86346
86507
|
});
|
|
@@ -86354,12 +86515,12 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doByteArrayLiteral__sc
|
|
|
86354
86515
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(elts) {
|
|
86355
86516
|
var this$2 = $n($as_sc_IterableOnceOps($n(elts).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
86356
86517
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
86357
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86518
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
86358
86519
|
})))));
|
|
86359
86520
|
return (("pack('C*', (" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "))")
|
|
86360
86521
|
});
|
|
86361
86522
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
|
|
86362
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86523
|
+
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0) + "->") + this.doName__T__T(attrName))
|
|
86363
86524
|
});
|
|
86364
86525
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doLocalName__T__T = (function(s) {
|
|
86365
86526
|
return (((s === "_") || (s === "_on")) ? ("$" + s) : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX === s) ? this.doName__T__T(s) : ("$self->" + this.doName__T__T(s))))
|
|
@@ -86421,37 +86582,38 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doStrCompareOp__Lio_ka
|
|
|
86421
86582
|
}
|
|
86422
86583
|
}
|
|
86423
86584
|
};
|
|
86424
|
-
return ((((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86585
|
+
return ((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + " ") + opStr) + " ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0))
|
|
86425
86586
|
});
|
|
86426
86587
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doBytesCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
|
|
86427
86588
|
return this.doStrCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T(left, op, right)
|
|
86428
86589
|
});
|
|
86429
86590
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
86430
|
-
return (((("@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86591
|
+
return (((("@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0)) + "}[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]")
|
|
86431
86592
|
});
|
|
86432
86593
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
86433
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86594
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + " ? ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + " : ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + ")")
|
|
86434
86595
|
});
|
|
86435
|
-
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$
|
|
86436
|
-
|
|
86596
|
+
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, right, extPrec) {
|
|
86597
|
+
var op = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
|
|
86598
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOpStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__T__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, ".", right, extPrec)
|
|
86437
86599
|
});
|
|
86438
86600
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
86439
|
-
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86601
|
+
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0);
|
|
86440
86602
|
switch (baseStr) {
|
|
86441
86603
|
case "2": {
|
|
86442
|
-
return (("oct('0b' . " + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86604
|
+
return (("oct('0b' . " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")");
|
|
86443
86605
|
break
|
|
86444
86606
|
}
|
|
86445
86607
|
case "8": {
|
|
86446
|
-
return (("oct(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86608
|
+
return (("oct(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")");
|
|
86447
86609
|
break
|
|
86448
86610
|
}
|
|
86449
86611
|
case "10": {
|
|
86450
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86612
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0) + " + 0");
|
|
86451
86613
|
break
|
|
86452
86614
|
}
|
|
86453
86615
|
case "16": {
|
|
86454
|
-
return (("hex(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86616
|
+
return (("hex(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")");
|
|
86455
86617
|
break
|
|
86456
86618
|
}
|
|
86457
86619
|
default: {
|
|
@@ -86460,13 +86622,13 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strToInt__Lio_kaitai_s
|
|
|
86460
86622
|
}
|
|
86461
86623
|
});
|
|
86462
86624
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
86463
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86625
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
86464
86626
|
});
|
|
86465
86627
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
86466
|
-
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86628
|
+
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
86467
86629
|
});
|
|
86468
86630
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
86469
|
-
return (("sprintf('%d', " + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86631
|
+
return (("sprintf('%d', " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, 0)) + ")")
|
|
86470
86632
|
});
|
|
86471
86633
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
86472
86634
|
var this$1 = $n(this.Lio_kaitai_struct_translators_PerlTranslator__f_importList);
|
|
@@ -86474,58 +86636,58 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.bytesToStr__T__T__T =
|
|
|
86474
86636
|
return (((("Encode::decode(\"" + encoding) + "\", ") + bytesExpr) + ")")
|
|
86475
86637
|
});
|
|
86476
86638
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
86477
|
-
return (((("unpack('C', substr(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86639
|
+
return (((("unpack('C', substr(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + ", 1))")
|
|
86478
86640
|
});
|
|
86479
86641
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
86480
|
-
return (("unpack('C', substr(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86642
|
+
return (("unpack('C', substr(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ", 0, 1))")
|
|
86481
86643
|
});
|
|
86482
86644
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
86483
|
-
return (("unpack('C', substr(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86645
|
+
return (("unpack('C', substr(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ", -1, 1))")
|
|
86484
86646
|
});
|
|
86485
86647
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
86486
86648
|
var this$1 = $n(this.Lio_kaitai_struct_translators_PerlTranslator__f_importList);
|
|
86487
86649
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "List::Util");
|
|
86488
|
-
return (("List::Util::min(unpack('C*', " + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86650
|
+
return (("List::Util::min(unpack('C*', " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + "))")
|
|
86489
86651
|
});
|
|
86490
86652
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
86491
86653
|
var this$1 = $n(this.Lio_kaitai_struct_translators_PerlTranslator__f_importList);
|
|
86492
86654
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "List::Util");
|
|
86493
|
-
return (("List::Util::max(unpack('C*', " + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86655
|
+
return (("List::Util::max(unpack('C*', " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + "))")
|
|
86494
86656
|
});
|
|
86495
86657
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
86496
|
-
return (("length(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86658
|
+
return (("length(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
86497
86659
|
});
|
|
86498
86660
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
86499
|
-
return (("scalar(reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86661
|
+
return (("scalar(reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + "))")
|
|
86500
86662
|
});
|
|
86501
86663
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
86502
|
-
return ((((((
|
|
86664
|
+
return (((((("substr(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0)) + ", ") + this.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, $m_Lio_kaitai_struct_exprlang_Ast$operator$Sub$(), from, 0)) + ")")
|
|
86503
86665
|
});
|
|
86504
86666
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86505
|
-
return (("@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86667
|
+
return (("@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + "}[0]")
|
|
86506
86668
|
});
|
|
86507
86669
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86508
|
-
return (("@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86670
|
+
return (("@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + "}[-1]")
|
|
86509
86671
|
});
|
|
86510
86672
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86511
|
-
return (("scalar(@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86673
|
+
return (("scalar(@{" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + "})")
|
|
86512
86674
|
});
|
|
86513
86675
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86514
86676
|
var x1 = $n($as_Lio_kaitai_struct_datatype_DataType$ArrayType(this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(a))).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
86515
86677
|
var funcName = ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType) ? "minstr" : "min");
|
|
86516
86678
|
var this$1 = $n(this.Lio_kaitai_struct_translators_PerlTranslator__f_importList);
|
|
86517
86679
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "List::Util");
|
|
86518
|
-
return (((("List::Util::" + funcName) + "(@{") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86680
|
+
return (((("List::Util::" + funcName) + "(@{") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + "})")
|
|
86519
86681
|
});
|
|
86520
86682
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86521
86683
|
var x1 = $n($as_Lio_kaitai_struct_datatype_DataType$ArrayType(this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(a))).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
86522
86684
|
var funcName = ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType) ? "maxstr" : "max");
|
|
86523
86685
|
var this$1 = $n(this.Lio_kaitai_struct_translators_PerlTranslator__f_importList);
|
|
86524
86686
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "List::Util");
|
|
86525
|
-
return (((("List::Util::" + funcName) + "(@{") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86687
|
+
return (((("List::Util::" + funcName) + "(@{") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + "})")
|
|
86526
86688
|
});
|
|
86527
86689
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
86528
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86690
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "->size()")
|
|
86529
86691
|
});
|
|
86530
86692
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doInterpolatedStringLiteral__sci_Seq__T = (function(exprs) {
|
|
86531
86693
|
if ($n(exprs).isEmpty__Z()) {
|
|
@@ -86590,10 +86752,10 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.floatToInt__Lio_kaitai
|
|
|
86590
86752
|
return this.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
86591
86753
|
});
|
|
86592
86754
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
|
|
86593
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86755
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
86594
86756
|
});
|
|
86595
86757
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
|
|
86596
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86758
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
86597
86759
|
});
|
|
86598
86760
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
|
|
86599
86761
|
return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
|
|
@@ -86636,6 +86798,8 @@ function $c_Lio_kaitai_struct_translators_PythonTranslator() {
|
|
|
86636
86798
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
86637
86799
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
86638
86800
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
86801
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
86802
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
86639
86803
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
86640
86804
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_importList = null;
|
|
86641
86805
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_asciiCharQuoteMap = null
|
|
@@ -86647,7 +86811,7 @@ function $h_Lio_kaitai_struct_translators_PythonTranslator() {
|
|
|
86647
86811
|
/*<skip>*/
|
|
86648
86812
|
}
|
|
86649
86813
|
$h_Lio_kaitai_struct_translators_PythonTranslator.prototype = $c_Lio_kaitai_struct_translators_PythonTranslator.prototype;
|
|
86650
|
-
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.
|
|
86814
|
+
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
86651
86815
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
86652
86816
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
86653
86817
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -86661,9 +86825,9 @@ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.numericBinOp__Lio_ka
|
|
|
86661
86825
|
var $$x1 = false
|
|
86662
86826
|
};
|
|
86663
86827
|
if ($$x1) {
|
|
86664
|
-
return (
|
|
86828
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOpStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__T__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, "//", right, extPrec)
|
|
86665
86829
|
} else {
|
|
86666
|
-
return $
|
|
86830
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec)
|
|
86667
86831
|
}
|
|
86668
86832
|
});
|
|
86669
86833
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doStringLiteral__T__T = (function(s) {
|
|
@@ -86684,9 +86848,9 @@ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doByteArrayNonLitera
|
|
|
86684
86848
|
var $$x1 = $n(elts).length__I();
|
|
86685
86849
|
var this$3 = $n($as_sc_IterableOnceOps($n(elts).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
86686
86850
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
86687
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86851
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
86688
86852
|
})))));
|
|
86689
|
-
return (((("struct.pack('" + $$x1) + "
|
|
86853
|
+
return (((("struct.pack('" + $$x1) + "B', ") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$3, "", ", ", "")) + ")")
|
|
86690
86854
|
});
|
|
86691
86855
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doLocalName__T__T = (function(s) {
|
|
86692
86856
|
return (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR === s) ? "_" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX === s) ? "i" : ("self." + this.doName__T__T(s))))
|
|
@@ -86725,36 +86889,36 @@ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.unaryOp__Lio_kaitai_
|
|
|
86725
86889
|
}
|
|
86726
86890
|
});
|
|
86727
86891
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
86728
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86892
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]")
|
|
86729
86893
|
});
|
|
86730
86894
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
86731
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86895
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + " if ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + " else ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + ")")
|
|
86732
86896
|
});
|
|
86733
86897
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
86734
|
-
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86898
|
+
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0);
|
|
86735
86899
|
var add = ((baseStr === "10") ? "" : (", " + baseStr));
|
|
86736
|
-
return ((("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86900
|
+
return ((("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + add) + ")")
|
|
86737
86901
|
});
|
|
86738
86902
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
|
|
86739
|
-
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86903
|
+
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
86740
86904
|
});
|
|
86741
86905
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
86742
|
-
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86906
|
+
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
86743
86907
|
});
|
|
86744
86908
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
86745
|
-
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86909
|
+
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
86746
86910
|
});
|
|
86747
86911
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
86748
|
-
return (("str(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86912
|
+
return (("str(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, 0)) + ")")
|
|
86749
86913
|
});
|
|
86750
86914
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
86751
86915
|
return (((("(" + bytesExpr) + ").decode(\"") + encoding) + "\")")
|
|
86752
86916
|
});
|
|
86753
86917
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
86754
|
-
return (("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86918
|
+
return (("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
86755
86919
|
});
|
|
86756
86920
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
86757
|
-
return (((("KaitaiStream.byte_array_index(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86921
|
+
return (((("KaitaiStream.byte_array_index(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + ")")
|
|
86758
86922
|
});
|
|
86759
86923
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86760
86924
|
var this$1 = $m_s_math_BigInt$();
|
|
@@ -86765,43 +86929,43 @@ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.bytesLast__Lio_kaita
|
|
|
86765
86929
|
return this.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(a, new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(this$1.apply__I__s_math_BigInt((-1))))
|
|
86766
86930
|
});
|
|
86767
86931
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
86768
|
-
return (("KaitaiStream.byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86932
|
+
return (("KaitaiStream.byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
86769
86933
|
});
|
|
86770
86934
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
86771
|
-
return (("KaitaiStream.byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86935
|
+
return (("KaitaiStream.byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
86772
86936
|
});
|
|
86773
86937
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
86774
|
-
return (("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86938
|
+
return (("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
86775
86939
|
});
|
|
86776
86940
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
86777
|
-
return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86941
|
+
return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")[::-1]")
|
|
86778
86942
|
});
|
|
86779
86943
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
86780
|
-
return (((((
|
|
86944
|
+
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0)) + ":") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, 0)) + "]")
|
|
86781
86945
|
});
|
|
86782
86946
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86783
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86947
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + "[0]")
|
|
86784
86948
|
});
|
|
86785
86949
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86786
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86950
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + "[-1]")
|
|
86787
86951
|
});
|
|
86788
86952
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86789
|
-
return (("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86953
|
+
return (("len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
86790
86954
|
});
|
|
86791
86955
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86792
|
-
return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86956
|
+
return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
86793
86957
|
});
|
|
86794
86958
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
86795
|
-
return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86959
|
+
return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
86796
86960
|
});
|
|
86797
86961
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
86798
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86962
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".size()")
|
|
86799
86963
|
});
|
|
86800
86964
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
86801
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86965
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".is_eof()")
|
|
86802
86966
|
});
|
|
86803
86967
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
86804
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
86968
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".pos()")
|
|
86805
86969
|
});
|
|
86806
86970
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
|
|
86807
86971
|
return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
@@ -86895,6 +87059,8 @@ function $c_Lio_kaitai_struct_translators_RubyTranslator(provider) {
|
|
|
86895
87059
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
86896
87060
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
86897
87061
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
87062
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
87063
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
86898
87064
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
86899
87065
|
this.Lio_kaitai_struct_translators_RubyTranslator__f_asciiCharQuoteMap = null;
|
|
86900
87066
|
$ct_Lio_kaitai_struct_translators_BaseTranslator__Lio_kaitai_struct_translators_TypeProvider__(this, provider);
|
|
@@ -86916,7 +87082,7 @@ $c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doByteArrayLiteral__sc
|
|
|
86916
87082
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(elts) {
|
|
86917
87083
|
var this$2 = $n($as_sc_IterableOnceOps($n(elts).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
86918
87084
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
86919
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87085
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
86920
87086
|
})))));
|
|
86921
87087
|
return (("[" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "].pack('C*')")
|
|
86922
87088
|
});
|
|
@@ -86994,71 +87160,76 @@ $c_Lio_kaitai_struct_translators_RubyTranslator.prototype.enumInverseMap__Lio_ka
|
|
|
86994
87160
|
return $as_T($$x1)
|
|
86995
87161
|
});
|
|
86996
87162
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
86997
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87163
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]")
|
|
86998
87164
|
});
|
|
86999
87165
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
87000
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87166
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + " ? ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + " : ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + ")")
|
|
87001
87167
|
});
|
|
87002
87168
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
87003
|
-
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87004
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87169
|
+
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0);
|
|
87170
|
+
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".to_i") + ((baseStr === "10") ? "" : (("(" + baseStr) + ")")))
|
|
87005
87171
|
});
|
|
87006
87172
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
|
|
87007
|
-
return (((this.enumInverseMap__Lio_kaitai_struct_datatype_DataType$EnumType__T(et) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87173
|
+
return (((this.enumInverseMap__Lio_kaitai_struct_datatype_DataType$EnumType__T(et) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + "]")
|
|
87008
87174
|
});
|
|
87009
87175
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
87010
|
-
return (
|
|
87176
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".to_i")
|
|
87011
87177
|
});
|
|
87012
87178
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
87013
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87179
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".to_s")
|
|
87014
87180
|
});
|
|
87015
87181
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
87016
87182
|
return ((((("(" + bytesExpr) + ").force_encoding(\"") + encoding) + "\")") + ((encoding !== "UTF-8") ? ".encode('UTF-8')" : ""))
|
|
87017
87183
|
});
|
|
87018
87184
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
87019
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87185
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".size")
|
|
87020
87186
|
});
|
|
87021
87187
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
87022
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87188
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "].ord")
|
|
87023
87189
|
});
|
|
87024
87190
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
87025
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87191
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "[0].ord")
|
|
87026
87192
|
});
|
|
87027
87193
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
87028
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87194
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "[-1].ord")
|
|
87029
87195
|
});
|
|
87030
87196
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
87031
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87197
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".bytes.min")
|
|
87032
87198
|
});
|
|
87033
87199
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
87034
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87200
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".bytes.max")
|
|
87035
87201
|
});
|
|
87036
87202
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
87037
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87203
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".size")
|
|
87038
87204
|
});
|
|
87039
87205
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
87040
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87206
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".reverse")
|
|
87041
87207
|
});
|
|
87042
87208
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
87043
|
-
|
|
87209
|
+
var $$x2 = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE);
|
|
87210
|
+
var $$x1 = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0);
|
|
87211
|
+
var op = $m_Lio_kaitai_struct_exprlang_Ast$operator$Sub$();
|
|
87212
|
+
var this$1 = $m_s_math_BigInt$();
|
|
87213
|
+
var right = new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(this$1.apply__I__s_math_BigInt(1));
|
|
87214
|
+
return ((((($$x2 + "[") + $$x1) + "..") + $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, to, op, right, 0)) + "]")
|
|
87044
87215
|
});
|
|
87045
87216
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
87046
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87217
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".first")
|
|
87047
87218
|
});
|
|
87048
87219
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
87049
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87220
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".last")
|
|
87050
87221
|
});
|
|
87051
87222
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
87052
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87223
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".length")
|
|
87053
87224
|
});
|
|
87054
87225
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
87055
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87226
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".min")
|
|
87056
87227
|
});
|
|
87057
87228
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
87058
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87229
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".max")
|
|
87059
87230
|
});
|
|
87060
87231
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
87061
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87232
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".eof?")
|
|
87062
87233
|
});
|
|
87063
87234
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
|
|
87064
87235
|
return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
@@ -87143,6 +87314,8 @@ function $c_Lio_kaitai_struct_translators_RustTranslator(provider, config) {
|
|
|
87143
87314
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
87144
87315
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
87145
87316
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
87317
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
87318
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
87146
87319
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
87147
87320
|
this.Lio_kaitai_struct_translators_RustTranslator__f_asciiCharQuoteMap = null;
|
|
87148
87321
|
$ct_Lio_kaitai_struct_translators_BaseTranslator__Lio_kaitai_struct_translators_TypeProvider__(this, provider);
|
|
@@ -87170,7 +87343,7 @@ $c_Lio_kaitai_struct_translators_RustTranslator.prototype.doByteArrayLiteral__sc
|
|
|
87170
87343
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(elts) {
|
|
87171
87344
|
var this$2 = $n($as_sc_IterableOnceOps($n(elts).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
87172
87345
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
87173
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87346
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
87174
87347
|
})))));
|
|
87175
87348
|
return (("pack('C*', " + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + ")")
|
|
87176
87349
|
});
|
|
@@ -87182,39 +87355,6 @@ $c_Lio_kaitai_struct_translators_RustTranslator.prototype.strLiteralUnicode__C__
|
|
|
87182
87355
|
var array = [code];
|
|
87183
87356
|
return $n($$x1).format$extension__T__sci_Seq__T("\\u{%x}", $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array))
|
|
87184
87357
|
});
|
|
87185
|
-
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
|
|
87186
|
-
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
87187
|
-
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
87188
|
-
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
87189
|
-
if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
87190
|
-
var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
|
|
87191
|
-
var $$x1 = (x === op)
|
|
87192
|
-
} else {
|
|
87193
|
-
var $$x1 = false
|
|
87194
|
-
}
|
|
87195
|
-
} else {
|
|
87196
|
-
var $$x1 = false
|
|
87197
|
-
};
|
|
87198
|
-
if ($$x1) {
|
|
87199
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " / ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
|
|
87200
|
-
} else {
|
|
87201
|
-
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
87202
|
-
if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
87203
|
-
var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
|
|
87204
|
-
var $$x2 = (x$3 === op)
|
|
87205
|
-
} else {
|
|
87206
|
-
var $$x2 = false
|
|
87207
|
-
}
|
|
87208
|
-
} else {
|
|
87209
|
-
var $$x2 = false
|
|
87210
|
-
};
|
|
87211
|
-
if ($$x2) {
|
|
87212
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + " % ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right))
|
|
87213
|
-
} else {
|
|
87214
|
-
return $f_Lio_kaitai_struct_translators_CommonOps__numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right)
|
|
87215
|
-
}
|
|
87216
|
-
}
|
|
87217
|
-
});
|
|
87218
87358
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.doLocalName__T__T = (function(s) {
|
|
87219
87359
|
return (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR === s) ? "tmpa" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2 === s) ? "tmpb" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX === s) ? "i" : ("self." + s))))
|
|
87220
87360
|
});
|
|
@@ -87231,56 +87371,56 @@ $c_Lio_kaitai_struct_translators_RustTranslator.prototype.doEnumById__sci_List__
|
|
|
87231
87371
|
return id
|
|
87232
87372
|
});
|
|
87233
87373
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
87234
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87374
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]")
|
|
87235
87375
|
});
|
|
87236
87376
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
87237
|
-
return (((((("if " + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87377
|
+
return (((((("if " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + " { ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + " } else { ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + "}")
|
|
87238
87378
|
});
|
|
87239
|
-
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$
|
|
87240
|
-
return (((("format!(\"{}{}\", " + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87379
|
+
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, right, extPrec) {
|
|
87380
|
+
return (((("format!(\"{}{}\", " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
87241
87381
|
});
|
|
87242
87382
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
87243
|
-
var x1 = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87244
|
-
return ((x1 === "10") ? (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87383
|
+
var x1 = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0);
|
|
87384
|
+
return ((x1 === "10") ? (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0) + ".parse().unwrap()") : (("panic!(\"Converting from string to int in base {} is unimplemented\", " + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0)) + ")"))
|
|
87245
87385
|
});
|
|
87246
87386
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
87247
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87387
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0) + " as i32")
|
|
87248
87388
|
});
|
|
87249
87389
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
87250
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87390
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0) + " as i32")
|
|
87251
87391
|
});
|
|
87252
87392
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
87253
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87393
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, 0) + ".to_string()")
|
|
87254
87394
|
});
|
|
87255
87395
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
87256
87396
|
return ((encoding === "ASCII") ? (("String::from_utf8_lossy(" + bytesExpr) + ")") : (("panic!(\"Unimplemented encoding for bytesToStr: {}\", \"" + encoding) + "\")"))
|
|
87257
87397
|
});
|
|
87258
87398
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
87259
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87399
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".len()")
|
|
87260
87400
|
});
|
|
87261
87401
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
87262
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87402
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".len()")
|
|
87263
87403
|
});
|
|
87264
87404
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
87265
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87405
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".graphemes(true).rev().flat_map(|g| g.chars()).collect()")
|
|
87266
87406
|
});
|
|
87267
87407
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
87268
|
-
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87408
|
+
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".substring(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, 0)) + ")")
|
|
87269
87409
|
});
|
|
87270
87410
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
87271
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87411
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + ".first()")
|
|
87272
87412
|
});
|
|
87273
87413
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
87274
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87414
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + ".last()")
|
|
87275
87415
|
});
|
|
87276
87416
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
87277
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87417
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + ".len()")
|
|
87278
87418
|
});
|
|
87279
87419
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
87280
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87420
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + ".iter().min()")
|
|
87281
87421
|
});
|
|
87282
87422
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
87283
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87423
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + ".iter().max()")
|
|
87284
87424
|
});
|
|
87285
87425
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.types2classAbs__sci_List__T = (function(names) {
|
|
87286
87426
|
if ((names !== null)) {
|
|
@@ -87332,7 +87472,7 @@ $c_Lio_kaitai_struct_translators_RustTranslator.prototype.boolToInt__Lio_kaitai_
|
|
|
87332
87472
|
return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
87333
87473
|
});
|
|
87334
87474
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
|
|
87335
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
87475
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
87336
87476
|
});
|
|
87337
87477
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
|
|
87338
87478
|
return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
|
|
@@ -87953,6 +88093,8 @@ function $c_Lio_kaitai_struct_translators_ConstructTranslator(provider, importLi
|
|
|
87953
88093
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
87954
88094
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
87955
88095
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
88096
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
88097
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
87956
88098
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
87957
88099
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_importList = null;
|
|
87958
88100
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_asciiCharQuoteMap = null;
|
|
@@ -87975,13 +88117,13 @@ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doEnumByLabel__sc
|
|
|
87975
88117
|
return (("'" + label) + "'")
|
|
87976
88118
|
});
|
|
87977
88119
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
87978
|
-
return (("stream_size(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88120
|
+
return (("stream_size(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
87979
88121
|
});
|
|
87980
88122
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
87981
|
-
return (("stream_iseof(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88123
|
+
return (("stream_iseof(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
87982
88124
|
});
|
|
87983
88125
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
87984
|
-
return (("stream_tell(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88126
|
+
return (("stream_tell(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
87985
88127
|
});
|
|
87986
88128
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
|
|
87987
88129
|
return this.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
@@ -88013,6 +88155,8 @@ function $c_Lio_kaitai_struct_translators_CppTranslator(provider, importListSrc,
|
|
|
88013
88155
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
88014
88156
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
88015
88157
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
88158
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
88159
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
88016
88160
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
88017
88161
|
this.Lio_kaitai_struct_translators_CppTranslator__f_importListSrc = null;
|
|
88018
88162
|
this.Lio_kaitai_struct_translators_CppTranslator__f_importListHdr = null;
|
|
@@ -88141,7 +88285,7 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kai
|
|
|
88141
88285
|
var cppElType = $m_Lio_kaitai_struct_languages_CppCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_datatype_DataType__Z__T($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig, t, false);
|
|
88142
88286
|
var this$2 = $n($as_sc_IterableOnceOps($n(values).map__F1__O(new $c_sjsr_AnonFunction1(((value$2) => {
|
|
88143
88287
|
var value = $as_Lio_kaitai_struct_exprlang_Ast$expr(value$2);
|
|
88144
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88288
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
88145
88289
|
})))));
|
|
88146
88290
|
var rawInit = (((("new std::vector<" + cppElType) + ">{") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "}");
|
|
88147
88291
|
var x1 = $n($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
@@ -88163,7 +88307,7 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kai
|
|
|
88163
88307
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sci_Seq__T = (function(arr) {
|
|
88164
88308
|
return (((("std::string(\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sci_Seq__T(arr)) + "\", ") + $n(arr).length__I()) + ")")
|
|
88165
88309
|
});
|
|
88166
|
-
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.
|
|
88310
|
+
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
88167
88311
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
88168
88312
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
88169
88313
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -88177,13 +88321,13 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.numericBinOp__Lio_kaita
|
|
|
88177
88321
|
var $$x1 = false
|
|
88178
88322
|
};
|
|
88179
88323
|
if ($$x1) {
|
|
88180
|
-
return (((("kaitai::kstream::mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88324
|
+
return (((("kaitai::kstream::mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
88181
88325
|
} else {
|
|
88182
|
-
return $
|
|
88326
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec)
|
|
88183
88327
|
}
|
|
88184
88328
|
});
|
|
88185
88329
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
|
|
88186
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88330
|
+
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0) + "->") + this.doName__T__T(attrName))
|
|
88187
88331
|
});
|
|
88188
88332
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doName__T__T = (function(s) {
|
|
88189
88333
|
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 + "()"))))
|
|
@@ -88212,7 +88356,7 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doStrCompareOp__Lio_kai
|
|
|
88212
88356
|
var $$x1 = false
|
|
88213
88357
|
};
|
|
88214
88358
|
if ($$x1) {
|
|
88215
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88359
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + " == (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
88216
88360
|
} else {
|
|
88217
88361
|
var x$4 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
|
|
88218
88362
|
if ((op !== null)) {
|
|
@@ -88222,17 +88366,17 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doStrCompareOp__Lio_kai
|
|
|
88222
88366
|
var $$x2 = false
|
|
88223
88367
|
};
|
|
88224
88368
|
if ($$x2) {
|
|
88225
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88369
|
+
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + " != ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0))
|
|
88226
88370
|
} else {
|
|
88227
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88371
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ".compare(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ") ") + $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)) + " 0)")
|
|
88228
88372
|
}
|
|
88229
88373
|
}
|
|
88230
88374
|
});
|
|
88231
88375
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
88232
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88376
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0) + "->at(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + ")")
|
|
88233
88377
|
});
|
|
88234
88378
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
88235
|
-
return (((((("((" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88379
|
+
return (((((("((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + ") ? (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + ") : (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + "))")
|
|
88236
88380
|
});
|
|
88237
88381
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
88238
88382
|
var x1 = $n($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
@@ -88250,7 +88394,7 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_stru
|
|
|
88250
88394
|
if ((x$5 === x1)) {
|
|
88251
88395
|
if ((typeName instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
88252
88396
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(typeName);
|
|
88253
|
-
return (((("std::static_pointer_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n($as_Lio_kaitai_struct_format_ClassSpec($n($n(x2).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O())).Lio_kaitai_struct_format_ClassSpec__f_name)) + ">(") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88397
|
+
return (((("std::static_pointer_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n($as_Lio_kaitai_struct_format_ClassSpec($n($n(x2).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O())).Lio_kaitai_struct_format_ClassSpec__f_name)) + ">(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
88254
88398
|
} else {
|
|
88255
88399
|
return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
|
|
88256
88400
|
}
|
|
@@ -88260,82 +88404,83 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_stru
|
|
|
88260
88404
|
}
|
|
88261
88405
|
});
|
|
88262
88406
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
88263
|
-
return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_datatype_DataType__Z__T($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig, typeName, false)) + ">(") + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88407
|
+
return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_datatype_DataType__Z__T($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig, typeName, false)) + ">(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
88264
88408
|
});
|
|
88265
88409
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
88266
|
-
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88267
|
-
return ((("kaitai::kstream::string_to_int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88410
|
+
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0);
|
|
88411
|
+
return ((("kaitai::kstream::string_to_int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ((baseStr === "10") ? "" : (", " + baseStr))) + ")")
|
|
88268
88412
|
});
|
|
88269
88413
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
88270
|
-
return (("((" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88414
|
+
return (("((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ") ? 1 : 0)")
|
|
88271
88415
|
});
|
|
88272
88416
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
88273
|
-
return (("static_cast<int>(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88417
|
+
return (("static_cast<int>(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
88274
88418
|
});
|
|
88275
88419
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
88276
|
-
return (("kaitai::kstream::to_string(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88420
|
+
return (("kaitai::kstream::to_string(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, 0)) + ")")
|
|
88277
88421
|
});
|
|
88278
88422
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
88279
88423
|
return (((("kaitai::kstream::bytes_to_str(" + bytesExpr) + ", \"") + encoding) + "\")")
|
|
88280
88424
|
});
|
|
88281
88425
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
88282
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88426
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".length()")
|
|
88283
88427
|
});
|
|
88284
88428
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
88285
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88429
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]")
|
|
88286
88430
|
});
|
|
88287
88431
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
88288
88432
|
var x1 = $n($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_stdStringFrontBack;
|
|
88289
88433
|
if ((x1 === true)) {
|
|
88290
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88434
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0) + ".front()")
|
|
88291
88435
|
} else if ((x1 === false)) {
|
|
88292
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88436
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0) + "[0]")
|
|
88293
88437
|
} else {
|
|
88294
88438
|
throw new $c_s_MatchError(x1)
|
|
88295
88439
|
}
|
|
88296
88440
|
});
|
|
88297
88441
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
88442
|
+
var bStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE);
|
|
88298
88443
|
var x1 = $n($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_stdStringFrontBack;
|
|
88299
88444
|
if ((x1 === true)) {
|
|
88300
|
-
return (
|
|
88445
|
+
return (bStr + ".back()")
|
|
88301
88446
|
} else if ((x1 === false)) {
|
|
88302
|
-
return (((
|
|
88447
|
+
return (((bStr + "[") + bStr) + ".length() - 1]")
|
|
88303
88448
|
} else {
|
|
88304
88449
|
throw new $c_s_MatchError(x1)
|
|
88305
88450
|
}
|
|
88306
88451
|
});
|
|
88307
88452
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
88308
|
-
return (("kaitai::kstream::byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88453
|
+
return (("kaitai::kstream::byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
88309
88454
|
});
|
|
88310
88455
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
88311
|
-
return (("kaitai::kstream::byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88456
|
+
return (("kaitai::kstream::byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
88312
88457
|
});
|
|
88313
88458
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
88314
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88459
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".length()")
|
|
88315
88460
|
});
|
|
88316
88461
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
88317
|
-
return (("kaitai::kstream::reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88462
|
+
return (("kaitai::kstream::reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")")
|
|
88318
88463
|
});
|
|
88319
88464
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
88320
|
-
return (((((
|
|
88465
|
+
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ".substr(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0)) + ", ") + this.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, $m_Lio_kaitai_struct_exprlang_Ast$operator$Sub$(), from, 0)) + ")")
|
|
88321
88466
|
});
|
|
88322
88467
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88323
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88468
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "->front()")
|
|
88324
88469
|
});
|
|
88325
88470
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88326
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88471
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "->back()")
|
|
88327
88472
|
});
|
|
88328
88473
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88329
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88474
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + "->size()")
|
|
88330
88475
|
});
|
|
88331
88476
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88332
88477
|
$n(this.Lio_kaitai_struct_translators_CppTranslator__f_importListSrc).addSystem__T__V("algorithm");
|
|
88333
|
-
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88478
|
+
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE);
|
|
88334
88479
|
return (((("*std::min_element(" + v) + "->begin(), ") + v) + "->end())")
|
|
88335
88480
|
});
|
|
88336
88481
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88337
88482
|
$n(this.Lio_kaitai_struct_translators_CppTranslator__f_importListSrc).addSystem__T__V("algorithm");
|
|
88338
|
-
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88483
|
+
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE);
|
|
88339
88484
|
return (((("*std::max_element(" + v) + "->begin(), ") + v) + "->end())")
|
|
88340
88485
|
});
|
|
88341
88486
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
|
|
@@ -88390,7 +88535,7 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.boolToInt__Lio_kaitai_s
|
|
|
88390
88535
|
return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
88391
88536
|
});
|
|
88392
88537
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
|
|
88393
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88538
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
88394
88539
|
});
|
|
88395
88540
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
|
|
88396
88541
|
return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
|
|
@@ -88434,6 +88579,8 @@ function $c_Lio_kaitai_struct_translators_LuaTranslator(provider, importList) {
|
|
|
88434
88579
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
88435
88580
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
88436
88581
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
88582
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
88583
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
88437
88584
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
88438
88585
|
this.Lio_kaitai_struct_translators_LuaTranslator__f_importList = null;
|
|
88439
88586
|
this.Lio_kaitai_struct_translators_LuaTranslator__f_asciiCharQuoteMap = null;
|
|
@@ -88478,7 +88625,7 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLiteralUnicode__C__T
|
|
|
88478
88625
|
var array = [code];
|
|
88479
88626
|
return $n($$x1).format$extension__T__sci_Seq__T("\\u{%04x}", $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array))
|
|
88480
88627
|
});
|
|
88481
|
-
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.
|
|
88628
|
+
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
88482
88629
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
88483
88630
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
88484
88631
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -88492,18 +88639,18 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.numericBinOp__Lio_kaita
|
|
|
88492
88639
|
var $$x1 = false
|
|
88493
88640
|
};
|
|
88494
88641
|
if ($$x1) {
|
|
88495
|
-
return ((
|
|
88642
|
+
return (("math.floor(" + $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, 0)) + ")")
|
|
88496
88643
|
} else {
|
|
88497
|
-
return $
|
|
88644
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec)
|
|
88498
88645
|
}
|
|
88499
88646
|
});
|
|
88500
88647
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
88501
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88648
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + " + 1]")
|
|
88502
88649
|
});
|
|
88503
88650
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
88504
88651
|
var this$1 = $n(this.Lio_kaitai_struct_translators_LuaTranslator__f_importList);
|
|
88505
88652
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "local utils = require(\"utils\")");
|
|
88506
|
-
return (((((("utils.box_unwrap((" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88653
|
+
return (((((("utils.box_unwrap((" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + ") and utils.box_wrap(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + ") or (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + "))")
|
|
88507
88654
|
});
|
|
88508
88655
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doBoolLiteral__Z__T = (function(n) {
|
|
88509
88656
|
return (n ? "true" : "false")
|
|
@@ -88511,7 +88658,7 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doBoolLiteral__Z__T = (
|
|
|
88511
88658
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T = (function(t, value) {
|
|
88512
88659
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
88513
88660
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
88514
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88661
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
88515
88662
|
})))));
|
|
88516
88663
|
return (("{" + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + "}")
|
|
88517
88664
|
});
|
|
@@ -88533,25 +88680,25 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumByLabel__sci_List
|
|
|
88533
88680
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumById__sci_List__T__T = (function(enumTypeAbs, id) {
|
|
88534
88681
|
return ((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(enumTypeAbs) + "(") + id) + ")")
|
|
88535
88682
|
});
|
|
88536
|
-
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$
|
|
88537
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88683
|
+
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, right, extPrec) {
|
|
88684
|
+
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0) + " .. ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0))
|
|
88538
88685
|
});
|
|
88539
88686
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
88540
|
-
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88687
|
+
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0);
|
|
88541
88688
|
var add = ((baseStr === "10") ? "" : (", " + baseStr));
|
|
88542
|
-
return ((("tonumber(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88689
|
+
return ((("tonumber(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + add) + ")")
|
|
88543
88690
|
});
|
|
88544
88691
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T = (function(v, et) {
|
|
88545
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88692
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0) + ".value")
|
|
88546
88693
|
});
|
|
88547
88694
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
88548
|
-
return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88695
|
+
return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + " and 1 or 0)")
|
|
88549
88696
|
});
|
|
88550
88697
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
88551
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88698
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + " > 0) and math.floor(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ") or math.ceil(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
88552
88699
|
});
|
|
88553
88700
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
88554
|
-
return (("tostring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88701
|
+
return (("tostring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, 0)) + ")")
|
|
88555
88702
|
});
|
|
88556
88703
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
88557
88704
|
var this$1 = $n(this.Lio_kaitai_struct_translators_LuaTranslator__f_importList);
|
|
@@ -88559,53 +88706,56 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesToStr__T__T__T = (
|
|
|
88559
88706
|
return (((("str_decode.decode(" + bytesExpr) + ", \"") + encoding) + "\")")
|
|
88560
88707
|
});
|
|
88561
88708
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
88562
|
-
return (((("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88709
|
+
return (((("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + " + 1)")
|
|
88563
88710
|
});
|
|
88564
88711
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88565
|
-
return (("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88712
|
+
return (("string.byte(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ", 1)")
|
|
88566
88713
|
});
|
|
88567
88714
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88568
|
-
var table = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88715
|
+
var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0);
|
|
88569
88716
|
return (((("string.byte(" + table) + ", #") + table) + ")")
|
|
88570
88717
|
});
|
|
88571
88718
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88572
88719
|
var this$1 = $n(this.Lio_kaitai_struct_translators_LuaTranslator__f_importList);
|
|
88573
88720
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "local utils = require(\"utils\")");
|
|
88574
|
-
return (("utils.byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88721
|
+
return (("utils.byte_array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
88575
88722
|
});
|
|
88576
88723
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88577
88724
|
var this$1 = $n(this.Lio_kaitai_struct_translators_LuaTranslator__f_importList);
|
|
88578
88725
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "local utils = require(\"utils\")");
|
|
88579
|
-
return (("utils.byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88726
|
+
return (("utils.byte_array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
88580
88727
|
});
|
|
88581
88728
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
88582
|
-
return (("string.len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88729
|
+
return (("string.len(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")")
|
|
88583
88730
|
});
|
|
88584
88731
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
88585
|
-
return (("string.reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88732
|
+
return (("string.reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")")
|
|
88586
88733
|
});
|
|
88587
88734
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
88588
|
-
|
|
88735
|
+
var $$x2 = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0);
|
|
88736
|
+
var $$x1 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
|
|
88737
|
+
var this$1 = $m_s_math_BigInt$();
|
|
88738
|
+
return (((((("string.sub(" + $$x2) + ", ") + this.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, $$x1, new $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(this$1.apply__I__s_math_BigInt(1)), 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, 0)) + ")")
|
|
88589
88739
|
});
|
|
88590
88740
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88591
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88741
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + "[1]")
|
|
88592
88742
|
});
|
|
88593
88743
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88594
|
-
var table = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88744
|
+
var table = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0);
|
|
88595
88745
|
return (((table + "[#") + table) + "]")
|
|
88596
88746
|
});
|
|
88597
88747
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88598
|
-
return ("#" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88748
|
+
return ("#" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0))
|
|
88599
88749
|
});
|
|
88600
88750
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88601
88751
|
var this$1 = $n(this.Lio_kaitai_struct_translators_LuaTranslator__f_importList);
|
|
88602
88752
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "local utils = require(\"utils\")");
|
|
88603
|
-
return (("utils.array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88753
|
+
return (("utils.array_min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
88604
88754
|
});
|
|
88605
88755
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88606
88756
|
var this$1 = $n(this.Lio_kaitai_struct_translators_LuaTranslator__f_importList);
|
|
88607
88757
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "local utils = require(\"utils\")");
|
|
88608
|
-
return (("utils.array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88758
|
+
return (("utils.array_max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
88609
88759
|
});
|
|
88610
88760
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doInterpolatedStringLiteral__sci_Seq__T = (function(exprs) {
|
|
88611
88761
|
if ($n(exprs).isEmpty__Z()) {
|
|
@@ -88619,13 +88769,13 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doInterpolatedStringLit
|
|
|
88619
88769
|
}
|
|
88620
88770
|
});
|
|
88621
88771
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
88622
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88772
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ":size()")
|
|
88623
88773
|
});
|
|
88624
88774
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
88625
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88775
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ":is_eof()")
|
|
88626
88776
|
});
|
|
88627
88777
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.kaitaiStreamPos__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
88628
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88778
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE) + ":pos()")
|
|
88629
88779
|
});
|
|
88630
88780
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.binOp__Lio_kaitai_struct_exprlang_Ast$operator__T = (function(op) {
|
|
88631
88781
|
var x = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitXor$();
|
|
@@ -88754,6 +88904,8 @@ function $c_Lio_kaitai_struct_translators_PHPTranslator(provider, config) {
|
|
|
88754
88904
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
88755
88905
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
88756
88906
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
88907
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
88908
|
+
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
88757
88909
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
88758
88910
|
this.Lio_kaitai_struct_translators_PHPTranslator__f_asciiCharQuoteMap = null;
|
|
88759
88911
|
this.Lio_kaitai_struct_translators_PHPTranslator__f_namespaceRef = null;
|
|
@@ -88801,7 +88953,7 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sci
|
|
|
88801
88953
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sci_Seq__T = (function(elts) {
|
|
88802
88954
|
var this$2 = $n($as_sc_IterableOnceOps($n(elts).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
88803
88955
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
88804
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88956
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
88805
88957
|
})))));
|
|
88806
88958
|
return (("pack('C*', " + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", ", ", "")) + ")")
|
|
88807
88959
|
});
|
|
@@ -88813,7 +88965,7 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLiteralUnicode__C__T
|
|
|
88813
88965
|
var array = [code];
|
|
88814
88966
|
return $n($$x1).format$extension__T__sci_Seq__T("\\u{%x}", $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array))
|
|
88815
88967
|
});
|
|
88816
|
-
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.
|
|
88968
|
+
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, op, right, extPrec) {
|
|
88817
88969
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
88818
88970
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
88819
88971
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -88827,7 +88979,7 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.numericBinOp__Lio_kaita
|
|
|
88827
88979
|
var $$x1 = false
|
|
88828
88980
|
};
|
|
88829
88981
|
if ($$x1) {
|
|
88830
|
-
return ((
|
|
88982
|
+
return (("intval(" + $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, 0)) + ")")
|
|
88831
88983
|
} else {
|
|
88832
88984
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
88833
88985
|
if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -88840,14 +88992,14 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.numericBinOp__Lio_kaita
|
|
|
88840
88992
|
var $$x2 = false
|
|
88841
88993
|
};
|
|
88842
88994
|
if ($$x2) {
|
|
88843
|
-
return (((("\\Kaitai\\Struct\\Stream::mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
88995
|
+
return (((("\\Kaitai\\Struct\\Stream::mod(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(left, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(right, 0)) + ")")
|
|
88844
88996
|
} else {
|
|
88845
|
-
return $
|
|
88997
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, right, extPrec)
|
|
88846
88998
|
}
|
|
88847
88999
|
}
|
|
88848
89000
|
});
|
|
88849
89001
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.anyField__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(value, attrName) {
|
|
88850
|
-
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89002
|
+
return ((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0) + "->") + this.doName__T__T(attrName))
|
|
88851
89003
|
});
|
|
88852
89004
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doLocalName__T__T = (function(s) {
|
|
88853
89005
|
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" : ("$this->" + this.doName__T__T(s)))))
|
|
@@ -88869,71 +89021,72 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumById__sci_List__T
|
|
|
88869
89021
|
return id
|
|
88870
89022
|
});
|
|
88871
89023
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
88872
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89024
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, 0) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "]")
|
|
88873
89025
|
});
|
|
88874
89026
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
88875
|
-
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89027
|
+
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + " ? ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + " : ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + ")")
|
|
88876
89028
|
});
|
|
88877
|
-
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$
|
|
88878
|
-
|
|
89029
|
+
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strConcat__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__I__T = (function(left, right, extPrec) {
|
|
89030
|
+
var op = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
|
|
89031
|
+
return $f_Lio_kaitai_struct_translators_CommonOps__genericBinOpStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__T__Lio_kaitai_struct_exprlang_Ast$expr__I__T(this, left, op, ".", right, extPrec)
|
|
88879
89032
|
});
|
|
88880
89033
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
88881
|
-
return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89034
|
+
return (((("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0)) + ")")
|
|
88882
89035
|
});
|
|
88883
89036
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
88884
|
-
return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89037
|
+
return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
88885
89038
|
});
|
|
88886
89039
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
88887
|
-
return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89040
|
+
return (("intval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")")
|
|
88888
89041
|
});
|
|
88889
89042
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i) {
|
|
88890
|
-
return (("strval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89043
|
+
return (("strval(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(i, 0)) + ")")
|
|
88891
89044
|
});
|
|
88892
89045
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
88893
89046
|
return (((("\\Kaitai\\Struct\\Stream::bytesToStr(" + bytesExpr) + ", \"") + encoding) + "\")")
|
|
88894
89047
|
});
|
|
88895
89048
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
88896
|
-
return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89049
|
+
return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
88897
89050
|
});
|
|
88898
89051
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesSubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
88899
|
-
return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89052
|
+
return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(container, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE)) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(idx, 0)) + "])")
|
|
88900
89053
|
});
|
|
88901
89054
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
88902
|
-
return (("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89055
|
+
return (("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE)) + "[0])")
|
|
88903
89056
|
});
|
|
88904
89057
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
88905
|
-
return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89058
|
+
return (((("ord(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE)) + "[") + this.bytesLength__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + " - 1])")
|
|
88906
89059
|
});
|
|
88907
89060
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
88908
|
-
return (("\\Kaitai\\Struct\\Stream::byteArrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89061
|
+
return (("\\Kaitai\\Struct\\Stream::byteArrayMin(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
88909
89062
|
});
|
|
88910
89063
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
88911
|
-
return (("\\Kaitai\\Struct\\Stream::byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89064
|
+
return (("\\Kaitai\\Struct\\Stream::byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(b, 0)) + ")")
|
|
88912
89065
|
});
|
|
88913
89066
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
88914
|
-
return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89067
|
+
return (("strlen(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")")
|
|
88915
89068
|
});
|
|
88916
89069
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
88917
|
-
return (("strrev(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89070
|
+
return (("strrev(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ")")
|
|
88918
89071
|
});
|
|
88919
89072
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
88920
|
-
return (((((("\\Kaitai\\Struct\\Stream::substring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89073
|
+
return (((((("\\Kaitai\\Struct\\Stream::substring(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(s, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(from, 0)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(to, 0)) + ")")
|
|
88921
89074
|
});
|
|
88922
89075
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayFirst__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88923
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89076
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0) + "[0]")
|
|
88924
89077
|
});
|
|
88925
89078
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88926
|
-
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89079
|
+
var v = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0);
|
|
88927
89080
|
return (((v + "[count(") + v) + ") - 1]")
|
|
88928
89081
|
});
|
|
88929
89082
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88930
|
-
return (("count(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89083
|
+
return (("count(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
88931
89084
|
});
|
|
88932
89085
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMin__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88933
|
-
return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89086
|
+
return (("min(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
88934
89087
|
});
|
|
88935
89088
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(a) {
|
|
88936
|
-
return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89089
|
+
return (("max(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)) + ")")
|
|
88937
89090
|
});
|
|
88938
89091
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doInterpolatedStringLiteral__sci_Seq__T = (function(exprs) {
|
|
88939
89092
|
if ($n(exprs).isEmpty__Z()) {
|
|
@@ -89011,7 +89164,7 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.boolToInt__Lio_kaitai_s
|
|
|
89011
89164
|
return this.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
89012
89165
|
});
|
|
89013
89166
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
|
|
89014
|
-
return this.translate__Lio_kaitai_struct_exprlang_Ast$
|
|
89167
|
+
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
89015
89168
|
});
|
|
89016
89169
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
|
|
89017
89170
|
return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
|
|
@@ -90937,7 +91090,8 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
90937
91090
|
var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dataType);
|
|
90938
91091
|
var addParams = $m_Lio_kaitai_struct_Utils$().join__sc_IterableOnce__T__T__T__T($as_sc_IterableOnce($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
90939
91092
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
90940
|
-
|
|
91093
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_translator);
|
|
91094
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
90941
91095
|
})))), "", ", ", ", ");
|
|
90942
91096
|
if ($n(x10).isOpaque__Z()) {
|
|
90943
91097
|
var addArgs = ""
|
|
@@ -90959,7 +91113,8 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
90959
91113
|
};
|
|
90960
91114
|
if (rc8) {
|
|
90961
91115
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
90962
|
-
var
|
|
91116
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_translator);
|
|
91117
|
+
var parent = this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
90963
91118
|
break matchEnd9
|
|
90964
91119
|
};
|
|
90965
91120
|
var x$3 = $m_s_None$();
|
|
@@ -91236,12 +91391,14 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classToString__Lio_kaitai_s
|
|
|
91236
91391
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
91237
91392
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((("std::string " + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_name)) + "::_to_string() const {"));
|
|
91238
91393
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).inc__V();
|
|
91239
|
-
|
|
91394
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc);
|
|
91395
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_translator);
|
|
91396
|
+
$n($$x1).puts__T__V((("return " + this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0)) + ";"));
|
|
91240
91397
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).dec__V();
|
|
91241
91398
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V("}");
|
|
91242
91399
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((("friend std::ostream& operator<<(std::ostream& os, const " + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_name)) + "& obj);"));
|
|
91243
|
-
var this$
|
|
91244
|
-
$n(this$
|
|
91400
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc);
|
|
91401
|
+
$n(this$3.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
91245
91402
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((("std::ostream& operator<<(std::ostream& os, const " + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_name)) + "& obj) {"));
|
|
91246
91403
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).inc__V();
|
|
91247
91404
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V("os << obj._to_string();");
|
|
@@ -91379,18 +91536,19 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.ksErrorName__Lio_kaitai_str
|
|
|
91379
91536
|
}
|
|
91380
91537
|
});
|
|
91381
91538
|
$c_Lio_kaitai_struct_languages_CppCompiler.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) {
|
|
91382
|
-
var this$
|
|
91539
|
+
var this$3 = $n(errArgs);
|
|
91383
91540
|
var f = ((v$2) => {
|
|
91384
91541
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
91385
|
-
|
|
91542
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_translator);
|
|
91543
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
91386
91544
|
});
|
|
91387
|
-
if ((this$
|
|
91545
|
+
if ((this$3 === $m_sci_Nil$())) {
|
|
91388
91546
|
var $$x1 = $m_sci_Nil$()
|
|
91389
91547
|
} else {
|
|
91390
|
-
var arg1 = this$
|
|
91548
|
+
var arg1 = this$3.head__O();
|
|
91391
91549
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
91392
91550
|
var t = h;
|
|
91393
|
-
var rest = $as_sci_List(this$
|
|
91551
|
+
var rest = $as_sci_List(this$3.tail__O());
|
|
91394
91552
|
while ((rest !== $m_sci_Nil$())) {
|
|
91395
91553
|
var arg1$1 = $n(rest).head__O();
|
|
91396
91554
|
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
@@ -91400,11 +91558,13 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrValidateExpr__Lio_kaita
|
|
|
91400
91558
|
};
|
|
91401
91559
|
var $$x1 = h
|
|
91402
91560
|
};
|
|
91403
|
-
var this$
|
|
91404
|
-
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$
|
|
91405
|
-
var this$
|
|
91406
|
-
this$
|
|
91407
|
-
|
|
91561
|
+
var this$4 = $n($$x1);
|
|
91562
|
+
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ", ", "");
|
|
91563
|
+
var this$5 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc);
|
|
91564
|
+
this$5.addLocal__T__V("kaitai/exceptions.h");
|
|
91565
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc);
|
|
91566
|
+
var this$6 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_translator);
|
|
91567
|
+
$n($$x2).puts__T__V((("if (!(" + this$6.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(checkExpr, 0)) + ")) {"));
|
|
91408
91568
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).inc__V();
|
|
91409
91569
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((("throw " + this.ksErrorName__Lio_kaitai_struct_datatype_KSError__T(err)) + "(") + errArgsStr) + ");"));
|
|
91410
91570
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).dec__V();
|
|
@@ -92493,7 +92653,8 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.parseExpr__Lio_kaitai_struct
|
|
|
92493
92653
|
};
|
|
92494
92654
|
if (rc8) {
|
|
92495
92655
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
92496
|
-
var
|
|
92656
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator);
|
|
92657
|
+
var parent = this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
92497
92658
|
break matchEnd9
|
|
92498
92659
|
};
|
|
92499
92660
|
var x$3 = $m_s_None$();
|
|
@@ -92547,7 +92708,8 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceHeader__sci_List__Li
|
|
|
92547
92708
|
$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"))))
|
|
92548
92709
|
});
|
|
92549
92710
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
92550
|
-
var
|
|
92711
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator);
|
|
92712
|
+
var r = this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0);
|
|
92551
92713
|
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) + ")"));
|
|
92552
92714
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName) + " = ") + converted))
|
|
92553
92715
|
});
|
|
@@ -92597,7 +92759,9 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.classToString__Lio_kaitai_st
|
|
|
92597
92759
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
92598
92760
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V((("func (this " + $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_nowClass).Lio_kaitai_struct_format_ClassSpec__f_name)) + ") String() string {"));
|
|
92599
92761
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).inc__V();
|
|
92600
|
-
|
|
92762
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_out);
|
|
92763
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator);
|
|
92764
|
+
$n($$x1).puts__T__V(("return " + this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0)));
|
|
92601
92765
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).dec__V();
|
|
92602
92766
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).puts__T__V("}")
|
|
92603
92767
|
});
|
|
@@ -92608,18 +92772,19 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.calculatedFlagForName__Lio_k
|
|
|
92608
92772
|
return ("_f_" + $m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
92609
92773
|
});
|
|
92610
92774
|
$c_Lio_kaitai_struct_languages_GoCompiler.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) {
|
|
92611
|
-
var this$
|
|
92775
|
+
var this$3 = $n(errArgs);
|
|
92612
92776
|
var f = ((v$2) => {
|
|
92613
92777
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
92614
|
-
|
|
92778
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator);
|
|
92779
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
92615
92780
|
});
|
|
92616
|
-
if ((this$
|
|
92781
|
+
if ((this$3 === $m_sci_Nil$())) {
|
|
92617
92782
|
var $$x1 = $m_sci_Nil$()
|
|
92618
92783
|
} else {
|
|
92619
|
-
var arg1 = this$
|
|
92784
|
+
var arg1 = this$3.head__O();
|
|
92620
92785
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
92621
92786
|
var t = h;
|
|
92622
|
-
var rest = $as_sci_List(this$
|
|
92787
|
+
var rest = $as_sci_List(this$3.tail__O());
|
|
92623
92788
|
while ((rest !== $m_sci_Nil$())) {
|
|
92624
92789
|
var arg1$1 = $n(rest).head__O();
|
|
92625
92790
|
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
@@ -92629,9 +92794,11 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrValidateExpr__Lio_kaitai
|
|
|
92629
92794
|
};
|
|
92630
92795
|
var $$x1 = h
|
|
92631
92796
|
};
|
|
92632
|
-
var this$
|
|
92633
|
-
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$
|
|
92634
|
-
|
|
92797
|
+
var this$4 = $n($$x1);
|
|
92798
|
+
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ", ", "");
|
|
92799
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_out);
|
|
92800
|
+
var this$5 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator);
|
|
92801
|
+
$n($$x2).puts__T__V((("if !(" + this$5.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(checkExpr, 0)) + ") {"));
|
|
92635
92802
|
$n(this.Lio_kaitai_struct_languages_GoCompiler__f_out).inc__V();
|
|
92636
92803
|
var errInst = (((("kaitai.New" + $n(err).name__T()) + "(") + errArgsStr) + ")");
|
|
92637
92804
|
var x1 = $n(this.Lio_kaitai_struct_languages_GoCompiler__f_translator).Lio_kaitai_struct_translators_GoTranslator__f_returnRes;
|
|
@@ -93293,7 +93460,8 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.parseExpr__Lio_kaita
|
|
|
93293
93460
|
};
|
|
93294
93461
|
if (rc8) {
|
|
93295
93462
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
93296
|
-
var
|
|
93463
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator);
|
|
93464
|
+
var parent = this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
93297
93465
|
break matchEnd9
|
|
93298
93466
|
};
|
|
93299
93467
|
var x$3 = $m_s_None$();
|
|
@@ -93320,22 +93488,23 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.parseExpr__Lio_kaita
|
|
|
93320
93488
|
};
|
|
93321
93489
|
var addParams = $m_Lio_kaitai_struct_Utils$().join__sc_IterableOnce__T__T__T__T($as_sc_IterableOnce($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
93322
93490
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
93323
|
-
|
|
93491
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator);
|
|
93492
|
+
return this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
93324
93493
|
})))), ", ", ", ", "");
|
|
93325
|
-
var this$
|
|
93326
|
-
if (this$
|
|
93494
|
+
var this$4 = $n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec);
|
|
93495
|
+
if (this$4.isEmpty__Z()) {
|
|
93327
93496
|
var $$x1 = $m_s_None$()
|
|
93328
93497
|
} else {
|
|
93329
|
-
var arg1 = this$
|
|
93498
|
+
var arg1 = this$4.get__O();
|
|
93330
93499
|
var classSpec = $as_Lio_kaitai_struct_format_ClassSpec(arg1);
|
|
93331
93500
|
var x$1 = $n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name;
|
|
93332
93501
|
var x$2 = $n(classSpec).Lio_kaitai_struct_format_ClassSpec__f_name;
|
|
93333
93502
|
var $$x1 = new $c_s_Some(((x$1 === null) ? (x$2 === null) : $n(x$1).equals__O__Z(x$2)))
|
|
93334
93503
|
};
|
|
93335
|
-
var this$
|
|
93336
|
-
if ($uZ((this$
|
|
93337
|
-
var this$
|
|
93338
|
-
var name = $as_T($f_sc_LinearSeqOps__apply__I__O(this$
|
|
93504
|
+
var this$5 = $n($$x1);
|
|
93505
|
+
if ($uZ((this$5.isEmpty__Z() ? false : this$5.get__O()))) {
|
|
93506
|
+
var this$6 = $n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name);
|
|
93507
|
+
var name = $as_T($f_sc_LinearSeqOps__apply__I__O(this$6, 0));
|
|
93339
93508
|
var topLevelModulePrefix = ($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name) + "_.")
|
|
93340
93509
|
} else {
|
|
93341
93510
|
var topLevelModulePrefix = ""
|
|
@@ -93510,7 +93679,9 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classToString__Lio_k
|
|
|
93510
93679
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
93511
93680
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V((className + ".prototype.toString = function() {"));
|
|
93512
93681
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V();
|
|
93513
|
-
|
|
93682
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out);
|
|
93683
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator);
|
|
93684
|
+
$n($$x1).puts__T__V((("return " + this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0)) + ";"));
|
|
93514
93685
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).dec__V();
|
|
93515
93686
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("}")
|
|
93516
93687
|
});
|
|
@@ -93521,18 +93692,19 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.localTemporaryName__
|
|
|
93521
93692
|
return ("_t_" + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
93522
93693
|
});
|
|
93523
93694
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.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) {
|
|
93524
|
-
var this$
|
|
93695
|
+
var this$3 = $n(errArgs);
|
|
93525
93696
|
var f = ((v$2) => {
|
|
93526
93697
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
93527
|
-
|
|
93698
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator);
|
|
93699
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
93528
93700
|
});
|
|
93529
|
-
if ((this$
|
|
93701
|
+
if ((this$3 === $m_sci_Nil$())) {
|
|
93530
93702
|
var $$x1 = $m_sci_Nil$()
|
|
93531
93703
|
} else {
|
|
93532
|
-
var arg1 = this$
|
|
93704
|
+
var arg1 = this$3.head__O();
|
|
93533
93705
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
93534
93706
|
var t = h;
|
|
93535
|
-
var rest = $as_sci_List(this$
|
|
93707
|
+
var rest = $as_sci_List(this$3.tail__O());
|
|
93536
93708
|
while ((rest !== $m_sci_Nil$())) {
|
|
93537
93709
|
var arg1$1 = $n(rest).head__O();
|
|
93538
93710
|
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
@@ -93542,9 +93714,11 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrValidateExpr__Li
|
|
|
93542
93714
|
};
|
|
93543
93715
|
var $$x1 = h
|
|
93544
93716
|
};
|
|
93545
|
-
var this$
|
|
93546
|
-
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$
|
|
93547
|
-
|
|
93717
|
+
var this$4 = $n($$x1);
|
|
93718
|
+
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ", ", "");
|
|
93719
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out);
|
|
93720
|
+
var this$5 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator);
|
|
93721
|
+
$n($$x2).puts__T__V((("if (!(" + this$5.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(checkExpr, 0)) + ")) {"));
|
|
93548
93722
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V();
|
|
93549
93723
|
var errObj = (((("new " + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().ksErrorName__Lio_kaitai_struct_datatype_KSError__T(err)) + "(") + errArgsStr) + ")");
|
|
93550
93724
|
if ($f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrDebugNeeded__Lio_kaitai_struct_format_Identifier__Z(this, attrId)) {
|
|
@@ -94120,7 +94294,8 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
94120
94294
|
var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dataType);
|
|
94121
94295
|
var addParams = $m_Lio_kaitai_struct_Utils$().join__sc_IterableOnce__T__T__T__T($as_sc_IterableOnce($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
94122
94296
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
94123
|
-
|
|
94297
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator);
|
|
94298
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
94124
94299
|
})))), "", ", ", ", ");
|
|
94125
94300
|
if ($n(x10).isOpaque__Z()) {
|
|
94126
94301
|
var addArgs = ""
|
|
@@ -94142,7 +94317,8 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
94142
94317
|
};
|
|
94143
94318
|
if (rc8) {
|
|
94144
94319
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
94145
|
-
var
|
|
94320
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator);
|
|
94321
|
+
var parent = this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
94146
94322
|
break matchEnd9
|
|
94147
94323
|
};
|
|
94148
94324
|
var x$3 = $m_s_None$();
|
|
@@ -94268,7 +94444,9 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.classToString__Lio_kaitai_s
|
|
|
94268
94444
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
94269
94445
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V("public function __toString() {");
|
|
94270
94446
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V();
|
|
94271
|
-
|
|
94447
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out);
|
|
94448
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator);
|
|
94449
|
+
$n($$x1).puts__T__V((("return " + this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0)) + ";"));
|
|
94272
94450
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).dec__V();
|
|
94273
94451
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V("}")
|
|
94274
94452
|
});
|
|
@@ -94346,18 +94524,19 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.kaitaiType2NativeType__Lio_
|
|
|
94346
94524
|
}
|
|
94347
94525
|
});
|
|
94348
94526
|
$c_Lio_kaitai_struct_languages_PHPCompiler.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) {
|
|
94349
|
-
var this$
|
|
94527
|
+
var this$3 = $n(errArgs);
|
|
94350
94528
|
var f = ((v$2) => {
|
|
94351
94529
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
94352
|
-
|
|
94530
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator);
|
|
94531
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
94353
94532
|
});
|
|
94354
|
-
if ((this$
|
|
94533
|
+
if ((this$3 === $m_sci_Nil$())) {
|
|
94355
94534
|
var $$x1 = $m_sci_Nil$()
|
|
94356
94535
|
} else {
|
|
94357
|
-
var arg1 = this$
|
|
94536
|
+
var arg1 = this$3.head__O();
|
|
94358
94537
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
94359
94538
|
var t = h;
|
|
94360
|
-
var rest = $as_sci_List(this$
|
|
94539
|
+
var rest = $as_sci_List(this$3.tail__O());
|
|
94361
94540
|
while ((rest !== $m_sci_Nil$())) {
|
|
94362
94541
|
var arg1$1 = $n(rest).head__O();
|
|
94363
94542
|
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
@@ -94367,9 +94546,11 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attrValidateExpr__Lio_kaita
|
|
|
94367
94546
|
};
|
|
94368
94547
|
var $$x1 = h
|
|
94369
94548
|
};
|
|
94370
|
-
var this$
|
|
94371
|
-
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$
|
|
94372
|
-
|
|
94549
|
+
var this$4 = $n($$x1);
|
|
94550
|
+
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ", ", "");
|
|
94551
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out);
|
|
94552
|
+
var this$5 = $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator);
|
|
94553
|
+
$n($$x2).puts__T__V((("if (!(" + this$5.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(checkExpr, 0)) + ")) {"));
|
|
94373
94554
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V();
|
|
94374
94555
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((("throw new " + $m_Lio_kaitai_struct_languages_PHPCompiler$().ksErrorName__Lio_kaitai_struct_datatype_KSError__T(err)) + "(") + errArgsStr) + ");"));
|
|
94375
94556
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).dec__V();
|
|
@@ -94835,7 +95016,8 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
94835
95016
|
if ((x1$2 instanceof $c_s_Some)) {
|
|
94836
95017
|
var x2$2 = $as_s_Some(x1$2);
|
|
94837
95018
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
94838
|
-
var
|
|
95019
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator);
|
|
95020
|
+
var parent = this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0)
|
|
94839
95021
|
} else {
|
|
94840
95022
|
var x = $m_s_None$();
|
|
94841
95023
|
if ((!(x === x1$2))) {
|
|
@@ -94987,7 +95169,9 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classToString__Lio_kaitai_
|
|
|
94987
95169
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("sub _to_string {");
|
|
94988
95170
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).inc__V();
|
|
94989
95171
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("my ($self) = @_;");
|
|
94990
|
-
|
|
95172
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
95173
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator);
|
|
95174
|
+
$n($$x1).puts__T__V(("return " + this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0)));
|
|
94991
95175
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).dec__V();
|
|
94992
95176
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("}")
|
|
94993
95177
|
});
|
|
@@ -95474,7 +95658,8 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
95474
95658
|
var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dataType);
|
|
95475
95659
|
$m_Lio_kaitai_struct_Utils$().join__sc_IterableOnce__T__T__T__T($as_sc_IterableOnce($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
95476
95660
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
95477
|
-
|
|
95661
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_RustCompiler__f_translator);
|
|
95662
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
95478
95663
|
})))), "", ", ", ", ");
|
|
95479
95664
|
if ($n(x10).isOpaque__Z()) {
|
|
95480
95665
|
/*<skip>*/
|
|
@@ -95496,7 +95681,8 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
95496
95681
|
};
|
|
95497
95682
|
if (rc8) {
|
|
95498
95683
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
95499
|
-
var
|
|
95684
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_RustCompiler__f_translator);
|
|
95685
|
+
var parent = this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
95500
95686
|
break matchEnd9
|
|
95501
95687
|
};
|
|
95502
95688
|
var x$3 = $m_s_None$();
|
|
@@ -96826,7 +97012,8 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.parseExpr__Lio_kaitai_st
|
|
|
96826
97012
|
var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dataType);
|
|
96827
97013
|
var addParams = $m_Lio_kaitai_struct_Utils$().join__sc_IterableOnce__T__T__T__T($as_sc_IterableOnce($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
96828
97014
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
96829
|
-
|
|
97015
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_translator);
|
|
97016
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
96830
97017
|
})))), "", ", ", ", ");
|
|
96831
97018
|
if ($n(x10).isOpaque__Z()) {
|
|
96832
97019
|
var addArgs = ""
|
|
@@ -96848,7 +97035,8 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.parseExpr__Lio_kaitai_st
|
|
|
96848
97035
|
};
|
|
96849
97036
|
if (rc8) {
|
|
96850
97037
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
96851
|
-
var
|
|
97038
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_translator);
|
|
97039
|
+
var parent = this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
96852
97040
|
break matchEnd9
|
|
96853
97041
|
};
|
|
96854
97042
|
var x$3 = $m_s_None$();
|
|
@@ -97035,7 +97223,9 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classToString__Lio_kaita
|
|
|
97035
97223
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("public override string ToString()");
|
|
97036
97224
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
97037
97225
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
97038
|
-
|
|
97226
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
97227
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_translator);
|
|
97228
|
+
$n($$x1).puts__T__V((("return " + this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0)) + ";"));
|
|
97039
97229
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).dec__V();
|
|
97040
97230
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("}")
|
|
97041
97231
|
});
|
|
@@ -97080,18 +97270,19 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.paramName__Lio_kaitai_st
|
|
|
97080
97270
|
return ("p_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
97081
97271
|
});
|
|
97082
97272
|
$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) {
|
|
97083
|
-
var this$
|
|
97273
|
+
var this$3 = $n(errArgs);
|
|
97084
97274
|
var f = ((v$2) => {
|
|
97085
97275
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
97086
|
-
|
|
97276
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_translator);
|
|
97277
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
97087
97278
|
});
|
|
97088
|
-
if ((this$
|
|
97279
|
+
if ((this$3 === $m_sci_Nil$())) {
|
|
97089
97280
|
var $$x1 = $m_sci_Nil$()
|
|
97090
97281
|
} else {
|
|
97091
|
-
var arg1 = this$
|
|
97282
|
+
var arg1 = this$3.head__O();
|
|
97092
97283
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
97093
97284
|
var t = h;
|
|
97094
|
-
var rest = $as_sci_List(this$
|
|
97285
|
+
var rest = $as_sci_List(this$3.tail__O());
|
|
97095
97286
|
while ((rest !== $m_sci_Nil$())) {
|
|
97096
97287
|
var arg1$1 = $n(rest).head__O();
|
|
97097
97288
|
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
@@ -97101,9 +97292,11 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attrValidateExpr__Lio_ka
|
|
|
97101
97292
|
};
|
|
97102
97293
|
var $$x1 = h
|
|
97103
97294
|
};
|
|
97104
|
-
var this$
|
|
97105
|
-
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$
|
|
97106
|
-
|
|
97295
|
+
var this$4 = $n($$x1);
|
|
97296
|
+
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ", ", "");
|
|
97297
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
97298
|
+
var this$5 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_translator);
|
|
97299
|
+
$n($$x2).puts__T__V((("if (!(" + this$5.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(checkExpr, 0)) + "))"));
|
|
97107
97300
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
97108
97301
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
97109
97302
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("throw new " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().ksErrorName__Lio_kaitai_struct_datatype_KSError__T(err)) + "(") + errArgsStr) + ");"));
|
|
@@ -97651,7 +97844,8 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
97651
97844
|
var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dataType);
|
|
97652
97845
|
var addParams = $m_Lio_kaitai_struct_Utils$().join__sc_IterableOnce__T__T__T__T($as_sc_IterableOnce($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
97653
97846
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
97654
|
-
|
|
97847
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_translator);
|
|
97848
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
97655
97849
|
})))), "", ", ", ", ");
|
|
97656
97850
|
if ($n(x10).isOpaque__Z()) {
|
|
97657
97851
|
var addArgs = ""
|
|
@@ -97673,7 +97867,8 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
97673
97867
|
};
|
|
97674
97868
|
if (rc8) {
|
|
97675
97869
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
97676
|
-
var
|
|
97870
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_translator);
|
|
97871
|
+
var parent = this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
97677
97872
|
break matchEnd9
|
|
97678
97873
|
};
|
|
97679
97874
|
var x$3 = $m_s_None$();
|
|
@@ -97780,18 +97975,19 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.allocateIO__Lio_kaitai_stru
|
|
|
97780
97975
|
return "_io"
|
|
97781
97976
|
});
|
|
97782
97977
|
$c_Lio_kaitai_struct_languages_LuaCompiler.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) {
|
|
97783
|
-
var this$
|
|
97978
|
+
var this$3 = $n(errArgs);
|
|
97784
97979
|
var f = ((v$2) => {
|
|
97785
97980
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
97786
|
-
|
|
97981
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_translator);
|
|
97982
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
97787
97983
|
});
|
|
97788
|
-
if ((this$
|
|
97984
|
+
if ((this$3 === $m_sci_Nil$())) {
|
|
97789
97985
|
var errArgsCode = $m_sci_Nil$()
|
|
97790
97986
|
} else {
|
|
97791
|
-
var arg1 = this$
|
|
97987
|
+
var arg1 = this$3.head__O();
|
|
97792
97988
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
97793
97989
|
var t = h;
|
|
97794
|
-
var rest = $as_sci_List(this$
|
|
97990
|
+
var rest = $as_sci_List(this$3.tail__O());
|
|
97795
97991
|
while ((rest !== $m_sci_Nil$())) {
|
|
97796
97992
|
var arg1$1 = $n(rest).head__O();
|
|
97797
97993
|
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
@@ -97801,17 +97997,19 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrValidateExpr__Lio_kaita
|
|
|
97801
97997
|
};
|
|
97802
97998
|
var errArgsCode = h
|
|
97803
97999
|
};
|
|
97804
|
-
|
|
98000
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out);
|
|
98001
|
+
var this$4 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_translator);
|
|
98002
|
+
$n($$x1).puts__T__V((("if not(" + this$4.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(checkExpr, 0)) + ") then"));
|
|
97805
98003
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).inc__V();
|
|
97806
98004
|
if ((err instanceof $c_Lio_kaitai_struct_datatype_ValidationNotEqualError)) {
|
|
97807
|
-
var this$
|
|
97808
|
-
var this$
|
|
97809
|
-
var this$
|
|
97810
|
-
var _1 = (this$
|
|
97811
|
-
var this$
|
|
97812
|
-
var this$
|
|
97813
|
-
var this$
|
|
97814
|
-
var _2 = (this$
|
|
98005
|
+
var this$5 = $n(errArgsCode);
|
|
98006
|
+
var this$6 = new $c_s_PartialFunction$Lifted(this$5);
|
|
98007
|
+
var this$7 = $n(this$6.apply__O__s_Option(0));
|
|
98008
|
+
var _1 = (this$7.isEmpty__Z() ? "[expected]" : this$7.get__O());
|
|
98009
|
+
var this$8 = $n(errArgsCode);
|
|
98010
|
+
var this$9 = new $c_s_PartialFunction$Lifted(this$8);
|
|
98011
|
+
var this$10 = $n(this$9.apply__O__s_Option(1));
|
|
98012
|
+
var _2 = (this$10.isEmpty__Z() ? "[actual]" : this$10.get__O());
|
|
97815
98013
|
var expected = $as_T(_1);
|
|
97816
98014
|
var actual = $as_T(_2);
|
|
97817
98015
|
var msg = ((("\"not equal, expected \" .. " + expected) + " .. \", but got \" .. ") + actual)
|
|
@@ -97825,7 +98023,9 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrValidateExpr__Lio_kaita
|
|
|
97825
98023
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classToString__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(toStringExpr) {
|
|
97826
98024
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V((("function " + $m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_name)) + ":__tostring()"));
|
|
97827
98025
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).inc__V();
|
|
97828
|
-
|
|
98026
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out);
|
|
98027
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_translator);
|
|
98028
|
+
$n($$x1).puts__T__V(("return " + this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0)));
|
|
97829
98029
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).dec__V();
|
|
97830
98030
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("end")
|
|
97831
98031
|
});
|
|
@@ -97996,10 +98196,12 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.classToString__Lio_kaitai_s
|
|
|
97996
98196
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
97997
98197
|
$n(this.Lio_kaitai_struct_languages_NimCompiler__f_out).puts__T__V((("proc `$`(x: " + this.namespaced__sci_List__T($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_name)) + "): string ="));
|
|
97998
98198
|
$n(this.Lio_kaitai_struct_languages_NimCompiler__f_out).inc__V();
|
|
97999
|
-
|
|
98199
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_out);
|
|
98200
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_translator);
|
|
98201
|
+
$n($$x1).puts__T__V(("return " + this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0)));
|
|
98000
98202
|
$n(this.Lio_kaitai_struct_languages_NimCompiler__f_out).dec__V();
|
|
98001
|
-
var this$
|
|
98002
|
-
$n(this$
|
|
98203
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_out);
|
|
98204
|
+
$n(this$3.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
98003
98205
|
});
|
|
98004
98206
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.opaqueClassDeclaration__Lio_kaitai_struct_format_ClassSpec__V = (function(classSpec) {
|
|
98005
98207
|
$n(this.Lio_kaitai_struct_languages_NimCompiler__f_out).puts__T__V((("import \"" + $n($n(classSpec).Lio_kaitai_struct_format_ClassSpec__f_name).head__O()) + "\""))
|
|
@@ -98532,7 +98734,8 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
98532
98734
|
};
|
|
98533
98735
|
if (rc8) {
|
|
98534
98736
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
98535
|
-
var
|
|
98737
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_translator);
|
|
98738
|
+
var parent = this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
98536
98739
|
break matchEnd9
|
|
98537
98740
|
};
|
|
98538
98741
|
var x$3 = $m_s_None$();
|
|
@@ -98545,7 +98748,8 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
98545
98748
|
var addArgs = (", this.root, " + parent);
|
|
98546
98749
|
var addParams = $m_Lio_kaitai_struct_Utils$().join__sc_IterableOnce__T__T__T__T($as_sc_IterableOnce($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
98547
98750
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
98548
|
-
|
|
98751
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_translator);
|
|
98752
|
+
return this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
98549
98753
|
})))), ", ", ", ", "");
|
|
98550
98754
|
var x1$3 = $n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec;
|
|
98551
98755
|
if ((x1$3 instanceof $c_s_Some)) {
|
|
@@ -99237,7 +99441,8 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
99237
99441
|
var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dataType);
|
|
99238
99442
|
var addParams = $m_Lio_kaitai_struct_Utils$().join__sc_IterableOnce__T__T__T__T($as_sc_IterableOnce($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
99239
99443
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
99240
|
-
|
|
99444
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator);
|
|
99445
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
99241
99446
|
})))), ", ", ", ", "");
|
|
99242
99447
|
if ($n(x10).isOpaque__Z()) {
|
|
99243
99448
|
var addArgs = ""
|
|
@@ -99259,7 +99464,8 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
99259
99464
|
};
|
|
99260
99465
|
if (rc8) {
|
|
99261
99466
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
99262
|
-
var
|
|
99467
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator);
|
|
99468
|
+
var parent = this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
99263
99469
|
break matchEnd9
|
|
99264
99470
|
};
|
|
99265
99471
|
var x$3 = $m_s_None$();
|
|
@@ -99292,7 +99498,10 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
99292
99498
|
});
|
|
99293
99499
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesLimitType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T = (function(id, blt, io, rep, defEndian) {
|
|
99294
99500
|
var ioName = ("_io_" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
99295
|
-
|
|
99501
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out);
|
|
99502
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator);
|
|
99503
|
+
var v = $n(blt).Lio_kaitai_struct_datatype_DataType$BytesLimitType__f_size;
|
|
99504
|
+
$n($$x1).puts__T__V((((((ioName + " = ") + io) + ".substream(") + this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")"));
|
|
99296
99505
|
return ioName
|
|
99297
99506
|
});
|
|
99298
99507
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.bytesPadTermExpr__T__s_Option__s_Option__Z__T = (function(expr0, padRight, terminator, include) {
|
|
@@ -99418,7 +99627,9 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classToString__Lio_kaitai_
|
|
|
99418
99627
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
99419
99628
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("def inspect");
|
|
99420
99629
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).inc__V();
|
|
99421
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out)
|
|
99630
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out);
|
|
99631
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator);
|
|
99632
|
+
$n($$x1).puts__T__V(this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0));
|
|
99422
99633
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).dec__V();
|
|
99423
99634
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("end")
|
|
99424
99635
|
});
|
|
@@ -99429,18 +99640,19 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.localTemporaryName__Lio_ka
|
|
|
99429
99640
|
return ("_t_" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
99430
99641
|
});
|
|
99431
99642
|
$c_Lio_kaitai_struct_languages_RubyCompiler.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) {
|
|
99432
|
-
var this$
|
|
99643
|
+
var this$3 = $n(errArgs);
|
|
99433
99644
|
var f = ((v$2) => {
|
|
99434
99645
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
99435
|
-
|
|
99646
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator);
|
|
99647
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
99436
99648
|
});
|
|
99437
|
-
if ((this$
|
|
99649
|
+
if ((this$3 === $m_sci_Nil$())) {
|
|
99438
99650
|
var $$x1 = $m_sci_Nil$()
|
|
99439
99651
|
} else {
|
|
99440
|
-
var arg1 = this$
|
|
99652
|
+
var arg1 = this$3.head__O();
|
|
99441
99653
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
99442
99654
|
var t = h;
|
|
99443
|
-
var rest = $as_sci_List(this$
|
|
99655
|
+
var rest = $as_sci_List(this$3.tail__O());
|
|
99444
99656
|
while ((rest !== $m_sci_Nil$())) {
|
|
99445
99657
|
var arg1$1 = $n(rest).head__O();
|
|
99446
99658
|
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
@@ -99450,9 +99662,12 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrValidateExpr__Lio_kait
|
|
|
99450
99662
|
};
|
|
99451
99663
|
var $$x1 = h
|
|
99452
99664
|
};
|
|
99453
|
-
var this$
|
|
99454
|
-
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$
|
|
99455
|
-
|
|
99665
|
+
var this$4 = $n($$x1);
|
|
99666
|
+
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ", ", "");
|
|
99667
|
+
var $$x3 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out);
|
|
99668
|
+
var $$x2 = $m_Lio_kaitai_struct_languages_RubyCompiler$().ksErrorName__Lio_kaitai_struct_datatype_KSError__T(err);
|
|
99669
|
+
var this$5 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator);
|
|
99670
|
+
$n($$x3).puts__T__V(((((("raise " + $$x2) + ".new(") + errArgsStr) + ") if not ") + this$5.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(checkExpr, 0)))
|
|
99456
99671
|
});
|
|
99457
99672
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.types2class__sci_List__T = (function(names) {
|
|
99458
99673
|
var this$2 = $n(names);
|
|
@@ -100646,7 +100861,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
100646
100861
|
};
|
|
100647
100862
|
if (rc8) {
|
|
100648
100863
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
100649
|
-
var
|
|
100864
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_translator);
|
|
100865
|
+
var parent = this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
100650
100866
|
break matchEnd9
|
|
100651
100867
|
};
|
|
100652
100868
|
var x$3 = $m_s_None$();
|
|
@@ -100674,7 +100890,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
100674
100890
|
};
|
|
100675
100891
|
var addParams = $m_Lio_kaitai_struct_Utils$().join__sc_IterableOnce__T__T__T__T($as_sc_IterableOnce($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
100676
100892
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
100677
|
-
|
|
100893
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_translator);
|
|
100894
|
+
return this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
100678
100895
|
})))), ", ", ", ", "");
|
|
100679
100896
|
var expr = (((((("new " + $m_Lio_kaitai_struct_languages_JavaCompiler$().types2class__sci_List__T($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name)) + "(") + io) + addArgs) + addParams) + ")")
|
|
100680
100897
|
} else {
|
|
@@ -100682,8 +100899,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
100682
100899
|
throw new $c_s_MatchError(dataType)
|
|
100683
100900
|
};
|
|
100684
100901
|
if ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType)))) {
|
|
100685
|
-
var this$
|
|
100686
|
-
return (((("(" + this$
|
|
100902
|
+
var this$4 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100903
|
+
return (((("(" + this$4.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(assignType)) + ") (") + expr) + ")")
|
|
100687
100904
|
} else {
|
|
100688
100905
|
return expr
|
|
100689
100906
|
}
|
|
@@ -100691,7 +100908,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
100691
100908
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesLimitType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T = (function(id, blt, io, rep, defEndian) {
|
|
100692
100909
|
var id$1 = new $c_Lio_kaitai_struct_format_IoStorageIdentifier(id);
|
|
100693
100910
|
var ioName = $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id$1);
|
|
100694
|
-
|
|
100911
|
+
var $$x1 = $m_Lio_kaitai_struct_datatype_DataType$KaitaiStreamType$();
|
|
100912
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_translator);
|
|
100913
|
+
var v = $n(blt).Lio_kaitai_struct_datatype_DataType$BytesLimitType__f_size;
|
|
100914
|
+
this.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V($$x1, ioName, (((io + ".substream(") + this$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)) + ")"));
|
|
100695
100915
|
return ioName
|
|
100696
100916
|
});
|
|
100697
100917
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.extraRawAttrForUserTypeFromBytes__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__Lio_kaitai_struct_format_ConditionalSpec__sci_List = (function(id, ut, condSpec) {
|
|
@@ -100990,7 +101210,9 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classToString__Lio_kaitai_
|
|
|
100990
101210
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("@Override");
|
|
100991
101211
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("public String toString() {");
|
|
100992
101212
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100993
|
-
|
|
101213
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
101214
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_translator);
|
|
101215
|
+
$n($$x1).puts__T__V((("return " + this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0)) + ";"));
|
|
100994
101216
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).dec__V();
|
|
100995
101217
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("}")
|
|
100996
101218
|
});
|
|
@@ -101014,18 +101236,19 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.ksErrorName__Lio_kaitai_st
|
|
|
101014
101236
|
}
|
|
101015
101237
|
});
|
|
101016
101238
|
$c_Lio_kaitai_struct_languages_JavaCompiler.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) {
|
|
101017
|
-
var this$
|
|
101239
|
+
var this$3 = $n(errArgs);
|
|
101018
101240
|
var f = ((v$2) => {
|
|
101019
101241
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
101020
|
-
|
|
101242
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_translator);
|
|
101243
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
101021
101244
|
});
|
|
101022
|
-
if ((this$
|
|
101245
|
+
if ((this$3 === $m_sci_Nil$())) {
|
|
101023
101246
|
var $$x1 = $m_sci_Nil$()
|
|
101024
101247
|
} else {
|
|
101025
|
-
var arg1 = this$
|
|
101248
|
+
var arg1 = this$3.head__O();
|
|
101026
101249
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
101027
101250
|
var t = h;
|
|
101028
|
-
var rest = $as_sci_List(this$
|
|
101251
|
+
var rest = $as_sci_List(this$3.tail__O());
|
|
101029
101252
|
while ((rest !== $m_sci_Nil$())) {
|
|
101030
101253
|
var arg1$1 = $n(rest).head__O();
|
|
101031
101254
|
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
@@ -101035,9 +101258,11 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrValidateExpr__Lio_kait
|
|
|
101035
101258
|
};
|
|
101036
101259
|
var $$x1 = h
|
|
101037
101260
|
};
|
|
101038
|
-
var this$
|
|
101039
|
-
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$
|
|
101040
|
-
|
|
101261
|
+
var this$4 = $n($$x1);
|
|
101262
|
+
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ", ", "");
|
|
101263
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
101264
|
+
var this$5 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_translator);
|
|
101265
|
+
$n($$x2).puts__T__V((("if (!(" + this$5.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(checkExpr, 0)) + ")) {"));
|
|
101041
101266
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
101042
101267
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((("throw new " + this.ksErrorName__Lio_kaitai_struct_datatype_KSError__T(err)) + "(") + errArgsStr) + ");"));
|
|
101043
101268
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).dec__V();
|
|
@@ -101618,7 +101843,8 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.parseExpr__Lio_kaitai_st
|
|
|
101618
101843
|
var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dataType);
|
|
101619
101844
|
var addParams = $m_Lio_kaitai_struct_Utils$().join__sc_IterableOnce__T__T__T__T($as_sc_IterableOnce($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_args).map__F1__O(new $c_sjsr_AnonFunction1(((a$2) => {
|
|
101620
101845
|
var a = $as_Lio_kaitai_struct_exprlang_Ast$expr(a$2);
|
|
101621
|
-
|
|
101846
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_translator);
|
|
101847
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
101622
101848
|
})))), "", ", ", ", ");
|
|
101623
101849
|
if ($n(x10).isOpaque__Z()) {
|
|
101624
101850
|
var addArgs = ""
|
|
@@ -101640,7 +101866,8 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.parseExpr__Lio_kaitai_st
|
|
|
101640
101866
|
};
|
|
101641
101867
|
if (rc8) {
|
|
101642
101868
|
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr($n(x2$2).s_Some__f_value);
|
|
101643
|
-
var
|
|
101869
|
+
var this$3 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_translator);
|
|
101870
|
+
var parent = this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(fp, 0);
|
|
101644
101871
|
break matchEnd9
|
|
101645
101872
|
};
|
|
101646
101873
|
var x$3 = $m_s_None$();
|
|
@@ -101816,7 +102043,9 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classToString__Lio_kaita
|
|
|
101816
102043
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
101817
102044
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("def __repr__(self):");
|
|
101818
102045
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).inc__V();
|
|
101819
|
-
|
|
102046
|
+
var $$x1 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out);
|
|
102047
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_translator);
|
|
102048
|
+
$n($$x1).puts__T__V(("return " + this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(toStringExpr, 0)));
|
|
101820
102049
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).dec__V()
|
|
101821
102050
|
});
|
|
101822
102051
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.bool2Py__Z__T = (function(b) {
|
|
@@ -101829,18 +102058,19 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.localTemporaryName__Lio_
|
|
|
101829
102058
|
return ("_t_" + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
101830
102059
|
});
|
|
101831
102060
|
$c_Lio_kaitai_struct_languages_PythonCompiler.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) {
|
|
101832
|
-
var this$
|
|
102061
|
+
var this$3 = $n(errArgs);
|
|
101833
102062
|
var f = ((v$2) => {
|
|
101834
102063
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
101835
|
-
|
|
102064
|
+
var this$2 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_translator);
|
|
102065
|
+
return this$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
101836
102066
|
});
|
|
101837
|
-
if ((this$
|
|
102067
|
+
if ((this$3 === $m_sci_Nil$())) {
|
|
101838
102068
|
var $$x1 = $m_sci_Nil$()
|
|
101839
102069
|
} else {
|
|
101840
|
-
var arg1 = this$
|
|
102070
|
+
var arg1 = this$3.head__O();
|
|
101841
102071
|
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
101842
102072
|
var t = h;
|
|
101843
|
-
var rest = $as_sci_List(this$
|
|
102073
|
+
var rest = $as_sci_List(this$3.tail__O());
|
|
101844
102074
|
while ((rest !== $m_sci_Nil$())) {
|
|
101845
102075
|
var arg1$1 = $n(rest).head__O();
|
|
101846
102076
|
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
@@ -101850,9 +102080,11 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attrValidateExpr__Lio_ka
|
|
|
101850
102080
|
};
|
|
101851
102081
|
var $$x1 = h
|
|
101852
102082
|
};
|
|
101853
|
-
var this$
|
|
101854
|
-
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$
|
|
101855
|
-
|
|
102083
|
+
var this$4 = $n($$x1);
|
|
102084
|
+
var errArgsStr = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ", ", "");
|
|
102085
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out);
|
|
102086
|
+
var this$5 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_translator);
|
|
102087
|
+
$n($$x2).puts__T__V((("if not " + this$5.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(checkExpr, 0)) + ":"));
|
|
101856
102088
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).inc__V();
|
|
101857
102089
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((((("raise " + $m_Lio_kaitai_struct_languages_PythonCompiler$().ksErrorName__Lio_kaitai_struct_datatype_KSError__T(err)) + "(") + errArgsStr) + ")"));
|
|
101858
102090
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).dec__V()
|