kaitai-struct-compiler 0.11.0-SNAPSHOT20240401.112327.fda00d3 → 0.11.0-SNAPSHOT20240415.175433.32227fc
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 +676 -690
- package/package.json +1 -1
|
@@ -2030,6 +2030,26 @@ function $m_Lio_kaitai_struct_EncodingList$() {
|
|
|
2030
2030
|
return $n_Lio_kaitai_struct_EncodingList$
|
|
2031
2031
|
}
|
|
2032
2032
|
/** @constructor */
|
|
2033
|
+
function $c_Lio_kaitai_struct_ExternalType() {
|
|
2034
|
+
/*<skip>*/
|
|
2035
|
+
}
|
|
2036
|
+
$c_Lio_kaitai_struct_ExternalType.prototype = new $h_O();
|
|
2037
|
+
$c_Lio_kaitai_struct_ExternalType.prototype.constructor = $c_Lio_kaitai_struct_ExternalType;
|
|
2038
|
+
/** @constructor */
|
|
2039
|
+
function $h_Lio_kaitai_struct_ExternalType() {
|
|
2040
|
+
/*<skip>*/
|
|
2041
|
+
}
|
|
2042
|
+
$h_Lio_kaitai_struct_ExternalType.prototype = $c_Lio_kaitai_struct_ExternalType.prototype;
|
|
2043
|
+
function $as_Lio_kaitai_struct_ExternalType(obj) {
|
|
2044
|
+
return (((obj instanceof $c_Lio_kaitai_struct_ExternalType) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.ExternalType"))
|
|
2045
|
+
}
|
|
2046
|
+
function $isArrayOf_Lio_kaitai_struct_ExternalType(obj, depth) {
|
|
2047
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_ExternalType)))
|
|
2048
|
+
}
|
|
2049
|
+
function $asArrayOf_Lio_kaitai_struct_ExternalType(obj, depth) {
|
|
2050
|
+
return (($isArrayOf_Lio_kaitai_struct_ExternalType(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.ExternalType;", depth))
|
|
2051
|
+
}
|
|
2052
|
+
/** @constructor */
|
|
2033
2053
|
function $c_Lio_kaitai_struct_ImportList() {
|
|
2034
2054
|
this.Lio_kaitai_struct_ImportList__f_list = null;
|
|
2035
2055
|
var elems = $m_sci_Nil$();
|
|
@@ -2599,40 +2619,38 @@ function $h_Lio_kaitai_struct_TypeProcessor$() {
|
|
|
2599
2619
|
/*<skip>*/
|
|
2600
2620
|
}
|
|
2601
2621
|
$h_Lio_kaitai_struct_TypeProcessor$.prototype = $c_Lio_kaitai_struct_TypeProcessor$.prototype;
|
|
2602
|
-
$c_Lio_kaitai_struct_TypeProcessor$.prototype.
|
|
2622
|
+
$c_Lio_kaitai_struct_TypeProcessor$.prototype.getExternalTypes__Lio_kaitai_struct_format_ClassSpec__sc_Iterable = (function(curClass) {
|
|
2603
2623
|
var res = $as_scm_Set($m_scm_Set$().apply__sci_Seq__O($m_sci_Nil$()));
|
|
2604
|
-
var this$
|
|
2605
|
-
var
|
|
2606
|
-
|
|
2624
|
+
var this$1 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_seq);
|
|
2625
|
+
var these = this$1;
|
|
2626
|
+
while ((!$n(these).isEmpty__Z())) {
|
|
2627
|
+
var arg1 = $n(these).head__O();
|
|
2628
|
+
var attr = $as_Lio_kaitai_struct_format_AttrSpec(arg1);
|
|
2607
2629
|
var this$2 = $n(res);
|
|
2608
|
-
var xs = $m_Lio_kaitai_struct_TypeProcessor$().
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
if ((this$3 === $m_sci_Nil$())) {
|
|
2612
|
-
$m_sci_Nil$()
|
|
2613
|
-
} else {
|
|
2614
|
-
var arg1 = this$3.head__O();
|
|
2615
|
-
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
2616
|
-
var t = h;
|
|
2617
|
-
var rest = $as_sci_List(this$3.tail__O());
|
|
2618
|
-
while ((rest !== $m_sci_Nil$())) {
|
|
2619
|
-
var arg1$1 = $n(rest).head__O();
|
|
2620
|
-
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
2621
|
-
$n(t).sci_$colon$colon__f_next = nx;
|
|
2622
|
-
t = nx;
|
|
2623
|
-
rest = $as_sci_List($n(rest).tail__O())
|
|
2624
|
-
}
|
|
2630
|
+
var xs = $m_Lio_kaitai_struct_TypeProcessor$().getExternalTypesFromDataType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ClassSpec__sc_Iterable($n(attr).Lio_kaitai_struct_format_AttrSpec__f_dataType, curClass);
|
|
2631
|
+
this$2.addAll__sc_IterableOnce__scm_HashSet(xs);
|
|
2632
|
+
these = $as_sci_List($n(these).tail__O())
|
|
2625
2633
|
};
|
|
2626
|
-
var this$
|
|
2627
|
-
var
|
|
2634
|
+
var this$3 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_params);
|
|
2635
|
+
var these$1 = this$3;
|
|
2636
|
+
while ((!$n(these$1).isEmpty__Z())) {
|
|
2637
|
+
var arg1$1 = $n(these$1).head__O();
|
|
2638
|
+
var param = $as_Lio_kaitai_struct_format_ParamDefSpec(arg1$1);
|
|
2639
|
+
var this$4 = $n(res);
|
|
2640
|
+
var xs$1 = $m_Lio_kaitai_struct_TypeProcessor$().getExternalTypesFromDataType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ClassSpec__sc_Iterable($n(param).Lio_kaitai_struct_format_ParamDefSpec__f_dataType, curClass);
|
|
2641
|
+
this$4.addAll__sc_IterableOnce__scm_HashSet(xs$1);
|
|
2642
|
+
these$1 = $as_sci_List($n(these$1).tail__O())
|
|
2643
|
+
};
|
|
2644
|
+
var this$6 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_instances);
|
|
2645
|
+
var f = new $c_sjsr_AnonFunction1(((x0$1$2) => {
|
|
2628
2646
|
var x0$1 = $as_T2(x0$1$2);
|
|
2629
2647
|
if ((x0$1 !== null)) {
|
|
2630
2648
|
var inst = $as_Lio_kaitai_struct_format_InstanceSpec($n(x0$1).T2__f__2);
|
|
2631
2649
|
if ((inst instanceof $c_Lio_kaitai_struct_format_ParseInstanceSpec)) {
|
|
2632
2650
|
var x2 = $as_Lio_kaitai_struct_format_ParseInstanceSpec(inst);
|
|
2633
|
-
var this$
|
|
2634
|
-
var xs$
|
|
2635
|
-
return this$
|
|
2651
|
+
var this$5 = $n(res);
|
|
2652
|
+
var xs$2 = $m_Lio_kaitai_struct_TypeProcessor$().getExternalTypesFromDataType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ClassSpec__sc_Iterable($n(x2).Lio_kaitai_struct_format_ParseInstanceSpec__f_dataType, curClass);
|
|
2653
|
+
return this$5.addAll__sc_IterableOnce__scm_HashSet(xs$2)
|
|
2636
2654
|
} else {
|
|
2637
2655
|
return $m_s_None$()
|
|
2638
2656
|
}
|
|
@@ -2640,57 +2658,73 @@ $c_Lio_kaitai_struct_TypeProcessor$.prototype.getOpaqueClasses__Lio_kaitai_struc
|
|
|
2640
2658
|
throw new $c_s_MatchError(x0$1)
|
|
2641
2659
|
}
|
|
2642
2660
|
}));
|
|
2643
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$
|
|
2644
|
-
var this$
|
|
2645
|
-
var f$
|
|
2661
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$6.sci_TreeMap__f_tree, f);
|
|
2662
|
+
var this$8 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_types);
|
|
2663
|
+
var f$1 = new $c_sjsr_AnonFunction1(((x0$2$2) => {
|
|
2646
2664
|
var x0$2 = $as_T2(x0$2$2);
|
|
2647
2665
|
if ((x0$2 !== null)) {
|
|
2648
2666
|
var nestedType = $as_Lio_kaitai_struct_format_ClassSpec($n(x0$2).T2__f__2);
|
|
2649
|
-
var this$
|
|
2650
|
-
var xs$
|
|
2651
|
-
return this$
|
|
2667
|
+
var this$7 = $n(res);
|
|
2668
|
+
var xs$3 = $m_Lio_kaitai_struct_TypeProcessor$().getExternalTypes__Lio_kaitai_struct_format_ClassSpec__sc_Iterable(nestedType);
|
|
2669
|
+
return this$7.addAll__sc_IterableOnce__scm_HashSet(xs$3)
|
|
2652
2670
|
} else {
|
|
2653
2671
|
throw new $c_s_MatchError(x0$2)
|
|
2654
2672
|
}
|
|
2655
2673
|
}));
|
|
2656
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$
|
|
2674
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$8.sci_TreeMap__f_tree, f$1);
|
|
2657
2675
|
return res
|
|
2658
2676
|
});
|
|
2659
|
-
$c_Lio_kaitai_struct_TypeProcessor$.prototype.
|
|
2660
|
-
|
|
2661
|
-
var
|
|
2662
|
-
if ($
|
|
2663
|
-
$
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2677
|
+
$c_Lio_kaitai_struct_TypeProcessor$.prototype.getExternalTypesFromDataType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ClassSpec__sc_Iterable = (function(dataType, curClass) {
|
|
2678
|
+
while (true) {
|
|
2679
|
+
var x1 = dataType;
|
|
2680
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
2681
|
+
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(x1);
|
|
2682
|
+
if ($n(x2).isExternal__Lio_kaitai_struct_format_ClassSpec__Z(curClass)) {
|
|
2683
|
+
$n($m_s_package$().s_package$__f_List);
|
|
2684
|
+
var array = [new $c_Lio_kaitai_struct_ExternalUserType($as_Lio_kaitai_struct_format_ClassSpec($n($n(x2).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O()))];
|
|
2685
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
2686
|
+
return $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems)
|
|
2687
|
+
} else {
|
|
2688
|
+
return $m_sci_Nil$()
|
|
2689
|
+
}
|
|
2690
|
+
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
2691
|
+
var x3 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(x1);
|
|
2692
|
+
if ($n(x3).isExternal__Lio_kaitai_struct_format_ClassSpec__Z(curClass)) {
|
|
2693
|
+
$n($m_s_package$().s_package$__f_List);
|
|
2694
|
+
var array$1 = [new $c_Lio_kaitai_struct_ExternalEnum($as_Lio_kaitai_struct_format_EnumSpec($n($n(x3).Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec).get__O()))];
|
|
2695
|
+
var elems$1 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1);
|
|
2696
|
+
return $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$1)
|
|
2697
|
+
} else {
|
|
2698
|
+
return $m_sci_Nil$()
|
|
2699
|
+
}
|
|
2700
|
+
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
2701
|
+
var x4 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
2702
|
+
var this$9 = $n($n(x4).Lio_kaitai_struct_datatype_DataType$SwitchType__f_cases);
|
|
2703
|
+
var b = $m_sci_Iterable$().newBuilder__scm_Builder();
|
|
2704
|
+
$m_sci_RedBlackTree$();
|
|
2705
|
+
var tree = this$9.sci_TreeMap__f_tree;
|
|
2706
|
+
$m_sci_RedBlackTree$();
|
|
2707
|
+
var start = $m_s_None$();
|
|
2708
|
+
var evidence$16 = this$9.sci_TreeMap__f_ordering;
|
|
2709
|
+
var it = new $c_sci_RedBlackTree$EntriesIterator(tree, start, evidence$16);
|
|
2710
|
+
while (it.hasNext__Z()) {
|
|
2711
|
+
var this$12 = $n(b);
|
|
2712
|
+
var arg1 = it.next__O();
|
|
2713
|
+
var x0$1 = $as_T2(arg1);
|
|
2714
|
+
if ((x0$1 === null)) {
|
|
2715
|
+
throw new $c_s_MatchError(x0$1)
|
|
2716
|
+
};
|
|
2717
|
+
var ut = $as_Lio_kaitai_struct_datatype_DataType($n(x0$1).T2__f__2);
|
|
2718
|
+
var xs = $m_Lio_kaitai_struct_TypeProcessor$().getExternalTypesFromDataType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ClassSpec__sc_Iterable(ut, curClass);
|
|
2719
|
+
this$12.addAll__sc_IterableOnce__scm_Growable(xs)
|
|
2720
|
+
};
|
|
2721
|
+
return $as_sc_Iterable($n(b).result__O())
|
|
2722
|
+
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
2723
|
+
var x5 = $as_Lio_kaitai_struct_datatype_DataType$ArrayType(x1);
|
|
2724
|
+
dataType = $n(x5).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType
|
|
2667
2725
|
} else {
|
|
2668
2726
|
return $m_sci_Nil$()
|
|
2669
2727
|
}
|
|
2670
|
-
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
2671
|
-
var x3 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(dataType);
|
|
2672
|
-
var this$5 = $n($n(x3).Lio_kaitai_struct_datatype_DataType$SwitchType__f_cases);
|
|
2673
|
-
var b = $m_sci_Iterable$().newBuilder__scm_Builder();
|
|
2674
|
-
$m_sci_RedBlackTree$();
|
|
2675
|
-
var tree = this$5.sci_TreeMap__f_tree;
|
|
2676
|
-
$m_sci_RedBlackTree$();
|
|
2677
|
-
var start = $m_s_None$();
|
|
2678
|
-
var evidence$16 = this$5.sci_TreeMap__f_ordering;
|
|
2679
|
-
var it = new $c_sci_RedBlackTree$EntriesIterator(tree, start, evidence$16);
|
|
2680
|
-
while (it.hasNext__Z()) {
|
|
2681
|
-
var this$8 = $n(b);
|
|
2682
|
-
var arg1 = it.next__O();
|
|
2683
|
-
var x0$1 = $as_T2(arg1);
|
|
2684
|
-
if ((x0$1 === null)) {
|
|
2685
|
-
throw new $c_s_MatchError(x0$1)
|
|
2686
|
-
};
|
|
2687
|
-
var ut = $as_Lio_kaitai_struct_datatype_DataType($n(x0$1).T2__f__2);
|
|
2688
|
-
var xs = $m_Lio_kaitai_struct_TypeProcessor$().getOpaqueDataTypes__Lio_kaitai_struct_datatype_DataType__sc_Iterable(ut);
|
|
2689
|
-
this$8.addAll__sc_IterableOnce__scm_Growable(xs)
|
|
2690
|
-
};
|
|
2691
|
-
return $as_sc_Iterable($n(b).result__O())
|
|
2692
|
-
} else {
|
|
2693
|
-
return $m_sci_Nil$()
|
|
2694
2728
|
}
|
|
2695
2729
|
});
|
|
2696
2730
|
var $d_Lio_kaitai_struct_TypeProcessor$ = new $TypeData().initClass({
|
|
@@ -3010,8 +3044,8 @@ function $m_Lio_kaitai_struct_Utils$() {
|
|
|
3010
3044
|
function $c_Lio_kaitai_struct_Version$() {
|
|
3011
3045
|
this.Lio_kaitai_struct_Version$__f_version = null;
|
|
3012
3046
|
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-04-
|
|
3047
|
+
this.Lio_kaitai_struct_Version$__f_version = "0.11-SNAPSHOT20240415.175433.32227fc";
|
|
3048
|
+
this.Lio_kaitai_struct_Version$__f_gitTime = "2024-04-15T17:54:33+00:00"
|
|
3015
3049
|
}
|
|
3016
3050
|
$c_Lio_kaitai_struct_Version$.prototype = new $h_O();
|
|
3017
3051
|
$c_Lio_kaitai_struct_Version$.prototype.constructor = $c_Lio_kaitai_struct_Version$;
|
|
@@ -20324,10 +20358,9 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20324
20358
|
var x11 = $as_Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel(v);
|
|
20325
20359
|
var enumType = $n(x11).Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel__f_enumName;
|
|
20326
20360
|
var inType = $n(x11).Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel__f_inType;
|
|
20327
|
-
$n($
|
|
20328
|
-
var
|
|
20329
|
-
var
|
|
20330
|
-
var t = new $c_Lio_kaitai_struct_datatype_DataType$EnumType($m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems), $m_Lio_kaitai_struct_datatype_DataType$CalcIntType$());
|
|
20361
|
+
var this$7 = $n($n($n(inType).Lio_kaitai_struct_exprlang_Ast$typeId__f_names).toList__sci_List());
|
|
20362
|
+
var elem = $n(enumType).Lio_kaitai_struct_exprlang_Ast$identifier__f_name;
|
|
20363
|
+
var t = new $c_Lio_kaitai_struct_datatype_DataType$EnumType($as_sci_List($f_sc_StrictOptimizedSeqOps__appended__O__O(this$7, elem)), $m_Lio_kaitai_struct_datatype_DataType$CalcIntType$());
|
|
20331
20364
|
t.Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec = new $c_s_Some($n(this.Lio_kaitai_struct_translators_TypeDetector__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));
|
|
20332
20365
|
return t
|
|
20333
20366
|
};
|
|
@@ -20336,9 +20369,9 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20336
20369
|
var enumType$2 = $n(x13).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_enumName;
|
|
20337
20370
|
var inType$2 = $n(x13).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_inType;
|
|
20338
20371
|
$n($m_s_package$().s_package$__f_List);
|
|
20339
|
-
var array
|
|
20340
|
-
var elems
|
|
20341
|
-
var t$2 = new $c_Lio_kaitai_struct_datatype_DataType$EnumType($m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems
|
|
20372
|
+
var array = [$n(enumType$2).Lio_kaitai_struct_exprlang_Ast$identifier__f_name];
|
|
20373
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
20374
|
+
var t$2 = new $c_Lio_kaitai_struct_datatype_DataType$EnumType($m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems), $m_Lio_kaitai_struct_datatype_DataType$CalcIntType$());
|
|
20342
20375
|
t$2.Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec = new $c_s_Some($n(this.Lio_kaitai_struct_translators_TypeDetector__f_provider).resolveEnum__Lio_kaitai_struct_exprlang_Ast$typeId__T__Lio_kaitai_struct_format_EnumSpec(inType$2, $n(enumType$2).Lio_kaitai_struct_exprlang_Ast$identifier__f_name));
|
|
20343
20376
|
return t$2
|
|
20344
20377
|
};
|
|
@@ -20346,9 +20379,9 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20346
20379
|
var x15 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Name(v);
|
|
20347
20380
|
var name = $n(x15).Lio_kaitai_struct_exprlang_Ast$expr$Name__f_id;
|
|
20348
20381
|
if ((name !== null)) {
|
|
20349
|
-
var this$
|
|
20382
|
+
var this$12 = $n(this.Lio_kaitai_struct_translators_TypeDetector__f_provider);
|
|
20350
20383
|
var attrName = $n(name).Lio_kaitai_struct_exprlang_Ast$identifier__f_name;
|
|
20351
|
-
var qual$1 = this$
|
|
20384
|
+
var qual$1 = this$12.determineType__Lio_kaitai_struct_format_ClassSpec__T__Lio_kaitai_struct_datatype_DataType(this$12.Lio_kaitai_struct_ClassTypeProvider__f_nowClass, attrName);
|
|
20352
20385
|
var x$1 = $n(qual$1).asNonOwning$default$1__Z();
|
|
20353
20386
|
return $n(qual$1).asNonOwning__Z__Lio_kaitai_struct_datatype_DataType(x$1)
|
|
20354
20387
|
}
|
|
@@ -20356,8 +20389,8 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20356
20389
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName)) {
|
|
20357
20390
|
var x17 = $as_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(v);
|
|
20358
20391
|
var id = $n(x17).Lio_kaitai_struct_exprlang_Ast$expr$InternalName__f_id;
|
|
20359
|
-
var this$
|
|
20360
|
-
return this$
|
|
20392
|
+
var this$13 = $n(this.Lio_kaitai_struct_translators_TypeDetector__f_provider);
|
|
20393
|
+
return this$13.determineType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType(this$13.Lio_kaitai_struct_ClassTypeProvider__f_nowClass, id)
|
|
20361
20394
|
};
|
|
20362
20395
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp)) {
|
|
20363
20396
|
var x18 = $as_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp(v);
|
|
@@ -20513,8 +20546,8 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20513
20546
|
var x1$5 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(container);
|
|
20514
20547
|
if ((x1$5 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream)) {
|
|
20515
20548
|
var x2$2 = $as_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream(x1$5);
|
|
20516
|
-
var this$
|
|
20517
|
-
var elType = this$
|
|
20549
|
+
var this$15 = $n(x2$2);
|
|
20550
|
+
var elType = this$15.Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
20518
20551
|
if ((elType !== null)) {
|
|
20519
20552
|
var x1$6 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(idx);
|
|
20520
20553
|
if ((x1$6 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -20533,8 +20566,8 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20533
20566
|
};
|
|
20534
20567
|
if ((x1$5 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcArrayType)) {
|
|
20535
20568
|
var x4$2 = $as_Lio_kaitai_struct_datatype_DataType$CalcArrayType(x1$5);
|
|
20536
|
-
var this$
|
|
20537
|
-
var elType$2 = this$
|
|
20569
|
+
var this$16 = $n(x4$2);
|
|
20570
|
+
var elType$2 = this$16.Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
20538
20571
|
if ((elType$2 !== null)) {
|
|
20539
20572
|
var x1$8 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(idx);
|
|
20540
20573
|
if ((x1$8 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -33672,7 +33705,7 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.topClass__Lio_kaitai_struct_format_
|
|
|
33672
33705
|
});
|
|
33673
33706
|
$c_Lio_kaitai_struct_ClassCompiler.prototype.compile__Lio_kaitai_struct_CompileLog$SpecSuccess = (function() {
|
|
33674
33707
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).fileHeader__T__V($as_T($n(this.Lio_kaitai_struct_ClassCompiler__f_topClassName).head__O()));
|
|
33675
|
-
this.
|
|
33708
|
+
this.compileExternalTypes__Lio_kaitai_struct_format_ClassSpec__V(this.topClass__Lio_kaitai_struct_format_ClassSpec());
|
|
33676
33709
|
this.compileClass__Lio_kaitai_struct_format_ClassSpec__V(this.topClass__Lio_kaitai_struct_format_ClassSpec());
|
|
33677
33710
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).fileFooter__T__V($as_T($n(this.Lio_kaitai_struct_ClassCompiler__f_topClassName).head__O()));
|
|
33678
33711
|
return new $c_Lio_kaitai_struct_CompileLog$SpecSuccess($n(this.Lio_kaitai_struct_ClassCompiler__f_lang).type2class__T__T($as_T($n(this.Lio_kaitai_struct_ClassCompiler__f_topClassName).head__O())), $n($as_sc_IterableOnceOps($n($n(this.Lio_kaitai_struct_ClassCompiler__f_lang).results__Lio_kaitai_struct_format_ClassSpec__sci_Map(this.topClass__Lio_kaitai_struct_format_ClassSpec())).map__F1__O(new $c_sjsr_AnonFunction1(((x0$1$2) => {
|
|
@@ -33686,24 +33719,14 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.compile__Lio_kaitai_struct_CompileL
|
|
|
33686
33719
|
}
|
|
33687
33720
|
}))))).toList__sci_List())
|
|
33688
33721
|
});
|
|
33689
|
-
$c_Lio_kaitai_struct_ClassCompiler.prototype.
|
|
33690
|
-
$n($m_Lio_kaitai_struct_TypeProcessor$().
|
|
33691
|
-
var
|
|
33692
|
-
|
|
33693
|
-
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).opaqueClassDeclaration__Lio_kaitai_struct_format_ClassSpec__V(classSpec)
|
|
33694
|
-
}
|
|
33722
|
+
$c_Lio_kaitai_struct_ClassCompiler.prototype.compileExternalTypes__Lio_kaitai_struct_format_ClassSpec__V = (function(topClass) {
|
|
33723
|
+
$n($m_Lio_kaitai_struct_TypeProcessor$().getExternalTypes__Lio_kaitai_struct_format_ClassSpec__sc_Iterable(topClass)).foreach__F1__V(new $c_sjsr_AnonFunction1(((extType$2) => {
|
|
33724
|
+
var extType = $as_Lio_kaitai_struct_ExternalType(extType$2);
|
|
33725
|
+
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V(extType)
|
|
33695
33726
|
})))
|
|
33696
33727
|
});
|
|
33697
33728
|
$c_Lio_kaitai_struct_ClassCompiler.prototype.compileClass__Lio_kaitai_struct_format_ClassSpec__V = (function(curClass) {
|
|
33698
33729
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass = curClass;
|
|
33699
|
-
var this$1 = $n($n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_meta).Lio_kaitai_struct_format_MetaSpec__f_imports);
|
|
33700
|
-
var these = this$1;
|
|
33701
|
-
while ((!$n(these).isEmpty__Z())) {
|
|
33702
|
-
var arg1 = $n(these).head__O();
|
|
33703
|
-
var file = $as_T(arg1);
|
|
33704
|
-
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).importFile__T__V(file);
|
|
33705
|
-
these = $as_sci_List($n(these).tail__O())
|
|
33706
|
-
};
|
|
33707
33730
|
if ((!$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).innerDocstrings__Z())) {
|
|
33708
33731
|
this.compileClassDoc__Lio_kaitai_struct_format_ClassSpec__V(curClass)
|
|
33709
33732
|
};
|
|
@@ -33711,7 +33734,7 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.compileClass__Lio_kaitai_struct_for
|
|
|
33711
33734
|
if ($n(this.Lio_kaitai_struct_ClassCompiler__f_lang).innerDocstrings__Z()) {
|
|
33712
33735
|
this.compileClassDoc__Lio_kaitai_struct_format_ClassSpec__V(curClass)
|
|
33713
33736
|
};
|
|
33714
|
-
var this$
|
|
33737
|
+
var this$6 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_types);
|
|
33715
33738
|
var f = new $c_sjsr_AnonFunction1(((x0$1$2) => {
|
|
33716
33739
|
var x0$1 = $as_T2(x0$1$2);
|
|
33717
33740
|
if ((x0$1 !== null)) {
|
|
@@ -33725,22 +33748,7 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.compileClass__Lio_kaitai_struct_for
|
|
|
33725
33748
|
throw new $c_s_MatchError(x0$1)
|
|
33726
33749
|
}
|
|
33727
33750
|
}));
|
|
33728
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$
|
|
33729
|
-
var this$8 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_params);
|
|
33730
|
-
var these$1 = this$8;
|
|
33731
|
-
while ((!$n(these$1).isEmpty__Z())) {
|
|
33732
|
-
var arg1$1 = $n(these$1).head__O();
|
|
33733
|
-
var paramDefSpec = $as_Lio_kaitai_struct_format_ParamDefSpec(arg1$1);
|
|
33734
|
-
var x1 = $n(paramDefSpec).Lio_kaitai_struct_format_ParamDefSpec__f_dataType;
|
|
33735
|
-
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
33736
|
-
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(x1);
|
|
33737
|
-
if ($n(x2).isExternal__Lio_kaitai_struct_format_ClassSpec__Z(curClass)) {
|
|
33738
|
-
var externalTypeName = $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;
|
|
33739
|
-
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).classForwardDeclaration__sci_List__V(externalTypeName)
|
|
33740
|
-
}
|
|
33741
|
-
};
|
|
33742
|
-
these$1 = $as_sci_List($n(these$1).tail__O())
|
|
33743
|
-
};
|
|
33751
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$6.sci_TreeMap__f_tree, f);
|
|
33744
33752
|
if ($n(this.Lio_kaitai_struct_ClassCompiler__f_lang).innerEnums__Z()) {
|
|
33745
33753
|
this.compileEnums__Lio_kaitai_struct_format_ClassSpec__V(curClass)
|
|
33746
33754
|
};
|
|
@@ -33755,26 +33763,26 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.compileClass__Lio_kaitai_struct_for
|
|
|
33755
33763
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass = curClass
|
|
33756
33764
|
};
|
|
33757
33765
|
this.compileInstances__Lio_kaitai_struct_format_ClassSpec__V(curClass);
|
|
33758
|
-
var this$
|
|
33766
|
+
var this$7 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_seq);
|
|
33759
33767
|
var suffix = $n(curClass).Lio_kaitai_struct_format_ClassSpec__f_params;
|
|
33760
|
-
var this$
|
|
33768
|
+
var this$20 = $n(this$7.appendedAll__sc_IterableOnce__sci_List(suffix));
|
|
33761
33769
|
$n($m_s_package$().s_package$__f_List);
|
|
33762
33770
|
var $$x4 = new $c_Lio_kaitai_struct_format_AttrSpec($m_sci_Nil$(), $m_Lio_kaitai_struct_format_RootIdentifier$(), new $c_Lio_kaitai_struct_datatype_DataType$CalcUserType(this.Lio_kaitai_struct_ClassCompiler__f_topClassName, $m_s_None$(), $as_sci_Seq($n($m_s_package$().s_package$__f_Seq).apply__sci_Seq__sc_SeqOps($m_sci_Nil$())), false), ($m_Lio_kaitai_struct_format_AttrSpec$(), new $c_Lio_kaitai_struct_format_ConditionalSpec($m_s_None$(), $m_Lio_kaitai_struct_format_NoRepeat$())), ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_s_None$()), ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_Lio_kaitai_struct_format_DocSpec$().Lio_kaitai_struct_format_DocSpec$__f_EMPTY));
|
|
33763
33771
|
var $$x3 = $m_sci_Nil$();
|
|
33764
33772
|
var $$x2 = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
33765
|
-
var this$
|
|
33766
|
-
var array$1 = [$$x4, new $c_Lio_kaitai_struct_format_AttrSpec($$x3, $$x2, $n(this$
|
|
33773
|
+
var this$12 = $n(curClass);
|
|
33774
|
+
var array$1 = [$$x4, new $c_Lio_kaitai_struct_format_AttrSpec($$x3, $$x2, $n(this$12.Lio_kaitai_struct_format_ClassSpec__f_parentClass).toDataType__Lio_kaitai_struct_datatype_DataType(), ($m_Lio_kaitai_struct_format_AttrSpec$(), new $c_Lio_kaitai_struct_format_ConditionalSpec($m_s_None$(), $m_Lio_kaitai_struct_format_NoRepeat$())), ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_s_None$()), ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_Lio_kaitai_struct_format_DocSpec$().Lio_kaitai_struct_format_DocSpec$__f_EMPTY))];
|
|
33767
33775
|
var elems$1 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1);
|
|
33768
33776
|
var suffix$1 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$1);
|
|
33769
|
-
var this$
|
|
33777
|
+
var this$21 = $n(this$20.appendedAll__sc_IterableOnce__sci_List(suffix$1));
|
|
33770
33778
|
var suffix$2 = $m_Lio_kaitai_struct_languages_components_ExtraAttrs$().forClassSpec__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_languages_components_ExtraAttrs__sci_List(curClass, this.Lio_kaitai_struct_ClassCompiler__f_lang);
|
|
33771
|
-
var allAttrs = this$
|
|
33779
|
+
var allAttrs = this$21.appendedAll__sc_IterableOnce__sci_List(suffix$2);
|
|
33772
33780
|
this.compileAttrDeclarations__sci_List__V(allAttrs);
|
|
33773
33781
|
this.compileAttrReaders__sci_List__V(allAttrs);
|
|
33774
|
-
var this$
|
|
33775
|
-
if ((!this$
|
|
33776
|
-
var arg1
|
|
33777
|
-
var expr = $as_Lio_kaitai_struct_exprlang_Ast$expr(arg1
|
|
33782
|
+
var this$22 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_toStringExpr);
|
|
33783
|
+
if ((!this$22.isEmpty__Z())) {
|
|
33784
|
+
var arg1 = this$22.get__O();
|
|
33785
|
+
var expr = $as_Lio_kaitai_struct_exprlang_Ast$expr(arg1);
|
|
33778
33786
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).classToString__Lio_kaitai_struct_exprlang_Ast$expr__V(expr)
|
|
33779
33787
|
};
|
|
33780
33788
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).classFooter__sci_List__V($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_name);
|
|
@@ -43551,8 +43559,7 @@ $c_Lio_kaitai_struct_NimClassCompiler.prototype.compile__Lio_kaitai_struct_Compi
|
|
|
43551
43559
|
var $$x1 = $n(this.Lio_kaitai_struct_ClassCompiler__f_lang);
|
|
43552
43560
|
var theClass = this.Lio_kaitai_struct_ClassCompiler__f_topClass;
|
|
43553
43561
|
$n($$x1).fileHeader__T__V($n(this.Lio_kaitai_struct_NimClassCompiler__f_nimlang).namespaced__sci_List__T($n(theClass).Lio_kaitai_struct_format_ClassSpec__f_name));
|
|
43554
|
-
this.
|
|
43555
|
-
this.compileImports__Lio_kaitai_struct_format_ClassSpec__V(this.Lio_kaitai_struct_ClassCompiler__f_topClass);
|
|
43562
|
+
this.compileExternalTypes__Lio_kaitai_struct_format_ClassSpec__V(this.Lio_kaitai_struct_ClassCompiler__f_topClass);
|
|
43556
43563
|
$n(this.Lio_kaitai_struct_NimClassCompiler__f_nimlang).typeSectionHeader__V();
|
|
43557
43564
|
this.compileTypes__Lio_kaitai_struct_format_ClassSpec__V(this.Lio_kaitai_struct_ClassCompiler__f_topClass);
|
|
43558
43565
|
$n(this.Lio_kaitai_struct_NimClassCompiler__f_nimlang).typeSectionFooter__V();
|
|
@@ -43688,31 +43695,6 @@ $c_Lio_kaitai_struct_NimClassCompiler.prototype.compileInstance__sci_List__Lio_k
|
|
|
43688
43695
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V(instName, dataType);
|
|
43689
43696
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceFooter__V()
|
|
43690
43697
|
});
|
|
43691
|
-
$c_Lio_kaitai_struct_NimClassCompiler.prototype.compileImports__Lio_kaitai_struct_format_ClassSpec__V = (function(curClass) {
|
|
43692
|
-
$n(this.Lio_kaitai_struct_ClassCompiler__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass = curClass;
|
|
43693
|
-
var this$1 = $n($n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_meta).Lio_kaitai_struct_format_MetaSpec__f_imports);
|
|
43694
|
-
var these = this$1;
|
|
43695
|
-
while ((!$n(these).isEmpty__Z())) {
|
|
43696
|
-
var arg1 = $n(these).head__O();
|
|
43697
|
-
var file = $as_T(arg1);
|
|
43698
|
-
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).importFile__T__V(file);
|
|
43699
|
-
these = $as_sci_List($n(these).tail__O())
|
|
43700
|
-
};
|
|
43701
|
-
this.compileImportsRec__Lio_kaitai_struct_format_ClassSpec__V(curClass)
|
|
43702
|
-
});
|
|
43703
|
-
$c_Lio_kaitai_struct_NimClassCompiler.prototype.compileImportsRec__Lio_kaitai_struct_format_ClassSpec__V = (function(curClass) {
|
|
43704
|
-
var this$2 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_types);
|
|
43705
|
-
var f = new $c_sjsr_AnonFunction1(((x0$1$2) => {
|
|
43706
|
-
var x0$1 = $as_T2(x0$1$2);
|
|
43707
|
-
if ((x0$1 !== null)) {
|
|
43708
|
-
var subClass = $as_Lio_kaitai_struct_format_ClassSpec($n(x0$1).T2__f__2);
|
|
43709
|
-
this.compileImports__Lio_kaitai_struct_format_ClassSpec__V(subClass)
|
|
43710
|
-
} else {
|
|
43711
|
-
throw new $c_s_MatchError(x0$1)
|
|
43712
|
-
}
|
|
43713
|
-
}));
|
|
43714
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$2.sci_TreeMap__f_tree, f)
|
|
43715
|
-
});
|
|
43716
43698
|
$c_Lio_kaitai_struct_NimClassCompiler.prototype.compileTypes__Lio_kaitai_struct_format_ClassSpec__V = (function(curClass) {
|
|
43717
43699
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass = curClass;
|
|
43718
43700
|
$n(this.Lio_kaitai_struct_NimClassCompiler__f_nimlang).classHeader__sci_List__V($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_name);
|
|
@@ -44186,6 +44168,12 @@ $h_Lio_kaitai_struct_languages_CppCompiler$.prototype = $c_Lio_kaitai_struct_lan
|
|
|
44186
44168
|
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.getCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_languages_components_LanguageCompiler = (function(tp, config) {
|
|
44187
44169
|
return new $c_Lio_kaitai_struct_languages_CppCompiler(tp, config)
|
|
44188
44170
|
});
|
|
44171
|
+
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.outFileNameSource__T__T = (function(className) {
|
|
44172
|
+
return (className + ".cpp")
|
|
44173
|
+
});
|
|
44174
|
+
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.outFileNameHeader__T__T = (function(className) {
|
|
44175
|
+
return (className + ".h")
|
|
44176
|
+
});
|
|
44189
44177
|
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
44190
44178
|
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
44191
44179
|
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
@@ -44218,17 +44206,17 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.idToStr__Lio_kaitai_struct
|
|
|
44218
44206
|
throw new $c_s_MatchError(id)
|
|
44219
44207
|
}
|
|
44220
44208
|
});
|
|
44221
|
-
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.
|
|
44209
|
+
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_languages_components_CppImportList__Lio_kaitai_struct_datatype_DataType__Z__T = (function(config, importListHdr, attrType, absolute) {
|
|
44222
44210
|
while (true) {
|
|
44223
|
-
var
|
|
44211
|
+
var rc70 = false;
|
|
44224
44212
|
var x2 = null;
|
|
44225
|
-
var
|
|
44213
|
+
var rc71 = false;
|
|
44226
44214
|
var x5 = null;
|
|
44227
|
-
var
|
|
44215
|
+
var rc72 = false;
|
|
44228
44216
|
var x44 = null;
|
|
44229
44217
|
var x1 = attrType;
|
|
44230
44218
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$Int1Type)) {
|
|
44231
|
-
|
|
44219
|
+
rc70 = true;
|
|
44232
44220
|
x2 = $as_Lio_kaitai_struct_datatype_DataType$Int1Type(x1);
|
|
44233
44221
|
var p3 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
44234
44222
|
if ((p3 === false)) {
|
|
@@ -44236,7 +44224,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44236
44224
|
}
|
|
44237
44225
|
};
|
|
44238
44226
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntMultiType)) {
|
|
44239
|
-
|
|
44227
|
+
rc71 = true;
|
|
44240
44228
|
x5 = $as_Lio_kaitai_struct_datatype_DataType$IntMultiType(x1);
|
|
44241
44229
|
var p6 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44242
44230
|
var p7 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
@@ -44250,7 +44238,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44250
44238
|
return "uint16_t"
|
|
44251
44239
|
}
|
|
44252
44240
|
};
|
|
44253
|
-
if (
|
|
44241
|
+
if (rc71) {
|
|
44254
44242
|
var p12 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44255
44243
|
var p13 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
44256
44244
|
if ((p12 === false)) {
|
|
@@ -44263,7 +44251,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44263
44251
|
return "uint32_t"
|
|
44264
44252
|
}
|
|
44265
44253
|
};
|
|
44266
|
-
if (
|
|
44254
|
+
if (rc71) {
|
|
44267
44255
|
var p18 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44268
44256
|
var p19 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
44269
44257
|
if ((p18 === false)) {
|
|
@@ -44276,13 +44264,13 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44276
44264
|
return "uint64_t"
|
|
44277
44265
|
}
|
|
44278
44266
|
};
|
|
44279
|
-
if (
|
|
44267
|
+
if (rc70) {
|
|
44280
44268
|
var p24 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
44281
44269
|
if ((p24 === true)) {
|
|
44282
44270
|
return "int8_t"
|
|
44283
44271
|
}
|
|
44284
44272
|
};
|
|
44285
|
-
if (
|
|
44273
|
+
if (rc71) {
|
|
44286
44274
|
var p27 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44287
44275
|
var p28 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
44288
44276
|
if ((p27 === true)) {
|
|
@@ -44295,7 +44283,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44295
44283
|
return "int16_t"
|
|
44296
44284
|
}
|
|
44297
44285
|
};
|
|
44298
|
-
if (
|
|
44286
|
+
if (rc71) {
|
|
44299
44287
|
var p33 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44300
44288
|
var p34 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
44301
44289
|
if ((p33 === true)) {
|
|
@@ -44308,7 +44296,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44308
44296
|
return "int32_t"
|
|
44309
44297
|
}
|
|
44310
44298
|
};
|
|
44311
|
-
if (
|
|
44299
|
+
if (rc71) {
|
|
44312
44300
|
var p39 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44313
44301
|
var p40 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
44314
44302
|
if ((p39 === true)) {
|
|
@@ -44322,7 +44310,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44322
44310
|
}
|
|
44323
44311
|
};
|
|
44324
44312
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$FloatMultiType)) {
|
|
44325
|
-
|
|
44313
|
+
rc72 = true;
|
|
44326
44314
|
x44 = $as_Lio_kaitai_struct_datatype_DataType$FloatMultiType(x1);
|
|
44327
44315
|
var p45 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
44328
44316
|
var x$13 = $m_Lio_kaitai_struct_datatype_DataType$Width4$();
|
|
@@ -44330,7 +44318,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44330
44318
|
return "float"
|
|
44331
44319
|
}
|
|
44332
44320
|
};
|
|
44333
|
-
if (
|
|
44321
|
+
if (rc72) {
|
|
44334
44322
|
var p49 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
44335
44323
|
var x$15 = $m_Lio_kaitai_struct_datatype_DataType$Width8$();
|
|
44336
44324
|
if ((x$15 === p49)) {
|
|
@@ -44365,16 +44353,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44365
44353
|
if ((x$21 === x1$2)) {
|
|
44366
44354
|
return (typeStr + "*")
|
|
44367
44355
|
} else {
|
|
44368
|
-
var x$23 = $m_Lio_kaitai_struct_CppRuntimeConfig$
|
|
44356
|
+
var x$23 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
44369
44357
|
if ((x$23 === x1$2)) {
|
|
44370
|
-
return (("std::
|
|
44358
|
+
return ($n(x60).isOwning__Z() ? (("std::unique_ptr<" + typeStr) + ">") : (typeStr + "*"))
|
|
44371
44359
|
} else {
|
|
44372
|
-
|
|
44373
|
-
if ((x$25 === x1$2)) {
|
|
44374
|
-
return ($n(x60).isOwning__Z() ? (("std::unique_ptr<" + typeStr) + ">") : (typeStr + "*"))
|
|
44375
|
-
} else {
|
|
44376
|
-
throw new $c_s_MatchError(x1$2)
|
|
44377
|
-
}
|
|
44360
|
+
throw new $c_s_MatchError(x1$2)
|
|
44378
44361
|
}
|
|
44379
44362
|
}
|
|
44380
44363
|
};
|
|
@@ -44382,90 +44365,63 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44382
44365
|
var x61 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(x1);
|
|
44383
44366
|
return this.types2class__sci_List__T((absolute ? $n($as_Lio_kaitai_struct_format_EnumSpec($n($n(x61).Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec).get__O())).Lio_kaitai_struct_format_EnumSpec__f_name : $n(x61).Lio_kaitai_struct_datatype_DataType$EnumType__f_name))
|
|
44384
44367
|
};
|
|
44385
|
-
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$
|
|
44386
|
-
var x62 = $as_Lio_kaitai_struct_datatype_DataType$
|
|
44387
|
-
|
|
44388
|
-
var
|
|
44389
|
-
var
|
|
44390
|
-
|
|
44391
|
-
|
|
44392
|
-
|
|
44393
|
-
} else {
|
|
44394
|
-
var
|
|
44395
|
-
|
|
44396
|
-
|
|
44397
|
-
|
|
44398
|
-
|
|
44399
|
-
|
|
44368
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
44369
|
+
var x62 = $as_Lio_kaitai_struct_datatype_DataType$ArrayType(x1);
|
|
44370
|
+
$n(importListHdr).addSystem__T__V("vector");
|
|
44371
|
+
var vecType = (("std::vector<" + this.kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_languages_components_CppImportList__Lio_kaitai_struct_datatype_DataType__Z__T(config, importListHdr, $n(x62).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType, absolute)) + ">");
|
|
44372
|
+
var _2 = $n(config).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
44373
|
+
if ((x62 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream)) {
|
|
44374
|
+
var x$25 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
44375
|
+
var $$x7 = (x$25 === _2)
|
|
44376
|
+
} else {
|
|
44377
|
+
var $$x7 = false
|
|
44378
|
+
};
|
|
44379
|
+
if ($$x7) {
|
|
44380
|
+
return (("std::unique_ptr<" + vecType) + ">")
|
|
44381
|
+
} else {
|
|
44382
|
+
return (vecType + "*")
|
|
44400
44383
|
}
|
|
44401
44384
|
};
|
|
44402
|
-
|
|
44403
|
-
|
|
44404
|
-
var this$2 = $n(x63);
|
|
44405
|
-
var inType$2 = this$2.Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
44406
|
-
return (("std::vector<" + this.kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_datatype_DataType__Z__T(config, inType$2, absolute)) + ">*")
|
|
44407
|
-
};
|
|
44408
|
-
var x$31 = $m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$();
|
|
44409
|
-
if ((x$31 === x1)) {
|
|
44385
|
+
var x$27 = $m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$();
|
|
44386
|
+
if ((x$27 === x1)) {
|
|
44410
44387
|
var x1$4 = $n(config).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
44411
|
-
var x$
|
|
44412
|
-
if ((x$
|
|
44388
|
+
var x$29 = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
44389
|
+
if ((x$29 === x1$4)) {
|
|
44413
44390
|
return "kaitai::kstream*"
|
|
44414
44391
|
} else {
|
|
44415
|
-
var x$
|
|
44416
|
-
if ((x$
|
|
44392
|
+
var x$31 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
44393
|
+
if ((x$31 === x1$4)) {
|
|
44417
44394
|
return "std::unique_ptr<kaitai::kstream>"
|
|
44418
44395
|
} else {
|
|
44419
44396
|
throw new $c_s_MatchError(x1$4)
|
|
44420
44397
|
}
|
|
44421
44398
|
}
|
|
44422
44399
|
};
|
|
44423
|
-
var x$
|
|
44424
|
-
if ((x$
|
|
44400
|
+
var x$33 = $m_Lio_kaitai_struct_datatype_DataType$KaitaiStreamType$();
|
|
44401
|
+
if ((x$33 === x1)) {
|
|
44425
44402
|
return "kaitai::kstream*"
|
|
44426
44403
|
};
|
|
44427
|
-
var x$
|
|
44428
|
-
if ((x$
|
|
44404
|
+
var x$35 = $m_Lio_kaitai_struct_datatype_DataType$KaitaiStructType$();
|
|
44405
|
+
if ((x$35 === x1)) {
|
|
44429
44406
|
var x1$5 = $n(config).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
44430
|
-
var x$
|
|
44431
|
-
if ((x$
|
|
44407
|
+
var x$37 = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
44408
|
+
if ((x$37 === x1$5)) {
|
|
44432
44409
|
return "kaitai::kstruct*"
|
|
44433
44410
|
} else {
|
|
44434
|
-
var x$
|
|
44435
|
-
if ((x$
|
|
44436
|
-
return "std::
|
|
44411
|
+
var x$39 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
44412
|
+
if ((x$39 === x1$5)) {
|
|
44413
|
+
return "std::unique_ptr<kaitai::kstruct>"
|
|
44437
44414
|
} else {
|
|
44438
|
-
|
|
44439
|
-
if ((x$45 === x1$5)) {
|
|
44440
|
-
return "std::unique_ptr<kaitai::kstruct>"
|
|
44441
|
-
} else {
|
|
44442
|
-
throw new $c_s_MatchError(x1$5)
|
|
44443
|
-
}
|
|
44415
|
+
throw new $c_s_MatchError(x1$5)
|
|
44444
44416
|
}
|
|
44445
44417
|
}
|
|
44446
44418
|
};
|
|
44447
44419
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcKaitaiStructType)) {
|
|
44448
|
-
|
|
44449
|
-
var x$47 = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
44450
|
-
if ((x$47 === x1$6)) {
|
|
44451
|
-
return "kaitai::kstruct*"
|
|
44452
|
-
} else {
|
|
44453
|
-
var x$49 = $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$();
|
|
44454
|
-
if ((x$49 === x1$6)) {
|
|
44455
|
-
return "std::shared_ptr<kaitai::kstruct>"
|
|
44456
|
-
} else {
|
|
44457
|
-
var x$51 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
44458
|
-
if ((x$51 === x1$6)) {
|
|
44459
|
-
return "kaitai::kstruct*"
|
|
44460
|
-
} else {
|
|
44461
|
-
throw new $c_s_MatchError(x1$6)
|
|
44462
|
-
}
|
|
44463
|
-
}
|
|
44464
|
-
}
|
|
44420
|
+
return "kaitai::kstruct*"
|
|
44465
44421
|
};
|
|
44466
44422
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
44467
|
-
var
|
|
44468
|
-
attrType = this.combineSwitchType__Lio_kaitai_struct_datatype_DataType$SwitchType__Lio_kaitai_struct_datatype_DataType(
|
|
44423
|
+
var x68 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
44424
|
+
attrType = this.combineSwitchType__Lio_kaitai_struct_datatype_DataType$SwitchType__Lio_kaitai_struct_datatype_DataType(x68);
|
|
44469
44425
|
continue
|
|
44470
44426
|
};
|
|
44471
44427
|
throw new $c_s_MatchError(x1)
|
|
@@ -49662,7 +49618,7 @@ $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.isExternal__Lio_kaitai
|
|
|
49662
49618
|
});
|
|
49663
49619
|
$c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.isOpaque__Z = (function() {
|
|
49664
49620
|
var cs = $as_Lio_kaitai_struct_format_ClassSpec($n(this.Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O());
|
|
49665
|
-
return
|
|
49621
|
+
return $n($n(cs).Lio_kaitai_struct_format_ClassSpec__f_meta).Lio_kaitai_struct_format_MetaSpec__f_isOpaque
|
|
49666
49622
|
});
|
|
49667
49623
|
function $as_Lio_kaitai_struct_datatype_DataType$UserType(obj) {
|
|
49668
49624
|
return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$UserType"))
|
|
@@ -50523,20 +50479,20 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.idToStr__Lio_kaitai_struc
|
|
|
50523
50479
|
throw new $c_s_MatchError(id)
|
|
50524
50480
|
}
|
|
50525
50481
|
});
|
|
50526
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.
|
|
50527
|
-
return (isNullable ? this.
|
|
50482
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__Lio_kaitai_struct_ImportList__T = (function(attrType, isNullable, importList) {
|
|
50483
|
+
return (isNullable ? this.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, importList) : this.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, importList))
|
|
50528
50484
|
});
|
|
50529
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.
|
|
50485
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T = (function(attrType, importList) {
|
|
50530
50486
|
while (true) {
|
|
50531
|
-
var
|
|
50487
|
+
var rc72 = false;
|
|
50532
50488
|
var x2 = null;
|
|
50533
|
-
var
|
|
50489
|
+
var rc73 = false;
|
|
50534
50490
|
var x5 = null;
|
|
50535
|
-
var
|
|
50491
|
+
var rc74 = false;
|
|
50536
50492
|
var x44 = null;
|
|
50537
50493
|
var x1 = attrType;
|
|
50538
50494
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$Int1Type)) {
|
|
50539
|
-
|
|
50495
|
+
rc72 = true;
|
|
50540
50496
|
x2 = $as_Lio_kaitai_struct_datatype_DataType$Int1Type(x1);
|
|
50541
50497
|
var p3 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
50542
50498
|
if ((p3 === false)) {
|
|
@@ -50544,7 +50500,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50544
50500
|
}
|
|
50545
50501
|
};
|
|
50546
50502
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntMultiType)) {
|
|
50547
|
-
|
|
50503
|
+
rc73 = true;
|
|
50548
50504
|
x5 = $as_Lio_kaitai_struct_datatype_DataType$IntMultiType(x1);
|
|
50549
50505
|
var p6 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50550
50506
|
var p7 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
@@ -50558,7 +50514,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50558
50514
|
return "int"
|
|
50559
50515
|
}
|
|
50560
50516
|
};
|
|
50561
|
-
if (
|
|
50517
|
+
if (rc73) {
|
|
50562
50518
|
var p12 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50563
50519
|
var p13 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50564
50520
|
if ((p12 === false)) {
|
|
@@ -50571,7 +50527,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50571
50527
|
return "long"
|
|
50572
50528
|
}
|
|
50573
50529
|
};
|
|
50574
|
-
if (
|
|
50530
|
+
if (rc73) {
|
|
50575
50531
|
var p18 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50576
50532
|
var p19 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50577
50533
|
if ((p18 === false)) {
|
|
@@ -50584,13 +50540,13 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50584
50540
|
return "long"
|
|
50585
50541
|
}
|
|
50586
50542
|
};
|
|
50587
|
-
if (
|
|
50543
|
+
if (rc72) {
|
|
50588
50544
|
var p24 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
50589
50545
|
if ((p24 === true)) {
|
|
50590
50546
|
return "byte"
|
|
50591
50547
|
}
|
|
50592
50548
|
};
|
|
50593
|
-
if (
|
|
50549
|
+
if (rc73) {
|
|
50594
50550
|
var p27 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50595
50551
|
var p28 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50596
50552
|
if ((p27 === true)) {
|
|
@@ -50603,7 +50559,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50603
50559
|
return "short"
|
|
50604
50560
|
}
|
|
50605
50561
|
};
|
|
50606
|
-
if (
|
|
50562
|
+
if (rc73) {
|
|
50607
50563
|
var p33 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50608
50564
|
var p34 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50609
50565
|
if ((p33 === true)) {
|
|
@@ -50616,7 +50572,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50616
50572
|
return "int"
|
|
50617
50573
|
}
|
|
50618
50574
|
};
|
|
50619
|
-
if (
|
|
50575
|
+
if (rc73) {
|
|
50620
50576
|
var p39 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50621
50577
|
var p40 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50622
50578
|
if ((p39 === true)) {
|
|
@@ -50630,7 +50586,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50630
50586
|
}
|
|
50631
50587
|
};
|
|
50632
50588
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$FloatMultiType)) {
|
|
50633
|
-
|
|
50589
|
+
rc74 = true;
|
|
50634
50590
|
x44 = $as_Lio_kaitai_struct_datatype_DataType$FloatMultiType(x1);
|
|
50635
50591
|
var p45 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
50636
50592
|
var x$13 = $m_Lio_kaitai_struct_datatype_DataType$Width4$();
|
|
@@ -50638,7 +50594,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50638
50594
|
return "float"
|
|
50639
50595
|
}
|
|
50640
50596
|
};
|
|
50641
|
-
if (
|
|
50597
|
+
if (rc74) {
|
|
50642
50598
|
var p49 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
50643
50599
|
var x$15 = $m_Lio_kaitai_struct_datatype_DataType$Width8$();
|
|
50644
50600
|
if ((x$15 === p49)) {
|
|
@@ -50692,28 +50648,28 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50692
50648
|
var name = $n(x67).Lio_kaitai_struct_datatype_DataType$EnumType__f_name;
|
|
50693
50649
|
return this.types2class__sci_List__T(name)
|
|
50694
50650
|
};
|
|
50695
|
-
if ((
|
|
50696
|
-
return this.
|
|
50651
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
50652
|
+
return this.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, importList)
|
|
50697
50653
|
};
|
|
50698
50654
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
50699
|
-
var
|
|
50700
|
-
attrType = $n(
|
|
50655
|
+
var x70 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
50656
|
+
attrType = $n(x70).combinedType__Lio_kaitai_struct_datatype_DataType();
|
|
50701
50657
|
continue
|
|
50702
50658
|
};
|
|
50703
50659
|
throw new $c_s_MatchError(x1)
|
|
50704
50660
|
}
|
|
50705
50661
|
});
|
|
50706
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.
|
|
50662
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T = (function(attrType, importList) {
|
|
50707
50663
|
while (true) {
|
|
50708
|
-
var
|
|
50664
|
+
var rc72 = false;
|
|
50709
50665
|
var x2 = null;
|
|
50710
|
-
var
|
|
50666
|
+
var rc73 = false;
|
|
50711
50667
|
var x5 = null;
|
|
50712
|
-
var
|
|
50668
|
+
var rc74 = false;
|
|
50713
50669
|
var x44 = null;
|
|
50714
50670
|
var x1 = attrType;
|
|
50715
50671
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$Int1Type)) {
|
|
50716
|
-
|
|
50672
|
+
rc72 = true;
|
|
50717
50673
|
x2 = $as_Lio_kaitai_struct_datatype_DataType$Int1Type(x1);
|
|
50718
50674
|
var p3 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
50719
50675
|
if ((p3 === false)) {
|
|
@@ -50721,7 +50677,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50721
50677
|
}
|
|
50722
50678
|
};
|
|
50723
50679
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntMultiType)) {
|
|
50724
|
-
|
|
50680
|
+
rc73 = true;
|
|
50725
50681
|
x5 = $as_Lio_kaitai_struct_datatype_DataType$IntMultiType(x1);
|
|
50726
50682
|
var p6 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50727
50683
|
var p7 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
@@ -50735,7 +50691,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50735
50691
|
return "Integer"
|
|
50736
50692
|
}
|
|
50737
50693
|
};
|
|
50738
|
-
if (
|
|
50694
|
+
if (rc73) {
|
|
50739
50695
|
var p12 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50740
50696
|
var p13 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50741
50697
|
if ((p12 === false)) {
|
|
@@ -50748,7 +50704,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50748
50704
|
return "Long"
|
|
50749
50705
|
}
|
|
50750
50706
|
};
|
|
50751
|
-
if (
|
|
50707
|
+
if (rc73) {
|
|
50752
50708
|
var p18 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50753
50709
|
var p19 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50754
50710
|
if ((p18 === false)) {
|
|
@@ -50761,13 +50717,13 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50761
50717
|
return "Long"
|
|
50762
50718
|
}
|
|
50763
50719
|
};
|
|
50764
|
-
if (
|
|
50720
|
+
if (rc72) {
|
|
50765
50721
|
var p24 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
50766
50722
|
if ((p24 === true)) {
|
|
50767
50723
|
return "Byte"
|
|
50768
50724
|
}
|
|
50769
50725
|
};
|
|
50770
|
-
if (
|
|
50726
|
+
if (rc73) {
|
|
50771
50727
|
var p27 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50772
50728
|
var p28 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50773
50729
|
if ((p27 === true)) {
|
|
@@ -50780,7 +50736,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50780
50736
|
return "Short"
|
|
50781
50737
|
}
|
|
50782
50738
|
};
|
|
50783
|
-
if (
|
|
50739
|
+
if (rc73) {
|
|
50784
50740
|
var p33 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50785
50741
|
var p34 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50786
50742
|
if ((p33 === true)) {
|
|
@@ -50793,7 +50749,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50793
50749
|
return "Integer"
|
|
50794
50750
|
}
|
|
50795
50751
|
};
|
|
50796
|
-
if (
|
|
50752
|
+
if (rc73) {
|
|
50797
50753
|
var p39 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50798
50754
|
var p40 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50799
50755
|
if ((p39 === true)) {
|
|
@@ -50807,7 +50763,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50807
50763
|
}
|
|
50808
50764
|
};
|
|
50809
50765
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$FloatMultiType)) {
|
|
50810
|
-
|
|
50766
|
+
rc74 = true;
|
|
50811
50767
|
x44 = $as_Lio_kaitai_struct_datatype_DataType$FloatMultiType(x1);
|
|
50812
50768
|
var p45 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
50813
50769
|
var x$13 = $m_Lio_kaitai_struct_datatype_DataType$Width4$();
|
|
@@ -50815,7 +50771,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50815
50771
|
return "Float"
|
|
50816
50772
|
}
|
|
50817
50773
|
};
|
|
50818
|
-
if (
|
|
50774
|
+
if (rc74) {
|
|
50819
50775
|
var p49 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
50820
50776
|
var x$15 = $m_Lio_kaitai_struct_datatype_DataType$Width8$();
|
|
50821
50777
|
if ((x$15 === p49)) {
|
|
@@ -50869,21 +50825,15 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50869
50825
|
var name = $n(x67).Lio_kaitai_struct_datatype_DataType$EnumType__f_name;
|
|
50870
50826
|
return this.types2class__sci_List__T(name)
|
|
50871
50827
|
};
|
|
50872
|
-
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$
|
|
50873
|
-
var x69 = $as_Lio_kaitai_struct_datatype_DataType$
|
|
50874
|
-
var this$1 = $n(
|
|
50875
|
-
|
|
50876
|
-
return (("ArrayList<" + this.
|
|
50877
|
-
};
|
|
50878
|
-
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcArrayType)) {
|
|
50879
|
-
var x70 = $as_Lio_kaitai_struct_datatype_DataType$CalcArrayType(x1);
|
|
50880
|
-
var this$2 = $n(x70);
|
|
50881
|
-
var inType$2 = this$2.Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
50882
|
-
return (("ArrayList<" + this.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(inType$2)) + ">")
|
|
50828
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
50829
|
+
var x69 = $as_Lio_kaitai_struct_datatype_DataType$ArrayType(x1);
|
|
50830
|
+
var this$1 = $n(importList);
|
|
50831
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "java.util.ArrayList");
|
|
50832
|
+
return (("ArrayList<" + this.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T($n(x69).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType, importList)) + ">")
|
|
50883
50833
|
};
|
|
50884
50834
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
50885
|
-
var
|
|
50886
|
-
attrType = $n(
|
|
50835
|
+
var x70 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
50836
|
+
attrType = $n(x70).combinedType__Lio_kaitai_struct_datatype_DataType();
|
|
50887
50837
|
continue
|
|
50888
50838
|
};
|
|
50889
50839
|
throw new $c_s_MatchError(x1)
|
|
@@ -50985,6 +50935,9 @@ $c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.ksErrorName__Lio_kaitai_s
|
|
|
50985
50935
|
}
|
|
50986
50936
|
}
|
|
50987
50937
|
});
|
|
50938
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.enumValue__T__T__T = (function(enumName, label) {
|
|
50939
|
+
return (((":" + enumName) + "_") + label)
|
|
50940
|
+
});
|
|
50988
50941
|
$c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.inverseEnumName__T__T = (function(enumName) {
|
|
50989
50942
|
return ("I__" + enumName)
|
|
50990
50943
|
});
|
|
@@ -51050,7 +51003,7 @@ function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrPa
|
|
|
51050
51003
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V($thiz, id, expr, rep, isRaw)
|
|
51051
51004
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
51052
51005
|
var x6 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(dataType);
|
|
51053
|
-
var expr$2 = $n($thiz.translator__Lio_kaitai_struct_translators_BaseTranslator()).
|
|
51006
|
+
var expr$2 = $n($thiz.translator__Lio_kaitai_struct_translators_BaseTranslator()).doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T($as_Lio_kaitai_struct_format_EnumSpec($n($n(x6).Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec).get__O()), $thiz.parseExpr__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__T__s_Option__T($n(x6).Lio_kaitai_struct_datatype_DataType$EnumType__f_basedOn, $n(x6).Lio_kaitai_struct_datatype_DataType$EnumType__f_basedOn, io, defEndian));
|
|
51054
51007
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V($thiz, id, expr$2, rep, isRaw)
|
|
51055
51008
|
} else {
|
|
51056
51009
|
var expr$3 = $thiz.parseExpr__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__T__s_Option__T(dataType, assignType, io, defEndian);
|
|
@@ -56313,53 +56266,6 @@ function $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$() {
|
|
|
56313
56266
|
return $n_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$
|
|
56314
56267
|
}
|
|
56315
56268
|
/** @constructor */
|
|
56316
|
-
function $c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$() {
|
|
56317
|
-
/*<skip>*/
|
|
56318
|
-
}
|
|
56319
|
-
$c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype = new $h_O();
|
|
56320
|
-
$c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype.constructor = $c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$;
|
|
56321
|
-
/** @constructor */
|
|
56322
|
-
function $h_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$() {
|
|
56323
|
-
/*<skip>*/
|
|
56324
|
-
}
|
|
56325
|
-
$h_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype = $c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype;
|
|
56326
|
-
$c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype.productPrefix__T = (function() {
|
|
56327
|
-
return "SharedPointers"
|
|
56328
|
-
});
|
|
56329
|
-
$c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype.productArity__I = (function() {
|
|
56330
|
-
return 0
|
|
56331
|
-
});
|
|
56332
|
-
$c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype.productElement__I__O = (function(x$1) {
|
|
56333
|
-
return $m_sr_Statics$().ioobe__I__O(x$1)
|
|
56334
|
-
});
|
|
56335
|
-
$c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype.productIterator__sc_Iterator = (function() {
|
|
56336
|
-
return new $c_sr_ScalaRunTime$$anon$1(this)
|
|
56337
|
-
});
|
|
56338
|
-
$c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype.hashCode__I = (function() {
|
|
56339
|
-
return (-1012780677)
|
|
56340
|
-
});
|
|
56341
|
-
$c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype.toString__T = (function() {
|
|
56342
|
-
return "SharedPointers"
|
|
56343
|
-
});
|
|
56344
|
-
var $d_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$ = new $TypeData().initClass({
|
|
56345
|
-
Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$: 0
|
|
56346
|
-
}, false, "io.kaitai.struct.CppRuntimeConfig$SharedPointers$", {
|
|
56347
|
-
Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$: 1,
|
|
56348
|
-
O: 1,
|
|
56349
|
-
Lio_kaitai_struct_CppRuntimeConfig$Pointers: 1,
|
|
56350
|
-
s_Product: 1,
|
|
56351
|
-
s_Equals: 1,
|
|
56352
|
-
Ljava_io_Serializable: 1
|
|
56353
|
-
});
|
|
56354
|
-
$c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$.prototype.$classData = $d_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$;
|
|
56355
|
-
var $n_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$;
|
|
56356
|
-
function $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$() {
|
|
56357
|
-
if ((!$n_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$)) {
|
|
56358
|
-
$n_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$ = new $c_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$()
|
|
56359
|
-
};
|
|
56360
|
-
return $n_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$
|
|
56361
|
-
}
|
|
56362
|
-
/** @constructor */
|
|
56363
56269
|
function $c_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$() {
|
|
56364
56270
|
/*<skip>*/
|
|
56365
56271
|
}
|
|
@@ -56407,6 +56313,154 @@ function $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$() {
|
|
|
56407
56313
|
return $n_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$
|
|
56408
56314
|
}
|
|
56409
56315
|
/** @constructor */
|
|
56316
|
+
function $c_Lio_kaitai_struct_ExternalEnum(enumSpec) {
|
|
56317
|
+
this.Lio_kaitai_struct_ExternalEnum__f_enumSpec = null;
|
|
56318
|
+
this.Lio_kaitai_struct_ExternalEnum__f_enumSpec = enumSpec
|
|
56319
|
+
}
|
|
56320
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype = new $h_Lio_kaitai_struct_ExternalType();
|
|
56321
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.constructor = $c_Lio_kaitai_struct_ExternalEnum;
|
|
56322
|
+
/** @constructor */
|
|
56323
|
+
function $h_Lio_kaitai_struct_ExternalEnum() {
|
|
56324
|
+
/*<skip>*/
|
|
56325
|
+
}
|
|
56326
|
+
$h_Lio_kaitai_struct_ExternalEnum.prototype = $c_Lio_kaitai_struct_ExternalEnum.prototype;
|
|
56327
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.name__sci_List = (function() {
|
|
56328
|
+
return $n(this.Lio_kaitai_struct_ExternalEnum__f_enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name
|
|
56329
|
+
});
|
|
56330
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.isOpaque__Z = (function() {
|
|
56331
|
+
return false
|
|
56332
|
+
});
|
|
56333
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.productPrefix__T = (function() {
|
|
56334
|
+
return "ExternalEnum"
|
|
56335
|
+
});
|
|
56336
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.productArity__I = (function() {
|
|
56337
|
+
return 1
|
|
56338
|
+
});
|
|
56339
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.productElement__I__O = (function(x$1) {
|
|
56340
|
+
return ((x$1 === 0) ? this.Lio_kaitai_struct_ExternalEnum__f_enumSpec : $m_sr_Statics$().ioobe__I__O(x$1))
|
|
56341
|
+
});
|
|
56342
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.productIterator__sc_Iterator = (function() {
|
|
56343
|
+
return new $c_sr_ScalaRunTime$$anon$1(this)
|
|
56344
|
+
});
|
|
56345
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.hashCode__I = (function() {
|
|
56346
|
+
var this$2 = $m_s_util_hashing_MurmurHash3$();
|
|
56347
|
+
return this$2.productHash__s_Product__I__Z__I(this, (-889275714), false)
|
|
56348
|
+
});
|
|
56349
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.toString__T = (function() {
|
|
56350
|
+
return $m_sr_ScalaRunTime$()._toString__s_Product__T(this)
|
|
56351
|
+
});
|
|
56352
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.equals__O__Z = (function(x$1) {
|
|
56353
|
+
if ((this === x$1)) {
|
|
56354
|
+
return true
|
|
56355
|
+
} else if ((x$1 instanceof $c_Lio_kaitai_struct_ExternalEnum)) {
|
|
56356
|
+
var ExternalEnum$1 = $as_Lio_kaitai_struct_ExternalEnum(x$1);
|
|
56357
|
+
var x = this.Lio_kaitai_struct_ExternalEnum__f_enumSpec;
|
|
56358
|
+
var x$2 = $n(ExternalEnum$1).Lio_kaitai_struct_ExternalEnum__f_enumSpec;
|
|
56359
|
+
if (((x === null) ? (x$2 === null) : $n(x).equals__O__Z(x$2))) {
|
|
56360
|
+
$n(ExternalEnum$1);
|
|
56361
|
+
return true
|
|
56362
|
+
} else {
|
|
56363
|
+
return false
|
|
56364
|
+
}
|
|
56365
|
+
} else {
|
|
56366
|
+
return false
|
|
56367
|
+
}
|
|
56368
|
+
});
|
|
56369
|
+
function $as_Lio_kaitai_struct_ExternalEnum(obj) {
|
|
56370
|
+
return (((obj instanceof $c_Lio_kaitai_struct_ExternalEnum) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.ExternalEnum"))
|
|
56371
|
+
}
|
|
56372
|
+
function $isArrayOf_Lio_kaitai_struct_ExternalEnum(obj, depth) {
|
|
56373
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_ExternalEnum)))
|
|
56374
|
+
}
|
|
56375
|
+
function $asArrayOf_Lio_kaitai_struct_ExternalEnum(obj, depth) {
|
|
56376
|
+
return (($isArrayOf_Lio_kaitai_struct_ExternalEnum(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.ExternalEnum;", depth))
|
|
56377
|
+
}
|
|
56378
|
+
var $d_Lio_kaitai_struct_ExternalEnum = new $TypeData().initClass({
|
|
56379
|
+
Lio_kaitai_struct_ExternalEnum: 0
|
|
56380
|
+
}, false, "io.kaitai.struct.ExternalEnum", {
|
|
56381
|
+
Lio_kaitai_struct_ExternalEnum: 1,
|
|
56382
|
+
Lio_kaitai_struct_ExternalType: 1,
|
|
56383
|
+
O: 1,
|
|
56384
|
+
s_Product: 1,
|
|
56385
|
+
s_Equals: 1,
|
|
56386
|
+
Ljava_io_Serializable: 1
|
|
56387
|
+
});
|
|
56388
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.$classData = $d_Lio_kaitai_struct_ExternalEnum;
|
|
56389
|
+
/** @constructor */
|
|
56390
|
+
function $c_Lio_kaitai_struct_ExternalUserType(classSpec) {
|
|
56391
|
+
this.Lio_kaitai_struct_ExternalUserType__f_classSpec = null;
|
|
56392
|
+
this.Lio_kaitai_struct_ExternalUserType__f_classSpec = classSpec
|
|
56393
|
+
}
|
|
56394
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype = new $h_Lio_kaitai_struct_ExternalType();
|
|
56395
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.constructor = $c_Lio_kaitai_struct_ExternalUserType;
|
|
56396
|
+
/** @constructor */
|
|
56397
|
+
function $h_Lio_kaitai_struct_ExternalUserType() {
|
|
56398
|
+
/*<skip>*/
|
|
56399
|
+
}
|
|
56400
|
+
$h_Lio_kaitai_struct_ExternalUserType.prototype = $c_Lio_kaitai_struct_ExternalUserType.prototype;
|
|
56401
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.name__sci_List = (function() {
|
|
56402
|
+
return $n(this.Lio_kaitai_struct_ExternalUserType__f_classSpec).Lio_kaitai_struct_format_ClassSpec__f_name
|
|
56403
|
+
});
|
|
56404
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.isOpaque__Z = (function() {
|
|
56405
|
+
return $n($n(this.Lio_kaitai_struct_ExternalUserType__f_classSpec).Lio_kaitai_struct_format_ClassSpec__f_meta).Lio_kaitai_struct_format_MetaSpec__f_isOpaque
|
|
56406
|
+
});
|
|
56407
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.productPrefix__T = (function() {
|
|
56408
|
+
return "ExternalUserType"
|
|
56409
|
+
});
|
|
56410
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.productArity__I = (function() {
|
|
56411
|
+
return 1
|
|
56412
|
+
});
|
|
56413
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.productElement__I__O = (function(x$1) {
|
|
56414
|
+
return ((x$1 === 0) ? this.Lio_kaitai_struct_ExternalUserType__f_classSpec : $m_sr_Statics$().ioobe__I__O(x$1))
|
|
56415
|
+
});
|
|
56416
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.productIterator__sc_Iterator = (function() {
|
|
56417
|
+
return new $c_sr_ScalaRunTime$$anon$1(this)
|
|
56418
|
+
});
|
|
56419
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.hashCode__I = (function() {
|
|
56420
|
+
var this$2 = $m_s_util_hashing_MurmurHash3$();
|
|
56421
|
+
return this$2.productHash__s_Product__I__Z__I(this, (-889275714), false)
|
|
56422
|
+
});
|
|
56423
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.toString__T = (function() {
|
|
56424
|
+
return $m_sr_ScalaRunTime$()._toString__s_Product__T(this)
|
|
56425
|
+
});
|
|
56426
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.equals__O__Z = (function(x$1) {
|
|
56427
|
+
if ((this === x$1)) {
|
|
56428
|
+
return true
|
|
56429
|
+
} else if ((x$1 instanceof $c_Lio_kaitai_struct_ExternalUserType)) {
|
|
56430
|
+
var ExternalUserType$1 = $as_Lio_kaitai_struct_ExternalUserType(x$1);
|
|
56431
|
+
var x = this.Lio_kaitai_struct_ExternalUserType__f_classSpec;
|
|
56432
|
+
var x$2 = $n(ExternalUserType$1).Lio_kaitai_struct_ExternalUserType__f_classSpec;
|
|
56433
|
+
if (((x === null) ? (x$2 === null) : $n(x).equals__O__Z(x$2))) {
|
|
56434
|
+
$n(ExternalUserType$1);
|
|
56435
|
+
return true
|
|
56436
|
+
} else {
|
|
56437
|
+
return false
|
|
56438
|
+
}
|
|
56439
|
+
} else {
|
|
56440
|
+
return false
|
|
56441
|
+
}
|
|
56442
|
+
});
|
|
56443
|
+
function $as_Lio_kaitai_struct_ExternalUserType(obj) {
|
|
56444
|
+
return (((obj instanceof $c_Lio_kaitai_struct_ExternalUserType) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.ExternalUserType"))
|
|
56445
|
+
}
|
|
56446
|
+
function $isArrayOf_Lio_kaitai_struct_ExternalUserType(obj, depth) {
|
|
56447
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_ExternalUserType)))
|
|
56448
|
+
}
|
|
56449
|
+
function $asArrayOf_Lio_kaitai_struct_ExternalUserType(obj, depth) {
|
|
56450
|
+
return (($isArrayOf_Lio_kaitai_struct_ExternalUserType(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.ExternalUserType;", depth))
|
|
56451
|
+
}
|
|
56452
|
+
var $d_Lio_kaitai_struct_ExternalUserType = new $TypeData().initClass({
|
|
56453
|
+
Lio_kaitai_struct_ExternalUserType: 0
|
|
56454
|
+
}, false, "io.kaitai.struct.ExternalUserType", {
|
|
56455
|
+
Lio_kaitai_struct_ExternalUserType: 1,
|
|
56456
|
+
Lio_kaitai_struct_ExternalType: 1,
|
|
56457
|
+
O: 1,
|
|
56458
|
+
s_Product: 1,
|
|
56459
|
+
s_Equals: 1,
|
|
56460
|
+
Ljava_io_Serializable: 1
|
|
56461
|
+
});
|
|
56462
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.$classData = $d_Lio_kaitai_struct_ExternalUserType;
|
|
56463
|
+
/** @constructor */
|
|
56410
56464
|
function $c_Lio_kaitai_struct_NullLogger$() {
|
|
56411
56465
|
/*<skip>*/
|
|
56412
56466
|
}
|
|
@@ -56716,6 +56770,9 @@ $c_Lio_kaitai_struct_datatype_DataType$EnumType.prototype.asNonOwning__Z__Lio_ka
|
|
|
56716
56770
|
$c_Lio_kaitai_struct_datatype_DataType$EnumType.prototype.asNonOwning$default$1__Z = (function() {
|
|
56717
56771
|
return false
|
|
56718
56772
|
});
|
|
56773
|
+
$c_Lio_kaitai_struct_datatype_DataType$EnumType.prototype.isExternal__Lio_kaitai_struct_format_ClassSpec__Z = (function(curClass) {
|
|
56774
|
+
return $n($as_Lio_kaitai_struct_format_EnumSpec($n(this.Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec).get__O())).isExternal__Lio_kaitai_struct_format_ClassSpec__Z(curClass)
|
|
56775
|
+
});
|
|
56719
56776
|
$c_Lio_kaitai_struct_datatype_DataType$EnumType.prototype.productPrefix__T = (function() {
|
|
56720
56777
|
return "EnumType"
|
|
56721
56778
|
});
|
|
@@ -60255,6 +60312,11 @@ $h_Lio_kaitai_struct_format_EnumSpec.prototype = $c_Lio_kaitai_struct_format_Enu
|
|
|
60255
60312
|
$c_Lio_kaitai_struct_format_EnumSpec.prototype.path__sci_List = (function() {
|
|
60256
60313
|
return this.Lio_kaitai_struct_format_EnumSpec__f_path
|
|
60257
60314
|
});
|
|
60315
|
+
$c_Lio_kaitai_struct_format_EnumSpec.prototype.isExternal__Lio_kaitai_struct_format_ClassSpec__Z = (function(curClass) {
|
|
60316
|
+
var x = $n(this.Lio_kaitai_struct_format_EnumSpec__f_name).head__O();
|
|
60317
|
+
var y = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_name).head__O();
|
|
60318
|
+
return (!$m_sr_BoxesRunTime$().equals__O__O__Z(x, y))
|
|
60319
|
+
});
|
|
60258
60320
|
$c_Lio_kaitai_struct_format_EnumSpec.prototype.productPrefix__T = (function() {
|
|
60259
60321
|
return "EnumSpec"
|
|
60260
60322
|
});
|
|
@@ -63152,11 +63214,17 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.ksErrorName__Lio_ka
|
|
|
63152
63214
|
return ("KaitaiStream." + $n(err).name__T())
|
|
63153
63215
|
}
|
|
63154
63216
|
});
|
|
63155
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.
|
|
63217
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.types2class__sci_List__Z__T = (function(types, isExternal) {
|
|
63218
|
+
if (isExternal) {
|
|
63219
|
+
var name = $as_T($n(types).head__O());
|
|
63220
|
+
var prefix = ($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name) + "_.")
|
|
63221
|
+
} else {
|
|
63222
|
+
var prefix = ""
|
|
63223
|
+
};
|
|
63156
63224
|
var this$3 = $n(types);
|
|
63157
63225
|
var f = ((name$2) => {
|
|
63158
|
-
var name = $as_T(name$2);
|
|
63159
|
-
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
63226
|
+
var name$1 = $as_T(name$2);
|
|
63227
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$1)
|
|
63160
63228
|
});
|
|
63161
63229
|
if ((this$3 === $m_sci_Nil$())) {
|
|
63162
63230
|
var $$x1 = $m_sci_Nil$()
|
|
@@ -63175,7 +63243,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.types2class__sci_Li
|
|
|
63175
63243
|
var $$x1 = h
|
|
63176
63244
|
};
|
|
63177
63245
|
var this$4 = $n($$x1);
|
|
63178
|
-
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ".", "")
|
|
63246
|
+
return (prefix + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ".", ""))
|
|
63179
63247
|
});
|
|
63180
63248
|
var $d_Lio_kaitai_struct_languages_JavaScriptCompiler$ = new $TypeData().initClass({
|
|
63181
63249
|
Lio_kaitai_struct_languages_JavaScriptCompiler$: 0
|
|
@@ -63831,6 +63899,14 @@ $c_Lio_kaitai_struct_languages_PerlCompiler$.prototype.types2class__sci_List__T
|
|
|
63831
63899
|
var this$4 = $n($$x1);
|
|
63832
63900
|
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", "::", "")
|
|
63833
63901
|
});
|
|
63902
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler$.prototype.enumValue__T__T__T = (function(enumName, label) {
|
|
63903
|
+
$m_Lio_kaitai_struct_Utils$();
|
|
63904
|
+
var this$3 = $n(enumName);
|
|
63905
|
+
var $$x1 = $as_T(this$3.toUpperCase());
|
|
63906
|
+
$m_Lio_kaitai_struct_Utils$();
|
|
63907
|
+
var this$6 = $n(label);
|
|
63908
|
+
return ((("$" + $$x1) + "_") + $as_T(this$6.toUpperCase()))
|
|
63909
|
+
});
|
|
63834
63910
|
var $d_Lio_kaitai_struct_languages_PerlCompiler$ = new $TypeData().initClass({
|
|
63835
63911
|
Lio_kaitai_struct_languages_PerlCompiler$: 0
|
|
63836
63912
|
}, false, "io.kaitai.struct.languages.PerlCompiler$", {
|
|
@@ -63910,7 +63986,8 @@ $c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.ksErrorName__Lio_kaitai
|
|
|
63910
63986
|
}
|
|
63911
63987
|
}
|
|
63912
63988
|
});
|
|
63913
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.
|
|
63989
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.types2class__sci_List__Z__T = (function(name, isExternal) {
|
|
63990
|
+
var prefix = (isExternal ? ($n(name).head__O() + ".") : "");
|
|
63914
63991
|
var this$3 = $n(name);
|
|
63915
63992
|
var f = ((x$2) => {
|
|
63916
63993
|
var x = $as_T(x$2);
|
|
@@ -63933,7 +64010,20 @@ $c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.types2class__sci_List__
|
|
|
63933
64010
|
var $$x1 = h
|
|
63934
64011
|
};
|
|
63935
64012
|
var this$4 = $n($$x1);
|
|
63936
|
-
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ".", "")
|
|
64013
|
+
return (prefix + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ".", ""))
|
|
64014
|
+
});
|
|
64015
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_RuntimeConfig__V = (function(extType, importList, config) {
|
|
64016
|
+
var moduleName = $as_T($n($n(extType).name__sci_List()).head__O());
|
|
64017
|
+
var this$4 = $n(importList);
|
|
64018
|
+
$m_sc_StringOps$();
|
|
64019
|
+
var x = $n(config).Lio_kaitai_struct_RuntimeConfig__f_pythonPackage;
|
|
64020
|
+
var this$3 = $n(x);
|
|
64021
|
+
if ((!(this$3 === ""))) {
|
|
64022
|
+
var s = ((("from " + $n(config).Lio_kaitai_struct_RuntimeConfig__f_pythonPackage) + " import ") + moduleName)
|
|
64023
|
+
} else {
|
|
64024
|
+
var s = ("import " + moduleName)
|
|
64025
|
+
};
|
|
64026
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$4.Lio_kaitai_struct_ImportList__f_list, s)
|
|
63937
64027
|
});
|
|
63938
64028
|
var $d_Lio_kaitai_struct_languages_PythonCompiler$ = new $TypeData().initClass({
|
|
63939
64029
|
Lio_kaitai_struct_languages_PythonCompiler$: 0
|
|
@@ -64358,10 +64448,7 @@ $c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.innerDocstr
|
|
|
64358
64448
|
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.fileFooter__T__V = (function(topClassName) {
|
|
64359
64449
|
/*<skip>*/
|
|
64360
64450
|
});
|
|
64361
|
-
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.
|
|
64362
|
-
/*<skip>*/
|
|
64363
|
-
});
|
|
64364
|
-
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.opaqueClassDeclaration__Lio_kaitai_struct_format_ClassSpec__V = (function(classSpec) {
|
|
64451
|
+
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
64365
64452
|
/*<skip>*/
|
|
64366
64453
|
});
|
|
64367
64454
|
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.classDoc__sci_List__Lio_kaitai_struct_format_DocSpec__V = (function(name, doc) {
|
|
@@ -76264,6 +76351,17 @@ function $f_sc_StrictOptimizedSeqOps__distinctBy__F1__O($thiz, f) {
|
|
|
76264
76351
|
};
|
|
76265
76352
|
return $n(builder).result__O()
|
|
76266
76353
|
}
|
|
76354
|
+
function $f_sc_StrictOptimizedSeqOps__appended__O__O($thiz, elem) {
|
|
76355
|
+
var b = $n($thiz.iterableFactory__sc_SeqFactory()).newBuilder__scm_Builder();
|
|
76356
|
+
if (($thiz.knownSize__I() >= 0)) {
|
|
76357
|
+
$n(b).sizeHint__I__V(((1 + $thiz.length__I()) | 0))
|
|
76358
|
+
};
|
|
76359
|
+
var this$1 = $n(b);
|
|
76360
|
+
this$1.addAll__sc_IterableOnce__scm_Growable($thiz);
|
|
76361
|
+
var this$2 = $n(b);
|
|
76362
|
+
this$2.addOne__O__scm_Growable(elem);
|
|
76363
|
+
return $n(b).result__O()
|
|
76364
|
+
}
|
|
76267
76365
|
function $f_sc_StrictOptimizedSeqOps__appendedAll__sc_IterableOnce__O($thiz, suffix) {
|
|
76268
76366
|
var b = $n($thiz.iterableFactory__sc_SeqFactory()).newBuilder__scm_Builder();
|
|
76269
76367
|
var this$1 = $n(b);
|
|
@@ -82652,7 +82750,7 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
82652
82750
|
var id = $n(x7).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_id;
|
|
82653
82751
|
var inType = $n(x7).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_inType;
|
|
82654
82752
|
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);
|
|
82655
|
-
return this.
|
|
82753
|
+
return this.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T(enumSpec, this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(id, 0))
|
|
82656
82754
|
};
|
|
82657
82755
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel)) {
|
|
82658
82756
|
var x8 = $as_Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel(v);
|
|
@@ -82660,7 +82758,7 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
82660
82758
|
var label = $n(x8).Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel__f_label;
|
|
82661
82759
|
var inType$2 = $n(x8).Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel__f_inType;
|
|
82662
82760
|
var enumSpec$2 = $n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).resolveEnum__Lio_kaitai_struct_exprlang_Ast$typeId__T__Lio_kaitai_struct_format_EnumSpec(inType$2, $n(enumType$2).Lio_kaitai_struct_exprlang_Ast$identifier__f_name);
|
|
82663
|
-
return this.
|
|
82761
|
+
return this.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T(enumSpec$2, $n(label).Lio_kaitai_struct_exprlang_Ast$identifier__f_name)
|
|
82664
82762
|
};
|
|
82665
82763
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Name)) {
|
|
82666
82764
|
var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Name(v);
|
|
@@ -85416,11 +85514,11 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doName__T__T = (func
|
|
|
85416
85514
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
85417
85515
|
return ("" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
85418
85516
|
});
|
|
85419
|
-
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.
|
|
85420
|
-
return ((this.enumClass__sci_List__T(
|
|
85517
|
+
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
85518
|
+
return ((this.enumClass__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + ".") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(label))
|
|
85421
85519
|
});
|
|
85422
|
-
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.
|
|
85423
|
-
return (((("((" + this.enumClass__sci_List__T(
|
|
85520
|
+
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
85521
|
+
return (((("((" + this.enumClass__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name)) + ") ") + id) + ")")
|
|
85424
85522
|
});
|
|
85425
85523
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.enumClass__sci_List__T = (function(enumTypeAbs) {
|
|
85426
85524
|
var enumTypeRel = $m_Lio_kaitai_struct_Utils$().relClass__sci_List__sci_List__sci_List(enumTypeAbs, $n($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_name);
|
|
@@ -85583,13 +85681,15 @@ var $d_Lio_kaitai_struct_translators_CSharpTranslator = new $TypeData().initClas
|
|
|
85583
85681
|
});
|
|
85584
85682
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_CSharpTranslator;
|
|
85585
85683
|
/** @constructor */
|
|
85586
|
-
function $c_Lio_kaitai_struct_translators_JavaScriptTranslator(provider) {
|
|
85684
|
+
function $c_Lio_kaitai_struct_translators_JavaScriptTranslator(provider, importList) {
|
|
85587
85685
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
85588
85686
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
85589
85687
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
85590
85688
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
85591
85689
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
85592
85690
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
85691
|
+
this.Lio_kaitai_struct_translators_JavaScriptTranslator__f_importList = null;
|
|
85692
|
+
this.Lio_kaitai_struct_translators_JavaScriptTranslator__f_importList = importList;
|
|
85593
85693
|
$ct_Lio_kaitai_struct_translators_BaseTranslator__Lio_kaitai_struct_translators_TypeProvider__(this, provider)
|
|
85594
85694
|
}
|
|
85595
85695
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
|
|
@@ -85677,14 +85777,22 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doName__T__T = (
|
|
|
85677
85777
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
85678
85778
|
return ("this." + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
85679
85779
|
});
|
|
85680
|
-
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.
|
|
85681
|
-
var
|
|
85780
|
+
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
85781
|
+
var isExternal = $n(enumSpec).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass);
|
|
85782
|
+
if (isExternal) {
|
|
85783
|
+
var name = $as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).head__O());
|
|
85784
|
+
var className = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
85785
|
+
var this$2 = $n(this.Lio_kaitai_struct_translators_JavaScriptTranslator__f_importList);
|
|
85786
|
+
var s = ("./" + className);
|
|
85787
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, s)
|
|
85788
|
+
};
|
|
85789
|
+
var $$x1 = $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().types2class__sci_List__Z__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name, isExternal);
|
|
85682
85790
|
$m_Lio_kaitai_struct_Utils$();
|
|
85683
|
-
var this$
|
|
85684
|
-
return (($$x1 + ".") + $as_T(this$
|
|
85791
|
+
var this$5 = $n(label);
|
|
85792
|
+
return (($$x1 + ".") + $as_T(this$5.toUpperCase()))
|
|
85685
85793
|
});
|
|
85686
|
-
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.
|
|
85687
|
-
return
|
|
85794
|
+
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
85795
|
+
return id
|
|
85688
85796
|
});
|
|
85689
85797
|
$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) {
|
|
85690
85798
|
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)")
|
|
@@ -85854,7 +85962,7 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doIntLiteral__s_math_B
|
|
|
85854
85962
|
return (literal + suffix)
|
|
85855
85963
|
});
|
|
85856
85964
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T = (function(t, value) {
|
|
85857
|
-
var javaType = $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
85965
|
+
var javaType = $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(t, this.Lio_kaitai_struct_translators_JavaTranslator__f_importList);
|
|
85858
85966
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
85859
85967
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
85860
85968
|
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
@@ -85903,14 +86011,14 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doInternalName__Lio_ka
|
|
|
85903
86011
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
85904
86012
|
return (this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id) + "()")
|
|
85905
86013
|
});
|
|
85906
|
-
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.
|
|
85907
|
-
var $$x1 = this.enumClass__sci_List__T(
|
|
86014
|
+
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
86015
|
+
var $$x1 = this.enumClass__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name);
|
|
85908
86016
|
$m_Lio_kaitai_struct_Utils$();
|
|
85909
86017
|
var this$3 = $n(label);
|
|
85910
86018
|
return (($$x1 + ".") + $as_T(this$3.toUpperCase()))
|
|
85911
86019
|
});
|
|
85912
|
-
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.
|
|
85913
|
-
return (((this.enumClass__sci_List__T(
|
|
86020
|
+
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
86021
|
+
return (((this.enumClass__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + ".byId(") + id) + ")")
|
|
85914
86022
|
});
|
|
85915
86023
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.enumClass__sci_List__T = (function(enumTypeAbs) {
|
|
85916
86024
|
var enumTypeRel = $m_Lio_kaitai_struct_Utils$().relClass__sci_List__sci_List__sci_List(enumTypeAbs, $n($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_name);
|
|
@@ -85976,7 +86084,8 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doIfExp__Lio_kaitai_st
|
|
|
85976
86084
|
});
|
|
85977
86085
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
85978
86086
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
85979
|
-
|
|
86087
|
+
var importList = this.Lio_kaitai_struct_translators_JavaTranslator__f_importList;
|
|
86088
|
+
return (((("((" + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(typeName, importList)) + ") (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + "))")
|
|
85980
86089
|
});
|
|
85981
86090
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
85982
86091
|
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)) + ")")
|
|
@@ -86163,11 +86272,11 @@ $h_Lio_kaitai_struct_translators_NimTranslator.prototype = $c_Lio_kaitai_struct_
|
|
|
86163
86272
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
86164
86273
|
return (((("encode(" + bytesExpr) + ", \"") + encoding) + "\")")
|
|
86165
86274
|
});
|
|
86166
|
-
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.
|
|
86167
|
-
return ((($m_Lio_kaitai_struct_languages_NimCompiler$().namespaced__sci_List__T(
|
|
86275
|
+
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
86276
|
+
return ((($m_Lio_kaitai_struct_languages_NimCompiler$().namespaced__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + "(") + id) + ")")
|
|
86168
86277
|
});
|
|
86169
|
-
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.
|
|
86170
|
-
return (($n(
|
|
86278
|
+
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
86279
|
+
return (($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).head__O() + ".") + label)
|
|
86171
86280
|
});
|
|
86172
86281
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doName__T__T = (function(s) {
|
|
86173
86282
|
return (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ROOT === s) ? "root" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_PARENT === s) ? "parent" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_IO === s) ? "io" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR === s) ? "it" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_ITERATOR2 === s) ? "buf" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_INDEX === s) ? "i" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_SWITCH_ON === s) ? "on" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_IS_LE === s) ? "isLe" : (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_SIZEOF === s) ? "size" : ("" + $m_Lio_kaitai_struct_languages_NimCompiler$().camelCase__T__Z__T(s, false)))))))))))
|
|
@@ -86549,23 +86658,30 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doInternalName__Lio_ka
|
|
|
86549
86658
|
var this$1 = $m_Lio_kaitai_struct_languages_PerlCompiler$();
|
|
86550
86659
|
return (("$self->" + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "()")
|
|
86551
86660
|
});
|
|
86552
|
-
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.
|
|
86553
|
-
var
|
|
86554
|
-
|
|
86555
|
-
|
|
86661
|
+
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
86662
|
+
var isExternal = $n(enumSpec).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass);
|
|
86663
|
+
if (isExternal) {
|
|
86664
|
+
var this$2 = $n(this.Lio_kaitai_struct_translators_PerlTranslator__f_importList);
|
|
86665
|
+
var name = $as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).head__O());
|
|
86666
|
+
var s = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
86667
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, s)
|
|
86668
|
+
};
|
|
86669
|
+
var enumClass = $m_Lio_kaitai_struct_languages_PerlCompiler$().types2class__sci_List__T($as_sci_List($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).init__O()));
|
|
86670
|
+
var this$3 = $n(enumClass);
|
|
86671
|
+
if ((this$3 === "")) {
|
|
86556
86672
|
var enumClassWithScope = ""
|
|
86557
86673
|
} else {
|
|
86558
86674
|
var enumClassWithScope = (enumClass + "::")
|
|
86559
86675
|
};
|
|
86560
86676
|
$m_Lio_kaitai_struct_Utils$();
|
|
86561
|
-
var s = $as_T($n(
|
|
86562
|
-
var this$
|
|
86563
|
-
var enumName = $as_T(this$
|
|
86677
|
+
var s$1 = $as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).last__O());
|
|
86678
|
+
var this$6 = $n(s$1);
|
|
86679
|
+
var enumName = $as_T(this$6.toUpperCase());
|
|
86564
86680
|
$m_Lio_kaitai_struct_Utils$();
|
|
86565
|
-
var this$
|
|
86566
|
-
return (((("$" + enumClassWithScope) + enumName) + "_") + $as_T(this$
|
|
86681
|
+
var this$9 = $n(label);
|
|
86682
|
+
return (((("$" + enumClassWithScope) + enumName) + "_") + $as_T(this$9.toUpperCase()))
|
|
86567
86683
|
});
|
|
86568
|
-
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.
|
|
86684
|
+
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
86569
86685
|
return id
|
|
86570
86686
|
});
|
|
86571
86687
|
$c_Lio_kaitai_struct_translators_PerlTranslator.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) {
|
|
@@ -86801,8 +86917,9 @@ var $d_Lio_kaitai_struct_translators_PerlTranslator = new $TypeData().initClass(
|
|
|
86801
86917
|
Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
|
|
86802
86918
|
});
|
|
86803
86919
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_PerlTranslator;
|
|
86804
|
-
function $
|
|
86920
|
+
function $ct_Lio_kaitai_struct_translators_PythonTranslator__Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_RuntimeConfig__($thiz, provider, importList, config) {
|
|
86805
86921
|
$thiz.Lio_kaitai_struct_translators_PythonTranslator__f_importList = importList;
|
|
86922
|
+
$thiz.Lio_kaitai_struct_translators_PythonTranslator__f_config = config;
|
|
86806
86923
|
$ct_Lio_kaitai_struct_translators_BaseTranslator__Lio_kaitai_struct_translators_TypeProvider__($thiz, provider);
|
|
86807
86924
|
var this$22 = $n($m_s_Predef$().s_Predef$__f_Map);
|
|
86808
86925
|
var array = [new $c_T2($bC(9), "\\t"), new $c_T2($bC(10), "\\n"), new $c_T2($bC(13), "\\r"), new $c_T2($bC(34), "\\\""), new $c_T2($bC(92), "\\\\"), new $c_T2($bC(7), "\\a"), new $c_T2($bC(12), "\\f"), new $c_T2($bC(11), "\\v"), new $c_T2($bC(8), "\\b")];
|
|
@@ -86819,6 +86936,7 @@ function $c_Lio_kaitai_struct_translators_PythonTranslator() {
|
|
|
86819
86936
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
86820
86937
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
86821
86938
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_importList = null;
|
|
86939
|
+
this.Lio_kaitai_struct_translators_PythonTranslator__f_config = null;
|
|
86822
86940
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_asciiCharQuoteMap = null
|
|
86823
86941
|
}
|
|
86824
86942
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
|
|
@@ -86878,11 +86996,15 @@ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doName__T__T = (func
|
|
|
86878
86996
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
86879
86997
|
return ("self." + $m_Lio_kaitai_struct_languages_PythonCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
86880
86998
|
});
|
|
86881
|
-
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.
|
|
86882
|
-
|
|
86999
|
+
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
87000
|
+
var isExternal = $n(enumSpec).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass);
|
|
87001
|
+
if (isExternal) {
|
|
87002
|
+
$m_Lio_kaitai_struct_languages_PythonCompiler$().externalTypeDeclaration__Lio_kaitai_struct_ExternalType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_RuntimeConfig__V(new $c_Lio_kaitai_struct_ExternalEnum(enumSpec), this.Lio_kaitai_struct_translators_PythonTranslator__f_importList, this.Lio_kaitai_struct_translators_PythonTranslator__f_config)
|
|
87003
|
+
};
|
|
87004
|
+
return (($m_Lio_kaitai_struct_languages_PythonCompiler$().types2class__sci_List__Z__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name, isExternal) + ".") + label)
|
|
86883
87005
|
});
|
|
86884
|
-
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.
|
|
86885
|
-
return (((("KaitaiStream.resolve_enum(" + $m_Lio_kaitai_struct_languages_PythonCompiler$().
|
|
87006
|
+
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
87007
|
+
return (((("KaitaiStream.resolve_enum(" + $m_Lio_kaitai_struct_languages_PythonCompiler$().types2class__sci_List__Z__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name, $n(enumSpec).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass))) + ", ") + id) + ")")
|
|
86886
87008
|
});
|
|
86887
87009
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.booleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__T = (function(op) {
|
|
86888
87010
|
var x = $m_Lio_kaitai_struct_exprlang_Ast$boolop$Or$();
|
|
@@ -87113,11 +87235,11 @@ $c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doInternalName__Lio_ka
|
|
|
87113
87235
|
var this$1 = $m_Lio_kaitai_struct_languages_RubyCompiler$();
|
|
87114
87236
|
return this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
87115
87237
|
});
|
|
87116
|
-
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.
|
|
87117
|
-
return (((
|
|
87238
|
+
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
87239
|
+
return $m_Lio_kaitai_struct_languages_RubyCompiler$().enumValue__T__T__T($as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).last__O()), label)
|
|
87118
87240
|
});
|
|
87119
|
-
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.
|
|
87120
|
-
return (((("Kaitai::Struct::Stream::resolve_enum(" + this.enumDirectMap__sci_List__T(
|
|
87241
|
+
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
87242
|
+
return (((("Kaitai::Struct::Stream::resolve_enum(" + this.enumDirectMap__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name)) + ", ") + id) + ")")
|
|
87121
87243
|
});
|
|
87122
87244
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.enumDirectMap__sci_List__T = (function(enumTypeAndName) {
|
|
87123
87245
|
var this$1 = $n(enumTypeAndName);
|
|
@@ -87378,13 +87500,13 @@ $c_Lio_kaitai_struct_translators_RustTranslator.prototype.doLocalName__T__T = (f
|
|
|
87378
87500
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.doName__T__T = (function(s) {
|
|
87379
87501
|
return s
|
|
87380
87502
|
});
|
|
87381
|
-
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.
|
|
87382
|
-
var enumClass = this.types2classAbs__sci_List__T(
|
|
87503
|
+
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
87504
|
+
var enumClass = this.types2classAbs__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name);
|
|
87383
87505
|
$m_Lio_kaitai_struct_Utils$();
|
|
87384
87506
|
var this$3 = $n(label);
|
|
87385
87507
|
return ((enumClass + "::") + $as_T(this$3.toUpperCase()))
|
|
87386
87508
|
});
|
|
87387
|
-
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.
|
|
87509
|
+
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
87388
87510
|
return id
|
|
87389
87511
|
});
|
|
87390
87512
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
@@ -88114,8 +88236,9 @@ function $c_Lio_kaitai_struct_translators_ConstructTranslator(provider, importLi
|
|
|
88114
88236
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
88115
88237
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
88116
88238
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_importList = null;
|
|
88239
|
+
this.Lio_kaitai_struct_translators_PythonTranslator__f_config = null;
|
|
88117
88240
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_asciiCharQuoteMap = null;
|
|
88118
|
-
$
|
|
88241
|
+
$ct_Lio_kaitai_struct_translators_PythonTranslator__Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_RuntimeConfig__(this, provider, importList, new $c_Lio_kaitai_struct_RuntimeConfig(true, false, false, true, new $c_Lio_kaitai_struct_CppRuntimeConfig($m_sci_Nil$(), false, false, false, $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$()), "", new $c_Lio_kaitai_struct_JavaRuntimeConfig("", "io.kaitai.struct.ByteBufferKaitaiStream", "java.nio.BufferUnderflowException"), "Kaitai", "", "", "kaitai_struct_nim_runtime", ""))
|
|
88119
88242
|
}
|
|
88120
88243
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype = new $h_Lio_kaitai_struct_translators_PythonTranslator();
|
|
88121
88244
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_ConstructTranslator;
|
|
@@ -88130,7 +88253,7 @@ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doLocalName__T__T
|
|
|
88130
88253
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doName__T__T = (function(s) {
|
|
88131
88254
|
return (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_PARENT === s) ? "_" : s)
|
|
88132
88255
|
});
|
|
88133
|
-
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.
|
|
88256
|
+
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
88134
88257
|
return (("'" + label) + "'")
|
|
88135
88258
|
});
|
|
88136
88259
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
@@ -88299,7 +88422,7 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.asciiCharQuoteMap__sci_
|
|
|
88299
88422
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T = (function(t, values) {
|
|
88300
88423
|
if ($n($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_useListInitializers) {
|
|
88301
88424
|
$n(this.Lio_kaitai_struct_translators_CppTranslator__f_importListHdr).addSystem__T__V("vector");
|
|
88302
|
-
var cppElType = $m_Lio_kaitai_struct_languages_CppCompiler$().
|
|
88425
|
+
var cppElType = $m_Lio_kaitai_struct_languages_CppCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_languages_components_CppImportList__Lio_kaitai_struct_datatype_DataType__Z__T($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig, this.Lio_kaitai_struct_translators_CppTranslator__f_importListHdr, t, false);
|
|
88303
88426
|
var this$2 = $n($as_sc_IterableOnceOps($n(values).map__F1__O(new $c_sjsr_AnonFunction1(((value$2) => {
|
|
88304
88427
|
var value = $as_Lio_kaitai_struct_exprlang_Ast$expr(value$2);
|
|
88305
88428
|
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
@@ -88353,16 +88476,20 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doInternalName__Lio_kai
|
|
|
88353
88476
|
var this$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
88354
88477
|
return (this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id) + "()")
|
|
88355
88478
|
});
|
|
88356
|
-
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.
|
|
88479
|
+
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
88480
|
+
var isExternal = $n(enumSpec).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_translators_BaseTranslator__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass);
|
|
88481
|
+
if (isExternal) {
|
|
88482
|
+
$n(this.Lio_kaitai_struct_translators_CppTranslator__f_importListHdr).addLocal__T__V($m_Lio_kaitai_struct_languages_CppCompiler$().outFileNameHeader__T__T($as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).head__O())))
|
|
88483
|
+
};
|
|
88357
88484
|
var $$x2 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
88358
|
-
var this$1 = $n(
|
|
88485
|
+
var this$1 = $n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name);
|
|
88359
88486
|
var $$x1 = $n($$x2).types2class__sci_List__T($as_sci_List($f_sc_StrictOptimizedIterableOps__dropRight__I__O(this$1, 1)));
|
|
88360
88487
|
$m_Lio_kaitai_struct_Utils$();
|
|
88361
|
-
var s = (($as_T($n(
|
|
88488
|
+
var s = (($as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).last__O()) + "_") + label);
|
|
88362
88489
|
return (($$x1 + "::") + $as_T(s.toUpperCase()))
|
|
88363
88490
|
});
|
|
88364
|
-
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.
|
|
88365
|
-
return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(
|
|
88491
|
+
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
88492
|
+
return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name)) + ">(") + id) + ")")
|
|
88366
88493
|
});
|
|
88367
88494
|
$c_Lio_kaitai_struct_translators_CppTranslator.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) {
|
|
88368
88495
|
var x$2 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
|
|
@@ -88396,32 +88523,7 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doIfExp__Lio_kaitai_str
|
|
|
88396
88523
|
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)) + "))")
|
|
88397
88524
|
});
|
|
88398
88525
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
88399
|
-
|
|
88400
|
-
var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
88401
|
-
if ((x === x1)) {
|
|
88402
|
-
var $$x1 = true
|
|
88403
|
-
} else {
|
|
88404
|
-
var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
88405
|
-
var $$x1 = (x$3 === x1)
|
|
88406
|
-
};
|
|
88407
|
-
if ($$x1) {
|
|
88408
|
-
return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
|
|
88409
|
-
} else {
|
|
88410
|
-
var x$5 = $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$();
|
|
88411
|
-
if ((x$5 === x1)) {
|
|
88412
|
-
if ((typeName instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
88413
|
-
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(typeName);
|
|
88414
|
-
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)) + ")")
|
|
88415
|
-
} else {
|
|
88416
|
-
return this.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T(value, typeName)
|
|
88417
|
-
}
|
|
88418
|
-
} else {
|
|
88419
|
-
throw new $c_s_MatchError(x1)
|
|
88420
|
-
}
|
|
88421
|
-
}
|
|
88422
|
-
});
|
|
88423
|
-
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.cppStaticCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
88424
|
-
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)) + ")")
|
|
88526
|
+
return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_languages_components_CppImportList__Lio_kaitai_struct_datatype_DataType__Z__T($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig, this.Lio_kaitai_struct_translators_CppTranslator__f_importListHdr, typeName, false)) + ">(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + ")")
|
|
88425
88527
|
});
|
|
88426
88528
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
88427
88529
|
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0);
|
|
@@ -88691,11 +88793,11 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doName__T__T = (functio
|
|
|
88691
88793
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
88692
88794
|
return ("self." + $m_Lio_kaitai_struct_languages_LuaCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
88693
88795
|
});
|
|
88694
|
-
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.
|
|
88695
|
-
return (($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(
|
|
88796
|
+
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
88797
|
+
return (($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + ".") + label)
|
|
88696
88798
|
});
|
|
88697
|
-
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.
|
|
88698
|
-
return ((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(
|
|
88799
|
+
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
88800
|
+
return ((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + "(") + id) + ")")
|
|
88699
88801
|
});
|
|
88700
88802
|
$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) {
|
|
88701
88803
|
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))
|
|
@@ -89028,13 +89130,13 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doInternalName__Lio_kai
|
|
|
89028
89130
|
var this$1 = $m_Lio_kaitai_struct_languages_PHPCompiler$();
|
|
89029
89131
|
return (("$this->" + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "()")
|
|
89030
89132
|
});
|
|
89031
|
-
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.
|
|
89032
|
-
var enumClass = this.types2classAbs__sci_List__T(
|
|
89133
|
+
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
89134
|
+
var enumClass = this.types2classAbs__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name);
|
|
89033
89135
|
$m_Lio_kaitai_struct_Utils$();
|
|
89034
89136
|
var this$3 = $n(label);
|
|
89035
89137
|
return ((enumClass + "::") + $as_T(this$3.toUpperCase()))
|
|
89036
89138
|
});
|
|
89037
|
-
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.
|
|
89139
|
+
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
89038
89140
|
return id
|
|
89039
89141
|
});
|
|
89040
89142
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
@@ -90197,7 +90299,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.results__Lio_kaitai_struct_
|
|
|
90197
90299
|
var this$2 = $n(this$1.Lio_kaitai_struct_format_ClassSpec__f_name);
|
|
90198
90300
|
var className = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", "::", "");
|
|
90199
90301
|
var this$18 = $n($m_s_Predef$().s_Predef$__f_Map);
|
|
90200
|
-
var self =
|
|
90302
|
+
var self = $m_Lio_kaitai_struct_languages_CppCompiler$().outFileNameSource__T__T(className);
|
|
90201
90303
|
var this$4 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrcHeader);
|
|
90202
90304
|
var this$5 = $n(this$4.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb);
|
|
90203
90305
|
var $$x4 = $n(this$5.scm_StringBuilder__f_underlying).jl_StringBuilder__f_java$lang$StringBuilder$$content;
|
|
@@ -90206,7 +90308,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.results__Lio_kaitai_struct_
|
|
|
90206
90308
|
var this$7 = $n(this$6.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb);
|
|
90207
90309
|
var y = ((("" + $$x4) + $$x3) + $n(this$7.scm_StringBuilder__f_underlying).jl_StringBuilder__f_java$lang$StringBuilder$$content);
|
|
90208
90310
|
var $$x5 = new $c_T2(self, y);
|
|
90209
|
-
var self$1 =
|
|
90311
|
+
var self$1 = $m_Lio_kaitai_struct_languages_CppCompiler$().outFileNameHeader__T__T(className);
|
|
90210
90312
|
var this$10 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader);
|
|
90211
90313
|
var this$11 = $n(this$10.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb);
|
|
90212
90314
|
var $$x2 = $n(this$11.scm_StringBuilder__f_underlying).jl_StringBuilder__f_java$lang$StringBuilder$$content;
|
|
@@ -90221,17 +90323,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.results__Lio_kaitai_struct_
|
|
|
90221
90323
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.indent__T = (function() {
|
|
90222
90324
|
return " "
|
|
90223
90325
|
});
|
|
90224
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.outFileNameSource__T__T = (function(className) {
|
|
90225
|
-
return (className + ".cpp")
|
|
90226
|
-
});
|
|
90227
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.outFileNameHeader__T__T = (function(className) {
|
|
90228
|
-
return (className + ".h")
|
|
90229
|
-
});
|
|
90230
90326
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.fileHeader__T__V = (function(topClassName) {
|
|
90231
90327
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrcHeader).puts__T__V("// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild");
|
|
90232
90328
|
var this$1 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrcHeader);
|
|
90233
90329
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
90234
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc).addLocal__T__V(
|
|
90330
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc).addLocal__T__V($m_Lio_kaitai_struct_languages_CppCompiler$().outFileNameHeader__T__T(topClassName));
|
|
90235
90331
|
if ($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_usePragmaOnce) {
|
|
90236
90332
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader).puts__T__V("#pragma once")
|
|
90237
90333
|
} else {
|
|
@@ -90243,33 +90339,30 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.fileHeader__T__V = (functio
|
|
|
90243
90339
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader).puts__T__V("// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild");
|
|
90244
90340
|
var this$3 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader);
|
|
90245
90341
|
$n(this$3.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
90246
|
-
|
|
90247
|
-
this$4
|
|
90342
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader).puts__T__V((("class " + $m_Lio_kaitai_struct_languages_CppCompiler$().type2class__T__T(topClassName)) + ";"));
|
|
90343
|
+
var this$4 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader);
|
|
90344
|
+
$n(this$4.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
90345
|
+
var this$5 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListHdr);
|
|
90346
|
+
this$5.addLocal__T__V("kaitai/kaitaistruct.h");
|
|
90248
90347
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListHdr).addSystem__T__V("stdint.h");
|
|
90249
90348
|
var x1 = $n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
90250
|
-
var x = $m_Lio_kaitai_struct_CppRuntimeConfig$
|
|
90349
|
+
var x = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
90251
90350
|
if ((x === x1)) {
|
|
90252
|
-
var $$x1 = true
|
|
90253
|
-
} else {
|
|
90254
|
-
var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
90255
|
-
var $$x1 = (x$3 === x1)
|
|
90256
|
-
};
|
|
90257
|
-
if ($$x1) {
|
|
90258
90351
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListHdr).addSystem__T__V("memory")
|
|
90259
90352
|
} else {
|
|
90260
|
-
var x$
|
|
90261
|
-
if ((!(x$
|
|
90353
|
+
var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
90354
|
+
if ((!(x$3 === x1))) {
|
|
90262
90355
|
throw new $c_s_MatchError(x1)
|
|
90263
90356
|
}
|
|
90264
90357
|
};
|
|
90265
90358
|
var minVer = $n($m_Lio_kaitai_struct_format_KSVersion$().Lio_kaitai_struct_format_KSVersion$__f_minimalRuntime).toInt__I();
|
|
90266
|
-
var this$
|
|
90267
|
-
$n(this$
|
|
90359
|
+
var this$6 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr);
|
|
90360
|
+
$n(this$6.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
90268
90361
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((("#if KAITAI_STRUCT_VERSION < " + minVer) + "L"));
|
|
90269
90362
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((("#error \"Incompatible Kaitai Struct C++/STL API: version " + $m_Lio_kaitai_struct_format_KSVersion$().Lio_kaitai_struct_format_KSVersion$__f_minimalRuntime) + " or later is required\""));
|
|
90270
90363
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V("#endif");
|
|
90271
|
-
var this$
|
|
90272
|
-
var these = this$
|
|
90364
|
+
var this$7 = $n($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_namespace);
|
|
90365
|
+
var these = this$7;
|
|
90273
90366
|
while ((!$n(these).isEmpty__Z())) {
|
|
90274
90367
|
var arg1 = $n(these).head__O();
|
|
90275
90368
|
var namespace = $as_T(arg1);
|
|
@@ -90298,9 +90391,8 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.fileFooter__T__V = (functio
|
|
|
90298
90391
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V(("#endif // " + this.defineName__T__T(topClassName)))
|
|
90299
90392
|
}
|
|
90300
90393
|
});
|
|
90301
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.
|
|
90302
|
-
this.
|
|
90303
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListHdr).addLocal__T__V(this.outFileNameHeader__T__T($as_T($n($n(classSpec).Lio_kaitai_struct_format_ClassSpec__f_name).head__O())))
|
|
90394
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
90395
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListHdr).addLocal__T__V($m_Lio_kaitai_struct_languages_CppCompiler$().outFileNameHeader__T__T($as_T($n($n(extType).name__sci_List()).head__O())))
|
|
90304
90396
|
});
|
|
90305
90397
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
90306
90398
|
var $$x1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
@@ -90308,26 +90400,9 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classHeader__sci_List__V =
|
|
|
90308
90400
|
var array = [$as_T($n(name).last__O())];
|
|
90309
90401
|
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
90310
90402
|
var className = $n($$x1).types2class__sci_List__T($m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems));
|
|
90311
|
-
var x1 = $n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
90312
|
-
var x = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
90313
|
-
if ((x === x1)) {
|
|
90314
|
-
var $$x2 = true
|
|
90315
|
-
} else {
|
|
90316
|
-
var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
90317
|
-
var $$x2 = (x$3 === x1)
|
|
90318
|
-
};
|
|
90319
|
-
if ($$x2) {
|
|
90320
|
-
var extraInherits = ""
|
|
90321
|
-
} else {
|
|
90322
|
-
var x$5 = $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$();
|
|
90323
|
-
if ((!(x$5 === x1))) {
|
|
90324
|
-
throw new $c_s_MatchError(x1)
|
|
90325
|
-
};
|
|
90326
|
-
var extraInherits = ((", std::enable_shared_from_this<" + className) + ">")
|
|
90327
|
-
};
|
|
90328
90403
|
var this$5 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr);
|
|
90329
90404
|
$n(this$5.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
90330
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V(((
|
|
90405
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((("class " + className) + " : public kaitai::kstruct {"));
|
|
90331
90406
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).inc__V();
|
|
90332
90407
|
this.Lio_kaitai_struct_languages_CppCompiler__f_accessMode = this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$();
|
|
90333
90408
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PublicAccess__Lio_kaitai_struct_languages_CppCompiler$PublicAccess$())
|
|
@@ -90344,7 +90419,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.importDataType__Lio_kaitai_
|
|
|
90344
90419
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dt);
|
|
90345
90420
|
var classSpec = $as_Lio_kaitai_struct_format_ClassSpec($n($n(x2).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O());
|
|
90346
90421
|
if ($n(classSpec).Lio_kaitai_struct_format_ClassSpec__f_isTopLevel) {
|
|
90347
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc).addLocal__T__V(
|
|
90422
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc).addLocal__T__V($m_Lio_kaitai_struct_languages_CppCompiler$().outFileNameHeader__T__T($as_T($n($n(classSpec).Lio_kaitai_struct_format_ClassSpec__f_name).head__O())))
|
|
90348
90423
|
}
|
|
90349
90424
|
}
|
|
90350
90425
|
});
|
|
@@ -90401,70 +90476,37 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classConstructorHeader__sci
|
|
|
90401
90476
|
$n(this$9.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
90402
90477
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((((((((($m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(name) + "::") + classNameBrief) + "(") + paramsArg) + ((tIo + " ") + pIo)) + ", ") + ((tParent + " ") + pParent)) + ", ") + (((((tRoot + " ") + pRoot) + endianSuffixSrc) + ") : kaitai::kstruct(") + pIo)) + ") {"));
|
|
90403
90478
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).inc__V();
|
|
90404
|
-
var x = $n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
90405
|
-
var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$();
|
|
90406
|
-
if ((x !== null)) {
|
|
90407
|
-
var this$10 = $n(x);
|
|
90408
|
-
var $$x4 = (this$10 === x$3)
|
|
90409
|
-
} else {
|
|
90410
|
-
var $$x4 = false
|
|
90411
|
-
};
|
|
90412
|
-
if ($$x4) {
|
|
90413
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).puts__T__V((((("const auto weakPtrTrick = std::shared_ptr<" + classNameBrief) + ">(this, [](") + classNameBrief) + "*){});"))
|
|
90414
|
-
};
|
|
90415
90479
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_ParentIdentifier$(), pParent);
|
|
90416
|
-
|
|
90417
|
-
|
|
90418
|
-
var x1$2 = $n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
90419
|
-
var x$6 = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
90420
|
-
if ((x$6 === x1$2)) {
|
|
90421
|
-
var $$x6 = true
|
|
90422
|
-
} else {
|
|
90423
|
-
var x$8 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
90424
|
-
var $$x6 = (x$8 === x1$2)
|
|
90425
|
-
};
|
|
90426
|
-
if ($$x6) {
|
|
90427
|
-
var $$x5 = "this"
|
|
90428
|
-
} else {
|
|
90429
|
-
var x$10 = $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$();
|
|
90430
|
-
if ((!(x$10 === x1$2))) {
|
|
90431
|
-
throw new $c_s_MatchError(x1$2)
|
|
90432
|
-
};
|
|
90433
|
-
var $$x5 = "shared_from_this()"
|
|
90434
|
-
}
|
|
90435
|
-
} else {
|
|
90436
|
-
var $$x5 = pRoot
|
|
90437
|
-
};
|
|
90438
|
-
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($$x7, $$x5);
|
|
90439
|
-
var x1$3 = $n($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_meta).Lio_kaitai_struct_format_MetaSpec__f_endian;
|
|
90480
|
+
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_RootIdentifier$(), (((name === null) ? (rootClassName === null) : $n(name).equals__O__Z(rootClassName)) ? (((pRoot + " ? ") + pRoot) + " : this") : pRoot));
|
|
90481
|
+
var x1$2 = $n($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass).Lio_kaitai_struct_format_ClassSpec__f_meta).Lio_kaitai_struct_format_MetaSpec__f_endian;
|
|
90440
90482
|
matchEnd12: {
|
|
90441
|
-
var $$
|
|
90442
|
-
if ((x1$
|
|
90443
|
-
var x2 = $as_s_Some(x1$
|
|
90483
|
+
var $$x4;
|
|
90484
|
+
if ((x1$2 instanceof $c_s_Some)) {
|
|
90485
|
+
var x2 = $as_s_Some(x1$2);
|
|
90444
90486
|
if (($n(x2).s_Some__f_value instanceof $c_Lio_kaitai_struct_datatype_CalcEndian)) {
|
|
90445
|
-
var $$
|
|
90487
|
+
var $$x4 = true;
|
|
90446
90488
|
break matchEnd12
|
|
90447
90489
|
}
|
|
90448
90490
|
};
|
|
90449
|
-
if ((x1$
|
|
90450
|
-
var x4 = $as_s_Some(x1$
|
|
90491
|
+
if ((x1$2 instanceof $c_s_Some)) {
|
|
90492
|
+
var x4 = $as_s_Some(x1$2);
|
|
90451
90493
|
var p5 = $as_Lio_kaitai_struct_datatype_Endianness($n(x4).s_Some__f_value);
|
|
90452
|
-
var x$
|
|
90453
|
-
if ((x$
|
|
90454
|
-
var $$
|
|
90494
|
+
var x$4 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
|
|
90495
|
+
if ((x$4 === p5)) {
|
|
90496
|
+
var $$x4 = true;
|
|
90455
90497
|
break matchEnd12
|
|
90456
90498
|
}
|
|
90457
90499
|
};
|
|
90458
|
-
var $$
|
|
90500
|
+
var $$x4 = false
|
|
90459
90501
|
};
|
|
90460
|
-
if ($$
|
|
90502
|
+
if ($$x4) {
|
|
90461
90503
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$());
|
|
90462
90504
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V("int m__is_le;");
|
|
90463
90505
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_EndianIdentifier$(), (isHybrid ? "p_is_le" : "-1"));
|
|
90464
90506
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PublicAccess__Lio_kaitai_struct_languages_CppCompiler$PublicAccess$())
|
|
90465
90507
|
};
|
|
90466
|
-
var this$
|
|
90467
|
-
var these = this$
|
|
90508
|
+
var this$10 = $n(params);
|
|
90509
|
+
var these = this$10;
|
|
90468
90510
|
while ((!$n(these).isEmpty__Z())) {
|
|
90469
90511
|
var arg1$2 = $n(these).head__O();
|
|
90470
90512
|
var p = $as_Lio_kaitai_struct_format_ParamDefSpec(arg1$2);
|
|
@@ -90848,7 +90890,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
90848
90890
|
var this$3 = $n($$x1);
|
|
90849
90891
|
var procClass = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$3, "", "::", "");
|
|
90850
90892
|
var procName$2 = ("_process_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varSrc));
|
|
90851
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc).addLocal__T__V(
|
|
90893
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc).addLocal__T__V($m_Lio_kaitai_struct_languages_CppCompiler$().outFileNameHeader__T__T($as_T($n(name).last__O())));
|
|
90852
90894
|
var this$4 = $n($as_sc_IterableOnceOps($n(args).map__F1__O(new $c_sjsr_AnonFunction1(((e$2) => {
|
|
90853
90895
|
var e = $as_Lio_kaitai_struct_exprlang_Ast$expr(e$2);
|
|
90854
90896
|
return $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, e)
|
|
@@ -91136,59 +91178,37 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
91136
91178
|
};
|
|
91137
91179
|
var x$3 = $m_s_None$();
|
|
91138
91180
|
if ((x$3 === x1$2)) {
|
|
91139
|
-
var
|
|
91140
|
-
|
|
91141
|
-
if ((x$5 === x1$3)) {
|
|
91142
|
-
var $$x1 = true
|
|
91143
|
-
} else {
|
|
91144
|
-
var x$7 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
91145
|
-
var $$x1 = (x$7 === x1$3)
|
|
91146
|
-
};
|
|
91147
|
-
if ($$x1) {
|
|
91148
|
-
var parent = "this";
|
|
91149
|
-
break matchEnd9
|
|
91150
|
-
} else {
|
|
91151
|
-
var x$9 = $m_Lio_kaitai_struct_CppRuntimeConfig$SharedPointers$();
|
|
91152
|
-
if ((!(x$9 === x1$3))) {
|
|
91153
|
-
throw new $c_s_MatchError(x1$3)
|
|
91154
|
-
};
|
|
91155
|
-
var parent = "shared_from_this()";
|
|
91156
|
-
break matchEnd9
|
|
91157
|
-
}
|
|
91181
|
+
var parent = "this";
|
|
91182
|
+
break matchEnd9
|
|
91158
91183
|
};
|
|
91159
91184
|
throw new $c_s_MatchError(x1$2)
|
|
91160
91185
|
};
|
|
91161
|
-
var x1$
|
|
91162
|
-
matchEnd6
|
|
91186
|
+
var x1$3 = $n($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_meta).Lio_kaitai_struct_format_MetaSpec__f_endian;
|
|
91187
|
+
matchEnd6: {
|
|
91163
91188
|
var addEndian;
|
|
91164
|
-
if ((x1$
|
|
91165
|
-
var x2$3 = $as_s_Some(x1$
|
|
91189
|
+
if ((x1$3 instanceof $c_s_Some)) {
|
|
91190
|
+
var x2$3 = $as_s_Some(x1$3);
|
|
91166
91191
|
var p3$2 = $as_Lio_kaitai_struct_datatype_Endianness($n(x2$3).s_Some__f_value);
|
|
91167
|
-
var x$
|
|
91168
|
-
if ((x$
|
|
91192
|
+
var x$5 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
|
|
91193
|
+
if ((x$5 === p3$2)) {
|
|
91169
91194
|
var addEndian = ", m__is_le";
|
|
91170
|
-
break matchEnd6
|
|
91195
|
+
break matchEnd6
|
|
91171
91196
|
}
|
|
91172
91197
|
};
|
|
91173
91198
|
var addEndian = ""
|
|
91174
91199
|
};
|
|
91175
91200
|
var addArgs = ((((", " + parent) + ", ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_RootIdentifier$())) + addEndian)
|
|
91176
91201
|
};
|
|
91177
|
-
var x1$
|
|
91178
|
-
var x$
|
|
91179
|
-
if ((x$
|
|
91202
|
+
var x1$4 = $n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
91203
|
+
var x$7 = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
91204
|
+
if ((x$7 === x1$4)) {
|
|
91180
91205
|
return (((((("new " + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name)) + "(") + addParams) + io) + addArgs) + ")")
|
|
91181
91206
|
} else {
|
|
91182
|
-
var x$
|
|
91183
|
-
if ((x$
|
|
91184
|
-
return (((((("std::
|
|
91207
|
+
var x$9 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
91208
|
+
if ((x$9 === x1$4)) {
|
|
91209
|
+
return (((((((("std::unique_ptr<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name)) + ">(new ") + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name)) + "(") + addParams) + io) + addArgs) + "))")
|
|
91185
91210
|
} else {
|
|
91186
|
-
|
|
91187
|
-
if ((x$17 === x1$5)) {
|
|
91188
|
-
return (((((((("std::unique_ptr<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name)) + ">(new ") + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name)) + "(") + addParams) + io) + addArgs) + "))")
|
|
91189
|
-
} else {
|
|
91190
|
-
throw new $c_s_MatchError(x1$5)
|
|
91191
|
-
}
|
|
91211
|
+
throw new $c_s_MatchError(x1$4)
|
|
91192
91212
|
}
|
|
91193
91213
|
}
|
|
91194
91214
|
} else {
|
|
@@ -91463,7 +91483,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.type2class__T__T = (functio
|
|
|
91463
91483
|
return $m_Lio_kaitai_struct_languages_CppCompiler$().type2class__T__T(className)
|
|
91464
91484
|
});
|
|
91465
91485
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T = (function(attrType, absolute) {
|
|
91466
|
-
return $m_Lio_kaitai_struct_languages_CppCompiler$().
|
|
91486
|
+
return $m_Lio_kaitai_struct_languages_CppCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_languages_components_CppImportList__Lio_kaitai_struct_datatype_DataType__Z__T($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig, this.Lio_kaitai_struct_languages_CppCompiler__f_importListHdr, attrType, absolute)
|
|
91467
91487
|
});
|
|
91468
91488
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.nullPtr__T = (function() {
|
|
91469
91489
|
var x1 = $n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
@@ -91471,14 +91491,8 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.nullPtr__T = (function() {
|
|
|
91471
91491
|
if ((x === x1)) {
|
|
91472
91492
|
return "0"
|
|
91473
91493
|
} else {
|
|
91474
|
-
var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$
|
|
91494
|
+
var x$3 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
91475
91495
|
if ((x$3 === x1)) {
|
|
91476
|
-
var $$x1 = true
|
|
91477
|
-
} else {
|
|
91478
|
-
var x$5 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
91479
|
-
var $$x1 = (x$5 === x1)
|
|
91480
|
-
};
|
|
91481
|
-
if ($$x1) {
|
|
91482
91496
|
return "nullptr"
|
|
91483
91497
|
} else {
|
|
91484
91498
|
throw new $c_s_MatchError(x1)
|
|
@@ -92883,7 +92897,7 @@ function $c_Lio_kaitai_struct_languages_JavaScriptCompiler(typeProvider, config)
|
|
|
92883
92897
|
this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_importList = null;
|
|
92884
92898
|
$ct_Lio_kaitai_struct_languages_components_LanguageCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__(this, typeProvider, config);
|
|
92885
92899
|
$f_Lio_kaitai_struct_languages_components_SingleOutputFile__$init$__V(this);
|
|
92886
|
-
this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator = new $c_Lio_kaitai_struct_translators_JavaScriptTranslator(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider);
|
|
92900
|
+
this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator = new $c_Lio_kaitai_struct_translators_JavaScriptTranslator(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider, this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_importList);
|
|
92887
92901
|
this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_NAME_SWITCH_ON = 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_SWITCH_ON))
|
|
92888
92902
|
}
|
|
92889
92903
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype = new $h_Lio_kaitai_struct_languages_components_LanguageCompiler();
|
|
@@ -93004,7 +93018,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.outImports__Lio_kait
|
|
|
93004
93018
|
var this$7 = $n($$x1);
|
|
93005
93019
|
var this$8 = $n(this$7.prepended__O__sci_List("exports"));
|
|
93006
93020
|
var exportsArgs = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$8, "", ", ", "");
|
|
93007
|
-
var rassoc$3 = $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().
|
|
93021
|
+
var rassoc$3 = $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().types2class__sci_List__Z__T($n(topClass).Lio_kaitai_struct_format_ClassSpec__f_name, false);
|
|
93008
93022
|
var this$11 = $n(impList);
|
|
93009
93023
|
var f$2 = ((x$4$2) => {
|
|
93010
93024
|
var x$4 = $as_T(x$4$2);
|
|
@@ -93089,8 +93103,8 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.fileFooter__T__V = (
|
|
|
93089
93103
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V(((((($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name) + "_.") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " = ") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + ";"));
|
|
93090
93104
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("});")
|
|
93091
93105
|
});
|
|
93092
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.
|
|
93093
|
-
var name = $as_T($n($n(
|
|
93106
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
93107
|
+
var name = $as_T($n($n(extType).name__sci_List()).head__O());
|
|
93094
93108
|
var className = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
93095
93109
|
var this$1 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_importList);
|
|
93096
93110
|
var s = ("./" + className);
|
|
@@ -93101,7 +93115,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classHeader__sci_Lis
|
|
|
93101
93115
|
var shortClassName = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$1);
|
|
93102
93116
|
var this$1 = $n(name);
|
|
93103
93117
|
if ((this$1.length__I() > 1)) {
|
|
93104
|
-
var addNameExpr = (" = " + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().
|
|
93118
|
+
var addNameExpr = (" = " + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().types2class__sci_List__Z__T($n(name).takeRight__I__sci_List(2), false))
|
|
93105
93119
|
} else {
|
|
93106
93120
|
var addNameExpr = ""
|
|
93107
93121
|
};
|
|
@@ -93151,7 +93165,11 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classConstructorHead
|
|
|
93151
93165
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V();
|
|
93152
93166
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("this._io = _io;");
|
|
93153
93167
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("this._parent = _parent;");
|
|
93154
|
-
|
|
93168
|
+
if (((name === null) ? (rootClassName === null) : $n(name).equals__O__Z(rootClassName))) {
|
|
93169
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("this._root = _root || this;")
|
|
93170
|
+
} else {
|
|
93171
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("this._root = _root;")
|
|
93172
|
+
};
|
|
93155
93173
|
if (isHybrid) {
|
|
93156
93174
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("this._is_le = _is_le;")
|
|
93157
93175
|
};
|
|
@@ -93372,7 +93390,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrDebugStart__Lio_
|
|
|
93372
93390
|
};
|
|
93373
93391
|
if ((attrType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
93374
93392
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(attrType);
|
|
93375
|
-
var enumNameProps = (("enumName: \"" + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().
|
|
93393
|
+
var enumNameProps = (("enumName: \"" + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().types2class__sci_List__Z__T($n($as_Lio_kaitai_struct_format_EnumSpec($n($n(x2).Lio_kaitai_struct_datatype_DataType$EnumType__f_enumSpec).get__O())).Lio_kaitai_struct_format_EnumSpec__f_name, false)) + "\"")
|
|
93376
93394
|
} else {
|
|
93377
93395
|
var enumNameProps = ""
|
|
93378
93396
|
};
|
|
@@ -93526,25 +93544,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.parseExpr__Lio_kaita
|
|
|
93526
93544
|
var this$3 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator);
|
|
93527
93545
|
return this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
93528
93546
|
})))), ", ", ", ", "");
|
|
93529
|
-
|
|
93530
|
-
if (this$4.isEmpty__Z()) {
|
|
93531
|
-
var $$x1 = $m_s_None$()
|
|
93532
|
-
} else {
|
|
93533
|
-
var arg1 = this$4.get__O();
|
|
93534
|
-
var classSpec = $as_Lio_kaitai_struct_format_ClassSpec(arg1);
|
|
93535
|
-
var x$1 = $n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name;
|
|
93536
|
-
var x$2 = $n(classSpec).Lio_kaitai_struct_format_ClassSpec__f_name;
|
|
93537
|
-
var $$x1 = new $c_s_Some(((x$1 === null) ? (x$2 === null) : $n(x$1).equals__O__Z(x$2)))
|
|
93538
|
-
};
|
|
93539
|
-
var this$5 = $n($$x1);
|
|
93540
|
-
if ($uZ((this$5.isEmpty__Z() ? false : this$5.get__O()))) {
|
|
93541
|
-
var this$6 = $n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name);
|
|
93542
|
-
var name = $as_T($f_sc_LinearSeqOps__apply__I__O(this$6, 0));
|
|
93543
|
-
var topLevelModulePrefix = ($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name) + "_.")
|
|
93544
|
-
} else {
|
|
93545
|
-
var topLevelModulePrefix = ""
|
|
93546
|
-
};
|
|
93547
|
-
return ((((((((((("new " + topLevelModulePrefix) + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().types2class__sci_List__T($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name)) + "(") + io) + ", ") + parent$2) + ", ") + root) + addEndian) + addParams) + ")")
|
|
93547
|
+
return (((((((((("new " + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().types2class__sci_List__Z__T($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name, $n(x10).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass))) + "(") + io) + ", ") + parent$2) + ", ") + root) + addEndian) + addParams) + ")")
|
|
93548
93548
|
} else {
|
|
93549
93549
|
throw new $c_s_MatchError(dataType)
|
|
93550
93550
|
}
|
|
@@ -94032,9 +94032,10 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.classConstructorHeader__sci
|
|
|
94032
94032
|
var pRoot = this.paramName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_RootIdentifier$());
|
|
94033
94033
|
var tParent = this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(parentType);
|
|
94034
94034
|
var tRoot = $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator).types2classAbs__sci_List__T(rootClassName);
|
|
94035
|
+
var pRootValue = (((name === null) ? (rootClassName === null) : $n(name).equals__O__Z(rootClassName)) ? ((pRoot + " === null ? $this : ") + pRoot) : pRoot);
|
|
94035
94036
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V(((((((((("public function __construct(" + paramsArg) + ("\\Kaitai\\Struct\\Stream " + pIo)) + ", ") + ((tParent + " ") + pParent)) + " = null, ") + ((tRoot + " ") + pRoot)) + " = null") + endianAdd) + ") {"));
|
|
94036
94037
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V();
|
|
94037
|
-
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((((("parent::__construct(" + pIo) + ", ") + pParent) + ", ") +
|
|
94038
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((((("parent::__construct(" + pIo) + ", ") + pParent) + ", ") + pRootValue) + ");"));
|
|
94038
94039
|
if (isHybrid) {
|
|
94039
94040
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_EndianIdentifier$(), "$is_le")
|
|
94040
94041
|
};
|
|
@@ -94768,10 +94769,11 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.fileFooter__T__V = (functi
|
|
|
94768
94769
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
94769
94770
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("1;")
|
|
94770
94771
|
});
|
|
94771
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.
|
|
94772
|
-
var
|
|
94773
|
-
var name = $as_T($n($n(
|
|
94774
|
-
|
|
94772
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
94773
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_importList);
|
|
94774
|
+
var name = $as_T($n($n(extType).name__sci_List()).head__O());
|
|
94775
|
+
var s = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
94776
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, s)
|
|
94775
94777
|
});
|
|
94776
94778
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
94777
94779
|
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
@@ -94799,6 +94801,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classFooter__sci_List__V =
|
|
|
94799
94801
|
});
|
|
94800
94802
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classConstructorHeader__sci_List__Lio_kaitai_struct_datatype_DataType__sci_List__Z__sci_List__V = (function(name, parentType, rootClassName, isHybrid, params) {
|
|
94801
94803
|
var endianSuffix = (isHybrid ? ", $_is_le" : "");
|
|
94804
|
+
var pRootValue = (((name === null) ? (rootClassName === null) : $n(name).equals__O__Z(rootClassName)) ? "$_root || $self" : "$_root");
|
|
94802
94805
|
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
94803
94806
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
94804
94807
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("sub new {");
|
|
@@ -94809,7 +94812,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classConstructorHeader__sc
|
|
|
94809
94812
|
$n(this$2.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
94810
94813
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("bless $self, $class;");
|
|
94811
94814
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_ParentIdentifier$(), "$_parent");
|
|
94812
|
-
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_RootIdentifier$(),
|
|
94815
|
+
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_RootIdentifier$(), pRootValue);
|
|
94813
94816
|
if (isHybrid) {
|
|
94814
94817
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_EndianIdentifier$(), "$_is_le")
|
|
94815
94818
|
};
|
|
@@ -95178,7 +95181,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumDeclaration__sci_List_
|
|
|
95178
95181
|
var hi = t.RTLong__f_hi;
|
|
95179
95182
|
var label = $as_Lio_kaitai_struct_format_EnumValueSpec($n(x0$1).T2__f__2);
|
|
95180
95183
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
95181
|
-
var $$x1 =
|
|
95184
|
+
var $$x1 = $m_Lio_kaitai_struct_languages_PerlCompiler$().enumValue__T__T__T(enumName, $n(label).Lio_kaitai_struct_format_EnumValueSpec__f_name);
|
|
95182
95185
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator);
|
|
95183
95186
|
var this$4 = $m_s_math_BigInt$();
|
|
95184
95187
|
var n = this$4.apply__J__s_math_BigInt(new $c_RTLong(lo, hi));
|
|
@@ -95188,13 +95191,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumDeclaration__sci_List_
|
|
|
95188
95191
|
}
|
|
95189
95192
|
})))
|
|
95190
95193
|
});
|
|
95191
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumValue__T__T__T = (function(enumName, enumLabel) {
|
|
95192
|
-
var $$x1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator);
|
|
95193
|
-
$n($m_s_package$().s_package$__f_List);
|
|
95194
|
-
var array = [enumName];
|
|
95195
|
-
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
95196
|
-
return $n($$x1).doEnumByLabel__sci_List__T__T($m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems), enumLabel)
|
|
95197
|
-
});
|
|
95198
95194
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classToString__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(toStringExpr) {
|
|
95199
95195
|
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
95200
95196
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
@@ -95406,14 +95402,14 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.fileHeader__T__V = (functi
|
|
|
95406
95402
|
var this$10 = $n(this.Lio_kaitai_struct_languages_RustCompiler__f_out);
|
|
95407
95403
|
$n(this$10.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
95408
95404
|
});
|
|
95409
|
-
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.
|
|
95410
|
-
var name = $as_T($n($n(
|
|
95411
|
-
var
|
|
95412
|
-
var names = $n(
|
|
95405
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
95406
|
+
var name = $as_T($n($n(extType).name__sci_List()).last__O());
|
|
95407
|
+
var className = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
95408
|
+
var names = $n(extType).name__sci_List();
|
|
95413
95409
|
var this$1 = $n(names);
|
|
95414
95410
|
var pkg = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$1, "", "::", "");
|
|
95415
95411
|
var this$2 = $n(this.Lio_kaitai_struct_languages_RustCompiler__f_importList);
|
|
95416
|
-
var s = ((pkg + "::") +
|
|
95412
|
+
var s = ((pkg + "::") + className);
|
|
95417
95413
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, s)
|
|
95418
95414
|
});
|
|
95419
95415
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
@@ -97465,8 +97461,10 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.outImports__Lio_kaitai_stru
|
|
|
97465
97461
|
var this$2 = $n($n(this$1.Lio_kaitai_struct_ImportList__f_list).toList__sci_List());
|
|
97466
97462
|
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", "\n", "\n")
|
|
97467
97463
|
});
|
|
97468
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.
|
|
97469
|
-
$
|
|
97464
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
97465
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_importList);
|
|
97466
|
+
var s = (("require(\"" + $n($n(extType).name__sci_List()).head__O()) + "\")");
|
|
97467
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, s)
|
|
97470
97468
|
});
|
|
97471
97469
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.fileHeader__T__V = (function(topClassName) {
|
|
97472
97470
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_outHeader).puts__T__V("-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild");
|
|
@@ -97576,7 +97574,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classConstructorHeader__sci
|
|
|
97576
97574
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).inc__V();
|
|
97577
97575
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("KaitaiStruct._init(self, io)");
|
|
97578
97576
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("self._parent = parent");
|
|
97579
|
-
|
|
97577
|
+
if (((name === null) ? (rootClassName === null) : $n(name).equals__O__Z(rootClassName))) {
|
|
97578
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("self._root = root or self")
|
|
97579
|
+
} else {
|
|
97580
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("self._root = root")
|
|
97581
|
+
};
|
|
97580
97582
|
if (isHybrid) {
|
|
97581
97583
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("self._is_le = is_le")
|
|
97582
97584
|
};
|
|
@@ -98238,8 +98240,10 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.classToString__Lio_kaitai_s
|
|
|
98238
98240
|
var this$3 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_out);
|
|
98239
98241
|
$n(this$3.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
98240
98242
|
});
|
|
98241
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.
|
|
98242
|
-
$
|
|
98243
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
98244
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_importList);
|
|
98245
|
+
var s = $as_T($n($n(extType).name__sci_List()).head__O());
|
|
98246
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, s)
|
|
98243
98247
|
});
|
|
98244
98248
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.innerEnums__Z = (function() {
|
|
98245
98249
|
return false
|
|
@@ -98281,10 +98285,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.outImports__Lio_kaitai_stru
|
|
|
98281
98285
|
var this$4 = $n($$x1);
|
|
98282
98286
|
return ($f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", "\n", "") + "\n\n")
|
|
98283
98287
|
});
|
|
98284
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.importFile__T__V = (function(file) {
|
|
98285
|
-
var this$1 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_importList);
|
|
98286
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, file)
|
|
98287
|
-
});
|
|
98288
98288
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
98289
98289
|
$n(this.Lio_kaitai_struct_languages_NimCompiler__f_out).puts__T__V((("alignToByte(" + io) + ")"))
|
|
98290
98290
|
});
|
|
@@ -99064,36 +99064,15 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.indent__T = (function() {
|
|
|
99064
99064
|
});
|
|
99065
99065
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.outImports__Lio_kaitai_struct_format_ClassSpec__T = (function(topClass) {
|
|
99066
99066
|
var this$1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_importList);
|
|
99067
|
-
var this$
|
|
99068
|
-
|
|
99069
|
-
var x = $as_T(x$2);
|
|
99070
|
-
return (("require '" + x) + "'")
|
|
99071
|
-
});
|
|
99072
|
-
if ((this$3 === $m_sci_Nil$())) {
|
|
99073
|
-
var $$x1 = $m_sci_Nil$()
|
|
99074
|
-
} else {
|
|
99075
|
-
var arg1 = this$3.head__O();
|
|
99076
|
-
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
99077
|
-
var t = h;
|
|
99078
|
-
var rest = $as_sci_List(this$3.tail__O());
|
|
99079
|
-
while ((rest !== $m_sci_Nil$())) {
|
|
99080
|
-
var arg1$1 = $n(rest).head__O();
|
|
99081
|
-
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
99082
|
-
$n(t).sci_$colon$colon__f_next = nx;
|
|
99083
|
-
t = nx;
|
|
99084
|
-
rest = $as_sci_List($n(rest).tail__O())
|
|
99085
|
-
};
|
|
99086
|
-
var $$x1 = h
|
|
99087
|
-
};
|
|
99088
|
-
var this$4 = $n($$x1);
|
|
99089
|
-
return ($f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", "\n", "") + "\n")
|
|
99067
|
+
var this$2 = $n($n(this$1.Lio_kaitai_struct_ImportList__f_list).toList__sci_List());
|
|
99068
|
+
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", "\n", "\n")
|
|
99090
99069
|
});
|
|
99091
99070
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.fileHeader__T__V = (function(topClassName) {
|
|
99092
99071
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_outHeader).puts__T__V("# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild");
|
|
99093
99072
|
var this$1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_outHeader);
|
|
99094
99073
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
99095
99074
|
var this$2 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_importList);
|
|
99096
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, "kaitai/struct/struct");
|
|
99075
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, "require 'kaitai/struct/struct'");
|
|
99097
99076
|
var this$3 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out);
|
|
99098
99077
|
$n(this$3.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
99099
99078
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((("unless Gem::Version.new(Kaitai::Struct::VERSION) >= Gem::Version.new('" + $m_Lio_kaitai_struct_format_KSVersion$().Lio_kaitai_struct_format_KSVersion$__f_minimalRuntime) + "')"));
|
|
@@ -99104,6 +99083,14 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.fileHeader__T__V = (functi
|
|
|
99104
99083
|
var this$4 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out);
|
|
99105
99084
|
$n(this$4.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
99106
99085
|
});
|
|
99086
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
99087
|
+
if ($n(extType).isOpaque__Z()) {
|
|
99088
|
+
return (void 0)
|
|
99089
|
+
};
|
|
99090
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_importList);
|
|
99091
|
+
var s = (("require_relative '" + $n($n(extType).name__sci_List()).head__O()) + "'");
|
|
99092
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, s)
|
|
99093
|
+
});
|
|
99107
99094
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classHeader__T__V = (function(name) {
|
|
99108
99095
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " < Kaitai::Struct::Struct"));
|
|
99109
99096
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).inc__V();
|
|
@@ -99137,9 +99124,10 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classConstructorHeader__T_
|
|
|
99137
99124
|
var $$x1 = h
|
|
99138
99125
|
};
|
|
99139
99126
|
var paramsList = $n($$x2).join__sc_IterableOnce__T__T__T__T($$x1, ", ", ", ", "");
|
|
99140
|
-
|
|
99127
|
+
var pRootValue = ((name === rootClassName) ? "_root || self" : "_root");
|
|
99128
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(((("def initialize(_io, _parent = nil, _root = nil" + endianSuffix) + paramsList) + ")"));
|
|
99141
99129
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).inc__V();
|
|
99142
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("super(_io, _parent,
|
|
99130
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((("super(_io, _parent, " + pRootValue) + ")"));
|
|
99143
99131
|
if (isHybrid) {
|
|
99144
99132
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("@_is_le = _is_le")
|
|
99145
99133
|
};
|
|
@@ -99281,7 +99269,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrProcess__Lio_kaitai_st
|
|
|
99281
99269
|
var x = $m_Lio_kaitai_struct_format_ProcessZlib$();
|
|
99282
99270
|
if ((x === proc)) {
|
|
99283
99271
|
var this$1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_importList);
|
|
99284
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "zlib");
|
|
99272
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "require 'zlib'");
|
|
99285
99273
|
var expr$2 = (("Zlib::Inflate.inflate(" + srcExpr) + ")")
|
|
99286
99274
|
} else if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessRotate)) {
|
|
99287
99275
|
var x4 = $as_Lio_kaitai_struct_format_ProcessRotate(proc);
|
|
@@ -99622,7 +99610,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumDeclaration__T__T__sci
|
|
|
99622
99610
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator);
|
|
99623
99611
|
var this$7 = $m_s_math_BigInt$();
|
|
99624
99612
|
var n = this$7.apply__J__s_math_BigInt(new $c_RTLong(lo, hi));
|
|
99625
|
-
$n($$x1).puts__T__V(((($n(n).toString__T() + " => ") +
|
|
99613
|
+
$n($$x1).puts__T__V(((($n(n).toString__T() + " => ") + $m_Lio_kaitai_struct_languages_RubyCompiler$().enumValue__T__T__T(enumName, label)) + ","))
|
|
99626
99614
|
} else {
|
|
99627
99615
|
throw new $c_s_MatchError(x0$1)
|
|
99628
99616
|
}
|
|
@@ -99631,13 +99619,6 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumDeclaration__T__T__sci
|
|
|
99631
99619
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("}");
|
|
99632
99620
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_RubyCompiler$().inverseEnumName__T__T(enumConst) + " = ") + enumConst) + ".invert"))
|
|
99633
99621
|
});
|
|
99634
|
-
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumValue__T__T__T = (function(enumName, enumLabel) {
|
|
99635
|
-
var $$x1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator);
|
|
99636
|
-
$n($m_s_package$().s_package$__f_List);
|
|
99637
|
-
var array = [enumName];
|
|
99638
|
-
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
99639
|
-
return $n($$x1).doEnumByLabel__sci_List__T__T($m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems), enumLabel)
|
|
99640
|
-
});
|
|
99641
99622
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.debugClassSequence__sci_List__V = (function(seq) {
|
|
99642
99623
|
var this$2 = $n(seq);
|
|
99643
99624
|
var f = ((attr$2) => {
|
|
@@ -100424,9 +100405,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
100424
100405
|
var this$3 = $n(params);
|
|
100425
100406
|
var f = ((p$2) => {
|
|
100426
100407
|
var p = $as_Lio_kaitai_struct_format_ParamDefSpec(p$2);
|
|
100427
|
-
var this$2 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100428
100408
|
var attrType = $n(p).Lio_kaitai_struct_format_ParamDefSpec__f_dataType;
|
|
100429
|
-
var
|
|
100409
|
+
var this$2 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100410
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100411
|
+
var $$x2 = this$2.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, importList);
|
|
100430
100412
|
var id = $n(p).Lio_kaitai_struct_format_ParamDefSpec__f_id;
|
|
100431
100413
|
return (($$x2 + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
100432
100414
|
});
|
|
@@ -100453,7 +100435,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
100453
100435
|
var $$x6 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100454
100436
|
var $$x5 = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
100455
100437
|
var this$5 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100456
|
-
$
|
|
100438
|
+
var importList$1 = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100439
|
+
$n($$x6).puts__T__V((((((((("public " + $$x5) + "(KaitaiStream _io, ") + this$5.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(parentType, importList$1)) + " _parent, ") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(rootClassName)) + " _root, boolean _is_le") + paramsArg) + ") {"));
|
|
100457
100440
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100458
100441
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("super(_io);");
|
|
100459
100442
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("this._parent = _parent;");
|
|
@@ -100496,7 +100479,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
100496
100479
|
var $$x10 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100497
100480
|
var $$x9 = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
100498
100481
|
var this$9 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100499
|
-
$
|
|
100482
|
+
var importList$2 = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100483
|
+
$n($$x10).puts__T__V((((((("public " + $$x9) + "(KaitaiStream _io, ") + this$9.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(parentType, importList$2)) + " _parent") + paramsArg) + ") {"));
|
|
100500
100484
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100501
100485
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("this(_io, _parent, null" + paramsRelay) + ");"));
|
|
100502
100486
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).dec__V();
|
|
@@ -100506,7 +100490,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
100506
100490
|
var $$x12 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100507
100491
|
var $$x11 = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
100508
100492
|
var this$11 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100509
|
-
$
|
|
100493
|
+
var importList$3 = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100494
|
+
$n($$x12).puts__T__V((((((((("public " + $$x11) + "(KaitaiStream _io, ") + this$11.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(parentType, importList$3)) + " _parent, ") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(rootClassName)) + " _root") + paramsArg) + ") {"));
|
|
100510
100495
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100511
100496
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("super(_io);");
|
|
100512
100497
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("this._parent = _parent;");
|
|
@@ -100570,10 +100555,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.readFooter__V = (function(
|
|
|
100570
100555
|
this.universalFooter__V()
|
|
100571
100556
|
});
|
|
100572
100557
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
100573
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
100558
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__Lio_kaitai_struct_ImportList__T(attrType, isNullable, this.Lio_kaitai_struct_languages_JavaCompiler__f_importList)) + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
100574
100559
|
});
|
|
100575
100560
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
100576
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
100561
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__Lio_kaitai_struct_ImportList__T(attrType, isNullable, this.Lio_kaitai_struct_languages_JavaCompiler__f_importList)) + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "() { return ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; }"))
|
|
100577
100562
|
});
|
|
100578
100563
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.universalDoc__Lio_kaitai_struct_format_DocSpec__V = (function(doc) {
|
|
100579
100564
|
var this$1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
@@ -100774,9 +100759,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condIfHeader__Lio_kaitai_s
|
|
|
100774
100759
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
100775
100760
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100776
100761
|
var $$x1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
100777
|
-
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100778
100762
|
var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream(dataType);
|
|
100779
|
-
|
|
100763
|
+
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100764
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100765
|
+
$n($$x2).puts__T__V(((($$x1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, importList)) + "();"))
|
|
100780
100766
|
});
|
|
100781
100767
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
100782
100768
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("{");
|
|
@@ -100811,7 +100797,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilHeader__Lio
|
|
|
100811
100797
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100812
100798
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100813
100799
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100814
|
-
|
|
100800
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100801
|
+
$n($$x1).puts__T__V((((this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, importList) + " ") + $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_translator).doName__T__T("_")) + ";"));
|
|
100815
100802
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("int i = 0;");
|
|
100816
100803
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("do {");
|
|
100817
100804
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
@@ -100847,7 +100834,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentSimple__Li
|
|
|
100847
100834
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
100848
100835
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100849
100836
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100850
|
-
|
|
100837
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100838
|
+
$n($$x1).puts__T__V((((((this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, importList) + " ") + id) + " = ") + expr) + ";"))
|
|
100851
100839
|
});
|
|
100852
100840
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.blockScopeHeader__V = (function() {
|
|
100853
100841
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("{");
|
|
@@ -100943,7 +100931,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
100943
100931
|
};
|
|
100944
100932
|
if ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType)))) {
|
|
100945
100933
|
var this$4 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100946
|
-
|
|
100934
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100935
|
+
return (((("(" + this$4.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(assignType, importList)) + ") (") + expr) + ")")
|
|
100947
100936
|
} else {
|
|
100948
100937
|
return expr
|
|
100949
100938
|
}
|
|
@@ -101014,7 +101003,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.bytesPadTermExpr__T__s_Opt
|
|
|
101014
101003
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
101015
101004
|
if ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType)))) {
|
|
101016
101005
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
101017
|
-
var
|
|
101006
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
101007
|
+
var expr = (((("((" + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, importList)) + ") (") + id) + "))")
|
|
101018
101008
|
} else {
|
|
101019
101009
|
var expr = id
|
|
101020
101010
|
};
|
|
@@ -101030,7 +101020,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCasesRender__Lio_kai
|
|
|
101030
101020
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
101031
101021
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
101032
101022
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
101033
|
-
|
|
101023
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
101024
|
+
$n($$x1).puts__T__V((((((this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(onType, importList) + " ") + nameSwitchStr) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ";"));
|
|
101034
101025
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("if (" + nameSwitchStr) + " != null) {"));
|
|
101035
101026
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
101036
101027
|
$f_Lio_kaitai_struct_languages_components_SwitchOps__switchCasesRender__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__sci_Map__F1__F1__V(this, id, on, cases, normalCaseProc, elseCaseProc);
|
|
@@ -101097,7 +101088,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfStart__Lio_kaitai_
|
|
|
101097
101088
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
101098
101089
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
101099
101090
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
101100
|
-
var
|
|
101091
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
101092
|
+
var $$x1 = this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(onType, importList);
|
|
101101
101093
|
var e = this.Lio_kaitai_struct_languages_JavaCompiler__f_NAME_SWITCH_ON;
|
|
101102
101094
|
$n($$x2).puts__T__V(((((($$x1 + " ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, e)) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ";"))
|
|
101103
101095
|
});
|
|
@@ -101126,10 +101118,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfEnd__V = (function
|
|
|
101126
101118
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("}")
|
|
101127
101119
|
});
|
|
101128
101120
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
101129
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
101121
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, this.Lio_kaitai_struct_languages_JavaCompiler__f_importList)) + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
101130
101122
|
});
|
|
101131
101123
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
101132
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
101124
|
+
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, this.Lio_kaitai_struct_languages_JavaCompiler__f_importList)) + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "() {"));
|
|
101133
101125
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V()
|
|
101134
101126
|
});
|
|
101135
101127
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
@@ -101142,8 +101134,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceReturn__Lio_kaitai
|
|
|
101142
101134
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ";"))
|
|
101143
101135
|
});
|
|
101144
101136
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
101145
|
-
var primType = $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
101146
|
-
var boxedType = $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
101137
|
+
var primType = $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, this.Lio_kaitai_struct_languages_JavaCompiler__f_importList);
|
|
101138
|
+
var boxedType = $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, this.Lio_kaitai_struct_languages_JavaCompiler__f_importList);
|
|
101147
101139
|
if ((primType !== boxedType)) {
|
|
101148
101140
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((((primType + " _tmp = (") + primType) + ") (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, value)) + ");"));
|
|
101149
101141
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName) + " = _tmp;"))
|
|
@@ -101350,7 +101342,7 @@ function $c_Lio_kaitai_struct_languages_PythonCompiler(typeProvider, config) {
|
|
|
101350
101342
|
this.Lio_kaitai_struct_languages_PythonCompiler__f_importList = null;
|
|
101351
101343
|
$ct_Lio_kaitai_struct_languages_components_LanguageCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__(this, typeProvider, config);
|
|
101352
101344
|
$f_Lio_kaitai_struct_languages_components_SingleOutputFile__$init$__V(this);
|
|
101353
|
-
this.Lio_kaitai_struct_languages_PythonCompiler__f_translator = $
|
|
101345
|
+
this.Lio_kaitai_struct_languages_PythonCompiler__f_translator = $ct_Lio_kaitai_struct_translators_PythonTranslator__Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_RuntimeConfig__(new $c_Lio_kaitai_struct_translators_PythonTranslator(), this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider, this.Lio_kaitai_struct_languages_PythonCompiler__f_importList, this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config)
|
|
101354
101346
|
}
|
|
101355
101347
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype = new $h_Lio_kaitai_struct_languages_components_LanguageCompiler();
|
|
101356
101348
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.constructor = $c_Lio_kaitai_struct_languages_PythonCompiler;
|
|
@@ -101480,13 +101472,8 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.fileHeader__T__V = (func
|
|
|
101480
101472
|
var this$8 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out);
|
|
101481
101473
|
$n(this$8.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
101482
101474
|
});
|
|
101483
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.
|
|
101484
|
-
|
|
101485
|
-
var $$x1 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out);
|
|
101486
|
-
$m_sc_StringOps$();
|
|
101487
|
-
var x = $n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_pythonPackage;
|
|
101488
|
-
var this$3 = $n(x);
|
|
101489
|
-
$n($$x1).puts__T__V(((!(this$3 === "")) ? ((("from " + $n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_pythonPackage) + " import ") + name) : ("import " + name)))
|
|
101475
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
101476
|
+
$m_Lio_kaitai_struct_languages_PythonCompiler$().externalTypeDeclaration__Lio_kaitai_struct_ExternalType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_RuntimeConfig__V(extType, this.Lio_kaitai_struct_languages_PythonCompiler__f_importList, this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config)
|
|
101490
101477
|
});
|
|
101491
101478
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classHeader__T__V = (function(name) {
|
|
101492
101479
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + "(KaitaiStruct):"));
|
|
@@ -101522,7 +101509,11 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classConstructorHeader__
|
|
|
101522
101509
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).inc__V();
|
|
101523
101510
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("self._io = _io");
|
|
101524
101511
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("self._parent = _parent");
|
|
101525
|
-
|
|
101512
|
+
if ((name === rootClassName)) {
|
|
101513
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("self._root = _root if _root else self")
|
|
101514
|
+
} else {
|
|
101515
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("self._root = _root")
|
|
101516
|
+
};
|
|
101526
101517
|
if (isHybrid) {
|
|
101527
101518
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("self._is_le = _is_le")
|
|
101528
101519
|
};
|
|
@@ -101936,7 +101927,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.parseExpr__Lio_kaitai_st
|
|
|
101936
101927
|
};
|
|
101937
101928
|
var addArgs = (((", " + parent) + ", self._root") + addEndian)
|
|
101938
101929
|
};
|
|
101939
|
-
return (((((
|
|
101930
|
+
return ((((($m_Lio_kaitai_struct_languages_PythonCompiler$().types2class__sci_List__Z__T($n($as_Lio_kaitai_struct_format_ClassSpec($n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O())).Lio_kaitai_struct_format_ClassSpec__f_name, $n(x10).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass)) + "(") + addParams) + io) + addArgs) + ")")
|
|
101940
101931
|
} else {
|
|
101941
101932
|
throw new $c_s_MatchError(dataType)
|
|
101942
101933
|
}
|
|
@@ -102132,11 +102123,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attrValidateExpr__Lio_ka
|
|
|
102132
102123
|
$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) + ")"));
|
|
102133
102124
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).dec__V()
|
|
102134
102125
|
});
|
|
102135
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.userType2class__Lio_kaitai_struct_datatype_DataType$UserType__T = (function(t) {
|
|
102136
|
-
var name = $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;
|
|
102137
|
-
var prefix = ($n(t).isExternal__Lio_kaitai_struct_format_ClassSpec__Z($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass) ? ($n(name).head__O() + ".") : "");
|
|
102138
|
-
return (prefix + $m_Lio_kaitai_struct_languages_PythonCompiler$().types2class__sci_List__T(name))
|
|
102139
|
-
});
|
|
102140
102126
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
|
|
102141
102127
|
return this.Lio_kaitai_struct_languages_PythonCompiler__f_translator
|
|
102142
102128
|
});
|